UNPKG

filepond

Version:

FilePond, where files go to stretch their bits.

50 lines (49 loc) • 2.06 kB
import { type Component } from 'svelte'; import { HTMLElementSafe } from '../../common/ssr.js'; import type { AnimationMode, Locale, ReducedMotionPreference, SpringOptions } from '../../types/index.js'; export declare const COMPONENT_PROPS: string[]; export interface FilePondSvelteComponentElementEventMap { connected: CustomEvent<null>; disconnected: CustomEvent<null>; } interface FilePondSvelteElementEventHandler { addEventListener<K extends keyof FilePondSvelteComponentElementEventMap>(type: K, listener: (this: FilePondSvelteComponentElement, event: FilePondSvelteComponentElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; } export interface FilePondSvelteComponentOptions { /** The component root element */ root: HTMLElement; /** Optional labels */ locale?: Locale; /** Should we use motion or not */ reducedMotionPreference?: ReducedMotionPreference; /** Generic Spring configuration to use */ springOptions?: SpringOptions; } /** * FilePond Svelte Component Element * * @event {CustomEvent<null>} 'connected' - Fired when connected to the DOM * @event {CustomEvent<null>} 'disconnected' - Fired when disconnected from the DOM */ export declare class FilePondSvelteComponentElement extends HTMLElementSafe implements FilePondSvelteElementEventHandler { #private; springOptions?: SpringOptions; reducedMotionPreference?: AnimationMode; locale?: Locale; /** Protected props */ get _app(): any; get _root(): ShadowRoot; /** Attributes being observed for changes */ static get observedAttributes(): string[]; attributeChangedCallback(name: string, _: string, value: string): void; constructor(component: Component<any, any, any>, options: { styles?: string[]; properties?: string[]; methods?: string[]; events?: string[]; }); addListener(type: string, cb: (e: CustomEvent) => void): (() => void) | undefined; connectedCallback(): void; disconnectedCallback(): void; } export {};