@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
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How Markdown reads. Sizes are in `em`, so a document takes the size of the text around it:
|
|
3
|
+
* a chat reply, a side panel or a page.
|
|
4
|
+
*/
|
|
5
|
+
import * as stylex from '@stylexjs/stylex';
|
|
6
|
+
export declare const prose: Readonly<{
|
|
7
|
+
readonly root: Readonly<{
|
|
8
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flow-root">;
|
|
9
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
10
|
+
readonly color: stylex.StyleXClassNameFor<"color", "inherit">;
|
|
11
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
12
|
+
readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "break-word">;
|
|
13
|
+
readonly textWrap: stylex.StyleXClassNameFor<"textWrap", "pretty">;
|
|
14
|
+
}>;
|
|
15
|
+
readonly streaming: Readonly<{
|
|
16
|
+
readonly textWrap: stylex.StyleXClassNameFor<"textWrap", "wrap">;
|
|
17
|
+
}>;
|
|
18
|
+
readonly enter: Readonly<{
|
|
19
|
+
readonly animationName: stylex.StyleXClassNameFor<"animationName", string | null>;
|
|
20
|
+
readonly animationDuration: stylex.StyleXClassNameFor<"animationDuration", string>;
|
|
21
|
+
readonly animationTimingFunction: stylex.StyleXClassNameFor<"animationTimingFunction", string>;
|
|
22
|
+
}>;
|
|
23
|
+
readonly block: Readonly<{
|
|
24
|
+
readonly marginBlock: stylex.StyleXClassNameFor<"marginBlock", 0>;
|
|
25
|
+
readonly marginBlockStart: stylex.StyleXClassNameFor<"marginBlockStart", 0 | "0.75em">;
|
|
26
|
+
}>;
|
|
27
|
+
readonly paragraph: Readonly<{}>;
|
|
28
|
+
readonly heading: Readonly<{
|
|
29
|
+
readonly marginBlockStart: stylex.StyleXClassNameFor<"marginBlockStart", 0 | "1.4em">;
|
|
30
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
31
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
|
|
32
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
33
|
+
readonly textWrap: stylex.StyleXClassNameFor<"textWrap", "balance">;
|
|
34
|
+
readonly scrollMarginBlockStart: stylex.StyleXClassNameFor<"scrollMarginBlockStart", "1em">;
|
|
35
|
+
}>;
|
|
36
|
+
readonly h1: Readonly<{
|
|
37
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", "1.375em">;
|
|
38
|
+
readonly letterSpacing: stylex.StyleXClassNameFor<"letterSpacing", "-0.01em">;
|
|
39
|
+
}>;
|
|
40
|
+
readonly h2: Readonly<{
|
|
41
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", "1.1875em">;
|
|
42
|
+
readonly letterSpacing: stylex.StyleXClassNameFor<"letterSpacing", "-0.005em">;
|
|
43
|
+
}>;
|
|
44
|
+
readonly h3: Readonly<{
|
|
45
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", "1.0625em">;
|
|
46
|
+
}>;
|
|
47
|
+
readonly h4: Readonly<{
|
|
48
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", "1em">;
|
|
49
|
+
}>;
|
|
50
|
+
readonly h5: Readonly<{
|
|
51
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", "0.9375em">;
|
|
52
|
+
}>;
|
|
53
|
+
readonly h6: Readonly<{
|
|
54
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", "0.875em">;
|
|
55
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
56
|
+
}>;
|
|
57
|
+
readonly list: Readonly<{
|
|
58
|
+
readonly paddingInlineStart: stylex.StyleXClassNameFor<"paddingInlineStart", "1.5em">;
|
|
59
|
+
}>;
|
|
60
|
+
readonly bullet: Readonly<{
|
|
61
|
+
readonly listStyleType: stylex.StyleXClassNameFor<"listStyleType", "disc">;
|
|
62
|
+
}>;
|
|
63
|
+
readonly bulletNested: Readonly<{
|
|
64
|
+
readonly listStyleType: stylex.StyleXClassNameFor<"listStyleType", "circle">;
|
|
65
|
+
}>;
|
|
66
|
+
readonly ordered: Readonly<{
|
|
67
|
+
readonly listStyleType: stylex.StyleXClassNameFor<"listStyleType", "decimal">;
|
|
68
|
+
}>;
|
|
69
|
+
readonly item: Readonly<{
|
|
70
|
+
readonly marginBlockStart: stylex.StyleXClassNameFor<"marginBlockStart", 0 | "0.25em">;
|
|
71
|
+
readonly paddingInlineStart: stylex.StyleXClassNameFor<"paddingInlineStart", "0.125em">;
|
|
72
|
+
readonly '::marker': stylex.StyleXClassNameFor<"::marker", {
|
|
73
|
+
readonly color: stylex.StyleXVar<string>;
|
|
74
|
+
}>;
|
|
75
|
+
}>;
|
|
76
|
+
readonly orderedItem: Readonly<{
|
|
77
|
+
readonly '::marker': stylex.StyleXClassNameFor<"::marker", {
|
|
78
|
+
readonly color: stylex.StyleXVar<string>;
|
|
79
|
+
readonly fontVariantNumeric: "tabular-nums";
|
|
80
|
+
}>;
|
|
81
|
+
}>;
|
|
82
|
+
readonly task: Readonly<{
|
|
83
|
+
readonly listStyleType: stylex.StyleXClassNameFor<"listStyleType", "none">;
|
|
84
|
+
readonly position: stylex.StyleXClassNameFor<"position", "relative">;
|
|
85
|
+
}>;
|
|
86
|
+
readonly taskBox: Readonly<{
|
|
87
|
+
readonly position: stylex.StyleXClassNameFor<"position", "absolute">;
|
|
88
|
+
readonly insetInlineStart: stylex.StyleXClassNameFor<"insetInlineStart", "-1.375em">;
|
|
89
|
+
readonly top: stylex.StyleXClassNameFor<"top", "0.25em">;
|
|
90
|
+
}>;
|
|
91
|
+
readonly taskReadOnly: Readonly<{
|
|
92
|
+
readonly opacity: stylex.StyleXClassNameFor<"opacity", 1>;
|
|
93
|
+
readonly cursor: stylex.StyleXClassNameFor<"cursor", "default">;
|
|
94
|
+
}>;
|
|
95
|
+
readonly nestedList: Readonly<{
|
|
96
|
+
readonly marginBlockStart: stylex.StyleXClassNameFor<"marginBlockStart", "0.25em">;
|
|
97
|
+
}>;
|
|
98
|
+
readonly blockquote: Readonly<{
|
|
99
|
+
readonly paddingInlineStart: stylex.StyleXClassNameFor<"paddingInlineStart", "0.875em">;
|
|
100
|
+
readonly borderInlineStartWidth: stylex.StyleXClassNameFor<"borderInlineStartWidth", "2px">;
|
|
101
|
+
readonly borderInlineStartStyle: stylex.StyleXClassNameFor<"borderInlineStartStyle", "solid">;
|
|
102
|
+
readonly borderInlineStartColor: stylex.StyleXClassNameFor<"borderInlineStartColor", string>;
|
|
103
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
104
|
+
}>;
|
|
105
|
+
readonly alert: Readonly<{
|
|
106
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", "0.125em">;
|
|
107
|
+
readonly paddingInlineStart: stylex.StyleXClassNameFor<"paddingInlineStart", "0.875em">;
|
|
108
|
+
readonly borderInlineStartWidth: stylex.StyleXClassNameFor<"borderInlineStartWidth", "2px">;
|
|
109
|
+
readonly borderInlineStartStyle: stylex.StyleXClassNameFor<"borderInlineStartStyle", "solid">;
|
|
110
|
+
readonly borderInlineStartColor: stylex.StyleXClassNameFor<"borderInlineStartColor", "var(--narvi-alert)">;
|
|
111
|
+
readonly color: stylex.StyleXClassNameFor<"color", "inherit">;
|
|
112
|
+
}>;
|
|
113
|
+
readonly alertTitle: Readonly<{
|
|
114
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
115
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
116
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", "0.375em">;
|
|
117
|
+
readonly margin: stylex.StyleXClassNameFor<"margin", 0>;
|
|
118
|
+
readonly color: stylex.StyleXClassNameFor<"color", "var(--narvi-alert-ink, var(--narvi-alert))">;
|
|
119
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", "0.9375em">;
|
|
120
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
|
|
121
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
122
|
+
}>;
|
|
123
|
+
readonly alertNote: Readonly<{
|
|
124
|
+
readonly '--narvi-alert': stylex.StyleXClassNameFor<"--narvi-alert", string>;
|
|
125
|
+
}>;
|
|
126
|
+
readonly alertTip: Readonly<{
|
|
127
|
+
readonly '--narvi-alert': stylex.StyleXClassNameFor<"--narvi-alert", string>;
|
|
128
|
+
readonly '--narvi-alert-ink': stylex.StyleXClassNameFor<"--narvi-alert-ink", string>;
|
|
129
|
+
}>;
|
|
130
|
+
readonly alertImportant: Readonly<{
|
|
131
|
+
readonly '--narvi-alert': stylex.StyleXClassNameFor<"--narvi-alert", string>;
|
|
132
|
+
}>;
|
|
133
|
+
readonly alertWarning: Readonly<{
|
|
134
|
+
readonly '--narvi-alert': stylex.StyleXClassNameFor<"--narvi-alert", string>;
|
|
135
|
+
readonly '--narvi-alert-ink': stylex.StyleXClassNameFor<"--narvi-alert-ink", string>;
|
|
136
|
+
}>;
|
|
137
|
+
readonly alertCaution: Readonly<{
|
|
138
|
+
readonly '--narvi-alert': stylex.StyleXClassNameFor<"--narvi-alert", string>;
|
|
139
|
+
readonly '--narvi-alert-ink': stylex.StyleXClassNameFor<"--narvi-alert-ink", string>;
|
|
140
|
+
}>;
|
|
141
|
+
readonly rule: Readonly<{
|
|
142
|
+
readonly height: stylex.StyleXClassNameFor<"height", "1px">;
|
|
143
|
+
readonly marginBlock: stylex.StyleXClassNameFor<"marginBlock", "1.25em">;
|
|
144
|
+
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 0>;
|
|
145
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
146
|
+
readonly outlineStyle: stylex.StyleXClassNameFor<"outlineStyle", "solid">;
|
|
147
|
+
readonly outlineWidth: stylex.StyleXClassNameFor<"outlineWidth", 0 | "1px">;
|
|
148
|
+
readonly outlineColor: stylex.StyleXClassNameFor<"outlineColor", "CanvasText">;
|
|
149
|
+
}>;
|
|
150
|
+
readonly strong: Readonly<{
|
|
151
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
|
|
152
|
+
readonly color: stylex.StyleXClassNameFor<"color", "inherit">;
|
|
153
|
+
}>;
|
|
154
|
+
readonly emphasis: Readonly<{
|
|
155
|
+
readonly fontStyle: stylex.StyleXClassNameFor<"fontStyle", "italic">;
|
|
156
|
+
}>;
|
|
157
|
+
readonly delete: Readonly<{
|
|
158
|
+
readonly textDecorationLine: stylex.StyleXClassNameFor<"textDecorationLine", "line-through">;
|
|
159
|
+
readonly textDecorationColor: stylex.StyleXClassNameFor<"textDecorationColor", string>;
|
|
160
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
161
|
+
}>;
|
|
162
|
+
readonly code: Readonly<{
|
|
163
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", "0.0625em">;
|
|
164
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", "0.3125em">;
|
|
165
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
166
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
167
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
168
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
|
|
169
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", "0.875em">;
|
|
170
|
+
readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
|
|
171
|
+
}>;
|
|
172
|
+
readonly image: Readonly<{
|
|
173
|
+
readonly display: stylex.StyleXClassNameFor<"display", "inline-block">;
|
|
174
|
+
readonly maxWidth: stylex.StyleXClassNameFor<"maxWidth", "100%">;
|
|
175
|
+
readonly height: stylex.StyleXClassNameFor<"height", "auto">;
|
|
176
|
+
readonly verticalAlign: stylex.StyleXClassNameFor<"verticalAlign", "middle">;
|
|
177
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
178
|
+
}>;
|
|
179
|
+
readonly details: Readonly<{
|
|
180
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", "0.5em">;
|
|
181
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", "0.75em">;
|
|
182
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
183
|
+
readonly boxShadow: stylex.StyleXClassNameFor<"boxShadow", `inset 0 0 0 1px ${stylex.StyleXVar<string>}`>;
|
|
184
|
+
readonly outlineStyle: stylex.StyleXClassNameFor<"outlineStyle", "solid">;
|
|
185
|
+
readonly outlineWidth: stylex.StyleXClassNameFor<"outlineWidth", "1px">;
|
|
186
|
+
readonly outlineColor: stylex.StyleXClassNameFor<"outlineColor", "transparent">;
|
|
187
|
+
readonly outlineOffset: stylex.StyleXClassNameFor<"outlineOffset", "-1px">;
|
|
188
|
+
}>;
|
|
189
|
+
readonly summary: Readonly<{
|
|
190
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
191
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
|
|
192
|
+
readonly cursor: stylex.StyleXClassNameFor<"cursor", "pointer">;
|
|
193
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
194
|
+
readonly outlineStyle: stylex.StyleXClassNameFor<"outlineStyle", "solid">;
|
|
195
|
+
readonly outlineWidth: stylex.StyleXClassNameFor<"outlineWidth", 0 | "2px">;
|
|
196
|
+
readonly outlineColor: stylex.StyleXClassNameFor<"outlineColor", string>;
|
|
197
|
+
readonly outlineOffset: stylex.StyleXClassNameFor<"outlineOffset", "2px">;
|
|
198
|
+
}>;
|
|
199
|
+
readonly mathSource: Readonly<{
|
|
200
|
+
readonly overflowX: stylex.StyleXClassNameFor<"overflowX", "auto">;
|
|
201
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
202
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
|
|
203
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", "0.875em">;
|
|
204
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "pre-wrap">;
|
|
205
|
+
readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
|
|
206
|
+
}>;
|
|
207
|
+
readonly mathDisplay: Readonly<{
|
|
208
|
+
readonly display: stylex.StyleXClassNameFor<"display", "block">;
|
|
209
|
+
readonly overflowX: stylex.StyleXClassNameFor<"overflowX", "auto">;
|
|
210
|
+
readonly overflowY: stylex.StyleXClassNameFor<"overflowY", "hidden">;
|
|
211
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", "0.25em">;
|
|
212
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "center">;
|
|
213
|
+
readonly scrollbarWidth: stylex.StyleXClassNameFor<"scrollbarWidth", "thin">;
|
|
214
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
215
|
+
readonly outlineStyle: stylex.StyleXClassNameFor<"outlineStyle", "solid">;
|
|
216
|
+
readonly outlineWidth: stylex.StyleXClassNameFor<"outlineWidth", 0 | "2px">;
|
|
217
|
+
readonly outlineColor: stylex.StyleXClassNameFor<"outlineColor", string>;
|
|
218
|
+
readonly outlineOffset: stylex.StyleXClassNameFor<"outlineOffset", "2px">;
|
|
219
|
+
}>;
|
|
220
|
+
readonly mathInline: Readonly<{
|
|
221
|
+
readonly clipPath: stylex.StyleXClassNameFor<"clipPath", "inset(-50em -0.5em)">;
|
|
222
|
+
}>;
|
|
223
|
+
readonly mark: Readonly<{
|
|
224
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", "0.125em">;
|
|
225
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
226
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
227
|
+
readonly color: stylex.StyleXClassNameFor<"color", "inherit">;
|
|
228
|
+
}>;
|
|
229
|
+
readonly kbd: Readonly<{
|
|
230
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", "0.375em">;
|
|
231
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
232
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
233
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", "inherit">;
|
|
234
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", "0.8125em">;
|
|
235
|
+
}>;
|
|
236
|
+
readonly tableFrame: Readonly<{
|
|
237
|
+
readonly overflowX: stylex.StyleXClassNameFor<"overflowX", "auto">;
|
|
238
|
+
readonly overflowY: stylex.StyleXClassNameFor<"overflowY", "hidden">;
|
|
239
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
240
|
+
readonly boxShadow: stylex.StyleXClassNameFor<"boxShadow", `inset 0 0 0 1px ${stylex.StyleXVar<string>}`>;
|
|
241
|
+
readonly scrollbarWidth: stylex.StyleXClassNameFor<"scrollbarWidth", "thin">;
|
|
242
|
+
readonly outlineStyle: stylex.StyleXClassNameFor<"outlineStyle", "solid">;
|
|
243
|
+
readonly outlineWidth: stylex.StyleXClassNameFor<"outlineWidth", "1px">;
|
|
244
|
+
readonly outlineColor: stylex.StyleXClassNameFor<"outlineColor", "transparent">;
|
|
245
|
+
readonly outlineOffset: stylex.StyleXClassNameFor<"outlineOffset", "-1px">;
|
|
246
|
+
}>;
|
|
247
|
+
readonly table: Readonly<{
|
|
248
|
+
readonly width: stylex.StyleXClassNameFor<"width", "max-content">;
|
|
249
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", "100%">;
|
|
250
|
+
readonly borderCollapse: stylex.StyleXClassNameFor<"borderCollapse", "collapse">;
|
|
251
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", "0.9375em">;
|
|
252
|
+
readonly fontVariantNumeric: stylex.StyleXClassNameFor<"fontVariantNumeric", "tabular-nums">;
|
|
253
|
+
}>;
|
|
254
|
+
readonly cell: Readonly<{
|
|
255
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", "0.4375em">;
|
|
256
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", "0.75em">;
|
|
257
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "start">;
|
|
258
|
+
readonly verticalAlign: stylex.StyleXClassNameFor<"verticalAlign", "top">;
|
|
259
|
+
readonly maxWidth: stylex.StyleXClassNameFor<"maxWidth", "24rem">;
|
|
260
|
+
readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "break-word">;
|
|
261
|
+
readonly borderBlockStartWidth: stylex.StyleXClassNameFor<"borderBlockStartWidth", "1px">;
|
|
262
|
+
readonly borderBlockStartStyle: stylex.StyleXClassNameFor<"borderBlockStartStyle", "solid">;
|
|
263
|
+
readonly borderBlockStartColor: stylex.StyleXClassNameFor<"borderBlockStartColor", string>;
|
|
264
|
+
}>;
|
|
265
|
+
readonly headCell: Readonly<{
|
|
266
|
+
readonly borderBlockStartWidth: stylex.StyleXClassNameFor<"borderBlockStartWidth", 0>;
|
|
267
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
268
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
269
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
|
|
270
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
271
|
+
}>;
|
|
272
|
+
readonly rawCell: Readonly<{
|
|
273
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", null>;
|
|
274
|
+
}>;
|
|
275
|
+
readonly rawTableHeadless: Readonly<{
|
|
276
|
+
readonly marginBlockStart: stylex.StyleXClassNameFor<"marginBlockStart", "-1px">;
|
|
277
|
+
}>;
|
|
278
|
+
readonly alignLeft: Readonly<{
|
|
279
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "left">;
|
|
280
|
+
}>;
|
|
281
|
+
readonly alignCenter: Readonly<{
|
|
282
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "center">;
|
|
283
|
+
}>;
|
|
284
|
+
readonly alignRight: Readonly<{
|
|
285
|
+
readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "right">;
|
|
286
|
+
}>;
|
|
287
|
+
readonly footnotes: Readonly<{
|
|
288
|
+
readonly marginBlockStart: stylex.StyleXClassNameFor<"marginBlockStart", 0 | "1.5em">;
|
|
289
|
+
readonly paddingBlockStart: stylex.StyleXClassNameFor<"paddingBlockStart", "0.75em">;
|
|
290
|
+
readonly borderBlockStartWidth: stylex.StyleXClassNameFor<"borderBlockStartWidth", "1px">;
|
|
291
|
+
readonly borderBlockStartStyle: stylex.StyleXClassNameFor<"borderBlockStartStyle", "solid">;
|
|
292
|
+
readonly borderBlockStartColor: stylex.StyleXClassNameFor<"borderBlockStartColor", string>;
|
|
293
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
294
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", "0.875em">;
|
|
295
|
+
}>;
|
|
296
|
+
readonly footnote: Readonly<{
|
|
297
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
298
|
+
readonly outlineStyle: stylex.StyleXClassNameFor<"outlineStyle", "solid">;
|
|
299
|
+
readonly outlineWidth: stylex.StyleXClassNameFor<"outlineWidth", 0 | "2px">;
|
|
300
|
+
readonly outlineColor: stylex.StyleXClassNameFor<"outlineColor", string>;
|
|
301
|
+
readonly outlineOffset: stylex.StyleXClassNameFor<"outlineOffset", "2px">;
|
|
302
|
+
}>;
|
|
303
|
+
readonly footnoteList: Readonly<{
|
|
304
|
+
readonly paddingInlineStart: stylex.StyleXClassNameFor<"paddingInlineStart", "1.25em">;
|
|
305
|
+
readonly listStyleType: stylex.StyleXClassNameFor<"listStyleType", "decimal">;
|
|
306
|
+
}>;
|
|
307
|
+
readonly footnoteRef: Readonly<{
|
|
308
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", "max(0.75em, 0.75rem)">;
|
|
309
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", 0>;
|
|
310
|
+
readonly fontVariantNumeric: stylex.StyleXClassNameFor<"fontVariantNumeric", "tabular-nums">;
|
|
311
|
+
}>;
|
|
312
|
+
readonly backref: Readonly<{
|
|
313
|
+
readonly display: stylex.StyleXClassNameFor<"display", "inline-block">;
|
|
314
|
+
readonly marginInlineStart: stylex.StyleXClassNameFor<"marginInlineStart", "0.25em">;
|
|
315
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", "0.25em">;
|
|
316
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
|
|
317
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
|
|
318
|
+
readonly textDecorationLine: stylex.StyleXClassNameFor<"textDecorationLine", "none">;
|
|
319
|
+
}>;
|
|
320
|
+
}>;
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How Markdown reads. Sizes are in `em`, so a document takes the size of the text around it:
|
|
3
|
+
* a chat reply, a side panel or a page.
|
|
4
|
+
*/
|
|
5
|
+
import * as stylex from '@stylexjs/stylex';
|
|
6
|
+
import { colors, font, motion, radius } from '../../tokens.stylex.js';
|
|
7
|
+
import { media } from '../../media.stylex.js';
|
|
8
|
+
const enter = stylex.keyframes({
|
|
9
|
+
from: { opacity: 0 },
|
|
10
|
+
to: { opacity: 1 }
|
|
11
|
+
});
|
|
12
|
+
export const prose = stylex.create({
|
|
13
|
+
root: {
|
|
14
|
+
display: 'flow-root',
|
|
15
|
+
minWidth: 0,
|
|
16
|
+
color: 'inherit',
|
|
17
|
+
lineHeight: font.leadingNormal,
|
|
18
|
+
overflowWrap: 'break-word',
|
|
19
|
+
textWrap: 'pretty'
|
|
20
|
+
},
|
|
21
|
+
// `pretty` looks ahead to balance a paragraph's last lines, so while text is still arriving
|
|
22
|
+
// it would move words that are already on screen. Lines break as they come until it is whole.
|
|
23
|
+
streaming: { textWrap: 'wrap' },
|
|
24
|
+
// A new block fades in while the document streams. Opacity only: anything that moves or
|
|
25
|
+
// blurs would lay the page out again on every block
|
|
26
|
+
enter: {
|
|
27
|
+
animationName: { default: null, [media.motion]: enter },
|
|
28
|
+
animationDuration: motion.slow,
|
|
29
|
+
animationTimingFunction: motion.easeOut
|
|
30
|
+
},
|
|
31
|
+
// Every block is spaced from the one before it, never from its container's edge
|
|
32
|
+
block: {
|
|
33
|
+
marginBlock: 0,
|
|
34
|
+
marginBlockStart: { default: '0.75em', ':first-child': 0 }
|
|
35
|
+
},
|
|
36
|
+
paragraph: {},
|
|
37
|
+
heading: {
|
|
38
|
+
marginBlockStart: { default: '1.4em', ':first-child': 0 },
|
|
39
|
+
color: colors.text,
|
|
40
|
+
fontWeight: font.weightSemibold,
|
|
41
|
+
lineHeight: font.leadingSnug,
|
|
42
|
+
textWrap: 'balance',
|
|
43
|
+
scrollMarginBlockStart: '1em'
|
|
44
|
+
},
|
|
45
|
+
h1: { fontSize: '1.375em', letterSpacing: '-0.01em' },
|
|
46
|
+
h2: { fontSize: '1.1875em', letterSpacing: '-0.005em' },
|
|
47
|
+
h3: { fontSize: '1.0625em' },
|
|
48
|
+
h4: { fontSize: '1em' },
|
|
49
|
+
h5: { fontSize: '0.9375em' },
|
|
50
|
+
h6: { fontSize: '0.875em', color: colors.textMuted },
|
|
51
|
+
list: {
|
|
52
|
+
paddingInlineStart: '1.5em'
|
|
53
|
+
},
|
|
54
|
+
bullet: { listStyleType: 'disc' },
|
|
55
|
+
bulletNested: { listStyleType: 'circle' },
|
|
56
|
+
ordered: { listStyleType: 'decimal' },
|
|
57
|
+
item: {
|
|
58
|
+
marginBlockStart: { default: '0.25em', ':first-child': 0 },
|
|
59
|
+
paddingInlineStart: '0.125em',
|
|
60
|
+
'::marker': { color: colors.textSubtle }
|
|
61
|
+
},
|
|
62
|
+
// The marker of an ordered list lines its numbers up
|
|
63
|
+
orderedItem: {
|
|
64
|
+
'::marker': { color: colors.textSubtle, fontVariantNumeric: 'tabular-nums' }
|
|
65
|
+
},
|
|
66
|
+
task: {
|
|
67
|
+
listStyleType: 'none',
|
|
68
|
+
position: 'relative'
|
|
69
|
+
},
|
|
70
|
+
taskBox: {
|
|
71
|
+
position: 'absolute',
|
|
72
|
+
insetInlineStart: '-1.375em',
|
|
73
|
+
top: '0.25em'
|
|
74
|
+
},
|
|
75
|
+
// A box that only shows the state of a task: as clear as the text beside it
|
|
76
|
+
taskReadOnly: {
|
|
77
|
+
opacity: { default: 1, ':disabled': 1 },
|
|
78
|
+
cursor: { default: 'default', ':disabled': 'default' }
|
|
79
|
+
},
|
|
80
|
+
nestedList: {
|
|
81
|
+
marginBlockStart: '0.25em'
|
|
82
|
+
},
|
|
83
|
+
blockquote: {
|
|
84
|
+
paddingInlineStart: '0.875em',
|
|
85
|
+
borderInlineStartWidth: '2px',
|
|
86
|
+
borderInlineStartStyle: 'solid',
|
|
87
|
+
borderInlineStartColor: colors.borderStrong,
|
|
88
|
+
color: colors.textMuted
|
|
89
|
+
},
|
|
90
|
+
// A GitHub alert: a note set apart, named and coloured by its kind
|
|
91
|
+
alert: {
|
|
92
|
+
paddingBlock: '0.125em',
|
|
93
|
+
paddingInlineStart: '0.875em',
|
|
94
|
+
borderInlineStartWidth: '2px',
|
|
95
|
+
borderInlineStartStyle: 'solid',
|
|
96
|
+
borderInlineStartColor: 'var(--narvi-alert)',
|
|
97
|
+
color: 'inherit'
|
|
98
|
+
},
|
|
99
|
+
alertTitle: {
|
|
100
|
+
display: 'flex',
|
|
101
|
+
alignItems: 'center',
|
|
102
|
+
gap: '0.375em',
|
|
103
|
+
margin: 0,
|
|
104
|
+
// The title is text, so it takes the kind's ink where the kind's own colour is too
|
|
105
|
+
// light to read on a pale page
|
|
106
|
+
color: 'var(--narvi-alert-ink, var(--narvi-alert))',
|
|
107
|
+
fontSize: '0.9375em',
|
|
108
|
+
fontWeight: font.weightMedium,
|
|
109
|
+
lineHeight: font.leadingSnug
|
|
110
|
+
},
|
|
111
|
+
alertNote: { '--narvi-alert': colors.accent },
|
|
112
|
+
alertTip: { '--narvi-alert': colors.success, '--narvi-alert-ink': colors.successText },
|
|
113
|
+
// No hue of its own: what is important is told in the text's own colour
|
|
114
|
+
alertImportant: { '--narvi-alert': colors.text },
|
|
115
|
+
alertWarning: { '--narvi-alert': colors.warning, '--narvi-alert-ink': colors.warningText },
|
|
116
|
+
alertCaution: { '--narvi-alert': colors.danger, '--narvi-alert-ink': colors.dangerText },
|
|
117
|
+
rule: {
|
|
118
|
+
height: '1px',
|
|
119
|
+
marginBlock: '1.25em',
|
|
120
|
+
borderWidth: 0,
|
|
121
|
+
backgroundColor: colors.border,
|
|
122
|
+
// The rule is drawn with a fill, which forced-colours mode removes
|
|
123
|
+
outlineStyle: 'solid',
|
|
124
|
+
outlineWidth: { default: 0, [media.forcedColors]: '1px' },
|
|
125
|
+
outlineColor: 'CanvasText'
|
|
126
|
+
},
|
|
127
|
+
strong: { fontWeight: font.weightSemibold, color: 'inherit' },
|
|
128
|
+
emphasis: { fontStyle: 'italic' },
|
|
129
|
+
delete: {
|
|
130
|
+
textDecorationLine: 'line-through',
|
|
131
|
+
textDecorationColor: colors.textSubtle,
|
|
132
|
+
color: colors.textMuted
|
|
133
|
+
},
|
|
134
|
+
code: {
|
|
135
|
+
paddingBlock: '0.0625em',
|
|
136
|
+
paddingInline: '0.3125em',
|
|
137
|
+
borderRadius: radius.chip,
|
|
138
|
+
backgroundColor: colors.fillSunken,
|
|
139
|
+
color: colors.text,
|
|
140
|
+
fontFamily: font.mono,
|
|
141
|
+
fontSize: '0.875em',
|
|
142
|
+
// Long identifiers and paths may break anywhere rather than run out of the line. Where
|
|
143
|
+
// it does break, the box is left open at the break: closing it on both lines (`clone`)
|
|
144
|
+
// adds padding the browser does not count when it breaks the line, and the code then
|
|
145
|
+
// sticks out of the text by that much
|
|
146
|
+
overflowWrap: 'anywhere'
|
|
147
|
+
},
|
|
148
|
+
image: {
|
|
149
|
+
display: 'inline-block',
|
|
150
|
+
maxWidth: '100%',
|
|
151
|
+
height: 'auto',
|
|
152
|
+
verticalAlign: 'middle',
|
|
153
|
+
borderRadius: radius.control
|
|
154
|
+
},
|
|
155
|
+
details: {
|
|
156
|
+
paddingBlock: '0.5em',
|
|
157
|
+
paddingInline: '0.75em',
|
|
158
|
+
borderRadius: radius.control,
|
|
159
|
+
boxShadow: `inset 0 0 0 1px ${colors.border}`,
|
|
160
|
+
outlineStyle: 'solid',
|
|
161
|
+
outlineWidth: '1px',
|
|
162
|
+
outlineColor: 'transparent',
|
|
163
|
+
outlineOffset: '-1px'
|
|
164
|
+
},
|
|
165
|
+
summary: {
|
|
166
|
+
color: colors.text,
|
|
167
|
+
fontWeight: font.weightMedium,
|
|
168
|
+
cursor: 'pointer',
|
|
169
|
+
borderRadius: radius.chip,
|
|
170
|
+
outlineStyle: 'solid',
|
|
171
|
+
outlineWidth: { default: 0, ':focus-visible': '2px' },
|
|
172
|
+
outlineColor: colors.focusRing,
|
|
173
|
+
outlineOffset: '2px'
|
|
174
|
+
},
|
|
175
|
+
// A formula as its TeX source: before it is whole, or when it cannot be typeset
|
|
176
|
+
mathSource: {
|
|
177
|
+
overflowX: 'auto',
|
|
178
|
+
color: colors.textMuted,
|
|
179
|
+
fontFamily: font.mono,
|
|
180
|
+
fontSize: '0.875em',
|
|
181
|
+
whiteSpace: 'pre-wrap',
|
|
182
|
+
overflowWrap: 'anywhere'
|
|
183
|
+
},
|
|
184
|
+
mathDisplay: {
|
|
185
|
+
display: 'block',
|
|
186
|
+
overflowX: 'auto',
|
|
187
|
+
overflowY: 'hidden',
|
|
188
|
+
paddingBlock: '0.25em',
|
|
189
|
+
textAlign: 'center',
|
|
190
|
+
scrollbarWidth: 'thin',
|
|
191
|
+
borderRadius: radius.chip,
|
|
192
|
+
outlineStyle: 'solid',
|
|
193
|
+
outlineWidth: { default: 0, ':focus-visible': '2px' },
|
|
194
|
+
outlineColor: colors.focusRing,
|
|
195
|
+
outlineOffset: '2px'
|
|
196
|
+
},
|
|
197
|
+
// A formula in a line of text is drawn within its own place in the line. TeX can move
|
|
198
|
+
// what it draws anywhere (`\\hspace{-30em}`), and a reply must not paint over the app
|
|
199
|
+
// beside it. Up and down is left alone: a tall formula makes its line taller instead.
|
|
200
|
+
mathInline: { clipPath: 'inset(-50em -0.5em)' },
|
|
201
|
+
// A highlight in the palette's own amber, not the browser's yellow, with the text's colour
|
|
202
|
+
mark: {
|
|
203
|
+
paddingInline: '0.125em',
|
|
204
|
+
borderRadius: radius.chip,
|
|
205
|
+
backgroundColor: colors.warningSoft,
|
|
206
|
+
color: 'inherit'
|
|
207
|
+
},
|
|
208
|
+
kbd: {
|
|
209
|
+
paddingInline: '0.375em',
|
|
210
|
+
borderRadius: radius.chip,
|
|
211
|
+
backgroundColor: colors.fillMuted,
|
|
212
|
+
// A `<kbd>`, in the text's own face
|
|
213
|
+
fontFamily: 'inherit',
|
|
214
|
+
fontSize: '0.8125em'
|
|
215
|
+
},
|
|
216
|
+
tableFrame: {
|
|
217
|
+
overflowX: 'auto',
|
|
218
|
+
overflowY: 'hidden',
|
|
219
|
+
borderRadius: radius.control,
|
|
220
|
+
boxShadow: `inset 0 0 0 1px ${colors.border}`,
|
|
221
|
+
scrollbarWidth: 'thin',
|
|
222
|
+
outlineStyle: 'solid',
|
|
223
|
+
outlineWidth: '1px',
|
|
224
|
+
outlineColor: 'transparent',
|
|
225
|
+
outlineOffset: '-1px'
|
|
226
|
+
},
|
|
227
|
+
table: {
|
|
228
|
+
width: 'max-content',
|
|
229
|
+
minWidth: '100%',
|
|
230
|
+
borderCollapse: 'collapse',
|
|
231
|
+
fontSize: '0.9375em',
|
|
232
|
+
fontVariantNumeric: 'tabular-nums'
|
|
233
|
+
},
|
|
234
|
+
cell: {
|
|
235
|
+
paddingBlock: '0.4375em',
|
|
236
|
+
paddingInline: '0.75em',
|
|
237
|
+
textAlign: 'start',
|
|
238
|
+
verticalAlign: 'top',
|
|
239
|
+
// A cell of prose wraps at 24rem; a table of short cells stays as narrow as its content
|
|
240
|
+
maxWidth: '24rem',
|
|
241
|
+
overflowWrap: 'break-word',
|
|
242
|
+
borderBlockStartWidth: { default: '1px', ':first-child': '1px' },
|
|
243
|
+
borderBlockStartStyle: 'solid',
|
|
244
|
+
borderBlockStartColor: colors.border
|
|
245
|
+
},
|
|
246
|
+
headCell: {
|
|
247
|
+
borderBlockStartWidth: 0,
|
|
248
|
+
backgroundColor: colors.fillSunken,
|
|
249
|
+
color: colors.text,
|
|
250
|
+
fontWeight: font.weightMedium,
|
|
251
|
+
whiteSpace: 'nowrap'
|
|
252
|
+
},
|
|
253
|
+
// A table written as HTML: its cells keep the alignment they ask for, and when its first
|
|
254
|
+
// row is not a heading, that row's top line sits under the frame's own edge
|
|
255
|
+
rawCell: { textAlign: null },
|
|
256
|
+
rawTableHeadless: { marginBlockStart: '-1px' },
|
|
257
|
+
alignLeft: { textAlign: 'left' },
|
|
258
|
+
alignCenter: { textAlign: 'center' },
|
|
259
|
+
alignRight: { textAlign: 'right' },
|
|
260
|
+
footnotes: {
|
|
261
|
+
marginBlockStart: { default: '1.5em', ':first-child': 0 },
|
|
262
|
+
paddingBlockStart: '0.75em',
|
|
263
|
+
borderBlockStartWidth: '1px',
|
|
264
|
+
borderBlockStartStyle: 'solid',
|
|
265
|
+
borderBlockStartColor: colors.border,
|
|
266
|
+
color: colors.textMuted,
|
|
267
|
+
fontSize: '0.875em'
|
|
268
|
+
},
|
|
269
|
+
// Focus lands on a footnote when its number is followed; the ring shows only for a keyboard
|
|
270
|
+
footnote: {
|
|
271
|
+
borderRadius: radius.chip,
|
|
272
|
+
outlineStyle: 'solid',
|
|
273
|
+
outlineWidth: { default: 0, ':focus-visible': '2px' },
|
|
274
|
+
outlineColor: colors.focusRing,
|
|
275
|
+
outlineOffset: '2px'
|
|
276
|
+
},
|
|
277
|
+
footnoteList: { paddingInlineStart: '1.25em', listStyleType: 'decimal' },
|
|
278
|
+
footnoteRef: {
|
|
279
|
+
// Never smaller than 12px, whatever size the text around it is
|
|
280
|
+
fontSize: 'max(0.75em, 0.75rem)',
|
|
281
|
+
lineHeight: 0,
|
|
282
|
+
fontVariantNumeric: 'tabular-nums'
|
|
283
|
+
},
|
|
284
|
+
// The way back from a note: an arrow on a small fill of its own, so it reads as something
|
|
285
|
+
// to press without an underline under an arrow
|
|
286
|
+
backref: {
|
|
287
|
+
display: 'inline-block',
|
|
288
|
+
marginInlineStart: '0.25em',
|
|
289
|
+
paddingInline: '0.25em',
|
|
290
|
+
borderRadius: radius.chip,
|
|
291
|
+
backgroundColor: colors.fillSunken,
|
|
292
|
+
textDecorationLine: 'none'
|
|
293
|
+
}
|
|
294
|
+
});
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
+
import type { Loose } from '../../internal/loose.js';
|
|
2
3
|
import { ContextMenu } from 'bits-ui';
|
|
3
4
|
import type { Snippet } from 'svelte';
|
|
4
5
|
import { layer } from '../../internal/layer.js';
|
|
5
6
|
import { attrs, type Sx } from '../../internal/sx.js';
|
|
6
7
|
|
|
7
|
-
export type ContextMenuContentProps =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
export type ContextMenuContentProps = Loose<
|
|
9
|
+
Omit<ContextMenu.ContentProps, 'children' | 'child'> & {
|
|
10
|
+
sx?: Sx | undefined;
|
|
11
|
+
/** Menu.Item, Menu.Group and the other parts of Menu. */
|
|
12
|
+
children?: Snippet | undefined;
|
|
13
|
+
}
|
|
14
|
+
>;
|
|
12
15
|
</script>
|
|
13
16
|
|
|
14
17
|
<script lang="ts">
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import type { Loose } from '../../internal/loose.js';
|
|
1
2
|
import { ContextMenu } from 'bits-ui';
|
|
2
3
|
import type { Snippet } from 'svelte';
|
|
3
4
|
import { type Sx } from '../../internal/sx.js';
|
|
4
|
-
export type ContextMenuContentProps = Omit<ContextMenu.ContentProps, 'children' | 'child'> & {
|
|
5
|
-
sx?: Sx;
|
|
5
|
+
export type ContextMenuContentProps = Loose<Omit<ContextMenu.ContentProps, 'children' | 'child'> & {
|
|
6
|
+
sx?: Sx | undefined;
|
|
6
7
|
/** Menu.Item, Menu.Group and the other parts of Menu. */
|
|
7
|
-
children?: Snippet;
|
|
8
|
-
}
|
|
9
|
-
declare const ContextMenuContent: import("svelte").Component<
|
|
8
|
+
children?: Snippet | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
declare const ContextMenuContent: import("svelte").Component<Loose<Omit<import("bits-ui").DropdownMenuContentProps, "children" | "child"> & {
|
|
11
|
+
sx?: Sx | undefined;
|
|
12
|
+
/** Menu.Item, Menu.Group and the other parts of Menu. */
|
|
13
|
+
children?: Snippet | undefined;
|
|
14
|
+
}>, {}, "">;
|
|
10
15
|
type ContextMenuContent = ReturnType<typeof ContextMenuContent>;
|
|
11
16
|
export default ContextMenuContent;
|