@code0-tech/pictor 1.1.0 → 1.1.1
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/_virtual/rolldown_runtime.js +3 -12
- package/dist/components/alert/Alert.js +19 -20
- package/dist/components/aurora/Aurora.js +15 -16
- package/dist/components/avatar/Avatar.js +44 -44
- package/dist/components/badge/Badge.js +36 -37
- package/dist/components/button/Button.js +16 -17
- package/dist/components/button-group/ButtonGroup.js +15 -16
- package/dist/components/card/Card.js +21 -22
- package/dist/components/card/CardSection.js +15 -15
- package/dist/components/chart/Chart.js +82 -82
- package/dist/components/chart/LineChart.js +50 -51
- package/dist/components/col/Col.js +9 -10
- package/dist/components/command/Command.js +32 -33
- package/dist/components/container/Container.js +9 -10
- package/dist/components/context-menu/ContextMenu.js +76 -77
- package/dist/components/data-table/DataTableColumn.js +9 -10
- package/dist/components/data-table/DataTableFilterInput.js +83 -83
- package/dist/components/data-table/DataTableFilterSuggestionMenu.js +26 -27
- package/dist/components/data-table/DataTableHeader.js +20 -21
- package/dist/components/data-table/DataTablePagination.js +27 -28
- package/dist/components/dialog/Dialog.js +61 -62
- package/dist/components/file-tabs/FileTabs.js +51 -52
- package/dist/components/flex/Flex.js +9 -10
- package/dist/components/form/CheckboxInput.js +50 -51
- package/dist/components/form/ColorInput.js +242 -242
- package/dist/components/form/DateInput.js +55 -55
- package/dist/components/form/EditorInput.js +300 -300
- package/dist/components/form/FileInput.js +67 -68
- package/dist/components/form/InputDescription.js +3 -4
- package/dist/components/form/InputLabel.js +9 -10
- package/dist/components/form/InputMessage.js +6 -7
- package/dist/components/form/InputWrapper.js +37 -38
- package/dist/components/form/PasswordInput.js +2 -2
- package/dist/components/form/PinInput.js +30 -31
- package/dist/components/form/RadioGroup.js +22 -23
- package/dist/components/form/RadioInput.js +19 -20
- package/dist/components/form/SelectInput.js +55 -56
- package/dist/components/form/TagInput.js +44 -44
- package/dist/components/fullscreen/FullScreen.js +14 -15
- package/dist/components/gantt/Gantt.js +63 -64
- package/dist/components/gantt/GanttGroup.js +2 -2
- package/dist/components/gantt/GanttHeader.js +40 -41
- package/dist/components/gantt/GanttItem.js +11 -12
- package/dist/components/icon/Icon.js +22 -22
- package/dist/components/json-view/JsonView.js +37 -38
- package/dist/components/layout/Layout.js +64 -65
- package/dist/components/menu/Menu.js +91 -92
- package/dist/components/quote/Quote.js +29 -30
- package/dist/components/resizable/Resizable.js +22 -23
- package/dist/components/row/Row.js +9 -10
- package/dist/components/scroll-area/ScrollArea.js +46 -47
- package/dist/components/segmented-control/SegmentedControl.js +35 -35
- package/dist/components/spacing/Spacing.js +8 -9
- package/dist/components/tab/Tab.js +53 -53
- package/dist/components/text/Text.js +9 -10
- package/dist/components/toast/Toast.js +47 -47
- package/dist/components/tooltip/Tooltip.js +35 -36
- package/dist/utils/contextStore.js +31 -32
- package/dist/utils/motion.js +39 -40
- package/package.json +4 -4
- package/dist/_virtual/__vite-optional-peer-dep_@emotion/is-prop-valid_framer-motion.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -59
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -51
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -58
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -18
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -15
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -256
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -20
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -57
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +0 -25
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +0 -18
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -136
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -40
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +0 -24
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -37
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -23
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -49
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -11
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -59
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -11
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -44
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -22
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +0 -68
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -19
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -56
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -48
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/render/components/m/proxy.js +0 -3
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +0 -11
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -19
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -17
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -24
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -28
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -24
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +0 -11
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +0 -23
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -5
- package/dist/node_modules/motion/dist/es/react.js +0 -196
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +0 -105
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +0 -127
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +0 -82
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +0 -26
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +0 -30
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +0 -164
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +0 -43
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +0 -54
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +0 -24
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +0 -59
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +0 -65
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +0 -3
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +0 -23
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +0 -3
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +0 -33
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +0 -28
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +0 -3
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +0 -30
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +0 -26
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +0 -23
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +0 -41
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +0 -28
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +0 -26
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +0 -580
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +0 -49
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +0 -201
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +0 -26
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +0 -54
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +0 -26
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/render/store.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +0 -38
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +0 -26
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +0 -133
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +0 -35
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/resize/index.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/stats/buffer.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +0 -31
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +0 -28
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +0 -50
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +0 -3
- package/dist/node_modules/motion-dom/dist/es/value/index.js +0 -90
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +0 -24
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +0 -50
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +0 -62
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +0 -30
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/array.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/clamp.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +0 -3
- package/dist/node_modules/motion-utils/dist/es/easing/back.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +0 -16
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js +0 -3
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +0 -29
- package/dist/node_modules/motion-utils/dist/es/errors.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/global-config.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/is-object.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/memo.js +0 -6
- package/dist/node_modules/motion-utils/dist/es/noop.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/pipe.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/progress.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +0 -24
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/warn-once.js +0 -6
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +0 -21
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +0 -18
- package/dist/node_modules/react/compiler-runtime.js +0 -8
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { pipe } from "../../../../motion-utils/dist/es/pipe.js";
|
|
2
|
-
import { Feature } from "../../../../motion-dom/dist/es/render/Feature.js";
|
|
3
|
-
import { addDomEvent } from "../../../../motion-dom/dist/es/events/add-dom-event.js";
|
|
4
|
-
var FocusGesture = class extends Feature {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments), this.isActive = !1;
|
|
7
|
-
}
|
|
8
|
-
onFocus() {
|
|
9
|
-
let e = !1;
|
|
10
|
-
try {
|
|
11
|
-
e = this.node.current.matches(":focus-visible");
|
|
12
|
-
} catch {
|
|
13
|
-
e = !0;
|
|
14
|
-
}
|
|
15
|
-
!e || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
|
|
16
|
-
}
|
|
17
|
-
onBlur() {
|
|
18
|
-
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
19
|
-
}
|
|
20
|
-
mount() {
|
|
21
|
-
this.unmount = pipe(addDomEvent(this.node.current, "focus", () => this.onFocus()), addDomEvent(this.node.current, "blur", () => this.onBlur()));
|
|
22
|
-
}
|
|
23
|
-
unmount() {}
|
|
24
|
-
};
|
|
25
|
-
export { FocusGesture };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { frame } from "../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
2
|
-
import { hover } from "../../../../motion-dom/dist/es/gestures/hover.js";
|
|
3
|
-
import { Feature } from "../../../../motion-dom/dist/es/render/Feature.js";
|
|
4
|
-
import { extractEventInfo } from "../events/event-info.js";
|
|
5
|
-
function handleHoverEvent(n, r, i) {
|
|
6
|
-
let { props: a } = n;
|
|
7
|
-
n.animationState && a.whileHover && n.animationState.setActive("whileHover", i === "Start");
|
|
8
|
-
let o = a["onHover" + i];
|
|
9
|
-
o && frame.postRender(() => o(r, extractEventInfo(r)));
|
|
10
|
-
}
|
|
11
|
-
var HoverGesture = class extends Feature {
|
|
12
|
-
mount() {
|
|
13
|
-
let { current: e } = this.node;
|
|
14
|
-
e && (this.unmount = hover(e, (e, n) => (handleHoverEvent(this.node, n, "Start"), (e) => handleHoverEvent(this.node, e, "End"))));
|
|
15
|
-
}
|
|
16
|
-
unmount() {}
|
|
17
|
-
};
|
|
18
|
-
export { HoverGesture };
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { pipe } from "../../../../../motion-utils/dist/es/pipe.js";
|
|
2
|
-
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../../motion-utils/dist/es/time-conversion.js";
|
|
3
|
-
import { cancelFrame, frame, frameData } from "../../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
4
|
-
import { isPrimaryPointer } from "../../../../../motion-dom/dist/es/gestures/utils/is-primary-pointer.js";
|
|
5
|
-
import { extractEventInfo } from "../../events/event-info.js";
|
|
6
|
-
import { addPointerEvent } from "../../events/add-pointer-event.js";
|
|
7
|
-
import { distance2D } from "../../utils/distance.js";
|
|
8
|
-
var overflowStyles = /* @__PURE__ */ new Set(["auto", "scroll"]), PanSession = class {
|
|
9
|
-
constructor(i, a, { transformPagePoint: o, contextWindow: f = window, dragSnapToOrigin: p = !1, distanceThreshold: m = 3, element: h } = {}) {
|
|
10
|
-
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.lastRawMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.removeScrollListeners = null, this.onElementScroll = (e) => {
|
|
11
|
-
this.handleScroll(e.target);
|
|
12
|
-
}, this.onWindowScroll = () => {
|
|
13
|
-
this.handleScroll(window);
|
|
14
|
-
}, this.updatePoint = () => {
|
|
15
|
-
if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return;
|
|
16
|
-
this.lastRawMoveEventInfo && (this.lastMoveEventInfo = transformPoint(this.lastRawMoveEventInfo, this.transformPagePoint));
|
|
17
|
-
let e = getPanInfo(this.lastMoveEventInfo, this.history), i = this.startEvent !== null, a = distance2D(e.offset, {
|
|
18
|
-
x: 0,
|
|
19
|
-
y: 0
|
|
20
|
-
}) >= this.distanceThreshold;
|
|
21
|
-
if (!i && !a) return;
|
|
22
|
-
let { point: o } = e, { timestamp: s } = frameData;
|
|
23
|
-
this.history.push({
|
|
24
|
-
...o,
|
|
25
|
-
timestamp: s
|
|
26
|
-
});
|
|
27
|
-
let { onStart: l, onMove: u } = this.handlers;
|
|
28
|
-
i || (l && l(this.lastMoveEvent, e), this.startEvent = this.lastMoveEvent), u && u(this.lastMoveEvent, e);
|
|
29
|
-
}, this.handlePointerMove = (e, i) => {
|
|
30
|
-
this.lastMoveEvent = e, this.lastRawMoveEventInfo = i, this.lastMoveEventInfo = transformPoint(i, this.transformPagePoint), frame.update(this.updatePoint, !0);
|
|
31
|
-
}, this.handlePointerUp = (e, i) => {
|
|
32
|
-
this.end();
|
|
33
|
-
let { onEnd: a, onSessionEnd: o, resumeAnimation: s } = this.handlers;
|
|
34
|
-
if ((this.dragSnapToOrigin || !this.startEvent) && s && s(), !(this.lastMoveEvent && this.lastMoveEventInfo)) return;
|
|
35
|
-
let c = getPanInfo(e.type === "pointercancel" ? this.lastMoveEventInfo : transformPoint(i, this.transformPagePoint), this.history);
|
|
36
|
-
this.startEvent && a && a(e, c), o && o(e, c);
|
|
37
|
-
}, !isPrimaryPointer(i)) return;
|
|
38
|
-
this.dragSnapToOrigin = p, this.handlers = a, this.transformPagePoint = o, this.distanceThreshold = m, this.contextWindow = f || window;
|
|
39
|
-
let g = transformPoint(extractEventInfo(i), this.transformPagePoint), { point: _ } = g, { timestamp: v } = frameData;
|
|
40
|
-
this.history = [{
|
|
41
|
-
..._,
|
|
42
|
-
timestamp: v
|
|
43
|
-
}];
|
|
44
|
-
let { onSessionStart: y } = a;
|
|
45
|
-
y && y(i, getPanInfo(g, this.history));
|
|
46
|
-
let b = {
|
|
47
|
-
passive: !0,
|
|
48
|
-
capture: !0
|
|
49
|
-
};
|
|
50
|
-
this.removeListeners = pipe(addPointerEvent(this.contextWindow, "pointermove", this.handlePointerMove, b), addPointerEvent(this.contextWindow, "pointerup", this.handlePointerUp, b), addPointerEvent(this.contextWindow, "pointercancel", this.handlePointerUp, b)), h && this.startScrollTracking(h);
|
|
51
|
-
}
|
|
52
|
-
startScrollTracking(e) {
|
|
53
|
-
let i = e.parentElement;
|
|
54
|
-
for (; i;) {
|
|
55
|
-
let e = getComputedStyle(i);
|
|
56
|
-
(overflowStyles.has(e.overflowX) || overflowStyles.has(e.overflowY)) && this.scrollPositions.set(i, {
|
|
57
|
-
x: i.scrollLeft,
|
|
58
|
-
y: i.scrollTop
|
|
59
|
-
}), i = i.parentElement;
|
|
60
|
-
}
|
|
61
|
-
this.scrollPositions.set(window, {
|
|
62
|
-
x: window.scrollX,
|
|
63
|
-
y: window.scrollY
|
|
64
|
-
}), window.addEventListener("scroll", this.onElementScroll, { capture: !0 }), window.addEventListener("scroll", this.onWindowScroll), this.removeScrollListeners = () => {
|
|
65
|
-
window.removeEventListener("scroll", this.onElementScroll, { capture: !0 }), window.removeEventListener("scroll", this.onWindowScroll);
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
handleScroll(e) {
|
|
69
|
-
let i = this.scrollPositions.get(e);
|
|
70
|
-
if (!i) return;
|
|
71
|
-
let a = e === window, o = a ? {
|
|
72
|
-
x: window.scrollX,
|
|
73
|
-
y: window.scrollY
|
|
74
|
-
} : {
|
|
75
|
-
x: e.scrollLeft,
|
|
76
|
-
y: e.scrollTop
|
|
77
|
-
}, c = {
|
|
78
|
-
x: o.x - i.x,
|
|
79
|
-
y: o.y - i.y
|
|
80
|
-
};
|
|
81
|
-
c.x === 0 && c.y === 0 || (a ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += c.x, this.lastMoveEventInfo.point.y += c.y) : this.history.length > 0 && (this.history[0].x -= c.x, this.history[0].y -= c.y), this.scrollPositions.set(e, o), frame.update(this.updatePoint, !0));
|
|
82
|
-
}
|
|
83
|
-
updateHandlers(e) {
|
|
84
|
-
this.handlers = e;
|
|
85
|
-
}
|
|
86
|
-
end() {
|
|
87
|
-
this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), cancelFrame(this.updatePoint);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
function transformPoint(e, i) {
|
|
91
|
-
return i ? { point: i(e.point) } : e;
|
|
92
|
-
}
|
|
93
|
-
function subtractPoint(e, i) {
|
|
94
|
-
return {
|
|
95
|
-
x: e.x - i.x,
|
|
96
|
-
y: e.y - i.y
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
function getPanInfo({ point: e }, i) {
|
|
100
|
-
return {
|
|
101
|
-
point: e,
|
|
102
|
-
delta: subtractPoint(e, lastDevicePoint(i)),
|
|
103
|
-
offset: subtractPoint(e, startDevicePoint(i)),
|
|
104
|
-
velocity: getVelocity(i, .1)
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
function startDevicePoint(e) {
|
|
108
|
-
return e[0];
|
|
109
|
-
}
|
|
110
|
-
function lastDevicePoint(e) {
|
|
111
|
-
return e[e.length - 1];
|
|
112
|
-
}
|
|
113
|
-
function getVelocity(e, o) {
|
|
114
|
-
if (e.length < 2) return {
|
|
115
|
-
x: 0,
|
|
116
|
-
y: 0
|
|
117
|
-
};
|
|
118
|
-
let s = e.length - 1, c = null, l = lastDevicePoint(e);
|
|
119
|
-
for (; s >= 0 && (c = e[s], !(l.timestamp - c.timestamp > secondsToMilliseconds(o)));) s--;
|
|
120
|
-
if (!c) return {
|
|
121
|
-
x: 0,
|
|
122
|
-
y: 0
|
|
123
|
-
};
|
|
124
|
-
c === e[0] && e.length > 2 && l.timestamp - c.timestamp > secondsToMilliseconds(o) * 2 && (c = e[1]);
|
|
125
|
-
let u = millisecondsToSeconds(l.timestamp - c.timestamp);
|
|
126
|
-
if (u === 0) return {
|
|
127
|
-
x: 0,
|
|
128
|
-
y: 0
|
|
129
|
-
};
|
|
130
|
-
let d = {
|
|
131
|
-
x: (l.x - c.x) / u,
|
|
132
|
-
y: (l.y - c.y) / u
|
|
133
|
-
};
|
|
134
|
-
return d.x === Infinity && (d.x = 0), d.y === Infinity && (d.y = 0), d;
|
|
135
|
-
}
|
|
136
|
-
export { PanSession };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { noop } from "../../../../../motion-utils/dist/es/noop.js";
|
|
2
|
-
import { frame } from "../../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
3
|
-
import { Feature } from "../../../../../motion-dom/dist/es/render/Feature.js";
|
|
4
|
-
import { addPointerEvent } from "../../events/add-pointer-event.js";
|
|
5
|
-
import { getContextWindow } from "../../utils/get-context-window.js";
|
|
6
|
-
import { PanSession } from "./PanSession.js";
|
|
7
|
-
var asyncHandler = (e) => (a, o) => {
|
|
8
|
-
e && frame.update(() => e(a, o), !1, !0);
|
|
9
|
-
}, PanGesture = class extends Feature {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments), this.removePointerDownListener = noop;
|
|
12
|
-
}
|
|
13
|
-
onPointerDown(e) {
|
|
14
|
-
this.session = new PanSession(e, this.createPanHandlers(), {
|
|
15
|
-
transformPagePoint: this.node.getTransformPagePoint(),
|
|
16
|
-
contextWindow: getContextWindow(this.node)
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
createPanHandlers() {
|
|
20
|
-
let { onPanSessionStart: e, onPanStart: a, onPan: o, onPanEnd: s } = this.node.getProps();
|
|
21
|
-
return {
|
|
22
|
-
onSessionStart: asyncHandler(e),
|
|
23
|
-
onStart: asyncHandler(a),
|
|
24
|
-
onMove: asyncHandler(o),
|
|
25
|
-
onEnd: (e, a) => {
|
|
26
|
-
delete this.session, s && frame.postRender(() => s(e, a));
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
mount() {
|
|
31
|
-
this.removePointerDownListener = addPointerEvent(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
|
|
32
|
-
}
|
|
33
|
-
update() {
|
|
34
|
-
this.session && this.session.updateHandlers(this.createPanHandlers());
|
|
35
|
-
}
|
|
36
|
-
unmount() {
|
|
37
|
-
this.removePointerDownListener(), this.session && this.session.end();
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
export { PanGesture };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { frame } from "../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
2
|
-
import { press } from "../../../../motion-dom/dist/es/gestures/press/index.js";
|
|
3
|
-
import { Feature } from "../../../../motion-dom/dist/es/render/Feature.js";
|
|
4
|
-
import { extractEventInfo } from "../events/event-info.js";
|
|
5
|
-
function handlePressEvent(t, n, i) {
|
|
6
|
-
let { props: a } = t;
|
|
7
|
-
if (t.current instanceof HTMLButtonElement && t.current.disabled) return;
|
|
8
|
-
t.animationState && a.whileTap && t.animationState.setActive("whileTap", i === "Start");
|
|
9
|
-
let o = a["onTap" + (i === "End" ? "" : i)];
|
|
10
|
-
o && frame.postRender(() => o(n, extractEventInfo(n)));
|
|
11
|
-
}
|
|
12
|
-
var PressGesture = class extends Feature {
|
|
13
|
-
mount() {
|
|
14
|
-
let { current: e } = this.node;
|
|
15
|
-
if (!e) return;
|
|
16
|
-
let { globalTapTarget: n, propagate: r } = this.node.props;
|
|
17
|
-
this.unmount = press(e, (e, t) => (handlePressEvent(this.node, t, "Start"), (e, { success: t }) => handlePressEvent(this.node, e, t ? "End" : "Cancel")), {
|
|
18
|
-
useGlobalTarget: n,
|
|
19
|
-
stopPropagation: r?.tap === !1
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
unmount() {}
|
|
23
|
-
};
|
|
24
|
-
export { PressGesture };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { resolveVariant } from "../../../../../../motion-dom/dist/es/render/utils/resolve-dynamic-variants.js";
|
|
2
|
-
import { Feature } from "../../../../../../motion-dom/dist/es/render/Feature.js";
|
|
3
|
-
var id = 0, ExitAnimationFeature = class extends Feature {
|
|
4
|
-
constructor() {
|
|
5
|
-
super(...arguments), this.id = id++, this.isExitComplete = !1;
|
|
6
|
-
}
|
|
7
|
-
update() {
|
|
8
|
-
if (!this.node.presenceContext) return;
|
|
9
|
-
let { isPresent: t, onExitComplete: n } = this.node.presenceContext, { isPresent: r } = this.node.prevPresenceContext || {};
|
|
10
|
-
if (!this.node.animationState || t === r) return;
|
|
11
|
-
if (t && r === !1) {
|
|
12
|
-
if (this.isExitComplete) {
|
|
13
|
-
let { initial: t, custom: n } = this.node.getProps();
|
|
14
|
-
if (typeof t == "string" || typeof t == "object" && t && !Array.isArray(t)) {
|
|
15
|
-
let r = resolveVariant(this.node, t, n);
|
|
16
|
-
if (r) {
|
|
17
|
-
let { transition: e, transitionEnd: t, ...n } = r;
|
|
18
|
-
for (let e in n) this.node.getValue(e)?.jump(n[e]);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
this.node.animationState.reset(), this.node.animationState.animateChanges();
|
|
22
|
-
} else this.node.animationState.setActive("exit", !1);
|
|
23
|
-
this.isExitComplete = !1;
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
let i = this.node.animationState.setActive("exit", !t);
|
|
27
|
-
n && !t && i.then(() => {
|
|
28
|
-
this.isExitComplete = !0, n(this.id);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
mount() {
|
|
32
|
-
let { register: e, onExitComplete: t } = this.node.presenceContext || {};
|
|
33
|
-
t && t(this.id), e && (this.unmount = e(this.id));
|
|
34
|
-
}
|
|
35
|
-
unmount() {}
|
|
36
|
-
};
|
|
37
|
-
export { ExitAnimationFeature };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { isAnimationControls } from "../../../../../../motion-dom/dist/es/render/utils/is-animation-controls.js";
|
|
2
|
-
import { Feature } from "../../../../../../motion-dom/dist/es/render/Feature.js";
|
|
3
|
-
import { createAnimationState } from "../../../../../../motion-dom/dist/es/render/utils/animation-state.js";
|
|
4
|
-
var AnimationFeature = class extends Feature {
|
|
5
|
-
constructor(e) {
|
|
6
|
-
super(e), e.animationState ||= createAnimationState(e);
|
|
7
|
-
}
|
|
8
|
-
updateAnimationControlsSubscription() {
|
|
9
|
-
let { animate: r } = this.node.getProps();
|
|
10
|
-
isAnimationControls(r) && (this.unmountControls = r.subscribe(this.node));
|
|
11
|
-
}
|
|
12
|
-
mount() {
|
|
13
|
-
this.updateAnimationControlsSubscription();
|
|
14
|
-
}
|
|
15
|
-
update() {
|
|
16
|
-
let { animate: e } = this.node.getProps(), { animate: r } = this.node.prevProps || {};
|
|
17
|
-
e !== r && this.updateAnimationControlsSubscription();
|
|
18
|
-
}
|
|
19
|
-
unmount() {
|
|
20
|
-
this.node.animationState.reset(), this.unmountControls?.();
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
export { AnimationFeature };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { getFeatureDefinitions, setFeatureDefinitions } from "../../../../../motion-dom/dist/es/render/VisualElement.js";
|
|
2
|
-
var featureProps = {
|
|
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: [
|
|
17
|
-
"whileHover",
|
|
18
|
-
"onHoverStart",
|
|
19
|
-
"onHoverEnd"
|
|
20
|
-
],
|
|
21
|
-
tap: [
|
|
22
|
-
"whileTap",
|
|
23
|
-
"onTap",
|
|
24
|
-
"onTapStart",
|
|
25
|
-
"onTapCancel"
|
|
26
|
-
],
|
|
27
|
-
pan: [
|
|
28
|
-
"onPan",
|
|
29
|
-
"onPanStart",
|
|
30
|
-
"onPanSessionStart",
|
|
31
|
-
"onPanEnd"
|
|
32
|
-
],
|
|
33
|
-
inView: [
|
|
34
|
-
"whileInView",
|
|
35
|
-
"onViewportEnter",
|
|
36
|
-
"onViewportLeave"
|
|
37
|
-
],
|
|
38
|
-
layout: ["layout", "layoutId"]
|
|
39
|
-
}, isInitialized = !1;
|
|
40
|
-
function initFeatureDefinitions() {
|
|
41
|
-
if (isInitialized) return;
|
|
42
|
-
let e = {};
|
|
43
|
-
for (let a in featureProps) e[a] = { isEnabled: (e) => featureProps[a].some((a) => !!e[a]) };
|
|
44
|
-
setFeatureDefinitions(e), isInitialized = !0;
|
|
45
|
-
}
|
|
46
|
-
function getInitializedFeatureDefinitions() {
|
|
47
|
-
return initFeatureDefinitions(), getFeatureDefinitions();
|
|
48
|
-
}
|
|
49
|
-
export { getInitializedFeatureDefinitions };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { HTMLProjectionNode } from "../../../../../motion-dom/dist/es/projection/node/HTMLProjectionNode.js";
|
|
2
|
-
import { DragGesture } from "../../gestures/drag/index.js";
|
|
3
|
-
import { PanGesture } from "../../gestures/pan/index.js";
|
|
4
|
-
import { MeasureLayout } from "./layout/MeasureLayout.js";
|
|
5
|
-
var drag = {
|
|
6
|
-
pan: { Feature: PanGesture },
|
|
7
|
-
drag: {
|
|
8
|
-
Feature: DragGesture,
|
|
9
|
-
ProjectionNode: HTMLProjectionNode,
|
|
10
|
-
MeasureLayout
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
export { drag };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HoverGesture } from "../../gestures/hover.js";
|
|
2
|
-
import { FocusGesture } from "../../gestures/focus.js";
|
|
3
|
-
import { PressGesture } from "../../gestures/press.js";
|
|
4
|
-
import { InViewFeature } from "./viewport/index.js";
|
|
5
|
-
var gestureAnimations = {
|
|
6
|
-
inView: { Feature: InViewFeature },
|
|
7
|
-
tap: { Feature: PressGesture },
|
|
8
|
-
focus: { Feature: FocusGesture },
|
|
9
|
-
hover: { Feature: HoverGesture }
|
|
10
|
-
};
|
|
11
|
-
export { gestureAnimations };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { LayoutGroupContext } from "../../../context/LayoutGroupContext.js";
|
|
3
|
-
import { frame } from "../../../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
4
|
-
import { microtask } from "../../../../../../motion-dom/dist/es/frameloop/microtask.js";
|
|
5
|
-
import { globalProjectionState } from "../../../../../../motion-dom/dist/es/projection/node/state.js";
|
|
6
|
-
import { usePresence } from "../../../components/AnimatePresence/use-presence.js";
|
|
7
|
-
import { SwitchLayoutGroupContext } from "../../../context/SwitchLayoutGroupContext.js";
|
|
8
|
-
import { Component, useContext } from "react";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
var hasTakenAnySnapshot = !1, MeasureLayoutWithContext = class extends Component {
|
|
11
|
-
componentDidMount() {
|
|
12
|
-
let { visualElement: e, layoutGroup: o, switchLayoutGroup: s, layoutId: l } = this.props, { projection: u } = e;
|
|
13
|
-
u && (o.group && o.group.add(u), s && s.register && l && s.register(u), hasTakenAnySnapshot && u.root.didUpdate(), u.addEventListener("animationComplete", () => {
|
|
14
|
-
this.safeToRemove();
|
|
15
|
-
}), u.setOptions({
|
|
16
|
-
...u.options,
|
|
17
|
-
layoutDependency: this.props.layoutDependency,
|
|
18
|
-
onExitComplete: () => this.safeToRemove()
|
|
19
|
-
})), globalProjectionState.hasEverUpdated = !0;
|
|
20
|
-
}
|
|
21
|
-
getSnapshotBeforeUpdate(e) {
|
|
22
|
-
let { layoutDependency: s, visualElement: c, drag: l, isPresent: u } = this.props, { projection: d } = c;
|
|
23
|
-
return d ? (d.isPresent = u, e.layoutDependency !== s && d.setOptions({
|
|
24
|
-
...d.options,
|
|
25
|
-
layoutDependency: s
|
|
26
|
-
}), hasTakenAnySnapshot = !0, l || e.layoutDependency !== s || s === void 0 || e.isPresent !== u ? d.willUpdate() : this.safeToRemove(), e.isPresent !== u && (u ? d.promote() : d.relegate() || frame.postRender(() => {
|
|
27
|
-
let e = d.getStack();
|
|
28
|
-
(!e || !e.members.length) && this.safeToRemove();
|
|
29
|
-
})), null) : null;
|
|
30
|
-
}
|
|
31
|
-
componentDidUpdate() {
|
|
32
|
-
let { visualElement: e, layoutAnchor: o } = this.props, { projection: c } = e;
|
|
33
|
-
c && (c.options.layoutAnchor = o, c.root.didUpdate(), microtask.postRender(() => {
|
|
34
|
-
!c.currentAnimation && c.isLead() && this.safeToRemove();
|
|
35
|
-
}));
|
|
36
|
-
}
|
|
37
|
-
componentWillUnmount() {
|
|
38
|
-
let { visualElement: e, layoutGroup: o, switchLayoutGroup: s } = this.props, { projection: c } = e;
|
|
39
|
-
hasTakenAnySnapshot = !0, c && (c.scheduleCheckAfterUnmount(), o && o.group && o.group.remove(c), s && s.deregister && s.deregister(c));
|
|
40
|
-
}
|
|
41
|
-
safeToRemove() {
|
|
42
|
-
let { safeToRemove: e } = this.props;
|
|
43
|
-
e && e();
|
|
44
|
-
}
|
|
45
|
-
render() {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
function MeasureLayout(o) {
|
|
50
|
-
let [s, c] = usePresence(), d = useContext(LayoutGroupContext);
|
|
51
|
-
return jsx(MeasureLayoutWithContext, {
|
|
52
|
-
...o,
|
|
53
|
-
layoutGroup: d,
|
|
54
|
-
switchLayoutGroup: useContext(SwitchLayoutGroupContext),
|
|
55
|
-
isPresent: s,
|
|
56
|
-
safeToRemove: c
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
export { MeasureLayout };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { HTMLProjectionNode } from "../../../../../motion-dom/dist/es/projection/node/HTMLProjectionNode.js";
|
|
2
|
-
import { MeasureLayout } from "./layout/MeasureLayout.js";
|
|
3
|
-
var layout = { layout: {
|
|
4
|
-
ProjectionNode: HTMLProjectionNode,
|
|
5
|
-
MeasureLayout
|
|
6
|
-
} };
|
|
7
|
-
export { layout };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { setFeatureDefinitions } from "../../../../../motion-dom/dist/es/render/VisualElement.js";
|
|
2
|
-
import { getInitializedFeatureDefinitions } from "./definitions.js";
|
|
3
|
-
function loadFeatures(n) {
|
|
4
|
-
let r = getInitializedFeatureDefinitions();
|
|
5
|
-
for (let e in n) r[e] = {
|
|
6
|
-
...r[e],
|
|
7
|
-
...n[e]
|
|
8
|
-
};
|
|
9
|
-
setFeatureDefinitions(r);
|
|
10
|
-
}
|
|
11
|
-
export { loadFeatures };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Feature } from "../../../../../../motion-dom/dist/es/render/Feature.js";
|
|
2
|
-
import { observeIntersection } from "./observers.js";
|
|
3
|
-
var thresholdNames = {
|
|
4
|
-
some: 0,
|
|
5
|
-
all: 1
|
|
6
|
-
}, InViewFeature = class extends Feature {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
9
|
-
}
|
|
10
|
-
startObserver() {
|
|
11
|
-
this.stopObserver?.();
|
|
12
|
-
let { viewport: e = {} } = this.node.getProps(), { root: r, margin: i, amount: a = "some", once: o } = e, s = {
|
|
13
|
-
root: r ? r.current : void 0,
|
|
14
|
-
rootMargin: i,
|
|
15
|
-
threshold: typeof a == "number" ? a : thresholdNames[a]
|
|
16
|
-
};
|
|
17
|
-
this.stopObserver = observeIntersection(this.node.current, s, (e) => {
|
|
18
|
-
let { isIntersecting: t } = e;
|
|
19
|
-
if (this.isInView === t || (this.isInView = t, o && !t && this.hasEnteredView)) return;
|
|
20
|
-
t && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", t);
|
|
21
|
-
let { onViewportEnter: n, onViewportLeave: r } = this.node.getProps(), i = t ? n : r;
|
|
22
|
-
i && i(e);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
mount() {
|
|
26
|
-
this.startObserver();
|
|
27
|
-
}
|
|
28
|
-
update() {
|
|
29
|
-
if (typeof IntersectionObserver > "u") return;
|
|
30
|
-
let { props: e, prevProps: t } = this.node;
|
|
31
|
-
[
|
|
32
|
-
"amount",
|
|
33
|
-
"margin",
|
|
34
|
-
"root"
|
|
35
|
-
].some(hasViewportOptionChanged(e, t)) && this.startObserver();
|
|
36
|
-
}
|
|
37
|
-
unmount() {
|
|
38
|
-
this.stopObserver?.(), this.hasEnteredView = !1, this.isInView = !1;
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
function hasViewportOptionChanged({ viewport: e = {} }, { viewport: t = {} } = {}) {
|
|
42
|
-
return (n) => e[n] !== t[n];
|
|
43
|
-
}
|
|
44
|
-
export { InViewFeature };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var observerCallbacks = /* @__PURE__ */ new WeakMap(), observers = /* @__PURE__ */ new WeakMap(), fireObserverCallback = (t) => {
|
|
2
|
-
let n = observerCallbacks.get(t.target);
|
|
3
|
-
n && n(t);
|
|
4
|
-
}, fireAllObserverCallbacks = (e) => {
|
|
5
|
-
e.forEach(fireObserverCallback);
|
|
6
|
-
};
|
|
7
|
-
function initIntersectionObserver({ root: e, ...n }) {
|
|
8
|
-
let i = e || document;
|
|
9
|
-
observers.has(i) || observers.set(i, {});
|
|
10
|
-
let a = observers.get(i), o = JSON.stringify(n);
|
|
11
|
-
return a[o] || (a[o] = new IntersectionObserver(fireAllObserverCallbacks, {
|
|
12
|
-
root: e,
|
|
13
|
-
...n
|
|
14
|
-
})), a[o];
|
|
15
|
-
}
|
|
16
|
-
function observeIntersection(t, n, r) {
|
|
17
|
-
let a = initIntersectionObserver(n);
|
|
18
|
-
return observerCallbacks.set(t, r), a.observe(t), () => {
|
|
19
|
-
observerCallbacks.delete(t), a.unobserve(t);
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export { observeIntersection };
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { LayoutGroupContext } from "../context/LayoutGroupContext.js";
|
|
3
|
-
import { invariant, warning } from "../../../../motion-utils/dist/es/errors.js";
|
|
4
|
-
import { MotionConfigContext } from "../context/MotionConfigContext.js";
|
|
5
|
-
import { LazyContext } from "../context/LazyContext.js";
|
|
6
|
-
import { getInitializedFeatureDefinitions } from "./features/definitions.js";
|
|
7
|
-
import { loadFeatures } from "./features/load-features.js";
|
|
8
|
-
import { MotionContext } from "../context/MotionContext/index.js";
|
|
9
|
-
import { useCreateMotionContext } from "../context/MotionContext/create.js";
|
|
10
|
-
import { isSVGComponent } from "../render/dom/utils/is-svg-component.js";
|
|
11
|
-
import { useRender } from "../render/dom/use-render.js";
|
|
12
|
-
import { useHTMLVisualState } from "../render/html/use-html-visual-state.js";
|
|
13
|
-
import { useSVGVisualState } from "../render/svg/use-svg-visual-state.js";
|
|
14
|
-
import { motionComponentSymbol } from "./utils/symbol.js";
|
|
15
|
-
import { useMotionRef } from "./utils/use-motion-ref.js";
|
|
16
|
-
import { useVisualElement } from "./utils/use-visual-element.js";
|
|
17
|
-
import { forwardRef, useContext } from "react";
|
|
18
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
-
function createMotionComponent(e, { forwardMotionProps: f = !1, type: p } = {}, h, g) {
|
|
20
|
-
h && loadFeatures(h);
|
|
21
|
-
let C = p ? p === "svg" : isSVGComponent(e), w = C ? useSVGVisualState : useHTMLVisualState;
|
|
22
|
-
function T(p, _) {
|
|
23
|
-
let v, y = {
|
|
24
|
-
...useContext(MotionConfigContext),
|
|
25
|
-
...p,
|
|
26
|
-
layoutId: useLayoutId(p)
|
|
27
|
-
}, { isStatic: b } = y, x = useCreateMotionContext(p), S = w(p, b);
|
|
28
|
-
if (!b && typeof window < "u") {
|
|
29
|
-
useStrictMode(y, h);
|
|
30
|
-
let f = getProjectionFunctionality(y);
|
|
31
|
-
v = f.MeasureLayout, x.visualElement = useVisualElement(e, S, y, g, f.ProjectionNode, C);
|
|
32
|
-
}
|
|
33
|
-
return jsxs(MotionContext.Provider, {
|
|
34
|
-
value: x,
|
|
35
|
-
children: [v && x.visualElement ? jsx(v, {
|
|
36
|
-
visualElement: x.visualElement,
|
|
37
|
-
...y
|
|
38
|
-
}) : null, useRender(e, p, useMotionRef(S, x.visualElement, _), S, b, f, C)]
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
T.displayName = `motion.${typeof e == "string" ? e : `create(${e.displayName ?? e.name ?? ""})`}`;
|
|
42
|
-
let E = forwardRef(T);
|
|
43
|
-
return E[motionComponentSymbol] = e, E;
|
|
44
|
-
}
|
|
45
|
-
function useLayoutId({ layoutId: f }) {
|
|
46
|
-
let p = useContext(LayoutGroupContext).id;
|
|
47
|
-
return p && f !== void 0 ? p + "-" + f : f;
|
|
48
|
-
}
|
|
49
|
-
function useStrictMode(e, m) {
|
|
50
|
-
let g = useContext(LazyContext).strict;
|
|
51
|
-
if (process.env.NODE_ENV !== "production" && m && g) {
|
|
52
|
-
let m = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
53
|
-
e.ignoreStrict ? warning(!1, m, "lazy-strict-mode") : invariant(!1, m, "lazy-strict-mode");
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function getProjectionFunctionality(e) {
|
|
57
|
-
let { drag: f, layout: p } = getInitializedFeatureDefinitions();
|
|
58
|
-
if (!f && !p) return {};
|
|
59
|
-
let m = {
|
|
60
|
-
...f,
|
|
61
|
-
...p
|
|
62
|
-
};
|
|
63
|
-
return {
|
|
64
|
-
MeasureLayout: f?.isEnabled(e) || p?.isEnabled(e) ? m.MeasureLayout : void 0,
|
|
65
|
-
ProjectionNode: m.ProjectionNode
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
export { createMotionComponent };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useCallback, useInsertionEffect, useRef } from "react";
|
|
3
|
-
function useMotionRef(r, i, a) {
|
|
4
|
-
let o = useRef(a);
|
|
5
|
-
useInsertionEffect(() => {
|
|
6
|
-
o.current = a;
|
|
7
|
-
});
|
|
8
|
-
let s = useRef(null);
|
|
9
|
-
return useCallback((e) => {
|
|
10
|
-
e && r.onMount?.(e), i && (e ? i.mount(e) : i.unmount());
|
|
11
|
-
let t = o.current;
|
|
12
|
-
if (typeof t == "function") if (e) {
|
|
13
|
-
let n = t(e);
|
|
14
|
-
typeof n == "function" && (s.current = n);
|
|
15
|
-
} else s.current ? (s.current(), s.current = null) : t(e);
|
|
16
|
-
else t && (t.current = e);
|
|
17
|
-
}, [i]);
|
|
18
|
-
}
|
|
19
|
-
export { useMotionRef };
|