@nuxt/ui 4.2.1 → 4.4.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/.nuxt/ui.css +2 -0
- package/README.md +6 -5
- package/cli/package.json +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +4 -4
- package/dist/runtime/components/Accordion.d.vue.ts +16 -7
- package/dist/runtime/components/Accordion.vue +2 -1
- package/dist/runtime/components/Accordion.vue.d.ts +16 -7
- package/dist/runtime/components/Alert.d.vue.ts +4 -4
- package/dist/runtime/components/Alert.vue.d.ts +4 -4
- package/dist/runtime/components/App.d.vue.ts +10 -6
- package/dist/runtime/components/App.vue.d.ts +10 -6
- package/dist/runtime/components/AuthForm.d.vue.ts +53 -11
- package/dist/runtime/components/AuthForm.vue.d.ts +53 -11
- package/dist/runtime/components/Avatar.d.vue.ts +2 -2
- package/dist/runtime/components/Avatar.vue.d.ts +2 -2
- package/dist/runtime/components/AvatarGroup.d.vue.ts +1 -1
- package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Badge.d.vue.ts +2 -2
- package/dist/runtime/components/Badge.vue.d.ts +2 -2
- package/dist/runtime/components/Banner.d.vue.ts +5 -6
- package/dist/runtime/components/Banner.vue +49 -23
- package/dist/runtime/components/Banner.vue.d.ts +5 -6
- package/dist/runtime/components/BlogPost.d.vue.ts +2 -2
- package/dist/runtime/components/BlogPost.vue +0 -1
- package/dist/runtime/components/BlogPost.vue.d.ts +2 -2
- package/dist/runtime/components/BlogPosts.d.vue.ts +10 -6
- package/dist/runtime/components/BlogPosts.vue.d.ts +10 -6
- package/dist/runtime/components/Breadcrumb.d.vue.ts +10 -6
- package/dist/runtime/components/Breadcrumb.vue.d.ts +10 -6
- package/dist/runtime/components/Button.d.vue.ts +1 -1
- package/dist/runtime/components/Button.vue.d.ts +1 -1
- package/dist/runtime/components/Calendar.d.vue.ts +17 -12
- package/dist/runtime/components/Calendar.vue +13 -2
- package/dist/runtime/components/Calendar.vue.d.ts +17 -12
- package/dist/runtime/components/Card.d.vue.ts +1 -1
- package/dist/runtime/components/Card.vue.d.ts +1 -1
- package/dist/runtime/components/Carousel.d.vue.ts +14 -10
- package/dist/runtime/components/Carousel.vue +22 -0
- package/dist/runtime/components/Carousel.vue.d.ts +14 -10
- package/dist/runtime/components/ChangelogVersion.d.vue.ts +2 -2
- package/dist/runtime/components/ChangelogVersion.vue +0 -1
- package/dist/runtime/components/ChangelogVersion.vue.d.ts +2 -2
- package/dist/runtime/components/ChangelogVersions.d.vue.ts +14 -8
- package/dist/runtime/components/ChangelogVersions.vue +3 -2
- package/dist/runtime/components/ChangelogVersions.vue.d.ts +14 -8
- package/dist/runtime/components/ChatMessage.d.vue.ts +2 -2
- package/dist/runtime/components/ChatMessage.vue.d.ts +2 -2
- package/dist/runtime/components/ChatMessages.d.vue.ts +5 -5
- package/dist/runtime/components/ChatMessages.vue.d.ts +5 -5
- package/dist/runtime/components/ChatPalette.d.vue.ts +1 -1
- package/dist/runtime/components/ChatPalette.vue.d.ts +1 -1
- package/dist/runtime/components/ChatPrompt.d.vue.ts +3 -3
- package/dist/runtime/components/ChatPrompt.vue.d.ts +3 -3
- package/dist/runtime/components/ChatPromptSubmit.d.vue.ts +7 -7
- package/dist/runtime/components/ChatPromptSubmit.vue +1 -20
- package/dist/runtime/components/ChatPromptSubmit.vue.d.ts +7 -7
- package/dist/runtime/components/Checkbox.d.vue.ts +2 -2
- package/dist/runtime/components/Checkbox.vue.d.ts +2 -2
- package/dist/runtime/components/CheckboxGroup.d.vue.ts +12 -8
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +12 -8
- package/dist/runtime/components/Chip.d.vue.ts +2 -2
- package/dist/runtime/components/Chip.vue.d.ts +2 -2
- package/dist/runtime/components/Collapsible.d.vue.ts +2 -2
- package/dist/runtime/components/Collapsible.vue.d.ts +2 -2
- package/dist/runtime/components/ColorPicker.d.vue.ts +2 -2
- package/dist/runtime/components/ColorPicker.vue.d.ts +2 -2
- package/dist/runtime/components/CommandPalette.d.vue.ts +31 -13
- package/dist/runtime/components/CommandPalette.vue +26 -18
- package/dist/runtime/components/CommandPalette.vue.d.ts +31 -13
- package/dist/runtime/components/Container.d.vue.ts +1 -1
- package/dist/runtime/components/Container.vue.d.ts +1 -1
- package/dist/runtime/components/ContextMenu.d.vue.ts +17 -9
- package/dist/runtime/components/ContextMenu.vue.d.ts +17 -9
- package/dist/runtime/components/ContextMenuContent.d.vue.ts +11 -7
- package/dist/runtime/components/ContextMenuContent.vue +12 -13
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +11 -7
- package/dist/runtime/components/DashboardGroup.d.vue.ts +2 -2
- package/dist/runtime/components/DashboardGroup.vue.d.ts +2 -2
- package/dist/runtime/components/DashboardNavbar.d.vue.ts +5 -5
- package/dist/runtime/components/DashboardNavbar.vue.d.ts +5 -5
- package/dist/runtime/components/DashboardPanel.d.vue.ts +2 -2
- package/dist/runtime/components/DashboardPanel.vue.d.ts +2 -2
- package/dist/runtime/components/DashboardResizeHandle.d.vue.ts +1 -1
- package/dist/runtime/components/DashboardResizeHandle.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardSearch.d.vue.ts +10 -6
- package/dist/runtime/components/DashboardSearch.vue +3 -1
- package/dist/runtime/components/DashboardSearch.vue.d.ts +10 -6
- package/dist/runtime/components/DashboardSearchButton.d.vue.ts +5 -5
- package/dist/runtime/components/DashboardSearchButton.vue +1 -20
- package/dist/runtime/components/DashboardSearchButton.vue.d.ts +5 -5
- package/dist/runtime/components/DashboardSidebar.d.vue.ts +13 -9
- package/dist/runtime/components/DashboardSidebar.vue.d.ts +13 -9
- package/dist/runtime/components/DashboardSidebarCollapse.d.vue.ts +5 -5
- package/dist/runtime/components/DashboardSidebarCollapse.vue +1 -20
- package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +5 -5
- package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +5 -5
- package/dist/runtime/components/DashboardSidebarToggle.vue +1 -20
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +5 -5
- package/dist/runtime/components/DashboardToolbar.d.vue.ts +1 -1
- package/dist/runtime/components/DashboardToolbar.vue.d.ts +1 -1
- package/dist/runtime/components/Drawer.d.vue.ts +3 -3
- package/dist/runtime/components/Drawer.vue.d.ts +3 -3
- package/dist/runtime/components/DropdownMenu.d.vue.ts +17 -9
- package/dist/runtime/components/DropdownMenu.vue.d.ts +17 -9
- package/dist/runtime/components/DropdownMenuContent.d.vue.ts +11 -7
- package/dist/runtime/components/DropdownMenuContent.vue +12 -13
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +11 -7
- package/dist/runtime/components/Editor.d.vue.ts +101 -0
- package/dist/runtime/components/Editor.vue +199 -0
- package/dist/runtime/components/Editor.vue.d.ts +101 -0
- package/dist/runtime/components/EditorDragHandle.d.vue.ts +68 -0
- package/dist/runtime/components/EditorDragHandle.vue +127 -0
- package/dist/runtime/components/EditorDragHandle.vue.d.ts +68 -0
- package/dist/runtime/components/EditorEmojiMenu.d.vue.ts +41 -0
- package/dist/runtime/components/EditorEmojiMenu.vue +73 -0
- package/dist/runtime/components/EditorEmojiMenu.vue.d.ts +41 -0
- package/dist/runtime/components/EditorMentionMenu.d.vue.ts +49 -0
- package/dist/runtime/components/EditorMentionMenu.vue +79 -0
- package/dist/runtime/components/EditorMentionMenu.vue.d.ts +49 -0
- package/dist/runtime/components/EditorSuggestionMenu.d.vue.ts +58 -0
- package/dist/runtime/components/EditorSuggestionMenu.vue +83 -0
- package/dist/runtime/components/EditorSuggestionMenu.vue.d.ts +58 -0
- package/dist/runtime/components/EditorToolbar.d.vue.ts +92 -0
- package/dist/runtime/components/EditorToolbar.vue +242 -0
- package/dist/runtime/components/EditorToolbar.vue.d.ts +92 -0
- package/dist/runtime/components/Empty.d.vue.ts +1 -1
- package/dist/runtime/components/Empty.vue.d.ts +1 -1
- package/dist/runtime/components/Error.d.vue.ts +6 -5
- package/dist/runtime/components/Error.vue +1 -1
- package/dist/runtime/components/Error.vue.d.ts +6 -5
- package/dist/runtime/components/FieldGroup.d.vue.ts +2 -2
- package/dist/runtime/components/FieldGroup.vue.d.ts +2 -2
- package/dist/runtime/components/FileUpload.d.vue.ts +13 -9
- package/dist/runtime/components/FileUpload.vue +2 -2
- package/dist/runtime/components/FileUpload.vue.d.ts +13 -9
- package/dist/runtime/components/Footer.d.vue.ts +2 -2
- package/dist/runtime/components/Footer.vue.d.ts +2 -2
- package/dist/runtime/components/FooterColumns.d.vue.ts +10 -6
- package/dist/runtime/components/FooterColumns.vue.d.ts +10 -6
- package/dist/runtime/components/Form.d.vue.ts +11 -7
- package/dist/runtime/components/Form.vue.d.ts +11 -7
- package/dist/runtime/components/FormField.d.vue.ts +8 -1
- package/dist/runtime/components/FormField.vue +6 -5
- package/dist/runtime/components/FormField.vue.d.ts +8 -1
- package/dist/runtime/components/Header.d.vue.ts +13 -9
- package/dist/runtime/components/Header.vue.d.ts +13 -9
- package/dist/runtime/components/Icon.d.vue.ts +1 -1
- package/dist/runtime/components/Icon.vue.d.ts +1 -1
- package/dist/runtime/components/Input.d.vue.ts +14 -10
- package/dist/runtime/components/Input.vue.d.ts +14 -10
- package/dist/runtime/components/InputDate.d.vue.ts +13 -9
- package/dist/runtime/components/InputDate.vue.d.ts +13 -9
- package/dist/runtime/components/InputMenu.d.vue.ts +34 -13
- package/dist/runtime/components/InputMenu.vue +56 -11
- package/dist/runtime/components/InputMenu.vue.d.ts +34 -13
- package/dist/runtime/components/InputNumber.d.vue.ts +18 -14
- package/dist/runtime/components/InputNumber.vue +1 -1
- package/dist/runtime/components/InputNumber.vue.d.ts +18 -14
- package/dist/runtime/components/InputTags.d.vue.ts +13 -9
- package/dist/runtime/components/InputTags.vue.d.ts +13 -9
- package/dist/runtime/components/InputTime.d.vue.ts +4 -4
- package/dist/runtime/components/InputTime.vue.d.ts +4 -4
- package/dist/runtime/components/Kbd.d.vue.ts +2 -2
- package/dist/runtime/components/Kbd.vue.d.ts +2 -2
- package/dist/runtime/components/Link.d.vue.ts +8 -3
- package/dist/runtime/components/Link.vue.d.ts +8 -3
- package/dist/runtime/components/LinkBase.d.vue.ts +3 -3
- package/dist/runtime/components/LinkBase.vue.d.ts +3 -3
- package/dist/runtime/components/Main.d.vue.ts +4 -2
- package/dist/runtime/components/Main.vue +1 -1
- package/dist/runtime/components/Main.vue.d.ts +4 -2
- package/dist/runtime/components/Marquee.d.vue.ts +3 -3
- package/dist/runtime/components/Marquee.vue.d.ts +3 -3
- package/dist/runtime/components/Modal.d.vue.ts +7 -7
- package/dist/runtime/components/Modal.vue.d.ts +7 -7
- package/dist/runtime/components/NavigationMenu.d.vue.ts +17 -8
- package/dist/runtime/components/NavigationMenu.vue +3 -2
- package/dist/runtime/components/NavigationMenu.vue.d.ts +17 -8
- package/dist/runtime/components/Page.d.vue.ts +1 -1
- package/dist/runtime/components/Page.vue.d.ts +1 -1
- package/dist/runtime/components/PageAnchors.d.vue.ts +10 -6
- package/dist/runtime/components/PageAnchors.vue.d.ts +10 -6
- package/dist/runtime/components/PageAside.d.vue.ts +2 -2
- package/dist/runtime/components/PageAside.vue.d.ts +2 -2
- package/dist/runtime/components/PageBody.d.vue.ts +1 -1
- package/dist/runtime/components/PageBody.vue.d.ts +1 -1
- package/dist/runtime/components/PageCTA.d.vue.ts +2 -2
- package/dist/runtime/components/PageCTA.vue.d.ts +2 -2
- package/dist/runtime/components/PageCard.d.vue.ts +2 -2
- package/dist/runtime/components/PageCard.vue.d.ts +2 -2
- package/dist/runtime/components/PageColumns.d.vue.ts +1 -1
- package/dist/runtime/components/PageColumns.vue.d.ts +1 -1
- package/dist/runtime/components/PageFeature.d.vue.ts +2 -2
- package/dist/runtime/components/PageFeature.vue +2 -2
- package/dist/runtime/components/PageFeature.vue.d.ts +2 -2
- package/dist/runtime/components/PageGrid.d.vue.ts +1 -1
- package/dist/runtime/components/PageGrid.vue.d.ts +1 -1
- package/dist/runtime/components/PageHeader.d.vue.ts +1 -1
- package/dist/runtime/components/PageHeader.vue.d.ts +1 -1
- package/dist/runtime/components/PageHero.d.vue.ts +2 -2
- package/dist/runtime/components/PageHero.vue.d.ts +2 -2
- package/dist/runtime/components/PageLinks.d.vue.ts +10 -6
- package/dist/runtime/components/PageLinks.vue.d.ts +10 -6
- package/dist/runtime/components/PageList.d.vue.ts +2 -2
- package/dist/runtime/components/PageList.vue.d.ts +2 -2
- package/dist/runtime/components/PageLogos.d.vue.ts +2 -2
- package/dist/runtime/components/PageLogos.vue.d.ts +2 -2
- package/dist/runtime/components/PageSection.d.vue.ts +2 -2
- package/dist/runtime/components/PageSection.vue.d.ts +2 -2
- package/dist/runtime/components/Pagination.d.vue.ts +4 -5
- package/dist/runtime/components/Pagination.vue.d.ts +4 -5
- package/dist/runtime/components/PinInput.d.vue.ts +13 -9
- package/dist/runtime/components/PinInput.vue +1 -1
- package/dist/runtime/components/PinInput.vue.d.ts +13 -9
- package/dist/runtime/components/Popover.d.vue.ts +11 -7
- package/dist/runtime/components/Popover.vue.d.ts +11 -7
- package/dist/runtime/components/PricingPlan.d.vue.ts +2 -2
- package/dist/runtime/components/PricingPlan.vue.d.ts +2 -2
- package/dist/runtime/components/PricingPlans.d.vue.ts +10 -6
- package/dist/runtime/components/PricingPlans.vue.d.ts +10 -6
- package/dist/runtime/components/PricingTable.d.vue.ts +10 -6
- package/dist/runtime/components/PricingTable.vue.d.ts +10 -6
- package/dist/runtime/components/Progress.d.vue.ts +2 -2
- package/dist/runtime/components/Progress.vue.d.ts +2 -2
- package/dist/runtime/components/RadioGroup.d.vue.ts +12 -8
- package/dist/runtime/components/RadioGroup.vue.d.ts +12 -8
- package/dist/runtime/components/ScrollArea.d.vue.ts +85 -0
- package/dist/runtime/components/ScrollArea.vue +187 -0
- package/dist/runtime/components/ScrollArea.vue.d.ts +85 -0
- package/dist/runtime/components/Select.d.vue.ts +21 -9
- package/dist/runtime/components/Select.vue +24 -6
- package/dist/runtime/components/Select.vue.d.ts +21 -9
- package/dist/runtime/components/SelectMenu.d.vue.ts +34 -13
- package/dist/runtime/components/SelectMenu.vue +58 -12
- package/dist/runtime/components/SelectMenu.vue.d.ts +34 -13
- package/dist/runtime/components/Separator.d.vue.ts +4 -4
- package/dist/runtime/components/Separator.vue.d.ts +4 -4
- package/dist/runtime/components/Skeleton.d.vue.ts +2 -2
- package/dist/runtime/components/Skeleton.vue.d.ts +2 -2
- package/dist/runtime/components/Slideover.d.vue.ts +12 -7
- package/dist/runtime/components/Slideover.vue +3 -1
- package/dist/runtime/components/Slideover.vue.d.ts +12 -7
- package/dist/runtime/components/Slider.d.vue.ts +12 -8
- package/dist/runtime/components/Slider.vue +2 -2
- package/dist/runtime/components/Slider.vue.d.ts +12 -8
- package/dist/runtime/components/Stepper.d.vue.ts +21 -9
- package/dist/runtime/components/Stepper.vue +20 -16
- package/dist/runtime/components/Stepper.vue.d.ts +21 -9
- package/dist/runtime/components/Switch.d.vue.ts +2 -2
- package/dist/runtime/components/Switch.vue.d.ts +2 -2
- package/dist/runtime/components/Table.d.vue.ts +27 -23
- package/dist/runtime/components/Table.vue +55 -33
- package/dist/runtime/components/Table.vue.d.ts +27 -23
- package/dist/runtime/components/Tabs.d.vue.ts +17 -8
- package/dist/runtime/components/Tabs.vue +5 -4
- package/dist/runtime/components/Tabs.vue.d.ts +17 -8
- package/dist/runtime/components/Textarea.d.vue.ts +14 -10
- package/dist/runtime/components/Textarea.vue.d.ts +14 -10
- package/dist/runtime/components/Timeline.d.vue.ts +24 -10
- package/dist/runtime/components/Timeline.vue +26 -17
- package/dist/runtime/components/Timeline.vue.d.ts +24 -10
- package/dist/runtime/components/Toast.d.vue.ts +5 -5
- package/dist/runtime/components/Toast.vue.d.ts +5 -5
- package/dist/runtime/components/Toaster.d.vue.ts +2 -2
- package/dist/runtime/components/Toaster.vue.d.ts +2 -2
- package/dist/runtime/components/Tooltip.d.vue.ts +2 -2
- package/dist/runtime/components/Tooltip.vue.d.ts +2 -2
- package/dist/runtime/components/Tree.d.vue.ts +13 -9
- package/dist/runtime/components/Tree.vue.d.ts +13 -9
- package/dist/runtime/components/User.d.vue.ts +2 -2
- package/dist/runtime/components/User.vue +0 -1
- package/dist/runtime/components/User.vue.d.ts +2 -2
- package/dist/runtime/components/color-mode/ColorModeAvatar.d.vue.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeButton.d.vue.ts +5 -5
- package/dist/runtime/components/color-mode/ColorModeButton.vue +3 -22
- package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +5 -5
- package/dist/runtime/components/color-mode/ColorModeImage.d.vue.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeImage.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeSelect.d.vue.ts +2 -2
- package/dist/runtime/components/color-mode/ColorModeSelect.vue +5 -0
- package/dist/runtime/components/color-mode/ColorModeSelect.vue.d.ts +2 -2
- package/dist/runtime/components/color-mode/ColorModeSwitch.d.vue.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue.d.ts +1 -1
- package/dist/runtime/components/content/ContentNavigation.d.vue.ts +11 -7
- package/dist/runtime/components/content/ContentNavigation.vue.d.ts +11 -7
- package/dist/runtime/components/content/ContentSearch.d.vue.ts +18 -10
- package/dist/runtime/components/content/ContentSearch.vue +3 -1
- package/dist/runtime/components/content/ContentSearch.vue.d.ts +18 -10
- package/dist/runtime/components/content/ContentSearchButton.d.vue.ts +5 -5
- package/dist/runtime/components/content/ContentSearchButton.vue +1 -20
- package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +5 -5
- package/dist/runtime/components/content/ContentSurround.d.vue.ts +10 -6
- package/dist/runtime/components/content/ContentSurround.vue +1 -1
- package/dist/runtime/components/content/ContentSurround.vue.d.ts +10 -6
- package/dist/runtime/components/content/ContentToc.d.vue.ts +11 -7
- package/dist/runtime/components/content/ContentToc.vue.d.ts +11 -7
- package/dist/runtime/components/locale/LocaleSelect.d.vue.ts +2 -2
- package/dist/runtime/components/locale/LocaleSelect.vue +14 -3
- package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +2 -2
- package/dist/runtime/components/prose/A.d.vue.ts +1 -1
- package/dist/runtime/components/prose/A.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Accordion.d.vue.ts +2 -2
- package/dist/runtime/components/prose/Accordion.vue.d.ts +2 -2
- package/dist/runtime/components/prose/AccordionItem.d.vue.ts +1 -1
- package/dist/runtime/components/prose/AccordionItem.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Badge.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Badge.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Blockquote.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Blockquote.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Callout.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Callout.vue +0 -1
- package/dist/runtime/components/prose/Callout.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Card.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Card.vue +0 -1
- package/dist/runtime/components/prose/Card.vue.d.ts +1 -1
- package/dist/runtime/components/prose/CardGroup.d.vue.ts +1 -1
- package/dist/runtime/components/prose/CardGroup.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Code.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Code.vue.d.ts +1 -1
- package/dist/runtime/components/prose/CodeCollapse.d.vue.ts +2 -2
- package/dist/runtime/components/prose/CodeCollapse.vue.d.ts +2 -2
- package/dist/runtime/components/prose/CodeGroup.d.vue.ts +2 -2
- package/dist/runtime/components/prose/CodeGroup.vue.d.ts +2 -2
- package/dist/runtime/components/prose/CodeIcon.d.vue.ts +1 -1
- package/dist/runtime/components/prose/CodeIcon.vue.d.ts +1 -1
- package/dist/runtime/components/prose/CodePreview.d.vue.ts +1 -1
- package/dist/runtime/components/prose/CodePreview.vue.d.ts +1 -1
- package/dist/runtime/components/prose/CodeTree.d.vue.ts +20 -1
- package/dist/runtime/components/prose/CodeTree.vue +34 -7
- package/dist/runtime/components/prose/CodeTree.vue.d.ts +20 -1
- package/dist/runtime/components/prose/Collapsible.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Collapsible.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Em.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Em.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Field.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Field.vue.d.ts +1 -1
- package/dist/runtime/components/prose/FieldGroup.d.vue.ts +1 -1
- package/dist/runtime/components/prose/FieldGroup.vue.d.ts +1 -1
- package/dist/runtime/components/prose/H1.d.vue.ts +1 -1
- package/dist/runtime/components/prose/H1.vue.d.ts +1 -1
- package/dist/runtime/components/prose/H2.d.vue.ts +1 -1
- package/dist/runtime/components/prose/H2.vue.d.ts +1 -1
- package/dist/runtime/components/prose/H3.d.vue.ts +1 -1
- package/dist/runtime/components/prose/H3.vue.d.ts +1 -1
- package/dist/runtime/components/prose/H4.d.vue.ts +1 -1
- package/dist/runtime/components/prose/H4.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Hr.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Hr.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Icon.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Icon.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Img.d.vue.ts +2 -2
- package/dist/runtime/components/prose/Img.vue.d.ts +2 -2
- package/dist/runtime/components/prose/Kbd.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Kbd.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Li.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Li.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Ol.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Ol.vue.d.ts +1 -1
- package/dist/runtime/components/prose/P.d.vue.ts +1 -1
- package/dist/runtime/components/prose/P.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Pre.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Pre.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Steps.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Steps.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Strong.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Strong.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Table.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Table.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Tabs.d.vue.ts +2 -2
- package/dist/runtime/components/prose/Tabs.vue.d.ts +2 -2
- package/dist/runtime/components/prose/TabsItem.d.vue.ts +1 -1
- package/dist/runtime/components/prose/TabsItem.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Tbody.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Tbody.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Td.d.vue.ts +2 -1
- package/dist/runtime/components/prose/Td.vue +2 -1
- package/dist/runtime/components/prose/Td.vue.d.ts +2 -1
- package/dist/runtime/components/prose/Th.d.vue.ts +2 -1
- package/dist/runtime/components/prose/Th.vue +2 -1
- package/dist/runtime/components/prose/Th.vue.d.ts +2 -1
- package/dist/runtime/components/prose/Thead.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Thead.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Tr.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Tr.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Ul.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Ul.vue.d.ts +1 -1
- package/dist/runtime/components/prose/callout/Caution.d.vue.ts +2 -2
- package/dist/runtime/components/prose/callout/Caution.vue.d.ts +2 -2
- package/dist/runtime/components/prose/callout/Note.d.vue.ts +2 -2
- package/dist/runtime/components/prose/callout/Note.vue.d.ts +2 -2
- package/dist/runtime/components/prose/callout/Tip.d.vue.ts +2 -2
- package/dist/runtime/components/prose/callout/Tip.vue.d.ts +2 -2
- package/dist/runtime/components/prose/callout/Warning.d.vue.ts +2 -2
- package/dist/runtime/components/prose/callout/Warning.vue.d.ts +2 -2
- package/dist/runtime/composables/defineShortcuts.d.ts +2 -1
- package/dist/runtime/composables/defineShortcuts.js +63 -16
- package/dist/runtime/composables/useEditorMenu.d.ts +75 -0
- package/dist/runtime/composables/useEditorMenu.js +435 -0
- package/dist/runtime/composables/useFileUpload.d.ts +1 -2
- package/dist/runtime/composables/useOverlay.d.ts +3 -1
- package/dist/runtime/locale/cs.js +2 -2
- package/dist/runtime/locale/en_gb.d.ts +3 -0
- package/dist/runtime/locale/en_gb.js +7 -0
- package/dist/runtime/locale/eu.d.ts +3 -0
- package/dist/runtime/locale/eu.js +129 -0
- package/dist/runtime/locale/index.d.ts +3 -0
- package/dist/runtime/locale/index.js +3 -0
- package/dist/runtime/locale/lo.d.ts +3 -0
- package/dist/runtime/locale/lo.js +129 -0
- package/dist/runtime/locale/sk.js +2 -2
- package/dist/runtime/types/editor.d.ts +70 -0
- package/dist/runtime/types/editor.js +0 -0
- package/dist/runtime/types/index.d.ts +8 -0
- package/dist/runtime/types/index.js +8 -0
- package/dist/runtime/utils/ai.d.ts +7 -0
- package/dist/runtime/utils/content.d.ts +2 -2
- package/dist/runtime/utils/editor.d.ts +69 -0
- package/dist/runtime/utils/editor.js +382 -0
- package/dist/runtime/utils/fuse.js +22 -3
- package/dist/runtime/utils/index.d.ts +1 -0
- package/dist/runtime/utils/index.js +2 -2
- package/dist/runtime/utils/locale.d.ts +1 -2
- package/dist/runtime/utils/virtualizer.d.ts +1 -3
- package/dist/runtime/utils/virtualizer.js +15 -6
- package/dist/runtime/vue/components/Icon.d.vue.ts +1 -1
- package/dist/runtime/vue/components/Icon.vue.d.ts +1 -1
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.d.vue.ts +2 -2
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +5 -0
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue.d.ts +2 -2
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.d.vue.ts +1 -1
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue.d.ts +1 -1
- package/dist/runtime/{inertia/components → vue/overrides/inertia}/Link.d.vue.ts +4 -4
- package/dist/runtime/{inertia/components → vue/overrides/inertia}/Link.vue +3 -3
- package/dist/runtime/{inertia/components → vue/overrides/inertia}/Link.vue.d.ts +4 -4
- package/dist/runtime/{inertia/components → vue/overrides/inertia}/LinkBase.d.vue.ts +4 -4
- package/dist/runtime/{inertia/components → vue/overrides/inertia}/LinkBase.vue.d.ts +4 -4
- package/dist/runtime/vue/overrides/none/Link.d.vue.ts +76 -0
- package/dist/runtime/vue/overrides/none/Link.vue +130 -0
- package/dist/runtime/vue/overrides/none/Link.vue.d.ts +76 -0
- package/dist/runtime/vue/{components → overrides/vue-router}/Link.d.vue.ts +4 -4
- package/dist/runtime/vue/{components → overrides/vue-router}/Link.vue +6 -6
- package/dist/runtime/vue/{components → overrides/vue-router}/Link.vue.d.ts +4 -4
- package/dist/runtime/vue/plugins/router.d.ts +4 -0
- package/dist/runtime/vue/plugins/router.js +7 -0
- package/dist/runtime/vue/{stubs.d.ts → stubs/base.d.ts} +4 -5
- package/dist/runtime/vue/{stubs.js → stubs/base.js} +4 -5
- package/dist/runtime/vue/stubs/inertia.d.ts +5 -0
- package/dist/runtime/vue/stubs/inertia.js +10 -0
- package/dist/runtime/vue/stubs/none.d.ts +56 -0
- package/dist/runtime/vue/stubs/none.js +48 -0
- package/dist/runtime/vue/stubs/vue-router.d.ts +2 -0
- package/dist/runtime/vue/stubs/vue-router.js +2 -0
- package/dist/shared/{ui.B77q-Dvh.mjs → ui.Ddb3hKxo.mjs} +511 -81
- package/dist/unplugin.d.mts +14 -0
- package/dist/unplugin.mjs +77 -50
- package/dist/vite.d.mts +2 -3
- package/dist/vite.mjs +1 -1
- package/package.json +64 -34
- package/dist/runtime/inertia/stubs.d.ts +0 -44
- package/dist/runtime/inertia/stubs.js +0 -84
- /package/dist/runtime/{inertia/components → vue/overrides/inertia}/LinkBase.vue +0 -0
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
import { flip, shift, offset, size, autoPlacement, hide, inline } from "@floating-ui/dom";
|
|
2
|
+
import { isArrayOfArray } from "./index.js";
|
|
3
|
+
export function isMarkInSchema(mark, editor) {
|
|
4
|
+
if (!editor?.schema) {
|
|
5
|
+
return false;
|
|
6
|
+
}
|
|
7
|
+
const markName = typeof mark === "string" ? mark : mark.name;
|
|
8
|
+
return editor.schema.spec.marks.get(markName) !== void 0;
|
|
9
|
+
}
|
|
10
|
+
export function isNodeTypeSelected(editor, nodeTypes) {
|
|
11
|
+
if (!editor) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
const { selection } = editor.state;
|
|
15
|
+
const { $from, to } = selection;
|
|
16
|
+
return nodeTypes.some((nodeType) => {
|
|
17
|
+
return editor.state.doc.nodesBetween($from.pos, to, (node) => {
|
|
18
|
+
return node.type.name === nodeType;
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export function isExtensionAvailable(editor, extensionName) {
|
|
23
|
+
if (!editor) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
return editor.extensionManager.extensions.some((ext) => ext.name === extensionName);
|
|
27
|
+
}
|
|
28
|
+
export function createToggleHandler(name) {
|
|
29
|
+
const fnName = `toggle${name.charAt(0).toUpperCase()}${name.slice(1)}`;
|
|
30
|
+
return {
|
|
31
|
+
canExecute: (editor) => editor.can()[fnName](),
|
|
32
|
+
execute: (editor) => editor.chain().focus()[fnName](),
|
|
33
|
+
isActive: (editor) => editor.isActive(name),
|
|
34
|
+
isDisabled: (editor) => isNodeTypeSelected(editor, ["image"]) || editor.isActive("code")
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function createSetHandler(name) {
|
|
38
|
+
const fnName = `set${name.charAt(0).toUpperCase()}${name.slice(1)}`;
|
|
39
|
+
return {
|
|
40
|
+
canExecute: (editor) => editor.can()[fnName](),
|
|
41
|
+
execute: (editor) => editor.chain().focus()[fnName](),
|
|
42
|
+
isActive: (editor) => editor.isActive(name),
|
|
43
|
+
isDisabled: (editor) => isNodeTypeSelected(editor, ["image"]) || editor.isActive("code")
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function createSimpleHandler(name) {
|
|
47
|
+
return {
|
|
48
|
+
canExecute: (editor) => editor.can()[name](),
|
|
49
|
+
execute: (editor) => editor.chain()[name](),
|
|
50
|
+
isActive: () => false,
|
|
51
|
+
isDisabled: void 0
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export function createMarkHandler() {
|
|
55
|
+
return {
|
|
56
|
+
canExecute: (editor, cmd) => editor.can().toggleMark(cmd.mark),
|
|
57
|
+
execute: (editor, cmd) => editor.chain().focus().toggleMark(cmd.mark),
|
|
58
|
+
isActive: (editor, cmd) => editor.isActive(cmd.mark),
|
|
59
|
+
isDisabled: (editor, cmd) => !isMarkInSchema(cmd.mark, editor) || isNodeTypeSelected(editor, ["image"])
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export function createTextAlignHandler() {
|
|
63
|
+
return {
|
|
64
|
+
canExecute: (editor, cmd) => editor.can().setTextAlign(cmd.align),
|
|
65
|
+
execute: (editor, cmd) => editor.chain().focus().setTextAlign(cmd.align),
|
|
66
|
+
isActive: (editor, cmd) => editor.isActive({ textAlign: cmd.align }),
|
|
67
|
+
isDisabled: (editor) => !isExtensionAvailable(editor, "textAlign") || isNodeTypeSelected(editor, ["image", "horizontalRule"])
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export function createHeadingHandler() {
|
|
71
|
+
return {
|
|
72
|
+
canExecute: (editor, cmd) => editor.can().toggleHeading({ level: cmd.level }),
|
|
73
|
+
execute: (editor, cmd) => editor.chain().focus().toggleHeading({ level: cmd.level }),
|
|
74
|
+
isActive: (editor, cmd) => editor.isActive("heading", { level: cmd.level }),
|
|
75
|
+
isDisabled: (editor) => isNodeTypeSelected(editor, ["image"]) || editor.isActive("code")
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export function createLinkHandler() {
|
|
79
|
+
return {
|
|
80
|
+
canExecute: (editor) => {
|
|
81
|
+
return editor.can().setLink({ href: "" }) || editor.can().unsetLink();
|
|
82
|
+
},
|
|
83
|
+
execute: (editor, cmd) => {
|
|
84
|
+
const chain = editor.chain();
|
|
85
|
+
const previousUrl = editor.getAttributes("link").href;
|
|
86
|
+
const hasCode = editor.isActive("code");
|
|
87
|
+
if (previousUrl) {
|
|
88
|
+
return chain.focus().unsetLink();
|
|
89
|
+
}
|
|
90
|
+
const href = cmd?.href || prompt("Enter the URL:");
|
|
91
|
+
if (!href) {
|
|
92
|
+
return chain;
|
|
93
|
+
}
|
|
94
|
+
if (hasCode) {
|
|
95
|
+
return chain.focus().extendMarkRange("code").setLink({ href });
|
|
96
|
+
}
|
|
97
|
+
return chain.focus().setLink({ href });
|
|
98
|
+
},
|
|
99
|
+
isActive: (editor) => editor.isActive("link"),
|
|
100
|
+
isDisabled: (editor) => {
|
|
101
|
+
if (!isExtensionAvailable(editor, "link") || isNodeTypeSelected(editor, ["image"])) {
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
const { selection } = editor.state;
|
|
105
|
+
return selection.empty && !editor.isActive("link");
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
export function createImageHandler() {
|
|
110
|
+
return {
|
|
111
|
+
canExecute: (editor) => {
|
|
112
|
+
return editor.can().setImage({ src: "" });
|
|
113
|
+
},
|
|
114
|
+
execute: (editor, cmd) => {
|
|
115
|
+
const chain = editor.chain().focus();
|
|
116
|
+
if (cmd?.src) {
|
|
117
|
+
return chain.setImage({ src: cmd.src });
|
|
118
|
+
}
|
|
119
|
+
const src = prompt("Enter the image URL:");
|
|
120
|
+
if (src) {
|
|
121
|
+
return chain.setImage({ src });
|
|
122
|
+
}
|
|
123
|
+
return chain;
|
|
124
|
+
},
|
|
125
|
+
isActive: (editor) => editor.isActive("image"),
|
|
126
|
+
isDisabled: (editor) => {
|
|
127
|
+
return !isExtensionAvailable(editor, "image");
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
export function createListHandler(listType) {
|
|
132
|
+
const fnNameMap = {
|
|
133
|
+
bulletList: "toggleBulletList",
|
|
134
|
+
orderedList: "toggleOrderedList",
|
|
135
|
+
taskList: "toggleTaskList"
|
|
136
|
+
};
|
|
137
|
+
const fnName = fnNameMap[listType];
|
|
138
|
+
const listItemType = listType === "taskList" ? "taskItem" : "listItem";
|
|
139
|
+
return {
|
|
140
|
+
canExecute: (editor) => {
|
|
141
|
+
return editor.can()[fnName]() || editor.isActive("bulletList") || editor.isActive("orderedList") || editor.isActive("taskList") || editor.isActive("taskItem") || editor.isActive("listItem");
|
|
142
|
+
},
|
|
143
|
+
execute: (editor) => {
|
|
144
|
+
const { state } = editor;
|
|
145
|
+
const { selection } = state;
|
|
146
|
+
let chain = editor.chain().focus();
|
|
147
|
+
if (selection.node) {
|
|
148
|
+
const node = selection.node;
|
|
149
|
+
const firstChild = node.firstChild?.firstChild;
|
|
150
|
+
const lastChild = node.lastChild?.lastChild;
|
|
151
|
+
const from = firstChild ? selection.from + firstChild.nodeSize : selection.from + 1;
|
|
152
|
+
const to = lastChild ? selection.to - lastChild.nodeSize : selection.to - 1;
|
|
153
|
+
chain = chain.setTextSelection({ from, to }).clearNodes();
|
|
154
|
+
}
|
|
155
|
+
if (editor.isActive(listType)) {
|
|
156
|
+
return chain.liftListItem(listItemType).lift("bulletList").lift("orderedList").lift("taskList").selectTextblockEnd();
|
|
157
|
+
}
|
|
158
|
+
const currentListItemType = editor.isActive("taskList") ? "taskItem" : "listItem";
|
|
159
|
+
if (editor.isActive("bulletList") || editor.isActive("orderedList") || editor.isActive("taskList")) {
|
|
160
|
+
const unwrapped = chain.liftListItem(currentListItemType).lift("bulletList").lift("orderedList").lift("taskList");
|
|
161
|
+
return unwrapped[fnName]().selectTextblockEnd();
|
|
162
|
+
}
|
|
163
|
+
return chain[fnName]().selectTextblockEnd();
|
|
164
|
+
},
|
|
165
|
+
isActive: (editor) => editor.isActive(listType),
|
|
166
|
+
isDisabled: (editor) => {
|
|
167
|
+
if (!isExtensionAvailable(editor, listType)) {
|
|
168
|
+
return true;
|
|
169
|
+
}
|
|
170
|
+
return isNodeTypeSelected(editor, ["image"]) || editor.isActive("code");
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
export function createMoveHandler(direction) {
|
|
175
|
+
return {
|
|
176
|
+
canExecute: (editor, cmd) => {
|
|
177
|
+
if (cmd?.pos == null) return false;
|
|
178
|
+
const node = editor.state.doc.nodeAt(cmd.pos);
|
|
179
|
+
if (!node) return false;
|
|
180
|
+
const $pos = editor.state.doc.resolve(cmd.pos);
|
|
181
|
+
const parent = $pos.parent;
|
|
182
|
+
const index = $pos.index();
|
|
183
|
+
return direction === "up" ? index > 0 : index < parent.childCount - 1;
|
|
184
|
+
},
|
|
185
|
+
execute: (editor, cmd) => {
|
|
186
|
+
if (cmd?.pos == null) return editor.chain();
|
|
187
|
+
const node = editor.state.doc.nodeAt(cmd.pos);
|
|
188
|
+
if (!node) return editor.chain();
|
|
189
|
+
const $pos = editor.state.doc.resolve(cmd.pos);
|
|
190
|
+
const parent = $pos.parent;
|
|
191
|
+
const index = $pos.index();
|
|
192
|
+
if (direction === "up" && index > 0) {
|
|
193
|
+
const prevNode = parent.child(index - 1);
|
|
194
|
+
const targetPos = cmd.pos - prevNode.nodeSize;
|
|
195
|
+
return editor.chain().focus().deleteRange({ from: cmd.pos, to: cmd.pos + node.nodeSize }).insertContentAt(targetPos, node.toJSON());
|
|
196
|
+
}
|
|
197
|
+
if (direction === "down" && index < parent.childCount - 1) {
|
|
198
|
+
const nextNode = parent.child(index + 1);
|
|
199
|
+
const targetPos = cmd.pos + nextNode.nodeSize;
|
|
200
|
+
return editor.chain().focus().deleteRange({ from: cmd.pos, to: cmd.pos + node.nodeSize }).insertContentAt(targetPos, node.toJSON());
|
|
201
|
+
}
|
|
202
|
+
return editor.chain();
|
|
203
|
+
},
|
|
204
|
+
isActive: () => false,
|
|
205
|
+
isDisabled: void 0
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
export function createHandlers() {
|
|
209
|
+
return {
|
|
210
|
+
mark: createMarkHandler(),
|
|
211
|
+
textAlign: createTextAlignHandler(),
|
|
212
|
+
heading: createHeadingHandler(),
|
|
213
|
+
link: createLinkHandler(),
|
|
214
|
+
image: createImageHandler(),
|
|
215
|
+
blockquote: createToggleHandler("blockquote"),
|
|
216
|
+
bulletList: createListHandler("bulletList"),
|
|
217
|
+
orderedList: createListHandler("orderedList"),
|
|
218
|
+
taskList: createListHandler("taskList"),
|
|
219
|
+
codeBlock: createToggleHandler("codeBlock"),
|
|
220
|
+
horizontalRule: createSetHandler("horizontalRule"),
|
|
221
|
+
paragraph: createSetHandler("paragraph"),
|
|
222
|
+
undo: createSimpleHandler("undo"),
|
|
223
|
+
redo: createSimpleHandler("redo"),
|
|
224
|
+
clearFormatting: {
|
|
225
|
+
canExecute: (editor, cmd) => {
|
|
226
|
+
if (cmd?.pos != null) {
|
|
227
|
+
const node = editor.state.doc.nodeAt(cmd.pos);
|
|
228
|
+
return !!node;
|
|
229
|
+
}
|
|
230
|
+
return editor.can().clearNodes() || editor.can().unsetAllMarks();
|
|
231
|
+
},
|
|
232
|
+
execute: (editor, cmd) => {
|
|
233
|
+
if (cmd?.pos != null) {
|
|
234
|
+
const node = editor.state.doc.nodeAt(cmd.pos);
|
|
235
|
+
if (!node) return editor.chain();
|
|
236
|
+
const from = cmd.pos + 1;
|
|
237
|
+
const to = cmd.pos + node.nodeSize - 1;
|
|
238
|
+
return editor.chain().focus().setTextSelection({ from, to }).clearNodes().unsetAllMarks();
|
|
239
|
+
}
|
|
240
|
+
return editor.chain().focus().clearNodes().unsetAllMarks();
|
|
241
|
+
},
|
|
242
|
+
isActive: () => false,
|
|
243
|
+
isDisabled: void 0
|
|
244
|
+
},
|
|
245
|
+
duplicate: {
|
|
246
|
+
canExecute: (editor, cmd) => {
|
|
247
|
+
if (cmd?.pos == null) return false;
|
|
248
|
+
const node = editor.state.doc.nodeAt(cmd.pos);
|
|
249
|
+
return !!node;
|
|
250
|
+
},
|
|
251
|
+
execute: (editor, cmd) => {
|
|
252
|
+
if (cmd?.pos == null) return editor.chain();
|
|
253
|
+
const node = editor.state.doc.nodeAt(cmd.pos);
|
|
254
|
+
if (!node) return editor.chain();
|
|
255
|
+
return editor.chain().focus().insertContentAt(cmd.pos + node.nodeSize, node.toJSON());
|
|
256
|
+
},
|
|
257
|
+
isActive: () => false,
|
|
258
|
+
isDisabled: void 0
|
|
259
|
+
},
|
|
260
|
+
delete: {
|
|
261
|
+
canExecute: (editor, cmd) => {
|
|
262
|
+
if (cmd?.pos == null) return false;
|
|
263
|
+
const node = editor.state.doc.nodeAt(cmd.pos);
|
|
264
|
+
return !!node;
|
|
265
|
+
},
|
|
266
|
+
execute: (editor, cmd) => {
|
|
267
|
+
if (cmd?.pos == null) return editor.chain();
|
|
268
|
+
const node = editor.state.doc.nodeAt(cmd.pos);
|
|
269
|
+
if (!node) return editor.chain();
|
|
270
|
+
return editor.chain().focus().deleteRange({ from: cmd.pos, to: cmd.pos + node.nodeSize });
|
|
271
|
+
},
|
|
272
|
+
isActive: () => false,
|
|
273
|
+
isDisabled: void 0
|
|
274
|
+
},
|
|
275
|
+
moveUp: createMoveHandler("up"),
|
|
276
|
+
moveDown: createMoveHandler("down"),
|
|
277
|
+
suggestion: {
|
|
278
|
+
canExecute: () => true,
|
|
279
|
+
execute: (editor, cmd) => {
|
|
280
|
+
const { state } = editor;
|
|
281
|
+
const { selection } = state;
|
|
282
|
+
const { $from } = selection;
|
|
283
|
+
if (cmd?.pos !== void 0) {
|
|
284
|
+
const node = state.doc.nodeAt(cmd.pos);
|
|
285
|
+
if (node) {
|
|
286
|
+
const insertPos2 = cmd.pos + node.nodeSize;
|
|
287
|
+
return editor.chain().focus().insertContentAt(insertPos2, { type: "paragraph", content: [{ type: "text", text: "/" }] });
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
const currentNode = $from.node($from.depth);
|
|
291
|
+
const currentNodePos = $from.before($from.depth);
|
|
292
|
+
const insertPos = currentNodePos + currentNode.nodeSize;
|
|
293
|
+
return editor.chain().focus().insertContentAt(insertPos, { type: "paragraph", content: [{ type: "text", text: "/" }] });
|
|
294
|
+
},
|
|
295
|
+
isActive: () => false,
|
|
296
|
+
isDisabled: void 0
|
|
297
|
+
},
|
|
298
|
+
mention: {
|
|
299
|
+
canExecute: () => true,
|
|
300
|
+
execute: (editor) => {
|
|
301
|
+
const { state } = editor;
|
|
302
|
+
const { selection } = state;
|
|
303
|
+
const { $from } = selection;
|
|
304
|
+
const textBefore = $from.parent.textBetween(Math.max(0, $from.parentOffset - 1), $from.parentOffset, void 0, " ");
|
|
305
|
+
const needsSpace = textBefore && textBefore !== " ";
|
|
306
|
+
return editor.chain().focus().insertContent(needsSpace ? " @" : "@");
|
|
307
|
+
},
|
|
308
|
+
isActive: () => false,
|
|
309
|
+
isDisabled: void 0
|
|
310
|
+
},
|
|
311
|
+
emoji: {
|
|
312
|
+
canExecute: () => true,
|
|
313
|
+
execute: (editor) => {
|
|
314
|
+
const { state } = editor;
|
|
315
|
+
const { selection } = state;
|
|
316
|
+
const { $from } = selection;
|
|
317
|
+
const textBefore = $from.parent.textBetween(Math.max(0, $from.parentOffset - 1), $from.parentOffset, void 0, " ");
|
|
318
|
+
const needsSpace = textBefore && textBefore !== " ";
|
|
319
|
+
return editor.chain().focus().insertContent(needsSpace ? " :" : ":");
|
|
320
|
+
},
|
|
321
|
+
isActive: () => false,
|
|
322
|
+
isDisabled: void 0
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
export function mapEditorItems(editor, items, customHandlers) {
|
|
327
|
+
const handlers = { ...createHandlers(), ...customHandlers };
|
|
328
|
+
if (isArrayOfArray(items)) {
|
|
329
|
+
return items.map(
|
|
330
|
+
(group) => mapEditorItems(editor, group, customHandlers)
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
return items.filter(Boolean).map((item) => {
|
|
334
|
+
if ("type" in item) {
|
|
335
|
+
return item;
|
|
336
|
+
}
|
|
337
|
+
const { kind, children, ...rest } = item;
|
|
338
|
+
const processedChildren = children?.length ? mapEditorItems(editor, children, customHandlers) : void 0;
|
|
339
|
+
if (kind) {
|
|
340
|
+
const handler = handlers[kind];
|
|
341
|
+
if (!handler) {
|
|
342
|
+
return {
|
|
343
|
+
...rest,
|
|
344
|
+
children: processedChildren
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
return {
|
|
348
|
+
...rest,
|
|
349
|
+
children: processedChildren,
|
|
350
|
+
disabled: handler.isDisabled?.(editor, item) || !handler.canExecute(editor, item),
|
|
351
|
+
active: handler.isActive(editor, item),
|
|
352
|
+
onSelect: () => handler.execute(editor, item).run()
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
return { ...rest, children: processedChildren };
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
export function buildFloatingUIMiddleware(options) {
|
|
359
|
+
const middleware = [];
|
|
360
|
+
if (options.offset) {
|
|
361
|
+
middleware.push(offset(typeof options.offset !== "boolean" ? options.offset : void 0));
|
|
362
|
+
}
|
|
363
|
+
if (options.flip) {
|
|
364
|
+
middleware.push(flip(typeof options.flip !== "boolean" ? options.flip : void 0));
|
|
365
|
+
}
|
|
366
|
+
if (options.shift) {
|
|
367
|
+
middleware.push(shift(typeof options.shift !== "boolean" ? options.shift : void 0));
|
|
368
|
+
}
|
|
369
|
+
if (options.size) {
|
|
370
|
+
middleware.push(size(typeof options.size !== "boolean" ? options.size : void 0));
|
|
371
|
+
}
|
|
372
|
+
if (options.autoPlacement) {
|
|
373
|
+
middleware.push(autoPlacement(typeof options.autoPlacement !== "boolean" ? options.autoPlacement : void 0));
|
|
374
|
+
}
|
|
375
|
+
if (options.hide) {
|
|
376
|
+
middleware.push(hide(typeof options.hide !== "boolean" ? options.hide : void 0));
|
|
377
|
+
}
|
|
378
|
+
if (options.inline) {
|
|
379
|
+
middleware.push(inline(typeof options.inline !== "boolean" ? options.inline : void 0));
|
|
380
|
+
}
|
|
381
|
+
return middleware;
|
|
382
|
+
}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
const htmlEscapes = {
|
|
2
|
+
"&": "&",
|
|
3
|
+
"<": "<",
|
|
4
|
+
">": ">",
|
|
5
|
+
'"': """,
|
|
6
|
+
"'": "'"
|
|
7
|
+
};
|
|
8
|
+
function escapeHTML(str) {
|
|
9
|
+
return str.replace(/[&<>"']/g, (char) => htmlEscapes[char]);
|
|
10
|
+
}
|
|
11
|
+
function isAlreadyEscaped(str) {
|
|
12
|
+
return /&(?:amp|lt|gt|quot|#39);/.test(str);
|
|
13
|
+
}
|
|
14
|
+
function sanitize(str) {
|
|
15
|
+
if (isAlreadyEscaped(str)) {
|
|
16
|
+
return str;
|
|
17
|
+
}
|
|
18
|
+
return escapeHTML(str);
|
|
19
|
+
}
|
|
1
20
|
function truncateHTMLFromStart(html, maxLength) {
|
|
2
21
|
let truncated = "";
|
|
3
22
|
let totalLength = 0;
|
|
@@ -34,14 +53,14 @@ export function highlight(item, searchTerm, forceKey, omitKeys) {
|
|
|
34
53
|
const lastIndiceNextIndex = region[1] + 1;
|
|
35
54
|
const isMatched = lastIndiceNextIndex - region[0] >= searchTerm.length;
|
|
36
55
|
content += [
|
|
37
|
-
value.substring(nextUnhighlightedRegionStartingIndex, region[0]),
|
|
56
|
+
sanitize(value.substring(nextUnhighlightedRegionStartingIndex, region[0])),
|
|
38
57
|
isMatched && `<mark>`,
|
|
39
|
-
value.substring(region[0], lastIndiceNextIndex),
|
|
58
|
+
sanitize(value.substring(region[0], lastIndiceNextIndex)),
|
|
40
59
|
isMatched && "</mark>"
|
|
41
60
|
].filter(Boolean).join("");
|
|
42
61
|
nextUnhighlightedRegionStartingIndex = lastIndiceNextIndex;
|
|
43
62
|
});
|
|
44
|
-
content += value.substring(nextUnhighlightedRegionStartingIndex);
|
|
63
|
+
content += sanitize(value.substring(nextUnhighlightedRegionStartingIndex));
|
|
45
64
|
const markIndex = content.indexOf("<mark>");
|
|
46
65
|
if (markIndex !== -1) {
|
|
47
66
|
content = truncateHTMLFromStart(content, content.length - markIndex);
|
|
@@ -9,6 +9,7 @@ export declare function isEmpty(value: unknown): boolean;
|
|
|
9
9
|
export declare function getDisplayValue<T extends Array<any>, V>(items: T, value: V | undefined | null, options?: {
|
|
10
10
|
valueKey?: GetItemKeys<T>;
|
|
11
11
|
labelKey?: GetItemKeys<T>;
|
|
12
|
+
by?: string | ((a: any, b: any) => boolean);
|
|
12
13
|
}): string | undefined;
|
|
13
14
|
export declare function isArrayOfArray<A>(item: A[] | A[][]): item is A[][];
|
|
14
15
|
export declare function mergeClasses(appConfigClass?: string | string[], propClass?: string): "" | (string | undefined)[];
|
|
@@ -91,10 +91,10 @@ export function isEmpty(value) {
|
|
|
91
91
|
return false;
|
|
92
92
|
}
|
|
93
93
|
export function getDisplayValue(items, value, options = {}) {
|
|
94
|
-
const { valueKey, labelKey } = options;
|
|
94
|
+
const { valueKey, labelKey, by } = options;
|
|
95
95
|
const foundItem = items.find((item) => {
|
|
96
96
|
const itemValue = typeof item === "object" && item !== null && valueKey ? get(item, valueKey) : item;
|
|
97
|
-
return compare(itemValue, value);
|
|
97
|
+
return compare(itemValue, value, by);
|
|
98
98
|
});
|
|
99
99
|
if (isEmpty(value) && foundItem) {
|
|
100
100
|
return labelKey ? get(foundItem, labelKey) : void 0;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
1
|
+
import type { Ref, MaybeRef } from 'vue';
|
|
2
2
|
import type { Locale, Direction } from '../types/locale';
|
|
3
|
-
import type { MaybeRef } from '@vueuse/core';
|
|
4
3
|
export type TranslatorOption = Record<string, string | number>;
|
|
5
4
|
export type Translator = (path: string, option?: TranslatorOption) => string;
|
|
6
5
|
export type LocaleContext<M> = {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Get estimate size for virtualizers that checks each item individually
|
|
3
|
-
* NOTE: This requires Reka UI to support functions for estimateSize (https://github.com/unovue/reka-ui/pull/2288)
|
|
4
|
-
* Until then, we check if ANY item has a description and use that for all items
|
|
5
3
|
*/
|
|
6
|
-
export declare function getEstimateSize(items: any[], size: 'xs' | 'sm' | 'md' | 'lg' | 'xl', descriptionKey?: string): number;
|
|
4
|
+
export declare function getEstimateSize(items: any[], size: 'xs' | 'sm' | 'md' | 'lg' | 'xl', descriptionKey?: string, hasDescriptionSlot?: boolean): (index: number) => number;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { get } from "./index.js";
|
|
2
|
-
function
|
|
2
|
+
function itemHasDescription(item, descriptionKey) {
|
|
3
3
|
if (typeof item !== "object" || item === null) {
|
|
4
4
|
return false;
|
|
5
5
|
}
|
|
6
6
|
const value = get(item, descriptionKey);
|
|
7
7
|
return value !== void 0 && value !== null && value !== "";
|
|
8
8
|
}
|
|
9
|
-
function getSize(size,
|
|
10
|
-
if (
|
|
9
|
+
function getSize(size, hasDescription) {
|
|
10
|
+
if (hasDescription) {
|
|
11
11
|
return {
|
|
12
12
|
xs: 44,
|
|
13
13
|
sm: 48,
|
|
@@ -24,7 +24,16 @@ function getSize(size, hasDescription2) {
|
|
|
24
24
|
xl: 40
|
|
25
25
|
}[size];
|
|
26
26
|
}
|
|
27
|
-
export function getEstimateSize(items, size, descriptionKey) {
|
|
28
|
-
const
|
|
29
|
-
|
|
27
|
+
export function getEstimateSize(items, size, descriptionKey, hasDescriptionSlot) {
|
|
28
|
+
const sizeWithDescription = getSize(size, true);
|
|
29
|
+
const sizeWithoutDescription = getSize(size, false);
|
|
30
|
+
if (hasDescriptionSlot) {
|
|
31
|
+
return () => sizeWithDescription;
|
|
32
|
+
}
|
|
33
|
+
if (!descriptionKey) {
|
|
34
|
+
return () => sizeWithoutDescription;
|
|
35
|
+
}
|
|
36
|
+
return (index) => {
|
|
37
|
+
return itemHasDescription(items[index], descriptionKey) ? sizeWithDescription : sizeWithoutDescription;
|
|
38
|
+
};
|
|
30
39
|
}
|
|
@@ -2,6 +2,6 @@ import type { IconProps as NuxtIconProps } from '../../types';
|
|
|
2
2
|
export interface IconProps {
|
|
3
3
|
name: NuxtIconProps['name'];
|
|
4
4
|
}
|
|
5
|
-
declare const __VLS_export: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
5
|
declare const _default: typeof __VLS_export;
|
|
7
6
|
export default _default;
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -2,6 +2,6 @@ import type { IconProps as NuxtIconProps } from '../../types';
|
|
|
2
2
|
export interface IconProps {
|
|
3
3
|
name: NuxtIconProps['name'];
|
|
4
4
|
}
|
|
5
|
-
declare const __VLS_export: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
5
|
declare const _default: typeof __VLS_export;
|
|
7
6
|
export default _default;
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { SelectMenuProps, SelectMenuItem } from '../../../types';
|
|
2
2
|
export interface ColorModeSelectProps extends Omit<SelectMenuProps<SelectMenuItem[]>, 'icon' | 'items' | 'modelValue'> {
|
|
3
3
|
}
|
|
4
|
+
declare const _default: typeof __VLS_export;
|
|
5
|
+
export default _default;
|
|
4
6
|
declare const __VLS_export: import("vue").DefineComponent<ColorModeSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSelectProps> & Readonly<{}>, {
|
|
5
7
|
searchInput: boolean | import("../../../types").InputProps;
|
|
6
8
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
-
declare const _default: typeof __VLS_export;
|
|
8
|
-
export default _default;
|
|
@@ -19,6 +19,8 @@ const props = defineProps({
|
|
|
19
19
|
required: { type: Boolean, required: false },
|
|
20
20
|
trailingIcon: { type: null, required: false },
|
|
21
21
|
selectedIcon: { type: null, required: false },
|
|
22
|
+
clear: { type: [Boolean, Object], required: false },
|
|
23
|
+
clearIcon: { type: null, required: false },
|
|
22
24
|
content: { type: Object, required: false },
|
|
23
25
|
arrow: { type: [Boolean, Object], required: false },
|
|
24
26
|
portal: { type: [Boolean, String], required: false, skipCheck: true },
|
|
@@ -27,6 +29,7 @@ const props = defineProps({
|
|
|
27
29
|
labelKey: { type: null, required: false },
|
|
28
30
|
descriptionKey: { type: null, required: false },
|
|
29
31
|
defaultValue: { type: null, required: false },
|
|
32
|
+
modelModifiers: { type: Object, required: false },
|
|
30
33
|
multiple: { type: Boolean, required: false },
|
|
31
34
|
highlight: { type: Boolean, required: false },
|
|
32
35
|
createItem: { type: [Boolean, String, Object], required: false },
|
|
@@ -42,7 +45,9 @@ const props = defineProps({
|
|
|
42
45
|
name: { type: String, required: false },
|
|
43
46
|
resetSearchTermOnBlur: { type: Boolean, required: false },
|
|
44
47
|
resetSearchTermOnSelect: { type: Boolean, required: false },
|
|
48
|
+
resetModelValueOnClear: { type: Boolean, required: false },
|
|
45
49
|
highlightOnHover: { type: Boolean, required: false },
|
|
50
|
+
by: { type: [String, Function], required: false },
|
|
46
51
|
avatar: { type: Object, required: false },
|
|
47
52
|
leading: { type: Boolean, required: false },
|
|
48
53
|
leadingIcon: { type: null, required: false },
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { SelectMenuProps, SelectMenuItem } from '../../../types';
|
|
2
2
|
export interface ColorModeSelectProps extends Omit<SelectMenuProps<SelectMenuItem[]>, 'icon' | 'items' | 'modelValue'> {
|
|
3
3
|
}
|
|
4
|
+
declare const _default: typeof __VLS_export;
|
|
5
|
+
export default _default;
|
|
4
6
|
declare const __VLS_export: import("vue").DefineComponent<ColorModeSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSelectProps> & Readonly<{}>, {
|
|
5
7
|
searchInput: boolean | import("../../../types").InputProps;
|
|
6
8
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
-
declare const _default: typeof __VLS_export;
|
|
8
|
-
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SwitchProps } from '../../../types';
|
|
2
2
|
export interface ColorModeSwitchProps extends Omit<SwitchProps, 'checkedIcon' | 'uncheckedIcon' | 'modelValue'> {
|
|
3
3
|
}
|
|
4
|
-
declare const __VLS_export: import("vue").DefineComponent<ColorModeSwitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSwitchProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
4
|
declare const _default: typeof __VLS_export;
|
|
6
5
|
export default _default;
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<ColorModeSwitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSwitchProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SwitchProps } from '../../../types';
|
|
2
2
|
export interface ColorModeSwitchProps extends Omit<SwitchProps, 'checkedIcon' | 'uncheckedIcon' | 'modelValue'> {
|
|
3
3
|
}
|
|
4
|
-
declare const __VLS_export: import("vue").DefineComponent<ColorModeSwitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSwitchProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
4
|
declare const _default: typeof __VLS_export;
|
|
6
5
|
export default _default;
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<ColorModeSwitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSwitchProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InertiaLinkProps } from '@inertiajs/vue3';
|
|
2
|
-
import type { ButtonHTMLAttributes, AnchorHTMLAttributes } from '
|
|
2
|
+
import type { ButtonHTMLAttributes, AnchorHTMLAttributes } from '../../../types/html';
|
|
3
3
|
export interface LinkProps extends Partial<Omit<InertiaLinkProps, 'href' | 'onClick'>>, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled'>, /** @vue-ignore */ Omit<AnchorHTMLAttributes, 'href' | 'target' | 'rel' | 'type'> {
|
|
4
4
|
/**
|
|
5
5
|
* The element or component this component should render as when not a link.
|
|
@@ -59,14 +59,14 @@ export interface LinkSlots {
|
|
|
59
59
|
active: boolean;
|
|
60
60
|
}): any;
|
|
61
61
|
}
|
|
62
|
+
declare const _default: typeof __VLS_export;
|
|
63
|
+
export default _default;
|
|
62
64
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
|
|
63
|
-
type: "reset" | "submit" | "button";
|
|
64
65
|
as: any;
|
|
66
|
+
type: "reset" | "submit" | "button";
|
|
65
67
|
active: boolean;
|
|
66
68
|
ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
|
|
67
69
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
|
|
68
|
-
declare const _default: typeof __VLS_export;
|
|
69
|
-
export default _default;
|
|
70
70
|
type __VLS_WithSlots<T, S> = T & {
|
|
71
71
|
new (): {
|
|
72
72
|
$slots: S;
|
|
@@ -10,9 +10,9 @@ import { reactiveOmit } from "@vueuse/core";
|
|
|
10
10
|
import { usePage } from "@inertiajs/vue3";
|
|
11
11
|
import { hasProtocol } from "ufo";
|
|
12
12
|
import { useAppConfig } from "#imports";
|
|
13
|
-
import { tv } from "
|
|
14
|
-
import { mergeClasses } from "
|
|
15
|
-
import ULinkBase from "
|
|
13
|
+
import { tv } from "../../../utils/tv";
|
|
14
|
+
import { mergeClasses } from "../../../utils";
|
|
15
|
+
import ULinkBase from "./LinkBase.vue";
|
|
16
16
|
defineOptions({ inheritAttrs: false });
|
|
17
17
|
const props = defineProps({
|
|
18
18
|
as: { type: null, required: false, default: "button" },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InertiaLinkProps } from '@inertiajs/vue3';
|
|
2
|
-
import type { ButtonHTMLAttributes, AnchorHTMLAttributes } from '
|
|
2
|
+
import type { ButtonHTMLAttributes, AnchorHTMLAttributes } from '../../../types/html';
|
|
3
3
|
export interface LinkProps extends Partial<Omit<InertiaLinkProps, 'href' | 'onClick'>>, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled'>, /** @vue-ignore */ Omit<AnchorHTMLAttributes, 'href' | 'target' | 'rel' | 'type'> {
|
|
4
4
|
/**
|
|
5
5
|
* The element or component this component should render as when not a link.
|
|
@@ -59,14 +59,14 @@ export interface LinkSlots {
|
|
|
59
59
|
active: boolean;
|
|
60
60
|
}): any;
|
|
61
61
|
}
|
|
62
|
+
declare const _default: typeof __VLS_export;
|
|
63
|
+
export default _default;
|
|
62
64
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
|
|
63
|
-
type: "reset" | "submit" | "button";
|
|
64
65
|
as: any;
|
|
66
|
+
type: "reset" | "submit" | "button";
|
|
65
67
|
active: boolean;
|
|
66
68
|
ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
|
|
67
69
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
|
|
68
|
-
declare const _default: typeof __VLS_export;
|
|
69
|
-
export default _default;
|
|
70
70
|
type __VLS_WithSlots<T, S> = T & {
|
|
71
71
|
new (): {
|
|
72
72
|
$slots: S;
|