export type SingleselectAsyncInstance = { open: () => void; close: () => void; focus: () => void; /** Re-runs `loadOptions` with the current query while the popover is open. Used by the sync `Singleselect` proxy to react to `options` prop changes. */ refresh: () => void; }; import type { SelectItem, SelectOption, SingleselectCommonProps } from './types'; declare function $$render(): { props: (SingleselectCommonProps & { /** Server-side fetcher. Invoked with an empty query on open (initial page) and again — debounced — on every keystroke. */ loadOptions: (query: string) => Promise[]>; /** Debounce window for `loadOptions` while typing. @default 400 */ debounceMs?: number; /** Internal — set by the sync `Singleselect` wrapper. Async typeahead is always searchable. @default true */ searchable?: boolean; } & { /** Discriminator — `true` enables the X clear button and allows `value` to be `null`. */ clearable: true; /** Currently selected option (pre-resolved — labels render before the first fetch lands). `null` when nothing is picked. */ value: SelectOption | null | undefined; on?: { /** Fires when the user picks an option or clears. */ change?: (value: SelectOption | null) => void; /** Fires when the user activates "Create …". Return a Promise to keep the spinner up until the consumer finishes; the popover closes on resolution. */ create?: (query: string) => void | Promise; }; }) | (SingleselectCommonProps & { /** Server-side fetcher. Invoked with an empty query on open (initial page) and again — debounced — on every keystroke. */ loadOptions: (query: string) => Promise[]>; /** Debounce window for `loadOptions` while typing. @default 400 */ debounceMs?: number; /** Internal — set by the sync `Singleselect` wrapper. Async typeahead is always searchable. @default true */ searchable?: boolean; } & { /** Discriminator — `false` removes the X clear button; `value` must always be a non-null `SelectOption`. */ clearable: false; /** Currently selected option — non-null. */ value: SelectOption; on?: { /** Fires when the user picks an option. */ change?: (value: SelectOption) => void; /** Fires when the user activates "Create …". Return a Promise to keep the spinner up until the consumer finishes. */ create?: (query: string) => void | Promise; }; }); exports: { open: () => void; close: () => void; focus: () => void | undefined; refresh: () => void; }; bindings: ""; slots: {}; events: {}; }; declare class __sveltets_Render { props(): ReturnType>['props']; events(): ReturnType>['events']; slots(): ReturnType>['slots']; bindings(): ""; exports(): { open: () => void; close: () => void; focus: () => void | undefined; refresh: () => void; }; } interface $$IsomorphicComponent { new (options: import('svelte').ComponentConstructorOptions['props']>>): import('svelte').SvelteComponent['props']>, ReturnType<__sveltets_Render['events']>, ReturnType<__sveltets_Render['slots']>> & { $$bindings?: ReturnType<__sveltets_Render['bindings']>; } & ReturnType<__sveltets_Render['exports']>; (internal: unknown, props: ReturnType<__sveltets_Render['props']> & {}): ReturnType<__sveltets_Render['exports']>; z_$$bindings?: ReturnType<__sveltets_Render['bindings']>; } /** * SingleselectAsync — single-value picker with server-side typeahead. Calls `loadOptions` * with an empty query on open and — debounced — on every keystroke. Value is the pre-resolved * `SelectOption` so the selected label renders before the first fetch lands. Picked options * not present in the current server page are surfaced at the top of the list when the query * is empty. Spinner has a built-in 600ms gate; while it's visible the listbox is dimmed and * pick events are ignored (race-prevention). `clearable` is a required discriminator driving * value-nullability. * * ### CSS Custom Properties * * **Trigger:** `--sc-kit--select--trigger--{height, padding-inline, gap, background, * background--disabled, border-color, border-color--hover, border-color--error, border-radius, * underline-color, font-size, color, placeholder--color, icon--color, icon--size}`. * * **Popover panel:** `--sc-kit--select--panel--{background, border-color, border-radius, * box-shadow, font-size, max-height, padding}`. * * **Option rows:** `--sc-kit--select--option--{color, color--selected, background--active, * padding-block, padding-inline}`. * * **Group header:** `--sc-kit--select--group-header--{color, font-size}`. * * **Empty / loading text:** `--sc-kit--select--empty--color`. * * **Clear button** (rendered when `clearable={true}` and a value is set): * `--sc-kit--input-clear-button--{size, icon-size, border-radius, color, color--hover, * background--hover}`. * * **Spinner** (rendered while loading): `--sc-kit--spinner--{size, duration}`. */ declare const Cmp: $$IsomorphicComponent; type Cmp = InstanceType>; export default Cmp;