@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,618 +1,580 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { time
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { eachAxis
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
import { clamp } from "../../../../../motion-utils/dist/es/clamp.js";
|
|
2
|
+
import { noop } from "../../../../../motion-utils/dist/es/noop.js";
|
|
3
|
+
import { SubscriptionManager } from "../../../../../motion-utils/dist/es/subscription-manager.js";
|
|
4
|
+
import { cancelFrame, frame, frameData, frameSteps } from "../../frameloop/frame.js";
|
|
5
|
+
import { time } from "../../frameloop/sync-time.js";
|
|
6
|
+
import { mixNumber } from "../../utils/mix/number.js";
|
|
7
|
+
import { motionValue } from "../../value/index.js";
|
|
8
|
+
import { getValueTransition } from "../../animation/utils/get-value-transition.js";
|
|
9
|
+
import { getOptimisedAppearId } from "../../animation/optimized-appear/get-appear-id.js";
|
|
10
|
+
import { microtask } from "../../frameloop/microtask.js";
|
|
11
|
+
import { isSVGElement } from "../../utils/is-svg-element.js";
|
|
12
|
+
import { statsBuffer } from "../../stats/buffer.js";
|
|
13
|
+
import { isSVGSVGElement } from "../../utils/is-svg-svg-element.js";
|
|
14
|
+
import { createBox, createDelta } from "../geometry/models.js";
|
|
15
|
+
import { has2DTranslate, hasScale, hasTransform } from "../utils/has-transform.js";
|
|
16
|
+
import { applyBoxDelta, applyTreeDeltas, transformBox, translateAxis } from "../geometry/delta-apply.js";
|
|
17
|
+
import { scaleCorrectors } from "../styles/scale-correction.js";
|
|
18
|
+
import { copyAxisDeltaInto, copyAxisInto, copyBoxInto } from "../geometry/copy.js";
|
|
19
|
+
import { calcBoxDelta, calcLength, calcRelativeBox, calcRelativePosition, isNear } from "../geometry/delta-calc.js";
|
|
20
|
+
import { removeBoxTransforms } from "../geometry/delta-remove.js";
|
|
21
|
+
import { aspectRatio, axisDeltaEquals, boxEquals, boxEqualsRounded, isDeltaZero } from "../geometry/utils.js";
|
|
22
|
+
import { eachAxis } from "../utils/each-axis.js";
|
|
23
|
+
import { buildProjectionTransform } from "../styles/transform.js";
|
|
24
|
+
import { mixValues } from "../animation/mix-values.js";
|
|
25
|
+
import { animateSingleValue } from "../../animation/animate/single-value.js";
|
|
26
|
+
import { FlatTree } from "../utils/flat-tree.js";
|
|
27
|
+
import { delay } from "../../utils/delay.js";
|
|
28
|
+
import { resolveMotionValue } from "../../value/utils/resolve-motion-value.js";
|
|
29
|
+
import { NodeStack } from "../shared/stack.js";
|
|
30
|
+
import { globalProjectionState } from "./state.js";
|
|
31
|
+
var metrics = {
|
|
32
|
+
nodes: 0,
|
|
33
|
+
calculatedTargetDeltas: 0,
|
|
34
|
+
calculatedProjections: 0
|
|
35
|
+
}, transformAxes = [
|
|
36
|
+
"",
|
|
37
|
+
"X",
|
|
38
|
+
"Y",
|
|
39
|
+
"Z"
|
|
40
|
+
], animationTarget = 1e3, id = 0;
|
|
41
|
+
function resetDistortingTransform(c, L, R, z) {
|
|
42
|
+
let { latestValues: B } = L;
|
|
43
|
+
B[c] && (R[c] = B[c], L.setStaticValue(c, 0), z && (z[c] = 0));
|
|
35
44
|
}
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const { parent: c } = e;
|
|
48
|
-
c && !c.hasCheckedOptimisedAppear && ot(c);
|
|
45
|
+
function cancelTreeOptimisedTransformAnimations(c) {
|
|
46
|
+
if (c.hasCheckedOptimisedAppear = !0, c.root === c) return;
|
|
47
|
+
let { visualElement: L } = c.options;
|
|
48
|
+
if (!L) return;
|
|
49
|
+
let R = getOptimisedAppearId(L);
|
|
50
|
+
if (window.MotionHasOptimisedAnimation(R, "transform")) {
|
|
51
|
+
let { layout: L, layoutId: z } = c.options;
|
|
52
|
+
window.MotionCancelOptimisedAnimation(R, "transform", frame, !(L || z));
|
|
53
|
+
}
|
|
54
|
+
let { parent: z } = c;
|
|
55
|
+
z && !z.hasCheckedOptimisedAppear && cancelTreeOptimisedTransformAnimations(z);
|
|
49
56
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
if (!this.isVisible) {
|
|
451
|
-
t.visibility = "hidden";
|
|
452
|
-
return;
|
|
453
|
-
}
|
|
454
|
-
const s = this.getTransformTemplate();
|
|
455
|
-
if (this.needsReset) {
|
|
456
|
-
this.needsReset = !1, t.visibility = "", t.opacity = "", t.pointerEvents = C(i?.pointerEvents) || "", t.transform = s ? s(this.latestValues, "") : "none";
|
|
457
|
-
return;
|
|
458
|
-
}
|
|
459
|
-
const o = this.getLead();
|
|
460
|
-
if (!this.projectionDelta || !this.layout || !o.target) {
|
|
461
|
-
this.options.layoutId && (t.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, t.pointerEvents = C(i?.pointerEvents) || ""), this.hasProjected && !V(this.latestValues) && (t.transform = s ? s({}, "") : "none", this.hasProjected = !1);
|
|
462
|
-
return;
|
|
463
|
-
}
|
|
464
|
-
t.visibility = "";
|
|
465
|
-
const a = o.animationValues || o.latestValues;
|
|
466
|
-
this.applyTransformsToTarget();
|
|
467
|
-
let r = At(this.projectionDeltaWithTransform, this.treeScale, a);
|
|
468
|
-
s && (r = s(a, r)), t.transform = r;
|
|
469
|
-
const { x: n, y: u } = this.projectionDelta;
|
|
470
|
-
t.transformOrigin = `${n.origin * 100}% ${u.origin * 100}% 0`, o.animationValues ? t.opacity = o === this ? a.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : a.opacityExit : t.opacity = o === this ? a.opacity !== void 0 ? a.opacity : "" : a.opacityExit !== void 0 ? a.opacityExit : 0;
|
|
471
|
-
for (const d in z) {
|
|
472
|
-
if (a[d] === void 0)
|
|
473
|
-
continue;
|
|
474
|
-
const { correct: g, applyTo: x, isCSSVariable: S } = z[d], v = r === "none" ? a[d] : g(a[d], o);
|
|
475
|
-
if (x) {
|
|
476
|
-
const D = x.length;
|
|
477
|
-
for (let T = 0; T < D; T++)
|
|
478
|
-
t[x[T]] = v;
|
|
479
|
-
} else
|
|
480
|
-
S ? this.options.visualElement.renderState.vars[d] = v : t[d] = v;
|
|
481
|
-
}
|
|
482
|
-
this.options.layoutId && (t.pointerEvents = o === this ? C(i?.pointerEvents) || "" : "none");
|
|
483
|
-
}
|
|
484
|
-
clearSnapshot() {
|
|
485
|
-
this.resumeFrom = this.snapshot = void 0;
|
|
486
|
-
}
|
|
487
|
-
// Only run on root
|
|
488
|
-
resetTree() {
|
|
489
|
-
this.root.nodes.forEach((t) => t.currentAnimation?.stop()), this.root.nodes.forEach($), this.root.sharedNodes.clear();
|
|
490
|
-
}
|
|
491
|
-
};
|
|
57
|
+
function createProjectionNode({ attachResizeListener: L, defaultParent: q, measureScroll: Z, checkIsScrollRoot: Q, resetTransform: $ }) {
|
|
58
|
+
return class {
|
|
59
|
+
constructor(c = {}, L = q?.()) {
|
|
60
|
+
this.id = id++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = {
|
|
61
|
+
x: 1,
|
|
62
|
+
y: 1
|
|
63
|
+
}, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.layoutVersion = 0, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
64
|
+
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
65
|
+
}, this.updateProjection = () => {
|
|
66
|
+
this.projectionUpdateScheduled = !1, statsBuffer.value && (metrics.nodes = metrics.calculatedTargetDeltas = metrics.calculatedProjections = 0), this.nodes.forEach(propagateDirtyNodes), this.nodes.forEach(resolveTargetDelta), this.nodes.forEach(calcProjection), this.nodes.forEach(cleanDirtyNodes), statsBuffer.addProjectionMetrics && statsBuffer.addProjectionMetrics(metrics);
|
|
67
|
+
}, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = c, this.root = L ? L.root || L : this, this.path = L ? [...L.path, L] : [], this.parent = L, this.depth = L ? L.depth + 1 : 0;
|
|
68
|
+
for (let c = 0; c < this.path.length; c++) this.path[c].shouldResetTransform = !0;
|
|
69
|
+
this.root === this && (this.nodes = new FlatTree());
|
|
70
|
+
}
|
|
71
|
+
addEventListener(c, L) {
|
|
72
|
+
return this.eventHandlers.has(c) || this.eventHandlers.set(c, new SubscriptionManager()), this.eventHandlers.get(c).add(L);
|
|
73
|
+
}
|
|
74
|
+
notifyListeners(c, ...L) {
|
|
75
|
+
let R = this.eventHandlers.get(c);
|
|
76
|
+
R && R.notify(...L);
|
|
77
|
+
}
|
|
78
|
+
hasListeners(c) {
|
|
79
|
+
return this.eventHandlers.has(c);
|
|
80
|
+
}
|
|
81
|
+
mount(c) {
|
|
82
|
+
if (this.instance) return;
|
|
83
|
+
this.isSVG = isSVGElement(c) && !isSVGSVGElement(c), this.instance = c;
|
|
84
|
+
let { layoutId: R, layout: z, visualElement: V } = this.options;
|
|
85
|
+
if (V && !V.current && V.mount(c), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (z || R) && (this.isLayoutDirty = !0), L) {
|
|
86
|
+
let R, z = 0, V = () => this.root.updateBlockedByResize = !1;
|
|
87
|
+
frame.read(() => {
|
|
88
|
+
z = window.innerWidth;
|
|
89
|
+
}), L(c, () => {
|
|
90
|
+
let c = window.innerWidth;
|
|
91
|
+
c !== z && (z = c, this.root.updateBlockedByResize = !0, R && R(), R = delay(V, 250), globalProjectionState.hasAnimatedSinceResize && (globalProjectionState.hasAnimatedSinceResize = !1, this.nodes.forEach(finishAnimation)));
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
R && this.root.registerSharedNode(R, this), this.options.animate !== !1 && V && (R || z) && this.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: L, hasRelativeLayoutChanged: R, layout: z }) => {
|
|
95
|
+
if (this.isTreeAnimationBlocked()) {
|
|
96
|
+
this.target = void 0, this.relativeTarget = void 0;
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
let B = this.options.transition || V.getDefaultTransition() || defaultLayoutTransition, { onLayoutAnimationStart: H, onLayoutAnimationComplete: U } = V.getProps(), W = !this.targetLayout || !boxEqualsRounded(this.targetLayout, z), G = !L && R;
|
|
100
|
+
if (this.options.layoutRoot || this.resumeFrom || G || L && (W || !this.currentAnimation)) {
|
|
101
|
+
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
102
|
+
let L = {
|
|
103
|
+
...getValueTransition(B, "layout"),
|
|
104
|
+
onPlay: H,
|
|
105
|
+
onComplete: U
|
|
106
|
+
};
|
|
107
|
+
(V.shouldReduceMotion || this.options.layoutRoot) && (L.delay = 0, L.type = !1), this.startAnimation(L), this.setAnimationOrigin(c, G, L.path);
|
|
108
|
+
} else L || finishAnimation(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
109
|
+
this.targetLayout = z;
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
unmount() {
|
|
113
|
+
this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
|
|
114
|
+
let c = this.getStack();
|
|
115
|
+
c && c.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), cancelFrame(this.updateProjection);
|
|
116
|
+
}
|
|
117
|
+
blockUpdate() {
|
|
118
|
+
this.updateManuallyBlocked = !0;
|
|
119
|
+
}
|
|
120
|
+
unblockUpdate() {
|
|
121
|
+
this.updateManuallyBlocked = !1;
|
|
122
|
+
}
|
|
123
|
+
isUpdateBlocked() {
|
|
124
|
+
return this.updateManuallyBlocked || this.updateBlockedByResize;
|
|
125
|
+
}
|
|
126
|
+
isTreeAnimationBlocked() {
|
|
127
|
+
return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || !1;
|
|
128
|
+
}
|
|
129
|
+
startUpdate() {
|
|
130
|
+
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(resetSkewAndRotation), this.animationId++);
|
|
131
|
+
}
|
|
132
|
+
getTransformTemplate() {
|
|
133
|
+
let { visualElement: c } = this.options;
|
|
134
|
+
return c && c.getProps().transformTemplate;
|
|
135
|
+
}
|
|
136
|
+
willUpdate(c = !0) {
|
|
137
|
+
if (this.root.hasTreeAnimated = !0, this.root.isUpdateBlocked()) {
|
|
138
|
+
this.options.onExitComplete && this.options.onExitComplete();
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && cancelTreeOptimisedTransformAnimations(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty) return;
|
|
142
|
+
this.isLayoutDirty = !0;
|
|
143
|
+
for (let c = 0; c < this.path.length; c++) {
|
|
144
|
+
let L = this.path[c];
|
|
145
|
+
L.shouldResetTransform = !0, (typeof L.latestValues.x == "string" || typeof L.latestValues.y == "string") && (L.isLayoutDirty = !0), L.updateScroll("snapshot"), L.options.layoutRoot && L.willUpdate(!1);
|
|
146
|
+
}
|
|
147
|
+
let { layoutId: L, layout: R } = this.options;
|
|
148
|
+
if (L === void 0 && !R) return;
|
|
149
|
+
let z = this.getTransformTemplate();
|
|
150
|
+
this.prevTransformTemplateValue = z ? z(this.latestValues, "") : void 0, this.updateSnapshot(), c && this.notifyListeners("willUpdate");
|
|
151
|
+
}
|
|
152
|
+
update() {
|
|
153
|
+
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
154
|
+
let c = this.updateBlockedByResize;
|
|
155
|
+
this.unblockUpdate(), this.updateBlockedByResize = !1, this.clearAllSnapshots(), c && this.nodes.forEach(forceLayoutMeasure), this.nodes.forEach(clearMeasurements);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
if (this.animationId <= this.animationCommitId) {
|
|
159
|
+
this.nodes.forEach(clearIsLayoutDirty);
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(ensureDraggedNodesSnapshotted), this.nodes.forEach(resetTransformStyle), this.nodes.forEach(updateLayout), this.nodes.forEach(notifyLayoutUpdate)) : this.nodes.forEach(clearIsLayoutDirty), this.clearAllSnapshots();
|
|
163
|
+
let L = time.now();
|
|
164
|
+
frameData.delta = clamp(0, 1e3 / 60, L - frameData.timestamp), frameData.timestamp = L, frameData.isProcessing = !0, frameSteps.update.process(frameData), frameSteps.preRender.process(frameData), frameSteps.render.process(frameData), frameData.isProcessing = !1;
|
|
165
|
+
}
|
|
166
|
+
didUpdate() {
|
|
167
|
+
this.updateScheduled || (this.updateScheduled = !0, microtask.read(this.scheduleUpdate));
|
|
168
|
+
}
|
|
169
|
+
clearAllSnapshots() {
|
|
170
|
+
this.nodes.forEach(clearSnapshot), this.sharedNodes.forEach(removeLeadSnapshots);
|
|
171
|
+
}
|
|
172
|
+
scheduleUpdateProjection() {
|
|
173
|
+
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, frame.preRender(this.updateProjection, !1, !0));
|
|
174
|
+
}
|
|
175
|
+
scheduleCheckAfterUnmount() {
|
|
176
|
+
frame.postRender(() => {
|
|
177
|
+
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
updateSnapshot() {
|
|
181
|
+
this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !calcLength(this.snapshot.measuredBox.x) && !calcLength(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
|
|
182
|
+
}
|
|
183
|
+
updateLayout() {
|
|
184
|
+
if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty)) return;
|
|
185
|
+
if (this.resumeFrom && !this.resumeFrom.instance) for (let c = 0; c < this.path.length; c++) this.path[c].updateScroll();
|
|
186
|
+
let c = this.layout;
|
|
187
|
+
this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected ||= createBox(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
|
|
188
|
+
let { visualElement: L } = this.options;
|
|
189
|
+
L && L.notify("LayoutMeasure", this.layout.layoutBox, c ? c.layoutBox : void 0);
|
|
190
|
+
}
|
|
191
|
+
updateScroll(c = "measure") {
|
|
192
|
+
let L = !!(this.options.layoutScroll && this.instance);
|
|
193
|
+
if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === c && (L = !1), L && this.instance) {
|
|
194
|
+
let L = Q(this.instance);
|
|
195
|
+
this.scroll = {
|
|
196
|
+
animationId: this.root.animationId,
|
|
197
|
+
phase: c,
|
|
198
|
+
isRoot: L,
|
|
199
|
+
offset: Z(this.instance),
|
|
200
|
+
wasRoot: this.scroll ? this.scroll.isRoot : L
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
resetTransform() {
|
|
205
|
+
if (!$) return;
|
|
206
|
+
let c = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, L = this.projectionDelta && !isDeltaZero(this.projectionDelta), R = this.getTransformTemplate(), z = R ? R(this.latestValues, "") : void 0, B = z !== this.prevTransformTemplateValue;
|
|
207
|
+
c && this.instance && (L || hasTransform(this.latestValues) || B) && ($(this.instance, z), this.shouldResetTransform = !1, this.scheduleRender());
|
|
208
|
+
}
|
|
209
|
+
measure(c = !0) {
|
|
210
|
+
let L = this.measurePageBox(), R = this.removeElementScroll(L);
|
|
211
|
+
return c && (R = this.removeTransform(R)), roundBox(R), {
|
|
212
|
+
animationId: this.root.animationId,
|
|
213
|
+
measuredBox: L,
|
|
214
|
+
layoutBox: R,
|
|
215
|
+
latestValues: {},
|
|
216
|
+
source: this.id
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
measurePageBox() {
|
|
220
|
+
let { visualElement: c } = this.options;
|
|
221
|
+
if (!c) return createBox();
|
|
222
|
+
let L = c.measureViewportBox();
|
|
223
|
+
if (!(this.scroll?.wasRoot || this.path.some(checkNodeWasScrollRoot))) {
|
|
224
|
+
let { scroll: c } = this.root;
|
|
225
|
+
c && (translateAxis(L.x, c.offset.x), translateAxis(L.y, c.offset.y));
|
|
226
|
+
}
|
|
227
|
+
return L;
|
|
228
|
+
}
|
|
229
|
+
removeElementScroll(c) {
|
|
230
|
+
let L = createBox();
|
|
231
|
+
if (copyBoxInto(L, c), this.scroll?.wasRoot) return L;
|
|
232
|
+
for (let R = 0; R < this.path.length; R++) {
|
|
233
|
+
let z = this.path[R], { scroll: B, options: V } = z;
|
|
234
|
+
z !== this.root && B && V.layoutScroll && (B.wasRoot && copyBoxInto(L, c), translateAxis(L.x, B.offset.x), translateAxis(L.y, B.offset.y));
|
|
235
|
+
}
|
|
236
|
+
return L;
|
|
237
|
+
}
|
|
238
|
+
applyTransform(c, L = !1, R) {
|
|
239
|
+
let z = R || createBox();
|
|
240
|
+
copyBoxInto(z, c);
|
|
241
|
+
for (let c = 0; c < this.path.length; c++) {
|
|
242
|
+
let R = this.path[c];
|
|
243
|
+
!L && R.options.layoutScroll && R.scroll && R !== R.root && (translateAxis(z.x, -R.scroll.offset.x), translateAxis(z.y, -R.scroll.offset.y)), hasTransform(R.latestValues) && transformBox(z, R.latestValues, R.layout?.layoutBox);
|
|
244
|
+
}
|
|
245
|
+
return hasTransform(this.latestValues) && transformBox(z, this.latestValues, this.layout?.layoutBox), z;
|
|
246
|
+
}
|
|
247
|
+
removeTransform(c) {
|
|
248
|
+
let L = createBox();
|
|
249
|
+
copyBoxInto(L, c);
|
|
250
|
+
for (let c = 0; c < this.path.length; c++) {
|
|
251
|
+
let R = this.path[c];
|
|
252
|
+
if (!hasTransform(R.latestValues)) continue;
|
|
253
|
+
let z;
|
|
254
|
+
R.instance && (hasScale(R.latestValues) && R.updateSnapshot(), z = createBox(), copyBoxInto(z, R.measurePageBox())), removeBoxTransforms(L, R.latestValues, R.snapshot?.layoutBox, z);
|
|
255
|
+
}
|
|
256
|
+
return hasTransform(this.latestValues) && removeBoxTransforms(L, this.latestValues), L;
|
|
257
|
+
}
|
|
258
|
+
setTargetDelta(c) {
|
|
259
|
+
this.targetDelta = c, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
260
|
+
}
|
|
261
|
+
setOptions(c) {
|
|
262
|
+
this.options = {
|
|
263
|
+
...this.options,
|
|
264
|
+
...c,
|
|
265
|
+
crossfade: c.crossfade === void 0 ? !0 : c.crossfade
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
clearMeasurements() {
|
|
269
|
+
this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
|
|
270
|
+
}
|
|
271
|
+
forceRelativeParentToResolveTarget() {
|
|
272
|
+
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== frameData.timestamp && this.relativeParent.resolveTargetDelta(!0);
|
|
273
|
+
}
|
|
274
|
+
resolveTargetDelta(c = !1) {
|
|
275
|
+
let L = this.getLead();
|
|
276
|
+
this.isProjectionDirty ||= L.isProjectionDirty, this.isTransformDirty ||= L.isTransformDirty, this.isSharedProjectionDirty ||= L.isSharedProjectionDirty;
|
|
277
|
+
let R = !!this.resumingFrom || this !== L;
|
|
278
|
+
if (!(c || R && this.isSharedProjectionDirty || this.isProjectionDirty || this.parent?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize)) return;
|
|
279
|
+
let { layout: z, layoutId: B } = this.options;
|
|
280
|
+
if (!this.layout || !(z || B)) return;
|
|
281
|
+
this.resolvedRelativeTargetAt = frameData.timestamp;
|
|
282
|
+
let H = this.getClosestProjectingParent();
|
|
283
|
+
H && this.linkedParentVersion !== H.layoutVersion && !H.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && H && H.layout ? this.createRelativeTarget(H, this.layout.layoutBox, H.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = createBox(), this.targetWithTransforms = createBox()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : copyBoxInto(this.target, this.layout.layoutBox), applyBoxDelta(this.target, this.targetDelta)) : copyBoxInto(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.options.layoutAnchor !== !1 && H && !!H.resumingFrom == !!this.resumingFrom && !H.options.layoutScroll && H.target && this.animationProgress !== 1 ? this.createRelativeTarget(H, this.target, H.target) : this.relativeParent = this.relativeTarget = void 0), statsBuffer.value && metrics.calculatedTargetDeltas++);
|
|
284
|
+
}
|
|
285
|
+
getClosestProjectingParent() {
|
|
286
|
+
if (!(!this.parent || hasScale(this.parent.latestValues) || has2DTranslate(this.parent.latestValues))) return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
|
|
287
|
+
}
|
|
288
|
+
isProjecting() {
|
|
289
|
+
return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
|
|
290
|
+
}
|
|
291
|
+
createRelativeTarget(c, L, R) {
|
|
292
|
+
this.relativeParent = c, this.linkedParentVersion = c.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = createBox(), this.relativeTargetOrigin = createBox(), calcRelativePosition(this.relativeTargetOrigin, L, R, this.options.layoutAnchor || void 0), copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);
|
|
293
|
+
}
|
|
294
|
+
removeRelativeTarget() {
|
|
295
|
+
this.relativeParent = this.relativeTarget = void 0;
|
|
296
|
+
}
|
|
297
|
+
calcProjection() {
|
|
298
|
+
let c = this.getLead(), L = !!this.resumingFrom || this !== c, R = !0;
|
|
299
|
+
if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (R = !1), L && (this.isSharedProjectionDirty || this.isTransformDirty) && (R = !1), this.resolvedRelativeTargetAt === frameData.timestamp && (R = !1), R) return;
|
|
300
|
+
let { layout: z, layoutId: B } = this.options;
|
|
301
|
+
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(z || B)) return;
|
|
302
|
+
copyBoxInto(this.layoutCorrected, this.layout.layoutBox);
|
|
303
|
+
let H = this.treeScale.x, U = this.treeScale.y;
|
|
304
|
+
applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, L), c.layout && !c.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (c.target = c.layout.layoutBox, c.targetWithTransforms = createBox());
|
|
305
|
+
let { target: W } = c;
|
|
306
|
+
if (!W) {
|
|
307
|
+
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (copyAxisDeltaInto(this.prevProjectionDelta.x, this.projectionDelta.x), copyAxisDeltaInto(this.prevProjectionDelta.y, this.projectionDelta.y)), calcBoxDelta(this.projectionDelta, this.layoutCorrected, W, this.latestValues), (this.treeScale.x !== H || this.treeScale.y !== U || !axisDeltaEquals(this.projectionDelta.x, this.prevProjectionDelta.x) || !axisDeltaEquals(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", W)), statsBuffer.value && metrics.calculatedProjections++;
|
|
311
|
+
}
|
|
312
|
+
hide() {
|
|
313
|
+
this.isVisible = !1;
|
|
314
|
+
}
|
|
315
|
+
show() {
|
|
316
|
+
this.isVisible = !0;
|
|
317
|
+
}
|
|
318
|
+
scheduleRender(c = !0) {
|
|
319
|
+
if (this.options.visualElement?.scheduleRender(), c) {
|
|
320
|
+
let c = this.getStack();
|
|
321
|
+
c && c.scheduleRender();
|
|
322
|
+
}
|
|
323
|
+
this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
|
|
324
|
+
}
|
|
325
|
+
createProjectionDeltas() {
|
|
326
|
+
this.prevProjectionDelta = createDelta(), this.projectionDelta = createDelta(), this.projectionDeltaWithTransform = createDelta();
|
|
327
|
+
}
|
|
328
|
+
setAnimationOrigin(c, L = !1, R) {
|
|
329
|
+
let z = this.snapshot, B = z ? z.latestValues : {}, V = { ...this.latestValues }, H = createDelta();
|
|
330
|
+
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !L;
|
|
331
|
+
let U = createBox(), G = (z ? z.source : void 0) !== (this.layout ? this.layout.source : void 0), K = this.getStack(), q = !K || K.members.length <= 1, J = !!(G && !q && this.options.crossfade === !0 && !this.path.some(hasOpacityCrossfade));
|
|
332
|
+
this.animationProgress = 0;
|
|
333
|
+
let Y, X = R?.interpolateProjection(c);
|
|
334
|
+
this.mixTargetDelta = (L) => {
|
|
335
|
+
let R = L / 1e3, z = X?.(R);
|
|
336
|
+
z ? (H.x.translate = z.x, H.x.scale = mixNumber(c.x.scale, 1, R), H.x.origin = c.x.origin, H.x.originPoint = c.x.originPoint, H.y.translate = z.y, H.y.scale = mixNumber(c.y.scale, 1, R), H.y.origin = c.y.origin, H.y.originPoint = c.y.originPoint) : (mixAxisDeltaLinear(H.x, c.x, R), mixAxisDeltaLinear(H.y, c.y, R)), this.setTargetDelta(H), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (calcRelativePosition(U, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), mixBox(this.relativeTarget, this.relativeTargetOrigin, U, R), Y && boxEquals(this.relativeTarget, Y) && (this.isProjectionDirty = !1), Y ||= createBox(), copyBoxInto(Y, this.relativeTarget)), G && (this.animationValues = V, mixValues(V, B, this.latestValues, R, J, q)), z && z.rotate !== void 0 && (this.animationValues ||= V, this.animationValues.pathRotation = z.rotate), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = R;
|
|
337
|
+
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
338
|
+
}
|
|
339
|
+
startAnimation(c) {
|
|
340
|
+
this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation &&= (cancelFrame(this.pendingAnimation), void 0), this.pendingAnimation = frame.update(() => {
|
|
341
|
+
globalProjectionState.hasAnimatedSinceResize = !0, this.motionValue ||= motionValue(0), this.motionValue.jump(0, !1), this.currentAnimation = animateSingleValue(this.motionValue, [0, 1e3], {
|
|
342
|
+
...c,
|
|
343
|
+
velocity: 0,
|
|
344
|
+
isSync: !0,
|
|
345
|
+
onUpdate: (L) => {
|
|
346
|
+
this.mixTargetDelta(L), c.onUpdate && c.onUpdate(L);
|
|
347
|
+
},
|
|
348
|
+
onComplete: () => {
|
|
349
|
+
c.onComplete && c.onComplete(), this.completeAnimation();
|
|
350
|
+
}
|
|
351
|
+
}), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0;
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
completeAnimation() {
|
|
355
|
+
this.resumingFrom && (this.resumingFrom.currentAnimation = void 0, this.resumingFrom.preserveOpacity = void 0);
|
|
356
|
+
let c = this.getStack();
|
|
357
|
+
c && c.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
358
|
+
}
|
|
359
|
+
finishAnimation() {
|
|
360
|
+
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(animationTarget), this.currentAnimation.stop()), this.completeAnimation();
|
|
361
|
+
}
|
|
362
|
+
applyTransformsToTarget() {
|
|
363
|
+
let c = this.getLead(), { targetWithTransforms: L, target: R, layout: z, latestValues: B } = c;
|
|
364
|
+
if (!(!L || !R || !z)) {
|
|
365
|
+
if (this !== c && this.layout && z && shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, z.layoutBox)) {
|
|
366
|
+
R = this.target || createBox();
|
|
367
|
+
let L = calcLength(this.layout.layoutBox.x);
|
|
368
|
+
R.x.min = c.target.x.min, R.x.max = R.x.min + L;
|
|
369
|
+
let z = calcLength(this.layout.layoutBox.y);
|
|
370
|
+
R.y.min = c.target.y.min, R.y.max = R.y.min + z;
|
|
371
|
+
}
|
|
372
|
+
copyBoxInto(L, R), transformBox(L, B), calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, L, B);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
registerSharedNode(c, L) {
|
|
376
|
+
this.sharedNodes.has(c) || this.sharedNodes.set(c, new NodeStack()), this.sharedNodes.get(c).add(L);
|
|
377
|
+
let R = L.options.initialPromotionConfig;
|
|
378
|
+
L.promote({
|
|
379
|
+
transition: R ? R.transition : void 0,
|
|
380
|
+
preserveFollowOpacity: R && R.shouldPreserveFollowOpacity ? R.shouldPreserveFollowOpacity(L) : void 0
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
isLead() {
|
|
384
|
+
let c = this.getStack();
|
|
385
|
+
return c ? c.lead === this : !0;
|
|
386
|
+
}
|
|
387
|
+
getLead() {
|
|
388
|
+
let { layoutId: c } = this.options;
|
|
389
|
+
return c && this.getStack()?.lead || this;
|
|
390
|
+
}
|
|
391
|
+
getPrevLead() {
|
|
392
|
+
let { layoutId: c } = this.options;
|
|
393
|
+
return c ? this.getStack()?.prevLead : void 0;
|
|
394
|
+
}
|
|
395
|
+
getStack() {
|
|
396
|
+
let { layoutId: c } = this.options;
|
|
397
|
+
if (c) return this.root.sharedNodes.get(c);
|
|
398
|
+
}
|
|
399
|
+
promote({ needsReset: c, transition: L, preserveFollowOpacity: R } = {}) {
|
|
400
|
+
let z = this.getStack();
|
|
401
|
+
z && z.promote(this, R), c && (this.projectionDelta = void 0, this.needsReset = !0), L && this.setOptions({ transition: L });
|
|
402
|
+
}
|
|
403
|
+
relegate() {
|
|
404
|
+
let c = this.getStack();
|
|
405
|
+
return c ? c.relegate(this) : !1;
|
|
406
|
+
}
|
|
407
|
+
resetSkewAndRotation() {
|
|
408
|
+
let { visualElement: c } = this.options;
|
|
409
|
+
if (!c) return;
|
|
410
|
+
let L = !1, { latestValues: R } = c;
|
|
411
|
+
if ((R.z || R.rotate || R.rotateX || R.rotateY || R.rotateZ || R.skewX || R.skewY) && (L = !0), !L) return;
|
|
412
|
+
let z = {};
|
|
413
|
+
R.z && resetDistortingTransform("z", c, z, this.animationValues);
|
|
414
|
+
for (let L = 0; L < transformAxes.length; L++) resetDistortingTransform(`rotate${transformAxes[L]}`, c, z, this.animationValues), resetDistortingTransform(`skew${transformAxes[L]}`, c, z, this.animationValues);
|
|
415
|
+
for (let L in c.render(), z) c.setStaticValue(L, z[L]), this.animationValues && (this.animationValues[L] = z[L]);
|
|
416
|
+
c.scheduleRender();
|
|
417
|
+
}
|
|
418
|
+
applyProjectionStyles(c, L) {
|
|
419
|
+
if (!this.instance || this.isSVG) return;
|
|
420
|
+
if (!this.isVisible) {
|
|
421
|
+
c.visibility = "hidden";
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
let R = this.getTransformTemplate();
|
|
425
|
+
if (this.needsReset) {
|
|
426
|
+
this.needsReset = !1, c.visibility = "", c.opacity = "", c.pointerEvents = resolveMotionValue(L?.pointerEvents) || "", c.transform = R ? R(this.latestValues, "") : "none";
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
let z = this.getLead();
|
|
430
|
+
if (!this.projectionDelta || !this.layout || !z.target) {
|
|
431
|
+
this.options.layoutId && (c.opacity = this.latestValues.opacity === void 0 ? 1 : this.latestValues.opacity, c.pointerEvents = resolveMotionValue(L?.pointerEvents) || ""), this.hasProjected && !hasTransform(this.latestValues) && (c.transform = R ? R({}, "") : "none", this.hasProjected = !1);
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
c.visibility = "";
|
|
435
|
+
let B = z.animationValues || z.latestValues;
|
|
436
|
+
this.applyTransformsToTarget();
|
|
437
|
+
let V = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, B);
|
|
438
|
+
R && (V = R(B, V)), c.transform = V;
|
|
439
|
+
let { x: H, y: U } = this.projectionDelta;
|
|
440
|
+
for (let L in c.transformOrigin = `${H.origin * 100}% ${U.origin * 100}% 0`, z.animationValues ? c.opacity = z === this ? B.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : B.opacityExit : c.opacity = z === this ? B.opacity === void 0 ? "" : B.opacity : B.opacityExit === void 0 ? 0 : B.opacityExit, scaleCorrectors) {
|
|
441
|
+
if (B[L] === void 0) continue;
|
|
442
|
+
let { correct: R, applyTo: H, isCSSVariable: U } = scaleCorrectors[L], W = V === "none" ? B[L] : R(B[L], z);
|
|
443
|
+
if (H) {
|
|
444
|
+
let L = H.length;
|
|
445
|
+
for (let R = 0; R < L; R++) c[H[R]] = W;
|
|
446
|
+
} else U ? this.options.visualElement.renderState.vars[L] = W : c[L] = W;
|
|
447
|
+
}
|
|
448
|
+
this.options.layoutId && (c.pointerEvents = z === this ? resolveMotionValue(L?.pointerEvents) || "" : "none");
|
|
449
|
+
}
|
|
450
|
+
clearSnapshot() {
|
|
451
|
+
this.resumeFrom = this.snapshot = void 0;
|
|
452
|
+
}
|
|
453
|
+
resetTree() {
|
|
454
|
+
this.root.nodes.forEach((c) => c.currentAnimation?.stop()), this.root.nodes.forEach(clearMeasurements), this.root.sharedNodes.clear();
|
|
455
|
+
}
|
|
456
|
+
};
|
|
492
457
|
}
|
|
493
|
-
function
|
|
494
|
-
|
|
458
|
+
function updateLayout(c) {
|
|
459
|
+
c.updateLayout();
|
|
495
460
|
}
|
|
496
|
-
function
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
}
|
|
542
|
-
e.options.transition = void 0;
|
|
461
|
+
function notifyLayoutUpdate(c) {
|
|
462
|
+
let L = c.resumeFrom?.snapshot || c.snapshot;
|
|
463
|
+
if (c.isLead() && c.layout && L && c.hasListeners("didUpdate")) {
|
|
464
|
+
let { layoutBox: R, measuredBox: z } = c.layout, { animationType: B } = c.options, V = L.source !== c.layout.source;
|
|
465
|
+
if (B === "size") eachAxis((c) => {
|
|
466
|
+
let z = V ? L.measuredBox[c] : L.layoutBox[c], B = calcLength(z);
|
|
467
|
+
z.min = R[c].min, z.max = z.min + B;
|
|
468
|
+
});
|
|
469
|
+
else if (B === "x" || B === "y") {
|
|
470
|
+
let c = B === "x" ? "y" : "x";
|
|
471
|
+
copyAxisInto(V ? L.measuredBox[c] : L.layoutBox[c], R[c]);
|
|
472
|
+
} else shouldAnimatePositionOnly(B, L.layoutBox, R) && eachAxis((z) => {
|
|
473
|
+
let B = V ? L.measuredBox[z] : L.layoutBox[z], H = calcLength(R[z]);
|
|
474
|
+
B.max = B.min + H, c.relativeTarget && !c.currentAnimation && (c.isProjectionDirty = !0, c.relativeTarget[z].max = c.relativeTarget[z].min + H);
|
|
475
|
+
});
|
|
476
|
+
let H = createDelta();
|
|
477
|
+
calcBoxDelta(H, R, L.layoutBox);
|
|
478
|
+
let U = createDelta();
|
|
479
|
+
V ? calcBoxDelta(U, c.applyTransform(z, !0), L.measuredBox) : calcBoxDelta(U, R, L.layoutBox);
|
|
480
|
+
let W = !isDeltaZero(H), G = !1;
|
|
481
|
+
if (!c.resumeFrom) {
|
|
482
|
+
let z = c.getClosestProjectingParent();
|
|
483
|
+
if (z && !z.resumeFrom) {
|
|
484
|
+
let { snapshot: B, layout: V } = z;
|
|
485
|
+
if (B && V) {
|
|
486
|
+
let H = c.options.layoutAnchor || void 0, U = createBox();
|
|
487
|
+
calcRelativePosition(U, L.layoutBox, B.layoutBox, H);
|
|
488
|
+
let W = createBox();
|
|
489
|
+
calcRelativePosition(W, R, V.layoutBox, H), boxEqualsRounded(U, W) || (G = !0), z.options.layoutRoot && (c.relativeTarget = W, c.relativeTargetOrigin = U, c.relativeParent = z);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
c.notifyListeners("didUpdate", {
|
|
494
|
+
layout: R,
|
|
495
|
+
snapshot: L,
|
|
496
|
+
delta: U,
|
|
497
|
+
layoutDelta: H,
|
|
498
|
+
hasLayoutChanged: W,
|
|
499
|
+
hasRelativeLayoutChanged: G
|
|
500
|
+
});
|
|
501
|
+
} else if (c.isLead()) {
|
|
502
|
+
let { onExitComplete: L } = c.options;
|
|
503
|
+
L && L();
|
|
504
|
+
}
|
|
505
|
+
c.options.transition = void 0;
|
|
543
506
|
}
|
|
544
|
-
function
|
|
545
|
-
|
|
507
|
+
function propagateDirtyNodes(c) {
|
|
508
|
+
statsBuffer.value && metrics.nodes++, c.parent && (c.isProjecting() || (c.isProjectionDirty = c.parent.isProjectionDirty), c.isSharedProjectionDirty ||= !!(c.isProjectionDirty || c.parent.isProjectionDirty || c.parent.isSharedProjectionDirty), c.isTransformDirty ||= c.parent.isTransformDirty);
|
|
546
509
|
}
|
|
547
|
-
function
|
|
548
|
-
|
|
510
|
+
function cleanDirtyNodes(c) {
|
|
511
|
+
c.isProjectionDirty = c.isSharedProjectionDirty = c.isTransformDirty = !1;
|
|
549
512
|
}
|
|
550
|
-
function
|
|
551
|
-
|
|
513
|
+
function clearSnapshot(c) {
|
|
514
|
+
c.clearSnapshot();
|
|
552
515
|
}
|
|
553
|
-
function
|
|
554
|
-
|
|
516
|
+
function clearMeasurements(c) {
|
|
517
|
+
c.clearMeasurements();
|
|
555
518
|
}
|
|
556
|
-
function
|
|
557
|
-
|
|
519
|
+
function forceLayoutMeasure(c) {
|
|
520
|
+
c.isLayoutDirty = !0, c.updateLayout();
|
|
558
521
|
}
|
|
559
|
-
function
|
|
560
|
-
|
|
522
|
+
function clearIsLayoutDirty(c) {
|
|
523
|
+
c.isLayoutDirty = !1;
|
|
561
524
|
}
|
|
562
|
-
function
|
|
563
|
-
|
|
525
|
+
function ensureDraggedNodesSnapshotted(c) {
|
|
526
|
+
c.isAnimationBlocked && c.layout && !c.isLayoutDirty && (c.snapshot = c.layout, c.isLayoutDirty = !0);
|
|
564
527
|
}
|
|
565
|
-
function
|
|
566
|
-
|
|
567
|
-
|
|
528
|
+
function resetTransformStyle(c) {
|
|
529
|
+
let { visualElement: L } = c.options;
|
|
530
|
+
L && L.getProps().onBeforeLayoutMeasure && L.notify("BeforeLayoutMeasure"), c.resetTransform();
|
|
568
531
|
}
|
|
569
|
-
function
|
|
570
|
-
|
|
532
|
+
function finishAnimation(c) {
|
|
533
|
+
c.finishAnimation(), c.targetDelta = c.relativeTarget = c.target = void 0, c.isProjectionDirty = !0;
|
|
571
534
|
}
|
|
572
|
-
function
|
|
573
|
-
|
|
535
|
+
function resolveTargetDelta(c) {
|
|
536
|
+
c.resolveTargetDelta();
|
|
574
537
|
}
|
|
575
|
-
function
|
|
576
|
-
|
|
538
|
+
function calcProjection(c) {
|
|
539
|
+
c.calcProjection();
|
|
577
540
|
}
|
|
578
|
-
function
|
|
579
|
-
|
|
541
|
+
function resetSkewAndRotation(c) {
|
|
542
|
+
c.resetSkewAndRotation();
|
|
580
543
|
}
|
|
581
|
-
function
|
|
582
|
-
|
|
544
|
+
function removeLeadSnapshots(c) {
|
|
545
|
+
c.removeLeadSnapshot();
|
|
583
546
|
}
|
|
584
|
-
function
|
|
585
|
-
|
|
547
|
+
function mixAxisDeltaLinear(c, L, R) {
|
|
548
|
+
c.translate = mixNumber(L.translate, 0, R), c.scale = mixNumber(L.scale, 1, R), c.origin = L.origin, c.originPoint = L.originPoint;
|
|
586
549
|
}
|
|
587
|
-
function
|
|
588
|
-
|
|
550
|
+
function mixAxis(c, L, R, z) {
|
|
551
|
+
c.min = mixNumber(L.min, R.min, z), c.max = mixNumber(L.max, R.max, z);
|
|
589
552
|
}
|
|
590
|
-
function
|
|
591
|
-
|
|
553
|
+
function mixBox(c, L, R, z) {
|
|
554
|
+
mixAxis(c.x, L.x, R.x, z), mixAxis(c.y, L.y, R.y, z);
|
|
592
555
|
}
|
|
593
|
-
function
|
|
594
|
-
|
|
556
|
+
function hasOpacityCrossfade(c) {
|
|
557
|
+
return c.animationValues && c.animationValues.opacityExit !== void 0;
|
|
595
558
|
}
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
559
|
+
var defaultLayoutTransition = {
|
|
560
|
+
duration: .45,
|
|
561
|
+
ease: [
|
|
562
|
+
.4,
|
|
563
|
+
0,
|
|
564
|
+
.1,
|
|
565
|
+
1
|
|
566
|
+
]
|
|
567
|
+
}, userAgentContains = (c) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(c), roundPoint = userAgentContains("applewebkit/") && !userAgentContains("chrome/") ? Math.round : noop;
|
|
568
|
+
function roundAxis(c) {
|
|
569
|
+
c.min = roundPoint(c.min), c.max = roundPoint(c.max);
|
|
602
570
|
}
|
|
603
|
-
function
|
|
604
|
-
|
|
571
|
+
function roundBox(c) {
|
|
572
|
+
roundAxis(c.x), roundAxis(c.y);
|
|
605
573
|
}
|
|
606
|
-
function
|
|
607
|
-
|
|
574
|
+
function shouldAnimatePositionOnly(c, L, R) {
|
|
575
|
+
return c === "position" || c === "preserve-aspect" && !isNear(aspectRatio(L), aspectRatio(R), .2);
|
|
608
576
|
}
|
|
609
|
-
function
|
|
610
|
-
|
|
577
|
+
function checkNodeWasScrollRoot(c) {
|
|
578
|
+
return c !== c.root && c.scroll?.wasRoot;
|
|
611
579
|
}
|
|
612
|
-
export {
|
|
613
|
-
Ot as cleanDirtyNodes,
|
|
614
|
-
Re as createProjectionNode,
|
|
615
|
-
Q as mixAxis,
|
|
616
|
-
qt as mixBox,
|
|
617
|
-
Ft as propagateDirtyNodes
|
|
618
|
-
};
|
|
580
|
+
export { cleanDirtyNodes, createProjectionNode, propagateDirtyNodes };
|