@code0-tech/pictor 1.0.0 → 1.1.0
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/__vite-optional-peer-dep_@emotion/is-prop-valid_framer-motion.js +6 -0
- package/dist/_virtual/rolldown_runtime.js +18 -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 +34 -41
- package/dist/components/aurora/Aurora.js +27 -22
- package/dist/components/avatar/Avatar.js +57 -55
- package/dist/components/badge/Badge.js +58 -64
- package/dist/components/breadcrumb/Breadcrumb.js +16 -21
- package/dist/components/button/Button.js +24 -31
- package/dist/components/button-group/ButtonGroup.js +29 -31
- package/dist/components/card/Card.js +30 -44
- package/dist/components/card/CardSection.js +21 -29
- package/dist/components/chart/Chart.js +138 -153
- package/dist/components/chart/LineChart.js +75 -74
- package/dist/components/chart/index.js +3 -8
- package/dist/components/col/Col.js +19 -29
- package/dist/components/command/Command.js +101 -134
- package/dist/components/container/Container.js +19 -23
- package/dist/components/context-menu/ContextMenu.js +119 -112
- package/dist/components/data-table/DataTable.js +53 -64
- package/dist/components/data-table/DataTableColumn.js +18 -22
- package/dist/components/data-table/DataTableFilterInput.js +208 -205
- package/dist/components/data-table/DataTableFilterSuggestionMenu.js +59 -48
- package/dist/components/data-table/DataTableHeader.js +34 -38
- package/dist/components/data-table/DataTablePagination.js +62 -74
- package/dist/components/data-table/index.js +7 -22
- package/dist/components/dialog/Dialog.js +107 -97
- package/dist/components/editor/Editor.js +352 -323
- package/dist/components/file-tabs/FileTabs.js +78 -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 +19 -23
- package/dist/components/form/CheckboxInput.js +73 -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 +93 -123
- package/dist/components/form/Input.js +64 -58
- package/dist/components/form/Input.utils.js +25 -37
- package/dist/components/form/InputDescription.js +11 -11
- package/dist/components/form/InputLabel.js +18 -22
- package/dist/components/form/InputMessage.js +17 -17
- package/dist/components/form/InputWrapper.js +56 -65
- package/dist/components/form/NumberInput.js +41 -20
- package/dist/components/form/PasswordInput.js +71 -54
- package/dist/components/form/PinInput.js +50 -65
- package/dist/components/form/RadioGroup.js +42 -50
- package/dist/components/form/RadioInput.js +31 -29
- package/dist/components/form/SelectInput.js +69 -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 +28 -27
- package/dist/components/gantt/Gantt.js +100 -98
- package/dist/components/gantt/GanttGroup.js +210 -195
- package/dist/components/gantt/GanttHeader.js +79 -81
- package/dist/components/gantt/GanttItem.js +19 -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 +120 -109
- package/dist/components/layout/Layout.js +101 -78
- package/dist/components/menu/Menu.js +135 -128
- package/dist/components/progress/ProgressCircle.js +60 -49
- package/dist/components/progress/ProgressLinear.js +39 -43
- package/dist/components/quote/Quote.js +52 -43
- package/dist/components/resizable/Resizable.js +36 -33
- package/dist/components/row/Row.js +19 -23
- package/dist/components/scroll-area/ScrollArea.js +66 -76
- package/dist/components/segmented-control/SegmentedControl.js +46 -50
- package/dist/components/spacing/Spacing.js +16 -23
- package/dist/components/tab/Tab.js +73 -66
- package/dist/components/text/Text.js +19 -25
- package/dist/components/toast/Toast.js +104 -82
- package/dist/components/tooltip/Tooltip.js +66 -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/framer-motion/dist/es/components/AnimatePresence/PopChild.js +55 -55
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +49 -32
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +57 -46
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +17 -16
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +8 -11
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +4 -5
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +4 -5
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +7 -8
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +13 -11
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +4 -5
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +12 -14
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +4 -5
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +4 -5
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +5 -7
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js +8 -13
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +252 -281
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +19 -21
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +57 -67
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +24 -27
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +16 -19
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +130 -124
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +39 -42
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +22 -27
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +36 -44
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +22 -32
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +6 -12
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +47 -37
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +12 -16
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +10 -20
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +58 -59
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +7 -11
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +10 -13
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +42 -43
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +19 -18
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +64 -58
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +2 -4
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +18 -20
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +53 -62
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +45 -49
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +4 -38
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +7 -17
- package/dist/node_modules/framer-motion/dist/es/render/components/m/proxy.js +3 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +10 -12
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +5 -7
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +6 -10
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +18 -15
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +14 -18
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +4 -23
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +8 -9
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +20 -23
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +6 -8
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +27 -29
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +23 -21
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +8 -9
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +5 -7
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js +5 -8
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +2 -4
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +2 -4
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +3 -5
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +10 -11
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +20 -25
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +6 -7
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +5 -6
- package/dist/node_modules/motion/dist/es/react.js +196 -0
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +104 -111
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +126 -143
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +81 -105
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +25 -37
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +7 -9
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +10 -16
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +29 -36
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +18 -28
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +156 -170
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +6 -12
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +13 -12
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +3 -5
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +6 -8
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +42 -45
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +52 -57
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +22 -27
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +18 -21
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +58 -67
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +61 -70
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +5 -7
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +5 -7
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +9 -11
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +3 -5
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +3 -6
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +4 -6
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +15 -15
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +32 -35
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +3 -6
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +4 -6
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +19 -26
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +4 -6
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +14 -21
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +21 -29
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +25 -22
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +5 -7
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +3 -7
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +4 -8
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +15 -19
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +3 -5
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +12 -14
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +10 -9
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +8 -11
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +32 -14
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +16 -20
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +21 -32
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +7 -11
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +5 -7
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +5 -9
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +5 -9
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +12 -14
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +3 -5
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +27 -26
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +4 -9
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +3 -5
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +10 -20
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +29 -42
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +11 -13
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +6 -9
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +8 -10
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +32 -36
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +32 -32
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +16 -15
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +23 -24
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +13 -11
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +20 -29
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +34 -22
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +7 -11
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +41 -53
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +28 -38
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +23 -21
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +15 -17
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +18 -26
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +10 -12
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +19 -24
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +554 -592
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +4 -14
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +48 -52
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +10 -20
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +11 -16
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +14 -20
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +9 -12
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +3 -5
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +16 -18
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +11 -15
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +8 -11
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js +6 -9
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +198 -260
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +25 -27
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +49 -60
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +4 -6
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +3 -5
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +35 -35
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +25 -28
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +33 -37
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +5 -11
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +8 -12
- package/dist/node_modules/motion-dom/dist/es/render/store.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +37 -39
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +18 -30
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +25 -27
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +11 -13
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +6 -10
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +11 -14
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +128 -138
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +16 -19
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +3 -5
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +8 -11
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +5 -8
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +3 -5
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +10 -12
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +20 -23
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +18 -24
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +8 -14
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +2 -5
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +5 -7
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +16 -18
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +14 -18
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +7 -13
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +10 -13
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +31 -35
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +18 -21
- package/dist/node_modules/motion-dom/dist/es/resize/index.js +5 -7
- package/dist/node_modules/motion-dom/dist/es/stats/buffer.js +5 -0
- package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js +9 -11
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +29 -40
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +4 -6
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +4 -6
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +4 -6
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +26 -27
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +44 -45
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +3 -5
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +5 -7
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +4 -7
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +11 -14
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +9 -11
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +6 -8
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +3 -5
- package/dist/node_modules/motion-dom/dist/es/value/index.js +89 -211
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +4 -6
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +15 -17
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +17 -20
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +9 -11
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +12 -14
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +12 -15
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +13 -17
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +22 -22
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +43 -44
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +11 -10
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +14 -9
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js +5 -7
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +22 -27
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +61 -69
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +29 -36
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +12 -16
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +10 -17
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +9 -11
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +10 -8
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +3 -5
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +2 -4
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +4 -6
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +10 -13
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +4 -6
- package/dist/node_modules/motion-utils/dist/es/array.js +6 -9
- package/dist/node_modules/motion-utils/dist/es/clamp.js +2 -4
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +3 -5
- package/dist/node_modules/motion-utils/dist/es/easing/back.js +5 -9
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js +4 -8
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +14 -17
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js +3 -7
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +2 -4
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +2 -4
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +2 -4
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +2 -4
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +28 -31
- package/dist/node_modules/motion-utils/dist/es/errors.js +7 -13
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js +3 -5
- package/dist/node_modules/motion-utils/dist/es/global-config.js +2 -4
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +2 -4
- package/dist/node_modules/motion-utils/dist/es/is-object.js +2 -4
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +2 -4
- package/dist/node_modules/motion-utils/dist/es/memo.js +5 -7
- package/dist/node_modules/motion-utils/dist/es/noop.js +2 -4
- package/dist/node_modules/motion-utils/dist/es/pipe.js +2 -4
- package/dist/node_modules/motion-utils/dist/es/progress.js +4 -6
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +23 -28
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js +2 -5
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +2 -4
- package/dist/node_modules/motion-utils/dist/es/warn-once.js +5 -7
- 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/node_modules/react/cjs/react-compiler-runtime.development.js +21 -21
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +18 -14
- package/dist/node_modules/react/compiler-runtime.js +8 -10
- 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 +48 -58
- package/dist/utils/index.js +7 -29
- package/dist/utils/motion.js +85 -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 +25 -20
- 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/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,15 +1,12 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return Array.from(n).filter((r) => r != null);
|
|
1
|
+
function resolveElements(e, t, n) {
|
|
2
|
+
if (e == null) return [];
|
|
3
|
+
if (e instanceof EventTarget) return [e];
|
|
4
|
+
if (typeof e == "string") {
|
|
5
|
+
let r = document;
|
|
6
|
+
t && (r = t.current);
|
|
7
|
+
let i = n?.[e] ?? r.querySelectorAll(e);
|
|
8
|
+
return i ? Array.from(i) : [];
|
|
9
|
+
}
|
|
10
|
+
return Array.from(e).filter((e) => e != null);
|
|
12
11
|
}
|
|
13
|
-
export {
|
|
14
|
-
i as resolveElements
|
|
15
|
-
};
|
|
12
|
+
export { resolveElements };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { memoSupports
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { memoSupports } from "./memo.js";
|
|
2
|
+
var supportsLinearEasing = /* @__PURE__ */ memoSupports(() => {
|
|
3
|
+
try {
|
|
4
|
+
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
5
|
+
} catch {
|
|
6
|
+
return !1;
|
|
7
|
+
}
|
|
8
|
+
return !0;
|
|
9
9
|
}, "linearEasing");
|
|
10
|
-
export {
|
|
11
|
-
a as supportsLinearEasing
|
|
12
|
-
};
|
|
10
|
+
export { supportsLinearEasing };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { memo } from "../../../../../motion-utils/dist/es/memo.js";
|
|
2
|
+
import { supportsFlags } from "./flags.js";
|
|
3
|
+
function memoSupports(n, r) {
|
|
4
|
+
let i = memo(n);
|
|
5
|
+
return () => supportsFlags[r] ?? i();
|
|
6
6
|
}
|
|
7
|
-
export {
|
|
8
|
-
i as memoSupports
|
|
9
|
-
};
|
|
7
|
+
export { memoSupports };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { memoSupports
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
i as supportsScrollTimeline
|
|
5
|
-
};
|
|
1
|
+
import { memoSupports } from "./memo.js";
|
|
2
|
+
var supportsScrollTimeline = /* @__PURE__ */ memoSupports(() => window.ScrollTimeline !== void 0, "scrollTimeline");
|
|
3
|
+
export { supportsScrollTimeline };
|
|
@@ -1,212 +1,90 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { warnOnce
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
*/
|
|
87
|
-
attach(t, e) {
|
|
88
|
-
this.passiveEffect = t, this.stopPassiveEffect = e;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Sets the state of the `MotionValue`.
|
|
92
|
-
*
|
|
93
|
-
* @remarks
|
|
94
|
-
*
|
|
95
|
-
* ```jsx
|
|
96
|
-
* const x = useMotionValue(0)
|
|
97
|
-
* x.set(10)
|
|
98
|
-
* ```
|
|
99
|
-
*
|
|
100
|
-
* @param latest - Latest value to set.
|
|
101
|
-
* @param render - Whether to notify render subscribers. Defaults to `true`
|
|
102
|
-
*
|
|
103
|
-
* @public
|
|
104
|
-
*/
|
|
105
|
-
set(t) {
|
|
106
|
-
this.passiveEffect ? this.passiveEffect(t, this.updateAndNotify) : this.updateAndNotify(t);
|
|
107
|
-
}
|
|
108
|
-
setWithVelocity(t, e, i) {
|
|
109
|
-
this.set(e), this.prev = void 0, this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt - i;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Set the state of the `MotionValue`, stopping any active animations,
|
|
113
|
-
* effects, and resets velocity to `0`.
|
|
114
|
-
*/
|
|
115
|
-
jump(t, e = !0) {
|
|
116
|
-
this.updateAndNotify(t), this.prev = t, this.prevUpdatedAt = this.prevFrameValue = void 0, e && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
117
|
-
}
|
|
118
|
-
dirty() {
|
|
119
|
-
this.events.change?.notify(this.current);
|
|
120
|
-
}
|
|
121
|
-
addDependent(t) {
|
|
122
|
-
this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(t);
|
|
123
|
-
}
|
|
124
|
-
removeDependent(t) {
|
|
125
|
-
this.dependents && this.dependents.delete(t);
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Returns the latest state of `MotionValue`
|
|
129
|
-
*
|
|
130
|
-
* @returns - The latest state of `MotionValue`
|
|
131
|
-
*
|
|
132
|
-
* @public
|
|
133
|
-
*/
|
|
134
|
-
get() {
|
|
135
|
-
return this.current;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* @public
|
|
139
|
-
*/
|
|
140
|
-
getPrevious() {
|
|
141
|
-
return this.prev;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Returns the latest velocity of `MotionValue`
|
|
145
|
-
*
|
|
146
|
-
* @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
|
|
147
|
-
*
|
|
148
|
-
* @public
|
|
149
|
-
*/
|
|
150
|
-
getVelocity() {
|
|
151
|
-
const t = n.now();
|
|
152
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > r)
|
|
153
|
-
return 0;
|
|
154
|
-
const e = Math.min(this.updatedAt - this.prevUpdatedAt, r);
|
|
155
|
-
return p(parseFloat(this.current) - parseFloat(this.prevFrameValue), e);
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Registers a new animation to control this `MotionValue`. Only one
|
|
159
|
-
* animation can drive a `MotionValue` at one time.
|
|
160
|
-
*
|
|
161
|
-
* ```jsx
|
|
162
|
-
* value.start()
|
|
163
|
-
* ```
|
|
164
|
-
*
|
|
165
|
-
* @param animation - A function that starts the provided animation
|
|
166
|
-
*/
|
|
167
|
-
start(t) {
|
|
168
|
-
return this.stop(), new Promise((e) => {
|
|
169
|
-
this.hasAnimated = !0, this.animation = t(e), this.events.animationStart && this.events.animationStart.notify();
|
|
170
|
-
}).then(() => {
|
|
171
|
-
this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Stop the currently active animation.
|
|
176
|
-
*
|
|
177
|
-
* @public
|
|
178
|
-
*/
|
|
179
|
-
stop() {
|
|
180
|
-
this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Returns `true` if this value is currently animating.
|
|
184
|
-
*
|
|
185
|
-
* @public
|
|
186
|
-
*/
|
|
187
|
-
isAnimating() {
|
|
188
|
-
return !!this.animation;
|
|
189
|
-
}
|
|
190
|
-
clearAnimation() {
|
|
191
|
-
delete this.animation;
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Destroy and clean up subscribers to this `MotionValue`.
|
|
195
|
-
*
|
|
196
|
-
* The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
|
|
197
|
-
* handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
|
|
198
|
-
* created a `MotionValue` via the `motionValue` function.
|
|
199
|
-
*
|
|
200
|
-
* @public
|
|
201
|
-
*/
|
|
202
|
-
destroy() {
|
|
203
|
-
this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
function V(s, t) {
|
|
207
|
-
return new f(s, t);
|
|
208
|
-
}
|
|
209
|
-
export {
|
|
210
|
-
f as MotionValue,
|
|
211
|
-
V as motionValue
|
|
1
|
+
import { SubscriptionManager } from "../../../../motion-utils/dist/es/subscription-manager.js";
|
|
2
|
+
import { velocityPerSecond } from "../../../../motion-utils/dist/es/velocity-per-second.js";
|
|
3
|
+
import { warnOnce } from "../../../../motion-utils/dist/es/warn-once.js";
|
|
4
|
+
import { frame } from "../frameloop/frame.js";
|
|
5
|
+
import { time } from "../frameloop/sync-time.js";
|
|
6
|
+
var MAX_VELOCITY_DELTA = 30, isFloat = (e) => !isNaN(parseFloat(e)), collectMotionValues = { current: void 0 }, MotionValue = class {
|
|
7
|
+
constructor(e, s = {}) {
|
|
8
|
+
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (e) => {
|
|
9
|
+
let s = time.now();
|
|
10
|
+
if (this.updatedAt !== s && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(e), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents)) for (let e of this.dependents) e.dirty();
|
|
11
|
+
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = s.owner;
|
|
12
|
+
}
|
|
13
|
+
setCurrent(e) {
|
|
14
|
+
this.current = e, this.updatedAt = time.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = isFloat(this.current));
|
|
15
|
+
}
|
|
16
|
+
setPrevFrameValue(e = this.current) {
|
|
17
|
+
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
|
|
18
|
+
}
|
|
19
|
+
onChange(e) {
|
|
20
|
+
return process.env.NODE_ENV !== "production" && warnOnce(!1, "value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback)."), this.on("change", e);
|
|
21
|
+
}
|
|
22
|
+
on(s, c) {
|
|
23
|
+
this.events[s] || (this.events[s] = new SubscriptionManager());
|
|
24
|
+
let l = this.events[s].add(c);
|
|
25
|
+
return s === "change" ? () => {
|
|
26
|
+
l(), frame.read(() => {
|
|
27
|
+
this.events.change.getSize() || this.stop();
|
|
28
|
+
});
|
|
29
|
+
} : l;
|
|
30
|
+
}
|
|
31
|
+
clearListeners() {
|
|
32
|
+
for (let e in this.events) this.events[e].clear();
|
|
33
|
+
}
|
|
34
|
+
attach(e, s) {
|
|
35
|
+
this.passiveEffect = e, this.stopPassiveEffect = s;
|
|
36
|
+
}
|
|
37
|
+
set(e) {
|
|
38
|
+
this.passiveEffect ? this.passiveEffect(e, this.updateAndNotify) : this.updateAndNotify(e);
|
|
39
|
+
}
|
|
40
|
+
setWithVelocity(e, s, c) {
|
|
41
|
+
this.set(s), this.prev = void 0, this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt - c;
|
|
42
|
+
}
|
|
43
|
+
jump(e, s = !0) {
|
|
44
|
+
this.updateAndNotify(e), this.prev = e, this.prevUpdatedAt = this.prevFrameValue = void 0, s && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
45
|
+
}
|
|
46
|
+
dirty() {
|
|
47
|
+
this.events.change?.notify(this.current);
|
|
48
|
+
}
|
|
49
|
+
addDependent(e) {
|
|
50
|
+
this.dependents ||= /* @__PURE__ */ new Set(), this.dependents.add(e);
|
|
51
|
+
}
|
|
52
|
+
removeDependent(e) {
|
|
53
|
+
this.dependents && this.dependents.delete(e);
|
|
54
|
+
}
|
|
55
|
+
get() {
|
|
56
|
+
return collectMotionValues.current && collectMotionValues.current.push(this), this.current;
|
|
57
|
+
}
|
|
58
|
+
getPrevious() {
|
|
59
|
+
return this.prev;
|
|
60
|
+
}
|
|
61
|
+
getVelocity() {
|
|
62
|
+
let e = time.now();
|
|
63
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > MAX_VELOCITY_DELTA) return 0;
|
|
64
|
+
let c = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);
|
|
65
|
+
return velocityPerSecond(parseFloat(this.current) - parseFloat(this.prevFrameValue), c);
|
|
66
|
+
}
|
|
67
|
+
start(e) {
|
|
68
|
+
return this.stop(), new Promise((s) => {
|
|
69
|
+
this.hasAnimated = !0, this.animation = e(s), this.events.animationStart && this.events.animationStart.notify();
|
|
70
|
+
}).then(() => {
|
|
71
|
+
this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
stop() {
|
|
75
|
+
this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
|
|
76
|
+
}
|
|
77
|
+
isAnimating() {
|
|
78
|
+
return !!this.animation;
|
|
79
|
+
}
|
|
80
|
+
clearAnimation() {
|
|
81
|
+
delete this.animation;
|
|
82
|
+
}
|
|
83
|
+
destroy() {
|
|
84
|
+
this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
85
|
+
}
|
|
212
86
|
};
|
|
87
|
+
function motionValue(e, s) {
|
|
88
|
+
return new MotionValue(e, s);
|
|
89
|
+
}
|
|
90
|
+
export { MotionValue, collectMotionValues, motionValue };
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { isColorString } from "./utils.js";
|
|
2
|
+
import { rgba } from "./rgba.js";
|
|
3
|
+
function parseHex(e) {
|
|
4
|
+
let t = "", n = "", r = "", i = "";
|
|
5
|
+
return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), r = e.substring(5, 7), i = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), r = e.substring(3, 4), i = e.substring(4, 5), t += t, n += n, r += r, i += i), {
|
|
6
|
+
red: parseInt(t, 16),
|
|
7
|
+
green: parseInt(n, 16),
|
|
8
|
+
blue: parseInt(r, 16),
|
|
9
|
+
alpha: i ? parseInt(i, 16) / 255 : 1
|
|
10
|
+
};
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
u as hex
|
|
12
|
+
var hex = {
|
|
13
|
+
test: /* @__PURE__ */ isColorString("#"),
|
|
14
|
+
parse: parseHex,
|
|
15
|
+
transform: rgba.transform
|
|
19
16
|
};
|
|
17
|
+
export { hex };
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
1
|
+
function hueToRgb(e, t, n) {
|
|
2
|
+
return n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
3
3
|
}
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
4
|
+
function hslaToRgba({ hue: t, saturation: n, lightness: r, alpha: i }) {
|
|
5
|
+
t /= 360, n /= 100, r /= 100;
|
|
6
|
+
let a = 0, o = 0, s = 0;
|
|
7
|
+
if (!n) a = o = s = r;
|
|
8
|
+
else {
|
|
9
|
+
let i = r < .5 ? r * (1 + n) : r + n - r * n, c = 2 * r - i;
|
|
10
|
+
a = hueToRgb(c, i, t + 1 / 3), o = hueToRgb(c, i, t), s = hueToRgb(c, i, t - 1 / 3);
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
red: Math.round(a * 255),
|
|
14
|
+
green: Math.round(o * 255),
|
|
15
|
+
blue: Math.round(s * 255),
|
|
16
|
+
alpha: i
|
|
17
|
+
};
|
|
19
18
|
}
|
|
20
|
-
export {
|
|
21
|
-
R as hslaToRgba
|
|
22
|
-
};
|
|
19
|
+
export { hslaToRgba };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { alpha
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
u as hsla
|
|
1
|
+
import { alpha } from "../numbers/index.js";
|
|
2
|
+
import { sanitize } from "../utils/sanitize.js";
|
|
3
|
+
import { isColorString, splitColor } from "./utils.js";
|
|
4
|
+
import { percent } from "../numbers/units.js";
|
|
5
|
+
var hsla = {
|
|
6
|
+
test: /* @__PURE__ */ isColorString("hsl", "hue"),
|
|
7
|
+
parse: /* @__PURE__ */ splitColor("hue", "saturation", "lightness"),
|
|
8
|
+
transform: ({ hue: r, saturation: i, lightness: a, alpha: o = 1 }) => "hsla(" + Math.round(r) + ", " + percent.transform(sanitize(i)) + ", " + percent.transform(sanitize(a)) + ", " + sanitize(alpha.transform(o)) + ")"
|
|
12
9
|
};
|
|
10
|
+
export { hsla };
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
a as color
|
|
1
|
+
import { rgba } from "./rgba.js";
|
|
2
|
+
import { hex } from "./hex.js";
|
|
3
|
+
import { hsla } from "./hsla.js";
|
|
4
|
+
var color = {
|
|
5
|
+
test: (r) => rgba.test(r) || hex.test(r) || hsla.test(r),
|
|
6
|
+
parse: (r) => rgba.test(r) ? rgba.parse(r) : hsla.test(r) ? hsla.parse(r) : hex.parse(r),
|
|
7
|
+
transform: (n) => typeof n == "string" ? n : n.hasOwnProperty("red") ? rgba.transform(n) : hsla.transform(n),
|
|
8
|
+
getAnimatableNone: (e) => {
|
|
9
|
+
let n = color.parse(e);
|
|
10
|
+
return n.alpha = 0, color.transform(n);
|
|
11
|
+
}
|
|
15
12
|
};
|
|
13
|
+
export { color };
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
o as rgbUnit,
|
|
15
|
-
h as rgba
|
|
1
|
+
import { clamp } from "../../../../../../motion-utils/dist/es/clamp.js";
|
|
2
|
+
import { alpha, number } from "../numbers/index.js";
|
|
3
|
+
import { sanitize } from "../utils/sanitize.js";
|
|
4
|
+
import { isColorString, splitColor } from "./utils.js";
|
|
5
|
+
var clampRgbUnit = (a) => clamp(0, 255, a), rgbUnit = {
|
|
6
|
+
...number,
|
|
7
|
+
transform: (e) => Math.round(clampRgbUnit(e))
|
|
8
|
+
}, rgba = {
|
|
9
|
+
test: /* @__PURE__ */ isColorString("rgb", "red"),
|
|
10
|
+
parse: /* @__PURE__ */ splitColor("red", "green", "blue"),
|
|
11
|
+
transform: ({ red: e, green: o, blue: s, alpha: c = 1 }) => "rgba(" + rgbUnit.transform(e) + ", " + rgbUnit.transform(o) + ", " + rgbUnit.transform(s) + ", " + sanitize(alpha.transform(c)) + ")"
|
|
16
12
|
};
|
|
13
|
+
export { rgbUnit, rgba };
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import { floatRegex
|
|
2
|
-
import { isNullish
|
|
3
|
-
import { singleColorRegex
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
h as isColorString,
|
|
17
|
-
u as splitColor
|
|
1
|
+
import { floatRegex } from "../utils/float-regex.js";
|
|
2
|
+
import { isNullish } from "../utils/is-nullish.js";
|
|
3
|
+
import { singleColorRegex } from "../utils/single-color-regex.js";
|
|
4
|
+
var isColorString = (e, r) => (i) => !!(typeof i == "string" && singleColorRegex.test(i) && i.startsWith(e) || r && !isNullish(i) && Object.prototype.hasOwnProperty.call(i, r)), splitColor = (t, n, r) => (i) => {
|
|
5
|
+
if (typeof i != "string") return i;
|
|
6
|
+
let [a, o, s, c] = i.match(floatRegex);
|
|
7
|
+
return {
|
|
8
|
+
[t]: parseFloat(a),
|
|
9
|
+
[n]: parseFloat(o),
|
|
10
|
+
[r]: parseFloat(s),
|
|
11
|
+
alpha: c === void 0 ? 1 : parseFloat(c)
|
|
12
|
+
};
|
|
18
13
|
};
|
|
14
|
+
export { isColorString, splitColor };
|