@code0-tech/pictor 0.9.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/components/island/Island.style.css +1 -0
- package/dist/assets/components/resizable/Resizable.style.css +1 -1
- package/dist/components/breadcrumb/Breadcrumb.js +7 -7
- package/dist/components/button/Button.js +11 -11
- package/dist/components/data-table/DataTable.js +15 -15
- package/dist/components/data-table/DataTableFilterSuggestionMenu.js +15 -15
- package/dist/components/editor/Editor.js +13 -13
- package/dist/components/form/CheckboxInput.js +4 -4
- package/dist/components/form/EmailInput.js +9 -9
- package/dist/components/form/InputContentEditable.hook.js +11 -11
- package/dist/components/form/InputWrapper.js +15 -15
- package/dist/components/form/NumberInput.js +9 -9
- package/dist/components/form/PasswordInput.js +4 -4
- package/dist/components/form/SwitchInput.js +7 -7
- package/dist/components/form/TextAreaInput.js +6 -6
- package/dist/components/form/TextInput.js +6 -6
- package/dist/components/form/useForm.js +2 -2
- package/dist/components/fullscreen/FullScreen.js +2 -2
- package/dist/components/gantt/GanttGroup.js +15 -15
- package/dist/components/island/Island.d.ts +6 -0
- package/dist/components/island/Island.hook.d.ts +19 -0
- package/dist/components/island/Island.hook.js +58 -0
- package/dist/components/island/Island.js +71 -0
- package/dist/components/progress/Progress.js +18 -18
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +17 -0
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +9 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +13 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +15 -0
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +8 -0
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js +14 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +285 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +22 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +67 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +28 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +21 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +130 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +43 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +29 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +45 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +33 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +13 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +39 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +17 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +21 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +60 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +11 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +14 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +45 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +21 -0
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +62 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +4 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +21 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +65 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +52 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +39 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +18 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +13 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +7 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +10 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +16 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +21 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +24 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +10 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +27 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +9 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +30 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +22 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +10 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +8 -0
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js +9 -0
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +4 -0
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +4 -0
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +6 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +8 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +112 -0
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +144 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +106 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +38 -0
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +17 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +30 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +178 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +46 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +59 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +22 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +68 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +74 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +23 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +31 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +22 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +33 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +17 -0
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +5 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +43 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +11 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +11 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +38 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +34 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +25 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +53 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +38 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +25 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +34 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +25 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +618 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +53 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +19 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +263 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +28 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +65 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +7 -0
- 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 +37 -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 +38 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/render/store.js +4 -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/camel-case-attrs.js +28 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +4 -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/render.js +11 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +143 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +23 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +25 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +5 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +39 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +23 -0
- package/dist/node_modules/motion-dom/dist/es/resize/index.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +42 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +51 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +5 -0
- package/dist/node_modules/motion-dom/dist/es/value/index.js +212 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +19 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +22 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +24 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +51 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +11 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +70 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +17 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +17 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +4 -0
- 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/add-will-change.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/array.js +11 -0
- package/dist/node_modules/motion-utils/dist/es/clamp.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +5 -0
- package/dist/node_modules/motion-utils/dist/es/easing/back.js +9 -0
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js +8 -0
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +19 -0
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +32 -0
- package/dist/node_modules/motion-utils/dist/es/errors.js +14 -0
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js +6 -0
- package/dist/node_modules/motion-utils/dist/es/global-config.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/is-object.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/memo.js +8 -0
- package/dist/node_modules/motion-utils/dist/es/noop.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/pipe.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/progress.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +29 -0
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js +5 -0
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/warn-once.js +8 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +2 -2
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +8 -8
- package/dist/utils/reactiveArrayService.js +4 -4
- package/package.json +9 -6
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -25
- package/dist/node_modules/@radix-ui/react-progress/dist/index.js +0 -81
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.js +0 -55
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.js +0 -32
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-slot/dist/index.js +0 -58
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* We dynamically generate the AnimationState manager as it contains a reference
|
|
7
|
+
* to the underlying animation library. We only want to load that if we load this,
|
|
8
|
+
* so people can optionally code split it out using the `m` component.
|
|
9
|
+
*/
|
|
10
|
+
constructor(t) {
|
|
11
|
+
super(t), t.animationState || (t.animationState = i(t));
|
|
12
|
+
}
|
|
13
|
+
updateAnimationControlsSubscription() {
|
|
14
|
+
const { animate: t } = this.node.getProps();
|
|
15
|
+
s(t) && (this.unmountControls = t.subscribe(this.node));
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Subscribe any provided AnimationControls to the component's VisualElement
|
|
19
|
+
*/
|
|
20
|
+
mount() {
|
|
21
|
+
this.updateAnimationControlsSubscription();
|
|
22
|
+
}
|
|
23
|
+
update() {
|
|
24
|
+
const { animate: t } = this.node.getProps(), { animate: n } = this.node.prevProps || {};
|
|
25
|
+
t !== n && this.updateAnimationControlsSubscription();
|
|
26
|
+
}
|
|
27
|
+
unmount() {
|
|
28
|
+
this.node.animationState.reset(), this.unmountControls?.();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
u as AnimationFeature
|
|
33
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { getFeatureDefinitions as r, setFeatureDefinitions as s } from "../../../../../motion-dom/dist/es/render/VisualElement.js";
|
|
2
|
+
const n = {
|
|
3
|
+
animation: [
|
|
4
|
+
"animate",
|
|
5
|
+
"variants",
|
|
6
|
+
"whileHover",
|
|
7
|
+
"whileTap",
|
|
8
|
+
"exit",
|
|
9
|
+
"whileInView",
|
|
10
|
+
"whileFocus",
|
|
11
|
+
"whileDrag"
|
|
12
|
+
],
|
|
13
|
+
exit: ["exit"],
|
|
14
|
+
drag: ["drag", "dragControls"],
|
|
15
|
+
focus: ["whileFocus"],
|
|
16
|
+
hover: ["whileHover", "onHoverStart", "onHoverEnd"],
|
|
17
|
+
tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
|
|
18
|
+
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
19
|
+
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
20
|
+
layout: ["layout", "layoutId"]
|
|
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
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
w as getInitializedFeatureDefinitions,
|
|
38
|
+
l as initFeatureDefinitions
|
|
39
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DragGesture as r } from "../../gestures/drag/index.js";
|
|
2
|
+
import { PanGesture as o } from "../../gestures/pan/index.js";
|
|
3
|
+
import { MeasureLayout as e } from "./layout/MeasureLayout.js";
|
|
4
|
+
import { HTMLProjectionNode as t } from "../../../../../motion-dom/dist/es/projection/node/HTMLProjectionNode.js";
|
|
5
|
+
const u = {
|
|
6
|
+
pan: {
|
|
7
|
+
Feature: o
|
|
8
|
+
},
|
|
9
|
+
drag: {
|
|
10
|
+
Feature: r,
|
|
11
|
+
ProjectionNode: t,
|
|
12
|
+
MeasureLayout: e
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
u as drag
|
|
17
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HoverGesture as e } from "../../gestures/hover.js";
|
|
2
|
+
import { FocusGesture as r } from "../../gestures/focus.js";
|
|
3
|
+
import { PressGesture as t } from "../../gestures/press.js";
|
|
4
|
+
import { InViewFeature as o } from "./viewport/index.js";
|
|
5
|
+
const a = {
|
|
6
|
+
inView: {
|
|
7
|
+
Feature: o
|
|
8
|
+
},
|
|
9
|
+
tap: {
|
|
10
|
+
Feature: t
|
|
11
|
+
},
|
|
12
|
+
focus: {
|
|
13
|
+
Feature: r
|
|
14
|
+
},
|
|
15
|
+
hover: {
|
|
16
|
+
Feature: e
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
a as gestureAnimations
|
|
21
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as u, Component as l } from "react";
|
|
3
|
+
import { usePresence as c } from "../../../components/AnimatePresence/use-presence.js";
|
|
4
|
+
import { LayoutGroupContext as f } from "../../../context/LayoutGroupContext.js";
|
|
5
|
+
import { SwitchLayoutGroupContext as d } from "../../../context/SwitchLayoutGroupContext.js";
|
|
6
|
+
import { frame as h } from "../../../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
7
|
+
import { microtask as y } from "../../../../../../motion-dom/dist/es/frameloop/microtask.js";
|
|
8
|
+
import { globalProjectionState as g } from "../../../../../../motion-dom/dist/es/projection/node/state.js";
|
|
9
|
+
let i = !1;
|
|
10
|
+
class v extends l {
|
|
11
|
+
/**
|
|
12
|
+
* This only mounts projection nodes for components that
|
|
13
|
+
* need measuring, we might want to do it for all components
|
|
14
|
+
* in order to incorporate transforms
|
|
15
|
+
*/
|
|
16
|
+
componentDidMount() {
|
|
17
|
+
const { visualElement: t, layoutGroup: o, switchLayoutGroup: e, layoutId: s } = this.props, { projection: n } = t;
|
|
18
|
+
n && (o.group && o.group.add(n), e && e.register && s && e.register(n), i && n.root.didUpdate(), n.addEventListener("animationComplete", () => {
|
|
19
|
+
this.safeToRemove();
|
|
20
|
+
}), n.setOptions({
|
|
21
|
+
...n.options,
|
|
22
|
+
layoutDependency: this.props.layoutDependency,
|
|
23
|
+
onExitComplete: () => this.safeToRemove()
|
|
24
|
+
})), g.hasEverUpdated = !0;
|
|
25
|
+
}
|
|
26
|
+
getSnapshotBeforeUpdate(t) {
|
|
27
|
+
const { layoutDependency: o, visualElement: e, drag: s, isPresent: n } = this.props, { projection: r } = e;
|
|
28
|
+
return r && (r.isPresent = n, t.layoutDependency !== o && r.setOptions({
|
|
29
|
+
...r.options,
|
|
30
|
+
layoutDependency: o
|
|
31
|
+
}), i = !0, s || t.layoutDependency !== o || o === void 0 || t.isPresent !== n ? r.willUpdate() : this.safeToRemove(), t.isPresent !== n && (n ? r.promote() : r.relegate() || h.postRender(() => {
|
|
32
|
+
const p = r.getStack();
|
|
33
|
+
(!p || !p.members.length) && this.safeToRemove();
|
|
34
|
+
}))), null;
|
|
35
|
+
}
|
|
36
|
+
componentDidUpdate() {
|
|
37
|
+
const { visualElement: t, layoutAnchor: o } = this.props, { projection: e } = t;
|
|
38
|
+
e && (e.options.layoutAnchor = o, e.root.didUpdate(), y.postRender(() => {
|
|
39
|
+
!e.currentAnimation && e.isLead() && this.safeToRemove();
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
componentWillUnmount() {
|
|
43
|
+
const { visualElement: t, layoutGroup: o, switchLayoutGroup: e } = this.props, { projection: s } = t;
|
|
44
|
+
i = !0, s && (s.scheduleCheckAfterUnmount(), o && o.group && o.group.remove(s), e && e.deregister && e.deregister(s));
|
|
45
|
+
}
|
|
46
|
+
safeToRemove() {
|
|
47
|
+
const { safeToRemove: t } = this.props;
|
|
48
|
+
t && t();
|
|
49
|
+
}
|
|
50
|
+
render() {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function E(a) {
|
|
55
|
+
const [t, o] = c(), e = u(f);
|
|
56
|
+
return m(v, { ...a, layoutGroup: e, switchLayoutGroup: u(d), isPresent: t, safeToRemove: o });
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
E as MeasureLayout
|
|
60
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MeasureLayout as o } from "./layout/MeasureLayout.js";
|
|
2
|
+
import { HTMLProjectionNode as t } from "../../../../../motion-dom/dist/es/projection/node/HTMLProjectionNode.js";
|
|
3
|
+
const a = {
|
|
4
|
+
layout: {
|
|
5
|
+
ProjectionNode: t,
|
|
6
|
+
MeasureLayout: o
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
a as layout
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
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]
|
|
9
|
+
};
|
|
10
|
+
n(i);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
s as loadFeatures
|
|
14
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { observeIntersection as f } from "./observers.js";
|
|
2
|
+
import { Feature as m } from "../../../../../../motion-dom/dist/es/render/Feature.js";
|
|
3
|
+
const w = {
|
|
4
|
+
some: 0,
|
|
5
|
+
all: 1
|
|
6
|
+
};
|
|
7
|
+
class b extends m {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
10
|
+
}
|
|
11
|
+
startObserver() {
|
|
12
|
+
this.stopObserver?.();
|
|
13
|
+
const { viewport: s = {} } = this.node.getProps(), { root: e, margin: r, amount: n = "some", once: h } = s, p = {
|
|
14
|
+
root: e ? e.current : void 0,
|
|
15
|
+
rootMargin: r,
|
|
16
|
+
threshold: typeof n == "number" ? n : w[n]
|
|
17
|
+
}, c = (i) => {
|
|
18
|
+
const { isIntersecting: t } = i;
|
|
19
|
+
if (this.isInView === t || (this.isInView = t, h && !t && this.hasEnteredView))
|
|
20
|
+
return;
|
|
21
|
+
t && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", t);
|
|
22
|
+
const { onViewportEnter: d, onViewportLeave: u } = this.node.getProps(), a = t ? d : u;
|
|
23
|
+
a && a(i);
|
|
24
|
+
};
|
|
25
|
+
this.stopObserver = f(this.node.current, p, c);
|
|
26
|
+
}
|
|
27
|
+
mount() {
|
|
28
|
+
this.startObserver();
|
|
29
|
+
}
|
|
30
|
+
update() {
|
|
31
|
+
if (typeof IntersectionObserver > "u")
|
|
32
|
+
return;
|
|
33
|
+
const { props: s, prevProps: e } = this.node;
|
|
34
|
+
["amount", "margin", "root"].some(l(s, e)) && this.startObserver();
|
|
35
|
+
}
|
|
36
|
+
unmount() {
|
|
37
|
+
this.stopObserver?.(), this.hasEnteredView = !1, this.isInView = !1;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function l({ viewport: o = {} }, { viewport: s = {} } = {}) {
|
|
41
|
+
return (e) => o[e] !== s[e];
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
b as InViewFeature
|
|
45
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const c = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), a = (e) => {
|
|
2
|
+
const r = c.get(e.target);
|
|
3
|
+
r && r(e);
|
|
4
|
+
}, b = (e) => {
|
|
5
|
+
e.forEach(a);
|
|
6
|
+
};
|
|
7
|
+
function i({ root: e, ...r }) {
|
|
8
|
+
const t = e || document;
|
|
9
|
+
n.has(t) || n.set(t, {});
|
|
10
|
+
const s = n.get(t), o = JSON.stringify(r);
|
|
11
|
+
return s[o] || (s[o] = new IntersectionObserver(b, { root: e, ...r })), s[o];
|
|
12
|
+
}
|
|
13
|
+
function v(e, r, t) {
|
|
14
|
+
const s = i(r);
|
|
15
|
+
return c.set(e, t), s.observe(e), () => {
|
|
16
|
+
c.delete(e), s.unobserve(e);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
v as observeIntersection
|
|
21
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsxs as S, jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as x, useContext as l } from "react";
|
|
3
|
+
import { LayoutGroupContext as E } 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 w } from "../context/MotionContext/create.js";
|
|
8
|
+
import { useRender as N } from "../render/dom/use-render.js";
|
|
9
|
+
import { isSVGComponent as P } 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 { getInitializedFeatureDefinitions as h } from "./features/definitions.js";
|
|
13
|
+
import { loadFeatures as z } from "./features/load-features.js";
|
|
14
|
+
import { motionComponentSymbol as G } from "./utils/symbol.js";
|
|
15
|
+
import { useMotionRef as D } from "./utils/use-motion-ref.js";
|
|
16
|
+
import { useVisualElement as R } from "./utils/use-visual-element.js";
|
|
17
|
+
import { warning as I, invariant as k } from "../../../../motion-utils/dist/es/errors.js";
|
|
18
|
+
function it(t, { forwardMotionProps: e = !1, type: i } = {}, o, s) {
|
|
19
|
+
o && z(o);
|
|
20
|
+
const m = i ? i === "svg" : P(t), M = m ? b : C;
|
|
21
|
+
function d(n, v) {
|
|
22
|
+
let u;
|
|
23
|
+
const r = {
|
|
24
|
+
...l(V),
|
|
25
|
+
...n,
|
|
26
|
+
layoutId: F(n)
|
|
27
|
+
}, { isStatic: c } = r, a = w(n), f = M(n, c);
|
|
28
|
+
if (!c && typeof window < "u") {
|
|
29
|
+
O(r, o);
|
|
30
|
+
const p = T(r);
|
|
31
|
+
u = p.MeasureLayout, a.visualElement = R(t, f, r, s, p.ProjectionNode, m);
|
|
32
|
+
}
|
|
33
|
+
return S(j.Provider, { value: a, children: [u && a.visualElement ? g(u, { visualElement: a.visualElement, ...r }) : null, N(t, n, D(f, a.visualElement, v), f, c, e, m)] });
|
|
34
|
+
}
|
|
35
|
+
d.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
|
|
36
|
+
const y = x(d);
|
|
37
|
+
return y[G] = t, y;
|
|
38
|
+
}
|
|
39
|
+
function F({ layoutId: t }) {
|
|
40
|
+
const e = l(E).id;
|
|
41
|
+
return e && t !== void 0 ? e + "-" + t : t;
|
|
42
|
+
}
|
|
43
|
+
function O(t, e) {
|
|
44
|
+
const i = l(L).strict;
|
|
45
|
+
if (process.env.NODE_ENV !== "production" && e && i) {
|
|
46
|
+
const o = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
47
|
+
t.ignoreStrict ? I(!1, o, "lazy-strict-mode") : k(!1, o, "lazy-strict-mode");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function T(t) {
|
|
51
|
+
const e = h(), { drag: i, layout: o } = e;
|
|
52
|
+
if (!i && !o)
|
|
53
|
+
return {};
|
|
54
|
+
const s = { ...i, ...o };
|
|
55
|
+
return {
|
|
56
|
+
MeasureLayout: i?.isEnabled(t) || o?.isEnabled(t) ? s.MeasureLayout : void 0,
|
|
57
|
+
ProjectionNode: s.ProjectionNode
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
it as createMotionComponent
|
|
62
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useRef as c, useInsertionEffect as l, useCallback as i } from "react";
|
|
2
|
+
function s(p, u, e) {
|
|
3
|
+
const t = c(e);
|
|
4
|
+
l(() => {
|
|
5
|
+
t.current = e;
|
|
6
|
+
});
|
|
7
|
+
const f = c(null);
|
|
8
|
+
return i((r) => {
|
|
9
|
+
r && p.onMount?.(r), u && (r ? u.mount(r) : u.unmount());
|
|
10
|
+
const o = t.current;
|
|
11
|
+
if (typeof o == "function")
|
|
12
|
+
if (r) {
|
|
13
|
+
const n = o(r);
|
|
14
|
+
typeof n == "function" && (f.current = n);
|
|
15
|
+
} else f.current ? (f.current(), f.current = null) : o(r);
|
|
16
|
+
else o && (o.current = r);
|
|
17
|
+
}, [u]);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
s as useMotionRef
|
|
21
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { useContext as u, useRef as l, useInsertionEffect as x, useEffect as j } from "react";
|
|
2
|
+
import { LazyContext as I } from "../../context/LazyContext.js";
|
|
3
|
+
import { MotionConfigContext as k } from "../../context/MotionConfigContext.js";
|
|
4
|
+
import { MotionContext as S } from "../../context/MotionContext/index.js";
|
|
5
|
+
import { PresenceContext as L } from "../../context/PresenceContext.js";
|
|
6
|
+
import { SwitchLayoutGroupContext as O } from "../../context/SwitchLayoutGroupContext.js";
|
|
7
|
+
import { isRefObject as R } from "../../utils/is-ref-object.js";
|
|
8
|
+
import { useIsomorphicLayoutEffect as b } from "../../utils/use-isomorphic-effect.js";
|
|
9
|
+
import { optimizedAppearDataAttribute as H } from "../../../../../motion-dom/dist/es/animation/optimized-appear/data-id.js";
|
|
10
|
+
function K(o, f, n, e, s, a) {
|
|
11
|
+
const { visualElement: y } = u(S), c = u(I), i = u(L), d = u(k), C = d.reducedMotion, M = d.skipAnimations, r = l(null), w = l(!1);
|
|
12
|
+
e = e || c.renderer, !r.current && e && (r.current = e(o, {
|
|
13
|
+
visualState: f,
|
|
14
|
+
parent: y,
|
|
15
|
+
props: n,
|
|
16
|
+
presenceContext: i,
|
|
17
|
+
blockInitialAnimation: i ? i.initial === !1 : !1,
|
|
18
|
+
reducedMotionConfig: C,
|
|
19
|
+
skipAnimations: M,
|
|
20
|
+
isSVG: a
|
|
21
|
+
}), w.current && r.current && (r.current.manuallyAnimateOnMount = !0));
|
|
22
|
+
const t = r.current, A = u(O);
|
|
23
|
+
t && !t.projection && s && (t.type === "html" || t.type === "svg") && z(r.current, n, s, A);
|
|
24
|
+
const g = l(!1);
|
|
25
|
+
x(() => {
|
|
26
|
+
t && g.current && t.update(n, i);
|
|
27
|
+
});
|
|
28
|
+
const m = n[H], p = l(!!m && typeof window < "u" && !window.MotionHandoffIsComplete?.(m) && window.MotionHasOptimisedAnimation?.(m));
|
|
29
|
+
return b(() => {
|
|
30
|
+
w.current = !0, t && (g.current = !0, window.MotionIsMounted = !0, t.updateFeatures(), t.scheduleRenderMicrotask(), p.current && t.animationState && t.animationState.animateChanges());
|
|
31
|
+
}), j(() => {
|
|
32
|
+
t && (!p.current && t.animationState && t.animationState.animateChanges(), p.current && (queueMicrotask(() => {
|
|
33
|
+
window.MotionHandoffMarkAsComplete?.(m);
|
|
34
|
+
}), p.current = !1), t.enteringChildren = void 0);
|
|
35
|
+
}), t;
|
|
36
|
+
}
|
|
37
|
+
function z(o, f, n, e) {
|
|
38
|
+
const { layoutId: s, layout: a, drag: y, dragConstraints: c, layoutScroll: i, layoutRoot: d, layoutAnchor: C, layoutCrossfade: M } = f;
|
|
39
|
+
o.projection = new n(o.latestValues, f["data-framer-portal-id"] ? void 0 : h(o.parent)), o.projection.setOptions({
|
|
40
|
+
layoutId: s,
|
|
41
|
+
layout: a,
|
|
42
|
+
alwaysMeasureLayout: !!y || c && R(c),
|
|
43
|
+
visualElement: o,
|
|
44
|
+
/**
|
|
45
|
+
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
46
|
+
* to update by the time layout animations run.
|
|
47
|
+
* We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
|
|
48
|
+
* ensuring it gets called if there's no potential layout animations.
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
animationType: typeof a == "string" ? a : "both",
|
|
52
|
+
initialPromotionConfig: e,
|
|
53
|
+
crossfade: M,
|
|
54
|
+
layoutScroll: i,
|
|
55
|
+
layoutRoot: d,
|
|
56
|
+
layoutAnchor: C
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function h(o) {
|
|
60
|
+
if (o)
|
|
61
|
+
return o.options.allowProjection !== !1 ? o.projection : h(o.parent);
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
K as useVisualElement
|
|
65
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useContext as C } from "react";
|
|
2
|
+
import { MotionContext as x } from "../../context/MotionContext/index.js";
|
|
3
|
+
import { PresenceContext as S } from "../../context/PresenceContext.js";
|
|
4
|
+
import { useConstant as h } from "../../utils/use-constant.js";
|
|
5
|
+
import { resolveMotionValue as M } from "../../../../../motion-dom/dist/es/value/utils/resolve-motion-value.js";
|
|
6
|
+
import { isControllingVariants as N, isVariantNode as P } from "../../../../../motion-dom/dist/es/render/utils/is-controlling-variants.js";
|
|
7
|
+
import { isAnimationControls as T } from "../../../../../motion-dom/dist/es/render/utils/is-animation-controls.js";
|
|
8
|
+
import { resolveVariantFromProps as $ } from "../../../../../motion-dom/dist/es/render/utils/resolve-variants.js";
|
|
9
|
+
function b({ scrapeMotionValuesFromProps: t, createRenderState: i }, e, s, n) {
|
|
10
|
+
return {
|
|
11
|
+
latestValues: p(e, s, n, t),
|
|
12
|
+
renderState: i()
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function p(t, i, e, s) {
|
|
16
|
+
const n = {}, o = s(t, {});
|
|
17
|
+
for (const l in o)
|
|
18
|
+
n[l] = M(o[l]);
|
|
19
|
+
let { initial: m, animate: u } = t;
|
|
20
|
+
const g = N(t), v = P(t);
|
|
21
|
+
i && v && !g && t.inherit !== !1 && (m === void 0 && (m = i.initial), u === void 0 && (u = i.animate));
|
|
22
|
+
let c = e ? e.initial === !1 : !1;
|
|
23
|
+
c = c || m === !1;
|
|
24
|
+
const a = c ? u : m;
|
|
25
|
+
if (a && typeof a != "boolean" && !T(a)) {
|
|
26
|
+
const l = Array.isArray(a) ? a : [a];
|
|
27
|
+
for (let d = 0; d < l.length; d++) {
|
|
28
|
+
const V = $(t, l[d]);
|
|
29
|
+
if (V) {
|
|
30
|
+
const { transitionEnd: k, transition: B, ...y } = V;
|
|
31
|
+
for (const f in y) {
|
|
32
|
+
let r = y[f];
|
|
33
|
+
if (Array.isArray(r)) {
|
|
34
|
+
const A = c ? r.length - 1 : 0;
|
|
35
|
+
r = r[A];
|
|
36
|
+
}
|
|
37
|
+
r !== null && (n[f] = r);
|
|
38
|
+
}
|
|
39
|
+
for (const f in k)
|
|
40
|
+
n[f] = k[f];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return n;
|
|
45
|
+
}
|
|
46
|
+
const z = (t) => (i, e) => {
|
|
47
|
+
const s = C(x), n = C(S), o = () => b(t, i, s, n);
|
|
48
|
+
return e ? o() : h(o);
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
z as makeUseVisualState
|
|
52
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const a = /* @__PURE__ */ new Set([
|
|
2
|
+
"animate",
|
|
3
|
+
"exit",
|
|
4
|
+
"variants",
|
|
5
|
+
"initial",
|
|
6
|
+
"style",
|
|
7
|
+
"values",
|
|
8
|
+
"variants",
|
|
9
|
+
"transition",
|
|
10
|
+
"transformTemplate",
|
|
11
|
+
"custom",
|
|
12
|
+
"inherit",
|
|
13
|
+
"onBeforeLayoutMeasure",
|
|
14
|
+
"onAnimationStart",
|
|
15
|
+
"onAnimationComplete",
|
|
16
|
+
"onUpdate",
|
|
17
|
+
"onDragStart",
|
|
18
|
+
"onDrag",
|
|
19
|
+
"onDragEnd",
|
|
20
|
+
"onMeasureDragConstraints",
|
|
21
|
+
"onDirectionLock",
|
|
22
|
+
"onDragTransitionEnd",
|
|
23
|
+
"_dragX",
|
|
24
|
+
"_dragY",
|
|
25
|
+
"onHoverStart",
|
|
26
|
+
"onHoverEnd",
|
|
27
|
+
"onViewportEnter",
|
|
28
|
+
"onViewportLeave",
|
|
29
|
+
"globalTapTarget",
|
|
30
|
+
"propagate",
|
|
31
|
+
"ignoreStrict",
|
|
32
|
+
"viewport"
|
|
33
|
+
]);
|
|
34
|
+
function o(t) {
|
|
35
|
+
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || a.has(t);
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
o as isValidMotionProp
|
|
39
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createMotionComponent as e } from "../../motion/index.js";
|
|
2
|
+
import { warnOnce as a } from "../../../../../motion-utils/dist/es/warn-once.js";
|
|
3
|
+
function u(r, c) {
|
|
4
|
+
if (typeof Proxy > "u")
|
|
5
|
+
return e;
|
|
6
|
+
const o = /* @__PURE__ */ new Map(), i = (n, t) => e(n, t, r, c), f = (n, t) => (process.env.NODE_ENV !== "production" && a(!1, "motion() is deprecated. Use motion.create() instead."), i(n, t));
|
|
7
|
+
return new Proxy(f, {
|
|
8
|
+
/**
|
|
9
|
+
* Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
|
|
10
|
+
* The prop name is passed through as `key` and we can use that to generate a `motion`
|
|
11
|
+
* DOM component with that name.
|
|
12
|
+
*/
|
|
13
|
+
get: (n, t) => t === "create" ? i : (o.has(t) || o.set(t, e(t, void 0, r, c)), o.get(t))
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
u as createMotionProxy
|
|
18
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { animations as o } from "../../../motion/features/animations.js";
|
|
2
|
+
import { drag as r } from "../../../motion/features/drag.js";
|
|
3
|
+
import { gestureAnimations as t } from "../../../motion/features/gestures.js";
|
|
4
|
+
import { layout as m } from "../../../motion/features/layout.js";
|
|
5
|
+
const f = {
|
|
6
|
+
...o,
|
|
7
|
+
...t,
|
|
8
|
+
...r,
|
|
9
|
+
...m
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
f as featureBundle
|
|
13
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createDomVisualElement as o } from "../../dom/create-visual-element.js";
|
|
2
|
+
import { createMotionProxy as r } from "../create-proxy.js";
|
|
3
|
+
import { featureBundle as t } from "./feature-bundle.js";
|
|
4
|
+
const n = /* @__PURE__ */ r(t, o);
|
|
5
|
+
export {
|
|
6
|
+
n as motion
|
|
7
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Fragment as m } from "react";
|
|
2
|
+
import { isSVGComponent as t } from "./utils/is-svg-component.js";
|
|
3
|
+
import { SVGVisualElement as o } from "../../../../../motion-dom/dist/es/render/svg/SVGVisualElement.js";
|
|
4
|
+
import { HTMLVisualElement as i } from "../../../../../motion-dom/dist/es/render/html/HTMLVisualElement.js";
|
|
5
|
+
const G = (r, e) => e.isSVG ?? t(r) ? new o(e) : new i(e, {
|
|
6
|
+
allowProjection: r !== m
|
|
7
|
+
});
|
|
8
|
+
export {
|
|
9
|
+
G as createDomVisualElement
|
|
10
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Fragment as p, useMemo as P, createElement as a } from "react";
|
|
2
|
+
import { useHTMLProps as d } from "../html/use-props.js";
|
|
3
|
+
import { useSVGProps as V } from "../svg/use-props.js";
|
|
4
|
+
import { filterProps as g } from "./utils/filter-props.js";
|
|
5
|
+
import { isSVGComponent as h } from "./utils/is-svg-component.js";
|
|
6
|
+
import { isMotionValue as M } from "../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
|
|
7
|
+
function H(r, s, o, { latestValues: t }, i, m = !1, n) {
|
|
8
|
+
const l = (n ?? h(r) ? V : d)(s, t, i, r), u = g(s, typeof r == "string", m), f = r !== p ? { ...u, ...l, ref: o } : {}, { children: e } = s, c = P(() => M(e) ? e.get() : e, [e]);
|
|
9
|
+
return a(r, {
|
|
10
|
+
...f,
|
|
11
|
+
children: c
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
H as useRender
|
|
16
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { isValidMotionProp as n } from "../../../motion/utils/valid-prop.js";
|
|
2
|
+
import { isMotionValue as f } from "../../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
|
|
3
|
+
let r = (t) => !n(t);
|
|
4
|
+
function u(t) {
|
|
5
|
+
typeof t == "function" && (r = (i) => i.startsWith("on") ? !n(i) : t(i));
|
|
6
|
+
}
|
|
7
|
+
try {
|
|
8
|
+
u(require("@emotion/is-prop-valid").default);
|
|
9
|
+
} catch {
|
|
10
|
+
}
|
|
11
|
+
function s(t, i, a) {
|
|
12
|
+
const e = {};
|
|
13
|
+
for (const o in t)
|
|
14
|
+
o === "values" && typeof t.values == "object" || f(t[o]) || (r(o) || a === !0 && n(o) || !i && !n(o) || // If trying to use native HTML drag events, forward drag listeners
|
|
15
|
+
t.draggable && o.startsWith("onDrag")) && (e[o] = t[o]);
|
|
16
|
+
return e;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
s as filterProps,
|
|
20
|
+
u as loadExternalIsValidProp
|
|
21
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { lowercaseSVGElements as r } from "../../svg/lowercase-elements.js";
|
|
2
|
+
function s(e) {
|
|
3
|
+
return (
|
|
4
|
+
/**
|
|
5
|
+
* If it's not a string, it's a custom React component. Currently we only support
|
|
6
|
+
* HTML custom React components.
|
|
7
|
+
*/
|
|
8
|
+
typeof e != "string" || /**
|
|
9
|
+
* If it contains a dash, the element is a custom HTML webcomponent.
|
|
10
|
+
*/
|
|
11
|
+
e.includes("-") ? !1 : (
|
|
12
|
+
/**
|
|
13
|
+
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
14
|
+
*/
|
|
15
|
+
!!(r.indexOf(e) > -1 || /**
|
|
16
|
+
* If it contains a capital letter, it's an SVG component
|
|
17
|
+
*/
|
|
18
|
+
/[A-Z]/u.test(e))
|
|
19
|
+
)
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
s as isSVGComponent
|
|
24
|
+
};
|