@code0-tech/pictor 1.1.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.
Files changed (333) hide show
  1. package/dist/_virtual/rolldown_runtime.js +3 -12
  2. package/dist/components/alert/Alert.js +19 -20
  3. package/dist/components/aurora/Aurora.js +15 -16
  4. package/dist/components/avatar/Avatar.js +44 -44
  5. package/dist/components/badge/Badge.js +36 -37
  6. package/dist/components/button/Button.js +16 -17
  7. package/dist/components/button-group/ButtonGroup.js +15 -16
  8. package/dist/components/card/Card.js +21 -22
  9. package/dist/components/card/CardSection.js +15 -15
  10. package/dist/components/chart/Chart.js +82 -82
  11. package/dist/components/chart/LineChart.js +50 -51
  12. package/dist/components/col/Col.js +9 -10
  13. package/dist/components/command/Command.js +32 -33
  14. package/dist/components/container/Container.js +9 -10
  15. package/dist/components/context-menu/ContextMenu.js +76 -77
  16. package/dist/components/data-table/DataTableColumn.js +9 -10
  17. package/dist/components/data-table/DataTableFilterInput.js +83 -83
  18. package/dist/components/data-table/DataTableFilterSuggestionMenu.js +26 -27
  19. package/dist/components/data-table/DataTableHeader.js +20 -21
  20. package/dist/components/data-table/DataTablePagination.js +27 -28
  21. package/dist/components/dialog/Dialog.js +61 -62
  22. package/dist/components/file-tabs/FileTabs.js +51 -52
  23. package/dist/components/flex/Flex.js +9 -10
  24. package/dist/components/form/CheckboxInput.js +50 -51
  25. package/dist/components/form/ColorInput.js +242 -242
  26. package/dist/components/form/DateInput.js +55 -55
  27. package/dist/components/form/EditorInput.js +300 -300
  28. package/dist/components/form/FileInput.js +67 -68
  29. package/dist/components/form/InputDescription.js +3 -4
  30. package/dist/components/form/InputLabel.js +9 -10
  31. package/dist/components/form/InputMessage.js +6 -7
  32. package/dist/components/form/InputWrapper.js +37 -38
  33. package/dist/components/form/PasswordInput.js +2 -2
  34. package/dist/components/form/PinInput.js +30 -31
  35. package/dist/components/form/RadioGroup.js +22 -23
  36. package/dist/components/form/RadioInput.js +19 -20
  37. package/dist/components/form/SelectInput.js +55 -56
  38. package/dist/components/form/TagInput.js +44 -44
  39. package/dist/components/fullscreen/FullScreen.js +14 -15
  40. package/dist/components/gantt/Gantt.js +63 -64
  41. package/dist/components/gantt/GanttGroup.js +2 -2
  42. package/dist/components/gantt/GanttHeader.js +40 -41
  43. package/dist/components/gantt/GanttItem.js +11 -12
  44. package/dist/components/icon/Icon.js +22 -22
  45. package/dist/components/json-view/JsonView.js +37 -38
  46. package/dist/components/layout/Layout.js +64 -65
  47. package/dist/components/menu/Menu.js +91 -92
  48. package/dist/components/quote/Quote.js +29 -30
  49. package/dist/components/resizable/Resizable.js +22 -23
  50. package/dist/components/row/Row.js +9 -10
  51. package/dist/components/scroll-area/ScrollArea.js +46 -47
  52. package/dist/components/segmented-control/SegmentedControl.js +35 -35
  53. package/dist/components/spacing/Spacing.js +8 -9
  54. package/dist/components/tab/Tab.js +53 -53
  55. package/dist/components/text/Text.js +9 -10
  56. package/dist/components/toast/Toast.js +47 -47
  57. package/dist/components/tooltip/Tooltip.js +35 -36
  58. package/dist/utils/contextStore.js +31 -32
  59. package/dist/utils/motion.js +39 -40
  60. package/package.json +4 -4
  61. package/dist/_virtual/__vite-optional-peer-dep_@emotion/is-prop-valid_framer-motion.js +0 -6
  62. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -59
  63. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -51
  64. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -58
  65. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -18
  66. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +0 -9
  67. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -4
  68. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -4
  69. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -8
  70. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -15
  71. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -4
  72. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -13
  73. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -4
  74. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -4
  75. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -6
  76. package/dist/node_modules/framer-motion/dist/es/events/event-info.js +0 -9
  77. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -256
  78. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -20
  79. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -57
  80. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +0 -25
  81. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +0 -18
  82. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -136
  83. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -40
  84. package/dist/node_modules/framer-motion/dist/es/gestures/press.js +0 -24
  85. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -37
  86. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -23
  87. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -7
  88. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -49
  89. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -13
  90. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -11
  91. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -59
  92. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -7
  93. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -11
  94. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -44
  95. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -22
  96. package/dist/node_modules/framer-motion/dist/es/motion/index.js +0 -68
  97. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -2
  98. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -19
  99. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -56
  100. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -48
  101. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -5
  102. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +0 -8
  103. package/dist/node_modules/framer-motion/dist/es/render/components/m/proxy.js +0 -3
  104. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +0 -11
  105. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +0 -5
  106. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -6
  107. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -19
  108. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -17
  109. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -5
  110. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +0 -9
  111. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -24
  112. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -7
  113. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -28
  114. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -24
  115. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +0 -9
  116. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -6
  117. package/dist/node_modules/framer-motion/dist/es/utils/distance.js +0 -6
  118. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +0 -2
  119. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -2
  120. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -4
  121. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +0 -11
  122. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +0 -23
  123. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -7
  124. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -5
  125. package/dist/node_modules/motion/dist/es/react.js +0 -196
  126. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +0 -105
  127. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +0 -127
  128. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +0 -82
  129. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +0 -26
  130. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +0 -8
  131. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +0 -11
  132. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +0 -30
  133. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +0 -20
  134. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +0 -164
  135. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +0 -7
  136. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +0 -14
  137. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +0 -4
  138. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +0 -7
  139. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +0 -43
  140. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +0 -54
  141. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +0 -24
  142. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +0 -19
  143. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +0 -59
  144. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +0 -65
  145. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +0 -6
  146. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +0 -6
  147. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +0 -10
  148. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +0 -4
  149. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +0 -4
  150. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +0 -5
  151. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +0 -16
  152. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +0 -34
  153. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +0 -3
  154. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +0 -5
  155. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +0 -20
  156. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +0 -5
  157. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +0 -16
  158. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +0 -23
  159. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +0 -25
  160. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +0 -6
  161. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +0 -3
  162. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +0 -5
  163. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +0 -17
  164. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +0 -4
  165. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +0 -14
  166. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +0 -11
  167. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +0 -2
  168. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +0 -9
  169. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +0 -33
  170. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +0 -17
  171. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +0 -22
  172. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +0 -8
  173. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +0 -6
  174. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +0 -6
  175. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +0 -6
  176. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +0 -15
  177. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +0 -4
  178. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +0 -28
  179. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +0 -4
  180. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +0 -3
  181. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +0 -11
  182. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +0 -30
  183. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +0 -13
  184. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +0 -8
  185. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +0 -9
  186. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +0 -34
  187. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +0 -34
  188. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +0 -19
  189. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +0 -26
  190. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +0 -2
  191. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +0 -2
  192. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +0 -2
  193. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +0 -14
  194. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +0 -23
  195. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +0 -37
  196. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +0 -10
  197. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +0 -41
  198. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +0 -28
  199. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +0 -27
  200. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +0 -16
  201. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +0 -26
  202. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +0 -11
  203. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +0 -20
  204. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +0 -580
  205. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +0 -5
  206. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +0 -49
  207. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +0 -11
  208. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +0 -11
  209. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +0 -15
  210. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +0 -10
  211. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +0 -2
  212. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +0 -4
  213. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +0 -17
  214. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +0 -16
  215. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +0 -10
  216. package/dist/node_modules/motion-dom/dist/es/render/Feature.js +0 -7
  217. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +0 -201
  218. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +0 -26
  219. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +0 -2
  220. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +0 -54
  221. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +0 -5
  222. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +0 -4
  223. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +0 -37
  224. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +0 -26
  225. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +0 -34
  226. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +0 -6
  227. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +0 -9
  228. package/dist/node_modules/motion-dom/dist/es/render/store.js +0 -2
  229. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +0 -38
  230. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +0 -20
  231. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +0 -26
  232. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +0 -2
  233. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +0 -13
  234. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +0 -7
  235. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +0 -12
  236. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +0 -133
  237. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +0 -17
  238. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +0 -4
  239. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +0 -10
  240. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +0 -6
  241. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +0 -2
  242. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +0 -4
  243. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +0 -11
  244. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +0 -20
  245. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +0 -19
  246. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +0 -9
  247. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +0 -2
  248. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +0 -6
  249. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +0 -18
  250. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +0 -17
  251. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +0 -8
  252. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +0 -10
  253. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +0 -35
  254. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +0 -20
  255. package/dist/node_modules/motion-dom/dist/es/resize/index.js +0 -6
  256. package/dist/node_modules/motion-dom/dist/es/stats/buffer.js +0 -5
  257. package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js +0 -7
  258. package/dist/node_modules/motion-dom/dist/es/utils/delay.js +0 -10
  259. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +0 -31
  260. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +0 -5
  261. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +0 -5
  262. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +0 -5
  263. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +0 -28
  264. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +0 -50
  265. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +0 -4
  266. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +0 -6
  267. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +0 -2
  268. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +0 -5
  269. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +0 -12
  270. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +0 -2
  271. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +0 -10
  272. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +0 -7
  273. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +0 -3
  274. package/dist/node_modules/motion-dom/dist/es/value/index.js +0 -90
  275. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +0 -5
  276. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +0 -17
  277. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +0 -19
  278. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +0 -10
  279. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +0 -13
  280. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +0 -13
  281. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +0 -14
  282. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +0 -24
  283. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +0 -50
  284. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +0 -12
  285. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +0 -14
  286. package/dist/node_modules/motion-dom/dist/es/value/types/int.js +0 -6
  287. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +0 -22
  288. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +0 -62
  289. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +0 -30
  290. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +0 -13
  291. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +0 -10
  292. package/dist/node_modules/motion-dom/dist/es/value/types/test.js +0 -2
  293. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +0 -10
  294. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +0 -2
  295. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +0 -10
  296. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +0 -2
  297. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +0 -2
  298. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +0 -4
  299. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +0 -2
  300. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +0 -2
  301. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +0 -2
  302. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +0 -5
  303. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +0 -11
  304. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +0 -5
  305. package/dist/node_modules/motion-utils/dist/es/array.js +0 -8
  306. package/dist/node_modules/motion-utils/dist/es/clamp.js +0 -2
  307. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +0 -3
  308. package/dist/node_modules/motion-utils/dist/es/easing/back.js +0 -5
  309. package/dist/node_modules/motion-utils/dist/es/easing/circ.js +0 -4
  310. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +0 -16
  311. package/dist/node_modules/motion-utils/dist/es/easing/ease.js +0 -3
  312. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +0 -2
  313. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +0 -2
  314. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +0 -2
  315. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +0 -2
  316. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +0 -29
  317. package/dist/node_modules/motion-utils/dist/es/errors.js +0 -8
  318. package/dist/node_modules/motion-utils/dist/es/format-error-message.js +0 -4
  319. package/dist/node_modules/motion-utils/dist/es/global-config.js +0 -2
  320. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +0 -2
  321. package/dist/node_modules/motion-utils/dist/es/is-object.js +0 -2
  322. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +0 -2
  323. package/dist/node_modules/motion-utils/dist/es/memo.js +0 -6
  324. package/dist/node_modules/motion-utils/dist/es/noop.js +0 -2
  325. package/dist/node_modules/motion-utils/dist/es/pipe.js +0 -2
  326. package/dist/node_modules/motion-utils/dist/es/progress.js +0 -5
  327. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +0 -24
  328. package/dist/node_modules/motion-utils/dist/es/time-conversion.js +0 -2
  329. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +0 -2
  330. package/dist/node_modules/motion-utils/dist/es/warn-once.js +0 -6
  331. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +0 -21
  332. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +0 -18
  333. package/dist/node_modules/react/compiler-runtime.js +0 -8
@@ -1,580 +0,0 @@
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));
44
- }
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);
56
- }
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
- };
457
- }
458
- function updateLayout(c) {
459
- c.updateLayout();
460
- }
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;
506
- }
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);
509
- }
510
- function cleanDirtyNodes(c) {
511
- c.isProjectionDirty = c.isSharedProjectionDirty = c.isTransformDirty = !1;
512
- }
513
- function clearSnapshot(c) {
514
- c.clearSnapshot();
515
- }
516
- function clearMeasurements(c) {
517
- c.clearMeasurements();
518
- }
519
- function forceLayoutMeasure(c) {
520
- c.isLayoutDirty = !0, c.updateLayout();
521
- }
522
- function clearIsLayoutDirty(c) {
523
- c.isLayoutDirty = !1;
524
- }
525
- function ensureDraggedNodesSnapshotted(c) {
526
- c.isAnimationBlocked && c.layout && !c.isLayoutDirty && (c.snapshot = c.layout, c.isLayoutDirty = !0);
527
- }
528
- function resetTransformStyle(c) {
529
- let { visualElement: L } = c.options;
530
- L && L.getProps().onBeforeLayoutMeasure && L.notify("BeforeLayoutMeasure"), c.resetTransform();
531
- }
532
- function finishAnimation(c) {
533
- c.finishAnimation(), c.targetDelta = c.relativeTarget = c.target = void 0, c.isProjectionDirty = !0;
534
- }
535
- function resolveTargetDelta(c) {
536
- c.resolveTargetDelta();
537
- }
538
- function calcProjection(c) {
539
- c.calcProjection();
540
- }
541
- function resetSkewAndRotation(c) {
542
- c.resetSkewAndRotation();
543
- }
544
- function removeLeadSnapshots(c) {
545
- c.removeLeadSnapshot();
546
- }
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;
549
- }
550
- function mixAxis(c, L, R, z) {
551
- c.min = mixNumber(L.min, R.min, z), c.max = mixNumber(L.max, R.max, z);
552
- }
553
- function mixBox(c, L, R, z) {
554
- mixAxis(c.x, L.x, R.x, z), mixAxis(c.y, L.y, R.y, z);
555
- }
556
- function hasOpacityCrossfade(c) {
557
- return c.animationValues && c.animationValues.opacityExit !== void 0;
558
- }
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);
570
- }
571
- function roundBox(c) {
572
- roundAxis(c.x), roundAxis(c.y);
573
- }
574
- function shouldAnimatePositionOnly(c, L, R) {
575
- return c === "position" || c === "preserve-aspect" && !isNear(aspectRatio(L), aspectRatio(R), .2);
576
- }
577
- function checkNodeWasScrollRoot(c) {
578
- return c !== c.root && c.scroll?.wasRoot;
579
- }
580
- export { cleanDirtyNodes, createProjectionNode, propagateDirtyNodes };
@@ -1,5 +0,0 @@
1
- var globalProjectionState = {
2
- hasAnimatedSinceResize: !0,
3
- hasEverUpdated: !1
4
- };
5
- export { globalProjectionState };
@@ -1,49 +0,0 @@
1
- import { addUniqueItem, removeItem } from "../../../../../motion-utils/dist/es/array.js";
2
- var NodeStack = class {
3
- constructor() {
4
- this.members = [];
5
- }
6
- add(n) {
7
- addUniqueItem(this.members, n);
8
- for (let e = this.members.length - 1; e >= 0; e--) {
9
- let r = this.members[e];
10
- if (r === n || r === this.lead || r === this.prevLead) continue;
11
- let i = r.instance;
12
- (!i || i.isConnected === !1) && !r.snapshot && (removeItem(this.members, r), r.unmount());
13
- }
14
- n.scheduleRender();
15
- }
16
- remove(e) {
17
- if (removeItem(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
18
- let e = this.members[this.members.length - 1];
19
- e && this.promote(e);
20
- }
21
- }
22
- relegate(e) {
23
- for (let t = this.members.indexOf(e) - 1; t >= 0; t--) {
24
- let e = this.members[t];
25
- if (e.isPresent !== !1 && e.instance?.isConnected !== !1) return this.promote(e), !0;
26
- }
27
- return !1;
28
- }
29
- promote(e, t) {
30
- let n = this.lead;
31
- if (e !== n && (this.prevLead = n, this.lead = e, e.show(), n)) {
32
- n.updateSnapshot(), e.scheduleRender();
33
- let { layoutDependency: r } = n.options, { layoutDependency: i } = e.options;
34
- (r === void 0 || r !== i) && (e.resumeFrom = n, t && (n.preserveOpacity = !0), n.snapshot && (e.snapshot = n.snapshot, e.snapshot.latestValues = n.animationValues || n.latestValues), e.root?.isUpdating && (e.isLayoutDirty = !0)), e.options.crossfade === !1 && n.hide();
35
- }
36
- }
37
- exitAnimationComplete() {
38
- this.members.forEach((e) => {
39
- e.options.onExitComplete?.(), e.resumingFrom?.options.onExitComplete?.();
40
- });
41
- }
42
- scheduleRender() {
43
- this.members.forEach((e) => e.instance && e.scheduleRender(!1));
44
- }
45
- removeLeadSnapshot() {
46
- this.lead?.snapshot && (this.lead.snapshot = void 0);
47
- }
48
- };
49
- export { NodeStack };
@@ -1,11 +0,0 @@
1
- import { px } from "../../value/types/numbers/units.js";
2
- function pixelsToPercent(e, t) {
3
- return t.max === t.min ? 0 : e / (t.max - t.min) * 100;
4
- }
5
- var correctBorderRadius = { correct: (n, r) => {
6
- if (!r.target) return n;
7
- if (typeof n == "string") if (px.test(n)) n = parseFloat(n);
8
- else return n;
9
- return `${pixelsToPercent(n, r.target.x)}% ${pixelsToPercent(n, r.target.y)}%`;
10
- } };
11
- export { correctBorderRadius, pixelsToPercent };
@@ -1,11 +0,0 @@
1
- import { complex } from "../../value/types/complex/index.js";
2
- import { mixNumber } from "../../utils/mix/number.js";
3
- var correctBoxShadow = { correct: (n, { treeScale: r, projectionDelta: i }) => {
4
- let a = n, o = complex.parse(n);
5
- if (o.length > 5) return a;
6
- let s = complex.createTransformer(n), c = typeof o[0] == "number" ? 0 : 1, l = i.x.scale * r.x, u = i.y.scale * r.y;
7
- o[0 + c] /= l, o[1 + c] /= u;
8
- let d = mixNumber(l, u, .5);
9
- return typeof o[2 + c] == "number" && (o[2 + c] /= d), typeof o[3 + c] == "number" && (o[3 + c] /= d), s(o);
10
- } };
11
- export { correctBoxShadow };