@vkzstudio/muza-ui 1.0.8 → 1.0.10
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/components/Button/Button.js +19 -19
- package/dist/components/Button/ButtonLoader.d.ts +7 -0
- package/dist/components/Button/ButtonLoader.d.ts.map +1 -0
- package/dist/components/Button/ButtonLoader.js +40 -0
- package/dist/components/Button/buttonVariants.d.ts.map +1 -1
- package/dist/components/Button/buttonVariants.js +0 -1
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.d.ts +1 -0
- package/dist/components/Icons/CustomIcons.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.js +39 -28
- package/dist/components/ReorderableTable/ReorderableTable.js +1 -1
- package/dist/components/SwipeButton/SwipeButton.js +1 -1
- package/dist/components/TextEditor/EditorToolbar.d.ts +18 -0
- package/dist/components/TextEditor/EditorToolbar.d.ts.map +1 -0
- package/dist/components/TextEditor/EditorToolbar.js +175 -0
- package/dist/components/TextEditor/LinkBubbleMenu.d.ts +52 -0
- package/dist/components/TextEditor/LinkBubbleMenu.d.ts.map +1 -0
- package/dist/components/TextEditor/LinkBubbleMenu.js +97 -0
- package/dist/components/TextEditor/TextEditor.d.ts +134 -0
- package/dist/components/TextEditor/TextEditor.d.ts.map +1 -0
- package/dist/components/TextEditor/TextEditor.js +240 -0
- package/dist/components/TextEditor/TextEditor.stories.d.ts +51 -0
- package/dist/components/TextEditor/TextEditor.stories.d.ts.map +1 -0
- package/dist/components/TextEditor/ToolbarButton.d.ts +38 -0
- package/dist/components/TextEditor/ToolbarButton.d.ts.map +1 -0
- package/dist/components/TextEditor/ToolbarButton.js +68 -0
- package/dist/components/TextEditor/ToolbarSeparator.d.ts +22 -0
- package/dist/components/TextEditor/ToolbarSeparator.d.ts.map +1 -0
- package/dist/components/TextEditor/ToolbarSeparator.js +23 -0
- package/dist/components/TextEditor/index.d.ts +4 -0
- package/dist/components/TextEditor/index.d.ts.map +1 -0
- package/dist/components/TextEditor/useLinkEditor.d.ts +37 -0
- package/dist/components/TextEditor/useLinkEditor.d.ts.map +1 -0
- package/dist/components/TextEditor/useLinkEditor.js +32 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.js +140 -132
- package/dist/muza-ui.css +1 -1
- package/dist/node_modules/@popperjs/core/lib/createPopper.js +122 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/contains.js +18 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js +23 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js +37 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js +32 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js +7 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js +10 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js +17 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +9 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js +13 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js +10 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js +35 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js +18 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js +10 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js +21 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindow.js +12 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js +11 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js +9 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js +20 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js +7 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js +8 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js +7 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js +16 -0
- package/dist/node_modules/@popperjs/core/lib/enums.js +31 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/applyStyles.js +47 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/arrow.js +37 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/computeStyles.js +99 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/eventListeners.js +26 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/flip.js +74 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/hide.js +44 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/offset.js +31 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js +19 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js +54 -0
- package/dist/node_modules/@popperjs/core/lib/popper.js +27 -0
- package/dist/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js +27 -0
- package/dist/node_modules/@popperjs/core/lib/utils/computeOffsets.js +54 -0
- package/dist/node_modules/@popperjs/core/lib/utils/debounce.js +13 -0
- package/dist/node_modules/@popperjs/core/lib/utils/detectOverflow.js +33 -0
- package/dist/node_modules/@popperjs/core/lib/utils/expandToHashMap.js +8 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getAltAxis.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getBasePlacement.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +11 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +14 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +12 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getVariation.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/utils/math.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/utils/mergeByName.js +15 -0
- package/dist/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js +7 -0
- package/dist/node_modules/@popperjs/core/lib/utils/orderModifiers.js +31 -0
- package/dist/node_modules/@popperjs/core/lib/utils/rectToClientRect.js +11 -0
- package/dist/node_modules/@popperjs/core/lib/utils/userAgent.js +9 -0
- package/dist/node_modules/@popperjs/core/lib/utils/within.js +12 -0
- package/dist/node_modules/@tiptap/core/dist/index.js +2857 -0
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +45 -0
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js +76 -0
- package/dist/node_modules/@tiptap/extension-bubble-menu/dist/index.js +129 -0
- package/dist/node_modules/@tiptap/extension-bullet-list/dist/index.js +55 -0
- package/dist/node_modules/@tiptap/extension-code/dist/index.js +54 -0
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +136 -0
- package/dist/node_modules/@tiptap/extension-document/dist/index.js +10 -0
- package/dist/node_modules/@tiptap/extension-dropcursor/dist/index.js +21 -0
- package/dist/node_modules/@tiptap/extension-gapcursor/dist/index.js +25 -0
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +56 -0
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +55 -0
- package/dist/node_modules/@tiptap/extension-history/dist/index.js +36 -0
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +59 -0
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js +75 -0
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +272 -0
- package/dist/node_modules/@tiptap/extension-list-item/dist/index.js +34 -0
- package/dist/node_modules/@tiptap/extension-ordered-list/dist/index.js +73 -0
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +34 -0
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +53 -0
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js +64 -0
- package/dist/node_modules/@tiptap/extension-text/dist/index.js +9 -0
- package/dist/node_modules/@tiptap/react/dist/index.js +709 -0
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js +30 -0
- package/dist/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/animation/animate/subject.js +24 -24
- package/dist/node_modules/framer-motion/dist/es/animation/sequence/create.js +61 -56
- package/dist/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.js +8 -8
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +32 -30
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +22 -22
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +34 -32
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/Group.js +34 -26
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/Item.js +30 -25
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.js +64 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +2 -2
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +3 -3
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +100 -89
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +11 -7
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +2 -2
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +106 -59
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +6 -6
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +5 -5
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +18 -6
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +27 -42
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +10 -7
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +49 -49
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +18 -13
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +41 -40
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +13 -13
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +6 -6
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +12 -12
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +3 -3
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +7 -7
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +5 -5
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/value/use-transform.js +26 -18
- package/dist/node_modules/linkifyjs/dist/linkify.js +707 -0
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +33 -30
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +17 -17
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +20 -19
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +10 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/motion-value.js +13 -13
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-target.js +11 -11
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +24 -20
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/default-transitions.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +7 -3
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/animation/mix-values.js +2 -2
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-apply.js +4 -4
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-calc.js +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-remove.js +6 -6
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/DocumentProjectionNode.js +7 -4
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/create-projection-node.js +149 -149
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +60 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-border-radius.js +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-box-shadow.js +2 -2
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +21 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/VisualElement.js +58 -50
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/dom/DOMVisualElement.js +7 -6
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +38 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +40 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +15 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/animation-state.js +31 -31
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-controlling-variants.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +9 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/motion-values.js +6 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +15 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/setters.js +4 -4
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/delay.js +2 -2
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +8 -6
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +62 -42
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/errors.js +10 -9
- package/dist/node_modules/orderedmap/dist/index.js +103 -0
- package/dist/node_modules/prosemirror-commands/dist/index.js +388 -0
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js +86 -0
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js +204 -0
- package/dist/node_modules/prosemirror-history/dist/index.js +248 -0
- package/dist/node_modules/prosemirror-keymap/dist/index.js +62 -0
- package/dist/node_modules/prosemirror-model/dist/index.js +2733 -0
- package/dist/node_modules/prosemirror-schema-list/dist/index.js +88 -0
- package/dist/node_modules/prosemirror-state/dist/index.js +822 -0
- package/dist/node_modules/prosemirror-transform/dist/index.js +1520 -0
- package/dist/node_modules/prosemirror-view/dist/index.js +3794 -0
- package/dist/node_modules/rope-sequence/dist/index.js +100 -0
- package/dist/node_modules/tippy.js/dist/tippy.esm.js +813 -0
- package/dist/node_modules/w3c-keyname/index.js +93 -0
- package/dist/translations/locales/cs.d.ts.map +1 -1
- package/dist/translations/locales/cs.js +18 -0
- package/dist/translations/locales/en.d.ts.map +1 -1
- package/dist/translations/locales/en.js +18 -0
- package/dist/translations/locales/sk.d.ts.map +1 -1
- package/dist/translations/locales/sk.js +18 -0
- package/dist/translations/types.d.ts +22 -0
- package/dist/translations/types.d.ts.map +1 -1
- package/package.json +17 -1
- package/dist/node_modules/framer-motion/dist/es/animation/animate/single-value.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/projection/shared/stack.js +0 -58
- package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-correction.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.js +0 -38
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.js +0 -29
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.js +0 -31
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js +0 -12
- package/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.js +0 -40
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js +0 -23
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.js +0 -18
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/value/use-will-change/is.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js +0 -7
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-variant.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/data-id.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/get-appear-id.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/calc-child-stagger.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation/animators/waapi → motion-dom/dist/es/animation}/utils/get-final-keyframe.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/is-transition-defined.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/events/add-dom-event.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/conversion.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/copy.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/models.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/utils.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/HTMLProjectionNode.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/state.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/transform.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/compare-by-depth.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/each-axis.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/flat-tree.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/has-transform.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/measure.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/motion/features → motion-dom/dist/es/render}/Feature.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/html/utils/render.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/object/ObjectVisualElement.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/store.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/camel-case-attrs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/is-svg-tag.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/render.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/get-variant-context.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-animation-controls.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-keyframes-target.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-variant-label.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/reduced-motion/state.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-dynamic-variants.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-variants.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/shallow-compare.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/variant-props.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/value/use-will-change → motion-dom/dist/es/value/will-change}/add-will-change.js +0 -0
|
@@ -1,84 +1,131 @@
|
|
|
1
|
-
import { addPointerEvent as
|
|
2
|
-
import { extractEventInfo as
|
|
3
|
-
import { distance2D as
|
|
4
|
-
import { frameData as
|
|
5
|
-
import { isPrimaryPointer as
|
|
6
|
-
import { pipe as
|
|
7
|
-
import { secondsToMilliseconds as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { addPointerEvent as v } from "../../events/add-pointer-event.js";
|
|
2
|
+
import { extractEventInfo as W } from "../../events/event-info.js";
|
|
3
|
+
import { distance2D as D } from "../../utils/distance.js";
|
|
4
|
+
import { frameData as P, frame as x, cancelFrame as k } from "../../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
5
|
+
import { isPrimaryPointer as U } from "../../../../../motion-dom/dist/es/gestures/utils/is-primary-pointer.js";
|
|
6
|
+
import { pipe as X } from "../../../../../motion-utils/dist/es/pipe.js";
|
|
7
|
+
import { secondsToMilliseconds as Y, millisecondsToSeconds as O } from "../../../../../motion-utils/dist/es/time-conversion.js";
|
|
8
|
+
const S = /* @__PURE__ */ new Set(["auto", "scroll"]);
|
|
9
|
+
class B {
|
|
10
|
+
constructor(t, i, { transformPagePoint: s, contextWindow: r = window, dragSnapToOrigin: o = !1, distanceThreshold: l = 3, element: p } = {}) {
|
|
11
|
+
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.removeScrollListeners = null, this.onElementScroll = (e) => {
|
|
12
|
+
this.handleScroll(e.target);
|
|
13
|
+
}, this.onWindowScroll = () => {
|
|
14
|
+
this.handleScroll(window);
|
|
15
|
+
}, this.updatePoint = () => {
|
|
11
16
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
12
17
|
return;
|
|
13
|
-
const
|
|
14
|
-
if (!
|
|
18
|
+
const e = u(this.lastMoveEventInfo, this.history), h = this.startEvent !== null, c = D(e.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
|
|
19
|
+
if (!h && !c)
|
|
15
20
|
return;
|
|
16
|
-
const { point:
|
|
17
|
-
this.history.push({ ...
|
|
18
|
-
const { onStart:
|
|
19
|
-
|
|
20
|
-
}, this.handlePointerMove = (
|
|
21
|
-
this.lastMoveEvent =
|
|
22
|
-
}, this.handlePointerUp = (
|
|
21
|
+
const { point: d } = e, { timestamp: f } = P;
|
|
22
|
+
this.history.push({ ...d, timestamp: f });
|
|
23
|
+
const { onStart: a, onMove: E } = this.handlers;
|
|
24
|
+
h || (a && a(this.lastMoveEvent, e), this.startEvent = this.lastMoveEvent), E && E(this.lastMoveEvent, e);
|
|
25
|
+
}, this.handlePointerMove = (e, h) => {
|
|
26
|
+
this.lastMoveEvent = e, this.lastMoveEventInfo = m(h, this.transformPagePoint), x.update(this.updatePoint, !0);
|
|
27
|
+
}, this.handlePointerUp = (e, h) => {
|
|
23
28
|
this.end();
|
|
24
|
-
const { onEnd: c, onSessionEnd:
|
|
25
|
-
if (this.dragSnapToOrigin &&
|
|
29
|
+
const { onEnd: c, onSessionEnd: d, resumeAnimation: f } = this.handlers;
|
|
30
|
+
if ((this.dragSnapToOrigin || !this.startEvent) && f && f(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
26
31
|
return;
|
|
27
|
-
const
|
|
28
|
-
this.startEvent && c && c(
|
|
29
|
-
}, !
|
|
32
|
+
const a = u(e.type === "pointercancel" ? this.lastMoveEventInfo : m(h, this.transformPagePoint), this.history);
|
|
33
|
+
this.startEvent && c && c(e, a), d && d(e, a);
|
|
34
|
+
}, !U(t))
|
|
30
35
|
return;
|
|
31
|
-
this.dragSnapToOrigin =
|
|
32
|
-
const g =
|
|
33
|
-
this.history = [{ ...
|
|
34
|
-
const { onSessionStart:
|
|
35
|
-
|
|
36
|
+
this.dragSnapToOrigin = o, this.handlers = i, this.transformPagePoint = s, this.distanceThreshold = l, this.contextWindow = r || window;
|
|
37
|
+
const g = W(t), w = m(g, this.transformPagePoint), { point: L } = w, { timestamp: T } = P;
|
|
38
|
+
this.history = [{ ...L, timestamp: T }];
|
|
39
|
+
const { onSessionStart: y } = i;
|
|
40
|
+
y && y(t, u(w, this.history)), this.removeListeners = X(v(this.contextWindow, "pointermove", this.handlePointerMove), v(this.contextWindow, "pointerup", this.handlePointerUp), v(this.contextWindow, "pointercancel", this.handlePointerUp)), p && this.startScrollTracking(p);
|
|
36
41
|
}
|
|
37
|
-
|
|
38
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Start tracking scroll on ancestors and window.
|
|
44
|
+
*/
|
|
45
|
+
startScrollTracking(t) {
|
|
46
|
+
let i = t.parentElement;
|
|
47
|
+
for (; i; ) {
|
|
48
|
+
const s = getComputedStyle(i);
|
|
49
|
+
(S.has(s.overflowX) || S.has(s.overflowY)) && this.scrollPositions.set(i, {
|
|
50
|
+
x: i.scrollLeft,
|
|
51
|
+
y: i.scrollTop
|
|
52
|
+
}), i = i.parentElement;
|
|
53
|
+
}
|
|
54
|
+
this.scrollPositions.set(window, {
|
|
55
|
+
x: window.scrollX,
|
|
56
|
+
y: window.scrollY
|
|
57
|
+
}), window.addEventListener("scroll", this.onElementScroll, {
|
|
58
|
+
capture: !0,
|
|
59
|
+
passive: !0
|
|
60
|
+
}), window.addEventListener("scroll", this.onWindowScroll, {
|
|
61
|
+
passive: !0
|
|
62
|
+
}), this.removeScrollListeners = () => {
|
|
63
|
+
window.removeEventListener("scroll", this.onElementScroll, {
|
|
64
|
+
capture: !0
|
|
65
|
+
}), window.removeEventListener("scroll", this.onWindowScroll);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Handle scroll compensation during drag.
|
|
70
|
+
*
|
|
71
|
+
* For element scroll: adjusts history origin since pageX/pageY doesn't change.
|
|
72
|
+
* For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change.
|
|
73
|
+
*/
|
|
74
|
+
handleScroll(t) {
|
|
75
|
+
const i = this.scrollPositions.get(t);
|
|
76
|
+
if (!i)
|
|
77
|
+
return;
|
|
78
|
+
const s = t === window, r = s ? { x: window.scrollX, y: window.scrollY } : {
|
|
79
|
+
x: t.scrollLeft,
|
|
80
|
+
y: t.scrollTop
|
|
81
|
+
}, o = { x: r.x - i.x, y: r.y - i.y };
|
|
82
|
+
o.x === 0 && o.y === 0 || (s ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += o.x, this.lastMoveEventInfo.point.y += o.y) : this.history.length > 0 && (this.history[0].x -= o.x, this.history[0].y -= o.y), this.scrollPositions.set(t, r), x.update(this.updatePoint, !0));
|
|
83
|
+
}
|
|
84
|
+
updateHandlers(t) {
|
|
85
|
+
this.handlers = t;
|
|
39
86
|
}
|
|
40
87
|
end() {
|
|
41
|
-
this.removeListeners && this.removeListeners(),
|
|
88
|
+
this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), k(this.updatePoint);
|
|
42
89
|
}
|
|
43
90
|
}
|
|
44
|
-
function
|
|
45
|
-
return
|
|
91
|
+
function m(n, t) {
|
|
92
|
+
return t ? { point: t(n.point) } : n;
|
|
46
93
|
}
|
|
47
|
-
function
|
|
48
|
-
return { x:
|
|
94
|
+
function M(n, t) {
|
|
95
|
+
return { x: n.x - t.x, y: n.y - t.y };
|
|
49
96
|
}
|
|
50
|
-
function
|
|
97
|
+
function u({ point: n }, t) {
|
|
51
98
|
return {
|
|
52
|
-
point:
|
|
53
|
-
delta:
|
|
54
|
-
offset:
|
|
55
|
-
velocity:
|
|
99
|
+
point: n,
|
|
100
|
+
delta: M(n, I(t)),
|
|
101
|
+
offset: M(n, V(t)),
|
|
102
|
+
velocity: b(t, 0.1)
|
|
56
103
|
};
|
|
57
104
|
}
|
|
58
|
-
function
|
|
59
|
-
return
|
|
105
|
+
function V(n) {
|
|
106
|
+
return n[0];
|
|
60
107
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
108
|
+
function I(n) {
|
|
109
|
+
return n[n.length - 1];
|
|
63
110
|
}
|
|
64
|
-
function
|
|
65
|
-
if (
|
|
111
|
+
function b(n, t) {
|
|
112
|
+
if (n.length < 2)
|
|
66
113
|
return { x: 0, y: 0 };
|
|
67
|
-
let
|
|
68
|
-
const r =
|
|
69
|
-
for (;
|
|
70
|
-
|
|
71
|
-
if (!
|
|
114
|
+
let i = n.length - 1, s = null;
|
|
115
|
+
const r = I(n);
|
|
116
|
+
for (; i >= 0 && (s = n[i], !(r.timestamp - s.timestamp > Y(t))); )
|
|
117
|
+
i--;
|
|
118
|
+
if (!s)
|
|
72
119
|
return { x: 0, y: 0 };
|
|
73
|
-
const
|
|
74
|
-
if (
|
|
120
|
+
const o = O(r.timestamp - s.timestamp);
|
|
121
|
+
if (o === 0)
|
|
75
122
|
return { x: 0, y: 0 };
|
|
76
|
-
const
|
|
77
|
-
x: (r.x -
|
|
78
|
-
y: (r.y -
|
|
123
|
+
const l = {
|
|
124
|
+
x: (r.x - s.x) / o,
|
|
125
|
+
y: (r.y - s.y) / o
|
|
79
126
|
};
|
|
80
|
-
return
|
|
127
|
+
return l.x === 1 / 0 && (l.x = 0), l.y === 1 / 0 && (l.y = 0), l;
|
|
81
128
|
}
|
|
82
129
|
export {
|
|
83
|
-
|
|
130
|
+
B as PanSession
|
|
84
131
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { addPointerEvent as m } from "../../events/add-pointer-event.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { getContextWindow as P } from "../../utils/get-context-window.js";
|
|
3
|
+
import { PanSession as h } from "./PanSession.js";
|
|
4
|
+
import { Feature as p } from "../../../../../motion-dom/dist/es/render/Feature.js";
|
|
5
5
|
import { noop as u } from "../../../../../motion-utils/dist/es/noop.js";
|
|
6
6
|
import { frame as r } from "../../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
7
7
|
const s = (e) => (n, o) => {
|
|
8
8
|
e && r.postRender(() => e(n, o));
|
|
9
9
|
};
|
|
10
|
-
class v extends
|
|
10
|
+
class v extends p {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments), this.removePointerDownListener = u;
|
|
13
13
|
}
|
|
14
14
|
onPointerDown(n) {
|
|
15
|
-
this.session = new
|
|
15
|
+
this.session = new h(n, this.createPanHandlers(), {
|
|
16
16
|
transformPagePoint: this.node.getTransformPagePoint(),
|
|
17
|
-
contextWindow:
|
|
17
|
+
contextWindow: P(this.node)
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
createPanHandlers() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extractEventInfo as i } from "../events/event-info.js";
|
|
2
|
-
import { Feature as m } from "
|
|
2
|
+
import { Feature as m } from "../../../../motion-dom/dist/es/render/Feature.js";
|
|
3
3
|
import { press as u } from "../../../../motion-dom/dist/es/gestures/press/index.js";
|
|
4
4
|
import { frame as p } from "../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
5
5
|
function s(t, e, n) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createAnimationState as i } from "
|
|
3
|
-
import {
|
|
4
|
-
class u extends
|
|
1
|
+
import { Feature as o } from "../../../../../../motion-dom/dist/es/render/Feature.js";
|
|
2
|
+
import { createAnimationState as i } from "../../../../../../motion-dom/dist/es/render/utils/animation-state.js";
|
|
3
|
+
import { isAnimationControls as s } from "../../../../../../motion-dom/dist/es/render/utils/is-animation-controls.js";
|
|
4
|
+
class u extends o {
|
|
5
5
|
/**
|
|
6
6
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
7
7
|
* to the underlying animation library. We only want to load that if we load this,
|
|
@@ -12,7 +12,7 @@ class u extends s {
|
|
|
12
12
|
}
|
|
13
13
|
updateAnimationControlsSubscription() {
|
|
14
14
|
const { animate: t } = this.node.getProps();
|
|
15
|
-
|
|
15
|
+
s(t) && (this.unmountControls = t.subscribe(this.node));
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Subscribe any provided AnimationControls to the component's VisualElement
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getFeatureDefinitions as r, setFeatureDefinitions as s } from "../../../../../motion-dom/dist/es/render/VisualElement.js";
|
|
1
2
|
const n = {
|
|
2
3
|
animation: [
|
|
3
4
|
"animate",
|
|
@@ -17,11 +18,22 @@ const n = {
|
|
|
17
18
|
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
18
19
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
19
20
|
layout: ["layout", "layoutId"]
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
};
|
|
22
|
+
let t = !1;
|
|
23
|
+
function l() {
|
|
24
|
+
if (t)
|
|
25
|
+
return;
|
|
26
|
+
const e = {};
|
|
27
|
+
for (const i in n)
|
|
28
|
+
e[i] = {
|
|
29
|
+
isEnabled: (o) => n[i].some((a) => !!o[a])
|
|
30
|
+
};
|
|
31
|
+
s(e), t = !0;
|
|
32
|
+
}
|
|
33
|
+
function w() {
|
|
34
|
+
return l(), r();
|
|
35
|
+
}
|
|
25
36
|
export {
|
|
26
|
-
|
|
37
|
+
w as getInitializedFeatureDefinitions,
|
|
38
|
+
l as initFeatureDefinitions
|
|
27
39
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DragGesture as r } from "../../gestures/drag/index.js";
|
|
2
2
|
import { PanGesture as o } from "../../gestures/pan/index.js";
|
|
3
3
|
import { MeasureLayout as e } from "./layout/MeasureLayout.js";
|
|
4
|
-
import { HTMLProjectionNode as t } from "
|
|
4
|
+
import { HTMLProjectionNode as t } from "../../../../../motion-dom/dist/es/projection/node/HTMLProjectionNode.js";
|
|
5
5
|
const u = {
|
|
6
6
|
pan: {
|
|
7
7
|
Feature: o
|
|
@@ -1,46 +1,47 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { usePresence as
|
|
4
|
-
import { LayoutGroupContext as
|
|
5
|
-
import { SwitchLayoutGroupContext as
|
|
6
|
-
import { globalProjectionState as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { microtask as v } from "../../../../../../motion-dom/dist/es/frameloop/microtask.js";
|
|
12
|
-
let a = !1;
|
|
13
|
-
class L extends f {
|
|
2
|
+
import { useContext as u, Component as l } from "react";
|
|
3
|
+
import { usePresence as f } from "../../../components/AnimatePresence/use-presence.js";
|
|
4
|
+
import { LayoutGroupContext as c } from "../../../context/LayoutGroupContext.js";
|
|
5
|
+
import { SwitchLayoutGroupContext as d } from "../../../context/SwitchLayoutGroupContext.js";
|
|
6
|
+
import { globalProjectionState as h } from "../../../../../../motion-dom/dist/es/projection/node/state.js";
|
|
7
|
+
import { frame as y } from "../../../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
8
|
+
import { microtask as g } from "../../../../../../motion-dom/dist/es/frameloop/microtask.js";
|
|
9
|
+
let i = !1;
|
|
10
|
+
class v extends l {
|
|
14
11
|
/**
|
|
15
12
|
* This only mounts projection nodes for components that
|
|
16
13
|
* need measuring, we might want to do it for all components
|
|
17
14
|
* in order to incorporate transforms
|
|
18
15
|
*/
|
|
19
16
|
componentDidMount() {
|
|
20
|
-
const { visualElement: e, layoutGroup: t, switchLayoutGroup:
|
|
21
|
-
|
|
17
|
+
const { visualElement: e, layoutGroup: t, switchLayoutGroup: n, layoutId: s } = this.props, { projection: o } = e;
|
|
18
|
+
o && (t.group && t.group.add(o), n && n.register && s && n.register(o), i && o.root.didUpdate(), o.addEventListener("animationComplete", () => {
|
|
22
19
|
this.safeToRemove();
|
|
23
20
|
}), o.setOptions({
|
|
24
21
|
...o.options,
|
|
22
|
+
layoutDependency: this.props.layoutDependency,
|
|
25
23
|
onExitComplete: () => this.safeToRemove()
|
|
26
|
-
})),
|
|
24
|
+
})), h.hasEverUpdated = !0;
|
|
27
25
|
}
|
|
28
26
|
getSnapshotBeforeUpdate(e) {
|
|
29
|
-
const { layoutDependency: t, visualElement:
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
const { layoutDependency: t, visualElement: n, drag: s, isPresent: o } = this.props, { projection: r } = n;
|
|
28
|
+
return r && (r.isPresent = o, e.layoutDependency !== t && r.setOptions({
|
|
29
|
+
...r.options,
|
|
30
|
+
layoutDependency: t
|
|
31
|
+
}), i = !0, s || e.layoutDependency !== t || t === void 0 || e.isPresent !== o ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || y.postRender(() => {
|
|
32
|
+
const p = r.getStack();
|
|
33
|
+
(!p || !p.members.length) && this.safeToRemove();
|
|
33
34
|
}))), null;
|
|
34
35
|
}
|
|
35
36
|
componentDidUpdate() {
|
|
36
37
|
const { projection: e } = this.props.visualElement;
|
|
37
|
-
e && (e.root.didUpdate(),
|
|
38
|
+
e && (e.root.didUpdate(), g.postRender(() => {
|
|
38
39
|
!e.currentAnimation && e.isLead() && this.safeToRemove();
|
|
39
40
|
}));
|
|
40
41
|
}
|
|
41
42
|
componentWillUnmount() {
|
|
42
|
-
const { visualElement: e, layoutGroup: t, switchLayoutGroup:
|
|
43
|
-
|
|
43
|
+
const { visualElement: e, layoutGroup: t, switchLayoutGroup: n } = this.props, { projection: s } = e;
|
|
44
|
+
i = !0, s && (s.scheduleCheckAfterUnmount(), t && t.group && t.group.remove(s), n && n.deregister && n.deregister(s));
|
|
44
45
|
}
|
|
45
46
|
safeToRemove() {
|
|
46
47
|
const { safeToRemove: e } = this.props;
|
|
@@ -50,26 +51,10 @@ class L extends f {
|
|
|
50
51
|
return null;
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
-
const [e, t] =
|
|
55
|
-
return m(
|
|
54
|
+
function E(a) {
|
|
55
|
+
const [e, t] = f(), n = u(c);
|
|
56
|
+
return m(v, { ...a, layoutGroup: n, switchLayoutGroup: u(d), isPresent: e, safeToRemove: t });
|
|
56
57
|
}
|
|
57
|
-
const b = {
|
|
58
|
-
borderRadius: {
|
|
59
|
-
...n,
|
|
60
|
-
applyTo: [
|
|
61
|
-
"borderTopLeftRadius",
|
|
62
|
-
"borderTopRightRadius",
|
|
63
|
-
"borderBottomLeftRadius",
|
|
64
|
-
"borderBottomRightRadius"
|
|
65
|
-
]
|
|
66
|
-
},
|
|
67
|
-
borderTopLeftRadius: n,
|
|
68
|
-
borderTopRightRadius: n,
|
|
69
|
-
borderBottomLeftRadius: n,
|
|
70
|
-
borderBottomRightRadius: n,
|
|
71
|
-
boxShadow: g
|
|
72
|
-
};
|
|
73
58
|
export {
|
|
74
|
-
|
|
59
|
+
E as MeasureLayout
|
|
75
60
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { MeasureLayout as o } from "./layout/MeasureLayout.js";
|
|
2
|
+
import { HTMLProjectionNode as t } from "../../../../../motion-dom/dist/es/projection/node/HTMLProjectionNode.js";
|
|
3
3
|
const a = {
|
|
4
4
|
layout: {
|
|
5
|
-
ProjectionNode:
|
|
6
|
-
MeasureLayout:
|
|
5
|
+
ProjectionNode: t,
|
|
6
|
+
MeasureLayout: o
|
|
7
7
|
}
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { getInitializedFeatureDefinitions as o } from "./definitions.js";
|
|
2
|
+
import { setFeatureDefinitions as n } from "../../../../../motion-dom/dist/es/render/VisualElement.js";
|
|
3
|
+
function s(e) {
|
|
4
|
+
const i = o();
|
|
5
|
+
for (const t in e)
|
|
6
|
+
i[t] = {
|
|
7
|
+
...i[t],
|
|
8
|
+
...e[t]
|
|
7
9
|
};
|
|
10
|
+
n(i);
|
|
8
11
|
}
|
|
9
12
|
export {
|
|
10
|
-
|
|
13
|
+
s as loadFeatures
|
|
11
14
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { observeIntersection as m } from "./observers.js";
|
|
2
|
+
import { Feature as f } from "../../../../../../motion-dom/dist/es/render/Feature.js";
|
|
3
3
|
const w = {
|
|
4
4
|
some: 0,
|
|
5
5
|
all: 1
|
|
6
6
|
};
|
|
7
|
-
class v extends
|
|
7
|
+
class v extends f {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
10
10
|
}
|
|
@@ -22,7 +22,7 @@ class v extends m {
|
|
|
22
22
|
const { onViewportEnter: p, onViewportLeave: d } = this.node.getProps(), a = e ? p : d;
|
|
23
23
|
a && a(i);
|
|
24
24
|
};
|
|
25
|
-
return
|
|
25
|
+
return m(this.node.current, u, c);
|
|
26
26
|
}
|
|
27
27
|
mount() {
|
|
28
28
|
this.startObserver();
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { LayoutGroupContext as
|
|
4
|
-
import { LazyContext as
|
|
5
|
-
import { MotionConfigContext as
|
|
6
|
-
import { MotionContext as
|
|
7
|
-
import { useCreateMotionContext as
|
|
8
|
-
import { useRender as
|
|
9
|
-
import { isSVGComponent as
|
|
10
|
-
import { useHTMLVisualState as
|
|
11
|
-
import { useSVGVisualState as
|
|
12
|
-
import { isBrowser as
|
|
13
|
-
import {
|
|
14
|
-
import { loadFeatures as
|
|
15
|
-
import { motionComponentSymbol as
|
|
16
|
-
import { useMotionRef as
|
|
17
|
-
import { useVisualElement as
|
|
18
|
-
import { warning as
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
function
|
|
23
|
-
let
|
|
1
|
+
import { jsxs as S, jsx as x } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as E, useContext as l } from "react";
|
|
3
|
+
import { LayoutGroupContext as g } from "../context/LayoutGroupContext.js";
|
|
4
|
+
import { LazyContext as L } from "../context/LazyContext.js";
|
|
5
|
+
import { MotionConfigContext as V } from "../context/MotionConfigContext.js";
|
|
6
|
+
import { MotionContext as j } from "../context/MotionContext/index.js";
|
|
7
|
+
import { useCreateMotionContext as N } from "../context/MotionContext/create.js";
|
|
8
|
+
import { useRender as P } from "../render/dom/use-render.js";
|
|
9
|
+
import { isSVGComponent as w } from "../render/dom/utils/is-svg-component.js";
|
|
10
|
+
import { useHTMLVisualState as C } from "../render/html/use-html-visual-state.js";
|
|
11
|
+
import { useSVGVisualState as b } from "../render/svg/use-svg-visual-state.js";
|
|
12
|
+
import { isBrowser as h } from "../utils/is-browser.js";
|
|
13
|
+
import { getInitializedFeatureDefinitions as z } from "./features/definitions.js";
|
|
14
|
+
import { loadFeatures as G } from "./features/load-features.js";
|
|
15
|
+
import { motionComponentSymbol as D } from "./utils/symbol.js";
|
|
16
|
+
import { useMotionRef as R } from "./utils/use-motion-ref.js";
|
|
17
|
+
import { useVisualElement as I } from "./utils/use-visual-element.js";
|
|
18
|
+
import { warning as k, invariant as F } from "../../../../motion-utils/dist/es/errors.js";
|
|
19
|
+
function rt(t, { forwardMotionProps: i = !1, type: e } = {}, o, a) {
|
|
20
|
+
o && G(o);
|
|
21
|
+
const m = e ? e === "svg" : w(t), y = m ? b : C;
|
|
22
|
+
function d(n, v) {
|
|
23
|
+
let u;
|
|
24
24
|
const r = {
|
|
25
|
-
...
|
|
25
|
+
...l(V),
|
|
26
26
|
...n,
|
|
27
|
-
layoutId:
|
|
28
|
-
}, { isStatic:
|
|
29
|
-
if (!
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
27
|
+
layoutId: O(n)
|
|
28
|
+
}, { isStatic: c } = r, s = N(n), f = y(n, c);
|
|
29
|
+
if (!c && h) {
|
|
30
|
+
T(r, o);
|
|
31
|
+
const M = $(r);
|
|
32
|
+
u = M.MeasureLayout, s.visualElement = I(t, f, r, a, M.ProjectionNode, m);
|
|
33
33
|
}
|
|
34
|
-
return
|
|
34
|
+
return S(j.Provider, { value: s, children: [u && s.visualElement ? x(u, { visualElement: s.visualElement, ...r }) : null, P(t, n, R(f, s.visualElement, v), f, c, i, m)] });
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
return
|
|
36
|
+
d.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
|
|
37
|
+
const p = E(d);
|
|
38
|
+
return p[D] = t, p;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
return
|
|
40
|
+
function O({ layoutId: t }) {
|
|
41
|
+
const i = l(g).id;
|
|
42
|
+
return i && t !== void 0 ? i + "-" + t : t;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
const e =
|
|
46
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
47
|
-
const
|
|
48
|
-
t.ignoreStrict ?
|
|
44
|
+
function T(t, i) {
|
|
45
|
+
const e = l(L).strict;
|
|
46
|
+
if (process.env.NODE_ENV !== "production" && i && e) {
|
|
47
|
+
const o = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
48
|
+
t.ignoreStrict ? k(!1, o, "lazy-strict-mode") : F(!1, o, "lazy-strict-mode");
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const { drag:
|
|
53
|
-
if (!
|
|
51
|
+
function $(t) {
|
|
52
|
+
const i = z(), { drag: e, layout: o } = i;
|
|
53
|
+
if (!e && !o)
|
|
54
54
|
return {};
|
|
55
|
-
const
|
|
55
|
+
const a = { ...e, ...o };
|
|
56
56
|
return {
|
|
57
|
-
MeasureLayout:
|
|
58
|
-
ProjectionNode:
|
|
57
|
+
MeasureLayout: e != null && e.isEnabled(t) || o != null && o.isEnabled(t) ? a.MeasureLayout : void 0,
|
|
58
|
+
ProjectionNode: a.ProjectionNode
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
export {
|
|
62
|
-
|
|
62
|
+
rt as createMotionComponent
|
|
63
63
|
};
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import { useCallback as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { useRef as C, useInsertionEffect as y, useCallback as M } from "react";
|
|
2
|
+
function b(n, f, e) {
|
|
3
|
+
const c = C(e);
|
|
4
|
+
y(() => {
|
|
5
|
+
c.current = e;
|
|
6
|
+
});
|
|
7
|
+
const u = C(null);
|
|
8
|
+
return M((r) => {
|
|
9
|
+
var t;
|
|
10
|
+
r && ((t = n.onMount) == null || t.call(n, r)), f && (r ? f.mount(r) : f.unmount());
|
|
11
|
+
const o = c.current;
|
|
12
|
+
if (typeof o == "function")
|
|
13
|
+
if (r) {
|
|
14
|
+
const p = o(r);
|
|
15
|
+
typeof p == "function" && (u.current = p);
|
|
16
|
+
} else u.current ? (u.current(), u.current = null) : o(r);
|
|
17
|
+
else o && (o.current = r);
|
|
18
|
+
}, [f]);
|
|
14
19
|
}
|
|
15
20
|
export {
|
|
16
21
|
b as useMotionRef
|