import type { Snippet } from "svelte"; import type { attachRef, Box, ReadableBoxedValues, WritableBoxedValues } from "svelte-toolbelt"; export type OnChangeFn = (value: T) => void; export type ElementRef = Box; export type StyleProperties = Record & { [str: `--${string}`]: string | number | undefined; }; export type WithChild = Record, SnippetProps extends Record = { _default: never; }, Ref = HTMLElement> = Omit & { child?: SnippetProps extends { _default: never; } ? Snippet<[{ props: Record; }]> : Snippet<[SnippetProps & { props: Record; }]>; children?: SnippetProps extends { _default: never; } ? Snippet : Snippet<[SnippetProps]>; style?: StyleProperties | string | null | undefined; ref?: Ref | null | undefined; }; export type WithChildNoChildrenSnippetProps = Record, SnippetProps extends Record = { _default: never; }, Ref = HTMLElement> = Omit & { child?: SnippetProps extends { _default: never; } ? Snippet<[{ props: Record; }]> : Snippet<[SnippetProps & { props: Record; }]>; children?: Snippet; style?: StyleProperties | string | null | undefined; ref?: Ref | null | undefined; }; export type Without = Omit; export type WithRefOpts = ReadableBoxedValues<{ id: string; }> & WritableBoxedValues<{ ref: Ref | null; }>; export type BitsEvent = T & { currentTarget: U; }; export type BitsKeyboardEvent = BitsEvent; export type BitsMouseEvent = BitsEvent; export type RefAttachment = ReturnType>;