@pibit.ai/cure-design-system 0.3.5 → 0.3.6
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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -21
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +59 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +34 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +47 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +17 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +12 -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 +277 -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 +131 -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 +23 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +27 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +34 -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 +44 -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 +63 -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 +22 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +66 -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 +38 -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 +20 -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-composed-ref.js +28 -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 +106 -0
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +133 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +109 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +37 -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/defaults.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.js +52 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.js +98 -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 +49 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +30 -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 +69 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +75 -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 +31 -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-final-keyframe.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +6 -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 +6 -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/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 +24 -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/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 +41 -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 +24 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +33 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +13 -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 +27 -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 +52 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +36 -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 +16 -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 +623 -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 +60 -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 +247 -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 +38 -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 +37 -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 +14 -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 +141 -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/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 +215 -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 +49 -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 +24 -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 +31 -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 +10 -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 +18 -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 +15 -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 +6 -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 +6 -0
- package/dist/node_modules/motion-utils/dist/es/warn-once.js +8 -0
- package/dist/patterns/tree/TreeStructure.js +110 -0
- package/dist/patterns/tree/helper.js +21 -0
- package/dist/patterns/tree/index.d.ts +4 -0
- package/dist/patterns/tree/index.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { supportsLinearEasing as o } from "../../../utils/supports/linear-easing.js";
|
|
2
|
+
import { generateLinearEasing as f } from "../utils/linear.js";
|
|
3
|
+
import { cubicBezierAsString as n } from "./cubic-bezier.js";
|
|
4
|
+
import { supportedWaapiEasing as i } from "./supported.js";
|
|
5
|
+
import { isBezierDefinition as p } from "../../../../../../motion-utils/dist/es/easing/utils/is-bezier-definition.js";
|
|
6
|
+
function m(r, e) {
|
|
7
|
+
if (r)
|
|
8
|
+
return typeof r == "function" ? o() ? f(r, e) : "ease-out" : p(r) ? n(r) : Array.isArray(r) ? r.map((t) => m(t, e) || i.easeOut) : i[r];
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
m as mapEasingToNativeEasing
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cubicBezierAsString as e } from "./cubic-bezier.js";
|
|
2
|
+
const i = {
|
|
3
|
+
linear: "linear",
|
|
4
|
+
ease: "ease",
|
|
5
|
+
easeIn: "ease-in",
|
|
6
|
+
easeOut: "ease-out",
|
|
7
|
+
easeInOut: "ease-in-out",
|
|
8
|
+
circIn: /* @__PURE__ */ e([0, 0.65, 0.55, 1]),
|
|
9
|
+
circOut: /* @__PURE__ */ e([0.55, 0, 1, 0.45]),
|
|
10
|
+
backIn: /* @__PURE__ */ e([0.31, 0.01, 0.66, -0.59]),
|
|
11
|
+
backOut: /* @__PURE__ */ e([0.33, 1.53, 0.69, 0.99])
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
i as supportedWaapiEasing
|
|
15
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { mapEasingToNativeEasing as g } from "./easing/map-easing.js";
|
|
2
|
+
function u(r, s, f, { delay: m = 0, duration: n = 300, repeat: p = 0, repeatType: c = "loop", ease: l = "easeOut", times: t } = {}, e = void 0) {
|
|
3
|
+
const a = {
|
|
4
|
+
[s]: f
|
|
5
|
+
};
|
|
6
|
+
t && (a.offset = t);
|
|
7
|
+
const i = g(l, n);
|
|
8
|
+
Array.isArray(i) && (a.easing = i);
|
|
9
|
+
const o = {
|
|
10
|
+
delay: m,
|
|
11
|
+
duration: n,
|
|
12
|
+
easing: Array.isArray(i) ? "linear" : i,
|
|
13
|
+
fill: "both",
|
|
14
|
+
iterations: p + 1,
|
|
15
|
+
direction: c === "reverse" ? "alternate" : "normal"
|
|
16
|
+
};
|
|
17
|
+
return e && (o.pseudoElement = e), r.animate(a, o);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
u as startWaapiAnimation
|
|
21
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { memo as m } from "../../../../../../motion-utils/dist/es/memo.js";
|
|
2
|
+
const l = /* @__PURE__ */ new Set([
|
|
3
|
+
"opacity",
|
|
4
|
+
"clipPath",
|
|
5
|
+
"filter",
|
|
6
|
+
"transform"
|
|
7
|
+
// TODO: Could be re-enabled now we have support for linear() easing
|
|
8
|
+
// "background-color"
|
|
9
|
+
]), f = /* @__PURE__ */ m(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
10
|
+
function w(n) {
|
|
11
|
+
var r;
|
|
12
|
+
const { motionValue: e, name: t, repeatDelay: a, repeatType: o, damping: s, type: p } = n;
|
|
13
|
+
if (!(((r = e == null ? void 0 : e.owner) == null ? void 0 : r.current) instanceof HTMLElement))
|
|
14
|
+
return !1;
|
|
15
|
+
const { onUpdate: c, transformTemplate: i } = e.owner.getProps();
|
|
16
|
+
return f() && t && l.has(t) && (t !== "transform" || !i) && /**
|
|
17
|
+
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
18
|
+
* no way to read the value from WAAPI every frame.
|
|
19
|
+
*/
|
|
20
|
+
!c && !a && o !== "mirror" && s !== 0 && p !== "inertia";
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
w as supportsBrowserAnimation
|
|
24
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { supportsLinearEasing as a } from "../../../utils/supports/linear-easing.js";
|
|
2
|
+
import { isGenerator as t } from "../../generators/utils/is-generator.js";
|
|
3
|
+
function i({ type: e, ...r }) {
|
|
4
|
+
return t(e) && a() ? e.applyToOptions(r) : (r.duration ?? (r.duration = 300), r.ease ?? (r.ease = "easeOut"), r);
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
i as applyGeneratorOptions
|
|
8
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const i = (r, a, o = 10) => {
|
|
2
|
+
let n = "";
|
|
3
|
+
const e = Math.max(Math.round(a / o), 2);
|
|
4
|
+
for (let t = 0; t < e; t++)
|
|
5
|
+
n += Math.round(r(t / (e - 1)) * 1e4) / 1e4 + ", ";
|
|
6
|
+
return `linear(${n.substring(0, n.length - 2)})`;
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
i as generateLinearEasing
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { circInOut as r } from "../../../../../../motion-utils/dist/es/easing/circ.js";
|
|
2
|
+
import { backInOut as t } from "../../../../../../motion-utils/dist/es/easing/back.js";
|
|
3
|
+
import { anticipate as o } from "../../../../../../motion-utils/dist/es/easing/anticipate.js";
|
|
4
|
+
const n = {
|
|
5
|
+
anticipate: o,
|
|
6
|
+
backInOut: t,
|
|
7
|
+
circInOut: r
|
|
8
|
+
};
|
|
9
|
+
function p(e) {
|
|
10
|
+
return e in n;
|
|
11
|
+
}
|
|
12
|
+
function u(e) {
|
|
13
|
+
typeof e.ease == "string" && p(e.ease) && (e.ease = n[e.ease]);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
u as replaceStringEasing
|
|
17
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { stepsOrder as o } from "./order.js";
|
|
2
|
+
import { createRenderStep as b } from "./render-step.js";
|
|
3
|
+
import { MotionGlobalConfig as i } from "../../../../motion-utils/dist/es/global-config.js";
|
|
4
|
+
const v = 40;
|
|
5
|
+
function N(c, l) {
|
|
6
|
+
let r = !1, a = !0;
|
|
7
|
+
const e = {
|
|
8
|
+
delta: 0,
|
|
9
|
+
timestamp: 0,
|
|
10
|
+
isProcessing: !1
|
|
11
|
+
}, m = () => r = !0, n = o.reduce((s, t) => (s[t] = b(m), s), {}), { setup: u, read: f, resolveKeyframes: d, preUpdate: g, update: h, preRender: M, render: R, postRender: x } = n, p = () => {
|
|
12
|
+
const s = i.useManualTiming ? e.timestamp : performance.now();
|
|
13
|
+
r = !1, i.useManualTiming || (e.delta = a ? 1e3 / 60 : Math.max(Math.min(s - e.timestamp, v), 1)), e.timestamp = s, e.isProcessing = !0, u.process(e), f.process(e), d.process(e), g.process(e), h.process(e), M.process(e), R.process(e), x.process(e), e.isProcessing = !1, r && l && (a = !1, c(p));
|
|
14
|
+
}, P = () => {
|
|
15
|
+
r = !0, a = !0, e.isProcessing || c(p);
|
|
16
|
+
};
|
|
17
|
+
return { schedule: o.reduce((s, t) => {
|
|
18
|
+
const w = n[t];
|
|
19
|
+
return s[t] = (E, F = !1, T = !1) => (r || P(), w.schedule(E, F, T)), s;
|
|
20
|
+
}, {}), cancel: (s) => {
|
|
21
|
+
for (let t = 0; t < o.length; t++)
|
|
22
|
+
n[o[t]].cancel(s);
|
|
23
|
+
}, state: e, steps: n };
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
N as createRenderBatcher
|
|
27
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRenderBatcher as e } from "./batcher.js";
|
|
2
|
+
import { noop as r } from "../../../../motion-utils/dist/es/noop.js";
|
|
3
|
+
const { schedule: m, cancel: n, state: o, steps: c } = /* @__PURE__ */ e(typeof requestAnimationFrame < "u" ? requestAnimationFrame : r, !0);
|
|
4
|
+
export {
|
|
5
|
+
n as cancelFrame,
|
|
6
|
+
m as frame,
|
|
7
|
+
o as frameData,
|
|
8
|
+
c as frameSteps
|
|
9
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = [
|
|
2
|
+
"setup",
|
|
3
|
+
// Compute
|
|
4
|
+
"read",
|
|
5
|
+
// Read
|
|
6
|
+
"resolveKeyframes",
|
|
7
|
+
// Write/Read/Write/Read
|
|
8
|
+
"preUpdate",
|
|
9
|
+
// Compute
|
|
10
|
+
"update",
|
|
11
|
+
// Compute
|
|
12
|
+
"preRender",
|
|
13
|
+
// Compute
|
|
14
|
+
"render",
|
|
15
|
+
// Write
|
|
16
|
+
"postRender"
|
|
17
|
+
// Compute
|
|
18
|
+
];
|
|
19
|
+
export {
|
|
20
|
+
e as stepsOrder
|
|
21
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
function c(d, p) {
|
|
2
|
+
let t = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), r = !1, n = !1;
|
|
3
|
+
const a = /* @__PURE__ */ new WeakSet();
|
|
4
|
+
let i = {
|
|
5
|
+
delta: 0,
|
|
6
|
+
timestamp: 0,
|
|
7
|
+
isProcessing: !1
|
|
8
|
+
};
|
|
9
|
+
function u(e) {
|
|
10
|
+
a.has(e) && (f.schedule(e), d()), e(i);
|
|
11
|
+
}
|
|
12
|
+
const f = {
|
|
13
|
+
/**
|
|
14
|
+
* Schedule a process to run on the next frame.
|
|
15
|
+
*/
|
|
16
|
+
schedule: (e, l = !1, m = !1) => {
|
|
17
|
+
const o = m && r ? t : s;
|
|
18
|
+
return l && a.add(e), o.has(e) || o.add(e), e;
|
|
19
|
+
},
|
|
20
|
+
/**
|
|
21
|
+
* Cancel the provided callback from running on the next frame.
|
|
22
|
+
*/
|
|
23
|
+
cancel: (e) => {
|
|
24
|
+
s.delete(e), a.delete(e);
|
|
25
|
+
},
|
|
26
|
+
/**
|
|
27
|
+
* Execute all schedule callbacks.
|
|
28
|
+
*/
|
|
29
|
+
process: (e) => {
|
|
30
|
+
if (i = e, r) {
|
|
31
|
+
n = !0;
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
r = !0, [t, s] = [s, t], t.forEach(u), t.clear(), r = !1, n && (n = !1, f.process(e));
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
return f;
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
c as createRenderStep
|
|
41
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { frameData as n } from "./frame.js";
|
|
2
|
+
import { MotionGlobalConfig as i } from "../../../../motion-utils/dist/es/global-config.js";
|
|
3
|
+
let e;
|
|
4
|
+
function t() {
|
|
5
|
+
e = void 0;
|
|
6
|
+
}
|
|
7
|
+
const r = {
|
|
8
|
+
now: () => (e === void 0 && r.set(n.isProcessing || i.useManualTiming ? n.timestamp : performance.now()), e),
|
|
9
|
+
set: (o) => {
|
|
10
|
+
e = o, queueMicrotask(t);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
r as time
|
|
15
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { isDragging as e } from "./is-active.js";
|
|
2
|
+
function l(r) {
|
|
3
|
+
return r === "x" || r === "y" ? e[r] ? null : (e[r] = !0, () => {
|
|
4
|
+
e[r] = !1;
|
|
5
|
+
}) : e.x || e.y ? null : (e.x = e.y = !0, () => {
|
|
6
|
+
e.x = e.y = !1;
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
l as setDragLock
|
|
11
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { isDragActive as d } from "./drag/state/is-active.js";
|
|
2
|
+
import { setupGesture as m } from "./utils/setup.js";
|
|
3
|
+
function c(n) {
|
|
4
|
+
return !(n.pointerType === "touch" || d());
|
|
5
|
+
}
|
|
6
|
+
function h(n, p, u = {}) {
|
|
7
|
+
const [f, r, a] = m(n, u), v = (e) => {
|
|
8
|
+
if (!c(e))
|
|
9
|
+
return;
|
|
10
|
+
const { target: t } = e, o = p(t, e);
|
|
11
|
+
if (typeof o != "function" || !t)
|
|
12
|
+
return;
|
|
13
|
+
const i = (s) => {
|
|
14
|
+
c(s) && (o(s), t.removeEventListener("pointerleave", i));
|
|
15
|
+
};
|
|
16
|
+
t.addEventListener("pointerleave", i, r);
|
|
17
|
+
};
|
|
18
|
+
return f.forEach((e) => {
|
|
19
|
+
e.addEventListener("pointerenter", v, r);
|
|
20
|
+
}), a;
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
h as hover
|
|
24
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { isHTMLElement as b } from "../../utils/is-html-element.js";
|
|
2
|
+
import { isDragActive as E } from "../drag/state/is-active.js";
|
|
3
|
+
import { isNodeOrChild as v } from "../utils/is-node-or-child.js";
|
|
4
|
+
import { isPrimaryPointer as L } from "../utils/is-primary-pointer.js";
|
|
5
|
+
import { setupGesture as T } from "../utils/setup.js";
|
|
6
|
+
import { isElementKeyboardAccessible as g } from "./utils/is-keyboard-accessible.js";
|
|
7
|
+
import { enableKeyboardPress as h } from "./utils/keyboard.js";
|
|
8
|
+
import { isPressing as d } from "./utils/state.js";
|
|
9
|
+
function f(i) {
|
|
10
|
+
return L(i) && !E();
|
|
11
|
+
}
|
|
12
|
+
function H(i, p, s = {}) {
|
|
13
|
+
const [l, o, u] = T(i, s), w = (e) => {
|
|
14
|
+
const n = e.currentTarget;
|
|
15
|
+
if (!f(e))
|
|
16
|
+
return;
|
|
17
|
+
d.add(n);
|
|
18
|
+
const t = p(n, e), a = (r, P) => {
|
|
19
|
+
window.removeEventListener("pointerup", c), window.removeEventListener("pointercancel", m), d.has(n) && d.delete(n), f(r) && typeof t == "function" && t(r, { success: P });
|
|
20
|
+
}, c = (r) => {
|
|
21
|
+
a(r, n === window || n === document || s.useGlobalTarget || v(n, r.target));
|
|
22
|
+
}, m = (r) => {
|
|
23
|
+
a(r, !1);
|
|
24
|
+
};
|
|
25
|
+
window.addEventListener("pointerup", c, o), window.addEventListener("pointercancel", m, o);
|
|
26
|
+
};
|
|
27
|
+
return l.forEach((e) => {
|
|
28
|
+
(s.useGlobalTarget ? window : e).addEventListener("pointerdown", w, o), b(e) && (e.addEventListener("focus", (t) => h(t, o)), !g(e) && !e.hasAttribute("tabindex") && (e.tabIndex = 0));
|
|
29
|
+
}), u;
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
H as press
|
|
33
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { isPressing as u } from "./state.js";
|
|
2
|
+
function d(r) {
|
|
3
|
+
return (n) => {
|
|
4
|
+
n.key === "Enter" && r(n);
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
function t(r, n) {
|
|
8
|
+
r.dispatchEvent(new PointerEvent("pointer" + n, { isPrimary: !0, bubbles: !0 }));
|
|
9
|
+
}
|
|
10
|
+
const c = (r, n) => {
|
|
11
|
+
const e = r.currentTarget;
|
|
12
|
+
if (!e)
|
|
13
|
+
return;
|
|
14
|
+
const i = d(() => {
|
|
15
|
+
if (u.has(e))
|
|
16
|
+
return;
|
|
17
|
+
t(e, "down");
|
|
18
|
+
const s = d(() => {
|
|
19
|
+
t(e, "up");
|
|
20
|
+
}), o = () => t(e, "cancel");
|
|
21
|
+
e.addEventListener("keyup", s, n), e.addEventListener("blur", o, n);
|
|
22
|
+
});
|
|
23
|
+
e.addEventListener("keydown", i, n), e.addEventListener("blur", () => e.removeEventListener("keydown", i), n);
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
c as enableKeyboardPress
|
|
27
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { resolveElements as s } from "../../utils/resolve-elements.js";
|
|
2
|
+
function a(t, n) {
|
|
3
|
+
const o = s(t), e = new AbortController(), r = {
|
|
4
|
+
passive: !0,
|
|
5
|
+
...n,
|
|
6
|
+
signal: e.signal
|
|
7
|
+
};
|
|
8
|
+
return [o, r, () => e.abort()];
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
a as setupGesture
|
|
12
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { mixNumber as s } from "../../utils/mix/number.js";
|
|
2
|
+
import { px as R, percent as u } from "../../value/types/numbers/units.js";
|
|
3
|
+
import { progress as h } from "../../../../../motion-utils/dist/es/progress.js";
|
|
4
|
+
import { noop as B } from "../../../../../motion-utils/dist/es/noop.js";
|
|
5
|
+
import { circOut as L } from "../../../../../motion-utils/dist/es/easing/circ.js";
|
|
6
|
+
const a = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], M = a.length, m = (t) => typeof t == "string" ? parseFloat(t) : t, p = (t) => typeof t == "number" || R.test(t);
|
|
7
|
+
function V(t, o, n, i, b, x) {
|
|
8
|
+
b ? (t.opacity = s(0, n.opacity ?? 1, C(i)), t.opacityExit = s(o.opacity ?? 1, 0, O(i))) : x && (t.opacity = s(o.opacity ?? 1, n.opacity ?? 1, i));
|
|
9
|
+
for (let f = 0; f < M; f++) {
|
|
10
|
+
const c = `border${a[f]}Radius`;
|
|
11
|
+
let r = d(o, c), e = d(n, c);
|
|
12
|
+
if (r === void 0 && e === void 0)
|
|
13
|
+
continue;
|
|
14
|
+
r || (r = 0), e || (e = 0), r === 0 || e === 0 || p(r) === p(e) ? (t[c] = Math.max(s(m(r), m(e), i), 0), (u.test(e) || u.test(r)) && (t[c] += "%")) : t[c] = e;
|
|
15
|
+
}
|
|
16
|
+
(o.rotate || n.rotate) && (t.rotate = s(o.rotate || 0, n.rotate || 0, i));
|
|
17
|
+
}
|
|
18
|
+
function d(t, o) {
|
|
19
|
+
return t[o] !== void 0 ? t[o] : t.borderRadius;
|
|
20
|
+
}
|
|
21
|
+
const C = /* @__PURE__ */ y(0, 0.5, L), O = /* @__PURE__ */ y(0.5, 0.95, B);
|
|
22
|
+
function y(t, o, n) {
|
|
23
|
+
return (i) => i < t ? 0 : i > o ? 1 : n(h(t, o, i));
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
V as mixValues
|
|
27
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
function r({ top: t, left: o, right: n, bottom: x }) {
|
|
2
|
+
return {
|
|
3
|
+
x: { min: o, max: n },
|
|
4
|
+
y: { min: t, max: x }
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
function e({ x: t, y: o }) {
|
|
8
|
+
return { top: o.min, right: t.max, bottom: o.max, left: t.min };
|
|
9
|
+
}
|
|
10
|
+
function m(t, o) {
|
|
11
|
+
if (!o)
|
|
12
|
+
return t;
|
|
13
|
+
const n = o({ x: t.left, y: t.top }), x = o({ x: t.right, y: t.bottom });
|
|
14
|
+
return {
|
|
15
|
+
top: n.y,
|
|
16
|
+
left: n.x,
|
|
17
|
+
bottom: x.y,
|
|
18
|
+
right: x.x
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
r as convertBoundingBoxToBox,
|
|
23
|
+
e as convertBoxToBoundingBox,
|
|
24
|
+
m as transformBoxPoints
|
|
25
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
function c(n, o) {
|
|
2
|
+
n.min = o.min, n.max = o.max;
|
|
3
|
+
}
|
|
4
|
+
function t(n, o) {
|
|
5
|
+
c(n.x, o.x), c(n.y, o.y);
|
|
6
|
+
}
|
|
7
|
+
function i(n, o) {
|
|
8
|
+
n.translate = o.translate, n.scale = o.scale, n.originPoint = o.originPoint, n.origin = o.origin;
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
i as copyAxisDeltaInto,
|
|
12
|
+
c as copyAxisInto,
|
|
13
|
+
t as copyBoxInto
|
|
14
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { mixNumber as x } from "../../utils/mix/number.js";
|
|
2
|
+
import { hasTransform as E } from "../utils/has-transform.js";
|
|
3
|
+
function y(t, n, o) {
|
|
4
|
+
const i = t - o, s = n * i;
|
|
5
|
+
return o + s;
|
|
6
|
+
}
|
|
7
|
+
function e(t, n, o, i, s) {
|
|
8
|
+
return s !== void 0 && (t = y(t, s, i)), y(t, o, i) + n;
|
|
9
|
+
}
|
|
10
|
+
function p(t, n = 0, o = 1, i, s) {
|
|
11
|
+
t.min = e(t.min, n, o, i, s), t.max = e(t.max, n, o, i, s);
|
|
12
|
+
}
|
|
13
|
+
function _(t, { x: n, y: o }) {
|
|
14
|
+
p(t.x, n.translate, n.scale, n.originPoint), p(t.y, o.translate, o.scale, o.originPoint);
|
|
15
|
+
}
|
|
16
|
+
const m = 0.999999999999, a = 1.0000000000001;
|
|
17
|
+
function D(t, n, o, i = !1) {
|
|
18
|
+
const s = o.length;
|
|
19
|
+
if (!s)
|
|
20
|
+
return;
|
|
21
|
+
n.x = n.y = 1;
|
|
22
|
+
let l, f;
|
|
23
|
+
for (let c = 0; c < s; c++) {
|
|
24
|
+
l = o[c], f = l.projectionDelta;
|
|
25
|
+
const { visualElement: u } = l.options;
|
|
26
|
+
u && u.props.style && u.props.style.display === "contents" || (i && l.options.layoutScroll && l.scroll && l !== l.root && A(t, {
|
|
27
|
+
x: -l.scroll.offset.x,
|
|
28
|
+
y: -l.scroll.offset.y
|
|
29
|
+
}), f && (n.x *= f.x.scale, n.y *= f.y.scale, _(t, f)), i && E(l.latestValues) && A(t, l.latestValues));
|
|
30
|
+
}
|
|
31
|
+
n.x < a && n.x > m && (n.x = 1), n.y < a && n.y > m && (n.y = 1);
|
|
32
|
+
}
|
|
33
|
+
function N(t, n) {
|
|
34
|
+
t.min = t.min + n, t.max = t.max + n;
|
|
35
|
+
}
|
|
36
|
+
function r(t, n, o, i, s = 0.5) {
|
|
37
|
+
const l = x(t.min, t.max, s);
|
|
38
|
+
p(t, n, o, l, i);
|
|
39
|
+
}
|
|
40
|
+
function A(t, n) {
|
|
41
|
+
r(t.x, n.x, n.scaleX, n.scale, n.originX), r(t.y, n.y, n.scaleY, n.scale, n.originY);
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
p as applyAxisDelta,
|
|
45
|
+
_ as applyBoxDelta,
|
|
46
|
+
e as applyPointDelta,
|
|
47
|
+
D as applyTreeDeltas,
|
|
48
|
+
y as scalePoint,
|
|
49
|
+
r as transformAxis,
|
|
50
|
+
A as transformBox,
|
|
51
|
+
N as translateAxis
|
|
52
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { mixNumber as m } from "../../utils/mix/number.js";
|
|
2
|
+
const N = 1e-4, u = 1 - N, E = 1 + N, R = 0.01, S = 0 - R, a = 0 + R;
|
|
3
|
+
function s(n) {
|
|
4
|
+
return n.max - n.min;
|
|
5
|
+
}
|
|
6
|
+
function L(n, i, c) {
|
|
7
|
+
return Math.abs(n - i) <= c;
|
|
8
|
+
}
|
|
9
|
+
function x(n, i, c, o = 0.5) {
|
|
10
|
+
n.origin = o, n.originPoint = m(i.min, i.max, n.origin), n.scale = s(c) / s(i), n.translate = m(c.min, c.max, n.origin) - n.originPoint, (n.scale >= u && n.scale <= E || isNaN(n.scale)) && (n.scale = 1), (n.translate >= S && n.translate <= a || isNaN(n.translate)) && (n.translate = 0);
|
|
11
|
+
}
|
|
12
|
+
function I(n, i, c, o) {
|
|
13
|
+
x(n.x, i.x, c.x, o ? o.originX : void 0), x(n.y, i.y, c.y, o ? o.originY : void 0);
|
|
14
|
+
}
|
|
15
|
+
function A(n, i, c) {
|
|
16
|
+
n.min = c.min + i.min, n.max = n.min + s(i);
|
|
17
|
+
}
|
|
18
|
+
function P(n, i, c) {
|
|
19
|
+
A(n.x, i.x, c.x), A(n.y, i.y, c.y);
|
|
20
|
+
}
|
|
21
|
+
function f(n, i, c) {
|
|
22
|
+
n.min = i.min - c.min, n.max = n.min + s(i);
|
|
23
|
+
}
|
|
24
|
+
function T(n, i, c) {
|
|
25
|
+
f(n.x, i.x, c.x), f(n.y, i.y, c.y);
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
x as calcAxisDelta,
|
|
29
|
+
I as calcBoxDelta,
|
|
30
|
+
s as calcLength,
|
|
31
|
+
A as calcRelativeAxis,
|
|
32
|
+
f as calcRelativeAxisPosition,
|
|
33
|
+
P as calcRelativeBox,
|
|
34
|
+
T as calcRelativePosition,
|
|
35
|
+
L as isNear
|
|
36
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { mixNumber as v } from "../../utils/mix/number.js";
|
|
2
|
+
import { percent as p } from "../../value/types/numbers/units.js";
|
|
3
|
+
import { scalePoint as r } from "./delta-apply.js";
|
|
4
|
+
function c(e, m, f, n, d) {
|
|
5
|
+
return e -= m, e = r(e, 1 / f, n), d !== void 0 && (e = r(e, 1 / d, n)), e;
|
|
6
|
+
}
|
|
7
|
+
function D(e, m = 0, f = 1, n = 0.5, d, u = e, y = e) {
|
|
8
|
+
if (p.test(m) && (m = parseFloat(m), m = v(y.min, y.max, m / 100) - y.min), typeof m != "number")
|
|
9
|
+
return;
|
|
10
|
+
let i = v(u.min, u.max, n);
|
|
11
|
+
e === u && (i -= m), e.min = c(e.min, m, f, i, d), e.max = c(e.max, m, f, i, d);
|
|
12
|
+
}
|
|
13
|
+
function P(e, m, [f, n, d], u, y) {
|
|
14
|
+
D(e, m[f], m[n], m[d], m.scale, u, y);
|
|
15
|
+
}
|
|
16
|
+
const K = ["x", "scaleX", "originX"], T = ["y", "scaleY", "originY"];
|
|
17
|
+
function N(e, m, f, n) {
|
|
18
|
+
P(e.x, m, K, f ? f.x : void 0, n ? n.x : void 0), P(e.y, m, T, f ? f.y : void 0, n ? n.y : void 0);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
D as removeAxisDelta,
|
|
22
|
+
P as removeAxisTransforms,
|
|
23
|
+
N as removeBoxTransforms,
|
|
24
|
+
c as removePointDelta
|
|
25
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const t = () => ({
|
|
2
|
+
translate: 0,
|
|
3
|
+
scale: 1,
|
|
4
|
+
origin: 0,
|
|
5
|
+
originPoint: 0
|
|
6
|
+
}), a = () => ({
|
|
7
|
+
x: t(),
|
|
8
|
+
y: t()
|
|
9
|
+
}), e = () => ({ min: 0, max: 0 }), c = () => ({
|
|
10
|
+
x: e(),
|
|
11
|
+
y: e()
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
e as createAxis,
|
|
15
|
+
t as createAxisDelta,
|
|
16
|
+
c as createBox,
|
|
17
|
+
a as createDelta
|
|
18
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { calcLength as r } from "./delta-calc.js";
|
|
2
|
+
function u(n) {
|
|
3
|
+
return n.translate === 0 && n.scale === 1;
|
|
4
|
+
}
|
|
5
|
+
function e(n) {
|
|
6
|
+
return u(n.x) && u(n.y);
|
|
7
|
+
}
|
|
8
|
+
function i(n, t) {
|
|
9
|
+
return n.min === t.min && n.max === t.max;
|
|
10
|
+
}
|
|
11
|
+
function s(n, t) {
|
|
12
|
+
return i(n.x, t.x) && i(n.y, t.y);
|
|
13
|
+
}
|
|
14
|
+
function o(n, t) {
|
|
15
|
+
return Math.round(n.min) === Math.round(t.min) && Math.round(n.max) === Math.round(t.max);
|
|
16
|
+
}
|
|
17
|
+
function x(n, t) {
|
|
18
|
+
return o(n.x, t.x) && o(n.y, t.y);
|
|
19
|
+
}
|
|
20
|
+
function c(n) {
|
|
21
|
+
return r(n.x) / r(n.y);
|
|
22
|
+
}
|
|
23
|
+
function l(n, t) {
|
|
24
|
+
return n.translate === t.translate && n.scale === t.scale && n.originPoint === t.originPoint;
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
c as aspectRatio,
|
|
28
|
+
l as axisDeltaEquals,
|
|
29
|
+
i as axisEquals,
|
|
30
|
+
o as axisEqualsRounded,
|
|
31
|
+
s as boxEquals,
|
|
32
|
+
x as boxEqualsRounded,
|
|
33
|
+
e as isDeltaZero
|
|
34
|
+
};
|