@code0-tech/pictor 1.1.0 → 1.1.2
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/assets/Button.style.css +1 -1
- package/dist/assets/ContextMenu.style.css +1 -1
- package/dist/assets/DateInput.style.css +1 -1
- package/dist/assets/Editor.styles.css +1 -1
- package/dist/assets/Input.style.css +1 -1
- package/dist/assets/InputWrapper.style.css +1 -1
- package/dist/assets/Menu.style.css +1 -1
- package/dist/assets/SegmentedControl.style.css +1 -1
- package/dist/assets/SelectInput.style.css +1 -1
- 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 -16
- 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.d.ts +7 -0
- package/dist/components/form/EditorInput.js +278 -273
- 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 +46 -45
- 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/node_modules/@lezer/common/dist/index.js +4 -4
- package/dist/utils/contextStore.js +31 -32
- package/dist/utils/motion.js +39 -40
- package/package.json +8 -8
- 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,11 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { warnOnce } from "../../../../../motion-utils/dist/es/warn-once.js";
|
|
3
|
-
import { hasReducedMotionListener, prefersReducedMotion } from "../../../../../motion-dom/dist/es/render/utils/reduced-motion/state.js";
|
|
4
|
-
import { initPrefersReducedMotion } from "../../../../../motion-dom/dist/es/render/utils/reduced-motion/index.js";
|
|
5
|
-
import { useState } from "react";
|
|
6
|
-
function useReducedMotion() {
|
|
7
|
-
!hasReducedMotionListener.current && initPrefersReducedMotion();
|
|
8
|
-
let [a] = useState(prefersReducedMotion.current);
|
|
9
|
-
return process.env.NODE_ENV !== "production" && warnOnce(a !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), a;
|
|
10
|
-
}
|
|
11
|
-
export { useReducedMotion };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React$1 from "react";
|
|
2
|
-
function setRef(e, t) {
|
|
3
|
-
if (typeof e == "function") return e(t);
|
|
4
|
-
e != null && (e.current = t);
|
|
5
|
-
}
|
|
6
|
-
function composeRefs(...e) {
|
|
7
|
-
return (n) => {
|
|
8
|
-
let r = !1, i = e.map((e) => {
|
|
9
|
-
let i = setRef(e, n);
|
|
10
|
-
return !r && typeof i == "function" && (r = !0), i;
|
|
11
|
-
});
|
|
12
|
-
if (r) return () => {
|
|
13
|
-
for (let n = 0; n < i.length; n++) {
|
|
14
|
-
let r = i[n];
|
|
15
|
-
typeof r == "function" ? r() : setRef(e[n], null);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function useComposedRefs(...t) {
|
|
21
|
-
return React$1.useCallback(composeRefs(...t), t);
|
|
22
|
-
}
|
|
23
|
-
export { useComposedRefs };
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import { LayoutGroupContext } from "../../../framer-motion/dist/es/context/LayoutGroupContext.js";
|
|
2
|
-
import { isBrowser } from "../../../framer-motion/dist/es/utils/is-browser.js";
|
|
3
|
-
import { useIsomorphicLayoutEffect } from "../../../framer-motion/dist/es/utils/use-isomorphic-effect.js";
|
|
4
|
-
import { PresenceContext } from "../../../framer-motion/dist/es/context/PresenceContext.js";
|
|
5
|
-
import { addUniqueItem, removeItem } from "../../../motion-utils/dist/es/array.js";
|
|
6
|
-
import { clamp } from "../../../motion-utils/dist/es/clamp.js";
|
|
7
|
-
import { invariant, warning } from "../../../motion-utils/dist/es/errors.js";
|
|
8
|
-
import { MotionGlobalConfig } from "../../../motion-utils/dist/es/global-config.js";
|
|
9
|
-
import { isNumericalString } from "../../../motion-utils/dist/es/is-numerical-string.js";
|
|
10
|
-
import { isObject } from "../../../motion-utils/dist/es/is-object.js";
|
|
11
|
-
import { isZeroValueString } from "../../../motion-utils/dist/es/is-zero-value-string.js";
|
|
12
|
-
import { memo } from "../../../motion-utils/dist/es/memo.js";
|
|
13
|
-
import { noop } from "../../../motion-utils/dist/es/noop.js";
|
|
14
|
-
import { pipe } from "../../../motion-utils/dist/es/pipe.js";
|
|
15
|
-
import { progress } from "../../../motion-utils/dist/es/progress.js";
|
|
16
|
-
import { SubscriptionManager } from "../../../motion-utils/dist/es/subscription-manager.js";
|
|
17
|
-
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../motion-utils/dist/es/time-conversion.js";
|
|
18
|
-
import { velocityPerSecond } from "../../../motion-utils/dist/es/velocity-per-second.js";
|
|
19
|
-
import { warnOnce } from "../../../motion-utils/dist/es/warn-once.js";
|
|
20
|
-
import { cubicBezier } from "../../../motion-utils/dist/es/easing/cubic-bezier.js";
|
|
21
|
-
import { mirrorEasing } from "../../../motion-utils/dist/es/easing/modifiers/mirror.js";
|
|
22
|
-
import { reverseEasing } from "../../../motion-utils/dist/es/easing/modifiers/reverse.js";
|
|
23
|
-
import { backIn, backInOut, backOut } from "../../../motion-utils/dist/es/easing/back.js";
|
|
24
|
-
import { anticipate } from "../../../motion-utils/dist/es/easing/anticipate.js";
|
|
25
|
-
import { circIn, circInOut, circOut } from "../../../motion-utils/dist/es/easing/circ.js";
|
|
26
|
-
import { easeIn, easeInOut, easeOut } from "../../../motion-utils/dist/es/easing/ease.js";
|
|
27
|
-
import { isEasingArray } from "../../../motion-utils/dist/es/easing/utils/is-easing-array.js";
|
|
28
|
-
import { isBezierDefinition } from "../../../motion-utils/dist/es/easing/utils/is-bezier-definition.js";
|
|
29
|
-
import { easingDefinitionToFunction } from "../../../motion-utils/dist/es/easing/utils/map.js";
|
|
30
|
-
import { createRenderBatcher } from "../../../motion-dom/dist/es/frameloop/batcher.js";
|
|
31
|
-
import { cancelFrame, frame, frameData, frameSteps } from "../../../motion-dom/dist/es/frameloop/frame.js";
|
|
32
|
-
import { time } from "../../../motion-dom/dist/es/frameloop/sync-time.js";
|
|
33
|
-
import { containsCSSVariable, isCSSVariableName, isCSSVariableToken } from "../../../motion-dom/dist/es/animation/utils/is-css-variable.js";
|
|
34
|
-
import { alpha, number, scale } from "../../../motion-dom/dist/es/value/types/numbers/index.js";
|
|
35
|
-
import { rgbUnit, rgba } from "../../../motion-dom/dist/es/value/types/color/rgba.js";
|
|
36
|
-
import { hex } from "../../../motion-dom/dist/es/value/types/color/hex.js";
|
|
37
|
-
import { degrees, percent, progressPercentage, px, vh, vw } from "../../../motion-dom/dist/es/value/types/numbers/units.js";
|
|
38
|
-
import { hsla } from "../../../motion-dom/dist/es/value/types/color/hsla.js";
|
|
39
|
-
import { color } from "../../../motion-dom/dist/es/value/types/color/index.js";
|
|
40
|
-
import { analyseComplexValue, complex } from "../../../motion-dom/dist/es/value/types/complex/index.js";
|
|
41
|
-
import { hslaToRgba } from "../../../motion-dom/dist/es/value/types/color/hsla-to-rgba.js";
|
|
42
|
-
import { mixImmediate } from "../../../motion-dom/dist/es/utils/mix/immediate.js";
|
|
43
|
-
import { mixNumber } from "../../../motion-dom/dist/es/utils/mix/number.js";
|
|
44
|
-
import { mixColor, mixLinearColor } from "../../../motion-dom/dist/es/utils/mix/color.js";
|
|
45
|
-
import { invisibleValues, mixVisibility } from "../../../motion-dom/dist/es/utils/mix/visibility.js";
|
|
46
|
-
import { getMixer, mixArray, mixComplex, mixObject } from "../../../motion-dom/dist/es/utils/mix/complex.js";
|
|
47
|
-
import { mix } from "../../../motion-dom/dist/es/utils/mix/index.js";
|
|
48
|
-
import { generateLinearEasing } from "../../../motion-dom/dist/es/animation/waapi/utils/linear.js";
|
|
49
|
-
import { calcGeneratorDuration, maxGeneratorDuration } from "../../../motion-dom/dist/es/animation/generators/utils/calc-duration.js";
|
|
50
|
-
import { createGeneratorEasing } from "../../../motion-dom/dist/es/animation/generators/utils/create-generator-easing.js";
|
|
51
|
-
import { spring } from "../../../motion-dom/dist/es/animation/generators/spring.js";
|
|
52
|
-
import { inertia } from "../../../motion-dom/dist/es/animation/generators/inertia.js";
|
|
53
|
-
import { interpolate } from "../../../motion-dom/dist/es/utils/interpolate.js";
|
|
54
|
-
import { fillOffset } from "../../../motion-dom/dist/es/animation/keyframes/offsets/fill.js";
|
|
55
|
-
import { defaultOffset } from "../../../motion-dom/dist/es/animation/keyframes/offsets/default.js";
|
|
56
|
-
import { convertOffsetToTimes } from "../../../motion-dom/dist/es/animation/keyframes/offsets/time.js";
|
|
57
|
-
import { defaultEasing, keyframes } from "../../../motion-dom/dist/es/animation/generators/keyframes.js";
|
|
58
|
-
import { getFinalKeyframe } from "../../../motion-dom/dist/es/animation/keyframes/get-final.js";
|
|
59
|
-
import { JSAnimation } from "../../../motion-dom/dist/es/animation/JSAnimation.js";
|
|
60
|
-
import { fillWildcards } from "../../../motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js";
|
|
61
|
-
import { defaultTransformValue, parseValueFromTransform, readTransformValue } from "../../../motion-dom/dist/es/render/dom/parse-transform.js";
|
|
62
|
-
import { transformPropOrder, transformProps } from "../../../motion-dom/dist/es/render/utils/keys-transform.js";
|
|
63
|
-
import { KeyframeResolver, flushKeyframeResolvers } from "../../../motion-dom/dist/es/animation/keyframes/KeyframesResolver.js";
|
|
64
|
-
import { setStyle } from "../../../motion-dom/dist/es/render/dom/style-set.js";
|
|
65
|
-
import { supportsFlags } from "../../../motion-dom/dist/es/utils/supports/flags.js";
|
|
66
|
-
import { supportsScrollTimeline } from "../../../motion-dom/dist/es/utils/supports/scroll-timeline.js";
|
|
67
|
-
import { supportsLinearEasing } from "../../../motion-dom/dist/es/utils/supports/linear-easing.js";
|
|
68
|
-
import { cubicBezierAsString } from "../../../motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js";
|
|
69
|
-
import { supportedWaapiEasing } from "../../../motion-dom/dist/es/animation/waapi/easing/supported.js";
|
|
70
|
-
import { mapEasingToNativeEasing } from "../../../motion-dom/dist/es/animation/waapi/easing/map-easing.js";
|
|
71
|
-
import { startWaapiAnimation } from "../../../motion-dom/dist/es/animation/waapi/start-waapi-animation.js";
|
|
72
|
-
import { isGenerator } from "../../../motion-dom/dist/es/animation/generators/utils/is-generator.js";
|
|
73
|
-
import { applyGeneratorOptions } from "../../../motion-dom/dist/es/animation/waapi/utils/apply-generator.js";
|
|
74
|
-
import { NativeAnimation } from "../../../motion-dom/dist/es/animation/NativeAnimation.js";
|
|
75
|
-
import { NativeAnimationExtended } from "../../../motion-dom/dist/es/animation/NativeAnimationExtended.js";
|
|
76
|
-
import { makeAnimationInstant } from "../../../motion-dom/dist/es/animation/utils/make-animation-instant.js";
|
|
77
|
-
import { acceleratedValues } from "../../../motion-dom/dist/es/animation/waapi/utils/accelerated-values.js";
|
|
78
|
-
import { supportsBrowserAnimation } from "../../../motion-dom/dist/es/animation/waapi/supports/waapi.js";
|
|
79
|
-
import { AsyncMotionValueAnimation } from "../../../motion-dom/dist/es/animation/AsyncMotionValueAnimation.js";
|
|
80
|
-
import { calcChildStagger } from "../../../motion-dom/dist/es/animation/utils/calc-child-stagger.js";
|
|
81
|
-
import { MotionValue, collectMotionValues, motionValue } from "../../../motion-dom/dist/es/value/index.js";
|
|
82
|
-
import { resolveTransition } from "../../../motion-dom/dist/es/animation/utils/resolve-transition.js";
|
|
83
|
-
import { getValueTransition } from "../../../motion-dom/dist/es/animation/utils/get-value-transition.js";
|
|
84
|
-
import { getDefaultTransition } from "../../../motion-dom/dist/es/animation/utils/default-transitions.js";
|
|
85
|
-
import { isTransitionDefined } from "../../../motion-dom/dist/es/animation/utils/is-transition-defined.js";
|
|
86
|
-
import { animateMotionValue } from "../../../motion-dom/dist/es/animation/interfaces/motion-value.js";
|
|
87
|
-
import { getVariableValue, parseCSSVariable } from "../../../motion-dom/dist/es/animation/utils/css-variables-conversion.js";
|
|
88
|
-
import { resolveVariantFromProps } from "../../../motion-dom/dist/es/render/utils/resolve-variants.js";
|
|
89
|
-
import { resolveVariant } from "../../../motion-dom/dist/es/render/utils/resolve-dynamic-variants.js";
|
|
90
|
-
import { positionalKeys } from "../../../motion-dom/dist/es/render/utils/keys-position.js";
|
|
91
|
-
import { isKeyframesTarget } from "../../../motion-dom/dist/es/render/utils/is-keyframes-target.js";
|
|
92
|
-
import { setTarget } from "../../../motion-dom/dist/es/render/utils/setters.js";
|
|
93
|
-
import { isMotionValue } from "../../../motion-dom/dist/es/value/utils/is-motion-value.js";
|
|
94
|
-
import { isWillChangeMotionValue } from "../../../motion-dom/dist/es/value/will-change/is.js";
|
|
95
|
-
import { addValueToWillChange } from "../../../motion-dom/dist/es/value/will-change/add-will-change.js";
|
|
96
|
-
import { camelToDash } from "../../../motion-dom/dist/es/render/dom/utils/camel-to-dash.js";
|
|
97
|
-
import { optimizedAppearDataAttribute, optimizedAppearDataId } from "../../../motion-dom/dist/es/animation/optimized-appear/data-id.js";
|
|
98
|
-
import { getOptimisedAppearId } from "../../../motion-dom/dist/es/animation/optimized-appear/get-appear-id.js";
|
|
99
|
-
import { animateTarget } from "../../../motion-dom/dist/es/animation/interfaces/visual-element-target.js";
|
|
100
|
-
import { animateVariant } from "../../../motion-dom/dist/es/animation/interfaces/visual-element-variant.js";
|
|
101
|
-
import { animateVisualElement } from "../../../motion-dom/dist/es/animation/interfaces/visual-element.js";
|
|
102
|
-
import { testValueType } from "../../../motion-dom/dist/es/value/types/test.js";
|
|
103
|
-
import { dimensionValueTypes, findDimensionValueType } from "../../../motion-dom/dist/es/value/types/dimensions.js";
|
|
104
|
-
import { transformValueTypes } from "../../../motion-dom/dist/es/value/types/maps/transform.js";
|
|
105
|
-
import { numberValueTypes } from "../../../motion-dom/dist/es/value/types/maps/number.js";
|
|
106
|
-
import { defaultValueTypes, getDefaultValueType } from "../../../motion-dom/dist/es/value/types/maps/defaults.js";
|
|
107
|
-
import { getAnimatableNone } from "../../../motion-dom/dist/es/value/types/utils/animatable-none.js";
|
|
108
|
-
import { DOMKeyframesResolver } from "../../../motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js";
|
|
109
|
-
import { resolveElements } from "../../../motion-dom/dist/es/utils/resolve-elements.js";
|
|
110
|
-
import { getValueAsType } from "../../../motion-dom/dist/es/value/types/utils/get-as-type.js";
|
|
111
|
-
import { isHTMLElement } from "../../../motion-dom/dist/es/utils/is-html-element.js";
|
|
112
|
-
import { microtask } from "../../../motion-dom/dist/es/frameloop/microtask.js";
|
|
113
|
-
import { isDragActive, isDragging } from "../../../motion-dom/dist/es/gestures/drag/state/is-active.js";
|
|
114
|
-
import { setDragLock } from "../../../motion-dom/dist/es/gestures/drag/state/set-active.js";
|
|
115
|
-
import { hover } from "../../../motion-dom/dist/es/gestures/hover.js";
|
|
116
|
-
import { isNodeOrChild } from "../../../motion-dom/dist/es/gestures/utils/is-node-or-child.js";
|
|
117
|
-
import { isPrimaryPointer } from "../../../motion-dom/dist/es/gestures/utils/is-primary-pointer.js";
|
|
118
|
-
import { isElementKeyboardAccessible, isElementTextInput } from "../../../motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js";
|
|
119
|
-
import { press } from "../../../motion-dom/dist/es/gestures/press/index.js";
|
|
120
|
-
import { isSVGElement } from "../../../motion-dom/dist/es/utils/is-svg-element.js";
|
|
121
|
-
import { resize } from "../../../motion-dom/dist/es/resize/index.js";
|
|
122
|
-
import { statsBuffer } from "../../../motion-dom/dist/es/stats/buffer.js";
|
|
123
|
-
import { isSVGSVGElement } from "../../../motion-dom/dist/es/utils/is-svg-svg-element.js";
|
|
124
|
-
import { findValueType } from "../../../motion-dom/dist/es/value/types/utils/find.js";
|
|
125
|
-
import { createAxis, createAxisDelta, createBox, createDelta } from "../../../motion-dom/dist/es/projection/geometry/models.js";
|
|
126
|
-
import { visualElementStore } from "../../../motion-dom/dist/es/render/store.js";
|
|
127
|
-
import { isAnimationControls } from "../../../motion-dom/dist/es/render/utils/is-animation-controls.js";
|
|
128
|
-
import { isVariantLabel } from "../../../motion-dom/dist/es/render/utils/is-variant-label.js";
|
|
129
|
-
import { variantPriorityOrder, variantProps } from "../../../motion-dom/dist/es/render/utils/variant-props.js";
|
|
130
|
-
import { isControllingVariants, isVariantNode } from "../../../motion-dom/dist/es/render/utils/is-controlling-variants.js";
|
|
131
|
-
import { updateMotionValuesFromProps } from "../../../motion-dom/dist/es/render/utils/motion-values.js";
|
|
132
|
-
import { hasReducedMotionListener, prefersReducedMotion } from "../../../motion-dom/dist/es/render/utils/reduced-motion/state.js";
|
|
133
|
-
import { initPrefersReducedMotion } from "../../../motion-dom/dist/es/render/utils/reduced-motion/index.js";
|
|
134
|
-
import { VisualElement, getFeatureDefinitions, setFeatureDefinitions } from "../../../motion-dom/dist/es/render/VisualElement.js";
|
|
135
|
-
import { DOMVisualElement } from "../../../motion-dom/dist/es/render/dom/DOMVisualElement.js";
|
|
136
|
-
import { Feature } from "../../../motion-dom/dist/es/render/Feature.js";
|
|
137
|
-
import { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints } from "../../../motion-dom/dist/es/projection/geometry/conversion.js";
|
|
138
|
-
import { has2DTranslate, hasScale, hasTransform } from "../../../motion-dom/dist/es/projection/utils/has-transform.js";
|
|
139
|
-
import { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis } from "../../../motion-dom/dist/es/projection/geometry/delta-apply.js";
|
|
140
|
-
import { measurePageBox, measureViewportBox } from "../../../motion-dom/dist/es/projection/utils/measure.js";
|
|
141
|
-
import { buildTransform } from "../../../motion-dom/dist/es/render/html/utils/build-transform.js";
|
|
142
|
-
import { buildHTMLStyles } from "../../../motion-dom/dist/es/render/html/utils/build-styles.js";
|
|
143
|
-
import { renderHTML } from "../../../motion-dom/dist/es/render/html/utils/render.js";
|
|
144
|
-
import { correctBorderRadius, pixelsToPercent } from "../../../motion-dom/dist/es/projection/styles/scale-border-radius.js";
|
|
145
|
-
import { correctBoxShadow } from "../../../motion-dom/dist/es/projection/styles/scale-box-shadow.js";
|
|
146
|
-
import { scaleCorrectors } from "../../../motion-dom/dist/es/projection/styles/scale-correction.js";
|
|
147
|
-
import { isForcedMotionValue } from "../../../motion-dom/dist/es/render/utils/is-forced-motion-value.js";
|
|
148
|
-
import { scrapeMotionValuesFromProps } from "../../../motion-dom/dist/es/render/html/utils/scrape-motion-values.js";
|
|
149
|
-
import { HTMLVisualElement } from "../../../motion-dom/dist/es/render/html/HTMLVisualElement.js";
|
|
150
|
-
import { buildSVGPath } from "../../../motion-dom/dist/es/render/svg/utils/path.js";
|
|
151
|
-
import { buildSVGAttrs } from "../../../motion-dom/dist/es/render/svg/utils/build-attrs.js";
|
|
152
|
-
import { camelCaseAttributes } from "../../../motion-dom/dist/es/render/svg/utils/camel-case-attrs.js";
|
|
153
|
-
import { isSVGTag } from "../../../motion-dom/dist/es/render/svg/utils/is-svg-tag.js";
|
|
154
|
-
import { renderSVG } from "../../../motion-dom/dist/es/render/svg/utils/render.js";
|
|
155
|
-
import { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from "../../../motion-dom/dist/es/render/svg/utils/scrape-motion-values.js";
|
|
156
|
-
import { SVGVisualElement } from "../../../motion-dom/dist/es/render/svg/SVGVisualElement.js";
|
|
157
|
-
import { getVariantContext } from "../../../motion-dom/dist/es/render/utils/get-variant-context.js";
|
|
158
|
-
import { checkVariantsDidChange, createAnimationState } from "../../../motion-dom/dist/es/render/utils/animation-state.js";
|
|
159
|
-
import { copyAxisDeltaInto, copyAxisInto, copyBoxInto } from "../../../motion-dom/dist/es/projection/geometry/copy.js";
|
|
160
|
-
import { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear } from "../../../motion-dom/dist/es/projection/geometry/delta-calc.js";
|
|
161
|
-
import { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta } from "../../../motion-dom/dist/es/projection/geometry/delta-remove.js";
|
|
162
|
-
import { aspectRatio, axisDeltaEquals, axisEquals, axisEqualsRounded, boxEquals, boxEqualsRounded, isDeltaZero } from "../../../motion-dom/dist/es/projection/geometry/utils.js";
|
|
163
|
-
import { eachAxis } from "../../../motion-dom/dist/es/projection/utils/each-axis.js";
|
|
164
|
-
import { buildProjectionTransform } from "../../../motion-dom/dist/es/projection/styles/transform.js";
|
|
165
|
-
import { mixValues } from "../../../motion-dom/dist/es/projection/animation/mix-values.js";
|
|
166
|
-
import { animateSingleValue } from "../../../motion-dom/dist/es/animation/animate/single-value.js";
|
|
167
|
-
import { addDomEvent } from "../../../motion-dom/dist/es/events/add-dom-event.js";
|
|
168
|
-
import { compareByDepth } from "../../../motion-dom/dist/es/projection/utils/compare-by-depth.js";
|
|
169
|
-
import { FlatTree } from "../../../motion-dom/dist/es/projection/utils/flat-tree.js";
|
|
170
|
-
import { delay } from "../../../motion-dom/dist/es/utils/delay.js";
|
|
171
|
-
import { resolveMotionValue } from "../../../motion-dom/dist/es/value/utils/resolve-motion-value.js";
|
|
172
|
-
import { NodeStack } from "../../../motion-dom/dist/es/projection/shared/stack.js";
|
|
173
|
-
import { globalProjectionState } from "../../../motion-dom/dist/es/projection/node/state.js";
|
|
174
|
-
import { cleanDirtyNodes, createProjectionNode, propagateDirtyNodes } from "../../../motion-dom/dist/es/projection/node/create-projection-node.js";
|
|
175
|
-
import { DocumentProjectionNode } from "../../../motion-dom/dist/es/projection/node/DocumentProjectionNode.js";
|
|
176
|
-
import { HTMLProjectionNode, rootProjectionNode } from "../../../motion-dom/dist/es/projection/node/HTMLProjectionNode.js";
|
|
177
|
-
import { MotionConfigContext } from "../../../framer-motion/dist/es/context/MotionConfigContext.js";
|
|
178
|
-
import { useComposedRefs } from "../../../framer-motion/dist/es/utils/use-composed-ref.js";
|
|
179
|
-
import { PopChild } from "../../../framer-motion/dist/es/components/AnimatePresence/PopChild.js";
|
|
180
|
-
import { PresenceChild } from "../../../framer-motion/dist/es/components/AnimatePresence/PresenceChild.js";
|
|
181
|
-
import { usePresence } from "../../../framer-motion/dist/es/components/AnimatePresence/use-presence.js";
|
|
182
|
-
import { AnimatePresence } from "../../../framer-motion/dist/es/components/AnimatePresence/index.js";
|
|
183
|
-
import { isValidMotionProp } from "../../../framer-motion/dist/es/motion/utils/valid-prop.js";
|
|
184
|
-
import { filterProps } from "../../../framer-motion/dist/es/render/dom/utils/filter-props.js";
|
|
185
|
-
import { MotionContext } from "../../../framer-motion/dist/es/context/MotionContext/index.js";
|
|
186
|
-
import { makeUseVisualState } from "../../../framer-motion/dist/es/motion/utils/use-visual-state.js";
|
|
187
|
-
import { SwitchLayoutGroupContext } from "../../../framer-motion/dist/es/context/SwitchLayoutGroupContext.js";
|
|
188
|
-
import { m as m$1 } from "../../../framer-motion/dist/es/render/components/m/proxy.js";
|
|
189
|
-
import { animations } from "../../../framer-motion/dist/es/motion/features/animations.js";
|
|
190
|
-
import { addPointerInfo } from "../../../framer-motion/dist/es/events/event-info.js";
|
|
191
|
-
import { addPointerEvent } from "../../../framer-motion/dist/es/events/add-pointer-event.js";
|
|
192
|
-
import { distance, distance2D } from "../../../framer-motion/dist/es/utils/distance.js";
|
|
193
|
-
import { motion as motion$1 } from "../../../framer-motion/dist/es/render/components/motion/proxy.js";
|
|
194
|
-
import { useReducedMotion } from "../../../framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js";
|
|
195
|
-
var motion = motion$1;
|
|
196
|
-
export { motion };
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { MotionGlobalConfig } from "../../../../motion-utils/dist/es/global-config.js";
|
|
2
|
-
import { noop } from "../../../../motion-utils/dist/es/noop.js";
|
|
3
|
-
import { time } from "../frameloop/sync-time.js";
|
|
4
|
-
import { getFinalKeyframe } from "./keyframes/get-final.js";
|
|
5
|
-
import { WithPromise } from "./utils/WithPromise.js";
|
|
6
|
-
import { JSAnimation } from "./JSAnimation.js";
|
|
7
|
-
import { KeyframeResolver, flushKeyframeResolvers } from "./keyframes/KeyframesResolver.js";
|
|
8
|
-
import { NativeAnimationExtended } from "./NativeAnimationExtended.js";
|
|
9
|
-
import { canAnimate } from "./utils/can-animate.js";
|
|
10
|
-
import { makeAnimationInstant } from "./utils/make-animation-instant.js";
|
|
11
|
-
import { supportsBrowserAnimation } from "./waapi/supports/waapi.js";
|
|
12
|
-
var MAX_RESOLVE_DELAY = 40, AsyncMotionValueAnimation = class extends WithPromise {
|
|
13
|
-
constructor({ autoplay: e = !0, delay: t = 0, type: r = "keyframes", repeat: i = 0, repeatDelay: a = 0, repeatType: s = "loop", keyframes: c, name: l, motionValue: u, element: d, ...f }) {
|
|
14
|
-
super(), this.stop = () => {
|
|
15
|
-
this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
|
|
16
|
-
}, this.createdAt = time.now();
|
|
17
|
-
let p = {
|
|
18
|
-
autoplay: e,
|
|
19
|
-
delay: t,
|
|
20
|
-
type: r,
|
|
21
|
-
repeat: i,
|
|
22
|
-
repeatDelay: a,
|
|
23
|
-
repeatType: s,
|
|
24
|
-
name: l,
|
|
25
|
-
motionValue: u,
|
|
26
|
-
element: d,
|
|
27
|
-
...f
|
|
28
|
-
};
|
|
29
|
-
this.keyframeResolver = new (d?.KeyframeResolver || KeyframeResolver)(c, (e, t, n) => this.onKeyframesResolved(e, t, p, !n), l, u, d), this.keyframeResolver?.scheduleResolve();
|
|
30
|
-
}
|
|
31
|
-
onKeyframesResolved(i, o, s, p) {
|
|
32
|
-
this.keyframeResolver = void 0;
|
|
33
|
-
let { name: m, type: h, velocity: g, delay: _, isHandoff: v, onUpdate: y } = s;
|
|
34
|
-
this.resolvedAt = time.now();
|
|
35
|
-
let b = !0;
|
|
36
|
-
canAnimate(i, m, h, g) || (b = !1, (MotionGlobalConfig.instantAnimations || !_) && y?.(getFinalKeyframe(i, s, o)), i[0] = i[i.length - 1], makeAnimationInstant(s), s.repeat = 0);
|
|
37
|
-
let x = {
|
|
38
|
-
startTime: p ? this.resolvedAt && this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY ? this.resolvedAt : this.createdAt : void 0,
|
|
39
|
-
finalKeyframe: o,
|
|
40
|
-
...s,
|
|
41
|
-
keyframes: i
|
|
42
|
-
}, S = b && !v && supportsBrowserAnimation(x), C = x.motionValue?.owner?.current, w;
|
|
43
|
-
if (S) try {
|
|
44
|
-
w = new NativeAnimationExtended({
|
|
45
|
-
...x,
|
|
46
|
-
element: C
|
|
47
|
-
});
|
|
48
|
-
} catch {
|
|
49
|
-
w = new JSAnimation(x);
|
|
50
|
-
}
|
|
51
|
-
else w = new JSAnimation(x);
|
|
52
|
-
w.finished.then(() => {
|
|
53
|
-
this.notifyFinished();
|
|
54
|
-
}).catch(noop), this.pendingTimeline &&= (this.stopTimeline = w.attachTimeline(this.pendingTimeline), void 0), this._animation = w;
|
|
55
|
-
}
|
|
56
|
-
get finished() {
|
|
57
|
-
return this._animation ? this.animation.finished : this._finished;
|
|
58
|
-
}
|
|
59
|
-
then(e, t) {
|
|
60
|
-
return this.finished.finally(e).then(() => {});
|
|
61
|
-
}
|
|
62
|
-
get animation() {
|
|
63
|
-
return this._animation || (this.keyframeResolver?.resume(), flushKeyframeResolvers()), this._animation;
|
|
64
|
-
}
|
|
65
|
-
get duration() {
|
|
66
|
-
return this.animation.duration;
|
|
67
|
-
}
|
|
68
|
-
get iterationDuration() {
|
|
69
|
-
return this.animation.iterationDuration;
|
|
70
|
-
}
|
|
71
|
-
get time() {
|
|
72
|
-
return this.animation.time;
|
|
73
|
-
}
|
|
74
|
-
set time(e) {
|
|
75
|
-
this.animation.time = e;
|
|
76
|
-
}
|
|
77
|
-
get speed() {
|
|
78
|
-
return this.animation.speed;
|
|
79
|
-
}
|
|
80
|
-
get state() {
|
|
81
|
-
return this.animation.state;
|
|
82
|
-
}
|
|
83
|
-
set speed(e) {
|
|
84
|
-
this.animation.speed = e;
|
|
85
|
-
}
|
|
86
|
-
get startTime() {
|
|
87
|
-
return this.animation.startTime;
|
|
88
|
-
}
|
|
89
|
-
attachTimeline(e) {
|
|
90
|
-
return this._animation ? this.stopTimeline = this.animation.attachTimeline(e) : this.pendingTimeline = e, () => this.stop();
|
|
91
|
-
}
|
|
92
|
-
play() {
|
|
93
|
-
this.animation.play();
|
|
94
|
-
}
|
|
95
|
-
pause() {
|
|
96
|
-
this.animation.pause();
|
|
97
|
-
}
|
|
98
|
-
complete() {
|
|
99
|
-
this.animation.complete();
|
|
100
|
-
}
|
|
101
|
-
cancel() {
|
|
102
|
-
this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
export { AsyncMotionValueAnimation };
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { clamp } from "../../../../motion-utils/dist/es/clamp.js";
|
|
2
|
-
import { invariant } from "../../../../motion-utils/dist/es/errors.js";
|
|
3
|
-
import { pipe } from "../../../../motion-utils/dist/es/pipe.js";
|
|
4
|
-
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../motion-utils/dist/es/time-conversion.js";
|
|
5
|
-
import { time } from "../frameloop/sync-time.js";
|
|
6
|
-
import { mix } from "../utils/mix/index.js";
|
|
7
|
-
import { frameloopDriver } from "./drivers/frame.js";
|
|
8
|
-
import { calcGeneratorDuration } from "./generators/utils/calc-duration.js";
|
|
9
|
-
import { getGeneratorVelocity } from "./generators/utils/velocity.js";
|
|
10
|
-
import { inertia } from "./generators/inertia.js";
|
|
11
|
-
import { keyframes } from "./generators/keyframes.js";
|
|
12
|
-
import { getFinalKeyframe } from "./keyframes/get-final.js";
|
|
13
|
-
import { replaceTransitionType } from "./utils/replace-transition-type.js";
|
|
14
|
-
import { WithPromise } from "./utils/WithPromise.js";
|
|
15
|
-
var percentToProgress = (e) => e / 100, JSAnimation = class extends WithPromise {
|
|
16
|
-
constructor(e) {
|
|
17
|
-
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.delayState = {
|
|
18
|
-
done: !1,
|
|
19
|
-
value: void 0
|
|
20
|
-
}, this.stop = () => {
|
|
21
|
-
let { motionValue: e } = this.options;
|
|
22
|
-
e && e.updatedAt !== time.now() && this.tick(time.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
|
|
23
|
-
}, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause();
|
|
24
|
-
}
|
|
25
|
-
initAnimation() {
|
|
26
|
-
let { options: e } = this;
|
|
27
|
-
replaceTransitionType(e);
|
|
28
|
-
let { type: r = keyframes, repeat: i = 0, repeatDelay: a = 0, repeatType: s, velocity: l = 0 } = e, { keyframes: u } = e, f = r || keyframes;
|
|
29
|
-
process.env.NODE_ENV !== "production" && f !== keyframes && invariant(u.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`, "spring-two-frames"), f !== keyframes && typeof u[0] != "number" && (this.mixKeyframes = pipe(percentToProgress, mix(u[0], u[1])), u = [0, 100]);
|
|
30
|
-
let m = f({
|
|
31
|
-
...e,
|
|
32
|
-
keyframes: u
|
|
33
|
-
});
|
|
34
|
-
s === "mirror" && (this.mirroredGenerator = f({
|
|
35
|
-
...e,
|
|
36
|
-
keyframes: [...u].reverse(),
|
|
37
|
-
velocity: -l
|
|
38
|
-
})), m.calculatedDuration === null && (m.calculatedDuration = calcGeneratorDuration(m));
|
|
39
|
-
let { calculatedDuration: g } = m;
|
|
40
|
-
this.calculatedDuration = g, this.resolvedDuration = g + a, this.totalDuration = this.resolvedDuration * (i + 1) - a, this.generator = m;
|
|
41
|
-
}
|
|
42
|
-
updateTime(e) {
|
|
43
|
-
let t = Math.round(e - this.startTime) * this.playbackSpeed;
|
|
44
|
-
this.holdTime === null ? this.currentTime = t : this.currentTime = this.holdTime;
|
|
45
|
-
}
|
|
46
|
-
tick(t, n = !1) {
|
|
47
|
-
let { generator: r, totalDuration: i, mixKeyframes: a, mirroredGenerator: o, resolvedDuration: s, calculatedDuration: c } = this;
|
|
48
|
-
if (this.startTime === null) return r.next(0);
|
|
49
|
-
let { delay: l = 0, keyframes: d, repeat: p, repeatType: m, repeatDelay: h, type: g, onUpdate: _, finalKeyframe: v } = this.options;
|
|
50
|
-
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - i / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
|
|
51
|
-
let y = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1), b = this.playbackSpeed >= 0 ? y < 0 : y > i;
|
|
52
|
-
this.currentTime = Math.max(y, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
|
|
53
|
-
let x = this.currentTime, S = r;
|
|
54
|
-
if (p) {
|
|
55
|
-
let t = Math.min(this.currentTime, i) / s, n = Math.floor(t), r = t % 1;
|
|
56
|
-
!r && t >= 1 && (r = 1), r === 1 && n--, n = Math.min(n, p + 1), n % 2 && (m === "reverse" ? (r = 1 - r, h && (r -= h / s)) : m === "mirror" && (S = o)), x = clamp(0, 1, r) * s;
|
|
57
|
-
}
|
|
58
|
-
let C;
|
|
59
|
-
b ? (this.delayState.value = d[0], C = this.delayState) : C = S.next(x), a && !b && (C.value = a(C.value));
|
|
60
|
-
let { done: w } = C;
|
|
61
|
-
!b && c !== null && (w = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
62
|
-
let T = this.holdTime === null && (this.state === "finished" || this.state === "running" && w);
|
|
63
|
-
return T && g !== inertia && (C.value = getFinalKeyframe(d, this.options, v, this.speed)), _ && _(C.value), T && this.finish(), C;
|
|
64
|
-
}
|
|
65
|
-
then(e, t) {
|
|
66
|
-
return this.finished.then(e, t);
|
|
67
|
-
}
|
|
68
|
-
get duration() {
|
|
69
|
-
return millisecondsToSeconds(this.calculatedDuration);
|
|
70
|
-
}
|
|
71
|
-
get iterationDuration() {
|
|
72
|
-
let { delay: e = 0 } = this.options || {};
|
|
73
|
-
return this.duration + millisecondsToSeconds(e);
|
|
74
|
-
}
|
|
75
|
-
get time() {
|
|
76
|
-
return millisecondsToSeconds(this.currentTime);
|
|
77
|
-
}
|
|
78
|
-
set time(e) {
|
|
79
|
-
e = secondsToMilliseconds(e), this.currentTime = e, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.playbackSpeed), this.driver ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = e, this.tick(e));
|
|
80
|
-
}
|
|
81
|
-
getGeneratorVelocity() {
|
|
82
|
-
let e = this.currentTime;
|
|
83
|
-
if (e <= 0) return this.options.velocity || 0;
|
|
84
|
-
if (this.generator.velocity) return this.generator.velocity(e);
|
|
85
|
-
let t = this.generator.next(e).value;
|
|
86
|
-
return getGeneratorVelocity((e) => this.generator.next(e).value, e, t);
|
|
87
|
-
}
|
|
88
|
-
get speed() {
|
|
89
|
-
return this.playbackSpeed;
|
|
90
|
-
}
|
|
91
|
-
set speed(e) {
|
|
92
|
-
let t = this.playbackSpeed !== e;
|
|
93
|
-
t && this.driver && this.updateTime(time.now()), this.playbackSpeed = e, t && this.driver && (this.time = millisecondsToSeconds(this.currentTime));
|
|
94
|
-
}
|
|
95
|
-
play() {
|
|
96
|
-
if (this.isStopped) return;
|
|
97
|
-
let { driver: e = frameloopDriver, startTime: t } = this.options;
|
|
98
|
-
this.driver ||= e((e) => this.tick(e)), this.options.onPlay?.();
|
|
99
|
-
let n = this.driver.now();
|
|
100
|
-
this.state === "finished" ? (this.updateFinished(), this.startTime = n) : this.holdTime === null ? this.startTime ||= t ?? n : this.startTime = n - this.holdTime, this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
101
|
-
}
|
|
102
|
-
pause() {
|
|
103
|
-
this.state = "paused", this.updateTime(time.now()), this.holdTime = this.currentTime;
|
|
104
|
-
}
|
|
105
|
-
complete() {
|
|
106
|
-
this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
|
|
107
|
-
}
|
|
108
|
-
finish() {
|
|
109
|
-
this.notifyFinished(), this.teardown(), this.state = "finished", this.options.onComplete?.();
|
|
110
|
-
}
|
|
111
|
-
cancel() {
|
|
112
|
-
this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), this.options.onCancel?.();
|
|
113
|
-
}
|
|
114
|
-
teardown() {
|
|
115
|
-
this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null;
|
|
116
|
-
}
|
|
117
|
-
stopDriver() {
|
|
118
|
-
this.driver &&= (this.driver.stop(), void 0);
|
|
119
|
-
}
|
|
120
|
-
sample(e) {
|
|
121
|
-
return this.startTime = 0, this.tick(e, !0);
|
|
122
|
-
}
|
|
123
|
-
attachTimeline(e) {
|
|
124
|
-
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), e.observe(this);
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
export { JSAnimation };
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { invariant } from "../../../../motion-utils/dist/es/errors.js";
|
|
2
|
-
import { noop } from "../../../../motion-utils/dist/es/noop.js";
|
|
3
|
-
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../motion-utils/dist/es/time-conversion.js";
|
|
4
|
-
import { getFinalKeyframe } from "./keyframes/get-final.js";
|
|
5
|
-
import { WithPromise } from "./utils/WithPromise.js";
|
|
6
|
-
import { setStyle } from "../render/dom/style-set.js";
|
|
7
|
-
import { supportsScrollTimeline } from "../utils/supports/scroll-timeline.js";
|
|
8
|
-
import { startWaapiAnimation } from "./waapi/start-waapi-animation.js";
|
|
9
|
-
import { applyGeneratorOptions } from "./waapi/utils/apply-generator.js";
|
|
10
|
-
var NativeAnimation = class extends WithPromise {
|
|
11
|
-
constructor(i) {
|
|
12
|
-
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !i) return;
|
|
13
|
-
let { element: a, name: o, keyframes: c, pseudoElement: l, allowFlatten: u = !1, finalKeyframe: d, onComplete: f } = i;
|
|
14
|
-
this.isPseudoElement = !!l, this.allowFlatten = u, this.options = i, invariant(typeof i.type != "string", "Mini animate() doesn't support \"type\" as a string.", "mini-spring");
|
|
15
|
-
let p = applyGeneratorOptions(i);
|
|
16
|
-
this.animation = startWaapiAnimation(a, o, c, p, l), p.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
17
|
-
if (this.finishedTime = this.time, !l) {
|
|
18
|
-
let e = getFinalKeyframe(c, this.options, d, this.speed);
|
|
19
|
-
this.updateMotionValue && this.updateMotionValue(e), setStyle(a, o, e), this.animation.cancel();
|
|
20
|
-
}
|
|
21
|
-
f?.(), this.notifyFinished();
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
play() {
|
|
25
|
-
this.isStopped || (this.manualStartTime = null, this.animation.play(), this.state === "finished" && this.updateFinished());
|
|
26
|
-
}
|
|
27
|
-
pause() {
|
|
28
|
-
this.animation.pause();
|
|
29
|
-
}
|
|
30
|
-
complete() {
|
|
31
|
-
this.animation.finish?.();
|
|
32
|
-
}
|
|
33
|
-
cancel() {
|
|
34
|
-
try {
|
|
35
|
-
this.animation.cancel();
|
|
36
|
-
} catch {}
|
|
37
|
-
}
|
|
38
|
-
stop() {
|
|
39
|
-
if (this.isStopped) return;
|
|
40
|
-
this.isStopped = !0;
|
|
41
|
-
let { state: e } = this;
|
|
42
|
-
e === "idle" || e === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
|
|
43
|
-
}
|
|
44
|
-
commitStyles() {
|
|
45
|
-
let e = this.options?.element;
|
|
46
|
-
!this.isPseudoElement && e?.isConnected && this.animation.commitStyles?.();
|
|
47
|
-
}
|
|
48
|
-
get duration() {
|
|
49
|
-
let e = this.animation.effect?.getComputedTiming?.().duration || 0;
|
|
50
|
-
return millisecondsToSeconds(Number(e));
|
|
51
|
-
}
|
|
52
|
-
get iterationDuration() {
|
|
53
|
-
let { delay: e = 0 } = this.options || {};
|
|
54
|
-
return this.duration + millisecondsToSeconds(e);
|
|
55
|
-
}
|
|
56
|
-
get time() {
|
|
57
|
-
return millisecondsToSeconds(Number(this.animation.currentTime) || 0);
|
|
58
|
-
}
|
|
59
|
-
set time(e) {
|
|
60
|
-
let i = this.finishedTime !== null;
|
|
61
|
-
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = secondsToMilliseconds(e), i && this.animation.pause();
|
|
62
|
-
}
|
|
63
|
-
get speed() {
|
|
64
|
-
return this.animation.playbackRate;
|
|
65
|
-
}
|
|
66
|
-
set speed(e) {
|
|
67
|
-
e < 0 && (this.finishedTime = null), this.animation.playbackRate = e;
|
|
68
|
-
}
|
|
69
|
-
get state() {
|
|
70
|
-
return this.finishedTime === null ? this.animation.playState : "finished";
|
|
71
|
-
}
|
|
72
|
-
get startTime() {
|
|
73
|
-
return this.manualStartTime ?? Number(this.animation.startTime);
|
|
74
|
-
}
|
|
75
|
-
set startTime(e) {
|
|
76
|
-
this.manualStartTime = this.animation.startTime = e;
|
|
77
|
-
}
|
|
78
|
-
attachTimeline({ timeline: e, rangeStart: a, rangeEnd: o, observe: s }) {
|
|
79
|
-
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && supportsScrollTimeline() ? (this.animation.timeline = e, a && (this.animation.rangeStart = a), o && (this.animation.rangeEnd = o), noop) : s(this);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
export { NativeAnimation };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { clamp } from "../../../../motion-utils/dist/es/clamp.js";
|
|
2
|
-
import { time } from "../frameloop/sync-time.js";
|
|
3
|
-
import { replaceTransitionType } from "./utils/replace-transition-type.js";
|
|
4
|
-
import { JSAnimation } from "./JSAnimation.js";
|
|
5
|
-
import { setStyle } from "../render/dom/style-set.js";
|
|
6
|
-
import { NativeAnimation } from "./NativeAnimation.js";
|
|
7
|
-
import { replaceStringEasing } from "./waapi/utils/unsupported-easing.js";
|
|
8
|
-
var sampleDelta = 10, NativeAnimationExtended = class extends NativeAnimation {
|
|
9
|
-
constructor(e) {
|
|
10
|
-
replaceStringEasing(e), replaceTransitionType(e), super(e), e.startTime !== void 0 && e.autoplay !== !1 && (this.startTime = e.startTime), this.options = e;
|
|
11
|
-
}
|
|
12
|
-
updateMotionValue(a) {
|
|
13
|
-
let { motionValue: o, onUpdate: s, onComplete: c, element: l, ...u } = this.options;
|
|
14
|
-
if (!o) return;
|
|
15
|
-
if (a !== void 0) {
|
|
16
|
-
o.set(a);
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
let d = new JSAnimation({
|
|
20
|
-
...u,
|
|
21
|
-
autoplay: !1
|
|
22
|
-
}), f = Math.max(sampleDelta, time.now() - this.startTime), p = clamp(0, sampleDelta, f - sampleDelta), m = d.sample(f).value, { name: h } = this.options;
|
|
23
|
-
l && h && setStyle(l, h, m), o.setWithVelocity(d.sample(Math.max(0, f - p)).value, m, p), d.stop();
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
export { NativeAnimationExtended };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { motionValue } from "../../value/index.js";
|
|
2
|
-
import { animateMotionValue } from "../interfaces/motion-value.js";
|
|
3
|
-
import { isMotionValue } from "../../value/utils/is-motion-value.js";
|
|
4
|
-
function animateSingleValue(r, i, a) {
|
|
5
|
-
let o = isMotionValue(r) ? r : motionValue(r);
|
|
6
|
-
return o.start(animateMotionValue("", o, i, a)), o.animation;
|
|
7
|
-
}
|
|
8
|
-
export { animateSingleValue };
|