87 lines
1.5 KiB
TypeScript
87 lines
1.5 KiB
TypeScript
// See https://kit.svelte.dev/docs/types#app
|
|
// for information about these interfaces
|
|
// and what to do when importing types
|
|
declare namespace App {
|
|
// interface Locals {}
|
|
// interface Platform {}
|
|
// interface PrivateEnv {}
|
|
// interface PublicEnv {}
|
|
}
|
|
|
|
|
|
/**
|
|
* Custom Events
|
|
*/
|
|
// Swipe
|
|
declare namespace svelte.JSX {
|
|
interface HTMLAttributes<T> {
|
|
onswipe?: (event: CustomEvent<string> & { target: EventTarget & T }) => any,
|
|
ontap?: (event: CustomEvent<boolean> & { target: EventTarget & T }) => any,
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Custom Types
|
|
*/
|
|
declare interface PhotoGridAbout {
|
|
id: string
|
|
title: string
|
|
slug: string
|
|
image: {
|
|
id: string
|
|
title: string
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Notifcation
|
|
*/
|
|
declare interface ShopNotification {
|
|
title: string
|
|
name: string
|
|
image: string
|
|
timeout?: number
|
|
id?: number
|
|
}
|
|
|
|
|
|
/**
|
|
* Smooth Scroll Options
|
|
*/
|
|
declare interface smoothScrollOptions {
|
|
hash: string
|
|
changeHash?: boolean
|
|
event?: MouseEvent
|
|
callback?: Function
|
|
}
|
|
|
|
|
|
/**
|
|
* Swipe options
|
|
*/
|
|
declare interface SwipeOptions {
|
|
travelX?: number
|
|
travelY?: number
|
|
timeframe?: number
|
|
}
|
|
|
|
|
|
/**
|
|
* Reveal Animation
|
|
*/
|
|
declare type RevealOptions = {
|
|
enable?: boolean
|
|
options?: TransitionOptions
|
|
children?: string | HTMLElement
|
|
animation: any
|
|
}
|
|
// Options interface
|
|
declare type TransitionOptions = {
|
|
threshold?: number
|
|
duration?: number
|
|
stagger?: number
|
|
delay?: number
|
|
easing?: string | Easing
|
|
} |