UNPKG

filepond

Version:

FilePond, where files go to stretch their bits.

36 lines (35 loc) • 1.68 kB
import { FilePondSvelteComponentElement, type FilePondSvelteComponentOptions } from '../FilePondSvelteComponent/index.svelte.js'; import type { ComponentNode, ElementNode, Locale, NodeContext, TemplateNode } from '../../types/index.js'; import type { NodeData, TextNode } from '../common/nodeTree.js'; export declare const COMPONENT_PROPS: string[]; export declare class FilePondSourceListElement extends FilePondSvelteComponentElement { constructor(); connectedCallback(): void; } export interface FilePondSourceListSource { label: string; icon?: string; action: string; } export interface FilePondSourceListOptions extends Omit<FilePondSvelteComponentOptions, 'root'> { /** Disable buttons */ disabled?: boolean; /** Available sources */ sources: FilePondSourceListSource[]; /** Template to use for rendering different types */ template: TemplateNode[]; /** The assets resource to use for icons, defaults to `{}` */ assets?: { [key: string]: string; }; /** The locale resource props to use for text, defaults to `{}` */ locale?: Locale; /** * Automatically maps a property name to a resource value in locale and/or assets, defaults to `{ title: 'locale', label: 'locale', icon: 'assets' }` meaning that the value of a `label` property is automatically looked up in the `locale` property */ propResourceMap?: { [componentProperty: string]: string; }; /** Hook to manipulate nodes before rendering */ beforeRenderNode?: (node: ComponentNode | ElementNode | TextNode, data?: NodeData, context?: NodeContext) => ComponentNode | ElementNode | TextNode | void | false; }