@pibit.ai/cure-design-system 0.3.8 → 0.3.10
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/applications/loading-indicator/loading-indicator.d.ts +19 -0
- package/dist/applications/loading-indicator/loading-indicator.d.ts.map +1 -0
- package/dist/applications/loading-indicator/loading-indicator.js +172 -0
- package/dist/hooks/use-resize-observer.d.ts +25 -0
- package/dist/hooks/use-resize-observer.d.ts.map +1 -0
- package/dist/hooks/use-resize-observer.js +25 -0
- package/dist/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +61 -42
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.js +442 -0
- package/dist/node_modules/@react-aria/i18n/dist/context.js +10 -0
- package/dist/node_modules/@react-aria/i18n/dist/useCollator.js +11 -0
- package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.js +36 -0
- package/dist/node_modules/@react-aria/i18n/dist/useFilter.js +35 -0
- package/dist/node_modules/@react-aria/i18n/dist/utils.js +44 -0
- package/dist/node_modules/@react-aria/interactions/dist/focusSafely.js +18 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js +62 -0
- package/dist/node_modules/@react-aria/interactions/dist/utils.js +5 -0
- package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.js +49 -0
- package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js +27 -0
- package/dist/node_modules/@react-aria/utils/dist/ShadowTreeWalker.js +130 -0
- package/dist/node_modules/@react-aria/utils/dist/domHelpers.js +15 -0
- package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +45 -0
- package/dist/node_modules/@react-aria/utils/dist/isElementVisible.js +25 -0
- package/dist/node_modules/@react-aria/utils/dist/isFocusable.js +37 -0
- package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.js +7 -0
- package/dist/node_modules/@react-aria/utils/dist/openLink.js +28 -0
- package/dist/node_modules/@react-aria/utils/dist/platform.js +47 -0
- package/dist/node_modules/@react-aria/utils/dist/runAfterTransition.js +35 -0
- package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js +6 -0
- package/dist/node_modules/@react-stately/data/dist/useListData.js +212 -0
- package/dist/node_modules/@react-stately/flags/dist/import.js +7 -0
- 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-view/tree-view.d.ts.map +1 -1
- package/dist/patterns/tree-view/tree-view.js +32 -38
- package/dist/primitives/button/button-utility.d.ts +43 -0
- package/dist/primitives/button/button-utility.d.ts.map +1 -0
- package/dist/primitives/button/button-utility.js +79 -0
- package/dist/primitives/button/index.d.ts +2 -1
- package/dist/primitives/button/index.d.ts.map +1 -1
- package/dist/primitives/custom-icon/custom-icon.d.ts +14 -0
- package/dist/primitives/custom-icon/custom-icon.d.ts.map +1 -0
- package/dist/primitives/custom-icon/custom-icon.js +29 -0
- package/dist/primitives/custom-icon/icons/Placeholder.d.ts +10 -0
- package/dist/primitives/custom-icon/icons/Placeholder.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/Placeholder.js +39 -0
- package/dist/primitives/custom-icon/icons/activity-outline.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/activity-outline.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/activity-outline.js +34 -0
- package/dist/primitives/custom-icon/icons/activity-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/activity-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/activity-solid.js +43 -0
- package/dist/primitives/custom-icon/icons/ai-extraction.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/ai-extraction.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/ai-extraction.js +42 -0
- package/dist/primitives/custom-icon/icons/apps.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/apps.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/apps.js +54 -0
- package/dist/primitives/custom-icon/icons/arrows-rl.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/arrows-rl.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/arrows-rl.js +34 -0
- package/dist/primitives/custom-icon/icons/auto-number.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/auto-number.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/auto-number.js +34 -0
- package/dist/primitives/custom-icon/icons/branch-01.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/branch-01.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/branch-01.js +34 -0
- package/dist/primitives/custom-icon/icons/branch-02.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/branch-02.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/branch-02.js +34 -0
- package/dist/primitives/custom-icon/icons/branch.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/branch.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/branch.js +31 -0
- package/dist/primitives/custom-icon/icons/calendar.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/calendar.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/calendar.js +42 -0
- package/dist/primitives/custom-icon/icons/callable.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/callable.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/callable.js +31 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-outline.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-outline.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-outline.js +46 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-solid.js +31 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-solid1.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-solid1.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-solid1.js +43 -0
- package/dist/primitives/custom-icon/icons/clear-cure.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/clear-cure.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/clear-cure.js +44 -0
- package/dist/primitives/custom-icon/icons/code-node.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/code-node.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/code-node.js +33 -0
- package/dist/primitives/custom-icon/icons/collapse-left.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/collapse-left.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/collapse-left.js +34 -0
- package/dist/primitives/custom-icon/icons/collapse-right.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/collapse-right.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/collapse-right.js +34 -0
- package/dist/primitives/custom-icon/icons/file-04-outline.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/file-04-outline.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/file-04-outline.js +34 -0
- package/dist/primitives/custom-icon/icons/file-04-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/file-04-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/file-04-solid.js +33 -0
- package/dist/primitives/custom-icon/icons/file-edit.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/file-edit.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/file-edit.js +34 -0
- package/dist/primitives/custom-icon/icons/file-manager.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/file-manager.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/file-manager.js +31 -0
- package/dist/primitives/custom-icon/icons/formula.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/formula.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/formula.js +34 -0
- package/dist/primitives/custom-icon/icons/grid-plus.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/grid-plus.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/grid-plus.js +34 -0
- package/dist/primitives/custom-icon/icons/high.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/high.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/high.js +34 -0
- package/dist/primitives/custom-icon/icons/http-endpoint.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/http-endpoint.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/http-endpoint.js +31 -0
- package/dist/primitives/custom-icon/icons/if-else.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/if-else.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/if-else.js +31 -0
- package/dist/primitives/custom-icon/icons/integer.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/integer.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/integer.js +34 -0
- package/dist/primitives/custom-icon/icons/loop.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/loop.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/loop.js +56 -0
- package/dist/primitives/custom-icon/icons/low.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/low.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/low.js +34 -0
- package/dist/primitives/custom-icon/icons/mail-01-outline.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/mail-01-outline.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/mail-01-outline.js +34 -0
- package/dist/primitives/custom-icon/icons/mail-01-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/mail-01-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/mail-01-solid.js +40 -0
- package/dist/primitives/custom-icon/icons/medium.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/medium.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/medium.js +34 -0
- package/dist/primitives/custom-icon/icons/message-dots-square-outline.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/message-dots-square-outline.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/message-dots-square-outline.js +34 -0
- package/dist/primitives/custom-icon/icons/message-dots-square-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/message-dots-square-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/message-dots-square-solid.js +36 -0
- package/dist/primitives/custom-icon/icons/navigate.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/navigate.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/navigate.js +34 -0
- package/dist/primitives/custom-icon/icons/nesting-arrow-closed.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/nesting-arrow-closed.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/nesting-arrow-closed.js +31 -0
- package/dist/primitives/custom-icon/icons/nesting-arrow-open.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/nesting-arrow-open.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/nesting-arrow-open.js +31 -0
- package/dist/primitives/custom-icon/icons/object-manager.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/object-manager.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/object-manager.js +56 -0
- package/dist/primitives/custom-icon/icons/pibit-ai-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/pibit-ai-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/pibit-ai-solid.js +36 -0
- package/dist/primitives/custom-icon/icons/plus-circle-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/plus-circle-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/plus-circle-solid.js +36 -0
- package/dist/primitives/custom-icon/icons/radio.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/radio.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/radio.js +47 -0
- package/dist/primitives/custom-icon/icons/resize.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/resize.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/resize.js +34 -0
- package/dist/primitives/custom-icon/icons/stop-circle.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/stop-circle.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/stop-circle.js +42 -0
- package/dist/primitives/custom-icon/icons/submission.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/submission.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/submission.js +31 -0
- package/dist/primitives/custom-icon/icons/swap.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/swap.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/swap.js +34 -0
- package/dist/primitives/custom-icon/icons/thumbs-down-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/thumbs-down-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/thumbs-down-solid.js +40 -0
- package/dist/primitives/custom-icon/icons/thumbs-down.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/thumbs-down.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/thumbs-down.js +34 -0
- package/dist/primitives/custom-icon/icons/thumbs-up-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/thumbs-up-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/thumbs-up-solid.js +40 -0
- package/dist/primitives/custom-icon/icons/thumbs-up.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/thumbs-up.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/thumbs-up.js +34 -0
- package/dist/primitives/custom-icon/icons/variable-node.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/variable-node.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/variable-node.js +42 -0
- package/dist/primitives/custom-icon/icons/webhook.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/webhook.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/webhook.js +47 -0
- package/dist/primitives/custom-icon/index.d.ts +3 -0
- package/dist/primitives/custom-icon/index.d.ts.map +1 -0
- package/dist/primitives/custom-icon/registry.d.ts +110 -0
- package/dist/primitives/custom-icon/registry.d.ts.map +1 -0
- package/dist/primitives/custom-icon/registry.js +111 -0
- package/dist/primitives/heading/heading.d.ts +1 -1
- package/dist/primitives/input/hint-text.d.ts +15 -0
- package/dist/primitives/input/hint-text.d.ts.map +1 -0
- package/dist/primitives/input/hint-text.js +31 -0
- package/dist/primitives/input/input.d.ts +72 -27
- package/dist/primitives/input/input.d.ts.map +1 -1
- package/dist/primitives/input/input.js +385 -74
- package/dist/primitives/input/label.d.ts +15 -0
- package/dist/primitives/input/label.d.ts.map +1 -0
- package/dist/primitives/input/label.js +56 -0
- package/dist/primitives/select/ExpandableSearchInput.d.ts +15 -0
- package/dist/primitives/select/ExpandableSearchInput.d.ts.map +1 -0
- package/dist/primitives/select/ExpandableSearchInput.js +115 -0
- package/dist/primitives/select/SearchInput.d.ts +26 -0
- package/dist/primitives/select/SearchInput.d.ts.map +1 -0
- package/dist/primitives/select/SearchInput.js +136 -0
- package/dist/primitives/select/combobox.d.ts +14 -0
- package/dist/primitives/select/combobox.d.ts.map +1 -0
- package/dist/primitives/select/combobox.js +231 -0
- package/dist/primitives/select/index.d.ts +6 -0
- package/dist/primitives/select/index.d.ts.map +1 -0
- package/dist/primitives/select/multi-select.d.ts +46 -0
- package/dist/primitives/select/multi-select.d.ts.map +1 -0
- package/dist/primitives/select/multi-select.js +306 -0
- package/dist/primitives/select/popover.d.ts +7 -0
- package/dist/primitives/select/popover.d.ts.map +1 -0
- package/dist/primitives/select/popover.js +23 -0
- package/dist/primitives/select/searchable-select.d.ts +35 -0
- package/dist/primitives/select/searchable-select.d.ts.map +1 -0
- package/dist/primitives/select/searchable-select.js +239 -0
- package/dist/primitives/select/select-item.d.ts +8 -0
- package/dist/primitives/select/select-item.d.ts.map +1 -0
- package/dist/primitives/select/select-item.js +108 -0
- package/dist/primitives/select/select-native.d.ts +14 -0
- package/dist/primitives/select/select-native.d.ts.map +1 -0
- package/dist/primitives/select/select.d.ts +61 -0
- package/dist/primitives/select/select.d.ts.map +1 -0
- package/dist/primitives/select/select.js +208 -0
- package/dist/primitives/tags/base-components/tag-close-x.d.ts +9 -0
- package/dist/primitives/tags/base-components/tag-close-x.d.ts.map +1 -0
- package/dist/primitives/tags/base-components/tag-close-x.js +35 -0
- package/dist/primitives/text/text.d.ts +1 -1
- package/dist/primitives/tooltip/index.d.ts +2 -0
- package/dist/primitives/tooltip/index.d.ts.map +1 -0
- package/dist/primitives/tooltip/tooltip.d.ts +35 -0
- package/dist/primitives/tooltip/tooltip.d.ts.map +1 -0
- package/dist/primitives/tooltip/tooltip.js +104 -0
- package/dist/styles/components.css +1 -1
- package/package.json +1 -2
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { addUniqueItem as n, removeItem as a } from "../../../../../motion-utils/dist/es/array.js";
|
|
2
|
+
class l {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.members = [];
|
|
5
|
+
}
|
|
6
|
+
add(e) {
|
|
7
|
+
n(this.members, e), e.scheduleRender();
|
|
8
|
+
}
|
|
9
|
+
remove(e) {
|
|
10
|
+
if (a(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
|
|
11
|
+
const s = this.members[this.members.length - 1];
|
|
12
|
+
s && this.promote(s);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
relegate(e) {
|
|
16
|
+
const s = this.members.findIndex((i) => e === i);
|
|
17
|
+
if (s === 0)
|
|
18
|
+
return !1;
|
|
19
|
+
let t;
|
|
20
|
+
for (let i = s; i >= 0; i--) {
|
|
21
|
+
const r = this.members[i];
|
|
22
|
+
if (r.isPresent !== !1) {
|
|
23
|
+
t = r;
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return t ? (this.promote(t), !0) : !1;
|
|
28
|
+
}
|
|
29
|
+
promote(e, s) {
|
|
30
|
+
const t = this.lead;
|
|
31
|
+
if (e !== t && (this.prevLead = t, this.lead = e, e.show(), t)) {
|
|
32
|
+
t.instance && t.scheduleRender(), e.scheduleRender();
|
|
33
|
+
const i = t.options.layoutDependency, r = e.options.layoutDependency;
|
|
34
|
+
i !== void 0 && r !== void 0 && i === r || (e.resumeFrom = t, s && (e.resumeFrom.preserveOpacity = !0), t.snapshot && (e.snapshot = t.snapshot, e.snapshot.latestValues = t.animationValues || t.latestValues), e.root && e.root.isUpdating && (e.isLayoutDirty = !0));
|
|
35
|
+
const { crossfade: o } = e.options;
|
|
36
|
+
o === !1 && t.hide();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exitAnimationComplete() {
|
|
40
|
+
this.members.forEach((e) => {
|
|
41
|
+
const { options: s, resumingFrom: t } = e;
|
|
42
|
+
s.onExitComplete && s.onExitComplete(), t && t.options.onExitComplete && t.options.onExitComplete();
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
scheduleRender() {
|
|
46
|
+
this.members.forEach((e) => {
|
|
47
|
+
e.instance && e.scheduleRender(!1);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Clear any leads that have been removed this render to prevent them from being
|
|
52
|
+
* used in future animations and to prevent memory leaks
|
|
53
|
+
*/
|
|
54
|
+
removeLeadSnapshot() {
|
|
55
|
+
this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
l as NodeStack
|
|
60
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { px as c } from "../../value/types/numbers/units.js";
|
|
2
|
+
function e(r, n) {
|
|
3
|
+
return n.max === n.min ? 0 : r / (n.max - n.min) * 100;
|
|
4
|
+
}
|
|
5
|
+
const f = {
|
|
6
|
+
correct: (r, n) => {
|
|
7
|
+
if (!n.target)
|
|
8
|
+
return r;
|
|
9
|
+
if (typeof r == "string")
|
|
10
|
+
if (c.test(r))
|
|
11
|
+
r = parseFloat(r);
|
|
12
|
+
else
|
|
13
|
+
return r;
|
|
14
|
+
const o = e(r, n.target.x), t = e(r, n.target.y);
|
|
15
|
+
return `${o}% ${t}%`;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
f as correctBorderRadius,
|
|
20
|
+
e as pixelsToPercent
|
|
21
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { complex as f } from "../../value/types/complex/index.js";
|
|
2
|
+
import { mixNumber as i } from "../../utils/mix/number.js";
|
|
3
|
+
const y = {
|
|
4
|
+
correct: (e, { treeScale: c, projectionDelta: t }) => {
|
|
5
|
+
const a = e, o = f.parse(e);
|
|
6
|
+
if (o.length > 5)
|
|
7
|
+
return a;
|
|
8
|
+
const p = f.createTransformer(e), r = typeof o[0] != "number" ? 1 : 0, n = t.x.scale * c.x, m = t.y.scale * c.y;
|
|
9
|
+
o[0 + r] /= n, o[1 + r] /= m;
|
|
10
|
+
const s = i(n, m, 0.5);
|
|
11
|
+
return typeof o[2 + r] == "number" && (o[2 + r] /= s), typeof o[3 + r] == "number" && (o[3 + r] /= s), p(o);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
y as correctBoxShadow
|
|
16
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { correctBorderRadius as o } from "./scale-border-radius.js";
|
|
2
|
+
import { correctBoxShadow as r } from "./scale-box-shadow.js";
|
|
3
|
+
const e = {
|
|
4
|
+
borderRadius: {
|
|
5
|
+
...o,
|
|
6
|
+
applyTo: [
|
|
7
|
+
"borderTopLeftRadius",
|
|
8
|
+
"borderTopRightRadius",
|
|
9
|
+
"borderBottomLeftRadius",
|
|
10
|
+
"borderBottomRightRadius"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
borderTopLeftRadius: o,
|
|
14
|
+
borderTopRightRadius: o,
|
|
15
|
+
borderBottomLeftRadius: o,
|
|
16
|
+
borderBottomRightRadius: o,
|
|
17
|
+
boxShadow: r
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
e as scaleCorrectors
|
|
21
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function X(e, t, i) {
|
|
2
|
+
let n = "";
|
|
3
|
+
const o = e.x.translate / t.x, $ = e.y.translate / t.y, s = (i == null ? void 0 : i.z) || 0;
|
|
4
|
+
if ((o || $ || s) && (n = `translate3d(${o}px, ${$}px, ${s}px) `), (t.x !== 1 || t.y !== 1) && (n += `scale(${1 / t.x}, ${1 / t.y}) `), i) {
|
|
5
|
+
const { transformPerspective: f, rotate: p, rotateX: y, rotateY: a, skewX: g, skewY: r } = i;
|
|
6
|
+
f && (n = `perspective(${f}px) ${n}`), p && (n += `rotate(${p}deg) `), y && (n += `rotateX(${y}deg) `), a && (n += `rotateY(${a}deg) `), g && (n += `skewX(${g}deg) `), r && (n += `skewY(${r}deg) `);
|
|
7
|
+
}
|
|
8
|
+
const x = e.x.scale * t.x, c = e.y.scale * t.y;
|
|
9
|
+
return (x !== 1 || c !== 1) && (n += `scale(${x}, ${c})`), n || "none";
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
X as buildProjectionTransform
|
|
13
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { compareByDepth as t } from "./compare-by-depth.js";
|
|
2
|
+
import { addUniqueItem as r, removeItem as e } from "../../../../../motion-utils/dist/es/array.js";
|
|
3
|
+
class c {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.children = [], this.isDirty = !1;
|
|
6
|
+
}
|
|
7
|
+
add(i) {
|
|
8
|
+
r(this.children, i), this.isDirty = !0;
|
|
9
|
+
}
|
|
10
|
+
remove(i) {
|
|
11
|
+
e(this.children, i), this.isDirty = !0;
|
|
12
|
+
}
|
|
13
|
+
forEach(i) {
|
|
14
|
+
this.isDirty && this.children.sort(t), this.isDirty = !1, this.children.forEach(i);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
c as FlatTree
|
|
19
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function t(n) {
|
|
2
|
+
return n === void 0 || n === 1;
|
|
3
|
+
}
|
|
4
|
+
function e({ scale: n, scaleX: o, scaleY: i }) {
|
|
5
|
+
return !t(n) || !t(o) || !t(i);
|
|
6
|
+
}
|
|
7
|
+
function c(n) {
|
|
8
|
+
return e(n) || f(n) || n.z || n.rotate || n.rotateX || n.rotateY || n.skewX || n.skewY;
|
|
9
|
+
}
|
|
10
|
+
function f(n) {
|
|
11
|
+
return r(n.x) || r(n.y);
|
|
12
|
+
}
|
|
13
|
+
function r(n) {
|
|
14
|
+
return n && n !== "0%";
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
f as has2DTranslate,
|
|
18
|
+
e as hasScale,
|
|
19
|
+
c as hasTransform
|
|
20
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { convertBoundingBoxToBox as s, transformBoxPoints as f } from "../geometry/conversion.js";
|
|
2
|
+
import { translateAxis as n } from "../geometry/delta-apply.js";
|
|
3
|
+
function x(o, t) {
|
|
4
|
+
return s(f(o.getBoundingClientRect(), t));
|
|
5
|
+
}
|
|
6
|
+
function c(o, t, i) {
|
|
7
|
+
const r = x(o, i), { scroll: e } = t;
|
|
8
|
+
return e && (n(r.x, e.offset.x), n(r.y, e.offset.y)), r;
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
c as measurePageBox,
|
|
12
|
+
x as measureViewportBox
|
|
13
|
+
};
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { microtask as C } from "../frameloop/microtask.js";
|
|
2
|
+
import { time as M } from "../frameloop/sync-time.js";
|
|
3
|
+
import { motionValue as S } from "../value/index.js";
|
|
4
|
+
import { isMotionValue as h } from "../value/utils/is-motion-value.js";
|
|
5
|
+
import { KeyframeResolver as b } from "../animation/keyframes/KeyframesResolver.js";
|
|
6
|
+
import { transformProps as T } from "./utils/keys-transform.js";
|
|
7
|
+
import { complex as w } from "../value/types/complex/index.js";
|
|
8
|
+
import { findValueType as P } from "../value/types/utils/find.js";
|
|
9
|
+
import { getAnimatableNone as F } from "../value/types/utils/animatable-none.js";
|
|
10
|
+
import { createBox as A } from "../projection/geometry/models.js";
|
|
11
|
+
import { initPrefersReducedMotion as R } from "./utils/reduced-motion/index.js";
|
|
12
|
+
import { visualElementStore as B } from "./store.js";
|
|
13
|
+
import { isControllingVariants as N, isVariantNode as E } from "./utils/is-controlling-variants.js";
|
|
14
|
+
import { updateMotionValuesFromProps as x } from "./utils/motion-values.js";
|
|
15
|
+
import { resolveVariantFromProps as j } from "./utils/resolve-variants.js";
|
|
16
|
+
import { hasReducedMotionListener as y, prefersReducedMotion as I } from "./utils/reduced-motion/state.js";
|
|
17
|
+
import { frame as f, cancelFrame as c } from "../frameloop/frame.js";
|
|
18
|
+
import { warnOnce as D } from "../../../../motion-utils/dist/es/warn-once.js";
|
|
19
|
+
import { isNumericalString as U } from "../../../../motion-utils/dist/es/is-numerical-string.js";
|
|
20
|
+
import { isZeroValueString as L } from "../../../../motion-utils/dist/es/is-zero-value-string.js";
|
|
21
|
+
import { SubscriptionManager as O } from "../../../../motion-utils/dist/es/subscription-manager.js";
|
|
22
|
+
const m = [
|
|
23
|
+
"AnimationStart",
|
|
24
|
+
"AnimationComplete",
|
|
25
|
+
"Update",
|
|
26
|
+
"BeforeLayoutMeasure",
|
|
27
|
+
"LayoutMeasure",
|
|
28
|
+
"LayoutAnimationStart",
|
|
29
|
+
"LayoutAnimationComplete"
|
|
30
|
+
];
|
|
31
|
+
let u = {};
|
|
32
|
+
function ht(l) {
|
|
33
|
+
u = l;
|
|
34
|
+
}
|
|
35
|
+
function ut() {
|
|
36
|
+
return u;
|
|
37
|
+
}
|
|
38
|
+
class lt {
|
|
39
|
+
/**
|
|
40
|
+
* This method takes React props and returns found MotionValues. For example, HTML
|
|
41
|
+
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
42
|
+
*
|
|
43
|
+
* This isn't an abstract method as it needs calling in the constructor, but it is
|
|
44
|
+
* intended to be one.
|
|
45
|
+
*/
|
|
46
|
+
scrapeMotionValuesFromProps(t, e, i) {
|
|
47
|
+
return {};
|
|
48
|
+
}
|
|
49
|
+
constructor({ parent: t, props: e, presenceContext: i, reducedMotionConfig: s, skipAnimations: r, blockInitialAnimation: n, visualState: V }, v = {}) {
|
|
50
|
+
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 = b, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
51
|
+
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
52
|
+
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
53
|
+
const o = M.now();
|
|
54
|
+
this.renderScheduledAt < o && (this.renderScheduledAt = o, f.render(this.render, !1, !0));
|
|
55
|
+
};
|
|
56
|
+
const { latestValues: a, renderState: g } = V;
|
|
57
|
+
this.latestValues = a, this.baseTarget = { ...a }, this.initialValues = e.initial ? { ...a } : {}, this.renderState = g, this.parent = t, this.props = e, this.presenceContext = i, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = s, this.skipAnimationsConfig = r, this.options = v, this.blockInitialAnimation = !!n, this.isControllingVariants = N(e), this.isVariantNode = E(e), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
|
|
58
|
+
const { willChange: _, ...d } = this.scrapeMotionValuesFromProps(e, {}, this);
|
|
59
|
+
for (const o in d) {
|
|
60
|
+
const p = d[o];
|
|
61
|
+
a[o] !== void 0 && h(p) && p.set(a[o]);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
mount(t) {
|
|
65
|
+
var e;
|
|
66
|
+
this.current = t, B.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((i, s) => this.bindToMotionValue(s, i)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (y.current || R(), this.shouldReduceMotion = I.current), process.env.NODE_ENV !== "production" && D(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, (e = this.parent) == null || e.addChild(this), this.update(this.props, this.presenceContext);
|
|
67
|
+
}
|
|
68
|
+
unmount() {
|
|
69
|
+
var t;
|
|
70
|
+
this.projection && this.projection.unmount(), c(this.notifyUpdate), c(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), (t = this.parent) == null || t.removeChild(this);
|
|
71
|
+
for (const e in this.events)
|
|
72
|
+
this.events[e].clear();
|
|
73
|
+
for (const e in this.features) {
|
|
74
|
+
const i = this.features[e];
|
|
75
|
+
i && (i.unmount(), i.isMounted = !1);
|
|
76
|
+
}
|
|
77
|
+
this.current = null;
|
|
78
|
+
}
|
|
79
|
+
addChild(t) {
|
|
80
|
+
this.children.add(t), this.enteringChildren ?? (this.enteringChildren = /* @__PURE__ */ new Set()), this.enteringChildren.add(t);
|
|
81
|
+
}
|
|
82
|
+
removeChild(t) {
|
|
83
|
+
this.children.delete(t), this.enteringChildren && this.enteringChildren.delete(t);
|
|
84
|
+
}
|
|
85
|
+
bindToMotionValue(t, e) {
|
|
86
|
+
this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)();
|
|
87
|
+
const i = T.has(t);
|
|
88
|
+
i && this.onBindTransform && this.onBindTransform();
|
|
89
|
+
const s = e.on("change", (n) => {
|
|
90
|
+
this.latestValues[t] = n, this.props.onUpdate && f.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
|
|
91
|
+
});
|
|
92
|
+
let r;
|
|
93
|
+
typeof window < "u" && window.MotionCheckAppearSync && (r = window.MotionCheckAppearSync(this, t, e)), this.valueSubscriptions.set(t, () => {
|
|
94
|
+
s(), r && r(), e.owner && e.stop();
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
sortNodePosition(t) {
|
|
98
|
+
return !this.current || !this.sortInstanceNodePosition || this.type !== t.type ? 0 : this.sortInstanceNodePosition(this.current, t.current);
|
|
99
|
+
}
|
|
100
|
+
updateFeatures() {
|
|
101
|
+
let t = "animation";
|
|
102
|
+
for (t in u) {
|
|
103
|
+
const e = u[t];
|
|
104
|
+
if (!e)
|
|
105
|
+
continue;
|
|
106
|
+
const { isEnabled: i, Feature: s } = e;
|
|
107
|
+
if (!this.features[t] && s && i(this.props) && (this.features[t] = new s(this)), this.features[t]) {
|
|
108
|
+
const r = this.features[t];
|
|
109
|
+
r.isMounted ? r.update() : (r.mount(), r.isMounted = !0);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
triggerBuild() {
|
|
114
|
+
this.build(this.renderState, this.latestValues, this.props);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Measure the current viewport box with or without transforms.
|
|
118
|
+
* Only measures axis-aligned boxes, rotate and skew must be manually
|
|
119
|
+
* removed with a re-render to work.
|
|
120
|
+
*/
|
|
121
|
+
measureViewportBox() {
|
|
122
|
+
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : A();
|
|
123
|
+
}
|
|
124
|
+
getStaticValue(t) {
|
|
125
|
+
return this.latestValues[t];
|
|
126
|
+
}
|
|
127
|
+
setStaticValue(t, e) {
|
|
128
|
+
this.latestValues[t] = e;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Update the provided props. Ensure any newly-added motion values are
|
|
132
|
+
* added to our map, old ones removed, and listeners updated.
|
|
133
|
+
*/
|
|
134
|
+
update(t, e) {
|
|
135
|
+
(t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = e;
|
|
136
|
+
for (let i = 0; i < m.length; i++) {
|
|
137
|
+
const s = m[i];
|
|
138
|
+
this.propEventSubscriptions[s] && (this.propEventSubscriptions[s](), delete this.propEventSubscriptions[s]);
|
|
139
|
+
const r = "on" + s, n = t[r];
|
|
140
|
+
n && (this.propEventSubscriptions[s] = this.on(s, n));
|
|
141
|
+
}
|
|
142
|
+
this.prevMotionValues = x(this, this.scrapeMotionValuesFromProps(t, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
143
|
+
}
|
|
144
|
+
getProps() {
|
|
145
|
+
return this.props;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Returns the variant definition with a given name.
|
|
149
|
+
*/
|
|
150
|
+
getVariant(t) {
|
|
151
|
+
return this.props.variants ? this.props.variants[t] : void 0;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Returns the defined default transition on this component.
|
|
155
|
+
*/
|
|
156
|
+
getDefaultTransition() {
|
|
157
|
+
return this.props.transition;
|
|
158
|
+
}
|
|
159
|
+
getTransformPagePoint() {
|
|
160
|
+
return this.props.transformPagePoint;
|
|
161
|
+
}
|
|
162
|
+
getClosestVariantNode() {
|
|
163
|
+
return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Add a child visual element to our set of children.
|
|
167
|
+
*/
|
|
168
|
+
addVariantChild(t) {
|
|
169
|
+
const e = this.getClosestVariantNode();
|
|
170
|
+
if (e)
|
|
171
|
+
return e.variantChildren && e.variantChildren.add(t), () => e.variantChildren.delete(t);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Add a motion value and bind it to this visual element.
|
|
175
|
+
*/
|
|
176
|
+
addValue(t, e) {
|
|
177
|
+
const i = this.values.get(t);
|
|
178
|
+
e !== i && (i && this.removeValue(t), this.bindToMotionValue(t, e), this.values.set(t, e), this.latestValues[t] = e.get());
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Remove a motion value and unbind any active subscriptions.
|
|
182
|
+
*/
|
|
183
|
+
removeValue(t) {
|
|
184
|
+
this.values.delete(t);
|
|
185
|
+
const e = this.valueSubscriptions.get(t);
|
|
186
|
+
e && (e(), this.valueSubscriptions.delete(t)), delete this.latestValues[t], this.removeValueFromRenderState(t, this.renderState);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Check whether we have a motion value for this key
|
|
190
|
+
*/
|
|
191
|
+
hasValue(t) {
|
|
192
|
+
return this.values.has(t);
|
|
193
|
+
}
|
|
194
|
+
getValue(t, e) {
|
|
195
|
+
if (this.props.values && this.props.values[t])
|
|
196
|
+
return this.props.values[t];
|
|
197
|
+
let i = this.values.get(t);
|
|
198
|
+
return i === void 0 && e !== void 0 && (i = S(e === null ? void 0 : e, { owner: this }), this.addValue(t, i)), i;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* If we're trying to animate to a previously unencountered value,
|
|
202
|
+
* we need to check for it in our state and as a last resort read it
|
|
203
|
+
* directly from the instance (which might have performance implications).
|
|
204
|
+
*/
|
|
205
|
+
readValue(t, e) {
|
|
206
|
+
let i = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
|
|
207
|
+
return i != null && (typeof i == "string" && (U(i) || L(i)) ? i = parseFloat(i) : !P(i) && w.test(e) && (i = F(t, e)), this.setBaseTarget(t, h(i) ? i.get() : i)), h(i) ? i.get() : i;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Set the base target to later animate back to. This is currently
|
|
211
|
+
* only hydrated on creation and when we first read a value.
|
|
212
|
+
*/
|
|
213
|
+
setBaseTarget(t, e) {
|
|
214
|
+
this.baseTarget[t] = e;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Find the base target for a value thats been removed from all animation
|
|
218
|
+
* props.
|
|
219
|
+
*/
|
|
220
|
+
getBaseTarget(t) {
|
|
221
|
+
var r;
|
|
222
|
+
const { initial: e } = this.props;
|
|
223
|
+
let i;
|
|
224
|
+
if (typeof e == "string" || typeof e == "object") {
|
|
225
|
+
const n = j(this.props, e, (r = this.presenceContext) == null ? void 0 : r.custom);
|
|
226
|
+
n && (i = n[t]);
|
|
227
|
+
}
|
|
228
|
+
if (e && i !== void 0)
|
|
229
|
+
return i;
|
|
230
|
+
const s = this.getBaseTargetFromProps(this.props, t);
|
|
231
|
+
return s !== void 0 && !h(s) ? s : this.initialValues[t] !== void 0 && i === void 0 ? void 0 : this.baseTarget[t];
|
|
232
|
+
}
|
|
233
|
+
on(t, e) {
|
|
234
|
+
return this.events[t] || (this.events[t] = new O()), this.events[t].add(e);
|
|
235
|
+
}
|
|
236
|
+
notify(t, ...e) {
|
|
237
|
+
this.events[t] && this.events[t].notify(...e);
|
|
238
|
+
}
|
|
239
|
+
scheduleRenderMicrotask() {
|
|
240
|
+
C.render(this.render);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
export {
|
|
244
|
+
lt as VisualElement,
|
|
245
|
+
ut as getFeatureDefinitions,
|
|
246
|
+
ht as setFeatureDefinitions
|
|
247
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { isMotionValue as r } from "../../value/utils/is-motion-value.js";
|
|
2
|
+
import { DOMKeyframesResolver as o } from "../../animation/keyframes/DOMKeyframesResolver.js";
|
|
3
|
+
import { VisualElement as s } from "../VisualElement.js";
|
|
4
|
+
class a extends s {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments), this.KeyframeResolver = o;
|
|
7
|
+
}
|
|
8
|
+
sortInstanceNodePosition(e, t) {
|
|
9
|
+
return e.compareDocumentPosition(t) & 2 ? 1 : -1;
|
|
10
|
+
}
|
|
11
|
+
getBaseTargetFromProps(e, t) {
|
|
12
|
+
const i = e.style;
|
|
13
|
+
return i ? i[t] : void 0;
|
|
14
|
+
}
|
|
15
|
+
removeValueFromRenderState(e, { vars: t, style: i }) {
|
|
16
|
+
delete t[e], delete i[e];
|
|
17
|
+
}
|
|
18
|
+
handleChildMotionValue() {
|
|
19
|
+
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
20
|
+
const { children: e } = this.props;
|
|
21
|
+
r(e) && (this.childSubscription = e.on("change", (t) => {
|
|
22
|
+
this.current && (this.current.textContent = `${t}`);
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
a as DOMVisualElement
|
|
28
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
const e = (t) => t * 180 / Math.PI, c = (t) => {
|
|
2
|
+
const a = e(Math.atan2(t[1], t[0]));
|
|
3
|
+
return l(a);
|
|
4
|
+
}, f = {
|
|
5
|
+
x: 4,
|
|
6
|
+
y: 5,
|
|
7
|
+
translateX: 4,
|
|
8
|
+
translateY: 5,
|
|
9
|
+
scaleX: 0,
|
|
10
|
+
scaleY: 3,
|
|
11
|
+
scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
|
|
12
|
+
rotate: c,
|
|
13
|
+
rotateZ: c,
|
|
14
|
+
skewX: (t) => e(Math.atan(t[1])),
|
|
15
|
+
skewY: (t) => e(Math.atan(t[2])),
|
|
16
|
+
skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
|
|
17
|
+
}, l = (t) => (t = t % 360, t < 0 && (t += 360), t), h = c, M = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), i = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), x = {
|
|
18
|
+
x: 12,
|
|
19
|
+
y: 13,
|
|
20
|
+
z: 14,
|
|
21
|
+
translateX: 12,
|
|
22
|
+
translateY: 13,
|
|
23
|
+
translateZ: 14,
|
|
24
|
+
scaleX: M,
|
|
25
|
+
scaleY: i,
|
|
26
|
+
scale: (t) => (M(t) + i(t)) / 2,
|
|
27
|
+
rotateX: (t) => l(e(Math.atan2(t[6], t[5]))),
|
|
28
|
+
rotateY: (t) => l(e(Math.atan2(-t[2], t[0]))),
|
|
29
|
+
rotateZ: h,
|
|
30
|
+
rotate: h,
|
|
31
|
+
skewX: (t) => e(Math.atan(t[4])),
|
|
32
|
+
skewY: (t) => e(Math.atan(t[1])),
|
|
33
|
+
skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
|
|
34
|
+
};
|
|
35
|
+
function m(t) {
|
|
36
|
+
return t.includes("scale") ? 1 : 0;
|
|
37
|
+
}
|
|
38
|
+
function b(t, a) {
|
|
39
|
+
if (!t || t === "none")
|
|
40
|
+
return m(a);
|
|
41
|
+
const s = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
42
|
+
let n, r;
|
|
43
|
+
if (s)
|
|
44
|
+
n = x, r = s;
|
|
45
|
+
else {
|
|
46
|
+
const d = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
47
|
+
n = f, r = d;
|
|
48
|
+
}
|
|
49
|
+
if (!r)
|
|
50
|
+
return m(a);
|
|
51
|
+
const o = n[a], u = r[1].split(",").map(p);
|
|
52
|
+
return typeof o == "function" ? o(u) : u[o];
|
|
53
|
+
}
|
|
54
|
+
const X = (t, a) => {
|
|
55
|
+
const { transform: s = "none" } = getComputedStyle(t);
|
|
56
|
+
return b(s, a);
|
|
57
|
+
};
|
|
58
|
+
function p(t) {
|
|
59
|
+
return parseFloat(t.trim());
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
m as defaultTransformValue,
|
|
63
|
+
b as parseValueFromTransform,
|
|
64
|
+
X as readTransformValue
|
|
65
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { isCSSVariableName as n } from "../../animation/utils/is-css-variable.js";
|
|
2
|
+
import { transformProps as a } from "../utils/keys-transform.js";
|
|
3
|
+
import { defaultTransformValue as i, readTransformValue as u } from "../dom/parse-transform.js";
|
|
4
|
+
import { measureViewportBox as p } from "../../projection/utils/measure.js";
|
|
5
|
+
import { DOMVisualElement as l } from "../dom/DOMVisualElement.js";
|
|
6
|
+
import { buildHTMLStyles as f } from "./utils/build-styles.js";
|
|
7
|
+
import { renderHTML as c } from "./utils/render.js";
|
|
8
|
+
import { scrapeMotionValuesFromProps as d } from "./utils/scrape-motion-values.js";
|
|
9
|
+
function V(m) {
|
|
10
|
+
return window.getComputedStyle(m);
|
|
11
|
+
}
|
|
12
|
+
class b extends l {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments), this.type = "html", this.renderInstance = c;
|
|
15
|
+
}
|
|
16
|
+
readValueFromInstance(e, r) {
|
|
17
|
+
var t;
|
|
18
|
+
if (a.has(r))
|
|
19
|
+
return (t = this.projection) != null && t.isProjecting ? i(r) : u(e, r);
|
|
20
|
+
{
|
|
21
|
+
const s = V(e), o = (n(r) ? s.getPropertyValue(r) : s[r]) || 0;
|
|
22
|
+
return typeof o == "string" ? o.trim() : o;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
measureInstanceViewportBox(e, { transformPagePoint: r }) {
|
|
26
|
+
return p(e, r);
|
|
27
|
+
}
|
|
28
|
+
build(e, r, t) {
|
|
29
|
+
f(e, r, t.transformTemplate);
|
|
30
|
+
}
|
|
31
|
+
scrapeMotionValuesFromProps(e, r, t) {
|
|
32
|
+
return d(e, r, t);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
b as HTMLVisualElement,
|
|
37
|
+
V as getComputedStyle
|
|
38
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { getValueAsType as p } from "../../../value/types/utils/get-as-type.js";
|
|
2
|
+
import { numberValueTypes as u } from "../../../value/types/maps/number.js";
|
|
3
|
+
import { transformProps as c } from "../../utils/keys-transform.js";
|
|
4
|
+
import { isCSSVariableName as g } from "../../../animation/utils/is-css-variable.js";
|
|
5
|
+
import { buildTransform as y } from "./build-transform.js";
|
|
6
|
+
function S(f, i, e) {
|
|
7
|
+
const { style: o, vars: l, transformOrigin: t } = f;
|
|
8
|
+
let m = !1, a = !1;
|
|
9
|
+
for (const r in i) {
|
|
10
|
+
const n = i[r];
|
|
11
|
+
if (c.has(r)) {
|
|
12
|
+
m = !0;
|
|
13
|
+
continue;
|
|
14
|
+
} else if (g(r)) {
|
|
15
|
+
l[r] = n;
|
|
16
|
+
continue;
|
|
17
|
+
} else {
|
|
18
|
+
const s = p(n, u[r]);
|
|
19
|
+
r.startsWith("origin") ? (a = !0, t[r] = s) : o[r] = s;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (i.transform || (m || e ? o.transform = y(i, f.transform, e) : o.transform && (o.transform = "none")), a) {
|
|
23
|
+
const { originX: r = "50%", originY: n = "50%", originZ: s = 0 } = t;
|
|
24
|
+
o.transformOrigin = `${r} ${n} ${s}`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
S as buildHTMLStyles
|
|
29
|
+
};
|