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,263 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Props for TerminalBlock
|
|
6
|
+
*/
|
|
7
|
+
export interface TerminalBlockProps {
|
|
8
|
+
/** Everything the command has printed so far, not the latest chunk. Reassign as lines arrive. */
|
|
9
|
+
output: string;
|
|
10
|
+
/** The command that produced the output, shown on the first line after the prompt glyph. */
|
|
11
|
+
command?: string;
|
|
12
|
+
/** Prompt glyph in front of the command. */
|
|
13
|
+
prompt?: string;
|
|
14
|
+
/** Whether the command is still running. Shows the cursor and keeps the view pinned. */
|
|
15
|
+
running?: boolean;
|
|
16
|
+
/** Exit status. Anything other than null or undefined ends the run and shows the footer. */
|
|
17
|
+
exitCode?: number | null;
|
|
18
|
+
/** How long the run took, shown next to the exit status. */
|
|
19
|
+
durationMs?: number;
|
|
20
|
+
/** Read the SGR subset and colour the output. False renders the same text, unstyled. */
|
|
21
|
+
ansi?: boolean;
|
|
22
|
+
/** Height at which the output starts scrolling. */
|
|
23
|
+
maxHeight?: string;
|
|
24
|
+
/** Title bar above the output — window dots, a file name, a copy button. */
|
|
25
|
+
header?: Snippet;
|
|
26
|
+
/** Additional CSS classes */
|
|
27
|
+
class?: string;
|
|
28
|
+
/** The root element */
|
|
29
|
+
ref?: HTMLDivElement | null;
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<script lang="ts">
|
|
34
|
+
import { cn } from "../../utils.js";
|
|
35
|
+
import { autoscroll } from "../_internals/autoscroll.js";
|
|
36
|
+
import { parseAnsi, type AnsiSegment } from "./ansi.js";
|
|
37
|
+
|
|
38
|
+
let {
|
|
39
|
+
output,
|
|
40
|
+
command,
|
|
41
|
+
prompt = "$",
|
|
42
|
+
running = false,
|
|
43
|
+
exitCode = null,
|
|
44
|
+
durationMs,
|
|
45
|
+
ansi = true,
|
|
46
|
+
maxHeight = "20rem",
|
|
47
|
+
header,
|
|
48
|
+
class: className,
|
|
49
|
+
ref = $bindable(null),
|
|
50
|
+
}: TerminalBlockProps = $props();
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The palette a consumer overrides by setting `--ft-terminal-*` anywhere above
|
|
54
|
+
* the block. Each entry is the readable-on-dark version of its colour, which
|
|
55
|
+
* is also why the bright SGR codes fold onto the same eight values.
|
|
56
|
+
*/
|
|
57
|
+
const FALLBACK: Record<string, string> = {
|
|
58
|
+
"--ft-terminal-black": "oklch(0.44 0.01 260)",
|
|
59
|
+
"--ft-terminal-red": "oklch(0.7 0.18 22)",
|
|
60
|
+
"--ft-terminal-green": "oklch(0.78 0.17 150)",
|
|
61
|
+
"--ft-terminal-yellow": "oklch(0.85 0.15 90)",
|
|
62
|
+
"--ft-terminal-blue": "oklch(0.74 0.13 250)",
|
|
63
|
+
"--ft-terminal-magenta": "oklch(0.74 0.18 330)",
|
|
64
|
+
"--ft-terminal-cyan": "oklch(0.82 0.11 200)",
|
|
65
|
+
"--ft-terminal-white": "oklch(0.95 0.005 260)",
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const finished = $derived(exitCode !== null && exitCode !== undefined);
|
|
69
|
+
const ok = $derived(exitCode === 0);
|
|
70
|
+
const duration = $derived(formatDuration(durationMs));
|
|
71
|
+
|
|
72
|
+
const rows = $derived.by(() => {
|
|
73
|
+
const lines = toRows(output, ansi);
|
|
74
|
+
// A stream that has printed nothing yet still needs a line to put the
|
|
75
|
+
// cursor on; a finished one should not end on a blank line just because
|
|
76
|
+
// its last write ended in a newline.
|
|
77
|
+
if (lines.length === 0) return running ? [[]] : [];
|
|
78
|
+
const last = lines[lines.length - 1];
|
|
79
|
+
if (!running && lines.length > 1 && last.length === 0) lines.pop();
|
|
80
|
+
return lines;
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Parse once over the whole stream, then cut the segments at the newlines:
|
|
85
|
+
* a colour opened on one line and closed three lines later stays in effect
|
|
86
|
+
* for the lines in between, the way a terminal would show it.
|
|
87
|
+
*/
|
|
88
|
+
function toRows(src: string, styled: boolean): AnsiSegment[][] {
|
|
89
|
+
if (src === "") return [];
|
|
90
|
+
// CRLF becomes one newline; a lone CR is dropped rather than rewinding
|
|
91
|
+
// the line, so a progress bar collapses instead of exploding into rows.
|
|
92
|
+
const normalized = src.replace(/\r\n/g, "\n").replace(/\r/g, "");
|
|
93
|
+
const lines: AnsiSegment[][] = [[]];
|
|
94
|
+
for (const segment of parseAnsi(normalized)) {
|
|
95
|
+
const parts = segment.text.split("\n");
|
|
96
|
+
for (let i = 0; i < parts.length; i++) {
|
|
97
|
+
if (i > 0) lines.push([]);
|
|
98
|
+
if (parts[i] === "") continue;
|
|
99
|
+
lines[lines.length - 1].push({
|
|
100
|
+
text: parts[i],
|
|
101
|
+
bold: styled && segment.bold,
|
|
102
|
+
fg: styled ? segment.fg : null,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return lines;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function colour(fg: string | null): string | undefined {
|
|
110
|
+
if (fg === null) return undefined;
|
|
111
|
+
return `var(${fg}, ${FALLBACK[fg] ?? "inherit"})`;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Command durations live in the sub-second range often enough that a
|
|
116
|
+
* stopwatch reading of "0s" would be the wrong answer most of the time.
|
|
117
|
+
*/
|
|
118
|
+
function formatDuration(ms: number | undefined): string | null {
|
|
119
|
+
if (ms === undefined || !Number.isFinite(ms) || ms < 0) return null;
|
|
120
|
+
if (ms < 1000) return `${Math.round(ms)}ms`;
|
|
121
|
+
if (ms < 60_000) {
|
|
122
|
+
// Rounded to a tenth first: a value that rounds up to a full 60.0s has
|
|
123
|
+
// to fall through to the minute form rather than print a second count
|
|
124
|
+
// that does not exist.
|
|
125
|
+
const deciseconds = Math.round(ms / 100);
|
|
126
|
+
if (deciseconds < 600) return `${(deciseconds / 10).toFixed(1)}s`;
|
|
127
|
+
}
|
|
128
|
+
// Rounding to whole seconds before splitting means the carry happens on its
|
|
129
|
+
// own: rounding each unit separately is what produced "1m 60s".
|
|
130
|
+
const totalSeconds = Math.round(ms / 1000);
|
|
131
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
132
|
+
const seconds = totalSeconds % 60;
|
|
133
|
+
return `${minutes}m ${seconds < 10 ? "0" : ""}${seconds}s`;
|
|
134
|
+
}
|
|
135
|
+
</script>
|
|
136
|
+
|
|
137
|
+
<div
|
|
138
|
+
bind:this={ref}
|
|
139
|
+
class={cn("ft-terminal overflow-hidden rounded-lg font-mono text-sm", className)}
|
|
140
|
+
>
|
|
141
|
+
{#if header}
|
|
142
|
+
<div class="ft-rule flex items-center gap-2 border-b px-4 py-2">{@render header()}</div>
|
|
143
|
+
{/if}
|
|
144
|
+
|
|
145
|
+
<div
|
|
146
|
+
role="log"
|
|
147
|
+
class="overflow-y-auto px-4 py-3 leading-relaxed"
|
|
148
|
+
style:max-height={maxHeight}
|
|
149
|
+
use:autoscroll={{ enabled: running, pinOnConnect: true }}
|
|
150
|
+
>
|
|
151
|
+
{#if command}
|
|
152
|
+
<div class="ft-line flex gap-2">
|
|
153
|
+
<span class="ft-prompt shrink-0 select-none" aria-hidden="true">{prompt}</span>
|
|
154
|
+
<span class="ft-wrap">{command}</span>
|
|
155
|
+
</div>
|
|
156
|
+
{/if}
|
|
157
|
+
{#each rows as segments, row (row)}
|
|
158
|
+
<div class="ft-line ft-wrap">
|
|
159
|
+
{#each segments as segment, i (i)}<span
|
|
160
|
+
class:ft-bold={segment.bold}
|
|
161
|
+
style:color={colour(segment.fg)}>{segment.text}</span
|
|
162
|
+
>{/each}{#if running && row === rows.length - 1}<span class="ft-cursor" aria-hidden="true"
|
|
163
|
+
>▊</span
|
|
164
|
+
>{/if}
|
|
165
|
+
</div>
|
|
166
|
+
{/each}
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
{#if finished}
|
|
170
|
+
<div
|
|
171
|
+
role="status"
|
|
172
|
+
class="ft-rule ft-status flex items-center gap-2 border-t px-4 py-2 text-xs"
|
|
173
|
+
class:ft-ok={ok}
|
|
174
|
+
>
|
|
175
|
+
<span aria-hidden="true">{ok ? "✓" : "✗"}</span>
|
|
176
|
+
<span>exited {exitCode}</span>
|
|
177
|
+
{#if duration}
|
|
178
|
+
<span class="ft-muted ml-auto tabular-nums">{duration}</span>
|
|
179
|
+
{/if}
|
|
180
|
+
</div>
|
|
181
|
+
{/if}
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
<style>
|
|
185
|
+
/*
|
|
186
|
+
* A terminal is dark in a light page too, so the surface is its own colour
|
|
187
|
+
* rather than the theme's. Everything inside inherits from it — including
|
|
188
|
+
* `color-scheme`, which is declared dark for exactly that reason: the shared
|
|
189
|
+
* `--ft-status-*` fallbacks are `light-dark()` pairs, and on this surface the
|
|
190
|
+
* dark half is the legible one whatever the page around it is doing.
|
|
191
|
+
*/
|
|
192
|
+
.ft-terminal {
|
|
193
|
+
color-scheme: dark;
|
|
194
|
+
background-color: var(--ft-terminal-bg, oklch(0.18 0.02 260));
|
|
195
|
+
color: var(--ft-terminal-fg, oklch(0.92 0.01 260));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.ft-rule {
|
|
199
|
+
border-color: color-mix(in oklab, currentColor 16%, transparent);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.ft-prompt {
|
|
203
|
+
color: var(--ft-terminal-green, oklch(0.78 0.17 150));
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* Output is preformatted, but a long line wraps rather than scrolling sideways. */
|
|
207
|
+
.ft-wrap {
|
|
208
|
+
white-space: pre-wrap;
|
|
209
|
+
overflow-wrap: anywhere;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* Keeps a blank line the height of a written one. Matches leading-relaxed. */
|
|
213
|
+
.ft-line {
|
|
214
|
+
min-height: 1.625em;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.ft-bold {
|
|
218
|
+
font-weight: 700;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.ft-cursor {
|
|
222
|
+
display: inline-block;
|
|
223
|
+
opacity: 0.85;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/*
|
|
227
|
+
* The exit verdict is a status, not terminal output: it reads off the
|
|
228
|
+
* `--ft-status-*` vocabulary this component family shares rather than the ANSI
|
|
229
|
+
* palette above, so a run that failed here looks like a failure everywhere else.
|
|
230
|
+
*/
|
|
231
|
+
.ft-status {
|
|
232
|
+
color: var(--ft-status-error, light-dark(oklch(0.5 0.19 25), oklch(0.7 0.18 25)));
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.ft-status.ft-ok {
|
|
236
|
+
color: var(--ft-status-done, light-dark(oklch(0.5 0.14 145), oklch(0.72 0.15 145)));
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.ft-muted {
|
|
240
|
+
color: var(--ft-terminal-fg, oklch(0.92 0.01 260));
|
|
241
|
+
opacity: 0.55;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/*
|
|
245
|
+
* The cursor is a steady block first and a blinking one second: reduced
|
|
246
|
+
* motion still gets the "this is still running" signal, without the blink.
|
|
247
|
+
*/
|
|
248
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
249
|
+
.ft-cursor {
|
|
250
|
+
animation: ft-terminal-cursor 1.1s step-end infinite;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@keyframes ft-terminal-cursor {
|
|
254
|
+
0%,
|
|
255
|
+
100% {
|
|
256
|
+
opacity: 0.85;
|
|
257
|
+
}
|
|
258
|
+
50% {
|
|
259
|
+
opacity: 0;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
</style>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
/**
|
|
3
|
+
* Props for TerminalBlock
|
|
4
|
+
*/
|
|
5
|
+
export interface TerminalBlockProps {
|
|
6
|
+
/** Everything the command has printed so far, not the latest chunk. Reassign as lines arrive. */
|
|
7
|
+
output: string;
|
|
8
|
+
/** The command that produced the output, shown on the first line after the prompt glyph. */
|
|
9
|
+
command?: string;
|
|
10
|
+
/** Prompt glyph in front of the command. */
|
|
11
|
+
prompt?: string;
|
|
12
|
+
/** Whether the command is still running. Shows the cursor and keeps the view pinned. */
|
|
13
|
+
running?: boolean;
|
|
14
|
+
/** Exit status. Anything other than null or undefined ends the run and shows the footer. */
|
|
15
|
+
exitCode?: number | null;
|
|
16
|
+
/** How long the run took, shown next to the exit status. */
|
|
17
|
+
durationMs?: number;
|
|
18
|
+
/** Read the SGR subset and colour the output. False renders the same text, unstyled. */
|
|
19
|
+
ansi?: boolean;
|
|
20
|
+
/** Height at which the output starts scrolling. */
|
|
21
|
+
maxHeight?: string;
|
|
22
|
+
/** Title bar above the output — window dots, a file name, a copy button. */
|
|
23
|
+
header?: Snippet;
|
|
24
|
+
/** Additional CSS classes */
|
|
25
|
+
class?: string;
|
|
26
|
+
/** The root element */
|
|
27
|
+
ref?: HTMLDivElement | null;
|
|
28
|
+
}
|
|
29
|
+
declare const TerminalBlock: import("svelte").Component<TerminalBlockProps, {}, "ref">;
|
|
30
|
+
type TerminalBlock = ReturnType<typeof TerminalBlock>;
|
|
31
|
+
export default TerminalBlock;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { render, cleanup } from "@testing-library/svelte";
|
|
2
|
+
import { createRawSnippet } from "svelte";
|
|
3
|
+
import { afterEach, describe, it, expect } from "vitest";
|
|
4
|
+
import TerminalBlock from "./TerminalBlock.svelte";
|
|
5
|
+
const ESC = "\u001b";
|
|
6
|
+
function root(container) {
|
|
7
|
+
return container.firstElementChild;
|
|
8
|
+
}
|
|
9
|
+
function log(container) {
|
|
10
|
+
return container.querySelector('[role="log"]');
|
|
11
|
+
}
|
|
12
|
+
/** The output rows, in order, excluding the command line. */
|
|
13
|
+
function rows(container) {
|
|
14
|
+
return Array.from(log(container).querySelectorAll(".ft-line")).filter((el) => !el.classList.contains("flex"));
|
|
15
|
+
}
|
|
16
|
+
function textOf(container) {
|
|
17
|
+
return rows(container).map((el) => el.textContent ?? "");
|
|
18
|
+
}
|
|
19
|
+
describe("TerminalBlock", () => {
|
|
20
|
+
afterEach(cleanup);
|
|
21
|
+
it("renders the command after the prompt glyph", () => {
|
|
22
|
+
const { container } = render(TerminalBlock, {
|
|
23
|
+
props: { output: "", command: "pnpm build", prompt: ">" },
|
|
24
|
+
});
|
|
25
|
+
const commandLine = log(container).querySelector(".flex");
|
|
26
|
+
expect(commandLine.textContent).toContain(">");
|
|
27
|
+
expect(commandLine.textContent).toContain("pnpm build");
|
|
28
|
+
expect(commandLine.querySelector(".ft-prompt")?.getAttribute("aria-hidden")).toBe("true");
|
|
29
|
+
});
|
|
30
|
+
it("renders no command line at all when no command is given", () => {
|
|
31
|
+
const { container } = render(TerminalBlock, { props: { output: "done" } });
|
|
32
|
+
expect(log(container).querySelector(".ft-prompt")).toBeNull();
|
|
33
|
+
});
|
|
34
|
+
it("renders one row per line of output", () => {
|
|
35
|
+
const { container } = render(TerminalBlock, {
|
|
36
|
+
props: { output: "added 214 packages\naudited 215 packages\nfound 0 vulnerabilities" },
|
|
37
|
+
});
|
|
38
|
+
expect(textOf(container)).toEqual([
|
|
39
|
+
"added 214 packages",
|
|
40
|
+
"audited 215 packages",
|
|
41
|
+
"found 0 vulnerabilities",
|
|
42
|
+
]);
|
|
43
|
+
});
|
|
44
|
+
it("appends rows as the output grows, keeping the ones already there", async () => {
|
|
45
|
+
const { container, rerender } = render(TerminalBlock, {
|
|
46
|
+
props: { output: "resolving…", running: true },
|
|
47
|
+
});
|
|
48
|
+
expect(textOf(container)).toEqual(["resolving…▊"]);
|
|
49
|
+
await rerender({ output: "resolving…\nfetching…\n", running: true });
|
|
50
|
+
// The trailing newline leaves an empty row for the cursor to sit on,
|
|
51
|
+
// exactly where a terminal would put it.
|
|
52
|
+
expect(textOf(container)).toEqual(["resolving…", "fetching…", "▊"]);
|
|
53
|
+
});
|
|
54
|
+
it("drops the trailing blank row once the run is over", async () => {
|
|
55
|
+
const { container, rerender } = render(TerminalBlock, {
|
|
56
|
+
props: { output: "building\n", running: true },
|
|
57
|
+
});
|
|
58
|
+
expect(textOf(container)).toHaveLength(2);
|
|
59
|
+
await rerender({ output: "building\n", running: false, exitCode: 0 });
|
|
60
|
+
expect(textOf(container)).toEqual(["building"]);
|
|
61
|
+
});
|
|
62
|
+
it("colours a segment through the CSS variable for its ANSI code", () => {
|
|
63
|
+
const { container } = render(TerminalBlock, {
|
|
64
|
+
props: { output: `${ESC}[32m✓ ok${ESC}[0m done` },
|
|
65
|
+
});
|
|
66
|
+
const spans = rows(container)[0].querySelectorAll("span");
|
|
67
|
+
expect(spans[0].getAttribute("style")).toContain("var(--ft-terminal-green");
|
|
68
|
+
expect(spans[0].textContent).toBe("✓ ok");
|
|
69
|
+
expect(spans[1].getAttribute("style")).toBeNull();
|
|
70
|
+
expect(spans[1].textContent).toBe(" done");
|
|
71
|
+
});
|
|
72
|
+
it("marks a bold segment without touching its colour", () => {
|
|
73
|
+
const { container } = render(TerminalBlock, {
|
|
74
|
+
props: { output: `${ESC}[1;31mERR!${ESC}[0m` },
|
|
75
|
+
});
|
|
76
|
+
const span = rows(container)[0].querySelector("span");
|
|
77
|
+
expect(span.classList.contains("ft-bold")).toBe(true);
|
|
78
|
+
expect(span.getAttribute("style")).toContain("var(--ft-terminal-red");
|
|
79
|
+
});
|
|
80
|
+
it("joins the segments of a line with no whitespace of its own", () => {
|
|
81
|
+
const { container } = render(TerminalBlock, {
|
|
82
|
+
props: { output: `${ESC}[32mA${ESC}[0mB${ESC}[33mC` },
|
|
83
|
+
});
|
|
84
|
+
expect(rows(container)[0].textContent).toBe("ABC");
|
|
85
|
+
});
|
|
86
|
+
it("keeps a colour open across the lines it spans", () => {
|
|
87
|
+
const { container } = render(TerminalBlock, {
|
|
88
|
+
props: { output: `${ESC}[33mfirst\nsecond${ESC}[0m` },
|
|
89
|
+
});
|
|
90
|
+
const [one, two] = rows(container);
|
|
91
|
+
expect(one.querySelector("span").getAttribute("style")).toContain("--ft-terminal-yellow");
|
|
92
|
+
expect(two.querySelector("span").getAttribute("style")).toContain("--ft-terminal-yellow");
|
|
93
|
+
});
|
|
94
|
+
it("still strips escapes when ansi is false, but paints nothing", () => {
|
|
95
|
+
const { container } = render(TerminalBlock, {
|
|
96
|
+
props: { output: `${ESC}[1;32mpassed${ESC}[0m`, ansi: false },
|
|
97
|
+
});
|
|
98
|
+
const span = rows(container)[0].querySelector("span");
|
|
99
|
+
expect(span.textContent).toBe("passed");
|
|
100
|
+
expect(span.getAttribute("style")).toBeNull();
|
|
101
|
+
expect(span.classList.contains("ft-bold")).toBe(false);
|
|
102
|
+
});
|
|
103
|
+
it("shows the block cursor on the last row only while running", async () => {
|
|
104
|
+
const { container, rerender } = render(TerminalBlock, {
|
|
105
|
+
props: { output: "step one\nstep two", running: true },
|
|
106
|
+
});
|
|
107
|
+
expect(container.querySelectorAll(".ft-cursor")).toHaveLength(1);
|
|
108
|
+
expect(rows(container)[1].textContent).toBe("step two▊");
|
|
109
|
+
await rerender({ output: "step one\nstep two", running: false });
|
|
110
|
+
expect(container.querySelector(".ft-cursor")).toBeNull();
|
|
111
|
+
});
|
|
112
|
+
it("gives an empty running stream a row for the cursor to sit on", () => {
|
|
113
|
+
const { container } = render(TerminalBlock, {
|
|
114
|
+
props: { output: "", command: "pnpm test", running: true },
|
|
115
|
+
});
|
|
116
|
+
expect(container.querySelectorAll(".ft-cursor")).toHaveLength(1);
|
|
117
|
+
});
|
|
118
|
+
it("shows no footer until an exit code arrives", async () => {
|
|
119
|
+
const { container, rerender } = render(TerminalBlock, {
|
|
120
|
+
props: { output: "working", running: true },
|
|
121
|
+
});
|
|
122
|
+
expect(container.querySelector('[role="status"]')).toBeNull();
|
|
123
|
+
await rerender({ output: "working", running: false, exitCode: 0, durationMs: 1240 });
|
|
124
|
+
const footer = container.querySelector('[role="status"]');
|
|
125
|
+
expect(footer.textContent).toContain("✓");
|
|
126
|
+
expect(footer.textContent).toContain("exited 0");
|
|
127
|
+
expect(footer.textContent).toContain("1.2s");
|
|
128
|
+
expect(footer.classList.contains("ft-ok")).toBe(true);
|
|
129
|
+
});
|
|
130
|
+
it("marks a non-zero exit as a failure", () => {
|
|
131
|
+
const { container } = render(TerminalBlock, {
|
|
132
|
+
props: { output: "boom", exitCode: 1, durationMs: 340 },
|
|
133
|
+
});
|
|
134
|
+
const footer = container.querySelector('[role="status"]');
|
|
135
|
+
expect(footer.textContent).toContain("✗");
|
|
136
|
+
expect(footer.textContent).toContain("exited 1");
|
|
137
|
+
expect(footer.textContent).toContain("340ms");
|
|
138
|
+
expect(footer.classList.contains("ft-ok")).toBe(false);
|
|
139
|
+
});
|
|
140
|
+
it("leaves the duration out when it is absent or nonsense", () => {
|
|
141
|
+
const { container } = render(TerminalBlock, {
|
|
142
|
+
props: { output: "x", exitCode: 0, durationMs: Number.NaN },
|
|
143
|
+
});
|
|
144
|
+
expect(container.querySelector(".ft-muted")).toBeNull();
|
|
145
|
+
});
|
|
146
|
+
it("scrolls the output region at the height it was given, as a log", () => {
|
|
147
|
+
const { container } = render(TerminalBlock, {
|
|
148
|
+
props: { output: "a", maxHeight: "8rem" },
|
|
149
|
+
});
|
|
150
|
+
expect(log(container).style.maxHeight).toBe("8rem");
|
|
151
|
+
expect(log(container).className).toContain("overflow-y-auto");
|
|
152
|
+
});
|
|
153
|
+
it("renders the header snippet above the output", () => {
|
|
154
|
+
const { container } = render(TerminalBlock, {
|
|
155
|
+
props: {
|
|
156
|
+
output: "a",
|
|
157
|
+
header: createRawSnippet(() => ({ render: () => "<span>build.log</span>" })),
|
|
158
|
+
},
|
|
159
|
+
});
|
|
160
|
+
expect(root(container).textContent).toContain("build.log");
|
|
161
|
+
expect(container.querySelector(".ft-rule")).not.toBeNull();
|
|
162
|
+
});
|
|
163
|
+
it("merges custom classes onto the root alongside the base ones", () => {
|
|
164
|
+
const { container } = render(TerminalBlock, {
|
|
165
|
+
props: { output: "a", class: "my-block" },
|
|
166
|
+
});
|
|
167
|
+
expect(root(container).className).toContain("my-block");
|
|
168
|
+
expect(root(container).className).toContain("font-mono");
|
|
169
|
+
});
|
|
170
|
+
it.each([
|
|
171
|
+
[59_999, "1m 00s"],
|
|
172
|
+
[119_999, "2m 00s"],
|
|
173
|
+
[3_599_999, "60m 00s"],
|
|
174
|
+
])("carries a rounded %ims into the next minute", (durationMs, expected) => {
|
|
175
|
+
// Rounding each unit on its own produced counts that do not exist: "60.0s",
|
|
176
|
+
// "1m 60s", "59m 60s".
|
|
177
|
+
const { container } = render(TerminalBlock, {
|
|
178
|
+
props: { output: "x", exitCode: 0, durationMs },
|
|
179
|
+
});
|
|
180
|
+
expect(container.querySelector(".ft-muted")?.textContent).toContain(expected);
|
|
181
|
+
});
|
|
182
|
+
it("pins an already-running transcript that mounts overflowing", () => {
|
|
183
|
+
// jsdom lays nothing out, so the container has to be told it overflows.
|
|
184
|
+
const original = Object.getOwnPropertyDescriptor(Element.prototype, "scrollHeight");
|
|
185
|
+
Object.defineProperty(Element.prototype, "scrollHeight", { configurable: true, value: 1000 });
|
|
186
|
+
try {
|
|
187
|
+
const { container } = render(TerminalBlock, {
|
|
188
|
+
props: { output: "line\n".repeat(50), running: true },
|
|
189
|
+
});
|
|
190
|
+
expect(log(container).scrollTop).toBe(1000);
|
|
191
|
+
}
|
|
192
|
+
finally {
|
|
193
|
+
if (original)
|
|
194
|
+
Object.defineProperty(Element.prototype, "scrollHeight", original);
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A deliberately small ANSI reader for terminal output surfaces.
|
|
3
|
+
*
|
|
4
|
+
* It produces an array of styled segments, never a string of HTML: the renderer
|
|
5
|
+
* walks the segments with plain Svelte markup, so escape sequences can only ever
|
|
6
|
+
* become styling or nothing at all — never markup.
|
|
7
|
+
*
|
|
8
|
+
* Supported: SGR reset (`0`), bold (`1`), and the eight foreground colours in
|
|
9
|
+
* both their normal (`30`–`37`) and bright (`90`–`97`) ranges, alone or
|
|
10
|
+
* compounded (`ESC[1;32m`). Everything else — cursor moves, erase sequences,
|
|
11
|
+
* OSC titles, background colours, 256/truecolour, unknown SGR parameters — is
|
|
12
|
+
* stripped without leaving a trace in the text.
|
|
13
|
+
*
|
|
14
|
+
* Every entry point is total: it returns a value for any input, including a
|
|
15
|
+
* half-written escape sequence at the end of a stream.
|
|
16
|
+
*/
|
|
17
|
+
/** A run of text sharing one set of attributes. */
|
|
18
|
+
export interface AnsiSegment {
|
|
19
|
+
/** The text itself, with every escape sequence already removed. */
|
|
20
|
+
text: string;
|
|
21
|
+
/** Whether SGR bold is in effect for this run. */
|
|
22
|
+
bold: boolean;
|
|
23
|
+
/** Name of the CSS custom property holding the colour, or null for the default. */
|
|
24
|
+
fg: string | null;
|
|
25
|
+
}
|
|
26
|
+
/** The eight colour names the SGR foreground codes map onto. */
|
|
27
|
+
export declare const ANSI_COLORS: readonly ["black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"];
|
|
28
|
+
export type AnsiColor = (typeof ANSI_COLORS)[number];
|
|
29
|
+
/** Split a chunk of terminal output into styled runs. Never throws. */
|
|
30
|
+
export declare function parseAnsi(src: string): AnsiSegment[];
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A deliberately small ANSI reader for terminal output surfaces.
|
|
3
|
+
*
|
|
4
|
+
* It produces an array of styled segments, never a string of HTML: the renderer
|
|
5
|
+
* walks the segments with plain Svelte markup, so escape sequences can only ever
|
|
6
|
+
* become styling or nothing at all — never markup.
|
|
7
|
+
*
|
|
8
|
+
* Supported: SGR reset (`0`), bold (`1`), and the eight foreground colours in
|
|
9
|
+
* both their normal (`30`–`37`) and bright (`90`–`97`) ranges, alone or
|
|
10
|
+
* compounded (`ESC[1;32m`). Everything else — cursor moves, erase sequences,
|
|
11
|
+
* OSC titles, background colours, 256/truecolour, unknown SGR parameters — is
|
|
12
|
+
* stripped without leaving a trace in the text.
|
|
13
|
+
*
|
|
14
|
+
* Every entry point is total: it returns a value for any input, including a
|
|
15
|
+
* half-written escape sequence at the end of a stream.
|
|
16
|
+
*/
|
|
17
|
+
/** The eight colour names the SGR foreground codes map onto. */
|
|
18
|
+
export const ANSI_COLORS = [
|
|
19
|
+
"black",
|
|
20
|
+
"red",
|
|
21
|
+
"green",
|
|
22
|
+
"yellow",
|
|
23
|
+
"blue",
|
|
24
|
+
"magenta",
|
|
25
|
+
"cyan",
|
|
26
|
+
"white",
|
|
27
|
+
];
|
|
28
|
+
const ESC = "\u001b";
|
|
29
|
+
const BEL = "\u0007";
|
|
30
|
+
/** CSI parameter bytes, per ECMA-48: `0-9 : ; < = > ?`. */
|
|
31
|
+
const PARAM_MIN = 0x30;
|
|
32
|
+
const PARAM_MAX = 0x3f;
|
|
33
|
+
/** CSI/escape intermediate bytes: space through `/`. */
|
|
34
|
+
const INTERMEDIATE_MIN = 0x20;
|
|
35
|
+
const INTERMEDIATE_MAX = 0x2f;
|
|
36
|
+
/**
|
|
37
|
+
* Bright codes reuse the same eight variables rather than doubling the palette:
|
|
38
|
+
* on a dark surface the "normal" set is already the readable one.
|
|
39
|
+
*/
|
|
40
|
+
function fgVar(code) {
|
|
41
|
+
if (code >= 30 && code <= 37)
|
|
42
|
+
return `--ft-terminal-${ANSI_COLORS[code - 30]}`;
|
|
43
|
+
if (code >= 90 && code <= 97)
|
|
44
|
+
return `--ft-terminal-${ANSI_COLORS[code - 90]}`;
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
function applySgr(params, state) {
|
|
48
|
+
const parts = params.split(";");
|
|
49
|
+
for (let i = 0; i < parts.length; i++) {
|
|
50
|
+
const part = parts[i];
|
|
51
|
+
// An omitted parameter means 0, so `ESC[m` and `ESC[;32m` both behave.
|
|
52
|
+
const code = part === "" ? 0 : Number(part);
|
|
53
|
+
if (!Number.isInteger(code))
|
|
54
|
+
continue;
|
|
55
|
+
if (code === 0) {
|
|
56
|
+
state.bold = false;
|
|
57
|
+
state.fg = null;
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (code === 1) {
|
|
61
|
+
state.bold = true;
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
// An extended colour carries its value in the parameters that follow it —
|
|
65
|
+
// `38;5;n` or `38;2;r;g;b` — and those are data, not codes: the 31 in
|
|
66
|
+
// `38;5;31` is a palette index, not "red". Both forms are dropped either
|
|
67
|
+
// way; taking the whole run at once is what stops the payload being read
|
|
68
|
+
// back out as styling. A truncated run consumes only what is there, since
|
|
69
|
+
// the loop bound catches an index past the end.
|
|
70
|
+
if (code === 38 || code === 48) {
|
|
71
|
+
i += parts[i + 1] === "5" ? 2 : parts[i + 1] === "2" ? 4 : 1;
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
const colour = fgVar(code);
|
|
75
|
+
if (colour !== null)
|
|
76
|
+
state.fg = colour;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/** Split a chunk of terminal output into styled runs. Never throws. */
|
|
80
|
+
export function parseAnsi(src) {
|
|
81
|
+
if (typeof src !== "string" || src.length === 0)
|
|
82
|
+
return [];
|
|
83
|
+
// Most lines of output carry no styling at all.
|
|
84
|
+
if (!src.includes(ESC))
|
|
85
|
+
return [{ text: src, bold: false, fg: null }];
|
|
86
|
+
const out = [];
|
|
87
|
+
const state = { bold: false, fg: null };
|
|
88
|
+
let buf = "";
|
|
89
|
+
let i = 0;
|
|
90
|
+
function flush() {
|
|
91
|
+
if (buf === "")
|
|
92
|
+
return;
|
|
93
|
+
// A stripped sequence (a cursor move mid-line, say) splits the buffer
|
|
94
|
+
// without changing the attributes; those two runs are one run.
|
|
95
|
+
const last = out[out.length - 1];
|
|
96
|
+
if (last !== undefined && last.bold === state.bold && last.fg === state.fg) {
|
|
97
|
+
last.text += buf;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
out.push({ text: buf, bold: state.bold, fg: state.fg });
|
|
101
|
+
}
|
|
102
|
+
buf = "";
|
|
103
|
+
}
|
|
104
|
+
while (i < src.length) {
|
|
105
|
+
if (src[i] !== ESC) {
|
|
106
|
+
buf += src[i];
|
|
107
|
+
i += 1;
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
flush();
|
|
111
|
+
const next = src[i + 1];
|
|
112
|
+
if (next === "[") {
|
|
113
|
+
// CSI: parameter bytes, then intermediates, then exactly one final byte.
|
|
114
|
+
let j = i + 2;
|
|
115
|
+
while (j < src.length && src.charCodeAt(j) >= PARAM_MIN && src.charCodeAt(j) <= PARAM_MAX) {
|
|
116
|
+
j += 1;
|
|
117
|
+
}
|
|
118
|
+
const params = src.slice(i + 2, j);
|
|
119
|
+
while (j < src.length &&
|
|
120
|
+
src.charCodeAt(j) >= INTERMEDIATE_MIN &&
|
|
121
|
+
src.charCodeAt(j) <= INTERMEDIATE_MAX) {
|
|
122
|
+
j += 1;
|
|
123
|
+
}
|
|
124
|
+
// Truncated mid-sequence: the rest of the stream is escape, not text.
|
|
125
|
+
if (j >= src.length)
|
|
126
|
+
break;
|
|
127
|
+
if (src[j] === "m")
|
|
128
|
+
applySgr(params, state);
|
|
129
|
+
i = j + 1;
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
if (next === "]") {
|
|
133
|
+
// OSC: a string terminated by BEL or ST, or by the end of the stream.
|
|
134
|
+
let j = i + 2;
|
|
135
|
+
while (j < src.length) {
|
|
136
|
+
if (src[j] === BEL) {
|
|
137
|
+
j += 1;
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
if (src[j] === ESC && src[j + 1] === "\\") {
|
|
141
|
+
j += 2;
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
j += 1;
|
|
145
|
+
}
|
|
146
|
+
i = j;
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
// A lone ESC at the very end has nothing left to introduce.
|
|
150
|
+
if (next === undefined)
|
|
151
|
+
break;
|
|
152
|
+
// Two- and three-byte escapes: optional intermediates, then one final byte.
|
|
153
|
+
let j = i + 1;
|
|
154
|
+
while (j < src.length &&
|
|
155
|
+
src.charCodeAt(j) >= INTERMEDIATE_MIN &&
|
|
156
|
+
src.charCodeAt(j) <= INTERMEDIATE_MAX) {
|
|
157
|
+
j += 1;
|
|
158
|
+
}
|
|
159
|
+
i = j < src.length ? j + 1 : src.length;
|
|
160
|
+
}
|
|
161
|
+
flush();
|
|
162
|
+
return out;
|
|
163
|
+
}
|