|
import type { AnimationConfig } from '../animate/public.js'; |
|
|
|
export type AnimationFn = ( |
|
node: Element, |
|
{ from, to }: { from: PositionRect; to: PositionRect }, |
|
params: any |
|
) => AnimationConfig; |
|
|
|
export type Listener = (entry: ResizeObserverEntry) => any; |
|
|
|
|
|
export type PositionRect = DOMRect | ClientRect; |
|
|
|
export interface PromiseInfo<T> { |
|
ctx: null | any; |
|
|
|
token: {}; |
|
hasCatch: boolean; |
|
pending: FragmentFactory; |
|
then: FragmentFactory; |
|
catch: FragmentFactory; |
|
|
|
value: number; |
|
error: number; |
|
|
|
resolved?: T; |
|
|
|
current: FragmentFactory | null; |
|
|
|
block: Fragment | null; |
|
|
|
blocks: [null | Fragment, null | Fragment, null | Fragment]; |
|
|
|
mount: () => HTMLElement; |
|
anchor: HTMLElement; |
|
} |
|
|
|
|
|
export interface ResizeObserverSize { |
|
readonly blockSize: number; |
|
readonly inlineSize: number; |
|
} |
|
|
|
export interface ResizeObserverEntry { |
|
readonly borderBoxSize: readonly ResizeObserverSize[]; |
|
readonly contentBoxSize: readonly ResizeObserverSize[]; |
|
readonly contentRect: DOMRectReadOnly; |
|
readonly devicePixelContentBoxSize: readonly ResizeObserverSize[]; |
|
readonly target: Element; |
|
} |
|
|
|
export type ResizeObserverBoxOptions = 'border-box' | 'content-box' | 'device-pixel-content-box'; |
|
|
|
export interface ResizeObserverOptions { |
|
box?: ResizeObserverBoxOptions; |
|
} |
|
|
|
export interface ResizeObserver { |
|
disconnect(): void; |
|
observe(target: Element, options?: ResizeObserverOptions): void; |
|
unobserve(target: Element): void; |
|
} |
|
|
|
export interface ResizeObserverCallback { |
|
(entries: ResizeObserverEntry[], observer: ResizeObserver): void; |
|
} |
|
|
|
export declare let ResizeObserver: { |
|
prototype: ResizeObserver; |
|
new (callback: ResizeObserverCallback): ResizeObserver; |
|
}; |
|
|
|
export interface StyleInformation { |
|
stylesheet: CSSStyleSheet; |
|
rules: Record<string, true>; |
|
} |
|
|
|
export type TaskCallback = (now: number) => boolean | void; |
|
|
|
export type TaskEntry = { c: TaskCallback; f: () => void }; |
|
|
|
|
|
|
|
|
|
export interface Fragment { |
|
key: string | null; |
|
first: null; |
|
c: () => void; |
|
l: (nodes: any) => void; |
|
h: () => void; |
|
m: (target: HTMLElement, anchor: any) => void; |
|
p: (ctx: T$$['ctx'], dirty: T$$['dirty']) => void; |
|
r: () => void; |
|
f: () => void; |
|
a: () => void; |
|
i: (local: any) => void; |
|
o: (local: any) => void; |
|
d: (detaching: 0 | 1) => void; |
|
} |
|
|
|
export type FragmentFactory = (ctx: any) => Fragment; |
|
|
|
export interface T$$ { |
|
dirty: number[]; |
|
ctx: any[]; |
|
bound: any; |
|
update: () => void; |
|
callbacks: any; |
|
after_update: any[]; |
|
props: Record<string, 0 | string>; |
|
fragment: null | false | Fragment; |
|
not_equal: any; |
|
before_update: any[]; |
|
context: Map<any, any>; |
|
on_mount: any[]; |
|
on_destroy: any[]; |
|
skip_bound: boolean; |
|
on_disconnect: any[]; |
|
root: Element | ShadowRoot; |
|
} |
|
|
|
export interface Task { |
|
abort(): void; |
|
promise: Promise<void>; |
|
} |
|
|
|
|
|
|
|
|
|
type NotFunction<T> = T extends Function ? never : T; |
|
|