@youcan/celeste 0.9.3 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/celeste.css +1030 -634
- package/dist/cjs/bar-chart.cjs +2 -0
- package/dist/cjs/chart-card.cjs +2 -0
- package/dist/cjs/chart-legend.cjs +2 -0
- package/dist/cjs/chart-plot.cjs +2 -0
- package/dist/cjs/chart-tooltip.cjs +25 -0
- package/dist/cjs/chart.cjs +38 -0
- package/dist/cjs/chunks/BubbleSelect.cjs +5 -6
- package/dist/cjs/chunks/CollapsibleRoot.cjs +3 -4
- package/dist/cjs/chunks/Collection.cjs +3 -4
- package/dist/cjs/chunks/ComboboxContent.cjs +7 -7
- package/dist/cjs/chunks/ComboboxGroup.cjs +4 -5
- package/dist/cjs/chunks/ComboboxInput.cjs +3 -4
- package/dist/cjs/chunks/ComboboxItem.cjs +7 -7
- package/dist/cjs/chunks/ComboboxLabel.cjs +1 -2
- package/dist/cjs/chunks/ComboboxRoot.cjs +17 -14
- package/dist/cjs/chunks/ComboboxSeparator.cjs +1 -2
- package/dist/cjs/chunks/ConfigProvider.cjs +2 -2
- package/dist/cjs/chunks/DialogClose.cjs +1 -2
- package/dist/cjs/chunks/DialogDescription.cjs +1 -2
- package/dist/cjs/chunks/DialogPortal.cjs +10 -10
- package/dist/cjs/chunks/DialogRoot.cjs +3 -4
- package/dist/cjs/chunks/DialogTitle.cjs +1 -2
- package/dist/cjs/chunks/DialogTrigger.cjs +1 -2
- package/dist/cjs/chunks/DismissableLayer.cjs +5 -5
- package/dist/cjs/chunks/DropdownMenuPortal.cjs +2 -3
- package/dist/cjs/chunks/DropdownMenuRoot.cjs +3 -4
- package/dist/cjs/chunks/FocusScope.cjs +7 -7
- package/dist/cjs/chunks/Label.cjs +1 -2
- package/dist/cjs/chunks/MenuAnchor.cjs +1 -2
- package/dist/cjs/chunks/MenuContentImpl.cjs +4 -4
- package/dist/cjs/chunks/MenuGroup.cjs +2 -3
- package/dist/cjs/chunks/MenuItemImpl.cjs +1 -2
- package/dist/cjs/chunks/MenuRoot.cjs +8 -8
- package/dist/cjs/chunks/MenuSub.cjs +3 -4
- package/dist/cjs/chunks/PaginationRoot.cjs +3 -4
- package/dist/cjs/chunks/PinInputRoot.cjs +3 -4
- package/dist/cjs/chunks/PopoverRoot.cjs +3 -4
- package/dist/cjs/chunks/PopperAnchor.cjs +1 -2
- package/dist/cjs/chunks/PopperArrow.cjs +2 -3
- package/dist/cjs/chunks/PopperContent.cjs +263 -298
- package/dist/cjs/chunks/PopperRoot.cjs +2 -3
- package/dist/cjs/chunks/Presence.cjs +7 -7
- package/dist/cjs/chunks/Primitive.cjs +5 -6
- package/dist/cjs/chunks/ProgressIndicator.cjs +4 -5
- package/dist/cjs/chunks/RadioGroupRoot.cjs +3 -4
- package/dist/cjs/chunks/RovingFocusGroup.cjs +6 -6
- package/dist/cjs/chunks/RovingFocusItem.cjs +1 -2
- package/dist/cjs/chunks/SelectGroup.cjs +2 -3
- package/dist/cjs/chunks/SelectItemAlignedPosition.cjs +9 -9
- package/dist/cjs/chunks/TabsRoot.cjs +4 -5
- package/dist/cjs/chunks/Teleport.cjs +2 -3
- package/dist/cjs/chunks/ToggleGroupRoot.cjs +4 -5
- package/dist/cjs/chunks/TooltipProvider.cjs +2 -3
- package/dist/cjs/chunks/TooltipRoot.cjs +5 -5
- package/dist/cjs/chunks/VisuallyHidden.cjs +1 -2
- package/dist/cjs/chunks/VisuallyHiddenInput.cjs +4 -4
- package/dist/cjs/chunks/alert.cjs +17 -12
- package/dist/cjs/chunks/alpha-slider.cjs +1 -4
- package/dist/cjs/chunks/badge.cjs +18 -13
- package/dist/cjs/chunks/bar-chart.cjs +10322 -0
- package/dist/cjs/chunks/button.cjs +12 -7
- package/dist/cjs/chunks/calendar.cjs +39 -33
- package/dist/cjs/chunks/chart-card.cjs +69 -0
- package/dist/cjs/chunks/chart-legend.cjs +88 -0
- package/dist/cjs/chunks/chart-plot.cjs +92 -0
- package/dist/cjs/chunks/checkbox-card.cjs +15 -10
- package/dist/cjs/chunks/checkbox-label.cjs +11 -6
- package/dist/cjs/chunks/checkbox.cjs +18 -12
- package/dist/cjs/chunks/clamp.cjs +1 -1
- package/dist/cjs/chunks/collapsible-content.cjs +9 -4
- package/dist/cjs/chunks/collapsible-trigger.cjs +1 -2
- package/dist/cjs/chunks/collapsible.cjs +0 -1
- package/dist/cjs/chunks/color-area.cjs +3 -4
- package/dist/cjs/chunks/color-picker.cjs +69 -42
- package/dist/cjs/chunks/color-swatch.cjs +4 -5
- package/dist/cjs/chunks/combobox-anchor.cjs +11 -5
- package/dist/cjs/chunks/combobox-empty.cjs +10 -5
- package/dist/cjs/chunks/combobox-group.cjs +11 -6
- package/dist/cjs/chunks/combobox-input.cjs +11 -6
- package/dist/cjs/chunks/combobox-item.cjs +23 -17
- package/dist/cjs/chunks/combobox-list.cjs +14 -8
- package/dist/cjs/chunks/combobox-root.cjs +2 -3
- package/dist/cjs/chunks/combobox-separator.cjs +9 -4
- package/dist/cjs/chunks/combobox-trigger.cjs +14 -8
- package/dist/cjs/chunks/combobox.cjs +14 -14
- package/dist/cjs/chunks/compact-button.cjs +13 -8
- package/dist/cjs/chunks/components.cjs +20 -4
- package/dist/cjs/chunks/content-divider.cjs +14 -9
- package/dist/cjs/chunks/counter-input.cjs +145 -111
- package/dist/cjs/chunks/createContext.cjs +1 -2
- package/dist/cjs/chunks/date-picker.cjs +14 -9
- package/dist/cjs/chunks/digit-input-group.cjs +12 -6
- package/dist/cjs/chunks/digit-input-slot.cjs +13 -7
- package/dist/cjs/chunks/digit-input.cjs +13 -7
- package/dist/cjs/chunks/dist.cjs +120 -230
- package/dist/cjs/chunks/dist2.cjs +459 -15492
- package/dist/cjs/chunks/dist3.cjs +16177 -0
- package/dist/cjs/chunks/dropdown-menu-content.cjs +15 -9
- package/dist/cjs/chunks/dropdown-menu-group.cjs +3 -4
- package/dist/cjs/chunks/dropdown-menu-item.cjs +13 -7
- package/dist/cjs/chunks/dropdown-menu-label.cjs +13 -7
- package/dist/cjs/chunks/dropdown-menu-separator.cjs +11 -6
- package/dist/cjs/chunks/dropdown-menu-sub-content.cjs +13 -7
- package/dist/cjs/chunks/dropdown-menu-sub-trigger.cjs +13 -7
- package/dist/cjs/chunks/dropdown-menu-sub.cjs +2 -3
- package/dist/cjs/chunks/dropdown-menu-trigger.cjs +3 -4
- package/dist/cjs/chunks/dropdown-menu.cjs +11 -5
- package/dist/cjs/chunks/extra-settings.cjs +3 -7
- package/dist/cjs/chunks/fancy-button.cjs +12 -7
- package/dist/cjs/chunks/file-upload-area.cjs +24 -17
- package/dist/cjs/chunks/getActiveElement.cjs +1 -1
- package/dist/cjs/chunks/handleAndDispatchCustomEvent.cjs +1 -1
- package/dist/cjs/chunks/hint-text.cjs +13 -8
- package/dist/cjs/chunks/hue-slider.cjs +3 -6
- package/dist/cjs/chunks/isValueEqualOrExist.cjs +1 -1
- package/dist/cjs/chunks/label2.cjs +15 -10
- package/dist/cjs/chunks/link-bubble.cjs +12 -15
- package/dist/cjs/chunks/link-button.cjs +14 -9
- package/dist/cjs/chunks/menus.cjs +236 -42
- package/dist/cjs/chunks/modal-body.cjs +9 -4
- package/dist/cjs/chunks/modal-close.cjs +0 -1
- package/dist/cjs/chunks/modal-content.cjs +18 -6
- package/dist/cjs/chunks/modal-footer.cjs +9 -4
- package/dist/cjs/chunks/modal-header.cjs +18 -13
- package/dist/cjs/chunks/modal-trigger.cjs +0 -1
- package/dist/cjs/chunks/modal.cjs +0 -1
- package/dist/cjs/chunks/nullish.cjs +1 -1
- package/dist/cjs/chunks/ohash.D__AXeF1.cjs +1 -1
- package/dist/cjs/chunks/pagination-content.cjs +14 -9
- package/dist/cjs/chunks/pagination-ellipsis.cjs +12 -7
- package/dist/cjs/chunks/pagination-first.cjs +11 -5
- package/dist/cjs/chunks/pagination-item.cjs +10 -5
- package/dist/cjs/chunks/pagination-last.cjs +11 -5
- package/dist/cjs/chunks/pagination-next.cjs +11 -5
- package/dist/cjs/chunks/pagination-previous.cjs +11 -5
- package/dist/cjs/chunks/pagination.cjs +12 -6
- package/dist/cjs/chunks/popover-content.cjs +27 -21
- package/dist/cjs/chunks/popover-trigger.cjs +3 -4
- package/dist/cjs/chunks/popover.cjs +0 -1
- package/dist/cjs/chunks/progress-bar.cjs +14 -9
- package/dist/cjs/chunks/progress-circle.cjs +10 -5
- package/dist/cjs/chunks/radio-group-card.cjs +15 -10
- package/dist/cjs/chunks/radio-group-item.cjs +15 -9
- package/dist/cjs/chunks/radio-group-label.cjs +11 -6
- package/dist/cjs/chunks/radio-group.cjs +9 -3
- package/dist/cjs/chunks/range-calendar.cjs +56 -47
- package/dist/cjs/chunks/range-picker.cjs +19 -14
- package/dist/cjs/chunks/rich-editor.cjs +1130 -262
- package/dist/cjs/chunks/{chunk.cjs → rolldown-runtime.cjs} +8 -1
- package/dist/cjs/chunks/scroll-area.cjs +13 -8
- package/dist/cjs/chunks/scroll-bar.cjs +43 -29
- package/dist/cjs/chunks/segmented-control-item.cjs +12 -7
- package/dist/cjs/chunks/segmented-control.cjs +11 -5
- package/dist/cjs/chunks/select-content.cjs +16 -10
- package/dist/cjs/chunks/select-group.cjs +0 -1
- package/dist/cjs/chunks/select-icon.cjs +9 -4
- package/dist/cjs/chunks/select-item.cjs +17 -11
- package/dist/cjs/chunks/select-label.cjs +10 -5
- package/dist/cjs/chunks/select-separator.cjs +10 -5
- package/dist/cjs/chunks/select-trigger.cjs +12 -7
- package/dist/cjs/chunks/select-value.cjs +10 -5
- package/dist/cjs/chunks/select.cjs +9 -3
- package/dist/cjs/chunks/sheet-close.cjs +9 -4
- package/dist/cjs/chunks/sheet-content.cjs +13 -7
- package/dist/cjs/chunks/sheet-description.cjs +11 -6
- package/dist/cjs/chunks/sheet-footer.cjs +9 -4
- package/dist/cjs/chunks/sheet-header.cjs +9 -4
- package/dist/cjs/chunks/sheet-title.cjs +11 -6
- package/dist/cjs/chunks/sheet-trigger.cjs +0 -1
- package/dist/cjs/chunks/sheet.cjs +0 -1
- package/dist/cjs/chunks/sidebar-content.cjs +7 -2
- package/dist/cjs/chunks/sidebar-element.cjs +8 -3
- package/dist/cjs/chunks/sidebar-footer.cjs +7 -2
- package/dist/cjs/chunks/sidebar-group-content.cjs +9 -4
- package/dist/cjs/chunks/sidebar-group-label.cjs +9 -4
- package/dist/cjs/chunks/sidebar-group.cjs +7 -2
- package/dist/cjs/chunks/sidebar-header.cjs +7 -2
- package/dist/cjs/chunks/sidebar-menu-action.cjs +10 -5
- package/dist/cjs/chunks/sidebar-menu-badge.cjs +11 -6
- package/dist/cjs/chunks/sidebar-menu-button.cjs +11 -6
- package/dist/cjs/chunks/sidebar-menu-item.cjs +7 -2
- package/dist/cjs/chunks/sidebar-menu-sub-button.cjs +12 -7
- package/dist/cjs/chunks/sidebar-menu-sub-item.cjs +7 -2
- package/dist/cjs/chunks/sidebar-menu-sub.cjs +7 -2
- package/dist/cjs/chunks/sidebar-menu.cjs +7 -2
- package/dist/cjs/chunks/sidebar-provider.cjs +14 -8
- package/dist/cjs/chunks/sidebar-trigger.cjs +10 -5
- package/dist/cjs/chunks/sidebar.cjs +11 -6
- package/dist/cjs/chunks/slider.cjs +38 -24
- package/dist/cjs/chunks/social-button.cjs +5 -6
- package/dist/cjs/chunks/sonner-alert.cjs +2 -3
- package/dist/cjs/chunks/sonner.cjs +4 -4
- package/dist/cjs/chunks/status-badge.cjs +13 -8
- package/dist/cjs/chunks/switch.cjs +13 -7
- package/dist/cjs/chunks/tab-menu-content.cjs +10 -5
- package/dist/cjs/chunks/tab-menu-item.cjs +12 -6
- package/dist/cjs/chunks/tab-menu-list.cjs +10 -5
- package/dist/cjs/chunks/tab-menu.cjs +2 -3
- package/dist/cjs/chunks/table-body.cjs +9 -4
- package/dist/cjs/chunks/table-caption.cjs +9 -4
- package/dist/cjs/chunks/table-cell.cjs +9 -4
- package/dist/cjs/chunks/table-footer.cjs +9 -4
- package/dist/cjs/chunks/table-head.cjs +9 -4
- package/dist/cjs/chunks/table-header.cjs +7 -2
- package/dist/cjs/chunks/table-row.cjs +9 -4
- package/dist/cjs/chunks/table.cjs +9 -4
- package/dist/cjs/chunks/table2.cjs +9 -4
- package/dist/cjs/chunks/tag.cjs +16 -11
- package/dist/cjs/chunks/text-input-affix.cjs +9 -4
- package/dist/cjs/chunks/text-input-button.cjs +9 -4
- package/dist/cjs/chunks/text-input.cjs +10 -10
- package/dist/cjs/chunks/textarea.cjs +15 -10
- package/dist/cjs/chunks/tooltip-content.cjs +38 -32
- package/dist/cjs/chunks/tooltip-provider.cjs +0 -1
- package/dist/cjs/chunks/tooltip-root.cjs +2 -2
- package/dist/cjs/chunks/tooltip-trigger.cjs +1 -2
- package/dist/cjs/chunks/tooltip.cjs +17 -11
- package/dist/cjs/chunks/use-color-model.cjs +7 -12
- package/dist/cjs/chunks/useArrowNavigation.cjs +1 -1
- package/dist/cjs/chunks/useCalendar.cjs +669 -598
- package/dist/cjs/chunks/useComposing.cjs +1 -2
- package/dist/cjs/chunks/useDirection.cjs +1 -2
- package/dist/cjs/chunks/useEmitAsProps.cjs +1 -2
- package/dist/cjs/chunks/useFocusGuards.cjs +1 -2
- package/dist/cjs/chunks/useFormControl.cjs +2 -3
- package/dist/cjs/chunks/useForwardExpose.cjs +2 -3
- package/dist/cjs/chunks/useForwardProps.cjs +1 -2
- package/dist/cjs/chunks/useForwardPropsEmits.cjs +1 -2
- package/dist/cjs/chunks/useForwardScopeId.cjs +1 -2
- package/dist/cjs/chunks/useHideOthers.cjs +4 -5
- package/dist/cjs/chunks/useId.cjs +3 -3
- package/dist/cjs/chunks/useKbd.cjs +1 -1
- package/dist/cjs/chunks/useLocale.cjs +1 -2
- package/dist/cjs/chunks/useNonce.cjs +1 -2
- package/dist/cjs/chunks/usePrimitiveElement.cjs +2 -3
- package/dist/cjs/chunks/useSize.cjs +2 -3
- package/dist/cjs/chunks/useTypeahead.cjs +1 -1
- package/dist/cjs/chunks/utils.cjs +1 -1
- package/dist/cjs/chunks/utils2.cjs +1 -1
- package/dist/cjs/chunks/utils3.cjs +1 -1
- package/dist/cjs/color.cjs +1 -3
- package/dist/cjs/command-group.cjs +11 -6
- package/dist/cjs/command-input.cjs +12 -6
- package/dist/cjs/command-item.cjs +10 -4
- package/dist/cjs/command-list.cjs +10 -4
- package/dist/cjs/command-root.cjs +10 -4
- package/dist/cjs/command-separator.cjs +9 -4
- package/dist/cjs/config.cjs +0 -1
- package/dist/cjs/index.cjs +21 -1
- package/dist/cjs/use-chart-motion.cjs +17 -0
- package/dist/cjs/use-delegated-props.cjs +0 -1
- package/dist/cjs/use-locale.cjs +8 -0
- package/dist/cjs/use-sidebar.cjs +1 -1
- package/dist/cjs/use-user-select.cjs +0 -1
- package/dist/components/chart/bar-chart.d.ts +39 -0
- package/dist/components/chart/chart-card.d.ts +26 -0
- package/dist/components/chart/chart-legend.d.ts +32 -0
- package/dist/components/chart/chart-plot.d.ts +35 -0
- package/dist/components/chart/chart-tooltip.d.ts +11 -0
- package/dist/components/chart/index.d.ts +9 -0
- package/dist/components/color-picker/hue-slider.d.ts +1 -4
- package/dist/components/digit-input/digit-input.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/popover/popover-content.d.ts +1 -1
- package/dist/components/progress/progress-bar.d.ts +1 -1
- package/dist/components/text-input/text-input.d.ts +1 -0
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/use-chart-motion.d.ts +7 -0
- package/dist/composables/use-locale.d.ts +2 -0
- package/dist/es/bar-chart.js +2 -0
- package/dist/es/chart-card.js +2 -0
- package/dist/es/chart-legend.js +2 -0
- package/dist/es/chart-plot.js +2 -0
- package/dist/es/chart-tooltip.js +24 -0
- package/dist/es/chart.js +33 -0
- package/dist/es/chunks/BubbleSelect.js +5 -5
- package/dist/es/chunks/CollapsibleRoot.js +3 -3
- package/dist/es/chunks/Collection.js +3 -3
- package/dist/es/chunks/ComboboxContent.js +9 -8
- package/dist/es/chunks/ComboboxGroup.js +4 -4
- package/dist/es/chunks/ComboboxInput.js +3 -3
- package/dist/es/chunks/ComboboxItem.js +7 -6
- package/dist/es/chunks/ComboboxLabel.js +1 -1
- package/dist/es/chunks/ComboboxRoot.js +15 -11
- package/dist/es/chunks/ComboboxSeparator.js +1 -1
- package/dist/es/chunks/ConfigProvider.js +2 -2
- package/dist/es/chunks/DialogClose.js +1 -1
- package/dist/es/chunks/DialogDescription.js +1 -1
- package/dist/es/chunks/DialogPortal.js +10 -9
- package/dist/es/chunks/DialogRoot.js +3 -3
- package/dist/es/chunks/DialogTitle.js +1 -1
- package/dist/es/chunks/DialogTrigger.js +1 -1
- package/dist/es/chunks/DismissableLayer.js +5 -4
- package/dist/es/chunks/DropdownMenuPortal.js +2 -2
- package/dist/es/chunks/DropdownMenuRoot.js +3 -3
- package/dist/es/chunks/FocusScope.js +7 -6
- package/dist/es/chunks/Label.js +1 -1
- package/dist/es/chunks/MenuAnchor.js +1 -1
- package/dist/es/chunks/MenuContentImpl.js +5 -4
- package/dist/es/chunks/MenuGroup.js +2 -2
- package/dist/es/chunks/MenuItemImpl.js +1 -1
- package/dist/es/chunks/MenuRoot.js +6 -5
- package/dist/es/chunks/MenuSub.js +3 -3
- package/dist/es/chunks/PaginationRoot.js +3 -3
- package/dist/es/chunks/PinInputRoot.js +3 -3
- package/dist/es/chunks/PopoverRoot.js +3 -3
- package/dist/es/chunks/PopperAnchor.js +1 -1
- package/dist/es/chunks/PopperArrow.js +3 -3
- package/dist/es/chunks/PopperContent.js +261 -321
- package/dist/es/chunks/PopperRoot.js +2 -2
- package/dist/es/chunks/Presence.js +6 -5
- package/dist/es/chunks/Primitive.js +5 -5
- package/dist/es/chunks/ProgressIndicator.js +4 -4
- package/dist/es/chunks/RadioGroupRoot.js +3 -3
- package/dist/es/chunks/RovingFocusGroup.js +6 -5
- package/dist/es/chunks/RovingFocusItem.js +1 -1
- package/dist/es/chunks/SelectGroup.js +2 -2
- package/dist/es/chunks/SelectItemAlignedPosition.js +10 -9
- package/dist/es/chunks/TabsRoot.js +4 -4
- package/dist/es/chunks/Teleport.js +2 -2
- package/dist/es/chunks/ToggleGroupRoot.js +4 -4
- package/dist/es/chunks/TooltipProvider.js +2 -2
- package/dist/es/chunks/TooltipRoot.js +5 -4
- package/dist/es/chunks/VisuallyHidden.js +1 -1
- package/dist/es/chunks/VisuallyHiddenInput.js +4 -3
- package/dist/es/chunks/alert.js +16 -10
- package/dist/es/chunks/alpha-slider.js +1 -3
- package/dist/es/chunks/badge.js +17 -11
- package/dist/es/chunks/bar-chart.js +10314 -0
- package/dist/es/chunks/button.js +11 -5
- package/dist/es/chunks/calendar.js +39 -32
- package/dist/es/chunks/chart-card.js +63 -0
- package/dist/es/chunks/chart-legend.js +82 -0
- package/dist/es/chunks/chart-plot.js +87 -0
- package/dist/es/chunks/checkbox-card.js +14 -8
- package/dist/es/chunks/checkbox-label.js +10 -4
- package/dist/es/chunks/checkbox.js +18 -11
- package/dist/es/chunks/clamp.js +1 -1
- package/dist/es/chunks/collapsible-content.js +9 -3
- package/dist/es/chunks/collapsible-trigger.js +1 -1
- package/dist/es/chunks/color-area.js +7 -5
- package/dist/es/chunks/color-picker.js +68 -40
- package/dist/es/chunks/color-swatch.js +3 -3
- package/dist/es/chunks/combobox-anchor.js +11 -4
- package/dist/es/chunks/combobox-empty.js +9 -3
- package/dist/es/chunks/combobox-group.js +10 -4
- package/dist/es/chunks/combobox-input.js +10 -4
- package/dist/es/chunks/combobox-item.js +22 -15
- package/dist/es/chunks/combobox-list.js +13 -6
- package/dist/es/chunks/combobox-root.js +1 -1
- package/dist/es/chunks/combobox-separator.js +8 -2
- package/dist/es/chunks/combobox-trigger.js +13 -6
- package/dist/es/chunks/combobox.js +13 -12
- package/dist/es/chunks/compact-button.js +12 -6
- package/dist/es/chunks/components.js +19 -3
- package/dist/es/chunks/content-divider.js +14 -8
- package/dist/es/chunks/counter-input.js +141 -106
- package/dist/es/chunks/createContext.js +1 -1
- package/dist/es/chunks/date-picker.js +13 -7
- package/dist/es/chunks/digit-input-group.js +11 -4
- package/dist/es/chunks/digit-input-slot.js +12 -5
- package/dist/es/chunks/digit-input.js +12 -5
- package/dist/es/chunks/dist.js +90 -205
- package/dist/es/chunks/dist2.js +434 -15275
- package/dist/es/chunks/dist3.js +15890 -0
- package/dist/es/chunks/dropdown-menu-content.js +14 -7
- package/dist/es/chunks/dropdown-menu-group.js +2 -2
- package/dist/es/chunks/dropdown-menu-item.js +12 -5
- package/dist/es/chunks/dropdown-menu-label.js +12 -5
- package/dist/es/chunks/dropdown-menu-separator.js +10 -4
- package/dist/es/chunks/dropdown-menu-sub-content.js +12 -5
- package/dist/es/chunks/dropdown-menu-sub-trigger.js +12 -5
- package/dist/es/chunks/dropdown-menu-sub.js +2 -2
- package/dist/es/chunks/dropdown-menu-trigger.js +2 -2
- package/dist/es/chunks/dropdown-menu.js +10 -3
- package/dist/es/chunks/extra-settings.js +2 -5
- package/dist/es/chunks/fancy-button.js +11 -5
- package/dist/es/chunks/file-upload-area.js +23 -15
- package/dist/es/chunks/getActiveElement.js +1 -1
- package/dist/es/chunks/handleAndDispatchCustomEvent.js +1 -1
- package/dist/es/chunks/hint-text.js +12 -6
- package/dist/es/chunks/hue-slider.js +3 -5
- package/dist/es/chunks/isValueEqualOrExist.js +1 -1
- package/dist/es/chunks/label2.js +14 -8
- package/dist/es/chunks/link-bubble.js +11 -13
- package/dist/es/chunks/link-button.js +13 -7
- package/dist/es/chunks/menus.js +236 -41
- package/dist/es/chunks/modal-body.js +8 -2
- package/dist/es/chunks/modal-content.js +17 -4
- package/dist/es/chunks/modal-footer.js +8 -2
- package/dist/es/chunks/modal-header.js +17 -11
- package/dist/es/chunks/nullish.js +1 -1
- package/dist/es/chunks/ohash.D__AXeF1.js +1 -1
- package/dist/es/chunks/pagination-content.js +12 -6
- package/dist/es/chunks/pagination-ellipsis.js +10 -4
- package/dist/es/chunks/pagination-first.js +11 -4
- package/dist/es/chunks/pagination-item.js +9 -3
- package/dist/es/chunks/pagination-last.js +11 -4
- package/dist/es/chunks/pagination-next.js +11 -4
- package/dist/es/chunks/pagination-previous.js +11 -4
- package/dist/es/chunks/pagination.js +11 -4
- package/dist/es/chunks/popover-content.js +28 -21
- package/dist/es/chunks/popover-trigger.js +2 -2
- package/dist/es/chunks/progress-bar.js +13 -7
- package/dist/es/chunks/progress-circle.js +9 -3
- package/dist/es/chunks/radio-group-card.js +14 -8
- package/dist/es/chunks/radio-group-item.js +15 -8
- package/dist/es/chunks/radio-group-label.js +10 -4
- package/dist/es/chunks/radio-group.js +9 -2
- package/dist/es/chunks/range-calendar.js +56 -46
- package/dist/es/chunks/range-picker.js +19 -13
- package/dist/es/chunks/rich-editor.js +1129 -260
- package/dist/es/chunks/rolldown-runtime.js +34 -0
- package/dist/es/chunks/scroll-area.js +12 -6
- package/dist/es/chunks/scroll-bar.js +39 -24
- package/dist/es/chunks/segmented-control-item.js +11 -5
- package/dist/es/chunks/segmented-control.js +10 -3
- package/dist/es/chunks/select-content.js +15 -8
- package/dist/es/chunks/select-icon.js +8 -2
- package/dist/es/chunks/select-item.js +16 -9
- package/dist/es/chunks/select-label.js +9 -3
- package/dist/es/chunks/select-separator.js +9 -3
- package/dist/es/chunks/select-trigger.js +11 -5
- package/dist/es/chunks/select-value.js +9 -3
- package/dist/es/chunks/select.js +9 -2
- package/dist/es/chunks/sheet-close.js +8 -2
- package/dist/es/chunks/sheet-content.js +12 -5
- package/dist/es/chunks/sheet-description.js +9 -3
- package/dist/es/chunks/sheet-footer.js +8 -2
- package/dist/es/chunks/sheet-header.js +8 -2
- package/dist/es/chunks/sheet-title.js +9 -3
- package/dist/es/chunks/sidebar-content.js +7 -1
- package/dist/es/chunks/sidebar-element.js +8 -2
- package/dist/es/chunks/sidebar-footer.js +7 -1
- package/dist/es/chunks/sidebar-group-content.js +8 -2
- package/dist/es/chunks/sidebar-group-label.js +9 -3
- package/dist/es/chunks/sidebar-group.js +7 -1
- package/dist/es/chunks/sidebar-header.js +7 -1
- package/dist/es/chunks/sidebar-menu-action.js +10 -4
- package/dist/es/chunks/sidebar-menu-badge.js +11 -5
- package/dist/es/chunks/sidebar-menu-button.js +10 -4
- package/dist/es/chunks/sidebar-menu-item.js +7 -1
- package/dist/es/chunks/sidebar-menu-sub-button.js +12 -6
- package/dist/es/chunks/sidebar-menu-sub-item.js +7 -1
- package/dist/es/chunks/sidebar-menu-sub.js +7 -1
- package/dist/es/chunks/sidebar-menu.js +7 -1
- package/dist/es/chunks/sidebar-provider.js +10 -3
- package/dist/es/chunks/sidebar-trigger.js +9 -3
- package/dist/es/chunks/sidebar.js +11 -5
- package/dist/es/chunks/slider.js +38 -23
- package/dist/es/chunks/social-button.js +4 -4
- package/dist/es/chunks/sonner-alert.js +1 -1
- package/dist/es/chunks/sonner.js +4 -3
- package/dist/es/chunks/status-badge.js +12 -6
- package/dist/es/chunks/switch.js +13 -6
- package/dist/es/chunks/tab-menu-content.js +9 -3
- package/dist/es/chunks/tab-menu-item.js +11 -4
- package/dist/es/chunks/tab-menu-list.js +9 -3
- package/dist/es/chunks/tab-menu.js +1 -1
- package/dist/es/chunks/table-body.js +8 -2
- package/dist/es/chunks/table-caption.js +8 -2
- package/dist/es/chunks/table-cell.js +8 -2
- package/dist/es/chunks/table-footer.js +8 -2
- package/dist/es/chunks/table-head.js +8 -2
- package/dist/es/chunks/table-header.js +7 -1
- package/dist/es/chunks/table-row.js +8 -2
- package/dist/es/chunks/table.js +8 -2
- package/dist/es/chunks/table2.js +8 -2
- package/dist/es/chunks/tag.js +15 -9
- package/dist/es/chunks/text-input-affix.js +8 -2
- package/dist/es/chunks/text-input-button.js +8 -2
- package/dist/es/chunks/text-input.js +10 -9
- package/dist/es/chunks/textarea.js +14 -8
- package/dist/es/chunks/tooltip-content.js +38 -31
- package/dist/es/chunks/tooltip-root.js +2 -1
- package/dist/es/chunks/tooltip-trigger.js +1 -1
- package/dist/es/chunks/tooltip.js +17 -10
- package/dist/es/chunks/use-color-model.js +7 -11
- package/dist/es/chunks/useArrowNavigation.js +1 -1
- package/dist/es/chunks/useCalendar.js +656 -584
- package/dist/es/chunks/useComposing.js +1 -1
- package/dist/es/chunks/useDirection.js +1 -1
- package/dist/es/chunks/useEmitAsProps.js +1 -1
- package/dist/es/chunks/useFocusGuards.js +2 -2
- package/dist/es/chunks/useFormControl.js +2 -2
- package/dist/es/chunks/useForwardExpose.js +2 -2
- package/dist/es/chunks/useForwardProps.js +1 -1
- package/dist/es/chunks/useForwardPropsEmits.js +1 -1
- package/dist/es/chunks/useForwardScopeId.js +1 -1
- package/dist/es/chunks/useHideOthers.js +4 -4
- package/dist/es/chunks/useId.js +1 -1
- package/dist/es/chunks/useKbd.js +1 -1
- package/dist/es/chunks/useLocale.js +1 -1
- package/dist/es/chunks/useNonce.js +1 -1
- package/dist/es/chunks/usePrimitiveElement.js +2 -2
- package/dist/es/chunks/useSize.js +2 -2
- package/dist/es/chunks/useTypeahead.js +2 -2
- package/dist/es/chunks/utils.js +1 -1
- package/dist/es/chunks/utils2.js +1 -1
- package/dist/es/chunks/utils3.js +1 -1
- package/dist/es/color.js +1 -3
- package/dist/es/command-group.js +10 -4
- package/dist/es/command-input.js +11 -4
- package/dist/es/command-item.js +10 -3
- package/dist/es/command-list.js +10 -3
- package/dist/es/command-root.js +10 -3
- package/dist/es/command-separator.js +8 -2
- package/dist/es/index.js +9 -1
- package/dist/es/use-chart-motion.js +15 -0
- package/dist/es/use-locale.js +8 -0
- package/dist/es/use-sidebar.js +1 -1
- package/dist/utils/chart.d.ts +6 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +46 -44
- package/src/components/chart/bar-chart.vue +383 -0
- package/src/components/chart/chart-card.vue +99 -0
- package/src/components/chart/chart-legend.vue +164 -0
- package/src/components/chart/chart-plot.vue +350 -0
- package/src/components/chart/chart-tooltip.ts +35 -0
- package/src/components/chart/index.ts +13 -0
- package/src/components/chart/stories/bar-chart.stories.ts +319 -0
- package/src/components/color-picker/hue-slider.vue +1 -1
- package/src/components/file-upload/file-upload-area.vue +1 -1
- package/src/components/index.ts +1 -0
- package/src/components/text-input/text-input.vue +1 -0
- package/src/components/tooltip/tooltip-content.vue +5 -1
- package/src/composables/index.ts +2 -0
- package/src/composables/use-chart-motion.ts +18 -0
- package/src/composables/use-locale.ts +8 -0
- package/src/utils/chart.ts +42 -0
- package/src/utils/index.ts +1 -0
- package/dist/cjs/chunks/core.cjs +0 -325
- package/dist/es/chunks/core.js +0 -289
package/dist/es/chunks/menus.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as autoPlacement, c as hide, d as shift, f as size, i as arrow$1, l as inline, o as computePosition, s as flip, u as offset } from "./PopperContent.js";
|
|
2
|
-
import { B as
|
|
2
|
+
import { B as Plugin, E as isTextSelection, H as Selection, I as keydownHandler, J as Slice, M as posToDOMRect, U as SelectionRange, V as PluginKey, W as TextSelection, b as getTextSerializersFromSchema, q as Fragment$1, y as getText, z as NodeSelection } from "./dist3.js";
|
|
3
3
|
import { defineComponent, h, nextTick, onBeforeUnmount, onMounted, ref } from "vue";
|
|
4
|
-
//#region ../../node_modules/.pnpm/prosemirror-tables@1.
|
|
4
|
+
//#region ../../node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-tables/dist/index.js
|
|
5
5
|
var readFromCache;
|
|
6
6
|
var addToCache;
|
|
7
7
|
if (typeof WeakMap != "undefined") {
|
|
@@ -24,6 +24,14 @@ if (typeof WeakMap != "undefined") {
|
|
|
24
24
|
return cache[cachePos++] = value;
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* A table map describes the structure of a given table. To avoid
|
|
29
|
+
* recomputing them all the time, they are cached per table node. To
|
|
30
|
+
* be able to do that, positions saved in the map are relative to the
|
|
31
|
+
* start of the table, rather than the start of the document.
|
|
32
|
+
*
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
27
35
|
var TableMap = class {
|
|
28
36
|
constructor(width, height, map, problems) {
|
|
29
37
|
this.width = width;
|
|
@@ -218,6 +226,9 @@ function freshColWidth(attrs) {
|
|
|
218
226
|
for (let i = 0; i < attrs.colspan; i++) result.push(0);
|
|
219
227
|
return result;
|
|
220
228
|
}
|
|
229
|
+
/**
|
|
230
|
+
* @public
|
|
231
|
+
*/
|
|
221
232
|
function tableNodeTypes(schema) {
|
|
222
233
|
let result = schema.cached.tableNodeTypes;
|
|
223
234
|
if (!result) {
|
|
@@ -230,15 +241,24 @@ function tableNodeTypes(schema) {
|
|
|
230
241
|
return result;
|
|
231
242
|
}
|
|
232
243
|
new PluginKey("selectingCells");
|
|
244
|
+
/**
|
|
245
|
+
* @public
|
|
246
|
+
*/
|
|
233
247
|
function cellAround($pos) {
|
|
234
248
|
for (let d = $pos.depth - 1; d > 0; d--) if ($pos.node(d).type.spec.tableRole == "row") return $pos.node(0).resolve($pos.before(d + 1));
|
|
235
249
|
return null;
|
|
236
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* @public
|
|
253
|
+
*/
|
|
237
254
|
function isInTable(state) {
|
|
238
255
|
const $head = state.selection.$head;
|
|
239
256
|
for (let d = $head.depth; d > 0; d--) if ($head.node(d).type.spec.tableRole == "row") return true;
|
|
240
257
|
return false;
|
|
241
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* @internal
|
|
261
|
+
*/
|
|
242
262
|
function selectionCell(state) {
|
|
243
263
|
const sel = state.selection;
|
|
244
264
|
if ("$anchorCell" in sel && sel.$anchorCell) return sel.$anchorCell.pos > sel.$headCell.pos ? sel.$anchorCell : sel.$headCell;
|
|
@@ -247,6 +267,9 @@ function selectionCell(state) {
|
|
|
247
267
|
if ($cell) return $cell;
|
|
248
268
|
throw new RangeError(`No cell found around position ${sel.head}`);
|
|
249
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* @public
|
|
272
|
+
*/
|
|
250
273
|
function cellNear($pos) {
|
|
251
274
|
for (let after = $pos.nodeAfter, pos = $pos.pos; after; after = after.firstChild, pos++) {
|
|
252
275
|
const role = after.type.spec.tableRole;
|
|
@@ -257,12 +280,21 @@ function cellNear($pos) {
|
|
|
257
280
|
if (role == "cell" || role == "header_cell") return $pos.doc.resolve(pos - before.nodeSize);
|
|
258
281
|
}
|
|
259
282
|
}
|
|
283
|
+
/**
|
|
284
|
+
* @public
|
|
285
|
+
*/
|
|
260
286
|
function pointsAtCell($pos) {
|
|
261
287
|
return $pos.parent.type.spec.tableRole == "row" && !!$pos.nodeAfter;
|
|
262
288
|
}
|
|
289
|
+
/**
|
|
290
|
+
* @internal
|
|
291
|
+
*/
|
|
263
292
|
function inSameTable($cellA, $cellB) {
|
|
264
293
|
return $cellA.depth == $cellB.depth && $cellA.pos >= $cellB.start(-1) && $cellA.pos <= $cellB.end(-1);
|
|
265
294
|
}
|
|
295
|
+
/**
|
|
296
|
+
* @public
|
|
297
|
+
*/
|
|
266
298
|
function nextCell($pos, axis, dir) {
|
|
267
299
|
const table = $pos.node(-1);
|
|
268
300
|
const map = TableMap.get(table);
|
|
@@ -270,6 +302,9 @@ function nextCell($pos, axis, dir) {
|
|
|
270
302
|
const moved = map.nextCell($pos.pos - tableStart, axis, dir);
|
|
271
303
|
return moved == null ? null : $pos.node(0).resolve(tableStart + moved);
|
|
272
304
|
}
|
|
305
|
+
/**
|
|
306
|
+
* @public
|
|
307
|
+
*/
|
|
273
308
|
function removeColSpan(attrs, pos, n = 1) {
|
|
274
309
|
const result = {
|
|
275
310
|
...attrs,
|
|
@@ -282,7 +317,16 @@ function removeColSpan(attrs, pos, n = 1) {
|
|
|
282
317
|
}
|
|
283
318
|
return result;
|
|
284
319
|
}
|
|
285
|
-
|
|
320
|
+
/**
|
|
321
|
+
* A [`Selection`](http://prosemirror.net/docs/ref/#state.Selection)
|
|
322
|
+
* subclass that represents a cell selection spanning part of a table.
|
|
323
|
+
* With the plugin enabled, these will be created when the user
|
|
324
|
+
* selects across cells, and will be drawn by giving selected cells a
|
|
325
|
+
* `selectedCell` CSS class.
|
|
326
|
+
*
|
|
327
|
+
* @public
|
|
328
|
+
*/
|
|
329
|
+
var CellSelection = class CellSelection extends Selection {
|
|
286
330
|
constructor($anchorCell, $headCell = $anchorCell) {
|
|
287
331
|
const table = $anchorCell.node(-1);
|
|
288
332
|
const map = TableMap.get(table);
|
|
@@ -293,7 +337,7 @@ var CellSelection = class _CellSelection extends Selection {
|
|
|
293
337
|
cells.unshift($headCell.pos - tableStart);
|
|
294
338
|
const ranges = cells.map((pos) => {
|
|
295
339
|
const cell = table.nodeAt(pos);
|
|
296
|
-
if (!cell) throw RangeError(`No cell with offset ${pos} found`);
|
|
340
|
+
if (!cell) throw new RangeError(`No cell with offset ${pos} found`);
|
|
297
341
|
const from = tableStart + pos + 1;
|
|
298
342
|
return new SelectionRange(doc.resolve(from), doc.resolve(from + cell.content.size));
|
|
299
343
|
});
|
|
@@ -306,9 +350,9 @@ var CellSelection = class _CellSelection extends Selection {
|
|
|
306
350
|
const $headCell = doc.resolve(mapping.map(this.$headCell.pos));
|
|
307
351
|
if (pointsAtCell($anchorCell) && pointsAtCell($headCell) && inSameTable($anchorCell, $headCell)) {
|
|
308
352
|
const tableChanged = this.$anchorCell.node(-1) != $anchorCell.node(-1);
|
|
309
|
-
if (tableChanged && this.isRowSelection()) return
|
|
310
|
-
else if (tableChanged && this.isColSelection()) return
|
|
311
|
-
else return new
|
|
353
|
+
if (tableChanged && this.isRowSelection()) return CellSelection.rowSelection($anchorCell, $headCell);
|
|
354
|
+
else if (tableChanged && this.isColSelection()) return CellSelection.colSelection($anchorCell, $headCell);
|
|
355
|
+
else return new CellSelection($anchorCell, $headCell);
|
|
312
356
|
}
|
|
313
357
|
return TextSelection.between($anchorCell, $headCell);
|
|
314
358
|
}
|
|
@@ -327,7 +371,7 @@ var CellSelection = class _CellSelection extends Selection {
|
|
|
327
371
|
seen[pos] = true;
|
|
328
372
|
const cellRect = map.findCell(pos);
|
|
329
373
|
let cell = table.nodeAt(pos);
|
|
330
|
-
if (!cell) throw RangeError(`No cell with offset ${pos} found`);
|
|
374
|
+
if (!cell) throw new RangeError(`No cell with offset ${pos} found`);
|
|
331
375
|
const extraLeft = rect.left - cellRect.left;
|
|
332
376
|
const extraRight = cellRect.right - rect.right;
|
|
333
377
|
if (extraLeft > 0 || extraRight > 0) {
|
|
@@ -336,7 +380,7 @@ var CellSelection = class _CellSelection extends Selection {
|
|
|
336
380
|
if (extraRight > 0) attrs = removeColSpan(attrs, attrs.colspan - extraRight, extraRight);
|
|
337
381
|
if (cellRect.left < rect.left) {
|
|
338
382
|
cell = cell.type.createAndFill(attrs);
|
|
339
|
-
if (!cell) throw RangeError(`Could not create cell with attrs ${JSON.stringify(attrs)}`);
|
|
383
|
+
if (!cell) throw new RangeError(`Could not create cell with attrs ${JSON.stringify(attrs)}`);
|
|
340
384
|
} else cell = cell.type.create(attrs, cell.content);
|
|
341
385
|
}
|
|
342
386
|
if (cellRect.top < rect.top || cellRect.bottom > rect.bottom) {
|
|
@@ -395,7 +439,7 @@ var CellSelection = class _CellSelection extends Selection {
|
|
|
395
439
|
if (headRect.top > 0) $headCell = doc.resolve(tableStart + map.map[headRect.left]);
|
|
396
440
|
if (anchorRect.bottom < map.height) $anchorCell = doc.resolve(tableStart + map.map[map.width * (map.height - 1) + anchorRect.right - 1]);
|
|
397
441
|
}
|
|
398
|
-
return new
|
|
442
|
+
return new CellSelection($anchorCell, $headCell);
|
|
399
443
|
}
|
|
400
444
|
isRowSelection() {
|
|
401
445
|
const table = this.$anchorCell.node(-1);
|
|
@@ -409,7 +453,7 @@ var CellSelection = class _CellSelection extends Selection {
|
|
|
409
453
|
return Math.max(anchorRight, headRight) == map.width;
|
|
410
454
|
}
|
|
411
455
|
eq(other) {
|
|
412
|
-
return other instanceof
|
|
456
|
+
return other instanceof CellSelection && other.$anchorCell.pos == this.$anchorCell.pos && other.$headCell.pos == this.$headCell.pos;
|
|
413
457
|
}
|
|
414
458
|
static rowSelection($anchorCell, $headCell = $anchorCell) {
|
|
415
459
|
const table = $anchorCell.node(-1);
|
|
@@ -425,7 +469,7 @@ var CellSelection = class _CellSelection extends Selection {
|
|
|
425
469
|
if (headRect.left > 0) $headCell = doc.resolve(tableStart + map.map[headRect.top * map.width]);
|
|
426
470
|
if (anchorRect.right < map.width) $anchorCell = doc.resolve(tableStart + map.map[map.width * (anchorRect.top + 1) - 1]);
|
|
427
471
|
}
|
|
428
|
-
return new
|
|
472
|
+
return new CellSelection($anchorCell, $headCell);
|
|
429
473
|
}
|
|
430
474
|
toJSON() {
|
|
431
475
|
return {
|
|
@@ -435,10 +479,10 @@ var CellSelection = class _CellSelection extends Selection {
|
|
|
435
479
|
};
|
|
436
480
|
}
|
|
437
481
|
static fromJSON(doc, json) {
|
|
438
|
-
return new
|
|
482
|
+
return new CellSelection(doc.resolve(json.anchor), doc.resolve(json.head));
|
|
439
483
|
}
|
|
440
484
|
static create(doc, anchorCell, headCell = anchorCell) {
|
|
441
|
-
return new
|
|
485
|
+
return new CellSelection(doc.resolve(anchorCell), doc.resolve(headCell));
|
|
442
486
|
}
|
|
443
487
|
getBookmark() {
|
|
444
488
|
return new CellBookmark(this.$anchorCell.pos, this.$headCell.pos);
|
|
@@ -446,13 +490,16 @@ var CellSelection = class _CellSelection extends Selection {
|
|
|
446
490
|
};
|
|
447
491
|
CellSelection.prototype.visible = false;
|
|
448
492
|
Selection.jsonID("cell", CellSelection);
|
|
449
|
-
|
|
493
|
+
/**
|
|
494
|
+
* @public
|
|
495
|
+
*/
|
|
496
|
+
var CellBookmark = class CellBookmark {
|
|
450
497
|
constructor(anchor, head) {
|
|
451
498
|
this.anchor = anchor;
|
|
452
499
|
this.head = head;
|
|
453
500
|
}
|
|
454
501
|
map(mapping) {
|
|
455
|
-
return new
|
|
502
|
+
return new CellBookmark(mapping.map(this.anchor), mapping.map(this.head));
|
|
456
503
|
}
|
|
457
504
|
resolve(doc) {
|
|
458
505
|
const $anchorCell = doc.resolve(this.anchor), $headCell = doc.resolve(this.head);
|
|
@@ -461,6 +508,13 @@ var CellBookmark = class _CellBookmark {
|
|
|
461
508
|
}
|
|
462
509
|
};
|
|
463
510
|
new PluginKey("fix-tables");
|
|
511
|
+
/**
|
|
512
|
+
* Helper to get the selected rectangle in a table, if any. Adds table
|
|
513
|
+
* map, table node, and table start offset to the object for
|
|
514
|
+
* convenience.
|
|
515
|
+
*
|
|
516
|
+
* @public
|
|
517
|
+
*/
|
|
464
518
|
function selectedRect(state) {
|
|
465
519
|
const sel = state.selection;
|
|
466
520
|
const $pos = selectionCell(state);
|
|
@@ -493,7 +547,7 @@ function deprecated_toggleHeader(type) {
|
|
|
493
547
|
} : rect);
|
|
494
548
|
const nodes = cells.map((pos) => rect.table.nodeAt(pos));
|
|
495
549
|
for (let i = 0; i < cells.length; i++) if (nodes[i].type == types.header_cell) tr.setNodeMarkup(rect.tableStart + cells[i], types.cell, nodes[i].attrs);
|
|
496
|
-
if (tr.steps.length
|
|
550
|
+
if (tr.steps.length === 0) for (let i = 0; i < cells.length; i++) tr.setNodeMarkup(rect.tableStart + cells[i], types.header_cell, nodes[i].attrs);
|
|
497
551
|
dispatch(tr);
|
|
498
552
|
}
|
|
499
553
|
return true;
|
|
@@ -512,6 +566,12 @@ function isHeaderEnabledByType(type, rect, types) {
|
|
|
512
566
|
}
|
|
513
567
|
return true;
|
|
514
568
|
}
|
|
569
|
+
/**
|
|
570
|
+
* Toggles between row/column header and normal cells (Only applies to first row/column).
|
|
571
|
+
* For deprecated behavior pass `useDeprecatedLogic` in options with true.
|
|
572
|
+
*
|
|
573
|
+
* @public
|
|
574
|
+
*/
|
|
515
575
|
function toggleHeader(type, options) {
|
|
516
576
|
options = options || { useDeprecatedLogic: false };
|
|
517
577
|
if (options.useDeprecatedLogic) return deprecated_toggleHeader(type);
|
|
@@ -548,6 +608,11 @@ function toggleHeader(type, options) {
|
|
|
548
608
|
toggleHeader("row", { useDeprecatedLogic: true });
|
|
549
609
|
toggleHeader("column", { useDeprecatedLogic: true });
|
|
550
610
|
toggleHeader("cell", { useDeprecatedLogic: true });
|
|
611
|
+
/**
|
|
612
|
+
* Deletes the content of the selected cells, if they are not empty.
|
|
613
|
+
*
|
|
614
|
+
* @public
|
|
615
|
+
*/
|
|
551
616
|
function deleteCellSelection(state, dispatch) {
|
|
552
617
|
const sel = state.selection;
|
|
553
618
|
if (!(sel instanceof CellSelection)) return false;
|
|
@@ -580,6 +645,9 @@ function maybeSetSelection(state, dispatch, selection) {
|
|
|
580
645
|
if (dispatch) dispatch(state.tr.setSelection(selection).scrollIntoView());
|
|
581
646
|
return true;
|
|
582
647
|
}
|
|
648
|
+
/**
|
|
649
|
+
* @internal
|
|
650
|
+
*/
|
|
583
651
|
function arrow(axis, dir) {
|
|
584
652
|
return (state, dispatch, view) => {
|
|
585
653
|
if (!view) return false;
|
|
@@ -632,7 +700,7 @@ function atEndOfCell(view, axis, dir) {
|
|
|
632
700
|
}
|
|
633
701
|
new PluginKey("tableColumnResizing");
|
|
634
702
|
//#endregion
|
|
635
|
-
//#region ../../node_modules/.pnpm/@tiptap+vue-3@3.
|
|
703
|
+
//#region ../../node_modules/.pnpm/@tiptap+vue-3@3.29.2_@floating-ui+dom@1.8.0_@tiptap+core@3.29.2_@tiptap+pm@3.29.2__@tip_82ae703f9716de2fe82106636b634245/node_modules/@tiptap/vue-3/dist/menus/index.js
|
|
636
704
|
function combineDOMRects(rect1, rect2) {
|
|
637
705
|
const top = Math.min(rect1.top, rect2.top);
|
|
638
706
|
const bottom = Math.max(rect1.bottom, rect2.bottom);
|
|
@@ -642,7 +710,7 @@ function combineDOMRects(rect1, rect2) {
|
|
|
642
710
|
return new DOMRect(left, top, width, height);
|
|
643
711
|
}
|
|
644
712
|
var BubbleMenuView = class {
|
|
645
|
-
constructor({ editor, element, view, updateDelay = 250, resizeDelay = 60, shouldShow, appendTo, getReferencedVirtualElement, options }) {
|
|
713
|
+
constructor({ editor, element, view, pluginKey = "bubbleMenu", updateDelay = 250, resizeDelay = 60, shouldShow, appendTo, getReferencedVirtualElement, options }) {
|
|
646
714
|
this.preventHide = false;
|
|
647
715
|
this.isVisible = false;
|
|
648
716
|
this.scrollTarget = window;
|
|
@@ -720,16 +788,30 @@ var BubbleMenuView = class {
|
|
|
720
788
|
this.hide();
|
|
721
789
|
return;
|
|
722
790
|
}
|
|
723
|
-
this.updatePosition();
|
|
724
791
|
this.show();
|
|
792
|
+
this.updatePosition();
|
|
725
793
|
};
|
|
794
|
+
/**
|
|
795
|
+
* Handles the transaction event to update the position of the bubble menu.
|
|
796
|
+
* This allows external code to trigger a position update via:
|
|
797
|
+
* `editor.view.dispatch(editor.state.tr.setMeta(pluginKey, 'updatePosition'))`
|
|
798
|
+
* The `pluginKey` defaults to `bubbleMenu`
|
|
799
|
+
*/
|
|
726
800
|
this.transactionHandler = ({ transaction: tr }) => {
|
|
727
|
-
|
|
801
|
+
const meta = tr.getMeta(this.pluginKey);
|
|
802
|
+
if (meta === "updatePosition") this.updatePosition();
|
|
803
|
+
else if (meta && typeof meta === "object" && meta.type === "updateOptions") this.updateOptions(meta.options);
|
|
804
|
+
else if (meta === "hide") this.hide();
|
|
805
|
+
else if (meta === "show") {
|
|
806
|
+
this.updatePosition();
|
|
807
|
+
this.show();
|
|
808
|
+
}
|
|
728
809
|
};
|
|
729
810
|
var _a;
|
|
730
811
|
this.editor = editor;
|
|
731
812
|
this.element = element;
|
|
732
813
|
this.view = view;
|
|
814
|
+
this.pluginKey = pluginKey;
|
|
733
815
|
this.updateDelay = updateDelay;
|
|
734
816
|
this.resizeDelay = resizeDelay;
|
|
735
817
|
this.appendTo = appendTo;
|
|
@@ -767,10 +849,11 @@ var BubbleMenuView = class {
|
|
|
767
849
|
return middlewares;
|
|
768
850
|
}
|
|
769
851
|
get virtualElement() {
|
|
770
|
-
var _a;
|
|
852
|
+
var _a, _b, _c;
|
|
771
853
|
const { selection } = this.editor.state;
|
|
772
854
|
const referencedVirtualElement = (_a = this.getReferencedVirtualElement) == null ? void 0 : _a.call(this);
|
|
773
855
|
if (referencedVirtualElement) return referencedVirtualElement;
|
|
856
|
+
if (!((_c = (_b = this.view) == null ? void 0 : _b.dom) == null ? void 0 : _c.parentNode)) return;
|
|
774
857
|
const domRect = posToDOMRect(this.view, selection.from, selection.to);
|
|
775
858
|
let virtualElement = {
|
|
776
859
|
getBoundingClientRect: () => domRect,
|
|
@@ -801,13 +884,21 @@ var BubbleMenuView = class {
|
|
|
801
884
|
return virtualElement;
|
|
802
885
|
}
|
|
803
886
|
updatePosition() {
|
|
887
|
+
if (!this.isVisible) return;
|
|
804
888
|
const virtualElement = this.virtualElement;
|
|
805
889
|
if (!virtualElement) return;
|
|
806
890
|
computePosition(virtualElement, this.element, {
|
|
807
891
|
placement: this.floatingUIOptions.placement,
|
|
808
892
|
strategy: this.floatingUIOptions.strategy,
|
|
809
893
|
middleware: this.middlewares
|
|
810
|
-
}).then(({ x, y, strategy }) => {
|
|
894
|
+
}).then(({ x, y, strategy, middlewareData }) => {
|
|
895
|
+
var _a, _b;
|
|
896
|
+
if (!this.isVisible || this.editor.isDestroyed || !this.element.isConnected) return;
|
|
897
|
+
if (((_a = middlewareData.hide) == null ? void 0 : _a.referenceHidden) || ((_b = middlewareData.hide) == null ? void 0 : _b.escaped)) {
|
|
898
|
+
this.element.style.visibility = "hidden";
|
|
899
|
+
return;
|
|
900
|
+
}
|
|
901
|
+
this.element.style.visibility = "visible";
|
|
811
902
|
this.element.style.width = "max-content";
|
|
812
903
|
this.element.style.position = strategy;
|
|
813
904
|
this.element.style.left = `${x}px`;
|
|
@@ -861,6 +952,28 @@ var BubbleMenuView = class {
|
|
|
861
952
|
if (this.floatingUIOptions.onHide) this.floatingUIOptions.onHide();
|
|
862
953
|
this.isVisible = false;
|
|
863
954
|
}
|
|
955
|
+
updateOptions(newProps) {
|
|
956
|
+
var _a;
|
|
957
|
+
if (newProps.updateDelay !== void 0) this.updateDelay = newProps.updateDelay;
|
|
958
|
+
if (newProps.resizeDelay !== void 0) this.resizeDelay = newProps.resizeDelay;
|
|
959
|
+
if (newProps.appendTo !== void 0) this.appendTo = newProps.appendTo;
|
|
960
|
+
if (newProps.getReferencedVirtualElement !== void 0) this.getReferencedVirtualElement = newProps.getReferencedVirtualElement;
|
|
961
|
+
if (newProps.shouldShow !== void 0) {
|
|
962
|
+
if (newProps.shouldShow) this.shouldShow = newProps.shouldShow;
|
|
963
|
+
}
|
|
964
|
+
if (newProps.options !== void 0) {
|
|
965
|
+
const newScrollTarget = (_a = newProps.options.scrollTarget) != null ? _a : window;
|
|
966
|
+
if (newScrollTarget !== this.scrollTarget) {
|
|
967
|
+
this.scrollTarget.removeEventListener("scroll", this.resizeHandler);
|
|
968
|
+
this.scrollTarget = newScrollTarget;
|
|
969
|
+
this.scrollTarget.addEventListener("scroll", this.resizeHandler);
|
|
970
|
+
}
|
|
971
|
+
this.floatingUIOptions = {
|
|
972
|
+
...this.floatingUIOptions,
|
|
973
|
+
...newProps.options
|
|
974
|
+
};
|
|
975
|
+
}
|
|
976
|
+
}
|
|
864
977
|
destroy() {
|
|
865
978
|
this.hide();
|
|
866
979
|
this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: true });
|
|
@@ -888,7 +1001,7 @@ var BubbleMenu = defineComponent({
|
|
|
888
1001
|
props: {
|
|
889
1002
|
pluginKey: {
|
|
890
1003
|
type: [String, Object],
|
|
891
|
-
default:
|
|
1004
|
+
default: void 0
|
|
892
1005
|
},
|
|
893
1006
|
editor: {
|
|
894
1007
|
type: Object,
|
|
@@ -907,7 +1020,7 @@ var BubbleMenu = defineComponent({
|
|
|
907
1020
|
default: () => ({})
|
|
908
1021
|
},
|
|
909
1022
|
appendTo: {
|
|
910
|
-
type: Object,
|
|
1023
|
+
type: [Object, Function],
|
|
911
1024
|
default: void 0
|
|
912
1025
|
},
|
|
913
1026
|
shouldShow: {
|
|
@@ -920,9 +1033,11 @@ var BubbleMenu = defineComponent({
|
|
|
920
1033
|
}
|
|
921
1034
|
},
|
|
922
1035
|
setup(props, { slots, attrs }) {
|
|
1036
|
+
var _a;
|
|
923
1037
|
const root = ref(null);
|
|
1038
|
+
const resolvedPluginKey = (_a = props.pluginKey) != null ? _a : new PluginKey("bubbleMenu");
|
|
924
1039
|
onMounted(() => {
|
|
925
|
-
const { editor, options,
|
|
1040
|
+
const { editor, options, resizeDelay, appendTo, shouldShow, getReferencedVirtualElement, updateDelay } = props;
|
|
926
1041
|
const el = root.value;
|
|
927
1042
|
if (!el) return;
|
|
928
1043
|
el.style.visibility = "hidden";
|
|
@@ -933,7 +1048,7 @@ var BubbleMenu = defineComponent({
|
|
|
933
1048
|
editor,
|
|
934
1049
|
element: el,
|
|
935
1050
|
options,
|
|
936
|
-
pluginKey,
|
|
1051
|
+
pluginKey: resolvedPluginKey,
|
|
937
1052
|
resizeDelay,
|
|
938
1053
|
appendTo,
|
|
939
1054
|
shouldShow,
|
|
@@ -943,22 +1058,23 @@ var BubbleMenu = defineComponent({
|
|
|
943
1058
|
});
|
|
944
1059
|
});
|
|
945
1060
|
onBeforeUnmount(() => {
|
|
946
|
-
const {
|
|
947
|
-
editor.unregisterPlugin(
|
|
1061
|
+
const { editor } = props;
|
|
1062
|
+
editor.unregisterPlugin(resolvedPluginKey);
|
|
948
1063
|
});
|
|
949
1064
|
return () => {
|
|
950
|
-
var
|
|
1065
|
+
var _a2;
|
|
951
1066
|
return h("div", {
|
|
952
1067
|
ref: root,
|
|
953
1068
|
...attrs
|
|
954
|
-
}, (
|
|
1069
|
+
}, (_a2 = slots.default) == null ? void 0 : _a2.call(slots));
|
|
955
1070
|
};
|
|
956
1071
|
}
|
|
957
1072
|
});
|
|
958
1073
|
var FloatingMenuView = class {
|
|
959
|
-
constructor({ editor, element, view, options, appendTo, shouldShow }) {
|
|
1074
|
+
constructor({ editor, element, view, pluginKey = "floatingMenu", updateDelay = 250, resizeDelay = 60, options, appendTo, shouldShow }) {
|
|
960
1075
|
this.preventHide = false;
|
|
961
1076
|
this.isVisible = false;
|
|
1077
|
+
this.scrollTarget = window;
|
|
962
1078
|
this.shouldShow = ({ view, state }) => {
|
|
963
1079
|
const { selection } = state;
|
|
964
1080
|
const { $anchor, empty } = selection;
|
|
@@ -1005,10 +1121,42 @@ var FloatingMenuView = class {
|
|
|
1005
1121
|
if ((event == null ? void 0 : event.relatedTarget) === this.editor.view.dom) return;
|
|
1006
1122
|
this.hide();
|
|
1007
1123
|
};
|
|
1124
|
+
/**
|
|
1125
|
+
* Handles the transaction event to update the position of the floating menu.
|
|
1126
|
+
* This allows external code to trigger a position update via:
|
|
1127
|
+
* `editor.view.dispatch(editor.state.tr.setMeta(pluginKey, 'updatePosition'))`
|
|
1128
|
+
* The `pluginKey` defaults to `floatingMenu`
|
|
1129
|
+
*/
|
|
1130
|
+
this.transactionHandler = ({ transaction: tr }) => {
|
|
1131
|
+
const meta = tr.getMeta(this.pluginKey);
|
|
1132
|
+
if (meta === "updatePosition") this.updatePosition();
|
|
1133
|
+
else if (meta && typeof meta === "object" && meta.type === "updateOptions") this.updateOptions(meta.options);
|
|
1134
|
+
else if (meta === "hide") this.hide();
|
|
1135
|
+
else if (meta === "show") {
|
|
1136
|
+
this.updatePosition();
|
|
1137
|
+
this.show();
|
|
1138
|
+
}
|
|
1139
|
+
};
|
|
1140
|
+
/**
|
|
1141
|
+
* Handles the window resize event to update the position of the floating menu.
|
|
1142
|
+
* It uses a debounce mechanism to prevent excessive updates.
|
|
1143
|
+
* The delay is defined by the `resizeDelay` property.
|
|
1144
|
+
*/
|
|
1145
|
+
this.resizeHandler = () => {
|
|
1146
|
+
if (this.resizeDebounceTimer) clearTimeout(this.resizeDebounceTimer);
|
|
1147
|
+
this.resizeDebounceTimer = window.setTimeout(() => {
|
|
1148
|
+
this.updatePosition();
|
|
1149
|
+
}, this.resizeDelay);
|
|
1150
|
+
};
|
|
1151
|
+
var _a;
|
|
1008
1152
|
this.editor = editor;
|
|
1009
1153
|
this.element = element;
|
|
1010
1154
|
this.view = view;
|
|
1155
|
+
this.pluginKey = pluginKey;
|
|
1156
|
+
this.updateDelay = updateDelay;
|
|
1157
|
+
this.resizeDelay = resizeDelay;
|
|
1011
1158
|
this.appendTo = appendTo;
|
|
1159
|
+
this.scrollTarget = (_a = options == null ? void 0 : options.scrollTarget) != null ? _a : window;
|
|
1012
1160
|
this.floatingUIOptions = {
|
|
1013
1161
|
...this.floatingUIOptions,
|
|
1014
1162
|
...options
|
|
@@ -1018,6 +1166,9 @@ var FloatingMenuView = class {
|
|
|
1018
1166
|
this.element.addEventListener("mousedown", this.mousedownHandler, { capture: true });
|
|
1019
1167
|
this.editor.on("focus", this.focusHandler);
|
|
1020
1168
|
this.editor.on("blur", this.blurHandler);
|
|
1169
|
+
this.editor.on("transaction", this.transactionHandler);
|
|
1170
|
+
window.addEventListener("resize", this.resizeHandler);
|
|
1171
|
+
this.scrollTarget.addEventListener("scroll", this.resizeHandler);
|
|
1021
1172
|
this.update(view, view.state);
|
|
1022
1173
|
if (this.getShouldShow()) {
|
|
1023
1174
|
this.show();
|
|
@@ -1055,7 +1206,30 @@ var FloatingMenuView = class {
|
|
|
1055
1206
|
to
|
|
1056
1207
|
});
|
|
1057
1208
|
}
|
|
1209
|
+
updateOptions(newProps) {
|
|
1210
|
+
var _a;
|
|
1211
|
+
if (newProps.updateDelay !== void 0) this.updateDelay = newProps.updateDelay;
|
|
1212
|
+
if (newProps.resizeDelay !== void 0) this.resizeDelay = newProps.resizeDelay;
|
|
1213
|
+
if (newProps.appendTo !== void 0) this.appendTo = newProps.appendTo;
|
|
1214
|
+
if (newProps.shouldShow !== void 0) {
|
|
1215
|
+
if (newProps.shouldShow) this.shouldShow = newProps.shouldShow;
|
|
1216
|
+
}
|
|
1217
|
+
if (newProps.options !== void 0) {
|
|
1218
|
+
const newScrollTarget = (_a = newProps.options.scrollTarget) != null ? _a : window;
|
|
1219
|
+
if (newScrollTarget !== this.scrollTarget) {
|
|
1220
|
+
this.scrollTarget.removeEventListener("scroll", this.resizeHandler);
|
|
1221
|
+
this.scrollTarget = newScrollTarget;
|
|
1222
|
+
this.scrollTarget.addEventListener("scroll", this.resizeHandler);
|
|
1223
|
+
}
|
|
1224
|
+
this.floatingUIOptions = {
|
|
1225
|
+
...this.floatingUIOptions,
|
|
1226
|
+
...newProps.options
|
|
1227
|
+
};
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1058
1230
|
updatePosition() {
|
|
1231
|
+
var _a, _b;
|
|
1232
|
+
if (!((_b = (_a = this.view) == null ? void 0 : _a.dom) == null ? void 0 : _b.parentNode)) return;
|
|
1059
1233
|
const { selection } = this.editor.state;
|
|
1060
1234
|
const domRect = posToDOMRect(this.view, selection.from, selection.to);
|
|
1061
1235
|
computePosition({
|
|
@@ -1065,7 +1239,13 @@ var FloatingMenuView = class {
|
|
|
1065
1239
|
placement: this.floatingUIOptions.placement,
|
|
1066
1240
|
strategy: this.floatingUIOptions.strategy,
|
|
1067
1241
|
middleware: this.middlewares
|
|
1068
|
-
}).then(({ x, y, strategy }) => {
|
|
1242
|
+
}).then(({ x, y, strategy, middlewareData }) => {
|
|
1243
|
+
var _a2, _b2;
|
|
1244
|
+
if (((_a2 = middlewareData.hide) == null ? void 0 : _a2.referenceHidden) || ((_b2 = middlewareData.hide) == null ? void 0 : _b2.escaped)) {
|
|
1245
|
+
this.element.style.visibility = "hidden";
|
|
1246
|
+
return;
|
|
1247
|
+
}
|
|
1248
|
+
this.element.style.visibility = "visible";
|
|
1069
1249
|
this.element.style.width = "max-content";
|
|
1070
1250
|
this.element.style.position = strategy;
|
|
1071
1251
|
this.element.style.left = `${x}px`;
|
|
@@ -1099,8 +1279,11 @@ var FloatingMenuView = class {
|
|
|
1099
1279
|
destroy() {
|
|
1100
1280
|
this.hide();
|
|
1101
1281
|
this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: true });
|
|
1282
|
+
window.removeEventListener("resize", this.resizeHandler);
|
|
1283
|
+
this.scrollTarget.removeEventListener("scroll", this.resizeHandler);
|
|
1102
1284
|
this.editor.off("focus", this.focusHandler);
|
|
1103
1285
|
this.editor.off("blur", this.blurHandler);
|
|
1286
|
+
this.editor.off("transaction", this.transactionHandler);
|
|
1104
1287
|
if (this.floatingUIOptions.onDestroy) this.floatingUIOptions.onDestroy();
|
|
1105
1288
|
}
|
|
1106
1289
|
};
|
|
@@ -1119,18 +1302,26 @@ defineComponent({
|
|
|
1119
1302
|
props: {
|
|
1120
1303
|
pluginKey: {
|
|
1121
1304
|
type: null,
|
|
1122
|
-
default:
|
|
1305
|
+
default: void 0
|
|
1123
1306
|
},
|
|
1124
1307
|
editor: {
|
|
1125
1308
|
type: Object,
|
|
1126
1309
|
required: true
|
|
1127
1310
|
},
|
|
1311
|
+
updateDelay: {
|
|
1312
|
+
type: Number,
|
|
1313
|
+
default: void 0
|
|
1314
|
+
},
|
|
1315
|
+
resizeDelay: {
|
|
1316
|
+
type: Number,
|
|
1317
|
+
default: void 0
|
|
1318
|
+
},
|
|
1128
1319
|
options: {
|
|
1129
1320
|
type: Object,
|
|
1130
1321
|
default: () => ({})
|
|
1131
1322
|
},
|
|
1132
1323
|
appendTo: {
|
|
1133
|
-
type: Object,
|
|
1324
|
+
type: [Object, Function],
|
|
1134
1325
|
default: void 0
|
|
1135
1326
|
},
|
|
1136
1327
|
shouldShow: {
|
|
@@ -1139,33 +1330,37 @@ defineComponent({
|
|
|
1139
1330
|
}
|
|
1140
1331
|
},
|
|
1141
1332
|
setup(props, { slots, attrs }) {
|
|
1333
|
+
var _a;
|
|
1142
1334
|
const root = ref(null);
|
|
1335
|
+
const resolvedPluginKey = (_a = props.pluginKey) != null ? _a : new PluginKey("floatingMenu");
|
|
1143
1336
|
onMounted(() => {
|
|
1144
|
-
const {
|
|
1337
|
+
const { editor, updateDelay, resizeDelay, options, appendTo, shouldShow } = props;
|
|
1145
1338
|
const el = root.value;
|
|
1146
1339
|
if (!el) return;
|
|
1147
1340
|
el.style.visibility = "hidden";
|
|
1148
1341
|
el.style.position = "absolute";
|
|
1149
1342
|
el.remove();
|
|
1150
1343
|
editor.registerPlugin(FloatingMenuPlugin({
|
|
1151
|
-
pluginKey,
|
|
1344
|
+
pluginKey: resolvedPluginKey,
|
|
1152
1345
|
editor,
|
|
1153
1346
|
element: el,
|
|
1347
|
+
updateDelay,
|
|
1348
|
+
resizeDelay,
|
|
1154
1349
|
options,
|
|
1155
1350
|
appendTo,
|
|
1156
1351
|
shouldShow
|
|
1157
1352
|
}));
|
|
1158
1353
|
});
|
|
1159
1354
|
onBeforeUnmount(() => {
|
|
1160
|
-
const {
|
|
1161
|
-
editor.unregisterPlugin(
|
|
1355
|
+
const { editor } = props;
|
|
1356
|
+
editor.unregisterPlugin(resolvedPluginKey);
|
|
1162
1357
|
});
|
|
1163
1358
|
return () => {
|
|
1164
|
-
var
|
|
1359
|
+
var _a2;
|
|
1165
1360
|
return h("div", {
|
|
1166
1361
|
ref: root,
|
|
1167
1362
|
...attrs
|
|
1168
|
-
}, (
|
|
1363
|
+
}, (_a2 = slots.default) == null ? void 0 : _a2.call(slots));
|
|
1169
1364
|
};
|
|
1170
1365
|
}
|
|
1171
1366
|
});
|
|
@@ -3,9 +3,15 @@ import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-hel
|
|
|
3
3
|
import { createElementBlock, defineComponent, normalizeClass, openBlock, renderSlot, unref } from "vue";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/components/modal/modal-body.vue
|
|
6
|
-
var modal_body_default =
|
|
6
|
+
var modal_body_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "modal-body",
|
|
8
|
-
props: { class: {
|
|
8
|
+
props: { class: { type: [
|
|
9
|
+
Boolean,
|
|
10
|
+
null,
|
|
11
|
+
String,
|
|
12
|
+
Object,
|
|
13
|
+
Array
|
|
14
|
+
] } },
|
|
9
15
|
setup(__props) {
|
|
10
16
|
const props = __props;
|
|
11
17
|
return (_ctx, _cache) => {
|
|
@@ -6,15 +6,27 @@ import { useDelegatedProps } from "../use-delegated-props.js";
|
|
|
6
6
|
import { Transition, createBlock, createVNode, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/components/modal/modal-content.vue
|
|
9
|
-
var modal_content_default =
|
|
9
|
+
var modal_content_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
10
10
|
__name: "modal-content",
|
|
11
11
|
props: {
|
|
12
12
|
forceMount: { type: Boolean },
|
|
13
13
|
disableOutsidePointerEvents: { type: Boolean },
|
|
14
14
|
asChild: { type: Boolean },
|
|
15
15
|
as: {},
|
|
16
|
-
class: {
|
|
17
|
-
|
|
16
|
+
class: { type: [
|
|
17
|
+
Boolean,
|
|
18
|
+
null,
|
|
19
|
+
String,
|
|
20
|
+
Object,
|
|
21
|
+
Array
|
|
22
|
+
] },
|
|
23
|
+
style: { type: [
|
|
24
|
+
Boolean,
|
|
25
|
+
null,
|
|
26
|
+
String,
|
|
27
|
+
Object,
|
|
28
|
+
Array
|
|
29
|
+
] }
|
|
18
30
|
},
|
|
19
31
|
emits: [
|
|
20
32
|
"escapeKeyDown",
|
|
@@ -27,7 +39,8 @@ var modal_content_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/*
|
|
|
27
39
|
setup(__props, { emit: __emit }) {
|
|
28
40
|
const props = __props;
|
|
29
41
|
const emits = __emit;
|
|
30
|
-
const
|
|
42
|
+
const delegatedProps = useDelegatedProps(props, "class");
|
|
43
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
31
44
|
return (_ctx, _cache) => {
|
|
32
45
|
return openBlock(), createBlock(unref(DialogPortal_default), null, {
|
|
33
46
|
default: withCtx(() => [createVNode(unref(DialogOverlay_default), { class: "celeste-modal-overlay" }), createVNode(Transition, { name: "fade" }, {
|