@code0-tech/pictor 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/rolldown_runtime.js +9 -0
- package/dist/assets/Alert.style.css +1 -0
- package/dist/assets/Aurora.style.css +1 -0
- package/dist/assets/Avatar.style.css +1 -0
- package/dist/assets/Badge.style.css +1 -0
- package/dist/assets/Breadcrumb.style.css +1 -0
- package/dist/assets/Button.style.css +1 -0
- package/dist/assets/ButtonGroup.style.css +1 -0
- package/dist/assets/Card.style.css +1 -0
- package/dist/assets/Chart.style.css +1 -0
- package/dist/assets/Col.style.css +1 -0
- package/dist/assets/ColorInput.style.css +1 -0
- package/dist/assets/Command.style.css +1 -0
- package/dist/assets/Container.style.css +1 -0
- package/dist/assets/ContextMenu.style.css +1 -0
- package/dist/assets/DataTable.style.css +1 -0
- package/dist/assets/DateInput.style.css +1 -0
- package/dist/assets/Dialog.style.css +1 -0
- package/dist/assets/Editor.styles.css +1 -0
- package/dist/assets/EditorInput.style.css +1 -0
- package/dist/assets/FileInput.style.css +1 -0
- package/dist/assets/FileTabs.style.css +1 -0
- package/dist/assets/FullScreen.style.css +1 -0
- package/dist/assets/Gantt.style.css +1 -0
- package/dist/assets/Icon.style.css +1 -0
- package/dist/assets/Input.style.css +1 -0
- package/dist/assets/InputWrapper.style.css +1 -0
- package/dist/assets/JsonView.style.css +1 -0
- package/dist/assets/Layout.style.css +1 -0
- package/dist/assets/Menu.style.css +1 -0
- package/dist/assets/Progress.style.css +1 -0
- package/dist/assets/Quote.style.css +1 -0
- package/dist/assets/Resizable.style.css +1 -0
- package/dist/assets/Row.style.css +1 -0
- package/dist/assets/ScrollArea.style.css +1 -0
- package/dist/assets/SegmentedControl.style.css +1 -0
- package/dist/assets/SelectInput.style.css +1 -0
- package/dist/assets/Tab.style.css +1 -0
- package/dist/assets/Text.style.css +1 -0
- package/dist/assets/Toast.style.css +1 -0
- package/dist/assets/Tooltip.style.css +1 -0
- package/dist/components/alert/Alert.js +33 -41
- package/dist/components/aurora/Aurora.js +26 -22
- package/dist/components/avatar/Avatar.js +57 -55
- package/dist/components/badge/Badge.js +57 -64
- package/dist/components/breadcrumb/Breadcrumb.js +16 -21
- package/dist/components/button/Button.js +23 -31
- package/dist/components/button-group/ButtonGroup.js +28 -31
- package/dist/components/card/Card.js +28 -43
- package/dist/components/card/CardSection.js +21 -29
- package/dist/components/chart/Chart.js +138 -153
- package/dist/components/chart/LineChart.js +74 -74
- package/dist/components/chart/index.js +3 -8
- package/dist/components/col/Col.js +18 -29
- package/dist/components/command/Command.js +100 -134
- package/dist/components/container/Container.js +18 -23
- package/dist/components/context-menu/ContextMenu.js +118 -112
- package/dist/components/data-table/DataTable.js +53 -64
- package/dist/components/data-table/DataTableColumn.js +17 -22
- package/dist/components/data-table/DataTableFilterInput.js +208 -205
- package/dist/components/data-table/DataTableFilterSuggestionMenu.js +58 -48
- package/dist/components/data-table/DataTableHeader.js +33 -38
- package/dist/components/data-table/DataTablePagination.js +61 -74
- package/dist/components/data-table/index.js +7 -22
- package/dist/components/dialog/Dialog.js +106 -97
- package/dist/components/editor/Editor.js +352 -323
- package/dist/components/file-tabs/FileTabs.js +77 -73
- package/dist/components/file-tabs/FileTabs.service.js +85 -87
- package/dist/components/file-tabs/FileTabs.view.js +0 -1
- package/dist/components/file-tabs/index.js +3 -9
- package/dist/components/flex/Flex.js +18 -23
- package/dist/components/form/CheckboxInput.js +72 -76
- package/dist/components/form/ColorInput.js +378 -353
- package/dist/components/form/DateInput.js +315 -265
- package/dist/components/form/EditorInput.js +597 -579
- package/dist/components/form/EmailInput.js +30 -23
- package/dist/components/form/FileInput.js +92 -123
- package/dist/components/form/Input.js +64 -58
- package/dist/components/form/Input.utils.js +25 -37
- package/dist/components/form/InputDescription.js +10 -11
- package/dist/components/form/InputLabel.js +17 -22
- package/dist/components/form/InputMessage.js +16 -17
- package/dist/components/form/InputWrapper.js +55 -65
- package/dist/components/form/NumberInput.js +41 -20
- package/dist/components/form/PasswordInput.js +71 -54
- package/dist/components/form/PinInput.js +49 -65
- package/dist/components/form/RadioGroup.js +41 -50
- package/dist/components/form/RadioInput.js +30 -29
- package/dist/components/form/SelectInput.js +68 -92
- package/dist/components/form/SwitchInput.js +17 -18
- package/dist/components/form/TagInput.js +108 -122
- package/dist/components/form/TextAreaInput.js +24 -21
- package/dist/components/form/TextInput.js +30 -22
- package/dist/components/form/index.js +22 -87
- package/dist/components/form/useForm.js +87 -88
- package/dist/components/fullscreen/FullScreen.js +27 -27
- package/dist/components/gantt/Gantt.js +99 -98
- package/dist/components/gantt/GanttGroup.js +210 -195
- package/dist/components/gantt/GanttHeader.js +78 -81
- package/dist/components/gantt/GanttItem.js +18 -22
- package/dist/components/icon/Icon.d.ts +6 -4
- package/dist/components/icon/Icon.js +53 -42
- package/dist/components/icon/codezero/codezero.js +10 -0
- package/dist/components/icon/codezero/gls.js +9 -0
- package/dist/components/icon/codezero/index.js +17 -13
- package/dist/components/json-view/JsonView.js +119 -109
- package/dist/components/layout/Layout.js +100 -78
- package/dist/components/menu/Menu.js +134 -128
- package/dist/components/progress/ProgressCircle.js +60 -49
- package/dist/components/progress/ProgressLinear.js +39 -43
- package/dist/components/quote/Quote.js +51 -43
- package/dist/components/resizable/Resizable.js +35 -33
- package/dist/components/row/Row.js +18 -23
- package/dist/components/scroll-area/ScrollArea.js +65 -76
- package/dist/components/segmented-control/SegmentedControl.js +46 -50
- package/dist/components/spacing/Spacing.js +15 -23
- package/dist/components/tab/Tab.js +73 -66
- package/dist/components/text/Text.js +18 -25
- package/dist/components/toast/Toast.js +104 -82
- package/dist/components/tooltip/Tooltip.js +65 -55
- package/dist/index.js +76 -272
- package/dist/node_modules/@lezer/common/dist/index.js +778 -143
- package/dist/node_modules/@lezer/highlight/dist/index.js +305 -536
- package/dist/node_modules/prettier/plugins/babel.js +9582 -7023
- package/dist/node_modules/prettier/plugins/estree.js +6997 -4377
- package/dist/node_modules/prettier/standalone.js +3444 -2415
- package/dist/utils/arrayService.js +0 -1
- package/dist/utils/color.js +46 -41
- package/dist/utils/component.js +60 -129
- package/dist/utils/contextStore.js +47 -58
- package/dist/utils/index.js +7 -29
- package/dist/utils/motion.js +84 -113
- package/dist/utils/reactiveArrayService.js +80 -76
- package/dist/utils/size.js +14 -26
- package/dist/utils/utils.js +0 -1
- package/dist/utils/view.js +27 -24
- package/dist/vite-env.d.js +0 -1
- package/package.json +28 -23
- package/dist/_virtual/compiler-runtime.js +0 -5
- package/dist/_virtual/compiler-runtime2.js +0 -4
- package/dist/_virtual/react-compiler-runtime.development.js +0 -4
- package/dist/_virtual/react-compiler-runtime.production.js +0 -4
- package/dist/assets/components/alert/Alert.style.css +0 -1
- package/dist/assets/components/aurora/Aurora.style.css +0 -1
- package/dist/assets/components/avatar/Avatar.style.css +0 -1
- package/dist/assets/components/badge/Badge.style.css +0 -1
- package/dist/assets/components/breadcrumb/Breadcrumb.style.css +0 -1
- package/dist/assets/components/button/Button.style.css +0 -1
- package/dist/assets/components/button-group/ButtonGroup.style.css +0 -1
- package/dist/assets/components/card/Card.style.css +0 -1
- package/dist/assets/components/chart/Chart.style.css +0 -1
- package/dist/assets/components/col/Col.style.css +0 -1
- package/dist/assets/components/command/Command.style.css +0 -1
- package/dist/assets/components/container/Container.style.css +0 -1
- package/dist/assets/components/context-menu/ContextMenu.style.css +0 -1
- package/dist/assets/components/data-table/DataTable.style.css +0 -1
- package/dist/assets/components/dialog/Dialog.style.css +0 -1
- package/dist/assets/components/editor/Editor.styles.css +0 -1
- package/dist/assets/components/file-tabs/FileTabs.style.css +0 -1
- package/dist/assets/components/form/ColorInput.style.css +0 -1
- package/dist/assets/components/form/DateInput.style.css +0 -1
- package/dist/assets/components/form/EditorInput.style.css +0 -1
- package/dist/assets/components/form/FileInput.style.css +0 -1
- package/dist/assets/components/form/Input.style.css +0 -1
- package/dist/assets/components/form/InputWrapper.style.css +0 -1
- package/dist/assets/components/form/SelectInput.style.css +0 -1
- package/dist/assets/components/fullscreen/FullScreen.style.css +0 -1
- package/dist/assets/components/gantt/Gantt.style.css +0 -1
- package/dist/assets/components/icon/Icon.style.css +0 -1
- package/dist/assets/components/json-view/JsonView.style.css +0 -1
- package/dist/assets/components/layout/Layout.style.css +0 -1
- package/dist/assets/components/menu/Menu.style.css +0 -1
- package/dist/assets/components/progress/Progress.style.css +0 -1
- package/dist/assets/components/quote/Quote.style.css +0 -1
- package/dist/assets/components/resizable/Resizable.style.css +0 -1
- package/dist/assets/components/row/Row.style.css +0 -1
- package/dist/assets/components/scroll-area/ScrollArea.style.css +0 -1
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +0 -1
- package/dist/assets/components/tab/Tab.style.css +0 -1
- package/dist/assets/components/text/Text.style.css +0 -1
- package/dist/assets/components/toast/Toast.style.css +0 -1
- package/dist/assets/components/tooltip/Tooltip.style.css +0 -1
- package/dist/components/icon/codezero/codezero.svg.js +0 -5
- package/dist/components/icon/codezero/gls.svg.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -59
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -34
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -47
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -17
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +0 -12
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -15
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -5
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js +0 -14
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -285
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -22
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -67
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +0 -28
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -130
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -43
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +0 -29
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -45
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -33
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -39
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -17
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -60
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -11
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -14
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -45
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +0 -62
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -65
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -52
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -39
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +0 -18
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -16
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -21
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -24
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -27
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -30
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -22
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -6
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +0 -12
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +0 -28
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +0 -112
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +0 -144
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +0 -106
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +0 -38
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +0 -30
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +0 -178
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +0 -46
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +0 -59
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +0 -29
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +0 -68
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +0 -74
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +0 -23
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +0 -31
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +0 -33
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +0 -43
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +0 -38
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +0 -32
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +0 -53
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +0 -38
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +0 -618
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +0 -53
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +0 -263
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +0 -28
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +0 -65
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +0 -29
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +0 -38
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/store.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +0 -40
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +0 -32
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +0 -28
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +0 -143
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +0 -23
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +0 -39
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +0 -23
- package/dist/node_modules/motion-dom/dist/es/resize/index.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +0 -42
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +0 -29
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +0 -51
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +0 -5
- package/dist/node_modules/motion-dom/dist/es/value/index.js +0 -212
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +0 -24
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +0 -51
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +0 -70
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/array.js +0 -11
- package/dist/node_modules/motion-utils/dist/es/clamp.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/easing/back.js +0 -9
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +0 -19
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +0 -32
- package/dist/node_modules/motion-utils/dist/es/errors.js +0 -14
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js +0 -6
- package/dist/node_modules/motion-utils/dist/es/global-config.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/is-object.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/memo.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/noop.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/pipe.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/progress.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +0 -29
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/warn-once.js +0 -8
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +0 -21
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +0 -14
- package/dist/node_modules/react/compiler-runtime.js +0 -10
- /package/dist/assets/{components/flex/Flex.style.css → Flex.style.css} +0 -0
- /package/dist/assets/{components/spacing/Spacing.style.css → Spacing.style.css} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/dist/utils/color.js
CHANGED
|
@@ -1,43 +1,48 @@
|
|
|
1
|
-
import { md5
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return {
|
|
14
|
-
r: 0,
|
|
15
|
-
g: 0,
|
|
16
|
-
b: 0,
|
|
17
|
-
a: 1
|
|
18
|
-
};
|
|
19
|
-
const t = document.createElement("span");
|
|
20
|
-
t.style.color = r, document.body.appendChild(t);
|
|
21
|
-
const n = getComputedStyle(t).color;
|
|
22
|
-
document.body.removeChild(t);
|
|
23
|
-
const o = n.match(/rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)(?:\s*,\s*([\d.]+))?\s*\)/);
|
|
24
|
-
return o ? {
|
|
25
|
-
r: Math.round(Number(o[1])),
|
|
26
|
-
g: Math.round(Number(o[2])),
|
|
27
|
-
b: Math.round(Number(o[3])),
|
|
28
|
-
a: o[4] !== void 0 ? Number(o[4]) : 1
|
|
29
|
-
} : {
|
|
30
|
-
r: 0,
|
|
31
|
-
g: 0,
|
|
32
|
-
b: 0,
|
|
33
|
-
a: 1
|
|
34
|
-
};
|
|
35
|
-
}, l = (r) => Math.min(Math.max(r, 0), 1), g = (r, t) => {
|
|
36
|
-
const n = m(r);
|
|
37
|
-
return `rgba(${n.r}, ${n.g}, ${n.b}, ${l(t)})`;
|
|
1
|
+
import { md5 } from "js-md5";
|
|
2
|
+
const Colors = [
|
|
3
|
+
"primary",
|
|
4
|
+
"secondary",
|
|
5
|
+
"info",
|
|
6
|
+
"success",
|
|
7
|
+
"warning",
|
|
8
|
+
"error"
|
|
9
|
+
];
|
|
10
|
+
var GOLDEN_ANGLE = 137.50776405003785, extractIdNumber = (e) => {
|
|
11
|
+
let t = e.match(/\/(\d+)\s*$/);
|
|
12
|
+
return t ? Number(t[1]) : null;
|
|
38
13
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
14
|
+
const hashToColor = (t, i = 25, a = 320) => {
|
|
15
|
+
let o = a - i, s = extractIdNumber(t);
|
|
16
|
+
if (s != null) return `hsl(${i + s * GOLDEN_ANGLE % o}, 100%, 72%)`;
|
|
17
|
+
let c = md5(md5(t));
|
|
18
|
+
return `hsl(${i + parseInt(c.slice(0, 8), 16) % o}, 100%, 72%)`;
|
|
43
19
|
};
|
|
20
|
+
var parseCssColorToRgba = (e) => {
|
|
21
|
+
if (typeof document > "u") return {
|
|
22
|
+
r: 0,
|
|
23
|
+
g: 0,
|
|
24
|
+
b: 0,
|
|
25
|
+
a: 1
|
|
26
|
+
};
|
|
27
|
+
let t = document.createElement("span");
|
|
28
|
+
t.style.color = e, document.body.appendChild(t);
|
|
29
|
+
let n = getComputedStyle(t).color;
|
|
30
|
+
document.body.removeChild(t);
|
|
31
|
+
let r = n.match(/rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)(?:\s*,\s*([\d.]+))?\s*\)/);
|
|
32
|
+
return r ? {
|
|
33
|
+
r: Math.round(Number(r[1])),
|
|
34
|
+
g: Math.round(Number(r[2])),
|
|
35
|
+
b: Math.round(Number(r[3])),
|
|
36
|
+
a: r[4] === void 0 ? 1 : Number(r[4])
|
|
37
|
+
} : {
|
|
38
|
+
r: 0,
|
|
39
|
+
g: 0,
|
|
40
|
+
b: 0,
|
|
41
|
+
a: 1
|
|
42
|
+
};
|
|
43
|
+
}, clamp01 = (e) => Math.min(Math.max(e, 0), 1);
|
|
44
|
+
const withAlpha = (e, t) => {
|
|
45
|
+
let n = parseCssColorToRgba(e);
|
|
46
|
+
return `rgba(${n.r}, ${n.g}, ${n.b}, ${clamp01(t)})`;
|
|
47
|
+
};
|
|
48
|
+
export { Colors, hashToColor, withAlpha };
|
package/dist/utils/component.js
CHANGED
|
@@ -1,130 +1,61 @@
|
|
|
1
|
-
import
|
|
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
|
-
|
|
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
|
-
...m.fz ? {
|
|
62
|
-
fontSize: `${m.fz}rem`
|
|
63
|
-
} : {},
|
|
64
|
-
...m.ta ? {
|
|
65
|
-
textAlign: m.ta
|
|
66
|
-
} : {},
|
|
67
|
-
...m.w ? {
|
|
68
|
-
width: m.w
|
|
69
|
-
} : {},
|
|
70
|
-
...m.miw ? {
|
|
71
|
-
minWidth: m.miw
|
|
72
|
-
} : {},
|
|
73
|
-
...m.maw ? {
|
|
74
|
-
maxWidth: m.maw
|
|
75
|
-
} : {},
|
|
76
|
-
...m.h ? {
|
|
77
|
-
height: m.h
|
|
78
|
-
} : {},
|
|
79
|
-
...m.mih ? {
|
|
80
|
-
minHeight: m.mih
|
|
81
|
-
} : {},
|
|
82
|
-
...m.mah ? {
|
|
83
|
-
maxHeight: m.mah
|
|
84
|
-
} : {},
|
|
85
|
-
...m.pos ? {
|
|
86
|
-
position: m.pos
|
|
87
|
-
} : {},
|
|
88
|
-
...m.top ? {
|
|
89
|
-
top: m.top
|
|
90
|
-
} : {},
|
|
91
|
-
...m.left ? {
|
|
92
|
-
left: m.left
|
|
93
|
-
} : {},
|
|
94
|
-
...m.bottom ? {
|
|
95
|
-
bottom: m.bottom
|
|
96
|
-
} : {},
|
|
97
|
-
...m.right ? {
|
|
98
|
-
right: m.right
|
|
99
|
-
} : {},
|
|
100
|
-
...m.display ? {
|
|
101
|
-
display: m.display
|
|
102
|
-
} : {},
|
|
103
|
-
...m.flex ? {
|
|
104
|
-
flex: m.flex
|
|
105
|
-
} : {},
|
|
106
|
-
...m.align ? {
|
|
107
|
-
alignItems: m.align
|
|
108
|
-
} : {},
|
|
109
|
-
...m.justify ? {
|
|
110
|
-
justifyContent: m.justify
|
|
111
|
-
} : {},
|
|
112
|
-
...m.tf ? {
|
|
113
|
-
transform: m.tf
|
|
114
|
-
} : {}
|
|
115
|
-
}), d = (m, i) => {
|
|
116
|
-
const p = g(i), o = {
|
|
117
|
-
...i
|
|
118
|
-
};
|
|
119
|
-
return ["m", "my", "mx", "mt", "mb", "ml", "mr", "p", "py", "px", "pt", "pb", "pl", "pr", "bg", "c", "opacity", "ff", "fz", "fw", "lts", "ta", "lh", "fs", "tt", "td", "w", "miw", "maw", "h", "mih", "mah", "bgsz", "bgp", "bgr", "bga", "pos", "top", "left", "bottom", "right", "inset", "display", "flex", "align", "justify", "tf"].forEach((r) => {
|
|
120
|
-
delete o[r];
|
|
121
|
-
}), a(o, {
|
|
122
|
-
className: m,
|
|
123
|
-
...Object.keys(p).length !== 0 ? {
|
|
124
|
-
style: p
|
|
125
|
-
} : {}
|
|
126
|
-
});
|
|
127
|
-
};
|
|
128
|
-
export {
|
|
129
|
-
d as mergeComponentProps
|
|
1
|
+
import mergeProps from "merge-props";
|
|
2
|
+
var createStyle = (e) => ({
|
|
3
|
+
...e.m ? { margin: `${e.m}rem` } : {},
|
|
4
|
+
...e.my ? {
|
|
5
|
+
marginTop: `${e.my}rem`,
|
|
6
|
+
marginBottom: `${e.my}rem`
|
|
7
|
+
} : {},
|
|
8
|
+
...e.mx ? {
|
|
9
|
+
marginLeft: `${e.mx}rem`,
|
|
10
|
+
marginRight: `${e.mx}rem`
|
|
11
|
+
} : {},
|
|
12
|
+
...e.mt ? { marginTop: `${e.mt}rem` } : {},
|
|
13
|
+
...e.mb ? { marginBottom: `${e.mb}rem` } : {},
|
|
14
|
+
...e.ml ? { marginLeft: `${e.ml}rem` } : {},
|
|
15
|
+
...e.mr ? { marginRight: `${e.mr}rem` } : {},
|
|
16
|
+
...e.p ? { padding: `${e.p}rem` } : {},
|
|
17
|
+
...e.py ? {
|
|
18
|
+
paddingTop: `${e.py}rem`,
|
|
19
|
+
paddingBottom: `${e.py}rem`
|
|
20
|
+
} : {},
|
|
21
|
+
...e.px ? {
|
|
22
|
+
paddingLeft: `${e.px}rem`,
|
|
23
|
+
paddingRight: `${e.px}rem`
|
|
24
|
+
} : {},
|
|
25
|
+
...e.pt ? { paddingTop: `${e.pt}rem` } : {},
|
|
26
|
+
...e.pb ? { paddingBottom: `${e.pb}rem` } : {},
|
|
27
|
+
...e.pl ? { paddingLeft: `${e.pl}rem` } : {},
|
|
28
|
+
...e.pr ? { paddingRight: `${e.pr}rem` } : {},
|
|
29
|
+
...e.bg ? { backgroundColor: e.bg } : {},
|
|
30
|
+
...e.c ? { color: e.c } : {},
|
|
31
|
+
...e.opacity ? { opacity: e.opacity } : {},
|
|
32
|
+
...e.ff ? { fontFamily: e.ff } : {},
|
|
33
|
+
...e.fz ? { fontSize: `${e.fz}rem` } : {},
|
|
34
|
+
...e.ta ? { textAlign: e.ta } : {},
|
|
35
|
+
...e.w ? { width: e.w } : {},
|
|
36
|
+
...e.miw ? { minWidth: e.miw } : {},
|
|
37
|
+
...e.maw ? { maxWidth: e.maw } : {},
|
|
38
|
+
...e.h ? { height: e.h } : {},
|
|
39
|
+
...e.mih ? { minHeight: e.mih } : {},
|
|
40
|
+
...e.mah ? { maxHeight: e.mah } : {},
|
|
41
|
+
...e.pos ? { position: e.pos } : {},
|
|
42
|
+
...e.top ? { top: e.top } : {},
|
|
43
|
+
...e.left ? { left: e.left } : {},
|
|
44
|
+
...e.bottom ? { bottom: e.bottom } : {},
|
|
45
|
+
...e.right ? { right: e.right } : {},
|
|
46
|
+
...e.display ? { display: e.display } : {},
|
|
47
|
+
...e.flex ? { flex: e.flex } : {},
|
|
48
|
+
...e.align ? { alignItems: e.align } : {},
|
|
49
|
+
...e.justify ? { justifyContent: e.justify } : {},
|
|
50
|
+
...e.tf ? { transform: e.tf } : {}
|
|
51
|
+
});
|
|
52
|
+
const mergeComponentProps = (n, r) => {
|
|
53
|
+
let i = createStyle(r), a = { ...r };
|
|
54
|
+
return (/* @__PURE__ */ "m.my.mx.mt.mb.ml.mr.p.py.px.pt.pb.pl.pr.bg.c.opacity.ff.fz.fw.lts.ta.lh.fs.tt.td.w.miw.maw.h.mih.mah.bgsz.bgp.bgr.bga.pos.top.left.bottom.right.inset.display.flex.align.justify.tf".split(".")).forEach((e) => {
|
|
55
|
+
delete a[e];
|
|
56
|
+
}), mergeProps(a, {
|
|
57
|
+
className: n,
|
|
58
|
+
...Object.keys(i).length === 0 ? {} : { style: i }
|
|
59
|
+
});
|
|
130
60
|
};
|
|
61
|
+
export { mergeComponentProps };
|
|
@@ -1,60 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return t;
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import React, { createContext, useContext } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
const ContextStore = createContext(null);
|
|
5
|
+
function getPrototypeChainCtors(e) {
|
|
6
|
+
let n = [], r = Object.getPrototypeOf(e);
|
|
7
|
+
for (; r && r.constructor && r !== Object.prototype;) {
|
|
8
|
+
let e = r.constructor;
|
|
9
|
+
n.push(e), r = Object.getPrototypeOf(r);
|
|
10
|
+
}
|
|
11
|
+
return n;
|
|
13
12
|
}
|
|
14
|
-
const
|
|
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
|
-
if (!r) {
|
|
50
|
-
const c = n?.name ?? "UnknownServiceClass";
|
|
51
|
-
throw new Error(`Store not found for ${c}`);
|
|
52
|
-
}
|
|
53
|
-
return r[0];
|
|
54
|
-
};
|
|
55
|
-
export {
|
|
56
|
-
u as ContextStore,
|
|
57
|
-
g as ContextStoreProvider,
|
|
58
|
-
O as useService,
|
|
59
|
-
P as useStore
|
|
13
|
+
const ContextStoreProvider = (n) => {
|
|
14
|
+
let r = c(5), { services: i, children: s } = n, l;
|
|
15
|
+
r[0] === i ? l = r[1] : (l = /* @__PURE__ */ new Map(), i.forEach((e) => {
|
|
16
|
+
let [n, r] = e, i = r.constructor;
|
|
17
|
+
l.has(i) || l.set(i, [n, r]);
|
|
18
|
+
let a = getPrototypeChainCtors(r);
|
|
19
|
+
for (let e of a) l.has(e) || l.set(e, [n, r]);
|
|
20
|
+
}), r[0] = i, r[1] = l);
|
|
21
|
+
let u = l, d;
|
|
22
|
+
return r[2] !== s || r[3] !== u ? (d = /* @__PURE__ */ jsx(ContextStore.Provider, {
|
|
23
|
+
value: u,
|
|
24
|
+
children: s
|
|
25
|
+
}), r[2] = s, r[3] = u, r[4] = d) : d = r[4], d;
|
|
26
|
+
}, useService = (n) => {
|
|
27
|
+
let r = c(3), a = useContext(ContextStore);
|
|
28
|
+
if (!a) throw Error("ContextStore not found");
|
|
29
|
+
let o;
|
|
30
|
+
r[0] !== n || r[1] !== a ? (o = a.get(n), r[0] = n, r[1] = a, r[2] = o) : o = r[2];
|
|
31
|
+
let s = o;
|
|
32
|
+
if (!s) {
|
|
33
|
+
let e = n?.name ?? "UnknownServiceClass";
|
|
34
|
+
throw Error(`Service not found for ${e}`);
|
|
35
|
+
}
|
|
36
|
+
return s[1];
|
|
37
|
+
}, useStore = (n) => {
|
|
38
|
+
let r = c(3), a = useContext(ContextStore);
|
|
39
|
+
if (!a) throw Error("ContextStore not found");
|
|
40
|
+
let o;
|
|
41
|
+
r[0] !== n || r[1] !== a ? (o = a.get(n), r[0] = n, r[1] = a, r[2] = o) : o = r[2];
|
|
42
|
+
let s = o;
|
|
43
|
+
if (!s) {
|
|
44
|
+
let e = n?.name ?? "UnknownServiceClass";
|
|
45
|
+
throw Error(`Store not found for ${e}`);
|
|
46
|
+
}
|
|
47
|
+
return s[0];
|
|
60
48
|
};
|
|
49
|
+
export { ContextStore, ContextStoreProvider, useService, useStore };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,29 +1,7 @@
|
|
|
1
|
-
import { ContextStore
|
|
2
|
-
import { ReactiveArrayService
|
|
3
|
-
import { mergeComponentProps
|
|
4
|
-
import { crossFade
|
|
5
|
-
import { Colors
|
|
6
|
-
import { getSize
|
|
7
|
-
export {
|
|
8
|
-
A as Colors,
|
|
9
|
-
o as ContextStore,
|
|
10
|
-
t as ContextStoreProvider,
|
|
11
|
-
n as ReactiveArrayService,
|
|
12
|
-
c as crossFade,
|
|
13
|
-
y as getSize,
|
|
14
|
-
P as hashToColor,
|
|
15
|
-
m as mergeComponentProps,
|
|
16
|
-
f as popperTransformOrigin,
|
|
17
|
-
v as spring,
|
|
18
|
-
x as springs,
|
|
19
|
-
d as useObservedOpen,
|
|
20
|
-
g as useObservedValue,
|
|
21
|
-
C as usePopperMotion,
|
|
22
|
-
u as useReactiveArrayService,
|
|
23
|
-
h as useReducedMotionSafe,
|
|
24
|
-
l as useScrimMotion,
|
|
25
|
-
s as useService,
|
|
26
|
-
i as useStore,
|
|
27
|
-
M as useSurfaceMotion,
|
|
28
|
-
R as withAlpha
|
|
29
|
-
};
|
|
1
|
+
import { ContextStore, ContextStoreProvider, useService, useStore } from "./contextStore.js";
|
|
2
|
+
import { ReactiveArrayService, useReactiveArrayService } from "./reactiveArrayService.js";
|
|
3
|
+
import { mergeComponentProps } from "./component.js";
|
|
4
|
+
import { crossFade, popperTransformOrigin, spring, springs, useObservedOpen, useObservedValue, usePopperMotion, useReducedMotionSafe, useScrimMotion, useSurfaceMotion } from "./motion.js";
|
|
5
|
+
import { Colors, hashToColor, withAlpha } from "./color.js";
|
|
6
|
+
import { getSize } from "./size.js";
|
|
7
|
+
export { Colors, ContextStore, ContextStoreProvider, ReactiveArrayService, crossFade, getSize, hashToColor, mergeComponentProps, popperTransformOrigin, spring, springs, useObservedOpen, useObservedValue, usePopperMotion, useReactiveArrayService, useReducedMotionSafe, useScrimMotion, useService, useStore, useSurfaceMotion, withAlpha };
|
package/dist/utils/motion.js
CHANGED
|
@@ -1,115 +1,86 @@
|
|
|
1
|
-
import { c
|
|
2
|
-
import
|
|
3
|
-
import { useReducedMotion
|
|
4
|
-
const
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
opacity: 0
|
|
40
|
-
},
|
|
41
|
-
animate: {
|
|
42
|
-
opacity: 1
|
|
43
|
-
},
|
|
44
|
-
exit: {
|
|
45
|
-
opacity: 0
|
|
46
|
-
},
|
|
47
|
-
transition: v
|
|
48
|
-
}, _ = () => {
|
|
49
|
-
const t = p.c(2), e = m();
|
|
50
|
-
let s;
|
|
51
|
-
return t[0] !== e ? (s = e ? b : x(0.96, 4, d.ui), t[0] = e, t[1] = s) : s = t[1], s;
|
|
52
|
-
}, g = () => {
|
|
53
|
-
const t = p.c(2), e = m();
|
|
54
|
-
let s;
|
|
55
|
-
return t[0] !== e ? (s = e ? b : x(0.97, 6, d.surface), t[0] = e, t[1] = s) : s = t[1], s;
|
|
56
|
-
}, h = (t) => {
|
|
57
|
-
const e = p.c(6), s = t === void 0 ? 6 : t;
|
|
58
|
-
if (m())
|
|
59
|
-
return b;
|
|
60
|
-
let a;
|
|
61
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = {
|
|
62
|
-
opacity: 0,
|
|
63
|
-
backdropFilter: "blur(0px)"
|
|
64
|
-
}, e[0] = a) : a = e[0];
|
|
65
|
-
const l = `blur(${s}px)`;
|
|
66
|
-
let o;
|
|
67
|
-
e[1] !== l ? (o = {
|
|
68
|
-
opacity: 1,
|
|
69
|
-
backdropFilter: l
|
|
70
|
-
}, e[1] = l, e[2] = o) : o = e[2];
|
|
71
|
-
let i;
|
|
72
|
-
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = {
|
|
73
|
-
opacity: 0,
|
|
74
|
-
backdropFilter: "blur(0px)"
|
|
75
|
-
}, e[3] = i) : i = e[3];
|
|
76
|
-
let c;
|
|
77
|
-
return e[4] !== o ? (c = {
|
|
78
|
-
initial: a,
|
|
79
|
-
animate: o,
|
|
80
|
-
exit: i,
|
|
81
|
-
transition: d.surface
|
|
82
|
-
}, e[4] = o, e[5] = c) : c = e[5], c;
|
|
83
|
-
}, F = (t) => ({
|
|
84
|
-
transformOrigin: `var(--radix-${t}-content-transform-origin, center)`
|
|
85
|
-
}), R = (t, e, s) => {
|
|
86
|
-
const r = p.c(5), [a, l] = y.useState(t ?? e ?? !1);
|
|
87
|
-
let o;
|
|
88
|
-
r[0] !== s ? (o = (u) => {
|
|
89
|
-
l(u), s?.(u);
|
|
90
|
-
}, r[0] = s, r[1] = o) : o = r[1];
|
|
91
|
-
const i = o, c = t ?? a;
|
|
92
|
-
let n;
|
|
93
|
-
return r[2] !== i || r[3] !== c ? (n = [c, i], r[2] = i, r[3] = c, r[4] = n) : n = r[4], n;
|
|
94
|
-
}, k = (t, e, s) => {
|
|
95
|
-
const r = p.c(5), [a, l] = y.useState(t ?? e);
|
|
96
|
-
let o;
|
|
97
|
-
r[0] !== s ? (o = (u) => {
|
|
98
|
-
l(u), s?.(u);
|
|
99
|
-
}, r[0] = s, r[1] = o) : o = r[1];
|
|
100
|
-
const i = o, c = t ?? a;
|
|
101
|
-
let n;
|
|
102
|
-
return r[2] !== i || r[3] !== c ? (n = [c, i], r[2] = i, r[3] = c, r[4] = n) : n = r[4], n;
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { useReducedMotion } from "motion/react";
|
|
4
|
+
const spring = (e, i) => ({
|
|
5
|
+
type: "spring",
|
|
6
|
+
bounce: Math.max(0, 1 - e),
|
|
7
|
+
duration: i
|
|
8
|
+
}), springs = {
|
|
9
|
+
ui: spring(1, .3),
|
|
10
|
+
surface: spring(1, .4),
|
|
11
|
+
momentum: spring(.8, .4),
|
|
12
|
+
sheet: spring(.8, .3)
|
|
13
|
+
}, crossFade = {
|
|
14
|
+
duration: .15,
|
|
15
|
+
ease: "easeOut"
|
|
16
|
+
}, useReducedMotionSafe = () => useReducedMotion() ?? !1;
|
|
17
|
+
var materialize = (e, i, a) => ({
|
|
18
|
+
initial: {
|
|
19
|
+
opacity: 0,
|
|
20
|
+
scale: e,
|
|
21
|
+
filter: `blur(${i}px)`
|
|
22
|
+
},
|
|
23
|
+
animate: {
|
|
24
|
+
opacity: 1,
|
|
25
|
+
scale: 1,
|
|
26
|
+
filter: "blur(0px)"
|
|
27
|
+
},
|
|
28
|
+
exit: {
|
|
29
|
+
opacity: 0,
|
|
30
|
+
scale: e,
|
|
31
|
+
filter: `blur(${i}px)`
|
|
32
|
+
},
|
|
33
|
+
transition: a
|
|
34
|
+
}), fade = {
|
|
35
|
+
initial: { opacity: 0 },
|
|
36
|
+
animate: { opacity: 1 },
|
|
37
|
+
exit: { opacity: 0 },
|
|
38
|
+
transition: crossFade
|
|
103
39
|
};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
40
|
+
const usePopperMotion = () => {
|
|
41
|
+
let i = c(2), a = useReducedMotionSafe(), o;
|
|
42
|
+
return i[0] === a ? o = i[1] : (o = a ? fade : materialize(.96, 4, springs.ui), i[0] = a, i[1] = o), o;
|
|
43
|
+
}, useSurfaceMotion = () => {
|
|
44
|
+
let i = c(2), a = useReducedMotionSafe(), o;
|
|
45
|
+
return i[0] === a ? o = i[1] : (o = a ? fade : materialize(.97, 6, springs.surface), i[0] = a, i[1] = o), o;
|
|
46
|
+
}, useScrimMotion = (i) => {
|
|
47
|
+
let a = c(6), o = i === void 0 ? 6 : i;
|
|
48
|
+
if (useReducedMotionSafe()) return fade;
|
|
49
|
+
let l;
|
|
50
|
+
a[0] === Symbol.for("react.memo_cache_sentinel") ? (l = {
|
|
51
|
+
opacity: 0,
|
|
52
|
+
backdropFilter: "blur(0px)"
|
|
53
|
+
}, a[0] = l) : l = a[0];
|
|
54
|
+
let d = `blur(${o}px)`, p;
|
|
55
|
+
a[1] === d ? p = a[2] : (p = {
|
|
56
|
+
opacity: 1,
|
|
57
|
+
backdropFilter: d
|
|
58
|
+
}, a[1] = d, a[2] = p);
|
|
59
|
+
let m;
|
|
60
|
+
a[3] === Symbol.for("react.memo_cache_sentinel") ? (m = {
|
|
61
|
+
opacity: 0,
|
|
62
|
+
backdropFilter: "blur(0px)"
|
|
63
|
+
}, a[3] = m) : m = a[3];
|
|
64
|
+
let h;
|
|
65
|
+
return a[4] === p ? h = a[5] : (h = {
|
|
66
|
+
initial: l,
|
|
67
|
+
animate: p,
|
|
68
|
+
exit: m,
|
|
69
|
+
transition: springs.surface
|
|
70
|
+
}, a[4] = p, a[5] = h), h;
|
|
71
|
+
}, popperTransformOrigin = (e) => ({ transformOrigin: `var(--radix-${e}-content-transform-origin, center)` }), useObservedOpen = (a, o, s) => {
|
|
72
|
+
let l = c(5), [u, d] = React.useState(a ?? o ?? !1), f;
|
|
73
|
+
l[0] === s ? f = l[1] : (f = (e) => {
|
|
74
|
+
d(e), s?.(e);
|
|
75
|
+
}, l[0] = s, l[1] = f);
|
|
76
|
+
let p = f, m = a ?? u, h;
|
|
77
|
+
return l[2] !== p || l[3] !== m ? (h = [m, p], l[2] = p, l[3] = m, l[4] = h) : h = l[4], h;
|
|
78
|
+
}, useObservedValue = (a, o, s) => {
|
|
79
|
+
let l = c(5), [u, d] = React.useState(a ?? o), f;
|
|
80
|
+
l[0] === s ? f = l[1] : (f = (e) => {
|
|
81
|
+
d(e), s?.(e);
|
|
82
|
+
}, l[0] = s, l[1] = f);
|
|
83
|
+
let p = f, m = a ?? u, h;
|
|
84
|
+
return l[2] !== p || l[3] !== m ? (h = [m, p], l[2] = p, l[3] = m, l[4] = h) : h = l[4], h;
|
|
115
85
|
};
|
|
86
|
+
export { crossFade, popperTransformOrigin, spring, springs, useObservedOpen, useObservedValue, usePopperMotion, useReducedMotionSafe, useScrimMotion, useSurfaceMotion };
|