@kumix/ui 0.1.3 → 0.2.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 (497) hide show
  1. package/README.md +115 -95
  2. package/dist/components/reui/alert.d.ts +12 -0
  3. package/dist/components/reui/alert.d.ts.map +1 -0
  4. package/dist/components/reui/alert.js +58 -0
  5. package/dist/components/reui/alert.js.map +1 -0
  6. package/dist/components/reui/autocomplete.d.ts +43 -0
  7. package/dist/components/reui/autocomplete.d.ts.map +1 -0
  8. package/dist/components/reui/autocomplete.js +165 -0
  9. package/dist/components/reui/autocomplete.js.map +1 -0
  10. package/dist/components/reui/badge.d.ts +17 -0
  11. package/dist/components/reui/badge.d.ts.map +1 -0
  12. package/dist/components/reui/badge.js +75 -0
  13. package/dist/components/reui/badge.js.map +1 -0
  14. package/dist/components/reui/data-grid/data-grid-column-filter.d.ts +17 -0
  15. package/dist/components/reui/data-grid/data-grid-column-filter.d.ts.map +1 -0
  16. package/dist/components/reui/data-grid/data-grid-column-filter.js +127 -0
  17. package/dist/components/reui/data-grid/data-grid-column-filter.js.map +1 -0
  18. package/dist/components/reui/data-grid/data-grid-column-header.d.ts +18 -0
  19. package/dist/components/reui/data-grid/data-grid-column-header.d.ts.map +1 -0
  20. package/dist/components/reui/data-grid/data-grid-column-header.js +228 -0
  21. package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -0
  22. package/dist/components/reui/data-grid/data-grid-column-visibility.d.ts +10 -0
  23. package/dist/components/reui/data-grid/data-grid-column-visibility.d.ts.map +1 -0
  24. package/dist/components/reui/data-grid/data-grid-column-visibility.js +28 -0
  25. package/dist/components/reui/data-grid/data-grid-column-visibility.js.map +1 -0
  26. package/dist/components/reui/data-grid/data-grid-pagination.d.ts +22 -0
  27. package/dist/components/reui/data-grid/data-grid-pagination.d.ts.map +1 -0
  28. package/dist/components/reui/data-grid/data-grid-pagination.js +144 -0
  29. package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -0
  30. package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts +12 -0
  31. package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts.map +1 -0
  32. package/dist/components/reui/data-grid/data-grid-scroll-area.js +289 -0
  33. package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -0
  34. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts +14 -0
  35. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts.map +1 -0
  36. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +166 -0
  37. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -0
  38. package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts +10 -0
  39. package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts.map +1 -0
  40. package/dist/components/reui/data-grid/data-grid-table-dnd.js +171 -0
  41. package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -0
  42. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts +29 -0
  43. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts.map +1 -0
  44. package/dist/components/reui/data-grid/data-grid-table-virtual.js +269 -0
  45. package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -0
  46. package/dist/components/reui/data-grid/data-grid-table.d.ts +116 -0
  47. package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -0
  48. package/dist/components/reui/data-grid/data-grid-table.js +864 -0
  49. package/dist/components/reui/data-grid/data-grid-table.js.map +1 -0
  50. package/dist/components/reui/data-grid/data-grid.d.ts +112 -0
  51. package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -0
  52. package/dist/components/reui/data-grid/data-grid.js +134 -0
  53. package/dist/components/reui/data-grid/data-grid.js.map +1 -0
  54. package/dist/components/reui/date-selector.d.ts +131 -0
  55. package/dist/components/reui/date-selector.d.ts.map +1 -0
  56. package/dist/components/reui/date-selector.js +783 -0
  57. package/dist/components/reui/date-selector.js.map +1 -0
  58. package/dist/components/reui/event-calendar/event-calendar-agenda-view.d.ts +7 -0
  59. package/dist/components/reui/event-calendar/event-calendar-agenda-view.d.ts.map +1 -0
  60. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +108 -0
  61. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -0
  62. package/dist/components/reui/event-calendar/event-calendar-content.d.ts +15 -0
  63. package/dist/components/reui/event-calendar/event-calendar-content.d.ts.map +1 -0
  64. package/dist/components/reui/event-calendar/event-calendar-content.js +44 -0
  65. package/dist/components/reui/event-calendar/event-calendar-content.js.map +1 -0
  66. package/dist/components/reui/event-calendar/event-calendar-dnd.d.ts +30 -0
  67. package/dist/components/reui/event-calendar/event-calendar-dnd.d.ts.map +1 -0
  68. package/dist/components/reui/event-calendar/event-calendar-dnd.js +581 -0
  69. package/dist/components/reui/event-calendar/event-calendar-dnd.js.map +1 -0
  70. package/dist/components/reui/event-calendar/event-calendar-event.d.ts +73 -0
  71. package/dist/components/reui/event-calendar/event-calendar-event.d.ts.map +1 -0
  72. package/dist/components/reui/event-calendar/event-calendar-event.js +299 -0
  73. package/dist/components/reui/event-calendar/event-calendar-event.js.map +1 -0
  74. package/dist/components/reui/event-calendar/event-calendar-i18n.d.ts +103 -0
  75. package/dist/components/reui/event-calendar/event-calendar-i18n.d.ts.map +1 -0
  76. package/dist/components/reui/event-calendar/event-calendar-i18n.js +141 -0
  77. package/dist/components/reui/event-calendar/event-calendar-i18n.js.map +1 -0
  78. package/dist/components/reui/event-calendar/event-calendar-lib.d.ts +111 -0
  79. package/dist/components/reui/event-calendar/event-calendar-lib.d.ts.map +1 -0
  80. package/dist/components/reui/event-calendar/event-calendar-lib.js +398 -0
  81. package/dist/components/reui/event-calendar/event-calendar-lib.js.map +1 -0
  82. package/dist/components/reui/event-calendar/event-calendar-month-view.d.ts +29 -0
  83. package/dist/components/reui/event-calendar/event-calendar-month-view.d.ts.map +1 -0
  84. package/dist/components/reui/event-calendar/event-calendar-month-view.js +530 -0
  85. package/dist/components/reui/event-calendar/event-calendar-month-view.js.map +1 -0
  86. package/dist/components/reui/event-calendar/event-calendar-nav.d.ts +71 -0
  87. package/dist/components/reui/event-calendar/event-calendar-nav.d.ts.map +1 -0
  88. package/dist/components/reui/event-calendar/event-calendar-nav.js +319 -0
  89. package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -0
  90. package/dist/components/reui/event-calendar/event-calendar-recurrence.d.ts +32 -0
  91. package/dist/components/reui/event-calendar/event-calendar-recurrence.d.ts.map +1 -0
  92. package/dist/components/reui/event-calendar/event-calendar-recurrence.js +300 -0
  93. package/dist/components/reui/event-calendar/event-calendar-recurrence.js.map +1 -0
  94. package/dist/components/reui/event-calendar/event-calendar-resource-view.d.ts +14 -0
  95. package/dist/components/reui/event-calendar/event-calendar-resource-view.d.ts.map +1 -0
  96. package/dist/components/reui/event-calendar/event-calendar-resource-view.js +355 -0
  97. package/dist/components/reui/event-calendar/event-calendar-resource-view.js.map +1 -0
  98. package/dist/components/reui/event-calendar/event-calendar-time-grid.d.ts +35 -0
  99. package/dist/components/reui/event-calendar/event-calendar-time-grid.d.ts.map +1 -0
  100. package/dist/components/reui/event-calendar/event-calendar-time-grid.js +651 -0
  101. package/dist/components/reui/event-calendar/event-calendar-time-grid.js.map +1 -0
  102. package/dist/components/reui/event-calendar/event-calendar-types.d.ts +236 -0
  103. package/dist/components/reui/event-calendar/event-calendar-types.d.ts.map +1 -0
  104. package/dist/components/reui/event-calendar/event-calendar-types.js +2 -0
  105. package/dist/components/reui/event-calendar/event-calendar.d.ts +561 -0
  106. package/dist/components/reui/event-calendar/event-calendar.d.ts.map +1 -0
  107. package/dist/components/reui/event-calendar/event-calendar.js +817 -0
  108. package/dist/components/reui/event-calendar/event-calendar.js.map +1 -0
  109. package/dist/components/reui/filters.d.ts +176 -0
  110. package/dist/components/reui/filters.d.ts.map +1 -0
  111. package/dist/components/reui/filters.js +1216 -0
  112. package/dist/components/reui/filters.js.map +1 -0
  113. package/dist/components/reui/frame.d.ts +32 -0
  114. package/dist/components/reui/frame.d.ts.map +1 -0
  115. package/dist/components/reui/frame.js +115 -0
  116. package/dist/components/reui/frame.js.map +1 -0
  117. package/dist/components/reui/gantt/gantt-bar.d.ts +44 -0
  118. package/dist/components/reui/gantt/gantt-bar.d.ts.map +1 -0
  119. package/dist/components/reui/gantt/gantt-bar.js +229 -0
  120. package/dist/components/reui/gantt/gantt-bar.js.map +1 -0
  121. package/dist/components/reui/gantt/gantt-dnd.d.ts +36 -0
  122. package/dist/components/reui/gantt/gantt-dnd.d.ts.map +1 -0
  123. package/dist/components/reui/gantt/gantt-dnd.js +615 -0
  124. package/dist/components/reui/gantt/gantt-dnd.js.map +1 -0
  125. package/dist/components/reui/gantt/gantt-i18n.d.ts +91 -0
  126. package/dist/components/reui/gantt/gantt-i18n.d.ts.map +1 -0
  127. package/dist/components/reui/gantt/gantt-i18n.js +131 -0
  128. package/dist/components/reui/gantt/gantt-i18n.js.map +1 -0
  129. package/dist/components/reui/gantt/gantt-lib.d.ts +123 -0
  130. package/dist/components/reui/gantt/gantt-lib.d.ts.map +1 -0
  131. package/dist/components/reui/gantt/gantt-lib.js +354 -0
  132. package/dist/components/reui/gantt/gantt-lib.js.map +1 -0
  133. package/dist/components/reui/gantt/gantt-nav.d.ts +60 -0
  134. package/dist/components/reui/gantt/gantt-nav.d.ts.map +1 -0
  135. package/dist/components/reui/gantt/gantt-nav.js +266 -0
  136. package/dist/components/reui/gantt/gantt-nav.js.map +1 -0
  137. package/dist/components/reui/gantt/gantt-recurrence.d.ts +37 -0
  138. package/dist/components/reui/gantt/gantt-recurrence.d.ts.map +1 -0
  139. package/dist/components/reui/gantt/gantt-recurrence.js +230 -0
  140. package/dist/components/reui/gantt/gantt-recurrence.js.map +1 -0
  141. package/dist/components/reui/gantt/gantt-types.d.ts +251 -0
  142. package/dist/components/reui/gantt/gantt-types.d.ts.map +1 -0
  143. package/dist/components/reui/gantt/gantt-types.js +2 -0
  144. package/dist/components/reui/gantt/gantt-view.d.ts +10 -0
  145. package/dist/components/reui/gantt/gantt-view.d.ts.map +1 -0
  146. package/dist/components/reui/gantt/gantt-view.js +2193 -0
  147. package/dist/components/reui/gantt/gantt-view.js.map +1 -0
  148. package/dist/components/reui/gantt/gantt.d.ts +602 -0
  149. package/dist/components/reui/gantt/gantt.d.ts.map +1 -0
  150. package/dist/components/reui/gantt/gantt.js +796 -0
  151. package/dist/components/reui/gantt/gantt.js.map +1 -0
  152. package/dist/components/reui/icon-stack.d.ts +7 -0
  153. package/dist/components/reui/icon-stack.d.ts.map +1 -0
  154. package/dist/components/reui/icon-stack.js +76 -0
  155. package/dist/components/reui/icon-stack.js.map +1 -0
  156. package/dist/components/reui/kanban.d.ts +70 -0
  157. package/dist/components/reui/kanban.d.ts.map +1 -0
  158. package/dist/components/reui/kanban.js +519 -0
  159. package/dist/components/reui/kanban.js.map +1 -0
  160. package/dist/components/reui/number-field.d.ts +29 -0
  161. package/dist/components/reui/number-field.d.ts.map +1 -0
  162. package/dist/components/reui/number-field.js +127 -0
  163. package/dist/components/reui/number-field.js.map +1 -0
  164. package/dist/components/reui/phone-input.d.ts +13 -0
  165. package/dist/components/reui/phone-input.d.ts.map +1 -0
  166. package/dist/components/reui/phone-input.js +126 -0
  167. package/dist/components/reui/phone-input.js.map +1 -0
  168. package/dist/components/reui/rating.d.ts +34 -0
  169. package/dist/components/reui/rating.d.ts.map +1 -0
  170. package/dist/components/reui/rating.js +94 -0
  171. package/dist/components/reui/rating.js.map +1 -0
  172. package/dist/components/reui/scrollspy.d.ts +17 -0
  173. package/dist/components/reui/scrollspy.d.ts.map +1 -0
  174. package/dist/components/reui/scrollspy.js +130 -0
  175. package/dist/components/reui/scrollspy.js.map +1 -0
  176. package/dist/components/reui/sortable.d.ts +48 -0
  177. package/dist/components/reui/sortable.d.ts.map +1 -0
  178. package/dist/components/reui/sortable.js +230 -0
  179. package/dist/components/reui/sortable.js.map +1 -0
  180. package/dist/components/reui/stepper.d.ts +63 -0
  181. package/dist/components/reui/stepper.d.ts.map +1 -0
  182. package/dist/components/reui/stepper.js +234 -0
  183. package/dist/components/reui/stepper.js.map +1 -0
  184. package/dist/components/reui/timeline.d.ts +24 -0
  185. package/dist/components/reui/timeline.d.ts.map +1 -0
  186. package/dist/components/reui/timeline.js +123 -0
  187. package/dist/components/reui/timeline.js.map +1 -0
  188. package/dist/components/reui/tree.d.ts +23 -0
  189. package/dist/components/reui/tree.d.ts.map +1 -0
  190. package/dist/components/reui/tree.js +115 -0
  191. package/dist/components/reui/tree.js.map +1 -0
  192. package/dist/components/ui/accordion.d.ts +9 -0
  193. package/dist/components/ui/accordion.d.ts.map +1 -0
  194. package/dist/components/ui/accordion.js +56 -0
  195. package/dist/components/ui/accordion.js.map +1 -0
  196. package/dist/components/ui/alert-dialog.d.ts +21 -0
  197. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  198. package/dist/components/ui/alert-dialog.js +96 -0
  199. package/dist/components/ui/alert-dialog.js.map +1 -0
  200. package/dist/components/ui/alert.d.ts +13 -0
  201. package/dist/components/ui/alert.d.ts.map +1 -0
  202. package/dist/components/ui/alert.js +45 -0
  203. package/dist/components/ui/alert.js.map +1 -0
  204. package/dist/components/ui/aspect-ratio.d.ts +8 -0
  205. package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
  206. package/dist/components/ui/aspect-ratio.js +16 -0
  207. package/dist/components/ui/aspect-ratio.js.map +1 -0
  208. package/dist/components/ui/attachment.d.ts +26 -0
  209. package/dist/components/ui/attachment.d.ts.map +1 -0
  210. package/dist/components/ui/attachment.js +106 -0
  211. package/dist/components/ui/attachment.js.map +1 -0
  212. package/dist/components/ui/avatar.d.ts +14 -0
  213. package/dist/components/ui/avatar.d.ts.map +1 -0
  214. package/dist/components/ui/avatar.js +52 -0
  215. package/dist/components/ui/avatar.js.map +1 -0
  216. package/dist/components/ui/badge.d.ts +10 -0
  217. package/dist/components/ui/badge.d.ts.map +1 -0
  218. package/dist/components/ui/badge.js +32 -0
  219. package/dist/components/ui/badge.js.map +1 -0
  220. package/dist/components/ui/breadcrumb.d.ts +13 -0
  221. package/dist/components/ui/breadcrumb.d.ts.map +1 -0
  222. package/dist/components/ui/breadcrumb.js +72 -0
  223. package/dist/components/ui/breadcrumb.js.map +1 -0
  224. package/dist/components/ui/bubble.d.ts +19 -0
  225. package/dist/components/ui/bubble.d.ts.map +1 -0
  226. package/dist/components/ui/bubble.js +75 -0
  227. package/dist/components/ui/bubble.js.map +1 -0
  228. package/dist/components/ui/button-group.d.ts +14 -0
  229. package/dist/components/ui/button-group.d.ts.map +1 -0
  230. package/dist/components/ui/button-group.js +44 -0
  231. package/dist/components/ui/button-group.js.map +1 -0
  232. package/dist/components/ui/button.d.ts +11 -0
  233. package/dist/components/ui/button.d.ts.map +1 -0
  234. package/dist/components/ui/button.js +47 -0
  235. package/dist/components/ui/button.js.map +1 -0
  236. package/dist/components/ui/calendar.d.ts +13 -0
  237. package/dist/components/ui/calendar.d.ts.map +1 -0
  238. package/dist/components/ui/calendar.js +110 -0
  239. package/dist/components/ui/calendar.js.map +1 -0
  240. package/dist/components/ui/card.d.ts +14 -0
  241. package/dist/components/ui/card.d.ts.map +1 -0
  242. package/dist/components/ui/card.js +58 -0
  243. package/dist/components/ui/card.js.map +1 -0
  244. package/dist/components/ui/carousel.d.ts +31 -0
  245. package/dist/components/ui/carousel.d.ts.map +1 -0
  246. package/dist/components/ui/carousel.js +135 -0
  247. package/dist/components/ui/carousel.js.map +1 -0
  248. package/dist/components/ui/chart.d.ts +47 -0
  249. package/dist/components/ui/chart.d.ts.map +1 -0
  250. package/dist/components/ui/chart.js +151 -0
  251. package/dist/components/ui/chart.js.map +1 -0
  252. package/dist/components/ui/checkbox.d.ts +6 -0
  253. package/dist/components/ui/checkbox.d.ts.map +1 -0
  254. package/dist/components/ui/checkbox.js +22 -0
  255. package/dist/components/ui/checkbox.js.map +1 -0
  256. package/dist/components/ui/collapsible.d.ts +8 -0
  257. package/dist/components/ui/collapsible.d.ts.map +1 -0
  258. package/dist/components/ui/collapsible.js +26 -0
  259. package/dist/components/ui/collapsible.js.map +1 -0
  260. package/dist/components/ui/combobox.d.ts +27 -0
  261. package/dist/components/ui/combobox.d.ts.map +1 -0
  262. package/dist/components/ui/combobox.js +164 -0
  263. package/dist/components/ui/combobox.js.map +1 -0
  264. package/dist/components/ui/command.d.ts +22 -0
  265. package/dist/components/ui/command.d.ts.map +1 -0
  266. package/dist/components/ui/command.js +89 -0
  267. package/dist/components/ui/command.js.map +1 -0
  268. package/dist/components/ui/context-menu.d.ts +32 -0
  269. package/dist/components/ui/context-menu.d.ts.map +1 -0
  270. package/dist/components/ui/context-menu.js +134 -0
  271. package/dist/components/ui/context-menu.js.map +1 -0
  272. package/dist/components/ui/dialog.d.ts +20 -0
  273. package/dist/components/ui/dialog.d.ts.map +1 -0
  274. package/dist/components/ui/dialog.js +93 -0
  275. package/dist/components/ui/dialog.js.map +1 -0
  276. package/dist/components/ui/direction.d.ts +2 -0
  277. package/dist/components/ui/direction.js +3 -0
  278. package/dist/components/ui/drawer.d.ts +19 -0
  279. package/dist/components/ui/drawer.d.ts.map +1 -0
  280. package/dist/components/ui/drawer.js +125 -0
  281. package/dist/components/ui/drawer.js.map +1 -0
  282. package/dist/components/ui/dropdown-menu.d.ts +32 -0
  283. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  284. package/dist/components/ui/dropdown-menu.js +138 -0
  285. package/dist/components/ui/dropdown-menu.js.map +1 -0
  286. package/dist/components/ui/empty.d.ts +15 -0
  287. package/dist/components/ui/empty.d.ts.map +1 -0
  288. package/dist/components/ui/empty.js +62 -0
  289. package/dist/components/ui/empty.js.map +1 -0
  290. package/dist/components/ui/field.d.ts +28 -0
  291. package/dist/components/ui/field.d.ts.map +1 -0
  292. package/dist/components/ui/field.js +112 -0
  293. package/dist/components/ui/field.js.map +1 -0
  294. package/dist/components/ui/hover-card.d.ts +8 -0
  295. package/dist/components/ui/hover-card.d.ts.map +1 -0
  296. package/dist/components/ui/hover-card.js +38 -0
  297. package/dist/components/ui/hover-card.js.map +1 -0
  298. package/dist/components/ui/input-group.d.ts +21 -0
  299. package/dist/components/ui/input-group.d.ts.map +1 -0
  300. package/dist/components/ui/input-group.js +80 -0
  301. package/dist/components/ui/input-group.js.map +1 -0
  302. package/dist/components/ui/input-otp.d.ts +14 -0
  303. package/dist/components/ui/input-otp.d.ts.map +1 -0
  304. package/dist/components/ui/input-otp.js +49 -0
  305. package/dist/components/ui/input-otp.js.map +1 -0
  306. package/dist/components/ui/input.d.ts +6 -0
  307. package/dist/components/ui/input.d.ts.map +1 -0
  308. package/dist/components/ui/input.js +17 -0
  309. package/dist/components/ui/input.js.map +1 -0
  310. package/dist/components/ui/item.d.ts +25 -0
  311. package/dist/components/ui/item.d.ts.map +1 -0
  312. package/dist/components/ui/item.js +123 -0
  313. package/dist/components/ui/item.js.map +1 -0
  314. package/dist/components/ui/kbd.d.ts +7 -0
  315. package/dist/components/ui/kbd.d.ts.map +1 -0
  316. package/dist/components/ui/kbd.js +22 -0
  317. package/dist/components/ui/kbd.js.map +1 -0
  318. package/dist/components/ui/label.d.ts +6 -0
  319. package/dist/components/ui/label.d.ts.map +1 -0
  320. package/dist/components/ui/label.js +15 -0
  321. package/dist/components/ui/label.js.map +1 -0
  322. package/dist/components/ui/marker.d.ts +13 -0
  323. package/dist/components/ui/marker.d.ts.map +1 -0
  324. package/dist/components/ui/marker.js +45 -0
  325. package/dist/components/ui/marker.js.map +1 -0
  326. package/dist/components/ui/menubar.d.ts +32 -0
  327. package/dist/components/ui/menubar.d.ts.map +1 -0
  328. package/dist/components/ui/menubar.js +137 -0
  329. package/dist/components/ui/menubar.js.map +1 -0
  330. package/dist/components/ui/message-scroller.d.ts +13 -0
  331. package/dist/components/ui/message-scroller.d.ts.map +1 -0
  332. package/dist/components/ui/message-scroller.js +62 -0
  333. package/dist/components/ui/message-scroller.js.map +1 -0
  334. package/dist/components/ui/message.d.ts +13 -0
  335. package/dist/components/ui/message.d.ts.map +1 -0
  336. package/dist/components/ui/message.js +51 -0
  337. package/dist/components/ui/message.js.map +1 -0
  338. package/dist/components/ui/native-select.d.ts +11 -0
  339. package/dist/components/ui/native-select.d.ts.map +1 -0
  340. package/dist/components/ui/native-select.js +40 -0
  341. package/dist/components/ui/native-select.js.map +1 -0
  342. package/dist/components/ui/navigation-menu.d.ts +15 -0
  343. package/dist/components/ui/navigation-menu.d.ts.map +1 -0
  344. package/dist/components/ui/navigation-menu.js +85 -0
  345. package/dist/components/ui/navigation-menu.js.map +1 -0
  346. package/dist/components/ui/pagination.d.ts +20 -0
  347. package/dist/components/ui/pagination.d.ts.map +1 -0
  348. package/dist/components/ui/pagination.js +81 -0
  349. package/dist/components/ui/pagination.js.map +1 -0
  350. package/dist/components/ui/popover.d.ts +12 -0
  351. package/dist/components/ui/popover.d.ts.map +1 -0
  352. package/dist/components/ui/popover.js +56 -0
  353. package/dist/components/ui/popover.js.map +1 -0
  354. package/dist/components/ui/progress.d.ts +10 -0
  355. package/dist/components/ui/progress.d.ts.map +1 -0
  356. package/dist/components/ui/progress.js +46 -0
  357. package/dist/components/ui/progress.js.map +1 -0
  358. package/dist/components/ui/radio-group.d.ts +8 -0
  359. package/dist/components/ui/radio-group.d.ts.map +1 -0
  360. package/dist/components/ui/radio-group.js +29 -0
  361. package/dist/components/ui/radio-group.js.map +1 -0
  362. package/dist/components/ui/resizable.d.ts +10 -0
  363. package/dist/components/ui/resizable.d.ts.map +1 -0
  364. package/dist/components/ui/resizable.js +30 -0
  365. package/dist/components/ui/resizable.js.map +1 -0
  366. package/dist/components/ui/scroll-area.d.ts +7 -0
  367. package/dist/components/ui/scroll-area.d.ts.map +1 -0
  368. package/dist/components/ui/scroll-area.js +38 -0
  369. package/dist/components/ui/scroll-area.js.map +1 -0
  370. package/dist/components/ui/select.d.ts +18 -0
  371. package/dist/components/ui/select.d.ts.map +1 -0
  372. package/dist/components/ui/select.js +99 -0
  373. package/dist/components/ui/select.js.map +1 -0
  374. package/dist/components/ui/separator.d.ts +6 -0
  375. package/dist/components/ui/separator.d.ts.map +1 -0
  376. package/dist/components/ui/separator.js +17 -0
  377. package/dist/components/ui/separator.js.map +1 -0
  378. package/dist/components/ui/sheet.d.ts +17 -0
  379. package/dist/components/ui/sheet.d.ts.map +1 -0
  380. package/dist/components/ui/sheet.js +90 -0
  381. package/dist/components/ui/sheet.js.map +1 -0
  382. package/dist/components/ui/sidebar.d.ts +66 -0
  383. package/dist/components/ui/sidebar.d.ts.map +1 -0
  384. package/dist/components/ui/sidebar.js +383 -0
  385. package/dist/components/ui/sidebar.js.map +1 -0
  386. package/dist/components/ui/skeleton.d.ts +6 -0
  387. package/dist/components/ui/skeleton.d.ts.map +1 -0
  388. package/dist/components/ui/skeleton.js +15 -0
  389. package/dist/components/ui/skeleton.js.map +1 -0
  390. package/dist/components/ui/slider.d.ts +6 -0
  391. package/dist/components/ui/slider.d.ts.map +1 -0
  392. package/dist/components/ui/slider.js +36 -0
  393. package/dist/components/ui/slider.js.map +1 -0
  394. package/dist/components/ui/sonner.d.ts +7 -0
  395. package/dist/components/ui/sonner.d.ts.map +1 -0
  396. package/dist/components/ui/sonner.js +32 -0
  397. package/dist/components/ui/sonner.js.map +1 -0
  398. package/dist/components/ui/spinner.d.ts +6 -0
  399. package/dist/components/ui/spinner.d.ts.map +1 -0
  400. package/dist/components/ui/spinner.js +18 -0
  401. package/dist/components/ui/spinner.js.map +1 -0
  402. package/dist/components/ui/switch.d.ts +8 -0
  403. package/dist/components/ui/switch.d.ts.map +1 -0
  404. package/dist/components/ui/switch.js +21 -0
  405. package/dist/components/ui/switch.js.map +1 -0
  406. package/dist/components/ui/table.d.ts +13 -0
  407. package/dist/components/ui/table.d.ts.map +1 -0
  408. package/dist/components/ui/table.js +68 -0
  409. package/dist/components/ui/table.js.map +1 -0
  410. package/dist/components/ui/tabs.d.ts +13 -0
  411. package/dist/components/ui/tabs.d.ts.map +1 -0
  412. package/dist/components/ui/tabs.js +47 -0
  413. package/dist/components/ui/tabs.js.map +1 -0
  414. package/dist/components/ui/textarea.d.ts +6 -0
  415. package/dist/components/ui/textarea.d.ts.map +1 -0
  416. package/dist/components/ui/textarea.js +15 -0
  417. package/dist/components/ui/textarea.js.map +1 -0
  418. package/dist/components/ui/toggle-group.d.ts +14 -0
  419. package/dist/components/ui/toggle-group.d.ts.map +1 -0
  420. package/dist/components/ui/toggle-group.js +54 -0
  421. package/dist/components/ui/toggle-group.js.map +1 -0
  422. package/dist/components/ui/toggle.d.ts +11 -0
  423. package/dist/components/ui/toggle.d.ts.map +1 -0
  424. package/dist/components/ui/toggle.js +38 -0
  425. package/dist/components/ui/toggle.js.map +1 -0
  426. package/dist/components/ui/tooltip.d.ts +9 -0
  427. package/dist/components/ui/tooltip.d.ts.map +1 -0
  428. package/dist/components/ui/tooltip.js +43 -0
  429. package/dist/components/ui/tooltip.js.map +1 -0
  430. package/dist/hooks/use-body-classes.d.ts +27 -0
  431. package/dist/hooks/use-body-classes.d.ts.map +1 -0
  432. package/dist/hooks/use-body-classes.js +52 -0
  433. package/dist/hooks/use-body-classes.js.map +1 -0
  434. package/dist/hooks/use-copy-to-clipboard.d.ts +43 -0
  435. package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
  436. package/dist/hooks/use-copy-to-clipboard.js +69 -0
  437. package/dist/hooks/use-copy-to-clipboard.js.map +1 -0
  438. package/dist/hooks/use-file-upload.d.ts +49 -0
  439. package/dist/hooks/use-file-upload.d.ts.map +1 -0
  440. package/dist/hooks/use-file-upload.js +227 -0
  441. package/dist/hooks/use-file-upload.js.map +1 -0
  442. package/dist/hooks/use-hydrated.d.ts +37 -0
  443. package/dist/hooks/use-hydrated.d.ts.map +1 -0
  444. package/dist/hooks/use-hydrated.js +50 -0
  445. package/dist/hooks/use-hydrated.js.map +1 -0
  446. package/dist/hooks/use-intersection-observer.d.ts +55 -0
  447. package/dist/hooks/use-intersection-observer.d.ts.map +1 -0
  448. package/dist/hooks/use-intersection-observer.js +144 -0
  449. package/dist/hooks/use-intersection-observer.js.map +1 -0
  450. package/dist/hooks/use-is-mac.d.ts +28 -0
  451. package/dist/hooks/use-is-mac.d.ts.map +1 -0
  452. package/dist/hooks/use-is-mac.js +38 -0
  453. package/dist/hooks/use-is-mac.js.map +1 -0
  454. package/dist/hooks/use-media-query.d.ts +44 -0
  455. package/dist/hooks/use-media-query.d.ts.map +1 -0
  456. package/dist/hooks/use-media-query.js +58 -0
  457. package/dist/hooks/use-media-query.js.map +1 -0
  458. package/dist/hooks/use-meta-color.d.ts +78 -0
  459. package/dist/hooks/use-meta-color.d.ts.map +1 -0
  460. package/dist/hooks/use-meta-color.js +138 -0
  461. package/dist/hooks/use-meta-color.js.map +1 -0
  462. package/dist/hooks/use-mobile.d.ts +5 -0
  463. package/dist/hooks/use-mobile.d.ts.map +1 -0
  464. package/dist/hooks/use-mobile.js +21 -0
  465. package/dist/hooks/use-mobile.js.map +1 -0
  466. package/dist/hooks/use-mutation-observer.d.ts +61 -0
  467. package/dist/hooks/use-mutation-observer.d.ts.map +1 -0
  468. package/dist/hooks/use-mutation-observer.js +96 -0
  469. package/dist/hooks/use-mutation-observer.js.map +1 -0
  470. package/dist/hooks/use-scroll-position.d.ts +76 -0
  471. package/dist/hooks/use-scroll-position.d.ts.map +1 -0
  472. package/dist/hooks/use-scroll-position.js +97 -0
  473. package/dist/hooks/use-scroll-position.js.map +1 -0
  474. package/dist/hooks/use-slider-input.d.ts +94 -0
  475. package/dist/hooks/use-slider-input.d.ts.map +1 -0
  476. package/dist/hooks/use-slider-input.js +116 -0
  477. package/dist/hooks/use-slider-input.js.map +1 -0
  478. package/dist/hooks/use-viewport.d.ts +72 -0
  479. package/dist/hooks/use-viewport.d.ts.map +1 -0
  480. package/dist/hooks/use-viewport.js +91 -0
  481. package/dist/hooks/use-viewport.js.map +1 -0
  482. package/dist/style.css +0 -247
  483. package/dist/theme.css +244 -0
  484. package/dist/theme.css.d.ts +3 -0
  485. package/package.json +42 -40
  486. package/dist/hooks.d.ts +0 -957
  487. package/dist/hooks.d.ts.map +0 -1
  488. package/dist/hooks.js +0 -1391
  489. package/dist/hooks.js.map +0 -1
  490. package/dist/index.d.ts +0 -1993
  491. package/dist/index.d.ts.map +0 -1
  492. package/dist/index.js +0 -10647
  493. package/dist/index.js.map +0 -1
  494. package/dist/source.css +0 -1
  495. package/dist/source.css.d.ts +0 -3
  496. package/dist/use-is-mobile-Dln4-L1O.js +0 -210
  497. package/dist/use-is-mobile-Dln4-L1O.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gantt-dnd.js","names":[],"sources":["../../../../src/components/reui/gantt/gantt-dnd.tsx"],"sourcesContent":["\"use client\";\n\nimport { useCallback, useEffect } from \"react\";\nimport { addDays, differenceInCalendarDays } from \"date-fns\";\n\nimport { type GanttInstance, resolveScheduleMode, useGantt, useGanttViewConfig } from \"./gantt\";\nimport { findResource, snapMinutes, toZoned, zonedStartOfDay } from \"./gantt-lib\";\nimport type { GanttProposedUpdate, GanttScheduleMode, GanttSegment } from \"./gantt-types\";\n\n/**\n * Activation policy (dnd-kit parity where proven):\n * mouse move 5px before a drag starts (below = click), create 4px;\n * touch long-press 250ms with 5px tolerance (movement past tolerance\n * before the delay cancels the drag so taps stay taps).\n */\nconst GANTT_ACTIVATION = {\n moveDistancePx: 5,\n createDistancePx: 4,\n touchDelayMs: 250,\n touchTolerancePx: 5,\n} as const;\n\ntype GestureKind = \"move\" | \"resize-start\" | \"resize-end\" | \"create\";\n\ninterface GanttSurface {\n rect: DOMRect;\n rangeStart: number;\n rangeEnd: number;\n snapMin: number;\n /** Mirrored axis: in RTL the range START sits at the rect's RIGHT edge. */\n isRtl: boolean;\n rows: Array<{ resourceId: string; rect: DOMRect }>;\n}\n\n/**\n * Pointer x (viewport px) to minutes from the range start, clamped to the\n * track. The single place the horizontal axis direction is resolved: every\n * gesture mapping (move, both resizes, create, grab offset) goes through it.\n */\nfunction surfaceMinutesAt(tl: GanttSurface, x: number): number {\n const clamped = Math.min(Math.max(x, tl.rect.left), tl.rect.right);\n const traveled = tl.isRtl ? tl.rect.right - clamped : clamped - tl.rect.left;\n return (traveled / tl.rect.width) * ((tl.rangeEnd - tl.rangeStart) / 60000);\n}\n\n/** Module flag so bar onClick can ignore the click that ends a drag. */\nlet lastGestureEndedAt = 0;\nfunction wasRecentDrag(): boolean {\n return performance.now() - lastGestureEndedAt < 250;\n}\n\n/** Mark a non-dnd gesture (e.g. a timeline pan) so the click it ends is ignored. */\nfunction markGestureEnd(): void {\n lastGestureEndedAt = performance.now();\n}\n\n/**\n * Registry of in-flight gesture cancels. A gesture measures its surface\n * (axis + row rects) once at activation, so the VIEW - not the bar, bars\n * legitimately unmount mid-gesture - must be able to abort gestures when it\n * unmounts or when the measured geometry changes under them (zoom, scale,\n * range growth, splitter). Cancel fully reverts: listeners, overlays and the\n * body drag state all clear, and no update is committed.\n */\nconst activeGestureCancels = new Set<() => void>();\n\n/** Cancel (and fully revert) every in-flight gantt pointer gesture. */\nfunction cancelActiveGanttGestures(): void {\n for (const cancel of [...activeGestureCancels]) cancel();\n}\n\n/**\n * View-level teardown, mounted once by GanttView: aborts any in-flight\n * gesture on unmount so window listeners, body-appended overlays and the\n * gantt-dragging body class never outlive the gantt.\n */\nfunction useGanttGestureTeardown(): void {\n useEffect(() => cancelActiveGanttGestures, []);\n}\n\n/**\n * Snap a translate offset to the device pixel grid. The cursor-following\n * overlays (the move clone and the resize indicator) are their own\n * `will-change: transform` compositing layers: the GPU rasterizes their text\n * once and repositions that texture each frame, so a subpixel translate\n * (getBoundingClientRect and raw clientX/Y are routinely fractional) resamples\n * the texture and blurs the text. Rounding each offset to a whole device pixel\n * lands the layer on the grid so glyphs stay crisp, without giving up the\n * per-frame GPU transform.\n */\nfunction snapToPixel(value: number): number {\n const dpr = typeof window !== \"undefined\" ? window.devicePixelRatio || 1 : 1;\n return Math.round(value * dpr) / dpr;\n}\n\nfunction collectSurface(root: HTMLElement | null): GanttSurface | null {\n if (!root) return null;\n const axis = root.querySelector<HTMLElement>(\"[data-gantt-axis]\");\n if (!axis) return null;\n return {\n rect: axis.getBoundingClientRect(),\n rangeStart: Number(axis.dataset.ganttRangeStart),\n rangeEnd: Number(axis.dataset.ganttRangeEnd),\n snapMin: Number(axis.dataset.ganttSnap) || 15,\n isRtl: getComputedStyle(axis).direction === \"rtl\",\n rows: [...root.querySelectorAll<HTMLElement>(\"[data-gantt-row]\")]\n // static rows (parents that aggregate their subtree) take no drops\n .filter((row) => row.dataset.ganttRowStatic === undefined)\n .map((row) => ({\n resourceId: row.dataset.ganttResource ?? \"\",\n rect: row.getBoundingClientRect(),\n })),\n };\n}\n\ninterface BeginGestureConfig<TData> {\n instance: GanttInstance<TData>;\n kind: GestureKind;\n origin: HTMLElement;\n startEvent: PointerEvent;\n segment?: GanttSegment<TData>;\n /** Consumer renders the move preview (renderDragPreview); the engine only positions it. */\n customMoveOverlay?: boolean;\n /** Consumer renders the resize indicator; the engine only positions it. */\n customResizeOverlay?: boolean;\n /** View-level cardinality default; a node's own scheduleMode wins. */\n scheduleMode?: GanttScheduleMode;\n}\n\nfunction beginGesture<TData>(config: BeginGestureConfig<TData>) {\n const { instance, kind, origin, startEvent, segment, customMoveOverlay, customResizeOverlay } =\n config;\n const { settings, internals, api } = instance;\n const activation = { ...GANTT_ACTIVATION, ...settings.activation };\n const startX = startEvent.clientX;\n const startY = startEvent.clientY;\n const pointerId = startEvent.pointerId;\n // stable ancestors: bar nodes may be replaced by re-renders mid-gesture\n const viewRoot = origin.closest<HTMLElement>(\"[data-slot=gantt-view]\");\n const ganttRoot = origin.closest<HTMLElement>(\"[data-slot=gantt]\");\n const announcer = ganttRoot?.querySelector<HTMLElement>(\"[data-slot=gantt-announcer]\");\n\n /**\n * The cursor-following overlays are appended to document.body so no ancestor\n * transform or overflow can clip them - which also cuts them off from the\n * gantt root, and the root is what OWNS the type scale (its `text-xs` is\n * what every resting label inherits). Without this the clone's label jumps\n * to the document default and reads visibly bigger than the bar it left.\n * Copying the ROOT's resolved metrics - rather than hardcoding a size -\n * keeps the documented contract that one class on the root (e.g.\n * className=\"text-sm\") rescales the whole gantt, drag clone included.\n */\n const adoptRootTypography = (el: HTMLElement) => {\n if (!ganttRoot) return;\n const rootStyle = getComputedStyle(ganttRoot);\n el.style.fontSize = rootStyle.fontSize;\n el.style.lineHeight = rootStyle.lineHeight;\n el.style.fontFamily = rootStyle.fontFamily;\n el.style.letterSpacing = rootStyle.letterSpacing;\n // physical positioning, logical content: the flex row mirrors so the\n // label lands on the same side of the bar as the resting one in RTL\n el.style.direction = rootStyle.direction;\n };\n\n const isTouch = startEvent.pointerType === \"touch\";\n // resize activates immediately on precise pointers; on touch it waits for\n // the same long-press as a move, so a stray brush over a bar edge can\n // never start an accidental resize\n let active = kind.startsWith(\"resize\") && !isTouch;\n let surface: GanttSurface | null = active ? collectSurface(viewRoot) : null;\n let lastProposalKey = \"\";\n let touchTimer: ReturnType<typeof setTimeout> | null = null;\n let lastPointer: PointerEvent = startEvent;\n\n const occurrence = segment?.occurrence;\n\n // ----- neighbour awareness: the other schedules in the SAME node -----\n // A node in \"single\" mode rejects any concurrency regardless of the\n // overlap option; otherwise the option decides. \"allow\" short-circuits\n // everything below, so the default gesture path is untouched.\n const nodeId = occurrence?.event.resourceId;\n const nodeMode = resolveScheduleMode(\n nodeId === undefined ? null : findResource(settings.resources, nodeId),\n config.scheduleMode,\n );\n const overlapPolicy = nodeMode === \"single\" ? (\"reject\" as const) : settings.overlap;\n // Read once per gesture: the gantt never mutates events mid-drag, so the\n // neighbours cannot move under us.\n let neighbourCache: Array<{ start: number; end: number }> | null = null;\n const getNeighbours = () => {\n if (neighbourCache) return neighbourCache;\n neighbourCache =\n !occurrence || nodeId === undefined || overlapPolicy === \"allow\"\n ? []\n : api\n .getOccurrences()\n .filter((other) => other.event.resourceId === nodeId && other.key !== occurrence.key)\n .map((other) => ({\n start: other.start.getTime(),\n end: other.end.getTime(),\n }));\n return neighbourCache;\n };\n const overlapsNeighbour = (start: Date, end: Date) =>\n getNeighbours().some((other) => other.start < end.getTime() && other.end > start.getTime());\n /**\n * Stop the gesture at the neighbour's edge. Runs AFTER snapping so the\n * clamp always wins, and only against neighbours that sit clear of the\n * bar's CURRENT span - a pre-existing overlap has no edge to stop at.\n */\n const clampToNeighbours = (start: Date, end: Date): { start: Date; end: Date } => {\n if (overlapPolicy !== \"clamp\" || !occurrence) return { start, end };\n const anchorStart = occurrence.start.getTime();\n const anchorEnd = occurrence.end.getTime();\n let floor = -Infinity;\n let ceiling = Infinity;\n for (const other of getNeighbours()) {\n if (other.end <= anchorStart) floor = Math.max(floor, other.end);\n else if (other.start >= anchorEnd) ceiling = Math.min(ceiling, other.start);\n }\n if (floor === -Infinity && ceiling === Infinity) return { start, end };\n let from = start.getTime();\n let to = end.getTime();\n if (kind === \"resize-start\") {\n from = Math.min(Math.max(from, floor), to);\n } else if (kind === \"resize-end\") {\n to = Math.max(Math.min(to, ceiling), from);\n } else {\n // a move keeps its duration and parks against whichever edge it meets\n const duration = to - from;\n if (from < floor) {\n from = floor;\n to = from + duration;\n }\n if (to > ceiling) {\n to = ceiling;\n from = to - duration;\n }\n // window narrower than the bar itself: park at the earlier edge\n if (from < floor) {\n from = floor;\n to = from + duration;\n }\n }\n return { start: new Date(from), end: new Date(to) };\n };\n // Set by applyProposal when a \"reject\" policy refuses the current proposal;\n // read on pointerup so the commit is actually blocked, not merely styled.\n let overlapRejected = false;\n\n // Preserve the grab offset so the bar does not jump to the pointer\n let grabOffsetMin = 0;\n // Smooth cursor-following clone for a move: a real-looking bar that tracks\n // the pointer's x via transform (no per-frame React), lifted with a shadow.\n let overlay: HTMLDivElement | null = null;\n let grabOffsetPx = 0;\n let barTop = 0;\n let barWidth = 0;\n let barHeight = 0;\n\n const createMoveOverlay = () => {\n if (kind !== \"move\" || !occurrence || overlay || barWidth === 0) return;\n // consumer-rendered preview (renderDragPreview): the view mounts it from\n // drag state; positionOverlay adopts it lazily and only writes transforms\n if (customMoveOverlay) return;\n const color = occurrence.event.color ?? \"var(--color-primary)\";\n overlay = document.createElement(\"div\");\n overlay.setAttribute(\"data-slot\", \"gantt-drag-overlay\");\n // container: the bar + its label ride together; the label stays OUTSIDE\n // the bar (to the right), matching the resting look - no in-bar text\n overlay.className =\n // physical left-0 anchor: the clone is positioned by translate3d from\n // raw clientX, which is physical - a logical start-0 anchor would pin\n // it to the RIGHT edge in RTL and fling the clone off screen\n \"pointer-events-none fixed top-0 left-0 z-100 flex items-center gap-2 will-change-transform\";\n adoptRootTypography(overlay);\n overlay.style.height = `${barHeight}px`;\n const barEl = document.createElement(\"div\");\n barEl.className = \"shrink-0 rounded-sm shadow-lg\";\n barEl.style.width = `${barWidth}px`;\n barEl.style.height = \"100%\";\n barEl.style.background = `color-mix(in oklab, ${color} 22%, var(--color-background))`;\n barEl.style.outline = `1px solid color-mix(in oklab, ${color} 55%, transparent)`;\n overlay.appendChild(barEl);\n const label = document.createElement(\"span\");\n label.className = \"text-foreground truncate font-medium whitespace-nowrap\";\n label.textContent = occurrence.event.title;\n overlay.appendChild(label);\n document.body.appendChild(overlay);\n positionOverlay(lastPointer);\n };\n\n const positionOverlay = (e: PointerEvent) => {\n if (!overlay && customMoveOverlay && active && kind === \"move\") {\n overlay = document.querySelector<HTMLDivElement>(\n \"[data-slot=gantt-drag-overlay][data-custom]\",\n );\n if (overlay) overlay.style.visibility = \"visible\";\n }\n if (!overlay) return;\n // x follows the pointer freely (smooth); y stays on the bar's own row\n overlay.style.transform = `translate3d(${snapToPixel(e.clientX - grabOffsetPx)}px, ${snapToPixel(barTop)}px, 0)`;\n };\n\n // Resize status indicator: a smooth cursor-following edge line plus a live\n // range + duration chip. The dashed ghost still shows the SNAPPED landing;\n // this overlay is the continuous feedback between snap steps.\n let resizeOverlay: HTMLDivElement | null = null;\n let resizeLine: HTMLDivElement | null = null;\n let resizeRange: HTMLSpanElement | null = null;\n let resizeDot: HTMLSpanElement | null = null;\n let resizeDuration: HTMLSpanElement | null = null;\n\n const positionResizeOverlay = (e: PointerEvent) => {\n if (!resizeOverlay && customResizeOverlay && kind.startsWith(\"resize\")) {\n resizeOverlay = document.querySelector<HTMLDivElement>(\n \"[data-slot=gantt-resize-indicator][data-custom]\",\n );\n if (resizeOverlay) resizeOverlay.style.visibility = \"visible\";\n }\n if (!resizeOverlay || !surface) return;\n // x follows the pointer freely (clamped to the track); y stays on the bar\n const x = Math.min(Math.max(e.clientX, surface.rect.left), surface.rect.right);\n resizeOverlay.style.transform = `translate3d(${snapToPixel(x)}px, ${snapToPixel(barTop)}px, 0)`;\n };\n\n const createResizeOverlay = () => {\n if (!kind.startsWith(\"resize\") || !occurrence || resizeOverlay) return;\n const barEl = origin.closest<HTMLElement>(\"[data-slot=gantt-bar]\");\n const rect = (barEl ?? origin).getBoundingClientRect();\n barTop = rect.top;\n barHeight = rect.height;\n // consumer-rendered indicator: rect capture above still runs (the engine\n // positions the consumer's wrapper), only the default DOM is skipped\n if (customResizeOverlay) return;\n const color = occurrence.event.color ?? \"var(--color-primary)\";\n resizeOverlay = document.createElement(\"div\");\n resizeOverlay.setAttribute(\"data-slot\", \"gantt-resize-indicator\");\n resizeOverlay.className =\n // physical left-0 anchor, same reason as the move clone above\n \"pointer-events-none fixed top-0 left-0 z-100 will-change-transform\";\n adoptRootTypography(resizeOverlay);\n resizeOverlay.style.height = `${barHeight}px`;\n resizeLine = document.createElement(\"div\");\n resizeLine.className = \"h-full w-0.5 -translate-x-1/2 rounded-full\";\n resizeLine.style.background = color;\n resizeOverlay.appendChild(resizeLine);\n const chip = document.createElement(\"div\");\n chip.className =\n // physical left-0: centered with a physical translate on a physical anchor\n // no text size of its own: it inherits the root scale adopted above, so\n // the chip tracks a consumer rescale instead of pinning itself to 12px\n \"bg-foreground text-background absolute bottom-full left-0 mb-1.5 flex -translate-x-1/2 items-center gap-1.5 rounded-md px-2 py-1 font-medium whitespace-nowrap\";\n resizeRange = document.createElement(\"span\");\n chip.appendChild(resizeRange);\n resizeDot = document.createElement(\"span\");\n resizeDot.className = \"bg-background/40 size-1 shrink-0 rounded-full\";\n resizeDot.setAttribute(\"aria-hidden\", \"true\");\n chip.appendChild(resizeDot);\n resizeDuration = document.createElement(\"span\");\n chip.appendChild(resizeDuration);\n // The arrow. Every other bubble in the gantt has one pointing at what it\n // describes; this chip had none, so a resize looked like a different\n // component from the hover hint. Physical left-1/2 to match the chip's own\n // physical anchor, and out of flow so the chip's flex gap ignores it.\n const chipArrow = document.createElement(\"span\");\n chipArrow.setAttribute(\"aria-hidden\", \"true\");\n chipArrow.className =\n \"bg-foreground absolute -bottom-1 left-1/2 size-2.5 -translate-x-1/2 rotate-45 rounded-[2px]\";\n chip.appendChild(chipArrow);\n resizeOverlay.appendChild(chip);\n document.body.appendChild(resizeOverlay);\n // seed the chip with the CURRENT range so it never flashes empty;\n // zoned so the label names the same day the grid shows\n resizeRange.textContent = settings.i18n.functions.formatEventTime(\n toZoned(occurrence.start, settings.timeZone),\n toZoned(occurrence.end, settings.timeZone),\n occurrence.allDay ?? false,\n settings.locale,\n );\n const days = Math.round((occurrence.end.getTime() - occurrence.start.getTime()) / 86_400_000);\n if (days >= 1) {\n resizeDuration.textContent = settings.i18n.labels.durationDays(days);\n } else {\n resizeDot.style.display = \"none\";\n resizeDuration.style.display = \"none\";\n }\n positionResizeOverlay(startEvent);\n };\n\n // resize activates immediately, so its indicator mounts with the gesture\n if (active) createResizeOverlay();\n\n const activationDistance =\n kind === \"create\" ? activation.createDistancePx : activation.moveDistancePx;\n\n // Each gesture keeps its own cursor: a resize must stay ew-resize for the\n // whole drag (flipping to grabbing reads as a move), a move grabs.\n const gestureCursor = kind.startsWith(\"resize\") ? \"ew-resize\" : \"grabbing\";\n const setBodyDragging = (on: boolean, invalid = false) => {\n document.body.classList.toggle(\"gantt-dragging\", on);\n document.body.style.cursor = on ? (invalid ? \"not-allowed\" : gestureCursor) : \"\";\n document.body.style.userSelect = on ? \"none\" : \"\";\n if (!on) document.body.style.removeProperty(\"-webkit-user-select\");\n };\n\n const activate = () => {\n if (active) return;\n active = true;\n surface = collectSurface(viewRoot);\n // touch resize activates here (long-press) instead of at gesture start,\n // so its indicator mounts now; the guard inside makes this a no-op for\n // every other path\n createResizeOverlay();\n if (kind === \"move\" && occurrence && surface) {\n const pointerMin = surfaceMinutesAt(surface, startX);\n // TRUE start, never clamped to the range: a bar that begins before the\n // visible window (negative minutes) must keep its real grab offset, or\n // the first snapped proposal teleports its start to the range edge\n const occStartMin = (occurrence.start.getTime() - surface.rangeStart) / 60000;\n grabOffsetMin = pointerMin - occStartMin;\n const rect = origin.getBoundingClientRect();\n barTop = rect.top;\n barWidth = rect.width;\n barHeight = rect.height;\n grabOffsetPx = startX - rect.left;\n createMoveOverlay();\n }\n setBodyDragging(true);\n };\n\n const computeProposal = (\n e: PointerEvent,\n ): {\n start: Date;\n end: Date;\n allDay: boolean;\n resourceId?: string;\n } | null => {\n if (!surface) return null;\n const tl = surface;\n const rangeMinutes = (tl.rangeEnd - tl.rangeStart) / 60000;\n const minutesAt = (x: number) => surfaceMinutesAt(tl, x);\n // Day-grid scales snap to real zoned midnights, not 1440-minute\n // multiples from the range start - those drift by an hour across DST\n const snapMin = (minutes: number) => {\n if (tl.snapMin < 24 * 60) return snapMinutes(minutes, tl.snapMin);\n const ms = tl.rangeStart + minutes * 60000;\n const dayStart = zonedStartOfDay(new Date(ms), settings.timeZone);\n const dayEnd = zonedStartOfDay(\n addDays(toZoned(new Date(ms), settings.timeZone), 1),\n settings.timeZone,\n );\n const snapped = ms - dayStart.getTime() < dayEnd.getTime() - ms ? dayStart : dayEnd;\n return (snapped.getTime() - tl.rangeStart) / 60000;\n };\n const rowAt = (y: number) => {\n let best = tl.rows[0];\n for (const row of tl.rows) {\n if (y >= row.rect.top && y < row.rect.bottom) return row;\n if (\n best &&\n Math.abs(y - (row.rect.top + row.rect.height / 2)) <\n Math.abs(y - (best.rect.top + best.rect.height / 2))\n ) {\n best = row;\n }\n }\n return best;\n };\n const at = (minutes: number) => new Date(tl.rangeStart + minutes * 60000);\n\n if (kind === \"create\") {\n const anchorMin = snapMin(minutesAt(startX));\n const curMin = snapMin(minutesAt(e.clientX));\n const lo = Math.min(anchorMin, curMin);\n // a bare click still yields a usable slot: at least slotDuration long\n const hi = Math.max(anchorMin, curMin, lo + Math.max(tl.snapMin, settings.slotDuration));\n return {\n start: at(lo),\n end: at(hi),\n allDay: false,\n resourceId: rowAt(startY)?.resourceId,\n };\n }\n if (!occurrence) return null;\n const midnightAligned = (d: Date) =>\n zonedStartOfDay(d, settings.timeZone).getTime() === d.getTime();\n if (kind === \"move\") {\n // x-axis only: the bar slides along its OWN row, never across rows.\n // The proposal preserves the pointer DELTA - no clamping to the visible\n // range, or bars crossing the window edge would teleport to it.\n const start = at(snapMin(minutesAt(e.clientX) - grabOffsetMin));\n // Day-snapped scales preserve the CALENDAR span for day-aligned bars:\n // a 3-day bar dragged across a DST change stays midnight-to-midnight\n // (72h +/- 1h), never drifting to a 23:00 end. Sub-day events keep\n // their exact ms duration.\n let end: Date;\n if (\n tl.snapMin >= 24 * 60 &&\n (occurrence.allDay ||\n (midnightAligned(occurrence.start) && midnightAligned(occurrence.end)))\n ) {\n const daySpan = Math.max(\n differenceInCalendarDays(\n toZoned(occurrence.end, settings.timeZone),\n toZoned(occurrence.start, settings.timeZone),\n ),\n 1,\n );\n end = zonedStartOfDay(\n addDays(toZoned(start, settings.timeZone), daySpan),\n settings.timeZone,\n );\n } else {\n end = new Date(start.getTime() + (occurrence.end.getTime() - occurrence.start.getTime()));\n }\n const bounded = clampToNeighbours(start, end);\n return {\n start: bounded.start,\n end: bounded.end,\n allDay: occurrence.allDay,\n resourceId: occurrence.event.resourceId,\n };\n }\n const min = snapMin(minutesAt(e.clientX));\n if (kind === \"resize-start\") {\n const endMin = (occurrence.end.getTime() - tl.rangeStart) / 60000;\n // Minimum length = one snap unit; on day grids that unit is the LAST\n // zoned midnight before the end (raw 1440-minute arithmetic lands off\n // the midnight grid across DST changes).\n const maxStartMin =\n tl.snapMin >= 24 * 60\n ? (zonedStartOfDay(\n midnightAligned(occurrence.end)\n ? addDays(toZoned(occurrence.end, settings.timeZone), -1)\n : occurrence.end,\n settings.timeZone,\n ).getTime() -\n tl.rangeStart) /\n 60000\n : endMin - tl.snapMin;\n const clamped = Math.min(Math.max(min, 0), maxStartMin);\n const bounded = clampToNeighbours(at(clamped), occurrence.end);\n return {\n start: bounded.start,\n end: bounded.end,\n allDay: occurrence.allDay,\n resourceId: occurrence.event.resourceId,\n };\n }\n const startMin = (occurrence.start.getTime() - tl.rangeStart) / 60000;\n // Mirror of the resize-start bound: the FIRST zoned midnight after the\n // start on day grids, plain snap arithmetic otherwise.\n const minEndMin =\n tl.snapMin >= 24 * 60\n ? (zonedStartOfDay(\n addDays(toZoned(occurrence.start, settings.timeZone), 1),\n settings.timeZone,\n ).getTime() -\n tl.rangeStart) /\n 60000\n : startMin + tl.snapMin;\n const clamped = Math.max(Math.min(min, rangeMinutes), minEndMin);\n const bounded = clampToNeighbours(occurrence.start, at(clamped));\n return {\n start: bounded.start,\n end: bounded.end,\n allDay: occurrence.allDay,\n resourceId: occurrence.event.resourceId,\n };\n };\n\n const applyProposal = (e: PointerEvent) => {\n const proposal = computeProposal(e);\n if (!proposal) return;\n const key = `${proposal.start.getTime()}-${proposal.end.getTime()}-${proposal.allDay}-${proposal.resourceId ?? \"\"}`;\n if (key === lastProposalKey) return;\n lastProposalKey = key;\n\n if (kind === \"create\") {\n const draft = { ...proposal };\n if (settings.canSelectSlot && !settings.canSelectSlot(draft)) return;\n internals.setSlotDraft(draft);\n return;\n }\n const update: GanttProposedUpdate<TData> = {\n event: occurrence!.event,\n occurrence: occurrence!,\n ...proposal,\n source: kind === \"move\" ? \"drag\" : (kind as \"resize-start\" | \"resize-end\"),\n };\n // \"reject\" is the one veto the engine owns: it both styles the ghost AND\n // blocks the commit below. canDropEvent stays advisory, as documented.\n overlapRejected = overlapPolicy === \"reject\" && overlapsNeighbour(proposal.start, proposal.end);\n const valid =\n !overlapRejected && (settings.canDropEvent ? settings.canDropEvent(update) : true);\n // live status: the indicator chip always names the CURRENT proposed\n // range; the edge line flips to destructive on an invalid drop\n if (resizeRange && resizeDot && resizeDuration) {\n resizeRange.textContent = settings.i18n.functions.formatEventTime(\n toZoned(proposal.start, settings.timeZone),\n toZoned(proposal.end, settings.timeZone),\n proposal.allDay,\n settings.locale,\n );\n const days = Math.round((proposal.end.getTime() - proposal.start.getTime()) / 86_400_000);\n const showDays = days >= 1;\n resizeDot.style.display = showDays ? \"\" : \"none\";\n resizeDuration.style.display = showDays ? \"\" : \"none\";\n if (showDays) {\n resizeDuration.textContent = settings.i18n.labels.durationDays(days);\n }\n }\n if (resizeLine) {\n resizeLine.style.background = valid\n ? (occurrence!.event.color ?? \"var(--color-primary)\")\n : \"var(--color-destructive)\";\n }\n setBodyDragging(true, !valid);\n internals.setDrag({\n kind: kind === \"move\" ? \"move\" : (kind as \"resize-start\" | \"resize-end\"),\n occurrence: occurrence!,\n proposedStart: proposal.start,\n proposedEnd: proposal.end,\n proposedAllDay: proposal.allDay,\n proposedResourceId: proposal.resourceId,\n valid,\n });\n };\n\n // ----- edge auto-scroll: pan the timeline while dragging near its edge -----\n // The pointer is clamped to the visible track, so without this a bar can\n // never travel past the window. Holding the pointer inside the edge zone\n // scrolls the viewport (speed eased by proximity), refreshes the track rect\n // (the axis moved under the pointer) and re-derives the proposal from the\n // same pointer position. Programmatic scrolls never mark user intent, so\n // this can never trigger infinite-range growth mid-gesture.\n const AUTO_SCROLL_EDGE_PX = 24;\n const AUTO_SCROLL_MAX_SPEED = 14;\n let autoScrollRaf = 0;\n const timelineViewport = viewRoot?.querySelector<HTMLElement>(\n \"[data-slot=gantt-timeline-pane] [data-slot=scroll-area-viewport]\",\n );\n const autoScrollTick = () => {\n autoScrollRaf = 0;\n if (finished || !active || !surface || !timelineViewport) return;\n const paneRect = timelineViewport.getBoundingClientRect();\n const x = lastPointer.clientX;\n let speed = 0;\n if (x < paneRect.left + AUTO_SCROLL_EDGE_PX) {\n speed =\n -((paneRect.left + AUTO_SCROLL_EDGE_PX - x) / AUTO_SCROLL_EDGE_PX) * AUTO_SCROLL_MAX_SPEED;\n } else if (x > paneRect.right - AUTO_SCROLL_EDGE_PX) {\n speed =\n ((x - (paneRect.right - AUTO_SCROLL_EDGE_PX)) / AUTO_SCROLL_EDGE_PX) *\n AUTO_SCROLL_MAX_SPEED;\n }\n if (speed === 0) return;\n const before = timelineViewport.scrollLeft;\n timelineViewport.scrollLeft = before + speed;\n if (timelineViewport.scrollLeft === before) return; // parked on the end\n const axis = viewRoot?.querySelector<HTMLElement>(\"[data-gantt-axis]\");\n if (axis) surface.rect = axis.getBoundingClientRect();\n applyProposal(lastPointer);\n positionResizeOverlay(lastPointer);\n scheduleAutoScroll();\n };\n const scheduleAutoScroll = () => {\n if (!autoScrollRaf) autoScrollRaf = requestAnimationFrame(autoScrollTick);\n };\n\n // idempotent: pointerup, pointercancel, Escape, blur and the view-level\n // teardown can race; whichever lands first wins and the rest no-op\n let finished = false;\n const cleanup = () => {\n if (finished) return;\n finished = true;\n activeGestureCancels.delete(cancel);\n if (autoScrollRaf) cancelAnimationFrame(autoScrollRaf);\n try {\n origin.releasePointerCapture(pointerId);\n } catch {\n // capture already released (pointer gone or origin detached)\n }\n window.removeEventListener(\"pointermove\", onPointerMove);\n window.removeEventListener(\"pointerup\", onPointerUp);\n window.removeEventListener(\"pointercancel\", onCancel);\n window.removeEventListener(\"blur\", onWindowBlur);\n window.removeEventListener(\"keydown\", onKeyDown, true);\n if (touchTimer) clearTimeout(touchTimer);\n // consumer-rendered overlays are React-owned: they unmount when the drag\n // state clears, so the engine must never removeChild them itself\n if (!customMoveOverlay) overlay?.remove();\n overlay = null;\n if (!customResizeOverlay) resizeOverlay?.remove();\n resizeOverlay = null;\n setBodyDragging(false);\n };\n\n const cancel = () => {\n cleanup();\n if (active) {\n lastGestureEndedAt = performance.now();\n internals.setDrag(null);\n internals.setSlotDraft(null);\n }\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Escape\") {\n e.stopPropagation();\n cancel();\n }\n };\n\n // focus loss mid-gesture (alt-tab, OS dialogs) means the release may never\n // be delivered; treat it as a cancel so the gesture cannot get stuck\n const onWindowBlur = () => cancel();\n\n const onPointerMove = (e: PointerEvent) => {\n if (e.pointerId !== pointerId) return;\n lastPointer = e;\n if (!active) {\n const distance = Math.hypot(e.clientX - startX, e.clientY - startY);\n if (isTouch) {\n // Long-press pending: moving past tolerance means scroll, not drag\n if (distance > activation.touchTolerancePx) cancel();\n return;\n }\n if (distance < activationDistance) return;\n activate();\n }\n applyProposal(e);\n positionOverlay(e);\n positionResizeOverlay(e);\n scheduleAutoScroll();\n };\n\n const onPointerUp = (e: PointerEvent) => {\n if (e.pointerId !== pointerId) return;\n cleanup();\n if (!active) return;\n lastGestureEndedAt = performance.now();\n\n const state = instance.getState();\n if (kind === \"create\") {\n const draft = state.slotDraft;\n internals.setSlotDraft(null);\n if (draft) {\n api.select({\n slot: { start: draft.start, end: draft.end, allDay: draft.allDay },\n });\n settings.onSelectSlot?.(draft);\n }\n return;\n }\n const drag = state.drag;\n internals.setDrag(null);\n if (!drag || !occurrence) return;\n // the node refuses concurrency: revert instead of committing an overlap\n if (overlapRejected) return;\n const unchanged =\n drag.proposedStart.getTime() === occurrence.start.getTime() &&\n drag.proposedEnd.getTime() === occurrence.end.getTime() &&\n (drag.proposedResourceId === undefined ||\n drag.proposedResourceId === occurrence.event.resourceId);\n if (unchanged) return;\n // Commit through the one validation funnel; consumer reject = automatic\n // revert because the gantt never mutated during the gesture.\n const accepted = internals.applyProposedUpdate({\n event: occurrence.event,\n occurrence,\n start: drag.proposedStart,\n end: drag.proposedEnd,\n allDay: drag.proposedAllDay,\n resourceId: drag.proposedResourceId,\n source: kind === \"move\" ? \"drag\" : (kind as \"resize-start\" | \"resize-end\"),\n });\n if (accepted && announcer) {\n announcer.textContent = `${occurrence.event.title}, ${settings.i18n.functions.formatEventTime(\n toZoned(drag.proposedStart, settings.timeZone),\n toZoned(drag.proposedEnd, settings.timeZone),\n drag.proposedAllDay,\n settings.locale,\n )}`;\n }\n };\n\n const onCancel = (e: PointerEvent) => {\n if (e.pointerId !== pointerId) return;\n cancel();\n };\n\n window.addEventListener(\"pointermove\", onPointerMove);\n window.addEventListener(\"pointerup\", onPointerUp);\n window.addEventListener(\"pointercancel\", onCancel);\n window.addEventListener(\"blur\", onWindowBlur);\n window.addEventListener(\"keydown\", onKeyDown, true);\n activeGestureCancels.add(cancel);\n\n // Capture the pointer so a release OUTSIDE the OS window still delivers\n // pointerup here instead of leaving the gesture stuck. Captured events keep\n // bubbling to the window listeners above, and if the origin node is removed\n // mid-gesture the capture auto-releases - behavior then degrades to plain\n // window listeners, never worse than before. Guarded: the pointer can\n // already be gone by now (fast flicks, synthetic events).\n try {\n origin.setPointerCapture(pointerId);\n } catch {\n // capture is an enhancement, never a requirement\n }\n\n // Touch: long-press activation (movement past tolerance cancels above)\n if (isTouch && !active) {\n touchTimer = setTimeout(() => {\n activate();\n applyProposal(lastPointer);\n }, activation.touchDelayMs);\n }\n}\n\n/** Per-bar / per-row pointer gesture wiring. */\nfunction useGanttGestures<TData = unknown>() {\n const instance = useGantt<TData>();\n const viewConfig = useGanttViewConfig<TData>();\n // presence flags only: the engine skips its default overlay DOM and\n // positions the consumer-rendered node instead\n const customMoveOverlay = !!viewConfig.renderDragPreview;\n const customResizeOverlay = !!viewConfig.renderResizeIndicator;\n\n const canDrag = useCallback(\n (segment: GanttSegment<TData>) => {\n const { interactions } = instance.getState();\n const event = segment.occurrence.event;\n return interactions.drag && !event.readOnly && event.draggable !== false;\n },\n [instance],\n );\n\n const beginMove = useCallback(\n (e: React.PointerEvent, segment: GanttSegment<TData>) => {\n if (e.button !== 0 || !canDrag(segment)) return;\n beginGesture({\n instance,\n kind: \"move\",\n origin: e.currentTarget as HTMLElement,\n startEvent: e.nativeEvent,\n segment,\n customMoveOverlay,\n scheduleMode: viewConfig.scheduleMode,\n });\n },\n [instance, canDrag, customMoveOverlay, viewConfig.scheduleMode],\n );\n\n const canResize = useCallback(\n (segment: GanttSegment<TData>) => {\n const { interactions } = instance.getState();\n const event = segment.occurrence.event;\n return interactions.resize && !event.readOnly && event.resizable !== false;\n },\n [instance],\n );\n\n const beginResize = useCallback(\n (e: React.PointerEvent, segment: GanttSegment<TData>, edge: \"start\" | \"end\") => {\n if (e.button !== 0 || !canResize(segment)) return;\n e.stopPropagation();\n e.preventDefault();\n beginGesture({\n instance,\n kind: edge === \"start\" ? \"resize-start\" : \"resize-end\",\n origin: e.currentTarget as HTMLElement,\n startEvent: e.nativeEvent,\n segment,\n customResizeOverlay,\n scheduleMode: viewConfig.scheduleMode,\n });\n },\n [instance, canResize, customResizeOverlay, viewConfig.scheduleMode],\n );\n\n const beginCreate = useCallback(\n (e: React.PointerEvent) => {\n if (e.button !== 0) return;\n if (!instance.getState().interactions.selectSlot) return;\n beginGesture({\n instance,\n kind: \"create\",\n origin: e.currentTarget as HTMLElement,\n startEvent: e.nativeEvent,\n });\n },\n [instance],\n );\n\n return { beginMove, beginResize, beginCreate, canDrag, canResize };\n}\n\nexport {\n cancelActiveGanttGestures,\n GANTT_ACTIVATION,\n markGestureEnd,\n useGanttGestures,\n useGanttGestureTeardown,\n wasRecentDrag,\n};\n"],"mappings":";;;;;;;;;;;;AAeA,MAAM,mBAAmB;CACvB,gBAAgB;CAChB,kBAAkB;CAClB,cAAc;CACd,kBAAkB;AACpB;;;;;;AAmBA,SAAS,iBAAiB,IAAkB,GAAmB;CAC7D,MAAM,UAAU,KAAK,IAAI,KAAK,IAAI,GAAG,GAAG,KAAK,IAAI,GAAG,GAAG,KAAK,KAAK;CAEjE,QADiB,GAAG,QAAQ,GAAG,KAAK,QAAQ,UAAU,UAAU,GAAG,KAAK,QACrD,GAAG,KAAK,UAAW,GAAG,WAAW,GAAG,cAAc;AACvE;;AAGA,IAAI,qBAAqB;AACzB,SAAS,gBAAyB;CAChC,OAAO,YAAY,IAAI,IAAI,qBAAq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CAAC,QAAQ,CAGgC;EAAG;EAAS;CAAU;AACnE"}
@@ -0,0 +1,91 @@
1
+ import { GanttDateRange, GanttScale } from "./gantt-types.js";
2
+ import { Locale } from "date-fns";
3
+ //#region src/components/reui/gantt/gantt-i18n.d.ts
4
+ interface GanttI18nConfig {
5
+ labels: {
6
+ today: string;
7
+ previous: string;
8
+ next: string;
9
+ addEvent: string;
10
+ /** "Add task" hint at the foot of the tree. */
11
+ addTask: string;
12
+ allDay: string;
13
+ loading: string;
14
+ event: string;
15
+ events: (count: number) => string;
16
+ week: (weekNumber: number) => string;
17
+ resources: string;
18
+ goToDate: string;
19
+ /** Hover hint over empty row space, click-only create. */
20
+ scheduleHint: string;
21
+ /** Same hint where dragCreate is on and a drag paints a range. */
22
+ scheduleHintDrag: string;
23
+ reorder: string;
24
+ /** Scale switcher label ("Timeline scale"). */
25
+ selectView: string;
26
+ zoomIn: string;
27
+ zoomOut: string;
28
+ /** Aria-label of the tree/timeline splitter. */
29
+ resizePanel: string;
30
+ /** Aria-label of the off-screen bar chips. */
31
+ jumpToBar: (title: string) => string;
32
+ /** Read to screen readers as part of the bar label. */
33
+ progress: (percent: number) => string;
34
+ /** Live duration readout on the resize indicator. */
35
+ durationDays: (days: number) => string;
36
+ /** Appended to the bar aria-label when its segment is clipped by the range. */
37
+ continues: string;
38
+ scales: {
39
+ day: string;
40
+ week: string;
41
+ month: string;
42
+ quarter: string;
43
+ year: string;
44
+ };
45
+ };
46
+ /** date-fns format strings, applied with the gantt `locale`. */
47
+ formats: {
48
+ monthTitle: string;
49
+ dayTitle: string;
50
+ timeGutter: string;
51
+ eventTime: string;
52
+ };
53
+ functions: {
54
+ formatTitle: (scale: GanttScale, ctx: {
55
+ date: Date;
56
+ activeRange: GanttDateRange;
57
+ visibleRange: GanttDateRange;
58
+ locale?: Locale;
59
+ }) => string;
60
+ formatEventTime: (start: Date, end: Date, allDay: boolean, locale?: Locale) => string;
61
+ formatDayRange: (range: GanttDateRange, locale?: Locale) => string;
62
+ /** Composes the bar's screen-reader label from its localized parts. */
63
+ formatEventAriaLabel: (parts: {
64
+ title: string;
65
+ timeLabel: string;
66
+ rowTitle?: string;
67
+ progressLabel?: string;
68
+ continues: boolean;
69
+ }) => string;
70
+ };
71
+ }
72
+ declare const DEFAULT_GANTT_I18N: GanttI18nConfig;
73
+ /** Deep-partial override shape: replace individual keys, never sections. */
74
+ interface GanttI18nOverrides {
75
+ labels?: Partial<Omit<GanttI18nConfig["labels"], "scales">> & {
76
+ scales?: Partial<GanttI18nConfig["labels"]["scales"]>;
77
+ };
78
+ formats?: Partial<GanttI18nConfig["formats"]>;
79
+ functions?: Partial<GanttI18nConfig["functions"]>;
80
+ }
81
+ /**
82
+ * Shallow merge per nested object, matching the filters.tsx i18n contract:
83
+ * a partial override replaces individual keys, never whole sections. Default
84
+ * functions are re-bound to the MERGED labels/formats so a `formats` (or
85
+ * `labels.continues`) override reaches the default renderers; explicit
86
+ * `functions` overrides still win.
87
+ */
88
+ declare function mergeGanttI18n(overrides?: GanttI18nOverrides): GanttI18nConfig;
89
+ //#endregion
90
+ export { DEFAULT_GANTT_I18N, type GanttI18nConfig, type GanttI18nOverrides, mergeGanttI18n };
91
+ //# sourceMappingURL=gantt-i18n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gantt-i18n.d.ts","names":[],"sources":["../../../../src/components/reui/gantt/gantt-i18n.tsx"],"mappings":";;;UAMU;EACR;IACE;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA,SAAS;IACT,OAAO;IACP;IACA;;IAEA;;IAEA;IACA;;IAEA;IACA;IACA;;IAEA;;IAEA,YAAY;;IAEZ,WAAW;;IAEX,eAAe;;IAEf;IACA;MACE;MACA;MACA;MACA;MACA;;;;EAIJ;IACE;IACA;IACA;IACA;;EAEF;IACE,cACE,OAAO,YACP;MACE,MAAM;MACN,aAAa;MACb,cAAc;MACd,SAAS;;IAGb,kBAAkB,OAAO,MAAM,KAAK,MAAM,iBAAiB,SAAS;IACpE,iBAAiB,OAAO,gBAAgB,SAAS;;IAEjD,uBAAuB;MACrB;MACA;MACA;MACA;MACA;;;;cAkHA,oBAAoB;;UAUhB;EACR,SAAS,QAAQ,KAAK;IACpB,SAAS,QAAQ;;EAEnB,UAAU,QAAQ;EAClB,YAAY,QAAQ;;;;;;;;;iBAUb,eAAe,YAAY,qBAAqB"}
@@ -0,0 +1,131 @@
1
+ "use client";
2
+ import { format, isSameMonth, isSameYear, subMilliseconds } from "date-fns";
3
+ //#region src/components/reui/gantt/gantt-i18n.tsx
4
+ const DEFAULT_LABELS = {
5
+ today: "Today",
6
+ previous: "Previous",
7
+ next: "Next",
8
+ addEvent: "Add event",
9
+ addTask: "Add task",
10
+ allDay: "All day",
11
+ loading: "Loading events",
12
+ event: "event",
13
+ events: (count) => count === 1 ? "1 event" : `${count} events`,
14
+ week: (weekNumber) => `W${weekNumber}`,
15
+ resources: "Resources",
16
+ goToDate: "Go to date",
17
+ scheduleHint: "Click to add a schedule",
18
+ scheduleHintDrag: "Click or drag to add a schedule",
19
+ reorder: "Reorder",
20
+ selectView: "Select view",
21
+ zoomIn: "Zoom in",
22
+ zoomOut: "Zoom out",
23
+ resizePanel: "Resize panel",
24
+ jumpToBar: (title) => `Scroll to "${title}"`,
25
+ progress: (percent) => `${percent}% complete`,
26
+ durationDays: (days) => days === 1 ? "1 day" : `${days} days`,
27
+ continues: "continues",
28
+ scales: {
29
+ day: "Day",
30
+ week: "Week",
31
+ month: "Month",
32
+ quarter: "Quarter",
33
+ year: "Year"
34
+ }
35
+ };
36
+ const DEFAULT_FORMATS = {
37
+ monthTitle: "MMMM yyyy",
38
+ dayTitle: "EEEE, MMMM d, yyyy",
39
+ timeGutter: "h a",
40
+ eventTime: "h:mm a"
41
+ };
42
+ /**
43
+ * Default formatting functions BOUND to a config's labels/formats, so that
44
+ * `formats` overrides flow into the default renderers (a consumer overriding
45
+ * formats.eventTime without replacing formatEventTime still sees it applied).
46
+ */
47
+ function makeDefaultGanttFunctions(cfg) {
48
+ return {
49
+ formatTitle: (scale, { date, activeRange, locale }) => {
50
+ const opts = { locale };
51
+ if (scale === "day") return format(date, cfg.formats.dayTitle, opts);
52
+ if (scale === "month") return format(date, cfg.formats.monthTitle, opts);
53
+ if (scale === "quarter") return format(date, "QQQ yyyy", opts);
54
+ if (scale === "year") return format(date, "yyyy", opts);
55
+ const rangeEnd = subMilliseconds(activeRange.end, 1);
56
+ const start = activeRange.start;
57
+ if (isSameMonth(start, rangeEnd)) return `${format(start, "MMMM d", opts)} - ${format(rangeEnd, "d, yyyy", opts)}`;
58
+ if (isSameYear(start, rangeEnd)) return `${format(start, "MMM d", opts)} - ${format(rangeEnd, "MMM d, yyyy", opts)}`;
59
+ return `${format(start, "MMM d, yyyy", opts)} - ${format(rangeEnd, "MMM d, yyyy", opts)}`;
60
+ },
61
+ formatEventTime: (start, end, allDay, locale) => {
62
+ const opts = { locale };
63
+ if (allDay) {
64
+ const last = end.getTime() - 1 >= start.getTime() ? subMilliseconds(end, 1) : start;
65
+ if (format(start, "yyyy-MM-dd") === format(last, "yyyy-MM-dd")) return format(start, "MMM d, yyyy", opts);
66
+ if (isSameYear(start, last)) return `${format(start, "MMM d", opts)} - ${format(last, "MMM d, yyyy", opts)}`;
67
+ return `${format(start, "MMM d, yyyy", opts)} - ${format(last, "MMM d, yyyy", opts)}`;
68
+ }
69
+ const fmt = cfg.formats.eventTime;
70
+ if (end.getTime() - start.getTime() > 1440 * 60 * 1e3) return `${format(start, `MMM d, ${fmt}`, opts)} - ${format(end, `MMM d, ${fmt}`, opts)}`;
71
+ return `${format(start, fmt, opts)} - ${format(end, fmt, opts)}`;
72
+ },
73
+ formatDayRange: (range, locale) => {
74
+ const opts = { locale };
75
+ const rangeEnd = subMilliseconds(range.end, 1);
76
+ return `${format(range.start, "MMM d", opts)} - ${format(rangeEnd, "MMM d", opts)}`;
77
+ },
78
+ formatEventAriaLabel: ({ title, timeLabel, rowTitle, progressLabel, continues }) => [
79
+ title,
80
+ timeLabel,
81
+ rowTitle,
82
+ progressLabel,
83
+ continues ? cfg.labels.continues : void 0
84
+ ].filter(Boolean).join(", ")
85
+ };
86
+ }
87
+ const DEFAULT_GANTT_I18N = {
88
+ labels: DEFAULT_LABELS,
89
+ formats: DEFAULT_FORMATS,
90
+ functions: makeDefaultGanttFunctions({
91
+ labels: DEFAULT_LABELS,
92
+ formats: DEFAULT_FORMATS
93
+ })
94
+ };
95
+ /**
96
+ * Shallow merge per nested object, matching the filters.tsx i18n contract:
97
+ * a partial override replaces individual keys, never whole sections. Default
98
+ * functions are re-bound to the MERGED labels/formats so a `formats` (or
99
+ * `labels.continues`) override reaches the default renderers; explicit
100
+ * `functions` overrides still win.
101
+ */
102
+ function mergeGanttI18n(overrides) {
103
+ if (!overrides) return DEFAULT_GANTT_I18N;
104
+ const labels = {
105
+ ...DEFAULT_LABELS,
106
+ ...overrides.labels,
107
+ scales: {
108
+ ...DEFAULT_LABELS.scales,
109
+ ...overrides.labels?.scales
110
+ }
111
+ };
112
+ const formats = {
113
+ ...DEFAULT_FORMATS,
114
+ ...overrides.formats
115
+ };
116
+ return {
117
+ labels,
118
+ formats,
119
+ functions: {
120
+ ...makeDefaultGanttFunctions({
121
+ labels,
122
+ formats
123
+ }),
124
+ ...overrides.functions
125
+ }
126
+ };
127
+ }
128
+ //#endregion
129
+ export { DEFAULT_GANTT_I18N, mergeGanttI18n };
130
+
131
+ //# sourceMappingURL=gantt-i18n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gantt-i18n.js","names":[],"sources":["../../../../src/components/reui/gantt/gantt-i18n.tsx"],"sourcesContent":["\"use client\";\n\nimport { format, isSameMonth, isSameYear, type Locale, subMilliseconds } from \"date-fns\";\n\nimport type { GanttDateRange, GanttScale } from \"./gantt-types\";\n\ninterface GanttI18nConfig {\n labels: {\n today: string;\n previous: string;\n next: string;\n addEvent: string;\n /** \"Add task\" hint at the foot of the tree. */\n addTask: string;\n allDay: string;\n loading: string;\n event: string;\n events: (count: number) => string;\n week: (weekNumber: number) => string;\n resources: string;\n goToDate: string;\n /** Hover hint over empty row space, click-only create. */\n scheduleHint: string;\n /** Same hint where dragCreate is on and a drag paints a range. */\n scheduleHintDrag: string;\n reorder: string;\n /** Scale switcher label (\"Timeline scale\"). */\n selectView: string;\n zoomIn: string;\n zoomOut: string;\n /** Aria-label of the tree/timeline splitter. */\n resizePanel: string;\n /** Aria-label of the off-screen bar chips. */\n jumpToBar: (title: string) => string;\n /** Read to screen readers as part of the bar label. */\n progress: (percent: number) => string;\n /** Live duration readout on the resize indicator. */\n durationDays: (days: number) => string;\n /** Appended to the bar aria-label when its segment is clipped by the range. */\n continues: string;\n scales: {\n day: string;\n week: string;\n month: string;\n quarter: string;\n year: string;\n };\n };\n /** date-fns format strings, applied with the gantt `locale`. */\n formats: {\n monthTitle: string;\n dayTitle: string;\n timeGutter: string;\n eventTime: string;\n };\n functions: {\n formatTitle: (\n scale: GanttScale,\n ctx: {\n date: Date;\n activeRange: GanttDateRange;\n visibleRange: GanttDateRange;\n locale?: Locale;\n },\n ) => string;\n formatEventTime: (start: Date, end: Date, allDay: boolean, locale?: Locale) => string;\n formatDayRange: (range: GanttDateRange, locale?: Locale) => string;\n /** Composes the bar's screen-reader label from its localized parts. */\n formatEventAriaLabel: (parts: {\n title: string;\n timeLabel: string;\n rowTitle?: string;\n progressLabel?: string;\n continues: boolean;\n }) => string;\n };\n}\n\nconst DEFAULT_LABELS: GanttI18nConfig[\"labels\"] = {\n today: \"Today\",\n previous: \"Previous\",\n next: \"Next\",\n addEvent: \"Add event\",\n addTask: \"Add task\",\n allDay: \"All day\",\n loading: \"Loading events\",\n event: \"event\",\n events: (count) => (count === 1 ? \"1 event\" : `${count} events`),\n week: (weekNumber) => `W${weekNumber}`,\n resources: \"Resources\",\n goToDate: \"Go to date\",\n scheduleHint: \"Click to add a schedule\",\n scheduleHintDrag: \"Click or drag to add a schedule\",\n reorder: \"Reorder\",\n selectView: \"Select view\",\n zoomIn: \"Zoom in\",\n zoomOut: \"Zoom out\",\n resizePanel: \"Resize panel\",\n jumpToBar: (title) => `Scroll to \"${title}\"`,\n progress: (percent) => `${percent}% complete`,\n durationDays: (days) => (days === 1 ? \"1 day\" : `${days} days`),\n continues: \"continues\",\n scales: {\n day: \"Day\",\n week: \"Week\",\n month: \"Month\",\n quarter: \"Quarter\",\n year: \"Year\",\n },\n};\n\nconst DEFAULT_FORMATS: GanttI18nConfig[\"formats\"] = {\n monthTitle: \"MMMM yyyy\",\n dayTitle: \"EEEE, MMMM d, yyyy\",\n timeGutter: \"h a\",\n eventTime: \"h:mm a\",\n};\n\n/**\n * Default formatting functions BOUND to a config's labels/formats, so that\n * `formats` overrides flow into the default renderers (a consumer overriding\n * formats.eventTime without replacing formatEventTime still sees it applied).\n */\nfunction makeDefaultGanttFunctions(\n cfg: Pick<GanttI18nConfig, \"labels\" | \"formats\">,\n): GanttI18nConfig[\"functions\"] {\n return {\n formatTitle: (scale, { date, activeRange, locale }) => {\n const opts = { locale };\n if (scale === \"day\") {\n return format(date, cfg.formats.dayTitle, opts);\n }\n if (scale === \"month\") {\n return format(date, cfg.formats.monthTitle, opts);\n }\n if (scale === \"quarter\") {\n return format(date, \"QQQ yyyy\", opts);\n }\n if (scale === \"year\") {\n return format(date, \"yyyy\", opts);\n }\n // week: smart range label, last day is activeRange.end - 1ms.\n // subMilliseconds keeps the zoned date type (a plain new Date(ms)\n // would flip the label to the machine zone near midnight)\n const rangeEnd = subMilliseconds(activeRange.end, 1);\n const start = activeRange.start;\n if (isSameMonth(start, rangeEnd)) {\n return `${format(start, \"MMMM d\", opts)} - ${format(rangeEnd, \"d, yyyy\", opts)}`;\n }\n if (isSameYear(start, rangeEnd)) {\n return `${format(start, \"MMM d\", opts)} - ${format(rangeEnd, \"MMM d, yyyy\", opts)}`;\n }\n return `${format(start, \"MMM d, yyyy\", opts)} - ${format(rangeEnd, \"MMM d, yyyy\", opts)}`;\n },\n formatEventTime: (start, end, allDay, locale) => {\n const opts = { locale };\n if (allDay) {\n // a gantt bar is a DATE RANGE: show it, never a bare \"All day\".\n // Ends are exclusive midnights, so the last shown day is end - 1ms;\n // subMilliseconds keeps the caller's zoned date type intact.\n const last = end.getTime() - 1 >= start.getTime() ? subMilliseconds(end, 1) : start;\n const sameDay = format(start, \"yyyy-MM-dd\") === format(last, \"yyyy-MM-dd\");\n if (sameDay) return format(start, \"MMM d, yyyy\", opts);\n if (isSameYear(start, last)) {\n return `${format(start, \"MMM d\", opts)} - ${format(last, \"MMM d, yyyy\", opts)}`;\n }\n return `${format(start, \"MMM d, yyyy\", opts)} - ${format(last, \"MMM d, yyyy\", opts)}`;\n }\n const fmt = cfg.formats.eventTime;\n // Multi-day timed events carry the date on both sides\n if (end.getTime() - start.getTime() > 24 * 60 * 60 * 1000) {\n return `${format(start, `MMM d, ${fmt}`, opts)} - ${format(end, `MMM d, ${fmt}`, opts)}`;\n }\n return `${format(start, fmt, opts)} - ${format(end, fmt, opts)}`;\n },\n formatDayRange: (range, locale) => {\n const opts = { locale };\n const rangeEnd = subMilliseconds(range.end, 1);\n return `${format(range.start, \"MMM d\", opts)} - ${format(rangeEnd, \"MMM d\", opts)}`;\n },\n formatEventAriaLabel: ({ title, timeLabel, rowTitle, progressLabel, continues }) =>\n [title, timeLabel, rowTitle, progressLabel, continues ? cfg.labels.continues : undefined]\n .filter(Boolean)\n .join(\", \"),\n };\n}\n\nconst DEFAULT_GANTT_I18N: GanttI18nConfig = {\n labels: DEFAULT_LABELS,\n formats: DEFAULT_FORMATS,\n functions: makeDefaultGanttFunctions({\n labels: DEFAULT_LABELS,\n formats: DEFAULT_FORMATS,\n }),\n};\n\n/** Deep-partial override shape: replace individual keys, never sections. */\ninterface GanttI18nOverrides {\n labels?: Partial<Omit<GanttI18nConfig[\"labels\"], \"scales\">> & {\n scales?: Partial<GanttI18nConfig[\"labels\"][\"scales\"]>;\n };\n formats?: Partial<GanttI18nConfig[\"formats\"]>;\n functions?: Partial<GanttI18nConfig[\"functions\"]>;\n}\n\n/**\n * Shallow merge per nested object, matching the filters.tsx i18n contract:\n * a partial override replaces individual keys, never whole sections. Default\n * functions are re-bound to the MERGED labels/formats so a `formats` (or\n * `labels.continues`) override reaches the default renderers; explicit\n * `functions` overrides still win.\n */\nfunction mergeGanttI18n(overrides?: GanttI18nOverrides): GanttI18nConfig {\n if (!overrides) return DEFAULT_GANTT_I18N;\n const labels = {\n ...DEFAULT_LABELS,\n ...overrides.labels,\n // nested section: replace individual scale names, never the whole set\n scales: {\n ...DEFAULT_LABELS.scales,\n ...overrides.labels?.scales,\n },\n };\n const formats = { ...DEFAULT_FORMATS, ...overrides.formats };\n return {\n labels,\n formats,\n functions: {\n ...makeDefaultGanttFunctions({ labels, formats }),\n ...overrides.functions,\n },\n };\n}\n\nexport type { GanttI18nConfig, GanttI18nOverrides };\nexport { DEFAULT_GANTT_I18N, mergeGanttI18n };\n"],"mappings":";;;AA8EA,MAAM,iBAA4C;CAChD,OAAO;CACP,UAAU;CACV,MAAM;CACN,UAAU;CACV,SAAS;CACT,QAAQ;CACR,SAAS;CACT,OAAO;CACP,SAAS,UAAW,UAAU,IAAI,YAAY,GAAG,MAAM;CACvD,OAAO,eAAe,IAAI;CAC1B,WAAW;CACX,UAAU;CACV,cAAc;CACd,kBAAkB;CAClB,SAAS;CACT,YAAY;CACZ,QAAQ;CACR,SAAS;CACT,aAAa;CACb,YAAY,UAAU,cAAc,MAAM;CAC1C,WAAW,YAAY,GAAG,QAAQ;CAClC,eAAe,SAAU,SAAS,IAAI,UAAU,GAAG,KAAK;CACxD,WAAW;CACX,QAAQ;EACN,KAAK;EACL,MAAM;EACN,OAAO;EACP,SAAS;EACT,MAAM;CACR;AACF;AAEA,MAAM,kBAA8C;CAClD,YAAY;CACZ,UAAU;CACV,YAAY;CACZ,WAAW;AACb;;;;;;AAOA,SAAS,0BACP,KAC8B;CAC9B,OAAO;EACL,cAAc,OAAO,EAAE,MAAM,aAAa,aAAa;GACrD,MAAM,OAAO,EAA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,IAAI,EAAE,KAAK,OAAO,KAAK,UAAU,OAAO,IAAI;GAEvF,OAAO,GAAG,OAAO,OAAO,KAAK,IAAI,EAAE,KAAK,OAAO,KAAK,KAAK,IAAI;EAC/D;EACA,iBAAiB,OAAO,WAAW;GACjC,MAAM,OAAO,EAAE,OAAO;GACtB,MAAM,WAAW,gBAAgB,MAAM,KAAK,CAAC;GAC7C,OAAO,GAAG,OAAO,MAAM,OAAO,SAAS,IAAI,EAAE,KAAK,OAAO,UAAU,SAAS,IAAI;EAClF;EACA,uBAAuB,EAAE,OAAO,WAAW,UAAU,eAAe,gBAClE;GAAC;GAAO;GAAW;GAAU;GAAe,YAAY,IAAI,OAAO,YAAY,KAAA;EAAS,CAAC,CACtF,OAAO,OAAO,CAAC,CACf,KAAK,IAAI;CAChB;AACF;AAEA,MAAM,qBAAsC;CAC1C,QAAQ;CACR,SAAS;CACT,WAAW,0BAA0B;EACnC,QAAQ;EACR,SAAS;CACX,CAAC;AACH;;;;;;;;AAkBA,SAAS,eAAe,WAAiD;CACvE,IAAI,CAAC,WAAW,OAAO;CACvB,MAAM,SAAS;EACb,GAAG;EACH,GAAG,UAAU;EAEb,QAAQ;GACN,GAAG,eAAe;GAClB,GAAG,UAAU,QAAQ;EACvB;CACF;CACA,MAAM,UAAU;EAAE,GAAG;EAAiB,GAAG,UAAU;CAAQ;CAC3D,OAAO;EACL;EACA;EACA,WAAW;GACT,GAAG,0BAA0B;IAAE;IAAQ;GAAQ,CAAC;GAChD,GAAG,UAAU;EACf;CACF;AACF"}
@@ -0,0 +1,123 @@
1
+ import { GanttDateRange, GanttEvent, GanttOccurrence, GanttOffDaysConfig, GanttResource, GanttScale, GanttSegment } from "./gantt-types.js";
2
+ import { TZDate } from "@date-fns/tz";
3
+ //#region src/components/reui/gantt/gantt-lib.d.ts
4
+ type WeekStartsOn = 0 | 1 | 2 | 3 | 4 | 5 | 6;
5
+ /**
6
+ * Packing-effective minimum in minutes so tiny events do not stack invisibly.
7
+ * It is a packing FOOTPRINT, not a render size: two schedules less than this
8
+ * apart are treated as concurrent and split into separate lanes even though
9
+ * their real ranges do not touch.
10
+ */
11
+ declare const MIN_PACK_SLOT = 30;
12
+ /** The instant re-expressed in the display time zone (TZDate extends Date). */
13
+ declare function toZoned(date: Date, timeZone: string): TZDate;
14
+ /** Zoned midnight of the day containing the instant. */
15
+ declare function zonedStartOfDay(date: Date, timeZone: string): TZDate;
16
+ /** Stable per-day key in the display time zone. */
17
+ declare function getDayKey(date: Date, timeZone: string): string;
18
+ /** Day length in minutes; 1380/1500 on DST transition days - never assume 1440. */
19
+ declare function getDayTotalMinutes(dayStart: Date, timeZone: string): number;
20
+ declare function snapMinutes(minutes: number, snap: number): number;
21
+ interface ViewRangeOptions {
22
+ timeZone: string;
23
+ weekStartsOn: WeekStartsOn;
24
+ }
25
+ interface ViewDateRanges {
26
+ visibleRange: GanttDateRange;
27
+ activeRange: GanttDateRange;
28
+ }
29
+ /** Axis range for the anchor date at the given scale. */
30
+ declare function getGanttDateRange(scale: GanttScale, date: Date, opts: ViewRangeOptions): ViewDateRanges;
31
+ /** The anchor date stepped one period forward or backward for the scale. */
32
+ declare function stepGanttDate(scale: GanttScale, date: Date, direction: 1 | -1, opts: Pick<ViewRangeOptions, "timeZone">): Date;
33
+ declare function rangesIntersect(a: GanttDateRange, b: GanttDateRange): boolean;
34
+ declare function eventsOverlap(a: {
35
+ start: Date;
36
+ end: Date;
37
+ }, b: {
38
+ start: Date;
39
+ end: Date;
40
+ }): boolean;
41
+ declare function spansMultipleDays(occ: {
42
+ start: Date;
43
+ end: Date;
44
+ }): boolean;
45
+ /**
46
+ * Identity of a schedule ACROSS time edits. `occurrence.key` embeds the start
47
+ * instant, so it changes the moment a schedule is moved or start-resized -
48
+ * useless as lane memory. This key survives the edit: the event id plus, for a
49
+ * recurring series, the occurrence's position in it.
50
+ */
51
+ declare function getLaneKey(occurrence: {
52
+ eventId: string;
53
+ recurrenceIndex?: number;
54
+ }): string;
55
+ /**
56
+ * What one schedule held on the previous layout pass. The TIMES are what make
57
+ * this more than a lane number: they are how the packer tells the schedule the
58
+ * user just edited apart from the ones that merely sat still.
59
+ */
60
+ interface GanttLaneMemo {
61
+ lane: number;
62
+ startMs: number;
63
+ endMs: number;
64
+ }
65
+ interface PackOptions {
66
+ /**
67
+ * Where each schedule sat on the previous pass, by getLaneKey.
68
+ *
69
+ * A schedule whose times are UNCHANGED keeps its lane if that lane is still
70
+ * free, so editing one schedule never re-indexes the ones around it. A
71
+ * schedule whose times CHANGED - the one the user just dragged or resized -
72
+ * deliberately forfeits its pin and re-seeks the lowest free lane. That is
73
+ * what makes the arrangement live rather than frozen: a schedule dragged
74
+ * onto its neighbours stacks DOWN into the first free lane, and one dragged
75
+ * clear of them comes back UP inline. Only the edited schedule moves.
76
+ */
77
+ preferredLanes?: Map<string, GanttLaneMemo>;
78
+ /** "single" collapses the row to one track; see GanttScheduleMode. */
79
+ mode?: "single" | "multiple";
80
+ }
81
+ /**
82
+ * Overlap packing for one row's timed segments.
83
+ * Mutates column/columnCount/columnSpan on the segments, in place.
84
+ * z resolution happens at render: event.zIndex verbatim, else 10 + column.
85
+ */
86
+ declare function packTimedSegments<TData>(segments: GanttSegment<TData>[], options?: PackOptions): void;
87
+ declare function defaultEventOrder(a: GanttOccurrence, b: GanttOccurrence): number;
88
+ interface BuildIndexOptions<TData = unknown> {
89
+ timeZone: string;
90
+ /** Escape hatch for exotic recurrence: return the expanded occurrences. */
91
+ getOccurrences?: (event: GanttEvent<TData>, range: GanttDateRange, ctx: {
92
+ timeZone: string;
93
+ }) => Array<{
94
+ start: Date;
95
+ end: Date;
96
+ }> | null | undefined;
97
+ eventOrder?: (a: GanttOccurrence<TData>, b: GanttOccurrence<TData>) => number;
98
+ }
99
+ interface GanttIndex<TData = unknown> {
100
+ occurrences: GanttOccurrence<TData>[];
101
+ }
102
+ declare function buildEventIndex<TData>(events: GanttEvent<TData>[], visibleRange: GanttDateRange, opts: BuildIndexOptions<TData>): GanttIndex<TData>;
103
+ /** Cache key for index memoization; cheap string compare. */
104
+ declare function getRangeKey(range: GanttDateRange): string;
105
+ /** Depth-first flatten of the resource tree (parents included). */
106
+ declare function flattenResources(resources: GanttResource[], depth?: number): Array<{
107
+ resource: GanttResource;
108
+ depth: number;
109
+ }>;
110
+ /** Depth-first lookup of one node in the tree. */
111
+ declare function findResource(resources: GanttResource[], id: string): GanttResource | null;
112
+ /**
113
+ * Pure tree move: removes `resourceId` from wherever it sits and reinserts it
114
+ * under `parentId` (null = root) at `index`. Returns a new tree; the original
115
+ * is untouched. Returns null for impossible moves (unknown ids, or dropping a
116
+ * node into its own subtree).
117
+ */
118
+ declare function reorderResources(resources: GanttResource[], resourceId: string, parentId: string | null, index: number): GanttResource[] | null;
119
+ /** Resolves whether a day is an off day (non-working) in the display zone. */
120
+ declare function resolveOffDay(day: Date, timeZone: string, config: boolean | GanttOffDaysConfig | undefined): boolean;
121
+ //#endregion
122
+ export { type BuildIndexOptions, type GanttIndex, type GanttLaneMemo, MIN_PACK_SLOT, type PackOptions, type ViewDateRanges, type ViewRangeOptions, type WeekStartsOn, buildEventIndex, defaultEventOrder, eventsOverlap, findResource, flattenResources, getDayKey, getDayTotalMinutes, getGanttDateRange, getLaneKey, getRangeKey, packTimedSegments, rangesIntersect, reorderResources, resolveOffDay, snapMinutes, spansMultipleDays, stepGanttDate, toZoned, zonedStartOfDay };
123
+ //# sourceMappingURL=gantt-lib.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gantt-lib.d.ts","names":[],"sources":["../../../../src/components/reui/gantt/gantt-lib.tsx"],"mappings":";;;KA4BK;;;;;;;cAQC;;iBAGG,QAAQ,MAAM,MAAM,mBAAmB;;iBAKvC,gBAAgB,MAAM,MAAM,mBAAmB;;iBAK/C,UAAU,MAAM,MAAM;;iBAKtB,mBAAmB,UAAU,MAAM;iBAKnC,YAAY,iBAAiB;UAI5B;EACR;EACA,cAAc;;UAGN;EACR,cAAc;EACd,aAAa;;;iBAI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