@diegopluna/narvi 0.2.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/dist/color.d.ts +1 -1
- package/dist/components/activity/ActivityContent.svelte +2 -2
- 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 +9 -9
- package/dist/components/activity/ActivityStep.svelte.d.ts +9 -9
- package/dist/components/activity/ActivityThought.svelte +3 -3
- package/dist/components/activity/ActivityThought.svelte.d.ts +3 -3
- package/dist/components/activity/ActivityTrigger.svelte +5 -5
- 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 +5 -5
- package/dist/components/app-shell/AppShellBar.svelte.d.ts +5 -5
- package/dist/components/app-shell/AppShellHeader.svelte +3 -3
- package/dist/components/app-shell/AppShellHeader.svelte.d.ts +3 -3
- package/dist/components/app-shell/AppShellMain.svelte +2 -2
- package/dist/components/app-shell/AppShellMain.svelte.d.ts +2 -2
- package/dist/components/app-shell/AppShellPanel.svelte +6 -6
- package/dist/components/app-shell/AppShellPanel.svelte.d.ts +6 -6
- package/dist/components/app-shell/AppShellPanes.svelte +2 -2
- package/dist/components/app-shell/AppShellPanes.svelte.d.ts +2 -2
- package/dist/components/app-shell/AppShellRail.svelte +2 -2
- package/dist/components/app-shell/AppShellRail.svelte.d.ts +2 -2
- package/dist/components/app-shell/AppShellRoot.svelte +8 -8
- package/dist/components/app-shell/AppShellRoot.svelte.d.ts +8 -8
- package/dist/components/app-shell/AppShellSheet.svelte +4 -4
- package/dist/components/app-shell/AppShellSheet.svelte.d.ts +4 -4
- package/dist/components/app-shell/AppShellSidebar.svelte +3 -3
- package/dist/components/app-shell/AppShellSidebar.svelte.d.ts +3 -3
- package/dist/components/app-shell/AppShellToggle.svelte +5 -4
- package/dist/components/app-shell/AppShellToggle.svelte.d.ts +4 -4
- package/dist/components/approval/Approval.svelte +11 -11
- package/dist/components/approval/Approval.svelte.d.ts +11 -11
- package/dist/components/avatar/AvatarFallback.svelte +3 -2
- 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 +5 -5
- package/dist/components/avatar/AvatarRoot.svelte.d.ts +5 -5
- package/dist/components/badge/Badge.svelte +21 -6
- package/dist/components/badge/Badge.svelte.d.ts +8 -5
- package/dist/components/button/Button.svelte +54 -23
- package/dist/components/button/Button.svelte.d.ts +24 -18
- package/dist/components/card/Card.svelte +6 -6
- package/dist/components/card/Card.svelte.d.ts +6 -6
- package/dist/components/change-stats/ChangeStats.svelte +4 -4
- package/dist/components/change-stats/ChangeStats.svelte.d.ts +4 -4
- package/dist/components/changes-summary/ChangesSummary.svelte +6 -6
- package/dist/components/changes-summary/ChangesSummary.svelte.d.ts +6 -6
- package/dist/components/checkbox/Checkbox.svelte +19 -8
- package/dist/components/checkbox/Checkbox.svelte.d.ts +9 -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 +2 -2
- 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 +17 -8
- 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 +14 -11
- 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/composer/ComposerAttachButton.svelte +4 -4
- package/dist/components/composer/ComposerAttachButton.svelte.d.ts +4 -4
- package/dist/components/composer/ComposerAttachment.svelte +2 -2
- 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 +9 -9
- package/dist/components/composer/ComposerModelPicker.svelte.d.ts +9 -9
- package/dist/components/composer/ComposerRoot.svelte +18 -25
- package/dist/components/composer/ComposerRoot.svelte.d.ts +15 -15
- package/dist/components/composer/ComposerSubmit.svelte +6 -5
- package/dist/components/composer/ComposerSubmit.svelte.d.ts +4 -4
- package/dist/components/composer/ComposerTextarea.svelte +3 -3
- package/dist/components/composer/ComposerTextarea.svelte.d.ts +3 -3
- package/dist/components/composer/ComposerToggle.svelte +4 -4
- 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 +4 -4
- package/dist/components/composer/ComposerTray.svelte.d.ts +4 -4
- package/dist/components/conversation/ConversationContent.svelte +4 -4
- package/dist/components/conversation/ConversationContent.svelte.d.ts +4 -4
- package/dist/components/conversation/ConversationEmpty.svelte +5 -5
- 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 +4 -4
- package/dist/components/conversation/ConversationScrollButton.svelte.d.ts +4 -4
- package/dist/components/dialog/ConfirmDialog.svelte +46 -15
- 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 +6 -0
- package/dist/components/dialog/styles.js +6 -1
- package/dist/components/divider/Divider.svelte +3 -3
- package/dist/components/divider/Divider.svelte.d.ts +3 -3
- package/dist/components/empty-state/EmptyState.svelte +10 -5
- package/dist/components/empty-state/EmptyState.svelte.d.ts +5 -4
- package/dist/components/field/Field.svelte +88 -27
- 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 +6 -6
- package/dist/components/frame/Frame.svelte.d.ts +6 -6
- package/dist/components/grid/Grid.svelte +17 -6
- package/dist/components/grid/Grid.svelte.d.ts +6 -6
- package/dist/components/heading/Heading.svelte +29 -6
- 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 +2 -2
- package/dist/components/kbd/Kbd.svelte.d.ts +2 -2
- package/dist/components/link/Link.svelte +6 -6
- package/dist/components/link/Link.svelte.d.ts +6 -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 +16 -16
- package/dist/components/markdown/Markdown.svelte.d.ts +16 -16
- package/dist/components/markdown/MarkdownBlock.svelte +2 -2
- package/dist/components/markdown/MarkdownBlock.svelte.d.ts +2 -2
- package/dist/components/markdown/MarkdownBlocks.svelte +4 -4
- package/dist/components/markdown/MarkdownBlocks.svelte.d.ts +4 -4
- package/dist/components/markdown/MarkdownCode.svelte +1 -1
- package/dist/components/markdown/MarkdownCode.svelte.d.ts +1 -1
- package/dist/components/markdown/MarkdownFile.svelte +6 -4
- package/dist/components/markdown/MarkdownFile.svelte.d.ts +2 -2
- package/dist/components/markdown/MarkdownFootnotes.svelte +2 -1
- package/dist/components/markdown/MarkdownLink.svelte +1 -1
- package/dist/components/markdown/MarkdownLink.svelte.d.ts +1 -1
- package/dist/components/markdown/MarkdownTable.svelte +4 -11
- package/dist/components/markdown/MarkdownTable.svelte.d.ts +1 -1
- package/dist/components/markdown/styles.d.ts +0 -8
- package/dist/components/markdown/styles.js +0 -8
- 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 +23 -8
- 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 +6 -5
- package/dist/components/menu/index.js +9 -8
- package/dist/components/message/MessageAction.svelte +7 -7
- package/dist/components/message/MessageAction.svelte.d.ts +7 -7
- package/dist/components/message/MessageActions.svelte +4 -4
- package/dist/components/message/MessageActions.svelte.d.ts +4 -4
- package/dist/components/message/MessageContent.svelte +3 -3
- package/dist/components/message/MessageContent.svelte.d.ts +3 -3
- package/dist/components/message/MessageCopy.svelte +14 -17
- package/dist/components/message/MessageCopy.svelte.d.ts +7 -7
- package/dist/components/message/MessageHeader.svelte +3 -3
- package/dist/components/message/MessageHeader.svelte.d.ts +3 -3
- package/dist/components/message/MessagePending.svelte +2 -2
- 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 +3 -3
- package/dist/components/message/MessageTime.svelte.d.ts +3 -3
- package/dist/components/notice/Notice.svelte +45 -9
- package/dist/components/notice/Notice.svelte.d.ts +13 -8
- package/dist/components/plan/Plan.svelte +7 -14
- 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 +3 -3
- package/dist/components/progress/Progress.svelte.d.ts +3 -3
- package/dist/components/questionnaire/Questionnaire.svelte +17 -11
- package/dist/components/questionnaire/Questionnaire.svelte.d.ts +11 -11
- package/dist/components/queued-message/QueuedMessage.svelte +10 -10
- package/dist/components/queued-message/QueuedMessage.svelte.d.ts +10 -10
- package/dist/components/rail/RailItem.svelte +15 -22
- package/dist/components/rail/RailItem.svelte.d.ts +9 -9
- package/dist/components/rail/RailRoot.svelte +2 -2
- package/dist/components/rail/RailRoot.svelte.d.ts +2 -2
- package/dist/components/reasoning/ReasoningContent.svelte +2 -2
- 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 +3 -3
- package/dist/components/reasoning/ReasoningTrigger.svelte.d.ts +3 -3
- package/dist/components/resize-handle/ResizeHandle.svelte +10 -10
- 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 +71 -24
- package/dist/components/segmented/SegmentedControl.svelte.d.ts +14 -5
- package/dist/components/select/Select.svelte +39 -14
- package/dist/components/select/Select.svelte.d.ts +21 -13
- package/dist/components/separator/Separator.svelte +3 -3
- 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 +184 -56
- 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 +3 -3
- package/dist/components/shimmer/Shimmer.svelte.d.ts +3 -3
- package/dist/components/sidebar/SidebarContent.svelte +3 -3
- package/dist/components/sidebar/SidebarContent.svelte.d.ts +3 -3
- package/dist/components/sidebar/SidebarFolder.svelte +13 -8
- package/dist/components/sidebar/SidebarFolder.svelte.d.ts +5 -5
- package/dist/components/sidebar/SidebarFooter.svelte +2 -2
- package/dist/components/sidebar/SidebarFooter.svelte.d.ts +2 -2
- package/dist/components/sidebar/SidebarGroup.svelte +6 -6
- package/dist/components/sidebar/SidebarGroup.svelte.d.ts +6 -6
- package/dist/components/sidebar/SidebarHeader.svelte +3 -3
- package/dist/components/sidebar/SidebarHeader.svelte.d.ts +3 -3
- package/dist/components/sidebar/SidebarItem.svelte +39 -14
- package/dist/components/sidebar/SidebarItem.svelte.d.ts +15 -10
- package/dist/components/sidebar/SidebarRoot.svelte +4 -4
- package/dist/components/sidebar/SidebarRoot.svelte.d.ts +4 -4
- 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 +3 -1
- package/dist/components/sidebar/index.js +2 -1
- package/dist/components/skeleton/Skeleton.svelte +5 -5
- package/dist/components/skeleton/Skeleton.svelte.d.ts +5 -5
- package/dist/components/slider/Slider.svelte +13 -13
- package/dist/components/slider/Slider.svelte.d.ts +13 -13
- package/dist/components/spinner/Spinner.svelte +4 -3
- 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 +5 -4
- package/dist/components/status-indicator/StatusIndicator.svelte.d.ts +4 -4
- package/dist/components/suggestions/SuggestionsItem.svelte +3 -3
- 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 +18 -7
- package/dist/components/switch/Switch.svelte.d.ts +8 -6
- package/dist/components/tab-strip/TabStrip.svelte +106 -25
- package/dist/components/tab-strip/TabStrip.svelte.d.ts +9 -9
- package/dist/components/tabs/Tabs.svelte +72 -26
- package/dist/components/tabs/Tabs.svelte.d.ts +13 -7
- package/dist/components/text/Text.svelte +35 -11
- package/dist/components/text/Text.svelte.d.ts +12 -10
- 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 +34 -27
- 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 +2 -2
- 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 +4 -4
- package/dist/components/tool/ToolSection.svelte.d.ts +4 -4
- package/dist/components/tool/ToolTrigger.svelte +4 -4
- package/dist/components/tool/ToolTrigger.svelte.d.ts +4 -4
- package/dist/components/tooltip/TooltipContent.svelte +9 -6
- 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 +4 -4
- package/dist/components/work-fold/WorkFold.svelte.d.ts +4 -4
- package/dist/index.d.ts +15 -5
- package/dist/index.js +8 -1
- package/dist/internal/Chevron.svelte +1 -1
- package/dist/internal/Chevron.svelte.d.ts +1 -1
- package/dist/internal/Code.svelte +6 -1
- 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 +4 -2
- package/dist/internal/Glyph.svelte.d.ts +3 -2
- package/dist/internal/Tile.svelte +5 -5
- 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/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 +3 -1
- package/dist/internal/layer.js +7 -2
- 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 +4 -0
- package/dist/internal/markers.stylex.js +2 -0
- package/dist/internal/responsive.d.ts +1 -1
- package/dist/internal/roving.d.ts +1 -1
- package/dist/internal/sx.d.ts +4 -4
- package/dist/internal/tooltip-trigger.d.ts +9 -0
- package/dist/internal/tooltip-trigger.js +19 -0
- package/dist/markdown/ast.d.ts +6 -6
- package/dist/markdown/blocks.d.ts +6 -5
- package/dist/markdown/file-paths.d.ts +3 -3
- package/dist/markdown/files.d.ts +2 -2
- package/dist/markdown/highlight.d.ts +2 -2
- package/dist/markdown/html.d.ts +3 -12
- package/dist/markdown/images.d.ts +1 -1
- package/dist/markdown/inlines.d.ts +2 -2
- package/dist/markdown/parse.d.ts +3 -3
- package/dist/markdown/plugin.d.ts +21 -20
- package/dist/markdown/sanitize.d.ts +1 -1
- package/dist/markers.stylex.d.ts +13 -0
- package/dist/markers.stylex.js +11 -0
- package/dist/preset.d.ts +5 -5
- package/dist/preset.js +6 -6
- package/dist/tokens.stylex.d.ts +2 -0
- package/dist/tokens.stylex.js +10 -4
- package/dist/typography.d.ts +7 -0
- package/dist/typography.js +8 -0
- package/dist/visually-hidden.d.ts +18 -0
- package/dist/visually-hidden.js +21 -0
- package/dist/vite.d.ts +2 -2
- package/package.json +6 -2
- package/skills/building-ui/SKILL.md +162 -19
- package/skills/building-ui/references/components.md +39 -35
- package/skills/markdown/SKILL.md +1 -1
- package/skills/setup/SKILL.md +9 -1
- package/skills/styling/SKILL.md +58 -9
- package/skills/theming/SKILL.md +95 -2
package/dist/internal/layout.js
CHANGED
|
@@ -4,6 +4,7 @@ import { space } from '../tokens.stylex.js';
|
|
|
4
4
|
const gapFixed = stylex.create({
|
|
5
5
|
0: { gap: 0 },
|
|
6
6
|
1: { gap: space.x1 },
|
|
7
|
+
1.5: { gap: space.x1_5 },
|
|
7
8
|
2: { gap: space.x2 },
|
|
8
9
|
3: { gap: space.x3 },
|
|
9
10
|
4: { gap: space.x4 },
|
|
@@ -33,6 +34,7 @@ const gapChain = stylex.create({
|
|
|
33
34
|
const gapDefault = stylex.create({
|
|
34
35
|
0: { '--narvi-gap': '0px' },
|
|
35
36
|
1: { '--narvi-gap': space.x1 },
|
|
37
|
+
1.5: { '--narvi-gap': space.x1_5 },
|
|
36
38
|
2: { '--narvi-gap': space.x2 },
|
|
37
39
|
3: { '--narvi-gap': space.x3 },
|
|
38
40
|
4: { '--narvi-gap': space.x4 },
|
|
@@ -46,6 +48,7 @@ const gapDefault = stylex.create({
|
|
|
46
48
|
const gapSm = stylex.create({
|
|
47
49
|
0: { '--narvi-gap-sm': '0px' },
|
|
48
50
|
1: { '--narvi-gap-sm': space.x1 },
|
|
51
|
+
1.5: { '--narvi-gap-sm': space.x1_5 },
|
|
49
52
|
2: { '--narvi-gap-sm': space.x2 },
|
|
50
53
|
3: { '--narvi-gap-sm': space.x3 },
|
|
51
54
|
4: { '--narvi-gap-sm': space.x4 },
|
|
@@ -59,6 +62,7 @@ const gapSm = stylex.create({
|
|
|
59
62
|
const gapMd = stylex.create({
|
|
60
63
|
0: { '--narvi-gap-md': '0px' },
|
|
61
64
|
1: { '--narvi-gap-md': space.x1 },
|
|
65
|
+
1.5: { '--narvi-gap-md': space.x1_5 },
|
|
62
66
|
2: { '--narvi-gap-md': space.x2 },
|
|
63
67
|
3: { '--narvi-gap-md': space.x3 },
|
|
64
68
|
4: { '--narvi-gap-md': space.x4 },
|
|
@@ -72,6 +76,7 @@ const gapMd = stylex.create({
|
|
|
72
76
|
const gapLg = stylex.create({
|
|
73
77
|
0: { '--narvi-gap-lg': '0px' },
|
|
74
78
|
1: { '--narvi-gap-lg': space.x1 },
|
|
79
|
+
1.5: { '--narvi-gap-lg': space.x1_5 },
|
|
75
80
|
2: { '--narvi-gap-lg': space.x2 },
|
|
76
81
|
3: { '--narvi-gap-lg': space.x3 },
|
|
77
82
|
4: { '--narvi-gap-lg': space.x4 },
|
|
@@ -85,6 +90,7 @@ const gapLg = stylex.create({
|
|
|
85
90
|
const gapXl = stylex.create({
|
|
86
91
|
0: { '--narvi-gap-xl': '0px' },
|
|
87
92
|
1: { '--narvi-gap-xl': space.x1 },
|
|
93
|
+
1.5: { '--narvi-gap-xl': space.x1_5 },
|
|
88
94
|
2: { '--narvi-gap-xl': space.x2 },
|
|
89
95
|
3: { '--narvi-gap-xl': space.x3 },
|
|
90
96
|
4: { '--narvi-gap-xl': space.x4 },
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* bits-ui leaves `| undefined` off some optional props (`side?: Side`), so an app that
|
|
3
|
+
* type-checks with `exactOptionalPropertyTypes` cannot pass `side={maybe}`. Narvi's props that
|
|
4
|
+
* are built on bits-ui's go through `Loose`, and bits-ui's own parts that Narvi passes on as
|
|
5
|
+
* they are go through `loose`. `scripts/exact` holds every exported component to it.
|
|
6
|
+
*/
|
|
7
|
+
import type { Component } from 'svelte';
|
|
8
|
+
type OptionalKeys<T> = {
|
|
9
|
+
[K in keyof T]-?: Record<never, never> extends Pick<T, K> ? K : never;
|
|
10
|
+
}[keyof T];
|
|
11
|
+
/** `T`, with `undefined` allowed on every optional property. */
|
|
12
|
+
export type Loose<T> = {
|
|
13
|
+
[K in keyof T]: K extends OptionalKeys<T> ? T[K] | undefined : T[K];
|
|
14
|
+
};
|
|
15
|
+
/** A component of bits-ui's, typed to take `undefined` for each optional prop. */
|
|
16
|
+
export declare function loose<Props extends Record<string, any>, Exports extends Record<string, any>, Bindings extends keyof Props | ''>(component: Component<Props, Exports, Bindings>): Component<Loose<Props>, Exports, Bindings>;
|
|
17
|
+
/**
|
|
18
|
+
* The type `loose` gives a component, written out. Annotate with it where TypeScript cannot
|
|
19
|
+
* name the inferred one (TS2883): `const Root: Loosened<typeof DropdownMenu.Root> = …`.
|
|
20
|
+
*/
|
|
21
|
+
export type Loosened<C> = C extends Component<infer Props extends Record<string, any>, infer Exports, infer Bindings> ? Component<Loose<Props>, Exports, Bindings extends keyof Loose<Props> | '' ? Bindings : never> : never;
|
|
22
|
+
export {};
|
|
@@ -20,3 +20,7 @@ export declare const sidebarItemMarker: Readonly<{
|
|
|
20
20
|
export declare const tabStripTabMarker: Readonly<{
|
|
21
21
|
readonly marker: stylex.StyleXClassNameFor<"marker", symbol>;
|
|
22
22
|
}>;
|
|
23
|
+
/** A SegmentedControl's radio, so the label after it follows its state. */
|
|
24
|
+
export declare const segmentedInputMarker: Readonly<{
|
|
25
|
+
readonly marker: stylex.StyleXClassNameFor<"marker", symbol>;
|
|
26
|
+
}>;
|
|
@@ -12,3 +12,5 @@ export const markdownTableMarker = stylex.defineMarker();
|
|
|
12
12
|
export const sidebarItemMarker = stylex.defineMarker();
|
|
13
13
|
/** A tab of a TabStrip: its close button shows while the pointer or focus is in the tab. */
|
|
14
14
|
export const tabStripTabMarker = stylex.defineMarker();
|
|
15
|
+
/** A SegmentedControl's radio, so the label after it follows its state. */
|
|
16
|
+
export const segmentedInputMarker = stylex.defineMarker();
|
|
@@ -21,7 +21,7 @@ export type Breakpoint = 'sm' | 'md' | 'lg' | 'xl';
|
|
|
21
21
|
export declare const breakpoints: ReadonlyArray<Breakpoint>;
|
|
22
22
|
/** A value, or values by breakpoint. Each applies from its breakpoint up, until a larger one. */
|
|
23
23
|
export type Responsive<T> = T | Readonly<{
|
|
24
|
-
default?: T;
|
|
24
|
+
default?: T | undefined;
|
|
25
25
|
} & {
|
|
26
26
|
[B in Breakpoint]?: T;
|
|
27
27
|
}>;
|
|
@@ -12,6 +12,6 @@ export type RovingOptions = {
|
|
|
12
12
|
/** Which elements inside are the items. */
|
|
13
13
|
selector: string;
|
|
14
14
|
/** Which arrow keys move: up and down, or left and right. */
|
|
15
|
-
orientation?: 'vertical' | 'horizontal';
|
|
15
|
+
orientation?: 'vertical' | 'horizontal' | undefined;
|
|
16
16
|
};
|
|
17
17
|
export declare function roving({ selector, orientation }: RovingOptions): Attachment<HTMLElement>;
|
package/dist/internal/sx.d.ts
CHANGED
|
@@ -28,8 +28,8 @@ type StyleArg = Sx | Readonly<Record<string, unknown>> | ReadonlyArray<StyleArg>
|
|
|
28
28
|
* Later styles win, so pass the consumer's `sx` last.
|
|
29
29
|
*/
|
|
30
30
|
export declare function attrs(styles: ReadonlyArray<StyleArg>, className?: ClassValue | null): {
|
|
31
|
-
class?: ClassValue;
|
|
32
|
-
style?: string;
|
|
31
|
+
class?: ClassValue | undefined;
|
|
32
|
+
style?: string | undefined;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* Styles as attributes to spread onto an element or a component that takes `class` and
|
|
@@ -37,8 +37,8 @@ export declare function attrs(styles: ReadonlyArray<StyleArg>, className?: Class
|
|
|
37
37
|
* it takes markers, and later styles win.
|
|
38
38
|
*/
|
|
39
39
|
export declare function sx(...styles: ReadonlyArray<Sx>): {
|
|
40
|
-
class?: string;
|
|
41
|
-
style?: string;
|
|
40
|
+
class?: string | undefined;
|
|
41
|
+
style?: string | undefined;
|
|
42
42
|
};
|
|
43
43
|
/**
|
|
44
44
|
* Styles as one class string, for a prop that takes only a class, such as `iconClass`, or
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A bits-ui tooltip trigger's props, for an element in a group that moves its own focus (the
|
|
3
|
+
* radios of a SegmentedControl, the tabs of Tabs). Left off: the trigger's `tabindex`, which
|
|
4
|
+
* would make every item a tab stop, and its `disabled`. A click the keyboard makes (`detail`
|
|
5
|
+
* 0, as when the arrow keys choose a radio) no longer shuts the tooltip, so it shows as the
|
|
6
|
+
* keys reach an item. A spread keeps the attachment bits-ui finds the trigger by, which is
|
|
7
|
+
* keyed by a symbol.
|
|
8
|
+
*/
|
|
9
|
+
export declare function groupTrigger(props: Record<string, unknown>): Record<string, unknown>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A bits-ui tooltip trigger's props, for an element in a group that moves its own focus (the
|
|
3
|
+
* radios of a SegmentedControl, the tabs of Tabs). Left off: the trigger's `tabindex`, which
|
|
4
|
+
* would make every item a tab stop, and its `disabled`. A click the keyboard makes (`detail`
|
|
5
|
+
* 0, as when the arrow keys choose a radio) no longer shuts the tooltip, so it shows as the
|
|
6
|
+
* keys reach an item. A spread keeps the attachment bits-ui finds the trigger by, which is
|
|
7
|
+
* keyed by a symbol.
|
|
8
|
+
*/
|
|
9
|
+
export function groupTrigger(props) {
|
|
10
|
+
const rest = { ...props };
|
|
11
|
+
delete rest.tabindex;
|
|
12
|
+
delete rest.disabled;
|
|
13
|
+
const click = rest.onclick;
|
|
14
|
+
rest.onclick = (event) => {
|
|
15
|
+
if (event.detail !== 0)
|
|
16
|
+
click?.(event);
|
|
17
|
+
};
|
|
18
|
+
return rest;
|
|
19
|
+
}
|
package/dist/markdown/ast.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export type Document = Point & {
|
|
|
21
21
|
* The YAML front matter a file starts with, between its `---` lines, as written. Read only
|
|
22
22
|
* with the `frontmatter` option, and then left out of `children`.
|
|
23
23
|
*/
|
|
24
|
-
frontmatter?: string;
|
|
24
|
+
frontmatter?: string | undefined;
|
|
25
25
|
};
|
|
26
26
|
export type Paragraph = Point & {
|
|
27
27
|
type: 'paragraph';
|
|
@@ -44,7 +44,7 @@ export type Blockquote = Point & {
|
|
|
44
44
|
type: 'blockquote';
|
|
45
45
|
id: number;
|
|
46
46
|
/** Set when the quote is a GitHub alert; its `[!NOTE]` line is then left out of the children. */
|
|
47
|
-
alert?: AlertKind;
|
|
47
|
+
alert?: AlertKind | undefined;
|
|
48
48
|
children: Block[];
|
|
49
49
|
};
|
|
50
50
|
export type List = Point & {
|
|
@@ -167,7 +167,7 @@ export type Link = {
|
|
|
167
167
|
* A link whose address is still being written, in a tidied preview: `[the docs](https://na`.
|
|
168
168
|
* It has its words and no address yet. Drawn as a link that goes nowhere.
|
|
169
169
|
*/
|
|
170
|
-
pending?: boolean;
|
|
170
|
+
pending?: boolean | undefined;
|
|
171
171
|
};
|
|
172
172
|
export type Image = {
|
|
173
173
|
type: 'image';
|
|
@@ -176,13 +176,13 @@ export type Image = {
|
|
|
176
176
|
/** The alt text, as plain text. */
|
|
177
177
|
alt: string;
|
|
178
178
|
/** The size an HTML `<img>` asked for. A Markdown image has none. */
|
|
179
|
-
width?: string;
|
|
180
|
-
height?: string;
|
|
179
|
+
width?: string | undefined;
|
|
180
|
+
height?: string | undefined;
|
|
181
181
|
/**
|
|
182
182
|
* Whether it is a video: an HTML `<video>`, or an image a transform marked as one, such
|
|
183
183
|
* as a link to an `.mp4`. It is drawn with controls, and nothing of it loads until it is played.
|
|
184
184
|
*/
|
|
185
|
-
video?: boolean;
|
|
185
|
+
video?: boolean | undefined;
|
|
186
186
|
children: Inline[];
|
|
187
187
|
};
|
|
188
188
|
/** A reference to a footnote. Its number comes from the document's `footnotes`, in order. */
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* that use it. Blocks remember which labels they looked up and missed, and only those are
|
|
15
15
|
* converted again when such a definition arrives.
|
|
16
16
|
*/
|
|
17
|
+
import type { Complete } from '../internal/complete.js';
|
|
17
18
|
import type { Block, Definition, Document, FootnoteDefinition, TableRow } from './ast.js';
|
|
18
19
|
type BlockType = 'document' | 'blockquote' | 'list' | 'item' | 'paragraph' | 'heading' | 'thematicBreak' | 'code' | 'html' | 'math' | 'table' | 'footnote';
|
|
19
20
|
type ListData = {
|
|
@@ -30,7 +31,7 @@ type TableLine = {
|
|
|
30
31
|
from: number;
|
|
31
32
|
to: number;
|
|
32
33
|
id: number;
|
|
33
|
-
cache?: TableRow;
|
|
34
|
+
cache?: TableRow | undefined;
|
|
34
35
|
};
|
|
35
36
|
/** A block while it is parsed. Converted to the immutable `ast.ts` nodes for the outside. */
|
|
36
37
|
declare class Node {
|
|
@@ -98,17 +99,17 @@ export declare function splitTableRow(text: string): string[];
|
|
|
98
99
|
/** What the parser needs from the rest of the library to convert a block. */
|
|
99
100
|
export type BlockOptions = {
|
|
100
101
|
/** GFM extensions: tables, task lists, strikethrough, autolinks, footnotes. On by default. */
|
|
101
|
-
gfm?: boolean;
|
|
102
|
+
gfm?: boolean | undefined;
|
|
102
103
|
/**
|
|
103
104
|
* Formulas: `$x$` and `\\(x\\)` in running text, `$$` and `\\[` for display. Off by default,
|
|
104
105
|
* since it changes what a dollar sign and an escaped bracket mean.
|
|
105
106
|
*/
|
|
106
|
-
math?: boolean;
|
|
107
|
+
math?: boolean | undefined;
|
|
107
108
|
/**
|
|
108
109
|
* Whether `~text~` strikes through, as `~~text~~` does. GitHub allows it, but in a reply
|
|
109
110
|
* a tilde far more often means "about", as in "~5 minutes", so it is off by default.
|
|
110
111
|
*/
|
|
111
|
-
singleTilde?: boolean;
|
|
112
|
+
singleTilde?: boolean | undefined;
|
|
112
113
|
};
|
|
113
114
|
export declare class BlockParser {
|
|
114
115
|
doc: Node;
|
|
@@ -147,7 +148,7 @@ export declare class BlockParser {
|
|
|
147
148
|
missedBy: Map<string, Set<Node>>;
|
|
148
149
|
ids: number;
|
|
149
150
|
ephemeral: boolean;
|
|
150
|
-
options:
|
|
151
|
+
options: Complete<BlockOptions>;
|
|
151
152
|
constructor(options?: BlockOptions);
|
|
152
153
|
nextId(): number;
|
|
153
154
|
lineStartOf(line: number): number;
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
/** A file, and where in it. */
|
|
5
5
|
export type FileReference = {
|
|
6
6
|
path: string;
|
|
7
|
-
line?: number;
|
|
8
|
-
column?: number;
|
|
9
|
-
endLine?: number;
|
|
7
|
+
line?: number | undefined;
|
|
8
|
+
column?: number | undefined;
|
|
9
|
+
endLine?: number | undefined;
|
|
10
10
|
};
|
|
11
11
|
/** Splits `src/app.ts:42:7` or `src/app.ts#L42-L50` into the path and the place in it. */
|
|
12
12
|
export declare function splitPosition(text: string): FileReference;
|
package/dist/markdown/files.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ export type FilesOptions = {
|
|
|
8
8
|
* asked, so a bare `package.json` can be found; without it, only text that looks like a
|
|
9
9
|
* path becomes a chip.
|
|
10
10
|
*/
|
|
11
|
-
resolve?: (path: string) => string | null | undefined;
|
|
11
|
+
resolve?: ((path: string) => string | null | undefined) | undefined;
|
|
12
12
|
/** Opens a file when its chip is activated. Without it, chips only show. */
|
|
13
|
-
open?: (file: FileReference, event: MouseEvent) => void;
|
|
13
|
+
open?: ((file: FileReference, event: MouseEvent) => void) | undefined;
|
|
14
14
|
};
|
|
15
15
|
/** The first-party file plugin. */
|
|
16
16
|
export declare function files(options?: FilesOptions): MarkdownPlugin;
|
|
@@ -19,9 +19,9 @@ export type HighlightOptions = {
|
|
|
19
19
|
themes?: {
|
|
20
20
|
light: Theme;
|
|
21
21
|
dark: Theme;
|
|
22
|
-
};
|
|
22
|
+
} | undefined;
|
|
23
23
|
/** Lines at or above this length are shown plain. Default 2000. */
|
|
24
|
-
maxLineLength?: number;
|
|
24
|
+
maxLineLength?: number | undefined;
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
27
|
* The first-party highlighter plugin. A code block in a language Highlights does not know is
|
package/dist/markdown/html.d.ts
CHANGED
|
@@ -1,23 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Writes a document as HTML, in the form the CommonMark and GFM spec tests expect.
|
|
3
|
-
*
|
|
4
|
-
* The Svelte renderer is what apps use. This one exists for the spec tests, for copying a
|
|
5
|
-
* reply as HTML, and for places that need a string. By default raw HTML passes through as
|
|
6
|
-
* written and a link keeps whatever address it was given, `javascript:` included, as the
|
|
7
|
-
* specs have it. So use it on trusted text only, or with `rawHtml: false` and
|
|
8
|
-
* `safeLinks: true` together.
|
|
9
|
-
*/
|
|
10
1
|
import type { Document } from './ast.js';
|
|
11
2
|
export type HtmlOptions = {
|
|
12
3
|
/** Writes raw HTML as text instead of passing it through. Default `true` (pass through). */
|
|
13
|
-
rawHtml?: boolean;
|
|
4
|
+
rawHtml?: boolean | undefined;
|
|
14
5
|
/** Escapes the tags GFM's tag filter disallows, such as `<script>`. Default `true`. */
|
|
15
|
-
tagFilter?: boolean;
|
|
6
|
+
tagFilter?: boolean | undefined;
|
|
16
7
|
/**
|
|
17
8
|
* Puts links and images through the default policy: a link whose address it refuses is
|
|
18
9
|
* written as its text, and an image as its alt text. Default `false`.
|
|
19
10
|
*/
|
|
20
|
-
safeLinks?: boolean;
|
|
11
|
+
safeLinks?: boolean | undefined;
|
|
21
12
|
};
|
|
22
13
|
export declare function escapeHtml(s: string): string;
|
|
23
14
|
export declare function toHtml(doc: Document, options?: HtmlOptions): string;
|
|
@@ -4,7 +4,7 @@ export type ImagesOptions = {
|
|
|
4
4
|
* Whether an image loads without asking. It is given the address as written, read as a
|
|
5
5
|
* browser reads it. The default allows none.
|
|
6
6
|
*/
|
|
7
|
-
allow?: (url: string) => boolean;
|
|
7
|
+
allow?: ((url: string) => boolean) | undefined;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* For `allow`: whether an address is on the page's own site: relative to it, or an `http(s)` address with
|
|
@@ -15,9 +15,9 @@ export type InlineContext = {
|
|
|
15
15
|
footnotes: ReadonlySet<string>;
|
|
16
16
|
gfm: boolean;
|
|
17
17
|
/** Formulas: `$x$`, `$$x$$`, `\\(x\\)` and `\\[x\\]`. */
|
|
18
|
-
math?: boolean;
|
|
18
|
+
math?: boolean | undefined;
|
|
19
19
|
/** Whether one tilde on each side strikes text through, as well as two. */
|
|
20
|
-
singleTilde?: boolean;
|
|
20
|
+
singleTilde?: boolean | undefined;
|
|
21
21
|
};
|
|
22
22
|
export type InlineResult = {
|
|
23
23
|
children: Inline[];
|
package/dist/markdown/parse.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type ParseOptions = BlockOptions & {
|
|
|
10
10
|
* left out of what is drawn. Off by default: a reply that starts with `---` starts with a
|
|
11
11
|
* rule. Turn it on for files.
|
|
12
12
|
*/
|
|
13
|
-
frontmatter?: boolean;
|
|
13
|
+
frontmatter?: boolean | undefined;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
16
|
* A document that grows as text arrives. Each complete line is read once; `snapshot()` shows
|
|
@@ -69,8 +69,8 @@ export declare class MarkdownStream {
|
|
|
69
69
|
* is the text it was written as.
|
|
70
70
|
*/
|
|
71
71
|
snapshot({ tidy, final }?: {
|
|
72
|
-
tidy?: boolean;
|
|
73
|
-
final?: boolean;
|
|
72
|
+
tidy?: boolean | undefined;
|
|
73
|
+
final?: boolean | undefined;
|
|
74
74
|
}): Document;
|
|
75
75
|
/** A snapshot with all that the one before it said too kept as the same objects. */
|
|
76
76
|
private shared;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* What a plugin can add to Narvi's Markdown, and the default policy for links and images.
|
|
3
3
|
*/
|
|
4
|
+
import type { Complete } from '../internal/complete.js';
|
|
4
5
|
import type { Component } from 'svelte';
|
|
5
6
|
import type { Block, Document, Image, Inline, Link } from './ast.js';
|
|
6
7
|
/**
|
|
@@ -10,10 +11,10 @@ import type { Block, Document, Image, Inline, Link } from './ast.js';
|
|
|
10
11
|
*/
|
|
11
12
|
export type HighlightToken = {
|
|
12
13
|
text: string;
|
|
13
|
-
kind?: string;
|
|
14
|
-
color?: string;
|
|
15
|
-
italic?: boolean;
|
|
16
|
-
bold?: boolean;
|
|
14
|
+
kind?: string | undefined;
|
|
15
|
+
color?: string | undefined;
|
|
16
|
+
italic?: boolean | undefined;
|
|
17
|
+
bold?: boolean | undefined;
|
|
17
18
|
};
|
|
18
19
|
/** Turns code into lines of tokens, or returns null to show it plain. */
|
|
19
20
|
export type Highlighter = (code: string, lang: string | null) => HighlightToken[][] | null;
|
|
@@ -33,7 +34,7 @@ export type HighlightStream = {
|
|
|
33
34
|
export type NodeProps<N> = {
|
|
34
35
|
node: N;
|
|
35
36
|
/** Renders the node's children as Narvi would. */
|
|
36
|
-
children?: import('svelte').Snippet;
|
|
37
|
+
children?: import('svelte').Snippet | undefined;
|
|
37
38
|
};
|
|
38
39
|
/** A component for a node, with extra props it is given beside `node` and `children`. */
|
|
39
40
|
export type PluginComponent = {
|
|
@@ -56,66 +57,66 @@ export type LinkPolicy = {
|
|
|
56
57
|
* `//host/…`, which starts with `/` and leaves the site: test `readUrl(url).kind`, not the
|
|
57
58
|
* start of the string. A `javascript:` address is refused whatever this returns.
|
|
58
59
|
*/
|
|
59
|
-
href?: (url: string, node: Link) => string | null;
|
|
60
|
+
href?: ((url: string, node: Link) => string | null) | undefined;
|
|
60
61
|
/**
|
|
61
62
|
* The address to load an image from, or null to show its alt text instead. The default
|
|
62
63
|
* allows `http:`, `https:`, and addresses without a scheme. A remote image is requested as
|
|
63
64
|
* soon as it is shown, so text written by a model can send data out through its address:
|
|
64
65
|
* an app that renders such text should decide here which hosts it loads.
|
|
65
66
|
*/
|
|
66
|
-
image?: (url: string, node: Image) => string | null;
|
|
67
|
+
image?: ((url: string, node: Image) => string | null) | undefined;
|
|
67
68
|
/** Whether a link opens in a new tab. The default: links to another origin do. */
|
|
68
|
-
external?: (href: string) => boolean;
|
|
69
|
+
external?: ((href: string) => boolean) | undefined;
|
|
69
70
|
/**
|
|
70
71
|
* Called when a link is clicked, before the browser follows it. Call
|
|
71
72
|
* `event.preventDefault()` to open it yourself: in a side panel, an in-app browser, or
|
|
72
73
|
* the app's own router. Modifier keys are on the event.
|
|
73
74
|
*/
|
|
74
|
-
open?: (href: string, event: MouseEvent) => void;
|
|
75
|
+
open?: ((href: string, event: MouseEvent) => void) | undefined;
|
|
75
76
|
};
|
|
76
77
|
/** A policy with every decision filled in; `open` stays optional. */
|
|
77
|
-
export type ResolvedLinkPolicy =
|
|
78
|
+
export type ResolvedLinkPolicy = Complete<Omit<LinkPolicy, 'open'>> & Pick<LinkPolicy, 'open'>;
|
|
78
79
|
export type MarkdownPlugin = {
|
|
79
80
|
name: string;
|
|
80
81
|
/** Syntax to read beyond CommonMark and GFM. */
|
|
81
82
|
syntax?: {
|
|
82
83
|
/** Formulas: `$x$`, `$$x$$`, `\\(x\\)` and `\\[x\\]`, as `inlineMath` and `math` nodes. */
|
|
83
|
-
math?: boolean;
|
|
84
|
-
};
|
|
84
|
+
math?: boolean | undefined;
|
|
85
|
+
} | undefined;
|
|
85
86
|
/**
|
|
86
87
|
* Rewrites a block after it is parsed: for example, turning `@thread:12` in its text into
|
|
87
88
|
* a link. It is called for the blocks that hold text or code (paragraphs, headings, tables,
|
|
88
89
|
* code blocks, wherever they are nested), and never for the lists and quotes around them.
|
|
89
90
|
* A finished block is transformed once; return the same block to change nothing.
|
|
90
91
|
*/
|
|
91
|
-
transform?: (block: Block, document: Document) => Block;
|
|
92
|
+
transform?: ((block: Block, document: Document) => Block) | undefined;
|
|
92
93
|
/**
|
|
93
94
|
* Components that replace Narvi's for node types, and that draw the `custom` nodes a
|
|
94
95
|
* transform adds, by their `name`. Use `withProps` to hand one extra props.
|
|
95
96
|
*/
|
|
96
|
-
components?: Record<string, Component<NodeProps<never>> | PluginComponent
|
|
97
|
+
components?: Record<string, Component<NodeProps<never>> | PluginComponent> | undefined;
|
|
97
98
|
/**
|
|
98
99
|
* Components that draw a fenced code block in a language, by its name in lower case:
|
|
99
100
|
* `{ mermaid: Diagram }`. One takes over once the fence has closed; while the block is
|
|
100
101
|
* still being written it shows as code.
|
|
101
102
|
*/
|
|
102
|
-
languages?: Record<string, Component<NodeProps<never>> | PluginComponent
|
|
103
|
+
languages?: Record<string, Component<NodeProps<never>> | PluginComponent> | undefined;
|
|
103
104
|
/** Colours code blocks. */
|
|
104
|
-
highlight?: Highlighter;
|
|
105
|
+
highlight?: Highlighter | undefined;
|
|
105
106
|
/**
|
|
106
107
|
* Colours a code block while it streams. Returns null for a language it does not know.
|
|
107
108
|
* Without it, a streaming block is highlighted once its fence closes.
|
|
108
109
|
*/
|
|
109
|
-
highlightStream?: (lang: string | null) => HighlightStream | null;
|
|
110
|
+
highlightStream?: ((lang: string | null) => HighlightStream | null) | undefined;
|
|
110
111
|
/** Decides links and images. Later plugins override earlier ones, one function at a time. */
|
|
111
|
-
links?: LinkPolicy;
|
|
112
|
+
links?: LinkPolicy | undefined;
|
|
112
113
|
/**
|
|
113
114
|
* For `static`: how to write the nodes this plugin draws as markup, by the same names as
|
|
114
115
|
* `components`. A finished block that holds one of these nodes can then be written as
|
|
115
116
|
* markup too; without it, the block is built from parts as ever. It is used only while
|
|
116
117
|
* this plugin's own component is the one that draws the node.
|
|
117
118
|
*/
|
|
118
|
-
static?: Record<string, StaticPart<never
|
|
119
|
+
static?: Record<string, StaticPart<never>> | undefined;
|
|
119
120
|
};
|
|
120
121
|
/** What a `static` writer is given to work with. */
|
|
121
122
|
export type StaticTools = {
|
|
@@ -135,7 +136,7 @@ export type StaticPart<N> = {
|
|
|
135
136
|
/** The node as markup, or null to have the plugin's component draw it. */
|
|
136
137
|
html: (node: N, tools: StaticTools) => string | null;
|
|
137
138
|
/** Called for a click, or a middle click, on an element that carries `tools.part`. */
|
|
138
|
-
click?: (element: HTMLElement, event: MouseEvent) => void;
|
|
139
|
+
click?: ((element: HTMLElement, event: MouseEvent) => void) | undefined;
|
|
139
140
|
};
|
|
140
141
|
/**
|
|
141
142
|
* An address as a browser will read it. A browser drops tabs and line endings from anywhere
|
|
@@ -73,6 +73,6 @@ export declare function groupInlineHtml(inlines: Inline[], policy: UrlPolicy): R
|
|
|
73
73
|
* by the same component, and a plugin that decides which images load decides these too.
|
|
74
74
|
*/
|
|
75
75
|
export declare function imageOf(element: {
|
|
76
|
-
tag?: string;
|
|
76
|
+
tag?: string | undefined;
|
|
77
77
|
attrs: Record<string, string>;
|
|
78
78
|
}): Image;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
/**
|
|
3
|
+
* Markers for styles of your own that follow a Narvi part's state:
|
|
4
|
+
*
|
|
5
|
+
* [stylex.when.ancestor('[data-reveal=shown]', revealMarker)]: 1
|
|
6
|
+
*
|
|
7
|
+
* Each part has its own, so a hover group of yours, marked with `stylex.defaultMarker()`,
|
|
8
|
+
* never answers to a Narvi part around it.
|
|
9
|
+
*/
|
|
10
|
+
/** On a Reveal, which marks itself `data-reveal="hidden"`, then `"shown"`. */
|
|
11
|
+
export declare const revealMarker: Readonly<{
|
|
12
|
+
readonly marker: stylex.StyleXClassNameFor<"marker", symbol>;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
/**
|
|
3
|
+
* Markers for styles of your own that follow a Narvi part's state:
|
|
4
|
+
*
|
|
5
|
+
* [stylex.when.ancestor('[data-reveal=shown]', revealMarker)]: 1
|
|
6
|
+
*
|
|
7
|
+
* Each part has its own, so a hover group of yours, marked with `stylex.defaultMarker()`,
|
|
8
|
+
* never answers to a Narvi part around it.
|
|
9
|
+
*/
|
|
10
|
+
/** On a Reveal, which marks itself `data-reveal="hidden"`, then `"shown"`. */
|
|
11
|
+
export const revealMarker = stylex.defineMarker();
|
package/dist/preset.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ type AccentTokens = {
|
|
|
25
25
|
* own colour, which it takes from the stone.
|
|
26
26
|
*/
|
|
27
27
|
export declare const accents: ReadonlyArray<Option<AccentId> & {
|
|
28
|
-
tokens?: AccentTokens;
|
|
28
|
+
tokens?: AccentTokens | undefined;
|
|
29
29
|
}>;
|
|
30
30
|
export type StoneId = 'warm' | 'cool' | 'graphite';
|
|
31
31
|
type StoneTokens = {
|
|
@@ -56,15 +56,15 @@ type RadiusScale = {
|
|
|
56
56
|
};
|
|
57
57
|
/** A frame is always its inner radius plus its padding: `frame` = `card` + 5. */
|
|
58
58
|
export declare const radii: ReadonlyArray<Option<RadiusId> & {
|
|
59
|
-
scale?: RadiusScale;
|
|
59
|
+
scale?: RadiusScale | undefined;
|
|
60
60
|
}>;
|
|
61
61
|
type Face<Id extends string> = Option<Id> & {
|
|
62
62
|
/** The CSS font-family stack. */
|
|
63
63
|
stack: string;
|
|
64
64
|
/** The Fontsource package that serves it, if any. */
|
|
65
|
-
package?: string;
|
|
65
|
+
package?: string | undefined;
|
|
66
66
|
/** What to import from that package. */
|
|
67
|
-
imports?: string[];
|
|
67
|
+
imports?: string[] | undefined;
|
|
68
68
|
};
|
|
69
69
|
export type BodyId = 'geist' | 'inter' | 'plex' | 'system';
|
|
70
70
|
export type DisplayId = 'cormorant' | 'fraunces' | 'instrument' | 'sans';
|
|
@@ -78,7 +78,7 @@ export declare const motions: ReadonlyArray<Option<MotionId> & {
|
|
|
78
78
|
fast: number;
|
|
79
79
|
base: number;
|
|
80
80
|
slow: number;
|
|
81
|
-
};
|
|
81
|
+
} | undefined;
|
|
82
82
|
}>;
|
|
83
83
|
export type SchemeId = 'dark' | 'light' | 'system';
|
|
84
84
|
export declare const schemes: ReadonlyArray<Option<SchemeId>>;
|
package/dist/preset.js
CHANGED
|
@@ -104,8 +104,8 @@ export const stones = [
|
|
|
104
104
|
text: ['#1a1814', '#f0ece7'],
|
|
105
105
|
textMuted: ['#63605b', '#b8b4af'],
|
|
106
106
|
textSubtle: ['#686460', '#a6a39e'],
|
|
107
|
-
borderControl: ['#
|
|
108
|
-
borderControlHover: ['#
|
|
107
|
+
borderControl: ['#918d89', '#6f6c68'],
|
|
108
|
+
borderControlHover: ['#87837f', '#817d79']
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
{
|
|
@@ -119,8 +119,8 @@ export const stones = [
|
|
|
119
119
|
text: ['#16181c', '#eaedf2'],
|
|
120
120
|
textMuted: ['#5e6065', '#adb0b5'],
|
|
121
121
|
textSubtle: ['#616468', '#9da0a5'],
|
|
122
|
-
borderControl: ['#
|
|
123
|
-
borderControlHover: ['#
|
|
122
|
+
borderControl: ['#8b8d92', '#67696e'],
|
|
123
|
+
borderControlHover: ['#818489', '#76797e']
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
{
|
|
@@ -134,8 +134,8 @@ export const stones = [
|
|
|
134
134
|
text: ['#181818', '#ededed'],
|
|
135
135
|
textMuted: ['#606060', '#a9a9a9'],
|
|
136
136
|
textSubtle: ['#656565', '#999999'],
|
|
137
|
-
borderControl: ['#
|
|
138
|
-
borderControlHover: ['#
|
|
137
|
+
borderControl: ['#8d8d8d', '#656565'],
|
|
138
|
+
borderControlHover: ['#848484', '#747474']
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
];
|
package/dist/tokens.stylex.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export declare const colors: stylex.VarGroup<Readonly<{
|
|
|
62
62
|
*/
|
|
63
63
|
export declare const space: stylex.VarGroup<Readonly<{
|
|
64
64
|
x1: string;
|
|
65
|
+
x1_5: string;
|
|
65
66
|
x2: string;
|
|
66
67
|
x3: string;
|
|
67
68
|
x4: string;
|
|
@@ -95,6 +96,7 @@ export declare const font: stylex.VarGroup<Readonly<{
|
|
|
95
96
|
sizeBody: string;
|
|
96
97
|
sizeReading: string;
|
|
97
98
|
sizeTitle: string;
|
|
99
|
+
sizeFigure: string;
|
|
98
100
|
weightRegular: string;
|
|
99
101
|
weightMedium: string;
|
|
100
102
|
weightSemibold: string;
|