@eightshift/ui-components 8.0.0 → 8.2.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/{Autocomplete-BtRn6klq.js → Autocomplete-CO9aIsTe.js} +45 -34
- package/dist/{Button-9jdCU_L7.js → Button-DO3oQfCq.js} +22 -16
- package/dist/{Dialog-DpHdFPGk.js → Dialog-Bdqjmtt2.js} +393 -243
- package/dist/{Disclosure-B3_qLaUB.js → Disclosure-BTSsPhG9.js} +39 -35
- package/dist/{FocusScope-CZoILo1u.js → FocusScope-Cj6cUR6X.js} +13 -11
- package/dist/{Form-khN5PAN7.js → Form-BWMVEpwR.js} +1 -1
- package/dist/{Heading-V9tM5XWJ.js → Heading-BQje2nS2.js} +3 -3
- package/dist/{Hidden-ZYMtT5BU.js → Hidden-C4Saxkx9.js} +4 -4
- package/dist/{I18nProvider-iRzqGw-D.js → I18nProvider-R_4IDnf9.js} +3 -3
- package/dist/{Label-D8hcesgs.js → Label-C4bJkVti.js} +4 -4
- package/dist/{List-BNOy0zms.js → List-BKcyZ8tT.js} +6 -6
- package/dist/{ListBox-c3TVEPet.js → ListBox-CBvtIFuB.js} +48 -42
- package/dist/{NumberFormatter-CJgo_mTg.js → NumberFormatter-Bwdv413k.js} +8 -3
- package/dist/{PortalProvider-CcgJPJ2x.js → PortalProvider-Dbcc7pHq.js} +2 -2
- package/dist/{RadioGroup-DnE-0ISm.js → RadioGroup-Dxzko0ma.js} +63 -46
- package/dist/{SearchField-D45ndgZB.js → SearchField-zY9JqR1c.js} +34 -31
- package/dist/SelectionIndicator-CyOcB5ps.js +5 -0
- package/dist/SharedElementTransition-D1LPCrSc.js +10 -0
- package/dist/{Slider-BipPsF_i.js → Slider-BXc72kE0.js} +85 -59
- package/dist/{Text-86b6VRkm.js → Text-i-ZK4MiL.js} +3 -3
- package/dist/{VisuallyHidden-CJBnc-Mm.js → VisuallyHidden-CsM0VnV1.js} +4 -4
- package/dist/{animation-DR2fvAP0.js → animation-COc9P6ap.js} +2 -4
- package/dist/assets/fonts/geist-mono-latin-400-normal.woff2 +0 -0
- package/dist/assets/fonts/geist-mono-latin-500-normal.woff2 +0 -0
- package/dist/assets/fonts/geist-mono-latin-700-normal.woff2 +0 -0
- package/dist/assets/fonts/geist-mono-latin-ext-400-normal.woff2 +0 -0
- package/dist/assets/fonts/geist-mono-latin-ext-500-normal.woff2 +0 -0
- package/dist/assets/fonts/geist-mono-latin-ext-700-normal.woff2 +0 -0
- package/dist/assets/fonts/google-sans-flex-latin-ext-full-normal.woff2 +0 -0
- package/dist/assets/fonts/google-sans-flex-latin-full-normal.woff2 +0 -0
- package/dist/assets/fonts/google-sans-flex-symbols-full-normal.woff2 +0 -0
- package/dist/assets/{image-analysis-worker-BuHru-CI.js → image-analysis-worker-CBOB71mx.js} +1 -1
- package/dist/assets/style-admin.css +2 -2
- package/dist/assets/style-editor.css +2 -2
- package/dist/assets/style.css +2 -2
- package/dist/assets/wp-overrides/allow-full-width-blocks.css +1 -1
- package/dist/assets/wp-overrides/fix-label-text-case.css +1 -1
- package/dist/assets/wp-overrides/increase-sidebar-width.css +1 -1
- package/dist/assets/wp-overrides/make-block-messages-nicer.css +1 -1
- package/dist/assets/wp-overrides/replace-fonts.css +1 -1
- package/dist/assets/wp-overrides/restyle-tooltips.css +2 -2
- package/dist/assets/wp-overrides/round-corners.css +1 -1
- package/dist/assets/wp-overrides/unify-button-sizes.css +1 -1
- package/dist/{build-module-Bb_b-FCh.js → build-module-DG6ZK7Ty.js} +6 -131
- package/dist/{button-Bxmw0hqk.js → button-C7mc6eS1.js} +61 -9
- package/dist/{checkbox-BvQwgvc_.js → checkbox-DlG5DILl.js} +49 -55
- package/dist/{color-swatch-D3QlNt5l.js → color-swatch-D6xMLGU-.js} +28 -23
- package/dist/components/animated-visibility/animated-visibility.d.ts +1 -1
- package/dist/components/animated-visibility/animated-visibility.js +5 -3
- package/dist/components/base-control/base-control.d.ts +1 -1
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/base-control/container.d.ts +32 -30
- package/dist/components/base-control/container.js +6 -33
- package/dist/components/breakpoint-preview/breakpoint-preview.d.ts +1 -1
- package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
- package/dist/components/button/button.d.ts +2 -2
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.d.ts +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/color-pickers/color-picker.d.ts +1 -1
- package/dist/components/color-pickers/color-picker.js +8 -8
- package/dist/components/color-pickers/color-swatch.d.ts +1 -1
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.d.ts +2 -1
- package/dist/components/color-pickers/gradient-editor.js +1 -1
- package/dist/components/color-pickers/solid-color-picker.d.ts +1 -1
- package/dist/components/color-pickers/solid-color-picker.js +1 -1
- package/dist/components/component-toggle/component-toggle.d.ts +1 -1
- package/dist/components/component-toggle/component-toggle.js +5 -4
- package/dist/components/container-panel/container-panel.d.ts +1 -1
- package/dist/components/container-panel/container-panel.js +11 -11
- package/dist/components/contextual-help/contextual-help.d.ts +1 -1
- package/dist/components/contextual-help/contextual-help.js +3 -3
- package/dist/components/draggable/draggable-handle.d.ts +1 -1
- package/dist/components/draggable/draggable.d.ts +3 -3
- package/dist/components/draggable/draggable.js +1 -1
- package/dist/components/draggable-list/draggable-list-item.d.ts +2 -2
- package/dist/components/draggable-list/draggable-list.d.ts +3 -3
- package/dist/components/draggable-list/draggable-list.js +10 -10
- package/dist/components/expandable/expandable.d.ts +1 -1
- package/dist/components/expandable/expandable.js +4 -4
- package/dist/components/index.js +16 -16
- package/dist/components/input-field/input-field.d.ts +1 -1
- package/dist/components/input-field/input-field.js +1 -1
- package/dist/components/item-collection/item-collection.d.ts +3 -28
- package/dist/components/item-collection/item-collection.js +7 -7
- package/dist/components/link-input/link-input.d.ts +1 -3
- package/dist/components/link-input/link-input.js +1 -1
- package/dist/components/matrix-align/matrix-align.d.ts +1 -1
- package/dist/components/matrix-align/matrix-align.js +5 -4
- package/dist/components/menu/menu.d.ts +6 -6
- package/dist/components/menu/menu.js +12 -9
- package/dist/components/modal/modal.d.ts +1 -1
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/notice/notice.d.ts +1 -1
- package/dist/components/notice/notice.js +8 -8
- package/dist/components/number-picker/number-picker.d.ts +1 -1
- package/dist/components/number-picker/number-picker.js +1 -1
- package/dist/components/option-select/option-select.d.ts +2 -2
- package/dist/components/option-select/option-select.js +22 -16
- package/dist/components/options-panel/options-panel.d.ts +4 -9
- package/dist/components/options-panel/options-panel.js +10 -19
- package/dist/components/placeholders/file-picker-shell.d.ts +1 -1
- package/dist/components/placeholders/file-picker-shell.js +4 -3
- package/dist/components/placeholders/file-placeholder.d.ts +1 -1
- package/dist/components/placeholders/file-placeholder.js +3 -2
- package/dist/components/placeholders/image-placeholder.d.ts +1 -1
- package/dist/components/placeholders/media-placeholder.d.ts +1 -1
- package/dist/components/popover/popover.d.ts +2 -2
- package/dist/components/popover/popover.js +4 -4
- package/dist/components/portal-provider/portal-provider.d.ts +1 -1
- package/dist/components/portal-provider/portal-provider.js +3 -2
- package/dist/components/radio/radio.d.ts +2 -2
- package/dist/components/radio/radio.js +3 -3
- package/dist/components/repeater/repeater-context.d.ts +0 -1
- package/dist/components/repeater/repeater-item.d.ts +1 -1
- package/dist/components/repeater/repeater-item.js +2 -2
- package/dist/components/repeater/repeater.d.ts +6 -39
- package/dist/components/repeater/repeater.js +9 -12
- package/dist/components/responsive/mini-responsive.d.ts +1 -2
- package/dist/components/responsive/mini-responsive.js +32 -31
- package/dist/components/responsive/responsive-legacy.d.ts +1 -2
- package/dist/components/responsive/responsive-legacy.js +14 -11
- package/dist/components/responsive/responsive.d.ts +1 -2
- package/dist/components/responsive/responsive.js +30 -29
- package/dist/components/responsive-preview/responsive-preview.d.ts +1 -1
- package/dist/components/responsive-preview/responsive-preview.js +4 -4
- package/dist/components/rich-label/rich-label.d.ts +1 -1
- package/dist/components/select/async-multi-select.d.ts +13 -14
- package/dist/components/select/async-multi-select.js +44 -23
- package/dist/components/select/async-select.d.ts +13 -14
- package/dist/components/select/async-select.js +41 -22
- package/dist/components/select/multi-select.d.ts +3 -9
- package/dist/components/select/multi-select.js +26 -23
- package/dist/components/select/shared.d.ts +7 -11
- package/dist/components/select/shared.js +2 -2
- package/dist/components/select/single-select.d.ts +3 -9
- package/dist/components/select/single-select.js +17 -17
- package/dist/components/select/styles.js +1 -1
- package/dist/components/slider/column-config-slider.d.ts +2 -2
- package/dist/components/slider/column-config-slider.js +9 -6
- package/dist/components/slider/slider.d.ts +1 -1
- package/dist/components/slider/slider.js +16 -12
- package/dist/components/slider/utils.js +2 -1
- package/dist/components/smart-image/smart-image.d.ts +1 -2
- package/dist/components/smart-image/smart-image.js +54 -51
- package/dist/components/spacer/spacer.d.ts +1 -1
- package/dist/components/tabs/tabs.d.ts +4 -4
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.d.ts +1 -1
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle/toggle.d.ts +1 -1
- package/dist/components/toggle/toggle.js +2 -2
- package/dist/components/toggle-button/toggle-button.d.ts +1 -1
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{dist-yhJVnp08.js → dist-DpXluZqJ.js} +3 -2
- package/dist/{draggable-ByXjMHm6.js → draggable-BUfOpGSZ.js} +1081 -710
- package/dist/{es-dash-DunirOmV.js → es-dash-DPtJSRjw.js} +23 -52
- package/dist/{gradient-editor-D5-_PaH7.js → gradient-editor-_q3XF10i.js} +42 -31
- package/dist/icons/block-icon.js +1 -1
- package/dist/icons/icon.d.ts +4 -4
- package/dist/icons/icon.js +24 -12
- package/dist/icons/icons.d.ts +210 -1
- package/dist/icons/index.js +1 -1
- package/dist/icons/jsx-svg.d.ts +5 -4
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/icons/ui-icons/a11y-warning.d.ts +1 -1
- package/dist/icons/ui-icons/a11y.d.ts +1 -1
- package/dist/icons/ui-icons/accelerometer.d.ts +1 -1
- package/dist/icons/ui-icons/activity-log.d.ts +1 -1
- package/dist/icons/ui-icons/add.d.ts +1 -1
- package/dist/icons/ui-icons/alert.d.ts +1 -1
- package/dist/icons/ui-icons/align-horizontal-vertical-alt.d.ts +1 -1
- package/dist/icons/ui-icons/align-horizontal-vertical-alt2.d.ts +1 -1
- package/dist/icons/ui-icons/align-horizontal-vertical.d.ts +1 -1
- package/dist/icons/ui-icons/alt-text-generic-alt.d.ts +1 -1
- package/dist/icons/ui-icons/alt-text-generic.d.ts +1 -1
- package/dist/icons/ui-icons/alt-text.d.ts +1 -1
- package/dist/icons/ui-icons/anchor-page.d.ts +1 -1
- package/dist/icons/ui-icons/anchor.d.ts +1 -1
- package/dist/icons/ui-icons/angle.d.ts +1 -1
- package/dist/icons/ui-icons/animation-file.d.ts +1 -1
- package/dist/icons/ui-icons/animation-generic.d.ts +1 -1
- package/dist/icons/ui-icons/animation-list-generic.d.ts +1 -1
- package/dist/icons/ui-icons/animation-settings-generic.d.ts +1 -1
- package/dist/icons/ui-icons/animation.d.ts +1 -1
- package/dist/icons/ui-icons/archive-file.d.ts +1 -1
- package/dist/icons/ui-icons/archive.d.ts +1 -1
- package/dist/icons/ui-icons/aria-label.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-down-circle-alt.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-down-circle.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-down-square-alt.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-down-square.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-down.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-left-circle-alt.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-left-circle.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-left-square-alt.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-left-square.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-left.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-right-circle-alt.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-right-circle.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-right-square-alt.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-right-square.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-right.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-up-circle-alt.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-up-circle.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-up-square-alt.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-up-square.d.ts +1 -1
- package/dist/icons/ui-icons/arrow-up.d.ts +1 -1
- package/dist/icons/ui-icons/arrows-down.d.ts +1 -1
- package/dist/icons/ui-icons/arrows-horizontal.d.ts +1 -1
- package/dist/icons/ui-icons/arrows-left-diagonal.d.ts +1 -1
- package/dist/icons/ui-icons/arrows-left.d.ts +1 -1
- package/dist/icons/ui-icons/arrows-right-diagonal.d.ts +1 -1
- package/dist/icons/ui-icons/arrows-right.d.ts +1 -1
- package/dist/icons/ui-icons/arrows-up.d.ts +1 -1
- package/dist/icons/ui-icons/arrows-vertical.d.ts +1 -1
- package/dist/icons/ui-icons/aspect-ratio-auto.d.ts +1 -1
- package/dist/icons/ui-icons/aspect-ratio-nine-sixteen.d.ts +1 -1
- package/dist/icons/ui-icons/aspect-ratio-sixteen-nine.d.ts +1 -1
- package/dist/icons/ui-icons/aspect-ratio-square.d.ts +1 -1
- package/dist/icons/ui-icons/aspect-ratio-three-two.d.ts +1 -1
- package/dist/icons/ui-icons/aspect-ratio-twenty-one-nine.d.ts +1 -1
- package/dist/icons/ui-icons/aspect-ratio.d.ts +1 -1
- package/dist/icons/ui-icons/attachment.d.ts +1 -1
- package/dist/icons/ui-icons/auto-close.d.ts +1 -1
- package/dist/icons/ui-icons/auto-pause-scroll.d.ts +1 -1
- package/dist/icons/ui-icons/auto-pause.d.ts +1 -1
- package/dist/icons/ui-icons/automatic-alt.d.ts +1 -1
- package/dist/icons/ui-icons/automatic.d.ts +1 -1
- package/dist/icons/ui-icons/autoplay-alt.d.ts +1 -1
- package/dist/icons/ui-icons/autoplay-alt2.d.ts +1 -1
- package/dist/icons/ui-icons/autoplay.d.ts +1 -1
- package/dist/icons/ui-icons/award.d.ts +1 -1
- package/dist/icons/ui-icons/background-blur.d.ts +1 -1
- package/dist/icons/ui-icons/background-color-swatch.d.ts +1 -1
- package/dist/icons/ui-icons/background-image.d.ts +1 -1
- package/dist/icons/ui-icons/background-repeat.d.ts +1 -1
- package/dist/icons/ui-icons/background-type-alt.d.ts +1 -1
- package/dist/icons/ui-icons/background-type-alt2.d.ts +1 -1
- package/dist/icons/ui-icons/background-type.d.ts +1 -1
- package/dist/icons/ui-icons/block-parts.d.ts +1 -1
- package/dist/icons/ui-icons/bold.d.ts +1 -1
- package/dist/icons/ui-icons/book.d.ts +1 -1
- package/dist/icons/ui-icons/bookmark.d.ts +1 -1
- package/dist/icons/ui-icons/boolean-exclude.d.ts +1 -1
- package/dist/icons/ui-icons/boolean-intersect.d.ts +1 -1
- package/dist/icons/ui-icons/boolean-subtract.d.ts +1 -1
- package/dist/icons/ui-icons/boolean-union.d.ts +1 -1
- package/dist/icons/ui-icons/border-color.d.ts +1 -1
- package/dist/icons/ui-icons/border.d.ts +1 -1
- package/dist/icons/ui-icons/bot-deny.d.ts +1 -1
- package/dist/icons/ui-icons/bot.d.ts +1 -1
- package/dist/icons/ui-icons/box.d.ts +1 -1
- package/dist/icons/ui-icons/brain.d.ts +1 -1
- package/dist/icons/ui-icons/branch-fork.d.ts +1 -1
- package/dist/icons/ui-icons/branch.d.ts +1 -1
- package/dist/icons/ui-icons/briefcase.d.ts +1 -1
- package/dist/icons/ui-icons/browser.d.ts +1 -1
- package/dist/icons/ui-icons/button-disabled.d.ts +1 -1
- package/dist/icons/ui-icons/button-filled.d.ts +1 -1
- package/dist/icons/ui-icons/button-ghost.d.ts +1 -1
- package/dist/icons/ui-icons/button-outline.d.ts +1 -1
- package/dist/icons/ui-icons/calculator.d.ts +1 -1
- package/dist/icons/ui-icons/calendar-add.d.ts +1 -1
- package/dist/icons/ui-icons/calendar-download.d.ts +1 -1
- package/dist/icons/ui-icons/calendar-remove.d.ts +1 -1
- package/dist/icons/ui-icons/calendar.d.ts +1 -1
- package/dist/icons/ui-icons/caption-generic.d.ts +1 -1
- package/dist/icons/ui-icons/card-featured.d.ts +1 -1
- package/dist/icons/ui-icons/caret-down-fill.d.ts +1 -1
- package/dist/icons/ui-icons/caret-down.d.ts +1 -1
- package/dist/icons/ui-icons/caret-left-fill.d.ts +1 -1
- package/dist/icons/ui-icons/caret-left.d.ts +1 -1
- package/dist/icons/ui-icons/caret-right-fill.d.ts +1 -1
- package/dist/icons/ui-icons/caret-right.d.ts +1 -1
- package/dist/icons/ui-icons/caret-up-fill.d.ts +1 -1
- package/dist/icons/ui-icons/caret-up.d.ts +1 -1
- package/dist/icons/ui-icons/center-point.d.ts +1 -1
- package/dist/icons/ui-icons/chat-bubble-alt.d.ts +1 -1
- package/dist/icons/ui-icons/chat-bubble.d.ts +1 -1
- package/dist/icons/ui-icons/chat.d.ts +1 -1
- package/dist/icons/ui-icons/check-circle-fill-transparent.d.ts +1 -1
- package/dist/icons/ui-icons/check-circle-fill.d.ts +1 -1
- package/dist/icons/ui-icons/check-circle.d.ts +1 -1
- package/dist/icons/ui-icons/check-square.d.ts +1 -1
- package/dist/icons/ui-icons/check.d.ts +1 -1
- package/dist/icons/ui-icons/checks-circle.d.ts +1 -1
- package/dist/icons/ui-icons/checks.d.ts +1 -1
- package/dist/icons/ui-icons/chevron-down.d.ts +1 -1
- package/dist/icons/ui-icons/chevron-left.d.ts +1 -1
- package/dist/icons/ui-icons/chevron-right.d.ts +1 -1
- package/dist/icons/ui-icons/chevron-up.d.ts +1 -1
- package/dist/icons/ui-icons/clear-alt.d.ts +1 -1
- package/dist/icons/ui-icons/clear.d.ts +1 -1
- package/dist/icons/ui-icons/clipboard-plain.d.ts +1 -1
- package/dist/icons/ui-icons/clipboard.d.ts +1 -1
- package/dist/icons/ui-icons/clock.d.ts +1 -1
- package/dist/icons/ui-icons/closed-captions.d.ts +1 -1
- package/dist/icons/ui-icons/code-variable.d.ts +1 -1
- package/dist/icons/ui-icons/code.d.ts +1 -1
- package/dist/icons/ui-icons/color-alt.d.ts +1 -1
- package/dist/icons/ui-icons/color-fill-swatch.d.ts +1 -1
- package/dist/icons/ui-icons/color-picker-fill.d.ts +1 -1
- package/dist/icons/ui-icons/color-picker-list-marker.d.ts +1 -1
- package/dist/icons/ui-icons/color-picker-text-highlight.d.ts +1 -1
- package/dist/icons/ui-icons/color-picker-text.d.ts +1 -1
- package/dist/icons/ui-icons/color-select.d.ts +1 -1
- package/dist/icons/ui-icons/color.d.ts +1 -1
- package/dist/icons/ui-icons/column-gutters-lr.d.ts +1 -1
- package/dist/icons/ui-icons/columns.d.ts +1 -1
- package/dist/icons/ui-icons/columns3366.d.ts +1 -1
- package/dist/icons/ui-icons/columns6633.d.ts +1 -1
- package/dist/icons/ui-icons/component-generic.d.ts +1 -1
- package/dist/icons/ui-icons/component-options.d.ts +1 -1
- package/dist/icons/ui-icons/condition-h.d.ts +1 -1
- package/dist/icons/ui-icons/condition-v.d.ts +1 -1
- package/dist/icons/ui-icons/conditional-visibility.d.ts +1 -1
- package/dist/icons/ui-icons/container-height.d.ts +1 -1
- package/dist/icons/ui-icons/container-spacing-h.d.ts +1 -1
- package/dist/icons/ui-icons/container-spacing.d.ts +1 -1
- package/dist/icons/ui-icons/container-width.d.ts +1 -1
- package/dist/icons/ui-icons/content-bottom-left.d.ts +1 -1
- package/dist/icons/ui-icons/content-bottom-right.d.ts +1 -1
- package/dist/icons/ui-icons/content-center.d.ts +1 -1
- package/dist/icons/ui-icons/content-top-left.d.ts +1 -1
- package/dist/icons/ui-icons/content-top-right.d.ts +1 -1
- package/dist/icons/ui-icons/contrast-alt.d.ts +1 -1
- package/dist/icons/ui-icons/contrast.d.ts +1 -1
- package/dist/icons/ui-icons/cookie-alt.d.ts +1 -1
- package/dist/icons/ui-icons/cookie.d.ts +1 -1
- package/dist/icons/ui-icons/copy.d.ts +1 -1
- package/dist/icons/ui-icons/currency.d.ts +1 -1
- package/dist/icons/ui-icons/current-page.d.ts +1 -1
- package/dist/icons/ui-icons/cursor-disabled.d.ts +1 -1
- package/dist/icons/ui-icons/cursor-move.d.ts +1 -1
- package/dist/icons/ui-icons/dark-mode.d.ts +1 -1
- package/dist/icons/ui-icons/data.d.ts +1 -1
- package/dist/icons/ui-icons/date-time.d.ts +1 -1
- package/dist/icons/ui-icons/defer.d.ts +1 -1
- package/dist/icons/ui-icons/description-link.d.ts +1 -1
- package/dist/icons/ui-icons/design.d.ts +1 -1
- package/dist/icons/ui-icons/dice.d.ts +1 -1
- package/dist/icons/ui-icons/divider-bottom.d.ts +1 -1
- package/dist/icons/ui-icons/divider-side.d.ts +1 -1
- package/dist/icons/ui-icons/divider-status.d.ts +1 -1
- package/dist/icons/ui-icons/divider-top.d.ts +1 -1
- package/dist/icons/ui-icons/divider.d.ts +1 -1
- package/dist/icons/ui-icons/door-in.d.ts +1 -1
- package/dist/icons/ui-icons/door-out.d.ts +1 -1
- package/dist/icons/ui-icons/door.d.ts +1 -1
- package/dist/icons/ui-icons/download.d.ts +1 -1
- package/dist/icons/ui-icons/dropdown-caret-alt.d.ts +1 -1
- package/dist/icons/ui-icons/dropdown-caret.d.ts +1 -1
- package/dist/icons/ui-icons/dropdown-close.d.ts +1 -1
- package/dist/icons/ui-icons/dropdown-open.d.ts +1 -1
- package/dist/icons/ui-icons/dropdown.d.ts +1 -1
- package/dist/icons/ui-icons/dummy-spacer.d.ts +1 -1
- package/dist/icons/ui-icons/edit-options.d.ts +1 -1
- package/dist/icons/ui-icons/edit.d.ts +1 -1
- package/dist/icons/ui-icons/email-remove.d.ts +1 -1
- package/dist/icons/ui-icons/email.d.ts +1 -1
- package/dist/icons/ui-icons/embed.d.ts +1 -1
- package/dist/icons/ui-icons/empty-circle.d.ts +1 -1
- package/dist/icons/ui-icons/empty-rect.d.ts +1 -1
- package/dist/icons/ui-icons/equal-columns.d.ts +1 -1
- package/dist/icons/ui-icons/equal-rows.d.ts +1 -1
- package/dist/icons/ui-icons/equals.d.ts +1 -1
- package/dist/icons/ui-icons/error-circle-fill-transparent.d.ts +1 -1
- package/dist/icons/ui-icons/error-circle-fill.d.ts +1 -1
- package/dist/icons/ui-icons/error-circle.d.ts +1 -1
- package/dist/icons/ui-icons/exclude-item-alt.d.ts +1 -1
- package/dist/icons/ui-icons/exclude-item.d.ts +1 -1
- package/dist/icons/ui-icons/exclude.d.ts +1 -1
- package/dist/icons/ui-icons/expand-xl.d.ts +1 -1
- package/dist/icons/ui-icons/expand.d.ts +1 -1
- package/dist/icons/ui-icons/experiment.d.ts +1 -1
- package/dist/icons/ui-icons/external-link.d.ts +1 -1
- package/dist/icons/ui-icons/extract-alt.d.ts +1 -1
- package/dist/icons/ui-icons/extract.d.ts +1 -1
- package/dist/icons/ui-icons/eyedropper.d.ts +1 -1
- package/dist/icons/ui-icons/fast-forward.d.ts +1 -1
- package/dist/icons/ui-icons/fast-reverse.d.ts +1 -1
- package/dist/icons/ui-icons/field-after-text.d.ts +1 -1
- package/dist/icons/ui-icons/field-before-text.d.ts +1 -1
- package/dist/icons/ui-icons/field-disabled.d.ts +1 -1
- package/dist/icons/ui-icons/field-help.d.ts +1 -1
- package/dist/icons/ui-icons/field-label.d.ts +1 -1
- package/dist/icons/ui-icons/field-name.d.ts +1 -1
- package/dist/icons/ui-icons/field-placeholder.d.ts +1 -1
- package/dist/icons/ui-icons/field-readonly.d.ts +1 -1
- package/dist/icons/ui-icons/field-required.d.ts +1 -1
- package/dist/icons/ui-icons/field-type.d.ts +1 -1
- package/dist/icons/ui-icons/field-value.d.ts +1 -1
- package/dist/icons/ui-icons/field-width.d.ts +1 -1
- package/dist/icons/ui-icons/file-download.d.ts +1 -1
- package/dist/icons/ui-icons/file-error.d.ts +1 -1
- package/dist/icons/ui-icons/file-metadata.d.ts +1 -1
- package/dist/icons/ui-icons/file-pdf.d.ts +1 -1
- package/dist/icons/ui-icons/file-size-max.d.ts +1 -1
- package/dist/icons/ui-icons/file-size-min.d.ts +1 -1
- package/dist/icons/ui-icons/file-size.d.ts +1 -1
- package/dist/icons/ui-icons/file-type.d.ts +1 -1
- package/dist/icons/ui-icons/file-upload.d.ts +1 -1
- package/dist/icons/ui-icons/file.d.ts +1 -1
- package/dist/icons/ui-icons/files.d.ts +1 -1
- package/dist/icons/ui-icons/fill-color.d.ts +1 -1
- package/dist/icons/ui-icons/filter-alt.d.ts +1 -1
- package/dist/icons/ui-icons/filter.d.ts +1 -1
- package/dist/icons/ui-icons/flag-alt.d.ts +1 -1
- package/dist/icons/ui-icons/flag.d.ts +1 -1
- package/dist/icons/ui-icons/flip-h.d.ts +1 -1
- package/dist/icons/ui-icons/flip-v.d.ts +1 -1
- package/dist/icons/ui-icons/focus.d.ts +1 -1
- package/dist/icons/ui-icons/folder-add.d.ts +1 -1
- package/dist/icons/ui-icons/folder-open-solid.d.ts +1 -1
- package/dist/icons/ui-icons/folder-open.d.ts +1 -1
- package/dist/icons/ui-icons/folder-solid.d.ts +1 -1
- package/dist/icons/ui-icons/folder-top-level.d.ts +1 -1
- package/dist/icons/ui-icons/folder.d.ts +1 -1
- package/dist/icons/ui-icons/font-family.d.ts +1 -1
- package/dist/icons/ui-icons/footer.d.ts +1 -1
- package/dist/icons/ui-icons/form-alt.d.ts +1 -1
- package/dist/icons/ui-icons/form.d.ts +1 -1
- package/dist/icons/ui-icons/four-columns.d.ts +1 -1
- package/dist/icons/ui-icons/frame.d.ts +1 -1
- package/dist/icons/ui-icons/full-max-shield.d.ts +1 -1
- package/dist/icons/ui-icons/full-max-text.d.ts +1 -1
- package/dist/icons/ui-icons/full-width-image.d.ts +1 -1
- package/dist/icons/ui-icons/gears-fill.d.ts +1 -1
- package/dist/icons/ui-icons/gears.d.ts +1 -1
- package/dist/icons/ui-icons/generic-color-swatch.d.ts +1 -1
- package/dist/icons/ui-icons/generic-shapes-alt.d.ts +1 -1
- package/dist/icons/ui-icons/generic-shapes.d.ts +1 -1
- package/dist/icons/ui-icons/globe-anchor.d.ts +1 -1
- package/dist/icons/ui-icons/globe-hash.d.ts +1 -1
- package/dist/icons/ui-icons/globe.d.ts +1 -1
- package/dist/icons/ui-icons/google-tag-manager.d.ts +1 -1
- package/dist/icons/ui-icons/gradient-repeat.d.ts +1 -1
- package/dist/icons/ui-icons/gradient-stop.d.ts +1 -1
- package/dist/icons/ui-icons/gradient.d.ts +1 -1
- package/dist/icons/ui-icons/grid-alt.d.ts +1 -1
- package/dist/icons/ui-icons/grid-auto-cols.d.ts +1 -1
- package/dist/icons/ui-icons/grid-auto-rows.d.ts +1 -1
- package/dist/icons/ui-icons/grid-col.d.ts +1 -1
- package/dist/icons/ui-icons/grid-height.d.ts +1 -1
- package/dist/icons/ui-icons/grid-list-toggle.d.ts +1 -1
- package/dist/icons/ui-icons/grid-manual.d.ts +1 -1
- package/dist/icons/ui-icons/grid-row.d.ts +1 -1
- package/dist/icons/ui-icons/grid-width.d.ts +1 -1
- package/dist/icons/ui-icons/group.d.ts +1 -1
- package/dist/icons/ui-icons/gutter.d.ts +1 -1
- package/dist/icons/ui-icons/gyroscope.d.ts +1 -1
- package/dist/icons/ui-icons/h1.d.ts +1 -1
- package/dist/icons/ui-icons/h2.d.ts +1 -1
- package/dist/icons/ui-icons/h3.d.ts +1 -1
- package/dist/icons/ui-icons/h4.d.ts +1 -1
- package/dist/icons/ui-icons/h5.d.ts +1 -1
- package/dist/icons/ui-icons/h6.d.ts +1 -1
- package/dist/icons/ui-icons/hamburger-menu.d.ts +1 -1
- package/dist/icons/ui-icons/hard-drive.d.ts +1 -1
- package/dist/icons/ui-icons/header.d.ts +1 -1
- package/dist/icons/ui-icons/heading-level-alt.d.ts +1 -1
- package/dist/icons/ui-icons/heading-level.d.ts +1 -1
- package/dist/icons/ui-icons/heading.d.ts +1 -1
- package/dist/icons/ui-icons/heart-fill-transparent.d.ts +1 -1
- package/dist/icons/ui-icons/heart-fill.d.ts +1 -1
- package/dist/icons/ui-icons/heart.d.ts +1 -1
- package/dist/icons/ui-icons/height.d.ts +1 -1
- package/dist/icons/ui-icons/help-alt.d.ts +1 -1
- package/dist/icons/ui-icons/help-fill.d.ts +1 -1
- package/dist/icons/ui-icons/help.d.ts +1 -1
- package/dist/icons/ui-icons/hide.d.ts +1 -1
- package/dist/icons/ui-icons/highlighted-checkmark.d.ts +1 -1
- package/dist/icons/ui-icons/highlighted-exclamation-mark.d.ts +1 -1
- package/dist/icons/ui-icons/history.d.ts +1 -1
- package/dist/icons/ui-icons/horizontal-align-alt.d.ts +1 -1
- package/dist/icons/ui-icons/horizontal-align-around.d.ts +1 -1
- package/dist/icons/ui-icons/horizontal-align-between-alt.d.ts +1 -1
- package/dist/icons/ui-icons/horizontal-align-between.d.ts +1 -1
- package/dist/icons/ui-icons/horizontal-align-center.d.ts +1 -1
- package/dist/icons/ui-icons/horizontal-align-evenly.d.ts +1 -1
- package/dist/icons/ui-icons/horizontal-align-left.d.ts +1 -1
- package/dist/icons/ui-icons/horizontal-align-right.d.ts +1 -1
- package/dist/icons/ui-icons/horizontal-align-stretch.d.ts +1 -1
- package/dist/icons/ui-icons/horizontal-align.d.ts +1 -1
- package/dist/icons/ui-icons/hover-background-glow.d.ts +1 -1
- package/dist/icons/ui-icons/hover-background-type.d.ts +1 -1
- package/dist/icons/ui-icons/hover-invert-object.d.ts +1 -1
- package/dist/icons/ui-icons/hover-invert-text.d.ts +1 -1
- package/dist/icons/ui-icons/hover-rotate.d.ts +1 -1
- package/dist/icons/ui-icons/hover-zoom.d.ts +1 -1
- package/dist/icons/ui-icons/hyphenate-alt.d.ts +1 -1
- package/dist/icons/ui-icons/hyphenate-alt2.d.ts +1 -1
- package/dist/icons/ui-icons/hyphenate.d.ts +1 -1
- package/dist/icons/ui-icons/icon-generic.d.ts +1 -1
- package/dist/icons/ui-icons/id-card.d.ts +1 -1
- package/dist/icons/ui-icons/id.d.ts +1 -1
- package/dist/icons/ui-icons/image-blur.d.ts +1 -1
- package/dist/icons/ui-icons/image-caption.d.ts +1 -1
- package/dist/icons/ui-icons/image-error.d.ts +1 -1
- package/dist/icons/ui-icons/image-file.d.ts +1 -1
- package/dist/icons/ui-icons/image-lazy-load.d.ts +1 -1
- package/dist/icons/ui-icons/image-opacity.d.ts +1 -1
- package/dist/icons/ui-icons/image-overlay-alt.d.ts +1 -1
- package/dist/icons/ui-icons/image-overlay-alt2.d.ts +1 -1
- package/dist/icons/ui-icons/image-overlay.d.ts +1 -1
- package/dist/icons/ui-icons/image-remove.d.ts +1 -1
- package/dist/icons/ui-icons/image.d.ts +1 -1
- package/dist/icons/ui-icons/info-circle-fill-transparent.d.ts +1 -1
- package/dist/icons/ui-icons/info-circle-fill.d.ts +1 -1
- package/dist/icons/ui-icons/info-circle.d.ts +1 -1
- package/dist/icons/ui-icons/info.d.ts +1 -1
- package/dist/icons/ui-icons/inherit.d.ts +1 -1
- package/dist/icons/ui-icons/inline-gradient-format.d.ts +1 -1
- package/dist/icons/ui-icons/input-field.d.ts +1 -1
- package/dist/icons/ui-icons/italic.d.ts +1 -1
- package/dist/icons/ui-icons/item-limit.d.ts +1 -1
- package/dist/icons/ui-icons/item-select.d.ts +1 -1
- package/dist/icons/ui-icons/item-wrap.d.ts +1 -1
- package/dist/icons/ui-icons/items-per-page.d.ts +1 -1
- package/dist/icons/ui-icons/items-per-row.d.ts +1 -1
- package/dist/icons/ui-icons/key.d.ts +1 -1
- package/dist/icons/ui-icons/keyboard.d.ts +1 -1
- package/dist/icons/ui-icons/large.d.ts +1 -1
- package/dist/icons/ui-icons/latest-posts.d.ts +1 -1
- package/dist/icons/ui-icons/layer-off.d.ts +1 -1
- package/dist/icons/ui-icons/layer.d.ts +1 -1
- package/dist/icons/ui-icons/layers.d.ts +1 -1
- package/dist/icons/ui-icons/layout-alt.d.ts +1 -1
- package/dist/icons/ui-icons/layout-alt2.d.ts +1 -1
- package/dist/icons/ui-icons/layout-alt3.d.ts +1 -1
- package/dist/icons/ui-icons/layout-alt4.d.ts +1 -1
- package/dist/icons/ui-icons/layout-bento-box.d.ts +1 -1
- package/dist/icons/ui-icons/layout-masonry.d.ts +1 -1
- package/dist/icons/ui-icons/layout.d.ts +1 -1
- package/dist/icons/ui-icons/left-panel-alt.d.ts +1 -1
- package/dist/icons/ui-icons/left-panel.d.ts +1 -1
- package/dist/icons/ui-icons/light-bulb-alt.d.ts +1 -1
- package/dist/icons/ui-icons/light-bulb.d.ts +1 -1
- package/dist/icons/ui-icons/light-mode.d.ts +1 -1
- package/dist/icons/ui-icons/limit-width.d.ts +1 -1
- package/dist/icons/ui-icons/line-break-alt-off.d.ts +1 -1
- package/dist/icons/ui-icons/line-break-alt.d.ts +1 -1
- package/dist/icons/ui-icons/line-break-off-alt.d.ts +1 -1
- package/dist/icons/ui-icons/line-break-off.d.ts +1 -1
- package/dist/icons/ui-icons/line-break.d.ts +1 -1
- package/dist/icons/ui-icons/line-breaks-hyphenation.d.ts +1 -1
- package/dist/icons/ui-icons/link-add.d.ts +1 -1
- package/dist/icons/ui-icons/link-nav.d.ts +1 -1
- package/dist/icons/ui-icons/link-remove.d.ts +1 -1
- package/dist/icons/ui-icons/link.d.ts +1 -1
- package/dist/icons/ui-icons/list-indent.d.ts +1 -1
- package/dist/icons/ui-icons/list-ordered.d.ts +1 -1
- package/dist/icons/ui-icons/list-outdent.d.ts +1 -1
- package/dist/icons/ui-icons/list-unordered.d.ts +1 -1
- package/dist/icons/ui-icons/loader-alt.d.ts +1 -1
- package/dist/icons/ui-icons/loader.d.ts +1 -1
- package/dist/icons/ui-icons/location-add.d.ts +1 -1
- package/dist/icons/ui-icons/location-allow.d.ts +1 -1
- package/dist/icons/ui-icons/location-deny.d.ts +1 -1
- package/dist/icons/ui-icons/location-settings.d.ts +1 -1
- package/dist/icons/ui-icons/location.d.ts +1 -1
- package/dist/icons/ui-icons/lock.d.ts +1 -1
- package/dist/icons/ui-icons/loop-mode.d.ts +1 -1
- package/dist/icons/ui-icons/magic-alt-fill-transparent.d.ts +1 -1
- package/dist/icons/ui-icons/magic-alt-fill.d.ts +1 -1
- package/dist/icons/ui-icons/magic-alt.d.ts +1 -1
- package/dist/icons/ui-icons/magic-fill-transparent.d.ts +1 -1
- package/dist/icons/ui-icons/magic-fill.d.ts +1 -1
- package/dist/icons/ui-icons/magic.d.ts +1 -1
- package/dist/icons/ui-icons/map-layer-json.d.ts +1 -1
- package/dist/icons/ui-icons/map-layer-raster.d.ts +1 -1
- package/dist/icons/ui-icons/map-layer-vector.d.ts +1 -1
- package/dist/icons/ui-icons/map-layer.d.ts +1 -1
- package/dist/icons/ui-icons/map-pin.d.ts +1 -1
- package/dist/icons/ui-icons/matrix-align-control-dot-active.d.ts +1 -1
- package/dist/icons/ui-icons/matrix-align-control-dot-inactive.d.ts +1 -1
- package/dist/icons/ui-icons/media.d.ts +1 -1
- package/dist/icons/ui-icons/medium.d.ts +1 -1
- package/dist/icons/ui-icons/menu-item-check.d.ts +1 -1
- package/dist/icons/ui-icons/menu-item-circle.d.ts +1 -1
- package/dist/icons/ui-icons/microphone.d.ts +1 -1
- package/dist/icons/ui-icons/migration-alt-v.d.ts +1 -1
- package/dist/icons/ui-icons/migration-alt.d.ts +1 -1
- package/dist/icons/ui-icons/migration.d.ts +1 -1
- package/dist/icons/ui-icons/module.d.ts +1 -1
- package/dist/icons/ui-icons/money-paper.d.ts +1 -1
- package/dist/icons/ui-icons/more-h-circle.d.ts +1 -1
- package/dist/icons/ui-icons/more-h.d.ts +1 -1
- package/dist/icons/ui-icons/more-v-circle.d.ts +1 -1
- package/dist/icons/ui-icons/more-v.d.ts +1 -1
- package/dist/icons/ui-icons/mouse-cursor.d.ts +1 -1
- package/dist/icons/ui-icons/mouse-wheel.d.ts +1 -1
- package/dist/icons/ui-icons/multi-item-left-inset-mobile.d.ts +1 -1
- package/dist/icons/ui-icons/multi-item-left-inset.d.ts +1 -1
- package/dist/icons/ui-icons/multi-item-right-inset-mobile.d.ts +1 -1
- package/dist/icons/ui-icons/multi-item-right-inset.d.ts +1 -1
- package/dist/icons/ui-icons/multiple.d.ts +1 -1
- package/dist/icons/ui-icons/music-note.d.ts +1 -1
- package/dist/icons/ui-icons/mute-centered.d.ts +1 -1
- package/dist/icons/ui-icons/mute.d.ts +1 -1
- package/dist/icons/ui-icons/narrow-bottom.d.ts +1 -1
- package/dist/icons/ui-icons/narrow-left.d.ts +1 -1
- package/dist/icons/ui-icons/narrow-right.d.ts +1 -1
- package/dist/icons/ui-icons/narrow-top.d.ts +1 -1
- package/dist/icons/ui-icons/navigation-buttons.d.ts +1 -1
- package/dist/icons/ui-icons/new-tab.d.ts +1 -1
- package/dist/icons/ui-icons/newspaper.d.ts +1 -1
- package/dist/icons/ui-icons/none.d.ts +1 -1
- package/dist/icons/ui-icons/notebook.d.ts +1 -1
- package/dist/icons/ui-icons/num0-circle-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num0-circle.d.ts +1 -1
- package/dist/icons/ui-icons/num0-square-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num0-square.d.ts +1 -1
- package/dist/icons/ui-icons/num1-circle-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num1-circle.d.ts +1 -1
- package/dist/icons/ui-icons/num1-square-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num1-square.d.ts +1 -1
- package/dist/icons/ui-icons/num2-circle-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num2-circle.d.ts +1 -1
- package/dist/icons/ui-icons/num2-square-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num2-square.d.ts +1 -1
- package/dist/icons/ui-icons/num3-circle-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num3-circle.d.ts +1 -1
- package/dist/icons/ui-icons/num3-square-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num3-square.d.ts +1 -1
- package/dist/icons/ui-icons/num4-circle-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num4-circle.d.ts +1 -1
- package/dist/icons/ui-icons/num4-square-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num4-square.d.ts +1 -1
- package/dist/icons/ui-icons/num5-circle-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num5-circle.d.ts +1 -1
- package/dist/icons/ui-icons/num5-square-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num5-square.d.ts +1 -1
- package/dist/icons/ui-icons/num6-circle-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num6-circle.d.ts +1 -1
- package/dist/icons/ui-icons/num6-square-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num6-square.d.ts +1 -1
- package/dist/icons/ui-icons/num7-circle-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num7-circle.d.ts +1 -1
- package/dist/icons/ui-icons/num7-square-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num7-square.d.ts +1 -1
- package/dist/icons/ui-icons/num8-circle-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num8-circle.d.ts +1 -1
- package/dist/icons/ui-icons/num8-square-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num8-square.d.ts +1 -1
- package/dist/icons/ui-icons/num9-circle-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num9-circle.d.ts +1 -1
- package/dist/icons/ui-icons/num9-square-alt.d.ts +1 -1
- package/dist/icons/ui-icons/num9-square.d.ts +1 -1
- package/dist/icons/ui-icons/office-building.d.ts +1 -1
- package/dist/icons/ui-icons/office-buildings.d.ts +1 -1
- package/dist/icons/ui-icons/offset-auto.d.ts +1 -1
- package/dist/icons/ui-icons/offset.d.ts +1 -1
- package/dist/icons/ui-icons/option-list-alt.d.ts +1 -1
- package/dist/icons/ui-icons/option-list.d.ts +1 -1
- package/dist/icons/ui-icons/options.d.ts +1 -1
- package/dist/icons/ui-icons/order.d.ts +1 -1
- package/dist/icons/ui-icons/padding-bottom.d.ts +1 -1
- package/dist/icons/ui-icons/padding-top.d.ts +1 -1
- package/dist/icons/ui-icons/padding.d.ts +1 -1
- package/dist/icons/ui-icons/pagination.d.ts +1 -1
- package/dist/icons/ui-icons/palette-color.d.ts +1 -1
- package/dist/icons/ui-icons/panel-collapse.d.ts +1 -1
- package/dist/icons/ui-icons/panel-expand.d.ts +1 -1
- package/dist/icons/ui-icons/paragraph.d.ts +1 -1
- package/dist/icons/ui-icons/paste.d.ts +1 -1
- package/dist/icons/ui-icons/pause.d.ts +1 -1
- package/dist/icons/ui-icons/people-group.d.ts +1 -1
- package/dist/icons/ui-icons/people.d.ts +1 -1
- package/dist/icons/ui-icons/person.d.ts +1 -1
- package/dist/icons/ui-icons/photo-camera.d.ts +1 -1
- package/dist/icons/ui-icons/picture-in-picture.d.ts +1 -1
- package/dist/icons/ui-icons/play-reverse.d.ts +1 -1
- package/dist/icons/ui-icons/play.d.ts +1 -1
- package/dist/icons/ui-icons/playback-options.d.ts +1 -1
- package/dist/icons/ui-icons/plus-circle-fill-alt.d.ts +1 -1
- package/dist/icons/ui-icons/plus-circle-fill.d.ts +1 -1
- package/dist/icons/ui-icons/plus-circle.d.ts +1 -1
- package/dist/icons/ui-icons/plus-minus-buttons-h.d.ts +1 -1
- package/dist/icons/ui-icons/plus-minus-buttons-v.d.ts +1 -1
- package/dist/icons/ui-icons/plus-square-fill-transparent.d.ts +1 -1
- package/dist/icons/ui-icons/plus-square-fill.d.ts +1 -1
- package/dist/icons/ui-icons/plus-square.d.ts +1 -1
- package/dist/icons/ui-icons/pointer-hand-disabled.d.ts +1 -1
- package/dist/icons/ui-icons/pointer-hand.d.ts +1 -1
- package/dist/icons/ui-icons/position-arrows-h.d.ts +1 -1
- package/dist/icons/ui-icons/position-arrows-inverted-h.d.ts +1 -1
- package/dist/icons/ui-icons/position-arrows-inverted-v.d.ts +1 -1
- package/dist/icons/ui-icons/position-arrows-inverted.d.ts +1 -1
- package/dist/icons/ui-icons/position-arrows-v.d.ts +1 -1
- package/dist/icons/ui-icons/position-arrows.d.ts +1 -1
- package/dist/icons/ui-icons/position-h-center.d.ts +1 -1
- package/dist/icons/ui-icons/position-h-end.d.ts +1 -1
- package/dist/icons/ui-icons/position-h-start.d.ts +1 -1
- package/dist/icons/ui-icons/position-left.d.ts +1 -1
- package/dist/icons/ui-icons/position-right.d.ts +1 -1
- package/dist/icons/ui-icons/position-v-center.d.ts +1 -1
- package/dist/icons/ui-icons/position-v-end.d.ts +1 -1
- package/dist/icons/ui-icons/position-v-start.d.ts +1 -1
- package/dist/icons/ui-icons/position2x2-bottom-left.d.ts +1 -1
- package/dist/icons/ui-icons/position2x2-bottom-right.d.ts +1 -1
- package/dist/icons/ui-icons/position2x2-empty.d.ts +1 -1
- package/dist/icons/ui-icons/position2x2-top-left.d.ts +1 -1
- package/dist/icons/ui-icons/position2x2-top-right.d.ts +1 -1
- package/dist/icons/ui-icons/position3x3-bottom-center.d.ts +1 -1
- package/dist/icons/ui-icons/position3x3-bottom-left.d.ts +1 -1
- package/dist/icons/ui-icons/position3x3-bottom-right.d.ts +1 -1
- package/dist/icons/ui-icons/position3x3-center-center.d.ts +1 -1
- package/dist/icons/ui-icons/position3x3-center-left.d.ts +1 -1
- package/dist/icons/ui-icons/position3x3-center-right.d.ts +1 -1
- package/dist/icons/ui-icons/position3x3-empty.d.ts +1 -1
- package/dist/icons/ui-icons/position3x3-top-center.d.ts +1 -1
- package/dist/icons/ui-icons/position3x3-top-left.d.ts +1 -1
- package/dist/icons/ui-icons/position3x3-top-right.d.ts +1 -1
- package/dist/icons/ui-icons/positioning-guide-alt.d.ts +1 -1
- package/dist/icons/ui-icons/positioning-guide.d.ts +1 -1
- package/dist/icons/ui-icons/positioning-width-guide.d.ts +1 -1
- package/dist/icons/ui-icons/preload.d.ts +1 -1
- package/dist/icons/ui-icons/preview-responsive.d.ts +1 -1
- package/dist/icons/ui-icons/preview.d.ts +1 -1
- package/dist/icons/ui-icons/progressbar-intermittent.d.ts +1 -1
- package/dist/icons/ui-icons/progressbar.d.ts +1 -1
- package/dist/icons/ui-icons/range-max.d.ts +1 -1
- package/dist/icons/ui-icons/range-mid.d.ts +1 -1
- package/dist/icons/ui-icons/range-min.d.ts +1 -1
- package/dist/icons/ui-icons/range.d.ts +1 -1
- package/dist/icons/ui-icons/read-only.d.ts +1 -1
- package/dist/icons/ui-icons/reduce-height-bottom.d.ts +1 -1
- package/dist/icons/ui-icons/reduce-height-top.d.ts +1 -1
- package/dist/icons/ui-icons/regex.d.ts +1 -1
- package/dist/icons/ui-icons/remove.d.ts +1 -1
- package/dist/icons/ui-icons/rename.d.ts +1 -1
- package/dist/icons/ui-icons/reorder-grabber-h.d.ts +1 -1
- package/dist/icons/ui-icons/reorder-grabber-v.d.ts +1 -1
- package/dist/icons/ui-icons/reorder.d.ts +1 -1
- package/dist/icons/ui-icons/required-alt.d.ts +1 -1
- package/dist/icons/ui-icons/required.d.ts +1 -1
- package/dist/icons/ui-icons/reset-to-zero.d.ts +1 -1
- package/dist/icons/ui-icons/reset.d.ts +1 -1
- package/dist/icons/ui-icons/responsive-overrides-alt-fill.d.ts +1 -1
- package/dist/icons/ui-icons/responsive-overrides-alt.d.ts +1 -1
- package/dist/icons/ui-icons/responsive-overrides-alt2-fill.d.ts +1 -1
- package/dist/icons/ui-icons/responsive-overrides-alt2.d.ts +1 -1
- package/dist/icons/ui-icons/responsive-overrides-alt3-fill.d.ts +1 -1
- package/dist/icons/ui-icons/responsive-overrides.d.ts +1 -1
- package/dist/icons/ui-icons/responsive.d.ts +1 -1
- package/dist/icons/ui-icons/right-panel-alt.d.ts +1 -1
- package/dist/icons/ui-icons/right-panel.d.ts +1 -1
- package/dist/icons/ui-icons/rotate-left.d.ts +1 -1
- package/dist/icons/ui-icons/rotate-right.d.ts +1 -1
- package/dist/icons/ui-icons/rounded-corners.d.ts +1 -1
- package/dist/icons/ui-icons/route.d.ts +1 -1
- package/dist/icons/ui-icons/row-add.d.ts +1 -1
- package/dist/icons/ui-icons/row-empty.d.ts +1 -1
- package/dist/icons/ui-icons/row.d.ts +1 -1
- package/dist/icons/ui-icons/rows.d.ts +1 -1
- package/dist/icons/ui-icons/ruler.d.ts +1 -1
- package/dist/icons/ui-icons/save.d.ts +1 -1
- package/dist/icons/ui-icons/screen-desktop.d.ts +1 -1
- package/dist/icons/ui-icons/screen-large.d.ts +1 -1
- package/dist/icons/ui-icons/screen-mobile.d.ts +1 -1
- package/dist/icons/ui-icons/screen-tablet-large.d.ts +1 -1
- package/dist/icons/ui-icons/screen-tablet.d.ts +1 -1
- package/dist/icons/ui-icons/scrollbar-h.d.ts +1 -1
- package/dist/icons/ui-icons/scrollbar-v.d.ts +1 -1
- package/dist/icons/ui-icons/scrollbars.d.ts +1 -1
- package/dist/icons/ui-icons/search-empty.d.ts +1 -1
- package/dist/icons/ui-icons/search.d.ts +1 -1
- package/dist/icons/ui-icons/separator-h.d.ts +1 -1
- package/dist/icons/ui-icons/separator-v.d.ts +1 -1
- package/dist/icons/ui-icons/shadow.d.ts +1 -1
- package/dist/icons/ui-icons/share.d.ts +1 -1
- package/dist/icons/ui-icons/shield-plus-alt.d.ts +1 -1
- package/dist/icons/ui-icons/shield-plus.d.ts +1 -1
- package/dist/icons/ui-icons/shield.d.ts +1 -1
- package/dist/icons/ui-icons/shrink-diagonal-left-xl.d.ts +1 -1
- package/dist/icons/ui-icons/shrink-diagonal-left.d.ts +1 -1
- package/dist/icons/ui-icons/shrink-diagonal-right-xl.d.ts +1 -1
- package/dist/icons/ui-icons/shrink-diagonal-right.d.ts +1 -1
- package/dist/icons/ui-icons/shrink-xl.d.ts +1 -1
- package/dist/icons/ui-icons/shrink.d.ts +1 -1
- package/dist/icons/ui-icons/shuffle.d.ts +1 -1
- package/dist/icons/ui-icons/sidebar-flip.d.ts +1 -1
- package/dist/icons/ui-icons/sidebar.d.ts +1 -1
- package/dist/icons/ui-icons/single-item-left-inset-mobile.d.ts +1 -1
- package/dist/icons/ui-icons/single-item-left-inset.d.ts +1 -1
- package/dist/icons/ui-icons/single-item-right-inset-mobile.d.ts +1 -1
- package/dist/icons/ui-icons/single-item-right-inset.d.ts +1 -1
- package/dist/icons/ui-icons/size-alt.d.ts +1 -1
- package/dist/icons/ui-icons/size.d.ts +1 -1
- package/dist/icons/ui-icons/slider.d.ts +1 -1
- package/dist/icons/ui-icons/sliders.d.ts +1 -1
- package/dist/icons/ui-icons/small.d.ts +1 -1
- package/dist/icons/ui-icons/solid-circle-fill-transparent.d.ts +1 -1
- package/dist/icons/ui-icons/solid-circle-filled.d.ts +1 -1
- package/dist/icons/ui-icons/solid-circle-gradient.d.ts +1 -1
- package/dist/icons/ui-icons/solid-circle.d.ts +1 -1
- package/dist/icons/ui-icons/solid-color.d.ts +1 -1
- package/dist/icons/ui-icons/solid-rect-fill-transparent.d.ts +1 -1
- package/dist/icons/ui-icons/solid-rect-filled.d.ts +1 -1
- package/dist/icons/ui-icons/solid-rect-gradient.d.ts +1 -1
- package/dist/icons/ui-icons/solid-rect.d.ts +1 -1
- package/dist/icons/ui-icons/sort-asc.d.ts +1 -1
- package/dist/icons/ui-icons/sort-desc.d.ts +1 -1
- package/dist/icons/ui-icons/sort-generic.d.ts +1 -1
- package/dist/icons/ui-icons/spacing-bottom-in.d.ts +1 -1
- package/dist/icons/ui-icons/spacing-bottom.d.ts +1 -1
- package/dist/icons/ui-icons/spacing-left-in.d.ts +1 -1
- package/dist/icons/ui-icons/spacing-left.d.ts +1 -1
- package/dist/icons/ui-icons/spacing-right-in.d.ts +1 -1
- package/dist/icons/ui-icons/spacing-right.d.ts +1 -1
- package/dist/icons/ui-icons/spacing-top-in.d.ts +1 -1
- package/dist/icons/ui-icons/spacing-top.d.ts +1 -1
- package/dist/icons/ui-icons/speed.d.ts +1 -1
- package/dist/icons/ui-icons/stagger.d.ts +1 -1
- package/dist/icons/ui-icons/star.d.ts +1 -1
- package/dist/icons/ui-icons/step.d.ts +1 -1
- package/dist/icons/ui-icons/stop.d.ts +1 -1
- package/dist/icons/ui-icons/swap.d.ts +1 -1
- package/dist/icons/ui-icons/tag-alt.d.ts +1 -1
- package/dist/icons/ui-icons/tag.d.ts +1 -1
- package/dist/icons/ui-icons/text-abc.d.ts +1 -1
- package/dist/icons/ui-icons/text-above.d.ts +1 -1
- package/dist/icons/ui-icons/text-align-center.d.ts +1 -1
- package/dist/icons/ui-icons/text-align-generic.d.ts +1 -1
- package/dist/icons/ui-icons/text-align-justify.d.ts +1 -1
- package/dist/icons/ui-icons/text-align-left.d.ts +1 -1
- package/dist/icons/ui-icons/text-align-right.d.ts +1 -1
- package/dist/icons/ui-icons/text-below.d.ts +1 -1
- package/dist/icons/ui-icons/text-box-edit.d.ts +1 -1
- package/dist/icons/ui-icons/text-color-swatch.d.ts +1 -1
- package/dist/icons/ui-icons/text-highlight-color-swatch-alt.d.ts +1 -1
- package/dist/icons/ui-icons/text-highlight-color-swatch.d.ts +1 -1
- package/dist/icons/ui-icons/text-larger.d.ts +1 -1
- package/dist/icons/ui-icons/text-length.d.ts +1 -1
- package/dist/icons/ui-icons/text-size-alt.d.ts +1 -1
- package/dist/icons/ui-icons/text-size.d.ts +1 -1
- package/dist/icons/ui-icons/text-smaller.d.ts +1 -1
- package/dist/icons/ui-icons/text-strikethrough.d.ts +1 -1
- package/dist/icons/ui-icons/text-uppercase.d.ts +1 -1
- package/dist/icons/ui-icons/text-write.d.ts +1 -1
- package/dist/icons/ui-icons/thumbs-down.d.ts +1 -1
- package/dist/icons/ui-icons/thumbs-up.d.ts +1 -1
- package/dist/icons/ui-icons/title-generic.d.ts +1 -1
- package/dist/icons/ui-icons/toggle-off.d.ts +1 -1
- package/dist/icons/ui-icons/toggle-on-alt.d.ts +1 -1
- package/dist/icons/ui-icons/toggle-on.d.ts +1 -1
- package/dist/icons/ui-icons/tools.d.ts +1 -1
- package/dist/icons/ui-icons/total-items.d.ts +1 -1
- package/dist/icons/ui-icons/trash-alt.d.ts +1 -1
- package/dist/icons/ui-icons/trash.d.ts +1 -1
- package/dist/icons/ui-icons/tree-alt.d.ts +1 -1
- package/dist/icons/ui-icons/tree-alt2.d.ts +1 -1
- package/dist/icons/ui-icons/tree.d.ts +1 -1
- package/dist/icons/ui-icons/troubleshoot-alt.d.ts +1 -1
- package/dist/icons/ui-icons/two-cards-left.d.ts +1 -1
- package/dist/icons/ui-icons/two-cards-right.d.ts +1 -1
- package/dist/icons/ui-icons/two-columns.d.ts +1 -1
- package/dist/icons/ui-icons/typography-options.d.ts +1 -1
- package/dist/icons/ui-icons/typography.d.ts +1 -1
- package/dist/icons/ui-icons/underline.d.ts +1 -1
- package/dist/icons/ui-icons/ungroup.d.ts +1 -1
- package/dist/icons/ui-icons/upload.d.ts +1 -1
- package/dist/icons/ui-icons/venn-diagram-alt.d.ts +1 -1
- package/dist/icons/ui-icons/venn-diagram-alt2.d.ts +1 -1
- package/dist/icons/ui-icons/venn-diagram-alt3.d.ts +1 -1
- package/dist/icons/ui-icons/venn-diagram-alt4.d.ts +1 -1
- package/dist/icons/ui-icons/venn-diagram-alt5.d.ts +1 -1
- package/dist/icons/ui-icons/venn-diagram-alt6.d.ts +1 -1
- package/dist/icons/ui-icons/venn-diagram-alt7.d.ts +1 -1
- package/dist/icons/ui-icons/venn-diagram.d.ts +1 -1
- package/dist/icons/ui-icons/vertical-align-alt.d.ts +1 -1
- package/dist/icons/ui-icons/vertical-align-around.d.ts +1 -1
- package/dist/icons/ui-icons/vertical-align-between-alt.d.ts +1 -1
- package/dist/icons/ui-icons/vertical-align-between.d.ts +1 -1
- package/dist/icons/ui-icons/vertical-align-bottom.d.ts +1 -1
- package/dist/icons/ui-icons/vertical-align-center.d.ts +1 -1
- package/dist/icons/ui-icons/vertical-align-evenly.d.ts +1 -1
- package/dist/icons/ui-icons/vertical-align-stretch.d.ts +1 -1
- package/dist/icons/ui-icons/vertical-align-top.d.ts +1 -1
- package/dist/icons/ui-icons/vertical-align.d.ts +1 -1
- package/dist/icons/ui-icons/vertical-spacing.d.ts +1 -1
- package/dist/icons/ui-icons/video-chapters.d.ts +1 -1
- package/dist/icons/ui-icons/video-controls.d.ts +1 -1
- package/dist/icons/ui-icons/video-file.d.ts +1 -1
- package/dist/icons/ui-icons/video-poster-image.d.ts +1 -1
- package/dist/icons/ui-icons/video-subtitle-alt.d.ts +1 -1
- package/dist/icons/ui-icons/video-subtitle.d.ts +1 -1
- package/dist/icons/ui-icons/video.d.ts +1 -1
- package/dist/icons/ui-icons/visibility-alt.d.ts +1 -1
- package/dist/icons/ui-icons/visibility-alt2.d.ts +1 -1
- package/dist/icons/ui-icons/visibility.d.ts +1 -1
- package/dist/icons/ui-icons/visible.d.ts +1 -1
- package/dist/icons/ui-icons/volume.d.ts +1 -1
- package/dist/icons/ui-icons/warning-circle-fill-transparent.d.ts +1 -1
- package/dist/icons/ui-icons/warning-circle-fill.d.ts +1 -1
- package/dist/icons/ui-icons/warning-circle.d.ts +1 -1
- package/dist/icons/ui-icons/warning-fill-transparent.d.ts +1 -1
- package/dist/icons/ui-icons/warning-fill.d.ts +1 -1
- package/dist/icons/ui-icons/warning.d.ts +1 -1
- package/dist/icons/ui-icons/web-video.d.ts +1 -1
- package/dist/icons/ui-icons/wide-bottom.d.ts +1 -1
- package/dist/icons/ui-icons/wide-left.d.ts +1 -1
- package/dist/icons/ui-icons/wide-right.d.ts +1 -1
- package/dist/icons/ui-icons/wide-top.d.ts +1 -1
- package/dist/icons/ui-icons/width.d.ts +1 -1
- package/dist/icons/ui-icons/wordpress.d.ts +1 -1
- package/dist/icons/ui-icons/wrapper-alt.d.ts +1 -1
- package/dist/icons/ui-icons/wrapper-config.d.ts +1 -1
- package/dist/icons/ui-icons/wrapper-off-alt.d.ts +1 -1
- package/dist/icons/ui-icons/wrapper-overflow.d.ts +1 -1
- package/dist/icons/ui-icons/wrapper-simple-alt.d.ts +1 -1
- package/dist/icons/ui-icons/wrapper-simple.d.ts +1 -1
- package/dist/icons/ui-icons/wrapper.d.ts +1 -1
- package/dist/icons/ui-icons/wrench.d.ts +1 -1
- package/dist/icons/ui-icons/zap-fill.d.ts +1 -1
- package/dist/icons/ui-icons/zap.d.ts +1 -1
- package/dist/index.js +16 -16
- package/dist/{input-field-BlZlV8tR.js → input-field-QzBpjm-m.js} +15 -15
- package/dist/{jsx-svg-DHsyyG4y.js → jsx-svg-DRwJdRpA.js} +175 -133
- package/dist/{keyboard-DSfGd-PY.js → keyboard-BxnnQA2Z.js} +1 -1
- package/dist/{link-input-eyXFRA_1.js → link-input-CElQp3lP.js} +173 -99
- package/dist/{modal-Ct_DKzP5.js → modal-BeacK9N_.js} +25 -24
- package/dist/{number-Bgzc3wxt.js → number-BeC0ySe4.js} +2 -1
- package/dist/{number-picker-CeOp31Zd.js → number-picker-CK_OHBXw.js} +15 -15
- package/dist/{proxy-5i9ixxY0.js → react-C6Y6cCOx.js} +263 -272
- package/dist/{shared-DSy1H9Uy.js → shared-DBCipn_m.js} +88 -78
- package/dist/{solid-color-picker-DY1pBp18.js → solid-color-picker-2-X3ridX.js} +84 -72
- package/dist/sprintf-xJRAt4p0.js +129 -0
- package/dist/{switch-85EFSGmJ.js → switch-B87lQ1V0.js} +34 -18
- package/dist/{tabs-CBG98k4I.js → tabs-DgkJUkIX.js} +58 -48
- package/dist/text-helpers-QrwKKaOh.js +254 -0
- package/dist/{textSelection-DCeeu848.js → textSelection-5Qk8tLtm.js} +3 -3
- package/dist/{toggle-button-Ba1-pDDV.js → toggle-button-B2-f2rU6.js} +13 -12
- package/dist/{tooltip-CYYcZD_f.js → tooltip-AzOLps8g.js} +76 -70
- package/dist/{useAsyncList-B3-uyJgA.js → useAsyncList-CjKVLGN0.js} +8 -4
- package/dist/{useButton-C5l3uM3M.js → useButton-BIrfoiY8.js} +3 -3
- package/dist/{useCollection-D_QRaKc6.js → useCollection-LQlZnc1u.js} +390 -255
- package/dist/{useEvent-9UH7-hIb.js → useEvent-Bih8lvtM.js} +1 -1
- package/dist/{useField-DZ0cTkNU.js → useField-B_ibsWst.js} +7 -3
- package/dist/{useFilter-BVcZYNGK.js → useFilter-BFaOw4yi.js} +1 -1
- package/dist/{useFocusRing-KUKJnS3I.js → useFocusRing-ZXFsftJJ.js} +3 -2
- package/dist/{useFormReset-Bz-W1XZE.js → useFormReset-DDJhIIfG.js} +1 -1
- package/dist/{useFormValidation-BAC0iB4T.js → useFormValidation-BfnJKcdX.js} +5 -8
- package/dist/{useHover-BZbXvQcj.js → useHover-CbyH227W.js} +253 -61
- package/dist/{useLabel-Dyb9-lU5.js → useLabel-gfFDE4bn.js} +2 -2
- package/dist/{useLabels-DdxgDtMs.js → useLabels-Dcg-cEyM.js} +1 -1
- package/dist/{useListState-DdNleQAH.js → useListState-I22DfnmE.js} +4 -2
- package/dist/{useLocalizedStringFormatter-B5q-uCG6.js → useLocalizedStringFormatter-CTCqjYu4.js} +6 -1
- package/dist/{useNumberFieldState-D9gldYIv.js → useNumberFieldState-C1gD0RuW.js} +93 -64
- package/dist/{useNumberFormatter-DbIS46GT.js → useNumberFormatter-DbAt_fC_.js} +2 -2
- package/dist/{useOverlayTriggerState-DbYNw1PM.js → useOverlayTriggerState-Cpc_IbQf.js} +25 -21
- package/dist/{usePress-yLRbMdw6.js → usePress-BF7otjax.js} +41 -21
- package/dist/useSlot-CnQHcvd4.js +25 -0
- package/dist/{useTextField-BRuuZW8y.js → useTextField-CnTuCBMs.js} +11 -11
- package/dist/useToggle-Cgv5UXaB.js +115 -0
- package/dist/{useToggleState-BTyFw4k9.js → useToggleState-Cy1E36QZ.js} +1 -1
- package/dist/utilities/array-helpers.d.ts +1 -1
- package/dist/utilities/array-helpers.js +4 -3
- package/dist/utilities/debounce-throttle.d.ts +9 -2
- package/dist/utilities/es-dash.d.ts +11 -8
- package/dist/utilities/es-dash.js +1 -1
- package/dist/utilities/index.js +2 -2
- package/dist/utilities/text-helpers.js +1 -92
- package/dist/utilities/web-workers.d.ts +9 -8
- package/dist/utilities/web-workers.js +16 -8
- package/dist/{utils-8BmRKOPl.js → utils-ClM91CuL.js} +40 -29
- package/package.json +34 -37
- package/dist/SelectionIndicator-CVL8ZTMW.js +0 -13
- package/dist/useToggle-BYDcqWiq.js +0 -63
- package/dist/useToolbar-BKLb8oIP.js +0 -55
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __ } from "./build-module-
|
|
1
|
+
import { t as __ } from "./build-module-DG6ZK7Ty.js";
|
|
2
2
|
import { DraggableContext } from "./components/draggable/draggable-context.js";
|
|
3
3
|
import { createContext, createElement, forwardRef, memo, startTransition, useCallback, useContext, useEffect, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -14,20 +14,23 @@ function arrayMove$1(array, from, to) {
|
|
|
14
14
|
//#region node_modules/@preact/signals-core/dist/signals-core.module.js
|
|
15
15
|
var i = Symbol.for("preact-signals");
|
|
16
16
|
function t() {
|
|
17
|
-
if (!(
|
|
17
|
+
if (!(v > 1)) {
|
|
18
18
|
var i, t = !1;
|
|
19
19
|
(function() {
|
|
20
20
|
var i = c;
|
|
21
21
|
c = void 0;
|
|
22
22
|
while (void 0 !== i) {
|
|
23
|
-
|
|
23
|
+
var t = i.S;
|
|
24
|
+
if (t.v === i.v) {
|
|
25
|
+
for (var n = t.t; void 0 !== n; n = n.x) if (n.i === i.i) n.i = t.i;
|
|
26
|
+
}
|
|
24
27
|
i = i.o;
|
|
25
28
|
}
|
|
26
29
|
})();
|
|
27
30
|
while (void 0 !== h) {
|
|
28
31
|
var n = h;
|
|
29
32
|
h = void 0;
|
|
30
|
-
|
|
33
|
+
s++;
|
|
31
34
|
while (void 0 !== n) {
|
|
32
35
|
var r = n.u;
|
|
33
36
|
n.u = void 0;
|
|
@@ -43,60 +46,69 @@ function t() {
|
|
|
43
46
|
n = r;
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
s = 0;
|
|
50
|
+
v--;
|
|
48
51
|
if (t) throw i;
|
|
49
|
-
} else
|
|
52
|
+
} else v--;
|
|
50
53
|
}
|
|
51
54
|
function n(i) {
|
|
52
|
-
if (
|
|
55
|
+
if (v > 0) return i();
|
|
53
56
|
e = ++u;
|
|
54
|
-
|
|
57
|
+
v++;
|
|
55
58
|
try {
|
|
56
59
|
return i();
|
|
57
60
|
} finally {
|
|
58
61
|
t();
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
|
-
var r
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
var r;
|
|
65
|
+
var o = void 0;
|
|
66
|
+
function f(i) {
|
|
67
|
+
var t = o, n = r;
|
|
68
|
+
o = void 0;
|
|
64
69
|
r = void 0;
|
|
65
70
|
try {
|
|
66
71
|
return i();
|
|
67
72
|
} finally {
|
|
68
|
-
|
|
73
|
+
o = t;
|
|
74
|
+
r = n;
|
|
69
75
|
}
|
|
70
76
|
}
|
|
71
|
-
var
|
|
77
|
+
var h = void 0;
|
|
78
|
+
var v = 0;
|
|
79
|
+
var s = 0;
|
|
80
|
+
var u = 0;
|
|
81
|
+
var e = 0;
|
|
82
|
+
var c = void 0;
|
|
83
|
+
var d = 0;
|
|
72
84
|
function a(i) {
|
|
73
|
-
if (void 0 !==
|
|
85
|
+
if (void 0 !== o) {
|
|
74
86
|
var t = i.n;
|
|
75
|
-
if (void 0 === t || t.t !==
|
|
87
|
+
if (void 0 === t || t.t !== o) {
|
|
76
88
|
t = {
|
|
77
89
|
i: 0,
|
|
78
90
|
S: i,
|
|
79
|
-
p:
|
|
91
|
+
p: o.s,
|
|
80
92
|
n: void 0,
|
|
81
|
-
t:
|
|
93
|
+
t: o,
|
|
82
94
|
e: void 0,
|
|
83
95
|
x: void 0,
|
|
84
96
|
r: t
|
|
85
97
|
};
|
|
86
|
-
if (void 0 !==
|
|
87
|
-
|
|
98
|
+
if (void 0 !== o.s) o.s.n = t;
|
|
99
|
+
o.s = t;
|
|
88
100
|
i.n = t;
|
|
89
|
-
if (32 &
|
|
101
|
+
if (32 & o.f) i.S(t);
|
|
90
102
|
return t;
|
|
91
103
|
} else if (-1 === t.i) {
|
|
92
104
|
t.i = 0;
|
|
93
105
|
if (void 0 !== t.n) {
|
|
94
106
|
t.n.p = t.p;
|
|
95
107
|
if (void 0 !== t.p) t.p.n = t.n;
|
|
96
|
-
t.p =
|
|
108
|
+
t.p = o.s;
|
|
97
109
|
t.n = void 0;
|
|
98
|
-
|
|
99
|
-
|
|
110
|
+
o.s.n = t;
|
|
111
|
+
o.s = t;
|
|
100
112
|
}
|
|
101
113
|
return t;
|
|
102
114
|
}
|
|
@@ -122,7 +134,7 @@ l.prototype.S = function(i) {
|
|
|
122
134
|
i.x = n;
|
|
123
135
|
this.t = i;
|
|
124
136
|
if (void 0 !== n) n.e = i;
|
|
125
|
-
else
|
|
137
|
+
else f(function() {
|
|
126
138
|
var i;
|
|
127
139
|
null == (i = t.W) || i.call(t);
|
|
128
140
|
});
|
|
@@ -142,7 +154,7 @@ l.prototype.U = function(i) {
|
|
|
142
154
|
}
|
|
143
155
|
if (i === this.t) {
|
|
144
156
|
this.t = r;
|
|
145
|
-
if (void 0 === r)
|
|
157
|
+
if (void 0 === r) f(function() {
|
|
146
158
|
var i;
|
|
147
159
|
null == (i = t.Z) || i.call(t);
|
|
148
160
|
});
|
|
@@ -152,13 +164,10 @@ l.prototype.U = function(i) {
|
|
|
152
164
|
l.prototype.subscribe = function(i) {
|
|
153
165
|
var t = this;
|
|
154
166
|
return j(function() {
|
|
155
|
-
var n = t.value
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
} finally {
|
|
160
|
-
r = o;
|
|
161
|
-
}
|
|
167
|
+
var n = t.value;
|
|
168
|
+
f(function() {
|
|
169
|
+
return i(n);
|
|
170
|
+
});
|
|
162
171
|
}, { name: "sub" });
|
|
163
172
|
};
|
|
164
173
|
l.prototype.valueOf = function() {
|
|
@@ -171,13 +180,10 @@ l.prototype.toJSON = function() {
|
|
|
171
180
|
return this.value;
|
|
172
181
|
};
|
|
173
182
|
l.prototype.peek = function() {
|
|
174
|
-
var i =
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
} finally {
|
|
179
|
-
r = i;
|
|
180
|
-
}
|
|
183
|
+
var i = this;
|
|
184
|
+
return f(function() {
|
|
185
|
+
return i.value;
|
|
186
|
+
});
|
|
181
187
|
};
|
|
182
188
|
Object.defineProperty(l.prototype, "value", {
|
|
183
189
|
get: function() {
|
|
@@ -187,9 +193,9 @@ Object.defineProperty(l.prototype, "value", {
|
|
|
187
193
|
},
|
|
188
194
|
set: function(i) {
|
|
189
195
|
if (i !== this.v) {
|
|
190
|
-
if (
|
|
196
|
+
if (s > 100) throw new Error("Cycle detected");
|
|
191
197
|
(function(i) {
|
|
192
|
-
if (0 !==
|
|
198
|
+
if (0 !== v && 0 === s) {
|
|
193
199
|
if (i.l !== e) {
|
|
194
200
|
i.l = e;
|
|
195
201
|
c = {
|
|
@@ -204,7 +210,7 @@ Object.defineProperty(l.prototype, "value", {
|
|
|
204
210
|
this.v = i;
|
|
205
211
|
this.i++;
|
|
206
212
|
d++;
|
|
207
|
-
|
|
213
|
+
v++;
|
|
208
214
|
try {
|
|
209
215
|
for (var n = this.t; void 0 !== n; n = n.x) n.t.N();
|
|
210
216
|
} finally {
|
|
@@ -248,14 +254,11 @@ function b(i) {
|
|
|
248
254
|
i.s = n;
|
|
249
255
|
}
|
|
250
256
|
function p(i, t) {
|
|
251
|
-
l.call(this, void 0);
|
|
257
|
+
l.call(this, void 0, t);
|
|
252
258
|
this.x = i;
|
|
253
259
|
this.s = void 0;
|
|
254
260
|
this.g = d - 1;
|
|
255
261
|
this.f = 4;
|
|
256
|
-
this.W = null == t ? void 0 : t.watched;
|
|
257
|
-
this.Z = null == t ? void 0 : t.unwatched;
|
|
258
|
-
this.name = null == t ? void 0 : t.name;
|
|
259
262
|
}
|
|
260
263
|
p.prototype = new l();
|
|
261
264
|
p.prototype.h = function() {
|
|
@@ -270,10 +273,10 @@ p.prototype.h = function() {
|
|
|
270
273
|
this.f &= -2;
|
|
271
274
|
return !0;
|
|
272
275
|
}
|
|
273
|
-
var i =
|
|
276
|
+
var i = o;
|
|
274
277
|
try {
|
|
275
278
|
_(this);
|
|
276
|
-
|
|
279
|
+
o = this;
|
|
277
280
|
var t = this.x();
|
|
278
281
|
if (16 & this.f || this.v !== t || 0 === this.i) {
|
|
279
282
|
this.v = t;
|
|
@@ -285,7 +288,7 @@ p.prototype.h = function() {
|
|
|
285
288
|
this.f |= 16;
|
|
286
289
|
this.i++;
|
|
287
290
|
}
|
|
288
|
-
|
|
291
|
+
o = i;
|
|
289
292
|
b(this);
|
|
290
293
|
this.f &= -2;
|
|
291
294
|
return !0;
|
|
@@ -327,9 +330,9 @@ function S(i) {
|
|
|
327
330
|
var n = i.m;
|
|
328
331
|
i.m = void 0;
|
|
329
332
|
if ("function" == typeof n) {
|
|
330
|
-
|
|
331
|
-
var
|
|
332
|
-
|
|
333
|
+
v++;
|
|
334
|
+
var r = o;
|
|
335
|
+
o = void 0;
|
|
333
336
|
try {
|
|
334
337
|
n();
|
|
335
338
|
} catch (t) {
|
|
@@ -338,7 +341,7 @@ function S(i) {
|
|
|
338
341
|
m(i);
|
|
339
342
|
throw t;
|
|
340
343
|
} finally {
|
|
341
|
-
|
|
344
|
+
o = r;
|
|
342
345
|
t();
|
|
343
346
|
}
|
|
344
347
|
}
|
|
@@ -350,9 +353,9 @@ function m(i) {
|
|
|
350
353
|
S(i);
|
|
351
354
|
}
|
|
352
355
|
function x(i) {
|
|
353
|
-
if (
|
|
356
|
+
if (o !== this) throw new Error("Out-of-order effect");
|
|
354
357
|
b(this);
|
|
355
|
-
|
|
358
|
+
o = i;
|
|
356
359
|
this.f &= -2;
|
|
357
360
|
if (8 & this.f) m(this);
|
|
358
361
|
t();
|
|
@@ -364,7 +367,7 @@ function E(i, t) {
|
|
|
364
367
|
this.u = void 0;
|
|
365
368
|
this.f = 32;
|
|
366
369
|
this.name = null == t ? void 0 : t.name;
|
|
367
|
-
if (
|
|
370
|
+
if (r) r.push(this);
|
|
368
371
|
}
|
|
369
372
|
E.prototype.c = function() {
|
|
370
373
|
var i = this.S();
|
|
@@ -383,9 +386,9 @@ E.prototype.S = function() {
|
|
|
383
386
|
this.f &= -9;
|
|
384
387
|
S(this);
|
|
385
388
|
_(this);
|
|
386
|
-
|
|
387
|
-
var i =
|
|
388
|
-
|
|
389
|
+
v++;
|
|
390
|
+
var i = o;
|
|
391
|
+
o = this;
|
|
389
392
|
return x.bind(this, i);
|
|
390
393
|
};
|
|
391
394
|
E.prototype.N = function() {
|
|
@@ -586,7 +589,26 @@ function effects(...entries) {
|
|
|
586
589
|
const effects2 = entries.map((fn) => j(fn));
|
|
587
590
|
return () => effects2.forEach((cleanup) => cleanup());
|
|
588
591
|
}
|
|
589
|
-
var _previous_dec
|
|
592
|
+
var _previous_dec;
|
|
593
|
+
var _initial_dec;
|
|
594
|
+
var _current_dec$1;
|
|
595
|
+
var _current_dec2;
|
|
596
|
+
var _previous_dec2;
|
|
597
|
+
var _initial_dec2 = [reactive];
|
|
598
|
+
var _init$5;
|
|
599
|
+
var _initial;
|
|
600
|
+
var _a$3;
|
|
601
|
+
var initial_get;
|
|
602
|
+
var initial_set;
|
|
603
|
+
var _ValueHistory_instances;
|
|
604
|
+
var _previous;
|
|
605
|
+
var _b$1;
|
|
606
|
+
var previous_get;
|
|
607
|
+
var previous_set;
|
|
608
|
+
var _current;
|
|
609
|
+
var _c$2;
|
|
610
|
+
var current_get;
|
|
611
|
+
var current_set;
|
|
590
612
|
_previous_dec2 = [reactive], _current_dec2 = [reactive], _current_dec$1 = [enumerable()], _initial_dec = [enumerable()], _previous_dec = [enumerable()];
|
|
591
613
|
var ValueHistory = class {
|
|
592
614
|
constructor(defaultValue, equals = Object.is) {
|
|
@@ -611,7 +633,7 @@ var ValueHistory = class {
|
|
|
611
633
|
}
|
|
612
634
|
/** Set the current value */
|
|
613
635
|
set current(value) {
|
|
614
|
-
const current =
|
|
636
|
+
const current = f(() => __privateGet$6(this, _ValueHistory_instances, current_get));
|
|
615
637
|
if (value && current && this.equals(current, value)) return;
|
|
616
638
|
n(() => {
|
|
617
639
|
if (!__privateGet$6(this, _ValueHistory_instances, initial_get)) __privateSet$6(this, _ValueHistory_instances, value, initial_set);
|
|
@@ -641,7 +663,7 @@ __decorateElement$5(_init$5, 2, "initial", _initial_dec, ValueHistory);
|
|
|
641
663
|
__decorateElement$5(_init$5, 2, "previous", _previous_dec, ValueHistory);
|
|
642
664
|
__decoratorMetadata$5(_init$5, ValueHistory);
|
|
643
665
|
function snapshot(value) {
|
|
644
|
-
return
|
|
666
|
+
return f(() => {
|
|
645
667
|
const output = {};
|
|
646
668
|
for (const key in value) output[key] = value[key];
|
|
647
669
|
return output;
|
|
@@ -935,7 +957,11 @@ function rectangleRectangleIntersection(a, b) {
|
|
|
935
957
|
if (left < right && top < bottom) return width * height;
|
|
936
958
|
return 0;
|
|
937
959
|
}
|
|
938
|
-
var _direction_dec$1
|
|
960
|
+
var _direction_dec$1;
|
|
961
|
+
var _delta_dec$1;
|
|
962
|
+
var _a$2;
|
|
963
|
+
var _timestamp$1;
|
|
964
|
+
var _init$4;
|
|
939
965
|
var Position$1 = class extends (_a$2 = ValueHistory, _delta_dec$1 = [derived], _direction_dec$1 = [derived], _a$2) {
|
|
940
966
|
constructor(initialValue) {
|
|
941
967
|
const point = Point$1.from(initialValue);
|
|
@@ -1137,7 +1163,10 @@ function descriptor(plugin) {
|
|
|
1137
1163
|
};
|
|
1138
1164
|
return plugin;
|
|
1139
1165
|
}
|
|
1140
|
-
var _disabled_dec = [reactive]
|
|
1166
|
+
var _disabled_dec = [reactive];
|
|
1167
|
+
var _init$3;
|
|
1168
|
+
var _disabled;
|
|
1169
|
+
var _cleanupFunctions$1;
|
|
1141
1170
|
var Plugin = class {
|
|
1142
1171
|
/**
|
|
1143
1172
|
* Creates a new plugin instance.
|
|
@@ -1177,7 +1206,7 @@ var Plugin = class {
|
|
|
1177
1206
|
* This method does not trigger effects when accessed.
|
|
1178
1207
|
*/
|
|
1179
1208
|
isDisabled() {
|
|
1180
|
-
return
|
|
1209
|
+
return f(() => {
|
|
1181
1210
|
return this.disabled;
|
|
1182
1211
|
});
|
|
1183
1212
|
}
|
|
@@ -1262,9 +1291,13 @@ var PluginRegistry = class {
|
|
|
1262
1291
|
* - Registers new plugins with their options
|
|
1263
1292
|
*/
|
|
1264
1293
|
set values(entries) {
|
|
1265
|
-
const descriptors = entries.map(descriptor).
|
|
1266
|
-
|
|
1267
|
-
|
|
1294
|
+
const descriptors = entries.map(descriptor).reduce((acc, descriptor2) => {
|
|
1295
|
+
const existing = acc.find(({ plugin }) => plugin === descriptor2.plugin);
|
|
1296
|
+
if (existing) {
|
|
1297
|
+
existing.options = descriptor2.options;
|
|
1298
|
+
return acc;
|
|
1299
|
+
}
|
|
1300
|
+
return [...acc, descriptor2];
|
|
1268
1301
|
}, []);
|
|
1269
1302
|
const constructors = descriptors.map(({ plugin }) => plugin);
|
|
1270
1303
|
for (const plugin of __privateGet$4(this, _previousValues)) if (!constructors.includes(plugin)) {
|
|
@@ -1341,7 +1374,8 @@ function sortCollisions(a, b) {
|
|
|
1341
1374
|
return b.priority - a.priority;
|
|
1342
1375
|
}
|
|
1343
1376
|
var DEFAULT_VALUE = [];
|
|
1344
|
-
var _previousCoordinates
|
|
1377
|
+
var _previousCoordinates;
|
|
1378
|
+
var _collisions;
|
|
1345
1379
|
var CollisionObserver = class extends Plugin {
|
|
1346
1380
|
/**
|
|
1347
1381
|
* Creates a new CollisionObserver instance.
|
|
@@ -1356,7 +1390,7 @@ var CollisionObserver = class extends Plugin {
|
|
|
1356
1390
|
__privateSet$4(this, _collisions, y(DEFAULT_VALUE));
|
|
1357
1391
|
this.destroy = effects(() => {
|
|
1358
1392
|
const collisions = this.computeCollisions();
|
|
1359
|
-
const coordinates =
|
|
1393
|
+
const coordinates = f(() => this.manager.dragOperation.position.current);
|
|
1360
1394
|
if (collisions !== DEFAULT_VALUE) {
|
|
1361
1395
|
const previousCoordinates = __privateGet$4(this, _previousCoordinates);
|
|
1362
1396
|
__privateSet$4(this, _previousCoordinates, coordinates);
|
|
@@ -1374,7 +1408,7 @@ var CollisionObserver = class extends Plugin {
|
|
|
1374
1408
|
* @param immediate - If true, updates collisions immediately. If false, resets previous coordinates.
|
|
1375
1409
|
*/
|
|
1376
1410
|
forceUpdate(immediate = true) {
|
|
1377
|
-
|
|
1411
|
+
f(() => {
|
|
1378
1412
|
if (immediate) __privateGet$4(this, _collisions).value = this.computeCollisions();
|
|
1379
1413
|
else __privateSet$4(this, _previousCoordinates, void 0);
|
|
1380
1414
|
});
|
|
@@ -1399,7 +1433,7 @@ var CollisionObserver = class extends Plugin {
|
|
|
1399
1433
|
if (!detectCollision) continue;
|
|
1400
1434
|
potentialTargets.push(entry);
|
|
1401
1435
|
entry.shape;
|
|
1402
|
-
const collision =
|
|
1436
|
+
const collision = f(() => detectCollision({
|
|
1403
1437
|
droppable: entry,
|
|
1404
1438
|
dragOperation
|
|
1405
1439
|
}));
|
|
@@ -1421,6 +1455,342 @@ var CollisionObserver = class extends Plugin {
|
|
|
1421
1455
|
};
|
|
1422
1456
|
_previousCoordinates = new WeakMap();
|
|
1423
1457
|
_collisions = new WeakMap();
|
|
1458
|
+
var _disabled_dec2;
|
|
1459
|
+
var _data_dec;
|
|
1460
|
+
var _manager_dec = [reactive];
|
|
1461
|
+
var _Entity_static;
|
|
1462
|
+
var flushIdChanges_fn;
|
|
1463
|
+
var _init2$1;
|
|
1464
|
+
var _manager;
|
|
1465
|
+
var _idSignal;
|
|
1466
|
+
var _data;
|
|
1467
|
+
var _disabled2;
|
|
1468
|
+
_data_dec = [reactive], _disabled_dec2 = [reactive];
|
|
1469
|
+
var _Entity = class _Entity {
|
|
1470
|
+
/**
|
|
1471
|
+
* Creates a new instance of the `Entity` class.
|
|
1472
|
+
*
|
|
1473
|
+
* @param input - An object containing the initial properties of the entity.
|
|
1474
|
+
* @param manager - The manager that controls the drag and drop operations.
|
|
1475
|
+
*/
|
|
1476
|
+
constructor(input, manager) {
|
|
1477
|
+
__privateAdd$4(this, _manager, __runInitializers$3(_init2$1, 8, this)), __runInitializers$3(_init2$1, 11, this);
|
|
1478
|
+
/**
|
|
1479
|
+
* The unique identifier of the entity.
|
|
1480
|
+
*
|
|
1481
|
+
* Setting this property defers the signal update to a microtask,
|
|
1482
|
+
* batching multiple id changes together atomically. This ensures
|
|
1483
|
+
* that when entities swap ids (e.g. during sorting with virtualization),
|
|
1484
|
+
* all registry updates happen in a single transaction.
|
|
1485
|
+
*/
|
|
1486
|
+
__privateAdd$4(this, _idSignal);
|
|
1487
|
+
__privateAdd$4(this, _data, __runInitializers$3(_init2$1, 12, this)), __runInitializers$3(_init2$1, 15, this);
|
|
1488
|
+
__privateAdd$4(this, _disabled2, __runInitializers$3(_init2$1, 16, this)), __runInitializers$3(_init2$1, 19, this);
|
|
1489
|
+
const { effects: effects6, id, data = {}, disabled = false, register = true } = input;
|
|
1490
|
+
let previousId = id;
|
|
1491
|
+
__privateSet$4(this, _idSignal, y(id));
|
|
1492
|
+
this.manager = manager;
|
|
1493
|
+
this.data = data;
|
|
1494
|
+
this.disabled = disabled;
|
|
1495
|
+
this.effects = () => {
|
|
1496
|
+
var _a;
|
|
1497
|
+
return [() => {
|
|
1498
|
+
const { id: id2, manager: manager2 } = this;
|
|
1499
|
+
if (id2 === previousId) return;
|
|
1500
|
+
previousId = id2;
|
|
1501
|
+
manager2?.registry.register(this);
|
|
1502
|
+
return () => manager2 == null ? void 0 : manager2.registry.unregister(this);
|
|
1503
|
+
}, ...(_a = effects6 == null ? void 0 : effects6()) != null ? _a : []];
|
|
1504
|
+
};
|
|
1505
|
+
this.register = this.register.bind(this);
|
|
1506
|
+
this.unregister = this.unregister.bind(this);
|
|
1507
|
+
this.destroy = this.destroy.bind(this);
|
|
1508
|
+
if (manager && register) queueMicrotask(this.register);
|
|
1509
|
+
}
|
|
1510
|
+
get id() {
|
|
1511
|
+
var _a, _b;
|
|
1512
|
+
const signalValue = __privateGet$4(this, _idSignal).value;
|
|
1513
|
+
return (_b = (_a = _Entity.pendingIdChanges) == null ? void 0 : _a.get(this)) != null ? _b : signalValue;
|
|
1514
|
+
}
|
|
1515
|
+
set id(value) {
|
|
1516
|
+
var _a, _b;
|
|
1517
|
+
if (value === ((_b = (_a = _Entity.pendingIdChanges) == null ? void 0 : _a.get(this)) != null ? _b : __privateGet$4(this, _idSignal).peek())) return;
|
|
1518
|
+
if (!_Entity.pendingIdChanges) {
|
|
1519
|
+
_Entity.pendingIdChanges = new Map();
|
|
1520
|
+
queueMicrotask(() => {
|
|
1521
|
+
var _a2;
|
|
1522
|
+
return __privateMethod$2(_a2 = _Entity, _Entity_static, flushIdChanges_fn).call(_a2);
|
|
1523
|
+
});
|
|
1524
|
+
}
|
|
1525
|
+
_Entity.pendingIdChanges.set(this, value);
|
|
1526
|
+
}
|
|
1527
|
+
/**
|
|
1528
|
+
* A method that registers the entity with the manager.
|
|
1529
|
+
* @returns CleanupFunction | void
|
|
1530
|
+
*/
|
|
1531
|
+
register() {
|
|
1532
|
+
var _a;
|
|
1533
|
+
return (_a = this.manager) == null ? void 0 : _a.registry.register(this);
|
|
1534
|
+
}
|
|
1535
|
+
/**
|
|
1536
|
+
* A method that unregisters the entity from the manager.
|
|
1537
|
+
* @returns void
|
|
1538
|
+
*/
|
|
1539
|
+
unregister() {
|
|
1540
|
+
var _a;
|
|
1541
|
+
(_a = this.manager) == null || _a.registry.unregister(this);
|
|
1542
|
+
}
|
|
1543
|
+
/**
|
|
1544
|
+
* A method that cleans up the entity when it is no longer needed.
|
|
1545
|
+
* @returns void
|
|
1546
|
+
*/
|
|
1547
|
+
destroy() {
|
|
1548
|
+
var _a;
|
|
1549
|
+
(_a = this.manager) == null || _a.registry.unregister(this);
|
|
1550
|
+
}
|
|
1551
|
+
};
|
|
1552
|
+
_init2$1 = __decoratorStart$3(null);
|
|
1553
|
+
_Entity_static = new WeakSet();
|
|
1554
|
+
flushIdChanges_fn = function() {
|
|
1555
|
+
const changes = _Entity.pendingIdChanges;
|
|
1556
|
+
_Entity.pendingIdChanges = null;
|
|
1557
|
+
if (changes) n(() => {
|
|
1558
|
+
for (const [entity, id] of changes) __privateGet$4(entity, _idSignal).value = id;
|
|
1559
|
+
});
|
|
1560
|
+
};
|
|
1561
|
+
_manager = new WeakMap();
|
|
1562
|
+
_idSignal = new WeakMap();
|
|
1563
|
+
_data = new WeakMap();
|
|
1564
|
+
_disabled2 = new WeakMap();
|
|
1565
|
+
__decorateElement$3(_init2$1, 4, "manager", _manager_dec, _Entity, _manager);
|
|
1566
|
+
__decorateElement$3(_init2$1, 4, "data", _data_dec, _Entity, _data);
|
|
1567
|
+
__decorateElement$3(_init2$1, 4, "disabled", _disabled_dec2, _Entity, _disabled2);
|
|
1568
|
+
__privateAdd$4(_Entity, _Entity_static);
|
|
1569
|
+
__decoratorMetadata$3(_init2$1, _Entity);
|
|
1570
|
+
_Entity.pendingIdChanges = null;
|
|
1571
|
+
var Entity = _Entity;
|
|
1572
|
+
var EntityRegistry = class {
|
|
1573
|
+
constructor() {
|
|
1574
|
+
this.map = y(new Map());
|
|
1575
|
+
this.cleanupFunctions = new WeakMap();
|
|
1576
|
+
/**
|
|
1577
|
+
* Registers a entity in the registry.
|
|
1578
|
+
* @param key - The unique identifier of the entity.
|
|
1579
|
+
* @param value - The entity to register.
|
|
1580
|
+
* @returns A function that unregisters the entity.
|
|
1581
|
+
*/
|
|
1582
|
+
this.register = (key, value) => {
|
|
1583
|
+
const current = this.map.peek();
|
|
1584
|
+
const currentValue = current.get(key);
|
|
1585
|
+
const unregister = () => this.unregister(key, value);
|
|
1586
|
+
if (currentValue === value) return unregister;
|
|
1587
|
+
if (currentValue) {
|
|
1588
|
+
if (currentValue.id === key) {
|
|
1589
|
+
this.cleanupFunctions.get(currentValue)?.();
|
|
1590
|
+
this.cleanupFunctions.delete(currentValue);
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1593
|
+
const updatedMap = new Map(current);
|
|
1594
|
+
for (const [existingKey, existingValue] of current) if (existingValue === value && existingKey !== key) {
|
|
1595
|
+
updatedMap.delete(existingKey);
|
|
1596
|
+
break;
|
|
1597
|
+
}
|
|
1598
|
+
updatedMap.set(key, value);
|
|
1599
|
+
this.map.value = updatedMap;
|
|
1600
|
+
const cleanup = effects(...value.effects());
|
|
1601
|
+
this.cleanupFunctions.set(value, cleanup);
|
|
1602
|
+
return unregister;
|
|
1603
|
+
};
|
|
1604
|
+
/**
|
|
1605
|
+
* Unregisters an entity from the registry.
|
|
1606
|
+
* @param key - The unique identifier of the entity.
|
|
1607
|
+
* @param value - The entity instance to unregister.
|
|
1608
|
+
*/
|
|
1609
|
+
this.unregister = (key, value) => {
|
|
1610
|
+
const current = this.map.peek();
|
|
1611
|
+
if (current.get(key) !== value) return;
|
|
1612
|
+
this.cleanupFunctions.get(value)?.();
|
|
1613
|
+
this.cleanupFunctions.delete(value);
|
|
1614
|
+
const updatedMap = new Map(current);
|
|
1615
|
+
updatedMap.delete(key);
|
|
1616
|
+
this.map.value = updatedMap;
|
|
1617
|
+
};
|
|
1618
|
+
}
|
|
1619
|
+
/**
|
|
1620
|
+
* Iterator for the EntityRegistry class.
|
|
1621
|
+
* @returns An iterator for the values in the map.
|
|
1622
|
+
*/
|
|
1623
|
+
[Symbol.iterator]() {
|
|
1624
|
+
return this.map.peek().values();
|
|
1625
|
+
}
|
|
1626
|
+
get value() {
|
|
1627
|
+
return this.map.value.values();
|
|
1628
|
+
}
|
|
1629
|
+
/**
|
|
1630
|
+
* Checks if a entity with the given identifier exists in the registry.
|
|
1631
|
+
* @param identifier - The unique identifier of the entity.
|
|
1632
|
+
* @returns True if the entity exists, false otherwise.
|
|
1633
|
+
*/
|
|
1634
|
+
has(identifier) {
|
|
1635
|
+
return this.map.value.has(identifier);
|
|
1636
|
+
}
|
|
1637
|
+
/**
|
|
1638
|
+
* Retrieves a entity from the registry using its identifier.
|
|
1639
|
+
* @param identifier - The unique identifier of the entity.
|
|
1640
|
+
* @returns The entity if it exists, undefined otherwise.
|
|
1641
|
+
*/
|
|
1642
|
+
get(identifier) {
|
|
1643
|
+
return this.map.value.get(identifier);
|
|
1644
|
+
}
|
|
1645
|
+
/**
|
|
1646
|
+
* Destroys all entries in the registry and clears the registry.
|
|
1647
|
+
*/
|
|
1648
|
+
destroy() {
|
|
1649
|
+
for (const entry of this) {
|
|
1650
|
+
this.cleanupFunctions.get(entry)?.();
|
|
1651
|
+
entry.destroy();
|
|
1652
|
+
}
|
|
1653
|
+
this.map.value = new Map();
|
|
1654
|
+
}
|
|
1655
|
+
};
|
|
1656
|
+
var _isDragSource_dec;
|
|
1657
|
+
var _isDragging_dec;
|
|
1658
|
+
var _isDropping_dec;
|
|
1659
|
+
var _status_dec;
|
|
1660
|
+
var _modifiers_dec;
|
|
1661
|
+
var _type_dec;
|
|
1662
|
+
var _c$1;
|
|
1663
|
+
var _init3$1;
|
|
1664
|
+
var _type;
|
|
1665
|
+
var _modifiers;
|
|
1666
|
+
var _status;
|
|
1667
|
+
var Draggable$2 = class extends (_c$1 = Entity, _type_dec = [reactive], _modifiers_dec = [reactive], _status_dec = [reactive], _isDropping_dec = [derived], _isDragging_dec = [derived], _isDragSource_dec = [derived], _c$1) {
|
|
1668
|
+
constructor(_a, manager) {
|
|
1669
|
+
var _b = _a, { modifiers, type, sensors, plugins, effects: effects6 } = _b, input = __objRest$3(_b, [
|
|
1670
|
+
"modifiers",
|
|
1671
|
+
"type",
|
|
1672
|
+
"sensors",
|
|
1673
|
+
"plugins",
|
|
1674
|
+
"effects"
|
|
1675
|
+
]);
|
|
1676
|
+
super(__spreadProps$4(__spreadValues$4({}, input), { effects: () => {
|
|
1677
|
+
var _a2;
|
|
1678
|
+
return [...(_a2 = effects6 == null ? void 0 : effects6()) != null ? _a2 : [], () => {
|
|
1679
|
+
const { manager: manager2, plugins: plugins2 } = this;
|
|
1680
|
+
if (!manager2 || !plugins2) return;
|
|
1681
|
+
for (const entry of plugins2) {
|
|
1682
|
+
const { plugin } = descriptor(entry);
|
|
1683
|
+
manager2.registry.plugins.register(plugin);
|
|
1684
|
+
}
|
|
1685
|
+
}];
|
|
1686
|
+
} }), manager);
|
|
1687
|
+
__runInitializers$3(_init3$1, 5, this);
|
|
1688
|
+
__privateAdd$4(this, _type, __runInitializers$3(_init3$1, 8, this)), __runInitializers$3(_init3$1, 11, this);
|
|
1689
|
+
__privateAdd$4(this, _modifiers, __runInitializers$3(_init3$1, 12, this)), __runInitializers$3(_init3$1, 15, this);
|
|
1690
|
+
__privateAdd$4(this, _status, __runInitializers$3(_init3$1, 16, this, this.isDragSource ? "dragging" : "idle")), __runInitializers$3(_init3$1, 19, this);
|
|
1691
|
+
this.type = type;
|
|
1692
|
+
this.sensors = sensors;
|
|
1693
|
+
this.modifiers = modifiers;
|
|
1694
|
+
this.alignment = input.alignment;
|
|
1695
|
+
this.plugins = plugins;
|
|
1696
|
+
}
|
|
1697
|
+
/**
|
|
1698
|
+
* Look up per-entity options for a given plugin constructor.
|
|
1699
|
+
*/
|
|
1700
|
+
pluginConfig(plugin) {
|
|
1701
|
+
if (!this.plugins) return void 0;
|
|
1702
|
+
for (const entry of this.plugins) {
|
|
1703
|
+
const desc = descriptor(entry);
|
|
1704
|
+
if (desc.plugin === plugin) return desc.options;
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
get isDropping() {
|
|
1708
|
+
return this.status === "dropping" && this.isDragSource;
|
|
1709
|
+
}
|
|
1710
|
+
get isDragging() {
|
|
1711
|
+
return this.status === "dragging" && this.isDragSource;
|
|
1712
|
+
}
|
|
1713
|
+
get isDragSource() {
|
|
1714
|
+
var _a, _b;
|
|
1715
|
+
return ((_b = (_a = this.manager) == null ? void 0 : _a.dragOperation.source) == null ? void 0 : _b.id) === this.id;
|
|
1716
|
+
}
|
|
1717
|
+
};
|
|
1718
|
+
_init3$1 = __decoratorStart$3(_c$1);
|
|
1719
|
+
_type = new WeakMap();
|
|
1720
|
+
_modifiers = new WeakMap();
|
|
1721
|
+
_status = new WeakMap();
|
|
1722
|
+
__decorateElement$3(_init3$1, 4, "type", _type_dec, Draggable$2, _type);
|
|
1723
|
+
__decorateElement$3(_init3$1, 4, "modifiers", _modifiers_dec, Draggable$2, _modifiers);
|
|
1724
|
+
__decorateElement$3(_init3$1, 4, "status", _status_dec, Draggable$2, _status);
|
|
1725
|
+
__decorateElement$3(_init3$1, 2, "isDropping", _isDropping_dec, Draggable$2);
|
|
1726
|
+
__decorateElement$3(_init3$1, 2, "isDragging", _isDragging_dec, Draggable$2);
|
|
1727
|
+
__decorateElement$3(_init3$1, 2, "isDragSource", _isDragSource_dec, Draggable$2);
|
|
1728
|
+
__decoratorMetadata$3(_init3$1, Draggable$2);
|
|
1729
|
+
var _isDropTarget_dec;
|
|
1730
|
+
var _shape_dec;
|
|
1731
|
+
var _collisionPriority_dec;
|
|
1732
|
+
var _collisionDetector_dec;
|
|
1733
|
+
var _type_dec2;
|
|
1734
|
+
var _accept_dec;
|
|
1735
|
+
var _c2$1;
|
|
1736
|
+
var _init4$1;
|
|
1737
|
+
var _accept;
|
|
1738
|
+
var _type2;
|
|
1739
|
+
var _collisionDetector;
|
|
1740
|
+
var _collisionPriority;
|
|
1741
|
+
var _shape;
|
|
1742
|
+
var Droppable$1 = class extends (_c2$1 = Entity, _accept_dec = [reactive], _type_dec2 = [reactive], _collisionDetector_dec = [reactive], _collisionPriority_dec = [reactive], _shape_dec = [reactive], _isDropTarget_dec = [derived], _c2$1) {
|
|
1743
|
+
constructor(_a, manager) {
|
|
1744
|
+
var _b = _a, { accept, collisionDetector, collisionPriority, type } = _b, input = __objRest$3(_b, [
|
|
1745
|
+
"accept",
|
|
1746
|
+
"collisionDetector",
|
|
1747
|
+
"collisionPriority",
|
|
1748
|
+
"type"
|
|
1749
|
+
]);
|
|
1750
|
+
super(input, manager);
|
|
1751
|
+
__runInitializers$3(_init4$1, 5, this);
|
|
1752
|
+
__privateAdd$4(this, _accept, __runInitializers$3(_init4$1, 8, this)), __runInitializers$3(_init4$1, 11, this);
|
|
1753
|
+
__privateAdd$4(this, _type2, __runInitializers$3(_init4$1, 12, this)), __runInitializers$3(_init4$1, 15, this);
|
|
1754
|
+
__privateAdd$4(this, _collisionDetector, __runInitializers$3(_init4$1, 16, this)), __runInitializers$3(_init4$1, 19, this);
|
|
1755
|
+
__privateAdd$4(this, _collisionPriority, __runInitializers$3(_init4$1, 20, this)), __runInitializers$3(_init4$1, 23, this);
|
|
1756
|
+
__privateAdd$4(this, _shape, __runInitializers$3(_init4$1, 24, this)), __runInitializers$3(_init4$1, 27, this);
|
|
1757
|
+
this.accept = accept;
|
|
1758
|
+
this.collisionDetector = collisionDetector;
|
|
1759
|
+
this.collisionPriority = collisionPriority;
|
|
1760
|
+
this.type = type;
|
|
1761
|
+
}
|
|
1762
|
+
/**
|
|
1763
|
+
* Checks whether or not the droppable accepts a given draggable.
|
|
1764
|
+
*
|
|
1765
|
+
* @param draggable - The draggable to check
|
|
1766
|
+
* @returns true if the draggable can be dropped here
|
|
1767
|
+
*/
|
|
1768
|
+
accepts(draggable) {
|
|
1769
|
+
const { accept } = this;
|
|
1770
|
+
if (!accept) return true;
|
|
1771
|
+
if (typeof accept === "function") return accept(draggable);
|
|
1772
|
+
if (!draggable.type) return false;
|
|
1773
|
+
if (Array.isArray(accept)) return accept.includes(draggable.type);
|
|
1774
|
+
return draggable.type === accept;
|
|
1775
|
+
}
|
|
1776
|
+
get isDropTarget() {
|
|
1777
|
+
var _a, _b;
|
|
1778
|
+
return ((_b = (_a = this.manager) == null ? void 0 : _a.dragOperation.target) == null ? void 0 : _b.id) === this.id;
|
|
1779
|
+
}
|
|
1780
|
+
};
|
|
1781
|
+
_init4$1 = __decoratorStart$3(_c2$1);
|
|
1782
|
+
_accept = new WeakMap();
|
|
1783
|
+
_type2 = new WeakMap();
|
|
1784
|
+
_collisionDetector = new WeakMap();
|
|
1785
|
+
_collisionPriority = new WeakMap();
|
|
1786
|
+
_shape = new WeakMap();
|
|
1787
|
+
__decorateElement$3(_init4$1, 4, "accept", _accept_dec, Droppable$1, _accept);
|
|
1788
|
+
__decorateElement$3(_init4$1, 4, "type", _type_dec2, Droppable$1, _type2);
|
|
1789
|
+
__decorateElement$3(_init4$1, 4, "collisionDetector", _collisionDetector_dec, Droppable$1, _collisionDetector);
|
|
1790
|
+
__decorateElement$3(_init4$1, 4, "collisionPriority", _collisionPriority_dec, Droppable$1, _collisionPriority);
|
|
1791
|
+
__decorateElement$3(_init4$1, 4, "shape", _shape_dec, Droppable$1, _shape);
|
|
1792
|
+
__decorateElement$3(_init4$1, 2, "isDropTarget", _isDropTarget_dec, Droppable$1);
|
|
1793
|
+
__decoratorMetadata$3(_init4$1, Droppable$1);
|
|
1424
1794
|
var Monitor = class {
|
|
1425
1795
|
constructor() {
|
|
1426
1796
|
this.registry = new Map();
|
|
@@ -1513,13 +1883,14 @@ var CollisionNotifier = class extends CorePlugin {
|
|
|
1513
1883
|
const { collisionObserver, monitor } = manager;
|
|
1514
1884
|
const { collisions } = collisionObserver;
|
|
1515
1885
|
if (collisionObserver.isDisabled()) return;
|
|
1886
|
+
if (Entity.pendingIdChanges) return;
|
|
1516
1887
|
const event = defaultPreventable({ collisions });
|
|
1517
1888
|
monitor.dispatch("collision", event);
|
|
1518
1889
|
if (event.defaultPrevented) return;
|
|
1519
1890
|
if (isEqual(collisions, previousCollisions)) return;
|
|
1520
1891
|
else previousCollisions = collisions;
|
|
1521
1892
|
const [firstCollision] = collisions;
|
|
1522
|
-
|
|
1893
|
+
f(() => {
|
|
1523
1894
|
var _a;
|
|
1524
1895
|
if ((firstCollision == null ? void 0 : firstCollision.id) !== ((_a = manager.dragOperation.target) == null ? void 0 : _a.id)) {
|
|
1525
1896
|
collisionObserver.disable();
|
|
@@ -1545,12 +1916,20 @@ var CollisionType = ((CollisionType2) => {
|
|
|
1545
1916
|
CollisionType2[CollisionType2["PointerIntersection"] = 2] = "PointerIntersection";
|
|
1546
1917
|
return CollisionType2;
|
|
1547
1918
|
})(CollisionType || {});
|
|
1548
|
-
var _dropped_dec
|
|
1919
|
+
var _dropped_dec;
|
|
1920
|
+
var _dragging_dec;
|
|
1921
|
+
var _initialized_dec;
|
|
1922
|
+
var _initializing_dec;
|
|
1923
|
+
var _idle_dec;
|
|
1924
|
+
var _current_dec;
|
|
1925
|
+
var _value_dec = [reactive];
|
|
1926
|
+
var _init5$1;
|
|
1927
|
+
var _value;
|
|
1549
1928
|
_current_dec = [derived], _idle_dec = [derived], _initializing_dec = [derived], _initialized_dec = [derived], _dragging_dec = [derived], _dropped_dec = [derived];
|
|
1550
1929
|
var Status = class {
|
|
1551
1930
|
constructor() {
|
|
1552
|
-
__runInitializers$3(
|
|
1553
|
-
__privateAdd$4(this, _value, __runInitializers$3(
|
|
1931
|
+
__runInitializers$3(_init5$1, 5, this);
|
|
1932
|
+
__privateAdd$4(this, _value, __runInitializers$3(_init5$1, 8, this, "idle")), __runInitializers$3(_init5$1, 11, this);
|
|
1554
1933
|
}
|
|
1555
1934
|
get current() {
|
|
1556
1935
|
return this.value;
|
|
@@ -1580,16 +1959,16 @@ var Status = class {
|
|
|
1580
1959
|
this.value = value;
|
|
1581
1960
|
}
|
|
1582
1961
|
};
|
|
1583
|
-
|
|
1962
|
+
_init5$1 = __decoratorStart$3(null);
|
|
1584
1963
|
_value = new WeakMap();
|
|
1585
|
-
__decorateElement$3(
|
|
1586
|
-
__decorateElement$3(
|
|
1587
|
-
__decorateElement$3(
|
|
1588
|
-
__decorateElement$3(
|
|
1589
|
-
__decorateElement$3(
|
|
1590
|
-
__decorateElement$3(
|
|
1591
|
-
__decorateElement$3(
|
|
1592
|
-
__decoratorMetadata$3(
|
|
1964
|
+
__decorateElement$3(_init5$1, 4, "value", _value_dec, Status, _value);
|
|
1965
|
+
__decorateElement$3(_init5$1, 2, "current", _current_dec, Status);
|
|
1966
|
+
__decorateElement$3(_init5$1, 2, "idle", _idle_dec, Status);
|
|
1967
|
+
__decorateElement$3(_init5$1, 2, "initializing", _initializing_dec, Status);
|
|
1968
|
+
__decorateElement$3(_init5$1, 2, "initialized", _initialized_dec, Status);
|
|
1969
|
+
__decorateElement$3(_init5$1, 2, "dragging", _dragging_dec, Status);
|
|
1970
|
+
__decorateElement$3(_init5$1, 2, "dropped", _dropped_dec, Status);
|
|
1971
|
+
__decoratorMetadata$3(_init5$1, Status);
|
|
1593
1972
|
var DragActions = class {
|
|
1594
1973
|
/**
|
|
1595
1974
|
* Creates a new instance of drag actions.
|
|
@@ -1615,7 +1994,7 @@ var DragActions = class {
|
|
|
1615
1994
|
* @returns A promise that resolves to true if the drop was prevented
|
|
1616
1995
|
*/
|
|
1617
1996
|
setDropTarget(identifier) {
|
|
1618
|
-
return
|
|
1997
|
+
return f(() => {
|
|
1619
1998
|
const { dragOperation } = this.manager;
|
|
1620
1999
|
const id = identifier != null ? identifier : null;
|
|
1621
2000
|
if (dragOperation.targetIdentifier === id) return Promise.resolve(false);
|
|
@@ -1636,7 +2015,7 @@ var DragActions = class {
|
|
|
1636
2015
|
* @throws {Error} If there is no drag source or another operation is active
|
|
1637
2016
|
*/
|
|
1638
2017
|
start(args) {
|
|
1639
|
-
return
|
|
2018
|
+
return f(() => {
|
|
1640
2019
|
const { dragOperation } = this.manager;
|
|
1641
2020
|
if (args.source != null) this.setDragSource(args.source);
|
|
1642
2021
|
if (!dragOperation.source) throw new Error("Cannot start a drag operation without a drag source");
|
|
@@ -1644,374 +2023,136 @@ var DragActions = class {
|
|
|
1644
2023
|
const controller = new AbortController();
|
|
1645
2024
|
const { event: nativeEvent, coordinates } = args;
|
|
1646
2025
|
n(() => {
|
|
1647
|
-
dragOperation.status.set("initialization-pending");
|
|
1648
|
-
dragOperation.shape = null;
|
|
1649
|
-
dragOperation.canceled = false;
|
|
1650
|
-
dragOperation.activatorEvent = nativeEvent != null ? nativeEvent : null;
|
|
1651
|
-
dragOperation.position.reset(coordinates);
|
|
1652
|
-
});
|
|
1653
|
-
const beforeStartEvent = defaultPreventable({ operation: dragOperation.snapshot() });
|
|
1654
|
-
this.manager.monitor.dispatch("beforedragstart", beforeStartEvent);
|
|
1655
|
-
if (beforeStartEvent.defaultPrevented) {
|
|
1656
|
-
dragOperation.reset();
|
|
1657
|
-
controller.abort();
|
|
1658
|
-
return controller;
|
|
1659
|
-
}
|
|
1660
|
-
dragOperation.status.set("initializing");
|
|
1661
|
-
dragOperation.controller = controller;
|
|
1662
|
-
this.manager.renderer.rendering.then(() => {
|
|
1663
|
-
if (controller.signal.aborted) return;
|
|
1664
|
-
const { status } = dragOperation;
|
|
1665
|
-
if (status.current !== "initializing") return;
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
* Moves the dragged entity to a new position.
|
|
1678
|
-
*
|
|
1679
|
-
* @param args - Configuration for the move operation
|
|
1680
|
-
* @param args.by - Relative coordinates to move by
|
|
1681
|
-
* @param args.to - Absolute coordinates to move to
|
|
1682
|
-
* @param args.event - The event that triggered the move
|
|
1683
|
-
* @param args.cancelable - Whether the move can be canceled
|
|
1684
|
-
* @param args.propagate - Whether to dispatch dragmove events
|
|
1685
|
-
*/
|
|
1686
|
-
move(args) {
|
|
1687
|
-
return o(() => {
|
|
1688
|
-
var _a, _b;
|
|
1689
|
-
const { dragOperation } = this.manager;
|
|
1690
|
-
const { status, controller } = dragOperation;
|
|
1691
|
-
if (!status.dragging || !controller || controller.signal.aborted) return;
|
|
1692
|
-
const event = defaultPreventable({
|
|
1693
|
-
nativeEvent: args.event,
|
|
1694
|
-
operation: dragOperation.snapshot(),
|
|
1695
|
-
by: args.by,
|
|
1696
|
-
to: args.to
|
|
1697
|
-
}, (_a = args.cancelable) != null ? _a : true);
|
|
1698
|
-
if ((_b = args.propagate) != null ? _b : true) this.manager.monitor.dispatch("dragmove", event);
|
|
1699
|
-
queueMicrotask(() => {
|
|
1700
|
-
var _a2, _b2, _c3, _d, _e;
|
|
1701
|
-
if (event.defaultPrevented) return;
|
|
1702
|
-
const coordinates = (_e = args.to) != null ? _e : {
|
|
1703
|
-
x: dragOperation.position.current.x + ((_b2 = (_a2 = args.by) == null ? void 0 : _a2.x) != null ? _b2 : 0),
|
|
1704
|
-
y: dragOperation.position.current.y + ((_d = (_c3 = args.by) == null ? void 0 : _c3.y) != null ? _d : 0)
|
|
1705
|
-
};
|
|
1706
|
-
dragOperation.position.current = coordinates;
|
|
1707
|
-
});
|
|
1708
|
-
});
|
|
1709
|
-
}
|
|
1710
|
-
/**
|
|
1711
|
-
* Stops the current drag operation.
|
|
1712
|
-
*
|
|
1713
|
-
* @param args - Configuration for stopping the operation
|
|
1714
|
-
* @param args.event - The event that triggered the stop
|
|
1715
|
-
* @param args.canceled - Whether the operation was canceled
|
|
1716
|
-
* @remarks
|
|
1717
|
-
* This method:
|
|
1718
|
-
* - Dispatches a dragend event
|
|
1719
|
-
* - Allows suspension of the operation
|
|
1720
|
-
* - Handles cleanup of the operation state
|
|
1721
|
-
*/
|
|
1722
|
-
stop(args = {}) {
|
|
1723
|
-
return o(() => {
|
|
1724
|
-
var _a, _b;
|
|
1725
|
-
const { dragOperation } = this.manager;
|
|
1726
|
-
const { controller } = dragOperation;
|
|
1727
|
-
if (!controller || controller.signal.aborted) return;
|
|
1728
|
-
let promise;
|
|
1729
|
-
const suspend = () => {
|
|
1730
|
-
const output = {
|
|
1731
|
-
resume: () => {},
|
|
1732
|
-
abort: () => {}
|
|
1733
|
-
};
|
|
1734
|
-
promise = new Promise((resolve, reject) => {
|
|
1735
|
-
output.resume = resolve;
|
|
1736
|
-
output.abort = reject;
|
|
1737
|
-
});
|
|
1738
|
-
return output;
|
|
1739
|
-
};
|
|
1740
|
-
controller.abort();
|
|
1741
|
-
const end = () => {
|
|
1742
|
-
this.manager.renderer.rendering.then(() => {
|
|
1743
|
-
dragOperation.status.set("dropped");
|
|
1744
|
-
const dropping = o(() => {
|
|
1745
|
-
var _a2;
|
|
1746
|
-
return ((_a2 = dragOperation.source) == null ? void 0 : _a2.status) === "dropping";
|
|
1747
|
-
});
|
|
1748
|
-
const cleanup = () => {
|
|
1749
|
-
if (dragOperation.controller === controller) dragOperation.controller = void 0;
|
|
1750
|
-
dragOperation.reset();
|
|
1751
|
-
};
|
|
1752
|
-
if (dropping) {
|
|
1753
|
-
const { source } = dragOperation;
|
|
1754
|
-
const dispose = j(() => {
|
|
1755
|
-
if ((source == null ? void 0 : source.status) === "idle") {
|
|
1756
|
-
dispose();
|
|
1757
|
-
cleanup();
|
|
1758
|
-
}
|
|
1759
|
-
});
|
|
1760
|
-
} else this.manager.renderer.rendering.then(cleanup);
|
|
1761
|
-
});
|
|
1762
|
-
};
|
|
1763
|
-
dragOperation.canceled = (_a = args.canceled) != null ? _a : false;
|
|
1764
|
-
this.manager.monitor.dispatch("dragend", {
|
|
1765
|
-
nativeEvent: args.event,
|
|
1766
|
-
operation: dragOperation.snapshot(),
|
|
1767
|
-
canceled: (_b = args.canceled) != null ? _b : false,
|
|
1768
|
-
suspend
|
|
1769
|
-
});
|
|
1770
|
-
if (promise) promise.then(end).catch(() => dragOperation.reset());
|
|
1771
|
-
else end();
|
|
1772
|
-
});
|
|
1773
|
-
}
|
|
1774
|
-
};
|
|
1775
|
-
var _disabled_dec2, _data_dec, _id_dec, _manager_dec = [reactive], _init3$1, _manager, _id, _data, _disabled2;
|
|
1776
|
-
_id_dec = [reactive], _data_dec = [reactive], _disabled_dec2 = [reactive];
|
|
1777
|
-
var Entity = class {
|
|
1778
|
-
/**
|
|
1779
|
-
* Creates a new instance of the `Entity` class.
|
|
1780
|
-
*
|
|
1781
|
-
* @param input - An object containing the initial properties of the entity.
|
|
1782
|
-
* @param manager - The manager that controls the drag and drop operations.
|
|
1783
|
-
*/
|
|
1784
|
-
constructor(input, manager) {
|
|
1785
|
-
__privateAdd$4(this, _manager, __runInitializers$3(_init3$1, 8, this)), __runInitializers$3(_init3$1, 11, this);
|
|
1786
|
-
__privateAdd$4(this, _id, __runInitializers$3(_init3$1, 12, this)), __runInitializers$3(_init3$1, 15, this);
|
|
1787
|
-
__privateAdd$4(this, _data, __runInitializers$3(_init3$1, 16, this)), __runInitializers$3(_init3$1, 19, this);
|
|
1788
|
-
__privateAdd$4(this, _disabled2, __runInitializers$3(_init3$1, 20, this)), __runInitializers$3(_init3$1, 23, this);
|
|
1789
|
-
const { effects: effects6, id, data = {}, disabled = false, register = true } = input;
|
|
1790
|
-
let previousId = id;
|
|
1791
|
-
this.manager = manager;
|
|
1792
|
-
this.id = id;
|
|
1793
|
-
this.data = data;
|
|
1794
|
-
this.disabled = disabled;
|
|
1795
|
-
this.effects = () => {
|
|
1796
|
-
var _a;
|
|
1797
|
-
return [() => {
|
|
1798
|
-
const { id: id2, manager: manager2 } = this;
|
|
1799
|
-
if (id2 === previousId) return;
|
|
1800
|
-
manager2?.registry.register(this);
|
|
1801
|
-
return () => manager2 == null ? void 0 : manager2.registry.unregister(this);
|
|
1802
|
-
}, ...(_a = effects6 == null ? void 0 : effects6()) != null ? _a : []];
|
|
1803
|
-
};
|
|
1804
|
-
this.register = this.register.bind(this);
|
|
1805
|
-
this.unregister = this.unregister.bind(this);
|
|
1806
|
-
this.destroy = this.destroy.bind(this);
|
|
1807
|
-
if (manager && register) queueMicrotask(this.register);
|
|
1808
|
-
}
|
|
1809
|
-
/**
|
|
1810
|
-
* A method that registers the entity with the manager.
|
|
1811
|
-
* @returns CleanupFunction | void
|
|
1812
|
-
*/
|
|
1813
|
-
register() {
|
|
1814
|
-
var _a;
|
|
1815
|
-
return (_a = this.manager) == null ? void 0 : _a.registry.register(this);
|
|
1816
|
-
}
|
|
1817
|
-
/**
|
|
1818
|
-
* A method that unregisters the entity from the manager.
|
|
1819
|
-
* @returns void
|
|
1820
|
-
*/
|
|
1821
|
-
unregister() {
|
|
1822
|
-
var _a;
|
|
1823
|
-
(_a = this.manager) == null || _a.registry.unregister(this);
|
|
1824
|
-
}
|
|
1825
|
-
/**
|
|
1826
|
-
* A method that cleans up the entity when it is no longer needed.
|
|
1827
|
-
* @returns void
|
|
1828
|
-
*/
|
|
1829
|
-
destroy() {
|
|
1830
|
-
var _a;
|
|
1831
|
-
(_a = this.manager) == null || _a.registry.unregister(this);
|
|
1832
|
-
}
|
|
1833
|
-
};
|
|
1834
|
-
_init3$1 = __decoratorStart$3(null);
|
|
1835
|
-
_manager = new WeakMap();
|
|
1836
|
-
_id = new WeakMap();
|
|
1837
|
-
_data = new WeakMap();
|
|
1838
|
-
_disabled2 = new WeakMap();
|
|
1839
|
-
__decorateElement$3(_init3$1, 4, "manager", _manager_dec, Entity, _manager);
|
|
1840
|
-
__decorateElement$3(_init3$1, 4, "id", _id_dec, Entity, _id);
|
|
1841
|
-
__decorateElement$3(_init3$1, 4, "data", _data_dec, Entity, _data);
|
|
1842
|
-
__decorateElement$3(_init3$1, 4, "disabled", _disabled_dec2, Entity, _disabled2);
|
|
1843
|
-
__decoratorMetadata$3(_init3$1, Entity);
|
|
1844
|
-
var EntityRegistry = class {
|
|
1845
|
-
constructor() {
|
|
1846
|
-
this.map = y(new Map());
|
|
1847
|
-
this.cleanupFunctions = new WeakMap();
|
|
1848
|
-
/**
|
|
1849
|
-
* Registers a entity in the registry.
|
|
1850
|
-
* @param key - The unique identifier of the entity.
|
|
1851
|
-
* @param value - The entity to register.
|
|
1852
|
-
* @returns A function that unregisters the entity.
|
|
1853
|
-
*/
|
|
1854
|
-
this.register = (key, value) => {
|
|
1855
|
-
const current = this.map.peek();
|
|
1856
|
-
const currentValue = current.get(key);
|
|
1857
|
-
const unregister = () => this.unregister(key, value);
|
|
1858
|
-
if (currentValue === value) return unregister;
|
|
1859
|
-
if (currentValue) {
|
|
1860
|
-
this.cleanupFunctions.get(currentValue)?.();
|
|
1861
|
-
this.cleanupFunctions.delete(currentValue);
|
|
1862
|
-
}
|
|
1863
|
-
const updatedMap = new Map(current);
|
|
1864
|
-
updatedMap.set(key, value);
|
|
1865
|
-
this.map.value = updatedMap;
|
|
1866
|
-
const cleanup = effects(...value.effects());
|
|
1867
|
-
this.cleanupFunctions.set(value, cleanup);
|
|
1868
|
-
return unregister;
|
|
1869
|
-
};
|
|
1870
|
-
/**
|
|
1871
|
-
* Unregisters an entity from the registry.
|
|
1872
|
-
* @param key - The unique identifier of the entity.
|
|
1873
|
-
* @param value - The entity instance to unregister.
|
|
1874
|
-
*/
|
|
1875
|
-
this.unregister = (key, value) => {
|
|
1876
|
-
const current = this.map.peek();
|
|
1877
|
-
if (current.get(key) !== value) return;
|
|
1878
|
-
this.cleanupFunctions.get(value)?.();
|
|
1879
|
-
this.cleanupFunctions.delete(value);
|
|
1880
|
-
const updatedMap = new Map(current);
|
|
1881
|
-
updatedMap.delete(key);
|
|
1882
|
-
this.map.value = updatedMap;
|
|
1883
|
-
};
|
|
1884
|
-
}
|
|
1885
|
-
/**
|
|
1886
|
-
* Iterator for the EntityRegistry class.
|
|
1887
|
-
* @returns An iterator for the values in the map.
|
|
1888
|
-
*/
|
|
1889
|
-
[Symbol.iterator]() {
|
|
1890
|
-
return this.map.peek().values();
|
|
1891
|
-
}
|
|
1892
|
-
get value() {
|
|
1893
|
-
return this.map.value.values();
|
|
1894
|
-
}
|
|
1895
|
-
/**
|
|
1896
|
-
* Checks if a entity with the given identifier exists in the registry.
|
|
1897
|
-
* @param identifier - The unique identifier of the entity.
|
|
1898
|
-
* @returns True if the entity exists, false otherwise.
|
|
1899
|
-
*/
|
|
1900
|
-
has(identifier) {
|
|
1901
|
-
return this.map.value.has(identifier);
|
|
1902
|
-
}
|
|
1903
|
-
/**
|
|
1904
|
-
* Retrieves a entity from the registry using its identifier.
|
|
1905
|
-
* @param identifier - The unique identifier of the entity.
|
|
1906
|
-
* @returns The entity if it exists, undefined otherwise.
|
|
1907
|
-
*/
|
|
1908
|
-
get(identifier) {
|
|
1909
|
-
return this.map.value.get(identifier);
|
|
1910
|
-
}
|
|
1911
|
-
/**
|
|
1912
|
-
* Destroys all entries in the registry and clears the registry.
|
|
1913
|
-
*/
|
|
1914
|
-
destroy() {
|
|
1915
|
-
for (const entry of this) {
|
|
1916
|
-
this.cleanupFunctions.get(entry)?.();
|
|
1917
|
-
entry.destroy();
|
|
1918
|
-
}
|
|
1919
|
-
this.map.value = new Map();
|
|
1920
|
-
}
|
|
1921
|
-
};
|
|
1922
|
-
var _isDragSource_dec, _isDragging_dec, _isDropping_dec, _status_dec, _modifiers_dec, _type_dec, _c$1, _init4$1, _type, _modifiers, _status;
|
|
1923
|
-
var Draggable$2 = class extends (_c$1 = Entity, _type_dec = [reactive], _modifiers_dec = [reactive], _status_dec = [reactive], _isDropping_dec = [derived], _isDragging_dec = [derived], _isDragSource_dec = [derived], _c$1) {
|
|
1924
|
-
constructor(_a, manager) {
|
|
1925
|
-
var _b = _a, { modifiers, type, sensors } = _b, input = __objRest$3(_b, [
|
|
1926
|
-
"modifiers",
|
|
1927
|
-
"type",
|
|
1928
|
-
"sensors"
|
|
1929
|
-
]);
|
|
1930
|
-
super(input, manager);
|
|
1931
|
-
__runInitializers$3(_init4$1, 5, this);
|
|
1932
|
-
__privateAdd$4(this, _type, __runInitializers$3(_init4$1, 8, this)), __runInitializers$3(_init4$1, 11, this);
|
|
1933
|
-
__privateAdd$4(this, _modifiers, __runInitializers$3(_init4$1, 12, this)), __runInitializers$3(_init4$1, 15, this);
|
|
1934
|
-
__privateAdd$4(this, _status, __runInitializers$3(_init4$1, 16, this, this.isDragSource ? "dragging" : "idle")), __runInitializers$3(_init4$1, 19, this);
|
|
1935
|
-
this.type = type;
|
|
1936
|
-
this.sensors = sensors;
|
|
1937
|
-
this.modifiers = modifiers;
|
|
1938
|
-
this.alignment = input.alignment;
|
|
1939
|
-
}
|
|
1940
|
-
get isDropping() {
|
|
1941
|
-
return this.status === "dropping" && this.isDragSource;
|
|
1942
|
-
}
|
|
1943
|
-
get isDragging() {
|
|
1944
|
-
return this.status === "dragging" && this.isDragSource;
|
|
1945
|
-
}
|
|
1946
|
-
get isDragSource() {
|
|
1947
|
-
var _a, _b;
|
|
1948
|
-
return ((_b = (_a = this.manager) == null ? void 0 : _a.dragOperation.source) == null ? void 0 : _b.id) === this.id;
|
|
1949
|
-
}
|
|
1950
|
-
};
|
|
1951
|
-
_init4$1 = __decoratorStart$3(_c$1);
|
|
1952
|
-
_type = new WeakMap();
|
|
1953
|
-
_modifiers = new WeakMap();
|
|
1954
|
-
_status = new WeakMap();
|
|
1955
|
-
__decorateElement$3(_init4$1, 4, "type", _type_dec, Draggable$2, _type);
|
|
1956
|
-
__decorateElement$3(_init4$1, 4, "modifiers", _modifiers_dec, Draggable$2, _modifiers);
|
|
1957
|
-
__decorateElement$3(_init4$1, 4, "status", _status_dec, Draggable$2, _status);
|
|
1958
|
-
__decorateElement$3(_init4$1, 2, "isDropping", _isDropping_dec, Draggable$2);
|
|
1959
|
-
__decorateElement$3(_init4$1, 2, "isDragging", _isDragging_dec, Draggable$2);
|
|
1960
|
-
__decorateElement$3(_init4$1, 2, "isDragSource", _isDragSource_dec, Draggable$2);
|
|
1961
|
-
__decoratorMetadata$3(_init4$1, Draggable$2);
|
|
1962
|
-
var _isDropTarget_dec, _shape_dec, _collisionPriority_dec, _collisionDetector_dec, _type_dec2, _accept_dec, _c2$1, _init5$1, _accept, _type2, _collisionDetector, _collisionPriority, _shape;
|
|
1963
|
-
var Droppable$1 = class extends (_c2$1 = Entity, _accept_dec = [reactive], _type_dec2 = [reactive], _collisionDetector_dec = [reactive], _collisionPriority_dec = [reactive], _shape_dec = [reactive], _isDropTarget_dec = [derived], _c2$1) {
|
|
1964
|
-
constructor(_a, manager) {
|
|
1965
|
-
var _b = _a, { accept, collisionDetector, collisionPriority, type } = _b, input = __objRest$3(_b, [
|
|
1966
|
-
"accept",
|
|
1967
|
-
"collisionDetector",
|
|
1968
|
-
"collisionPriority",
|
|
1969
|
-
"type"
|
|
1970
|
-
]);
|
|
1971
|
-
super(input, manager);
|
|
1972
|
-
__runInitializers$3(_init5$1, 5, this);
|
|
1973
|
-
__privateAdd$4(this, _accept, __runInitializers$3(_init5$1, 8, this)), __runInitializers$3(_init5$1, 11, this);
|
|
1974
|
-
__privateAdd$4(this, _type2, __runInitializers$3(_init5$1, 12, this)), __runInitializers$3(_init5$1, 15, this);
|
|
1975
|
-
__privateAdd$4(this, _collisionDetector, __runInitializers$3(_init5$1, 16, this)), __runInitializers$3(_init5$1, 19, this);
|
|
1976
|
-
__privateAdd$4(this, _collisionPriority, __runInitializers$3(_init5$1, 20, this)), __runInitializers$3(_init5$1, 23, this);
|
|
1977
|
-
__privateAdd$4(this, _shape, __runInitializers$3(_init5$1, 24, this)), __runInitializers$3(_init5$1, 27, this);
|
|
1978
|
-
this.accept = accept;
|
|
1979
|
-
this.collisionDetector = collisionDetector;
|
|
1980
|
-
this.collisionPriority = collisionPriority;
|
|
1981
|
-
this.type = type;
|
|
2026
|
+
dragOperation.status.set("initialization-pending");
|
|
2027
|
+
dragOperation.shape = null;
|
|
2028
|
+
dragOperation.canceled = false;
|
|
2029
|
+
dragOperation.activatorEvent = nativeEvent != null ? nativeEvent : null;
|
|
2030
|
+
dragOperation.position.reset(coordinates);
|
|
2031
|
+
});
|
|
2032
|
+
const beforeStartEvent = defaultPreventable({ operation: dragOperation.snapshot() });
|
|
2033
|
+
this.manager.monitor.dispatch("beforedragstart", beforeStartEvent);
|
|
2034
|
+
if (beforeStartEvent.defaultPrevented) {
|
|
2035
|
+
dragOperation.reset();
|
|
2036
|
+
controller.abort();
|
|
2037
|
+
return controller;
|
|
2038
|
+
}
|
|
2039
|
+
dragOperation.status.set("initializing");
|
|
2040
|
+
dragOperation.controller = controller;
|
|
2041
|
+
this.manager.renderer.rendering.then(() => {
|
|
2042
|
+
if (controller.signal.aborted) return;
|
|
2043
|
+
const { status } = dragOperation;
|
|
2044
|
+
if (status.current !== "initializing") return;
|
|
2045
|
+
n(() => {
|
|
2046
|
+
dragOperation.status.set("dragging");
|
|
2047
|
+
this.manager.monitor.dispatch("dragstart", {
|
|
2048
|
+
nativeEvent,
|
|
2049
|
+
operation: dragOperation.snapshot(),
|
|
2050
|
+
cancelable: false
|
|
2051
|
+
});
|
|
2052
|
+
});
|
|
2053
|
+
});
|
|
2054
|
+
return controller;
|
|
2055
|
+
});
|
|
1982
2056
|
}
|
|
1983
2057
|
/**
|
|
1984
|
-
*
|
|
2058
|
+
* Moves the dragged entity to a new position.
|
|
1985
2059
|
*
|
|
1986
|
-
* @param
|
|
1987
|
-
* @
|
|
2060
|
+
* @param args - Configuration for the move operation
|
|
2061
|
+
* @param args.by - Relative coordinates to move by
|
|
2062
|
+
* @param args.to - Absolute coordinates to move to
|
|
2063
|
+
* @param args.event - The event that triggered the move
|
|
2064
|
+
* @param args.cancelable - Whether the move can be canceled
|
|
2065
|
+
* @param args.propagate - Whether to dispatch dragmove events
|
|
1988
2066
|
*/
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
2067
|
+
move(args) {
|
|
2068
|
+
return f(() => {
|
|
2069
|
+
var _a, _b;
|
|
2070
|
+
const { dragOperation } = this.manager;
|
|
2071
|
+
const { status, controller } = dragOperation;
|
|
2072
|
+
if (!status.dragging || !controller || controller.signal.aborted) return;
|
|
2073
|
+
const event = defaultPreventable({
|
|
2074
|
+
nativeEvent: args.event,
|
|
2075
|
+
operation: dragOperation.snapshot(),
|
|
2076
|
+
by: args.by,
|
|
2077
|
+
to: args.to
|
|
2078
|
+
}, (_a = args.cancelable) != null ? _a : true);
|
|
2079
|
+
if ((_b = args.propagate) != null ? _b : true) this.manager.monitor.dispatch("dragmove", event);
|
|
2080
|
+
queueMicrotask(() => {
|
|
2081
|
+
var _a2, _b2, _c3, _d, _e;
|
|
2082
|
+
if (event.defaultPrevented) return;
|
|
2083
|
+
const coordinates = (_e = args.to) != null ? _e : {
|
|
2084
|
+
x: dragOperation.position.current.x + ((_b2 = (_a2 = args.by) == null ? void 0 : _a2.x) != null ? _b2 : 0),
|
|
2085
|
+
y: dragOperation.position.current.y + ((_d = (_c3 = args.by) == null ? void 0 : _c3.y) != null ? _d : 0)
|
|
2086
|
+
};
|
|
2087
|
+
dragOperation.position.current = coordinates;
|
|
2088
|
+
});
|
|
2089
|
+
});
|
|
1996
2090
|
}
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2091
|
+
/**
|
|
2092
|
+
* Stops the current drag operation.
|
|
2093
|
+
*
|
|
2094
|
+
* @param args - Configuration for stopping the operation
|
|
2095
|
+
* @param args.event - The event that triggered the stop
|
|
2096
|
+
* @param args.canceled - Whether the operation was canceled
|
|
2097
|
+
* @remarks
|
|
2098
|
+
* This method:
|
|
2099
|
+
* - Dispatches a dragend event
|
|
2100
|
+
* - Allows suspension of the operation
|
|
2101
|
+
* - Handles cleanup of the operation state
|
|
2102
|
+
*/
|
|
2103
|
+
stop(args = {}) {
|
|
2104
|
+
return f(() => {
|
|
2105
|
+
var _a, _b;
|
|
2106
|
+
const { dragOperation } = this.manager;
|
|
2107
|
+
const { controller } = dragOperation;
|
|
2108
|
+
if (!controller || controller.signal.aborted) return;
|
|
2109
|
+
let promise;
|
|
2110
|
+
const suspend = () => {
|
|
2111
|
+
const output = {
|
|
2112
|
+
resume: () => {},
|
|
2113
|
+
abort: () => {}
|
|
2114
|
+
};
|
|
2115
|
+
promise = new Promise((resolve, reject) => {
|
|
2116
|
+
output.resume = resolve;
|
|
2117
|
+
output.abort = reject;
|
|
2118
|
+
});
|
|
2119
|
+
return output;
|
|
2120
|
+
};
|
|
2121
|
+
controller.abort();
|
|
2122
|
+
const end = () => {
|
|
2123
|
+
this.manager.renderer.rendering.then(() => {
|
|
2124
|
+
dragOperation.status.set("dropped");
|
|
2125
|
+
const dropping = f(() => {
|
|
2126
|
+
var _a2;
|
|
2127
|
+
return ((_a2 = dragOperation.source) == null ? void 0 : _a2.status) === "dropping";
|
|
2128
|
+
});
|
|
2129
|
+
const cleanup = () => {
|
|
2130
|
+
if (dragOperation.controller === controller) dragOperation.controller = void 0;
|
|
2131
|
+
dragOperation.reset();
|
|
2132
|
+
};
|
|
2133
|
+
if (dropping) {
|
|
2134
|
+
const { source } = dragOperation;
|
|
2135
|
+
const dispose = j(() => {
|
|
2136
|
+
if ((source == null ? void 0 : source.status) === "idle") {
|
|
2137
|
+
dispose();
|
|
2138
|
+
cleanup();
|
|
2139
|
+
}
|
|
2140
|
+
});
|
|
2141
|
+
} else this.manager.renderer.rendering.then(cleanup);
|
|
2142
|
+
});
|
|
2143
|
+
};
|
|
2144
|
+
dragOperation.canceled = (_a = args.canceled) != null ? _a : false;
|
|
2145
|
+
this.manager.monitor.dispatch("dragend", {
|
|
2146
|
+
nativeEvent: args.event,
|
|
2147
|
+
operation: dragOperation.snapshot(),
|
|
2148
|
+
canceled: (_b = args.canceled) != null ? _b : false,
|
|
2149
|
+
suspend
|
|
2150
|
+
});
|
|
2151
|
+
if (promise) promise.then(end).catch(() => dragOperation.reset());
|
|
2152
|
+
else end();
|
|
2153
|
+
});
|
|
2000
2154
|
}
|
|
2001
2155
|
};
|
|
2002
|
-
_init5$1 = __decoratorStart$3(_c2$1);
|
|
2003
|
-
_accept = new WeakMap();
|
|
2004
|
-
_type2 = new WeakMap();
|
|
2005
|
-
_collisionDetector = new WeakMap();
|
|
2006
|
-
_collisionPriority = new WeakMap();
|
|
2007
|
-
_shape = new WeakMap();
|
|
2008
|
-
__decorateElement$3(_init5$1, 4, "accept", _accept_dec, Droppable$1, _accept);
|
|
2009
|
-
__decorateElement$3(_init5$1, 4, "type", _type_dec2, Droppable$1, _type2);
|
|
2010
|
-
__decorateElement$3(_init5$1, 4, "collisionDetector", _collisionDetector_dec, Droppable$1, _collisionDetector);
|
|
2011
|
-
__decorateElement$3(_init5$1, 4, "collisionPriority", _collisionPriority_dec, Droppable$1, _collisionPriority);
|
|
2012
|
-
__decorateElement$3(_init5$1, 4, "shape", _shape_dec, Droppable$1, _shape);
|
|
2013
|
-
__decorateElement$3(_init5$1, 2, "isDropTarget", _isDropTarget_dec, Droppable$1);
|
|
2014
|
-
__decoratorMetadata$3(_init5$1, Droppable$1);
|
|
2015
2156
|
var Sensor = class extends Plugin {
|
|
2016
2157
|
/**
|
|
2017
2158
|
* Creates a new sensor instance.
|
|
@@ -2145,7 +2286,25 @@ var DragDropRegistry = class {
|
|
|
2145
2286
|
this.modifiers.destroy();
|
|
2146
2287
|
}
|
|
2147
2288
|
};
|
|
2148
|
-
var _transform_dec
|
|
2289
|
+
var _transform_dec;
|
|
2290
|
+
var _target_dec;
|
|
2291
|
+
var _source_dec;
|
|
2292
|
+
var _modifiers_dec2;
|
|
2293
|
+
var _targetIdentifier_dec;
|
|
2294
|
+
var _sourceIdentifier_dec;
|
|
2295
|
+
var _activatorEvent_dec;
|
|
2296
|
+
var _canceled_dec;
|
|
2297
|
+
var _shape_dec2 = [derived];
|
|
2298
|
+
var _manager2;
|
|
2299
|
+
var _previousSource;
|
|
2300
|
+
var _shape2;
|
|
2301
|
+
var _init6$1;
|
|
2302
|
+
var _canceled;
|
|
2303
|
+
var _activatorEvent;
|
|
2304
|
+
var _sourceIdentifier;
|
|
2305
|
+
var _targetIdentifier;
|
|
2306
|
+
var _modifiers2;
|
|
2307
|
+
var _transform;
|
|
2149
2308
|
_canceled_dec = [reactive], _activatorEvent_dec = [reactive], _sourceIdentifier_dec = [reactive], _targetIdentifier_dec = [reactive], _modifiers_dec2 = [reactive], _source_dec = [derived], _target_dec = [derived], _transform_dec = [derived];
|
|
2150
2309
|
var DragOperation = class {
|
|
2151
2310
|
/**
|
|
@@ -2223,7 +2382,7 @@ var DragOperation = class {
|
|
|
2223
2382
|
* @returns An immutable snapshot of the current operation state
|
|
2224
2383
|
*/
|
|
2225
2384
|
snapshot() {
|
|
2226
|
-
return
|
|
2385
|
+
return f(() => ({
|
|
2227
2386
|
source: this.source,
|
|
2228
2387
|
target: this.target,
|
|
2229
2388
|
activatorEvent: this.activatorEvent,
|
|
@@ -2326,7 +2485,7 @@ var DragDropManager$1 = class {
|
|
|
2326
2485
|
const { destroy } = this;
|
|
2327
2486
|
const cleanup = effects(() => {
|
|
2328
2487
|
var _a2, _b, _c3;
|
|
2329
|
-
const currentModifiers =
|
|
2488
|
+
const currentModifiers = f(() => this.dragOperation.modifiers);
|
|
2330
2489
|
const managerModifiers = this.modifiers;
|
|
2331
2490
|
for (const modifier of currentModifiers) if (!managerModifiers.includes(modifier)) modifier.destroy();
|
|
2332
2491
|
this.dragOperation.modifiers = (_c3 = (_b = (_a2 = this.dragOperation.source) == null ? void 0 : _a2.modifiers) == null ? void 0 : _b.map((modifier) => {
|
|
@@ -2489,13 +2648,14 @@ function isKeyframeEffect(effect) {
|
|
|
2489
2648
|
}
|
|
2490
2649
|
function getFinalKeyframe(element, match) {
|
|
2491
2650
|
const animations2 = element.getAnimations();
|
|
2492
|
-
|
|
2651
|
+
let result = null;
|
|
2652
|
+
for (const animation of animations2) {
|
|
2493
2653
|
if (animation.playState !== "running") continue;
|
|
2494
2654
|
const { effect } = animation;
|
|
2495
2655
|
const matchedKeyframes = (isKeyframeEffect(effect) ? effect.getKeyframes() : []).filter(match);
|
|
2496
|
-
if (matchedKeyframes.length > 0)
|
|
2656
|
+
if (matchedKeyframes.length > 0) result = [matchedKeyframes[matchedKeyframes.length - 1], animation];
|
|
2497
2657
|
}
|
|
2498
|
-
return
|
|
2658
|
+
return result;
|
|
2499
2659
|
}
|
|
2500
2660
|
function getBoundingRectangle(element) {
|
|
2501
2661
|
const { width, height, top, left, bottom, right } = element.getBoundingClientRect();
|
|
@@ -2702,15 +2862,15 @@ function isIFrameElement(element) {
|
|
|
2702
2862
|
return (element == null ? void 0 : element.tagName) === "IFRAME";
|
|
2703
2863
|
}
|
|
2704
2864
|
var ProxiedElements = new WeakMap();
|
|
2705
|
-
function
|
|
2706
|
-
return
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2865
|
+
function getInteractiveElement(element) {
|
|
2866
|
+
return element.closest(`
|
|
2867
|
+
input:not([disabled]),
|
|
2868
|
+
select:not([disabled]),
|
|
2869
|
+
textarea:not([disabled]),
|
|
2870
|
+
button:not([disabled]),
|
|
2871
|
+
a[href],
|
|
2872
|
+
[contenteditable]:not([contenteditable="false"])
|
|
2873
|
+
`);
|
|
2714
2874
|
}
|
|
2715
2875
|
var Listeners = class {
|
|
2716
2876
|
constructor() {
|
|
@@ -2734,8 +2894,13 @@ var Listeners = class {
|
|
|
2734
2894
|
this.entries.add(entry);
|
|
2735
2895
|
entries.push(entry);
|
|
2736
2896
|
}
|
|
2897
|
+
const allEntries = this.entries;
|
|
2737
2898
|
return function cleanup() {
|
|
2738
|
-
for (const
|
|
2899
|
+
for (const entry of entries) {
|
|
2900
|
+
const [target2, { type, listener, options }] = entry;
|
|
2901
|
+
target2.removeEventListener(type, listener, options);
|
|
2902
|
+
allEntries.delete(entry);
|
|
2903
|
+
}
|
|
2739
2904
|
};
|
|
2740
2905
|
}
|
|
2741
2906
|
};
|
|
@@ -2804,7 +2969,17 @@ var ResizeNotifier = class extends Observer {
|
|
|
2804
2969
|
_initialized = new WeakMap();
|
|
2805
2970
|
var threshold = Array.from({ length: 100 }, (_, index) => index / 100);
|
|
2806
2971
|
var THROTTLE_INTERVAL = 75;
|
|
2807
|
-
var _visible
|
|
2972
|
+
var _visible;
|
|
2973
|
+
var _previousBoundingClientRect;
|
|
2974
|
+
var _resizeObserver;
|
|
2975
|
+
var _positionObserver;
|
|
2976
|
+
var _visibilityObserver;
|
|
2977
|
+
var _debug;
|
|
2978
|
+
var _disconnected;
|
|
2979
|
+
var _observePosition;
|
|
2980
|
+
var _PositionObserver_instances;
|
|
2981
|
+
var notify_fn;
|
|
2982
|
+
var updateDebug_fn;
|
|
2808
2983
|
var PositionObserver = class {
|
|
2809
2984
|
constructor(element, callback, options = {
|
|
2810
2985
|
debug: false,
|
|
@@ -2981,7 +3156,10 @@ function addScrollListener(element, callback) {
|
|
|
2981
3156
|
}
|
|
2982
3157
|
};
|
|
2983
3158
|
}
|
|
2984
|
-
var _elementObserver
|
|
3159
|
+
var _elementObserver;
|
|
3160
|
+
var _disconnected2;
|
|
3161
|
+
var _frames;
|
|
3162
|
+
var _handleScroll;
|
|
2985
3163
|
var FrameObserver = class {
|
|
2986
3164
|
constructor(element, callback, options) {
|
|
2987
3165
|
this.callback = callback;
|
|
@@ -3168,10 +3346,6 @@ function getScrollableAncestors(element, options = defaultOptions) {
|
|
|
3168
3346
|
if (!element) return scrollParents;
|
|
3169
3347
|
return findScrollableAncestors(element);
|
|
3170
3348
|
}
|
|
3171
|
-
function getFirstScrollableAncestor(node) {
|
|
3172
|
-
const [firstScrollableAncestor] = getScrollableAncestors(node, { limit: 1 });
|
|
3173
|
-
return firstScrollableAncestor != null ? firstScrollableAncestor : null;
|
|
3174
|
-
}
|
|
3175
3349
|
function getFrameTransform(el, boundary = window.frameElement) {
|
|
3176
3350
|
const transform = {
|
|
3177
3351
|
x: 0,
|
|
@@ -3207,7 +3381,7 @@ function getScale(element, boundingRectangle = getBoundingRectangle(element)) {
|
|
|
3207
3381
|
};
|
|
3208
3382
|
}
|
|
3209
3383
|
function parseScale(scale) {
|
|
3210
|
-
if (scale === "none") return null;
|
|
3384
|
+
if (!scale || scale === "none") return null;
|
|
3211
3385
|
const values = scale.split(" ");
|
|
3212
3386
|
const x = parseFloat(values[0]);
|
|
3213
3387
|
const y = parseFloat(values[1]);
|
|
@@ -3218,7 +3392,7 @@ function parseScale(scale) {
|
|
|
3218
3392
|
};
|
|
3219
3393
|
}
|
|
3220
3394
|
function parseTranslate(translate) {
|
|
3221
|
-
if (translate === "none") return null;
|
|
3395
|
+
if (!translate || translate === "none") return null;
|
|
3222
3396
|
const [x, y, z = "0"] = translate.split(" ");
|
|
3223
3397
|
const output = {
|
|
3224
3398
|
x: parseFloat(x),
|
|
@@ -3315,17 +3489,17 @@ function detectScrollIntent(scrollableElement, coordinates, intent, acceleration
|
|
|
3315
3489
|
height: scrollContainerRect.height * thresholdPercentage.y,
|
|
3316
3490
|
width: scrollContainerRect.width * thresholdPercentage.x
|
|
3317
3491
|
};
|
|
3318
|
-
if ((!isTop || isYAxisInverted && !isBottom) && y <= scrollContainerRect.top + threshold2.height && (intent == null ? void 0 : intent.y) !== 1 && x >= scrollContainerRect.left - tolerance.x && x <= scrollContainerRect.right + tolerance.x) {
|
|
3492
|
+
if (threshold2.height > 0 && (!isTop || isYAxisInverted && !isBottom) && y <= scrollContainerRect.top + threshold2.height && (intent == null ? void 0 : intent.y) !== 1 && x >= scrollContainerRect.left - tolerance.x && x <= scrollContainerRect.right + tolerance.x) {
|
|
3319
3493
|
direction.y = isYAxisInverted ? 1 : -1;
|
|
3320
3494
|
speed.y = acceleration * Math.abs((scrollContainerRect.top + threshold2.height - y) / threshold2.height);
|
|
3321
|
-
} else if ((!isBottom || isYAxisInverted && !isTop) && y >= scrollContainerRect.bottom - threshold2.height && (intent == null ? void 0 : intent.y) !== -1 && x >= scrollContainerRect.left - tolerance.x && x <= scrollContainerRect.right + tolerance.x) {
|
|
3495
|
+
} else if (threshold2.height > 0 && (!isBottom || isYAxisInverted && !isTop) && y >= scrollContainerRect.bottom - threshold2.height && (intent == null ? void 0 : intent.y) !== -1 && x >= scrollContainerRect.left - tolerance.x && x <= scrollContainerRect.right + tolerance.x) {
|
|
3322
3496
|
direction.y = isYAxisInverted ? -1 : 1;
|
|
3323
3497
|
speed.y = acceleration * Math.abs((scrollContainerRect.bottom - threshold2.height - y) / threshold2.height);
|
|
3324
3498
|
}
|
|
3325
|
-
if ((!isRight || isXAxisInverted && !isLeft) && x >= scrollContainerRect.right - threshold2.width && (intent == null ? void 0 : intent.x) !== -1 && y >= scrollContainerRect.top - tolerance.y && y <= scrollContainerRect.bottom + tolerance.y) {
|
|
3499
|
+
if (threshold2.width > 0 && (!isRight || isXAxisInverted && !isLeft) && x >= scrollContainerRect.right - threshold2.width && (intent == null ? void 0 : intent.x) !== -1 && y >= scrollContainerRect.top - tolerance.y && y <= scrollContainerRect.bottom + tolerance.y) {
|
|
3326
3500
|
direction.x = isXAxisInverted ? -1 : 1;
|
|
3327
3501
|
speed.x = acceleration * Math.abs((scrollContainerRect.right - threshold2.width - x) / threshold2.width);
|
|
3328
|
-
} else if ((!isLeft || isXAxisInverted && !isRight) && x <= scrollContainerRect.left + threshold2.width && (intent == null ? void 0 : intent.x) !== 1 && y >= scrollContainerRect.top - tolerance.y && y <= scrollContainerRect.bottom + tolerance.y) {
|
|
3502
|
+
} else if (threshold2.width > 0 && (!isLeft || isXAxisInverted && !isRight) && x <= scrollContainerRect.left + threshold2.width && (intent == null ? void 0 : intent.x) !== 1 && y >= scrollContainerRect.top - tolerance.y && y <= scrollContainerRect.bottom + tolerance.y) {
|
|
3329
3503
|
direction.x = isXAxisInverted ? 1 : -1;
|
|
3330
3504
|
speed.x = acceleration * Math.abs((scrollContainerRect.left + threshold2.width - x) / threshold2.width);
|
|
3331
3505
|
}
|
|
@@ -3334,21 +3508,63 @@ function detectScrollIntent(scrollableElement, coordinates, intent, acceleration
|
|
|
3334
3508
|
speed
|
|
3335
3509
|
};
|
|
3336
3510
|
}
|
|
3337
|
-
function
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3511
|
+
function scrollIntoViewIfNeeded(el, { block = "nearest", inline = "nearest" } = {}) {
|
|
3512
|
+
if (!isHTMLElement(el)) return;
|
|
3513
|
+
const scrollableAncestors = getScrollableAncestors(el);
|
|
3514
|
+
const processedAncestors = [];
|
|
3515
|
+
for (const ancestor of scrollableAncestors) {
|
|
3516
|
+
if (!isHTMLElement(ancestor)) continue;
|
|
3517
|
+
const { top, left } = getOffsetRelativeTo(el, ancestor);
|
|
3518
|
+
let adjustedTop = top;
|
|
3519
|
+
let adjustedLeft = left;
|
|
3520
|
+
for (const inner of processedAncestors) {
|
|
3521
|
+
adjustedTop -= inner.scrollTop;
|
|
3522
|
+
adjustedLeft -= inner.scrollLeft;
|
|
3523
|
+
}
|
|
3524
|
+
if (block !== "none") {
|
|
3525
|
+
const overTop = adjustedTop < ancestor.scrollTop;
|
|
3526
|
+
if (overTop !== adjustedTop + el.offsetHeight > ancestor.scrollTop + ancestor.clientHeight) {
|
|
3527
|
+
if (block === "center") ancestor.scrollTop = adjustedTop - ancestor.clientHeight / 2 + el.offsetHeight / 2;
|
|
3528
|
+
else if (overTop) ancestor.scrollTop = adjustedTop;
|
|
3529
|
+
else ancestor.scrollTop = adjustedTop + el.offsetHeight - ancestor.clientHeight;
|
|
3530
|
+
}
|
|
3531
|
+
}
|
|
3532
|
+
if (inline !== "none") {
|
|
3533
|
+
const overLeft = adjustedLeft < ancestor.scrollLeft;
|
|
3534
|
+
if (overLeft !== adjustedLeft + el.offsetWidth > ancestor.scrollLeft + ancestor.clientWidth) {
|
|
3535
|
+
if (inline === "center") ancestor.scrollLeft = adjustedLeft - ancestor.clientWidth / 2 + el.offsetWidth / 2;
|
|
3536
|
+
else if (overLeft) ancestor.scrollLeft = adjustedLeft;
|
|
3537
|
+
else ancestor.scrollLeft = adjustedLeft + el.offsetWidth - ancestor.clientWidth;
|
|
3538
|
+
}
|
|
3539
|
+
}
|
|
3540
|
+
processedAncestors.push(ancestor);
|
|
3541
|
+
}
|
|
3542
|
+
}
|
|
3543
|
+
function getDocumentOffset(element) {
|
|
3544
|
+
let top = 0;
|
|
3545
|
+
let left = 0;
|
|
3546
|
+
let current = element;
|
|
3547
|
+
while (current) {
|
|
3548
|
+
top += current.offsetTop;
|
|
3549
|
+
left += current.offsetLeft;
|
|
3550
|
+
const offsetParent = current.offsetParent;
|
|
3551
|
+
if (!isHTMLElement(offsetParent)) break;
|
|
3552
|
+
top += offsetParent.clientTop;
|
|
3553
|
+
left += offsetParent.clientLeft;
|
|
3554
|
+
current = offsetParent;
|
|
3344
3555
|
}
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3556
|
+
return {
|
|
3557
|
+
top,
|
|
3558
|
+
left
|
|
3559
|
+
};
|
|
3560
|
+
}
|
|
3561
|
+
function getOffsetRelativeTo(element, ancestor) {
|
|
3562
|
+
const elOffset = getDocumentOffset(element);
|
|
3563
|
+
const ancestorOffset = getDocumentOffset(ancestor);
|
|
3564
|
+
return {
|
|
3565
|
+
top: elOffset.top - ancestorOffset.top - ancestor.clientTop,
|
|
3566
|
+
left: elOffset.left - ancestorOffset.left - ancestor.clientLeft
|
|
3567
|
+
};
|
|
3352
3568
|
}
|
|
3353
3569
|
function applyTransform(rect, parsedTransform, transformOrigin) {
|
|
3354
3570
|
const { scaleX, scaleY, x: translateX, y: translateY } = parsedTransform;
|
|
@@ -3504,32 +3720,37 @@ var DOMRectangle = class extends Rectangle {
|
|
|
3504
3720
|
}
|
|
3505
3721
|
};
|
|
3506
3722
|
function getProjectedTransform(element, computedStyles) {
|
|
3507
|
-
var _a;
|
|
3508
3723
|
const animations2 = element.getAnimations();
|
|
3509
|
-
let projectedTransform = null;
|
|
3510
3724
|
if (!animations2.length) return null;
|
|
3725
|
+
let latestTransform;
|
|
3726
|
+
let latestTranslate;
|
|
3727
|
+
let latestScale;
|
|
3728
|
+
let hasAnimatedProperty = false;
|
|
3511
3729
|
for (const animation of animations2) {
|
|
3512
3730
|
if (animation.playState !== "running") continue;
|
|
3513
3731
|
const keyframes = isKeyframeEffect(animation.effect) ? animation.effect.getKeyframes() : [];
|
|
3514
3732
|
const keyframe = keyframes[keyframes.length - 1];
|
|
3515
3733
|
if (!keyframe) continue;
|
|
3516
3734
|
const { transform, translate, scale } = keyframe;
|
|
3517
|
-
if (transform
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
scaleY: projectedTransform.scaleY * parsedTransform.scaleY
|
|
3529
|
-
} : parsedTransform;
|
|
3735
|
+
if (typeof transform === "string" && transform) {
|
|
3736
|
+
latestTransform = transform;
|
|
3737
|
+
hasAnimatedProperty = true;
|
|
3738
|
+
}
|
|
3739
|
+
if (typeof translate === "string" && translate) {
|
|
3740
|
+
latestTranslate = translate;
|
|
3741
|
+
hasAnimatedProperty = true;
|
|
3742
|
+
}
|
|
3743
|
+
if (typeof scale === "string" && scale) {
|
|
3744
|
+
latestScale = scale;
|
|
3745
|
+
hasAnimatedProperty = true;
|
|
3530
3746
|
}
|
|
3531
3747
|
}
|
|
3532
|
-
return
|
|
3748
|
+
if (!hasAnimatedProperty) return null;
|
|
3749
|
+
return parseTransform({
|
|
3750
|
+
transform: latestTransform != null ? latestTransform : computedStyles.transform,
|
|
3751
|
+
translate: latestTranslate != null ? latestTranslate : computedStyles.translate,
|
|
3752
|
+
scale: latestScale != null ? latestScale : computedStyles.scale
|
|
3753
|
+
});
|
|
3533
3754
|
}
|
|
3534
3755
|
function supportsStyle(element) {
|
|
3535
3756
|
return "style" in element && typeof element.style === "object" && element.style !== null && "setProperty" in element.style && "removeProperty" in element.style && typeof element.style.setProperty === "function" && typeof element.style.removeProperty === "function";
|
|
@@ -3637,7 +3858,9 @@ var _RestrictToElement = class _RestrictToElement extends Modifier {
|
|
|
3637
3858
|
if (!boundingRectangle) return transform;
|
|
3638
3859
|
const { initial, current } = shape;
|
|
3639
3860
|
const { height, width } = current.boundingRectangle;
|
|
3640
|
-
|
|
3861
|
+
const left = initial.center.x - width / 2;
|
|
3862
|
+
const top = initial.center.y - height / 2;
|
|
3863
|
+
return restrictShapeToBoundingRectangle(new Rectangle(left, top, width, height), transform, boundingRectangle);
|
|
3641
3864
|
}
|
|
3642
3865
|
};
|
|
3643
3866
|
_RestrictToElement.configure = configurator(_RestrictToElement);
|
|
@@ -3949,43 +4172,32 @@ function debounce(fn, wait) {
|
|
|
3949
4172
|
debounced.cancel = () => clearTimeout(timeout);
|
|
3950
4173
|
return debounced;
|
|
3951
4174
|
}
|
|
3952
|
-
var
|
|
4175
|
+
var styleRegistry = new Map();
|
|
4176
|
+
var _roots_dec;
|
|
4177
|
+
var _targetRoot_dec;
|
|
4178
|
+
var _sourceRoot_dec;
|
|
4179
|
+
var _additionalRoots_dec;
|
|
4180
|
+
var _a$1;
|
|
4181
|
+
var _registeredRules;
|
|
4182
|
+
var _init$2;
|
|
4183
|
+
var _additionalRoots;
|
|
4184
|
+
var _StyleInjector_instances;
|
|
4185
|
+
var syncStyles_fn;
|
|
4186
|
+
var inject_fn;
|
|
4187
|
+
var injectStyleElement_fn;
|
|
4188
|
+
var injectAdoptedSheet_fn;
|
|
4189
|
+
var _StyleInjector = class _StyleInjector extends (_a$1 = CorePlugin, _additionalRoots_dec = [reactive], _sourceRoot_dec = [derived], _targetRoot_dec = [derived], _roots_dec = [derived], _a$1) {
|
|
3953
4190
|
constructor(manager, options) {
|
|
3954
4191
|
super(manager, options);
|
|
3955
|
-
this.manager = manager;
|
|
3956
|
-
const doc = computed(() => {
|
|
3957
|
-
var _a5;
|
|
3958
|
-
return getDocument((_a5 = this.manager.dragOperation.source) == null ? void 0 : _a5.element);
|
|
3959
|
-
});
|
|
3960
|
-
this.destroy = j(() => {
|
|
3961
|
-
var _a5;
|
|
3962
|
-
const { dragOperation } = this.manager;
|
|
3963
|
-
const { cursor = "grabbing", nonce } = (_a5 = this.options) != null ? _a5 : {};
|
|
3964
|
-
if (dragOperation.status.initialized) {
|
|
3965
|
-
const document2 = doc.value;
|
|
3966
|
-
const style = document2.createElement("style");
|
|
3967
|
-
if (nonce) style.setAttribute("nonce", nonce);
|
|
3968
|
-
style.textContent = `* { cursor: ${cursor} !important; }`;
|
|
3969
|
-
document2.head.appendChild(style);
|
|
3970
|
-
return () => style.remove();
|
|
3971
|
-
}
|
|
3972
|
-
});
|
|
3973
|
-
}
|
|
3974
|
-
};
|
|
3975
|
-
var styleRegistry = new Map();
|
|
3976
|
-
var _roots_dec, _targetRoot_dec, _sourceRoot_dec, _additionalRoots_dec, _a$1, _registeredRules, _init$2, _additionalRoots, _StyleSheetManager_instances, syncStyles_fn, inject_fn, injectStyleElement_fn, injectAdoptedSheet_fn;
|
|
3977
|
-
var StyleSheetManager = class extends (_a$1 = CorePlugin, _additionalRoots_dec = [reactive], _sourceRoot_dec = [derived], _targetRoot_dec = [derived], _roots_dec = [derived], _a$1) {
|
|
3978
|
-
constructor(manager) {
|
|
3979
|
-
super(manager);
|
|
3980
4192
|
__runInitializers$2(_init$2, 5, this);
|
|
3981
|
-
__privateAdd$2(this,
|
|
4193
|
+
__privateAdd$2(this, _StyleInjector_instances);
|
|
3982
4194
|
__privateAdd$2(this, _registeredRules, new Set());
|
|
3983
4195
|
__privateAdd$2(this, _additionalRoots, __runInitializers$2(_init$2, 8, this, new Set())), __runInitializers$2(_init$2, 11, this);
|
|
3984
|
-
this.registerEffect(__privateMethod(this,
|
|
4196
|
+
this.registerEffect(__privateMethod(this, _StyleInjector_instances, syncStyles_fn));
|
|
3985
4197
|
}
|
|
3986
4198
|
/**
|
|
3987
4199
|
* Registers CSS rules to be injected into the active drag operation's
|
|
3988
|
-
* document and shadow roots. The
|
|
4200
|
+
* document and shadow roots. The StyleInjector handles tracking
|
|
3989
4201
|
* which roots need the styles and cleaning up when they're no longer needed.
|
|
3990
4202
|
*
|
|
3991
4203
|
* Returns a cleanup function that unregisters the rules.
|
|
@@ -4001,13 +4213,13 @@ var StyleSheetManager = class extends (_a$1 = CorePlugin, _additionalRoots_dec =
|
|
|
4001
4213
|
* Returns a cleanup function that removes the root.
|
|
4002
4214
|
*/
|
|
4003
4215
|
addRoot(root) {
|
|
4004
|
-
|
|
4216
|
+
f(() => {
|
|
4005
4217
|
const roots = new Set(this.additionalRoots);
|
|
4006
4218
|
roots.add(root);
|
|
4007
4219
|
this.additionalRoots = roots;
|
|
4008
4220
|
});
|
|
4009
4221
|
return () => {
|
|
4010
|
-
|
|
4222
|
+
f(() => {
|
|
4011
4223
|
const roots = new Set(this.additionalRoots);
|
|
4012
4224
|
roots.delete(root);
|
|
4013
4225
|
this.additionalRoots = roots;
|
|
@@ -4036,11 +4248,11 @@ var StyleSheetManager = class extends (_a$1 = CorePlugin, _additionalRoots_dec =
|
|
|
4036
4248
|
_init$2 = __decoratorStart$2(_a$1);
|
|
4037
4249
|
_registeredRules = new WeakMap();
|
|
4038
4250
|
_additionalRoots = new WeakMap();
|
|
4039
|
-
|
|
4251
|
+
_StyleInjector_instances = new WeakSet();
|
|
4040
4252
|
syncStyles_fn = function() {
|
|
4041
4253
|
const { roots } = this;
|
|
4042
4254
|
const cleanups = [];
|
|
4043
|
-
for (const root of roots) for (const cssRules of __privateGet$2(this, _registeredRules)) cleanups.push(__privateMethod(this,
|
|
4255
|
+
for (const root of roots) for (const cssRules of __privateGet$2(this, _registeredRules)) cleanups.push(__privateMethod(this, _StyleInjector_instances, inject_fn).call(this, root, cssRules));
|
|
4044
4256
|
return () => {
|
|
4045
4257
|
for (const cleanup of cleanups) cleanup();
|
|
4046
4258
|
};
|
|
@@ -4053,7 +4265,7 @@ inject_fn = function(root, cssRules) {
|
|
|
4053
4265
|
}
|
|
4054
4266
|
let registration = rootStyles.get(cssRules);
|
|
4055
4267
|
if (!registration) {
|
|
4056
|
-
const created = isDocument(root) ? __privateMethod(this,
|
|
4268
|
+
const created = isDocument(root) ? __privateMethod(this, _StyleInjector_instances, injectStyleElement_fn).call(this, root, rootStyles, cssRules) : __privateMethod(this, _StyleInjector_instances, injectAdoptedSheet_fn).call(this, root, rootStyles, cssRules);
|
|
4057
4269
|
if (!created) return () => {};
|
|
4058
4270
|
registration = created;
|
|
4059
4271
|
rootStyles.set(cssRules, registration);
|
|
@@ -4073,7 +4285,10 @@ inject_fn = function(root, cssRules) {
|
|
|
4073
4285
|
* giving them the lowest cascade priority.
|
|
4074
4286
|
*/
|
|
4075
4287
|
injectStyleElement_fn = function(root, rootStyles, cssRules) {
|
|
4288
|
+
var _a5;
|
|
4076
4289
|
const style = root.createElement("style");
|
|
4290
|
+
const { nonce } = (_a5 = this.options) != null ? _a5 : {};
|
|
4291
|
+
if (nonce) style.setAttribute("nonce", nonce);
|
|
4077
4292
|
style.textContent = cssRules;
|
|
4078
4293
|
root.head.prepend(style);
|
|
4079
4294
|
const observer = new MutationObserver((entries) => {
|
|
@@ -4121,11 +4336,29 @@ injectAdoptedSheet_fn = function(root, rootStyles, cssRules) {
|
|
|
4121
4336
|
}
|
|
4122
4337
|
};
|
|
4123
4338
|
};
|
|
4124
|
-
__decorateElement$2(_init$2, 4, "additionalRoots", _additionalRoots_dec,
|
|
4125
|
-
__decorateElement$2(_init$2, 2, "sourceRoot", _sourceRoot_dec,
|
|
4126
|
-
__decorateElement$2(_init$2, 2, "targetRoot", _targetRoot_dec,
|
|
4127
|
-
__decorateElement$2(_init$2, 2, "roots", _roots_dec,
|
|
4128
|
-
__decoratorMetadata$2(_init$2,
|
|
4339
|
+
__decorateElement$2(_init$2, 4, "additionalRoots", _additionalRoots_dec, _StyleInjector, _additionalRoots);
|
|
4340
|
+
__decorateElement$2(_init$2, 2, "sourceRoot", _sourceRoot_dec, _StyleInjector);
|
|
4341
|
+
__decorateElement$2(_init$2, 2, "targetRoot", _targetRoot_dec, _StyleInjector);
|
|
4342
|
+
__decorateElement$2(_init$2, 2, "roots", _roots_dec, _StyleInjector);
|
|
4343
|
+
__decoratorMetadata$2(_init$2, _StyleInjector);
|
|
4344
|
+
_StyleInjector.configure = configurator(_StyleInjector);
|
|
4345
|
+
var StyleInjector = _StyleInjector;
|
|
4346
|
+
var Cursor = class extends Plugin {
|
|
4347
|
+
constructor(manager, options) {
|
|
4348
|
+
super(manager, options);
|
|
4349
|
+
this.manager = manager;
|
|
4350
|
+
const { cursor = "grabbing" } = options != null ? options : {};
|
|
4351
|
+
const styleInjector = manager.registry.plugins.get(StyleInjector);
|
|
4352
|
+
const unregisterStyles = styleInjector == null ? void 0 : styleInjector.register(`* { cursor: ${cursor} !important; }`);
|
|
4353
|
+
if (unregisterStyles) {
|
|
4354
|
+
const originalDestroy = this.destroy.bind(this);
|
|
4355
|
+
this.destroy = () => {
|
|
4356
|
+
unregisterStyles();
|
|
4357
|
+
originalDestroy();
|
|
4358
|
+
};
|
|
4359
|
+
}
|
|
4360
|
+
}
|
|
4361
|
+
};
|
|
4129
4362
|
var ATTR_PREFIX = "data-dnd-";
|
|
4130
4363
|
var DROPPING_ATTRIBUTE = `${ATTR_PREFIX}dropping`;
|
|
4131
4364
|
var CSS_PREFIX = "--dnd-";
|
|
@@ -4154,6 +4387,7 @@ var CSS_RULES = `
|
|
|
4154
4387
|
max-width: var(${CSS_PREFIX}width, auto);
|
|
4155
4388
|
height: var(${CSS_PREFIX}height, auto);
|
|
4156
4389
|
max-height: var(${CSS_PREFIX}height, auto);
|
|
4390
|
+
transform: var(${CSS_PREFIX}transform, none) !important;
|
|
4157
4391
|
transition: var(${CSS_PREFIX}transition) !important;
|
|
4158
4392
|
}
|
|
4159
4393
|
|
|
@@ -4199,7 +4433,7 @@ var CSS_RULES = `
|
|
|
4199
4433
|
}
|
|
4200
4434
|
`.replace(/\n+/g, " ").replace(/\s+/g, " ").trim();
|
|
4201
4435
|
function createPlaceholder(source, type = "hidden") {
|
|
4202
|
-
return
|
|
4436
|
+
return f(() => {
|
|
4203
4437
|
const { element, manager } = source;
|
|
4204
4438
|
if (!element || !manager) return;
|
|
4205
4439
|
const containedDroppables = findContainedDroppables(element, manager.registry.droppables);
|
|
@@ -4286,7 +4520,7 @@ function createElementMutationObserver(element, placeholder, clone) {
|
|
|
4286
4520
|
} else if (attributeValue !== null) placeholder.setAttribute(attributeName, attributeValue);
|
|
4287
4521
|
else placeholder.removeAttribute(attributeName);
|
|
4288
4522
|
}
|
|
4289
|
-
if (hasChildrenMutations && clone) placeholder.
|
|
4523
|
+
if (hasChildrenMutations && clone) placeholder.replaceChildren(...element.cloneNode(true).childNodes);
|
|
4290
4524
|
});
|
|
4291
4525
|
observer.observe(element, {
|
|
4292
4526
|
attributes: true,
|
|
@@ -4312,6 +4546,10 @@ function createDocumentMutationObserver(element, placeholder, feedbackElement) {
|
|
|
4312
4546
|
}
|
|
4313
4547
|
}
|
|
4314
4548
|
}
|
|
4549
|
+
if (element.isConnected && placeholder.isConnected && element.nextElementSibling !== placeholder) {
|
|
4550
|
+
element.insertAdjacentElement("afterend", placeholder);
|
|
4551
|
+
showPopover(feedbackElement);
|
|
4552
|
+
}
|
|
4315
4553
|
});
|
|
4316
4554
|
observer.observe(element.ownerDocument.body, {
|
|
4317
4555
|
childList: true,
|
|
@@ -4321,7 +4559,7 @@ function createDocumentMutationObserver(element, placeholder, feedbackElement) {
|
|
|
4321
4559
|
}
|
|
4322
4560
|
function createResizeObserver(ctx) {
|
|
4323
4561
|
return new ResizeObserver(() => {
|
|
4324
|
-
var _a5, _b2;
|
|
4562
|
+
var _a5, _b2, _c3;
|
|
4325
4563
|
const placeholderShape = new DOMRectangle(ctx.placeholder, {
|
|
4326
4564
|
frameTransform: ctx.frameTransform,
|
|
4327
4565
|
ignoreTransforms: true
|
|
@@ -4349,7 +4587,16 @@ function createResizeObserver(ctx) {
|
|
|
4349
4587
|
cell.style.width = `${placeholderCell.getBoundingClientRect().width}px`;
|
|
4350
4588
|
}
|
|
4351
4589
|
}
|
|
4352
|
-
|
|
4590
|
+
const translate = (_c3 = ctx.getTranslate()) != null ? _c3 : {
|
|
4591
|
+
x: 0,
|
|
4592
|
+
y: 0
|
|
4593
|
+
};
|
|
4594
|
+
const shapeLeft = ctx.left + dX + fixedOffset.x + translate.x;
|
|
4595
|
+
const shapeTop = ctx.top + dY + fixedOffset.y + translate.y;
|
|
4596
|
+
const shapeWidth = placeholderShape.width - ctx.widthOffset;
|
|
4597
|
+
const shapeHeight = placeholderShape.height - ctx.heightOffset;
|
|
4598
|
+
const ft = ctx.frameTransform;
|
|
4599
|
+
ctx.dragOperation.shape = new Rectangle(shapeLeft * ft.scaleX + ft.x, shapeTop * ft.scaleY + ft.y, shapeWidth * ft.scaleX, shapeHeight * ft.scaleY);
|
|
4353
4600
|
});
|
|
4354
4601
|
}
|
|
4355
4602
|
var DEFAULT_DURATION = 250;
|
|
@@ -4359,6 +4606,7 @@ function runDropAnimation(ctx) {
|
|
|
4359
4606
|
const { animation } = ctx;
|
|
4360
4607
|
if (typeof animation === "function") {
|
|
4361
4608
|
const result = animation({
|
|
4609
|
+
source: ctx.source,
|
|
4362
4610
|
element: ctx.element,
|
|
4363
4611
|
feedbackElement: ctx.feedbackElement,
|
|
4364
4612
|
placeholder: ctx.placeholder,
|
|
@@ -4410,7 +4658,13 @@ function runDropAnimation(ctx) {
|
|
|
4410
4658
|
requestAnimationFrame(ctx.restoreFocus);
|
|
4411
4659
|
});
|
|
4412
4660
|
}
|
|
4413
|
-
var _overlay_dec
|
|
4661
|
+
var _overlay_dec;
|
|
4662
|
+
var _a2;
|
|
4663
|
+
var _init2;
|
|
4664
|
+
var _overlay;
|
|
4665
|
+
var _Feedback_instances;
|
|
4666
|
+
var trackOverlayRoot_fn;
|
|
4667
|
+
var render_fn;
|
|
4414
4668
|
var _Feedback = class _Feedback extends (_a2 = Plugin, _overlay_dec = [reactive], _a2) {
|
|
4415
4669
|
constructor(manager, options) {
|
|
4416
4670
|
super(manager, options);
|
|
@@ -4420,8 +4674,8 @@ var _Feedback = class _Feedback extends (_a2 = Plugin, _overlay_dec = [reactive]
|
|
|
4420
4674
|
initial: {},
|
|
4421
4675
|
current: {}
|
|
4422
4676
|
};
|
|
4423
|
-
const
|
|
4424
|
-
const unregisterStyles =
|
|
4677
|
+
const styleInjector = manager.registry.plugins.get(StyleInjector);
|
|
4678
|
+
const unregisterStyles = styleInjector == null ? void 0 : styleInjector.register(CSS_RULES);
|
|
4425
4679
|
if (unregisterStyles) {
|
|
4426
4680
|
const originalDestroy = this.destroy.bind(this);
|
|
4427
4681
|
this.destroy = () => {
|
|
@@ -4429,22 +4683,22 @@ var _Feedback = class _Feedback extends (_a2 = Plugin, _overlay_dec = [reactive]
|
|
|
4429
4683
|
originalDestroy();
|
|
4430
4684
|
};
|
|
4431
4685
|
}
|
|
4432
|
-
this.registerEffect(__privateMethod(this, _Feedback_instances, trackOverlayRoot_fn).bind(this,
|
|
4686
|
+
this.registerEffect(__privateMethod(this, _Feedback_instances, trackOverlayRoot_fn).bind(this, styleInjector));
|
|
4433
4687
|
this.registerEffect(__privateMethod(this, _Feedback_instances, render_fn));
|
|
4434
4688
|
}
|
|
4435
4689
|
};
|
|
4436
4690
|
_init2 = __decoratorStart$2(_a2);
|
|
4437
4691
|
_overlay = new WeakMap();
|
|
4438
4692
|
_Feedback_instances = new WeakSet();
|
|
4439
|
-
trackOverlayRoot_fn = function(
|
|
4693
|
+
trackOverlayRoot_fn = function(styleInjector) {
|
|
4440
4694
|
const { overlay } = this;
|
|
4441
|
-
if (!overlay || !
|
|
4695
|
+
if (!overlay || !styleInjector) return;
|
|
4442
4696
|
const root = getRoot(overlay);
|
|
4443
4697
|
if (!root) return;
|
|
4444
|
-
return
|
|
4698
|
+
return styleInjector.addRoot(root);
|
|
4445
4699
|
};
|
|
4446
4700
|
render_fn = function() {
|
|
4447
|
-
var _a5, _b2, _c3;
|
|
4701
|
+
var _a5, _b2, _c3, _d2, _e, _f, _g;
|
|
4448
4702
|
const { state, manager, options } = this;
|
|
4449
4703
|
const { dragOperation } = manager;
|
|
4450
4704
|
const { position, source, status } = dragOperation;
|
|
@@ -4454,10 +4708,13 @@ render_fn = function() {
|
|
|
4454
4708
|
return;
|
|
4455
4709
|
}
|
|
4456
4710
|
if (!source) return;
|
|
4457
|
-
const { element
|
|
4711
|
+
const { element } = source;
|
|
4712
|
+
const entityOptions = source.pluginConfig(_Feedback);
|
|
4713
|
+
const feedbackOption = (_b2 = (_a5 = entityOptions == null ? void 0 : entityOptions.feedback) != null ? _a5 : options == null ? void 0 : options.feedback) != null ? _b2 : "default";
|
|
4714
|
+
const feedback = typeof feedbackOption === "function" ? feedbackOption(source, manager) : feedbackOption;
|
|
4458
4715
|
if (!element || feedback === "none" || !status.initialized || status.initializing) return;
|
|
4459
4716
|
const { initial } = state;
|
|
4460
|
-
const feedbackElement = (
|
|
4717
|
+
const feedbackElement = (_c3 = this.overlay) != null ? _c3 : element;
|
|
4461
4718
|
const frameTransform = getFrameTransform(feedbackElement);
|
|
4462
4719
|
const elementFrameTransform = getFrameTransform(element);
|
|
4463
4720
|
const crossFrame = !isSameFrame(element, feedbackElement);
|
|
@@ -4475,22 +4732,34 @@ render_fn = function() {
|
|
|
4475
4732
|
height = height / scaleDelta.y;
|
|
4476
4733
|
}
|
|
4477
4734
|
const styles = new Styles(feedbackElement);
|
|
4478
|
-
const
|
|
4735
|
+
const elementStyles = getComputedStyles(element);
|
|
4736
|
+
const { transition, translate, boxSizing, paddingBlockStart, paddingBlockEnd, paddingInlineStart, paddingInlineEnd, borderInlineStartWidth, borderInlineEndWidth, borderBlockStartWidth, borderBlockEndWidth } = elementStyles;
|
|
4737
|
+
const feedbackTransition = transition.split(",").filter((t) => !/^\s*(transform|translate|scale)\b/.test(t)).join(",");
|
|
4738
|
+
const parsedTransform = parseTransform(elementStyles);
|
|
4739
|
+
const initialTransformStyle = elementStyles.transform;
|
|
4479
4740
|
const clone = feedback === "clone";
|
|
4480
4741
|
const contentBox = boxSizing === "content-box";
|
|
4481
4742
|
const widthOffset = contentBox ? parseInt(paddingInlineStart) + parseInt(paddingInlineEnd) + parseInt(borderInlineStartWidth) + parseInt(borderInlineEndWidth) : 0;
|
|
4482
4743
|
const heightOffset = contentBox ? parseInt(paddingBlockStart) + parseInt(paddingBlockEnd) + parseInt(borderBlockStartWidth) + parseInt(borderBlockEndWidth) : 0;
|
|
4483
4744
|
const placeholder = feedback !== "move" && !this.overlay ? createPlaceholder(source, clone ? "clone" : "hidden") : null;
|
|
4484
|
-
const isKeyboardOperation =
|
|
4485
|
-
if (translate
|
|
4486
|
-
|
|
4487
|
-
|
|
4745
|
+
const isKeyboardOperation = f(() => isKeyboardEvent(manager.dragOperation.activatorEvent));
|
|
4746
|
+
if (!initial.translate) {
|
|
4747
|
+
if (this.overlay && parsedTransform) initial.translate = {
|
|
4748
|
+
x: parsedTransform.x,
|
|
4749
|
+
y: parsedTransform.y
|
|
4750
|
+
};
|
|
4751
|
+
else if (translate !== "none") {
|
|
4752
|
+
const parsedTranslate = parseTranslate(translate);
|
|
4753
|
+
if (parsedTranslate) initial.translate = parsedTranslate;
|
|
4754
|
+
}
|
|
4488
4755
|
}
|
|
4489
4756
|
if (!initial.transformOrigin) {
|
|
4490
|
-
const current =
|
|
4757
|
+
const current = f(() => position.current);
|
|
4758
|
+
const visualLeft = left + ((_d2 = parsedTransform == null ? void 0 : parsedTransform.x) != null ? _d2 : 0);
|
|
4759
|
+
const visualTop = top + ((_e = parsedTransform == null ? void 0 : parsedTransform.y) != null ? _e : 0);
|
|
4491
4760
|
initial.transformOrigin = {
|
|
4492
|
-
x: (current.x -
|
|
4493
|
-
y: (current.y -
|
|
4761
|
+
x: (current.x - visualLeft * frameTransform.scaleX - frameTransform.x) / (width * frameTransform.scaleX),
|
|
4762
|
+
y: (current.y - visualTop * frameTransform.scaleY - frameTransform.y) / (height * frameTransform.scaleY)
|
|
4494
4763
|
};
|
|
4495
4764
|
}
|
|
4496
4765
|
const { transformOrigin } = initial;
|
|
@@ -4530,8 +4799,8 @@ render_fn = function() {
|
|
|
4530
4799
|
top: top + delta.y
|
|
4531
4800
|
};
|
|
4532
4801
|
feedbackElement.setAttribute(ATTRIBUTE, "true");
|
|
4533
|
-
const transform =
|
|
4534
|
-
const initialTranslate = (
|
|
4802
|
+
const transform = f(() => dragOperation.transform);
|
|
4803
|
+
const initialTranslate = (_f = initial.translate) != null ? _f : {
|
|
4535
4804
|
x: 0,
|
|
4536
4805
|
y: 0
|
|
4537
4806
|
};
|
|
@@ -4544,7 +4813,8 @@ render_fn = function() {
|
|
|
4544
4813
|
top: projected.top + fixedOffset.y,
|
|
4545
4814
|
left: projected.left + fixedOffset.x,
|
|
4546
4815
|
translate: `${tX}px ${tY}px 0`,
|
|
4547
|
-
|
|
4816
|
+
transform: this.overlay ? "none" : initialTransformStyle,
|
|
4817
|
+
transition: feedbackTransition ? `${feedbackTransition}, translate 0ms linear` : "translate 0ms linear",
|
|
4548
4818
|
scale: crossFrame ? `${scaleDelta.x} ${scaleDelta.y}` : "",
|
|
4549
4819
|
"transform-origin": `${transformOrigin.x * 100}% ${transformOrigin.y * 100}%`
|
|
4550
4820
|
}, CSS_PREFIX);
|
|
@@ -4575,6 +4845,7 @@ render_fn = function() {
|
|
|
4575
4845
|
delta,
|
|
4576
4846
|
styles,
|
|
4577
4847
|
dragOperation,
|
|
4848
|
+
getTranslate: () => state.current.translate,
|
|
4578
4849
|
getElementMutationObserver: () => elementMutationObserver,
|
|
4579
4850
|
getSavedCellWidths: () => savedCellWidths,
|
|
4580
4851
|
setSavedCellWidths: (widths) => {
|
|
@@ -4582,20 +4853,20 @@ render_fn = function() {
|
|
|
4582
4853
|
}
|
|
4583
4854
|
});
|
|
4584
4855
|
const initialShape = new DOMRectangle(feedbackElement);
|
|
4585
|
-
|
|
4856
|
+
f(() => dragOperation.shape = initialShape);
|
|
4586
4857
|
const feedbackWindow = getWindow(feedbackElement);
|
|
4587
4858
|
const handleWindowResize = (event) => {
|
|
4588
4859
|
this.manager.actions.stop({ event });
|
|
4589
4860
|
};
|
|
4590
4861
|
const reducedMotion = prefersReducedMotion(feedbackWindow);
|
|
4591
4862
|
if (isKeyboardOperation) feedbackWindow.addEventListener("resize", handleWindowResize);
|
|
4592
|
-
if (
|
|
4863
|
+
if (f(() => source.status) === "idle") requestAnimationFrame(() => source.status = "dragging");
|
|
4593
4864
|
if (placeholder) {
|
|
4594
4865
|
resizeObserver.observe(placeholder);
|
|
4595
4866
|
elementMutationObserver = createElementMutationObserver(element, placeholder, clone);
|
|
4596
4867
|
documentMutationObserver = createDocumentMutationObserver(element, placeholder, feedbackElement);
|
|
4597
4868
|
}
|
|
4598
|
-
const id = (
|
|
4869
|
+
const id = (_g = manager.dragOperation.source) == null ? void 0 : _g.id;
|
|
4599
4870
|
const restoreFocus = () => {
|
|
4600
4871
|
var _a6;
|
|
4601
4872
|
if (!isKeyboardOperation || id == null) return;
|
|
@@ -4604,7 +4875,6 @@ render_fn = function() {
|
|
|
4604
4875
|
if (isHTMLElement(focusTarget)) focusTarget.focus();
|
|
4605
4876
|
};
|
|
4606
4877
|
const cleanup = () => {
|
|
4607
|
-
var _a6;
|
|
4608
4878
|
elementMutationObserver?.disconnect();
|
|
4609
4879
|
documentMutationObserver?.disconnect();
|
|
4610
4880
|
resizeObserver.disconnect();
|
|
@@ -4615,19 +4885,25 @@ render_fn = function() {
|
|
|
4615
4885
|
}
|
|
4616
4886
|
feedbackElement.removeAttribute(ATTRIBUTE);
|
|
4617
4887
|
styles.reset();
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4888
|
+
const finalize = () => {
|
|
4889
|
+
var _a6;
|
|
4890
|
+
if (savedCellWidths && isTableRow(element)) {
|
|
4891
|
+
const cells = Array.from(element.cells);
|
|
4892
|
+
for (const [index, cell] of cells.entries()) cell.style.width = (_a6 = savedCellWidths[index]) != null ? _a6 : "";
|
|
4893
|
+
}
|
|
4894
|
+
source.status = "idle";
|
|
4895
|
+
const moved = state.current.translate != null;
|
|
4896
|
+
const isDragging = dragOperation.status.dragging;
|
|
4897
|
+
if (placeholder && (!isDragging && moved || placeholder.parentElement !== feedbackElement.parentElement) && feedbackElement.isConnected) placeholder.replaceWith(feedbackElement);
|
|
4898
|
+
placeholder?.remove();
|
|
4899
|
+
};
|
|
4900
|
+
if (feedbackElement === this.overlay) setTimeout(finalize, 0);
|
|
4901
|
+
else finalize();
|
|
4626
4902
|
};
|
|
4627
4903
|
const optionsDropAnimation = options == null ? void 0 : options.dropAnimation;
|
|
4628
4904
|
const feedbackPlugin = this;
|
|
4629
4905
|
const cleanupEffects = effects(() => {
|
|
4630
|
-
var _a6;
|
|
4906
|
+
var _a6, _b3, _c4;
|
|
4631
4907
|
const { transform: transform2, status: status2 } = dragOperation;
|
|
4632
4908
|
if (!transform2.x && !transform2.y && !state.current.translate) return;
|
|
4633
4909
|
if (status2.dragging) {
|
|
@@ -4640,14 +4916,15 @@ render_fn = function() {
|
|
|
4640
4916
|
y: transform2.y / frameTransform.scaleY + initialTranslate2.y
|
|
4641
4917
|
};
|
|
4642
4918
|
const previousTranslate = state.current.translate;
|
|
4643
|
-
const modifiers =
|
|
4644
|
-
const currentShape =
|
|
4919
|
+
const modifiers = f(() => dragOperation.modifiers);
|
|
4920
|
+
const currentShape = f(() => {
|
|
4645
4921
|
var _a7;
|
|
4646
4922
|
return (_a7 = dragOperation.shape) == null ? void 0 : _a7.current;
|
|
4647
4923
|
});
|
|
4648
|
-
const
|
|
4924
|
+
const keyboardTransition = options == null ? void 0 : options.keyboardTransition;
|
|
4925
|
+
const translateTransition = isKeyboardOperation && !reducedMotion && keyboardTransition !== null ? `${(_b3 = keyboardTransition == null ? void 0 : keyboardTransition.duration) != null ? _b3 : 250}ms ${(_c4 = keyboardTransition == null ? void 0 : keyboardTransition.easing) != null ? _c4 : "cubic-bezier(0.25, 1, 0.5, 1)"}` : "0ms linear";
|
|
4649
4926
|
styles.set({
|
|
4650
|
-
transition: `${
|
|
4927
|
+
transition: feedbackTransition ? `${feedbackTransition}, translate ${translateTransition}` : `translate ${translateTransition}`,
|
|
4651
4928
|
translate: `${translate2.x}px ${translate2.y}px 0`
|
|
4652
4929
|
}, CSS_PREFIX);
|
|
4653
4930
|
elementMutationObserver?.takeRecords();
|
|
@@ -4661,7 +4938,7 @@ render_fn = function() {
|
|
|
4661
4938
|
if (dragOperation.status.dropped) {
|
|
4662
4939
|
this.dispose();
|
|
4663
4940
|
source.status = "dropping";
|
|
4664
|
-
const dropAnimationConfig = feedbackPlugin.dropAnimation !== void 0 ? feedbackPlugin.dropAnimation : optionsDropAnimation;
|
|
4941
|
+
const dropAnimationConfig = (entityOptions == null ? void 0 : entityOptions.dropAnimation) !== void 0 ? entityOptions.dropAnimation : feedbackPlugin.dropAnimation !== void 0 ? feedbackPlugin.dropAnimation : optionsDropAnimation;
|
|
4665
4942
|
let translate2 = state.current.translate;
|
|
4666
4943
|
const moved = translate2 != null;
|
|
4667
4944
|
if (!translate2 && element !== feedbackElement) translate2 = {
|
|
@@ -4674,6 +4951,7 @@ render_fn = function() {
|
|
|
4674
4951
|
}
|
|
4675
4952
|
manager.renderer.rendering.then(() => {
|
|
4676
4953
|
runDropAnimation({
|
|
4954
|
+
source,
|
|
4677
4955
|
element,
|
|
4678
4956
|
feedbackElement,
|
|
4679
4957
|
placeholder,
|
|
@@ -4701,7 +4979,13 @@ _Feedback.configure = configurator(_Feedback);
|
|
|
4701
4979
|
var Feedback = _Feedback;
|
|
4702
4980
|
var LOCKED = true;
|
|
4703
4981
|
var UNLOCKED = false;
|
|
4704
|
-
var _dec
|
|
4982
|
+
var _dec;
|
|
4983
|
+
var _a3;
|
|
4984
|
+
var _dec2;
|
|
4985
|
+
var _b = (_dec2 = [reactive], ScrollDirection.Forward);
|
|
4986
|
+
var _init3;
|
|
4987
|
+
var __b;
|
|
4988
|
+
var __a;
|
|
4705
4989
|
_a3 = (_dec = [reactive], ScrollDirection.Reverse);
|
|
4706
4990
|
var ScrollLock = class {
|
|
4707
4991
|
constructor() {
|
|
@@ -4769,7 +5053,12 @@ var ScrollIntentTracker = class extends Plugin {
|
|
|
4769
5053
|
function getDirection$1(a, b) {
|
|
4770
5054
|
return Math.sign(a - b);
|
|
4771
5055
|
}
|
|
4772
|
-
var _autoScrolling_dec
|
|
5056
|
+
var _autoScrolling_dec;
|
|
5057
|
+
var _a4;
|
|
5058
|
+
var _init4;
|
|
5059
|
+
var _autoScrolling;
|
|
5060
|
+
var _meta;
|
|
5061
|
+
var _scroll;
|
|
4773
5062
|
var Scroller = class extends (_a4 = CorePlugin, _autoScrolling_dec = [reactive], _a4) {
|
|
4774
5063
|
constructor(manager) {
|
|
4775
5064
|
super(manager);
|
|
@@ -4781,7 +5070,7 @@ var Scroller = class extends (_a4 = CorePlugin, _autoScrolling_dec = [reactive],
|
|
|
4781
5070
|
if (by.y) element.scrollTop += by.y;
|
|
4782
5071
|
if (by.x) element.scrollLeft += by.x;
|
|
4783
5072
|
});
|
|
4784
|
-
this.scroll = (options) => {
|
|
5073
|
+
this.scroll = (options, scrollOptions) => {
|
|
4785
5074
|
var _a5;
|
|
4786
5075
|
if (this.disabled) return false;
|
|
4787
5076
|
const elements = this.getScrollableElements();
|
|
@@ -4802,7 +5091,7 @@ var Scroller = class extends (_a4 = CorePlugin, _autoScrolling_dec = [reactive],
|
|
|
4802
5091
|
for (const scrollableElement of elements) {
|
|
4803
5092
|
const elementCanScroll = canScroll(scrollableElement, by);
|
|
4804
5093
|
if (elementCanScroll.x || elementCanScroll.y) {
|
|
4805
|
-
const { speed, direction } = detectScrollIntent(scrollableElement, currentPosition, intent);
|
|
5094
|
+
const { speed, direction } = detectScrollIntent(scrollableElement, currentPosition, intent, scrollOptions == null ? void 0 : scrollOptions.acceleration, scrollOptions == null ? void 0 : scrollOptions.threshold);
|
|
4806
5095
|
if (scrollIntent) {
|
|
4807
5096
|
for (const axis of Axes) if (scrollIntent[axis].isLocked(direction[axis])) {
|
|
4808
5097
|
speed[axis] = 0;
|
|
@@ -4915,24 +5204,36 @@ var scheduler3 = new Scheduler((callback) => {
|
|
|
4915
5204
|
else callback();
|
|
4916
5205
|
});
|
|
4917
5206
|
var AUTOSCROLL_INTERVAL = 10;
|
|
4918
|
-
var
|
|
4919
|
-
constructor(manager,
|
|
4920
|
-
super(manager);
|
|
5207
|
+
var _AutoScroller = class _AutoScroller extends Plugin {
|
|
5208
|
+
constructor(manager, options) {
|
|
5209
|
+
super(manager, options);
|
|
4921
5210
|
const scroller = manager.registry.plugins.get(Scroller);
|
|
4922
5211
|
if (!scroller) throw new Error("AutoScroller plugin depends on Scroller plugin");
|
|
4923
5212
|
this.destroy = j(() => {
|
|
5213
|
+
var _a5, _b2, _c3;
|
|
4924
5214
|
if (this.disabled) return;
|
|
4925
5215
|
const { position: _, status } = manager.dragOperation;
|
|
4926
|
-
if (status.dragging)
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
5216
|
+
if (status.dragging) {
|
|
5217
|
+
const scrollOptions = {
|
|
5218
|
+
acceleration: (_a5 = this.options) == null ? void 0 : _a5.acceleration,
|
|
5219
|
+
threshold: typeof ((_b2 = this.options) == null ? void 0 : _b2.threshold) === "number" ? {
|
|
5220
|
+
x: this.options.threshold,
|
|
5221
|
+
y: this.options.threshold
|
|
5222
|
+
} : (_c3 = this.options) == null ? void 0 : _c3.threshold
|
|
4931
5223
|
};
|
|
4932
|
-
|
|
5224
|
+
if (scroller.scroll(void 0, scrollOptions)) {
|
|
5225
|
+
scroller.autoScrolling = true;
|
|
5226
|
+
const interval = setInterval(() => scheduler3.schedule(() => scroller.scroll(void 0, scrollOptions)), AUTOSCROLL_INTERVAL);
|
|
5227
|
+
return () => {
|
|
5228
|
+
clearInterval(interval);
|
|
5229
|
+
};
|
|
5230
|
+
} else scroller.autoScrolling = false;
|
|
5231
|
+
}
|
|
4933
5232
|
});
|
|
4934
5233
|
}
|
|
4935
5234
|
};
|
|
5235
|
+
_AutoScroller.configure = configurator(_AutoScroller);
|
|
5236
|
+
var AutoScroller = _AutoScroller;
|
|
4936
5237
|
var listenerOptions = {
|
|
4937
5238
|
capture: true,
|
|
4938
5239
|
passive: true
|
|
@@ -4962,27 +5263,30 @@ var ScrollListener = class extends CorePlugin {
|
|
|
4962
5263
|
}
|
|
4963
5264
|
};
|
|
4964
5265
|
_timeout = new WeakMap();
|
|
5266
|
+
var CSS_RULES2 = "* { user-select: none !important; -webkit-user-select: none !important; }";
|
|
4965
5267
|
var PreventSelection = class extends Plugin {
|
|
4966
|
-
constructor(manager
|
|
4967
|
-
super(manager
|
|
5268
|
+
constructor(manager) {
|
|
5269
|
+
super(manager);
|
|
4968
5270
|
this.manager = manager;
|
|
5271
|
+
const styleInjector = manager.registry.plugins.get(StyleInjector);
|
|
5272
|
+
const unregisterStyles = styleInjector == null ? void 0 : styleInjector.register(CSS_RULES2);
|
|
4969
5273
|
this.destroy = j(() => {
|
|
4970
|
-
var _a5;
|
|
4971
5274
|
const { dragOperation } = this.manager;
|
|
4972
|
-
const { nonce } = (_a5 = this.options) != null ? _a5 : {};
|
|
4973
5275
|
if (dragOperation.status.initialized) {
|
|
4974
|
-
const style = document.createElement("style");
|
|
4975
|
-
if (nonce) style.setAttribute("nonce", nonce);
|
|
4976
|
-
style.textContent = `* { user-select: none !important; -webkit-user-select: none !important; }`;
|
|
4977
|
-
document.head.appendChild(style);
|
|
4978
5276
|
removeSelection();
|
|
4979
5277
|
document.addEventListener("selectionchange", removeSelection, { capture: true });
|
|
4980
5278
|
return () => {
|
|
4981
5279
|
document.removeEventListener("selectionchange", removeSelection, { capture: true });
|
|
4982
|
-
style.remove();
|
|
4983
5280
|
};
|
|
4984
5281
|
}
|
|
4985
5282
|
});
|
|
5283
|
+
if (unregisterStyles) {
|
|
5284
|
+
const originalDestroy = this.destroy.bind(this);
|
|
5285
|
+
this.destroy = () => {
|
|
5286
|
+
unregisterStyles();
|
|
5287
|
+
originalDestroy();
|
|
5288
|
+
};
|
|
5289
|
+
}
|
|
4986
5290
|
}
|
|
4987
5291
|
};
|
|
4988
5292
|
function removeSelection() {
|
|
@@ -5121,12 +5425,10 @@ var _KeyboardSensor = class _KeyboardSensor extends Sensor {
|
|
|
5121
5425
|
y: 0
|
|
5122
5426
|
};
|
|
5123
5427
|
break;
|
|
5124
|
-
case "right":
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
};
|
|
5129
|
-
break;
|
|
5428
|
+
case "right": by = {
|
|
5429
|
+
x: offset.x * factor,
|
|
5430
|
+
y: 0
|
|
5431
|
+
};
|
|
5130
5432
|
}
|
|
5131
5433
|
if (by.x || by.y) {
|
|
5132
5434
|
event.preventDefault();
|
|
@@ -5186,9 +5488,7 @@ var DistanceConstraint = class extends ActivationConstraint {
|
|
|
5186
5488
|
}
|
|
5187
5489
|
if (exceedsDistance(delta, this.options.value)) this.activate(event);
|
|
5188
5490
|
break;
|
|
5189
|
-
case "pointerup":
|
|
5190
|
-
this.abort();
|
|
5191
|
-
break;
|
|
5491
|
+
case "pointerup": this.abort();
|
|
5192
5492
|
}
|
|
5193
5493
|
}
|
|
5194
5494
|
abort() {
|
|
@@ -5196,7 +5496,8 @@ var DistanceConstraint = class extends ActivationConstraint {
|
|
|
5196
5496
|
}
|
|
5197
5497
|
};
|
|
5198
5498
|
_coordinates = new WeakMap();
|
|
5199
|
-
var _timeout2
|
|
5499
|
+
var _timeout2;
|
|
5500
|
+
var _coordinates2;
|
|
5200
5501
|
var DelayConstraint = class extends ActivationConstraint {
|
|
5201
5502
|
constructor() {
|
|
5202
5503
|
super(...arguments);
|
|
@@ -5212,14 +5513,13 @@ var DelayConstraint = class extends ActivationConstraint {
|
|
|
5212
5513
|
case "pointermove":
|
|
5213
5514
|
if (!__privateGet$2(this, _coordinates2)) return;
|
|
5214
5515
|
const { x, y } = getEventCoordinates(event);
|
|
5215
|
-
|
|
5516
|
+
const delta = {
|
|
5216
5517
|
x: x - __privateGet$2(this, _coordinates2).x,
|
|
5217
5518
|
y: y - __privateGet$2(this, _coordinates2).y
|
|
5218
|
-
}
|
|
5219
|
-
|
|
5220
|
-
case "pointerup":
|
|
5221
|
-
this.abort();
|
|
5519
|
+
};
|
|
5520
|
+
if (exceedsDistance(delta, this.options.tolerance)) this.abort();
|
|
5222
5521
|
break;
|
|
5522
|
+
case "pointerup": this.abort();
|
|
5223
5523
|
}
|
|
5224
5524
|
}
|
|
5225
5525
|
abort() {
|
|
@@ -5260,7 +5560,9 @@ var defaults2 = Object.freeze({
|
|
|
5260
5560
|
if (target === source.handle) return false;
|
|
5261
5561
|
if (!isElement(target)) return false;
|
|
5262
5562
|
if ((_a5 = source.handle) == null ? void 0 : _a5.contains(target)) return false;
|
|
5263
|
-
|
|
5563
|
+
const interactiveElement = getInteractiveElement(target);
|
|
5564
|
+
if (interactiveElement === source.element) return false;
|
|
5565
|
+
return Boolean(interactiveElement);
|
|
5264
5566
|
}
|
|
5265
5567
|
});
|
|
5266
5568
|
var _cleanup;
|
|
@@ -5300,8 +5602,10 @@ var _PointerSensor = class _PointerSensor extends Sensor {
|
|
|
5300
5602
|
if (isPointerEvent(event)) this.handlePointerDown(event, source, options);
|
|
5301
5603
|
};
|
|
5302
5604
|
let targets = [(_a5 = source.handle) != null ? _a5 : source.element];
|
|
5303
|
-
if (options == null ? void 0 : options.activatorElements)
|
|
5304
|
-
|
|
5605
|
+
if (options == null ? void 0 : options.activatorElements) {
|
|
5606
|
+
if (Array.isArray(options.activatorElements)) targets = options.activatorElements;
|
|
5607
|
+
else targets = options.activatorElements(source);
|
|
5608
|
+
}
|
|
5305
5609
|
for (const target of targets) {
|
|
5306
5610
|
if (!target) continue;
|
|
5307
5611
|
patchWindow(target.ownerDocument.defaultView);
|
|
@@ -5403,7 +5707,12 @@ var _PointerSensor = class _PointerSensor extends Sensor {
|
|
|
5403
5707
|
}).signal.aborted) return this.cleanup();
|
|
5404
5708
|
event.preventDefault();
|
|
5405
5709
|
const pointerCaptureTarget = getDocument(event.target).body;
|
|
5406
|
-
|
|
5710
|
+
try {
|
|
5711
|
+
pointerCaptureTarget.setPointerCapture(event.pointerId);
|
|
5712
|
+
} catch (e) {
|
|
5713
|
+
this.handleCancel(event);
|
|
5714
|
+
return;
|
|
5715
|
+
}
|
|
5407
5716
|
const listenerTargets = isElement(event.target) ? [event.target, pointerCaptureTarget] : pointerCaptureTarget;
|
|
5408
5717
|
const unbind = this.listeners.bind(listenerTargets, [
|
|
5409
5718
|
{
|
|
@@ -5435,6 +5744,9 @@ var _PointerSensor = class _PointerSensor extends Sensor {
|
|
|
5435
5744
|
this.cleanup();
|
|
5436
5745
|
}
|
|
5437
5746
|
cleanup() {
|
|
5747
|
+
const { controller } = this;
|
|
5748
|
+
this.controller = void 0;
|
|
5749
|
+
if (controller && !controller.signal.aborted) controller.abort();
|
|
5438
5750
|
this.latest = {
|
|
5439
5751
|
event: void 0,
|
|
5440
5752
|
coordinates: void 0
|
|
@@ -5487,7 +5799,7 @@ var DragDropManager = class extends DragDropManager$1 {
|
|
|
5487
5799
|
plugins: [
|
|
5488
5800
|
ScrollListener,
|
|
5489
5801
|
Scroller,
|
|
5490
|
-
|
|
5802
|
+
StyleInjector,
|
|
5491
5803
|
...plugins
|
|
5492
5804
|
],
|
|
5493
5805
|
sensors,
|
|
@@ -5495,14 +5807,18 @@ var DragDropManager = class extends DragDropManager$1 {
|
|
|
5495
5807
|
}));
|
|
5496
5808
|
}
|
|
5497
5809
|
};
|
|
5498
|
-
var
|
|
5499
|
-
var
|
|
5810
|
+
var _element_dec;
|
|
5811
|
+
var _handle_dec;
|
|
5812
|
+
var _c;
|
|
5813
|
+
var _init5;
|
|
5814
|
+
var _handle;
|
|
5815
|
+
var _element$1;
|
|
5816
|
+
var Draggable$1 = class extends (_c = Draggable$2, _handle_dec = [reactive], _element_dec = [reactive], _c) {
|
|
5500
5817
|
constructor(_a5, manager) {
|
|
5501
|
-
var _b2 = _a5, { element, effects: effects2 = () => [], handle
|
|
5818
|
+
var _b2 = _a5, { element, effects: effects2 = () => [], handle } = _b2, input = __objRest$2(_b2, [
|
|
5502
5819
|
"element",
|
|
5503
5820
|
"effects",
|
|
5504
|
-
"handle"
|
|
5505
|
-
"feedback"
|
|
5821
|
+
"handle"
|
|
5506
5822
|
]);
|
|
5507
5823
|
super(__spreadValues$2({ effects: () => [...effects2(), () => {
|
|
5508
5824
|
var _a6, _b3;
|
|
@@ -5519,21 +5835,26 @@ var Draggable$1 = class extends (_c = Draggable$2, _handle_dec = [reactive], _el
|
|
|
5519
5835
|
}] }, input), manager);
|
|
5520
5836
|
__privateAdd$2(this, _handle, __runInitializers$2(_init5, 8, this)), __runInitializers$2(_init5, 11, this);
|
|
5521
5837
|
__privateAdd$2(this, _element$1, __runInitializers$2(_init5, 12, this)), __runInitializers$2(_init5, 15, this);
|
|
5522
|
-
__privateAdd$2(this, _feedback, __runInitializers$2(_init5, 16, this)), __runInitializers$2(_init5, 19, this);
|
|
5523
5838
|
this.element = element;
|
|
5524
5839
|
this.handle = handle;
|
|
5525
|
-
this.feedback = feedback;
|
|
5526
5840
|
}
|
|
5527
5841
|
};
|
|
5528
5842
|
_init5 = __decoratorStart$2(_c);
|
|
5529
5843
|
_handle = new WeakMap();
|
|
5530
5844
|
_element$1 = new WeakMap();
|
|
5531
|
-
_feedback = new WeakMap();
|
|
5532
5845
|
__decorateElement$2(_init5, 4, "handle", _handle_dec, Draggable$1, _handle);
|
|
5533
5846
|
__decorateElement$2(_init5, 4, "element", _element_dec, Draggable$1, _element$1);
|
|
5534
|
-
__decorateElement$2(_init5, 4, "feedback", _feedback_dec, Draggable$1, _feedback);
|
|
5535
5847
|
__decoratorMetadata$2(_init5, Draggable$1);
|
|
5536
|
-
var _proxy_dec
|
|
5848
|
+
var _proxy_dec;
|
|
5849
|
+
var _element_dec2;
|
|
5850
|
+
var _c2;
|
|
5851
|
+
var _init6;
|
|
5852
|
+
var _element2;
|
|
5853
|
+
var _d;
|
|
5854
|
+
var element_get;
|
|
5855
|
+
var element_set;
|
|
5856
|
+
var _Droppable_instances;
|
|
5857
|
+
var _proxy;
|
|
5537
5858
|
var Droppable = class extends (_c2 = Droppable$1, _element_dec2 = [reactive], _proxy_dec = [reactive], _c2) {
|
|
5538
5859
|
constructor(_a5, manager) {
|
|
5539
5860
|
var _b2 = _a5, { element, effects: effects2 = () => [] } = _b2, input = __objRest$2(_b2, ["element", "effects"]);
|
|
@@ -5546,7 +5867,7 @@ var Droppable = class extends (_c2 = Droppable$1, _element_dec2 = [reactive], _p
|
|
|
5546
5867
|
}
|
|
5547
5868
|
if (!manager2) return;
|
|
5548
5869
|
const updatedShape = new DOMRectangle(element2);
|
|
5549
|
-
const shape =
|
|
5870
|
+
const shape = f(() => this.shape);
|
|
5550
5871
|
if (updatedShape && (shape == null ? void 0 : shape.equals(updatedShape))) return shape;
|
|
5551
5872
|
this.shape = updatedShape;
|
|
5552
5873
|
return updatedShape;
|
|
@@ -5636,7 +5957,7 @@ function useDeepSignal(target, synchronous) {
|
|
|
5636
5957
|
let sync = false;
|
|
5637
5958
|
for (const entry of tracked.current) {
|
|
5638
5959
|
const [key] = entry;
|
|
5639
|
-
const value =
|
|
5960
|
+
const value = f(() => entry[1]);
|
|
5640
5961
|
const latestValue = target[key];
|
|
5641
5962
|
if (value !== latestValue) {
|
|
5642
5963
|
stale = true;
|
|
@@ -5644,7 +5965,10 @@ function useDeepSignal(target, synchronous) {
|
|
|
5644
5965
|
sync = (_a = synchronous == null ? void 0 : synchronous(key, value, latestValue)) != null ? _a : false;
|
|
5645
5966
|
}
|
|
5646
5967
|
}
|
|
5647
|
-
if (stale)
|
|
5968
|
+
if (stale) {
|
|
5969
|
+
if (sync) queueMicrotask(() => flushSync(forceUpdate));
|
|
5970
|
+
else forceUpdate();
|
|
5971
|
+
}
|
|
5648
5972
|
});
|
|
5649
5973
|
}, [target]);
|
|
5650
5974
|
return useMemo(() => target ? new Proxy(target, { get(target2, key) {
|
|
@@ -5696,7 +6020,8 @@ var __objRest$1 = (source, exclude) => {
|
|
|
5696
6020
|
}
|
|
5697
6021
|
return target;
|
|
5698
6022
|
};
|
|
5699
|
-
var
|
|
6023
|
+
var defaultManager = new DragDropManager();
|
|
6024
|
+
var DragDropContext = createContext(defaultManager);
|
|
5700
6025
|
var Renderer = memo(forwardRef(({ children }, ref) => {
|
|
5701
6026
|
const [transitionCount, setTransitionCount] = useState(0);
|
|
5702
6027
|
const rendering = useRef(null);
|
|
@@ -6201,17 +6526,21 @@ function arrayMove(array, from, to) {
|
|
|
6201
6526
|
newArray.splice(to, 0, newArray.splice(from, 1)[0]);
|
|
6202
6527
|
return newArray;
|
|
6203
6528
|
}
|
|
6529
|
+
function getRecordKey(items, id) {
|
|
6530
|
+
const key = String(id);
|
|
6531
|
+
return Object.prototype.hasOwnProperty.call(items, key) ? key : void 0;
|
|
6532
|
+
}
|
|
6204
6533
|
function hasSortableIndices(source) {
|
|
6205
6534
|
return "initialIndex" in source && typeof source.initialIndex === "number" && "index" in source && typeof source.index === "number";
|
|
6206
6535
|
}
|
|
6207
6536
|
function mutate(items, event, mutation) {
|
|
6208
|
-
var _a, _b
|
|
6537
|
+
var _a, _b;
|
|
6209
6538
|
const { source, target, canceled } = event.operation;
|
|
6210
6539
|
if (!source || !target || canceled) {
|
|
6211
6540
|
if ("preventDefault" in event) event.preventDefault();
|
|
6212
6541
|
return items;
|
|
6213
6542
|
}
|
|
6214
|
-
const findIndex = (item, id) => item === id || typeof item === "object" && "id" in item && item.id === id;
|
|
6543
|
+
const findIndex = (item, id) => item === id || item !== null && typeof item === "object" && "id" in item && item.id === id;
|
|
6215
6544
|
if (Array.isArray(items)) {
|
|
6216
6545
|
const sourceIndex2 = items.findIndex((item) => findIndex(item, source.id));
|
|
6217
6546
|
const targetIndex2 = items.findIndex((item) => findIndex(item, target.id));
|
|
@@ -6250,11 +6579,11 @@ function mutate(items, event, mutation) {
|
|
|
6250
6579
|
if (sourceIndex !== -1 && targetIndex !== -1) break;
|
|
6251
6580
|
}
|
|
6252
6581
|
if (sourceIndex === -1 && hasSortableIndices(source)) {
|
|
6253
|
-
const srcParent = source.initialGroup;
|
|
6582
|
+
const srcParent = source.initialGroup == null ? void 0 : getRecordKey(items, source.initialGroup);
|
|
6254
6583
|
const srcIndex = source.initialIndex;
|
|
6255
|
-
const tgtParent = source.group;
|
|
6584
|
+
const tgtParent = source.group == null ? void 0 : getRecordKey(items, source.group);
|
|
6256
6585
|
const tgtIndex = source.index;
|
|
6257
|
-
if (srcParent == null || tgtParent == null
|
|
6586
|
+
if (srcParent == null || tgtParent == null) {
|
|
6258
6587
|
if ("preventDefault" in event) event.preventDefault();
|
|
6259
6588
|
return items;
|
|
6260
6589
|
}
|
|
@@ -6277,19 +6606,21 @@ function mutate(items, event, mutation) {
|
|
|
6277
6606
|
const { dragOperation } = source.manager;
|
|
6278
6607
|
const position = (_b = (_a = dragOperation.shape) == null ? void 0 : _a.current.center) != null ? _b : dragOperation.position.current;
|
|
6279
6608
|
if (targetParent == null) {
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6609
|
+
const targetKey = getRecordKey(items, target.id);
|
|
6610
|
+
if (targetKey != null) {
|
|
6611
|
+
const insertionIndex = target.shape && position.y > target.shape.center.y ? items[targetKey].length : 0;
|
|
6612
|
+
targetParent = targetKey;
|
|
6283
6613
|
targetIndex = insertionIndex;
|
|
6284
6614
|
}
|
|
6285
6615
|
}
|
|
6286
6616
|
if (sourceParent == null || targetParent == null || sourceParent === targetParent && sourceIndex === targetIndex) {
|
|
6287
6617
|
if (sourceParent != null && sourceParent === targetParent && sourceIndex === targetIndex && hasSortableIndices(source)) {
|
|
6288
|
-
const
|
|
6618
|
+
const sourceGroupParent = source.group == null ? void 0 : getRecordKey(items, source.group);
|
|
6619
|
+
const hasGroupChanged = source.group != null && sourceGroupParent !== sourceParent;
|
|
6289
6620
|
const hasIndexChanged = source.index !== sourceIndex;
|
|
6290
6621
|
if (hasGroupChanged || hasIndexChanged) {
|
|
6291
|
-
const reconciledTargetParent =
|
|
6292
|
-
if (reconciledTargetParent
|
|
6622
|
+
const reconciledTargetParent = source.group == null ? sourceParent : sourceGroupParent;
|
|
6623
|
+
if (reconciledTargetParent != null) {
|
|
6293
6624
|
if (sourceParent === reconciledTargetParent) return __spreadProps2(__spreadValues2({}, items), { [sourceParent]: mutation(items[sourceParent], sourceIndex, source.index) });
|
|
6294
6625
|
const sourceItem2 = items[sourceParent][sourceIndex];
|
|
6295
6626
|
return __spreadProps2(__spreadValues2({}, items), {
|
|
@@ -6321,6 +6652,19 @@ function mutate(items, event, mutation) {
|
|
|
6321
6652
|
function move(items, event) {
|
|
6322
6653
|
return mutate(items, event, arrayMove);
|
|
6323
6654
|
}
|
|
6655
|
+
function getSortableIndices(instances) {
|
|
6656
|
+
const sortableIndices = new Map();
|
|
6657
|
+
for (const [, group] of instances) for (const sortable of group) sortableIndices.set(sortable.id, sortable.index);
|
|
6658
|
+
return sortableIndices;
|
|
6659
|
+
}
|
|
6660
|
+
function hasChanged(snapshotIndices, instances, newInstances) {
|
|
6661
|
+
var _a;
|
|
6662
|
+
for (const [group, sortables] of instances) for (const sortable of sortables) {
|
|
6663
|
+
const index = snapshotIndices.get(sortable.id);
|
|
6664
|
+
if (sortable.index !== index || sortable.group !== group || !((_a = newInstances.get(group)) == null ? void 0 : _a.has(sortable))) return true;
|
|
6665
|
+
}
|
|
6666
|
+
return false;
|
|
6667
|
+
}
|
|
6324
6668
|
var defaultGroup = "__default__";
|
|
6325
6669
|
var OptimisticSortingPlugin = class extends Plugin {
|
|
6326
6670
|
constructor(manager) {
|
|
@@ -6337,7 +6681,6 @@ var OptimisticSortingPlugin = class extends Plugin {
|
|
|
6337
6681
|
}
|
|
6338
6682
|
instances.add(sortable);
|
|
6339
6683
|
}
|
|
6340
|
-
for (const [group, instances] of sortableInstances) sortableInstances.set(group, new Set(sort(instances)));
|
|
6341
6684
|
return sortableInstances;
|
|
6342
6685
|
};
|
|
6343
6686
|
const unsubscribe = [manager.monitor.addEventListener("dragover", (event, manager2) => {
|
|
@@ -6347,6 +6690,7 @@ var OptimisticSortingPlugin = class extends Plugin {
|
|
|
6347
6690
|
if (!isSortable(source) || !isSortable(target)) return;
|
|
6348
6691
|
if (source.sortable === target.sortable) return;
|
|
6349
6692
|
const instances = getSortableInstances();
|
|
6693
|
+
const sortableIndices = getSortableIndices(instances);
|
|
6350
6694
|
const sameGroup = source.sortable.group === target.sortable.group;
|
|
6351
6695
|
const sourceInstances = instances.get(source.sortable.group);
|
|
6352
6696
|
const targetInstances = sameGroup ? sourceInstances : instances.get(target.sortable.group);
|
|
@@ -6354,20 +6698,17 @@ var OptimisticSortingPlugin = class extends Plugin {
|
|
|
6354
6698
|
queueMicrotask(() => {
|
|
6355
6699
|
if (event.defaultPrevented) return;
|
|
6356
6700
|
manager2.renderer.rendering.then(() => {
|
|
6357
|
-
var _a, _b
|
|
6701
|
+
var _a, _b;
|
|
6358
6702
|
const newInstances = getSortableInstances();
|
|
6359
|
-
|
|
6360
|
-
const entries = Array.from(sortableInstances).entries();
|
|
6361
|
-
for (const [index, sortable] of entries) if (sortable.index !== index || sortable.group !== group || !((_a = newInstances.get(group)) == null ? void 0 : _a.has(sortable))) return;
|
|
6362
|
-
}
|
|
6703
|
+
if (hasChanged(sortableIndices, instances, newInstances)) return;
|
|
6363
6704
|
const sourceElement = source.sortable.element;
|
|
6364
6705
|
const targetElement = target.sortable.element;
|
|
6365
6706
|
if (!targetElement || !sourceElement) return;
|
|
6366
6707
|
if (!sameGroup && target.id === source.sortable.group) return;
|
|
6367
6708
|
const orderedSourceSortables = sort(sourceInstances);
|
|
6368
6709
|
const orderedTargetSortables = sameGroup ? orderedSourceSortables : sort(targetInstances);
|
|
6369
|
-
const sourceGroup = (
|
|
6370
|
-
const targetGroup = (
|
|
6710
|
+
const sourceGroup = (_a = source.sortable.group) != null ? _a : defaultGroup;
|
|
6711
|
+
const targetGroup = (_b = target.sortable.group) != null ? _b : defaultGroup;
|
|
6371
6712
|
const state = {
|
|
6372
6713
|
[sourceGroup]: orderedSourceSortables,
|
|
6373
6714
|
[targetGroup]: orderedTargetSortables
|
|
@@ -6396,21 +6737,21 @@ var OptimisticSortingPlugin = class extends Plugin {
|
|
|
6396
6737
|
if (source.sortable.initialIndex === source.sortable.index && source.sortable.initialGroup === source.sortable.group) return;
|
|
6397
6738
|
queueMicrotask(() => {
|
|
6398
6739
|
const instances = getSortableInstances();
|
|
6740
|
+
const sortableIndices = getSortableIndices(instances);
|
|
6399
6741
|
const initialGroupInstances = instances.get(source.sortable.initialGroup);
|
|
6400
6742
|
if (!initialGroupInstances) return;
|
|
6401
6743
|
manager2.renderer.rendering.then(() => {
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
const initialGroup = sort(initialGroupInstances);
|
|
6744
|
+
const newInstances = getSortableInstances();
|
|
6745
|
+
if (hasChanged(sortableIndices, instances, newInstances)) return;
|
|
6746
|
+
const currentSortables = sort(initialGroupInstances);
|
|
6747
|
+
const initialSortables = sort(initialGroupInstances, sortByInitialIndex);
|
|
6407
6748
|
const sourceElement = source.sortable.element;
|
|
6408
|
-
const target =
|
|
6749
|
+
const target = currentSortables[initialSortables.indexOf(source.sortable)];
|
|
6409
6750
|
const targetElement = target == null ? void 0 : target.element;
|
|
6410
6751
|
if (!target || !targetElement || !sourceElement) return;
|
|
6411
6752
|
reorder(sourceElement, target.index, targetElement, source.index);
|
|
6412
6753
|
n(() => {
|
|
6413
|
-
for (const
|
|
6754
|
+
for (const sortableInstances of instances.values()) {
|
|
6414
6755
|
const entries = Array.from(sortableInstances).values();
|
|
6415
6756
|
for (const sortable of entries) {
|
|
6416
6757
|
sortable.index = sortable.initialIndex;
|
|
@@ -6433,8 +6774,11 @@ function reorder(sourceElement, sourceIndex, targetElement, targetIndex) {
|
|
|
6433
6774
|
function sortByIndex(a, b) {
|
|
6434
6775
|
return a.index - b.index;
|
|
6435
6776
|
}
|
|
6436
|
-
function
|
|
6437
|
-
return
|
|
6777
|
+
function sortByInitialIndex(a, b) {
|
|
6778
|
+
return a.initialIndex - b.initialIndex;
|
|
6779
|
+
}
|
|
6780
|
+
function sort(instances, sortFn = sortByIndex) {
|
|
6781
|
+
return Array.from(instances).sort(sortFn);
|
|
6438
6782
|
}
|
|
6439
6783
|
var defaultPlugins = [SortableKeyboardPlugin, OptimisticSortingPlugin];
|
|
6440
6784
|
var defaultSortableTransition = {
|
|
@@ -6442,8 +6786,26 @@ var defaultSortableTransition = {
|
|
|
6442
6786
|
easing: "cubic-bezier(0.25, 1, 0.5, 1)",
|
|
6443
6787
|
idle: false
|
|
6444
6788
|
};
|
|
6789
|
+
function normalizeDisabled(disabled) {
|
|
6790
|
+
var _a, _b;
|
|
6791
|
+
if (typeof disabled === "boolean") return {
|
|
6792
|
+
draggable: disabled,
|
|
6793
|
+
droppable: disabled
|
|
6794
|
+
};
|
|
6795
|
+
return {
|
|
6796
|
+
draggable: (_a = disabled == null ? void 0 : disabled.draggable) != null ? _a : false,
|
|
6797
|
+
droppable: (_b = disabled == null ? void 0 : disabled.droppable) != null ? _b : false
|
|
6798
|
+
};
|
|
6799
|
+
}
|
|
6445
6800
|
var store = new WeakStore();
|
|
6446
|
-
var _group_dec
|
|
6801
|
+
var _group_dec;
|
|
6802
|
+
var _index_dec = [reactive];
|
|
6803
|
+
var _init;
|
|
6804
|
+
var _index;
|
|
6805
|
+
var _previousGroup;
|
|
6806
|
+
var _previousIndex;
|
|
6807
|
+
var _group;
|
|
6808
|
+
var _element;
|
|
6447
6809
|
_group_dec = [reactive];
|
|
6448
6810
|
var Sortable2 = class {
|
|
6449
6811
|
constructor(_a, manager) {
|
|
@@ -6473,8 +6835,9 @@ var Sortable2 = class {
|
|
|
6473
6835
|
this.draggable.destroy();
|
|
6474
6836
|
});
|
|
6475
6837
|
};
|
|
6476
|
-
var _b = _a, { effects: inputEffects = () => [], group, index, sensors, type, transition = defaultSortableTransition, plugins
|
|
6838
|
+
var _b = _a, { effects: inputEffects = () => [], disabled, group, index, sensors, type, transition = defaultSortableTransition, plugins: pluginsInput } = _b, input = __objRest(_b, [
|
|
6477
6839
|
"effects",
|
|
6840
|
+
"disabled",
|
|
6478
6841
|
"group",
|
|
6479
6842
|
"index",
|
|
6480
6843
|
"sensors",
|
|
@@ -6482,14 +6845,18 @@ var Sortable2 = class {
|
|
|
6482
6845
|
"transition",
|
|
6483
6846
|
"plugins"
|
|
6484
6847
|
]);
|
|
6485
|
-
|
|
6848
|
+
const plugins = resolveCustomizable(pluginsInput, defaultPlugins);
|
|
6849
|
+
const disabledState = normalizeDisabled(disabled);
|
|
6850
|
+
this.droppable = new SortableDroppable(__spreadProps$1(__spreadValues$1({}, input), { disabled: disabledState.droppable }), manager, this);
|
|
6486
6851
|
this.draggable = new SortableDraggable(__spreadProps$1(__spreadValues$1({}, input), {
|
|
6852
|
+
disabled: disabledState.draggable,
|
|
6853
|
+
plugins,
|
|
6487
6854
|
effects: () => [
|
|
6488
6855
|
() => {
|
|
6489
6856
|
var _a2, _b2, _c;
|
|
6490
6857
|
const status = (_a2 = this.manager) == null ? void 0 : _a2.dragOperation.status;
|
|
6491
6858
|
if ((status == null ? void 0 : status.initializing) && this.id === ((_c = (_b2 = this.manager) == null ? void 0 : _b2.dragOperation.source) == null ? void 0 : _c.id)) store.clear(this.manager);
|
|
6492
|
-
if (status == null ? void 0 : status.dragging) store.set(this.manager, this.id,
|
|
6859
|
+
if (status == null ? void 0 : status.dragging) store.set(this.manager, this.id, f(() => ({
|
|
6493
6860
|
initialIndex: this.index,
|
|
6494
6861
|
initialGroup: this.group
|
|
6495
6862
|
})));
|
|
@@ -6505,13 +6872,10 @@ var Sortable2 = class {
|
|
|
6505
6872
|
}
|
|
6506
6873
|
},
|
|
6507
6874
|
() => {
|
|
6875
|
+
var _a2, _b2;
|
|
6508
6876
|
const { target } = this;
|
|
6509
|
-
const {
|
|
6510
|
-
if (
|
|
6511
|
-
},
|
|
6512
|
-
() => {
|
|
6513
|
-
const { manager: manager2 } = this;
|
|
6514
|
-
for (const plugin of plugins) manager2?.registry.register(plugin);
|
|
6877
|
+
const { isDragSource } = this.draggable;
|
|
6878
|
+
if (((_b2 = (_a2 = this.draggable.pluginConfig(Feedback)) == null ? void 0 : _a2.feedback) != null ? _b2 : "default") === "move" && isDragSource) this.droppable.disabled = !target;
|
|
6515
6879
|
},
|
|
6516
6880
|
...inputEffects()
|
|
6517
6881
|
],
|
|
@@ -6536,7 +6900,7 @@ var Sortable2 = class {
|
|
|
6536
6900
|
return (_b = (_a = store.get(this.manager, this.id)) == null ? void 0 : _a.initialGroup) != null ? _b : this.group;
|
|
6537
6901
|
}
|
|
6538
6902
|
animate() {
|
|
6539
|
-
|
|
6903
|
+
f(() => {
|
|
6540
6904
|
const { manager, transition } = this;
|
|
6541
6905
|
const { shape } = this.droppable;
|
|
6542
6906
|
if (!manager) return;
|
|
@@ -6545,6 +6909,7 @@ var Sortable2 = class {
|
|
|
6545
6909
|
manager.renderer.rendering.then(() => {
|
|
6546
6910
|
const { element } = this;
|
|
6547
6911
|
if (!element) return;
|
|
6912
|
+
for (const animation of element.getAnimations()) if ("transitionProperty" in animation && (animation.transitionProperty === "transform" || animation.transitionProperty === "translate" || animation.transitionProperty === "scale")) animation.cancel();
|
|
6548
6913
|
const updatedShape = this.refreshShape();
|
|
6549
6914
|
if (!updatedShape) return;
|
|
6550
6915
|
const delta = {
|
|
@@ -6605,15 +6970,21 @@ var Sortable2 = class {
|
|
|
6605
6970
|
return this.draggable.element;
|
|
6606
6971
|
}
|
|
6607
6972
|
get disabled() {
|
|
6608
|
-
|
|
6973
|
+
const { disabled: draggable } = this.draggable;
|
|
6974
|
+
const { disabled: droppable } = this.droppable;
|
|
6975
|
+
return draggable === droppable ? draggable : {
|
|
6976
|
+
draggable,
|
|
6977
|
+
droppable
|
|
6978
|
+
};
|
|
6609
6979
|
}
|
|
6610
|
-
set
|
|
6611
|
-
this.draggable.
|
|
6980
|
+
set plugins(value) {
|
|
6981
|
+
this.draggable.plugins = resolveCustomizable(value, defaultPlugins);
|
|
6612
6982
|
}
|
|
6613
6983
|
set disabled(value) {
|
|
6984
|
+
const disabled = normalizeDisabled(value);
|
|
6614
6985
|
n(() => {
|
|
6615
|
-
this.droppable.disabled =
|
|
6616
|
-
this.draggable.disabled =
|
|
6986
|
+
this.droppable.disabled = disabled.droppable;
|
|
6987
|
+
this.draggable.disabled = disabled.draggable;
|
|
6617
6988
|
});
|
|
6618
6989
|
}
|
|
6619
6990
|
set data(data) {
|
|
@@ -6626,10 +6997,8 @@ var Sortable2 = class {
|
|
|
6626
6997
|
this.draggable.handle = handle;
|
|
6627
6998
|
}
|
|
6628
6999
|
set id(id) {
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
this.draggable.id = id;
|
|
6632
|
-
});
|
|
7000
|
+
this.droppable.id = id;
|
|
7001
|
+
this.draggable.id = id;
|
|
6633
7002
|
}
|
|
6634
7003
|
get id() {
|
|
6635
7004
|
return this.droppable.id;
|
|
@@ -6760,7 +7129,7 @@ var __spreadValues = (a, b) => {
|
|
|
6760
7129
|
};
|
|
6761
7130
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
6762
7131
|
function useSortable(input) {
|
|
6763
|
-
const { accept, collisionDetector, collisionPriority, id, data, element, handle, index, group, disabled,
|
|
7132
|
+
const { accept, collisionDetector, collisionPriority, id, data, element, handle, index, group, disabled, modifiers, sensors, target, type, plugins } = input;
|
|
6764
7133
|
const transition = __spreadValues(__spreadValues({}, defaultSortableTransition), input.transition);
|
|
6765
7134
|
const sortable = useInstance((manager) => {
|
|
6766
7135
|
return new Sortable2(__spreadProps(__spreadValues({}, input), {
|
|
@@ -6768,8 +7137,7 @@ function useSortable(input) {
|
|
|
6768
7137
|
register: false,
|
|
6769
7138
|
handle: currentValue(handle),
|
|
6770
7139
|
element: currentValue(element),
|
|
6771
|
-
target: currentValue(target)
|
|
6772
|
-
feedback
|
|
7140
|
+
target: currentValue(target)
|
|
6773
7141
|
}), manager);
|
|
6774
7142
|
});
|
|
6775
7143
|
const trackedSortable = useDeepSignal(sortable, shouldUpdateSynchronously);
|
|
@@ -6794,11 +7162,11 @@ function useSortable(input) {
|
|
|
6794
7162
|
useOnElementChange(handle, (handle2) => sortable.handle = handle2);
|
|
6795
7163
|
useOnElementChange(element, (element2) => sortable.element = element2);
|
|
6796
7164
|
useOnElementChange(target, (target2) => sortable.target = target2);
|
|
6797
|
-
useOnValueChange(disabled, () => sortable.disabled = disabled
|
|
6798
|
-
useOnValueChange(sensors, () => sortable.sensors = sensors);
|
|
7165
|
+
useOnValueChange(disabled, () => sortable.disabled = disabled != null ? disabled : false, void 0, deepEqual);
|
|
7166
|
+
useOnValueChange(sensors, () => sortable.sensors = sensors, void 0, deepEqual);
|
|
6799
7167
|
useOnValueChange(collisionDetector, () => sortable.collisionDetector = collisionDetector);
|
|
6800
7168
|
useOnValueChange(collisionPriority, () => sortable.collisionPriority = collisionPriority);
|
|
6801
|
-
useOnValueChange(
|
|
7169
|
+
useOnValueChange(plugins, () => sortable.plugins = plugins, void 0, deepEqual);
|
|
6802
7170
|
useOnValueChange(transition, () => sortable.transition = transition, void 0, deepEqual);
|
|
6803
7171
|
useOnValueChange(modifiers, () => sortable.modifiers = modifiers, void 0, deepEqual);
|
|
6804
7172
|
useOnValueChange(input.alignment, () => sortable.alignment = input.alignment);
|
|
@@ -6842,10 +7210,15 @@ function shouldUpdateSynchronously(key, oldValue, newValue) {
|
|
|
6842
7210
|
}
|
|
6843
7211
|
//#endregion
|
|
6844
7212
|
//#region lib/components/draggable/draggable.tsx
|
|
7213
|
+
var isNumberValue = (value) => Object.prototype.toString.call(value) === "[object Number]";
|
|
7214
|
+
var mergeItem = (item, newValue) => ({
|
|
7215
|
+
...item,
|
|
7216
|
+
...newValue
|
|
7217
|
+
});
|
|
6845
7218
|
var getSortableIndexes = (event) => {
|
|
6846
7219
|
const oldIndex = event.operation?.source?.sortable?.initialIndex;
|
|
6847
7220
|
const newIndex = event.operation?.source?.sortable?.index;
|
|
6848
|
-
if (
|
|
7221
|
+
if (!isNumberValue(oldIndex) || !isNumberValue(newIndex)) return null;
|
|
6849
7222
|
return {
|
|
6850
7223
|
oldIndex,
|
|
6851
7224
|
newIndex
|
|
@@ -6904,12 +7277,14 @@ var SortableItem = ({ id, index, disabled, children, axis }) => {
|
|
|
6904
7277
|
var Draggable = (props) => {
|
|
6905
7278
|
const { children, items, onChange, noReorder, axis = "both", className, onAfterItemRemove, hidden, ...rest } = props;
|
|
6906
7279
|
const normalizedItems = useMemo(() => Array.isArray(items) ? items : [], [items]);
|
|
6907
|
-
if (
|
|
7280
|
+
if (items === void 0 || items === null || !Array.isArray(items)) console.warn(__("Draggable: 'items' are not an array or are undefined!", "eightshift-ui-components"));
|
|
6908
7281
|
const [internalIds, setInternalIds] = useState(normalizedItems.map((_, itemIndex) => itemIndex));
|
|
6909
7282
|
useEffect(() => {
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
7283
|
+
queueMicrotask(() => {
|
|
7284
|
+
setInternalIds((currentIds) => {
|
|
7285
|
+
if (normalizedItems.length === currentIds.length) return currentIds;
|
|
7286
|
+
return normalizedItems.map((_, itemIndex) => itemIndex);
|
|
7287
|
+
});
|
|
6913
7288
|
});
|
|
6914
7289
|
}, [normalizedItems]);
|
|
6915
7290
|
if (hidden) return null;
|
|
@@ -6939,11 +7314,7 @@ var Draggable = (props) => {
|
|
|
6939
7314
|
children: children({
|
|
6940
7315
|
...item,
|
|
6941
7316
|
updateData: (newValue) => {
|
|
6942
|
-
const updated =
|
|
6943
|
-
updated[itemIndex] = {
|
|
6944
|
-
...updated[itemIndex],
|
|
6945
|
-
...newValue
|
|
6946
|
-
};
|
|
7317
|
+
const updated = normalizedItems.map((currentItem, index) => index === itemIndex ? mergeItem(currentItem, newValue) : currentItem);
|
|
6947
7318
|
onChange(updated);
|
|
6948
7319
|
},
|
|
6949
7320
|
itemIndex,
|