@pibit.ai/cure-design-system 0.3.8 → 0.3.11
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/table/TableWrapper.d.ts.map +1 -1
- package/dist/patterns/table/TableWrapper.js +77 -67
- package/dist/patterns/table/table.d.ts +9 -9
- package/dist/patterns/table/table.d.ts.map +1 -1
- package/dist/patterns/table/table.js +146 -73
- 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,133 @@
|
|
|
1
|
+
import { time as u } from "../frameloop/sync-time.js";
|
|
2
|
+
import { mix as G } from "../utils/mix/index.js";
|
|
3
|
+
import { frameloopDriver as I } from "./drivers/frame.js";
|
|
4
|
+
import { inertia as K } from "./generators/inertia.js";
|
|
5
|
+
import { keyframes as c } from "./generators/keyframes.js";
|
|
6
|
+
import { calcGeneratorDuration as O } from "./generators/utils/calc-duration.js";
|
|
7
|
+
import { getFinalKeyframe as C } from "./keyframes/get-final.js";
|
|
8
|
+
import { replaceTransitionType as E } from "./utils/replace-transition-type.js";
|
|
9
|
+
import { WithPromise as N } from "./utils/WithPromise.js";
|
|
10
|
+
import { invariant as V } from "../../../../motion-utils/dist/es/errors.js";
|
|
11
|
+
import { pipe as W } from "../../../../motion-utils/dist/es/pipe.js";
|
|
12
|
+
import { millisecondsToSeconds as f, secondsToMilliseconds as $ } from "../../../../motion-utils/dist/es/time-conversion.js";
|
|
13
|
+
import { clamp as B } from "../../../../motion-utils/dist/es/clamp.js";
|
|
14
|
+
const J = (v) => v / 100;
|
|
15
|
+
class et extends N {
|
|
16
|
+
constructor(t) {
|
|
17
|
+
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
18
|
+
var r, e;
|
|
19
|
+
const { motionValue: i } = this.options;
|
|
20
|
+
i && i.updatedAt !== u.now() && this.tick(u.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), (e = (r = this.options).onStop) == null || e.call(r));
|
|
21
|
+
}, this.options = t, this.initAnimation(), this.play(), t.autoplay === !1 && this.pause();
|
|
22
|
+
}
|
|
23
|
+
initAnimation() {
|
|
24
|
+
const { options: t } = this;
|
|
25
|
+
E(t);
|
|
26
|
+
const { type: i = c, repeat: r = 0, repeatDelay: e = 0, repeatType: n, velocity: m = 0 } = t;
|
|
27
|
+
let { keyframes: s } = t;
|
|
28
|
+
const h = i || c;
|
|
29
|
+
process.env.NODE_ENV !== "production" && h !== c && V(s.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`, "spring-two-frames"), h !== c && typeof s[0] != "number" && (this.mixKeyframes = W(J, G(s[0], s[1])), s = [0, 100]);
|
|
30
|
+
const a = h({ ...t, keyframes: s });
|
|
31
|
+
n === "mirror" && (this.mirroredGenerator = h({
|
|
32
|
+
...t,
|
|
33
|
+
keyframes: [...s].reverse(),
|
|
34
|
+
velocity: -m
|
|
35
|
+
})), a.calculatedDuration === null && (a.calculatedDuration = O(a));
|
|
36
|
+
const { calculatedDuration: p } = a;
|
|
37
|
+
this.calculatedDuration = p, this.resolvedDuration = p + e, this.totalDuration = this.resolvedDuration * (r + 1) - e, this.generator = a;
|
|
38
|
+
}
|
|
39
|
+
updateTime(t) {
|
|
40
|
+
const i = Math.round(t - this.startTime) * this.playbackSpeed;
|
|
41
|
+
this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = i;
|
|
42
|
+
}
|
|
43
|
+
tick(t, i = !1) {
|
|
44
|
+
const { generator: r, totalDuration: e, mixKeyframes: n, mirroredGenerator: m, resolvedDuration: s, calculatedDuration: h } = this;
|
|
45
|
+
if (this.startTime === null)
|
|
46
|
+
return r.next(0);
|
|
47
|
+
const { delay: a = 0, keyframes: p, repeat: k, repeatType: D, repeatDelay: g, type: F, onUpdate: S, finalKeyframe: P } = this.options;
|
|
48
|
+
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - e / this.speed, this.startTime)), i ? this.currentTime = t : this.updateTime(t);
|
|
49
|
+
const T = this.currentTime - a * (this.playbackSpeed >= 0 ? 1 : -1), b = this.playbackSpeed >= 0 ? T < 0 : T > e;
|
|
50
|
+
this.currentTime = Math.max(T, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = e);
|
|
51
|
+
let w = this.currentTime, x = r;
|
|
52
|
+
if (k) {
|
|
53
|
+
const y = Math.min(this.currentTime, e) / s;
|
|
54
|
+
let d = Math.floor(y), o = y % 1;
|
|
55
|
+
!o && y >= 1 && (o = 1), o === 1 && d--, d = Math.min(d, k + 1), !!(d % 2) && (D === "reverse" ? (o = 1 - o, g && (o -= g / s)) : D === "mirror" && (x = m)), w = B(0, 1, o) * s;
|
|
56
|
+
}
|
|
57
|
+
const l = b ? { done: !1, value: p[0] } : x.next(w);
|
|
58
|
+
n && (l.value = n(l.value));
|
|
59
|
+
let { done: M } = l;
|
|
60
|
+
!b && h !== null && (M = this.playbackSpeed >= 0 ? this.currentTime >= e : this.currentTime <= 0);
|
|
61
|
+
const A = this.holdTime === null && (this.state === "finished" || this.state === "running" && M);
|
|
62
|
+
return A && F !== K && (l.value = C(p, this.options, P, this.speed)), S && S(l.value), A && this.finish(), l;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
66
|
+
* resolves when the animation finishes at all but in a future update could/should
|
|
67
|
+
* reject if its cancels.
|
|
68
|
+
*/
|
|
69
|
+
then(t, i) {
|
|
70
|
+
return this.finished.then(t, i);
|
|
71
|
+
}
|
|
72
|
+
get duration() {
|
|
73
|
+
return f(this.calculatedDuration);
|
|
74
|
+
}
|
|
75
|
+
get iterationDuration() {
|
|
76
|
+
const { delay: t = 0 } = this.options || {};
|
|
77
|
+
return this.duration + f(t);
|
|
78
|
+
}
|
|
79
|
+
get time() {
|
|
80
|
+
return f(this.currentTime);
|
|
81
|
+
}
|
|
82
|
+
set time(t) {
|
|
83
|
+
var i;
|
|
84
|
+
t = $(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), (i = this.driver) == null || i.start(!1);
|
|
85
|
+
}
|
|
86
|
+
get speed() {
|
|
87
|
+
return this.playbackSpeed;
|
|
88
|
+
}
|
|
89
|
+
set speed(t) {
|
|
90
|
+
this.updateTime(u.now());
|
|
91
|
+
const i = this.playbackSpeed !== t;
|
|
92
|
+
this.playbackSpeed = t, i && (this.time = f(this.currentTime));
|
|
93
|
+
}
|
|
94
|
+
play() {
|
|
95
|
+
var e, n;
|
|
96
|
+
if (this.isStopped)
|
|
97
|
+
return;
|
|
98
|
+
const { driver: t = I, startTime: i } = this.options;
|
|
99
|
+
this.driver || (this.driver = t((m) => this.tick(m))), (n = (e = this.options).onPlay) == null || n.call(e);
|
|
100
|
+
const r = this.driver.now();
|
|
101
|
+
this.state === "finished" ? (this.updateFinished(), this.startTime = r) : this.holdTime !== null ? this.startTime = r - this.holdTime : this.startTime || (this.startTime = i ?? r), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
102
|
+
}
|
|
103
|
+
pause() {
|
|
104
|
+
this.state = "paused", this.updateTime(u.now()), this.holdTime = this.currentTime;
|
|
105
|
+
}
|
|
106
|
+
complete() {
|
|
107
|
+
this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
|
|
108
|
+
}
|
|
109
|
+
finish() {
|
|
110
|
+
var t, i;
|
|
111
|
+
this.notifyFinished(), this.teardown(), this.state = "finished", (i = (t = this.options).onComplete) == null || i.call(t);
|
|
112
|
+
}
|
|
113
|
+
cancel() {
|
|
114
|
+
var t, i;
|
|
115
|
+
this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), (i = (t = this.options).onCancel) == null || i.call(t);
|
|
116
|
+
}
|
|
117
|
+
teardown() {
|
|
118
|
+
this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null;
|
|
119
|
+
}
|
|
120
|
+
stopDriver() {
|
|
121
|
+
this.driver && (this.driver.stop(), this.driver = void 0);
|
|
122
|
+
}
|
|
123
|
+
sample(t) {
|
|
124
|
+
return this.startTime = 0, this.tick(t, !0);
|
|
125
|
+
}
|
|
126
|
+
attachTimeline(t) {
|
|
127
|
+
var i;
|
|
128
|
+
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (i = this.driver) == null || i.stop(), t.observe(this);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
export {
|
|
132
|
+
et as JSAnimation
|
|
133
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { setStyle as u } from "../render/dom/style-set.js";
|
|
2
|
+
import { supportsScrollTimeline as p } from "../utils/supports/scroll-timeline.js";
|
|
3
|
+
import { getFinalKeyframe as f } from "./keyframes/get-final.js";
|
|
4
|
+
import { WithPromise as d } from "./utils/WithPromise.js";
|
|
5
|
+
import { startWaapiAnimation as c } from "./waapi/start-waapi-animation.js";
|
|
6
|
+
import { applyGeneratorOptions as T } from "./waapi/utils/apply-generator.js";
|
|
7
|
+
import { invariant as y } from "../../../../motion-utils/dist/es/errors.js";
|
|
8
|
+
import { millisecondsToSeconds as o, secondsToMilliseconds as S } from "../../../../motion-utils/dist/es/time-conversion.js";
|
|
9
|
+
import { noop as g } from "../../../../motion-utils/dist/es/noop.js";
|
|
10
|
+
class x extends d {
|
|
11
|
+
constructor(i) {
|
|
12
|
+
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !i)
|
|
13
|
+
return;
|
|
14
|
+
const { element: t, name: e, keyframes: n, pseudoElement: s, allowFlatten: l = !1, finalKeyframe: h, onComplete: a } = i;
|
|
15
|
+
this.isPseudoElement = !!s, this.allowFlatten = l, this.options = i, y(typeof i.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
16
|
+
const m = T(i);
|
|
17
|
+
this.animation = c(t, e, n, m, s), m.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
18
|
+
if (this.finishedTime = this.time, !s) {
|
|
19
|
+
const r = f(n, this.options, h, this.speed);
|
|
20
|
+
this.updateMotionValue ? this.updateMotionValue(r) : u(t, e, r), this.animation.cancel();
|
|
21
|
+
}
|
|
22
|
+
a == null || a(), this.notifyFinished();
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
play() {
|
|
26
|
+
this.isStopped || (this.manualStartTime = null, this.animation.play(), this.state === "finished" && this.updateFinished());
|
|
27
|
+
}
|
|
28
|
+
pause() {
|
|
29
|
+
this.animation.pause();
|
|
30
|
+
}
|
|
31
|
+
complete() {
|
|
32
|
+
var i, t;
|
|
33
|
+
(t = (i = this.animation).finish) == null || t.call(i);
|
|
34
|
+
}
|
|
35
|
+
cancel() {
|
|
36
|
+
try {
|
|
37
|
+
this.animation.cancel();
|
|
38
|
+
} catch {
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
stop() {
|
|
42
|
+
if (this.isStopped)
|
|
43
|
+
return;
|
|
44
|
+
this.isStopped = !0;
|
|
45
|
+
const { state: i } = this;
|
|
46
|
+
i === "idle" || i === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* WAAPI doesn't natively have any interruption capabilities.
|
|
50
|
+
*
|
|
51
|
+
* In this method, we commit styles back to the DOM before cancelling
|
|
52
|
+
* the animation.
|
|
53
|
+
*
|
|
54
|
+
* This is designed to be overridden by NativeAnimationExtended, which
|
|
55
|
+
* will create a renderless JS animation and sample it twice to calculate
|
|
56
|
+
* its current value, "previous" value, and therefore allow
|
|
57
|
+
* Motion to also correctly calculate velocity for any subsequent animation
|
|
58
|
+
* while deferring the commit until the next animation frame.
|
|
59
|
+
*/
|
|
60
|
+
commitStyles() {
|
|
61
|
+
var t, e, n;
|
|
62
|
+
const i = (t = this.options) == null ? void 0 : t.element;
|
|
63
|
+
!this.isPseudoElement && (i != null && i.isConnected) && ((n = (e = this.animation).commitStyles) == null || n.call(e));
|
|
64
|
+
}
|
|
65
|
+
get duration() {
|
|
66
|
+
var t, e;
|
|
67
|
+
const i = ((e = (t = this.animation.effect) == null ? void 0 : t.getComputedTiming) == null ? void 0 : e.call(t).duration) || 0;
|
|
68
|
+
return o(Number(i));
|
|
69
|
+
}
|
|
70
|
+
get iterationDuration() {
|
|
71
|
+
const { delay: i = 0 } = this.options || {};
|
|
72
|
+
return this.duration + o(i);
|
|
73
|
+
}
|
|
74
|
+
get time() {
|
|
75
|
+
return o(Number(this.animation.currentTime) || 0);
|
|
76
|
+
}
|
|
77
|
+
set time(i) {
|
|
78
|
+
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = S(i);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The playback speed of the animation.
|
|
82
|
+
* 1 = normal speed, 2 = double speed, 0.5 = half speed.
|
|
83
|
+
*/
|
|
84
|
+
get speed() {
|
|
85
|
+
return this.animation.playbackRate;
|
|
86
|
+
}
|
|
87
|
+
set speed(i) {
|
|
88
|
+
i < 0 && (this.finishedTime = null), this.animation.playbackRate = i;
|
|
89
|
+
}
|
|
90
|
+
get state() {
|
|
91
|
+
return this.finishedTime !== null ? "finished" : this.animation.playState;
|
|
92
|
+
}
|
|
93
|
+
get startTime() {
|
|
94
|
+
return this.manualStartTime ?? Number(this.animation.startTime);
|
|
95
|
+
}
|
|
96
|
+
set startTime(i) {
|
|
97
|
+
this.manualStartTime = this.animation.startTime = i;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
101
|
+
*/
|
|
102
|
+
attachTimeline({ timeline: i, observe: t }) {
|
|
103
|
+
var e;
|
|
104
|
+
return this.allowFlatten && ((e = this.animation.effect) == null || e.updateTiming({ easing: "linear" })), this.animation.onfinish = null, i && p() ? (this.animation.timeline = i, g) : t(this);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
export {
|
|
108
|
+
x as NativeAnimation
|
|
109
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { time as r } from "../frameloop/sync-time.js";
|
|
2
|
+
import { JSAnimation as s } from "./JSAnimation.js";
|
|
3
|
+
import { NativeAnimation as p } from "./NativeAnimation.js";
|
|
4
|
+
import { replaceTransitionType as l } from "./utils/replace-transition-type.js";
|
|
5
|
+
import { replaceStringEasing as c } from "./waapi/utils/unsupported-easing.js";
|
|
6
|
+
import { clamp as f } from "../../../../motion-utils/dist/es/clamp.js";
|
|
7
|
+
const m = 10;
|
|
8
|
+
class g extends p {
|
|
9
|
+
constructor(t) {
|
|
10
|
+
c(t), l(t), super(t), t.startTime !== void 0 && (this.startTime = t.startTime), this.options = t;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* WAAPI doesn't natively have any interruption capabilities.
|
|
14
|
+
*
|
|
15
|
+
* Rather than read committed styles back out of the DOM, we can
|
|
16
|
+
* create a renderless JS animation and sample it twice to calculate
|
|
17
|
+
* its current value, "previous" value, and therefore allow
|
|
18
|
+
* Motion to calculate velocity for any subsequent animation.
|
|
19
|
+
*/
|
|
20
|
+
updateMotionValue(t) {
|
|
21
|
+
const { motionValue: e, onUpdate: d, onComplete: h, element: T, ...n } = this.options;
|
|
22
|
+
if (!e)
|
|
23
|
+
return;
|
|
24
|
+
if (t !== void 0) {
|
|
25
|
+
e.set(t);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const i = new s({
|
|
29
|
+
...n,
|
|
30
|
+
autoplay: !1
|
|
31
|
+
}), a = Math.max(m, r.now() - this.startTime), o = f(0, m, a - m);
|
|
32
|
+
e.setWithVelocity(i.sample(Math.max(0, a - o)).value, i.sample(a).value, o), i.stop();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
g as NativeAnimationExtended
|
|
37
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { animateMotionValue as m } from "../interfaces/motion-value.js";
|
|
2
|
+
import { motionValue as a } from "../../value/index.js";
|
|
3
|
+
import { isMotionValue as r } from "../../value/utils/is-motion-value.js";
|
|
4
|
+
function f(o, i, n) {
|
|
5
|
+
const t = r(o) ? o : a(o);
|
|
6
|
+
return t.start(m("", t, i, n)), t.animation;
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
f as animateSingleValue
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { time as o } from "../../frameloop/sync-time.js";
|
|
2
|
+
import { frameData as e, cancelFrame as a, frame as s } from "../../frameloop/frame.js";
|
|
3
|
+
const n = (m) => {
|
|
4
|
+
const t = ({ timestamp: r }) => m(r);
|
|
5
|
+
return {
|
|
6
|
+
start: (r = !0) => s.update(t, r),
|
|
7
|
+
stop: () => a(t),
|
|
8
|
+
/**
|
|
9
|
+
* If we're processing this frame we can use the
|
|
10
|
+
* framelocked timestamp to keep things in sync.
|
|
11
|
+
*/
|
|
12
|
+
now: () => e.isProcessing ? e.timestamp : o.now()
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
n as frameloopDriver
|
|
17
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { spring as L } from "./spring/index.js";
|
|
2
|
+
import { calcGeneratorVelocity as R } from "./utils/velocity.js";
|
|
3
|
+
function $({ keyframes: g, velocity: B = 0, power: M = 0.8, timeConstant: b = 325, bounceDamping: k = 10, bounceStiffness: F = 500, modifyTarget: l, min: t, max: a, restDelta: f = 0.5, restSpeed: O }) {
|
|
4
|
+
const s = g[0], n = {
|
|
5
|
+
done: !1,
|
|
6
|
+
value: s
|
|
7
|
+
}, C = (e) => t !== void 0 && e < t || a !== void 0 && e > a, D = (e) => t === void 0 ? a : a === void 0 || Math.abs(t - e) < Math.abs(a - e) ? t : a;
|
|
8
|
+
let c = M * B;
|
|
9
|
+
const d = s + c, u = l === void 0 ? d : l(d);
|
|
10
|
+
u !== d && (c = u - s);
|
|
11
|
+
const p = (e) => -c * Math.exp(-e / b), h = (e) => u + p(e), y = (e) => {
|
|
12
|
+
const o = p(e), G = h(e);
|
|
13
|
+
n.done = Math.abs(o) <= f, n.value = n.done ? u : G;
|
|
14
|
+
};
|
|
15
|
+
let r, i;
|
|
16
|
+
const v = (e) => {
|
|
17
|
+
C(n.value) && (r = e, i = L({
|
|
18
|
+
keyframes: [n.value, D(n.value)],
|
|
19
|
+
velocity: R(h, e, n.value),
|
|
20
|
+
// TODO: This should be passing * 1000
|
|
21
|
+
damping: k,
|
|
22
|
+
stiffness: F,
|
|
23
|
+
restDelta: f,
|
|
24
|
+
restSpeed: O
|
|
25
|
+
}));
|
|
26
|
+
};
|
|
27
|
+
return v(0), {
|
|
28
|
+
calculatedDuration: null,
|
|
29
|
+
next: (e) => {
|
|
30
|
+
let o = !1;
|
|
31
|
+
return !i && r === void 0 && (o = !0, y(e), v(e)), r !== void 0 && e >= r ? i.next(e - r) : (!o && y(e), n);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
$ as inertia
|
|
37
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { interpolate as c } from "../../utils/interpolate.js";
|
|
2
|
+
import { defaultOffset as p } from "../keyframes/offsets/default.js";
|
|
3
|
+
import { convertOffsetToTimes as u } from "../keyframes/offsets/time.js";
|
|
4
|
+
import { isEasingArray as l } from "../../../../../motion-utils/dist/es/easing/utils/is-easing-array.js";
|
|
5
|
+
import { easingDefinitionToFunction as m } from "../../../../../motion-utils/dist/es/easing/utils/map.js";
|
|
6
|
+
import { easeInOut as g } from "../../../../../motion-utils/dist/es/easing/ease.js";
|
|
7
|
+
function T(n, t) {
|
|
8
|
+
return n.map(() => t || g).splice(0, n.length - 1);
|
|
9
|
+
}
|
|
10
|
+
function y({ duration: n = 300, keyframes: t, times: o, ease: r = "easeInOut" }) {
|
|
11
|
+
const e = l(r) ? r.map(m) : m(r), i = {
|
|
12
|
+
done: !1,
|
|
13
|
+
value: t[0]
|
|
14
|
+
}, s = u(
|
|
15
|
+
// Only use the provided offsets if they're the correct length
|
|
16
|
+
// TODO Maybe we should warn here if there's a length mismatch
|
|
17
|
+
o && o.length === t.length ? o : p(t),
|
|
18
|
+
n
|
|
19
|
+
), a = c(s, t, {
|
|
20
|
+
ease: Array.isArray(e) ? e : T(t, e)
|
|
21
|
+
});
|
|
22
|
+
return {
|
|
23
|
+
calculatedDuration: n,
|
|
24
|
+
next: (f) => (i.value = a(f), i.done = f >= n, i)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
T as defaultEasing,
|
|
29
|
+
y as keyframes
|
|
30
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const a = {
|
|
2
|
+
// Default spring physics
|
|
3
|
+
stiffness: 100,
|
|
4
|
+
damping: 10,
|
|
5
|
+
mass: 1,
|
|
6
|
+
velocity: 0,
|
|
7
|
+
// Default duration/bounce-based options
|
|
8
|
+
duration: 800,
|
|
9
|
+
// in ms
|
|
10
|
+
bounce: 0.3,
|
|
11
|
+
visualDuration: 0.3,
|
|
12
|
+
// in seconds
|
|
13
|
+
// Rest thresholds
|
|
14
|
+
restSpeed: {
|
|
15
|
+
granular: 0.01,
|
|
16
|
+
default: 2
|
|
17
|
+
},
|
|
18
|
+
restDelta: {
|
|
19
|
+
granular: 5e-3,
|
|
20
|
+
default: 0.5
|
|
21
|
+
},
|
|
22
|
+
// Limits
|
|
23
|
+
minDuration: 0.01,
|
|
24
|
+
// in seconds
|
|
25
|
+
maxDuration: 10,
|
|
26
|
+
// in seconds
|
|
27
|
+
minDamping: 0.05,
|
|
28
|
+
maxDamping: 1
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
a as springDefaults
|
|
32
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { springDefaults as s } from "./defaults.js";
|
|
2
|
+
import { warning as S } from "../../../../../../motion-utils/dist/es/errors.js";
|
|
3
|
+
import { secondsToMilliseconds as h, millisecondsToSeconds as N } from "../../../../../../motion-utils/dist/es/time-conversion.js";
|
|
4
|
+
import { clamp as D } from "../../../../../../motion-utils/dist/es/clamp.js";
|
|
5
|
+
const x = 1e-3;
|
|
6
|
+
function v({ duration: t = s.duration, bounce: p = s.bounce, velocity: i = s.velocity, mass: e = s.mass }) {
|
|
7
|
+
let a, f;
|
|
8
|
+
S(t <= h(s.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
9
|
+
let o = 1 - p;
|
|
10
|
+
o = D(s.minDamping, s.maxDamping, o), t = D(s.minDuration, s.maxDuration, N(t)), o < 1 ? (a = (n) => {
|
|
11
|
+
const r = n * o, c = r * t, l = r - i, m = b(n, o), g = Math.exp(-c);
|
|
12
|
+
return x - l / m * g;
|
|
13
|
+
}, f = (n) => {
|
|
14
|
+
const c = n * o * t, l = c * i + i, m = Math.pow(o, 2) * Math.pow(n, 2) * t, g = Math.exp(-c), u = b(Math.pow(n, 2), o);
|
|
15
|
+
return (-a(n) + x > 0 ? -1 : 1) * ((l - m) * g) / u;
|
|
16
|
+
}) : (a = (n) => {
|
|
17
|
+
const r = Math.exp(-n * t), c = (n - i) * t + 1;
|
|
18
|
+
return -x + r * c;
|
|
19
|
+
}, f = (n) => {
|
|
20
|
+
const r = Math.exp(-n * t), c = (i - n) * (t * t);
|
|
21
|
+
return r * c;
|
|
22
|
+
});
|
|
23
|
+
const w = 5 / t, M = A(a, f, w);
|
|
24
|
+
if (t = h(t), isNaN(M))
|
|
25
|
+
return {
|
|
26
|
+
stiffness: s.stiffness,
|
|
27
|
+
damping: s.damping,
|
|
28
|
+
duration: t
|
|
29
|
+
};
|
|
30
|
+
{
|
|
31
|
+
const n = Math.pow(M, 2) * e;
|
|
32
|
+
return {
|
|
33
|
+
stiffness: n,
|
|
34
|
+
damping: o * 2 * Math.sqrt(e * n),
|
|
35
|
+
duration: t
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const T = 12;
|
|
40
|
+
function A(t, p, i) {
|
|
41
|
+
let e = i;
|
|
42
|
+
for (let a = 1; a < T; a++)
|
|
43
|
+
e = e - t(e) / p(e);
|
|
44
|
+
return e;
|
|
45
|
+
}
|
|
46
|
+
function b(t, p) {
|
|
47
|
+
return t * Math.sqrt(1 - p * p);
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
b as calcAngularFreq,
|
|
51
|
+
v as findSpring
|
|
52
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { generateLinearEasing as w } from "../../waapi/utils/linear.js";
|
|
2
|
+
import { calcGeneratorDuration as B, maxGeneratorDuration as E } from "../utils/calc-duration.js";
|
|
3
|
+
import { createGeneratorEasing as K } from "../utils/create-generator-easing.js";
|
|
4
|
+
import { calcGeneratorVelocity as O } from "../utils/velocity.js";
|
|
5
|
+
import { springDefaults as a } from "./defaults.js";
|
|
6
|
+
import { findSpring as V, calcAngularFreq as j } from "./find.js";
|
|
7
|
+
import { millisecondsToSeconds as T, secondsToMilliseconds as k } from "../../../../../../motion-utils/dist/es/time-conversion.js";
|
|
8
|
+
import { clamp as I } from "../../../../../../motion-utils/dist/es/clamp.js";
|
|
9
|
+
const L = ["duration", "bounce"], P = ["stiffness", "damping", "mass"];
|
|
10
|
+
function b(t, n) {
|
|
11
|
+
return n.some((s) => t[s] !== void 0);
|
|
12
|
+
}
|
|
13
|
+
function z(t) {
|
|
14
|
+
let n = {
|
|
15
|
+
velocity: a.velocity,
|
|
16
|
+
stiffness: a.stiffness,
|
|
17
|
+
damping: a.damping,
|
|
18
|
+
mass: a.mass,
|
|
19
|
+
isResolvedFromDuration: !1,
|
|
20
|
+
...t
|
|
21
|
+
};
|
|
22
|
+
if (!b(t, P) && b(t, L))
|
|
23
|
+
if (t.visualDuration) {
|
|
24
|
+
const s = t.visualDuration, u = 2 * Math.PI / (s * 1.2), m = u * u, h = 2 * I(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(m);
|
|
25
|
+
n = {
|
|
26
|
+
...n,
|
|
27
|
+
mass: a.mass,
|
|
28
|
+
stiffness: m,
|
|
29
|
+
damping: h
|
|
30
|
+
};
|
|
31
|
+
} else {
|
|
32
|
+
const s = V(t);
|
|
33
|
+
n = {
|
|
34
|
+
...n,
|
|
35
|
+
...s,
|
|
36
|
+
mass: a.mass
|
|
37
|
+
}, n.isResolvedFromDuration = !0;
|
|
38
|
+
}
|
|
39
|
+
return n;
|
|
40
|
+
}
|
|
41
|
+
function x(t = a.visualDuration, n = a.bounce) {
|
|
42
|
+
const s = typeof t != "object" ? {
|
|
43
|
+
visualDuration: t,
|
|
44
|
+
keyframes: [0, 1],
|
|
45
|
+
bounce: n
|
|
46
|
+
} : t;
|
|
47
|
+
let { restSpeed: u, restDelta: m } = s;
|
|
48
|
+
const h = s.keyframes[0], f = s.keyframes[s.keyframes.length - 1], d = { done: !1, value: h }, { stiffness: M, damping: G, mass: D, duration: S, velocity: R, isResolvedFromDuration: q } = z({
|
|
49
|
+
...s,
|
|
50
|
+
velocity: -T(s.velocity || 0)
|
|
51
|
+
}), p = R || 0, o = G / (2 * Math.sqrt(M * D)), c = f - h, i = T(Math.sqrt(M / D)), F = Math.abs(c) < 5;
|
|
52
|
+
u || (u = F ? a.restSpeed.granular : a.restSpeed.default), m || (m = F ? a.restDelta.granular : a.restDelta.default);
|
|
53
|
+
let g;
|
|
54
|
+
if (o < 1) {
|
|
55
|
+
const e = j(i, o);
|
|
56
|
+
g = (r) => {
|
|
57
|
+
const l = Math.exp(-o * i * r);
|
|
58
|
+
return f - l * ((p + o * i * c) / e * Math.sin(e * r) + c * Math.cos(e * r));
|
|
59
|
+
};
|
|
60
|
+
} else if (o === 1)
|
|
61
|
+
g = (e) => f - Math.exp(-i * e) * (c + (p + i * c) * e);
|
|
62
|
+
else {
|
|
63
|
+
const e = i * Math.sqrt(o * o - 1);
|
|
64
|
+
g = (r) => {
|
|
65
|
+
const l = Math.exp(-o * i * r), y = Math.min(e * r, 300);
|
|
66
|
+
return f - l * ((p + o * i * c) * Math.sinh(y) + e * c * Math.cosh(y)) / e;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
const v = {
|
|
70
|
+
calculatedDuration: q && S || null,
|
|
71
|
+
next: (e) => {
|
|
72
|
+
const r = g(e);
|
|
73
|
+
if (q)
|
|
74
|
+
d.done = e >= S;
|
|
75
|
+
else {
|
|
76
|
+
let l = e === 0 ? p : 0;
|
|
77
|
+
o < 1 && (l = e === 0 ? k(p) : O(g, e, r));
|
|
78
|
+
const y = Math.abs(l) <= u, A = Math.abs(f - r) <= m;
|
|
79
|
+
d.done = y && A;
|
|
80
|
+
}
|
|
81
|
+
return d.value = d.done ? f : r, d;
|
|
82
|
+
},
|
|
83
|
+
toString: () => {
|
|
84
|
+
const e = Math.min(B(v), E), r = w((l) => v.next(e * l).value, e, 30);
|
|
85
|
+
return e + "ms " + r;
|
|
86
|
+
},
|
|
87
|
+
toTransition: () => {
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
return v;
|
|
91
|
+
}
|
|
92
|
+
x.applyToOptions = (t) => {
|
|
93
|
+
const n = K(t, 100, x);
|
|
94
|
+
return t.ease = n.ease, t.duration = k(n.duration), t.type = "keyframes", t;
|
|
95
|
+
};
|
|
96
|
+
export {
|
|
97
|
+
x as spring
|
|
98
|
+
};
|
package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { calcGeneratorDuration as i, maxGeneratorDuration as m } from "./calc-duration.js";
|
|
2
|
+
import { millisecondsToSeconds as s } from "../../../../../../motion-utils/dist/es/time-conversion.js";
|
|
3
|
+
function f(n, r = 100, o) {
|
|
4
|
+
const e = o({ ...n, keyframes: [0, r] }), t = Math.min(i(e), m);
|
|
5
|
+
return {
|
|
6
|
+
type: "keyframes",
|
|
7
|
+
ease: (a) => e.next(t * a).value / r,
|
|
8
|
+
duration: s(t)
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
f as createGeneratorEasing
|
|
13
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AsyncMotionValueAnimation as A } from "../AsyncMotionValueAnimation.js";
|
|
2
|
+
import { JSAnimation as k } from "../JSAnimation.js";
|
|
3
|
+
import { getValueTransition as D } from "../utils/get-value-transition.js";
|
|
4
|
+
import { makeAnimationInstant as d } from "../utils/make-animation-instant.js";
|
|
5
|
+
import { getDefaultTransition as g } from "../utils/default-transitions.js";
|
|
6
|
+
import { getFinalKeyframe as C } from "../utils/get-final-keyframe.js";
|
|
7
|
+
import { isTransitionDefined as T } from "../utils/is-transition-defined.js";
|
|
8
|
+
import { frame as V } from "../../frameloop/frame.js";
|
|
9
|
+
import { secondsToMilliseconds as l } from "../../../../../motion-utils/dist/es/time-conversion.js";
|
|
10
|
+
import { MotionGlobalConfig as y } from "../../../../../motion-utils/dist/es/global-config.js";
|
|
11
|
+
const x = (a, t, r, m = {}, n, p) => (u) => {
|
|
12
|
+
const o = D(m, a) || {}, c = o.delay || m.delay || 0;
|
|
13
|
+
let { elapsed: s = 0 } = m;
|
|
14
|
+
s = s - l(c);
|
|
15
|
+
const e = {
|
|
16
|
+
keyframes: Array.isArray(r) ? r : [null, r],
|
|
17
|
+
ease: "easeOut",
|
|
18
|
+
velocity: t.getVelocity(),
|
|
19
|
+
...o,
|
|
20
|
+
delay: -s,
|
|
21
|
+
onUpdate: (i) => {
|
|
22
|
+
t.set(i), o.onUpdate && o.onUpdate(i);
|
|
23
|
+
},
|
|
24
|
+
onComplete: () => {
|
|
25
|
+
u(), o.onComplete && o.onComplete();
|
|
26
|
+
},
|
|
27
|
+
name: a,
|
|
28
|
+
motionValue: t,
|
|
29
|
+
element: p ? void 0 : n
|
|
30
|
+
};
|
|
31
|
+
T(o) || Object.assign(e, g(a, e)), e.duration && (e.duration = l(e.duration)), e.repeatDelay && (e.repeatDelay = l(e.repeatDelay)), e.from !== void 0 && (e.keyframes[0] = e.from);
|
|
32
|
+
let f = !1;
|
|
33
|
+
if ((e.type === !1 || e.duration === 0 && !e.repeatDelay) && (d(e), e.delay === 0 && (f = !0)), (y.instantAnimations || y.skipAnimations || n != null && n.shouldSkipAnimations) && (f = !0, d(e), e.delay = 0), e.allowFlatten = !o.type && !o.ease, f && !p && t.get() !== void 0) {
|
|
34
|
+
const i = C(e.keyframes, o);
|
|
35
|
+
if (i !== void 0) {
|
|
36
|
+
V.update(() => {
|
|
37
|
+
e.onUpdate(i), e.onComplete();
|
|
38
|
+
});
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return o.isSync ? new k(e) : new A(e);
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
x as animateMotionValue
|
|
46
|
+
};
|