@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,65 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
skewX: (t) => e(Math.atan(t[4])),
|
|
32
|
-
skewY: (t) => e(Math.atan(t[1])),
|
|
33
|
-
skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
|
|
1
|
+
var radToDeg = (e) => e * 180 / Math.PI, rotate = (a) => rebaseAngle(radToDeg(Math.atan2(a[1], a[0]))), matrix2dParsers = {
|
|
2
|
+
x: 4,
|
|
3
|
+
y: 5,
|
|
4
|
+
translateX: 4,
|
|
5
|
+
translateY: 5,
|
|
6
|
+
scaleX: 0,
|
|
7
|
+
scaleY: 3,
|
|
8
|
+
scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
|
|
9
|
+
rotate,
|
|
10
|
+
rotateZ: rotate,
|
|
11
|
+
skewX: (a) => radToDeg(Math.atan(a[1])),
|
|
12
|
+
skewY: (a) => radToDeg(Math.atan(a[2])),
|
|
13
|
+
skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
|
|
14
|
+
}, rebaseAngle = (e) => (e %= 360, e < 0 && (e += 360), e), rotateZ = rotate, scaleX = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), scaleY = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), matrix3dParsers = {
|
|
15
|
+
x: 12,
|
|
16
|
+
y: 13,
|
|
17
|
+
z: 14,
|
|
18
|
+
translateX: 12,
|
|
19
|
+
translateY: 13,
|
|
20
|
+
translateZ: 14,
|
|
21
|
+
scaleX,
|
|
22
|
+
scaleY,
|
|
23
|
+
scale: (e) => (scaleX(e) + scaleY(e)) / 2,
|
|
24
|
+
rotateX: (a) => rebaseAngle(radToDeg(Math.atan2(a[6], a[5]))),
|
|
25
|
+
rotateY: (a) => rebaseAngle(radToDeg(Math.atan2(-a[2], a[0]))),
|
|
26
|
+
rotateZ,
|
|
27
|
+
rotate: rotateZ,
|
|
28
|
+
skewX: (a) => radToDeg(Math.atan(a[4])),
|
|
29
|
+
skewY: (a) => radToDeg(Math.atan(a[1])),
|
|
30
|
+
skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
|
|
34
31
|
};
|
|
35
|
-
function
|
|
36
|
-
|
|
32
|
+
function defaultTransformValue(e) {
|
|
33
|
+
return e.includes("scale") ? 1 : 0;
|
|
37
34
|
}
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (!r)
|
|
50
|
-
return m(a);
|
|
51
|
-
const o = n[a], u = r[1].split(",").map(p);
|
|
52
|
-
return typeof o == "function" ? o(u) : u[o];
|
|
35
|
+
function parseValueFromTransform(e, a) {
|
|
36
|
+
if (!e || e === "none") return defaultTransformValue(a);
|
|
37
|
+
let s = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u), c, l;
|
|
38
|
+
if (s) c = matrix3dParsers, l = s;
|
|
39
|
+
else {
|
|
40
|
+
let a = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
41
|
+
c = matrix2dParsers, l = a;
|
|
42
|
+
}
|
|
43
|
+
if (!l) return defaultTransformValue(a);
|
|
44
|
+
let u = c[a], d = l[1].split(",").map(convertTransformToNumber);
|
|
45
|
+
return typeof u == "function" ? u(d) : d[u];
|
|
53
46
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
var readTransformValue = (e, a) => {
|
|
48
|
+
let { transform: o = "none" } = getComputedStyle(e);
|
|
49
|
+
return parseValueFromTransform(o, a);
|
|
57
50
|
};
|
|
58
|
-
function
|
|
59
|
-
|
|
51
|
+
function convertTransformToNumber(e) {
|
|
52
|
+
return parseFloat(e.trim());
|
|
60
53
|
}
|
|
61
|
-
export {
|
|
62
|
-
m as defaultTransformValue,
|
|
63
|
-
b as parseValueFromTransform,
|
|
64
|
-
X as readTransformValue
|
|
65
|
-
};
|
|
54
|
+
export { defaultTransformValue, parseValueFromTransform, readTransformValue };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { isCSSVar
|
|
2
|
-
function
|
|
3
|
-
|
|
1
|
+
import { isCSSVar } from "./is-css-var.js";
|
|
2
|
+
function setStyle(t, n, r) {
|
|
3
|
+
isCSSVar(n) ? t.style.setProperty(n, r) : t.style[n] = r;
|
|
4
4
|
}
|
|
5
|
-
export {
|
|
6
|
-
i as setStyle
|
|
7
|
-
};
|
|
5
|
+
export { setStyle };
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { defaultTransformValue
|
|
4
|
-
import {
|
|
5
|
-
import { DOMVisualElement
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { invariant } from "../../../../../motion-utils/dist/es/errors.js";
|
|
2
|
+
import { isCSSVariableName } from "../../animation/utils/is-css-variable.js";
|
|
3
|
+
import { defaultTransformValue, readTransformValue } from "../dom/parse-transform.js";
|
|
4
|
+
import { transformProps } from "../utils/keys-transform.js";
|
|
5
|
+
import { DOMVisualElement } from "../dom/DOMVisualElement.js";
|
|
6
|
+
import { measureViewportBox } from "../../projection/utils/measure.js";
|
|
7
|
+
import { buildHTMLStyles } from "./utils/build-styles.js";
|
|
8
|
+
import { renderHTML } from "./utils/render.js";
|
|
9
|
+
import { scrapeMotionValuesFromProps } from "./utils/scrape-motion-values.js";
|
|
10
|
+
function getComputedStyle(e) {
|
|
11
|
+
return window.getComputedStyle(e);
|
|
11
12
|
}
|
|
12
|
-
class
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
x as HTMLVisualElement,
|
|
36
|
-
d as getComputedStyle
|
|
13
|
+
var HTMLVisualElement = class extends DOMVisualElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.type = "html", this.renderInstance = renderHTML;
|
|
16
|
+
}
|
|
17
|
+
mount(c) {
|
|
18
|
+
invariant(!!c.style, "motion.create() components must forward their ref to a HTML or SVG element", "custom-component-ref"), super.mount(c);
|
|
19
|
+
}
|
|
20
|
+
readValueFromInstance(e, d) {
|
|
21
|
+
if (transformProps.has(d)) return this.projection?.isProjecting ? defaultTransformValue(d) : readTransformValue(e, d);
|
|
22
|
+
{
|
|
23
|
+
let l = getComputedStyle(e), u = (isCSSVariableName(d) ? l.getPropertyValue(d) : l[d]) || 0;
|
|
24
|
+
return typeof u == "string" ? u.trim() : u;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
measureInstanceViewportBox(e, { transformPagePoint: c }) {
|
|
28
|
+
return measureViewportBox(e, c);
|
|
29
|
+
}
|
|
30
|
+
build(e, c, l) {
|
|
31
|
+
buildHTMLStyles(e, c, l.transformTemplate);
|
|
32
|
+
}
|
|
33
|
+
scrapeMotionValuesFromProps(e, c, l) {
|
|
34
|
+
return scrapeMotionValuesFromProps(e, c, l);
|
|
35
|
+
}
|
|
37
36
|
};
|
|
37
|
+
export { HTMLVisualElement };
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { buildTransform
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
1
|
+
import { isCSSVariableName } from "../../../animation/utils/is-css-variable.js";
|
|
2
|
+
import { transformProps } from "../../utils/keys-transform.js";
|
|
3
|
+
import { numberValueTypes } from "../../../value/types/maps/number.js";
|
|
4
|
+
import { getValueAsType } from "../../../value/types/utils/get-as-type.js";
|
|
5
|
+
import { buildTransform } from "./build-transform.js";
|
|
6
|
+
function buildHTMLStyles(a, o, s) {
|
|
7
|
+
let { style: c, vars: l, transformOrigin: u } = a, d = !1, f = !1;
|
|
8
|
+
for (let i in o) {
|
|
9
|
+
let a = o[i];
|
|
10
|
+
if (transformProps.has(i)) {
|
|
11
|
+
d = !0;
|
|
12
|
+
continue;
|
|
13
|
+
} else if (isCSSVariableName(i)) {
|
|
14
|
+
l[i] = a;
|
|
15
|
+
continue;
|
|
16
|
+
} else {
|
|
17
|
+
let e = getValueAsType(a, numberValueTypes[i]);
|
|
18
|
+
i.startsWith("origin") ? (f = !0, u[i] = e) : c[i] = e;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
if (o.transform || (d || s ? c.transform = buildTransform(o, a.transform, s) : c.transform &&= "none"), f) {
|
|
22
|
+
let { originX: e = "50%", originY: n = "50%", originZ: r = 0 } = u;
|
|
23
|
+
c.transformOrigin = `${e} ${n} ${r}`;
|
|
24
|
+
}
|
|
26
25
|
}
|
|
27
|
-
export {
|
|
28
|
-
S as buildHTMLStyles
|
|
29
|
-
};
|
|
26
|
+
export { buildHTMLStyles };
|
|
@@ -1,38 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { numberValueTypes
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const u = f.pathRotation;
|
|
34
|
-
return u && (o = !1, t += `rotate(${c(u, p.pathRotation)}) `), t = t.trim(), n ? t = n(l, o ? "" : t) : o && (t = "none"), t;
|
|
1
|
+
import { transformPropOrder } from "../../utils/keys-transform.js";
|
|
2
|
+
import { numberValueTypes } from "../../../value/types/maps/number.js";
|
|
3
|
+
import { getValueAsType } from "../../../value/types/utils/get-as-type.js";
|
|
4
|
+
var translateAlias = {
|
|
5
|
+
x: "translateX",
|
|
6
|
+
y: "translateY",
|
|
7
|
+
z: "translateZ",
|
|
8
|
+
transformPerspective: "perspective"
|
|
9
|
+
}, numTransforms = transformPropOrder.length;
|
|
10
|
+
function buildTransform(a, o, s) {
|
|
11
|
+
let c = "", l = !0;
|
|
12
|
+
for (let u = 0; u < numTransforms; u++) {
|
|
13
|
+
let i = transformPropOrder[u], d = a[i];
|
|
14
|
+
if (d === void 0) continue;
|
|
15
|
+
let f = !0;
|
|
16
|
+
if (typeof d == "number") f = d === (i.startsWith("scale") ? 1 : 0);
|
|
17
|
+
else {
|
|
18
|
+
let e = parseFloat(d);
|
|
19
|
+
f = i.startsWith("scale") ? e === 1 : e === 0;
|
|
20
|
+
}
|
|
21
|
+
if (!f || s) {
|
|
22
|
+
let e = getValueAsType(d, numberValueTypes[i]);
|
|
23
|
+
if (!f) {
|
|
24
|
+
l = !1;
|
|
25
|
+
let r = translateAlias[i] || i;
|
|
26
|
+
c += `${r}(${e}) `;
|
|
27
|
+
}
|
|
28
|
+
s && (o[i] = e);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
let u = a.pathRotation;
|
|
32
|
+
return u && (l = !1, c += `rotate(${getValueAsType(u, numberValueTypes.pathRotation)}) `), c = c.trim(), s ? c = s(o, l ? "" : c) : l && (c = "none"), c;
|
|
35
33
|
}
|
|
36
|
-
export {
|
|
37
|
-
A as buildTransform
|
|
38
|
-
};
|
|
34
|
+
export { buildTransform };
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
t[e] = n[e];
|
|
6
|
-
y?.applyProjectionStyles(t, l);
|
|
7
|
-
for (e in o)
|
|
8
|
-
t.setProperty(e, o[e]);
|
|
1
|
+
function renderHTML(e, { style: t, vars: n }, r, i) {
|
|
2
|
+
let a = e.style, o;
|
|
3
|
+
for (o in t) a[o] = t[o];
|
|
4
|
+
for (o in i?.applyProjectionStyles(a, r), n) a.setProperty(o, n[o]);
|
|
9
5
|
}
|
|
10
|
-
export {
|
|
11
|
-
i as renderHTML
|
|
12
|
-
};
|
|
6
|
+
export { renderHTML };
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { isMotionValue
|
|
2
|
-
import { isForcedMotionValue
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
(i(o[e]) || r && i(r[e]) || u(e, n) || l?.getValue(e)?.liveStyle !== void 0) && (t[e] = o[e]);
|
|
9
|
-
return t;
|
|
1
|
+
import { isMotionValue } from "../../../value/utils/is-motion-value.js";
|
|
2
|
+
import { isForcedMotionValue } from "../../utils/is-forced-motion-value.js";
|
|
3
|
+
function scrapeMotionValuesFromProps(n, r, i) {
|
|
4
|
+
let a = n.style, o = r?.style, s = {};
|
|
5
|
+
if (!a) return s;
|
|
6
|
+
for (let r in a) (isMotionValue(a[r]) || o && isMotionValue(o[r]) || isForcedMotionValue(r, n) || i?.getValue(r)?.liveStyle !== void 0) && (s[r] = a[r]);
|
|
7
|
+
return s;
|
|
10
8
|
}
|
|
11
|
-
export {
|
|
12
|
-
a as scrapeMotionValuesFromProps
|
|
13
|
-
};
|
|
9
|
+
export { scrapeMotionValuesFromProps };
|
|
@@ -1,40 +1,38 @@
|
|
|
1
|
-
import { transformProps
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { buildSVGAttrs
|
|
7
|
-
import { camelCaseAttributes
|
|
8
|
-
import { isSVGTag
|
|
9
|
-
import { renderSVG
|
|
10
|
-
import { scrapeMotionValuesFromProps
|
|
11
|
-
class
|
|
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
|
-
export {
|
|
39
|
-
A as SVGVisualElement
|
|
1
|
+
import { transformProps } from "../utils/keys-transform.js";
|
|
2
|
+
import { camelToDash } from "../dom/utils/camel-to-dash.js";
|
|
3
|
+
import { getDefaultValueType } from "../../value/types/maps/defaults.js";
|
|
4
|
+
import { createBox } from "../../projection/geometry/models.js";
|
|
5
|
+
import { DOMVisualElement } from "../dom/DOMVisualElement.js";
|
|
6
|
+
import { buildSVGAttrs } from "./utils/build-attrs.js";
|
|
7
|
+
import { camelCaseAttributes } from "./utils/camel-case-attrs.js";
|
|
8
|
+
import { isSVGTag } from "./utils/is-svg-tag.js";
|
|
9
|
+
import { renderSVG } from "./utils/render.js";
|
|
10
|
+
import { scrapeMotionValuesFromProps } from "./utils/scrape-motion-values.js";
|
|
11
|
+
var SVGVisualElement = class extends DOMVisualElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = createBox;
|
|
14
|
+
}
|
|
15
|
+
getBaseTargetFromProps(e, s) {
|
|
16
|
+
return e[s];
|
|
17
|
+
}
|
|
18
|
+
readValueFromInstance(l, u) {
|
|
19
|
+
if (transformProps.has(u)) {
|
|
20
|
+
let e = getDefaultValueType(u);
|
|
21
|
+
return e && e.default || 0;
|
|
22
|
+
}
|
|
23
|
+
return u = camelCaseAttributes.has(u) ? u : camelToDash(u), l.getAttribute(u);
|
|
24
|
+
}
|
|
25
|
+
scrapeMotionValuesFromProps(e, s, c) {
|
|
26
|
+
return scrapeMotionValuesFromProps(e, s, c);
|
|
27
|
+
}
|
|
28
|
+
build(e, s, c) {
|
|
29
|
+
buildSVGAttrs(e, s, this.isSVGTag, c.transformTemplate, c.style);
|
|
30
|
+
}
|
|
31
|
+
renderInstance(e, s, c, l) {
|
|
32
|
+
renderSVG(e, s, c, l);
|
|
33
|
+
}
|
|
34
|
+
mount(e) {
|
|
35
|
+
this.isSVGTag = isSVGTag(e.tagName), super.mount(e);
|
|
36
|
+
}
|
|
40
37
|
};
|
|
38
|
+
export { SVGVisualElement };
|
|
@@ -1,32 +1,20 @@
|
|
|
1
|
-
import { buildHTMLStyles
|
|
2
|
-
import { buildSVGPath
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { buildHTMLStyles } from "../../html/utils/build-styles.js";
|
|
2
|
+
import { buildSVGPath } from "./path.js";
|
|
3
|
+
var cssMotionPathProperties = [
|
|
4
|
+
"offsetDistance",
|
|
5
|
+
"offsetPath",
|
|
6
|
+
"offsetRotate",
|
|
7
|
+
"offsetAnchor"
|
|
8
8
|
];
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if (y(r, l, u), a) {
|
|
20
|
-
r.style.viewBox && (r.attrs.viewBox = r.style.viewBox);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
r.attrs = r.style, r.style = {};
|
|
24
|
-
const { attrs: f, style: o } = r;
|
|
25
|
-
f.transform && (o.transform = f.transform, delete f.transform), (o.transform || f.transformOrigin) && (o.transformOrigin = f.transformOrigin ?? "50% 50%", delete f.transformOrigin), o.transform && (o.transformBox = x?.transformBox ?? "fill-box", delete f.transformBox);
|
|
26
|
-
for (const i of B)
|
|
27
|
-
f[i] !== void 0 && (o[i] = f[i], delete f[i]);
|
|
28
|
-
e !== void 0 && (f.x = e), n !== void 0 && (f.y = n), s !== void 0 && (f.scale = s), t !== void 0 && c(f, t, d, m, !1);
|
|
9
|
+
function buildSVGAttrs(r, { attrX: i, attrY: a, attrScale: o, pathLength: s, pathSpacing: c = 1, pathOffset: l = 0, ...u }, d, f, p) {
|
|
10
|
+
if (buildHTMLStyles(r, u, f), d) {
|
|
11
|
+
r.style.viewBox && (r.attrs.viewBox = r.style.viewBox);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
r.attrs = r.style, r.style = {};
|
|
15
|
+
let { attrs: m, style: h } = r;
|
|
16
|
+
m.transform && (h.transform = m.transform, delete m.transform), (h.transform || m.transformOrigin) && (h.transformOrigin = m.transformOrigin ?? "50% 50%", delete m.transformOrigin), h.transform && (h.transformBox = p?.transformBox ?? "fill-box", delete m.transformBox);
|
|
17
|
+
for (let e of cssMotionPathProperties) m[e] !== void 0 && (h[e] = m[e], delete m[e]);
|
|
18
|
+
i !== void 0 && (m.x = i), a !== void 0 && (m.y = a), o !== void 0 && (m.scale = o), s !== void 0 && buildSVGPath(m, s, c, l, !1);
|
|
29
19
|
}
|
|
30
|
-
export {
|
|
31
|
-
P as buildSVGAttrs
|
|
32
|
-
};
|
|
20
|
+
export { buildSVGAttrs };
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
var camelCaseAttributes = new Set([
|
|
2
|
+
"baseFrequency",
|
|
3
|
+
"diffuseConstant",
|
|
4
|
+
"kernelMatrix",
|
|
5
|
+
"kernelUnitLength",
|
|
6
|
+
"keySplines",
|
|
7
|
+
"keyTimes",
|
|
8
|
+
"limitingConeAngle",
|
|
9
|
+
"markerHeight",
|
|
10
|
+
"markerWidth",
|
|
11
|
+
"numOctaves",
|
|
12
|
+
"targetX",
|
|
13
|
+
"targetY",
|
|
14
|
+
"surfaceScale",
|
|
15
|
+
"specularConstant",
|
|
16
|
+
"specularExponent",
|
|
17
|
+
"stdDeviation",
|
|
18
|
+
"tableValues",
|
|
19
|
+
"viewBox",
|
|
20
|
+
"gradientTransform",
|
|
21
|
+
"pathLength",
|
|
22
|
+
"startOffset",
|
|
23
|
+
"textLength",
|
|
24
|
+
"lengthAdjust"
|
|
25
25
|
]);
|
|
26
|
-
export {
|
|
27
|
-
e as camelCaseAttributes
|
|
28
|
-
};
|
|
26
|
+
export { camelCaseAttributes };
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
},
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var dashKeys = {
|
|
2
|
+
offset: "stroke-dashoffset",
|
|
3
|
+
array: "stroke-dasharray"
|
|
4
|
+
}, camelKeys = {
|
|
5
|
+
offset: "strokeDashoffset",
|
|
6
|
+
array: "strokeDasharray"
|
|
7
7
|
};
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
function buildSVGPath(n, r, i = 1, a = 0, o = !0) {
|
|
9
|
+
n.pathLength = 1;
|
|
10
|
+
let s = o ? dashKeys : camelKeys;
|
|
11
|
+
n[s.offset] = `${-a}`, n[s.array] = `${r} ${i}`;
|
|
12
12
|
}
|
|
13
|
-
export {
|
|
14
|
-
y as buildSVGPath
|
|
15
|
-
};
|
|
13
|
+
export { buildSVGPath };
|