fancy-ui-svelte 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -102
- package/dist/fancy-ui/_internals/FieldConsumer.test.svelte +25 -0
- package/dist/fancy-ui/_internals/FieldConsumer.test.svelte.d.ts +18 -0
- package/dist/fancy-ui/_internals/FieldHarness.test.svelte +37 -0
- package/dist/fancy-ui/_internals/FieldHarness.test.svelte.d.ts +8 -0
- package/dist/fancy-ui/_internals/Markdown.svelte +227 -0
- package/dist/fancy-ui/_internals/Markdown.svelte.d.ts +24 -0
- package/dist/fancy-ui/_internals/MarkdownInline.svelte +56 -0
- package/dist/fancy-ui/_internals/MarkdownInline.svelte.d.ts +7 -0
- package/dist/fancy-ui/_internals/StreamText.svelte +64 -0
- package/dist/fancy-ui/_internals/StreamText.svelte.d.ts +14 -0
- package/dist/fancy-ui/_internals/StreamText.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/StreamText.test.js +77 -0
- package/dist/fancy-ui/_internals/ai-types.d.ts +117 -0
- package/dist/fancy-ui/_internals/ai-types.js +9 -0
- package/dist/fancy-ui/_internals/anchor-position.d.ts +61 -0
- package/dist/fancy-ui/_internals/anchor-position.js +158 -0
- package/dist/fancy-ui/_internals/anchor-position.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/anchor-position.test.js +205 -0
- package/dist/fancy-ui/_internals/autoscroll.d.ts +30 -0
- package/dist/fancy-ui/_internals/autoscroll.js +149 -0
- package/dist/fancy-ui/_internals/autoscroll.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/autoscroll.test.js +233 -0
- package/dist/fancy-ui/_internals/calendar-core.d.ts +26 -0
- package/dist/fancy-ui/_internals/calendar-core.js +75 -0
- package/dist/fancy-ui/_internals/calendar-core.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/calendar-core.test.js +132 -0
- package/dist/fancy-ui/_internals/clipboard.svelte.d.ts +18 -0
- package/dist/fancy-ui/_internals/clipboard.svelte.js +58 -0
- package/dist/fancy-ui/_internals/clipboard.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/clipboard.test.js +97 -0
- package/dist/fancy-ui/_internals/diff.d.ts +38 -0
- package/dist/fancy-ui/_internals/diff.js +211 -0
- package/dist/fancy-ui/_internals/diff.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/diff.test.js +261 -0
- package/dist/fancy-ui/_internals/dismissable.d.ts +12 -0
- package/dist/fancy-ui/_internals/dismissable.js +63 -0
- package/dist/fancy-ui/_internals/dismissable.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/dismissable.test.js +128 -0
- package/dist/fancy-ui/_internals/elapsed.svelte.d.ts +49 -0
- package/dist/fancy-ui/_internals/elapsed.svelte.js +106 -0
- package/dist/fancy-ui/_internals/elapsed.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/elapsed.test.js +124 -0
- package/dist/fancy-ui/_internals/field.svelte.d.ts +106 -0
- package/dist/fancy-ui/_internals/field.svelte.js +73 -0
- package/dist/fancy-ui/_internals/field.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/field.test.js +223 -0
- package/dist/fancy-ui/_internals/float.d.ts +46 -0
- package/dist/fancy-ui/_internals/float.js +177 -0
- package/dist/fancy-ui/_internals/float.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/float.test.js +242 -0
- package/dist/fancy-ui/_internals/focus-trap.d.ts +18 -0
- package/dist/fancy-ui/_internals/focus-trap.js +135 -0
- package/dist/fancy-ui/_internals/focus-trap.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/focus-trap.test.js +229 -0
- package/dist/fancy-ui/_internals/host.d.ts +38 -0
- package/dist/fancy-ui/_internals/host.js +63 -0
- package/dist/fancy-ui/_internals/host.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/host.test.js +57 -0
- package/dist/fancy-ui/_internals/id.d.ts +11 -0
- package/dist/fancy-ui/_internals/id.js +30 -0
- package/dist/fancy-ui/_internals/id.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/id.test.js +31 -0
- package/dist/fancy-ui/_internals/listbox.svelte.d.ts +50 -0
- package/dist/fancy-ui/_internals/listbox.svelte.js +207 -0
- package/dist/fancy-ui/_internals/listbox.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/listbox.test.js +399 -0
- package/dist/fancy-ui/_internals/markdown-security.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/markdown-security.test.js +258 -0
- package/dist/fancy-ui/_internals/markdown.d.ts +66 -0
- package/dist/fancy-ui/_internals/markdown.js +586 -0
- package/dist/fancy-ui/_internals/markdown.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/markdown.test.js +473 -0
- package/dist/fancy-ui/_internals/menu.svelte.d.ts +74 -0
- package/dist/fancy-ui/_internals/menu.svelte.js +307 -0
- package/dist/fancy-ui/_internals/menu.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/menu.test.js +393 -0
- package/dist/fancy-ui/_internals/portal.d.ts +14 -0
- package/dist/fancy-ui/_internals/portal.js +49 -0
- package/dist/fancy-ui/_internals/portal.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/portal.test.js +57 -0
- package/dist/fancy-ui/_internals/relative-time.d.ts +22 -0
- package/dist/fancy-ui/_internals/relative-time.js +56 -0
- package/dist/fancy-ui/_internals/relative-time.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/relative-time.test.js +56 -0
- package/dist/fancy-ui/_internals/scroll-lock.d.ts +7 -0
- package/dist/fancy-ui/_internals/scroll-lock.js +91 -0
- package/dist/fancy-ui/_internals/scroll-lock.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/scroll-lock.test.js +98 -0
- package/dist/fancy-ui/_internals/stream-text.svelte.d.ts +45 -0
- package/dist/fancy-ui/_internals/stream-text.svelte.js +106 -0
- package/dist/fancy-ui/_internals/stream-text.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/stream-text.test.js +117 -0
- package/dist/fancy-ui/_internals/waveform-core.d.ts +33 -0
- package/dist/fancy-ui/_internals/waveform-core.js +63 -0
- package/dist/fancy-ui/_internals/waveform-core.test.d.ts +1 -0
- package/dist/fancy-ui/_internals/waveform-core.test.js +124 -0
- package/dist/fancy-ui/agent-plan/AgentPlan.svelte +459 -0
- package/dist/fancy-ui/agent-plan/AgentPlan.svelte.d.ts +24 -0
- package/dist/fancy-ui/agent-plan/AgentPlan.test.d.ts +1 -0
- package/dist/fancy-ui/agent-plan/AgentPlan.test.js +305 -0
- package/dist/fancy-ui/agent-plan/README.md +136 -0
- package/dist/fancy-ui/agent-plan/index.d.ts +3 -0
- package/dist/fancy-ui/agent-plan/index.js +2 -0
- package/dist/fancy-ui/ai-data-table/AiDataTable.svelte +214 -0
- package/dist/fancy-ui/ai-data-table/AiDataTable.svelte.d.ts +45 -0
- package/dist/fancy-ui/ai-data-table/AiDataTable.test.d.ts +1 -0
- package/dist/fancy-ui/ai-data-table/AiDataTable.test.js +223 -0
- package/dist/fancy-ui/ai-data-table/README.md +147 -0
- package/dist/fancy-ui/ai-data-table/index.d.ts +3 -0
- package/dist/fancy-ui/ai-data-table/index.js +2 -0
- package/dist/fancy-ui/alert-dialog/AlertDialog.svelte +139 -0
- package/dist/fancy-ui/alert-dialog/AlertDialog.svelte.d.ts +34 -0
- package/dist/fancy-ui/alert-dialog/AlertDialog.test.d.ts +1 -0
- package/dist/fancy-ui/alert-dialog/AlertDialog.test.js +254 -0
- package/dist/fancy-ui/alert-dialog/README.md +75 -0
- package/dist/fancy-ui/alert-dialog/index.d.ts +2 -0
- package/dist/fancy-ui/alert-dialog/index.js +2 -0
- package/dist/fancy-ui/approval-card/ApprovalCard.svelte +299 -0
- package/dist/fancy-ui/approval-card/ApprovalCard.svelte.d.ts +35 -0
- package/dist/fancy-ui/approval-card/ApprovalCard.test.d.ts +1 -0
- package/dist/fancy-ui/approval-card/ApprovalCard.test.js +175 -0
- package/dist/fancy-ui/approval-card/ApprovalCardHarness.test.svelte +35 -0
- package/dist/fancy-ui/approval-card/ApprovalCardHarness.test.svelte.d.ts +13 -0
- package/dist/fancy-ui/approval-card/README.md +116 -0
- package/dist/fancy-ui/approval-card/index.d.ts +3 -0
- package/dist/fancy-ui/approval-card/index.js +2 -0
- package/dist/fancy-ui/artifact-card/ArtifactCard.svelte +362 -0
- package/dist/fancy-ui/artifact-card/ArtifactCard.svelte.d.ts +35 -0
- package/dist/fancy-ui/artifact-card/ArtifactCard.test.d.ts +1 -0
- package/dist/fancy-ui/artifact-card/ArtifactCard.test.js +214 -0
- package/dist/fancy-ui/artifact-card/README.md +124 -0
- package/dist/fancy-ui/artifact-card/index.d.ts +3 -0
- package/dist/fancy-ui/artifact-card/index.js +2 -0
- package/dist/fancy-ui/autocomplete/Autocomplete.svelte +272 -0
- package/dist/fancy-ui/autocomplete/Autocomplete.svelte.d.ts +35 -0
- package/dist/fancy-ui/autocomplete/Autocomplete.test.d.ts +1 -0
- package/dist/fancy-ui/autocomplete/Autocomplete.test.js +400 -0
- package/dist/fancy-ui/autocomplete/AutocompleteFieldHarness.test.svelte +68 -0
- package/dist/fancy-ui/autocomplete/AutocompleteFieldHarness.test.svelte.d.ts +20 -0
- package/dist/fancy-ui/autocomplete/AutocompleteHarness.test.svelte +30 -0
- package/dist/fancy-ui/autocomplete/AutocompleteHarness.test.svelte.d.ts +9 -0
- package/dist/fancy-ui/autocomplete/AutocompletePanel.svelte +75 -0
- package/dist/fancy-ui/autocomplete/AutocompletePanel.svelte.d.ts +18 -0
- package/dist/fancy-ui/autocomplete/README.md +160 -0
- package/dist/fancy-ui/autocomplete/index.d.ts +4 -0
- package/dist/fancy-ui/autocomplete/index.js +3 -0
- package/dist/fancy-ui/autocomplete/match.d.ts +6 -0
- package/dist/fancy-ui/autocomplete/match.js +16 -0
- package/dist/fancy-ui/autocomplete/types.d.ts +32 -0
- package/dist/fancy-ui/autocomplete/types.js +1 -0
- package/dist/fancy-ui/breadcrumb/Breadcrumb.svelte +145 -0
- package/dist/fancy-ui/breadcrumb/Breadcrumb.svelte.d.ts +39 -0
- package/dist/fancy-ui/breadcrumb/Breadcrumb.test.d.ts +1 -0
- package/dist/fancy-ui/breadcrumb/Breadcrumb.test.js +268 -0
- package/dist/fancy-ui/breadcrumb/README.md +119 -0
- package/dist/fancy-ui/breadcrumb/index.d.ts +3 -0
- package/dist/fancy-ui/breadcrumb/index.js +2 -0
- package/dist/fancy-ui/button/Button.svelte +234 -0
- package/dist/fancy-ui/button/Button.svelte.d.ts +43 -0
- package/dist/fancy-ui/button/Button.test.d.ts +1 -0
- package/dist/fancy-ui/button/Button.test.js +231 -0
- package/dist/fancy-ui/button/README.md +91 -0
- package/dist/fancy-ui/button/index.d.ts +3 -0
- package/dist/fancy-ui/button/index.js +2 -0
- package/dist/fancy-ui/button/types.d.ts +4 -0
- package/dist/fancy-ui/button/types.js +1 -0
- package/dist/fancy-ui/button-group/ButtonGroup.svelte +129 -0
- package/dist/fancy-ui/button-group/ButtonGroup.svelte.d.ts +17 -0
- package/dist/fancy-ui/button-group/ButtonGroup.test.d.ts +1 -0
- package/dist/fancy-ui/button-group/ButtonGroup.test.js +133 -0
- package/dist/fancy-ui/button-group/ButtonGroupContextProbe.test.svelte +15 -0
- package/dist/fancy-ui/button-group/ButtonGroupContextProbe.test.svelte.d.ts +18 -0
- package/dist/fancy-ui/button-group/ButtonGroupHarness.test.svelte +21 -0
- package/dist/fancy-ui/button-group/ButtonGroupHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/button-group/README.md +91 -0
- package/dist/fancy-ui/button-group/index.d.ts +4 -0
- package/dist/fancy-ui/button-group/index.js +3 -0
- package/dist/fancy-ui/button-group/types.d.ts +16 -0
- package/dist/fancy-ui/button-group/types.js +10 -0
- package/dist/fancy-ui/chat-error/ChatError.svelte +195 -0
- package/dist/fancy-ui/chat-error/ChatError.svelte.d.ts +27 -0
- package/dist/fancy-ui/chat-error/ChatError.test.d.ts +1 -0
- package/dist/fancy-ui/chat-error/ChatError.test.js +94 -0
- package/dist/fancy-ui/chat-error/README.md +78 -0
- package/dist/fancy-ui/chat-error/index.d.ts +3 -0
- package/dist/fancy-ui/chat-error/index.js +2 -0
- package/dist/fancy-ui/chat-message/ChatMessage.svelte +205 -0
- package/dist/fancy-ui/chat-message/ChatMessage.svelte.d.ts +31 -0
- package/dist/fancy-ui/chat-message/ChatMessage.test.d.ts +1 -0
- package/dist/fancy-ui/chat-message/ChatMessage.test.js +179 -0
- package/dist/fancy-ui/chat-message/ChatMessageAction.svelte +82 -0
- package/dist/fancy-ui/chat-message/ChatMessageAction.svelte.d.ts +21 -0
- package/dist/fancy-ui/chat-message/ChatMessageActions.svelte +73 -0
- package/dist/fancy-ui/chat-message/ChatMessageActions.svelte.d.ts +15 -0
- package/dist/fancy-ui/chat-message/ChatMessageBranches.svelte +86 -0
- package/dist/fancy-ui/chat-message/ChatMessageBranches.svelte.d.ts +16 -0
- package/dist/fancy-ui/chat-message/ChatMessageHarness.test.svelte +47 -0
- package/dist/fancy-ui/chat-message/ChatMessageHarness.test.svelte.d.ts +12 -0
- package/dist/fancy-ui/chat-message/ChatMessageParts.test.d.ts +1 -0
- package/dist/fancy-ui/chat-message/ChatMessageParts.test.js +173 -0
- package/dist/fancy-ui/chat-message/README.md +184 -0
- package/dist/fancy-ui/chat-message/index.d.ts +10 -0
- package/dist/fancy-ui/chat-message/index.js +6 -0
- package/dist/fancy-ui/chat-message/types.d.ts +18 -0
- package/dist/fancy-ui/chat-message/types.js +10 -0
- package/dist/fancy-ui/chat-panel/ChatEmptyState.svelte +80 -0
- package/dist/fancy-ui/chat-panel/ChatEmptyState.svelte.d.ts +21 -0
- package/dist/fancy-ui/chat-panel/ChatPanel.svelte +303 -0
- package/dist/fancy-ui/chat-panel/ChatPanel.svelte.d.ts +29 -0
- package/dist/fancy-ui/chat-panel/ChatPanel.test.d.ts +1 -0
- package/dist/fancy-ui/chat-panel/ChatPanel.test.js +303 -0
- package/dist/fancy-ui/chat-panel/README.md +209 -0
- package/dist/fancy-ui/chat-panel/index.d.ts +5 -0
- package/dist/fancy-ui/chat-panel/index.js +3 -0
- package/dist/fancy-ui/checkbox/Checkbox.svelte +235 -0
- package/dist/fancy-ui/checkbox/Checkbox.svelte.d.ts +50 -0
- package/dist/fancy-ui/checkbox/Checkbox.test.d.ts +1 -0
- package/dist/fancy-ui/checkbox/Checkbox.test.js +237 -0
- package/dist/fancy-ui/checkbox/CheckboxFieldHarness.test.svelte +25 -0
- package/dist/fancy-ui/checkbox/CheckboxFieldHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/checkbox/CheckboxHarness.test.svelte +34 -0
- package/dist/fancy-ui/checkbox/CheckboxHarness.test.svelte.d.ts +8 -0
- package/dist/fancy-ui/checkbox/README.md +150 -0
- package/dist/fancy-ui/checkbox/index.d.ts +3 -0
- package/dist/fancy-ui/checkbox/index.js +2 -0
- package/dist/fancy-ui/code-diff/CodeDiff.svelte +428 -0
- package/dist/fancy-ui/code-diff/CodeDiff.svelte.d.ts +27 -0
- package/dist/fancy-ui/code-diff/CodeDiff.test.d.ts +1 -0
- package/dist/fancy-ui/code-diff/CodeDiff.test.js +298 -0
- package/dist/fancy-ui/code-diff/README.md +82 -0
- package/dist/fancy-ui/code-diff/index.d.ts +3 -0
- package/dist/fancy-ui/code-diff/index.js +2 -0
- package/dist/fancy-ui/combobox/Combobox.svelte +337 -0
- package/dist/fancy-ui/combobox/Combobox.svelte.d.ts +35 -0
- package/dist/fancy-ui/combobox/Combobox.test.d.ts +1 -0
- package/dist/fancy-ui/combobox/Combobox.test.js +445 -0
- package/dist/fancy-ui/combobox/ComboboxFieldHarness.test.svelte +69 -0
- package/dist/fancy-ui/combobox/ComboboxFieldHarness.test.svelte.d.ts +21 -0
- package/dist/fancy-ui/combobox/ComboboxHarness.test.svelte +30 -0
- package/dist/fancy-ui/combobox/ComboboxHarness.test.svelte.d.ts +9 -0
- package/dist/fancy-ui/combobox/ComboboxPanel.svelte +87 -0
- package/dist/fancy-ui/combobox/ComboboxPanel.svelte.d.ts +18 -0
- package/dist/fancy-ui/combobox/README.md +168 -0
- package/dist/fancy-ui/combobox/index.d.ts +4 -0
- package/dist/fancy-ui/combobox/index.js +3 -0
- package/dist/fancy-ui/combobox/match.d.ts +15 -0
- package/dist/fancy-ui/combobox/match.js +35 -0
- package/dist/fancy-ui/combobox/types.d.ts +40 -0
- package/dist/fancy-ui/combobox/types.js +12 -0
- package/dist/fancy-ui/command-menu/CommandMenu.svelte +547 -0
- package/dist/fancy-ui/command-menu/CommandMenu.svelte.d.ts +36 -0
- package/dist/fancy-ui/command-menu/CommandMenu.test.d.ts +1 -0
- package/dist/fancy-ui/command-menu/CommandMenu.test.js +569 -0
- package/dist/fancy-ui/command-menu/README.md +176 -0
- package/dist/fancy-ui/command-menu/index.d.ts +2 -0
- package/dist/fancy-ui/command-menu/index.js +2 -0
- package/dist/fancy-ui/command-menu/match.d.ts +19 -0
- package/dist/fancy-ui/command-menu/match.js +124 -0
- package/dist/fancy-ui/command-menu/types.d.ts +19 -0
- package/dist/fancy-ui/command-menu/types.js +1 -0
- package/dist/fancy-ui/composer/Composer.svelte +241 -0
- package/dist/fancy-ui/composer/Composer.svelte.d.ts +37 -0
- package/dist/fancy-ui/composer/Composer.test.d.ts +1 -0
- package/dist/fancy-ui/composer/Composer.test.js +399 -0
- package/dist/fancy-ui/composer/ComposerAttachment.svelte +220 -0
- package/dist/fancy-ui/composer/ComposerAttachment.svelte.d.ts +15 -0
- package/dist/fancy-ui/composer/ComposerAttachments.svelte +158 -0
- package/dist/fancy-ui/composer/ComposerAttachments.svelte.d.ts +19 -0
- package/dist/fancy-ui/composer/ComposerAttachments.test.d.ts +1 -0
- package/dist/fancy-ui/composer/ComposerAttachments.test.js +360 -0
- package/dist/fancy-ui/composer/ComposerCommandMenu.svelte +399 -0
- package/dist/fancy-ui/composer/ComposerCommandMenu.svelte.d.ts +34 -0
- package/dist/fancy-ui/composer/ComposerCommandMenu.test.d.ts +1 -0
- package/dist/fancy-ui/composer/ComposerCommandMenu.test.js +311 -0
- package/dist/fancy-ui/composer/ComposerHarness.test.svelte +99 -0
- package/dist/fancy-ui/composer/ComposerHarness.test.svelte.d.ts +24 -0
- package/dist/fancy-ui/composer/ComposerInput.svelte +178 -0
- package/dist/fancy-ui/composer/ComposerInput.svelte.d.ts +20 -0
- package/dist/fancy-ui/composer/ComposerIntegration.test.d.ts +14 -0
- package/dist/fancy-ui/composer/ComposerIntegration.test.js +283 -0
- package/dist/fancy-ui/composer/ComposerModelPicker.svelte +375 -0
- package/dist/fancy-ui/composer/ComposerModelPicker.svelte.d.ts +19 -0
- package/dist/fancy-ui/composer/ComposerSubmit.svelte +85 -0
- package/dist/fancy-ui/composer/ComposerSubmit.svelte.d.ts +17 -0
- package/dist/fancy-ui/composer/ComposerToolbar.svelte +55 -0
- package/dist/fancy-ui/composer/ComposerToolbar.svelte.d.ts +13 -0
- package/dist/fancy-ui/composer/ComposerToolbar.test.d.ts +1 -0
- package/dist/fancy-ui/composer/ComposerToolbar.test.js +285 -0
- package/dist/fancy-ui/composer/IntegrationHarness.test.svelte +142 -0
- package/dist/fancy-ui/composer/IntegrationHarness.test.svelte.d.ts +28 -0
- package/dist/fancy-ui/composer/README.md +416 -0
- package/dist/fancy-ui/composer/caret.d.ts +69 -0
- package/dist/fancy-ui/composer/caret.js +197 -0
- package/dist/fancy-ui/composer/caret.test.d.ts +1 -0
- package/dist/fancy-ui/composer/caret.test.js +87 -0
- package/dist/fancy-ui/composer/index.d.ts +18 -0
- package/dist/fancy-ui/composer/index.js +10 -0
- package/dist/fancy-ui/composer/types.d.ts +61 -0
- package/dist/fancy-ui/composer/types.js +18 -0
- package/dist/fancy-ui/context-menu/ContextMenu.svelte +147 -0
- package/dist/fancy-ui/context-menu/ContextMenu.svelte.d.ts +21 -0
- package/dist/fancy-ui/context-menu/ContextMenu.test.d.ts +1 -0
- package/dist/fancy-ui/context-menu/ContextMenu.test.js +309 -0
- package/dist/fancy-ui/context-menu/ContextMenuContent.svelte +130 -0
- package/dist/fancy-ui/context-menu/ContextMenuContent.svelte.d.ts +12 -0
- package/dist/fancy-ui/context-menu/ContextMenuHarness.test.svelte +72 -0
- package/dist/fancy-ui/context-menu/ContextMenuHarness.test.svelte.d.ts +16 -0
- package/dist/fancy-ui/context-menu/ContextMenuTrigger.svelte +72 -0
- package/dist/fancy-ui/context-menu/ContextMenuTrigger.svelte.d.ts +14 -0
- package/dist/fancy-ui/context-menu/README.md +226 -0
- package/dist/fancy-ui/context-menu/index.d.ts +12 -0
- package/dist/fancy-ui/context-menu/index.js +19 -0
- package/dist/fancy-ui/context-menu/types.d.ts +26 -0
- package/dist/fancy-ui/context-menu/types.js +8 -0
- package/dist/fancy-ui/context-ring/ContextRing.svelte +407 -0
- package/dist/fancy-ui/context-ring/ContextRing.svelte.d.ts +29 -0
- package/dist/fancy-ui/context-ring/ContextRing.test.d.ts +1 -0
- package/dist/fancy-ui/context-ring/ContextRing.test.js +250 -0
- package/dist/fancy-ui/context-ring/README.md +138 -0
- package/dist/fancy-ui/context-ring/index.d.ts +3 -0
- package/dist/fancy-ui/context-ring/index.js +2 -0
- package/dist/fancy-ui/copy-button/CopyButton.svelte +169 -0
- package/dist/fancy-ui/copy-button/CopyButton.svelte.d.ts +36 -0
- package/dist/fancy-ui/copy-button/CopyButton.test.d.ts +1 -0
- package/dist/fancy-ui/copy-button/CopyButton.test.js +183 -0
- package/dist/fancy-ui/copy-button/README.md +113 -0
- package/dist/fancy-ui/copy-button/index.d.ts +3 -0
- package/dist/fancy-ui/copy-button/index.js +2 -0
- package/dist/fancy-ui/date-picker/DatePicker.svelte +421 -0
- package/dist/fancy-ui/date-picker/DatePicker.svelte.d.ts +38 -0
- package/dist/fancy-ui/date-picker/DatePicker.test.d.ts +1 -0
- package/dist/fancy-ui/date-picker/DatePicker.test.js +402 -0
- package/dist/fancy-ui/date-picker/DatePickerFieldHarness.test.svelte +25 -0
- package/dist/fancy-ui/date-picker/DatePickerFieldHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/date-picker/DatePickerHarness.test.svelte +29 -0
- package/dist/fancy-ui/date-picker/DatePickerHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/date-picker/README.md +193 -0
- package/dist/fancy-ui/date-picker/date-utils.d.ts +39 -0
- package/dist/fancy-ui/date-picker/date-utils.js +116 -0
- package/dist/fancy-ui/date-picker/date-utils.test.d.ts +1 -0
- package/dist/fancy-ui/date-picker/date-utils.test.js +175 -0
- package/dist/fancy-ui/date-picker/index.d.ts +3 -0
- package/dist/fancy-ui/date-picker/index.js +2 -0
- package/dist/fancy-ui/dialog/Dialog.svelte +149 -0
- package/dist/fancy-ui/dialog/Dialog.svelte.d.ts +28 -0
- package/dist/fancy-ui/dialog/Dialog.test.d.ts +1 -0
- package/dist/fancy-ui/dialog/Dialog.test.js +304 -0
- package/dist/fancy-ui/dialog/DialogSurface.svelte +126 -0
- package/dist/fancy-ui/dialog/DialogSurface.svelte.d.ts +4 -0
- package/dist/fancy-ui/dialog/README.md +95 -0
- package/dist/fancy-ui/dialog/index.d.ts +2 -0
- package/dist/fancy-ui/dialog/index.js +2 -0
- package/dist/fancy-ui/dialog/types.d.ts +58 -0
- package/dist/fancy-ui/dialog/types.js +1 -0
- package/dist/fancy-ui/drawer/Drawer.svelte +305 -0
- package/dist/fancy-ui/drawer/Drawer.svelte.d.ts +26 -0
- package/dist/fancy-ui/drawer/Drawer.test.d.ts +1 -0
- package/dist/fancy-ui/drawer/Drawer.test.js +283 -0
- package/dist/fancy-ui/drawer/DrawerHarness.test.svelte +31 -0
- package/dist/fancy-ui/drawer/DrawerHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/drawer/README.md +135 -0
- package/dist/fancy-ui/drawer/index.d.ts +3 -0
- package/dist/fancy-ui/drawer/index.js +2 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenu.svelte +123 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenu.svelte.d.ts +21 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenu.test.d.ts +1 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenu.test.js +504 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuContent.svelte +155 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuContent.svelte.d.ts +12 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuHarness.test.svelte +95 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuHarness.test.svelte.d.ts +24 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuItem.svelte +151 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuItem.svelte.d.ts +22 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuLabel.svelte +32 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuLabel.svelte.d.ts +10 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuSeparator.svelte +18 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuSeparator.svelte.d.ts +7 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuSub.svelte +117 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuSub.svelte.d.ts +8 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuSubContent.svelte +155 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuSubContent.svelte.d.ts +12 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuSubTrigger.svelte +151 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuSubTrigger.svelte.d.ts +14 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuTrigger.svelte +96 -0
- package/dist/fancy-ui/dropdown-menu/DropdownMenuTrigger.svelte.d.ts +14 -0
- package/dist/fancy-ui/dropdown-menu/README.md +394 -0
- package/dist/fancy-ui/dropdown-menu/index.d.ts +11 -0
- package/dist/fancy-ui/dropdown-menu/index.js +11 -0
- package/dist/fancy-ui/dropdown-menu/menu-shared.d.ts +32 -0
- package/dist/fancy-ui/dropdown-menu/menu-shared.js +74 -0
- package/dist/fancy-ui/dropdown-menu/types.d.ts +97 -0
- package/dist/fancy-ui/dropdown-menu/types.js +3 -0
- package/dist/fancy-ui/file-upload/FileUpload.svelte +495 -0
- package/dist/fancy-ui/file-upload/FileUpload.svelte.d.ts +48 -0
- package/dist/fancy-ui/file-upload/FileUpload.test.d.ts +1 -0
- package/dist/fancy-ui/file-upload/FileUpload.test.js +286 -0
- package/dist/fancy-ui/file-upload/FileUploadFieldHarness.test.svelte +47 -0
- package/dist/fancy-ui/file-upload/FileUploadFieldHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/file-upload/FileUploadHarness.test.svelte +28 -0
- package/dist/fancy-ui/file-upload/FileUploadHarness.test.svelte.d.ts +8 -0
- package/dist/fancy-ui/file-upload/README.md +217 -0
- package/dist/fancy-ui/file-upload/index.d.ts +3 -0
- package/dist/fancy-ui/file-upload/index.js +2 -0
- package/dist/fancy-ui/fireworks-hdr/FireworksHdr.svelte +629 -0
- package/dist/fancy-ui/fireworks-hdr/FireworksHdr.svelte.d.ts +56 -0
- package/dist/fancy-ui/fireworks-hdr/FireworksHdr.test.d.ts +1 -0
- package/dist/fancy-ui/fireworks-hdr/FireworksHdr.test.js +74 -0
- package/dist/fancy-ui/fireworks-hdr/README.md +492 -0
- package/dist/fancy-ui/fireworks-hdr/fireworks-shared.d.ts +444 -0
- package/dist/fancy-ui/fireworks-hdr/fireworks-shared.js +1520 -0
- package/dist/fancy-ui/fireworks-hdr/fireworks-shared.test.d.ts +1 -0
- package/dist/fancy-ui/fireworks-hdr/fireworks-shared.test.js +1054 -0
- package/dist/fancy-ui/fireworks-hdr/index.d.ts +5 -0
- package/dist/fancy-ui/fireworks-hdr/index.js +5 -0
- package/dist/fancy-ui/fireworks-hdr/webgl2-renderer.d.ts +20 -0
- package/dist/fancy-ui/fireworks-hdr/webgl2-renderer.js +634 -0
- package/dist/fancy-ui/fireworks-hdr/webgl2-renderer.test.d.ts +1 -0
- package/dist/fancy-ui/fireworks-hdr/webgl2-renderer.test.js +33 -0
- package/dist/fancy-ui/fireworks-hdr/webgpu-renderer.d.ts +51 -0
- package/dist/fancy-ui/fireworks-hdr/webgpu-renderer.js +538 -0
- package/dist/fancy-ui/fluid-cursor/FluidCursor.svelte +71 -4
- package/dist/fancy-ui/fluid-cursor/FluidCursor.svelte.d.ts +13 -0
- package/dist/fancy-ui/fluid-cursor/FluidCursor.test.js +28 -0
- package/dist/fancy-ui/fluid-cursor/README.md +27 -0
- package/dist/fancy-ui/form-field/FormField.svelte +121 -0
- package/dist/fancy-ui/form-field/FormField.svelte.d.ts +4 -0
- package/dist/fancy-ui/form-field/FormField.test.d.ts +1 -0
- package/dist/fancy-ui/form-field/FormField.test.js +206 -0
- package/dist/fancy-ui/form-field/FormFieldControl.test.svelte +37 -0
- package/dist/fancy-ui/form-field/FormFieldControl.test.svelte.d.ts +8 -0
- package/dist/fancy-ui/form-field/FormFieldHarness.test.svelte +30 -0
- package/dist/fancy-ui/form-field/FormFieldHarness.test.svelte.d.ts +4 -0
- package/dist/fancy-ui/form-field/FormFieldPairHarness.test.svelte +20 -0
- package/dist/fancy-ui/form-field/FormFieldPairHarness.test.svelte.d.ts +18 -0
- package/dist/fancy-ui/form-field/README.md +215 -0
- package/dist/fancy-ui/form-field/index.d.ts +3 -0
- package/dist/fancy-ui/form-field/index.js +2 -0
- package/dist/fancy-ui/form-field/types.d.ts +40 -0
- package/dist/fancy-ui/form-field/types.js +1 -0
- package/dist/fancy-ui/hover-card/HoverCard.svelte +204 -0
- package/dist/fancy-ui/hover-card/HoverCard.svelte.d.ts +45 -0
- package/dist/fancy-ui/hover-card/HoverCard.test.d.ts +1 -0
- package/dist/fancy-ui/hover-card/HoverCard.test.js +243 -0
- package/dist/fancy-ui/hover-card/HoverCardAriaHarness.test.svelte +26 -0
- package/dist/fancy-ui/hover-card/HoverCardAriaHarness.test.svelte.d.ts +18 -0
- package/dist/fancy-ui/hover-card/HoverCardHarness.test.svelte +24 -0
- package/dist/fancy-ui/hover-card/HoverCardHarness.test.svelte.d.ts +6 -0
- package/dist/fancy-ui/hover-card/README.md +65 -0
- package/dist/fancy-ui/hover-card/index.d.ts +2 -0
- package/dist/fancy-ui/hover-card/index.js +2 -0
- package/dist/fancy-ui/icon-button/IconButton.svelte +111 -0
- package/dist/fancy-ui/icon-button/IconButton.svelte.d.ts +45 -0
- package/dist/fancy-ui/icon-button/IconButton.test.d.ts +1 -0
- package/dist/fancy-ui/icon-button/IconButton.test.js +120 -0
- package/dist/fancy-ui/icon-button/README.md +184 -0
- package/dist/fancy-ui/icon-button/index.d.ts +2 -0
- package/dist/fancy-ui/icon-button/index.js +2 -0
- package/dist/fancy-ui/image-generation/ImageGeneration.svelte +274 -0
- package/dist/fancy-ui/image-generation/ImageGeneration.svelte.d.ts +28 -0
- package/dist/fancy-ui/image-generation/ImageGeneration.test.d.ts +1 -0
- package/dist/fancy-ui/image-generation/ImageGeneration.test.js +248 -0
- package/dist/fancy-ui/image-generation/README.md +96 -0
- package/dist/fancy-ui/image-generation/index.d.ts +3 -0
- package/dist/fancy-ui/image-generation/index.js +2 -0
- package/dist/fancy-ui/index.d.ts +72 -0
- package/dist/fancy-ui/index.js +76 -0
- package/dist/fancy-ui/inline-citation/InlineCitation.svelte +289 -0
- package/dist/fancy-ui/inline-citation/InlineCitation.svelte.d.ts +24 -0
- package/dist/fancy-ui/inline-citation/InlineCitation.test.d.ts +1 -0
- package/dist/fancy-ui/inline-citation/InlineCitation.test.js +272 -0
- package/dist/fancy-ui/inline-citation/InlineCitationHarness.test.svelte +21 -0
- package/dist/fancy-ui/inline-citation/InlineCitationHarness.test.svelte.d.ts +9 -0
- package/dist/fancy-ui/inline-citation/README.md +107 -0
- package/dist/fancy-ui/inline-citation/index.d.ts +3 -0
- package/dist/fancy-ui/inline-citation/index.js +2 -0
- package/dist/fancy-ui/input/Input.svelte +123 -0
- package/dist/fancy-ui/input/Input.svelte.d.ts +34 -0
- package/dist/fancy-ui/input/Input.test.d.ts +1 -0
- package/dist/fancy-ui/input/Input.test.js +133 -0
- package/dist/fancy-ui/input/InputFieldHarness.test.svelte +49 -0
- package/dist/fancy-ui/input/InputFieldHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/input/InputHarness.test.svelte +28 -0
- package/dist/fancy-ui/input/InputHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/input/README.md +126 -0
- package/dist/fancy-ui/input/index.d.ts +3 -0
- package/dist/fancy-ui/input/index.js +2 -0
- package/dist/fancy-ui/label/Label.svelte +54 -0
- package/dist/fancy-ui/label/Label.svelte.d.ts +16 -0
- package/dist/fancy-ui/label/Label.test.d.ts +1 -0
- package/dist/fancy-ui/label/Label.test.js +105 -0
- package/dist/fancy-ui/label/LabelHarness.test.svelte +37 -0
- package/dist/fancy-ui/label/LabelHarness.test.svelte.d.ts +11 -0
- package/dist/fancy-ui/label/README.md +87 -0
- package/dist/fancy-ui/label/index.d.ts +2 -0
- package/dist/fancy-ui/label/index.js +2 -0
- package/dist/fancy-ui/link/Link.svelte +145 -0
- package/dist/fancy-ui/link/Link.svelte.d.ts +29 -0
- package/dist/fancy-ui/link/Link.test.d.ts +1 -0
- package/dist/fancy-ui/link/Link.test.js +170 -0
- package/dist/fancy-ui/link/README.md +77 -0
- package/dist/fancy-ui/link/index.d.ts +3 -0
- package/dist/fancy-ui/link/index.js +2 -0
- package/dist/fancy-ui/liquid-text/LiquidText.svelte +52 -11
- package/dist/fancy-ui/liquid-text/LiquidText.test.js +1 -3
- package/dist/fancy-ui/navbar/Navbar.svelte +88 -0
- package/dist/fancy-ui/navbar/Navbar.svelte.d.ts +22 -0
- package/dist/fancy-ui/navbar/Navbar.test.d.ts +1 -0
- package/dist/fancy-ui/navbar/Navbar.test.js +157 -0
- package/dist/fancy-ui/navbar/NavbarLink.svelte +109 -0
- package/dist/fancy-ui/navbar/NavbarLink.svelte.d.ts +29 -0
- package/dist/fancy-ui/navbar/README.md +137 -0
- package/dist/fancy-ui/navbar/index.d.ts +5 -0
- package/dist/fancy-ui/navbar/index.js +3 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenu.svelte +265 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenu.svelte.d.ts +22 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenu.test.d.ts +1 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenu.test.js +487 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenuContent.svelte +130 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenuContent.svelte.d.ts +12 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenuHarness.test.svelte +78 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenuHarness.test.svelte.d.ts +24 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenuItem.svelte +43 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenuItem.svelte.d.ts +12 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenuLink.svelte +93 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenuLink.svelte.d.ts +24 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenuList.svelte +40 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenuList.svelte.d.ts +12 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenuTrigger.svelte +137 -0
- package/dist/fancy-ui/navigation-menu/NavigationMenuTrigger.svelte.d.ts +12 -0
- package/dist/fancy-ui/navigation-menu/README.md +309 -0
- package/dist/fancy-ui/navigation-menu/index.d.ts +14 -0
- package/dist/fancy-ui/navigation-menu/index.js +8 -0
- package/dist/fancy-ui/navigation-menu/types.d.ts +77 -0
- package/dist/fancy-ui/navigation-menu/types.js +16 -0
- package/dist/fancy-ui/number-input/NumberInput.svelte +282 -0
- package/dist/fancy-ui/number-input/NumberInput.svelte.d.ts +33 -0
- package/dist/fancy-ui/number-input/NumberInput.test.d.ts +1 -0
- package/dist/fancy-ui/number-input/NumberInput.test.js +354 -0
- package/dist/fancy-ui/number-input/NumberInputFieldHarness.test.svelte +25 -0
- package/dist/fancy-ui/number-input/NumberInputFieldHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/number-input/NumberInputHarness.test.svelte +31 -0
- package/dist/fancy-ui/number-input/NumberInputHarness.test.svelte.d.ts +10 -0
- package/dist/fancy-ui/number-input/README.md +141 -0
- package/dist/fancy-ui/number-input/index.d.ts +3 -0
- package/dist/fancy-ui/number-input/index.js +2 -0
- package/dist/fancy-ui/pagination/Pagination.svelte +226 -0
- package/dist/fancy-ui/pagination/Pagination.svelte.d.ts +30 -0
- package/dist/fancy-ui/pagination/Pagination.test.d.ts +1 -0
- package/dist/fancy-ui/pagination/Pagination.test.js +194 -0
- package/dist/fancy-ui/pagination/PaginationHarness.test.svelte +53 -0
- package/dist/fancy-ui/pagination/PaginationHarness.test.svelte.d.ts +13 -0
- package/dist/fancy-ui/pagination/README.md +117 -0
- package/dist/fancy-ui/pagination/index.d.ts +3 -0
- package/dist/fancy-ui/pagination/index.js +9 -0
- package/dist/fancy-ui/pagination/pagination-range.d.ts +11 -0
- package/dist/fancy-ui/pagination/pagination-range.js +77 -0
- package/dist/fancy-ui/pagination/pagination-range.test.d.ts +1 -0
- package/dist/fancy-ui/pagination/pagination-range.test.js +118 -0
- package/dist/fancy-ui/password-input/PasswordInput.svelte +314 -0
- package/dist/fancy-ui/password-input/PasswordInput.svelte.d.ts +44 -0
- package/dist/fancy-ui/password-input/PasswordInput.test.d.ts +1 -0
- package/dist/fancy-ui/password-input/PasswordInput.test.js +290 -0
- package/dist/fancy-ui/password-input/PasswordInputFieldHarness.test.svelte +66 -0
- package/dist/fancy-ui/password-input/PasswordInputFieldHarness.test.svelte.d.ts +19 -0
- package/dist/fancy-ui/password-input/PasswordInputHarness.test.svelte +28 -0
- package/dist/fancy-ui/password-input/PasswordInputHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/password-input/README.md +135 -0
- package/dist/fancy-ui/password-input/index.d.ts +2 -0
- package/dist/fancy-ui/password-input/index.js +2 -0
- package/dist/fancy-ui/pixel-loader/PixelLoader.svelte +111 -0
- package/dist/fancy-ui/pixel-loader/PixelLoader.svelte.d.ts +23 -0
- package/dist/fancy-ui/pixel-loader/PixelLoader.test.d.ts +1 -0
- package/dist/fancy-ui/pixel-loader/PixelLoader.test.js +77 -0
- package/dist/fancy-ui/pixel-loader/README.md +47 -0
- package/dist/fancy-ui/pixel-loader/index.d.ts +3 -0
- package/dist/fancy-ui/pixel-loader/index.js +2 -0
- package/dist/fancy-ui/popover/Popover.svelte +127 -0
- package/dist/fancy-ui/popover/Popover.svelte.d.ts +31 -0
- package/dist/fancy-ui/popover/Popover.test.d.ts +1 -0
- package/dist/fancy-ui/popover/Popover.test.js +246 -0
- package/dist/fancy-ui/popover/PopoverContent.svelte +85 -0
- package/dist/fancy-ui/popover/PopoverContent.svelte.d.ts +12 -0
- package/dist/fancy-ui/popover/README.md +146 -0
- package/dist/fancy-ui/popover/index.d.ts +6 -0
- package/dist/fancy-ui/popover/index.js +4 -0
- package/dist/fancy-ui/popover/types.d.ts +27 -0
- package/dist/fancy-ui/popover/types.js +1 -0
- package/dist/fancy-ui/prompt-suggestions/PromptSuggestions.svelte +130 -0
- package/dist/fancy-ui/prompt-suggestions/PromptSuggestions.svelte.d.ts +24 -0
- package/dist/fancy-ui/prompt-suggestions/PromptSuggestions.test.d.ts +1 -0
- package/dist/fancy-ui/prompt-suggestions/PromptSuggestions.test.js +129 -0
- package/dist/fancy-ui/prompt-suggestions/README.md +77 -0
- package/dist/fancy-ui/prompt-suggestions/index.d.ts +3 -0
- package/dist/fancy-ui/prompt-suggestions/index.js +2 -0
- package/dist/fancy-ui/radio-group/README.md +219 -0
- package/dist/fancy-ui/radio-group/RadioGroup.svelte +154 -0
- package/dist/fancy-ui/radio-group/RadioGroup.svelte.d.ts +39 -0
- package/dist/fancy-ui/radio-group/RadioGroup.test.d.ts +1 -0
- package/dist/fancy-ui/radio-group/RadioGroup.test.js +347 -0
- package/dist/fancy-ui/radio-group/RadioGroupHarness.test.svelte +67 -0
- package/dist/fancy-ui/radio-group/RadioGroupHarness.test.svelte.d.ts +22 -0
- package/dist/fancy-ui/radio-group/RadioGroupItem.svelte +148 -0
- package/dist/fancy-ui/radio-group/RadioGroupItem.svelte.d.ts +18 -0
- package/dist/fancy-ui/radio-group/index.d.ts +6 -0
- package/dist/fancy-ui/radio-group/index.js +4 -0
- package/dist/fancy-ui/radio-group/types.d.ts +35 -0
- package/dist/fancy-ui/radio-group/types.js +12 -0
- package/dist/fancy-ui/reasoning-panel/README.md +70 -0
- package/dist/fancy-ui/reasoning-panel/ReasoningPanel.svelte +260 -0
- package/dist/fancy-ui/reasoning-panel/ReasoningPanel.svelte.d.ts +32 -0
- package/dist/fancy-ui/reasoning-panel/ReasoningPanel.test.d.ts +1 -0
- package/dist/fancy-ui/reasoning-panel/ReasoningPanel.test.js +163 -0
- package/dist/fancy-ui/reasoning-panel/index.d.ts +3 -0
- package/dist/fancy-ui/reasoning-panel/index.js +2 -0
- package/dist/fancy-ui/recommendation-card/README.md +106 -0
- package/dist/fancy-ui/recommendation-card/RecommendationCard.svelte +375 -0
- package/dist/fancy-ui/recommendation-card/RecommendationCard.svelte.d.ts +38 -0
- package/dist/fancy-ui/recommendation-card/RecommendationCard.test.d.ts +1 -0
- package/dist/fancy-ui/recommendation-card/RecommendationCard.test.js +255 -0
- package/dist/fancy-ui/recommendation-card/RecommendationCardHarness.test.svelte +33 -0
- package/dist/fancy-ui/recommendation-card/RecommendationCardHarness.test.svelte.d.ts +12 -0
- package/dist/fancy-ui/recommendation-card/index.d.ts +3 -0
- package/dist/fancy-ui/recommendation-card/index.js +2 -0
- package/dist/fancy-ui/registry.d.ts +14 -1
- package/dist/fancy-ui/registry.js +4958 -40
- package/dist/fancy-ui/scroll-anchor/README.md +93 -0
- package/dist/fancy-ui/scroll-anchor/ScrollAnchor.svelte +197 -0
- package/dist/fancy-ui/scroll-anchor/ScrollAnchor.svelte.d.ts +31 -0
- package/dist/fancy-ui/scroll-anchor/ScrollAnchor.test.d.ts +1 -0
- package/dist/fancy-ui/scroll-anchor/ScrollAnchor.test.js +206 -0
- package/dist/fancy-ui/scroll-anchor/index.d.ts +3 -0
- package/dist/fancy-ui/scroll-anchor/index.js +2 -0
- package/dist/fancy-ui/search-input/README.md +118 -0
- package/dist/fancy-ui/search-input/SearchInput.svelte +261 -0
- package/dist/fancy-ui/search-input/SearchInput.svelte.d.ts +43 -0
- package/dist/fancy-ui/search-input/SearchInput.test.d.ts +1 -0
- package/dist/fancy-ui/search-input/SearchInput.test.js +279 -0
- package/dist/fancy-ui/search-input/SearchInputFieldHarness.test.svelte +66 -0
- package/dist/fancy-ui/search-input/SearchInputFieldHarness.test.svelte.d.ts +19 -0
- package/dist/fancy-ui/search-input/SearchInputHarness.test.svelte +28 -0
- package/dist/fancy-ui/search-input/SearchInputHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/search-input/index.d.ts +2 -0
- package/dist/fancy-ui/search-input/index.js +2 -0
- package/dist/fancy-ui/select/README.md +208 -0
- package/dist/fancy-ui/select/Select.svelte +361 -0
- package/dist/fancy-ui/select/Select.svelte.d.ts +36 -0
- package/dist/fancy-ui/select/Select.test.d.ts +1 -0
- package/dist/fancy-ui/select/Select.test.js +461 -0
- package/dist/fancy-ui/select/SelectHarness.test.svelte +63 -0
- package/dist/fancy-ui/select/SelectHarness.test.svelte.d.ts +19 -0
- package/dist/fancy-ui/select/SelectPanel.svelte +138 -0
- package/dist/fancy-ui/select/SelectPanel.svelte.d.ts +9 -0
- package/dist/fancy-ui/select/index.d.ts +3 -0
- package/dist/fancy-ui/select/index.js +2 -0
- package/dist/fancy-ui/select/types.d.ts +56 -0
- package/dist/fancy-ui/select/types.js +1 -0
- package/dist/fancy-ui/sheet/README.md +128 -0
- package/dist/fancy-ui/sheet/Sheet.svelte +240 -0
- package/dist/fancy-ui/sheet/Sheet.svelte.d.ts +30 -0
- package/dist/fancy-ui/sheet/Sheet.test.d.ts +1 -0
- package/dist/fancy-ui/sheet/Sheet.test.js +236 -0
- package/dist/fancy-ui/sheet/SheetHarness.test.svelte +31 -0
- package/dist/fancy-ui/sheet/SheetHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/sheet/index.d.ts +3 -0
- package/dist/fancy-ui/sheet/index.js +2 -0
- package/dist/fancy-ui/sidebar/README.md +219 -0
- package/dist/fancy-ui/sidebar/Sidebar.svelte +81 -0
- package/dist/fancy-ui/sidebar/Sidebar.svelte.d.ts +21 -0
- package/dist/fancy-ui/sidebar/Sidebar.test.d.ts +1 -0
- package/dist/fancy-ui/sidebar/Sidebar.test.js +307 -0
- package/dist/fancy-ui/sidebar/SidebarFooter.svelte +46 -0
- package/dist/fancy-ui/sidebar/SidebarFooter.svelte.d.ts +14 -0
- package/dist/fancy-ui/sidebar/SidebarGroup.svelte +45 -0
- package/dist/fancy-ui/sidebar/SidebarGroup.svelte.d.ts +12 -0
- package/dist/fancy-ui/sidebar/SidebarHarness.test.svelte +41 -0
- package/dist/fancy-ui/sidebar/SidebarHarness.test.svelte.d.ts +6 -0
- package/dist/fancy-ui/sidebar/SidebarItem.svelte +168 -0
- package/dist/fancy-ui/sidebar/SidebarItem.svelte.d.ts +32 -0
- package/dist/fancy-ui/sidebar/SidebarSeparator.svelte +17 -0
- package/dist/fancy-ui/sidebar/SidebarSeparator.svelte.d.ts +9 -0
- package/dist/fancy-ui/sidebar/index.d.ts +12 -0
- package/dist/fancy-ui/sidebar/index.js +7 -0
- package/dist/fancy-ui/sidebar/types.d.ts +23 -0
- package/dist/fancy-ui/sidebar/types.js +18 -0
- package/dist/fancy-ui/slider/README.md +126 -0
- package/dist/fancy-ui/slider/Slider.svelte +252 -0
- package/dist/fancy-ui/slider/Slider.svelte.d.ts +31 -0
- package/dist/fancy-ui/slider/Slider.test.d.ts +1 -0
- package/dist/fancy-ui/slider/Slider.test.js +175 -0
- package/dist/fancy-ui/slider/SliderFieldHarness.test.svelte +25 -0
- package/dist/fancy-ui/slider/SliderFieldHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/slider/SliderHarness.test.svelte +28 -0
- package/dist/fancy-ui/slider/SliderHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/slider/index.d.ts +3 -0
- package/dist/fancy-ui/slider/index.js +2 -0
- package/dist/fancy-ui/sources/README.md +189 -0
- package/dist/fancy-ui/sources/SourceCard.svelte +174 -0
- package/dist/fancy-ui/sources/SourceCard.svelte.d.ts +22 -0
- package/dist/fancy-ui/sources/Sources.svelte +75 -0
- package/dist/fancy-ui/sources/Sources.svelte.d.ts +22 -0
- package/dist/fancy-ui/sources/Sources.test.d.ts +1 -0
- package/dist/fancy-ui/sources/Sources.test.js +140 -0
- package/dist/fancy-ui/sources/SourcesHarness.test.svelte +36 -0
- package/dist/fancy-ui/sources/SourcesHarness.test.svelte.d.ts +12 -0
- package/dist/fancy-ui/sources/SourcesList.svelte +123 -0
- package/dist/fancy-ui/sources/SourcesList.svelte.d.ts +14 -0
- package/dist/fancy-ui/sources/SourcesParts.test.d.ts +1 -0
- package/dist/fancy-ui/sources/SourcesParts.test.js +245 -0
- package/dist/fancy-ui/sources/SourcesTrigger.svelte +126 -0
- package/dist/fancy-ui/sources/SourcesTrigger.svelte.d.ts +12 -0
- package/dist/fancy-ui/sources/index.d.ts +10 -0
- package/dist/fancy-ui/sources/index.js +6 -0
- package/dist/fancy-ui/sources/types.d.ts +26 -0
- package/dist/fancy-ui/sources/types.js +10 -0
- package/dist/fancy-ui/stepper/README.md +173 -0
- package/dist/fancy-ui/stepper/Step.svelte +247 -0
- package/dist/fancy-ui/stepper/Step.svelte.d.ts +21 -0
- package/dist/fancy-ui/stepper/Stepper.svelte +123 -0
- package/dist/fancy-ui/stepper/Stepper.svelte.d.ts +22 -0
- package/dist/fancy-ui/stepper/Stepper.test.d.ts +1 -0
- package/dist/fancy-ui/stepper/Stepper.test.js +197 -0
- package/dist/fancy-ui/stepper/StepperHarness.test.svelte +49 -0
- package/dist/fancy-ui/stepper/StepperHarness.test.svelte.d.ts +15 -0
- package/dist/fancy-ui/stepper/index.d.ts +6 -0
- package/dist/fancy-ui/stepper/index.js +4 -0
- package/dist/fancy-ui/stepper/types.d.ts +45 -0
- package/dist/fancy-ui/stepper/types.js +1 -0
- package/dist/fancy-ui/streaming-text/README.md +80 -0
- package/dist/fancy-ui/streaming-text/StreamingText.svelte +126 -0
- package/dist/fancy-ui/streaming-text/StreamingText.svelte.d.ts +27 -0
- package/dist/fancy-ui/streaming-text/StreamingText.test.d.ts +1 -0
- package/dist/fancy-ui/streaming-text/StreamingText.test.js +98 -0
- package/dist/fancy-ui/streaming-text/index.d.ts +3 -0
- package/dist/fancy-ui/streaming-text/index.js +2 -0
- package/dist/fancy-ui/subagent-list/README.md +153 -0
- package/dist/fancy-ui/subagent-list/SubagentList.svelte +438 -0
- package/dist/fancy-ui/subagent-list/SubagentList.svelte.d.ts +27 -0
- package/dist/fancy-ui/subagent-list/SubagentList.test.d.ts +1 -0
- package/dist/fancy-ui/subagent-list/SubagentList.test.js +303 -0
- package/dist/fancy-ui/subagent-list/index.d.ts +3 -0
- package/dist/fancy-ui/subagent-list/index.js +2 -0
- package/dist/fancy-ui/switch/README.md +143 -0
- package/dist/fancy-ui/switch/Switch.svelte +233 -0
- package/dist/fancy-ui/switch/Switch.svelte.d.ts +40 -0
- package/dist/fancy-ui/switch/Switch.test.d.ts +1 -0
- package/dist/fancy-ui/switch/Switch.test.js +199 -0
- package/dist/fancy-ui/switch/SwitchFieldHarness.test.svelte +25 -0
- package/dist/fancy-ui/switch/SwitchFieldHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/switch/SwitchHarness.test.svelte +28 -0
- package/dist/fancy-ui/switch/SwitchHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/switch/index.d.ts +3 -0
- package/dist/fancy-ui/switch/index.js +2 -0
- package/dist/fancy-ui/tabs/README.md +271 -0
- package/dist/fancy-ui/tabs/Tabs.svelte +218 -0
- package/dist/fancy-ui/tabs/Tabs.svelte.d.ts +26 -0
- package/dist/fancy-ui/tabs/Tabs.test.d.ts +1 -0
- package/dist/fancy-ui/tabs/Tabs.test.js +392 -0
- package/dist/fancy-ui/tabs/TabsContent.svelte +58 -0
- package/dist/fancy-ui/tabs/TabsContent.svelte.d.ts +22 -0
- package/dist/fancy-ui/tabs/TabsHarness.test.svelte +53 -0
- package/dist/fancy-ui/tabs/TabsHarness.test.svelte.d.ts +17 -0
- package/dist/fancy-ui/tabs/TabsList.svelte +73 -0
- package/dist/fancy-ui/tabs/TabsList.svelte.d.ts +12 -0
- package/dist/fancy-ui/tabs/TabsTrigger.svelte +246 -0
- package/dist/fancy-ui/tabs/TabsTrigger.svelte.d.ts +16 -0
- package/dist/fancy-ui/tabs/index.d.ts +10 -0
- package/dist/fancy-ui/tabs/index.js +6 -0
- package/dist/fancy-ui/tabs/types.d.ts +66 -0
- package/dist/fancy-ui/tabs/types.js +16 -0
- package/dist/fancy-ui/terminal-block/README.md +109 -0
- package/dist/fancy-ui/terminal-block/TerminalBlock.svelte +263 -0
- package/dist/fancy-ui/terminal-block/TerminalBlock.svelte.d.ts +31 -0
- package/dist/fancy-ui/terminal-block/TerminalBlock.test.d.ts +1 -0
- package/dist/fancy-ui/terminal-block/TerminalBlock.test.js +197 -0
- package/dist/fancy-ui/terminal-block/ansi.d.ts +30 -0
- package/dist/fancy-ui/terminal-block/ansi.js +163 -0
- package/dist/fancy-ui/terminal-block/ansi.test.d.ts +1 -0
- package/dist/fancy-ui/terminal-block/ansi.test.js +123 -0
- package/dist/fancy-ui/terminal-block/index.d.ts +3 -0
- package/dist/fancy-ui/terminal-block/index.js +2 -0
- package/dist/fancy-ui/textarea/README.md +134 -0
- package/dist/fancy-ui/textarea/Textarea.svelte +225 -0
- package/dist/fancy-ui/textarea/Textarea.svelte.d.ts +40 -0
- package/dist/fancy-ui/textarea/Textarea.test.d.ts +1 -0
- package/dist/fancy-ui/textarea/Textarea.test.js +179 -0
- package/dist/fancy-ui/textarea/TextareaFieldHarness.test.svelte +49 -0
- package/dist/fancy-ui/textarea/TextareaFieldHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/textarea/TextareaHarness.test.svelte +28 -0
- package/dist/fancy-ui/textarea/TextareaHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/textarea/index.d.ts +3 -0
- package/dist/fancy-ui/textarea/index.js +2 -0
- package/dist/fancy-ui/thinking-indicator/README.md +64 -0
- package/dist/fancy-ui/thinking-indicator/ThinkingIndicator.svelte +189 -0
- package/dist/fancy-ui/thinking-indicator/ThinkingIndicator.svelte.d.ts +27 -0
- package/dist/fancy-ui/thinking-indicator/ThinkingIndicator.test.d.ts +1 -0
- package/dist/fancy-ui/thinking-indicator/ThinkingIndicator.test.js +148 -0
- package/dist/fancy-ui/thinking-indicator/index.d.ts +3 -0
- package/dist/fancy-ui/thinking-indicator/index.js +2 -0
- package/dist/fancy-ui/thread-list/README.md +141 -0
- package/dist/fancy-ui/thread-list/ThreadList.svelte +340 -0
- package/dist/fancy-ui/thread-list/ThreadList.svelte.d.ts +28 -0
- package/dist/fancy-ui/thread-list/ThreadList.test.d.ts +1 -0
- package/dist/fancy-ui/thread-list/ThreadList.test.js +267 -0
- package/dist/fancy-ui/thread-list/ThreadListHarness.test.svelte +61 -0
- package/dist/fancy-ui/thread-list/ThreadListHarness.test.svelte.d.ts +15 -0
- package/dist/fancy-ui/thread-list/index.d.ts +3 -0
- package/dist/fancy-ui/thread-list/index.js +2 -0
- package/dist/fancy-ui/time-picker/README.md +155 -0
- package/dist/fancy-ui/time-picker/TimePicker.svelte +297 -0
- package/dist/fancy-ui/time-picker/TimePicker.svelte.d.ts +37 -0
- package/dist/fancy-ui/time-picker/TimePicker.test.d.ts +1 -0
- package/dist/fancy-ui/time-picker/TimePicker.test.js +365 -0
- package/dist/fancy-ui/time-picker/TimePickerFieldHarness.test.svelte +35 -0
- package/dist/fancy-ui/time-picker/TimePickerFieldHarness.test.svelte.d.ts +11 -0
- package/dist/fancy-ui/time-picker/TimePickerHarness.test.svelte +28 -0
- package/dist/fancy-ui/time-picker/TimePickerHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/time-picker/TimePickerPanel.svelte +109 -0
- package/dist/fancy-ui/time-picker/TimePickerPanel.svelte.d.ts +9 -0
- package/dist/fancy-ui/time-picker/index.d.ts +3 -0
- package/dist/fancy-ui/time-picker/index.js +2 -0
- package/dist/fancy-ui/time-picker/time-utils.d.ts +33 -0
- package/dist/fancy-ui/time-picker/time-utils.js +96 -0
- package/dist/fancy-ui/time-picker/time-utils.test.d.ts +1 -0
- package/dist/fancy-ui/time-picker/time-utils.test.js +123 -0
- package/dist/fancy-ui/time-picker/types.d.ts +32 -0
- package/dist/fancy-ui/time-picker/types.js +1 -0
- package/dist/fancy-ui/toast/README.md +180 -0
- package/dist/fancy-ui/toast/Toast.svelte +203 -0
- package/dist/fancy-ui/toast/Toast.svelte.d.ts +12 -0
- package/dist/fancy-ui/toast/Toast.test.d.ts +1 -0
- package/dist/fancy-ui/toast/Toast.test.js +274 -0
- package/dist/fancy-ui/toast/Toaster.svelte +111 -0
- package/dist/fancy-ui/toast/Toaster.svelte.d.ts +12 -0
- package/dist/fancy-ui/toast/index.d.ts +4 -0
- package/dist/fancy-ui/toast/index.js +4 -0
- package/dist/fancy-ui/toast/store.svelte.d.ts +95 -0
- package/dist/fancy-ui/toast/store.svelte.js +160 -0
- package/dist/fancy-ui/toggle/README.md +89 -0
- package/dist/fancy-ui/toggle/Toggle.svelte +120 -0
- package/dist/fancy-ui/toggle/Toggle.svelte.d.ts +26 -0
- package/dist/fancy-ui/toggle/Toggle.test.d.ts +1 -0
- package/dist/fancy-ui/toggle/Toggle.test.js +97 -0
- package/dist/fancy-ui/toggle/ToggleHarness.test.svelte +30 -0
- package/dist/fancy-ui/toggle/ToggleHarness.test.svelte.d.ts +7 -0
- package/dist/fancy-ui/toggle/index.d.ts +3 -0
- package/dist/fancy-ui/toggle/index.js +2 -0
- package/dist/fancy-ui/toggle-group/README.md +206 -0
- package/dist/fancy-ui/toggle-group/ToggleGroup.svelte +259 -0
- package/dist/fancy-ui/toggle-group/ToggleGroup.svelte.d.ts +29 -0
- package/dist/fancy-ui/toggle-group/ToggleGroup.test.d.ts +1 -0
- package/dist/fancy-ui/toggle-group/ToggleGroup.test.js +382 -0
- package/dist/fancy-ui/toggle-group/ToggleGroupHarness.test.svelte +50 -0
- package/dist/fancy-ui/toggle-group/ToggleGroupHarness.test.svelte.d.ts +18 -0
- package/dist/fancy-ui/toggle-group/ToggleGroupItem.svelte +173 -0
- package/dist/fancy-ui/toggle-group/ToggleGroupItem.svelte.d.ts +18 -0
- package/dist/fancy-ui/toggle-group/index.d.ts +6 -0
- package/dist/fancy-ui/toggle-group/index.js +4 -0
- package/dist/fancy-ui/toggle-group/types.d.ts +50 -0
- package/dist/fancy-ui/toggle-group/types.js +17 -0
- package/dist/fancy-ui/tool-call/README.md +137 -0
- package/dist/fancy-ui/tool-call/ToolCall.svelte +430 -0
- package/dist/fancy-ui/tool-call/ToolCall.svelte.d.ts +30 -0
- package/dist/fancy-ui/tool-call/ToolCall.test.d.ts +1 -0
- package/dist/fancy-ui/tool-call/ToolCall.test.js +241 -0
- package/dist/fancy-ui/tool-call/index.d.ts +3 -0
- package/dist/fancy-ui/tool-call/index.js +2 -0
- package/dist/fancy-ui/tool-timeline/README.md +106 -0
- package/dist/fancy-ui/tool-timeline/ToolTimeline.svelte +263 -0
- package/dist/fancy-ui/tool-timeline/ToolTimeline.svelte.d.ts +24 -0
- package/dist/fancy-ui/tool-timeline/ToolTimeline.test.d.ts +1 -0
- package/dist/fancy-ui/tool-timeline/ToolTimeline.test.js +160 -0
- package/dist/fancy-ui/tool-timeline/index.d.ts +3 -0
- package/dist/fancy-ui/tool-timeline/index.js +2 -0
- package/dist/fancy-ui/tooltip/README.md +133 -0
- package/dist/fancy-ui/tooltip/Tooltip.svelte +307 -0
- package/dist/fancy-ui/tooltip/Tooltip.svelte.d.ts +32 -0
- package/dist/fancy-ui/tooltip/Tooltip.test.d.ts +1 -0
- package/dist/fancy-ui/tooltip/Tooltip.test.js +299 -0
- package/dist/fancy-ui/tooltip/index.d.ts +3 -0
- package/dist/fancy-ui/tooltip/index.js +2 -0
- package/dist/fancy-ui/typing-indicator/README.md +49 -0
- package/dist/fancy-ui/typing-indicator/TypingIndicator.svelte +97 -0
- package/dist/fancy-ui/typing-indicator/TypingIndicator.svelte.d.ts +17 -0
- package/dist/fancy-ui/typing-indicator/TypingIndicator.test.d.ts +1 -0
- package/dist/fancy-ui/typing-indicator/TypingIndicator.test.js +60 -0
- package/dist/fancy-ui/typing-indicator/index.d.ts +3 -0
- package/dist/fancy-ui/typing-indicator/index.js +2 -0
- package/dist/fancy-ui/voice-input/README.md +149 -0
- package/dist/fancy-ui/voice-input/VoiceInput.svelte +407 -0
- package/dist/fancy-ui/voice-input/VoiceInput.svelte.d.ts +43 -0
- package/dist/fancy-ui/voice-input/VoiceInput.test.d.ts +1 -0
- package/dist/fancy-ui/voice-input/VoiceInput.test.js +264 -0
- package/dist/fancy-ui/voice-input/VoiceInputHarness.test.svelte +34 -0
- package/dist/fancy-ui/voice-input/VoiceInputHarness.test.svelte.d.ts +11 -0
- package/dist/fancy-ui/voice-input/index.d.ts +3 -0
- package/dist/fancy-ui/voice-input/index.js +2 -0
- package/dist/fancy-ui/web-search/README.md +105 -0
- package/dist/fancy-ui/web-search/WebSearch.svelte +335 -0
- package/dist/fancy-ui/web-search/WebSearch.svelte.d.ts +28 -0
- package/dist/fancy-ui/web-search/WebSearch.test.d.ts +1 -0
- package/dist/fancy-ui/web-search/WebSearch.test.js +265 -0
- package/dist/fancy-ui/web-search/index.d.ts +3 -0
- package/dist/fancy-ui/web-search/index.js +2 -0
- package/dist/types.d.ts +3 -1
- package/package.json +5 -3
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# CommandMenu
|
|
2
|
+
|
|
3
|
+
A modal search palette: a single search field over a flat vocabulary of `items`, filtered as you type, with grouped results, match highlighting, and full keyboard navigation through `aria-activedescendant` — focus never leaves the field. Portals to `document.body`, traps focus, dismisses on Escape and outside click, and locks the page's own scroll while open, the same plumbing `Dialog` uses.
|
|
4
|
+
|
|
5
|
+
Data-driven rather than a compound: filtering is a decision about the whole `items` array at once, so there is one component to hand a list to, not a tree of subcomponents each re-deriving the same filter.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```svelte
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
import { CommandMenu, type CommandItem } from "fancy-ui-svelte";
|
|
12
|
+
|
|
13
|
+
let open = $state(false);
|
|
14
|
+
|
|
15
|
+
const items: CommandItem[] = [
|
|
16
|
+
{ id: "button", label: "Button", group: "Core", meta: "Actions" },
|
|
17
|
+
{ id: "icon-button", label: "Icon Button", group: "Core", meta: "Actions" },
|
|
18
|
+
{ id: "rainbow-button", label: "Rainbow Button", group: "Fancy", meta: "Buttons" },
|
|
19
|
+
{ id: "settings", label: "Settings" },
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
function handleSelect(item: CommandItem) {
|
|
23
|
+
console.log("navigate to", item.id);
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<button onclick={() => (open = true)}>Open command menu</button>
|
|
28
|
+
|
|
29
|
+
<CommandMenu bind:open {items} onSelect={handleSelect} />
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
There is no built-in trigger or global keyboard shortcut — `open` is the whole interface. Wire a `keydown` listener yourself (⌘K, Ctrl+K, whatever suits the app) and flip `open`:
|
|
33
|
+
|
|
34
|
+
```svelte
|
|
35
|
+
<script lang="ts">
|
|
36
|
+
function handleKeydown(event: KeyboardEvent) {
|
|
37
|
+
if (event.key === "k" && (event.metaKey || event.ctrlKey)) {
|
|
38
|
+
event.preventDefault();
|
|
39
|
+
open = !open;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<svelte:window onkeydown={handleKeydown} />
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Grouped items
|
|
48
|
+
|
|
49
|
+
Items with the same `group` string render under one uppercase heading, in the order that group name first appears in `items`. Items with no `group` at all render first, ungrouped:
|
|
50
|
+
|
|
51
|
+
```svelte
|
|
52
|
+
<CommandMenu
|
|
53
|
+
{open}
|
|
54
|
+
items={[
|
|
55
|
+
{ id: "search", label: "Search everything" },
|
|
56
|
+
{ id: "new-doc", label: "New document", group: "Create" },
|
|
57
|
+
{ id: "new-folder", label: "New folder", group: "Create" },
|
|
58
|
+
{ id: "profile", label: "Go to profile", group: "Navigate" },
|
|
59
|
+
]}
|
|
60
|
+
/>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Matching on more than the label
|
|
64
|
+
|
|
65
|
+
`keywords` extends what the default filter matches against, without ever being shown:
|
|
66
|
+
|
|
67
|
+
```svelte
|
|
68
|
+
<CommandMenu
|
|
69
|
+
{open}
|
|
70
|
+
items={[{ id: "billing", label: "Billing", keywords: ["invoice", "plan", "payment"] }]}
|
|
71
|
+
/>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### A custom filter
|
|
75
|
+
|
|
76
|
+
Replaces the default entirely — `keywords` is then only meaningful if your own `filter` reads it:
|
|
77
|
+
|
|
78
|
+
```svelte
|
|
79
|
+
<CommandMenu
|
|
80
|
+
{open}
|
|
81
|
+
{items}
|
|
82
|
+
filter={(item, query) => item.label.toLowerCase().startsWith(query.toLowerCase())}
|
|
83
|
+
/>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Props
|
|
87
|
+
|
|
88
|
+
| Prop | Type | Default | Description |
|
|
89
|
+
| --------------- | ----------------------------------------------- | ---------------- | --------------------------------------------------------------------------------- |
|
|
90
|
+
| `open` | `boolean` | `false` | Whether the menu is open. Bindable. |
|
|
91
|
+
| `onOpenChange` | `(open: boolean) => void` | — | Fires whenever `open` changes — Escape, an outside click, or committing an item. |
|
|
92
|
+
| `items` | `CommandItem[]` | — | The full, unfiltered vocabulary. Required. |
|
|
93
|
+
| `query` | `string` | `""` | The current search text. Bindable. Reset every time the menu reopens — see below. |
|
|
94
|
+
| `onQueryChange` | `(query: string) => void` | — | Fires whenever `query` changes. |
|
|
95
|
+
| `onSelect` | `(item: CommandItem) => void` | — | Called with the committed item, after that item's own `onSelect`. |
|
|
96
|
+
| `placeholder` | `string` | `"Search..."` | Placeholder for the search field. |
|
|
97
|
+
| `emptyMessage` | `string` | `"No results"` | Shown in place of the list when nothing matches. |
|
|
98
|
+
| `label` | `string` | `"Command menu"` | Accessible name — for the dialog and for the search field. See Accessibility. |
|
|
99
|
+
| `filter` | `(item: CommandItem, query: string) => boolean` | see below | Overrides the default filter entirely. |
|
|
100
|
+
| `class` | `string` | — | Additional CSS classes for the panel. |
|
|
101
|
+
| `ref` | `HTMLDivElement \| null` | `null` | Bindable reference to the panel element. |
|
|
102
|
+
| `icon` | `Snippet<[CommandItem]>` | — | Rendered before each row's label, given that row's item. Treated as decorative. |
|
|
103
|
+
| `empty` | `Snippet` | — | Rendered in place of the list when nothing matches, instead of `emptyMessage`. |
|
|
104
|
+
|
|
105
|
+
`CommandItem` is:
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
interface CommandItem {
|
|
109
|
+
id: string;
|
|
110
|
+
label: string;
|
|
111
|
+
/** Optional right-aligned secondary text — the category column in the mockup. */
|
|
112
|
+
meta?: string;
|
|
113
|
+
/** Optional group heading this item sits under. Items with no group render first, ungrouped. */
|
|
114
|
+
group?: string;
|
|
115
|
+
/** Extra terms the default filter matches against, alongside `label`. Never shown. */
|
|
116
|
+
keywords?: string[];
|
|
117
|
+
disabled?: boolean;
|
|
118
|
+
/** Called when this item is committed, before the component's own `onSelect`. */
|
|
119
|
+
onSelect?: () => void;
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The default filter is case- and **diacritic**-insensitive: it folds both the query and `label`/`keywords` through `normalize("NFD")` plus a combining-marks strip before comparing, so `"cafe"` matches an item labelled `"Café"`.
|
|
124
|
+
|
|
125
|
+
## Accessibility
|
|
126
|
+
|
|
127
|
+
- `role="dialog"` with `aria-modal="true"` and `aria-label={label}` (default `"Command menu"`). Focus moves into the search field on open and returns to whatever had focus before it opened, on close — Tab is trapped inside the panel.
|
|
128
|
+
- The search field is `role="combobox"` with `aria-expanded="true"` (the result list is always visible while the dialog is open, so this never toggles), `aria-controls` pointing at the list, and `aria-activedescendant` pointing at the active `role="option"` row. The list is `role="listbox"`. **Focus never leaves the field** — arrow keys, Home, End and Enter all act on the highlighted row without moving real DOM focus onto it; rows carry `tabindex="-1"` and are not reachable by Tab.
|
|
129
|
+
- The search field's accessible name is the same `label` prop as the dialog's, reused rather than introducing a second, undocumented prop for it — there is no visible `<label>` element in this layout for a `<label for>` to attach to instead.
|
|
130
|
+
- The matched substring inside each row's label is a real `<mark>` element (never `{@html}`) — the canonical element for "a run of text highlighted for its relevance to a search," per its HTML definition. It is deliberately **not** `aria-hidden`: hiding it would remove exactly the text it wraps from the row's accessible name, and it is real content, not decoration. A minority of screen readers additionally announce entering/leaving a `<mark>` region; that extra signal is treated as useful (it says _why_ a row matched), not suppressed.
|
|
131
|
+
- **Group headings are decorative**, `role="presentation"`, not associated with their rows through `aria-labelledby` or a nested `role="group"`. This mirrors `Combobox`/`Select`'s own flat-listbox pattern in this library, and is a deliberate, documented trade-off: cross-screen-reader support for grouped options inside a flat `listbox`/`option` pattern is inconsistent, so a plain visual heading over an otherwise-flat option list is the more reliably accessible choice. Each row's own text (including `meta`) is still read in full regardless of grouping.
|
|
132
|
+
- `icon` is rendered inside an `aria-hidden="true"` wrapper — it is assumed decorative. If your icon carries meaning nothing else on the row conveys, put that meaning in `label` (or `keywords`) too.
|
|
133
|
+
- Result-count changes are announced through a polite, always-mounted `role="status"` live region that reports **only the count** ("3 results"), never the row contents. A nonzero count waits for the query to sit still for 300ms before announcing, not after every keystroke — announcing on every character would turn fast typing into a screen reader narrating a number many times a second. A drop to **zero** is the one exception: it announces immediately, because the empty state is already visible on screen at that instant, and a debounced zero would leave the region reporting a stale nonzero count while the list a screen reader user cannot see already reads empty. See Implementation Notes for the exact mechanism. The region clears immediately (not debounced) the instant the menu closes.
|
|
134
|
+
- A disabled item (`disabled: true`) is skipped as part of a block by arrow/Home/End navigation — it can never become the active row — and a click or Enter on it does nothing. The native `disabled` attribute on its `<button>` is not trusted alone as the guard (a synthetic click can walk past it), so `commitItem` checks `item.disabled` explicitly too.
|
|
135
|
+
|
|
136
|
+
## Theming
|
|
137
|
+
|
|
138
|
+
| Custom property | Read by | Fallback |
|
|
139
|
+
| ----------------- | ----------------------------------- | --------------------------------------------------------------------------------------- |
|
|
140
|
+
| `--ft-nav-accent` | The `<mark>` highlight's text color | `var(--ft-accent, light-dark(oklch(0.5432 0.2528 300.22), oklch(0.604 0.2606 301.75)))` |
|
|
141
|
+
|
|
142
|
+
`--ft-nav-accent` is declared exactly once, with the fallback above, on the **portalled panel element itself** — the same `<div>` that carries `use:portal` — and read below that declaration on the same element. `--ft-accent` itself is never redeclared here — only read through the fallback — so a value a consumer sets higher up the tree is never shadowed.
|
|
143
|
+
|
|
144
|
+
That "portalled" part is not incidental, and it changes where a consumer is allowed to set `--ft-accent`. `use:portal` moves the panel to `document.body` before it ever paints, so at render time it is no longer a DOM descendant of wherever `<CommandMenu>` was written in your markup — it inherits nothing from that spot, custom properties included. A wrapper placed around the `<CommandMenu>` element itself therefore does **nothing**:
|
|
145
|
+
|
|
146
|
+
```svelte
|
|
147
|
+
<!-- Has no effect: the dialog is not a descendant of this div by the time it renders. -->
|
|
148
|
+
<div style="--ft-accent: oklch(0.6 0.2 290)">
|
|
149
|
+
<CommandMenu {open} {items} />
|
|
150
|
+
</div>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
`--ft-accent` has to be set at or above `document.body` — typically `:root` in your global stylesheet — to reach a portalled surface:
|
|
154
|
+
|
|
155
|
+
```css
|
|
156
|
+
:root {
|
|
157
|
+
--ft-accent: oklch(0.6 0.2 290);
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
The failure mode if you get this wrong is quiet, not loud: `color` (what `--ft-nav-accent` feeds the `<mark>` highlight through) is an inherited property, so an unresolved `var(--ft-nav-accent)` does not fall back to some default color or produce a visible error — it computes to whatever color the surrounding text already has, which is the panel's own foreground text color. The highlight looks like it vanished; nothing in the console says why. If a retint you set on a wrapper isn't reaching the palette, that wrapper is the first thing to check.
|
|
162
|
+
|
|
163
|
+
Everything else — the panel (`bg-popover`/`text-popover-foreground`/`border-border`), the active row (`bg-accent`/`text-accent-foreground`), muted text (`text-muted-foreground`) — reads the app's own semantic tokens, with no component-local overrides.
|
|
164
|
+
|
|
165
|
+
## Implementation Notes
|
|
166
|
+
|
|
167
|
+
- **The query and active row reset on every reopen — except the very first mount.** A caller that mounts the menu already `open` with a prefilled `query` is seeding it on purpose, and that first paint is honored as-is. Every transition into `open = true` _after_ that first one resets `query` to `""` and re-activates the first row — a stale query or highlight surviving from the session before is a bug the caller has no way to work around, so it is not left as a possibility. If you need a menu that always starts pre-filtered, pass `query` as a plain (non-bound) prop rather than `bind:query` — the reopening behavior does not touch it if nothing ever writes it back.
|
|
168
|
+
- **That reset effect has to run its whole body inside `untrack(...)`, and this is not optional.** Its only intended dependency is `open`. But it also calls `listbox.moveToEdge("first")`, which reads `query` transitively through the `count`/`enabled` callbacks passed to `createListbox` — Svelte's dependency tracking follows a read through any function call made during an effect's synchronous execution, not just the names written directly inside the `$effect(...)` block. Without `untrack`, that transitive read makes `query` a real dependency of this effect, and the very next line writes `query` — an effect reading and writing the same state, which Svelte throws `effect_update_depth_exceeded` for the moment anything (a keystroke) writes `query` again from outside. Reproducible in one line: render the menu open, type one character, watch it throw.
|
|
169
|
+
- **The listbox's index space is display order, not `items`' own filtered order.** `computeDisplayItems` reorders the filtered items into ungrouped-first-then-grouped before anything else touches them, and that reordered array — not `items.filter(...)`'s own order — is what `optionId`, `aria-activedescendant`, and the listbox core's `count`/`enabled` all index into. Skipping this step (indexing by `items`' own order while rendering in display order) desyncs "first"/"next" from what is visually first/next the moment an ungrouped item doesn't already sit at the front of `items`.
|
|
170
|
+
- **`announcedCount` starts at `null`, not `0`.** The debounce means there is a real window, right after opening or after a keystroke, where nothing has been announced yet — and the live region has to stay silent through it, not say "0 results" for up to 300ms while a non-empty list is still being counted. `resultsMessage` folds `null` to `""` before the "1 result"/"N results" branching.
|
|
171
|
+
- **A drop to zero bypasses the debounce and announces synchronously; every nonzero count still waits.** The two paths are deliberately asymmetric, not an oversight: emptiness is the one state where lagging behind the visible screen actively misleads (the region would report results the list has already stopped showing), while a nonzero count is never a contradiction of what's on screen, only a preview of it, so it keeps the debounce that protects against narrating every keystroke.
|
|
172
|
+
- **Highlighting locates the match in the _original_ label, not the folded one, and that translation has to be counted in the same units the string search uses.** Folding for diacritic-insensitive search (`normalize("NFD")` plus a combining-marks strip) changes string length before the marks are stripped back off, so the position a match is found at inside the folded string is not automatically a safe index into the real label. `match.ts`'s `getMatchRange` builds an explicit offset map while folding and translates the found range back through it — proven against a label like `"Café Society"`, where searching the unaccented query `"afe soc"` must highlight the real `"afé Soc"`, not an off-by-one span. The map is built **per UTF-16 code unit**, not per codepoint: an astral character (outside the Basic Multilingual Plane — an emoji, say) is a single codepoint but two code units, the same width `String.prototype.indexOf` — what actually locates the match — counts in. A map built one entry per codepoint falls one entry short of `folded` for every astral character, and a lookup past its end reads `undefined`; `getMatchRange` guards that and returns `null` rather than a range with an `undefined` bound, since `label.slice(undefined, …)` silently coerces to `slice(0, …)` and would render the whole label twice instead of throwing where the bug could be seen.
|
|
173
|
+
- **Highlighting and filtering are independent, by construction.** `getMatchRange` always searches for a literal, folded substring of `label` on its own, regardless of what logic actually selected the item — so when a custom `filter` matches for an unrelated reason (a `keywords` hit, fuzzy logic), and there is no literal substring of `label` to point at, the row renders its label plain rather than fabricating a highlight the match had nothing to do with.
|
|
174
|
+
- **The debounced announcement is an `$effect` plus its own cleanup, not a hand-rolled timer variable.** Every time the filtered count (or `open`) changes, the effect reschedules a 300ms timer and Svelte runs the _previous_ run's cleanup — which clears that pending timer — before the new one starts. A burst of keystrokes keeps pushing the announcement out rather than stacking several up, and whatever count is in scope when a timer finally fires uninterrupted is the one that gets announced.
|
|
175
|
+
- **`row?.scrollIntoView?.(...)` is guarded on the method itself, not just the element**, because `Element.prototype.scrollIntoView` is not implemented in jsdom — calling it unconditionally would throw in every test that arrows through the list, even though real browsers implement it fine. The active row is looked up by id under the panel's own list element (`listRef.querySelector(...)`), the same pattern `Select.svelte`'s `handleActiveChange` uses.
|
|
176
|
+
- **Filtering functions are called fresh, not read from the memoized `filteredItems`, everywhere a write to `query` might have just happened in the same pass** (`handleInput`, the listbox's own `count`/`enabled` callbacks, the reopen-reset effect) — reading a `$derived` in the same synchronous call that just wrote its own dependency risks seeing the pre-write value. This is the same discipline `combobox/Combobox.svelte` documents for its own `computeFilteredOptions`.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CommandItem } from "./types.js";
|
|
2
|
+
/** Case- and diacritic-insensitive substring match over `label` plus `keywords`. An empty query matches everything. */
|
|
3
|
+
export declare function defaultFilter(item: CommandItem, query: string): boolean;
|
|
4
|
+
export interface MatchRange {
|
|
5
|
+
start: number;
|
|
6
|
+
end: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Finds the first case- and diacritic-insensitive occurrence of `query`
|
|
10
|
+
* inside `label`, returning the span **in `label`'s own original
|
|
11
|
+
* characters** — not in the folded form used to search.
|
|
12
|
+
*
|
|
13
|
+
* Returns `null` when `query` is empty or not literally present in the
|
|
14
|
+
* folded label — including when a custom `filter` matched the item for a
|
|
15
|
+
* reason unrelated to a literal substring of `label` (a keyword, a fuzzy
|
|
16
|
+
* match). Callers render the label plain in that case rather than
|
|
17
|
+
* fabricating a highlighted span the match had nothing to do with.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getMatchRange(label: string, query: string): MatchRange | null;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
// Pure text-matching helpers: the default filter (case- and
|
|
2
|
+
// diacritic-insensitive substring match over `label` plus `keywords`) and
|
|
3
|
+
// `getMatchRange`, which locates the matched span for highlighting.
|
|
4
|
+
//
|
|
5
|
+
// The two are independent by construction, the same relationship
|
|
6
|
+
// `combobox/match.ts` draws between its own filter and `getMatchRange`:
|
|
7
|
+
// highlighting always looks for a literal, folded substring of `label`
|
|
8
|
+
// itself, regardless of what logic actually selected the item. A consumer
|
|
9
|
+
// `filter` can match on `keywords`, fuzzy logic, anything — when none of
|
|
10
|
+
// that produces a literal substring of `label`, there is nothing honest to
|
|
11
|
+
// highlight, so the row renders its plain, unhighlighted label instead of a
|
|
12
|
+
// span that would misrepresent why it matched.
|
|
13
|
+
// Built from an escaped-codepoint string rather than a regex literal on
|
|
14
|
+
// purpose — a raw combining mark sitting directly in this file's source
|
|
15
|
+
// would attach itself to whatever precedes it on screen in most editors and
|
|
16
|
+
// terminals, rendering unreadable.
|
|
17
|
+
const COMBINING_MARKS = new RegExp("[\\u0300-\\u036f]", "g");
|
|
18
|
+
/** Case- and diacritic-folded form of a string, for matching only — never rendered. */
|
|
19
|
+
function fold(text) {
|
|
20
|
+
return text.normalize("NFD").replace(COMBINING_MARKS, "").toLowerCase();
|
|
21
|
+
}
|
|
22
|
+
/** Case- and diacritic-insensitive substring match over `label` plus `keywords`. An empty query matches everything. */
|
|
23
|
+
export function defaultFilter(item, query) {
|
|
24
|
+
if (!query)
|
|
25
|
+
return true;
|
|
26
|
+
const needle = fold(query);
|
|
27
|
+
if (fold(item.label).includes(needle))
|
|
28
|
+
return true;
|
|
29
|
+
return item.keywords?.some((keyword) => fold(keyword).includes(needle)) ?? false;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Builds the folded (case/diacritic-stripped) form of `text` alongside a map
|
|
33
|
+
* from each **UTF-16 code unit** of that folded form back to the UTF-16
|
|
34
|
+
* offset it came from in `text`. `map` must be indexed exactly the way
|
|
35
|
+
* `String.prototype.indexOf` counts — one entry per code unit of `folded`,
|
|
36
|
+
* not one per codepoint — because `getMatchRange` below searches with
|
|
37
|
+
* `indexOf` and reads `map` at the index it returns; if the two used
|
|
38
|
+
* different units, every index past a surrogate pair would be off by one.
|
|
39
|
+
*
|
|
40
|
+
* A precomposed accented letter ("é") decomposes under NFD into a base
|
|
41
|
+
* letter plus one or more combining marks; the marks are stripped and
|
|
42
|
+
* contribute no output units, so only the base letter survives — still
|
|
43
|
+
* pointing at the original character's own offset. An astral character
|
|
44
|
+
* (outside the Basic Multilingual Plane — an emoji, say) is different:
|
|
45
|
+
* `fold()` leaves it untouched, but it is still a surrogate pair, two UTF-16
|
|
46
|
+
* code units long, in both `text` and `folded`. Pushing one `map` entry for
|
|
47
|
+
* it (one per *codepoint*, matching the `for...of` iteration below, which
|
|
48
|
+
* always yields one codepoint per pass) would silently under-count by one
|
|
49
|
+
* for every such character — `map.length` would fall behind `folded.length`,
|
|
50
|
+
* and every match found after it would read the wrong entry. The inner loop
|
|
51
|
+
* pushes `outChar.length` entries instead, one per code unit `outChar`
|
|
52
|
+
* actually contributes to `folded`, all pointing at the same source offset.
|
|
53
|
+
*
|
|
54
|
+
* This is what lets a match found in the folded string be translated back
|
|
55
|
+
* to a span of the real, accented label: folding finds the right
|
|
56
|
+
* *characters*, but it can shift *positions* (an NFD decomposition is
|
|
57
|
+
* longer than its precomposed source, before the marks are stripped back
|
|
58
|
+
* off), so a raw folded-string index is not a safe index into the original
|
|
59
|
+
* label on its own — this map is the correction.
|
|
60
|
+
*/
|
|
61
|
+
function foldWithMap(text) {
|
|
62
|
+
let folded = "";
|
|
63
|
+
const map = [];
|
|
64
|
+
let offset = 0;
|
|
65
|
+
// `for...of` walks by Unicode codepoint, not UTF-16 code unit, so a
|
|
66
|
+
// surrogate pair (an astral character) is one iteration, not two —
|
|
67
|
+
// `char.length` below is then 1 or 2 accordingly, which is what keeps
|
|
68
|
+
// `offset` a valid UTF-16 index into `text` for slicing later.
|
|
69
|
+
for (const char of text) {
|
|
70
|
+
const strippedChar = fold(char);
|
|
71
|
+
for (const outChar of strippedChar) {
|
|
72
|
+
folded += outChar;
|
|
73
|
+
for (let i = 0; i < outChar.length; i++) {
|
|
74
|
+
map.push(offset);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
offset += char.length;
|
|
78
|
+
}
|
|
79
|
+
return { folded, map };
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Finds the first case- and diacritic-insensitive occurrence of `query`
|
|
83
|
+
* inside `label`, returning the span **in `label`'s own original
|
|
84
|
+
* characters** — not in the folded form used to search.
|
|
85
|
+
*
|
|
86
|
+
* Returns `null` when `query` is empty or not literally present in the
|
|
87
|
+
* folded label — including when a custom `filter` matched the item for a
|
|
88
|
+
* reason unrelated to a literal substring of `label` (a keyword, a fuzzy
|
|
89
|
+
* match). Callers render the label plain in that case rather than
|
|
90
|
+
* fabricating a highlighted span the match had nothing to do with.
|
|
91
|
+
*/
|
|
92
|
+
export function getMatchRange(label, query) {
|
|
93
|
+
if (!query)
|
|
94
|
+
return null;
|
|
95
|
+
const foldedQuery = fold(query);
|
|
96
|
+
if (!foldedQuery)
|
|
97
|
+
return null;
|
|
98
|
+
const { folded, map } = foldWithMap(label);
|
|
99
|
+
const index = folded.indexOf(foldedQuery);
|
|
100
|
+
if (index === -1)
|
|
101
|
+
return null;
|
|
102
|
+
const start = map[index];
|
|
103
|
+
// `map[index]` types as `number`, not `number | undefined` — this
|
|
104
|
+
// project's tsconfig has `strict` but not `noUncheckedIndexedAccess`, so
|
|
105
|
+
// the type system does not actually back that up here. Only
|
|
106
|
+
// `foldWithMap`'s own invariant does (one map entry per UTF-16 code unit,
|
|
107
|
+
// matching `folded` exactly), and a future edit to that function could
|
|
108
|
+
// break it silently. Guarded anyway: a range with an `undefined` bound is
|
|
109
|
+
// worse than no highlight — `CommandMenu.svelte`'s
|
|
110
|
+
// `label.slice(range.start, range.end)` would see `slice(undefined, …)`,
|
|
111
|
+
// which JS silently coerces to `slice(0, …)` instead of throwing, and the
|
|
112
|
+
// row would render its entire label twice, once plain and once inside
|
|
113
|
+
// `<mark>`.
|
|
114
|
+
if (start === undefined)
|
|
115
|
+
return null;
|
|
116
|
+
// The offset one folded-character past the match's own last character —
|
|
117
|
+
// `map[that index]` is where the *next* real character starts, which is
|
|
118
|
+
// exactly the exclusive end this range needs. Past the end of `map`
|
|
119
|
+
// (the match runs to the very end of the folded string) there is no
|
|
120
|
+
// next entry to read, so the end is `label.length` instead.
|
|
121
|
+
const endFoldedIndex = index + foldedQuery.length;
|
|
122
|
+
const end = endFoldedIndex < map.length ? map[endFoldedIndex] : label.length;
|
|
123
|
+
return { start, end };
|
|
124
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One selectable row. `id` is what a row is keyed by; `label` is what a
|
|
3
|
+
* person reads and types against. `group` and `meta` are purely
|
|
4
|
+
* presentational — CommandMenu never reorders or sorts `items` itself, it
|
|
5
|
+
* only filters and buckets them by `group` for display.
|
|
6
|
+
*/
|
|
7
|
+
export interface CommandItem {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
/** Optional right-aligned secondary text — the category column in the mockup. */
|
|
11
|
+
meta?: string;
|
|
12
|
+
/** Optional group heading this item sits under. Items with no group render first, ungrouped. */
|
|
13
|
+
group?: string;
|
|
14
|
+
/** Extra terms the default filter matches against, alongside `label`. Never shown. */
|
|
15
|
+
keywords?: string[];
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** Called when this item is committed — Enter on the active row, or a click. Runs before the component's own `onSelect`. */
|
|
18
|
+
onSelect?: () => void;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { AttachmentData } from "../_internals/ai-types.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Props for Composer
|
|
7
|
+
*/
|
|
8
|
+
export interface ComposerProps {
|
|
9
|
+
/** The draft text, bindable. Cleared by a successful submit. */
|
|
10
|
+
value?: string;
|
|
11
|
+
/** Files riding along with the draft, bindable. The consumer owns uploading them. */
|
|
12
|
+
attachments?: AttachmentData[];
|
|
13
|
+
/** Blocks typing, sending, and attaching. */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** A response is arriving: the send button becomes a stop button. */
|
|
16
|
+
streaming?: boolean;
|
|
17
|
+
/** Placeholder for the default input. Ignored once `children` replaces the composition. */
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
/** Called with the trimmed draft and a snapshot of the attachments. */
|
|
20
|
+
onSubmit?: (payload: { text: string; attachments: AttachmentData[] }) => void;
|
|
21
|
+
/** Called when the stop button is pressed while streaming. */
|
|
22
|
+
onStop?: () => void;
|
|
23
|
+
/** Called with the files handed to `addFiles`. Upload them, then push onto `attachments`. */
|
|
24
|
+
onAttach?: (files: File[]) => void;
|
|
25
|
+
/** Replaces the default input-and-send-row composition entirely. */
|
|
26
|
+
children?: Snippet;
|
|
27
|
+
/** An overlay covering the composer — a voice panel, a drop target, a confirmation. */
|
|
28
|
+
accessory?: Snippet;
|
|
29
|
+
/** Additional CSS classes */
|
|
30
|
+
class?: string;
|
|
31
|
+
/** The form element, bindable. */
|
|
32
|
+
ref?: HTMLFormElement | null;
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<script lang="ts">
|
|
37
|
+
import { setContext, tick } from "svelte";
|
|
38
|
+
import { cn } from "../../utils.js";
|
|
39
|
+
import { findTokenStart } from "./caret.js";
|
|
40
|
+
import ComposerInput from "./ComposerInput.svelte";
|
|
41
|
+
import ComposerSubmit from "./ComposerSubmit.svelte";
|
|
42
|
+
import { COMPOSER_CONTEXT_KEY, type ComposerContext } from "./types.js";
|
|
43
|
+
|
|
44
|
+
let {
|
|
45
|
+
value = $bindable(""),
|
|
46
|
+
attachments = $bindable([]),
|
|
47
|
+
disabled = false,
|
|
48
|
+
streaming = false,
|
|
49
|
+
placeholder,
|
|
50
|
+
onSubmit,
|
|
51
|
+
onStop,
|
|
52
|
+
onAttach,
|
|
53
|
+
children,
|
|
54
|
+
accessory,
|
|
55
|
+
class: className,
|
|
56
|
+
ref = $bindable(null),
|
|
57
|
+
}: ComposerProps = $props();
|
|
58
|
+
|
|
59
|
+
// Written by ComposerInput through the context, read by insertText's caret
|
|
60
|
+
// arithmetic. A composer with no input part keeps it null and falls back to
|
|
61
|
+
// appending at the end of the draft.
|
|
62
|
+
let textareaEl = $state<HTMLTextAreaElement | null>(null);
|
|
63
|
+
|
|
64
|
+
function submit() {
|
|
65
|
+
// A composer that is off or already busy sends nothing, whatever the draft
|
|
66
|
+
// says — the send button is disabled in both states, but Enter and a
|
|
67
|
+
// programmatic `submit()` reach here too.
|
|
68
|
+
if (disabled || streaming) return;
|
|
69
|
+
const text = value.trim();
|
|
70
|
+
if (text === "" && attachments.length === 0) return;
|
|
71
|
+
// With nobody listening there is nowhere for the draft to go, and clearing
|
|
72
|
+
// it would throw away text the reader has no way of getting back.
|
|
73
|
+
if (!onSubmit) return;
|
|
74
|
+
// A copy, so a consumer stashing the payload does not end up holding the
|
|
75
|
+
// live list it is about to mutate.
|
|
76
|
+
onSubmit({ text, attachments: [...attachments] });
|
|
77
|
+
// The text is ours to clear; the attachments belong to the consumer, who
|
|
78
|
+
// alone knows whether an upload is still in flight.
|
|
79
|
+
value = "";
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function stop() {
|
|
83
|
+
if (!streaming) return;
|
|
84
|
+
onStop?.();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function setValue(next: string) {
|
|
88
|
+
value = next;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function insertText(text: string, replaceTriggerToken = false) {
|
|
92
|
+
// A composer that is off or already busy takes no dictation either — the
|
|
93
|
+
// textarea is readonly in both states, and a menu writing through the
|
|
94
|
+
// context would be the one way around that.
|
|
95
|
+
if (disabled || streaming) return;
|
|
96
|
+
const current = value;
|
|
97
|
+
const rawEnd = textareaEl?.selectionEnd;
|
|
98
|
+
const end = typeof rawEnd === "number" ? rawEnd : current.length;
|
|
99
|
+
const rawStart = textareaEl?.selectionStart;
|
|
100
|
+
const selectionStart = typeof rawStart === "number" ? Math.min(rawStart, end) : end;
|
|
101
|
+
|
|
102
|
+
// The menus' own definition of a token, not a second one that could drift
|
|
103
|
+
// from it: what a menu matched is exactly what a completion overwrites.
|
|
104
|
+
const trigger = replaceTriggerToken ? findTokenStart(current, end) : -1;
|
|
105
|
+
const start = trigger >= 0 ? trigger : selectionStart;
|
|
106
|
+
const trailing = current.slice(end);
|
|
107
|
+
|
|
108
|
+
// Completing a token leaves the caret ready for the next word; a plain
|
|
109
|
+
// insert splices exactly what it was handed, and nothing more.
|
|
110
|
+
const needsSpace = trigger >= 0 && !/\s$/.test(text) && !/^\s/.test(trailing);
|
|
111
|
+
const insertion = needsSpace ? `${text} ` : text;
|
|
112
|
+
const caret = start + insertion.length;
|
|
113
|
+
|
|
114
|
+
value = `${current.slice(0, start)}${insertion}${trailing}`;
|
|
115
|
+
|
|
116
|
+
const el = textareaEl;
|
|
117
|
+
if (!el) return;
|
|
118
|
+
// The caret can only be placed once the controlled value has reached the
|
|
119
|
+
// DOM, so it waits a tick. Focus comes back with it: the insertion was
|
|
120
|
+
// almost certainly triggered from a menu that stole it.
|
|
121
|
+
void tick().then(() => {
|
|
122
|
+
if (!el.isConnected) return;
|
|
123
|
+
el.focus();
|
|
124
|
+
el.setSelectionRange(caret, caret);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function addFiles(files: File[]) {
|
|
129
|
+
if (disabled || files.length === 0) return;
|
|
130
|
+
onAttach?.(files);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function removeAttachment(id: string) {
|
|
134
|
+
attachments = attachments.filter((attachment) => attachment.id !== id);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const context: ComposerContext = {
|
|
138
|
+
value: {
|
|
139
|
+
get current() {
|
|
140
|
+
return value;
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
attachments: {
|
|
144
|
+
get current() {
|
|
145
|
+
return attachments;
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
get disabled() {
|
|
149
|
+
return disabled;
|
|
150
|
+
},
|
|
151
|
+
get streaming() {
|
|
152
|
+
return streaming;
|
|
153
|
+
},
|
|
154
|
+
get stoppable() {
|
|
155
|
+
return typeof onStop === "function";
|
|
156
|
+
},
|
|
157
|
+
// Declared read-only on ComposerContext so no other part writes it; the
|
|
158
|
+
// setter exists for ComposerInput alone, which registers its element here
|
|
159
|
+
// on mount. See the note at the top of types.ts.
|
|
160
|
+
textareaRef: {
|
|
161
|
+
get current() {
|
|
162
|
+
return textareaEl;
|
|
163
|
+
},
|
|
164
|
+
set current(next: HTMLTextAreaElement | null) {
|
|
165
|
+
textareaEl = next;
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
submit,
|
|
169
|
+
stop,
|
|
170
|
+
setValue,
|
|
171
|
+
insertText,
|
|
172
|
+
addFiles,
|
|
173
|
+
removeAttachment,
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
setContext(COMPOSER_CONTEXT_KEY, context);
|
|
177
|
+
|
|
178
|
+
function handleSubmit(event: SubmitEvent) {
|
|
179
|
+
// Nothing here navigates: the draft leaves through onSubmit.
|
|
180
|
+
event.preventDefault();
|
|
181
|
+
submit();
|
|
182
|
+
}
|
|
183
|
+
</script>
|
|
184
|
+
|
|
185
|
+
<form
|
|
186
|
+
bind:this={ref}
|
|
187
|
+
class={cn("ft-composer relative flex w-full flex-col border p-2", className)}
|
|
188
|
+
class:ft-composer-disabled={disabled}
|
|
189
|
+
data-streaming={streaming ? "" : undefined}
|
|
190
|
+
onsubmit={handleSubmit}
|
|
191
|
+
>
|
|
192
|
+
{#if children}
|
|
193
|
+
{@render children()}
|
|
194
|
+
{:else}
|
|
195
|
+
<ComposerInput {placeholder} />
|
|
196
|
+
<div class="mt-2 flex items-center gap-2">
|
|
197
|
+
<div class="flex-1"></div>
|
|
198
|
+
<ComposerSubmit />
|
|
199
|
+
</div>
|
|
200
|
+
{/if}
|
|
201
|
+
|
|
202
|
+
{#if accessory}
|
|
203
|
+
<div class="ft-composer-accessory absolute inset-0 z-10">
|
|
204
|
+
{@render accessory()}
|
|
205
|
+
</div>
|
|
206
|
+
{/if}
|
|
207
|
+
</form>
|
|
208
|
+
|
|
209
|
+
<style>
|
|
210
|
+
/*
|
|
211
|
+
* The surface is a form, not a card: it reads as one input the whole row of
|
|
212
|
+
* controls lives inside, which is why the focus ring belongs to the container
|
|
213
|
+
* rather than to the textarea buried in it.
|
|
214
|
+
*/
|
|
215
|
+
.ft-composer {
|
|
216
|
+
border-radius: var(--ft-composer-radius, 0.75rem);
|
|
217
|
+
border-color: var(--ft-composer-border, color-mix(in oklab, currentColor 14%, transparent));
|
|
218
|
+
background: var(--ft-composer-bg, color-mix(in oklab, currentColor 4%, transparent));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.ft-composer:focus-within {
|
|
222
|
+
border-color: var(
|
|
223
|
+
--ft-composer-border-focus,
|
|
224
|
+
color-mix(in oklab, currentColor 32%, transparent)
|
|
225
|
+
);
|
|
226
|
+
box-shadow: 0 0 0 1px
|
|
227
|
+
var(--ft-composer-ring, color-mix(in oklab, currentColor 22%, transparent));
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.ft-composer-disabled {
|
|
231
|
+
opacity: var(--ft-composer-disabled-opacity, 0.6);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
235
|
+
.ft-composer {
|
|
236
|
+
transition:
|
|
237
|
+
border-color 150ms ease,
|
|
238
|
+
box-shadow 150ms ease;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
</style>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
import type { AttachmentData } from "../_internals/ai-types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Props for Composer
|
|
5
|
+
*/
|
|
6
|
+
export interface ComposerProps {
|
|
7
|
+
/** The draft text, bindable. Cleared by a successful submit. */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** Files riding along with the draft, bindable. The consumer owns uploading them. */
|
|
10
|
+
attachments?: AttachmentData[];
|
|
11
|
+
/** Blocks typing, sending, and attaching. */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** A response is arriving: the send button becomes a stop button. */
|
|
14
|
+
streaming?: boolean;
|
|
15
|
+
/** Placeholder for the default input. Ignored once `children` replaces the composition. */
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/** Called with the trimmed draft and a snapshot of the attachments. */
|
|
18
|
+
onSubmit?: (payload: {
|
|
19
|
+
text: string;
|
|
20
|
+
attachments: AttachmentData[];
|
|
21
|
+
}) => void;
|
|
22
|
+
/** Called when the stop button is pressed while streaming. */
|
|
23
|
+
onStop?: () => void;
|
|
24
|
+
/** Called with the files handed to `addFiles`. Upload them, then push onto `attachments`. */
|
|
25
|
+
onAttach?: (files: File[]) => void;
|
|
26
|
+
/** Replaces the default input-and-send-row composition entirely. */
|
|
27
|
+
children?: Snippet;
|
|
28
|
+
/** An overlay covering the composer — a voice panel, a drop target, a confirmation. */
|
|
29
|
+
accessory?: Snippet;
|
|
30
|
+
/** Additional CSS classes */
|
|
31
|
+
class?: string;
|
|
32
|
+
/** The form element, bindable. */
|
|
33
|
+
ref?: HTMLFormElement | null;
|
|
34
|
+
}
|
|
35
|
+
declare const Composer: import("svelte").Component<ComposerProps, {}, "ref" | "value" | "attachments">;
|
|
36
|
+
type Composer = ReturnType<typeof Composer>;
|
|
37
|
+
export default Composer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|