@code0-tech/pictor 1.0.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 +9 -0
- package/dist/assets/Alert.style.css +1 -0
- package/dist/assets/Aurora.style.css +1 -0
- package/dist/assets/Avatar.style.css +1 -0
- package/dist/assets/Badge.style.css +1 -0
- package/dist/assets/Breadcrumb.style.css +1 -0
- package/dist/assets/Button.style.css +1 -0
- package/dist/assets/ButtonGroup.style.css +1 -0
- package/dist/assets/Card.style.css +1 -0
- package/dist/assets/Chart.style.css +1 -0
- package/dist/assets/Col.style.css +1 -0
- package/dist/assets/ColorInput.style.css +1 -0
- package/dist/assets/Command.style.css +1 -0
- package/dist/assets/Container.style.css +1 -0
- package/dist/assets/ContextMenu.style.css +1 -0
- package/dist/assets/DataTable.style.css +1 -0
- package/dist/assets/DateInput.style.css +1 -0
- package/dist/assets/Dialog.style.css +1 -0
- package/dist/assets/Editor.styles.css +1 -0
- package/dist/assets/EditorInput.style.css +1 -0
- package/dist/assets/FileInput.style.css +1 -0
- package/dist/assets/FileTabs.style.css +1 -0
- package/dist/assets/FullScreen.style.css +1 -0
- package/dist/assets/Gantt.style.css +1 -0
- package/dist/assets/Icon.style.css +1 -0
- package/dist/assets/Input.style.css +1 -0
- package/dist/assets/InputWrapper.style.css +1 -0
- package/dist/assets/JsonView.style.css +1 -0
- package/dist/assets/Layout.style.css +1 -0
- package/dist/assets/Menu.style.css +1 -0
- package/dist/assets/Progress.style.css +1 -0
- package/dist/assets/Quote.style.css +1 -0
- package/dist/assets/Resizable.style.css +1 -0
- package/dist/assets/Row.style.css +1 -0
- package/dist/assets/ScrollArea.style.css +1 -0
- package/dist/assets/SegmentedControl.style.css +1 -0
- package/dist/assets/SelectInput.style.css +1 -0
- package/dist/assets/Tab.style.css +1 -0
- package/dist/assets/Text.style.css +1 -0
- package/dist/assets/Toast.style.css +1 -0
- package/dist/assets/Tooltip.style.css +1 -0
- package/dist/components/alert/Alert.js +33 -41
- package/dist/components/aurora/Aurora.js +26 -22
- package/dist/components/avatar/Avatar.js +57 -55
- package/dist/components/badge/Badge.js +57 -64
- package/dist/components/breadcrumb/Breadcrumb.js +16 -21
- package/dist/components/button/Button.js +23 -31
- package/dist/components/button-group/ButtonGroup.js +28 -31
- package/dist/components/card/Card.js +28 -43
- package/dist/components/card/CardSection.js +21 -29
- package/dist/components/chart/Chart.js +138 -153
- package/dist/components/chart/LineChart.js +74 -74
- package/dist/components/chart/index.js +3 -8
- package/dist/components/col/Col.js +18 -29
- package/dist/components/command/Command.js +100 -134
- package/dist/components/container/Container.js +18 -23
- package/dist/components/context-menu/ContextMenu.js +118 -112
- package/dist/components/data-table/DataTable.js +53 -64
- package/dist/components/data-table/DataTableColumn.js +17 -22
- package/dist/components/data-table/DataTableFilterInput.js +208 -205
- package/dist/components/data-table/DataTableFilterSuggestionMenu.js +58 -48
- package/dist/components/data-table/DataTableHeader.js +33 -38
- package/dist/components/data-table/DataTablePagination.js +61 -74
- package/dist/components/data-table/index.js +7 -22
- package/dist/components/dialog/Dialog.js +106 -97
- package/dist/components/editor/Editor.js +352 -323
- package/dist/components/file-tabs/FileTabs.js +77 -73
- package/dist/components/file-tabs/FileTabs.service.js +85 -87
- package/dist/components/file-tabs/FileTabs.view.js +0 -1
- package/dist/components/file-tabs/index.js +3 -9
- package/dist/components/flex/Flex.js +18 -23
- package/dist/components/form/CheckboxInput.js +72 -76
- package/dist/components/form/ColorInput.js +378 -353
- package/dist/components/form/DateInput.js +315 -265
- package/dist/components/form/EditorInput.js +597 -579
- package/dist/components/form/EmailInput.js +30 -23
- package/dist/components/form/FileInput.js +92 -123
- package/dist/components/form/Input.js +64 -58
- package/dist/components/form/Input.utils.js +25 -37
- package/dist/components/form/InputDescription.js +10 -11
- package/dist/components/form/InputLabel.js +17 -22
- package/dist/components/form/InputMessage.js +16 -17
- package/dist/components/form/InputWrapper.js +55 -65
- package/dist/components/form/NumberInput.js +41 -20
- package/dist/components/form/PasswordInput.js +71 -54
- package/dist/components/form/PinInput.js +49 -65
- package/dist/components/form/RadioGroup.js +41 -50
- package/dist/components/form/RadioInput.js +30 -29
- package/dist/components/form/SelectInput.js +68 -92
- package/dist/components/form/SwitchInput.js +17 -18
- package/dist/components/form/TagInput.js +108 -122
- package/dist/components/form/TextAreaInput.js +24 -21
- package/dist/components/form/TextInput.js +30 -22
- package/dist/components/form/index.js +22 -87
- package/dist/components/form/useForm.js +87 -88
- package/dist/components/fullscreen/FullScreen.js +27 -27
- package/dist/components/gantt/Gantt.js +99 -98
- package/dist/components/gantt/GanttGroup.js +210 -195
- package/dist/components/gantt/GanttHeader.js +78 -81
- package/dist/components/gantt/GanttItem.js +18 -22
- package/dist/components/icon/Icon.d.ts +6 -4
- package/dist/components/icon/Icon.js +53 -42
- package/dist/components/icon/codezero/codezero.js +10 -0
- package/dist/components/icon/codezero/gls.js +9 -0
- package/dist/components/icon/codezero/index.js +17 -13
- package/dist/components/json-view/JsonView.js +119 -109
- package/dist/components/layout/Layout.js +100 -78
- package/dist/components/menu/Menu.js +134 -128
- package/dist/components/progress/ProgressCircle.js +60 -49
- package/dist/components/progress/ProgressLinear.js +39 -43
- package/dist/components/quote/Quote.js +51 -43
- package/dist/components/resizable/Resizable.js +35 -33
- package/dist/components/row/Row.js +18 -23
- package/dist/components/scroll-area/ScrollArea.js +65 -76
- package/dist/components/segmented-control/SegmentedControl.js +46 -50
- package/dist/components/spacing/Spacing.js +15 -23
- package/dist/components/tab/Tab.js +73 -66
- package/dist/components/text/Text.js +18 -25
- package/dist/components/toast/Toast.js +104 -82
- package/dist/components/tooltip/Tooltip.js +65 -55
- package/dist/index.js +76 -272
- package/dist/node_modules/@lezer/common/dist/index.js +778 -143
- package/dist/node_modules/@lezer/highlight/dist/index.js +305 -536
- package/dist/node_modules/prettier/plugins/babel.js +9582 -7023
- package/dist/node_modules/prettier/plugins/estree.js +6997 -4377
- package/dist/node_modules/prettier/standalone.js +3444 -2415
- package/dist/utils/arrayService.js +0 -1
- package/dist/utils/color.js +46 -41
- package/dist/utils/component.js +60 -129
- package/dist/utils/contextStore.js +47 -58
- package/dist/utils/index.js +7 -29
- package/dist/utils/motion.js +84 -113
- package/dist/utils/reactiveArrayService.js +80 -76
- package/dist/utils/size.js +14 -26
- package/dist/utils/utils.js +0 -1
- package/dist/utils/view.js +27 -24
- package/dist/vite-env.d.js +0 -1
- package/package.json +28 -23
- package/dist/_virtual/compiler-runtime.js +0 -5
- package/dist/_virtual/compiler-runtime2.js +0 -4
- package/dist/_virtual/react-compiler-runtime.development.js +0 -4
- package/dist/_virtual/react-compiler-runtime.production.js +0 -4
- package/dist/assets/components/alert/Alert.style.css +0 -1
- package/dist/assets/components/aurora/Aurora.style.css +0 -1
- package/dist/assets/components/avatar/Avatar.style.css +0 -1
- package/dist/assets/components/badge/Badge.style.css +0 -1
- package/dist/assets/components/breadcrumb/Breadcrumb.style.css +0 -1
- package/dist/assets/components/button/Button.style.css +0 -1
- package/dist/assets/components/button-group/ButtonGroup.style.css +0 -1
- package/dist/assets/components/card/Card.style.css +0 -1
- package/dist/assets/components/chart/Chart.style.css +0 -1
- package/dist/assets/components/col/Col.style.css +0 -1
- package/dist/assets/components/command/Command.style.css +0 -1
- package/dist/assets/components/container/Container.style.css +0 -1
- package/dist/assets/components/context-menu/ContextMenu.style.css +0 -1
- package/dist/assets/components/data-table/DataTable.style.css +0 -1
- package/dist/assets/components/dialog/Dialog.style.css +0 -1
- package/dist/assets/components/editor/Editor.styles.css +0 -1
- package/dist/assets/components/file-tabs/FileTabs.style.css +0 -1
- package/dist/assets/components/form/ColorInput.style.css +0 -1
- package/dist/assets/components/form/DateInput.style.css +0 -1
- package/dist/assets/components/form/EditorInput.style.css +0 -1
- package/dist/assets/components/form/FileInput.style.css +0 -1
- package/dist/assets/components/form/Input.style.css +0 -1
- package/dist/assets/components/form/InputWrapper.style.css +0 -1
- package/dist/assets/components/form/SelectInput.style.css +0 -1
- package/dist/assets/components/fullscreen/FullScreen.style.css +0 -1
- package/dist/assets/components/gantt/Gantt.style.css +0 -1
- package/dist/assets/components/icon/Icon.style.css +0 -1
- package/dist/assets/components/json-view/JsonView.style.css +0 -1
- package/dist/assets/components/layout/Layout.style.css +0 -1
- package/dist/assets/components/menu/Menu.style.css +0 -1
- package/dist/assets/components/progress/Progress.style.css +0 -1
- package/dist/assets/components/quote/Quote.style.css +0 -1
- package/dist/assets/components/resizable/Resizable.style.css +0 -1
- package/dist/assets/components/row/Row.style.css +0 -1
- package/dist/assets/components/scroll-area/ScrollArea.style.css +0 -1
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +0 -1
- package/dist/assets/components/tab/Tab.style.css +0 -1
- package/dist/assets/components/text/Text.style.css +0 -1
- package/dist/assets/components/toast/Toast.style.css +0 -1
- package/dist/assets/components/tooltip/Tooltip.style.css +0 -1
- package/dist/components/icon/codezero/codezero.svg.js +0 -5
- package/dist/components/icon/codezero/gls.svg.js +0 -5
- 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 -34
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -47
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -17
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +0 -12
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -15
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js +0 -14
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -285
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -22
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -67
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +0 -28
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -130
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -43
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +0 -29
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -45
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -33
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -39
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -17
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -60
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -11
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -14
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -45
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +0 -62
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -65
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -52
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -39
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +0 -18
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -16
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -24
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -27
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -30
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -22
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +0 -12
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +0 -28
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +0 -112
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +0 -144
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +0 -106
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +0 -38
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +0 -30
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +0 -178
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +0 -46
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +0 -59
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +0 -29
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +0 -68
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +0 -74
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +0 -7
- 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 -37
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +0 -23
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +0 -31
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +0 -33
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +0 -43
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +0 -38
- 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 -18
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +0 -32
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +0 -53
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +0 -38
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +0 -618
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +0 -53
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +0 -263
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +0 -28
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +0 -65
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +0 -6
- 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 -29
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +0 -38
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/store.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +0 -40
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +0 -32
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +0 -28
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +0 -143
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +0 -23
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +0 -39
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +0 -23
- package/dist/node_modules/motion-dom/dist/es/resize/index.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +0 -42
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +0 -29
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +0 -51
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/value/index.js +0 -212
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +0 -18
- 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 -51
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +0 -70
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/array.js +0 -11
- package/dist/node_modules/motion-utils/dist/es/clamp.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/easing/back.js +0 -9
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +0 -19
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +0 -32
- package/dist/node_modules/motion-utils/dist/es/errors.js +0 -14
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js +0 -6
- package/dist/node_modules/motion-utils/dist/es/global-config.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/is-object.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/memo.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/noop.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/pipe.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/progress.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +0 -29
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/warn-once.js +0 -8
- 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 -14
- package/dist/node_modules/react/compiler-runtime.js +0 -10
- /package/dist/assets/{components/flex/Flex.style.css → Flex.style.css} +0 -0
- /package/dist/assets/{components/spacing/Spacing.style.css → Spacing.style.css} +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { makeUseVisualState as e } from "../../motion/utils/use-visual-state.js";
|
|
2
|
-
import { createHtmlRenderState as t } from "./utils/create-render-state.js";
|
|
3
|
-
import { scrapeMotionValuesFromProps as r } from "../../../../../motion-dom/dist/es/render/html/utils/scrape-motion-values.js";
|
|
4
|
-
const m = /* @__PURE__ */ e({
|
|
5
|
-
scrapeMotionValuesFromProps: r,
|
|
6
|
-
createRenderState: t
|
|
7
|
-
});
|
|
8
|
-
export {
|
|
9
|
-
m as useHTMLVisualState
|
|
10
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { useMemo as i } from "react";
|
|
2
|
-
import { createHtmlRenderState as a } from "./utils/create-render-state.js";
|
|
3
|
-
import { isMotionValue as r } from "../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
|
|
4
|
-
import { isForcedMotionValue as l } from "../../../../../motion-dom/dist/es/render/utils/is-forced-motion-value.js";
|
|
5
|
-
import { buildHTMLStyles as s } from "../../../../../motion-dom/dist/es/render/html/utils/build-styles.js";
|
|
6
|
-
function u(t, o, n) {
|
|
7
|
-
for (const e in o)
|
|
8
|
-
!r(o[e]) && !l(e, n) && (t[e] = o[e]);
|
|
9
|
-
}
|
|
10
|
-
function c({ transformTemplate: t }, o) {
|
|
11
|
-
return i(() => {
|
|
12
|
-
const n = a();
|
|
13
|
-
return s(n, o, t), Object.assign({}, n.vars, n.style);
|
|
14
|
-
}, [o]);
|
|
15
|
-
}
|
|
16
|
-
function f(t, o) {
|
|
17
|
-
const n = t.style || {}, e = {};
|
|
18
|
-
return u(e, n, t), Object.assign(e, c(t, o)), e;
|
|
19
|
-
}
|
|
20
|
-
function M(t, o) {
|
|
21
|
-
const n = {}, e = f(t, o);
|
|
22
|
-
return t.drag && t.dragListener !== !1 && (n.draggable = !1, e.userSelect = e.WebkitUserSelect = e.WebkitTouchCallout = "none", e.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = e, n;
|
|
23
|
-
}
|
|
24
|
-
export {
|
|
25
|
-
u as copyRawValuesOnly,
|
|
26
|
-
M as useHTMLProps
|
|
27
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
const e = [
|
|
2
|
-
"animate",
|
|
3
|
-
"circle",
|
|
4
|
-
"defs",
|
|
5
|
-
"desc",
|
|
6
|
-
"ellipse",
|
|
7
|
-
"g",
|
|
8
|
-
"image",
|
|
9
|
-
"line",
|
|
10
|
-
"filter",
|
|
11
|
-
"marker",
|
|
12
|
-
"mask",
|
|
13
|
-
"metadata",
|
|
14
|
-
"path",
|
|
15
|
-
"pattern",
|
|
16
|
-
"polygon",
|
|
17
|
-
"polyline",
|
|
18
|
-
"rect",
|
|
19
|
-
"stop",
|
|
20
|
-
"switch",
|
|
21
|
-
"symbol",
|
|
22
|
-
"svg",
|
|
23
|
-
"text",
|
|
24
|
-
"tspan",
|
|
25
|
-
"use",
|
|
26
|
-
"view"
|
|
27
|
-
];
|
|
28
|
-
export {
|
|
29
|
-
e as lowercaseSVGElements
|
|
30
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { useMemo as m } from "react";
|
|
2
|
-
import { copyRawValuesOnly as l } from "../html/use-props.js";
|
|
3
|
-
import { createSvgRenderState as i } from "./utils/create-render-state.js";
|
|
4
|
-
import { buildSVGAttrs as a } from "../../../../../motion-dom/dist/es/render/svg/utils/build-attrs.js";
|
|
5
|
-
import { isSVGTag as n } from "../../../../../motion-dom/dist/es/render/svg/utils/is-svg-tag.js";
|
|
6
|
-
function G(e, s, y, o) {
|
|
7
|
-
const r = m(() => {
|
|
8
|
-
const t = i();
|
|
9
|
-
return a(t, s, n(o), e.transformTemplate, e.style), {
|
|
10
|
-
...t.attrs,
|
|
11
|
-
style: { ...t.style }
|
|
12
|
-
};
|
|
13
|
-
}, [s]);
|
|
14
|
-
if (e.style) {
|
|
15
|
-
const t = {};
|
|
16
|
-
l(t, e.style, e), r.style = { ...t, ...r.style };
|
|
17
|
-
}
|
|
18
|
-
return r;
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
G as useSVGProps
|
|
22
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { makeUseVisualState as e } from "../../motion/utils/use-visual-state.js";
|
|
2
|
-
import { createSvgRenderState as r } from "./utils/create-render-state.js";
|
|
3
|
-
import { scrapeMotionValuesFromProps as t } from "../../../../../motion-dom/dist/es/render/svg/utils/scrape-motion-values.js";
|
|
4
|
-
const m = /* @__PURE__ */ e({
|
|
5
|
-
scrapeMotionValuesFromProps: t,
|
|
6
|
-
createRenderState: r
|
|
7
|
-
});
|
|
8
|
-
export {
|
|
9
|
-
m as useSVGVisualState
|
|
10
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { useState as o } from "react";
|
|
2
|
-
import { hasReducedMotionListener as r, prefersReducedMotion as t } from "../../../../../motion-dom/dist/es/render/utils/reduced-motion/state.js";
|
|
3
|
-
import { initPrefersReducedMotion as n } from "../../../../../motion-dom/dist/es/render/utils/reduced-motion/index.js";
|
|
4
|
-
import { warnOnce as i } from "../../../../../motion-utils/dist/es/warn-once.js";
|
|
5
|
-
function a() {
|
|
6
|
-
!r.current && n();
|
|
7
|
-
const [e] = o(t.current);
|
|
8
|
-
return process.env.NODE_ENV !== "production" && i(e !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), e;
|
|
9
|
-
}
|
|
10
|
-
export {
|
|
11
|
-
a as useReducedMotion
|
|
12
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as l from "react";
|
|
2
|
-
function f(n, u) {
|
|
3
|
-
if (typeof n == "function")
|
|
4
|
-
return n(u);
|
|
5
|
-
n != null && (n.current = u);
|
|
6
|
-
}
|
|
7
|
-
function i(...n) {
|
|
8
|
-
return (u) => {
|
|
9
|
-
let o = !1;
|
|
10
|
-
const c = n.map((e) => {
|
|
11
|
-
const t = f(e, u);
|
|
12
|
-
return !o && typeof t == "function" && (o = !0), t;
|
|
13
|
-
});
|
|
14
|
-
if (o)
|
|
15
|
-
return () => {
|
|
16
|
-
for (let e = 0; e < c.length; e++) {
|
|
17
|
-
const t = c[e];
|
|
18
|
-
typeof t == "function" ? t() : f(n[e], null);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function s(...n) {
|
|
24
|
-
return l.useCallback(i(...n), n);
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
s as useComposedRefs
|
|
28
|
-
};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { time as v } from "../frameloop/sync-time.js";
|
|
2
|
-
import { JSAnimation as A } from "./JSAnimation.js";
|
|
3
|
-
import { getFinalKeyframe as y } from "./keyframes/get-final.js";
|
|
4
|
-
import { KeyframeResolver as g, flushKeyframeResolvers as R } from "./keyframes/KeyframesResolver.js";
|
|
5
|
-
import { NativeAnimationExtended as T } from "./NativeAnimationExtended.js";
|
|
6
|
-
import { canAnimate as _ } from "./utils/can-animate.js";
|
|
7
|
-
import { makeAnimationInstant as w } from "./utils/make-animation-instant.js";
|
|
8
|
-
import { WithPromise as K } from "./utils/WithPromise.js";
|
|
9
|
-
import { supportsBrowserAnimation as D } from "./waapi/supports/waapi.js";
|
|
10
|
-
import { MotionGlobalConfig as E } from "../../../../motion-utils/dist/es/global-config.js";
|
|
11
|
-
import { noop as k } from "../../../../motion-utils/dist/es/noop.js";
|
|
12
|
-
const x = 40;
|
|
13
|
-
class H extends K {
|
|
14
|
-
constructor({ autoplay: t = !0, delay: s = 0, type: e = "keyframes", repeat: h = 0, repeatDelay: l = 0, repeatType: f = "loop", keyframes: d, name: o, motionValue: r, element: a, ...m }) {
|
|
15
|
-
super(), this.stop = () => {
|
|
16
|
-
this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
|
|
17
|
-
}, this.createdAt = v.now();
|
|
18
|
-
const u = {
|
|
19
|
-
autoplay: t,
|
|
20
|
-
delay: s,
|
|
21
|
-
type: e,
|
|
22
|
-
repeat: h,
|
|
23
|
-
repeatDelay: l,
|
|
24
|
-
repeatType: f,
|
|
25
|
-
name: o,
|
|
26
|
-
motionValue: r,
|
|
27
|
-
element: a,
|
|
28
|
-
...m
|
|
29
|
-
}, n = a?.KeyframeResolver || g;
|
|
30
|
-
this.keyframeResolver = new n(d, (c, p, i) => this.onKeyframesResolved(c, p, u, !i), o, r, a), this.keyframeResolver?.scheduleResolve();
|
|
31
|
-
}
|
|
32
|
-
onKeyframesResolved(t, s, e, h) {
|
|
33
|
-
this.keyframeResolver = void 0;
|
|
34
|
-
const { name: l, type: f, velocity: d, delay: o, isHandoff: r, onUpdate: a } = e;
|
|
35
|
-
this.resolvedAt = v.now();
|
|
36
|
-
let m = !0;
|
|
37
|
-
_(t, l, f, d) || (m = !1, (E.instantAnimations || !o) && a?.(y(t, e, s)), t[0] = t[t.length - 1], w(e), e.repeat = 0);
|
|
38
|
-
const n = {
|
|
39
|
-
startTime: h ? this.resolvedAt ? this.resolvedAt - this.createdAt > x ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
40
|
-
finalKeyframe: s,
|
|
41
|
-
...e,
|
|
42
|
-
keyframes: t
|
|
43
|
-
}, c = m && !r && D(n), p = n.motionValue?.owner?.current;
|
|
44
|
-
let i;
|
|
45
|
-
if (c)
|
|
46
|
-
try {
|
|
47
|
-
i = new T({
|
|
48
|
-
...n,
|
|
49
|
-
element: p
|
|
50
|
-
});
|
|
51
|
-
} catch {
|
|
52
|
-
i = new A(n);
|
|
53
|
-
}
|
|
54
|
-
else
|
|
55
|
-
i = new A(n);
|
|
56
|
-
i.finished.then(() => {
|
|
57
|
-
this.notifyFinished();
|
|
58
|
-
}).catch(k), this.pendingTimeline && (this.stopTimeline = i.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = i;
|
|
59
|
-
}
|
|
60
|
-
get finished() {
|
|
61
|
-
return this._animation ? this.animation.finished : this._finished;
|
|
62
|
-
}
|
|
63
|
-
then(t, s) {
|
|
64
|
-
return this.finished.finally(t).then(() => {
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
get animation() {
|
|
68
|
-
return this._animation || (this.keyframeResolver?.resume(), R()), this._animation;
|
|
69
|
-
}
|
|
70
|
-
get duration() {
|
|
71
|
-
return this.animation.duration;
|
|
72
|
-
}
|
|
73
|
-
get iterationDuration() {
|
|
74
|
-
return this.animation.iterationDuration;
|
|
75
|
-
}
|
|
76
|
-
get time() {
|
|
77
|
-
return this.animation.time;
|
|
78
|
-
}
|
|
79
|
-
set time(t) {
|
|
80
|
-
this.animation.time = t;
|
|
81
|
-
}
|
|
82
|
-
get speed() {
|
|
83
|
-
return this.animation.speed;
|
|
84
|
-
}
|
|
85
|
-
get state() {
|
|
86
|
-
return this.animation.state;
|
|
87
|
-
}
|
|
88
|
-
set speed(t) {
|
|
89
|
-
this.animation.speed = t;
|
|
90
|
-
}
|
|
91
|
-
get startTime() {
|
|
92
|
-
return this.animation.startTime;
|
|
93
|
-
}
|
|
94
|
-
attachTimeline(t) {
|
|
95
|
-
return this._animation ? this.stopTimeline = this.animation.attachTimeline(t) : this.pendingTimeline = t, () => this.stop();
|
|
96
|
-
}
|
|
97
|
-
play() {
|
|
98
|
-
this.animation.play();
|
|
99
|
-
}
|
|
100
|
-
pause() {
|
|
101
|
-
this.animation.pause();
|
|
102
|
-
}
|
|
103
|
-
complete() {
|
|
104
|
-
this.animation.complete();
|
|
105
|
-
}
|
|
106
|
-
cancel() {
|
|
107
|
-
this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
export {
|
|
111
|
-
H as AsyncMotionValueAnimation
|
|
112
|
-
};
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { time as p } from "../frameloop/sync-time.js";
|
|
2
|
-
import { mix as P } from "../utils/mix/index.js";
|
|
3
|
-
import { frameloopDriver as I } from "./drivers/frame.js";
|
|
4
|
-
import { inertia as K } from "./generators/inertia.js";
|
|
5
|
-
import { keyframes as u } from "./generators/keyframes.js";
|
|
6
|
-
import { calcGeneratorDuration as O } from "./generators/utils/calc-duration.js";
|
|
7
|
-
import { getGeneratorVelocity as V } from "./generators/utils/velocity.js";
|
|
8
|
-
import { getFinalKeyframe as C } from "./keyframes/get-final.js";
|
|
9
|
-
import { replaceTransitionType as E } from "./utils/replace-transition-type.js";
|
|
10
|
-
import { WithPromise as N } from "./utils/WithPromise.js";
|
|
11
|
-
import { invariant as W } from "../../../../motion-utils/dist/es/errors.js";
|
|
12
|
-
import { pipe as $ } from "../../../../motion-utils/dist/es/pipe.js";
|
|
13
|
-
import { millisecondsToSeconds as c, secondsToMilliseconds as B } from "../../../../motion-utils/dist/es/time-conversion.js";
|
|
14
|
-
import { clamp as J } from "../../../../motion-utils/dist/es/clamp.js";
|
|
15
|
-
const U = (g) => g / 100;
|
|
16
|
-
class rt extends N {
|
|
17
|
-
constructor(t) {
|
|
18
|
-
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.delayState = {
|
|
19
|
-
done: !1,
|
|
20
|
-
value: void 0
|
|
21
|
-
}, this.stop = () => {
|
|
22
|
-
const { motionValue: i } = this.options;
|
|
23
|
-
i && i.updatedAt !== p.now() && this.tick(p.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
|
|
24
|
-
}, this.options = t, this.initAnimation(), this.play(), t.autoplay === !1 && this.pause();
|
|
25
|
-
}
|
|
26
|
-
initAnimation() {
|
|
27
|
-
const { options: t } = this;
|
|
28
|
-
E(t);
|
|
29
|
-
const { type: i = u, repeat: s = 0, repeatDelay: r = 0, repeatType: m, velocity: f = 0 } = t;
|
|
30
|
-
let { keyframes: e } = t;
|
|
31
|
-
const h = i || u;
|
|
32
|
-
process.env.NODE_ENV !== "production" && h !== u && W(e.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`, "spring-two-frames"), h !== u && typeof e[0] != "number" && (this.mixKeyframes = $(U, P(e[0], e[1])), e = [0, 100]);
|
|
33
|
-
const n = h({ ...t, keyframes: e });
|
|
34
|
-
m === "mirror" && (this.mirroredGenerator = h({
|
|
35
|
-
...t,
|
|
36
|
-
keyframes: [...e].reverse(),
|
|
37
|
-
velocity: -f
|
|
38
|
-
})), n.calculatedDuration === null && (n.calculatedDuration = O(n));
|
|
39
|
-
const { calculatedDuration: l } = n;
|
|
40
|
-
this.calculatedDuration = l, this.resolvedDuration = l + r, this.totalDuration = this.resolvedDuration * (s + 1) - r, this.generator = n;
|
|
41
|
-
}
|
|
42
|
-
updateTime(t) {
|
|
43
|
-
const i = Math.round(t - this.startTime) * this.playbackSpeed;
|
|
44
|
-
this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = i;
|
|
45
|
-
}
|
|
46
|
-
tick(t, i = !1) {
|
|
47
|
-
const { generator: s, totalDuration: r, mixKeyframes: m, mirroredGenerator: f, resolvedDuration: e, calculatedDuration: h } = this;
|
|
48
|
-
if (this.startTime === null)
|
|
49
|
-
return s.next(0);
|
|
50
|
-
const { delay: n = 0, keyframes: l, repeat: k, repeatType: D, repeatDelay: S, type: F, onUpdate: b, finalKeyframe: G } = this.options;
|
|
51
|
-
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - r / this.speed, this.startTime)), i ? this.currentTime = t : this.updateTime(t);
|
|
52
|
-
const T = this.currentTime - n * (this.playbackSpeed >= 0 ? 1 : -1), y = this.playbackSpeed >= 0 ? T < 0 : T > r;
|
|
53
|
-
this.currentTime = Math.max(T, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
|
|
54
|
-
let x = this.currentTime, w = s;
|
|
55
|
-
if (k) {
|
|
56
|
-
const v = Math.min(this.currentTime, r) / e;
|
|
57
|
-
let d = Math.floor(v), o = v % 1;
|
|
58
|
-
!o && v >= 1 && (o = 1), o === 1 && d--, d = Math.min(d, k + 1), d % 2 && (D === "reverse" ? (o = 1 - o, S && (o -= S / e)) : D === "mirror" && (w = f)), x = J(0, 1, o) * e;
|
|
59
|
-
}
|
|
60
|
-
let a;
|
|
61
|
-
y ? (this.delayState.value = l[0], a = this.delayState) : a = w.next(x), m && !y && (a.value = m(a.value));
|
|
62
|
-
let { done: M } = a;
|
|
63
|
-
!y && h !== null && (M = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
|
|
64
|
-
const A = this.holdTime === null && (this.state === "finished" || this.state === "running" && M);
|
|
65
|
-
return A && F !== K && (a.value = C(l, this.options, G, this.speed)), b && b(a.value), A && this.finish(), a;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
69
|
-
* resolves when the animation finishes at all but in a future update could/should
|
|
70
|
-
* reject if its cancels.
|
|
71
|
-
*/
|
|
72
|
-
then(t, i) {
|
|
73
|
-
return this.finished.then(t, i);
|
|
74
|
-
}
|
|
75
|
-
get duration() {
|
|
76
|
-
return c(this.calculatedDuration);
|
|
77
|
-
}
|
|
78
|
-
get iterationDuration() {
|
|
79
|
-
const { delay: t = 0 } = this.options || {};
|
|
80
|
-
return this.duration + c(t);
|
|
81
|
-
}
|
|
82
|
-
get time() {
|
|
83
|
-
return c(this.currentTime);
|
|
84
|
-
}
|
|
85
|
-
set time(t) {
|
|
86
|
-
t = B(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), this.driver ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = t, this.tick(t));
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Returns the generator's velocity at the current time in units/second.
|
|
90
|
-
* Uses the analytical derivative when available (springs), avoiding
|
|
91
|
-
* the MotionValue's frame-dependent velocity estimation.
|
|
92
|
-
*/
|
|
93
|
-
getGeneratorVelocity() {
|
|
94
|
-
const t = this.currentTime;
|
|
95
|
-
if (t <= 0)
|
|
96
|
-
return this.options.velocity || 0;
|
|
97
|
-
if (this.generator.velocity)
|
|
98
|
-
return this.generator.velocity(t);
|
|
99
|
-
const i = this.generator.next(t).value;
|
|
100
|
-
return V((s) => this.generator.next(s).value, t, i);
|
|
101
|
-
}
|
|
102
|
-
get speed() {
|
|
103
|
-
return this.playbackSpeed;
|
|
104
|
-
}
|
|
105
|
-
set speed(t) {
|
|
106
|
-
const i = this.playbackSpeed !== t;
|
|
107
|
-
i && this.driver && this.updateTime(p.now()), this.playbackSpeed = t, i && this.driver && (this.time = c(this.currentTime));
|
|
108
|
-
}
|
|
109
|
-
play() {
|
|
110
|
-
if (this.isStopped)
|
|
111
|
-
return;
|
|
112
|
-
const { driver: t = I, startTime: i } = this.options;
|
|
113
|
-
this.driver || (this.driver = t((r) => this.tick(r))), this.options.onPlay?.();
|
|
114
|
-
const s = this.driver.now();
|
|
115
|
-
this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = i ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
116
|
-
}
|
|
117
|
-
pause() {
|
|
118
|
-
this.state = "paused", this.updateTime(p.now()), this.holdTime = this.currentTime;
|
|
119
|
-
}
|
|
120
|
-
complete() {
|
|
121
|
-
this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
|
|
122
|
-
}
|
|
123
|
-
finish() {
|
|
124
|
-
this.notifyFinished(), this.teardown(), this.state = "finished", this.options.onComplete?.();
|
|
125
|
-
}
|
|
126
|
-
cancel() {
|
|
127
|
-
this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), this.options.onCancel?.();
|
|
128
|
-
}
|
|
129
|
-
teardown() {
|
|
130
|
-
this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null;
|
|
131
|
-
}
|
|
132
|
-
stopDriver() {
|
|
133
|
-
this.driver && (this.driver.stop(), this.driver = void 0);
|
|
134
|
-
}
|
|
135
|
-
sample(t) {
|
|
136
|
-
return this.startTime = 0, this.tick(t, !0);
|
|
137
|
-
}
|
|
138
|
-
attachTimeline(t) {
|
|
139
|
-
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), t.observe(this);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
export {
|
|
143
|
-
rt as JSAnimation
|
|
144
|
-
};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { setStyle as u } from "../render/dom/style-set.js";
|
|
2
|
-
import { supportsScrollTimeline as p } from "../utils/supports/scroll-timeline.js";
|
|
3
|
-
import { getFinalKeyframe as f } from "./keyframes/get-final.js";
|
|
4
|
-
import { WithPromise as d } from "./utils/WithPromise.js";
|
|
5
|
-
import { startWaapiAnimation as c } from "./waapi/start-waapi-animation.js";
|
|
6
|
-
import { applyGeneratorOptions as T } from "./waapi/utils/apply-generator.js";
|
|
7
|
-
import { invariant as y } from "../../../../motion-utils/dist/es/errors.js";
|
|
8
|
-
import { millisecondsToSeconds as a, secondsToMilliseconds as S } from "../../../../motion-utils/dist/es/time-conversion.js";
|
|
9
|
-
import { noop as g } from "../../../../motion-utils/dist/es/noop.js";
|
|
10
|
-
class v extends d {
|
|
11
|
-
constructor(i) {
|
|
12
|
-
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !i)
|
|
13
|
-
return;
|
|
14
|
-
const { element: t, name: e, keyframes: n, pseudoElement: s, allowFlatten: r = !1, finalKeyframe: l, onComplete: h } = i;
|
|
15
|
-
this.isPseudoElement = !!s, this.allowFlatten = r, this.options = i, y(typeof i.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
16
|
-
const o = T(i);
|
|
17
|
-
this.animation = c(t, e, n, o, s), o.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
18
|
-
if (this.finishedTime = this.time, !s) {
|
|
19
|
-
const m = f(n, this.options, l, this.speed);
|
|
20
|
-
this.updateMotionValue && this.updateMotionValue(m), u(t, e, m), this.animation.cancel();
|
|
21
|
-
}
|
|
22
|
-
h?.(), this.notifyFinished();
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
play() {
|
|
26
|
-
this.isStopped || (this.manualStartTime = null, this.animation.play(), this.state === "finished" && this.updateFinished());
|
|
27
|
-
}
|
|
28
|
-
pause() {
|
|
29
|
-
this.animation.pause();
|
|
30
|
-
}
|
|
31
|
-
complete() {
|
|
32
|
-
this.animation.finish?.();
|
|
33
|
-
}
|
|
34
|
-
cancel() {
|
|
35
|
-
try {
|
|
36
|
-
this.animation.cancel();
|
|
37
|
-
} catch {
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
stop() {
|
|
41
|
-
if (this.isStopped)
|
|
42
|
-
return;
|
|
43
|
-
this.isStopped = !0;
|
|
44
|
-
const { state: i } = this;
|
|
45
|
-
i === "idle" || i === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* WAAPI doesn't natively have any interruption capabilities.
|
|
49
|
-
*
|
|
50
|
-
* In this method, we commit styles back to the DOM before cancelling
|
|
51
|
-
* the animation.
|
|
52
|
-
*
|
|
53
|
-
* This is designed to be overridden by NativeAnimationExtended, which
|
|
54
|
-
* will create a renderless JS animation and sample it twice to calculate
|
|
55
|
-
* its current value, "previous" value, and therefore allow
|
|
56
|
-
* Motion to also correctly calculate velocity for any subsequent animation
|
|
57
|
-
* while deferring the commit until the next animation frame.
|
|
58
|
-
*/
|
|
59
|
-
commitStyles() {
|
|
60
|
-
const i = this.options?.element;
|
|
61
|
-
!this.isPseudoElement && i?.isConnected && this.animation.commitStyles?.();
|
|
62
|
-
}
|
|
63
|
-
get duration() {
|
|
64
|
-
const i = this.animation.effect?.getComputedTiming?.().duration || 0;
|
|
65
|
-
return a(Number(i));
|
|
66
|
-
}
|
|
67
|
-
get iterationDuration() {
|
|
68
|
-
const { delay: i = 0 } = this.options || {};
|
|
69
|
-
return this.duration + a(i);
|
|
70
|
-
}
|
|
71
|
-
get time() {
|
|
72
|
-
return a(Number(this.animation.currentTime) || 0);
|
|
73
|
-
}
|
|
74
|
-
set time(i) {
|
|
75
|
-
const t = this.finishedTime !== null;
|
|
76
|
-
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = S(i), t && this.animation.pause();
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* The playback speed of the animation.
|
|
80
|
-
* 1 = normal speed, 2 = double speed, 0.5 = half speed.
|
|
81
|
-
*/
|
|
82
|
-
get speed() {
|
|
83
|
-
return this.animation.playbackRate;
|
|
84
|
-
}
|
|
85
|
-
set speed(i) {
|
|
86
|
-
i < 0 && (this.finishedTime = null), this.animation.playbackRate = i;
|
|
87
|
-
}
|
|
88
|
-
get state() {
|
|
89
|
-
return this.finishedTime !== null ? "finished" : this.animation.playState;
|
|
90
|
-
}
|
|
91
|
-
get startTime() {
|
|
92
|
-
return this.manualStartTime ?? Number(this.animation.startTime);
|
|
93
|
-
}
|
|
94
|
-
set startTime(i) {
|
|
95
|
-
this.manualStartTime = this.animation.startTime = i;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
99
|
-
*/
|
|
100
|
-
attachTimeline({ timeline: i, rangeStart: t, rangeEnd: e, observe: n }) {
|
|
101
|
-
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, i && p() ? (this.animation.timeline = i, t && (this.animation.rangeStart = t), e && (this.animation.rangeEnd = e), g) : n(this);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
export {
|
|
105
|
-
v as NativeAnimation
|
|
106
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { time as p } from "../frameloop/sync-time.js";
|
|
2
|
-
import { setStyle as c } from "../render/dom/style-set.js";
|
|
3
|
-
import { JSAnimation as f } from "./JSAnimation.js";
|
|
4
|
-
import { NativeAnimation as u } from "./NativeAnimation.js";
|
|
5
|
-
import { replaceTransitionType as d } from "./utils/replace-transition-type.js";
|
|
6
|
-
import { replaceStringEasing as h } from "./waapi/utils/unsupported-easing.js";
|
|
7
|
-
import { clamp as T } from "../../../../motion-utils/dist/es/clamp.js";
|
|
8
|
-
const o = 10;
|
|
9
|
-
class N extends u {
|
|
10
|
-
constructor(t) {
|
|
11
|
-
h(t), d(t), super(t), t.startTime !== void 0 && t.autoplay !== !1 && (this.startTime = t.startTime), this.options = t;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* WAAPI doesn't natively have any interruption capabilities.
|
|
15
|
-
*
|
|
16
|
-
* Rather than read committed styles back out of the DOM, we can
|
|
17
|
-
* create a renderless JS animation and sample it twice to calculate
|
|
18
|
-
* its current value, "previous" value, and therefore allow
|
|
19
|
-
* Motion to calculate velocity for any subsequent animation.
|
|
20
|
-
*/
|
|
21
|
-
updateMotionValue(t) {
|
|
22
|
-
const { motionValue: e, onUpdate: y, onComplete: A, element: m, ...l } = this.options;
|
|
23
|
-
if (!e)
|
|
24
|
-
return;
|
|
25
|
-
if (t !== void 0) {
|
|
26
|
-
e.set(t);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
const i = new f({
|
|
30
|
-
...l,
|
|
31
|
-
autoplay: !1
|
|
32
|
-
}), a = Math.max(o, p.now() - this.startTime), n = T(0, o, a - o), r = i.sample(a).value, { name: s } = this.options;
|
|
33
|
-
m && s && c(m, s, r), e.setWithVelocity(i.sample(Math.max(0, a - n)).value, r, n), i.stop();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
export {
|
|
37
|
-
N as NativeAnimationExtended
|
|
38
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { animateMotionValue as m } from "../interfaces/motion-value.js";
|
|
2
|
-
import { motionValue as a } from "../../value/index.js";
|
|
3
|
-
import { isMotionValue as r } from "../../value/utils/is-motion-value.js";
|
|
4
|
-
function f(o, i, n) {
|
|
5
|
-
const t = r(o) ? o : a(o);
|
|
6
|
-
return t.start(m("", t, i, n)), t.animation;
|
|
7
|
-
}
|
|
8
|
-
export {
|
|
9
|
-
f as animateSingleValue
|
|
10
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { time as o } from "../../frameloop/sync-time.js";
|
|
2
|
-
import { frameData as e, cancelFrame as a, frame as s } from "../../frameloop/frame.js";
|
|
3
|
-
const n = (m) => {
|
|
4
|
-
const t = ({ timestamp: r }) => m(r);
|
|
5
|
-
return {
|
|
6
|
-
start: (r = !0) => s.update(t, r),
|
|
7
|
-
stop: () => a(t),
|
|
8
|
-
/**
|
|
9
|
-
* If we're processing this frame we can use the
|
|
10
|
-
* framelocked timestamp to keep things in sync.
|
|
11
|
-
*/
|
|
12
|
-
now: () => e.isProcessing ? e.timestamp : o.now()
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
n as frameloopDriver
|
|
17
|
-
};
|