@code0-tech/pictor 1.0.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. package/dist/_virtual/rolldown_runtime.js +9 -0
  2. package/dist/assets/Alert.style.css +1 -0
  3. package/dist/assets/Aurora.style.css +1 -0
  4. package/dist/assets/Avatar.style.css +1 -0
  5. package/dist/assets/Badge.style.css +1 -0
  6. package/dist/assets/Breadcrumb.style.css +1 -0
  7. package/dist/assets/Button.style.css +1 -0
  8. package/dist/assets/ButtonGroup.style.css +1 -0
  9. package/dist/assets/Card.style.css +1 -0
  10. package/dist/assets/Chart.style.css +1 -0
  11. package/dist/assets/Col.style.css +1 -0
  12. package/dist/assets/ColorInput.style.css +1 -0
  13. package/dist/assets/Command.style.css +1 -0
  14. package/dist/assets/Container.style.css +1 -0
  15. package/dist/assets/ContextMenu.style.css +1 -0
  16. package/dist/assets/DataTable.style.css +1 -0
  17. package/dist/assets/DateInput.style.css +1 -0
  18. package/dist/assets/Dialog.style.css +1 -0
  19. package/dist/assets/Editor.styles.css +1 -0
  20. package/dist/assets/EditorInput.style.css +1 -0
  21. package/dist/assets/FileInput.style.css +1 -0
  22. package/dist/assets/FileTabs.style.css +1 -0
  23. package/dist/assets/FullScreen.style.css +1 -0
  24. package/dist/assets/Gantt.style.css +1 -0
  25. package/dist/assets/Icon.style.css +1 -0
  26. package/dist/assets/Input.style.css +1 -0
  27. package/dist/assets/InputWrapper.style.css +1 -0
  28. package/dist/assets/JsonView.style.css +1 -0
  29. package/dist/assets/Layout.style.css +1 -0
  30. package/dist/assets/Menu.style.css +1 -0
  31. package/dist/assets/Progress.style.css +1 -0
  32. package/dist/assets/Quote.style.css +1 -0
  33. package/dist/assets/Resizable.style.css +1 -0
  34. package/dist/assets/Row.style.css +1 -0
  35. package/dist/assets/ScrollArea.style.css +1 -0
  36. package/dist/assets/SegmentedControl.style.css +1 -0
  37. package/dist/assets/SelectInput.style.css +1 -0
  38. package/dist/assets/Tab.style.css +1 -0
  39. package/dist/assets/Text.style.css +1 -0
  40. package/dist/assets/Toast.style.css +1 -0
  41. package/dist/assets/Tooltip.style.css +1 -0
  42. package/dist/components/alert/Alert.js +33 -41
  43. package/dist/components/aurora/Aurora.js +26 -22
  44. package/dist/components/avatar/Avatar.js +57 -55
  45. package/dist/components/badge/Badge.js +57 -64
  46. package/dist/components/breadcrumb/Breadcrumb.js +16 -21
  47. package/dist/components/button/Button.js +23 -31
  48. package/dist/components/button-group/ButtonGroup.js +28 -31
  49. package/dist/components/card/Card.js +28 -43
  50. package/dist/components/card/CardSection.js +21 -29
  51. package/dist/components/chart/Chart.js +138 -153
  52. package/dist/components/chart/LineChart.js +74 -74
  53. package/dist/components/chart/index.js +3 -8
  54. package/dist/components/col/Col.js +18 -29
  55. package/dist/components/command/Command.js +100 -134
  56. package/dist/components/container/Container.js +18 -23
  57. package/dist/components/context-menu/ContextMenu.js +118 -112
  58. package/dist/components/data-table/DataTable.js +53 -64
  59. package/dist/components/data-table/DataTableColumn.js +17 -22
  60. package/dist/components/data-table/DataTableFilterInput.js +208 -205
  61. package/dist/components/data-table/DataTableFilterSuggestionMenu.js +58 -48
  62. package/dist/components/data-table/DataTableHeader.js +33 -38
  63. package/dist/components/data-table/DataTablePagination.js +61 -74
  64. package/dist/components/data-table/index.js +7 -22
  65. package/dist/components/dialog/Dialog.js +106 -97
  66. package/dist/components/editor/Editor.js +352 -323
  67. package/dist/components/file-tabs/FileTabs.js +77 -73
  68. package/dist/components/file-tabs/FileTabs.service.js +85 -87
  69. package/dist/components/file-tabs/FileTabs.view.js +0 -1
  70. package/dist/components/file-tabs/index.js +3 -9
  71. package/dist/components/flex/Flex.js +18 -23
  72. package/dist/components/form/CheckboxInput.js +72 -76
  73. package/dist/components/form/ColorInput.js +378 -353
  74. package/dist/components/form/DateInput.js +315 -265
  75. package/dist/components/form/EditorInput.js +597 -579
  76. package/dist/components/form/EmailInput.js +30 -23
  77. package/dist/components/form/FileInput.js +92 -123
  78. package/dist/components/form/Input.js +64 -58
  79. package/dist/components/form/Input.utils.js +25 -37
  80. package/dist/components/form/InputDescription.js +10 -11
  81. package/dist/components/form/InputLabel.js +17 -22
  82. package/dist/components/form/InputMessage.js +16 -17
  83. package/dist/components/form/InputWrapper.js +55 -65
  84. package/dist/components/form/NumberInput.js +41 -20
  85. package/dist/components/form/PasswordInput.js +71 -54
  86. package/dist/components/form/PinInput.js +49 -65
  87. package/dist/components/form/RadioGroup.js +41 -50
  88. package/dist/components/form/RadioInput.js +30 -29
  89. package/dist/components/form/SelectInput.js +68 -92
  90. package/dist/components/form/SwitchInput.js +17 -18
  91. package/dist/components/form/TagInput.js +108 -122
  92. package/dist/components/form/TextAreaInput.js +24 -21
  93. package/dist/components/form/TextInput.js +30 -22
  94. package/dist/components/form/index.js +22 -87
  95. package/dist/components/form/useForm.js +87 -88
  96. package/dist/components/fullscreen/FullScreen.js +27 -27
  97. package/dist/components/gantt/Gantt.js +99 -98
  98. package/dist/components/gantt/GanttGroup.js +210 -195
  99. package/dist/components/gantt/GanttHeader.js +78 -81
  100. package/dist/components/gantt/GanttItem.js +18 -22
  101. package/dist/components/icon/Icon.d.ts +6 -4
  102. package/dist/components/icon/Icon.js +53 -42
  103. package/dist/components/icon/codezero/codezero.js +10 -0
  104. package/dist/components/icon/codezero/gls.js +9 -0
  105. package/dist/components/icon/codezero/index.js +17 -13
  106. package/dist/components/json-view/JsonView.js +119 -109
  107. package/dist/components/layout/Layout.js +100 -78
  108. package/dist/components/menu/Menu.js +134 -128
  109. package/dist/components/progress/ProgressCircle.js +60 -49
  110. package/dist/components/progress/ProgressLinear.js +39 -43
  111. package/dist/components/quote/Quote.js +51 -43
  112. package/dist/components/resizable/Resizable.js +35 -33
  113. package/dist/components/row/Row.js +18 -23
  114. package/dist/components/scroll-area/ScrollArea.js +65 -76
  115. package/dist/components/segmented-control/SegmentedControl.js +46 -50
  116. package/dist/components/spacing/Spacing.js +15 -23
  117. package/dist/components/tab/Tab.js +73 -66
  118. package/dist/components/text/Text.js +18 -25
  119. package/dist/components/toast/Toast.js +104 -82
  120. package/dist/components/tooltip/Tooltip.js +65 -55
  121. package/dist/index.js +76 -272
  122. package/dist/node_modules/@lezer/common/dist/index.js +778 -143
  123. package/dist/node_modules/@lezer/highlight/dist/index.js +305 -536
  124. package/dist/node_modules/prettier/plugins/babel.js +9582 -7023
  125. package/dist/node_modules/prettier/plugins/estree.js +6997 -4377
  126. package/dist/node_modules/prettier/standalone.js +3444 -2415
  127. package/dist/utils/arrayService.js +0 -1
  128. package/dist/utils/color.js +46 -41
  129. package/dist/utils/component.js +60 -129
  130. package/dist/utils/contextStore.js +47 -58
  131. package/dist/utils/index.js +7 -29
  132. package/dist/utils/motion.js +84 -113
  133. package/dist/utils/reactiveArrayService.js +80 -76
  134. package/dist/utils/size.js +14 -26
  135. package/dist/utils/utils.js +0 -1
  136. package/dist/utils/view.js +27 -24
  137. package/dist/vite-env.d.js +0 -1
  138. package/package.json +28 -23
  139. package/dist/_virtual/compiler-runtime.js +0 -5
  140. package/dist/_virtual/compiler-runtime2.js +0 -4
  141. package/dist/_virtual/react-compiler-runtime.development.js +0 -4
  142. package/dist/_virtual/react-compiler-runtime.production.js +0 -4
  143. package/dist/assets/components/alert/Alert.style.css +0 -1
  144. package/dist/assets/components/aurora/Aurora.style.css +0 -1
  145. package/dist/assets/components/avatar/Avatar.style.css +0 -1
  146. package/dist/assets/components/badge/Badge.style.css +0 -1
  147. package/dist/assets/components/breadcrumb/Breadcrumb.style.css +0 -1
  148. package/dist/assets/components/button/Button.style.css +0 -1
  149. package/dist/assets/components/button-group/ButtonGroup.style.css +0 -1
  150. package/dist/assets/components/card/Card.style.css +0 -1
  151. package/dist/assets/components/chart/Chart.style.css +0 -1
  152. package/dist/assets/components/col/Col.style.css +0 -1
  153. package/dist/assets/components/command/Command.style.css +0 -1
  154. package/dist/assets/components/container/Container.style.css +0 -1
  155. package/dist/assets/components/context-menu/ContextMenu.style.css +0 -1
  156. package/dist/assets/components/data-table/DataTable.style.css +0 -1
  157. package/dist/assets/components/dialog/Dialog.style.css +0 -1
  158. package/dist/assets/components/editor/Editor.styles.css +0 -1
  159. package/dist/assets/components/file-tabs/FileTabs.style.css +0 -1
  160. package/dist/assets/components/form/ColorInput.style.css +0 -1
  161. package/dist/assets/components/form/DateInput.style.css +0 -1
  162. package/dist/assets/components/form/EditorInput.style.css +0 -1
  163. package/dist/assets/components/form/FileInput.style.css +0 -1
  164. package/dist/assets/components/form/Input.style.css +0 -1
  165. package/dist/assets/components/form/InputWrapper.style.css +0 -1
  166. package/dist/assets/components/form/SelectInput.style.css +0 -1
  167. package/dist/assets/components/fullscreen/FullScreen.style.css +0 -1
  168. package/dist/assets/components/gantt/Gantt.style.css +0 -1
  169. package/dist/assets/components/icon/Icon.style.css +0 -1
  170. package/dist/assets/components/json-view/JsonView.style.css +0 -1
  171. package/dist/assets/components/layout/Layout.style.css +0 -1
  172. package/dist/assets/components/menu/Menu.style.css +0 -1
  173. package/dist/assets/components/progress/Progress.style.css +0 -1
  174. package/dist/assets/components/quote/Quote.style.css +0 -1
  175. package/dist/assets/components/resizable/Resizable.style.css +0 -1
  176. package/dist/assets/components/row/Row.style.css +0 -1
  177. package/dist/assets/components/scroll-area/ScrollArea.style.css +0 -1
  178. package/dist/assets/components/segmented-control/SegmentedControl.style.css +0 -1
  179. package/dist/assets/components/tab/Tab.style.css +0 -1
  180. package/dist/assets/components/text/Text.style.css +0 -1
  181. package/dist/assets/components/toast/Toast.style.css +0 -1
  182. package/dist/assets/components/tooltip/Tooltip.style.css +0 -1
  183. package/dist/components/icon/codezero/codezero.svg.js +0 -5
  184. package/dist/components/icon/codezero/gls.svg.js +0 -5
  185. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -59
  186. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -34
  187. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -47
  188. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -17
  189. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +0 -12
  190. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -5
  191. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -5
  192. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -9
  193. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -13
  194. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -5
  195. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -15
  196. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -5
  197. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -5
  198. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -8
  199. package/dist/node_modules/framer-motion/dist/es/events/event-info.js +0 -14
  200. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -285
  201. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -22
  202. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -67
  203. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +0 -28
  204. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +0 -21
  205. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -130
  206. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -43
  207. package/dist/node_modules/framer-motion/dist/es/gestures/press.js +0 -29
  208. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -45
  209. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -33
  210. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -13
  211. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -39
  212. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -17
  213. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -21
  214. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -60
  215. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -11
  216. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -14
  217. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -45
  218. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -21
  219. package/dist/node_modules/framer-motion/dist/es/motion/index.js +0 -62
  220. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -4
  221. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -21
  222. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -65
  223. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -52
  224. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -39
  225. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +0 -18
  226. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +0 -13
  227. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +0 -7
  228. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -10
  229. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -16
  230. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -21
  231. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -24
  232. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +0 -10
  233. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -27
  234. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -9
  235. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -30
  236. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -22
  237. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +0 -10
  238. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -8
  239. package/dist/node_modules/framer-motion/dist/es/utils/distance.js +0 -9
  240. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +0 -4
  241. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -4
  242. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -6
  243. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +0 -12
  244. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +0 -28
  245. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -8
  246. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -6
  247. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +0 -112
  248. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +0 -144
  249. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +0 -106
  250. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +0 -38
  251. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +0 -10
  252. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +0 -17
  253. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +0 -37
  254. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +0 -30
  255. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +0 -178
  256. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +0 -13
  257. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +0 -13
  258. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +0 -6
  259. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +0 -9
  260. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +0 -46
  261. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +0 -59
  262. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +0 -29
  263. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +0 -22
  264. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +0 -68
  265. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +0 -74
  266. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +0 -8
  267. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +0 -8
  268. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +0 -12
  269. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +0 -6
  270. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +0 -7
  271. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +0 -7
  272. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +0 -16
  273. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +0 -37
  274. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +0 -6
  275. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +0 -7
  276. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +0 -27
  277. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +0 -7
  278. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +0 -23
  279. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +0 -31
  280. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +0 -22
  281. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +0 -8
  282. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +0 -7
  283. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +0 -9
  284. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +0 -21
  285. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +0 -6
  286. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +0 -16
  287. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +0 -10
  288. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +0 -4
  289. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +0 -12
  290. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +0 -15
  291. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +0 -21
  292. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +0 -33
  293. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +0 -12
  294. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +0 -8
  295. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +0 -10
  296. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +0 -10
  297. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +0 -17
  298. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +0 -6
  299. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +0 -27
  300. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +0 -9
  301. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +0 -5
  302. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +0 -21
  303. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +0 -43
  304. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +0 -15
  305. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +0 -11
  306. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +0 -11
  307. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +0 -38
  308. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +0 -34
  309. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +0 -18
  310. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +0 -27
  311. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +0 -4
  312. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +0 -4
  313. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +0 -4
  314. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +0 -12
  315. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +0 -32
  316. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +0 -25
  317. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +0 -14
  318. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +0 -53
  319. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +0 -38
  320. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +0 -25
  321. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +0 -18
  322. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +0 -34
  323. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +0 -13
  324. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +0 -25
  325. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +0 -618
  326. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +0 -15
  327. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +0 -53
  328. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +0 -21
  329. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +0 -16
  330. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +0 -21
  331. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +0 -13
  332. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +0 -4
  333. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +0 -6
  334. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +0 -19
  335. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +0 -20
  336. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +0 -13
  337. package/dist/node_modules/motion-dom/dist/es/render/Feature.js +0 -10
  338. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +0 -263
  339. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +0 -28
  340. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +0 -4
  341. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +0 -65
  342. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +0 -7
  343. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +0 -6
  344. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +0 -37
  345. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +0 -29
  346. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +0 -38
  347. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +0 -12
  348. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +0 -13
  349. package/dist/node_modules/motion-dom/dist/es/render/store.js +0 -4
  350. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +0 -40
  351. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +0 -32
  352. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +0 -28
  353. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +0 -4
  354. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +0 -15
  355. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +0 -11
  356. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
  357. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +0 -143
  358. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +0 -20
  359. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +0 -6
  360. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +0 -13
  361. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +0 -9
  362. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +0 -4
  363. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +0 -6
  364. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +0 -13
  365. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +0 -23
  366. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +0 -25
  367. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +0 -15
  368. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +0 -5
  369. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +0 -8
  370. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +0 -20
  371. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +0 -21
  372. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +0 -14
  373. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +0 -13
  374. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +0 -39
  375. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +0 -23
  376. package/dist/node_modules/motion-dom/dist/es/resize/index.js +0 -8
  377. package/dist/node_modules/motion-dom/dist/es/utils/delay.js +0 -12
  378. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +0 -42
  379. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +0 -7
  380. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +0 -7
  381. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +0 -7
  382. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +0 -29
  383. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +0 -51
  384. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +0 -6
  385. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +0 -8
  386. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +0 -4
  387. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +0 -8
  388. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +0 -15
  389. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +0 -4
  390. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +0 -12
  391. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +0 -9
  392. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +0 -5
  393. package/dist/node_modules/motion-dom/dist/es/value/index.js +0 -212
  394. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +0 -7
  395. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +0 -19
  396. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +0 -22
  397. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +0 -12
  398. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +0 -15
  399. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +0 -16
  400. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +0 -18
  401. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +0 -24
  402. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +0 -51
  403. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +0 -11
  404. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +0 -9
  405. package/dist/node_modules/motion-dom/dist/es/value/types/int.js +0 -8
  406. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +0 -27
  407. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +0 -70
  408. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +0 -37
  409. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +0 -17
  410. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +0 -17
  411. package/dist/node_modules/motion-dom/dist/es/value/types/test.js +0 -4
  412. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +0 -12
  413. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +0 -4
  414. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +0 -8
  415. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +0 -4
  416. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +0 -4
  417. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +0 -6
  418. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +0 -4
  419. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +0 -4
  420. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +0 -4
  421. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +0 -7
  422. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +0 -14
  423. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +0 -7
  424. package/dist/node_modules/motion-utils/dist/es/array.js +0 -11
  425. package/dist/node_modules/motion-utils/dist/es/clamp.js +0 -4
  426. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +0 -5
  427. package/dist/node_modules/motion-utils/dist/es/easing/back.js +0 -9
  428. package/dist/node_modules/motion-utils/dist/es/easing/circ.js +0 -8
  429. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +0 -19
  430. package/dist/node_modules/motion-utils/dist/es/easing/ease.js +0 -7
  431. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +0 -4
  432. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +0 -4
  433. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +0 -4
  434. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +0 -4
  435. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +0 -32
  436. package/dist/node_modules/motion-utils/dist/es/errors.js +0 -14
  437. package/dist/node_modules/motion-utils/dist/es/format-error-message.js +0 -6
  438. package/dist/node_modules/motion-utils/dist/es/global-config.js +0 -4
  439. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +0 -4
  440. package/dist/node_modules/motion-utils/dist/es/is-object.js +0 -4
  441. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +0 -4
  442. package/dist/node_modules/motion-utils/dist/es/memo.js +0 -8
  443. package/dist/node_modules/motion-utils/dist/es/noop.js +0 -4
  444. package/dist/node_modules/motion-utils/dist/es/pipe.js +0 -4
  445. package/dist/node_modules/motion-utils/dist/es/progress.js +0 -7
  446. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +0 -29
  447. package/dist/node_modules/motion-utils/dist/es/time-conversion.js +0 -5
  448. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +0 -4
  449. package/dist/node_modules/motion-utils/dist/es/warn-once.js +0 -8
  450. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +0 -21
  451. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +0 -14
  452. package/dist/node_modules/react/compiler-runtime.js +0 -10
  453. /package/dist/assets/{components/flex/Flex.style.css → Flex.style.css} +0 -0
  454. /package/dist/assets/{components/spacing/Spacing.style.css → Spacing.style.css} +0 -0
@@ -1,210 +1,225 @@
1
- import { jsxs as L, jsx as v, Fragment as et } from "react/jsx-runtime";
2
- import p from "react";
3
- import "../../utils/contextStore.js";
4
- import "merge-props";
5
- import "../../_virtual/compiler-runtime.js";
6
- import { withAlpha as I, hashToColor as A } from "../../utils/color.js";
7
- import { GanttItem as rt } from "./GanttItem.js";
8
- import { GanttHeader as nt } from "./GanttHeader.js";
9
- const ot = 3, it = (m) => {
10
- const l = Math.pow(10, Math.floor(Math.log10(m))), u = m / l;
11
- return (u < 1.5 ? 1 : u < 3 ? 2 : u < 7 ? 5 : 10) * l;
12
- }, st = (m) => {
13
- const {
14
- items: l,
15
- stepWidth: u = "50px",
16
- rowHeight: W = "50px",
17
- step: s = 1,
18
- start: f = 1,
19
- end: $ = 999999999,
20
- hideScaling: T = !1,
21
- children: y
22
- } = m, E = p.useRef(null), [D, N] = p.useState(0), [V, F] = p.useState(void 0), [S, H] = p.useState({
23
- scrollLeft: 0,
24
- clientWidth: 0,
25
- scrollWidth: 0
26
- }), h = p.useMemo(() => parseInt(u), [u]), O = $ - f, P = Math.ceil(O / s), {
27
- avgDuration: j,
28
- itemMinStart: G,
29
- itemMaxEnd: w
30
- } = p.useMemo(() => {
31
- if (!l || l.length === 0)
32
- return {
33
- avgDuration: s,
34
- itemMinStart: f,
35
- itemMaxEnd: $
36
- };
37
- let r = 0, e = 0, t = 1 / 0, n = -1 / 0;
38
- for (let o = 0; o < l.length; o++) {
39
- const c = l[o];
40
- c.start < t && (t = c.start), c.end > n && (n = c.end), c.type !== "group" && (r += c.end - c.start, e++);
41
- }
42
- return {
43
- avgDuration: e === 0 ? s : r / e,
44
- itemMinStart: t,
45
- itemMaxEnd: n
46
- };
47
- }, [l, f, $, s]), {
48
- effTime: M,
49
- invEffTime: b,
50
- inGap: z
51
- } = p.useMemo(() => {
52
- const r = ot * s, e = [], t = (l ?? []).map((i) => [i.start, i.end]).sort((i, a) => i[0] - a[0]);
53
- for (const [i, a] of t) {
54
- const d = e[e.length - 1];
55
- d && i <= d[1] ? d[1] = Math.max(d[1], a) : e.push([i, a]);
56
- }
57
- const n = [];
58
- let o = 0;
59
- for (let i = 1; i < e.length; i++) {
60
- const a = e[i - 1][1], d = e[i][0];
61
- if (d - a <= r) continue;
62
- const tt = Math.round((a - o + r - f) / s), R = f + tt * s, k = d - o - R;
63
- n.push({
64
- gapStart: a,
65
- gapEnd: d,
66
- effGapEnd: R,
67
- remove: k
68
- }), o += k;
69
- }
70
- return {
71
- effTime: (i) => {
72
- let a = i;
73
- for (const d of n)
74
- i >= d.gapEnd ? a -= d.remove : i > d.gapStart && (a = Math.min(a, d.effGapEnd));
75
- return a;
76
- },
77
- invEffTime: (i) => {
78
- let a = i;
79
- for (const d of n)
80
- i >= d.effGapEnd && (a += d.remove);
81
- return a;
82
- },
83
- inGap: (i) => n.some((a) => i > a.gapStart && i < a.gapEnd)
84
- };
85
- }, [l, s, f]), x = (r, e) => {
86
- const t = Math.max(f, M(r)), n = M(e), o = (t - f) / s * h, c = (n - t) / s * h;
87
- return {
88
- left: o,
89
- width: c
90
- };
91
- }, U = l && l.length > 0 ? Math.ceil((M(w) - f) / s) : P, X = Math.ceil(D / h), g = Math.max(X, U + 2), {
92
- headerTicks: q,
93
- headerInterval: B
94
- } = p.useMemo(() => {
95
- const r = it(s * 3), e = [];
96
- if (!(r > 0)) return {
97
- headerTicks: e,
98
- headerInterval: 1
99
- };
100
- const t = b(f + g * s), n = Math.ceil(f / r) * r;
101
- for (let o = 0; n + o * r <= t; o++) {
102
- const c = n + o * r;
103
- z(c) || e.push({
104
- time: c,
105
- left: (M(c) - f) / s * h
106
- });
107
- }
108
- return {
109
- headerTicks: e,
110
- headerInterval: r
111
- };
112
- }, [M, b, z, f, s, g, h]);
113
- p.useEffect(() => {
114
- const r = () => {
115
- N(E.current?.offsetWidth ?? 0);
116
- };
117
- r();
118
- const e = E.current;
119
- return e?.addEventListener("resize", r), window.addEventListener("resize", r), () => {
120
- window.removeEventListener("resize", r), e?.removeEventListener("resize", r);
121
- };
122
- }, []), p.useEffect(() => {
123
- const r = E.current;
124
- if (!r) return;
125
- const e = r.closest("[data-radix-scroll-area-viewport]");
126
- if (!e) return;
127
- const t = () => H({
128
- scrollLeft: e.scrollLeft,
129
- clientWidth: e.clientWidth,
130
- scrollWidth: e.scrollWidth
131
- });
132
- t(), e.addEventListener("scroll", t, {
133
- passive: !0
134
- }), window.addEventListener("resize", t);
135
- const n = new ResizeObserver(t);
136
- return n.observe(e), n.observe(r), () => {
137
- e.removeEventListener("scroll", t), window.removeEventListener("resize", t), n.disconnect();
138
- };
139
- }, []);
140
- const J = S.scrollLeft > 1, K = S.scrollLeft + S.clientWidth < S.scrollWidth - 1, Q = l?.length ? l.sort((r, e) => r.start - e.start).reduce((r, e) => {
141
- const t = r.find((n) => !n.some((o) => !(e.end <= o.start || e.start >= o.end)));
142
- return t ? (t.push(e), r) : [...r, [e]];
143
- }, []) : [], Y = p.useMemo(() => ({
144
- display: "grid",
145
- gridTemplateColumns: `repeat(${g}, ${u})`,
146
- minWidth: "100%",
147
- gridColumn: "1 / -1",
148
- position: "relative"
149
- }), [g, u]), Z = p.useMemo(() => ({
150
- gridColumn: "1 / -1",
151
- minHeight: W,
152
- position: "relative",
153
- backgroundColor: "transparent"
154
- }), [W]), _ = p.useMemo(() => Array.from({
155
- length: Math.max(0, g - 1)
156
- }), [g]);
157
- return /* @__PURE__ */ L("div", { "data-gantt-id": m.id, id: m.id, ref: E, style: Y, children: [
158
- !T && /* @__PURE__ */ v(nt, { ticks: q, interval: B, avgDuration: j, stepWidth: u, canScrollLeft: J, canScrollRight: K }),
159
- Q.map((r, e) => /* @__PURE__ */ L(p.Fragment, { children: [
160
- /* @__PURE__ */ L("div", { style: Z, children: [
161
- _.map((t, n) => /* @__PURE__ */ v("div", { style: {
162
- position: "absolute",
163
- left: (n + 1) * h,
164
- top: 0,
165
- bottom: 0,
166
- width: "0px",
167
- borderLeft: `1px dashed rgba(255, 255, 255, ${T ? 0.05 : 0.1})`
168
- } }, `grid-${n}`)),
169
- T && /* @__PURE__ */ L(et, { children: [
170
- /* @__PURE__ */ v("div", { className: "gantt__group-wrapper", style: {
171
- backgroundImage: `
1
+ import { hashToColor, withAlpha } from "../../utils/color.js";
2
+ import "../../utils/index.js";
3
+ import { GanttItem } from "./GanttItem.js";
4
+ import { GanttHeader } from "./GanttHeader.js";
5
+ import React from "react";
6
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ var MAX_GAP_COLUMNS = 3, niceInterval = (n) => {
8
+ let r = 10 ** Math.floor(Math.log10(n)), i = n / r;
9
+ return (i < 1.5 ? 1 : i < 3 ? 2 : i < 7 ? 5 : 10) * r;
10
+ };
11
+ const GanttGroup = (d) => {
12
+ let { items: f, stepWidth: p = "50px", rowHeight: m = "50px", step: h = 1, start: g = 1, end: _ = 999999999, hideScaling: v = !1, children: y } = d, b = React.useRef(null), [x, S] = React.useState(0), [C, w] = React.useState(void 0), [T, E] = React.useState({
13
+ scrollLeft: 0,
14
+ clientWidth: 0,
15
+ scrollWidth: 0
16
+ }), D = React.useMemo(() => parseInt(p), [p]), O = _ - g, k = Math.ceil(O / h);
17
+ k * D;
18
+ let { avgDuration: A, itemMinStart: j, itemMaxEnd: M } = React.useMemo(() => {
19
+ if (!f || f.length === 0) return {
20
+ avgDuration: h,
21
+ itemMinStart: g,
22
+ itemMaxEnd: _
23
+ };
24
+ let n = 0, r = 0, i = Infinity, a = -Infinity;
25
+ for (let o = 0; o < f.length; o++) {
26
+ let s = f[o];
27
+ s.start < i && (i = s.start), s.end > a && (a = s.end), s.type !== "group" && (n += s.end - s.start, r++);
28
+ }
29
+ return {
30
+ avgDuration: r === 0 ? h : n / r,
31
+ itemMinStart: i,
32
+ itemMaxEnd: a
33
+ };
34
+ }, [
35
+ f,
36
+ g,
37
+ _,
38
+ h
39
+ ]), { effTime: N, invEffTime: P, inGap: F } = React.useMemo(() => {
40
+ let n = MAX_GAP_COLUMNS * h, r = [], i = (f ?? []).map((n) => [n.start, n.end]).sort((n, r) => n[0] - r[0]);
41
+ for (let [n, a] of i) {
42
+ let i = r[r.length - 1];
43
+ i && n <= i[1] ? i[1] = Math.max(i[1], a) : r.push([n, a]);
44
+ }
45
+ let a = [], o = 0;
46
+ for (let i = 1; i < r.length; i++) {
47
+ let s = r[i - 1][1], c = r[i][0];
48
+ if (c - s <= n) continue;
49
+ let l = g + Math.round((s - o + n - g) / h) * h, u = c - o - l;
50
+ a.push({
51
+ gapStart: s,
52
+ gapEnd: c,
53
+ effGapEnd: l,
54
+ remove: u
55
+ }), o += u;
56
+ }
57
+ return {
58
+ effTime: (n) => {
59
+ let r = n;
60
+ for (let i of a) n >= i.gapEnd ? r -= i.remove : n > i.gapStart && (r = Math.min(r, i.effGapEnd));
61
+ return r;
62
+ },
63
+ invEffTime: (n) => {
64
+ let r = n;
65
+ for (let i of a) n >= i.effGapEnd && (r += i.remove);
66
+ return r;
67
+ },
68
+ inGap: (n) => a.some((r) => n > r.gapStart && n < r.gapEnd)
69
+ };
70
+ }, [
71
+ f,
72
+ h,
73
+ g
74
+ ]), I = (n, r) => {
75
+ let i = Math.max(g, N(n)), a = N(r);
76
+ return {
77
+ left: (i - g) / h * D,
78
+ width: (a - i) / h * D
79
+ };
80
+ }, L = f && f.length > 0 ? Math.ceil((N(M) - g) / h) : k, R = Math.ceil(x / D), z = Math.max(R, L + 2), { headerTicks: B, headerInterval: V } = React.useMemo(() => {
81
+ let n = niceInterval(h * 3), r = [];
82
+ if (!(n > 0)) return {
83
+ headerTicks: r,
84
+ headerInterval: 1
85
+ };
86
+ let i = P(g + z * h), a = Math.ceil(g / n) * n;
87
+ for (let o = 0; a + o * n <= i; o++) {
88
+ let i = a + o * n;
89
+ F(i) || r.push({
90
+ time: i,
91
+ left: (N(i) - g) / h * D
92
+ });
93
+ }
94
+ return {
95
+ headerTicks: r,
96
+ headerInterval: n
97
+ };
98
+ }, [
99
+ N,
100
+ P,
101
+ F,
102
+ g,
103
+ h,
104
+ z,
105
+ D
106
+ ]);
107
+ React.useEffect(() => {
108
+ let n = () => {
109
+ S(b.current?.offsetWidth ?? 0);
110
+ };
111
+ n();
112
+ let r = b.current;
113
+ return r?.addEventListener("resize", n), window.addEventListener("resize", n), () => {
114
+ window.removeEventListener("resize", n), r?.removeEventListener("resize", n);
115
+ };
116
+ }, []), React.useEffect(() => {
117
+ let n = b.current;
118
+ if (!n) return;
119
+ let r = n.closest("[data-radix-scroll-area-viewport]");
120
+ if (!r) return;
121
+ let i = () => E({
122
+ scrollLeft: r.scrollLeft,
123
+ clientWidth: r.clientWidth,
124
+ scrollWidth: r.scrollWidth
125
+ });
126
+ i(), r.addEventListener("scroll", i, { passive: !0 }), window.addEventListener("resize", i);
127
+ let a = new ResizeObserver(i);
128
+ return a.observe(r), a.observe(n), () => {
129
+ r.removeEventListener("scroll", i), window.removeEventListener("resize", i), a.disconnect();
130
+ };
131
+ }, []);
132
+ let H = T.scrollLeft > 1, U = T.scrollLeft + T.clientWidth < T.scrollWidth - 1, W = f?.length ? f.sort((n, r) => n.start - r.start).reduce((n, r) => {
133
+ let i = n.find((n) => !n.some((n) => !(r.end <= n.start || r.start >= n.end)));
134
+ return i ? (i.push(r), n) : [...n, [r]];
135
+ }, []) : [], G = React.useMemo(() => ({
136
+ display: "grid",
137
+ gridTemplateColumns: `repeat(${z}, ${p})`,
138
+ minWidth: "100%",
139
+ gridColumn: "1 / -1",
140
+ position: "relative"
141
+ }), [z, p]), K = React.useMemo(() => ({
142
+ gridColumn: "1 / -1",
143
+ minHeight: m,
144
+ position: "relative",
145
+ backgroundColor: "transparent"
146
+ }), [m]), q = React.useMemo(() => Array.from({ length: Math.max(0, z - 1) }), [z]);
147
+ return /* @__PURE__ */ jsxs("div", {
148
+ "data-gantt-id": d.id,
149
+ id: d.id,
150
+ ref: b,
151
+ style: G,
152
+ children: [!v && /* @__PURE__ */ jsx(GanttHeader, {
153
+ ticks: B,
154
+ interval: V,
155
+ avgDuration: A,
156
+ stepWidth: p,
157
+ canScrollLeft: H,
158
+ canScrollRight: U
159
+ }), W.map((a, u) => /* @__PURE__ */ jsxs(React.Fragment, { children: [/* @__PURE__ */ jsxs("div", {
160
+ style: K,
161
+ children: [
162
+ q.map((n, r) => /* @__PURE__ */ jsx("div", { style: {
163
+ position: "absolute",
164
+ left: (r + 1) * D,
165
+ top: 0,
166
+ bottom: 0,
167
+ width: "0px",
168
+ borderLeft: `1px dashed rgba(255, 255, 255, ${v ? .05 : .1})`
169
+ } }, `grid-${r}`)),
170
+ v && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
171
+ className: "gantt__group-wrapper",
172
+ style: {
173
+ backgroundImage: `
172
174
  linear-gradient(to right, transparent, #070514),
173
175
  repeating-linear-gradient(
174
176
  45deg,
175
177
  transparent,
176
178
  transparent 2px,
177
- ${I(A(m.id.replace("target", "source")), 0.5)} 4px
179
+ ${withAlpha(hashToColor(d.id.replace("target", "source")), .5)} 4px
178
180
  )
179
181
  `,
180
- left: `${x(G, G + s).left}px`,
181
- width: `${x(G, G + s).width}px`
182
- } }),
183
- /* @__PURE__ */ v("div", { className: "gantt__group-wrapper", style: {
184
- backgroundImage: `
182
+ left: `${I(j, j + h).left}px`,
183
+ width: `${I(j, j + h).width}px`
184
+ }
185
+ }), /* @__PURE__ */ jsx("div", {
186
+ className: "gantt__group-wrapper",
187
+ style: {
188
+ backgroundImage: `
185
189
  linear-gradient(to left, transparent, #070514),
186
190
  repeating-linear-gradient(
187
191
  45deg,
188
192
  transparent,
189
193
  transparent 2px,
190
- ${I(A(m.id.replace("target", "source")), 0.5)} 4px
194
+ ${withAlpha(hashToColor(d.id.replace("target", "source")), .5)} 4px
191
195
  )
192
196
  `,
193
- left: `${x(w - s, w).left}px`,
194
- width: `${x(w - s, w).width}px`
195
- } })
196
- ] }),
197
- r.map((t, n) => {
198
- const o = x(t.start, t.end);
199
- return o.width > 0 && /* @__PURE__ */ v(rt, { id: t.id, w: `${o.width}px`, left: `${o.left}px`, onClick: () => {
200
- t.type == "group" && F((C) => t.id === C ? void 0 : t.id);
201
- }, children: y?.(t, n) }, t.id);
202
- })
203
- ] }, `row-${e}`),
204
- r.map((t, n) => t.type === "group" && V === t.id && /* @__PURE__ */ v(st, { children: y, id: `group-target-${n}`, start: Math.min(...t.data.items.map((o) => o.start)) - Math.min(...t.data.items.map((o) => o.start)) / (t.data.firstGroupStep * t.data.step) * (t.data.groupStep * t.data.step), step: t.data.groupStep * t.data.step, stepWidth: u, rowHeight: W, items: t.data.items }, `group-target-${n}`))
205
- ] }, `row-frag-${e}`))
206
- ] });
207
- };
208
- export {
209
- st as GanttGroup
197
+ left: `${I(M - h, M).left}px`,
198
+ width: `${I(M - h, M).width}px`
199
+ }
200
+ })] }),
201
+ a.map((n, r) => {
202
+ let a = I(n.start, n.end);
203
+ return a.width > 0 && /* @__PURE__ */ jsx(GanttItem, {
204
+ id: n.id,
205
+ w: `${a.width}px`,
206
+ left: `${a.left}px`,
207
+ onClick: () => {
208
+ n.type == "group" && w((r) => n.id === r ? void 0 : n.id);
209
+ },
210
+ children: y?.(n, r)
211
+ }, n.id);
212
+ })
213
+ ]
214
+ }, `row-${u}`), a.map((n, r) => n.type === "group" && C === n.id && /* @__PURE__ */ jsx(GanttGroup, {
215
+ children: y,
216
+ id: `group-target-${r}`,
217
+ start: Math.min(...n.data.items.map((n) => n.start)) - Math.min(...n.data.items.map((n) => n.start)) / (n.data.firstGroupStep * n.data.step) * (n.data.groupStep * n.data.step),
218
+ step: n.data.groupStep * n.data.step,
219
+ stepWidth: p,
220
+ rowHeight: m,
221
+ items: n.data.items
222
+ }, `group-target-${r}`))] }, `row-frag-${u}`))]
223
+ });
210
224
  };
225
+ export { GanttGroup };
@@ -1,82 +1,79 @@
1
- import { jsx as a, jsxs as L } from "react/jsx-runtime";
2
- import { c as z } from "../../_virtual/compiler-runtime.js";
3
- import "../../utils/contextStore.js";
4
- import "react";
5
- import { mergeComponentProps as I } from "../../utils/component.js";
6
- import "js-md5";
7
- import { Text as $ } from "../text/Text.js";
8
- import { IconChevronLeft as W, IconChevronRight as w } from "@tabler/icons-react";
9
- const J = (t) => {
10
- const e = z.c(33);
11
- let s, n, l, c, i, o, m;
12
- if (e[0] !== t) {
13
- const {
14
- avgDuration: r,
15
- stepWidth: N,
16
- canScrollLeft: v,
17
- canScrollRight: R,
18
- ticks: C,
19
- interval: b,
20
- ...F
21
- } = t;
22
- i = N, s = v, n = R, m = C;
23
- let p;
24
- e[8] !== r ? (p = k(r), e[8] = r, e[9] = p) : p = e[9], c = p;
25
- let x;
26
- e[10] !== b ? (x = (M) => {
27
- const {
28
- value: T,
29
- unit: S
30
- } = k(M), j = Math.max(0, Math.ceil(-Math.log10(b / y(S))));
31
- return `${parseFloat(T.toFixed(j))}${S}`;
32
- }, e[10] = b, e[11] = x) : x = e[11], l = x, o = I("gantt__header", F), e[0] = t, e[1] = s, e[2] = n, e[3] = l, e[4] = c, e[5] = i, e[6] = o, e[7] = m;
33
- } else
34
- s = e[1], n = e[2], l = e[3], c = e[4], i = e[5], o = e[6], m = e[7];
35
- let h;
36
- e[12] !== s ? (h = s && /* @__PURE__ */ a("div", { className: "gantt__header-scroll gantt__header-scroll--left", children: /* @__PURE__ */ a(W, { size: 16 }) }), e[12] = s, e[13] = h) : h = e[13];
37
- let d;
38
- e[14] !== c.unit ? (d = /* @__PURE__ */ a("div", { className: "gantt__header-label-column", children: /* @__PURE__ */ L($, { className: "gantt__header-label", children: [
39
- "Range in ",
40
- c.unit
41
- ] }) }), e[14] = c.unit, e[15] = d) : d = e[15];
42
- let f;
43
- e[16] !== h || e[17] !== d ? (f = /* @__PURE__ */ L("div", { className: "gantt__header-start", children: [
44
- h,
45
- d
46
- ] }), e[16] = h, e[17] = d, e[18] = f) : f = e[18];
47
- let _;
48
- if (e[19] !== l || e[20] !== i || e[21] !== m) {
49
- let r;
50
- e[23] !== l || e[24] !== i ? (r = (N) => {
51
- const {
52
- time: v,
53
- left: R
54
- } = N;
55
- return /* @__PURE__ */ a("div", { className: "gantt__header-column", style: {
56
- left: R,
57
- width: i
58
- }, children: /* @__PURE__ */ a($, { children: l(v) }) }, `header-${v}`);
59
- }, e[23] = l, e[24] = i, e[25] = r) : r = e[25], _ = m.map(r), e[19] = l, e[20] = i, e[21] = m, e[22] = _;
60
- } else
61
- _ = e[22];
62
- let g;
63
- e[26] !== n ? (g = n && /* @__PURE__ */ a("div", { className: "gantt__header-scroll gantt__header-scroll--right", children: /* @__PURE__ */ a(w, { size: 16 }) }), e[26] = n, e[27] = g) : g = e[27];
64
- let u;
65
- return e[28] !== o || e[29] !== f || e[30] !== _ || e[31] !== g ? (u = /* @__PURE__ */ L("div", { ...o, children: [
66
- f,
67
- _,
68
- g
69
- ] }), e[28] = o, e[29] = f, e[30] = _, e[31] = g, e[32] = u) : u = e[32], u;
70
- }, k = (t) => t > 5e5 ? {
71
- value: t / 1e6,
72
- unit: "s"
73
- } : t > 500 ? {
74
- value: t / 1e3,
75
- unit: "ms"
76
- } : {
77
- value: t,
78
- unit: "μs"
79
- }, y = (t) => t === "s" ? 1e6 : t === "ms" ? 1e3 : 1;
80
- export {
81
- J as GanttHeader
1
+ import { mergeComponentProps } from "../../utils/component.js";
2
+ import "../../utils/index.js";
3
+ import { Text } from "../text/Text.js";
4
+ import { c } from "react/compiler-runtime";
5
+ import React from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { IconChevronLeft, IconChevronRight } from "@tabler/icons-react";
8
+ const GanttHeader = (a) => {
9
+ let d = c(33), f, p, m, h, g, _, v;
10
+ if (d[0] !== a) {
11
+ let { avgDuration: r, stepWidth: i, canScrollLeft: o, canScrollRight: s, ticks: l, interval: u, ...y } = a;
12
+ g = i, f = o, p = s, v = l;
13
+ let b;
14
+ d[8] === r ? b = d[9] : (b = getTimelineLabel(r), d[8] = r, d[9] = b), h = b;
15
+ let x;
16
+ d[10] === u ? x = d[11] : (x = (e) => {
17
+ let { value: r, unit: i } = getTimelineLabel(e), a = Math.max(0, Math.ceil(-Math.log10(u / unitFactor(i))));
18
+ return `${parseFloat(r.toFixed(a))}${i}`;
19
+ }, d[10] = u, d[11] = x), m = x, _ = mergeComponentProps("gantt__header", y), d[0] = a, d[1] = f, d[2] = p, d[3] = m, d[4] = h, d[5] = g, d[6] = _, d[7] = v;
20
+ } else f = d[1], p = d[2], m = d[3], h = d[4], g = d[5], _ = d[6], v = d[7];
21
+ let y;
22
+ d[12] === f ? y = d[13] : (y = f && /* @__PURE__ */ jsx("div", {
23
+ className: "gantt__header-scroll gantt__header-scroll--left",
24
+ children: /* @__PURE__ */ jsx(IconChevronLeft, { size: 16 })
25
+ }), d[12] = f, d[13] = y);
26
+ let b;
27
+ d[14] === h.unit ? b = d[15] : (b = /* @__PURE__ */ jsx("div", {
28
+ className: "gantt__header-label-column",
29
+ children: /* @__PURE__ */ jsxs(Text, {
30
+ className: "gantt__header-label",
31
+ children: ["Range in ", h.unit]
32
+ })
33
+ }), d[14] = h.unit, d[15] = b);
34
+ let x;
35
+ d[16] !== y || d[17] !== b ? (x = /* @__PURE__ */ jsxs("div", {
36
+ className: "gantt__header-start",
37
+ children: [y, b]
38
+ }), d[16] = y, d[17] = b, d[18] = x) : x = d[18];
39
+ let S;
40
+ if (d[19] !== m || d[20] !== g || d[21] !== v) {
41
+ let e;
42
+ d[23] !== m || d[24] !== g ? (e = (e) => {
43
+ let { time: i, left: a } = e;
44
+ return /* @__PURE__ */ jsx("div", {
45
+ className: "gantt__header-column",
46
+ style: {
47
+ left: a,
48
+ width: g
49
+ },
50
+ children: /* @__PURE__ */ jsx(Text, { children: m(i) })
51
+ }, `header-${i}`);
52
+ }, d[23] = m, d[24] = g, d[25] = e) : e = d[25], S = v.map(e), d[19] = m, d[20] = g, d[21] = v, d[22] = S;
53
+ } else S = d[22];
54
+ let C;
55
+ d[26] === p ? C = d[27] : (C = p && /* @__PURE__ */ jsx("div", {
56
+ className: "gantt__header-scroll gantt__header-scroll--right",
57
+ children: /* @__PURE__ */ jsx(IconChevronRight, { size: 16 })
58
+ }), d[26] = p, d[27] = C);
59
+ let w;
60
+ return d[28] !== _ || d[29] !== x || d[30] !== S || d[31] !== C ? (w = /* @__PURE__ */ jsxs("div", {
61
+ ..._,
62
+ children: [
63
+ x,
64
+ S,
65
+ C
66
+ ]
67
+ }), d[28] = _, d[29] = x, d[30] = S, d[31] = C, d[32] = w) : w = d[32], w;
82
68
  };
69
+ var getTimelineLabel = (e) => e > 5e5 ? {
70
+ value: e / 1e6,
71
+ unit: "s"
72
+ } : e > 500 ? {
73
+ value: e / 1e3,
74
+ unit: "ms"
75
+ } : {
76
+ value: e,
77
+ unit: "μs"
78
+ }, unitFactor = (e) => e === "s" ? 1e6 : e === "ms" ? 1e3 : 1;
79
+ export { GanttHeader };
@@ -1,23 +1,19 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { c as d } from "../../_virtual/compiler-runtime.js";
3
- import "../../utils/contextStore.js";
4
- import "react";
5
- import { mergeComponentProps as p } from "../../utils/component.js";
6
- import "js-md5";
7
- const _ = (n) => {
8
- const t = d.c(10);
9
- let e, i, r, o;
10
- if (t[0] !== n) {
11
- const {
12
- children: c,
13
- ...l
14
- } = n;
15
- e = c, i = l.id, r = l.id, o = p("gantt__item", l), t[0] = n, t[1] = e, t[2] = i, t[3] = r, t[4] = o;
16
- } else
17
- e = t[1], i = t[2], r = t[3], o = t[4];
18
- let m;
19
- return t[5] !== e || t[6] !== i || t[7] !== r || t[8] !== o ? (m = /* @__PURE__ */ s("div", { "data-gantt-id": r, ...o, children: e }, i), t[5] = e, t[6] = i, t[7] = r, t[8] = o, t[9] = m) : m = t[9], m;
20
- };
21
- export {
22
- _ as GanttItem
1
+ import { mergeComponentProps } from "../../utils/component.js";
2
+ import "../../utils/index.js";
3
+ import { c } from "react/compiler-runtime";
4
+ import React from "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ const GanttItem = (n) => {
7
+ let i = c(10), a, o, s, l;
8
+ if (i[0] !== n) {
9
+ let { children: t, ...r } = n;
10
+ a = t, o = r.id, s = r.id, l = mergeComponentProps("gantt__item", r), i[0] = n, i[1] = a, i[2] = o, i[3] = s, i[4] = l;
11
+ } else a = i[1], o = i[2], s = i[3], l = i[4];
12
+ let u;
13
+ return i[5] !== a || i[6] !== o || i[7] !== s || i[8] !== l ? (u = /* @__PURE__ */ jsx("div", {
14
+ "data-gantt-id": s,
15
+ ...l,
16
+ children: a
17
+ }, o), i[5] = a, i[6] = o, i[7] = s, i[8] = l, i[9] = u) : u = i[9], u;
23
18
  };
19
+ export { GanttItem };