@code0-tech/pictor 1.1.0 → 1.1.1
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/_virtual/rolldown_runtime.js +3 -12
- package/dist/components/alert/Alert.js +19 -20
- package/dist/components/aurora/Aurora.js +15 -16
- package/dist/components/avatar/Avatar.js +44 -44
- package/dist/components/badge/Badge.js +36 -37
- package/dist/components/button/Button.js +16 -17
- package/dist/components/button-group/ButtonGroup.js +15 -16
- package/dist/components/card/Card.js +21 -22
- package/dist/components/card/CardSection.js +15 -15
- package/dist/components/chart/Chart.js +82 -82
- package/dist/components/chart/LineChart.js +50 -51
- package/dist/components/col/Col.js +9 -10
- package/dist/components/command/Command.js +32 -33
- package/dist/components/container/Container.js +9 -10
- package/dist/components/context-menu/ContextMenu.js +76 -77
- package/dist/components/data-table/DataTableColumn.js +9 -10
- package/dist/components/data-table/DataTableFilterInput.js +83 -83
- package/dist/components/data-table/DataTableFilterSuggestionMenu.js +26 -27
- package/dist/components/data-table/DataTableHeader.js +20 -21
- package/dist/components/data-table/DataTablePagination.js +27 -28
- package/dist/components/dialog/Dialog.js +61 -62
- package/dist/components/file-tabs/FileTabs.js +51 -52
- package/dist/components/flex/Flex.js +9 -10
- package/dist/components/form/CheckboxInput.js +50 -51
- package/dist/components/form/ColorInput.js +242 -242
- package/dist/components/form/DateInput.js +55 -55
- package/dist/components/form/EditorInput.js +300 -300
- package/dist/components/form/FileInput.js +67 -68
- package/dist/components/form/InputDescription.js +3 -4
- package/dist/components/form/InputLabel.js +9 -10
- package/dist/components/form/InputMessage.js +6 -7
- package/dist/components/form/InputWrapper.js +37 -38
- package/dist/components/form/PasswordInput.js +2 -2
- package/dist/components/form/PinInput.js +30 -31
- package/dist/components/form/RadioGroup.js +22 -23
- package/dist/components/form/RadioInput.js +19 -20
- package/dist/components/form/SelectInput.js +55 -56
- package/dist/components/form/TagInput.js +44 -44
- package/dist/components/fullscreen/FullScreen.js +14 -15
- package/dist/components/gantt/Gantt.js +63 -64
- package/dist/components/gantt/GanttGroup.js +2 -2
- package/dist/components/gantt/GanttHeader.js +40 -41
- package/dist/components/gantt/GanttItem.js +11 -12
- package/dist/components/icon/Icon.js +22 -22
- package/dist/components/json-view/JsonView.js +37 -38
- package/dist/components/layout/Layout.js +64 -65
- package/dist/components/menu/Menu.js +91 -92
- package/dist/components/quote/Quote.js +29 -30
- package/dist/components/resizable/Resizable.js +22 -23
- package/dist/components/row/Row.js +9 -10
- package/dist/components/scroll-area/ScrollArea.js +46 -47
- package/dist/components/segmented-control/SegmentedControl.js +35 -35
- package/dist/components/spacing/Spacing.js +8 -9
- package/dist/components/tab/Tab.js +53 -53
- package/dist/components/text/Text.js +9 -10
- package/dist/components/toast/Toast.js +47 -47
- package/dist/components/tooltip/Tooltip.js +35 -36
- package/dist/utils/contextStore.js +31 -32
- package/dist/utils/motion.js +39 -40
- package/package.json +4 -4
- package/dist/_virtual/__vite-optional-peer-dep_@emotion/is-prop-valid_framer-motion.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -59
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -51
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -58
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -18
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -15
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -256
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -20
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -57
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +0 -25
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +0 -18
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -136
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -40
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +0 -24
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -37
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -23
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -49
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -11
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -59
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -11
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -44
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -22
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +0 -68
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -19
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -56
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -48
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/render/components/m/proxy.js +0 -3
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +0 -11
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -19
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -17
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -24
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -28
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -24
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +0 -11
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +0 -23
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -5
- package/dist/node_modules/motion/dist/es/react.js +0 -196
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +0 -105
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +0 -127
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +0 -82
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +0 -26
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +0 -30
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +0 -164
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +0 -43
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +0 -54
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +0 -24
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +0 -59
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +0 -65
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +0 -3
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +0 -23
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +0 -3
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +0 -33
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +0 -28
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +0 -3
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +0 -30
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +0 -26
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +0 -23
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +0 -41
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +0 -28
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +0 -26
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +0 -580
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +0 -49
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +0 -201
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +0 -26
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +0 -54
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +0 -26
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/render/store.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +0 -38
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +0 -26
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +0 -133
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +0 -35
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/resize/index.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/stats/buffer.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +0 -31
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +0 -28
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +0 -50
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +0 -3
- package/dist/node_modules/motion-dom/dist/es/value/index.js +0 -90
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +0 -24
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +0 -50
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +0 -62
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +0 -30
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/array.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/clamp.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +0 -3
- package/dist/node_modules/motion-utils/dist/es/easing/back.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +0 -16
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js +0 -3
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +0 -29
- package/dist/node_modules/motion-utils/dist/es/errors.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/global-config.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/is-object.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/memo.js +0 -6
- package/dist/node_modules/motion-utils/dist/es/noop.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/pipe.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/progress.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +0 -24
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +0 -2
- package/dist/node_modules/motion-utils/dist/es/warn-once.js +0 -6
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +0 -21
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +0 -18
- package/dist/node_modules/react/compiler-runtime.js +0 -8
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { backInOut } from "../../../../../../motion-utils/dist/es/easing/back.js";
|
|
2
|
-
import { anticipate } from "../../../../../../motion-utils/dist/es/easing/anticipate.js";
|
|
3
|
-
import { circInOut } from "../../../../../../motion-utils/dist/es/easing/circ.js";
|
|
4
|
-
var unsupportedEasingFunctions = {
|
|
5
|
-
anticipate,
|
|
6
|
-
backInOut,
|
|
7
|
-
circInOut
|
|
8
|
-
};
|
|
9
|
-
function isUnsupportedEase(e) {
|
|
10
|
-
return e in unsupportedEasingFunctions;
|
|
11
|
-
}
|
|
12
|
-
function replaceStringEasing(e) {
|
|
13
|
-
typeof e.ease == "string" && isUnsupportedEase(e.ease) && (e.ease = unsupportedEasingFunctions[e.ease]);
|
|
14
|
-
}
|
|
15
|
-
export { replaceStringEasing };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { MotionGlobalConfig } from "../../../../motion-utils/dist/es/global-config.js";
|
|
2
|
-
import { stepsOrder } from "./order.js";
|
|
3
|
-
import { createRenderStep } from "./render-step.js";
|
|
4
|
-
var maxElapsed = 40;
|
|
5
|
-
function createRenderBatcher(i, a) {
|
|
6
|
-
let o = !1, s = !0, c = {
|
|
7
|
-
delta: 0,
|
|
8
|
-
timestamp: 0,
|
|
9
|
-
isProcessing: !1
|
|
10
|
-
}, l = () => o = !0, u = stepsOrder.reduce((e, t) => (e[t] = createRenderStep(l), e), {}), { setup: d, read: f, resolveKeyframes: p, preUpdate: m, update: h, preRender: g, render: _, postRender: v } = u, y = () => {
|
|
11
|
-
let t = MotionGlobalConfig.useManualTiming, n = t ? c.timestamp : performance.now();
|
|
12
|
-
o = !1, t || (c.delta = s ? 1e3 / 60 : Math.max(Math.min(n - c.timestamp, maxElapsed), 1)), c.timestamp = n, c.isProcessing = !0, d.process(c), f.process(c), p.process(c), m.process(c), h.process(c), g.process(c), _.process(c), v.process(c), c.isProcessing = !1, o && a && (s = !1, i(y));
|
|
13
|
-
}, b = () => {
|
|
14
|
-
o = !0, s = !0, c.isProcessing || i(y);
|
|
15
|
-
};
|
|
16
|
-
return {
|
|
17
|
-
schedule: stepsOrder.reduce((e, t) => {
|
|
18
|
-
let n = u[t];
|
|
19
|
-
return e[t] = (e, t = !1, r = !1) => (o || b(), n.schedule(e, t, r)), e;
|
|
20
|
-
}, {}),
|
|
21
|
-
cancel: (e) => {
|
|
22
|
-
for (let n = 0; n < stepsOrder.length; n++) u[stepsOrder[n]].cancel(e);
|
|
23
|
-
},
|
|
24
|
-
state: c,
|
|
25
|
-
steps: u
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export { createRenderBatcher };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { noop } from "../../../../motion-utils/dist/es/noop.js";
|
|
2
|
-
import { createRenderBatcher } from "./batcher.js";
|
|
3
|
-
var { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame < "u" ? requestAnimationFrame : noop, !0);
|
|
4
|
-
export { cancelFrame, frame, frameData, frameSteps };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
function createRenderStep(e) {
|
|
2
|
-
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = !1, i = !1, a = /* @__PURE__ */ new WeakSet(), o = {
|
|
3
|
-
delta: 0,
|
|
4
|
-
timestamp: 0,
|
|
5
|
-
isProcessing: !1
|
|
6
|
-
};
|
|
7
|
-
function s(t) {
|
|
8
|
-
a.has(t) && (c.schedule(t), e()), t(o);
|
|
9
|
-
}
|
|
10
|
-
let c = {
|
|
11
|
-
schedule: (e, i = !1, o = !1) => {
|
|
12
|
-
let s = o && r ? t : n;
|
|
13
|
-
return i && a.add(e), s.add(e), e;
|
|
14
|
-
},
|
|
15
|
-
cancel: (e) => {
|
|
16
|
-
n.delete(e), a.delete(e);
|
|
17
|
-
},
|
|
18
|
-
process: (e) => {
|
|
19
|
-
if (o = e, r) {
|
|
20
|
-
i = !0;
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
r = !0;
|
|
24
|
-
let a = t;
|
|
25
|
-
t = n, n = a, t.forEach(s), t.clear(), r = !1, i && (i = !1, c.process(e));
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
return c;
|
|
29
|
-
}
|
|
30
|
-
export { createRenderStep };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { MotionGlobalConfig } from "../../../../motion-utils/dist/es/global-config.js";
|
|
2
|
-
import { frameData } from "./frame.js";
|
|
3
|
-
var now;
|
|
4
|
-
function clearTime() {
|
|
5
|
-
now = void 0;
|
|
6
|
-
}
|
|
7
|
-
var time = {
|
|
8
|
-
now: () => (now === void 0 && time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming ? frameData.timestamp : performance.now()), now),
|
|
9
|
-
set: (e) => {
|
|
10
|
-
now = e, queueMicrotask(clearTime);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
export { time };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { isDragging } from "./is-active.js";
|
|
2
|
-
function setDragLock(t) {
|
|
3
|
-
return t === "x" || t === "y" ? isDragging[t] ? null : (isDragging[t] = !0, () => {
|
|
4
|
-
isDragging[t] = !1;
|
|
5
|
-
}) : isDragging.x || isDragging.y ? null : (isDragging.x = isDragging.y = !0, () => {
|
|
6
|
-
isDragging.x = isDragging.y = !1;
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
export { setDragLock };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { isDragActive } from "./drag/state/is-active.js";
|
|
2
|
-
import { setupGesture } from "./utils/setup.js";
|
|
3
|
-
function isValidHover(n) {
|
|
4
|
-
return !(n.pointerType === "touch" || isDragActive());
|
|
5
|
-
}
|
|
6
|
-
function hover(e, r, i = {}) {
|
|
7
|
-
let [a, o, s] = setupGesture(e, i);
|
|
8
|
-
return a.forEach((e) => {
|
|
9
|
-
let n = !1, i = !1, a, s = () => {
|
|
10
|
-
e.removeEventListener("pointerleave", d);
|
|
11
|
-
}, c = (e) => {
|
|
12
|
-
a &&= (a(e), void 0), s();
|
|
13
|
-
}, l = (e) => {
|
|
14
|
-
n = !1, window.removeEventListener("pointerup", l), window.removeEventListener("pointercancel", l), i && (i = !1, c(e));
|
|
15
|
-
}, u = () => {
|
|
16
|
-
n = !0, window.addEventListener("pointerup", l, o), window.addEventListener("pointercancel", l, o);
|
|
17
|
-
}, d = (e) => {
|
|
18
|
-
if (e.pointerType !== "touch") {
|
|
19
|
-
if (n) {
|
|
20
|
-
i = !0;
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
c(e);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
e.addEventListener("pointerenter", (n) => {
|
|
27
|
-
if (!isValidHover(n)) return;
|
|
28
|
-
i = !1;
|
|
29
|
-
let s = r(e, n);
|
|
30
|
-
typeof s == "function" && (a = s, e.addEventListener("pointerleave", d, o));
|
|
31
|
-
}, o), e.addEventListener("pointerdown", u, o);
|
|
32
|
-
}), s;
|
|
33
|
-
}
|
|
34
|
-
export { hover };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { isHTMLElement } from "../../utils/is-html-element.js";
|
|
2
|
-
import { isDragActive } from "../drag/state/is-active.js";
|
|
3
|
-
import { setupGesture } from "../utils/setup.js";
|
|
4
|
-
import { isNodeOrChild } from "../utils/is-node-or-child.js";
|
|
5
|
-
import { isPrimaryPointer } from "../utils/is-primary-pointer.js";
|
|
6
|
-
import { isElementKeyboardAccessible } from "./utils/is-keyboard-accessible.js";
|
|
7
|
-
import { isPressing } from "./utils/state.js";
|
|
8
|
-
import { enableKeyboardPress } from "./utils/keyboard.js";
|
|
9
|
-
function isValidPressEvent(e) {
|
|
10
|
-
return isPrimaryPointer(e) && !isDragActive();
|
|
11
|
-
}
|
|
12
|
-
var claimedPointerDownEvents = /* @__PURE__ */ new WeakSet();
|
|
13
|
-
function press(i, s, u = {}) {
|
|
14
|
-
let [d, f, p] = setupGesture(i, u), m = (e) => {
|
|
15
|
-
let i = e.currentTarget;
|
|
16
|
-
if (!isValidPressEvent(e) || claimedPointerDownEvents.has(e)) return;
|
|
17
|
-
isPressing.add(i), u.stopPropagation && claimedPointerDownEvents.add(e);
|
|
18
|
-
let a = s(i, e), c = {
|
|
19
|
-
...f,
|
|
20
|
-
capture: !0
|
|
21
|
-
}, l = (e, o) => {
|
|
22
|
-
window.removeEventListener("pointerup", d, c), window.removeEventListener("pointercancel", p, c), isPressing.has(i) && isPressing.delete(i), isValidPressEvent(e) && typeof a == "function" && a(e, { success: o });
|
|
23
|
-
}, d = (e) => {
|
|
24
|
-
l(e, i === window || i === document || u.useGlobalTarget || isNodeOrChild(i, e.target));
|
|
25
|
-
}, p = (e) => {
|
|
26
|
-
l(e, !1);
|
|
27
|
-
};
|
|
28
|
-
window.addEventListener("pointerup", d, c), window.addEventListener("pointercancel", p, c);
|
|
29
|
-
};
|
|
30
|
-
return d.forEach((i) => {
|
|
31
|
-
(u.useGlobalTarget ? window : i).addEventListener("pointerdown", m, f), isHTMLElement(i) && (i.addEventListener("focus", (e) => enableKeyboardPress(e, f)), !isElementKeyboardAccessible(i) && !i.hasAttribute("tabindex") && (i.tabIndex = 0));
|
|
32
|
-
}), p;
|
|
33
|
-
}
|
|
34
|
-
export { press };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
var keyboardAccessibleElements = new Set([
|
|
2
|
-
"BUTTON",
|
|
3
|
-
"INPUT",
|
|
4
|
-
"SELECT",
|
|
5
|
-
"TEXTAREA",
|
|
6
|
-
"A"
|
|
7
|
-
]);
|
|
8
|
-
function isElementKeyboardAccessible(r) {
|
|
9
|
-
return keyboardAccessibleElements.has(r.tagName) || r.isContentEditable === !0;
|
|
10
|
-
}
|
|
11
|
-
var textInputElements = new Set([
|
|
12
|
-
"INPUT",
|
|
13
|
-
"SELECT",
|
|
14
|
-
"TEXTAREA"
|
|
15
|
-
]);
|
|
16
|
-
function isElementTextInput(e) {
|
|
17
|
-
return textInputElements.has(e.tagName) || e.isContentEditable === !0;
|
|
18
|
-
}
|
|
19
|
-
export { isElementKeyboardAccessible, isElementTextInput };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { isPressing } from "./state.js";
|
|
2
|
-
function filterEvents(e) {
|
|
3
|
-
return (n) => {
|
|
4
|
-
n.key === "Enter" && e(n);
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
function firePointerEvent(e, n) {
|
|
8
|
-
e.dispatchEvent(new PointerEvent("pointer" + n, {
|
|
9
|
-
isPrimary: !0,
|
|
10
|
-
bubbles: !0
|
|
11
|
-
}));
|
|
12
|
-
}
|
|
13
|
-
var enableKeyboardPress = (r, i) => {
|
|
14
|
-
let a = r.currentTarget;
|
|
15
|
-
if (!a) return;
|
|
16
|
-
let o = filterEvents(() => {
|
|
17
|
-
if (isPressing.has(a)) return;
|
|
18
|
-
firePointerEvent(a, "down");
|
|
19
|
-
let r = filterEvents(() => {
|
|
20
|
-
firePointerEvent(a, "up");
|
|
21
|
-
});
|
|
22
|
-
a.addEventListener("keyup", r, i), a.addEventListener("blur", () => firePointerEvent(a, "cancel"), i);
|
|
23
|
-
});
|
|
24
|
-
a.addEventListener("keydown", o, i), a.addEventListener("blur", () => a.removeEventListener("keydown", o), i);
|
|
25
|
-
};
|
|
26
|
-
export { enableKeyboardPress };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { resolveElements } from "../../utils/resolve-elements.js";
|
|
2
|
-
function setupGesture(t, n) {
|
|
3
|
-
let r = resolveElements(t), i = new AbortController();
|
|
4
|
-
return [
|
|
5
|
-
r,
|
|
6
|
-
{
|
|
7
|
-
passive: !0,
|
|
8
|
-
...n,
|
|
9
|
-
signal: i.signal
|
|
10
|
-
},
|
|
11
|
-
() => i.abort()
|
|
12
|
-
];
|
|
13
|
-
}
|
|
14
|
-
export { setupGesture };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { noop } from "../../../../../motion-utils/dist/es/noop.js";
|
|
2
|
-
import { progress } from "../../../../../motion-utils/dist/es/progress.js";
|
|
3
|
-
import { circOut } from "../../../../../motion-utils/dist/es/easing/circ.js";
|
|
4
|
-
import { percent, px } from "../../value/types/numbers/units.js";
|
|
5
|
-
import { mixNumber } from "../../utils/mix/number.js";
|
|
6
|
-
import { cornerRadiusProps } from "../../utils/border-radius.js";
|
|
7
|
-
var numBorders = cornerRadiusProps.length, asNumber = (e) => typeof e == "string" ? parseFloat(e) : e, isPx = (e) => typeof e == "number" || px.test(e);
|
|
8
|
-
function mixValues(e, o, s, l, d, m) {
|
|
9
|
-
d ? (e.opacity = mixNumber(0, s.opacity ?? 1, easeCrossfadeIn(l)), e.opacityExit = mixNumber(o.opacity ?? 1, 0, easeCrossfadeOut(l))) : m && (e.opacity = mixNumber(o.opacity ?? 1, s.opacity ?? 1, l));
|
|
10
|
-
for (let d = 0; d < numBorders; d++) {
|
|
11
|
-
let u = cornerRadiusProps[d], f = getRadius(o, u), p = getRadius(s, u);
|
|
12
|
-
f === void 0 && p === void 0 || (f ||= 0, p ||= 0, f === 0 || p === 0 || isPx(f) === isPx(p) ? (e[u] = Math.max(mixNumber(asNumber(f), asNumber(p), l), 0), (percent.test(p) || percent.test(f)) && (e[u] += "%")) : e[u] = p);
|
|
13
|
-
}
|
|
14
|
-
(o.rotate || s.rotate) && (e.rotate = mixNumber(o.rotate || 0, s.rotate || 0, l));
|
|
15
|
-
}
|
|
16
|
-
function getRadius(e, o) {
|
|
17
|
-
return e[o] === void 0 ? e.borderRadius : e[o];
|
|
18
|
-
}
|
|
19
|
-
var easeCrossfadeIn = /* @__PURE__ */ compress(0, .5, circOut), easeCrossfadeOut = /* @__PURE__ */ compress(.5, .95, noop);
|
|
20
|
-
function compress(e, s, c) {
|
|
21
|
-
return (l) => l < e ? 0 : l > s ? 1 : c(progress(e, s, l));
|
|
22
|
-
}
|
|
23
|
-
export { mixValues };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
function convertBoundingBoxToBox({ top: e, left: t, right: n, bottom: r }) {
|
|
2
|
-
return {
|
|
3
|
-
x: {
|
|
4
|
-
min: t,
|
|
5
|
-
max: n
|
|
6
|
-
},
|
|
7
|
-
y: {
|
|
8
|
-
min: e,
|
|
9
|
-
max: r
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
function convertBoxToBoundingBox({ x: e, y: t }) {
|
|
14
|
-
return {
|
|
15
|
-
top: t.min,
|
|
16
|
-
right: e.max,
|
|
17
|
-
bottom: t.max,
|
|
18
|
-
left: e.min
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function transformBoxPoints(e, t) {
|
|
22
|
-
if (!t) return e;
|
|
23
|
-
let n = t({
|
|
24
|
-
x: e.left,
|
|
25
|
-
y: e.top
|
|
26
|
-
}), r = t({
|
|
27
|
-
x: e.right,
|
|
28
|
-
y: e.bottom
|
|
29
|
-
});
|
|
30
|
-
return {
|
|
31
|
-
top: n.y,
|
|
32
|
-
left: n.x,
|
|
33
|
-
bottom: r.y,
|
|
34
|
-
right: r.x
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
function copyAxisInto(e, t) {
|
|
2
|
-
e.min = t.min, e.max = t.max;
|
|
3
|
-
}
|
|
4
|
-
function copyBoxInto(t, n) {
|
|
5
|
-
copyAxisInto(t.x, n.x), copyAxisInto(t.y, n.y);
|
|
6
|
-
}
|
|
7
|
-
function copyAxisDeltaInto(e, t) {
|
|
8
|
-
e.translate = t.translate, e.scale = t.scale, e.originPoint = t.originPoint, e.origin = t.origin;
|
|
9
|
-
}
|
|
10
|
-
export { copyAxisDeltaInto, copyAxisInto, copyBoxInto };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { mixNumber } from "../../utils/mix/number.js";
|
|
2
|
-
import { hasTransform } from "../utils/has-transform.js";
|
|
3
|
-
function scalePoint(e, r, i) {
|
|
4
|
-
return i + r * (e - i);
|
|
5
|
-
}
|
|
6
|
-
function applyPointDelta(e, r, a, o, s) {
|
|
7
|
-
return s !== void 0 && (e = scalePoint(e, s, o)), scalePoint(e, a, o) + r;
|
|
8
|
-
}
|
|
9
|
-
function applyAxisDelta(e, r = 0, i = 1, o, s) {
|
|
10
|
-
e.min = applyPointDelta(e.min, r, i, o, s), e.max = applyPointDelta(e.max, r, i, o, s);
|
|
11
|
-
}
|
|
12
|
-
function applyBoxDelta(e, { x: r, y: i }) {
|
|
13
|
-
applyAxisDelta(e.x, r.translate, r.scale, r.originPoint), applyAxisDelta(e.y, i.translate, i.scale, i.originPoint);
|
|
14
|
-
}
|
|
15
|
-
var TREE_SCALE_SNAP_MIN = .999999999999, TREE_SCALE_SNAP_MAX = 1.0000000000001;
|
|
16
|
-
function applyTreeDeltas(e, i, a, o = !1) {
|
|
17
|
-
let u = a.length;
|
|
18
|
-
if (!u) return;
|
|
19
|
-
i.x = i.y = 1;
|
|
20
|
-
let d, f;
|
|
21
|
-
for (let c = 0; c < u; c++) {
|
|
22
|
-
d = a[c], f = d.projectionDelta;
|
|
23
|
-
let { visualElement: l } = d.options;
|
|
24
|
-
l && l.props.style && l.props.style.display === "contents" || (o && d.options.layoutScroll && d.scroll && d !== d.root && (translateAxis(e.x, -d.scroll.offset.x), translateAxis(e.y, -d.scroll.offset.y)), f && (i.x *= f.x.scale, i.y *= f.y.scale, applyBoxDelta(e, f)), o && hasTransform(d.latestValues) && transformBox(e, d.latestValues, d.layout?.layoutBox));
|
|
25
|
-
}
|
|
26
|
-
i.x < TREE_SCALE_SNAP_MAX && i.x > TREE_SCALE_SNAP_MIN && (i.x = 1), i.y < TREE_SCALE_SNAP_MAX && i.y > TREE_SCALE_SNAP_MIN && (i.y = 1);
|
|
27
|
-
}
|
|
28
|
-
function translateAxis(e, r) {
|
|
29
|
-
e.min += r, e.max += r;
|
|
30
|
-
}
|
|
31
|
-
function transformAxis(r, i, a, s, c = .5) {
|
|
32
|
-
applyAxisDelta(r, i, a, mixNumber(r.min, r.max, c), s);
|
|
33
|
-
}
|
|
34
|
-
function resolveAxisTranslate(e, r) {
|
|
35
|
-
return typeof e == "string" ? parseFloat(e) / 100 * (r.max - r.min) : e;
|
|
36
|
-
}
|
|
37
|
-
function transformBox(e, r, i) {
|
|
38
|
-
let a = i ?? e;
|
|
39
|
-
transformAxis(e.x, resolveAxisTranslate(r.x, a.x), r.scaleX, r.scale, r.originX), transformAxis(e.y, resolveAxisTranslate(r.y, a.y), r.scaleY, r.scale, r.originY);
|
|
40
|
-
}
|
|
41
|
-
export { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { mixNumber } from "../../utils/mix/number.js";
|
|
2
|
-
var SCALE_PRECISION = 1e-4, SCALE_MIN = 1 - SCALE_PRECISION, SCALE_MAX = 1 + SCALE_PRECISION, TRANSLATE_PRECISION = .01, TRANSLATE_MIN = 0 - TRANSLATE_PRECISION, TRANSLATE_MAX = 0 + TRANSLATE_PRECISION;
|
|
3
|
-
function calcLength(e) {
|
|
4
|
-
return e.max - e.min;
|
|
5
|
-
}
|
|
6
|
-
function isNear(e, c, l) {
|
|
7
|
-
return Math.abs(e - c) <= l;
|
|
8
|
-
}
|
|
9
|
-
function calcAxisDelta(c, d, p, m = .5) {
|
|
10
|
-
c.origin = m, c.originPoint = mixNumber(d.min, d.max, c.origin), c.scale = calcLength(p) / calcLength(d), c.translate = mixNumber(p.min, p.max, c.origin) - c.originPoint, (c.scale >= SCALE_MIN && c.scale <= SCALE_MAX || isNaN(c.scale)) && (c.scale = 1), (c.translate >= TRANSLATE_MIN && c.translate <= TRANSLATE_MAX || isNaN(c.translate)) && (c.translate = 0);
|
|
11
|
-
}
|
|
12
|
-
function calcBoxDelta(e, c, l, u) {
|
|
13
|
-
calcAxisDelta(e.x, c.x, l.x, u ? u.originX : void 0), calcAxisDelta(e.y, c.y, l.y, u ? u.originY : void 0);
|
|
14
|
-
}
|
|
15
|
-
function calcRelativeAxis(c, l, u, d = 0) {
|
|
16
|
-
c.min = (d ? mixNumber(u.min, u.max, d) : u.min) + l.min, c.max = c.min + calcLength(l);
|
|
17
|
-
}
|
|
18
|
-
function calcRelativeBox(e, c, l, u) {
|
|
19
|
-
calcRelativeAxis(e.x, c.x, l.x, u?.x), calcRelativeAxis(e.y, c.y, l.y, u?.y);
|
|
20
|
-
}
|
|
21
|
-
function calcRelativeAxisPosition(c, l, u, d = 0) {
|
|
22
|
-
let f = d ? mixNumber(u.min, u.max, d) : u.min;
|
|
23
|
-
c.min = l.min - f, c.max = c.min + calcLength(l);
|
|
24
|
-
}
|
|
25
|
-
function calcRelativePosition(e, c, l, u) {
|
|
26
|
-
calcRelativeAxisPosition(e.x, c.x, l.x, u?.x), calcRelativeAxisPosition(e.y, c.y, l.y, u?.y);
|
|
27
|
-
}
|
|
28
|
-
export { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { percent } from "../../value/types/numbers/units.js";
|
|
2
|
-
import { mixNumber } from "../../utils/mix/number.js";
|
|
3
|
-
import { scalePoint } from "./delta-apply.js";
|
|
4
|
-
function removePointDelta(e, t, r, i, a) {
|
|
5
|
-
return e -= t, e = scalePoint(e, 1 / r, i), a !== void 0 && (e = scalePoint(e, 1 / a, i)), e;
|
|
6
|
-
}
|
|
7
|
-
function removeAxisDelta(n, i = 0, a = 1, o = .5, s, c = n, l = n) {
|
|
8
|
-
if (percent.test(i) && (i = parseFloat(i), i = mixNumber(l.min, l.max, i / 100) - l.min), typeof i != "number") return;
|
|
9
|
-
let u = mixNumber(c.min, c.max, o);
|
|
10
|
-
n === c && (u -= i), n.min = removePointDelta(n.min, i, a, u, s), n.max = removePointDelta(n.max, i, a, u, s);
|
|
11
|
-
}
|
|
12
|
-
function removeAxisTransforms(e, t, [n, r, a], o, s) {
|
|
13
|
-
removeAxisDelta(e, t[n], t[r], t[a], t.scale, o, s);
|
|
14
|
-
}
|
|
15
|
-
var xKeys = [
|
|
16
|
-
"x",
|
|
17
|
-
"scaleX",
|
|
18
|
-
"originX"
|
|
19
|
-
], yKeys = [
|
|
20
|
-
"y",
|
|
21
|
-
"scaleY",
|
|
22
|
-
"originY"
|
|
23
|
-
];
|
|
24
|
-
function removeBoxTransforms(e, t, n, r) {
|
|
25
|
-
removeAxisTransforms(e.x, t, xKeys, n ? n.x : void 0, r ? r.x : void 0), removeAxisTransforms(e.y, t, yKeys, n ? n.y : void 0, r ? r.y : void 0);
|
|
26
|
-
}
|
|
27
|
-
export { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
var createAxisDelta = () => ({
|
|
2
|
-
translate: 0,
|
|
3
|
-
scale: 1,
|
|
4
|
-
origin: 0,
|
|
5
|
-
originPoint: 0
|
|
6
|
-
}), createDelta = () => ({
|
|
7
|
-
x: createAxisDelta(),
|
|
8
|
-
y: createAxisDelta()
|
|
9
|
-
}), createAxis = () => ({
|
|
10
|
-
min: 0,
|
|
11
|
-
max: 0
|
|
12
|
-
}), createBox = () => ({
|
|
13
|
-
x: createAxis(),
|
|
14
|
-
y: createAxis()
|
|
15
|
-
});
|
|
16
|
-
export { createAxis, createAxisDelta, createBox, createDelta };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { calcLength } from "./delta-calc.js";
|
|
2
|
-
function isAxisDeltaZero(e) {
|
|
3
|
-
return e.translate === 0 && e.scale === 1;
|
|
4
|
-
}
|
|
5
|
-
function isDeltaZero(e) {
|
|
6
|
-
return isAxisDeltaZero(e.x) && isAxisDeltaZero(e.y);
|
|
7
|
-
}
|
|
8
|
-
function axisEquals(e, c) {
|
|
9
|
-
return e.min === c.min && e.max === c.max;
|
|
10
|
-
}
|
|
11
|
-
function boxEquals(e, c) {
|
|
12
|
-
return axisEquals(e.x, c.x) && axisEquals(e.y, c.y);
|
|
13
|
-
}
|
|
14
|
-
function axisEqualsRounded(e, c) {
|
|
15
|
-
return Math.round(e.min) === Math.round(c.min) && Math.round(e.max) === Math.round(c.max);
|
|
16
|
-
}
|
|
17
|
-
function boxEqualsRounded(e, c) {
|
|
18
|
-
return axisEqualsRounded(e.x, c.x) && axisEqualsRounded(e.y, c.y);
|
|
19
|
-
}
|
|
20
|
-
function aspectRatio(c) {
|
|
21
|
-
return calcLength(c.x) / calcLength(c.y);
|
|
22
|
-
}
|
|
23
|
-
function axisDeltaEquals(e, c) {
|
|
24
|
-
return e.translate === c.translate && e.scale === c.scale && e.originPoint === c.originPoint;
|
|
25
|
-
}
|
|
26
|
-
export { aspectRatio, axisDeltaEquals, axisEquals, axisEqualsRounded, boxEquals, boxEqualsRounded, isDeltaZero };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { addDomEvent } from "../../events/add-dom-event.js";
|
|
2
|
-
import { createProjectionNode } from "./create-projection-node.js";
|
|
3
|
-
var DocumentProjectionNode = createProjectionNode({
|
|
4
|
-
attachResizeListener: (t, n) => addDomEvent(t, "resize", n),
|
|
5
|
-
measureScroll: () => ({
|
|
6
|
-
x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
|
|
7
|
-
y: document.documentElement.scrollTop || document.body?.scrollTop || 0
|
|
8
|
-
}),
|
|
9
|
-
checkIsScrollRoot: () => !0
|
|
10
|
-
});
|
|
11
|
-
export { DocumentProjectionNode };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { createProjectionNode } from "./create-projection-node.js";
|
|
2
|
-
import { DocumentProjectionNode } from "./DocumentProjectionNode.js";
|
|
3
|
-
var rootProjectionNode = { current: void 0 }, HTMLProjectionNode = createProjectionNode({
|
|
4
|
-
measureScroll: (e) => ({
|
|
5
|
-
x: e.scrollLeft,
|
|
6
|
-
y: e.scrollTop
|
|
7
|
-
}),
|
|
8
|
-
defaultParent: () => {
|
|
9
|
-
if (!rootProjectionNode.current) {
|
|
10
|
-
let e = new DocumentProjectionNode({});
|
|
11
|
-
e.mount(window), e.setOptions({ layoutScroll: !0 }), rootProjectionNode.current = e;
|
|
12
|
-
}
|
|
13
|
-
return rootProjectionNode.current;
|
|
14
|
-
},
|
|
15
|
-
resetTransform: (e, r) => {
|
|
16
|
-
e.style.transform = r === void 0 ? "none" : r;
|
|
17
|
-
},
|
|
18
|
-
checkIsScrollRoot: (e) => window.getComputedStyle(e).position === "fixed"
|
|
19
|
-
});
|
|
20
|
-
export { HTMLProjectionNode, rootProjectionNode };
|