@diegopluna/narvi 0.1.0 → 0.3.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 +102 -41
- package/dist/base.css +2 -2
- package/dist/color.d.ts +2 -2
- package/dist/color.js +1 -1
- package/dist/components/activity/ActivityContent.svelte +5 -17
- package/dist/components/activity/ActivityContent.svelte.d.ts +2 -2
- package/dist/components/activity/ActivityRoot.svelte +5 -5
- package/dist/components/activity/ActivityRoot.svelte.d.ts +5 -5
- package/dist/components/activity/ActivityStep.svelte +21 -21
- package/dist/components/activity/ActivityStep.svelte.d.ts +9 -9
- package/dist/components/activity/ActivityThought.svelte +7 -7
- package/dist/components/activity/ActivityThought.svelte.d.ts +3 -3
- package/dist/components/activity/ActivityTrigger.svelte +8 -8
- package/dist/components/activity/ActivityTrigger.svelte.d.ts +5 -5
- package/dist/components/announcer/Announcer.svelte +5 -18
- package/dist/components/announcer/Announcer.svelte.d.ts +3 -3
- package/dist/components/app-shell/AppShellBar.svelte +89 -0
- package/dist/components/app-shell/AppShellBar.svelte.d.ts +20 -0
- package/dist/components/app-shell/AppShellHeader.svelte +20 -19
- package/dist/components/app-shell/AppShellHeader.svelte.d.ts +5 -5
- package/dist/components/app-shell/AppShellMain.svelte +6 -22
- package/dist/components/app-shell/AppShellMain.svelte.d.ts +2 -2
- package/dist/components/app-shell/AppShellPanel.svelte +27 -25
- package/dist/components/app-shell/AppShellPanel.svelte.d.ts +6 -6
- package/dist/components/app-shell/AppShellPanes.svelte +58 -0
- package/dist/components/app-shell/AppShellPanes.svelte.d.ts +11 -0
- package/dist/components/app-shell/AppShellRail.svelte +85 -0
- package/dist/components/app-shell/AppShellRail.svelte.d.ts +11 -0
- package/dist/components/app-shell/AppShellRoot.svelte +58 -32
- package/dist/components/app-shell/AppShellRoot.svelte.d.ts +16 -14
- package/dist/components/app-shell/AppShellSheet.svelte +95 -0
- package/dist/components/app-shell/AppShellSheet.svelte.d.ts +17 -0
- package/dist/components/app-shell/AppShellSidebar.svelte +40 -64
- package/dist/components/app-shell/AppShellSidebar.svelte.d.ts +4 -8
- package/dist/components/app-shell/AppShellToggle.svelte +66 -26
- package/dist/components/app-shell/AppShellToggle.svelte.d.ts +5 -3
- package/dist/components/app-shell/context.d.ts +6 -0
- package/dist/components/app-shell/index.d.ts +9 -1
- package/dist/components/app-shell/index.js +5 -1
- package/dist/components/approval/Approval.svelte +101 -29
- package/dist/components/approval/Approval.svelte.d.ts +17 -10
- package/dist/components/avatar/AvatarFallback.svelte +4 -4
- package/dist/components/avatar/AvatarFallback.svelte.d.ts +2 -2
- package/dist/components/avatar/AvatarImage.svelte +3 -3
- package/dist/components/avatar/AvatarImage.svelte.d.ts +3 -3
- package/dist/components/avatar/AvatarRoot.svelte +7 -7
- package/dist/components/avatar/AvatarRoot.svelte.d.ts +5 -5
- package/dist/components/badge/Badge.svelte +26 -11
- package/dist/components/badge/Badge.svelte.d.ts +8 -5
- package/dist/components/button/Button.svelte +263 -53
- package/dist/components/button/Button.svelte.d.ts +53 -11
- package/dist/components/card/Card.svelte +21 -32
- package/dist/components/card/Card.svelte.d.ts +6 -6
- package/dist/components/change-stats/ChangeStats.svelte +5 -6
- package/dist/components/change-stats/ChangeStats.svelte.d.ts +4 -4
- package/dist/components/changes-summary/ChangesSummary.svelte +20 -21
- package/dist/components/changes-summary/ChangesSummary.svelte.d.ts +6 -6
- package/dist/components/checkbox/Checkbox.svelte +37 -23
- package/dist/components/checkbox/Checkbox.svelte.d.ts +14 -7
- package/dist/components/choice-cards/ChoiceCards.svelte +145 -0
- package/dist/components/choice-cards/ChoiceCards.svelte.d.ts +29 -0
- package/dist/components/code/Code.svelte +3 -4
- package/dist/components/code/Code.svelte.d.ts +2 -2
- package/dist/components/collapsible/CollapsibleContent.svelte +8 -8
- package/dist/components/collapsible/CollapsibleContent.svelte.d.ts +10 -5
- package/dist/components/collapsible/CollapsibleRoot.svelte +8 -5
- package/dist/components/collapsible/CollapsibleRoot.svelte.d.ts +10 -5
- package/dist/components/collapsible/CollapsibleTrigger.svelte +19 -10
- package/dist/components/collapsible/CollapsibleTrigger.svelte.d.ts +20 -7
- package/dist/components/command/CommandDialog.svelte +3 -3
- package/dist/components/command/CommandDialog.svelte.d.ts +3 -3
- package/dist/components/command/CommandEmpty.svelte +8 -5
- package/dist/components/command/CommandEmpty.svelte.d.ts +10 -5
- package/dist/components/command/CommandFooter.svelte +2 -2
- package/dist/components/command/CommandFooter.svelte.d.ts +2 -2
- package/dist/components/command/CommandGroup.svelte +9 -6
- package/dist/components/command/CommandGroup.svelte.d.ts +12 -6
- package/dist/components/command/CommandInput.svelte +4 -1
- package/dist/components/command/CommandInput.svelte.d.ts +7 -4
- package/dist/components/command/CommandItem.svelte +15 -12
- package/dist/components/command/CommandItem.svelte.d.ts +18 -8
- package/dist/components/command/CommandList.svelte +7 -4
- package/dist/components/command/CommandList.svelte.d.ts +9 -5
- package/dist/components/command/CommandRoot.svelte +8 -5
- package/dist/components/command/CommandRoot.svelte.d.ts +10 -5
- package/dist/components/command/index.d.ts +3 -2
- package/dist/components/command/index.js +3 -2
- package/dist/components/command/styles.d.ts +3 -2
- package/dist/components/command/styles.js +13 -10
- package/dist/components/composer/ComposerAttachButton.svelte +5 -5
- package/dist/components/composer/ComposerAttachButton.svelte.d.ts +4 -4
- package/dist/components/composer/ComposerAttachment.svelte +11 -14
- package/dist/components/composer/ComposerAttachment.svelte.d.ts +2 -2
- package/dist/components/composer/ComposerAttachments.svelte +3 -3
- package/dist/components/composer/ComposerAttachments.svelte.d.ts +3 -3
- package/dist/components/composer/ComposerModelPicker.svelte +27 -29
- package/dist/components/composer/ComposerModelPicker.svelte.d.ts +9 -9
- package/dist/components/composer/ComposerRoot.svelte +26 -32
- package/dist/components/composer/ComposerRoot.svelte.d.ts +15 -15
- package/dist/components/composer/ComposerSubmit.svelte +14 -20
- package/dist/components/composer/ComposerSubmit.svelte.d.ts +4 -4
- package/dist/components/composer/ComposerTextarea.svelte +4 -4
- package/dist/components/composer/ComposerTextarea.svelte.d.ts +3 -3
- package/dist/components/composer/ComposerToggle.svelte +13 -15
- package/dist/components/composer/ComposerToggle.svelte.d.ts +4 -4
- package/dist/components/composer/ComposerToolbar.svelte +2 -2
- package/dist/components/composer/ComposerToolbar.svelte.d.ts +2 -2
- package/dist/components/composer/ComposerTray.svelte +78 -0
- package/dist/components/composer/ComposerTray.svelte.d.ts +15 -0
- package/dist/components/composer/index.d.ts +3 -1
- package/dist/components/composer/index.js +3 -2
- package/dist/components/conversation/ConversationContent.svelte +7 -6
- package/dist/components/conversation/ConversationContent.svelte.d.ts +4 -4
- package/dist/components/conversation/ConversationEmpty.svelte +6 -6
- package/dist/components/conversation/ConversationEmpty.svelte.d.ts +5 -5
- package/dist/components/conversation/ConversationRoot.svelte +4 -4
- package/dist/components/conversation/ConversationRoot.svelte.d.ts +4 -4
- package/dist/components/conversation/ConversationScrollButton.svelte +7 -7
- package/dist/components/conversation/ConversationScrollButton.svelte.d.ts +4 -4
- package/dist/components/dialog/ConfirmDialog.svelte +47 -16
- package/dist/components/dialog/ConfirmDialog.svelte.d.ts +14 -9
- package/dist/components/dialog/DialogBody.svelte +12 -4
- package/dist/components/dialog/DialogBody.svelte.d.ts +5 -3
- package/dist/components/dialog/DialogContent.svelte +16 -11
- package/dist/components/dialog/DialogContent.svelte.d.ts +21 -9
- package/dist/components/dialog/DialogDescription.svelte +7 -4
- package/dist/components/dialog/DialogDescription.svelte.d.ts +9 -5
- package/dist/components/dialog/DialogFooter.svelte +2 -2
- package/dist/components/dialog/DialogFooter.svelte.d.ts +2 -2
- package/dist/components/dialog/DialogHeader.svelte +2 -2
- package/dist/components/dialog/DialogHeader.svelte.d.ts +2 -2
- package/dist/components/dialog/DialogTitle.svelte +7 -4
- package/dist/components/dialog/DialogTitle.svelte.d.ts +9 -5
- package/dist/components/dialog/index.d.ts +5 -4
- package/dist/components/dialog/index.js +4 -3
- package/dist/components/dialog/styles.d.ts +8 -3
- package/dist/components/dialog/styles.js +11 -7
- package/dist/components/divider/Divider.svelte +6 -6
- package/dist/components/divider/Divider.svelte.d.ts +3 -3
- package/dist/components/empty-state/EmptyState.svelte +14 -10
- package/dist/components/empty-state/EmptyState.svelte.d.ts +5 -4
- package/dist/components/field/Field.svelte +92 -31
- package/dist/components/field/Field.svelte.d.ts +24 -11
- package/dist/components/field/context.d.ts +6 -3
- package/dist/components/frame/Frame.svelte +12 -13
- package/dist/components/frame/Frame.svelte.d.ts +7 -7
- package/dist/components/grid/Grid.svelte +17 -6
- package/dist/components/grid/Grid.svelte.d.ts +6 -6
- package/dist/components/heading/Heading.svelte +31 -8
- package/dist/components/heading/Heading.svelte.d.ts +6 -4
- package/dist/components/hover-card/HoverCardContent.svelte +7 -4
- package/dist/components/hover-card/HoverCardContent.svelte.d.ts +9 -5
- package/dist/components/hover-card/HoverCardRoot.svelte +2 -1
- package/dist/components/hover-card/HoverCardRoot.svelte.d.ts +3 -2
- package/dist/components/hover-card/index.d.ts +2 -1
- package/dist/components/hover-card/index.js +2 -1
- package/dist/components/input/Input.svelte +63 -17
- package/dist/components/input/Input.svelte.d.ts +12 -5
- package/dist/components/kbd/Kbd.svelte +14 -9
- package/dist/components/kbd/Kbd.svelte.d.ts +2 -2
- package/dist/components/link/Link.svelte +12 -8
- package/dist/components/link/Link.svelte.d.ts +9 -6
- package/dist/components/list/ListItem.svelte +41 -0
- package/dist/components/list/ListItem.svelte.d.ts +10 -0
- package/dist/components/list/ListRoot.svelte +69 -0
- package/dist/components/list/ListRoot.svelte.d.ts +28 -0
- package/dist/components/list/context.d.ts +5 -0
- package/dist/components/list/context.js +8 -0
- package/dist/components/list/index.d.ts +5 -0
- package/dist/components/list/index.js +3 -0
- package/dist/components/markdown/Markdown.svelte +714 -0
- package/dist/components/markdown/Markdown.svelte.d.ts +80 -0
- package/dist/components/markdown/MarkdownBlock.svelte +231 -0
- package/dist/components/markdown/MarkdownBlock.svelte.d.ts +11 -0
- package/dist/components/markdown/MarkdownBlocks.svelte +115 -0
- package/dist/components/markdown/MarkdownBlocks.svelte.d.ts +15 -0
- package/dist/components/markdown/MarkdownCode.svelte +583 -0
- package/dist/components/markdown/MarkdownCode.svelte.d.ts +23 -0
- package/dist/components/markdown/MarkdownDiagram.svelte +310 -0
- package/dist/components/markdown/MarkdownDiagram.svelte.d.ts +6 -0
- package/dist/components/markdown/MarkdownFile.svelte +136 -0
- package/dist/components/markdown/MarkdownFile.svelte.d.ts +19 -0
- package/dist/components/markdown/MarkdownFootnotes.svelte +62 -0
- package/dist/components/markdown/MarkdownFootnotes.svelte.d.ts +8 -0
- package/dist/components/markdown/MarkdownFresh.svelte +69 -0
- package/dist/components/markdown/MarkdownFresh.svelte.d.ts +6 -0
- package/dist/components/markdown/MarkdownHtml.svelte +72 -0
- package/dist/components/markdown/MarkdownHtml.svelte.d.ts +7 -0
- package/dist/components/markdown/MarkdownImage.svelte +150 -0
- package/dist/components/markdown/MarkdownImage.svelte.d.ts +8 -0
- package/dist/components/markdown/MarkdownInlines.svelte +225 -0
- package/dist/components/markdown/MarkdownInlines.svelte.d.ts +7 -0
- package/dist/components/markdown/MarkdownLink.svelte +120 -0
- package/dist/components/markdown/MarkdownLink.svelte.d.ts +25 -0
- package/dist/components/markdown/MarkdownMath.svelte +138 -0
- package/dist/components/markdown/MarkdownMath.svelte.d.ts +7 -0
- package/dist/components/markdown/MarkdownTable.svelte +258 -0
- package/dist/components/markdown/MarkdownTable.svelte.d.ts +17 -0
- package/dist/components/markdown/caret.d.ts +14 -0
- package/dist/components/markdown/caret.js +67 -0
- package/dist/components/markdown/context.d.ts +93 -0
- package/dist/components/markdown/context.js +128 -0
- package/dist/components/markdown/copy.d.ts +13 -0
- package/dist/components/markdown/copy.js +74 -0
- package/dist/components/markdown/hidden.d.ts +12 -0
- package/dist/components/markdown/hidden.js +31 -0
- package/dist/components/markdown/kept.d.ts +32 -0
- package/dist/components/markdown/kept.js +71 -0
- package/dist/components/markdown/labels.d.ts +46 -0
- package/dist/components/markdown/labels.js +35 -0
- package/dist/components/markdown/save.d.ts +11 -0
- package/dist/components/markdown/save.js +58 -0
- package/dist/components/markdown/scrollable.d.ts +24 -0
- package/dist/components/markdown/scrollable.js +152 -0
- package/dist/components/markdown/static.d.ts +37 -0
- package/dist/components/markdown/static.js +233 -0
- package/dist/components/markdown/styles.d.ts +320 -0
- package/dist/components/markdown/styles.js +294 -0
- package/dist/components/menu/ContextMenuContent.svelte +8 -5
- package/dist/components/menu/ContextMenuContent.svelte.d.ts +10 -5
- package/dist/components/menu/ContextMenuTrigger.svelte +8 -5
- package/dist/components/menu/ContextMenuTrigger.svelte.d.ts +10 -5
- package/dist/components/menu/MenuCheckboxItem.svelte +8 -5
- package/dist/components/menu/MenuCheckboxItem.svelte.d.ts +11 -6
- package/dist/components/menu/MenuContent.svelte +7 -4
- package/dist/components/menu/MenuContent.svelte.d.ts +9 -5
- package/dist/components/menu/MenuItem.svelte +14 -11
- package/dist/components/menu/MenuItem.svelte.d.ts +18 -8
- package/dist/components/menu/MenuLabel.svelte +7 -4
- package/dist/components/menu/MenuLabel.svelte.d.ts +9 -5
- package/dist/components/menu/MenuRadioItem.svelte +26 -11
- package/dist/components/menu/MenuRadioItem.svelte.d.ts +20 -6
- package/dist/components/menu/MenuSeparator.svelte +6 -3
- package/dist/components/menu/MenuSeparator.svelte.d.ts +7 -4
- package/dist/components/menu/MenuSubContent.svelte +7 -4
- package/dist/components/menu/MenuSubContent.svelte.d.ts +9 -5
- package/dist/components/menu/MenuSubTrigger.svelte +9 -6
- package/dist/components/menu/MenuSubTrigger.svelte.d.ts +11 -6
- package/dist/components/menu/context-menu.d.ts +3 -1
- package/dist/components/menu/context-menu.js +2 -1
- package/dist/components/menu/index.d.ts +24 -0
- package/dist/components/menu/index.js +9 -6
- package/dist/components/message/MessageAction.svelte +26 -6
- package/dist/components/message/MessageAction.svelte.d.ts +13 -4
- package/dist/components/message/MessageActions.svelte +4 -4
- package/dist/components/message/MessageActions.svelte.d.ts +4 -4
- package/dist/components/message/MessageContent.svelte +5 -6
- package/dist/components/message/MessageContent.svelte.d.ts +3 -3
- package/dist/components/message/MessageCopy.svelte +74 -18
- package/dist/components/message/MessageCopy.svelte.d.ts +22 -6
- package/dist/components/message/MessageHeader.svelte +6 -6
- package/dist/components/message/MessageHeader.svelte.d.ts +3 -3
- package/dist/components/message/MessagePending.svelte +3 -3
- package/dist/components/message/MessagePending.svelte.d.ts +2 -2
- package/dist/components/message/MessageRoot.svelte +5 -5
- package/dist/components/message/MessageRoot.svelte.d.ts +5 -5
- package/dist/components/message/MessageTime.svelte +4 -4
- package/dist/components/message/MessageTime.svelte.d.ts +3 -3
- package/dist/components/notice/Notice.svelte +59 -19
- package/dist/components/notice/Notice.svelte.d.ts +13 -8
- package/dist/components/plan/Plan.svelte +28 -30
- package/dist/components/plan/Plan.svelte.d.ts +5 -5
- package/dist/components/popover/PopoverContent.svelte +7 -4
- package/dist/components/popover/PopoverContent.svelte.d.ts +9 -5
- package/dist/components/popover/index.d.ts +4 -3
- package/dist/components/popover/index.js +4 -3
- package/dist/components/progress/Progress.svelte +34 -36
- package/dist/components/progress/Progress.svelte.d.ts +3 -3
- package/dist/components/questionnaire/Questionnaire.svelte +36 -33
- package/dist/components/questionnaire/Questionnaire.svelte.d.ts +11 -11
- package/dist/components/queued-message/QueuedMessage.svelte +24 -17
- package/dist/components/queued-message/QueuedMessage.svelte.d.ts +10 -10
- package/dist/components/rail/RailItem.svelte +49 -53
- package/dist/components/rail/RailItem.svelte.d.ts +11 -9
- package/dist/components/rail/RailRoot.svelte +20 -6
- package/dist/components/rail/RailRoot.svelte.d.ts +3 -3
- package/dist/components/rail/RailSeparator.svelte +17 -0
- package/dist/components/rail/RailSeparator.svelte.d.ts +18 -0
- package/dist/components/rail/index.d.ts +2 -1
- package/dist/components/rail/index.js +2 -1
- package/dist/components/reasoning/ReasoningContent.svelte +6 -10
- package/dist/components/reasoning/ReasoningContent.svelte.d.ts +2 -2
- package/dist/components/reasoning/ReasoningRoot.svelte +6 -6
- package/dist/components/reasoning/ReasoningRoot.svelte.d.ts +6 -6
- package/dist/components/reasoning/ReasoningTrigger.svelte +5 -5
- package/dist/components/reasoning/ReasoningTrigger.svelte.d.ts +3 -3
- package/dist/components/resize-handle/ResizeHandle.svelte +12 -13
- package/dist/components/resize-handle/ResizeHandle.svelte.d.ts +10 -10
- package/dist/components/reveal/Reveal.svelte +16 -10
- package/dist/components/reveal/Reveal.svelte.d.ts +4 -4
- package/dist/components/reveal/revealed.js +13 -9
- package/dist/components/rolling-text/RollingText.svelte +3 -3
- package/dist/components/rolling-text/RollingText.svelte.d.ts +3 -3
- package/dist/components/search-button/SearchButton.svelte +92 -0
- package/dist/components/search-button/SearchButton.svelte.d.ts +13 -0
- package/dist/components/segmented/SegmentedControl.svelte +78 -32
- package/dist/components/segmented/SegmentedControl.svelte.d.ts +14 -5
- package/dist/components/select/Select.svelte +40 -15
- package/dist/components/select/Select.svelte.d.ts +21 -13
- package/dist/components/separator/Separator.svelte +4 -4
- package/dist/components/separator/Separator.svelte.d.ts +3 -3
- package/dist/components/settings-group/SettingsGroup.svelte +118 -0
- package/dist/components/settings-group/SettingsGroup.svelte.d.ts +19 -0
- package/dist/components/settings-group/context.d.ts +7 -0
- package/dist/components/settings-group/context.js +9 -0
- package/dist/components/settings-row/SettingsRow.svelte +185 -57
- package/dist/components/settings-row/SettingsRow.svelte.d.ts +39 -14
- package/dist/components/sheet/SheetContent.svelte +31 -11
- package/dist/components/sheet/SheetContent.svelte.d.ts +33 -9
- package/dist/components/sheet/index.d.ts +5 -4
- package/dist/components/sheet/index.js +4 -3
- package/dist/components/sheet/styles.d.ts +6 -0
- package/dist/components/sheet/styles.js +2 -0
- package/dist/components/shimmer/Shimmer.svelte +37 -24
- package/dist/components/shimmer/Shimmer.svelte.d.ts +3 -3
- package/dist/components/sidebar/SidebarContent.svelte +4 -4
- package/dist/components/sidebar/SidebarContent.svelte.d.ts +3 -3
- package/dist/components/sidebar/SidebarFolder.svelte +147 -0
- package/dist/components/sidebar/SidebarFolder.svelte.d.ts +19 -0
- package/dist/components/sidebar/SidebarFooter.svelte +3 -3
- package/dist/components/sidebar/SidebarFooter.svelte.d.ts +2 -2
- package/dist/components/sidebar/SidebarGroup.svelte +41 -37
- package/dist/components/sidebar/SidebarGroup.svelte.d.ts +8 -8
- package/dist/components/sidebar/SidebarHeader.svelte +15 -9
- package/dist/components/sidebar/SidebarHeader.svelte.d.ts +7 -4
- package/dist/components/sidebar/SidebarItem.svelte +64 -45
- package/dist/components/sidebar/SidebarItem.svelte.d.ts +15 -10
- package/dist/components/sidebar/SidebarRoot.svelte +62 -0
- package/dist/components/sidebar/SidebarRoot.svelte.d.ts +14 -0
- package/dist/components/sidebar/SidebarSwitcher.svelte +28 -0
- package/dist/components/sidebar/SidebarSwitcher.svelte.d.ts +11 -0
- package/dist/components/sidebar/depth.d.ts +8 -0
- package/dist/components/sidebar/depth.js +14 -0
- package/dist/components/sidebar/index.d.ts +7 -1
- package/dist/components/sidebar/index.js +4 -1
- package/dist/components/skeleton/Skeleton.svelte +31 -20
- package/dist/components/skeleton/Skeleton.svelte.d.ts +5 -5
- package/dist/components/slider/Slider.svelte +24 -23
- package/dist/components/slider/Slider.svelte.d.ts +13 -13
- package/dist/components/spinner/Spinner.svelte +8 -14
- package/dist/components/spinner/Spinner.svelte.d.ts +3 -3
- package/dist/components/stack/Stack.svelte +19 -8
- package/dist/components/stack/Stack.svelte.d.ts +8 -8
- package/dist/components/status-indicator/StatusIndicator.svelte +6 -5
- package/dist/components/status-indicator/StatusIndicator.svelte.d.ts +4 -4
- package/dist/components/suggestions/SuggestionsItem.svelte +8 -8
- package/dist/components/suggestions/SuggestionsItem.svelte.d.ts +3 -3
- package/dist/components/suggestions/SuggestionsRoot.svelte +5 -5
- package/dist/components/suggestions/SuggestionsRoot.svelte.d.ts +5 -5
- package/dist/components/switch/Switch.svelte +27 -21
- package/dist/components/switch/Switch.svelte.d.ts +8 -6
- package/dist/components/tab-strip/TabStrip.svelte +421 -0
- package/dist/components/tab-strip/TabStrip.svelte.d.ts +31 -0
- package/dist/components/tabs/Tabs.svelte +83 -33
- package/dist/components/tabs/Tabs.svelte.d.ts +15 -5
- package/dist/components/text/Text.svelte +63 -31
- package/dist/components/text/Text.svelte.d.ts +18 -12
- package/dist/components/textarea/Textarea.svelte +5 -5
- package/dist/components/textarea/Textarea.svelte.d.ts +5 -5
- package/dist/components/theme/Theme.svelte +4 -4
- package/dist/components/theme/Theme.svelte.d.ts +4 -4
- package/dist/components/toast/Toaster.svelte +39 -32
- package/dist/components/toast/Toaster.svelte.d.ts +2 -2
- package/dist/components/toast/toasts.svelte.d.ts +52 -15
- package/dist/components/toast/toasts.svelte.js +45 -20
- package/dist/components/toggle/Toggle.svelte +11 -8
- package/dist/components/toggle/Toggle.svelte.d.ts +15 -7
- package/dist/components/toggle-group/ToggleGroupItem.svelte +9 -6
- package/dist/components/toggle-group/ToggleGroupItem.svelte.d.ts +12 -6
- package/dist/components/toggle-group/ToggleGroupRoot.svelte +17 -14
- package/dist/components/toggle-group/ToggleGroupRoot.svelte.d.ts +13 -12
- package/dist/components/tool/ToolContent.svelte +5 -10
- package/dist/components/tool/ToolContent.svelte.d.ts +2 -2
- package/dist/components/tool/ToolInput.svelte +3 -3
- package/dist/components/tool/ToolInput.svelte.d.ts +3 -3
- package/dist/components/tool/ToolOutput.svelte +4 -4
- package/dist/components/tool/ToolOutput.svelte.d.ts +4 -4
- package/dist/components/tool/ToolRoot.svelte +7 -7
- package/dist/components/tool/ToolRoot.svelte.d.ts +7 -7
- package/dist/components/tool/ToolSection.svelte +8 -9
- package/dist/components/tool/ToolSection.svelte.d.ts +4 -4
- package/dist/components/tool/ToolTrigger.svelte +14 -13
- package/dist/components/tool/ToolTrigger.svelte.d.ts +4 -4
- package/dist/components/tooltip/TooltipContent.svelte +12 -9
- package/dist/components/tooltip/TooltipContent.svelte.d.ts +12 -6
- package/dist/components/tooltip/TooltipRoot.svelte +7 -4
- package/dist/components/tooltip/TooltipRoot.svelte.d.ts +8 -4
- package/dist/components/tooltip/TooltipTrigger.svelte +2 -1
- package/dist/components/tooltip/TooltipTrigger.svelte.d.ts +3 -2
- package/dist/components/tooltip/index.d.ts +2 -1
- package/dist/components/tooltip/index.js +2 -1
- package/dist/components/work-fold/WorkFold.svelte +9 -13
- package/dist/components/work-fold/WorkFold.svelte.d.ts +4 -4
- package/dist/index.d.ts +30 -12
- package/dist/index.js +24 -10
- package/dist/internal/Chevron.svelte +1 -1
- package/dist/internal/Chevron.svelte.d.ts +1 -1
- package/dist/internal/Code.svelte +9 -5
- package/dist/internal/Code.svelte.d.ts +3 -3
- package/dist/internal/Collapse.svelte +4 -4
- package/dist/internal/Collapse.svelte.d.ts +4 -4
- package/dist/internal/Glyph.svelte +19 -1
- package/dist/internal/Glyph.svelte.d.ts +9 -2
- package/dist/internal/Tile.svelte +22 -42
- package/dist/internal/Tile.svelte.d.ts +5 -5
- package/dist/internal/complete.d.ts +8 -0
- package/dist/internal/complete.js +1 -0
- package/dist/internal/control.d.ts +4 -4
- package/dist/internal/control.js +20 -17
- package/dist/internal/icon.d.ts +9 -0
- package/dist/internal/icon.js +1 -0
- package/dist/internal/icons.css +14 -0
- package/dist/internal/json.d.ts +1 -1
- package/dist/internal/layer.d.ts +6 -6
- package/dist/internal/layer.js +17 -14
- package/dist/internal/layout.d.ts +1 -1
- package/dist/internal/layout.js +6 -0
- package/dist/internal/loose.d.ts +22 -0
- package/dist/internal/loose.js +4 -0
- package/dist/internal/markers.stylex.d.ts +12 -0
- package/dist/internal/markers.stylex.js +6 -0
- package/dist/internal/plugin-order.d.ts +8 -0
- package/dist/internal/plugin-order.js +16 -0
- package/dist/internal/responsive.d.ts +1 -1
- package/dist/internal/roving.d.ts +1 -1
- package/dist/internal/roving.js +5 -2
- package/dist/internal/shared.d.ts +8 -1
- package/dist/internal/shared.js +21 -5
- package/dist/internal/sx.d.ts +5 -5
- package/dist/internal/toggle.d.ts +1 -2
- package/dist/internal/toggle.js +8 -12
- package/dist/internal/tooltip-trigger.d.ts +9 -0
- package/dist/internal/tooltip-trigger.js +19 -0
- package/dist/internal/visible.d.ts +32 -0
- package/dist/internal/visible.js +44 -0
- package/dist/markdown/ast.d.ts +209 -0
- package/dist/markdown/ast.js +10 -0
- package/dist/markdown/blocks.d.ts +178 -0
- package/dist/markdown/blocks.js +1489 -0
- package/dist/markdown/code-info.d.ts +10 -0
- package/dist/markdown/code-info.js +16 -0
- package/dist/markdown/common.d.ts +25 -0
- package/dist/markdown/common.js +107 -0
- package/dist/markdown/diagrams.d.ts +2 -0
- package/dist/markdown/diagrams.js +18 -0
- package/dist/markdown/file-paths.d.ts +29 -0
- package/dist/markdown/file-paths.js +80 -0
- package/dist/markdown/files.d.ts +16 -0
- package/dist/markdown/files.js +133 -0
- package/dist/markdown/highlight.d.ts +30 -0
- package/dist/markdown/highlight.js +127 -0
- package/dist/markdown/html.d.ts +14 -0
- package/dist/markdown/html.js +289 -0
- package/dist/markdown/images.d.ts +15 -0
- package/dist/markdown/images.js +45 -0
- package/dist/markdown/index.d.ts +12 -0
- package/dist/markdown/index.js +5 -0
- package/dist/markdown/inlines.d.ts +48 -0
- package/dist/markdown/inlines.js +1714 -0
- package/dist/markdown/math.d.ts +2 -0
- package/dist/markdown/math.js +22 -0
- package/dist/markdown/parse.d.ts +81 -0
- package/dist/markdown/parse.js +204 -0
- package/dist/markdown/plugin.d.ts +179 -0
- package/dist/markdown/plugin.js +160 -0
- package/dist/markdown/sanitize.d.ts +78 -0
- package/dist/markdown/sanitize.js +522 -0
- package/dist/markdown/share.d.ts +12 -0
- package/dist/markdown/share.js +59 -0
- package/dist/markdown/table.d.ts +13 -0
- package/dist/markdown/table.js +60 -0
- package/dist/markers.stylex.d.ts +13 -0
- package/dist/markers.stylex.js +11 -0
- package/dist/preset.d.ts +44 -20
- package/dist/preset.js +169 -51
- package/dist/tokens.stylex.d.ts +57 -37
- package/dist/tokens.stylex.js +113 -62
- package/dist/typography.d.ts +55 -0
- package/dist/typography.js +63 -0
- package/dist/visually-hidden.d.ts +18 -0
- package/dist/visually-hidden.js +21 -0
- package/dist/vite.d.ts +9 -3
- package/dist/vite.js +27 -2
- package/package.json +57 -6
- package/skills/building-ui/SKILL.md +385 -0
- package/skills/building-ui/references/components.md +211 -0
- package/skills/markdown/SKILL.md +452 -0
- package/skills/markdown/references/plugins.md +103 -0
- package/skills/setup/SKILL.md +199 -0
- package/skills/styling/SKILL.md +318 -0
- package/skills/theming/SKILL.md +277 -0
- package/dist/internal/loop.d.ts +0 -35
- package/dist/internal/loop.js +0 -72
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
export type ComposerAttachmentProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
12
12
|
file: File;
|
|
13
13
|
/** Accessible name of the remove button. Receives the file's name. */
|
|
14
|
-
removeLabel?: (name: string) => string;
|
|
15
|
-
sx?: Sx;
|
|
14
|
+
removeLabel?: ((name: string) => string) | undefined;
|
|
15
|
+
sx?: Sx | undefined;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
/** "840 B", "24 KB", "3.2 MB" */
|
|
@@ -35,9 +35,8 @@
|
|
|
35
35
|
padding: '0.375rem',
|
|
36
36
|
// Clear of the remove button on the corner
|
|
37
37
|
paddingInlineEnd: '1rem',
|
|
38
|
-
borderRadius: radius.
|
|
39
|
-
|
|
40
|
-
boxShadow: `inset 0 0 0 1px ${colors.line}`,
|
|
38
|
+
borderRadius: radius.card,
|
|
39
|
+
boxShadow: `inset 0 0 0 1px ${colors.border}`,
|
|
41
40
|
cursor: 'default',
|
|
42
41
|
opacity: { default: 1, '@starting-style': 0 },
|
|
43
42
|
scale: { default: null, [media.motion]: { default: 1, '@starting-style': 0.94 } },
|
|
@@ -52,9 +51,8 @@
|
|
|
52
51
|
width: '2rem',
|
|
53
52
|
height: '2rem',
|
|
54
53
|
overflow: 'hidden',
|
|
55
|
-
borderRadius: radius.
|
|
56
|
-
backgroundColor: colors.
|
|
57
|
-
boxShadow: `inset 0 0 0 1px ${colors.line}`,
|
|
54
|
+
borderRadius: radius.item,
|
|
55
|
+
backgroundColor: colors.fillSunken,
|
|
58
56
|
color: colors.textMuted
|
|
59
57
|
},
|
|
60
58
|
image: {
|
|
@@ -75,13 +73,12 @@
|
|
|
75
73
|
textOverflow: 'ellipsis',
|
|
76
74
|
whiteSpace: 'nowrap',
|
|
77
75
|
color: colors.text,
|
|
78
|
-
fontSize: font.
|
|
76
|
+
fontSize: font.sizeMeta,
|
|
79
77
|
fontWeight: font.weightMedium
|
|
80
78
|
},
|
|
81
79
|
meta: {
|
|
82
80
|
color: colors.textSubtle,
|
|
83
|
-
|
|
84
|
-
fontSize: '0.6875rem',
|
|
81
|
+
fontSize: font.sizeMicro,
|
|
85
82
|
fontVariantNumeric: 'tabular-nums'
|
|
86
83
|
},
|
|
87
84
|
// A small round button on the corner, out of the way of the name
|
|
@@ -96,9 +93,9 @@
|
|
|
96
93
|
margin: 0,
|
|
97
94
|
padding: 0,
|
|
98
95
|
borderWidth: 0,
|
|
99
|
-
borderRadius: radius.
|
|
96
|
+
borderRadius: radius.pill,
|
|
100
97
|
backgroundColor: colors.bgRaised,
|
|
101
|
-
boxShadow: `inset 0 0 0 1px ${colors.
|
|
98
|
+
boxShadow: `inset 0 0 0 1px ${colors.borderStrong}`,
|
|
102
99
|
color: {
|
|
103
100
|
default: colors.textMuted,
|
|
104
101
|
':hover': { default: null, [media.hover]: colors.text }
|
|
@@ -152,7 +149,7 @@
|
|
|
152
149
|
<span {...stylex.attrs(styles.text)}>
|
|
153
150
|
<span {...stylex.attrs(styles.name)} title={file.name}>{file.name}</span>
|
|
154
151
|
<span {...stylex.attrs(styles.meta)}>
|
|
155
|
-
{extension ? `${extension}
|
|
152
|
+
{extension ? `${extension} ` : ''}{formatSize(file.size)}
|
|
156
153
|
</span>
|
|
157
154
|
</span>
|
|
158
155
|
<button
|
|
@@ -3,8 +3,8 @@ import { type Sx } from '../../internal/sx.js';
|
|
|
3
3
|
export type ComposerAttachmentProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
4
4
|
file: File;
|
|
5
5
|
/** Accessible name of the remove button. Receives the file's name. */
|
|
6
|
-
removeLabel?: (name: string) => string;
|
|
7
|
-
sx?: Sx;
|
|
6
|
+
removeLabel?: ((name: string) => string) | undefined;
|
|
7
|
+
sx?: Sx | undefined;
|
|
8
8
|
};
|
|
9
9
|
/** "840 B", "24 KB", "3.2 MB" */
|
|
10
10
|
export declare function formatSize(bytes: number): string;
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
export type ComposerAttachmentsProps = Omit<HTMLAttributes<HTMLUListElement>, 'children'> & {
|
|
10
10
|
/** Accessible name of the list. */
|
|
11
|
-
label?: string;
|
|
12
|
-
sx?: Sx;
|
|
11
|
+
label?: string | undefined;
|
|
12
|
+
sx?: Sx | undefined;
|
|
13
13
|
/** Your own rendering of each file, in place of a Composer.Attachment. */
|
|
14
|
-
children?: Snippet<[File]
|
|
14
|
+
children?: Snippet<[File]> | undefined;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
const styles = stylex.create({
|
|
@@ -3,10 +3,10 @@ import type { HTMLAttributes } from 'svelte/elements';
|
|
|
3
3
|
import { type Sx } from '../../internal/sx.js';
|
|
4
4
|
export type ComposerAttachmentsProps = Omit<HTMLAttributes<HTMLUListElement>, 'children'> & {
|
|
5
5
|
/** Accessible name of the list. */
|
|
6
|
-
label?: string;
|
|
7
|
-
sx?: Sx;
|
|
6
|
+
label?: string | undefined;
|
|
7
|
+
sx?: Sx | undefined;
|
|
8
8
|
/** Your own rendering of each file, in place of a Composer.Attachment. */
|
|
9
|
-
children?: Snippet<[File]
|
|
9
|
+
children?: Snippet<[File]> | undefined;
|
|
10
10
|
};
|
|
11
11
|
declare const ComposerAttachments: import("svelte").Component<ComposerAttachmentsProps, {}, "">;
|
|
12
12
|
type ComposerAttachments = ReturnType<typeof ComposerAttachments>;
|
|
@@ -12,24 +12,24 @@
|
|
|
12
12
|
value: string;
|
|
13
13
|
label: string;
|
|
14
14
|
/** A line under the name, such as "Fastest for everyday tasks". */
|
|
15
|
-
description?: string;
|
|
15
|
+
description?: string | undefined;
|
|
16
16
|
/** Models with the same group are listed together under its name. */
|
|
17
|
-
group?: string;
|
|
17
|
+
group?: string | undefined;
|
|
18
18
|
/** A short tag beside the name, such as "New". */
|
|
19
|
-
badge?: string;
|
|
20
|
-
disabled?: boolean;
|
|
19
|
+
badge?: string | undefined;
|
|
20
|
+
disabled?: boolean | undefined;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export type ComposerModelPickerProps = Omit<HTMLButtonAttributes, 'children' | 'value'> & {
|
|
24
24
|
models: ComposerModel[];
|
|
25
25
|
/** The chosen model's value. Bindable. Defaults to the first model. */
|
|
26
|
-
value?: string;
|
|
26
|
+
value?: string | undefined;
|
|
27
27
|
/** What is being chosen. Names the list, and is read before the model on the button. */
|
|
28
|
-
label?: string;
|
|
28
|
+
label?: string | undefined;
|
|
29
29
|
/** Called when the person picks a model. */
|
|
30
|
-
onchange?: (value: string) => void;
|
|
31
|
-
sx?: Sx;
|
|
32
|
-
ref?: HTMLButtonElement | null;
|
|
30
|
+
onchange?: ((value: string) => void) | undefined;
|
|
31
|
+
sx?: Sx | undefined;
|
|
32
|
+
ref?: HTMLButtonElement | null | undefined;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
const GAP = 6;
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
paddingInlineStart: '0.625rem',
|
|
48
48
|
paddingInlineEnd: '0.375rem',
|
|
49
49
|
borderWidth: 0,
|
|
50
|
-
borderRadius: `calc(${radius.
|
|
50
|
+
borderRadius: `calc(${radius.card} * 4 / 3)`,
|
|
51
51
|
backgroundColor: {
|
|
52
52
|
default: 'transparent',
|
|
53
|
-
':hover': { default: null, [media.hover]: colors.
|
|
53
|
+
':hover': { default: null, [media.hover]: colors.fillHover }
|
|
54
54
|
},
|
|
55
55
|
color: {
|
|
56
56
|
default: colors.textMuted,
|
|
57
57
|
':hover': { default: null, [media.hover]: colors.text }
|
|
58
58
|
},
|
|
59
59
|
fontFamily: 'inherit',
|
|
60
|
-
fontSize: font.
|
|
60
|
+
fontSize: font.sizeMeta,
|
|
61
61
|
fontWeight: font.weightMedium,
|
|
62
62
|
lineHeight: 1,
|
|
63
63
|
whiteSpace: 'nowrap',
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
transitionTimingFunction: 'ease'
|
|
70
70
|
},
|
|
71
71
|
triggerOpen: {
|
|
72
|
-
backgroundColor: colors.
|
|
72
|
+
backgroundColor: colors.fillSelected,
|
|
73
73
|
color: colors.text
|
|
74
74
|
},
|
|
75
75
|
triggerText: {
|
|
@@ -94,9 +94,9 @@
|
|
|
94
94
|
overscrollBehavior: 'contain',
|
|
95
95
|
borderWidth: 0,
|
|
96
96
|
// Inner items are 8px round with 4px of padding: 12px outside
|
|
97
|
-
borderRadius: radius.
|
|
97
|
+
borderRadius: radius.card,
|
|
98
98
|
backgroundColor: colors.bgRaised,
|
|
99
|
-
boxShadow: `inset 0 0 0 1px ${colors.
|
|
99
|
+
boxShadow: `inset 0 0 0 1px ${colors.borderStrong}, 0 16px 40px -12px ${colors.shadow}`,
|
|
100
100
|
color: colors.text,
|
|
101
101
|
fontFamily: font.body,
|
|
102
102
|
scrollbarWidth: 'thin',
|
|
@@ -134,11 +134,9 @@
|
|
|
134
134
|
paddingBottom: '0.25rem',
|
|
135
135
|
paddingInline: '0.625rem',
|
|
136
136
|
color: colors.textSubtle,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
lineHeight: 1,
|
|
141
|
-
textTransform: 'uppercase'
|
|
137
|
+
fontSize: font.sizeCaption,
|
|
138
|
+
fontWeight: font.weightMedium,
|
|
139
|
+
lineHeight: 1
|
|
142
140
|
},
|
|
143
141
|
option: {
|
|
144
142
|
display: 'grid',
|
|
@@ -148,7 +146,7 @@
|
|
|
148
146
|
minHeight: '2.25rem',
|
|
149
147
|
paddingBlock: '0.4375rem',
|
|
150
148
|
paddingInline: '0.625rem',
|
|
151
|
-
borderRadius: radius.
|
|
149
|
+
borderRadius: radius.control,
|
|
152
150
|
cursor: 'pointer',
|
|
153
151
|
userSelect: 'none',
|
|
154
152
|
WebkitTapHighlightColor: 'transparent'
|
|
@@ -156,7 +154,7 @@
|
|
|
156
154
|
// The option the keyboard or pointer is on. No transition: it follows the
|
|
157
155
|
// arrow keys, which are pressed many times in a row.
|
|
158
156
|
active: {
|
|
159
|
-
backgroundColor: { default: colors.
|
|
157
|
+
backgroundColor: { default: colors.fillHover, [media.forcedColors]: 'Highlight' },
|
|
160
158
|
color: { default: null, [media.forcedColors]: 'HighlightText' },
|
|
161
159
|
forcedColorAdjust: 'none'
|
|
162
160
|
},
|
|
@@ -169,7 +167,7 @@
|
|
|
169
167
|
alignItems: 'center',
|
|
170
168
|
gap: '0.375rem',
|
|
171
169
|
minWidth: 0,
|
|
172
|
-
fontSize: font.
|
|
170
|
+
fontSize: font.sizeBody,
|
|
173
171
|
fontWeight: font.weightMedium,
|
|
174
172
|
lineHeight: font.leadingSnug
|
|
175
173
|
},
|
|
@@ -182,10 +180,10 @@
|
|
|
182
180
|
flexShrink: 0,
|
|
183
181
|
paddingBlock: '2px',
|
|
184
182
|
paddingInline: '0.375rem',
|
|
185
|
-
borderRadius: radius.
|
|
186
|
-
backgroundColor: colors.
|
|
187
|
-
color: colors.
|
|
188
|
-
fontSize:
|
|
183
|
+
borderRadius: radius.panel,
|
|
184
|
+
backgroundColor: colors.accentSoft,
|
|
185
|
+
color: colors.accent,
|
|
186
|
+
fontSize: font.sizeMicro,
|
|
189
187
|
fontWeight: font.weightMedium,
|
|
190
188
|
lineHeight: 1.3
|
|
191
189
|
},
|
|
@@ -193,14 +191,14 @@
|
|
|
193
191
|
gridColumn: '1',
|
|
194
192
|
marginTop: '2px',
|
|
195
193
|
color: colors.textMuted,
|
|
196
|
-
fontSize: font.
|
|
194
|
+
fontSize: font.sizeCaption,
|
|
197
195
|
lineHeight: font.leadingSnug
|
|
198
196
|
},
|
|
199
197
|
check: {
|
|
200
198
|
gridColumn: '2',
|
|
201
199
|
gridRow: '1',
|
|
202
200
|
display: 'grid',
|
|
203
|
-
color: colors.
|
|
201
|
+
color: colors.accent
|
|
204
202
|
}
|
|
205
203
|
});
|
|
206
204
|
|
|
@@ -4,23 +4,23 @@ export type ComposerModel = {
|
|
|
4
4
|
value: string;
|
|
5
5
|
label: string;
|
|
6
6
|
/** A line under the name, such as "Fastest for everyday tasks". */
|
|
7
|
-
description?: string;
|
|
7
|
+
description?: string | undefined;
|
|
8
8
|
/** Models with the same group are listed together under its name. */
|
|
9
|
-
group?: string;
|
|
9
|
+
group?: string | undefined;
|
|
10
10
|
/** A short tag beside the name, such as "New". */
|
|
11
|
-
badge?: string;
|
|
12
|
-
disabled?: boolean;
|
|
11
|
+
badge?: string | undefined;
|
|
12
|
+
disabled?: boolean | undefined;
|
|
13
13
|
};
|
|
14
14
|
export type ComposerModelPickerProps = Omit<HTMLButtonAttributes, 'children' | 'value'> & {
|
|
15
15
|
models: ComposerModel[];
|
|
16
16
|
/** The chosen model's value. Bindable. Defaults to the first model. */
|
|
17
|
-
value?: string;
|
|
17
|
+
value?: string | undefined;
|
|
18
18
|
/** What is being chosen. Names the list, and is read before the model on the button. */
|
|
19
|
-
label?: string;
|
|
19
|
+
label?: string | undefined;
|
|
20
20
|
/** Called when the person picks a model. */
|
|
21
|
-
onchange?: (value: string) => void;
|
|
22
|
-
sx?: Sx;
|
|
23
|
-
ref?: HTMLButtonElement | null;
|
|
21
|
+
onchange?: ((value: string) => void) | undefined;
|
|
22
|
+
sx?: Sx | undefined;
|
|
23
|
+
ref?: HTMLButtonElement | null | undefined;
|
|
24
24
|
};
|
|
25
25
|
declare const ComposerModelPicker: import("svelte").Component<ComposerModelPickerProps, {}, "value" | "ref">;
|
|
26
26
|
type ComposerModelPicker = ReturnType<typeof ComposerModelPicker>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
+
import { visuallyHidden } from '../../visually-hidden.js';
|
|
2
3
|
import * as stylex from '@stylexjs/stylex';
|
|
3
4
|
import type { Snippet } from 'svelte';
|
|
4
5
|
import type { HTMLFormAttributes } from 'svelte/elements';
|
|
@@ -16,38 +17,38 @@
|
|
|
16
17
|
|
|
17
18
|
export type ComposerRootProps = Omit<HTMLFormAttributes, 'children' | 'onsubmit'> & {
|
|
18
19
|
/** What the person has typed. Bindable. */
|
|
19
|
-
value?: string;
|
|
20
|
+
value?: string | undefined;
|
|
20
21
|
/** The files attached so far. Bindable. */
|
|
21
|
-
files?: File[];
|
|
22
|
-
status?: ComposerStatus;
|
|
23
|
-
disabled?: boolean;
|
|
22
|
+
files?: File[] | undefined;
|
|
23
|
+
status?: ComposerStatus | undefined;
|
|
24
|
+
disabled?: boolean | undefined;
|
|
24
25
|
/** File types to take, as in an input's `accept`, such as `image/*,.pdf`. */
|
|
25
|
-
accept?: string;
|
|
26
|
+
accept?: string | undefined;
|
|
26
27
|
/** The most files at once. */
|
|
27
|
-
maxFiles?: number;
|
|
28
|
+
maxFiles?: number | undefined;
|
|
28
29
|
/** The largest file, in bytes. */
|
|
29
|
-
maxSize?: number;
|
|
30
|
+
maxSize?: number | undefined;
|
|
30
31
|
/** What is shown over the composer while files are dragged onto it. */
|
|
31
|
-
dropLabel?: string;
|
|
32
|
+
dropLabel?: string | undefined;
|
|
32
33
|
/**
|
|
33
34
|
* Called with the trimmed text and the files when the person sends. The
|
|
34
35
|
* composer is cleared afterwards, unless this returns `false`.
|
|
35
36
|
*/
|
|
36
|
-
onsubmit?: (message: ComposerMessage, event: SubmitEvent) => unknown;
|
|
37
|
+
onsubmit?: ((message: ComposerMessage, event: SubmitEvent) => unknown) | undefined;
|
|
37
38
|
/** Called when the person stops a reply that is on its way. */
|
|
38
|
-
onstop?: () => void;
|
|
39
|
+
onstop?: (() => void) | undefined;
|
|
39
40
|
/**
|
|
40
41
|
* Called with the message when the person sends while a reply is under
|
|
41
42
|
* way. Without it, nothing can be sent until the reply ends. Show what is
|
|
42
43
|
* queued with a QueuedMessage; the composer is cleared unless this returns `false`.
|
|
43
44
|
*/
|
|
44
|
-
onqueue?: (message: ComposerMessage, event: SubmitEvent) => unknown;
|
|
45
|
+
onqueue?: ((message: ComposerMessage, event: SubmitEvent) => unknown) | undefined;
|
|
45
46
|
/** Called with the files that were turned away, and why. */
|
|
46
|
-
onreject?: (rejections: ComposerRejection[]) => void;
|
|
47
|
-
sx?: Sx;
|
|
48
|
-
ref?: HTMLFormElement | null;
|
|
47
|
+
onreject?: ((rejections: ComposerRejection[]) => void) | undefined;
|
|
48
|
+
sx?: Sx | undefined;
|
|
49
|
+
ref?: HTMLFormElement | null | undefined;
|
|
49
50
|
/** Composer.Attachments, a Composer.Textarea and a Composer.Toolbar. */
|
|
50
|
-
children?: Snippet;
|
|
51
|
+
children?: Snippet | undefined;
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
const styles = stylex.create({
|
|
@@ -62,14 +63,16 @@
|
|
|
62
63
|
padding: '0.5rem',
|
|
63
64
|
// The controls' radius plus this padding, so the corners sit concentric.
|
|
64
65
|
// Both follow the radius scale: 1rem and 1.5rem by default.
|
|
65
|
-
borderRadius: `calc(${radius.
|
|
66
|
+
borderRadius: `calc(${radius.card} * 4 / 3 + 0.5rem)`,
|
|
66
67
|
backgroundColor: colors.bgRaised,
|
|
67
68
|
color: colors.text,
|
|
68
69
|
fontFamily: font.body,
|
|
69
70
|
cursor: 'text',
|
|
71
|
+
// Focus in the text field is shown as on every text field: the ring and its halo.
|
|
72
|
+
// Not for the buttons inside, which show their own.
|
|
70
73
|
boxShadow: {
|
|
71
|
-
default: `inset 0 0 0 1px ${colors.
|
|
72
|
-
':focus-
|
|
74
|
+
default: `inset 0 0 0 1px ${colors.border}`,
|
|
75
|
+
':has(textarea:focus-visible)': `inset 0 0 0 1px ${colors.focusRing}, 0 0 0 3px ${colors.focusHalo}`
|
|
73
76
|
},
|
|
74
77
|
// In forced colours the shadow is gone; the outline is the edge, and thickens with focus
|
|
75
78
|
outlineWidth: {
|
|
@@ -93,10 +96,9 @@
|
|
|
93
96
|
placeItems: 'center',
|
|
94
97
|
borderRadius: 'inherit',
|
|
95
98
|
backgroundColor: `color-mix(in oklab, ${colors.bgRaised} 86%, transparent)`,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
fontSize: font.sizeMd,
|
|
99
|
+
boxShadow: `inset 0 0 0 1.5px ${colors.accent}`,
|
|
100
|
+
color: colors.accent,
|
|
101
|
+
fontSize: font.sizeBody,
|
|
100
102
|
fontWeight: font.weightMedium,
|
|
101
103
|
pointerEvents: 'none',
|
|
102
104
|
opacity: { default: 1, '@starting-style': 0 },
|
|
@@ -105,15 +107,7 @@
|
|
|
105
107
|
transitionDuration: motion.base,
|
|
106
108
|
transitionTimingFunction: motion.easeOut
|
|
107
109
|
},
|
|
108
|
-
input: { display: 'none' }
|
|
109
|
-
status: {
|
|
110
|
-
position: 'absolute',
|
|
111
|
-
width: '1px',
|
|
112
|
-
height: '1px',
|
|
113
|
-
overflow: 'hidden',
|
|
114
|
-
clipPath: 'inset(50%)',
|
|
115
|
-
whiteSpace: 'nowrap'
|
|
116
|
-
}
|
|
110
|
+
input: { display: 'none' }
|
|
117
111
|
});
|
|
118
112
|
</script>
|
|
119
113
|
|
|
@@ -308,7 +302,7 @@
|
|
|
308
302
|
}}
|
|
309
303
|
/>
|
|
310
304
|
|
|
311
|
-
<span role="status" {...stylex.attrs(
|
|
305
|
+
<span role="status" {...stylex.attrs(visuallyHidden)}>{announcement}</span>
|
|
312
306
|
|
|
313
307
|
{#if depth > 0}
|
|
314
308
|
<div aria-hidden="true" {...stylex.attrs(styles.drop)}>{dropLabel}</div>
|
|
@@ -4,38 +4,38 @@ import { type Sx } from '../../internal/sx.js';
|
|
|
4
4
|
import { type ComposerMessage, type ComposerRejection, type ComposerStatus } from './context.js';
|
|
5
5
|
export type ComposerRootProps = Omit<HTMLFormAttributes, 'children' | 'onsubmit'> & {
|
|
6
6
|
/** What the person has typed. Bindable. */
|
|
7
|
-
value?: string;
|
|
7
|
+
value?: string | undefined;
|
|
8
8
|
/** The files attached so far. Bindable. */
|
|
9
|
-
files?: File[];
|
|
10
|
-
status?: ComposerStatus;
|
|
11
|
-
disabled?: boolean;
|
|
9
|
+
files?: File[] | undefined;
|
|
10
|
+
status?: ComposerStatus | undefined;
|
|
11
|
+
disabled?: boolean | undefined;
|
|
12
12
|
/** File types to take, as in an input's `accept`, such as `image/*,.pdf`. */
|
|
13
|
-
accept?: string;
|
|
13
|
+
accept?: string | undefined;
|
|
14
14
|
/** The most files at once. */
|
|
15
|
-
maxFiles?: number;
|
|
15
|
+
maxFiles?: number | undefined;
|
|
16
16
|
/** The largest file, in bytes. */
|
|
17
|
-
maxSize?: number;
|
|
17
|
+
maxSize?: number | undefined;
|
|
18
18
|
/** What is shown over the composer while files are dragged onto it. */
|
|
19
|
-
dropLabel?: string;
|
|
19
|
+
dropLabel?: string | undefined;
|
|
20
20
|
/**
|
|
21
21
|
* Called with the trimmed text and the files when the person sends. The
|
|
22
22
|
* composer is cleared afterwards, unless this returns `false`.
|
|
23
23
|
*/
|
|
24
|
-
onsubmit?: (message: ComposerMessage, event: SubmitEvent) => unknown;
|
|
24
|
+
onsubmit?: ((message: ComposerMessage, event: SubmitEvent) => unknown) | undefined;
|
|
25
25
|
/** Called when the person stops a reply that is on its way. */
|
|
26
|
-
onstop?: () => void;
|
|
26
|
+
onstop?: (() => void) | undefined;
|
|
27
27
|
/**
|
|
28
28
|
* Called with the message when the person sends while a reply is under
|
|
29
29
|
* way. Without it, nothing can be sent until the reply ends. Show what is
|
|
30
30
|
* queued with a QueuedMessage; the composer is cleared unless this returns `false`.
|
|
31
31
|
*/
|
|
32
|
-
onqueue?: (message: ComposerMessage, event: SubmitEvent) => unknown;
|
|
32
|
+
onqueue?: ((message: ComposerMessage, event: SubmitEvent) => unknown) | undefined;
|
|
33
33
|
/** Called with the files that were turned away, and why. */
|
|
34
|
-
onreject?: (rejections: ComposerRejection[]) => void;
|
|
35
|
-
sx?: Sx;
|
|
36
|
-
ref?: HTMLFormElement | null;
|
|
34
|
+
onreject?: ((rejections: ComposerRejection[]) => void) | undefined;
|
|
35
|
+
sx?: Sx | undefined;
|
|
36
|
+
ref?: HTMLFormElement | null | undefined;
|
|
37
37
|
/** Composer.Attachments, a Composer.Textarea and a Composer.Toolbar. */
|
|
38
|
-
children?: Snippet;
|
|
38
|
+
children?: Snippet | undefined;
|
|
39
39
|
};
|
|
40
40
|
declare const ComposerRoot: import("svelte").Component<ComposerRootProps, {}, "value" | "ref" | "files">;
|
|
41
41
|
type ComposerRoot = ReturnType<typeof ComposerRoot>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import * as stylex from '@stylexjs/stylex';
|
|
3
3
|
import Glyph from '../../internal/Glyph.svelte';
|
|
4
|
-
import {
|
|
4
|
+
import { shared } from '../../internal/shared.js';
|
|
5
|
+
import { whileVisible } from '../../internal/visible.js';
|
|
5
6
|
import type { Sx } from '../../internal/sx.js';
|
|
6
7
|
import { colors, motion, radius } from '../../tokens.stylex.js';
|
|
7
8
|
import { media } from '../../media.stylex.js';
|
|
@@ -13,33 +14,25 @@
|
|
|
13
14
|
'children' | 'type' | 'variant' | 'iconOnly' | 'href' | 'ref' | 'sx'
|
|
14
15
|
> & {
|
|
15
16
|
/** Accessible name while it sends. */
|
|
16
|
-
sendLabel?: string;
|
|
17
|
+
sendLabel?: string | undefined;
|
|
17
18
|
/** Accessible name while a reply is on its way and pressing it stops the reply. */
|
|
18
|
-
stopLabel?: string;
|
|
19
|
-
sx?: Sx;
|
|
20
|
-
ref?: HTMLButtonElement | null;
|
|
19
|
+
stopLabel?: string | undefined;
|
|
20
|
+
sx?: Sx | undefined;
|
|
21
|
+
ref?: HTMLButtonElement | null | undefined;
|
|
21
22
|
};
|
|
22
23
|
|
|
23
|
-
// While the reply has not started, an arc circles the square, on the shared clock
|
|
24
|
-
const spin = loop(
|
|
25
|
-
(reduced) => (reduced ? 2400 : 900),
|
|
26
|
-
(element, { progress }) => (element.style.rotate = `${progress}turn`),
|
|
27
|
-
(element) => (element.style.rotate = '')
|
|
28
|
-
);
|
|
29
|
-
|
|
30
24
|
const styles = stylex.create({
|
|
31
25
|
button: {
|
|
32
26
|
marginInlineStart: 'auto',
|
|
33
27
|
// Round by default; squarer when the radius scale is sharp
|
|
34
|
-
borderRadius: `calc(${radius.
|
|
28
|
+
borderRadius: `calc(${radius.card} * 4 / 3)`
|
|
35
29
|
},
|
|
36
|
-
// Nothing to send yet: a quiet
|
|
37
|
-
// It turns to
|
|
30
|
+
// Nothing to send yet: a quiet flat fill, not a greyed-out button.
|
|
31
|
+
// It turns to the primary solid as soon as there is something to send.
|
|
38
32
|
idle: {
|
|
39
33
|
opacity: 1,
|
|
40
34
|
backgroundImage: 'none',
|
|
41
|
-
backgroundColor: colors.
|
|
42
|
-
boxShadow: `inset 0 0 0 1px ${colors.line}`,
|
|
35
|
+
backgroundColor: colors.fillMuted,
|
|
43
36
|
color: colors.textSubtle,
|
|
44
37
|
'::before': { display: 'none' }
|
|
45
38
|
},
|
|
@@ -104,19 +97,20 @@
|
|
|
104
97
|
<Glyph name="arrowUp" stroke={2} />
|
|
105
98
|
</span>
|
|
106
99
|
<span {...stylex.attrs(styles.icon, !busy && styles.gone)}>
|
|
107
|
-
<svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
|
|
100
|
+
<svg data-glyph="" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
|
|
108
101
|
<rect x="4.5" y="4.5" width="7" height="7" rx="1.75" fill="currentColor" />
|
|
109
102
|
</svg>
|
|
110
103
|
</span>
|
|
111
104
|
{#if composer.status === 'submitted'}
|
|
112
105
|
<svg
|
|
106
|
+
data-glyph=""
|
|
113
107
|
width="26"
|
|
114
108
|
height="26"
|
|
115
109
|
viewBox="0 0 26 26"
|
|
116
110
|
fill="none"
|
|
117
111
|
aria-hidden="true"
|
|
118
|
-
{...stylex.attrs(styles.ring)}
|
|
119
|
-
{@attach
|
|
112
|
+
{...stylex.attrs(styles.ring, shared.spin)}
|
|
113
|
+
{@attach whileVisible}
|
|
120
114
|
>
|
|
121
115
|
<path
|
|
122
116
|
d="M13 2.5A10.5 10.5 0 0 1 23.5 13"
|
|
@@ -2,11 +2,11 @@ import type { Sx } from '../../internal/sx.js';
|
|
|
2
2
|
import { type ButtonProps } from '../button/Button.svelte';
|
|
3
3
|
export type ComposerSubmitProps = Omit<ButtonProps, 'children' | 'type' | 'variant' | 'iconOnly' | 'href' | 'ref' | 'sx'> & {
|
|
4
4
|
/** Accessible name while it sends. */
|
|
5
|
-
sendLabel?: string;
|
|
5
|
+
sendLabel?: string | undefined;
|
|
6
6
|
/** Accessible name while a reply is on its way and pressing it stops the reply. */
|
|
7
|
-
stopLabel?: string;
|
|
8
|
-
sx?: Sx;
|
|
9
|
-
ref?: HTMLButtonElement | null;
|
|
7
|
+
stopLabel?: string | undefined;
|
|
8
|
+
sx?: Sx | undefined;
|
|
9
|
+
ref?: HTMLButtonElement | null | undefined;
|
|
10
10
|
};
|
|
11
11
|
declare const ComposerSubmit: import("svelte").Component<ComposerSubmitProps, {}, "ref">;
|
|
12
12
|
type ComposerSubmit = ReturnType<typeof ComposerSubmit>;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import { colors, font } from '../../tokens.stylex.js';
|
|
6
6
|
import { useComposer } from './context.js';
|
|
7
7
|
|
|
8
|
-
export type ComposerTextareaProps = Omit<HTMLTextareaAttributes, 'value'> & {
|
|
9
|
-
sx?: Sx;
|
|
10
|
-
ref?: HTMLTextAreaElement | null;
|
|
8
|
+
export type ComposerTextareaProps = Omit<HTMLTextareaAttributes, 'value' | 'children'> & {
|
|
9
|
+
sx?: Sx | undefined;
|
|
10
|
+
ref?: HTMLTextAreaElement | null | undefined;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
const styles = stylex.create({
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
color: colors.text,
|
|
27
27
|
fontFamily: 'inherit',
|
|
28
28
|
// The size messages are read at. At 16px, iOS also leaves the page unzoomed on focus.
|
|
29
|
-
fontSize: font.
|
|
29
|
+
fontSize: font.sizeReading,
|
|
30
30
|
lineHeight: font.leadingNormal,
|
|
31
31
|
fieldSizing: 'content',
|
|
32
32
|
resize: 'none',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { HTMLTextareaAttributes } from 'svelte/elements';
|
|
2
2
|
import { type Sx } from '../../internal/sx.js';
|
|
3
|
-
export type ComposerTextareaProps = Omit<HTMLTextareaAttributes, 'value'> & {
|
|
4
|
-
sx?: Sx;
|
|
5
|
-
ref?: HTMLTextAreaElement | null;
|
|
3
|
+
export type ComposerTextareaProps = Omit<HTMLTextareaAttributes, 'value' | 'children'> & {
|
|
4
|
+
sx?: Sx | undefined;
|
|
5
|
+
ref?: HTMLTextAreaElement | null | undefined;
|
|
6
6
|
};
|
|
7
7
|
declare const ComposerTextarea: import("svelte").Component<ComposerTextareaProps, {}, "ref">;
|
|
8
8
|
type ComposerTextarea = ReturnType<typeof ComposerTextarea>;
|