@code0-tech/pictor 0.9.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/components/island/Island.style.css +1 -0
- package/dist/assets/components/resizable/Resizable.style.css +1 -1
- package/dist/components/breadcrumb/Breadcrumb.js +7 -7
- package/dist/components/button/Button.js +11 -11
- package/dist/components/data-table/DataTable.js +15 -15
- package/dist/components/data-table/DataTableFilterSuggestionMenu.js +15 -15
- package/dist/components/editor/Editor.js +13 -13
- package/dist/components/form/CheckboxInput.js +4 -4
- package/dist/components/form/EmailInput.js +9 -9
- package/dist/components/form/InputContentEditable.hook.js +11 -11
- package/dist/components/form/InputWrapper.js +15 -15
- package/dist/components/form/NumberInput.js +9 -9
- package/dist/components/form/PasswordInput.js +4 -4
- package/dist/components/form/SwitchInput.js +7 -7
- package/dist/components/form/TextAreaInput.js +6 -6
- package/dist/components/form/TextInput.js +6 -6
- package/dist/components/form/useForm.js +2 -2
- package/dist/components/fullscreen/FullScreen.js +2 -2
- package/dist/components/gantt/GanttGroup.js +15 -15
- package/dist/components/island/Island.d.ts +6 -0
- package/dist/components/island/Island.hook.d.ts +19 -0
- package/dist/components/island/Island.hook.js +58 -0
- package/dist/components/island/Island.js +71 -0
- package/dist/components/progress/Progress.js +18 -18
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +17 -0
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +9 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +13 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +15 -0
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +8 -0
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js +14 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +285 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +22 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +67 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +28 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +21 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +130 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +43 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +29 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +45 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +33 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +13 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +39 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +17 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +21 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +60 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +11 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +14 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +45 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +21 -0
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +62 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +4 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +21 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +65 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +52 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +39 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +18 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +13 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +7 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +10 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +16 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +21 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +24 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +10 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +27 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +9 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +30 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +22 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +10 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +8 -0
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js +9 -0
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +4 -0
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +4 -0
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +6 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +8 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +112 -0
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +144 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +106 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +38 -0
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +17 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +30 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +178 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +46 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +59 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +22 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +68 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +74 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +23 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +31 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +22 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +33 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +17 -0
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +5 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +43 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +11 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +11 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +38 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +34 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +25 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +53 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +38 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +25 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +34 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +25 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +618 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +53 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +19 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +263 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +28 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +65 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +38 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/render/store.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +40 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +28 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +11 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +143 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +23 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +25 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +5 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +39 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +23 -0
- package/dist/node_modules/motion-dom/dist/es/resize/index.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +42 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +51 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +5 -0
- package/dist/node_modules/motion-dom/dist/es/value/index.js +212 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +19 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +22 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +24 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +51 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +11 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +70 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +17 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +17 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/array.js +11 -0
- package/dist/node_modules/motion-utils/dist/es/clamp.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +5 -0
- package/dist/node_modules/motion-utils/dist/es/easing/back.js +9 -0
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js +8 -0
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +19 -0
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +32 -0
- package/dist/node_modules/motion-utils/dist/es/errors.js +14 -0
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js +6 -0
- package/dist/node_modules/motion-utils/dist/es/global-config.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/is-object.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/memo.js +8 -0
- package/dist/node_modules/motion-utils/dist/es/noop.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/pipe.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/progress.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +29 -0
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js +5 -0
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/warn-once.js +8 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +2 -2
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +8 -8
- package/dist/utils/reactiveArrayService.js +4 -4
- package/package.json +9 -6
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -25
- package/dist/node_modules/@radix-ui/react-progress/dist/index.js +0 -81
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.js +0 -55
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.js +0 -32
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-slot/dist/index.js +0 -58
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const i = /* @__PURE__ */ new Set();
|
|
2
|
+
let e;
|
|
3
|
+
function d() {
|
|
4
|
+
e = () => {
|
|
5
|
+
const n = {
|
|
6
|
+
get width() {
|
|
7
|
+
return window.innerWidth;
|
|
8
|
+
},
|
|
9
|
+
get height() {
|
|
10
|
+
return window.innerHeight;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
i.forEach((t) => t(n));
|
|
14
|
+
}, window.addEventListener("resize", e);
|
|
15
|
+
}
|
|
16
|
+
function r(n) {
|
|
17
|
+
return i.add(n), e || d(), () => {
|
|
18
|
+
i.delete(n), !i.size && typeof e == "function" && (window.removeEventListener("resize", e), e = void 0);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
r as resizeWindow
|
|
23
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { time as s } from "../frameloop/sync-time.js";
|
|
2
|
+
import { frame as m, cancelFrame as o } from "../frameloop/frame.js";
|
|
3
|
+
function i(c, r) {
|
|
4
|
+
const n = s.now(), e = ({ timestamp: a }) => {
|
|
5
|
+
const t = a - n;
|
|
6
|
+
t >= r && (o(e), c(t - r));
|
|
7
|
+
};
|
|
8
|
+
return m.setup(e, !0), () => o(e);
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
i as delay
|
|
12
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { mix as h } from "./mix/index.js";
|
|
2
|
+
import { invariant as x } from "../../../../motion-utils/dist/es/errors.js";
|
|
3
|
+
import { clamp as M } from "../../../../motion-utils/dist/es/clamp.js";
|
|
4
|
+
import { noop as b } from "../../../../motion-utils/dist/es/noop.js";
|
|
5
|
+
import { pipe as y } from "../../../../motion-utils/dist/es/pipe.js";
|
|
6
|
+
import { progress as A } from "../../../../motion-utils/dist/es/progress.js";
|
|
7
|
+
import { MotionGlobalConfig as F } from "../../../../motion-utils/dist/es/global-config.js";
|
|
8
|
+
function R(r, e, f) {
|
|
9
|
+
const t = [], a = f || F.mix || h, n = r.length - 1;
|
|
10
|
+
for (let o = 0; o < n; o++) {
|
|
11
|
+
let i = a(r[o], r[o + 1]);
|
|
12
|
+
if (e) {
|
|
13
|
+
const c = Array.isArray(e) ? e[o] || b : e;
|
|
14
|
+
i = y(c, i);
|
|
15
|
+
}
|
|
16
|
+
t.push(i);
|
|
17
|
+
}
|
|
18
|
+
return t;
|
|
19
|
+
}
|
|
20
|
+
function I(r, e, { clamp: f = !0, ease: t, mixer: a } = {}) {
|
|
21
|
+
const n = r.length;
|
|
22
|
+
if (x(n === e.length, "Both input and output ranges must be the same length", "range-length"), n === 1)
|
|
23
|
+
return () => e[0];
|
|
24
|
+
if (n === 2 && e[0] === e[1])
|
|
25
|
+
return () => e[1];
|
|
26
|
+
const o = r[0] === r[1];
|
|
27
|
+
r[0] > r[n - 1] && (r = [...r].reverse(), e = [...e].reverse());
|
|
28
|
+
const i = R(e, t, a), c = i.length, l = (s) => {
|
|
29
|
+
if (o && s < r[0])
|
|
30
|
+
return e[0];
|
|
31
|
+
let m = 0;
|
|
32
|
+
if (c > 1)
|
|
33
|
+
for (; m < r.length - 2 && !(s < r[m + 1]); m++)
|
|
34
|
+
;
|
|
35
|
+
const g = A(r[m], r[m + 1], s);
|
|
36
|
+
return i[m](g);
|
|
37
|
+
};
|
|
38
|
+
return f ? (s) => l(M(r[0], r[n - 1], s)) : l;
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
I as interpolate
|
|
42
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { hex as p } from "../../value/types/color/hex.js";
|
|
2
|
+
import { hsla as l } from "../../value/types/color/hsla.js";
|
|
3
|
+
import { hslaToRgba as c } from "../../value/types/color/hsla-to-rgba.js";
|
|
4
|
+
import { rgba as s } from "../../value/types/color/rgba.js";
|
|
5
|
+
import { mixImmediate as f } from "./immediate.js";
|
|
6
|
+
import { mixNumber as u } from "./number.js";
|
|
7
|
+
import { warning as d } from "../../../../../motion-utils/dist/es/errors.js";
|
|
8
|
+
const m = (r, o, e) => {
|
|
9
|
+
const t = r * r, n = e * (o * o - t) + t;
|
|
10
|
+
return n < 0 ? 0 : Math.sqrt(n);
|
|
11
|
+
}, b = [p, s, l], h = (r) => b.find((o) => o.test(r));
|
|
12
|
+
function i(r) {
|
|
13
|
+
const o = h(r);
|
|
14
|
+
if (d(!!o, `'${r}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !o)
|
|
15
|
+
return !1;
|
|
16
|
+
let e = o.parse(r);
|
|
17
|
+
return o === l && (e = c(e)), e;
|
|
18
|
+
}
|
|
19
|
+
const G = (r, o) => {
|
|
20
|
+
const e = i(r), t = i(o);
|
|
21
|
+
if (!e || !t)
|
|
22
|
+
return f(r, o);
|
|
23
|
+
const n = { ...e };
|
|
24
|
+
return (a) => (n.red = m(e.red, t.red, a), n.green = m(e.green, t.green, a), n.blue = m(e.blue, t.blue, a), n.alpha = u(e.alpha, t.alpha, a), s.transform(n));
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
G as mixColor,
|
|
28
|
+
m as mixLinearColor
|
|
29
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { isCSSVariableToken as d } from "../../animation/utils/is-css-variable.js";
|
|
2
|
+
import { color as u } from "../../value/types/color/index.js";
|
|
3
|
+
import { complex as h, analyseComplexValue as m } from "../../value/types/complex/index.js";
|
|
4
|
+
import { mixColor as a } from "./color.js";
|
|
5
|
+
import { mixImmediate as l } from "./immediate.js";
|
|
6
|
+
import { mixNumber as b } from "./number.js";
|
|
7
|
+
import { invisibleValues as c, mixVisibility as y } from "./visibility.js";
|
|
8
|
+
import { pipe as v } from "../../../../../motion-utils/dist/es/pipe.js";
|
|
9
|
+
import { warning as g } from "../../../../../motion-utils/dist/es/errors.js";
|
|
10
|
+
function V(e, t) {
|
|
11
|
+
return (r) => b(e, t, r);
|
|
12
|
+
}
|
|
13
|
+
function f(e) {
|
|
14
|
+
return typeof e == "number" ? V : typeof e == "string" ? d(e) ? l : u.test(e) ? a : I : Array.isArray(e) ? p : typeof e == "object" ? u.test(e) ? a : C : l;
|
|
15
|
+
}
|
|
16
|
+
function p(e, t) {
|
|
17
|
+
const r = [...e], o = r.length, n = e.map((i, s) => f(i)(i, t[s]));
|
|
18
|
+
return (i) => {
|
|
19
|
+
for (let s = 0; s < o; s++)
|
|
20
|
+
r[s] = n[s](i);
|
|
21
|
+
return r;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function C(e, t) {
|
|
25
|
+
const r = { ...e, ...t }, o = {};
|
|
26
|
+
for (const n in r)
|
|
27
|
+
e[n] !== void 0 && t[n] !== void 0 && (o[n] = f(e[n])(e[n], t[n]));
|
|
28
|
+
return (n) => {
|
|
29
|
+
for (const i in o)
|
|
30
|
+
r[i] = o[i](n);
|
|
31
|
+
return r;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function k(e, t) {
|
|
35
|
+
const r = [], o = { color: 0, var: 0, number: 0 };
|
|
36
|
+
for (let n = 0; n < t.values.length; n++) {
|
|
37
|
+
const i = t.types[n], s = e.indexes[i][o[i]], x = e.values[s] ?? 0;
|
|
38
|
+
r[n] = x, o[i]++;
|
|
39
|
+
}
|
|
40
|
+
return r;
|
|
41
|
+
}
|
|
42
|
+
const I = (e, t) => {
|
|
43
|
+
const r = h.createTransformer(t), o = m(e), n = m(t);
|
|
44
|
+
return o.indexes.var.length === n.indexes.var.length && o.indexes.color.length === n.indexes.color.length && o.indexes.number.length >= n.indexes.number.length ? c.has(e) && !n.values.length || c.has(t) && !o.values.length ? y(e, t) : v(p(k(o, n), n.values), r) : (g(!0, `Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), l(e, t));
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
f as getMixer,
|
|
48
|
+
p as mixArray,
|
|
49
|
+
I as mixComplex,
|
|
50
|
+
C as mixObject
|
|
51
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function i(n, s, u) {
|
|
2
|
+
if (n == null)
|
|
3
|
+
return [];
|
|
4
|
+
if (n instanceof EventTarget)
|
|
5
|
+
return [n];
|
|
6
|
+
if (typeof n == "string") {
|
|
7
|
+
let r = document;
|
|
8
|
+
const f = u?.[n] ?? r.querySelectorAll(n);
|
|
9
|
+
return f ? Array.from(f) : [];
|
|
10
|
+
}
|
|
11
|
+
return Array.from(n).filter((r) => r != null);
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
i as resolveElements
|
|
15
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { memoSupports as e } from "./memo.js";
|
|
2
|
+
const a = /* @__PURE__ */ e(() => {
|
|
3
|
+
try {
|
|
4
|
+
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
5
|
+
} catch {
|
|
6
|
+
return !1;
|
|
7
|
+
}
|
|
8
|
+
return !0;
|
|
9
|
+
}, "linearEasing");
|
|
10
|
+
export {
|
|
11
|
+
a as supportsLinearEasing
|
|
12
|
+
};
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { time as n } from "../frameloop/sync-time.js";
|
|
2
|
+
import { frame as o } from "../frameloop/frame.js";
|
|
3
|
+
import { warnOnce as d } from "../../../../motion-utils/dist/es/warn-once.js";
|
|
4
|
+
import { SubscriptionManager as c } from "../../../../motion-utils/dist/es/subscription-manager.js";
|
|
5
|
+
import { velocityPerSecond as p } from "../../../../motion-utils/dist/es/velocity-per-second.js";
|
|
6
|
+
const r = 30, u = (s) => !isNaN(parseFloat(s));
|
|
7
|
+
class f {
|
|
8
|
+
/**
|
|
9
|
+
* @param init - The initiating value
|
|
10
|
+
* @param config - Optional configuration options
|
|
11
|
+
*
|
|
12
|
+
* - `transformer`: A function to transform incoming values with.
|
|
13
|
+
*/
|
|
14
|
+
constructor(t, e = {}) {
|
|
15
|
+
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (i) => {
|
|
16
|
+
const a = n.now();
|
|
17
|
+
if (this.updatedAt !== a && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(i), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents))
|
|
18
|
+
for (const h of this.dependents)
|
|
19
|
+
h.dirty();
|
|
20
|
+
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = e.owner;
|
|
21
|
+
}
|
|
22
|
+
setCurrent(t) {
|
|
23
|
+
this.current = t, this.updatedAt = n.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = u(this.current));
|
|
24
|
+
}
|
|
25
|
+
setPrevFrameValue(t = this.current) {
|
|
26
|
+
this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Adds a function that will be notified when the `MotionValue` is updated.
|
|
30
|
+
*
|
|
31
|
+
* It returns a function that, when called, will cancel the subscription.
|
|
32
|
+
*
|
|
33
|
+
* When calling `onChange` inside a React component, it should be wrapped with the
|
|
34
|
+
* `useEffect` hook. As it returns an unsubscribe function, this should be returned
|
|
35
|
+
* from the `useEffect` function to ensure you don't add duplicate subscribers..
|
|
36
|
+
*
|
|
37
|
+
* ```jsx
|
|
38
|
+
* export const MyComponent = () => {
|
|
39
|
+
* const x = useMotionValue(0)
|
|
40
|
+
* const y = useMotionValue(0)
|
|
41
|
+
* const opacity = useMotionValue(1)
|
|
42
|
+
*
|
|
43
|
+
* useEffect(() => {
|
|
44
|
+
* function updateOpacity() {
|
|
45
|
+
* const maxXY = Math.max(x.get(), y.get())
|
|
46
|
+
* const newOpacity = transform(maxXY, [0, 100], [1, 0])
|
|
47
|
+
* opacity.set(newOpacity)
|
|
48
|
+
* }
|
|
49
|
+
*
|
|
50
|
+
* const unsubscribeX = x.on("change", updateOpacity)
|
|
51
|
+
* const unsubscribeY = y.on("change", updateOpacity)
|
|
52
|
+
*
|
|
53
|
+
* return () => {
|
|
54
|
+
* unsubscribeX()
|
|
55
|
+
* unsubscribeY()
|
|
56
|
+
* }
|
|
57
|
+
* }, [])
|
|
58
|
+
*
|
|
59
|
+
* return <motion.div style={{ x }} />
|
|
60
|
+
* }
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param subscriber - A function that receives the latest value.
|
|
64
|
+
* @returns A function that, when called, will cancel this subscription.
|
|
65
|
+
*
|
|
66
|
+
* @deprecated
|
|
67
|
+
*/
|
|
68
|
+
onChange(t) {
|
|
69
|
+
return process.env.NODE_ENV !== "production" && d(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
|
|
70
|
+
}
|
|
71
|
+
on(t, e) {
|
|
72
|
+
this.events[t] || (this.events[t] = new c());
|
|
73
|
+
const i = this.events[t].add(e);
|
|
74
|
+
return t === "change" ? () => {
|
|
75
|
+
i(), o.read(() => {
|
|
76
|
+
this.events.change.getSize() || this.stop();
|
|
77
|
+
});
|
|
78
|
+
} : i;
|
|
79
|
+
}
|
|
80
|
+
clearListeners() {
|
|
81
|
+
for (const t in this.events)
|
|
82
|
+
this.events[t].clear();
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Attaches a passive effect to the `MotionValue`.
|
|
86
|
+
*/
|
|
87
|
+
attach(t, e) {
|
|
88
|
+
this.passiveEffect = t, this.stopPassiveEffect = e;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Sets the state of the `MotionValue`.
|
|
92
|
+
*
|
|
93
|
+
* @remarks
|
|
94
|
+
*
|
|
95
|
+
* ```jsx
|
|
96
|
+
* const x = useMotionValue(0)
|
|
97
|
+
* x.set(10)
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* @param latest - Latest value to set.
|
|
101
|
+
* @param render - Whether to notify render subscribers. Defaults to `true`
|
|
102
|
+
*
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
set(t) {
|
|
106
|
+
this.passiveEffect ? this.passiveEffect(t, this.updateAndNotify) : this.updateAndNotify(t);
|
|
107
|
+
}
|
|
108
|
+
setWithVelocity(t, e, i) {
|
|
109
|
+
this.set(e), this.prev = void 0, this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt - i;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Set the state of the `MotionValue`, stopping any active animations,
|
|
113
|
+
* effects, and resets velocity to `0`.
|
|
114
|
+
*/
|
|
115
|
+
jump(t, e = !0) {
|
|
116
|
+
this.updateAndNotify(t), this.prev = t, this.prevUpdatedAt = this.prevFrameValue = void 0, e && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
117
|
+
}
|
|
118
|
+
dirty() {
|
|
119
|
+
this.events.change?.notify(this.current);
|
|
120
|
+
}
|
|
121
|
+
addDependent(t) {
|
|
122
|
+
this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(t);
|
|
123
|
+
}
|
|
124
|
+
removeDependent(t) {
|
|
125
|
+
this.dependents && this.dependents.delete(t);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Returns the latest state of `MotionValue`
|
|
129
|
+
*
|
|
130
|
+
* @returns - The latest state of `MotionValue`
|
|
131
|
+
*
|
|
132
|
+
* @public
|
|
133
|
+
*/
|
|
134
|
+
get() {
|
|
135
|
+
return this.current;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* @public
|
|
139
|
+
*/
|
|
140
|
+
getPrevious() {
|
|
141
|
+
return this.prev;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Returns the latest velocity of `MotionValue`
|
|
145
|
+
*
|
|
146
|
+
* @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
|
|
147
|
+
*
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
150
|
+
getVelocity() {
|
|
151
|
+
const t = n.now();
|
|
152
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > r)
|
|
153
|
+
return 0;
|
|
154
|
+
const e = Math.min(this.updatedAt - this.prevUpdatedAt, r);
|
|
155
|
+
return p(parseFloat(this.current) - parseFloat(this.prevFrameValue), e);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Registers a new animation to control this `MotionValue`. Only one
|
|
159
|
+
* animation can drive a `MotionValue` at one time.
|
|
160
|
+
*
|
|
161
|
+
* ```jsx
|
|
162
|
+
* value.start()
|
|
163
|
+
* ```
|
|
164
|
+
*
|
|
165
|
+
* @param animation - A function that starts the provided animation
|
|
166
|
+
*/
|
|
167
|
+
start(t) {
|
|
168
|
+
return this.stop(), new Promise((e) => {
|
|
169
|
+
this.hasAnimated = !0, this.animation = t(e), this.events.animationStart && this.events.animationStart.notify();
|
|
170
|
+
}).then(() => {
|
|
171
|
+
this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Stop the currently active animation.
|
|
176
|
+
*
|
|
177
|
+
* @public
|
|
178
|
+
*/
|
|
179
|
+
stop() {
|
|
180
|
+
this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Returns `true` if this value is currently animating.
|
|
184
|
+
*
|
|
185
|
+
* @public
|
|
186
|
+
*/
|
|
187
|
+
isAnimating() {
|
|
188
|
+
return !!this.animation;
|
|
189
|
+
}
|
|
190
|
+
clearAnimation() {
|
|
191
|
+
delete this.animation;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Destroy and clean up subscribers to this `MotionValue`.
|
|
195
|
+
*
|
|
196
|
+
* The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
|
|
197
|
+
* handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
|
|
198
|
+
* created a `MotionValue` via the `motionValue` function.
|
|
199
|
+
*
|
|
200
|
+
* @public
|
|
201
|
+
*/
|
|
202
|
+
destroy() {
|
|
203
|
+
this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function V(s, t) {
|
|
207
|
+
return new f(s, t);
|
|
208
|
+
}
|
|
209
|
+
export {
|
|
210
|
+
f as MotionValue,
|
|
211
|
+
V as motionValue
|
|
212
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { rgba as i } from "./rgba.js";
|
|
2
|
+
import { isColorString as g } from "./utils.js";
|
|
3
|
+
function a(r) {
|
|
4
|
+
let t = "", e = "", n = "", s = "";
|
|
5
|
+
return r.length > 5 ? (t = r.substring(1, 3), e = r.substring(3, 5), n = r.substring(5, 7), s = r.substring(7, 9)) : (t = r.substring(1, 2), e = r.substring(2, 3), n = r.substring(3, 4), s = r.substring(4, 5), t += t, e += e, n += n, s += s), {
|
|
6
|
+
red: parseInt(t, 16),
|
|
7
|
+
green: parseInt(e, 16),
|
|
8
|
+
blue: parseInt(n, 16),
|
|
9
|
+
alpha: s ? parseInt(s, 16) / 255 : 1
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
const u = {
|
|
13
|
+
test: /* @__PURE__ */ g("#"),
|
|
14
|
+
parse: a,
|
|
15
|
+
transform: i.transform
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
u as hex
|
|
19
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function c(e, f, r) {
|
|
2
|
+
return r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? e + (f - e) * 6 * r : r < 1 / 2 ? f : r < 2 / 3 ? e + (f - e) * (2 / 3 - r) * 6 : e;
|
|
3
|
+
}
|
|
4
|
+
function R({ hue: e, saturation: f, lightness: r, alpha: M }) {
|
|
5
|
+
e /= 360, f /= 100, r /= 100;
|
|
6
|
+
let o = 0, u = 0, d = 0;
|
|
7
|
+
if (!f)
|
|
8
|
+
o = u = d = r;
|
|
9
|
+
else {
|
|
10
|
+
const n = r < 0.5 ? r * (1 + f) : r + f - r * f, b = 2 * r - n;
|
|
11
|
+
o = c(b, n, e + 1 / 3), u = c(b, n, e), d = c(b, n, e - 1 / 3);
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
red: Math.round(o * 255),
|
|
15
|
+
green: Math.round(u * 255),
|
|
16
|
+
blue: Math.round(d * 255),
|
|
17
|
+
alpha: M
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
R as hslaToRgba
|
|
22
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { alpha as n } from "../numbers/index.js";
|
|
2
|
+
import { percent as t } from "../numbers/units.js";
|
|
3
|
+
import { sanitize as r } from "../utils/sanitize.js";
|
|
4
|
+
import { splitColor as i, isColorString as e } from "./utils.js";
|
|
5
|
+
const u = {
|
|
6
|
+
test: /* @__PURE__ */ e("hsl", "hue"),
|
|
7
|
+
parse: /* @__PURE__ */ i("hue", "saturation", "lightness"),
|
|
8
|
+
transform: ({ hue: o, saturation: s, lightness: a, alpha: m = 1 }) => "hsla(" + Math.round(o) + ", " + t.transform(r(s)) + ", " + t.transform(r(a)) + ", " + r(n.transform(m)) + ")"
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
u as hsla
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { hex as o } from "./hex.js";
|
|
2
|
+
import { hsla as t } from "./hsla.js";
|
|
3
|
+
import { rgba as e } from "./rgba.js";
|
|
4
|
+
const a = {
|
|
5
|
+
test: (r) => e.test(r) || o.test(r) || t.test(r),
|
|
6
|
+
parse: (r) => e.test(r) ? e.parse(r) : t.test(r) ? t.parse(r) : o.parse(r),
|
|
7
|
+
transform: (r) => typeof r == "string" ? r : r.hasOwnProperty("red") ? e.transform(r) : t.transform(r),
|
|
8
|
+
getAnimatableNone: (r) => {
|
|
9
|
+
const s = a.parse(r);
|
|
10
|
+
return s.alpha = 0, a.transform(s);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
a as color
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { number as n, alpha as s } from "../numbers/index.js";
|
|
2
|
+
import { sanitize as i } from "../utils/sanitize.js";
|
|
3
|
+
import { splitColor as p, isColorString as e } from "./utils.js";
|
|
4
|
+
import { clamp as f } from "../../../../../../motion-utils/dist/es/clamp.js";
|
|
5
|
+
const l = (r) => f(0, 255, r), o = {
|
|
6
|
+
...n,
|
|
7
|
+
transform: (r) => Math.round(l(r))
|
|
8
|
+
}, h = {
|
|
9
|
+
test: /* @__PURE__ */ e("rgb", "red"),
|
|
10
|
+
parse: /* @__PURE__ */ p("red", "green", "blue"),
|
|
11
|
+
transform: ({ red: r, green: t, blue: a, alpha: m = 1 }) => "rgba(" + o.transform(r) + ", " + o.transform(t) + ", " + o.transform(a) + ", " + i(s.transform(m)) + ")"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
o as rgbUnit,
|
|
15
|
+
h as rgba
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { floatRegex as i } from "../utils/float-regex.js";
|
|
2
|
+
import { isNullish as n } from "../utils/is-nullish.js";
|
|
3
|
+
import { singleColorRegex as f } from "../utils/single-color-regex.js";
|
|
4
|
+
const h = (r, o) => (t) => !!(typeof t == "string" && f.test(t) && t.startsWith(r) || o && !n(t) && Object.prototype.hasOwnProperty.call(t, o)), u = (r, o, t) => (e) => {
|
|
5
|
+
if (typeof e != "string")
|
|
6
|
+
return e;
|
|
7
|
+
const [l, s, p, a] = e.match(i);
|
|
8
|
+
return {
|
|
9
|
+
[r]: parseFloat(l),
|
|
10
|
+
[o]: parseFloat(s),
|
|
11
|
+
[t]: parseFloat(p),
|
|
12
|
+
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
h as isColorString,
|
|
17
|
+
u as splitColor
|
|
18
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { complex as c } from "./index.js";
|
|
2
|
+
import { floatRegex as i } from "../utils/float-regex.js";
|
|
3
|
+
const s = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
4
|
+
function u(t) {
|
|
5
|
+
const [e, n] = t.slice(0, -1).split("(");
|
|
6
|
+
if (e === "drop-shadow")
|
|
7
|
+
return t;
|
|
8
|
+
const [o] = n.match(i) || [];
|
|
9
|
+
if (!o)
|
|
10
|
+
return t;
|
|
11
|
+
const r = n.replace(o, "");
|
|
12
|
+
let a = s.has(e) ? 1 : 0;
|
|
13
|
+
return o !== n && (a *= 100), e + "(" + a + r + ")";
|
|
14
|
+
}
|
|
15
|
+
const l = /\b([a-z-]*)\(.*?\)/gu, p = {
|
|
16
|
+
...c,
|
|
17
|
+
getAnimatableNone: (t) => {
|
|
18
|
+
const e = t.match(l);
|
|
19
|
+
return e ? e.map(u).join(" ") : t;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
p as filter
|
|
24
|
+
};
|