@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,28 @@
|
|
|
1
|
+
import { Feature as i } from "../../../../motion-dom/dist/es/render/Feature.js";
|
|
2
|
+
import { pipe as s } from "../../../../motion-utils/dist/es/pipe.js";
|
|
3
|
+
import { addDomEvent as e } from "../../../../motion-dom/dist/es/events/add-dom-event.js";
|
|
4
|
+
class a extends i {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments), this.isActive = !1;
|
|
7
|
+
}
|
|
8
|
+
onFocus() {
|
|
9
|
+
let t = !1;
|
|
10
|
+
try {
|
|
11
|
+
t = this.node.current.matches(":focus-visible");
|
|
12
|
+
} catch {
|
|
13
|
+
t = !0;
|
|
14
|
+
}
|
|
15
|
+
!t || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
|
|
16
|
+
}
|
|
17
|
+
onBlur() {
|
|
18
|
+
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
19
|
+
}
|
|
20
|
+
mount() {
|
|
21
|
+
this.unmount = s(e(this.node.current, "focus", () => this.onFocus()), e(this.node.current, "blur", () => this.onBlur()));
|
|
22
|
+
}
|
|
23
|
+
unmount() {
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
a as FocusGesture
|
|
28
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { extractEventInfo as m } from "../events/event-info.js";
|
|
2
|
+
import { Feature as s } from "../../../../motion-dom/dist/es/render/Feature.js";
|
|
3
|
+
import { hover as u } from "../../../../motion-dom/dist/es/gestures/hover.js";
|
|
4
|
+
import { frame as c } from "../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
5
|
+
function a(e, t, r) {
|
|
6
|
+
const { props: o } = e;
|
|
7
|
+
e.animationState && o.whileHover && e.animationState.setActive("whileHover", r === "Start");
|
|
8
|
+
const n = "onHover" + r, i = o[n];
|
|
9
|
+
i && c.postRender(() => i(t, m(t)));
|
|
10
|
+
}
|
|
11
|
+
class d extends s {
|
|
12
|
+
mount() {
|
|
13
|
+
const { current: t } = this.node;
|
|
14
|
+
t && (this.unmount = u(t, (r, o) => (a(this.node, o, "Start"), (n) => a(this.node, n, "End"))));
|
|
15
|
+
}
|
|
16
|
+
unmount() {
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
d as HoverGesture
|
|
21
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { addPointerEvent as v } from "../../events/add-pointer-event.js";
|
|
2
|
+
import { extractEventInfo as W } from "../../events/event-info.js";
|
|
3
|
+
import { distance2D as D } from "../../utils/distance.js";
|
|
4
|
+
import { frameData as P, frame as x, cancelFrame as k } from "../../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
5
|
+
import { isPrimaryPointer as U } from "../../../../../motion-dom/dist/es/gestures/utils/is-primary-pointer.js";
|
|
6
|
+
import { pipe as X } from "../../../../../motion-utils/dist/es/pipe.js";
|
|
7
|
+
import { secondsToMilliseconds as Y, millisecondsToSeconds as O } from "../../../../../motion-utils/dist/es/time-conversion.js";
|
|
8
|
+
const S = /* @__PURE__ */ new Set(["auto", "scroll"]);
|
|
9
|
+
class B {
|
|
10
|
+
constructor(t, i, { transformPagePoint: s, contextWindow: r = window, dragSnapToOrigin: o = !1, distanceThreshold: l = 3, element: p } = {}) {
|
|
11
|
+
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.removeScrollListeners = null, this.onElementScroll = (e) => {
|
|
12
|
+
this.handleScroll(e.target);
|
|
13
|
+
}, this.onWindowScroll = () => {
|
|
14
|
+
this.handleScroll(window);
|
|
15
|
+
}, this.updatePoint = () => {
|
|
16
|
+
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
17
|
+
return;
|
|
18
|
+
const e = u(this.lastMoveEventInfo, this.history), h = this.startEvent !== null, c = D(e.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
|
|
19
|
+
if (!h && !c)
|
|
20
|
+
return;
|
|
21
|
+
const { point: d } = e, { timestamp: f } = P;
|
|
22
|
+
this.history.push({ ...d, timestamp: f });
|
|
23
|
+
const { onStart: a, onMove: E } = this.handlers;
|
|
24
|
+
h || (a && a(this.lastMoveEvent, e), this.startEvent = this.lastMoveEvent), E && E(this.lastMoveEvent, e);
|
|
25
|
+
}, this.handlePointerMove = (e, h) => {
|
|
26
|
+
this.lastMoveEvent = e, this.lastMoveEventInfo = m(h, this.transformPagePoint), x.update(this.updatePoint, !0);
|
|
27
|
+
}, this.handlePointerUp = (e, h) => {
|
|
28
|
+
this.end();
|
|
29
|
+
const { onEnd: c, onSessionEnd: d, resumeAnimation: f } = this.handlers;
|
|
30
|
+
if ((this.dragSnapToOrigin || !this.startEvent) && f && f(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
31
|
+
return;
|
|
32
|
+
const a = u(e.type === "pointercancel" ? this.lastMoveEventInfo : m(h, this.transformPagePoint), this.history);
|
|
33
|
+
this.startEvent && c && c(e, a), d && d(e, a);
|
|
34
|
+
}, !U(t))
|
|
35
|
+
return;
|
|
36
|
+
this.dragSnapToOrigin = o, this.handlers = i, this.transformPagePoint = s, this.distanceThreshold = l, this.contextWindow = r || window;
|
|
37
|
+
const g = W(t), w = m(g, this.transformPagePoint), { point: L } = w, { timestamp: T } = P;
|
|
38
|
+
this.history = [{ ...L, timestamp: T }];
|
|
39
|
+
const { onSessionStart: y } = i;
|
|
40
|
+
y && y(t, u(w, this.history)), this.removeListeners = X(v(this.contextWindow, "pointermove", this.handlePointerMove), v(this.contextWindow, "pointerup", this.handlePointerUp), v(this.contextWindow, "pointercancel", this.handlePointerUp)), p && this.startScrollTracking(p);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Start tracking scroll on ancestors and window.
|
|
44
|
+
*/
|
|
45
|
+
startScrollTracking(t) {
|
|
46
|
+
let i = t.parentElement;
|
|
47
|
+
for (; i; ) {
|
|
48
|
+
const s = getComputedStyle(i);
|
|
49
|
+
(S.has(s.overflowX) || S.has(s.overflowY)) && this.scrollPositions.set(i, {
|
|
50
|
+
x: i.scrollLeft,
|
|
51
|
+
y: i.scrollTop
|
|
52
|
+
}), i = i.parentElement;
|
|
53
|
+
}
|
|
54
|
+
this.scrollPositions.set(window, {
|
|
55
|
+
x: window.scrollX,
|
|
56
|
+
y: window.scrollY
|
|
57
|
+
}), window.addEventListener("scroll", this.onElementScroll, {
|
|
58
|
+
capture: !0,
|
|
59
|
+
passive: !0
|
|
60
|
+
}), window.addEventListener("scroll", this.onWindowScroll, {
|
|
61
|
+
passive: !0
|
|
62
|
+
}), this.removeScrollListeners = () => {
|
|
63
|
+
window.removeEventListener("scroll", this.onElementScroll, {
|
|
64
|
+
capture: !0
|
|
65
|
+
}), window.removeEventListener("scroll", this.onWindowScroll);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Handle scroll compensation during drag.
|
|
70
|
+
*
|
|
71
|
+
* For element scroll: adjusts history origin since pageX/pageY doesn't change.
|
|
72
|
+
* For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change.
|
|
73
|
+
*/
|
|
74
|
+
handleScroll(t) {
|
|
75
|
+
const i = this.scrollPositions.get(t);
|
|
76
|
+
if (!i)
|
|
77
|
+
return;
|
|
78
|
+
const s = t === window, r = s ? { x: window.scrollX, y: window.scrollY } : {
|
|
79
|
+
x: t.scrollLeft,
|
|
80
|
+
y: t.scrollTop
|
|
81
|
+
}, o = { x: r.x - i.x, y: r.y - i.y };
|
|
82
|
+
o.x === 0 && o.y === 0 || (s ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += o.x, this.lastMoveEventInfo.point.y += o.y) : this.history.length > 0 && (this.history[0].x -= o.x, this.history[0].y -= o.y), this.scrollPositions.set(t, r), x.update(this.updatePoint, !0));
|
|
83
|
+
}
|
|
84
|
+
updateHandlers(t) {
|
|
85
|
+
this.handlers = t;
|
|
86
|
+
}
|
|
87
|
+
end() {
|
|
88
|
+
this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), k(this.updatePoint);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function m(n, t) {
|
|
92
|
+
return t ? { point: t(n.point) } : n;
|
|
93
|
+
}
|
|
94
|
+
function M(n, t) {
|
|
95
|
+
return { x: n.x - t.x, y: n.y - t.y };
|
|
96
|
+
}
|
|
97
|
+
function u({ point: n }, t) {
|
|
98
|
+
return {
|
|
99
|
+
point: n,
|
|
100
|
+
delta: M(n, I(t)),
|
|
101
|
+
offset: M(n, V(t)),
|
|
102
|
+
velocity: b(t, 0.1)
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function V(n) {
|
|
106
|
+
return n[0];
|
|
107
|
+
}
|
|
108
|
+
function I(n) {
|
|
109
|
+
return n[n.length - 1];
|
|
110
|
+
}
|
|
111
|
+
function b(n, t) {
|
|
112
|
+
if (n.length < 2)
|
|
113
|
+
return { x: 0, y: 0 };
|
|
114
|
+
let i = n.length - 1, s = null;
|
|
115
|
+
const r = I(n);
|
|
116
|
+
for (; i >= 0 && (s = n[i], !(r.timestamp - s.timestamp > Y(t))); )
|
|
117
|
+
i--;
|
|
118
|
+
if (!s)
|
|
119
|
+
return { x: 0, y: 0 };
|
|
120
|
+
const o = O(r.timestamp - s.timestamp);
|
|
121
|
+
if (o === 0)
|
|
122
|
+
return { x: 0, y: 0 };
|
|
123
|
+
const l = {
|
|
124
|
+
x: (r.x - s.x) / o,
|
|
125
|
+
y: (r.y - s.y) / o
|
|
126
|
+
};
|
|
127
|
+
return l.x === 1 / 0 && (l.x = 0), l.y === 1 / 0 && (l.y = 0), l;
|
|
128
|
+
}
|
|
129
|
+
export {
|
|
130
|
+
B as PanSession
|
|
131
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { addPointerEvent as m } from "../../events/add-pointer-event.js";
|
|
2
|
+
import { getContextWindow as P } from "../../utils/get-context-window.js";
|
|
3
|
+
import { PanSession as h } from "./PanSession.js";
|
|
4
|
+
import { Feature as p } from "../../../../../motion-dom/dist/es/render/Feature.js";
|
|
5
|
+
import { noop as u } from "../../../../../motion-utils/dist/es/noop.js";
|
|
6
|
+
import { frame as r } from "../../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
7
|
+
const s = (e) => (n, o) => {
|
|
8
|
+
e && r.postRender(() => e(n, o));
|
|
9
|
+
};
|
|
10
|
+
class v extends p {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments), this.removePointerDownListener = u;
|
|
13
|
+
}
|
|
14
|
+
onPointerDown(n) {
|
|
15
|
+
this.session = new h(n, this.createPanHandlers(), {
|
|
16
|
+
transformPagePoint: this.node.getTransformPagePoint(),
|
|
17
|
+
contextWindow: P(this.node)
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
createPanHandlers() {
|
|
21
|
+
const { onPanSessionStart: n, onPanStart: o, onPan: i, onPanEnd: t } = this.node.getProps();
|
|
22
|
+
return {
|
|
23
|
+
onSessionStart: s(n),
|
|
24
|
+
onStart: s(o),
|
|
25
|
+
onMove: i,
|
|
26
|
+
onEnd: (a, d) => {
|
|
27
|
+
delete this.session, t && r.postRender(() => t(a, d));
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
mount() {
|
|
32
|
+
this.removePointerDownListener = m(this.node.current, "pointerdown", (n) => this.onPointerDown(n));
|
|
33
|
+
}
|
|
34
|
+
update() {
|
|
35
|
+
this.session && this.session.updateHandlers(this.createPanHandlers());
|
|
36
|
+
}
|
|
37
|
+
unmount() {
|
|
38
|
+
this.removePointerDownListener(), this.session && this.session.end();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
v as PanGesture
|
|
43
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { extractEventInfo as i } from "../events/event-info.js";
|
|
2
|
+
import { Feature as m } from "../../../../motion-dom/dist/es/render/Feature.js";
|
|
3
|
+
import { press as u } from "../../../../motion-dom/dist/es/gestures/press/index.js";
|
|
4
|
+
import { frame as p } from "../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
5
|
+
function s(t, e, n) {
|
|
6
|
+
const { props: r } = t;
|
|
7
|
+
if (t.current instanceof HTMLButtonElement && t.current.disabled)
|
|
8
|
+
return;
|
|
9
|
+
t.animationState && r.whileTap && t.animationState.setActive("whileTap", n === "Start");
|
|
10
|
+
const a = "onTap" + (n === "End" ? "" : n), o = r[a];
|
|
11
|
+
o && p.postRender(() => o(e, i(e)));
|
|
12
|
+
}
|
|
13
|
+
class d extends m {
|
|
14
|
+
mount() {
|
|
15
|
+
const { current: e } = this.node;
|
|
16
|
+
e && (this.unmount = u(e, (n, r) => (s(this.node, r, "Start"), (a, { success: o }) => s(this.node, a, o ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
|
|
17
|
+
}
|
|
18
|
+
unmount() {
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
d as PressGesture
|
|
23
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Feature as s } from "../../../../../../motion-dom/dist/es/render/Feature.js";
|
|
2
|
+
let o = 0;
|
|
3
|
+
class d extends s {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments), this.id = o++;
|
|
6
|
+
}
|
|
7
|
+
update() {
|
|
8
|
+
if (!this.node.presenceContext)
|
|
9
|
+
return;
|
|
10
|
+
const { isPresent: t, onExitComplete: e } = this.node.presenceContext, { isPresent: n } = this.node.prevPresenceContext || {};
|
|
11
|
+
if (!this.node.animationState || t === n)
|
|
12
|
+
return;
|
|
13
|
+
const i = this.node.animationState.setActive("exit", !t);
|
|
14
|
+
e && !t && i.then(() => {
|
|
15
|
+
e(this.id);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
mount() {
|
|
19
|
+
const { register: t, onExitComplete: e } = this.node.presenceContext || {};
|
|
20
|
+
e && e(this.id), t && (this.unmount = t(this.id));
|
|
21
|
+
}
|
|
22
|
+
unmount() {
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
d as ExitAnimationFeature
|
|
27
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Feature as o } from "../../../../../../motion-dom/dist/es/render/Feature.js";
|
|
2
|
+
import { createAnimationState as i } from "../../../../../../motion-dom/dist/es/render/utils/animation-state.js";
|
|
3
|
+
import { isAnimationControls as s } from "../../../../../../motion-dom/dist/es/render/utils/is-animation-controls.js";
|
|
4
|
+
class u extends o {
|
|
5
|
+
/**
|
|
6
|
+
* We dynamically generate the AnimationState manager as it contains a reference
|
|
7
|
+
* to the underlying animation library. We only want to load that if we load this,
|
|
8
|
+
* so people can optionally code split it out using the `m` component.
|
|
9
|
+
*/
|
|
10
|
+
constructor(t) {
|
|
11
|
+
super(t), t.animationState || (t.animationState = i(t));
|
|
12
|
+
}
|
|
13
|
+
updateAnimationControlsSubscription() {
|
|
14
|
+
const { animate: t } = this.node.getProps();
|
|
15
|
+
s(t) && (this.unmountControls = t.subscribe(this.node));
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Subscribe any provided AnimationControls to the component's VisualElement
|
|
19
|
+
*/
|
|
20
|
+
mount() {
|
|
21
|
+
this.updateAnimationControlsSubscription();
|
|
22
|
+
}
|
|
23
|
+
update() {
|
|
24
|
+
const { animate: t } = this.node.getProps(), { animate: n } = this.node.prevProps || {};
|
|
25
|
+
t !== n && this.updateAnimationControlsSubscription();
|
|
26
|
+
}
|
|
27
|
+
unmount() {
|
|
28
|
+
var t;
|
|
29
|
+
this.node.animationState.reset(), (t = this.unmountControls) == null || t.call(this);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
u as AnimationFeature
|
|
34
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { getFeatureDefinitions as r, setFeatureDefinitions as s } from "../../../../../motion-dom/dist/es/render/VisualElement.js";
|
|
2
|
+
const n = {
|
|
3
|
+
animation: [
|
|
4
|
+
"animate",
|
|
5
|
+
"variants",
|
|
6
|
+
"whileHover",
|
|
7
|
+
"whileTap",
|
|
8
|
+
"exit",
|
|
9
|
+
"whileInView",
|
|
10
|
+
"whileFocus",
|
|
11
|
+
"whileDrag"
|
|
12
|
+
],
|
|
13
|
+
exit: ["exit"],
|
|
14
|
+
drag: ["drag", "dragControls"],
|
|
15
|
+
focus: ["whileFocus"],
|
|
16
|
+
hover: ["whileHover", "onHoverStart", "onHoverEnd"],
|
|
17
|
+
tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
|
|
18
|
+
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
19
|
+
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
20
|
+
layout: ["layout", "layoutId"]
|
|
21
|
+
};
|
|
22
|
+
let t = !1;
|
|
23
|
+
function l() {
|
|
24
|
+
if (t)
|
|
25
|
+
return;
|
|
26
|
+
const e = {};
|
|
27
|
+
for (const i in n)
|
|
28
|
+
e[i] = {
|
|
29
|
+
isEnabled: (o) => n[i].some((a) => !!o[a])
|
|
30
|
+
};
|
|
31
|
+
s(e), t = !0;
|
|
32
|
+
}
|
|
33
|
+
function w() {
|
|
34
|
+
return l(), r();
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
w as getInitializedFeatureDefinitions,
|
|
38
|
+
l as initFeatureDefinitions
|
|
39
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DragGesture as r } from "../../gestures/drag/index.js";
|
|
2
|
+
import { PanGesture as o } from "../../gestures/pan/index.js";
|
|
3
|
+
import { MeasureLayout as e } from "./layout/MeasureLayout.js";
|
|
4
|
+
import { HTMLProjectionNode as t } from "../../../../../motion-dom/dist/es/projection/node/HTMLProjectionNode.js";
|
|
5
|
+
const u = {
|
|
6
|
+
pan: {
|
|
7
|
+
Feature: o
|
|
8
|
+
},
|
|
9
|
+
drag: {
|
|
10
|
+
Feature: r,
|
|
11
|
+
ProjectionNode: t,
|
|
12
|
+
MeasureLayout: e
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
u as drag
|
|
17
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HoverGesture as e } from "../../gestures/hover.js";
|
|
2
|
+
import { FocusGesture as r } from "../../gestures/focus.js";
|
|
3
|
+
import { PressGesture as t } from "../../gestures/press.js";
|
|
4
|
+
import { InViewFeature as o } from "./viewport/index.js";
|
|
5
|
+
const a = {
|
|
6
|
+
inView: {
|
|
7
|
+
Feature: o
|
|
8
|
+
},
|
|
9
|
+
tap: {
|
|
10
|
+
Feature: t
|
|
11
|
+
},
|
|
12
|
+
focus: {
|
|
13
|
+
Feature: r
|
|
14
|
+
},
|
|
15
|
+
hover: {
|
|
16
|
+
Feature: e
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
a as gestureAnimations
|
|
21
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as u, Component as l } from "react";
|
|
3
|
+
import { usePresence as f } from "../../../components/AnimatePresence/use-presence.js";
|
|
4
|
+
import { LayoutGroupContext as c } from "../../../context/LayoutGroupContext.js";
|
|
5
|
+
import { SwitchLayoutGroupContext as d } from "../../../context/SwitchLayoutGroupContext.js";
|
|
6
|
+
import { globalProjectionState as h } from "../../../../../../motion-dom/dist/es/projection/node/state.js";
|
|
7
|
+
import { frame as y } from "../../../../../../motion-dom/dist/es/frameloop/frame.js";
|
|
8
|
+
import { microtask as g } from "../../../../../../motion-dom/dist/es/frameloop/microtask.js";
|
|
9
|
+
let i = !1;
|
|
10
|
+
class v extends l {
|
|
11
|
+
/**
|
|
12
|
+
* This only mounts projection nodes for components that
|
|
13
|
+
* need measuring, we might want to do it for all components
|
|
14
|
+
* in order to incorporate transforms
|
|
15
|
+
*/
|
|
16
|
+
componentDidMount() {
|
|
17
|
+
const { visualElement: e, layoutGroup: t, switchLayoutGroup: n, layoutId: s } = this.props, { projection: o } = e;
|
|
18
|
+
o && (t.group && t.group.add(o), n && n.register && s && n.register(o), i && o.root.didUpdate(), o.addEventListener("animationComplete", () => {
|
|
19
|
+
this.safeToRemove();
|
|
20
|
+
}), o.setOptions({
|
|
21
|
+
...o.options,
|
|
22
|
+
layoutDependency: this.props.layoutDependency,
|
|
23
|
+
onExitComplete: () => this.safeToRemove()
|
|
24
|
+
})), h.hasEverUpdated = !0;
|
|
25
|
+
}
|
|
26
|
+
getSnapshotBeforeUpdate(e) {
|
|
27
|
+
const { layoutDependency: t, visualElement: n, drag: s, isPresent: o } = this.props, { projection: r } = n;
|
|
28
|
+
return r && (r.isPresent = o, e.layoutDependency !== t && r.setOptions({
|
|
29
|
+
...r.options,
|
|
30
|
+
layoutDependency: t
|
|
31
|
+
}), i = !0, s || e.layoutDependency !== t || t === void 0 || e.isPresent !== o ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || y.postRender(() => {
|
|
32
|
+
const p = r.getStack();
|
|
33
|
+
(!p || !p.members.length) && this.safeToRemove();
|
|
34
|
+
}))), null;
|
|
35
|
+
}
|
|
36
|
+
componentDidUpdate() {
|
|
37
|
+
const { projection: e } = this.props.visualElement;
|
|
38
|
+
e && (e.root.didUpdate(), g.postRender(() => {
|
|
39
|
+
!e.currentAnimation && e.isLead() && this.safeToRemove();
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
componentWillUnmount() {
|
|
43
|
+
const { visualElement: e, layoutGroup: t, switchLayoutGroup: n } = this.props, { projection: s } = e;
|
|
44
|
+
i = !0, s && (s.scheduleCheckAfterUnmount(), t && t.group && t.group.remove(s), n && n.deregister && n.deregister(s));
|
|
45
|
+
}
|
|
46
|
+
safeToRemove() {
|
|
47
|
+
const { safeToRemove: e } = this.props;
|
|
48
|
+
e && e();
|
|
49
|
+
}
|
|
50
|
+
render() {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function E(a) {
|
|
55
|
+
const [e, t] = f(), n = u(c);
|
|
56
|
+
return m(v, { ...a, layoutGroup: n, switchLayoutGroup: u(d), isPresent: e, safeToRemove: t });
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
E as MeasureLayout
|
|
60
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MeasureLayout as o } from "./layout/MeasureLayout.js";
|
|
2
|
+
import { HTMLProjectionNode as t } from "../../../../../motion-dom/dist/es/projection/node/HTMLProjectionNode.js";
|
|
3
|
+
const a = {
|
|
4
|
+
layout: {
|
|
5
|
+
ProjectionNode: t,
|
|
6
|
+
MeasureLayout: o
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
a as layout
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getInitializedFeatureDefinitions as o } from "./definitions.js";
|
|
2
|
+
import { setFeatureDefinitions as n } from "../../../../../motion-dom/dist/es/render/VisualElement.js";
|
|
3
|
+
function s(e) {
|
|
4
|
+
const i = o();
|
|
5
|
+
for (const t in e)
|
|
6
|
+
i[t] = {
|
|
7
|
+
...i[t],
|
|
8
|
+
...e[t]
|
|
9
|
+
};
|
|
10
|
+
n(i);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
s as loadFeatures
|
|
14
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { observeIntersection as m } from "./observers.js";
|
|
2
|
+
import { Feature as f } from "../../../../../../motion-dom/dist/es/render/Feature.js";
|
|
3
|
+
const w = {
|
|
4
|
+
some: 0,
|
|
5
|
+
all: 1
|
|
6
|
+
};
|
|
7
|
+
class v extends f {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
10
|
+
}
|
|
11
|
+
startObserver() {
|
|
12
|
+
this.unmount();
|
|
13
|
+
const { viewport: n = {} } = this.node.getProps(), { root: t, margin: r, amount: s = "some", once: h } = n, u = {
|
|
14
|
+
root: t ? t.current : void 0,
|
|
15
|
+
rootMargin: r,
|
|
16
|
+
threshold: typeof s == "number" ? s : w[s]
|
|
17
|
+
}, c = (i) => {
|
|
18
|
+
const { isIntersecting: e } = i;
|
|
19
|
+
if (this.isInView === e || (this.isInView = e, h && !e && this.hasEnteredView))
|
|
20
|
+
return;
|
|
21
|
+
e && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", e);
|
|
22
|
+
const { onViewportEnter: p, onViewportLeave: d } = this.node.getProps(), a = e ? p : d;
|
|
23
|
+
a && a(i);
|
|
24
|
+
};
|
|
25
|
+
return m(this.node.current, u, c);
|
|
26
|
+
}
|
|
27
|
+
mount() {
|
|
28
|
+
this.startObserver();
|
|
29
|
+
}
|
|
30
|
+
update() {
|
|
31
|
+
if (typeof IntersectionObserver > "u")
|
|
32
|
+
return;
|
|
33
|
+
const { props: n, prevProps: t } = this.node;
|
|
34
|
+
["amount", "margin", "root"].some(l(n, t)) && this.startObserver();
|
|
35
|
+
}
|
|
36
|
+
unmount() {
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function l({ viewport: o = {} }, { viewport: n = {} } = {}) {
|
|
40
|
+
return (t) => o[t] !== n[t];
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
v as InViewFeature
|
|
44
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const c = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), a = (e) => {
|
|
2
|
+
const r = c.get(e.target);
|
|
3
|
+
r && r(e);
|
|
4
|
+
}, b = (e) => {
|
|
5
|
+
e.forEach(a);
|
|
6
|
+
};
|
|
7
|
+
function i({ root: e, ...r }) {
|
|
8
|
+
const t = e || document;
|
|
9
|
+
n.has(t) || n.set(t, {});
|
|
10
|
+
const s = n.get(t), o = JSON.stringify(r);
|
|
11
|
+
return s[o] || (s[o] = new IntersectionObserver(b, { root: e, ...r })), s[o];
|
|
12
|
+
}
|
|
13
|
+
function v(e, r, t) {
|
|
14
|
+
const s = i(r);
|
|
15
|
+
return c.set(e, t), s.observe(e), () => {
|
|
16
|
+
c.delete(e), s.unobserve(e);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
v as observeIntersection
|
|
21
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsxs as S, jsx as x } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as E, useContext as l } from "react";
|
|
3
|
+
import { LayoutGroupContext as g } from "../context/LayoutGroupContext.js";
|
|
4
|
+
import { LazyContext as L } from "../context/LazyContext.js";
|
|
5
|
+
import { MotionConfigContext as V } from "../context/MotionConfigContext.js";
|
|
6
|
+
import { MotionContext as j } from "../context/MotionContext/index.js";
|
|
7
|
+
import { useCreateMotionContext as N } from "../context/MotionContext/create.js";
|
|
8
|
+
import { useRender as P } from "../render/dom/use-render.js";
|
|
9
|
+
import { isSVGComponent as w } from "../render/dom/utils/is-svg-component.js";
|
|
10
|
+
import { useHTMLVisualState as C } from "../render/html/use-html-visual-state.js";
|
|
11
|
+
import { useSVGVisualState as b } from "../render/svg/use-svg-visual-state.js";
|
|
12
|
+
import { isBrowser as h } from "../utils/is-browser.js";
|
|
13
|
+
import { getInitializedFeatureDefinitions as z } from "./features/definitions.js";
|
|
14
|
+
import { loadFeatures as G } from "./features/load-features.js";
|
|
15
|
+
import { motionComponentSymbol as D } from "./utils/symbol.js";
|
|
16
|
+
import { useMotionRef as R } from "./utils/use-motion-ref.js";
|
|
17
|
+
import { useVisualElement as I } from "./utils/use-visual-element.js";
|
|
18
|
+
import { warning as k, invariant as F } from "../../../../motion-utils/dist/es/errors.js";
|
|
19
|
+
function rt(t, { forwardMotionProps: i = !1, type: e } = {}, o, a) {
|
|
20
|
+
o && G(o);
|
|
21
|
+
const m = e ? e === "svg" : w(t), y = m ? b : C;
|
|
22
|
+
function d(n, v) {
|
|
23
|
+
let u;
|
|
24
|
+
const r = {
|
|
25
|
+
...l(V),
|
|
26
|
+
...n,
|
|
27
|
+
layoutId: O(n)
|
|
28
|
+
}, { isStatic: c } = r, s = N(n), f = y(n, c);
|
|
29
|
+
if (!c && h) {
|
|
30
|
+
T(r, o);
|
|
31
|
+
const M = $(r);
|
|
32
|
+
u = M.MeasureLayout, s.visualElement = I(t, f, r, a, M.ProjectionNode, m);
|
|
33
|
+
}
|
|
34
|
+
return S(j.Provider, { value: s, children: [u && s.visualElement ? x(u, { visualElement: s.visualElement, ...r }) : null, P(t, n, R(f, s.visualElement, v), f, c, i, m)] });
|
|
35
|
+
}
|
|
36
|
+
d.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
|
|
37
|
+
const p = E(d);
|
|
38
|
+
return p[D] = t, p;
|
|
39
|
+
}
|
|
40
|
+
function O({ layoutId: t }) {
|
|
41
|
+
const i = l(g).id;
|
|
42
|
+
return i && t !== void 0 ? i + "-" + t : t;
|
|
43
|
+
}
|
|
44
|
+
function T(t, i) {
|
|
45
|
+
const e = l(L).strict;
|
|
46
|
+
if (process.env.NODE_ENV !== "production" && i && e) {
|
|
47
|
+
const o = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
48
|
+
t.ignoreStrict ? k(!1, o, "lazy-strict-mode") : F(!1, o, "lazy-strict-mode");
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function $(t) {
|
|
52
|
+
const i = z(), { drag: e, layout: o } = i;
|
|
53
|
+
if (!e && !o)
|
|
54
|
+
return {};
|
|
55
|
+
const a = { ...e, ...o };
|
|
56
|
+
return {
|
|
57
|
+
MeasureLayout: e != null && e.isEnabled(t) || o != null && o.isEnabled(t) ? a.MeasureLayout : void 0,
|
|
58
|
+
ProjectionNode: a.ProjectionNode
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
rt as createMotionComponent
|
|
63
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useRef as C, useInsertionEffect as y, useCallback as M } from "react";
|
|
2
|
+
function b(n, f, e) {
|
|
3
|
+
const c = C(e);
|
|
4
|
+
y(() => {
|
|
5
|
+
c.current = e;
|
|
6
|
+
});
|
|
7
|
+
const u = C(null);
|
|
8
|
+
return M((r) => {
|
|
9
|
+
var t;
|
|
10
|
+
r && ((t = n.onMount) == null || t.call(n, r)), f && (r ? f.mount(r) : f.unmount());
|
|
11
|
+
const o = c.current;
|
|
12
|
+
if (typeof o == "function")
|
|
13
|
+
if (r) {
|
|
14
|
+
const p = o(r);
|
|
15
|
+
typeof p == "function" && (u.current = p);
|
|
16
|
+
} else u.current ? (u.current(), u.current = null) : o(r);
|
|
17
|
+
else o && (o.current = r);
|
|
18
|
+
}, [f]);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
b as useMotionRef
|
|
22
|
+
};
|