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,77 @@
|
|
|
1
|
+
import { render, cleanup } from "@testing-library/svelte";
|
|
2
|
+
import { afterEach, describe, it, expect, vi } from "vitest";
|
|
3
|
+
import StreamText from "./StreamText.svelte";
|
|
4
|
+
describe("StreamText", () => {
|
|
5
|
+
afterEach(() => {
|
|
6
|
+
cleanup();
|
|
7
|
+
vi.useRealTimers();
|
|
8
|
+
});
|
|
9
|
+
it("renders the whole text as plain content on first paint, with nothing animating", () => {
|
|
10
|
+
vi.useFakeTimers();
|
|
11
|
+
const { container } = render(StreamText, { props: { text: "Hello world" } });
|
|
12
|
+
const wrapper = container.firstElementChild;
|
|
13
|
+
expect(wrapper.textContent).toBe("Hello world");
|
|
14
|
+
expect(container.querySelector(".ft-fresh")).toBeFalsy();
|
|
15
|
+
expect(vi.getTimerCount()).toBe(0);
|
|
16
|
+
});
|
|
17
|
+
it("wraps only the appended delta in a fresh span, then folds it in once settled", async () => {
|
|
18
|
+
vi.useFakeTimers();
|
|
19
|
+
const { container, rerender } = render(StreamText, {
|
|
20
|
+
props: { text: "Hello", settleMs: 100 },
|
|
21
|
+
});
|
|
22
|
+
const wrapper = container.firstElementChild;
|
|
23
|
+
await rerender({ text: "Hello, world" });
|
|
24
|
+
const fresh = container.querySelector(".ft-fresh");
|
|
25
|
+
expect(fresh).toBeTruthy();
|
|
26
|
+
expect(fresh?.textContent).toBe(", world");
|
|
27
|
+
expect(wrapper.textContent).toBe("Hello, world");
|
|
28
|
+
await vi.advanceTimersByTimeAsync(100);
|
|
29
|
+
expect(container.querySelector(".ft-fresh")).toBeFalsy();
|
|
30
|
+
expect(wrapper.textContent).toBe("Hello, world");
|
|
31
|
+
});
|
|
32
|
+
it("preserves whitespace and newlines, in the settled text and in the delta", async () => {
|
|
33
|
+
vi.useFakeTimers();
|
|
34
|
+
const { container, rerender } = render(StreamText, {
|
|
35
|
+
props: { text: "line one\n line two", settleMs: 100 },
|
|
36
|
+
});
|
|
37
|
+
const wrapper = container.firstElementChild;
|
|
38
|
+
expect(wrapper.textContent).toBe("line one\n line two");
|
|
39
|
+
expect(wrapper.getAttribute("style")).toContain("pre-wrap");
|
|
40
|
+
await rerender({ text: "line one\n line two\n\nline three" });
|
|
41
|
+
expect(container.querySelector(".ft-fresh")?.textContent).toBe("\n\nline three");
|
|
42
|
+
expect(wrapper.textContent).toBe("line one\n line two\n\nline three");
|
|
43
|
+
});
|
|
44
|
+
it("swaps the content outright, without animating, when the new text is not a continuation", async () => {
|
|
45
|
+
vi.useFakeTimers();
|
|
46
|
+
const { container, rerender } = render(StreamText, {
|
|
47
|
+
props: { text: "Draft answer", settleMs: 100 },
|
|
48
|
+
});
|
|
49
|
+
const wrapper = container.firstElementChild;
|
|
50
|
+
await rerender({ text: "Draft answer, revised" });
|
|
51
|
+
expect(container.querySelector(".ft-fresh")).toBeTruthy();
|
|
52
|
+
await rerender({ text: "A regenerated answer" });
|
|
53
|
+
expect(wrapper.textContent).toBe("A regenerated answer");
|
|
54
|
+
expect(container.querySelector(".ft-fresh")).toBeFalsy();
|
|
55
|
+
expect(vi.getTimerCount()).toBe(0);
|
|
56
|
+
});
|
|
57
|
+
it("merges custom classes and exposes the settle duration to the animation", () => {
|
|
58
|
+
vi.useFakeTimers();
|
|
59
|
+
const { container } = render(StreamText, {
|
|
60
|
+
props: { text: "x", settleMs: 900, class: "text-sm" },
|
|
61
|
+
});
|
|
62
|
+
const wrapper = container.firstElementChild;
|
|
63
|
+
expect(wrapper.className).toContain("ft-stream");
|
|
64
|
+
expect(wrapper.className).toContain("text-sm");
|
|
65
|
+
expect(wrapper.getAttribute("style")).toContain("--ft-settle: 900ms");
|
|
66
|
+
});
|
|
67
|
+
it("tears down a pending settle on unmount", async () => {
|
|
68
|
+
vi.useFakeTimers();
|
|
69
|
+
const { unmount, rerender } = render(StreamText, {
|
|
70
|
+
props: { text: "Hello", settleMs: 100 },
|
|
71
|
+
});
|
|
72
|
+
await rerender({ text: "Hello there" });
|
|
73
|
+
expect(vi.getTimerCount()).toBe(1);
|
|
74
|
+
expect(() => unmount()).not.toThrow();
|
|
75
|
+
expect(vi.getTimerCount()).toBe(0);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared data model for the AI component family.
|
|
3
|
+
*
|
|
4
|
+
* Every conversational and agent-activity component reads from these shapes, so
|
|
5
|
+
* one message object can flow from a thread list into a transcript, a tool
|
|
6
|
+
* timeline, or a citation card without translation at each boundary. Types only:
|
|
7
|
+
* nothing here runs, imports, or touches the DOM.
|
|
8
|
+
*/
|
|
9
|
+
/** Who produced a turn in a conversation. */
|
|
10
|
+
export type ChatRole = "user" | "assistant" | "system";
|
|
11
|
+
/** Lifecycle of a token stream, from the first chunk to its terminal state. */
|
|
12
|
+
export type StreamStatus = "idle" | "streaming" | "done" | "error";
|
|
13
|
+
/** Lifecycle of anything the model kicks off and can finish, fail, or abandon. */
|
|
14
|
+
export type RunStatus = "pending" | "running" | "done" | "error" | "cancelled";
|
|
15
|
+
/** One conversation turn — consumed by message bubbles, transcripts, and branch switchers. */
|
|
16
|
+
export interface ChatMessageData {
|
|
17
|
+
id: string;
|
|
18
|
+
role: ChatRole;
|
|
19
|
+
content: string;
|
|
20
|
+
status?: StreamStatus;
|
|
21
|
+
createdAt?: Date | number;
|
|
22
|
+
branchIndex?: number;
|
|
23
|
+
branchCount?: number;
|
|
24
|
+
}
|
|
25
|
+
/** A single tool invocation — consumed by tool-call cards and their input/output panels. */
|
|
26
|
+
export interface ToolCallData {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
status: RunStatus;
|
|
30
|
+
input?: unknown;
|
|
31
|
+
output?: unknown;
|
|
32
|
+
error?: string;
|
|
33
|
+
durationMs?: number;
|
|
34
|
+
}
|
|
35
|
+
/** A document backing an answer — consumed by source lists and inline citations. */
|
|
36
|
+
export interface SourceData {
|
|
37
|
+
id: string;
|
|
38
|
+
title: string;
|
|
39
|
+
url: string;
|
|
40
|
+
snippet?: string;
|
|
41
|
+
domain?: string;
|
|
42
|
+
}
|
|
43
|
+
/** One hit from a web lookup — consumed by search-result surfaces. */
|
|
44
|
+
export interface SearchResultData {
|
|
45
|
+
id: string;
|
|
46
|
+
title: string;
|
|
47
|
+
url: string;
|
|
48
|
+
snippet?: string;
|
|
49
|
+
}
|
|
50
|
+
/** A file riding along with a turn — consumed by composer attachment chips and previews. */
|
|
51
|
+
export interface AttachmentData {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
size?: number;
|
|
55
|
+
type?: string;
|
|
56
|
+
previewUrl?: string;
|
|
57
|
+
progress?: number;
|
|
58
|
+
status?: "uploading" | "done" | "error";
|
|
59
|
+
}
|
|
60
|
+
/** A node in an agent's plan — consumed by plan trees and task checklists, nests via `substeps`. */
|
|
61
|
+
export interface PlanStepData {
|
|
62
|
+
id: string;
|
|
63
|
+
label: string;
|
|
64
|
+
status: RunStatus;
|
|
65
|
+
detail?: string;
|
|
66
|
+
substeps?: PlanStepData[];
|
|
67
|
+
}
|
|
68
|
+
/** A delegated worker — consumed by subagent cards and fan-out activity views. */
|
|
69
|
+
export interface SubagentData {
|
|
70
|
+
id: string;
|
|
71
|
+
name: string;
|
|
72
|
+
task: string;
|
|
73
|
+
status: RunStatus;
|
|
74
|
+
progress?: number;
|
|
75
|
+
model?: string;
|
|
76
|
+
}
|
|
77
|
+
/** A conversation in the sidebar — consumed by thread lists and history pickers. */
|
|
78
|
+
export interface ThreadData {
|
|
79
|
+
id: string;
|
|
80
|
+
title: string;
|
|
81
|
+
preview?: string;
|
|
82
|
+
updatedAt: Date | number;
|
|
83
|
+
unread?: boolean;
|
|
84
|
+
}
|
|
85
|
+
/** A selectable action — consumed by slash-command menus and command palettes. */
|
|
86
|
+
export interface CommandItemData {
|
|
87
|
+
id: string;
|
|
88
|
+
label: string;
|
|
89
|
+
description?: string;
|
|
90
|
+
hint?: string;
|
|
91
|
+
}
|
|
92
|
+
/** A model the user can switch to — consumed by model pickers in the composer. */
|
|
93
|
+
export interface ModelOptionData {
|
|
94
|
+
id: string;
|
|
95
|
+
label: string;
|
|
96
|
+
badge?: string;
|
|
97
|
+
description?: string;
|
|
98
|
+
}
|
|
99
|
+
/** Context-window consumption — consumed by token meters and context rings. */
|
|
100
|
+
export interface TokenUsageData {
|
|
101
|
+
used: number;
|
|
102
|
+
max: number;
|
|
103
|
+
breakdown?: Array<{
|
|
104
|
+
label: string;
|
|
105
|
+
tokens: number;
|
|
106
|
+
}>;
|
|
107
|
+
}
|
|
108
|
+
/** One line of agent activity — consumed by tool timelines that read as an action log. */
|
|
109
|
+
export interface ToolTimelineItemData {
|
|
110
|
+
id: string;
|
|
111
|
+
verb: string;
|
|
112
|
+
target: string;
|
|
113
|
+
detail?: string;
|
|
114
|
+
additions?: number;
|
|
115
|
+
deletions?: number;
|
|
116
|
+
timestamp?: Date | number;
|
|
117
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared data model for the AI component family.
|
|
3
|
+
*
|
|
4
|
+
* Every conversational and agent-activity component reads from these shapes, so
|
|
5
|
+
* one message object can flow from a thread list into a transcript, a tool
|
|
6
|
+
* timeline, or a citation card without translation at each boundary. Types only:
|
|
7
|
+
* nothing here runs, imports, or touches the DOM.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Action } from "svelte/action";
|
|
2
|
+
export type Side = "top" | "bottom" | "left" | "right";
|
|
3
|
+
export type Align = "start" | "center" | "end";
|
|
4
|
+
export interface ComputePositionOptions {
|
|
5
|
+
/** Side of the anchor to place the floating element on. Defaults to "bottom". */
|
|
6
|
+
side?: Side;
|
|
7
|
+
/** Alignment along the cross axis of `side`. Defaults to "center". */
|
|
8
|
+
align?: Align;
|
|
9
|
+
/** Gap in pixels between the anchor and the floating element. Defaults to 8. */
|
|
10
|
+
offset?: number;
|
|
11
|
+
/** Viewport bounds used for flip/clamp. Defaults to `window` when available, otherwise unbounded (SSR). */
|
|
12
|
+
viewport?: {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
};
|
|
16
|
+
/** Flip to the opposite side when the requested side would overflow the viewport. Defaults to true. */
|
|
17
|
+
flip?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface ComputePositionResult {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
/** The side actually used, which may differ from the requested one when flipped. */
|
|
23
|
+
side: Side;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Computes where to place a floating element relative to an anchor rect.
|
|
27
|
+
*
|
|
28
|
+
* Pure function — no DOM access, so it is testable with plain objects that
|
|
29
|
+
* satisfy the `DOMRect` shape.
|
|
30
|
+
*/
|
|
31
|
+
export declare function computePosition(anchor: DOMRect, floating: {
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
}, opts?: ComputePositionOptions): ComputePositionResult;
|
|
35
|
+
export interface AnchorPositionOptions {
|
|
36
|
+
/** Resolves the current anchor element. Called on every recompute so it can track a moving target. */
|
|
37
|
+
anchor: () => HTMLElement | null;
|
|
38
|
+
side?: Side;
|
|
39
|
+
align?: Align;
|
|
40
|
+
offset?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Called with the side the element was actually placed on, which differs
|
|
43
|
+
* from the requested `side` whenever a flip occurred. Fires once on the
|
|
44
|
+
* initial placement and thereafter only when the resolved side changes,
|
|
45
|
+
* so a consumer can react (move a caret, mirror a submenu's open
|
|
46
|
+
* direction) without re-rendering on every scroll frame.
|
|
47
|
+
*
|
|
48
|
+
* Without this, `computePosition`'s resolved side is computed and
|
|
49
|
+
* discarded here, and a consumer has no way to learn a flip happened.
|
|
50
|
+
*/
|
|
51
|
+
onPlacement?: (side: Side) => void;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Svelte action that positions `node` with `position: fixed` against a live
|
|
55
|
+
* anchor element, using `computePosition`. Recomputes on scroll and resize
|
|
56
|
+
* (passive, capturing listeners so nested scroll containers are caught too)
|
|
57
|
+
* and cleans up its listeners on destroy.
|
|
58
|
+
*
|
|
59
|
+
* SSR-safe: does nothing when `window` is unavailable.
|
|
60
|
+
*/
|
|
61
|
+
export declare const anchorPosition: Action<HTMLElement, AnchorPositionOptions>;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
// Framework-agnostic floating-element positioning: given an anchor rect and
|
|
2
|
+
// the size of a floating element (popover / tooltip / menu), computes the
|
|
3
|
+
// x/y coordinates that place it on the requested side, aligned against the
|
|
4
|
+
// anchor, offset away from it, flipped to the opposite side when it would
|
|
5
|
+
// overflow the viewport, and clamped so it never renders off-screen.
|
|
6
|
+
//
|
|
7
|
+
// `computePosition` is a pure function: it takes a DOMRect-shaped anchor and
|
|
8
|
+
// plain dimensions, so it is fully testable without a DOM. `anchorPosition`
|
|
9
|
+
// is the Svelte action that wires it up to a live anchor element.
|
|
10
|
+
//
|
|
11
|
+
// Usage:
|
|
12
|
+
// const { x, y, side } = computePosition(anchorEl.getBoundingClientRect(), { width: 200, height: 40 });
|
|
13
|
+
//
|
|
14
|
+
// <div use:anchorPosition={{ anchor: () => anchorEl, side: "bottom" }}>...</div>
|
|
15
|
+
const OPPOSITE_SIDE = {
|
|
16
|
+
top: "bottom",
|
|
17
|
+
bottom: "top",
|
|
18
|
+
left: "right",
|
|
19
|
+
right: "left",
|
|
20
|
+
};
|
|
21
|
+
function isHorizontalSide(side) {
|
|
22
|
+
return side === "top" || side === "bottom";
|
|
23
|
+
}
|
|
24
|
+
function clamp(value, min, max) {
|
|
25
|
+
return Math.max(min, Math.min(value, max));
|
|
26
|
+
}
|
|
27
|
+
function getDefaultViewport() {
|
|
28
|
+
if (typeof window !== "undefined") {
|
|
29
|
+
return { width: window.innerWidth, height: window.innerHeight };
|
|
30
|
+
}
|
|
31
|
+
// SSR fallback: no viewport to overflow against, so flip/clamp become no-ops.
|
|
32
|
+
return { width: Number.POSITIVE_INFINITY, height: Number.POSITIVE_INFINITY };
|
|
33
|
+
}
|
|
34
|
+
/** Whether placing the floating element on `side` would overflow the viewport. */
|
|
35
|
+
function overflows(side, anchor, floating, offset, viewport) {
|
|
36
|
+
switch (side) {
|
|
37
|
+
case "top":
|
|
38
|
+
return anchor.top - floating.height - offset < 0;
|
|
39
|
+
case "bottom":
|
|
40
|
+
return anchor.bottom + offset + floating.height > viewport.height;
|
|
41
|
+
case "left":
|
|
42
|
+
return anchor.left - floating.width - offset < 0;
|
|
43
|
+
case "right":
|
|
44
|
+
return anchor.right + offset + floating.width > viewport.width;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/** Computes the raw (unclamped) x/y for `side` + `align`, before flip/clamp are applied. */
|
|
48
|
+
function placeAt(side, anchor, floating, align, offset) {
|
|
49
|
+
if (isHorizontalSide(side)) {
|
|
50
|
+
const y = side === "top" ? anchor.top - floating.height - offset : anchor.bottom + offset;
|
|
51
|
+
let x;
|
|
52
|
+
switch (align) {
|
|
53
|
+
case "start":
|
|
54
|
+
x = anchor.left;
|
|
55
|
+
break;
|
|
56
|
+
case "end":
|
|
57
|
+
x = anchor.right - floating.width;
|
|
58
|
+
break;
|
|
59
|
+
default:
|
|
60
|
+
x = anchor.left + anchor.width / 2 - floating.width / 2;
|
|
61
|
+
}
|
|
62
|
+
return { x, y };
|
|
63
|
+
}
|
|
64
|
+
const x = side === "left" ? anchor.left - floating.width - offset : anchor.right + offset;
|
|
65
|
+
let y;
|
|
66
|
+
switch (align) {
|
|
67
|
+
case "start":
|
|
68
|
+
y = anchor.top;
|
|
69
|
+
break;
|
|
70
|
+
case "end":
|
|
71
|
+
y = anchor.bottom - floating.height;
|
|
72
|
+
break;
|
|
73
|
+
default:
|
|
74
|
+
y = anchor.top + anchor.height / 2 - floating.height / 2;
|
|
75
|
+
}
|
|
76
|
+
return { x, y };
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Computes where to place a floating element relative to an anchor rect.
|
|
80
|
+
*
|
|
81
|
+
* Pure function — no DOM access, so it is testable with plain objects that
|
|
82
|
+
* satisfy the `DOMRect` shape.
|
|
83
|
+
*/
|
|
84
|
+
export function computePosition(anchor, floating, opts = {}) {
|
|
85
|
+
const { side = "bottom", align = "center", offset = 8, flip = true } = opts;
|
|
86
|
+
const viewport = opts.viewport ?? getDefaultViewport();
|
|
87
|
+
const resolvedSide = flip && overflows(side, anchor, floating, offset, viewport) ? OPPOSITE_SIDE[side] : side;
|
|
88
|
+
const { x, y } = placeAt(resolvedSide, anchor, floating, align, offset);
|
|
89
|
+
const maxX = Math.max(0, viewport.width - floating.width);
|
|
90
|
+
const maxY = Math.max(0, viewport.height - floating.height);
|
|
91
|
+
return {
|
|
92
|
+
x: clamp(x, 0, maxX),
|
|
93
|
+
y: clamp(y, 0, maxY),
|
|
94
|
+
side: resolvedSide,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Svelte action that positions `node` with `position: fixed` against a live
|
|
99
|
+
* anchor element, using `computePosition`. Recomputes on scroll and resize
|
|
100
|
+
* (passive, capturing listeners so nested scroll containers are caught too)
|
|
101
|
+
* and cleans up its listeners on destroy.
|
|
102
|
+
*
|
|
103
|
+
* SSR-safe: does nothing when `window` is unavailable.
|
|
104
|
+
*/
|
|
105
|
+
export const anchorPosition = (node, opts) => {
|
|
106
|
+
if (typeof window === "undefined") {
|
|
107
|
+
return {};
|
|
108
|
+
}
|
|
109
|
+
let options = opts;
|
|
110
|
+
// The last side reported through `onPlacement`, so a scroll or resize that
|
|
111
|
+
// recomputes to the same side stays silent. `null` means "nothing reported
|
|
112
|
+
// yet", which is distinct from any real side and makes the first placement
|
|
113
|
+
// always fire.
|
|
114
|
+
let reportedSide = null;
|
|
115
|
+
function update() {
|
|
116
|
+
const anchorEl = options.anchor();
|
|
117
|
+
if (!anchorEl)
|
|
118
|
+
return;
|
|
119
|
+
const anchorRect = anchorEl.getBoundingClientRect();
|
|
120
|
+
const floatingRect = node.getBoundingClientRect();
|
|
121
|
+
const { x, y, side } = computePosition(anchorRect, { width: floatingRect.width, height: floatingRect.height }, {
|
|
122
|
+
side: options.side,
|
|
123
|
+
align: options.align,
|
|
124
|
+
offset: options.offset,
|
|
125
|
+
viewport: { width: window.innerWidth, height: window.innerHeight },
|
|
126
|
+
});
|
|
127
|
+
node.style.position = "fixed";
|
|
128
|
+
node.style.left = `${x}px`;
|
|
129
|
+
node.style.top = `${y}px`;
|
|
130
|
+
if (side !== reportedSide) {
|
|
131
|
+
reportedSide = side;
|
|
132
|
+
options.onPlacement?.(side);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
update();
|
|
136
|
+
window.addEventListener("scroll", update, { passive: true, capture: true });
|
|
137
|
+
window.addEventListener("resize", update, { passive: true });
|
|
138
|
+
return {
|
|
139
|
+
update(newOpts) {
|
|
140
|
+
// A new `onPlacement` is a new listener that has never been told
|
|
141
|
+
// anything, so it gets a report even if the side did not move.
|
|
142
|
+
// Without this, the idiomatic Svelte call site — an inline arrow
|
|
143
|
+
// in the action's options object, rebuilt on every re-render —
|
|
144
|
+
// silently never fires after the first one: `reportedSide` is
|
|
145
|
+
// scoped to the node, not to the callback, so the gate that exists
|
|
146
|
+
// to suppress duplicate reports to the *same* listener ends up
|
|
147
|
+
// suppressing the first report to a *different* one.
|
|
148
|
+
if (newOpts.onPlacement !== options.onPlacement)
|
|
149
|
+
reportedSide = null;
|
|
150
|
+
options = newOpts;
|
|
151
|
+
update();
|
|
152
|
+
},
|
|
153
|
+
destroy() {
|
|
154
|
+
window.removeEventListener("scroll", update, { capture: true });
|
|
155
|
+
window.removeEventListener("resize", update);
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { afterEach, describe, it, expect, vi } from "vitest";
|
|
2
|
+
import { anchorPosition, computePosition } from "./anchor-position";
|
|
3
|
+
function rect(partial) {
|
|
4
|
+
const { x = 0, y = 0, width = 0, height = 0 } = partial;
|
|
5
|
+
return {
|
|
6
|
+
x,
|
|
7
|
+
y,
|
|
8
|
+
width,
|
|
9
|
+
height,
|
|
10
|
+
top: y,
|
|
11
|
+
left: x,
|
|
12
|
+
right: x + width,
|
|
13
|
+
bottom: y + height,
|
|
14
|
+
toJSON() {
|
|
15
|
+
return this;
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
const viewport = { width: 1024, height: 768 };
|
|
20
|
+
describe("computePosition", () => {
|
|
21
|
+
it("places the floating element below the anchor by default", () => {
|
|
22
|
+
const anchor = rect({ x: 100, y: 100, width: 50, height: 20 });
|
|
23
|
+
const result = computePosition(anchor, { width: 200, height: 40 }, { viewport });
|
|
24
|
+
expect(result.side).toBe("bottom");
|
|
25
|
+
expect(result.y).toBe(anchor.bottom + 8); // default offset
|
|
26
|
+
expect(result.x).toBe(anchor.left + anchor.width / 2 - 100); // centered
|
|
27
|
+
});
|
|
28
|
+
it("places the floating element above the anchor when side is 'top'", () => {
|
|
29
|
+
const anchor = rect({ x: 100, y: 300, width: 50, height: 20 });
|
|
30
|
+
const result = computePosition(anchor, { width: 200, height: 40 }, { side: "top", viewport });
|
|
31
|
+
expect(result.side).toBe("top");
|
|
32
|
+
expect(result.y).toBe(anchor.top - 40 - 8);
|
|
33
|
+
});
|
|
34
|
+
it("respects a custom offset", () => {
|
|
35
|
+
const anchor = rect({ x: 100, y: 100, width: 50, height: 20 });
|
|
36
|
+
const result = computePosition(anchor, { width: 200, height: 40 }, { side: "bottom", offset: 16, viewport });
|
|
37
|
+
expect(result.y).toBe(anchor.bottom + 16);
|
|
38
|
+
});
|
|
39
|
+
it("aligns to start / end along the cross axis for a horizontal side", () => {
|
|
40
|
+
const anchor = rect({ x: 700, y: 100, width: 50, height: 20 });
|
|
41
|
+
const floating = { width: 100, height: 40 };
|
|
42
|
+
const start = computePosition(anchor, floating, { side: "bottom", align: "start", viewport });
|
|
43
|
+
expect(start.x).toBe(anchor.left);
|
|
44
|
+
const end = computePosition(anchor, floating, { side: "bottom", align: "end", viewport });
|
|
45
|
+
expect(end.x).toBe(anchor.right - floating.width);
|
|
46
|
+
});
|
|
47
|
+
it("aligns to start / end along the cross axis for a vertical side", () => {
|
|
48
|
+
const anchor = rect({ x: 300, y: 100, width: 50, height: 20 });
|
|
49
|
+
const floating = { width: 120, height: 60 };
|
|
50
|
+
const start = computePosition(anchor, floating, { side: "right", align: "start", viewport });
|
|
51
|
+
expect(start.y).toBe(anchor.top);
|
|
52
|
+
const end = computePosition(anchor, floating, { side: "right", align: "end", viewport });
|
|
53
|
+
expect(end.y).toBe(anchor.bottom - floating.height);
|
|
54
|
+
});
|
|
55
|
+
it("flips from bottom to top when there is no room below", () => {
|
|
56
|
+
const anchor = rect({ x: 100, y: 700, width: 50, height: 20 }); // near the bottom edge
|
|
57
|
+
const result = computePosition(anchor, { width: 200, height: 100 }, { side: "bottom", viewport });
|
|
58
|
+
expect(result.side).toBe("top");
|
|
59
|
+
expect(result.y).toBe(anchor.top - 100 - 8);
|
|
60
|
+
});
|
|
61
|
+
it("flips from top to bottom when there is no room above", () => {
|
|
62
|
+
const anchor = rect({ x: 100, y: 10, width: 50, height: 20 }); // near the top edge
|
|
63
|
+
const result = computePosition(anchor, { width: 200, height: 100 }, { side: "top", viewport });
|
|
64
|
+
expect(result.side).toBe("bottom");
|
|
65
|
+
expect(result.y).toBe(anchor.bottom + 8);
|
|
66
|
+
});
|
|
67
|
+
it("does not flip when flip is disabled, even if it overflows", () => {
|
|
68
|
+
const anchor = rect({ x: 100, y: 700, width: 50, height: 20 });
|
|
69
|
+
const result = computePosition(anchor, { width: 200, height: 100 }, { side: "bottom", flip: false, viewport });
|
|
70
|
+
expect(result.side).toBe("bottom");
|
|
71
|
+
});
|
|
72
|
+
it("clamps horizontally so the floating element never renders off the left edge", () => {
|
|
73
|
+
const anchor = rect({ x: 5, y: 100, width: 20, height: 20 });
|
|
74
|
+
const result = computePosition(anchor, { width: 200, height: 40 }, { side: "bottom", align: "center", viewport });
|
|
75
|
+
expect(result.x).toBe(0);
|
|
76
|
+
});
|
|
77
|
+
it("clamps horizontally so the floating element never renders off the right edge", () => {
|
|
78
|
+
const anchor = rect({ x: 1000, y: 100, width: 20, height: 20 });
|
|
79
|
+
const result = computePosition(anchor, { width: 200, height: 40 }, { side: "bottom", align: "center", viewport });
|
|
80
|
+
expect(result.x).toBe(viewport.width - 200);
|
|
81
|
+
});
|
|
82
|
+
it("clamps vertically within the viewport", () => {
|
|
83
|
+
const anchor = rect({ x: 100, y: -50, width: 50, height: 20 });
|
|
84
|
+
const result = computePosition(anchor, { width: 200, height: 40 }, { side: "top", flip: false, viewport });
|
|
85
|
+
expect(result.y).toBe(0);
|
|
86
|
+
});
|
|
87
|
+
it("is a pure function that does not require a real DOM", () => {
|
|
88
|
+
const anchor = rect({ x: 0, y: 0, width: 10, height: 10 });
|
|
89
|
+
expect(() => computePosition(anchor, { width: 10, height: 10 }, { viewport: { width: 100, height: 100 } })).not.toThrow();
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
describe("anchorPosition — onPlacement", () => {
|
|
93
|
+
afterEach(() => {
|
|
94
|
+
document.body.innerHTML = "";
|
|
95
|
+
});
|
|
96
|
+
/**
|
|
97
|
+
* jsdom gives every element a zero rect, so both the anchor and the
|
|
98
|
+
* floating node need stubbed geometry for a flip to be reachable at all.
|
|
99
|
+
* The viewport is jsdom's default 1024x768.
|
|
100
|
+
*/
|
|
101
|
+
function setup(anchorRect, floating) {
|
|
102
|
+
const anchorEl = document.createElement("button");
|
|
103
|
+
const node = document.createElement("div");
|
|
104
|
+
document.body.append(anchorEl, node);
|
|
105
|
+
anchorEl.getBoundingClientRect = () => rect(anchorRect);
|
|
106
|
+
node.getBoundingClientRect = () => rect({ width: floating.width, height: floating.height });
|
|
107
|
+
return { anchorEl, node };
|
|
108
|
+
}
|
|
109
|
+
it("reports the requested side when nothing flips", () => {
|
|
110
|
+
const { anchorEl, node } = setup({ x: 100, y: 100, width: 50, height: 20 }, {
|
|
111
|
+
width: 200,
|
|
112
|
+
height: 100,
|
|
113
|
+
});
|
|
114
|
+
const seen = [];
|
|
115
|
+
const action = anchorPosition(node, {
|
|
116
|
+
anchor: () => anchorEl,
|
|
117
|
+
side: "bottom",
|
|
118
|
+
onPlacement: (side) => seen.push(side),
|
|
119
|
+
});
|
|
120
|
+
expect(seen).toEqual(["bottom"]);
|
|
121
|
+
action?.destroy?.();
|
|
122
|
+
});
|
|
123
|
+
it("reports the opposite side when the requested one overflows", () => {
|
|
124
|
+
// 740 + 8 offset + 100 tall = 848, past jsdom's 768-high viewport.
|
|
125
|
+
const { anchorEl, node } = setup({ x: 100, y: 720, width: 50, height: 20 }, {
|
|
126
|
+
width: 200,
|
|
127
|
+
height: 100,
|
|
128
|
+
});
|
|
129
|
+
const seen = [];
|
|
130
|
+
const action = anchorPosition(node, {
|
|
131
|
+
anchor: () => anchorEl,
|
|
132
|
+
side: "bottom",
|
|
133
|
+
onPlacement: (side) => seen.push(side),
|
|
134
|
+
});
|
|
135
|
+
expect(seen).toEqual(["top"]);
|
|
136
|
+
action?.destroy?.();
|
|
137
|
+
});
|
|
138
|
+
it("does not re-report while the resolved side stays the same", () => {
|
|
139
|
+
const { anchorEl, node } = setup({ x: 100, y: 100, width: 50, height: 20 }, {
|
|
140
|
+
width: 200,
|
|
141
|
+
height: 100,
|
|
142
|
+
});
|
|
143
|
+
const onPlacement = vi.fn();
|
|
144
|
+
const action = anchorPosition(node, { anchor: () => anchorEl, onPlacement });
|
|
145
|
+
window.dispatchEvent(new Event("scroll"));
|
|
146
|
+
window.dispatchEvent(new Event("resize"));
|
|
147
|
+
// One initial placement, and silence for recomputes that land on the
|
|
148
|
+
// same side — otherwise every scroll frame would re-render a caret.
|
|
149
|
+
expect(onPlacement).toHaveBeenCalledTimes(1);
|
|
150
|
+
action?.destroy?.();
|
|
151
|
+
});
|
|
152
|
+
it("reports again once the resolved side actually changes", () => {
|
|
153
|
+
const anchorEl = document.createElement("button");
|
|
154
|
+
const node = document.createElement("div");
|
|
155
|
+
document.body.append(anchorEl, node);
|
|
156
|
+
node.getBoundingClientRect = () => rect({ width: 200, height: 100 });
|
|
157
|
+
let anchorTop = 100;
|
|
158
|
+
anchorEl.getBoundingClientRect = () => rect({ x: 100, y: anchorTop, width: 50, height: 20 });
|
|
159
|
+
const seen = [];
|
|
160
|
+
const action = anchorPosition(node, {
|
|
161
|
+
anchor: () => anchorEl,
|
|
162
|
+
side: "bottom",
|
|
163
|
+
onPlacement: (side) => seen.push(side),
|
|
164
|
+
});
|
|
165
|
+
// The anchor scrolls down far enough that "bottom" no longer fits.
|
|
166
|
+
anchorTop = 720;
|
|
167
|
+
window.dispatchEvent(new Event("scroll"));
|
|
168
|
+
expect(seen).toEqual(["bottom", "top"]);
|
|
169
|
+
action?.destroy?.();
|
|
170
|
+
});
|
|
171
|
+
it("reports to a replacement callback even though the side has not moved", () => {
|
|
172
|
+
const { anchorEl, node } = setup({ x: 100, y: 100, width: 50, height: 20 }, { width: 200, height: 100 });
|
|
173
|
+
const first = vi.fn();
|
|
174
|
+
const second = vi.fn();
|
|
175
|
+
const action = anchorPosition(node, {
|
|
176
|
+
anchor: () => anchorEl,
|
|
177
|
+
side: "bottom",
|
|
178
|
+
onPlacement: first,
|
|
179
|
+
});
|
|
180
|
+
expect(first).toHaveBeenCalledTimes(1);
|
|
181
|
+
// What an inline arrow in the action's options object produces on every
|
|
182
|
+
// re-render: identical geometry, a brand-new function. It has never
|
|
183
|
+
// been told the side, so silence here would leave it permanently
|
|
184
|
+
// uninformed — the gate exists to suppress duplicate reports to the
|
|
185
|
+
// same listener, not the first report to a new one.
|
|
186
|
+
action?.update?.({
|
|
187
|
+
anchor: () => anchorEl,
|
|
188
|
+
side: "bottom",
|
|
189
|
+
onPlacement: second,
|
|
190
|
+
});
|
|
191
|
+
expect(second).toHaveBeenCalledTimes(1);
|
|
192
|
+
expect(second).toHaveBeenCalledWith("bottom");
|
|
193
|
+
expect(first).toHaveBeenCalledTimes(1);
|
|
194
|
+
action?.destroy?.();
|
|
195
|
+
});
|
|
196
|
+
it("still stays silent for a same-callback update with an unchanged side", () => {
|
|
197
|
+
const { anchorEl, node } = setup({ x: 100, y: 100, width: 50, height: 20 }, { width: 200, height: 100 });
|
|
198
|
+
const onPlacement = vi.fn();
|
|
199
|
+
const opts = { anchor: () => anchorEl, side: "bottom", onPlacement };
|
|
200
|
+
const action = anchorPosition(node, opts);
|
|
201
|
+
action?.update?.({ ...opts, offset: 12 });
|
|
202
|
+
expect(onPlacement).toHaveBeenCalledTimes(1);
|
|
203
|
+
action?.destroy?.();
|
|
204
|
+
});
|
|
205
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autoscroll (scroll anchor)
|
|
3
|
+
*
|
|
4
|
+
* Keeps a scrollable container pinned to its bottom edge while new content
|
|
5
|
+
* streams in, and lets go the moment the reader scrolls up to look back.
|
|
6
|
+
*
|
|
7
|
+
* "Stuck" is a pure function of the distance from the bottom, recomputed on
|
|
8
|
+
* every scroll event. There is no programmatic-scroll flag to get out of sync:
|
|
9
|
+
* whatever the scrollbar says is the truth.
|
|
10
|
+
*/
|
|
11
|
+
import type { ActionReturn } from "svelte/action";
|
|
12
|
+
export interface AutoscrollOptions {
|
|
13
|
+
/** Set to false to release the container and disconnect every listener. */
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
/** How close to the bottom (px) still counts as pinned. */
|
|
16
|
+
bottomThreshold?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Start pinned and jump to the bottom on connect, whatever the container's
|
|
19
|
+
* scroll position says. For a region that mounts with content already in it —
|
|
20
|
+
* a reasoning trace joined mid-stream, a replayed transcript — a fresh
|
|
21
|
+
* container sits at scrollTop 0, which reads as "the reader scrolled up" and
|
|
22
|
+
* would leave every later chunk stranded at the top.
|
|
23
|
+
*/
|
|
24
|
+
pinOnConnect?: boolean;
|
|
25
|
+
/** Called only when the pinned state flips, never on every scroll. */
|
|
26
|
+
onStickChange?: (stuck: boolean) => void;
|
|
27
|
+
}
|
|
28
|
+
/** Jump a container to its bottom. Smooth by default. */
|
|
29
|
+
export declare function scrollToBottom(node: HTMLElement, behavior?: ScrollBehavior): void;
|
|
30
|
+
export declare function autoscroll(node: HTMLElement, opts?: AutoscrollOptions): ActionReturn<AutoscrollOptions>;
|