@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,15 +0,0 @@
|
|
|
1
|
-
import { cornerRadiusProps } from "../../utils/border-radius.js";
|
|
2
|
-
import { correctBorderRadius } from "./scale-border-radius.js";
|
|
3
|
-
import { correctBoxShadow } from "./scale-box-shadow.js";
|
|
4
|
-
var scaleCorrectors = {
|
|
5
|
-
borderRadius: {
|
|
6
|
-
...correctBorderRadius,
|
|
7
|
-
applyTo: [...cornerRadiusProps]
|
|
8
|
-
},
|
|
9
|
-
borderTopLeftRadius: correctBorderRadius,
|
|
10
|
-
borderTopRightRadius: correctBorderRadius,
|
|
11
|
-
borderBottomLeftRadius: correctBorderRadius,
|
|
12
|
-
borderBottomRightRadius: correctBorderRadius,
|
|
13
|
-
boxShadow: correctBoxShadow
|
|
14
|
-
};
|
|
15
|
-
export { scaleCorrectors };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
function buildProjectionTransform(e, t, n) {
|
|
2
|
-
let r = "", i = e.x.translate / t.x, a = e.y.translate / t.y, o = n?.z || 0;
|
|
3
|
-
if ((i || a || o) && (r = `translate3d(${i}px, ${a}px, ${o}px) `), (t.x !== 1 || t.y !== 1) && (r += `scale(${1 / t.x}, ${1 / t.y}) `), n) {
|
|
4
|
-
let { transformPerspective: e, rotate: t, pathRotation: i, rotateX: a, rotateY: o, skewX: s, skewY: c } = n;
|
|
5
|
-
e && (r = `perspective(${e}px) ${r}`), t && (r += `rotate(${t}deg) `), i && (r += `rotate(${i}deg) `), a && (r += `rotateX(${a}deg) `), o && (r += `rotateY(${o}deg) `), s && (r += `skewX(${s}deg) `), c && (r += `skewY(${c}deg) `);
|
|
6
|
-
}
|
|
7
|
-
let s = e.x.scale * t.x, c = e.y.scale * t.y;
|
|
8
|
-
return (s !== 1 || c !== 1) && (r += `scale(${s}, ${c})`), r || "none";
|
|
9
|
-
}
|
|
10
|
-
export { buildProjectionTransform };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { addUniqueItem, removeItem } from "../../../../../motion-utils/dist/es/array.js";
|
|
2
|
-
import { compareByDepth } from "./compare-by-depth.js";
|
|
3
|
-
var FlatTree = class {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.children = [], this.isDirty = !1;
|
|
6
|
-
}
|
|
7
|
-
add(r) {
|
|
8
|
-
addUniqueItem(this.children, r), this.isDirty = !0;
|
|
9
|
-
}
|
|
10
|
-
remove(e) {
|
|
11
|
-
removeItem(this.children, e), this.isDirty = !0;
|
|
12
|
-
}
|
|
13
|
-
forEach(e) {
|
|
14
|
-
this.isDirty && this.children.sort(compareByDepth), this.isDirty = !1, this.children.forEach(e);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
export { FlatTree };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
function isIdentityScale(e) {
|
|
2
|
-
return e === void 0 || e === 1;
|
|
3
|
-
}
|
|
4
|
-
function hasScale({ scale: n, scaleX: r, scaleY: i }) {
|
|
5
|
-
return !isIdentityScale(n) || !isIdentityScale(r) || !isIdentityScale(i);
|
|
6
|
-
}
|
|
7
|
-
function hasTransform(e) {
|
|
8
|
-
return hasScale(e) || has2DTranslate(e) || e.z || e.rotate || e.rotateX || e.rotateY || e.skewX || e.skewY;
|
|
9
|
-
}
|
|
10
|
-
function has2DTranslate(e) {
|
|
11
|
-
return is2DTranslate(e.x) || is2DTranslate(e.y);
|
|
12
|
-
}
|
|
13
|
-
function is2DTranslate(e) {
|
|
14
|
-
return e && e !== "0%";
|
|
15
|
-
}
|
|
16
|
-
export { has2DTranslate, hasScale, hasTransform };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { convertBoundingBoxToBox, transformBoxPoints } from "../geometry/conversion.js";
|
|
2
|
-
import { translateAxis } from "../geometry/delta-apply.js";
|
|
3
|
-
function measureViewportBox(n, r) {
|
|
4
|
-
return convertBoundingBoxToBox(transformBoxPoints(n.getBoundingClientRect(), r));
|
|
5
|
-
}
|
|
6
|
-
function measurePageBox(e, t, i) {
|
|
7
|
-
let a = measureViewportBox(e, i), { scroll: o } = t;
|
|
8
|
-
return o && (translateAxis(a.x, o.offset.x), translateAxis(a.y, o.offset.y)), a;
|
|
9
|
-
}
|
|
10
|
-
export { measurePageBox, measureViewportBox };
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import { isNumericalString } from "../../../../motion-utils/dist/es/is-numerical-string.js";
|
|
2
|
-
import { isZeroValueString } from "../../../../motion-utils/dist/es/is-zero-value-string.js";
|
|
3
|
-
import { SubscriptionManager } from "../../../../motion-utils/dist/es/subscription-manager.js";
|
|
4
|
-
import { secondsToMilliseconds } from "../../../../motion-utils/dist/es/time-conversion.js";
|
|
5
|
-
import { warnOnce } from "../../../../motion-utils/dist/es/warn-once.js";
|
|
6
|
-
import { cancelFrame, frame } from "../frameloop/frame.js";
|
|
7
|
-
import { time } from "../frameloop/sync-time.js";
|
|
8
|
-
import { complex } from "../value/types/complex/index.js";
|
|
9
|
-
import { transformProps } from "./utils/keys-transform.js";
|
|
10
|
-
import { KeyframeResolver } from "../animation/keyframes/KeyframesResolver.js";
|
|
11
|
-
import { NativeAnimation } from "../animation/NativeAnimation.js";
|
|
12
|
-
import { acceleratedValues } from "../animation/waapi/utils/accelerated-values.js";
|
|
13
|
-
import { motionValue } from "../value/index.js";
|
|
14
|
-
import { resolveVariantFromProps } from "./utils/resolve-variants.js";
|
|
15
|
-
import { isMotionValue } from "../value/utils/is-motion-value.js";
|
|
16
|
-
import { getAnimatableNone } from "../value/types/utils/animatable-none.js";
|
|
17
|
-
import { microtask } from "../frameloop/microtask.js";
|
|
18
|
-
import { findValueType } from "../value/types/utils/find.js";
|
|
19
|
-
import { createBox } from "../projection/geometry/models.js";
|
|
20
|
-
import { visualElementStore } from "./store.js";
|
|
21
|
-
import { isControllingVariants, isVariantNode } from "./utils/is-controlling-variants.js";
|
|
22
|
-
import { updateMotionValuesFromProps } from "./utils/motion-values.js";
|
|
23
|
-
import { hasReducedMotionListener, prefersReducedMotion } from "./utils/reduced-motion/state.js";
|
|
24
|
-
import { initPrefersReducedMotion } from "./utils/reduced-motion/index.js";
|
|
25
|
-
var propEventHandlers = [
|
|
26
|
-
"AnimationStart",
|
|
27
|
-
"AnimationComplete",
|
|
28
|
-
"Update",
|
|
29
|
-
"BeforeLayoutMeasure",
|
|
30
|
-
"LayoutMeasure",
|
|
31
|
-
"LayoutAnimationStart",
|
|
32
|
-
"LayoutAnimationComplete"
|
|
33
|
-
], featureDefinitions = {};
|
|
34
|
-
function setFeatureDefinitions(e) {
|
|
35
|
-
featureDefinitions = e;
|
|
36
|
-
}
|
|
37
|
-
function getFeatureDefinitions() {
|
|
38
|
-
return featureDefinitions;
|
|
39
|
-
}
|
|
40
|
-
var VisualElement = class {
|
|
41
|
-
scrapeMotionValuesFromProps(e, y, b) {
|
|
42
|
-
return {};
|
|
43
|
-
}
|
|
44
|
-
constructor({ parent: e, props: y, presenceContext: b, reducedMotionConfig: x, skipAnimations: S, blockInitialAnimation: C, visualState: E }, D = {}) {
|
|
45
|
-
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = KeyframeResolver, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.hasBeenMounted = !1, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
46
|
-
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
47
|
-
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
48
|
-
let e = time.now();
|
|
49
|
-
this.renderScheduledAt < e && (this.renderScheduledAt = e, frame.render(this.render, !1, !0));
|
|
50
|
-
};
|
|
51
|
-
let { latestValues: O, renderState: k } = E;
|
|
52
|
-
this.latestValues = O, this.baseTarget = { ...O }, this.initialValues = y.initial ? { ...O } : {}, this.renderState = k, this.parent = e, this.props = y, this.presenceContext = b, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = x, this.skipAnimationsConfig = S, this.options = D, this.blockInitialAnimation = !!C, this.isControllingVariants = isControllingVariants(y), this.isVariantNode = isVariantNode(y), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
53
|
-
let { willChange: A, ...j } = this.scrapeMotionValuesFromProps(y, {}, this);
|
|
54
|
-
for (let e in j) {
|
|
55
|
-
let y = j[e];
|
|
56
|
-
O[e] !== void 0 && isMotionValue(y) && y.set(O[e]);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
mount(e) {
|
|
60
|
-
if (this.hasBeenMounted) for (let e in this.initialValues) this.values.get(e)?.jump(this.initialValues[e]), this.latestValues[e] = this.initialValues[e];
|
|
61
|
-
this.current = e, visualElementStore.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, y) => this.bindToMotionValue(y, e)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (hasReducedMotionListener.current || initPrefersReducedMotion(), this.shouldReduceMotion = prefersReducedMotion.current), process.env.NODE_ENV !== "production" && warnOnce(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, this.parent?.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
|
|
62
|
-
}
|
|
63
|
-
unmount() {
|
|
64
|
-
for (let e in this.projection && this.projection.unmount(), cancelFrame(this.notifyUpdate), cancelFrame(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this), this.events) this.events[e].clear();
|
|
65
|
-
for (let e in this.features) {
|
|
66
|
-
let y = this.features[e];
|
|
67
|
-
y && (y.unmount(), y.isMounted = !1);
|
|
68
|
-
}
|
|
69
|
-
this.current = null;
|
|
70
|
-
}
|
|
71
|
-
addChild(e) {
|
|
72
|
-
this.children.add(e), this.enteringChildren ??= /* @__PURE__ */ new Set(), this.enteringChildren.add(e);
|
|
73
|
-
}
|
|
74
|
-
removeChild(e) {
|
|
75
|
-
this.children.delete(e), this.enteringChildren && this.enteringChildren.delete(e);
|
|
76
|
-
}
|
|
77
|
-
bindToMotionValue(e, y) {
|
|
78
|
-
if (this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)(), y.accelerate && acceleratedValues.has(e) && this.current instanceof HTMLElement) {
|
|
79
|
-
let { factory: b, keyframes: S, times: C, ease: w, duration: T } = y.accelerate, E = new NativeAnimation({
|
|
80
|
-
element: this.current,
|
|
81
|
-
name: e,
|
|
82
|
-
keyframes: S,
|
|
83
|
-
times: C,
|
|
84
|
-
ease: w,
|
|
85
|
-
duration: secondsToMilliseconds(T)
|
|
86
|
-
}), D = b(E);
|
|
87
|
-
this.valueSubscriptions.set(e, () => {
|
|
88
|
-
D(), E.cancel();
|
|
89
|
-
});
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
let b = transformProps.has(e);
|
|
93
|
-
b && this.onBindTransform && this.onBindTransform();
|
|
94
|
-
let S = y.on("change", (y) => {
|
|
95
|
-
this.latestValues[e] = y, this.props.onUpdate && frame.preRender(this.notifyUpdate), b && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
|
|
96
|
-
}), C;
|
|
97
|
-
typeof window < "u" && window.MotionCheckAppearSync && (C = window.MotionCheckAppearSync(this, e, y)), this.valueSubscriptions.set(e, () => {
|
|
98
|
-
S(), C && C();
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
sortNodePosition(e) {
|
|
102
|
-
return !this.current || !this.sortInstanceNodePosition || this.type !== e.type ? 0 : this.sortInstanceNodePosition(this.current, e.current);
|
|
103
|
-
}
|
|
104
|
-
updateFeatures() {
|
|
105
|
-
let e = "animation";
|
|
106
|
-
for (e in featureDefinitions) {
|
|
107
|
-
let y = featureDefinitions[e];
|
|
108
|
-
if (!y) continue;
|
|
109
|
-
let { isEnabled: b, Feature: x } = y;
|
|
110
|
-
if (!this.features[e] && x && b(this.props) && (this.features[e] = new x(this)), this.features[e]) {
|
|
111
|
-
let y = this.features[e];
|
|
112
|
-
y.isMounted ? y.update() : (y.mount(), y.isMounted = !0);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
triggerBuild() {
|
|
117
|
-
this.build(this.renderState, this.latestValues, this.props);
|
|
118
|
-
}
|
|
119
|
-
measureViewportBox() {
|
|
120
|
-
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : createBox();
|
|
121
|
-
}
|
|
122
|
-
getStaticValue(e) {
|
|
123
|
-
return this.latestValues[e];
|
|
124
|
-
}
|
|
125
|
-
setStaticValue(e, y) {
|
|
126
|
-
this.latestValues[e] = y;
|
|
127
|
-
}
|
|
128
|
-
update(e, y) {
|
|
129
|
-
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = y;
|
|
130
|
-
for (let y = 0; y < propEventHandlers.length; y++) {
|
|
131
|
-
let b = propEventHandlers[y];
|
|
132
|
-
this.propEventSubscriptions[b] && (this.propEventSubscriptions[b](), delete this.propEventSubscriptions[b]);
|
|
133
|
-
let x = e["on" + b];
|
|
134
|
-
x && (this.propEventSubscriptions[b] = this.on(b, x));
|
|
135
|
-
}
|
|
136
|
-
this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(e, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
137
|
-
}
|
|
138
|
-
getProps() {
|
|
139
|
-
return this.props;
|
|
140
|
-
}
|
|
141
|
-
getVariant(e) {
|
|
142
|
-
return this.props.variants ? this.props.variants[e] : void 0;
|
|
143
|
-
}
|
|
144
|
-
getDefaultTransition() {
|
|
145
|
-
return this.props.transition;
|
|
146
|
-
}
|
|
147
|
-
getTransformPagePoint() {
|
|
148
|
-
return this.props.transformPagePoint;
|
|
149
|
-
}
|
|
150
|
-
getClosestVariantNode() {
|
|
151
|
-
return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
|
|
152
|
-
}
|
|
153
|
-
addVariantChild(e) {
|
|
154
|
-
let y = this.getClosestVariantNode();
|
|
155
|
-
if (y) return y.variantChildren && y.variantChildren.add(e), () => y.variantChildren.delete(e);
|
|
156
|
-
}
|
|
157
|
-
addValue(e, y) {
|
|
158
|
-
let b = this.values.get(e);
|
|
159
|
-
y !== b && (b && this.removeValue(e), this.bindToMotionValue(e, y), this.values.set(e, y), this.latestValues[e] = y.get());
|
|
160
|
-
}
|
|
161
|
-
removeValue(e) {
|
|
162
|
-
this.values.delete(e);
|
|
163
|
-
let y = this.valueSubscriptions.get(e);
|
|
164
|
-
y && (y(), this.valueSubscriptions.delete(e)), delete this.latestValues[e], this.removeValueFromRenderState(e, this.renderState);
|
|
165
|
-
}
|
|
166
|
-
hasValue(e) {
|
|
167
|
-
return this.values.has(e);
|
|
168
|
-
}
|
|
169
|
-
getValue(e, y) {
|
|
170
|
-
if (this.props.values && this.props.values[e]) return this.props.values[e];
|
|
171
|
-
let b = this.values.get(e);
|
|
172
|
-
return b === void 0 && y !== void 0 && (b = motionValue(y === null ? void 0 : y, { owner: this }), this.addValue(e, b)), b;
|
|
173
|
-
}
|
|
174
|
-
readValue(b, x) {
|
|
175
|
-
let S = this.latestValues[b] !== void 0 || !this.current ? this.latestValues[b] : this.getBaseTargetFromProps(this.props, b) ?? this.readValueFromInstance(this.current, b, this.options);
|
|
176
|
-
return S != null && (typeof S == "string" && (isNumericalString(S) || isZeroValueString(S)) ? S = parseFloat(S) : !findValueType(S) && complex.test(x) && (S = getAnimatableNone(b, x)), this.setBaseTarget(b, isMotionValue(S) ? S.get() : S)), isMotionValue(S) ? S.get() : S;
|
|
177
|
-
}
|
|
178
|
-
setBaseTarget(e, y) {
|
|
179
|
-
this.baseTarget[e] = y;
|
|
180
|
-
}
|
|
181
|
-
getBaseTarget(e) {
|
|
182
|
-
let { initial: y } = this.props, b;
|
|
183
|
-
if (typeof y == "string" || typeof y == "object") {
|
|
184
|
-
let x = resolveVariantFromProps(this.props, y, this.presenceContext?.custom);
|
|
185
|
-
x && (b = x[e]);
|
|
186
|
-
}
|
|
187
|
-
if (y && b !== void 0) return b;
|
|
188
|
-
let x = this.getBaseTargetFromProps(this.props, e);
|
|
189
|
-
return x !== void 0 && !isMotionValue(x) ? x : this.initialValues[e] !== void 0 && b === void 0 ? void 0 : this.baseTarget[e];
|
|
190
|
-
}
|
|
191
|
-
on(e, y) {
|
|
192
|
-
return this.events[e] || (this.events[e] = new SubscriptionManager()), this.events[e].add(y);
|
|
193
|
-
}
|
|
194
|
-
notify(e, ...y) {
|
|
195
|
-
this.events[e] && this.events[e].notify(...y);
|
|
196
|
-
}
|
|
197
|
-
scheduleRenderMicrotask() {
|
|
198
|
-
microtask.render(this.render);
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
export { VisualElement, getFeatureDefinitions, setFeatureDefinitions };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { isMotionValue } from "../../value/utils/is-motion-value.js";
|
|
2
|
-
import { DOMKeyframesResolver } from "../../animation/keyframes/DOMKeyframesResolver.js";
|
|
3
|
-
import { VisualElement } from "../VisualElement.js";
|
|
4
|
-
var DOMVisualElement = class extends VisualElement {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments), this.KeyframeResolver = DOMKeyframesResolver;
|
|
7
|
-
}
|
|
8
|
-
sortInstanceNodePosition(e, n) {
|
|
9
|
-
return e.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
10
|
-
}
|
|
11
|
-
getBaseTargetFromProps(e, n) {
|
|
12
|
-
let r = e.style;
|
|
13
|
-
return r ? r[n] : void 0;
|
|
14
|
-
}
|
|
15
|
-
removeValueFromRenderState(e, { vars: n, style: r }) {
|
|
16
|
-
delete n[e], delete r[e];
|
|
17
|
-
}
|
|
18
|
-
handleChildMotionValue() {
|
|
19
|
-
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
20
|
-
let { children: n } = this.props;
|
|
21
|
-
isMotionValue(n) && (this.childSubscription = n.on("change", (e) => {
|
|
22
|
-
this.current && (this.current.textContent = `${e}`);
|
|
23
|
-
}));
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
export { DOMVisualElement };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
var radToDeg = (e) => e * 180 / Math.PI, rotate = (a) => rebaseAngle(radToDeg(Math.atan2(a[1], a[0]))), matrix2dParsers = {
|
|
2
|
-
x: 4,
|
|
3
|
-
y: 5,
|
|
4
|
-
translateX: 4,
|
|
5
|
-
translateY: 5,
|
|
6
|
-
scaleX: 0,
|
|
7
|
-
scaleY: 3,
|
|
8
|
-
scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
|
|
9
|
-
rotate,
|
|
10
|
-
rotateZ: rotate,
|
|
11
|
-
skewX: (a) => radToDeg(Math.atan(a[1])),
|
|
12
|
-
skewY: (a) => radToDeg(Math.atan(a[2])),
|
|
13
|
-
skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
|
|
14
|
-
}, rebaseAngle = (e) => (e %= 360, e < 0 && (e += 360), e), rotateZ = rotate, scaleX = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), scaleY = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), matrix3dParsers = {
|
|
15
|
-
x: 12,
|
|
16
|
-
y: 13,
|
|
17
|
-
z: 14,
|
|
18
|
-
translateX: 12,
|
|
19
|
-
translateY: 13,
|
|
20
|
-
translateZ: 14,
|
|
21
|
-
scaleX,
|
|
22
|
-
scaleY,
|
|
23
|
-
scale: (e) => (scaleX(e) + scaleY(e)) / 2,
|
|
24
|
-
rotateX: (a) => rebaseAngle(radToDeg(Math.atan2(a[6], a[5]))),
|
|
25
|
-
rotateY: (a) => rebaseAngle(radToDeg(Math.atan2(-a[2], a[0]))),
|
|
26
|
-
rotateZ,
|
|
27
|
-
rotate: rotateZ,
|
|
28
|
-
skewX: (a) => radToDeg(Math.atan(a[4])),
|
|
29
|
-
skewY: (a) => radToDeg(Math.atan(a[1])),
|
|
30
|
-
skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
|
|
31
|
-
};
|
|
32
|
-
function defaultTransformValue(e) {
|
|
33
|
-
return e.includes("scale") ? 1 : 0;
|
|
34
|
-
}
|
|
35
|
-
function parseValueFromTransform(e, a) {
|
|
36
|
-
if (!e || e === "none") return defaultTransformValue(a);
|
|
37
|
-
let s = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u), c, l;
|
|
38
|
-
if (s) c = matrix3dParsers, l = s;
|
|
39
|
-
else {
|
|
40
|
-
let a = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
41
|
-
c = matrix2dParsers, l = a;
|
|
42
|
-
}
|
|
43
|
-
if (!l) return defaultTransformValue(a);
|
|
44
|
-
let u = c[a], d = l[1].split(",").map(convertTransformToNumber);
|
|
45
|
-
return typeof u == "function" ? u(d) : d[u];
|
|
46
|
-
}
|
|
47
|
-
var readTransformValue = (e, a) => {
|
|
48
|
-
let { transform: o = "none" } = getComputedStyle(e);
|
|
49
|
-
return parseValueFromTransform(o, a);
|
|
50
|
-
};
|
|
51
|
-
function convertTransformToNumber(e) {
|
|
52
|
-
return parseFloat(e.trim());
|
|
53
|
-
}
|
|
54
|
-
export { defaultTransformValue, parseValueFromTransform, readTransformValue };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { invariant } from "../../../../../motion-utils/dist/es/errors.js";
|
|
2
|
-
import { isCSSVariableName } from "../../animation/utils/is-css-variable.js";
|
|
3
|
-
import { defaultTransformValue, readTransformValue } from "../dom/parse-transform.js";
|
|
4
|
-
import { transformProps } from "../utils/keys-transform.js";
|
|
5
|
-
import { DOMVisualElement } from "../dom/DOMVisualElement.js";
|
|
6
|
-
import { measureViewportBox } from "../../projection/utils/measure.js";
|
|
7
|
-
import { buildHTMLStyles } from "./utils/build-styles.js";
|
|
8
|
-
import { renderHTML } from "./utils/render.js";
|
|
9
|
-
import { scrapeMotionValuesFromProps } from "./utils/scrape-motion-values.js";
|
|
10
|
-
function getComputedStyle(e) {
|
|
11
|
-
return window.getComputedStyle(e);
|
|
12
|
-
}
|
|
13
|
-
var HTMLVisualElement = class extends DOMVisualElement {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments), this.type = "html", this.renderInstance = renderHTML;
|
|
16
|
-
}
|
|
17
|
-
mount(c) {
|
|
18
|
-
invariant(!!c.style, "motion.create() components must forward their ref to a HTML or SVG element", "custom-component-ref"), super.mount(c);
|
|
19
|
-
}
|
|
20
|
-
readValueFromInstance(e, d) {
|
|
21
|
-
if (transformProps.has(d)) return this.projection?.isProjecting ? defaultTransformValue(d) : readTransformValue(e, d);
|
|
22
|
-
{
|
|
23
|
-
let l = getComputedStyle(e), u = (isCSSVariableName(d) ? l.getPropertyValue(d) : l[d]) || 0;
|
|
24
|
-
return typeof u == "string" ? u.trim() : u;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
measureInstanceViewportBox(e, { transformPagePoint: c }) {
|
|
28
|
-
return measureViewportBox(e, c);
|
|
29
|
-
}
|
|
30
|
-
build(e, c, l) {
|
|
31
|
-
buildHTMLStyles(e, c, l.transformTemplate);
|
|
32
|
-
}
|
|
33
|
-
scrapeMotionValuesFromProps(e, c, l) {
|
|
34
|
-
return scrapeMotionValuesFromProps(e, c, l);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
export { HTMLVisualElement };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { isCSSVariableName } from "../../../animation/utils/is-css-variable.js";
|
|
2
|
-
import { transformProps } from "../../utils/keys-transform.js";
|
|
3
|
-
import { numberValueTypes } from "../../../value/types/maps/number.js";
|
|
4
|
-
import { getValueAsType } from "../../../value/types/utils/get-as-type.js";
|
|
5
|
-
import { buildTransform } from "./build-transform.js";
|
|
6
|
-
function buildHTMLStyles(a, o, s) {
|
|
7
|
-
let { style: c, vars: l, transformOrigin: u } = a, d = !1, f = !1;
|
|
8
|
-
for (let i in o) {
|
|
9
|
-
let a = o[i];
|
|
10
|
-
if (transformProps.has(i)) {
|
|
11
|
-
d = !0;
|
|
12
|
-
continue;
|
|
13
|
-
} else if (isCSSVariableName(i)) {
|
|
14
|
-
l[i] = a;
|
|
15
|
-
continue;
|
|
16
|
-
} else {
|
|
17
|
-
let e = getValueAsType(a, numberValueTypes[i]);
|
|
18
|
-
i.startsWith("origin") ? (f = !0, u[i] = e) : c[i] = e;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
if (o.transform || (d || s ? c.transform = buildTransform(o, a.transform, s) : c.transform &&= "none"), f) {
|
|
22
|
-
let { originX: e = "50%", originY: n = "50%", originZ: r = 0 } = u;
|
|
23
|
-
c.transformOrigin = `${e} ${n} ${r}`;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export { buildHTMLStyles };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { transformPropOrder } from "../../utils/keys-transform.js";
|
|
2
|
-
import { numberValueTypes } from "../../../value/types/maps/number.js";
|
|
3
|
-
import { getValueAsType } from "../../../value/types/utils/get-as-type.js";
|
|
4
|
-
var translateAlias = {
|
|
5
|
-
x: "translateX",
|
|
6
|
-
y: "translateY",
|
|
7
|
-
z: "translateZ",
|
|
8
|
-
transformPerspective: "perspective"
|
|
9
|
-
}, numTransforms = transformPropOrder.length;
|
|
10
|
-
function buildTransform(a, o, s) {
|
|
11
|
-
let c = "", l = !0;
|
|
12
|
-
for (let u = 0; u < numTransforms; u++) {
|
|
13
|
-
let i = transformPropOrder[u], d = a[i];
|
|
14
|
-
if (d === void 0) continue;
|
|
15
|
-
let f = !0;
|
|
16
|
-
if (typeof d == "number") f = d === (i.startsWith("scale") ? 1 : 0);
|
|
17
|
-
else {
|
|
18
|
-
let e = parseFloat(d);
|
|
19
|
-
f = i.startsWith("scale") ? e === 1 : e === 0;
|
|
20
|
-
}
|
|
21
|
-
if (!f || s) {
|
|
22
|
-
let e = getValueAsType(d, numberValueTypes[i]);
|
|
23
|
-
if (!f) {
|
|
24
|
-
l = !1;
|
|
25
|
-
let r = translateAlias[i] || i;
|
|
26
|
-
c += `${r}(${e}) `;
|
|
27
|
-
}
|
|
28
|
-
s && (o[i] = e);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
let u = a.pathRotation;
|
|
32
|
-
return u && (l = !1, c += `rotate(${getValueAsType(u, numberValueTypes.pathRotation)}) `), c = c.trim(), s ? c = s(o, l ? "" : c) : l && (c = "none"), c;
|
|
33
|
-
}
|
|
34
|
-
export { buildTransform };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { isMotionValue } from "../../../value/utils/is-motion-value.js";
|
|
2
|
-
import { isForcedMotionValue } from "../../utils/is-forced-motion-value.js";
|
|
3
|
-
function scrapeMotionValuesFromProps(n, r, i) {
|
|
4
|
-
let a = n.style, o = r?.style, s = {};
|
|
5
|
-
if (!a) return s;
|
|
6
|
-
for (let r in a) (isMotionValue(a[r]) || o && isMotionValue(o[r]) || isForcedMotionValue(r, n) || i?.getValue(r)?.liveStyle !== void 0) && (s[r] = a[r]);
|
|
7
|
-
return s;
|
|
8
|
-
}
|
|
9
|
-
export { scrapeMotionValuesFromProps };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { transformProps } from "../utils/keys-transform.js";
|
|
2
|
-
import { camelToDash } from "../dom/utils/camel-to-dash.js";
|
|
3
|
-
import { getDefaultValueType } from "../../value/types/maps/defaults.js";
|
|
4
|
-
import { createBox } from "../../projection/geometry/models.js";
|
|
5
|
-
import { DOMVisualElement } from "../dom/DOMVisualElement.js";
|
|
6
|
-
import { buildSVGAttrs } from "./utils/build-attrs.js";
|
|
7
|
-
import { camelCaseAttributes } from "./utils/camel-case-attrs.js";
|
|
8
|
-
import { isSVGTag } from "./utils/is-svg-tag.js";
|
|
9
|
-
import { renderSVG } from "./utils/render.js";
|
|
10
|
-
import { scrapeMotionValuesFromProps } from "./utils/scrape-motion-values.js";
|
|
11
|
-
var SVGVisualElement = class extends DOMVisualElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = createBox;
|
|
14
|
-
}
|
|
15
|
-
getBaseTargetFromProps(e, s) {
|
|
16
|
-
return e[s];
|
|
17
|
-
}
|
|
18
|
-
readValueFromInstance(l, u) {
|
|
19
|
-
if (transformProps.has(u)) {
|
|
20
|
-
let e = getDefaultValueType(u);
|
|
21
|
-
return e && e.default || 0;
|
|
22
|
-
}
|
|
23
|
-
return u = camelCaseAttributes.has(u) ? u : camelToDash(u), l.getAttribute(u);
|
|
24
|
-
}
|
|
25
|
-
scrapeMotionValuesFromProps(e, s, c) {
|
|
26
|
-
return scrapeMotionValuesFromProps(e, s, c);
|
|
27
|
-
}
|
|
28
|
-
build(e, s, c) {
|
|
29
|
-
buildSVGAttrs(e, s, this.isSVGTag, c.transformTemplate, c.style);
|
|
30
|
-
}
|
|
31
|
-
renderInstance(e, s, c, l) {
|
|
32
|
-
renderSVG(e, s, c, l);
|
|
33
|
-
}
|
|
34
|
-
mount(e) {
|
|
35
|
-
this.isSVGTag = isSVGTag(e.tagName), super.mount(e);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
export { SVGVisualElement };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { buildHTMLStyles } from "../../html/utils/build-styles.js";
|
|
2
|
-
import { buildSVGPath } from "./path.js";
|
|
3
|
-
var cssMotionPathProperties = [
|
|
4
|
-
"offsetDistance",
|
|
5
|
-
"offsetPath",
|
|
6
|
-
"offsetRotate",
|
|
7
|
-
"offsetAnchor"
|
|
8
|
-
];
|
|
9
|
-
function buildSVGAttrs(r, { attrX: i, attrY: a, attrScale: o, pathLength: s, pathSpacing: c = 1, pathOffset: l = 0, ...u }, d, f, p) {
|
|
10
|
-
if (buildHTMLStyles(r, u, f), d) {
|
|
11
|
-
r.style.viewBox && (r.attrs.viewBox = r.style.viewBox);
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
r.attrs = r.style, r.style = {};
|
|
15
|
-
let { attrs: m, style: h } = r;
|
|
16
|
-
m.transform && (h.transform = m.transform, delete m.transform), (h.transform || m.transformOrigin) && (h.transformOrigin = m.transformOrigin ?? "50% 50%", delete m.transformOrigin), h.transform && (h.transformBox = p?.transformBox ?? "fill-box", delete m.transformBox);
|
|
17
|
-
for (let e of cssMotionPathProperties) m[e] !== void 0 && (h[e] = m[e], delete m[e]);
|
|
18
|
-
i !== void 0 && (m.x = i), a !== void 0 && (m.y = a), o !== void 0 && (m.scale = o), s !== void 0 && buildSVGPath(m, s, c, l, !1);
|
|
19
|
-
}
|
|
20
|
-
export { buildSVGAttrs };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
var camelCaseAttributes = new Set([
|
|
2
|
-
"baseFrequency",
|
|
3
|
-
"diffuseConstant",
|
|
4
|
-
"kernelMatrix",
|
|
5
|
-
"kernelUnitLength",
|
|
6
|
-
"keySplines",
|
|
7
|
-
"keyTimes",
|
|
8
|
-
"limitingConeAngle",
|
|
9
|
-
"markerHeight",
|
|
10
|
-
"markerWidth",
|
|
11
|
-
"numOctaves",
|
|
12
|
-
"targetX",
|
|
13
|
-
"targetY",
|
|
14
|
-
"surfaceScale",
|
|
15
|
-
"specularConstant",
|
|
16
|
-
"specularExponent",
|
|
17
|
-
"stdDeviation",
|
|
18
|
-
"tableValues",
|
|
19
|
-
"viewBox",
|
|
20
|
-
"gradientTransform",
|
|
21
|
-
"pathLength",
|
|
22
|
-
"startOffset",
|
|
23
|
-
"textLength",
|
|
24
|
-
"lengthAdjust"
|
|
25
|
-
]);
|
|
26
|
-
export { camelCaseAttributes };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
var dashKeys = {
|
|
2
|
-
offset: "stroke-dashoffset",
|
|
3
|
-
array: "stroke-dasharray"
|
|
4
|
-
}, camelKeys = {
|
|
5
|
-
offset: "strokeDashoffset",
|
|
6
|
-
array: "strokeDasharray"
|
|
7
|
-
};
|
|
8
|
-
function buildSVGPath(n, r, i = 1, a = 0, o = !0) {
|
|
9
|
-
n.pathLength = 1;
|
|
10
|
-
let s = o ? dashKeys : camelKeys;
|
|
11
|
-
n[s.offset] = `${-a}`, n[s.array] = `${r} ${i}`;
|
|
12
|
-
}
|
|
13
|
-
export { buildSVGPath };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { camelToDash } from "../../dom/utils/camel-to-dash.js";
|
|
2
|
-
import { renderHTML } from "../../html/utils/render.js";
|
|
3
|
-
import { camelCaseAttributes } from "./camel-case-attrs.js";
|
|
4
|
-
function renderSVG(r, i, a, o) {
|
|
5
|
-
for (let a in renderHTML(r, i, void 0, o), i.attrs) r.setAttribute(camelCaseAttributes.has(a) ? a : camelToDash(a), i.attrs[a]);
|
|
6
|
-
}
|
|
7
|
-
export { renderSVG };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { transformPropOrder } from "../../utils/keys-transform.js";
|
|
2
|
-
import { isMotionValue } from "../../../value/utils/is-motion-value.js";
|
|
3
|
-
import { scrapeMotionValuesFromProps } from "../../html/utils/scrape-motion-values.js";
|
|
4
|
-
function scrapeMotionValuesFromProps$1(r, i, a) {
|
|
5
|
-
let o = scrapeMotionValuesFromProps(r, i, a);
|
|
6
|
-
for (let n in r) if (isMotionValue(r[n]) || isMotionValue(i[n])) {
|
|
7
|
-
let t = transformPropOrder.indexOf(n) === -1 ? n : "attr" + n.charAt(0).toUpperCase() + n.substring(1);
|
|
8
|
-
o[t] = r[n];
|
|
9
|
-
}
|
|
10
|
-
return o;
|
|
11
|
-
}
|
|
12
|
-
export { scrapeMotionValuesFromProps$1 as scrapeMotionValuesFromProps };
|