@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.
Files changed (459) hide show
  1. package/dist/_virtual/__vite-optional-peer-dep_@emotion/is-prop-valid_framer-motion.js +6 -0
  2. package/dist/_virtual/rolldown_runtime.js +18 -0
  3. package/dist/assets/Alert.style.css +1 -0
  4. package/dist/assets/Aurora.style.css +1 -0
  5. package/dist/assets/Avatar.style.css +1 -0
  6. package/dist/assets/Badge.style.css +1 -0
  7. package/dist/assets/Breadcrumb.style.css +1 -0
  8. package/dist/assets/Button.style.css +1 -0
  9. package/dist/assets/ButtonGroup.style.css +1 -0
  10. package/dist/assets/Card.style.css +1 -0
  11. package/dist/assets/Chart.style.css +1 -0
  12. package/dist/assets/Col.style.css +1 -0
  13. package/dist/assets/ColorInput.style.css +1 -0
  14. package/dist/assets/Command.style.css +1 -0
  15. package/dist/assets/Container.style.css +1 -0
  16. package/dist/assets/ContextMenu.style.css +1 -0
  17. package/dist/assets/DataTable.style.css +1 -0
  18. package/dist/assets/DateInput.style.css +1 -0
  19. package/dist/assets/Dialog.style.css +1 -0
  20. package/dist/assets/Editor.styles.css +1 -0
  21. package/dist/assets/EditorInput.style.css +1 -0
  22. package/dist/assets/FileInput.style.css +1 -0
  23. package/dist/assets/FileTabs.style.css +1 -0
  24. package/dist/assets/FullScreen.style.css +1 -0
  25. package/dist/assets/Gantt.style.css +1 -0
  26. package/dist/assets/Icon.style.css +1 -0
  27. package/dist/assets/Input.style.css +1 -0
  28. package/dist/assets/InputWrapper.style.css +1 -0
  29. package/dist/assets/JsonView.style.css +1 -0
  30. package/dist/assets/Layout.style.css +1 -0
  31. package/dist/assets/Menu.style.css +1 -0
  32. package/dist/assets/Progress.style.css +1 -0
  33. package/dist/assets/Quote.style.css +1 -0
  34. package/dist/assets/Resizable.style.css +1 -0
  35. package/dist/assets/Row.style.css +1 -0
  36. package/dist/assets/ScrollArea.style.css +1 -0
  37. package/dist/assets/SegmentedControl.style.css +1 -0
  38. package/dist/assets/SelectInput.style.css +1 -0
  39. package/dist/assets/Tab.style.css +1 -0
  40. package/dist/assets/Text.style.css +1 -0
  41. package/dist/assets/Toast.style.css +1 -0
  42. package/dist/assets/Tooltip.style.css +1 -0
  43. package/dist/components/alert/Alert.js +34 -41
  44. package/dist/components/aurora/Aurora.js +27 -22
  45. package/dist/components/avatar/Avatar.js +57 -55
  46. package/dist/components/badge/Badge.js +58 -64
  47. package/dist/components/breadcrumb/Breadcrumb.js +16 -21
  48. package/dist/components/button/Button.js +24 -31
  49. package/dist/components/button-group/ButtonGroup.js +29 -31
  50. package/dist/components/card/Card.js +30 -44
  51. package/dist/components/card/CardSection.js +21 -29
  52. package/dist/components/chart/Chart.js +138 -153
  53. package/dist/components/chart/LineChart.js +75 -74
  54. package/dist/components/chart/index.js +3 -8
  55. package/dist/components/col/Col.js +19 -29
  56. package/dist/components/command/Command.js +101 -134
  57. package/dist/components/container/Container.js +19 -23
  58. package/dist/components/context-menu/ContextMenu.js +119 -112
  59. package/dist/components/data-table/DataTable.js +53 -64
  60. package/dist/components/data-table/DataTableColumn.js +18 -22
  61. package/dist/components/data-table/DataTableFilterInput.js +208 -205
  62. package/dist/components/data-table/DataTableFilterSuggestionMenu.js +59 -48
  63. package/dist/components/data-table/DataTableHeader.js +34 -38
  64. package/dist/components/data-table/DataTablePagination.js +62 -74
  65. package/dist/components/data-table/index.js +7 -22
  66. package/dist/components/dialog/Dialog.js +107 -97
  67. package/dist/components/editor/Editor.js +352 -323
  68. package/dist/components/file-tabs/FileTabs.js +78 -73
  69. package/dist/components/file-tabs/FileTabs.service.js +85 -87
  70. package/dist/components/file-tabs/FileTabs.view.js +0 -1
  71. package/dist/components/file-tabs/index.js +3 -9
  72. package/dist/components/flex/Flex.js +19 -23
  73. package/dist/components/form/CheckboxInput.js +73 -76
  74. package/dist/components/form/ColorInput.js +378 -353
  75. package/dist/components/form/DateInput.js +315 -265
  76. package/dist/components/form/EditorInput.js +597 -579
  77. package/dist/components/form/EmailInput.js +30 -23
  78. package/dist/components/form/FileInput.js +93 -123
  79. package/dist/components/form/Input.js +64 -58
  80. package/dist/components/form/Input.utils.js +25 -37
  81. package/dist/components/form/InputDescription.js +11 -11
  82. package/dist/components/form/InputLabel.js +18 -22
  83. package/dist/components/form/InputMessage.js +17 -17
  84. package/dist/components/form/InputWrapper.js +56 -65
  85. package/dist/components/form/NumberInput.js +41 -20
  86. package/dist/components/form/PasswordInput.js +71 -54
  87. package/dist/components/form/PinInput.js +50 -65
  88. package/dist/components/form/RadioGroup.js +42 -50
  89. package/dist/components/form/RadioInput.js +31 -29
  90. package/dist/components/form/SelectInput.js +69 -92
  91. package/dist/components/form/SwitchInput.js +17 -18
  92. package/dist/components/form/TagInput.js +108 -122
  93. package/dist/components/form/TextAreaInput.js +24 -21
  94. package/dist/components/form/TextInput.js +30 -22
  95. package/dist/components/form/index.js +22 -87
  96. package/dist/components/form/useForm.js +87 -88
  97. package/dist/components/fullscreen/FullScreen.js +28 -27
  98. package/dist/components/gantt/Gantt.js +100 -98
  99. package/dist/components/gantt/GanttGroup.js +210 -195
  100. package/dist/components/gantt/GanttHeader.js +79 -81
  101. package/dist/components/gantt/GanttItem.js +19 -22
  102. package/dist/components/icon/Icon.d.ts +6 -4
  103. package/dist/components/icon/Icon.js +53 -42
  104. package/dist/components/icon/codezero/codezero.js +10 -0
  105. package/dist/components/icon/codezero/gls.js +9 -0
  106. package/dist/components/icon/codezero/index.js +17 -13
  107. package/dist/components/json-view/JsonView.js +120 -109
  108. package/dist/components/layout/Layout.js +101 -78
  109. package/dist/components/menu/Menu.js +135 -128
  110. package/dist/components/progress/ProgressCircle.js +60 -49
  111. package/dist/components/progress/ProgressLinear.js +39 -43
  112. package/dist/components/quote/Quote.js +52 -43
  113. package/dist/components/resizable/Resizable.js +36 -33
  114. package/dist/components/row/Row.js +19 -23
  115. package/dist/components/scroll-area/ScrollArea.js +66 -76
  116. package/dist/components/segmented-control/SegmentedControl.js +46 -50
  117. package/dist/components/spacing/Spacing.js +16 -23
  118. package/dist/components/tab/Tab.js +73 -66
  119. package/dist/components/text/Text.js +19 -25
  120. package/dist/components/toast/Toast.js +104 -82
  121. package/dist/components/tooltip/Tooltip.js +66 -55
  122. package/dist/index.js +76 -272
  123. package/dist/node_modules/@lezer/common/dist/index.js +778 -143
  124. package/dist/node_modules/@lezer/highlight/dist/index.js +305 -536
  125. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +55 -55
  126. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +49 -32
  127. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +57 -46
  128. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +17 -16
  129. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +8 -11
  130. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +4 -5
  131. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +4 -5
  132. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +7 -8
  133. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +13 -11
  134. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +4 -5
  135. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +12 -14
  136. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +4 -5
  137. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +4 -5
  138. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +5 -7
  139. package/dist/node_modules/framer-motion/dist/es/events/event-info.js +8 -13
  140. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +252 -281
  141. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +19 -21
  142. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +57 -67
  143. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +24 -27
  144. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +16 -19
  145. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +130 -124
  146. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +39 -42
  147. package/dist/node_modules/framer-motion/dist/es/gestures/press.js +22 -27
  148. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +36 -44
  149. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +22 -32
  150. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +6 -12
  151. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +47 -37
  152. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +12 -16
  153. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +10 -20
  154. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +58 -59
  155. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +7 -11
  156. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +10 -13
  157. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +42 -43
  158. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +19 -18
  159. package/dist/node_modules/framer-motion/dist/es/motion/index.js +64 -58
  160. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +2 -4
  161. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +18 -20
  162. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +53 -62
  163. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +45 -49
  164. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +4 -38
  165. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +7 -17
  166. package/dist/node_modules/framer-motion/dist/es/render/components/m/proxy.js +3 -0
  167. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +10 -12
  168. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +5 -7
  169. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +6 -10
  170. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +18 -15
  171. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +14 -18
  172. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +4 -23
  173. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +8 -9
  174. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +20 -23
  175. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +6 -8
  176. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +27 -29
  177. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +23 -21
  178. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +8 -9
  179. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +5 -7
  180. package/dist/node_modules/framer-motion/dist/es/utils/distance.js +5 -8
  181. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +2 -4
  182. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +2 -4
  183. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +3 -5
  184. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +10 -11
  185. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +20 -25
  186. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +6 -7
  187. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +5 -6
  188. package/dist/node_modules/motion/dist/es/react.js +196 -0
  189. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +104 -111
  190. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +126 -143
  191. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +81 -105
  192. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +25 -37
  193. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +7 -9
  194. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +10 -16
  195. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +29 -36
  196. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +18 -28
  197. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +156 -170
  198. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +6 -12
  199. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +13 -12
  200. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +3 -5
  201. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +6 -8
  202. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +42 -45
  203. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +52 -57
  204. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +22 -27
  205. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +18 -21
  206. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +58 -67
  207. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +61 -70
  208. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +5 -7
  209. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +5 -7
  210. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +9 -11
  211. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +3 -5
  212. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +3 -6
  213. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +4 -6
  214. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +15 -15
  215. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +32 -35
  216. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +3 -6
  217. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +4 -6
  218. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +19 -26
  219. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +4 -6
  220. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +14 -21
  221. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +21 -29
  222. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +25 -22
  223. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +5 -7
  224. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +3 -7
  225. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +4 -8
  226. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +15 -19
  227. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +3 -5
  228. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +12 -14
  229. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +10 -9
  230. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +2 -4
  231. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +8 -11
  232. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +32 -14
  233. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +16 -20
  234. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +21 -32
  235. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +7 -11
  236. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +5 -7
  237. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +5 -9
  238. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +5 -9
  239. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +12 -14
  240. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +3 -5
  241. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +27 -26
  242. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +4 -9
  243. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +3 -5
  244. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +10 -20
  245. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +29 -42
  246. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +11 -13
  247. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +6 -9
  248. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +8 -10
  249. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +32 -36
  250. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +32 -32
  251. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +16 -15
  252. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +23 -24
  253. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +2 -4
  254. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +2 -4
  255. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +2 -4
  256. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +13 -11
  257. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +20 -29
  258. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +34 -22
  259. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +7 -11
  260. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +41 -53
  261. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +28 -38
  262. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +23 -21
  263. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +15 -17
  264. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +18 -26
  265. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +10 -12
  266. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +19 -24
  267. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +554 -592
  268. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +4 -14
  269. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +48 -52
  270. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +10 -20
  271. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +11 -16
  272. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +14 -20
  273. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +9 -12
  274. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +2 -4
  275. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +3 -5
  276. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +16 -18
  277. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +11 -15
  278. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +8 -11
  279. package/dist/node_modules/motion-dom/dist/es/render/Feature.js +6 -9
  280. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +198 -260
  281. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +25 -27
  282. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +2 -4
  283. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +49 -60
  284. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +4 -6
  285. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +3 -5
  286. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +35 -35
  287. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +25 -28
  288. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +33 -37
  289. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +5 -11
  290. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +8 -12
  291. package/dist/node_modules/motion-dom/dist/es/render/store.js +2 -4
  292. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +37 -39
  293. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +18 -30
  294. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +25 -27
  295. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +2 -4
  296. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +11 -13
  297. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +6 -10
  298. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +11 -14
  299. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +128 -138
  300. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +16 -19
  301. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +3 -5
  302. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +8 -11
  303. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +5 -8
  304. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +2 -4
  305. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +3 -5
  306. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +10 -12
  307. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +20 -23
  308. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +18 -24
  309. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +8 -14
  310. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +2 -5
  311. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +5 -7
  312. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +16 -18
  313. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +14 -18
  314. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +7 -13
  315. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +10 -13
  316. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +31 -35
  317. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +18 -21
  318. package/dist/node_modules/motion-dom/dist/es/resize/index.js +5 -7
  319. package/dist/node_modules/motion-dom/dist/es/stats/buffer.js +5 -0
  320. package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js +7 -0
  321. package/dist/node_modules/motion-dom/dist/es/utils/delay.js +9 -11
  322. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +29 -40
  323. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +4 -6
  324. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +4 -6
  325. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +4 -6
  326. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +26 -27
  327. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +44 -45
  328. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +3 -5
  329. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +5 -7
  330. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +2 -4
  331. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +4 -7
  332. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +11 -14
  333. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +2 -4
  334. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +9 -11
  335. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +6 -8
  336. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +3 -5
  337. package/dist/node_modules/motion-dom/dist/es/value/index.js +89 -211
  338. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +4 -6
  339. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +15 -17
  340. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +17 -20
  341. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +9 -11
  342. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +12 -14
  343. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +12 -15
  344. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +13 -17
  345. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +22 -22
  346. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +43 -44
  347. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +11 -10
  348. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +14 -9
  349. package/dist/node_modules/motion-dom/dist/es/value/types/int.js +5 -7
  350. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +22 -27
  351. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +61 -69
  352. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +29 -36
  353. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +12 -16
  354. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +10 -17
  355. package/dist/node_modules/motion-dom/dist/es/value/types/test.js +2 -4
  356. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +9 -11
  357. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +2 -4
  358. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +10 -8
  359. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +2 -4
  360. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +2 -4
  361. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +3 -5
  362. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +2 -4
  363. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +2 -4
  364. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +2 -4
  365. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +4 -6
  366. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +10 -13
  367. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +4 -6
  368. package/dist/node_modules/motion-utils/dist/es/array.js +6 -9
  369. package/dist/node_modules/motion-utils/dist/es/clamp.js +2 -4
  370. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +3 -5
  371. package/dist/node_modules/motion-utils/dist/es/easing/back.js +5 -9
  372. package/dist/node_modules/motion-utils/dist/es/easing/circ.js +4 -8
  373. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +14 -17
  374. package/dist/node_modules/motion-utils/dist/es/easing/ease.js +3 -7
  375. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +2 -4
  376. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +2 -4
  377. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +2 -4
  378. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +2 -4
  379. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +28 -31
  380. package/dist/node_modules/motion-utils/dist/es/errors.js +7 -13
  381. package/dist/node_modules/motion-utils/dist/es/format-error-message.js +3 -5
  382. package/dist/node_modules/motion-utils/dist/es/global-config.js +2 -4
  383. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +2 -4
  384. package/dist/node_modules/motion-utils/dist/es/is-object.js +2 -4
  385. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +2 -4
  386. package/dist/node_modules/motion-utils/dist/es/memo.js +5 -7
  387. package/dist/node_modules/motion-utils/dist/es/noop.js +2 -4
  388. package/dist/node_modules/motion-utils/dist/es/pipe.js +2 -4
  389. package/dist/node_modules/motion-utils/dist/es/progress.js +4 -6
  390. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +23 -28
  391. package/dist/node_modules/motion-utils/dist/es/time-conversion.js +2 -5
  392. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +2 -4
  393. package/dist/node_modules/motion-utils/dist/es/warn-once.js +5 -7
  394. package/dist/node_modules/prettier/plugins/babel.js +9582 -7023
  395. package/dist/node_modules/prettier/plugins/estree.js +6997 -4377
  396. package/dist/node_modules/prettier/standalone.js +3444 -2415
  397. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +21 -21
  398. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +18 -14
  399. package/dist/node_modules/react/compiler-runtime.js +8 -10
  400. package/dist/utils/arrayService.js +0 -1
  401. package/dist/utils/color.js +46 -41
  402. package/dist/utils/component.js +60 -129
  403. package/dist/utils/contextStore.js +48 -58
  404. package/dist/utils/index.js +7 -29
  405. package/dist/utils/motion.js +85 -113
  406. package/dist/utils/reactiveArrayService.js +80 -76
  407. package/dist/utils/size.js +14 -26
  408. package/dist/utils/utils.js +0 -1
  409. package/dist/utils/view.js +27 -24
  410. package/dist/vite-env.d.js +0 -1
  411. package/package.json +25 -20
  412. package/dist/_virtual/compiler-runtime.js +0 -5
  413. package/dist/_virtual/compiler-runtime2.js +0 -4
  414. package/dist/_virtual/react-compiler-runtime.development.js +0 -4
  415. package/dist/_virtual/react-compiler-runtime.production.js +0 -4
  416. package/dist/assets/components/alert/Alert.style.css +0 -1
  417. package/dist/assets/components/aurora/Aurora.style.css +0 -1
  418. package/dist/assets/components/avatar/Avatar.style.css +0 -1
  419. package/dist/assets/components/badge/Badge.style.css +0 -1
  420. package/dist/assets/components/breadcrumb/Breadcrumb.style.css +0 -1
  421. package/dist/assets/components/button/Button.style.css +0 -1
  422. package/dist/assets/components/button-group/ButtonGroup.style.css +0 -1
  423. package/dist/assets/components/card/Card.style.css +0 -1
  424. package/dist/assets/components/chart/Chart.style.css +0 -1
  425. package/dist/assets/components/col/Col.style.css +0 -1
  426. package/dist/assets/components/command/Command.style.css +0 -1
  427. package/dist/assets/components/container/Container.style.css +0 -1
  428. package/dist/assets/components/context-menu/ContextMenu.style.css +0 -1
  429. package/dist/assets/components/data-table/DataTable.style.css +0 -1
  430. package/dist/assets/components/dialog/Dialog.style.css +0 -1
  431. package/dist/assets/components/editor/Editor.styles.css +0 -1
  432. package/dist/assets/components/file-tabs/FileTabs.style.css +0 -1
  433. package/dist/assets/components/form/ColorInput.style.css +0 -1
  434. package/dist/assets/components/form/DateInput.style.css +0 -1
  435. package/dist/assets/components/form/EditorInput.style.css +0 -1
  436. package/dist/assets/components/form/FileInput.style.css +0 -1
  437. package/dist/assets/components/form/Input.style.css +0 -1
  438. package/dist/assets/components/form/InputWrapper.style.css +0 -1
  439. package/dist/assets/components/form/SelectInput.style.css +0 -1
  440. package/dist/assets/components/fullscreen/FullScreen.style.css +0 -1
  441. package/dist/assets/components/gantt/Gantt.style.css +0 -1
  442. package/dist/assets/components/icon/Icon.style.css +0 -1
  443. package/dist/assets/components/json-view/JsonView.style.css +0 -1
  444. package/dist/assets/components/layout/Layout.style.css +0 -1
  445. package/dist/assets/components/menu/Menu.style.css +0 -1
  446. package/dist/assets/components/progress/Progress.style.css +0 -1
  447. package/dist/assets/components/quote/Quote.style.css +0 -1
  448. package/dist/assets/components/resizable/Resizable.style.css +0 -1
  449. package/dist/assets/components/row/Row.style.css +0 -1
  450. package/dist/assets/components/scroll-area/ScrollArea.style.css +0 -1
  451. package/dist/assets/components/segmented-control/SegmentedControl.style.css +0 -1
  452. package/dist/assets/components/tab/Tab.style.css +0 -1
  453. package/dist/assets/components/text/Text.style.css +0 -1
  454. package/dist/assets/components/toast/Toast.style.css +0 -1
  455. package/dist/assets/components/tooltip/Tooltip.style.css +0 -1
  456. package/dist/components/icon/codezero/codezero.svg.js +0 -5
  457. package/dist/components/icon/codezero/gls.svg.js +0 -5
  458. /package/dist/assets/{components/flex/Flex.style.css → Flex.style.css} +0 -0
  459. /package/dist/assets/{components/spacing/Spacing.style.css → Spacing.style.css} +0 -0
@@ -1,18 +1,19 @@
1
- const e = /* @__PURE__ */ new Set([
2
- "BUTTON",
3
- "INPUT",
4
- "SELECT",
5
- "TEXTAREA",
6
- "A"
1
+ var keyboardAccessibleElements = new Set([
2
+ "BUTTON",
3
+ "INPUT",
4
+ "SELECT",
5
+ "TEXTAREA",
6
+ "A"
7
7
  ]);
8
- function s(t) {
9
- return e.has(t.tagName) || t.isContentEditable === !0;
8
+ function isElementKeyboardAccessible(r) {
9
+ return keyboardAccessibleElements.has(r.tagName) || r.isContentEditable === !0;
10
10
  }
11
- const n = /* @__PURE__ */ new Set(["INPUT", "SELECT", "TEXTAREA"]);
12
- function E(t) {
13
- return n.has(t.tagName) || t.isContentEditable === !0;
11
+ var textInputElements = new Set([
12
+ "INPUT",
13
+ "SELECT",
14
+ "TEXTAREA"
15
+ ]);
16
+ function isElementTextInput(e) {
17
+ return textInputElements.has(e.tagName) || e.isContentEditable === !0;
14
18
  }
15
- export {
16
- s as isElementKeyboardAccessible,
17
- E as isElementTextInput
18
- };
19
+ export { isElementKeyboardAccessible, isElementTextInput };
@@ -1,27 +1,26 @@
1
- import { isPressing as u } from "./state.js";
2
- function d(r) {
3
- return (n) => {
4
- n.key === "Enter" && r(n);
5
- };
1
+ import { isPressing } from "./state.js";
2
+ function filterEvents(e) {
3
+ return (n) => {
4
+ n.key === "Enter" && e(n);
5
+ };
6
6
  }
7
- function t(r, n) {
8
- r.dispatchEvent(new PointerEvent("pointer" + n, { isPrimary: !0, bubbles: !0 }));
7
+ function firePointerEvent(e, n) {
8
+ e.dispatchEvent(new PointerEvent("pointer" + n, {
9
+ isPrimary: !0,
10
+ bubbles: !0
11
+ }));
9
12
  }
10
- const c = (r, n) => {
11
- const e = r.currentTarget;
12
- if (!e)
13
- return;
14
- const i = d(() => {
15
- if (u.has(e))
16
- return;
17
- t(e, "down");
18
- const s = d(() => {
19
- t(e, "up");
20
- }), o = () => t(e, "cancel");
21
- e.addEventListener("keyup", s, n), e.addEventListener("blur", o, n);
22
- });
23
- e.addEventListener("keydown", i, n), e.addEventListener("blur", () => e.removeEventListener("keydown", i), n);
24
- };
25
- export {
26
- c as enableKeyboardPress
13
+ var enableKeyboardPress = (r, i) => {
14
+ let a = r.currentTarget;
15
+ if (!a) return;
16
+ let o = filterEvents(() => {
17
+ if (isPressing.has(a)) return;
18
+ firePointerEvent(a, "down");
19
+ let r = filterEvents(() => {
20
+ firePointerEvent(a, "up");
21
+ });
22
+ a.addEventListener("keyup", r, i), a.addEventListener("blur", () => firePointerEvent(a, "cancel"), i);
23
+ });
24
+ a.addEventListener("keydown", o, i), a.addEventListener("blur", () => a.removeEventListener("keydown", o), i);
27
25
  };
26
+ export { enableKeyboardPress };
@@ -1,4 +1,2 @@
1
- const e = /* @__PURE__ */ new WeakSet();
2
- export {
3
- e as isPressing
4
- };
1
+ var isPressing = /* @__PURE__ */ new WeakSet();
2
+ export { isPressing };
@@ -1,4 +1,2 @@
1
- const t = (r, e) => e ? r === e ? !0 : t(r, e.parentElement) : !1;
2
- export {
3
- t as isNodeOrChild
4
- };
1
+ var isNodeOrChild = (t, n) => n ? t === n ? !0 : isNodeOrChild(t, n.parentElement) : !1;
2
+ export { isNodeOrChild };
@@ -1,4 +1,2 @@
1
- const o = (r) => r.pointerType === "mouse" ? typeof r.button != "number" || r.button <= 0 : r.isPrimary !== !1;
2
- export {
3
- o as isPrimaryPointer
4
- };
1
+ var isPrimaryPointer = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1;
2
+ export { isPrimaryPointer };
@@ -1,12 +1,14 @@
1
- import { resolveElements as s } from "../../utils/resolve-elements.js";
2
- function a(t, n) {
3
- const o = s(t), e = new AbortController(), r = {
4
- passive: !0,
5
- ...n,
6
- signal: e.signal
7
- };
8
- return [o, r, () => e.abort()];
1
+ import { resolveElements } from "../../utils/resolve-elements.js";
2
+ function setupGesture(t, n) {
3
+ let r = resolveElements(t), i = new AbortController();
4
+ return [
5
+ r,
6
+ {
7
+ passive: !0,
8
+ ...n,
9
+ signal: i.signal
10
+ },
11
+ () => i.abort()
12
+ ];
9
13
  }
10
- export {
11
- a as setupGesture
12
- };
14
+ export { setupGesture };
@@ -1,32 +1,23 @@
1
- import { mixNumber as c } from "../../utils/mix/number.js";
2
- import { percent as u, px as x } from "../../value/types/numbers/units.js";
3
- import { progress as h } from "../../../../../motion-utils/dist/es/progress.js";
4
- import { circOut as L } from "../../../../../motion-utils/dist/es/easing/circ.js";
5
- import { noop as B } from "../../../../../motion-utils/dist/es/noop.js";
6
- const p = [
7
- "borderTopLeftRadius",
8
- "borderTopRightRadius",
9
- "borderBottomLeftRadius",
10
- "borderBottomRightRadius"
11
- ], M = p.length, d = (t) => typeof t == "string" ? parseFloat(t) : t, a = (t) => typeof t == "number" || x.test(t);
12
- function V(t, o, r, i, R, y) {
13
- R ? (t.opacity = c(0, r.opacity ?? 1, C(i)), t.opacityExit = c(o.opacity ?? 1, 0, O(i))) : y && (t.opacity = c(o.opacity ?? 1, r.opacity ?? 1, i));
14
- for (let f = 0; f < M; f++) {
15
- const s = p[f];
16
- let n = m(o, s), e = m(r, s);
17
- if (n === void 0 && e === void 0)
18
- continue;
19
- n || (n = 0), e || (e = 0), n === 0 || e === 0 || a(n) === a(e) ? (t[s] = Math.max(c(d(n), d(e), i), 0), (u.test(e) || u.test(n)) && (t[s] += "%")) : t[s] = e;
20
- }
21
- (o.rotate || r.rotate) && (t.rotate = c(o.rotate || 0, r.rotate || 0, i));
1
+ import { noop } from "../../../../../motion-utils/dist/es/noop.js";
2
+ import { progress } from "../../../../../motion-utils/dist/es/progress.js";
3
+ import { circOut } from "../../../../../motion-utils/dist/es/easing/circ.js";
4
+ import { percent, px } from "../../value/types/numbers/units.js";
5
+ import { mixNumber } from "../../utils/mix/number.js";
6
+ import { cornerRadiusProps } from "../../utils/border-radius.js";
7
+ var numBorders = cornerRadiusProps.length, asNumber = (e) => typeof e == "string" ? parseFloat(e) : e, isPx = (e) => typeof e == "number" || px.test(e);
8
+ function mixValues(e, o, s, l, d, m) {
9
+ d ? (e.opacity = mixNumber(0, s.opacity ?? 1, easeCrossfadeIn(l)), e.opacityExit = mixNumber(o.opacity ?? 1, 0, easeCrossfadeOut(l))) : m && (e.opacity = mixNumber(o.opacity ?? 1, s.opacity ?? 1, l));
10
+ for (let d = 0; d < numBorders; d++) {
11
+ let u = cornerRadiusProps[d], f = getRadius(o, u), p = getRadius(s, u);
12
+ f === void 0 && p === void 0 || (f ||= 0, p ||= 0, f === 0 || p === 0 || isPx(f) === isPx(p) ? (e[u] = Math.max(mixNumber(asNumber(f), asNumber(p), l), 0), (percent.test(p) || percent.test(f)) && (e[u] += "%")) : e[u] = p);
13
+ }
14
+ (o.rotate || s.rotate) && (e.rotate = mixNumber(o.rotate || 0, s.rotate || 0, l));
22
15
  }
23
- function m(t, o) {
24
- return t[o] !== void 0 ? t[o] : t.borderRadius;
16
+ function getRadius(e, o) {
17
+ return e[o] === void 0 ? e.borderRadius : e[o];
25
18
  }
26
- const C = /* @__PURE__ */ b(0, 0.5, L), O = /* @__PURE__ */ b(0.5, 0.95, B);
27
- function b(t, o, r) {
28
- return (i) => i < t ? 0 : i > o ? 1 : r(h(t, o, i));
19
+ var easeCrossfadeIn = /* @__PURE__ */ compress(0, .5, circOut), easeCrossfadeOut = /* @__PURE__ */ compress(.5, .95, noop);
20
+ function compress(e, s, c) {
21
+ return (l) => l < e ? 0 : l > s ? 1 : c(progress(e, s, l));
29
22
  }
30
- export {
31
- V as mixValues
32
- };
23
+ export { mixValues };
@@ -1,25 +1,37 @@
1
- function r({ top: t, left: o, right: n, bottom: x }) {
2
- return {
3
- x: { min: o, max: n },
4
- y: { min: t, max: x }
5
- };
1
+ function convertBoundingBoxToBox({ top: e, left: t, right: n, bottom: r }) {
2
+ return {
3
+ x: {
4
+ min: t,
5
+ max: n
6
+ },
7
+ y: {
8
+ min: e,
9
+ max: r
10
+ }
11
+ };
6
12
  }
7
- function e({ x: t, y: o }) {
8
- return { top: o.min, right: t.max, bottom: o.max, left: t.min };
13
+ function convertBoxToBoundingBox({ x: e, y: t }) {
14
+ return {
15
+ top: t.min,
16
+ right: e.max,
17
+ bottom: t.max,
18
+ left: e.min
19
+ };
9
20
  }
10
- function m(t, o) {
11
- if (!o)
12
- return t;
13
- const n = o({ x: t.left, y: t.top }), x = o({ x: t.right, y: t.bottom });
14
- return {
15
- top: n.y,
16
- left: n.x,
17
- bottom: x.y,
18
- right: x.x
19
- };
21
+ function transformBoxPoints(e, t) {
22
+ if (!t) return e;
23
+ let n = t({
24
+ x: e.left,
25
+ y: e.top
26
+ }), r = t({
27
+ x: e.right,
28
+ y: e.bottom
29
+ });
30
+ return {
31
+ top: n.y,
32
+ left: n.x,
33
+ bottom: r.y,
34
+ right: r.x
35
+ };
20
36
  }
21
- export {
22
- r as convertBoundingBoxToBox,
23
- e as convertBoxToBoundingBox,
24
- m as transformBoxPoints
25
- };
37
+ export { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };
@@ -1,14 +1,10 @@
1
- function c(n, o) {
2
- n.min = o.min, n.max = o.max;
1
+ function copyAxisInto(e, t) {
2
+ e.min = t.min, e.max = t.max;
3
3
  }
4
- function t(n, o) {
5
- c(n.x, o.x), c(n.y, o.y);
4
+ function copyBoxInto(t, n) {
5
+ copyAxisInto(t.x, n.x), copyAxisInto(t.y, n.y);
6
6
  }
7
- function i(n, o) {
8
- n.translate = o.translate, n.scale = o.scale, n.originPoint = o.originPoint, n.origin = o.origin;
7
+ function copyAxisDeltaInto(e, t) {
8
+ e.translate = t.translate, e.scale = t.scale, e.originPoint = t.originPoint, e.origin = t.origin;
9
9
  }
10
- export {
11
- i as copyAxisDeltaInto,
12
- c as copyAxisInto,
13
- t as copyBoxInto
14
- };
10
+ export { copyAxisDeltaInto, copyAxisInto, copyBoxInto };
@@ -1,53 +1,41 @@
1
- import { mixNumber as E } from "../../utils/mix/number.js";
2
- import { hasTransform as g } from "../utils/has-transform.js";
3
- function y(t, n, o) {
4
- const l = t - o, i = n * l;
5
- return o + i;
6
- }
7
- function p(t, n, o, l, i) {
8
- return i !== void 0 && (t = y(t, i, l)), y(t, o, l) + n;
9
- }
10
- function u(t, n = 0, o = 1, l, i) {
11
- t.min = p(t.min, n, o, l, i), t.max = p(t.max, n, o, l, i);
12
- }
13
- function _(t, { x: n, y: o }) {
14
- u(t.x, n.translate, n.scale, n.originPoint), u(t.y, o.translate, o.scale, o.originPoint);
15
- }
16
- const r = 0.999999999999, a = 1.0000000000001;
17
- function N(t, n, o, l = !1) {
18
- const i = o.length;
19
- if (!i)
20
- return;
21
- n.x = n.y = 1;
22
- let s, f;
23
- for (let e = 0; e < i; e++) {
24
- s = o[e], f = s.projectionDelta;
25
- const { visualElement: c } = s.options;
26
- c && c.props.style && c.props.style.display === "contents" || (l && s.options.layoutScroll && s.scroll && s !== s.root && (m(t.x, -s.scroll.offset.x), m(t.y, -s.scroll.offset.y)), f && (n.x *= f.x.scale, n.y *= f.y.scale, _(t, f)), l && g(s.latestValues) && d(t, s.latestValues, s.layout?.layoutBox));
27
- }
28
- n.x < a && n.x > r && (n.x = 1), n.y < a && n.y > r && (n.y = 1);
29
- }
30
- function m(t, n) {
31
- t.min += n, t.max += n;
32
- }
33
- function x(t, n, o, l, i = 0.5) {
34
- const s = E(t.min, t.max, i);
35
- u(t, n, o, s, l);
36
- }
37
- function A(t, n) {
38
- return typeof t == "string" ? parseFloat(t) / 100 * (n.max - n.min) : t;
39
- }
40
- function d(t, n, o) {
41
- const l = o ?? t;
42
- x(t.x, A(n.x, l.x), n.scaleX, n.scale, n.originX), x(t.y, A(n.y, l.y), n.scaleY, n.scale, n.originY);
43
- }
44
- export {
45
- u as applyAxisDelta,
46
- _ as applyBoxDelta,
47
- p as applyPointDelta,
48
- N as applyTreeDeltas,
49
- y as scalePoint,
50
- x as transformAxis,
51
- d as transformBox,
52
- m as translateAxis
53
- };
1
+ import { mixNumber } from "../../utils/mix/number.js";
2
+ import { hasTransform } from "../utils/has-transform.js";
3
+ function scalePoint(e, r, i) {
4
+ return i + r * (e - i);
5
+ }
6
+ function applyPointDelta(e, r, a, o, s) {
7
+ return s !== void 0 && (e = scalePoint(e, s, o)), scalePoint(e, a, o) + r;
8
+ }
9
+ function applyAxisDelta(e, r = 0, i = 1, o, s) {
10
+ e.min = applyPointDelta(e.min, r, i, o, s), e.max = applyPointDelta(e.max, r, i, o, s);
11
+ }
12
+ function applyBoxDelta(e, { x: r, y: i }) {
13
+ applyAxisDelta(e.x, r.translate, r.scale, r.originPoint), applyAxisDelta(e.y, i.translate, i.scale, i.originPoint);
14
+ }
15
+ var TREE_SCALE_SNAP_MIN = .999999999999, TREE_SCALE_SNAP_MAX = 1.0000000000001;
16
+ function applyTreeDeltas(e, i, a, o = !1) {
17
+ let u = a.length;
18
+ if (!u) return;
19
+ i.x = i.y = 1;
20
+ let d, f;
21
+ for (let c = 0; c < u; c++) {
22
+ d = a[c], f = d.projectionDelta;
23
+ let { visualElement: l } = d.options;
24
+ l && l.props.style && l.props.style.display === "contents" || (o && d.options.layoutScroll && d.scroll && d !== d.root && (translateAxis(e.x, -d.scroll.offset.x), translateAxis(e.y, -d.scroll.offset.y)), f && (i.x *= f.x.scale, i.y *= f.y.scale, applyBoxDelta(e, f)), o && hasTransform(d.latestValues) && transformBox(e, d.latestValues, d.layout?.layoutBox));
25
+ }
26
+ i.x < TREE_SCALE_SNAP_MAX && i.x > TREE_SCALE_SNAP_MIN && (i.x = 1), i.y < TREE_SCALE_SNAP_MAX && i.y > TREE_SCALE_SNAP_MIN && (i.y = 1);
27
+ }
28
+ function translateAxis(e, r) {
29
+ e.min += r, e.max += r;
30
+ }
31
+ function transformAxis(r, i, a, s, c = .5) {
32
+ applyAxisDelta(r, i, a, mixNumber(r.min, r.max, c), s);
33
+ }
34
+ function resolveAxisTranslate(e, r) {
35
+ return typeof e == "string" ? parseFloat(e) / 100 * (r.max - r.min) : e;
36
+ }
37
+ function transformBox(e, r, i) {
38
+ let a = i ?? e;
39
+ transformAxis(e.x, resolveAxisTranslate(r.x, a.x), r.scaleX, r.scale, r.originX), transformAxis(e.y, resolveAxisTranslate(r.y, a.y), r.scaleY, r.scale, r.originY);
40
+ }
41
+ export { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };
@@ -1,38 +1,28 @@
1
- import { mixNumber as m } from "../../utils/mix/number.js";
2
- const y = 1e-4, u = 1 - y, E = 1 + y, R = 0.01, P = 0 - R, S = 0 + R;
3
- function x(n) {
4
- return n.max - n.min;
5
- }
6
- function I(n, c, i) {
7
- return Math.abs(n - c) <= i;
8
- }
9
- function A(n, c, i, o = 0.5) {
10
- n.origin = o, n.originPoint = m(c.min, c.max, n.origin), n.scale = x(i) / x(c), n.translate = m(i.min, i.max, n.origin) - n.originPoint, (n.scale >= u && n.scale <= E || isNaN(n.scale)) && (n.scale = 1), (n.translate >= P && n.translate <= S || isNaN(n.translate)) && (n.translate = 0);
11
- }
12
- function T(n, c, i, o) {
13
- A(n.x, c.x, i.x, o ? o.originX : void 0), A(n.y, c.y, i.y, o ? o.originY : void 0);
14
- }
15
- function f(n, c, i, o = 0) {
16
- const s = o ? m(i.min, i.max, o) : i.min;
17
- n.min = s + c.min, n.max = n.min + x(c);
18
- }
19
- function _(n, c, i, o) {
20
- f(n.x, c.x, i.x, o?.x), f(n.y, c.y, i.y, o?.y);
21
- }
22
- function N(n, c, i, o = 0) {
23
- const s = o ? m(i.min, i.max, o) : i.min;
24
- n.min = c.min - s, n.max = n.min + x(c);
25
- }
26
- function C(n, c, i, o) {
27
- N(n.x, c.x, i.x, o?.x), N(n.y, c.y, i.y, o?.y);
28
- }
29
- export {
30
- A as calcAxisDelta,
31
- T as calcBoxDelta,
32
- x as calcLength,
33
- f as calcRelativeAxis,
34
- N as calcRelativeAxisPosition,
35
- _ as calcRelativeBox,
36
- C as calcRelativePosition,
37
- I as isNear
38
- };
1
+ import { mixNumber } from "../../utils/mix/number.js";
2
+ var SCALE_PRECISION = 1e-4, SCALE_MIN = 1 - SCALE_PRECISION, SCALE_MAX = 1 + SCALE_PRECISION, TRANSLATE_PRECISION = .01, TRANSLATE_MIN = 0 - TRANSLATE_PRECISION, TRANSLATE_MAX = 0 + TRANSLATE_PRECISION;
3
+ function calcLength(e) {
4
+ return e.max - e.min;
5
+ }
6
+ function isNear(e, c, l) {
7
+ return Math.abs(e - c) <= l;
8
+ }
9
+ function calcAxisDelta(c, d, p, m = .5) {
10
+ c.origin = m, c.originPoint = mixNumber(d.min, d.max, c.origin), c.scale = calcLength(p) / calcLength(d), c.translate = mixNumber(p.min, p.max, c.origin) - c.originPoint, (c.scale >= SCALE_MIN && c.scale <= SCALE_MAX || isNaN(c.scale)) && (c.scale = 1), (c.translate >= TRANSLATE_MIN && c.translate <= TRANSLATE_MAX || isNaN(c.translate)) && (c.translate = 0);
11
+ }
12
+ function calcBoxDelta(e, c, l, u) {
13
+ calcAxisDelta(e.x, c.x, l.x, u ? u.originX : void 0), calcAxisDelta(e.y, c.y, l.y, u ? u.originY : void 0);
14
+ }
15
+ function calcRelativeAxis(c, l, u, d = 0) {
16
+ c.min = (d ? mixNumber(u.min, u.max, d) : u.min) + l.min, c.max = c.min + calcLength(l);
17
+ }
18
+ function calcRelativeBox(e, c, l, u) {
19
+ calcRelativeAxis(e.x, c.x, l.x, u?.x), calcRelativeAxis(e.y, c.y, l.y, u?.y);
20
+ }
21
+ function calcRelativeAxisPosition(c, l, u, d = 0) {
22
+ let f = d ? mixNumber(u.min, u.max, d) : u.min;
23
+ c.min = l.min - f, c.max = c.min + calcLength(l);
24
+ }
25
+ function calcRelativePosition(e, c, l, u) {
26
+ calcRelativeAxisPosition(e.x, c.x, l.x, u?.x), calcRelativeAxisPosition(e.y, c.y, l.y, u?.y);
27
+ }
28
+ export { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };
@@ -1,25 +1,27 @@
1
- import { mixNumber as v } from "../../utils/mix/number.js";
2
- import { percent as p } from "../../value/types/numbers/units.js";
3
- import { scalePoint as r } from "./delta-apply.js";
4
- function c(e, m, f, n, d) {
5
- return e -= m, e = r(e, 1 / f, n), d !== void 0 && (e = r(e, 1 / d, n)), e;
1
+ import { percent } from "../../value/types/numbers/units.js";
2
+ import { mixNumber } from "../../utils/mix/number.js";
3
+ import { scalePoint } from "./delta-apply.js";
4
+ function removePointDelta(e, t, r, i, a) {
5
+ return e -= t, e = scalePoint(e, 1 / r, i), a !== void 0 && (e = scalePoint(e, 1 / a, i)), e;
6
6
  }
7
- function D(e, m = 0, f = 1, n = 0.5, d, u = e, y = e) {
8
- if (p.test(m) && (m = parseFloat(m), m = v(y.min, y.max, m / 100) - y.min), typeof m != "number")
9
- return;
10
- let i = v(u.min, u.max, n);
11
- e === u && (i -= m), e.min = c(e.min, m, f, i, d), e.max = c(e.max, m, f, i, d);
7
+ function removeAxisDelta(n, i = 0, a = 1, o = .5, s, c = n, l = n) {
8
+ if (percent.test(i) && (i = parseFloat(i), i = mixNumber(l.min, l.max, i / 100) - l.min), typeof i != "number") return;
9
+ let u = mixNumber(c.min, c.max, o);
10
+ n === c && (u -= i), n.min = removePointDelta(n.min, i, a, u, s), n.max = removePointDelta(n.max, i, a, u, s);
12
11
  }
13
- function P(e, m, [f, n, d], u, y) {
14
- D(e, m[f], m[n], m[d], m.scale, u, y);
12
+ function removeAxisTransforms(e, t, [n, r, a], o, s) {
13
+ removeAxisDelta(e, t[n], t[r], t[a], t.scale, o, s);
15
14
  }
16
- const K = ["x", "scaleX", "originX"], T = ["y", "scaleY", "originY"];
17
- function N(e, m, f, n) {
18
- P(e.x, m, K, f ? f.x : void 0, n ? n.x : void 0), P(e.y, m, T, f ? f.y : void 0, n ? n.y : void 0);
15
+ var xKeys = [
16
+ "x",
17
+ "scaleX",
18
+ "originX"
19
+ ], yKeys = [
20
+ "y",
21
+ "scaleY",
22
+ "originY"
23
+ ];
24
+ function removeBoxTransforms(e, t, n, r) {
25
+ removeAxisTransforms(e.x, t, xKeys, n ? n.x : void 0, r ? r.x : void 0), removeAxisTransforms(e.y, t, yKeys, n ? n.y : void 0, r ? r.y : void 0);
19
26
  }
20
- export {
21
- D as removeAxisDelta,
22
- P as removeAxisTransforms,
23
- N as removeBoxTransforms,
24
- c as removePointDelta
25
- };
27
+ export { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };
@@ -1,18 +1,16 @@
1
- const t = () => ({
2
- translate: 0,
3
- scale: 1,
4
- origin: 0,
5
- originPoint: 0
6
- }), a = () => ({
7
- x: t(),
8
- y: t()
9
- }), e = () => ({ min: 0, max: 0 }), c = () => ({
10
- x: e(),
11
- y: e()
1
+ var createAxisDelta = () => ({
2
+ translate: 0,
3
+ scale: 1,
4
+ origin: 0,
5
+ originPoint: 0
6
+ }), createDelta = () => ({
7
+ x: createAxisDelta(),
8
+ y: createAxisDelta()
9
+ }), createAxis = () => ({
10
+ min: 0,
11
+ max: 0
12
+ }), createBox = () => ({
13
+ x: createAxis(),
14
+ y: createAxis()
12
15
  });
13
- export {
14
- e as createAxis,
15
- t as createAxisDelta,
16
- c as createBox,
17
- a as createDelta
18
- };
16
+ export { createAxis, createAxisDelta, createBox, createDelta };
@@ -1,34 +1,26 @@
1
- import { calcLength as r } from "./delta-calc.js";
2
- function u(n) {
3
- return n.translate === 0 && n.scale === 1;
1
+ import { calcLength } from "./delta-calc.js";
2
+ function isAxisDeltaZero(e) {
3
+ return e.translate === 0 && e.scale === 1;
4
4
  }
5
- function e(n) {
6
- return u(n.x) && u(n.y);
5
+ function isDeltaZero(e) {
6
+ return isAxisDeltaZero(e.x) && isAxisDeltaZero(e.y);
7
7
  }
8
- function i(n, t) {
9
- return n.min === t.min && n.max === t.max;
8
+ function axisEquals(e, c) {
9
+ return e.min === c.min && e.max === c.max;
10
10
  }
11
- function s(n, t) {
12
- return i(n.x, t.x) && i(n.y, t.y);
11
+ function boxEquals(e, c) {
12
+ return axisEquals(e.x, c.x) && axisEquals(e.y, c.y);
13
13
  }
14
- function o(n, t) {
15
- return Math.round(n.min) === Math.round(t.min) && Math.round(n.max) === Math.round(t.max);
14
+ function axisEqualsRounded(e, c) {
15
+ return Math.round(e.min) === Math.round(c.min) && Math.round(e.max) === Math.round(c.max);
16
16
  }
17
- function x(n, t) {
18
- return o(n.x, t.x) && o(n.y, t.y);
17
+ function boxEqualsRounded(e, c) {
18
+ return axisEqualsRounded(e.x, c.x) && axisEqualsRounded(e.y, c.y);
19
19
  }
20
- function c(n) {
21
- return r(n.x) / r(n.y);
20
+ function aspectRatio(c) {
21
+ return calcLength(c.x) / calcLength(c.y);
22
22
  }
23
- function l(n, t) {
24
- return n.translate === t.translate && n.scale === t.scale && n.originPoint === t.originPoint;
23
+ function axisDeltaEquals(e, c) {
24
+ return e.translate === c.translate && e.scale === c.scale && e.originPoint === c.originPoint;
25
25
  }
26
- export {
27
- c as aspectRatio,
28
- l as axisDeltaEquals,
29
- i as axisEquals,
30
- o as axisEqualsRounded,
31
- s as boxEquals,
32
- x as boxEqualsRounded,
33
- e as isDeltaZero
34
- };
26
+ export { aspectRatio, axisDeltaEquals, axisEquals, axisEqualsRounded, boxEquals, boxEqualsRounded, isDeltaZero };
@@ -1,13 +1,11 @@
1
- import { addDomEvent as t } from "../../events/add-dom-event.js";
2
- import { createProjectionNode as c } from "./create-projection-node.js";
3
- const l = c({
4
- attachResizeListener: (o, e) => t(o, "resize", e),
5
- measureScroll: () => ({
6
- x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
7
- y: document.documentElement.scrollTop || document.body?.scrollTop || 0
8
- }),
9
- checkIsScrollRoot: () => !0
1
+ import { addDomEvent } from "../../events/add-dom-event.js";
2
+ import { createProjectionNode } from "./create-projection-node.js";
3
+ var DocumentProjectionNode = createProjectionNode({
4
+ attachResizeListener: (t, n) => addDomEvent(t, "resize", n),
5
+ measureScroll: () => ({
6
+ x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
7
+ y: document.documentElement.scrollTop || document.body?.scrollTop || 0
8
+ }),
9
+ checkIsScrollRoot: () => !0
10
10
  });
11
- export {
12
- l as DocumentProjectionNode
13
- };
11
+ export { DocumentProjectionNode };