@restio/ui 0.0.8-SNAPSHOT → 0.0.9-SNAPSHOT

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 (677) hide show
  1. package/dist/components/anchored-overlay/anchored-overlay-types.d.ts +1 -1
  2. package/dist/components/anchored-overlay/anchored-overlay-types.js +2 -0
  3. package/dist/components/anchored-overlay/anchored-overlay-types.js.map +1 -0
  4. package/dist/components/anchored-overlay/anchored-overlay.d.ts +2 -2
  5. package/dist/components/anchored-overlay/anchored-overlay.js +67 -0
  6. package/dist/components/anchored-overlay/anchored-overlay.js.map +1 -0
  7. package/dist/components/banner/banner-types.d.ts +1 -1
  8. package/dist/components/banner/banner-types.js +2 -0
  9. package/dist/components/banner/banner-types.js.map +1 -0
  10. package/dist/components/banner/banner.d.ts +2 -2
  11. package/dist/components/banner/banner.js +29 -0
  12. package/dist/components/banner/banner.js.map +1 -0
  13. package/dist/components/button/button-types.d.ts +1 -1
  14. package/dist/components/button/button-types.js +2 -0
  15. package/dist/components/button/button-types.js.map +1 -0
  16. package/dist/components/button/button.d.ts +2 -2
  17. package/dist/components/button/button.js +20 -0
  18. package/dist/components/button/button.js.map +1 -0
  19. package/dist/components/button-group/button-group-types.js +2 -0
  20. package/dist/components/button-group/button-group-types.js.map +1 -0
  21. package/dist/components/button-group/button-group.d.ts +2 -2
  22. package/dist/components/button-group/button-group.js +16 -0
  23. package/dist/components/button-group/button-group.js.map +1 -0
  24. package/dist/components/checkbox/checkbox-types.d.ts +1 -1
  25. package/dist/components/checkbox/checkbox-types.js +2 -0
  26. package/dist/components/checkbox/checkbox-types.js.map +1 -0
  27. package/dist/components/checkbox/checkbox.d.ts +2 -2
  28. package/dist/components/checkbox/checkbox.js +19 -0
  29. package/dist/components/checkbox/checkbox.js.map +1 -0
  30. package/dist/components/code-block/code-block.d.ts +1 -1
  31. package/dist/components/code-block/code-block.js +9 -0
  32. package/dist/components/code-block/code-block.js.map +1 -0
  33. package/dist/components/file-upload/file-upload-types.d.ts +1 -1
  34. package/dist/components/file-upload/file-upload-types.js +2 -0
  35. package/dist/components/file-upload/file-upload-types.js.map +1 -0
  36. package/dist/components/file-upload/file-upload-utils.js +10 -0
  37. package/dist/components/file-upload/file-upload-utils.js.map +1 -0
  38. package/dist/components/file-upload/file-upload.d.ts +2 -2
  39. package/dist/components/file-upload/file-upload.js +106 -0
  40. package/dist/components/file-upload/file-upload.js.map +1 -0
  41. package/dist/components/graph/graph-types.js +2 -0
  42. package/dist/components/graph/graph-types.js.map +1 -0
  43. package/dist/components/graph/graph.d.ts +1 -1
  44. package/dist/components/graph/graph.js +21 -0
  45. package/dist/components/graph/graph.js.map +1 -0
  46. package/dist/components/input/date/date-calendar.d.ts +2 -2
  47. package/dist/components/input/date/date-calendar.js +114 -0
  48. package/dist/components/input/date/date-calendar.js.map +1 -0
  49. package/dist/components/input/date/date-input-field.d.ts +2 -2
  50. package/dist/components/input/date/date-input-field.js +61 -0
  51. package/dist/components/input/date/date-input-field.js.map +1 -0
  52. package/dist/components/input/date/date-picker.d.ts +2 -2
  53. package/dist/components/input/date/date-picker.js +35 -0
  54. package/dist/components/input/date/date-picker.js.map +1 -0
  55. package/dist/components/input/date/date-range-input-field.d.ts +2 -2
  56. package/dist/components/input/date/date-range-input-field.js +90 -0
  57. package/dist/components/input/date/date-range-input-field.js.map +1 -0
  58. package/dist/components/input/date/date-range-picker.d.ts +2 -2
  59. package/dist/components/input/date/date-range-picker.js +74 -0
  60. package/dist/components/input/date/date-range-picker.js.map +1 -0
  61. package/dist/components/input/date/date-shortcuts.d.ts +2 -2
  62. package/dist/components/input/date/date-shortcuts.js +47 -0
  63. package/dist/components/input/date/date-shortcuts.js.map +1 -0
  64. package/dist/components/input/date/date-types.d.ts +1 -1
  65. package/dist/components/input/date/date-types.js +2 -0
  66. package/dist/components/input/date/date-types.js.map +1 -0
  67. package/dist/components/input/date/date-utils.d.ts +1 -1
  68. package/dist/components/input/date/date-utils.js +203 -0
  69. package/dist/components/input/date/date-utils.js.map +1 -0
  70. package/dist/components/input/input-types.js +2 -0
  71. package/dist/components/input/input-types.js.map +1 -0
  72. package/dist/components/input/input.d.ts +2 -2
  73. package/dist/components/input/input.js +14 -0
  74. package/dist/components/input/input.js.map +1 -0
  75. package/dist/components/input/number/input-number-types.d.ts +1 -1
  76. package/dist/components/input/number/input-number-types.js +2 -0
  77. package/dist/components/input/number/input-number-types.js.map +1 -0
  78. package/dist/components/input/number/input-number.d.ts +2 -2
  79. package/dist/components/input/number/input-number.js +11 -0
  80. package/dist/components/input/number/input-number.js.map +1 -0
  81. package/dist/components/input/text/input-text-types.d.ts +1 -1
  82. package/dist/components/input/text/input-text-types.js +2 -0
  83. package/dist/components/input/text/input-text-types.js.map +1 -0
  84. package/dist/components/input/text/input-text.d.ts +2 -2
  85. package/dist/components/input/text/input-text.js +8 -0
  86. package/dist/components/input/text/input-text.js.map +1 -0
  87. package/dist/components/kbd/kbd-types.js +2 -0
  88. package/dist/components/kbd/kbd-types.js.map +1 -0
  89. package/dist/components/kbd/kbd.d.ts +2 -2
  90. package/dist/components/kbd/kbd.js +12 -0
  91. package/dist/components/kbd/kbd.js.map +1 -0
  92. package/dist/components/kbd-group/kbd-group-types.js +2 -0
  93. package/dist/components/kbd-group/kbd-group-types.js.map +1 -0
  94. package/dist/components/kbd-group/kbd-group.d.ts +2 -2
  95. package/dist/components/kbd-group/kbd-group.js +15 -0
  96. package/dist/components/kbd-group/kbd-group.js.map +1 -0
  97. package/dist/components/list/list-types.d.ts +1 -1
  98. package/dist/components/list/list-types.js +2 -0
  99. package/dist/components/list/list-types.js.map +1 -0
  100. package/dist/components/list/list-utils.d.ts +4 -4
  101. package/dist/components/list/list-utils.js +73 -0
  102. package/dist/components/list/list-utils.js.map +1 -0
  103. package/dist/components/list/list.d.ts +1 -1
  104. package/dist/components/list/list.js +68 -0
  105. package/dist/components/list/list.js.map +1 -0
  106. package/dist/components/menu/anchored-navigation-menu.d.ts +3 -3
  107. package/dist/components/menu/anchored-navigation-menu.js +48 -0
  108. package/dist/components/menu/anchored-navigation-menu.js.map +1 -0
  109. package/dist/components/menu/menu-assets.d.ts +1 -1
  110. package/dist/components/menu/menu-assets.js +35 -0
  111. package/dist/components/menu/menu-assets.js.map +1 -0
  112. package/dist/components/menu/menu-types.d.ts +2 -2
  113. package/dist/components/menu/menu-types.js +2 -0
  114. package/dist/components/menu/menu-types.js.map +1 -0
  115. package/dist/components/menu/menu.d.ts +2 -2
  116. package/dist/components/menu/menu.js +86 -0
  117. package/dist/components/menu/menu.js.map +1 -0
  118. package/dist/components/otp/otp-types.js +2 -0
  119. package/dist/components/otp/otp-types.js.map +1 -0
  120. package/dist/components/otp/otp-utils.js +22 -0
  121. package/dist/components/otp/otp-utils.js.map +1 -0
  122. package/dist/components/otp/otp.d.ts +3 -2
  123. package/dist/components/otp/otp.js +85 -0
  124. package/dist/components/otp/otp.js.map +1 -0
  125. package/dist/components/select/select-types.d.ts +1 -1
  126. package/dist/components/select/select-types.js +2 -0
  127. package/dist/components/select/select-types.js.map +1 -0
  128. package/dist/components/select/select.d.ts +2 -2
  129. package/dist/components/select/select.js +52 -0
  130. package/dist/components/select/select.js.map +1 -0
  131. package/dist/components/tag/tag-types.d.ts +1 -1
  132. package/dist/components/tag/tag-types.js +2 -0
  133. package/dist/components/tag/tag-types.js.map +1 -0
  134. package/dist/components/tag/tag.d.ts +2 -2
  135. package/dist/components/tag/tag.js +16 -0
  136. package/dist/components/tag/tag.js.map +1 -0
  137. package/dist/components/textarea/textarea-types.d.ts +2 -2
  138. package/dist/components/textarea/textarea-types.js +2 -0
  139. package/dist/components/textarea/textarea-types.js.map +1 -0
  140. package/dist/components/textarea/textarea.d.ts +2 -2
  141. package/dist/components/textarea/textarea.js +19 -0
  142. package/dist/components/textarea/textarea.js.map +1 -0
  143. package/dist/components/toast-group/toast-group-types.d.ts +1 -1
  144. package/dist/components/toast-group/toast-group-types.js +2 -0
  145. package/dist/components/toast-group/toast-group-types.js.map +1 -0
  146. package/dist/components/toast-group/toast-group.d.ts +2 -2
  147. package/dist/components/toast-group/toast-group.js +25 -0
  148. package/dist/components/toast-group/toast-group.js.map +1 -0
  149. package/dist/components/typography/typography-types.d.ts +1 -1
  150. package/dist/components/typography/typography-types.js +11 -0
  151. package/dist/components/typography/typography-types.js.map +1 -0
  152. package/dist/components/typography/typography.d.ts +2 -2
  153. package/dist/components/typography/typography.js +17 -0
  154. package/dist/components/typography/typography.js.map +1 -0
  155. package/dist/custom-components/chat/chat-types.d.ts +1 -1
  156. package/dist/custom-components/chat/chat-types.js +2 -0
  157. package/dist/custom-components/chat/chat-types.js.map +1 -0
  158. package/dist/custom-components/chat/chat.d.ts +1 -1
  159. package/dist/custom-components/chat/chat.js +14 -0
  160. package/dist/custom-components/chat/chat.js.map +1 -0
  161. package/dist/custom-components/layout/layout-types.js +2 -0
  162. package/dist/custom-components/layout/layout-types.js.map +1 -0
  163. package/dist/custom-components/layout/layout.d.ts +2 -2
  164. package/dist/custom-components/layout/layout.js +46 -0
  165. package/dist/custom-components/layout/layout.js.map +1 -0
  166. package/dist/custom-components/layout-builder/layout-builder-constants.js +25 -0
  167. package/dist/custom-components/layout-builder/layout-builder-constants.js.map +1 -0
  168. package/dist/custom-components/layout-builder/layout-builder-schema.js +169 -0
  169. package/dist/custom-components/layout-builder/layout-builder-schema.js.map +1 -0
  170. package/dist/custom-components/layout-builder/layout-builder-templates.js +206 -0
  171. package/dist/custom-components/layout-builder/layout-builder-templates.js.map +1 -0
  172. package/dist/custom-components/layout-builder/layout-builder-types.js +2 -0
  173. package/dist/custom-components/layout-builder/layout-builder-types.js.map +1 -0
  174. package/dist/custom-components/layout-builder/layout-builder-utils.js +251 -0
  175. package/dist/custom-components/layout-builder/layout-builder-utils.js.map +1 -0
  176. package/dist/custom-components/layout-builder/layout-builder-validation.d.ts +8 -2
  177. package/dist/custom-components/layout-builder/layout-builder-validation.js +445 -0
  178. package/dist/custom-components/layout-builder/layout-builder-validation.js.map +1 -0
  179. package/dist/custom-components/layout-builder/layout-builder.d.ts +2 -2
  180. package/dist/custom-components/layout-builder/layout-builder.js +908 -0
  181. package/dist/custom-components/layout-builder/layout-builder.js.map +1 -0
  182. package/dist/custom-components/layout-builder/layout-json-editor-types.d.ts +1 -1
  183. package/dist/custom-components/layout-builder/layout-json-editor-types.js +2 -0
  184. package/dist/custom-components/layout-builder/layout-json-editor-types.js.map +1 -0
  185. package/dist/custom-components/layout-builder/layout-json-editor.d.ts +2 -2
  186. package/dist/custom-components/layout-builder/layout-json-editor.js +103 -0
  187. package/dist/custom-components/layout-builder/layout-json-editor.js.map +1 -0
  188. package/dist/custom-components/layout-builder/stories/hooks/useHistory.js +100 -0
  189. package/dist/custom-components/layout-builder/stories/hooks/useHistory.js.map +1 -0
  190. package/dist/custom-components/markdown/markdown-types.d.ts +3 -3
  191. package/dist/custom-components/markdown/markdown-types.js +2 -0
  192. package/dist/custom-components/markdown/markdown-types.js.map +1 -0
  193. package/dist/custom-components/markdown/markdown-utils.js +10 -0
  194. package/dist/custom-components/markdown/markdown-utils.js.map +1 -0
  195. package/dist/custom-components/markdown/markdown.d.ts +2 -2
  196. package/dist/custom-components/markdown/markdown.js +39 -0
  197. package/dist/custom-components/markdown/markdown.js.map +1 -0
  198. package/dist/custom-components/mindmap/index.d.ts +2 -2
  199. package/dist/custom-components/mindmap/index.js +2 -0
  200. package/dist/custom-components/mindmap/index.js.map +1 -0
  201. package/dist/custom-components/mindmap/mind-tree-types.d.ts +1 -1
  202. package/dist/custom-components/mindmap/mind-tree-types.js +2 -0
  203. package/dist/custom-components/mindmap/mind-tree-types.js.map +1 -0
  204. package/dist/custom-components/mindmap/mind-tree.d.ts +1 -1
  205. package/dist/custom-components/mindmap/mind-tree.js +201 -0
  206. package/dist/custom-components/mindmap/mind-tree.js.map +1 -0
  207. package/dist/custom-components/mindmap/reingold-tilford-algorithm.d.ts +1 -1
  208. package/dist/custom-components/mindmap/reingold-tilford-algorithm.js +277 -0
  209. package/dist/custom-components/mindmap/reingold-tilford-algorithm.js.map +1 -0
  210. package/dist/custom-components/shortcut-tooltip/shortcut-tooltip-types.js +2 -0
  211. package/dist/custom-components/shortcut-tooltip/shortcut-tooltip-types.js.map +1 -0
  212. package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.d.ts +2 -2
  213. package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.js +32 -0
  214. package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.js.map +1 -0
  215. package/dist/custom-components/timeline/skeleton/timeline-skeleton.d.ts +1 -1
  216. package/dist/custom-components/timeline/skeleton/timeline-skeleton.js +19 -0
  217. package/dist/custom-components/timeline/skeleton/timeline-skeleton.js.map +1 -0
  218. package/dist/custom-components/timeline/timeline-types.js +2 -0
  219. package/dist/custom-components/timeline/timeline-types.js.map +1 -0
  220. package/dist/custom-components/timeline/timeline.d.ts +2 -2
  221. package/dist/custom-components/timeline/timeline.js +64 -0
  222. package/dist/custom-components/timeline/timeline.js.map +1 -0
  223. package/dist/custom-components/workflow/layout/workflow-edge.d.ts +1 -1
  224. package/dist/custom-components/workflow/layout/workflow-edge.js +31 -0
  225. package/dist/custom-components/workflow/layout/workflow-edge.js.map +1 -0
  226. package/dist/custom-components/workflow/layout/workflow-layout-types.d.ts +1 -1
  227. package/dist/custom-components/workflow/layout/workflow-layout-types.js +2 -0
  228. package/dist/custom-components/workflow/layout/workflow-layout-types.js.map +1 -0
  229. package/dist/custom-components/workflow/layout/workflow-layout.d.ts +2 -2
  230. package/dist/custom-components/workflow/layout/workflow-layout.js +284 -0
  231. package/dist/custom-components/workflow/layout/workflow-layout.js.map +1 -0
  232. package/dist/custom-components/workflow/node/workflow-node.d.ts +1 -1
  233. package/dist/custom-components/workflow/node/workflow-node.js +22 -0
  234. package/dist/custom-components/workflow/node/workflow-node.js.map +1 -0
  235. package/dist/custom-components/workflow/panel/workflow-panel-types.d.ts +1 -1
  236. package/dist/custom-components/workflow/panel/workflow-panel-types.js +2 -0
  237. package/dist/custom-components/workflow/panel/workflow-panel-types.js.map +1 -0
  238. package/dist/custom-components/workflow/panel/workflow-panel.d.ts +1 -1
  239. package/dist/custom-components/workflow/panel/workflow-panel.js +53 -0
  240. package/dist/custom-components/workflow/panel/workflow-panel.js.map +1 -0
  241. package/dist/custom-components/workflow/toolbar/workflow-toolbar-types.js +2 -0
  242. package/dist/custom-components/workflow/toolbar/workflow-toolbar-types.js.map +1 -0
  243. package/dist/custom-components/workflow/toolbar/workflow-toolbar.d.ts +1 -1
  244. package/dist/custom-components/workflow/toolbar/workflow-toolbar.js +19 -0
  245. package/dist/custom-components/workflow/toolbar/workflow-toolbar.js.map +1 -0
  246. package/dist/custom-components/workflow/utils/workflow-validation.d.ts +2 -2
  247. package/dist/custom-components/workflow/utils/workflow-validation.js +257 -0
  248. package/dist/custom-components/workflow/utils/workflow-validation.js.map +1 -0
  249. package/dist/custom-components/workflow/workflow-types.d.ts +3 -3
  250. package/dist/custom-components/workflow/workflow-types.js +2 -0
  251. package/dist/custom-components/workflow/workflow-types.js.map +1 -0
  252. package/dist/custom-components/workflow/workflow.d.ts +1 -1
  253. package/dist/custom-components/workflow/workflow.js +125 -0
  254. package/dist/custom-components/workflow/workflow.js.map +1 -0
  255. package/dist/data-components/assets/data-components-asset.js +2 -0
  256. package/dist/data-components/assets/data-components-asset.js.map +1 -0
  257. package/dist/data-components/calendar/calendar-types.d.ts +1 -1
  258. package/dist/data-components/calendar/calendar-types.js +2 -0
  259. package/dist/data-components/calendar/calendar-types.js.map +1 -0
  260. package/dist/data-components/calendar/calendar-utils.js +2 -0
  261. package/dist/data-components/calendar/calendar-utils.js.map +1 -0
  262. package/dist/data-components/calendar/calendar.d.ts +1 -1
  263. package/dist/data-components/calendar/calendar.js +78 -0
  264. package/dist/data-components/calendar/calendar.js.map +1 -0
  265. package/dist/data-components/cell/cell-switch.d.ts +1 -1
  266. package/dist/data-components/cell/cell-switch.js +68 -0
  267. package/dist/data-components/cell/cell-switch.js.map +1 -0
  268. package/dist/data-components/cell/cell-types.d.ts +2 -2
  269. package/dist/data-components/cell/cell-types.js +2 -0
  270. package/dist/data-components/cell/cell-types.js.map +1 -0
  271. package/dist/data-components/cell/cell-utils.js +60 -0
  272. package/dist/data-components/cell/cell-utils.js.map +1 -0
  273. package/dist/data-components/cell/cell.d.ts +1 -1
  274. package/dist/data-components/cell/cell.js +63 -0
  275. package/dist/data-components/cell/cell.js.map +1 -0
  276. package/dist/data-components/chart/chart-types.d.ts +1 -1
  277. package/dist/data-components/chart/chart-types.js +2 -0
  278. package/dist/data-components/chart/chart-types.js.map +1 -0
  279. package/dist/data-components/chart/chart.d.ts +1 -1
  280. package/dist/data-components/chart/chart.js +121 -0
  281. package/dist/data-components/chart/chart.js.map +1 -0
  282. package/dist/data-components/chart/sankey/sankeyChart.d.ts +1 -1
  283. package/dist/data-components/chart/sankey/sankeyChart.js +111 -0
  284. package/dist/data-components/chart/sankey/sankeyChart.js.map +1 -0
  285. package/dist/data-components/data-structure/data-structure-utils.d.ts +1 -1
  286. package/dist/data-components/data-structure/data-structure-utils.js +28 -0
  287. package/dist/data-components/data-structure/data-structure-utils.js.map +1 -0
  288. package/dist/data-components/data-structure/data-structure.d.ts +1 -1
  289. package/dist/data-components/data-structure/data-structure.js +2 -0
  290. package/dist/data-components/data-structure/data-structure.js.map +1 -0
  291. package/dist/data-components/data-structure/stories-assets.d.ts +5 -1
  292. package/dist/data-components/data-structure/stories-assets.js +199 -0
  293. package/dist/data-components/data-structure/stories-assets.js.map +1 -0
  294. package/dist/data-components/form/form-types.d.ts +2 -2
  295. package/dist/data-components/form/form-types.js +2 -0
  296. package/dist/data-components/form/form-types.js.map +1 -0
  297. package/dist/data-components/form/form.d.ts +1 -1
  298. package/dist/data-components/form/form.js +124 -0
  299. package/dist/data-components/form/form.js.map +1 -0
  300. package/dist/data-components/table-grid/aggregation/aggregation-utils.js +31 -0
  301. package/dist/data-components/table-grid/aggregation/aggregation-utils.js.map +1 -0
  302. package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.d.ts +1 -1
  303. package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.js +264 -0
  304. package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.js.map +1 -0
  305. package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.d.ts +1 -1
  306. package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.js +306 -0
  307. package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.js.map +1 -0
  308. package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.d.ts +1 -1
  309. package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.js +2 -0
  310. package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.js.map +1 -0
  311. package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.d.ts +1 -1
  312. package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.js +33 -0
  313. package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.js.map +1 -0
  314. package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.d.ts +2 -2
  315. package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.js +59 -0
  316. package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.js.map +1 -0
  317. package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.d.ts +1 -1
  318. package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.js +167 -0
  319. package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.js.map +1 -0
  320. package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.d.ts +1 -1
  321. package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.js +2 -0
  322. package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.js.map +1 -0
  323. package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.d.ts +2 -2
  324. package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.js +157 -0
  325. package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.js.map +1 -0
  326. package/dist/data-components/table-grid/external-functionalities/import/csv/autoDetect.js +27 -0
  327. package/dist/data-components/table-grid/external-functionalities/import/csv/autoDetect.js.map +1 -0
  328. package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.d.ts +1 -1
  329. package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.js +21 -0
  330. package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.js.map +1 -0
  331. package/dist/data-components/table-grid/external-functionalities/import/csv/csvToObj.js +21 -0
  332. package/dist/data-components/table-grid/external-functionalities/import/csv/csvToObj.js.map +1 -0
  333. package/dist/data-components/table-grid/external-functionalities/import/csv/detectDelimeter.js +12 -0
  334. package/dist/data-components/table-grid/external-functionalities/import/csv/detectDelimeter.js.map +1 -0
  335. package/dist/data-components/table-grid/external-functionalities/import/csv/index.d.ts +6 -6
  336. package/dist/data-components/table-grid/external-functionalities/import/csv/index.js +7 -0
  337. package/dist/data-components/table-grid/external-functionalities/import/csv/index.js.map +1 -0
  338. package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.d.ts +1 -1
  339. package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.js +15 -0
  340. package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.js.map +1 -0
  341. package/dist/data-components/table-grid/external-functionalities/import/csv/parseDelimeted.js +50 -0
  342. package/dist/data-components/table-grid/external-functionalities/import/csv/parseDelimeted.js.map +1 -0
  343. package/dist/data-components/table-grid/footer/table-grid-footer-types.d.ts +1 -1
  344. package/dist/data-components/table-grid/footer/table-grid-footer-types.js +2 -0
  345. package/dist/data-components/table-grid/footer/table-grid-footer-types.js.map +1 -0
  346. package/dist/data-components/table-grid/footer/table-grid-footer.d.ts +1 -1
  347. package/dist/data-components/table-grid/footer/table-grid-footer.js +47 -0
  348. package/dist/data-components/table-grid/footer/table-grid-footer.js.map +1 -0
  349. package/dist/data-components/table-grid/formula/evaluator.js +91 -0
  350. package/dist/data-components/table-grid/formula/evaluator.js.map +1 -0
  351. package/dist/data-components/table-grid/formula/formula-builder-types.d.ts +1 -1
  352. package/dist/data-components/table-grid/formula/formula-builder-types.js +2 -0
  353. package/dist/data-components/table-grid/formula/formula-builder-types.js.map +1 -0
  354. package/dist/data-components/table-grid/formula/formula-builder.d.ts +1 -1
  355. package/dist/data-components/table-grid/formula/formula-builder.js +47 -0
  356. package/dist/data-components/table-grid/formula/formula-builder.js.map +1 -0
  357. package/dist/data-components/table-grid/formula/formula.test.js +50 -0
  358. package/dist/data-components/table-grid/formula/formula.test.js.map +1 -0
  359. package/dist/data-components/table-grid/formula/index.js +40 -0
  360. package/dist/data-components/table-grid/formula/index.js.map +1 -0
  361. package/dist/data-components/table-grid/formula/parser.js +179 -0
  362. package/dist/data-components/table-grid/formula/parser.js.map +1 -0
  363. package/dist/data-components/table-grid/formula/tokenizer.js +140 -0
  364. package/dist/data-components/table-grid/formula/tokenizer.js.map +1 -0
  365. package/dist/data-components/table-grid/formula/types.js +2 -0
  366. package/dist/data-components/table-grid/formula/types.js.map +1 -0
  367. package/dist/data-components/table-grid/header/grouping/group-panel-types.d.ts +1 -1
  368. package/dist/data-components/table-grid/header/grouping/group-panel-types.js +2 -0
  369. package/dist/data-components/table-grid/header/grouping/group-panel-types.js.map +1 -0
  370. package/dist/data-components/table-grid/header/grouping/group-panel.d.ts +1 -1
  371. package/dist/data-components/table-grid/header/grouping/group-panel.js +91 -0
  372. package/dist/data-components/table-grid/header/grouping/group-panel.js.map +1 -0
  373. package/dist/data-components/table-grid/header/table-grid-column-menu.d.ts +1 -1
  374. package/dist/data-components/table-grid/header/table-grid-column-menu.js +84 -0
  375. package/dist/data-components/table-grid/header/table-grid-column-menu.js.map +1 -0
  376. package/dist/data-components/table-grid/header/table-grid-header-types.d.ts +1 -1
  377. package/dist/data-components/table-grid/header/table-grid-header-types.js +2 -0
  378. package/dist/data-components/table-grid/header/table-grid-header-types.js.map +1 -0
  379. package/dist/data-components/table-grid/header/table-grid-header.d.ts +1 -1
  380. package/dist/data-components/table-grid/header/table-grid-header.js +148 -0
  381. package/dist/data-components/table-grid/header/table-grid-header.js.map +1 -0
  382. package/dist/data-components/table-grid/hooks/use-table.d.ts +1 -1
  383. package/dist/data-components/table-grid/hooks/use-table.js +18 -0
  384. package/dist/data-components/table-grid/hooks/use-table.js.map +1 -0
  385. package/dist/data-components/table-grid/pinning/pinning-utils.d.ts +1 -1
  386. package/dist/data-components/table-grid/pinning/pinning-utils.js +70 -0
  387. package/dist/data-components/table-grid/pinning/pinning-utils.js.map +1 -0
  388. package/dist/data-components/table-grid/pivot/pivot-config-panel-types.d.ts +2 -2
  389. package/dist/data-components/table-grid/pivot/pivot-config-panel-types.js +2 -0
  390. package/dist/data-components/table-grid/pivot/pivot-config-panel-types.js.map +1 -0
  391. package/dist/data-components/table-grid/pivot/pivot-config-panel.d.ts +1 -1
  392. package/dist/data-components/table-grid/pivot/pivot-config-panel.js +89 -0
  393. package/dist/data-components/table-grid/pivot/pivot-config-panel.js.map +1 -0
  394. package/dist/data-components/table-grid/pivot/pivot-table.d.ts +1 -1
  395. package/dist/data-components/table-grid/pivot/pivot-table.js +26 -0
  396. package/dist/data-components/table-grid/pivot/pivot-table.js.map +1 -0
  397. package/dist/data-components/table-grid/pivot/pivot-types.d.ts +1 -1
  398. package/dist/data-components/table-grid/pivot/pivot-types.js +2 -0
  399. package/dist/data-components/table-grid/pivot/pivot-types.js.map +1 -0
  400. package/dist/data-components/table-grid/pivot/pivot-utils.d.ts +2 -2
  401. package/dist/data-components/table-grid/pivot/pivot-utils.js +150 -0
  402. package/dist/data-components/table-grid/pivot/pivot-utils.js.map +1 -0
  403. package/dist/data-components/table-grid/row/table-grid-row-types.d.ts +3 -1
  404. package/dist/data-components/table-grid/row/table-grid-row-types.d.ts.map +1 -1
  405. package/dist/data-components/table-grid/row/table-grid-row-types.js +2 -0
  406. package/dist/data-components/table-grid/row/table-grid-row-types.js.map +1 -0
  407. package/dist/data-components/table-grid/row/table-grid-row-utils.d.ts +2 -2
  408. package/dist/data-components/table-grid/row/table-grid-row-utils.js +35 -0
  409. package/dist/data-components/table-grid/row/table-grid-row-utils.js.map +1 -0
  410. package/dist/data-components/table-grid/row/table-grid-row.d.ts +2 -2
  411. package/dist/data-components/table-grid/row/table-grid-row.d.ts.map +1 -1
  412. package/dist/data-components/table-grid/row/table-grid-row.js +68 -0
  413. package/dist/data-components/table-grid/row/table-grid-row.js.map +1 -0
  414. package/dist/data-components/table-grid/selection/selection-types.js +2 -0
  415. package/dist/data-components/table-grid/selection/selection-types.js.map +1 -0
  416. package/dist/data-components/table-grid/selection/selection-utils.d.ts +2 -2
  417. package/dist/data-components/table-grid/selection/selection-utils.js +136 -0
  418. package/dist/data-components/table-grid/selection/selection-utils.js.map +1 -0
  419. package/dist/data-components/table-grid/sidebar/table-grid-sidebar-types.js +2 -0
  420. package/dist/data-components/table-grid/sidebar/table-grid-sidebar-types.js.map +1 -0
  421. package/dist/data-components/table-grid/sidebar/table-grid-sidebar.d.ts +1 -1
  422. package/dist/data-components/table-grid/sidebar/table-grid-sidebar.js +7 -0
  423. package/dist/data-components/table-grid/sidebar/table-grid-sidebar.js.map +1 -0
  424. package/dist/data-components/table-grid/sorting/sorting.d.ts +1 -1
  425. package/dist/data-components/table-grid/sorting/sorting.js +45 -0
  426. package/dist/data-components/table-grid/sorting/sorting.js.map +1 -0
  427. package/dist/data-components/table-grid/table-context/table-context-types.d.ts +2 -2
  428. package/dist/data-components/table-grid/table-context/table-context-types.js +2 -0
  429. package/dist/data-components/table-grid/table-context/table-context-types.js.map +1 -0
  430. package/dist/data-components/table-grid/table-context/table-context.d.ts +2 -2
  431. package/dist/data-components/table-grid/table-context/table-context.js +4 -0
  432. package/dist/data-components/table-grid/table-context/table-context.js.map +1 -0
  433. package/dist/data-components/table-grid/table-grid-context.d.ts +2 -2
  434. package/dist/data-components/table-grid/table-grid-context.d.ts.map +1 -1
  435. package/dist/data-components/table-grid/table-grid-context.js +258 -0
  436. package/dist/data-components/table-grid/table-grid-context.js.map +1 -0
  437. package/dist/data-components/table-grid/table-grid-types.d.ts +9 -7
  438. package/dist/data-components/table-grid/table-grid-types.d.ts.map +1 -1
  439. package/dist/data-components/table-grid/table-grid-types.js +2 -0
  440. package/dist/data-components/table-grid/table-grid-types.js.map +1 -0
  441. package/dist/data-components/table-grid/table-grid.d.ts +1 -1
  442. package/dist/data-components/table-grid/table-grid.d.ts.map +1 -1
  443. package/dist/data-components/table-grid/table-grid.js +144 -0
  444. package/dist/data-components/table-grid/table-grid.js.map +1 -0
  445. package/dist/data-components/table-grid/table-utils.d.ts +1 -1
  446. package/dist/data-components/table-grid/table-utils.js +116 -0
  447. package/dist/data-components/table-grid/table-utils.js.map +1 -0
  448. package/dist/experimental-components/contribution-heatmap/contribution-heatmap-types.js +2 -0
  449. package/dist/experimental-components/contribution-heatmap/contribution-heatmap-types.js.map +1 -0
  450. package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.d.ts +1 -1
  451. package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.js +61 -0
  452. package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.js.map +1 -0
  453. package/dist/experimental-components/contribution-heatmap/contribution-heatmap.d.ts +2 -2
  454. package/dist/experimental-components/contribution-heatmap/contribution-heatmap.js +23 -0
  455. package/dist/experimental-components/contribution-heatmap/contribution-heatmap.js.map +1 -0
  456. package/dist/experimental-components/filter-builder/filter-builder-types.d.ts +1 -1
  457. package/dist/experimental-components/filter-builder/filter-builder-types.js +2 -0
  458. package/dist/experimental-components/filter-builder/filter-builder-types.js.map +1 -0
  459. package/dist/experimental-components/filter-builder/filter-builder.d.ts +3 -2
  460. package/dist/experimental-components/filter-builder/filter-builder.js +139 -0
  461. package/dist/experimental-components/filter-builder/filter-builder.js.map +1 -0
  462. package/dist/framework-components/appbar/appbar-assets.js +5 -0
  463. package/dist/framework-components/appbar/appbar-assets.js.map +1 -0
  464. package/dist/framework-components/appbar/appbar-types.d.ts +1 -1
  465. package/dist/framework-components/appbar/appbar-types.js +2 -0
  466. package/dist/framework-components/appbar/appbar-types.js.map +1 -0
  467. package/dist/framework-components/appbar/appbar.d.ts +2 -2
  468. package/dist/framework-components/appbar/appbar.js +36 -0
  469. package/dist/framework-components/appbar/appbar.js.map +1 -0
  470. package/dist/framework-components/breadcrumbs/breadcrumbs-types.js +2 -0
  471. package/dist/framework-components/breadcrumbs/breadcrumbs-types.js.map +1 -0
  472. package/dist/framework-components/breadcrumbs/breadcrumbs.d.ts +2 -2
  473. package/dist/framework-components/breadcrumbs/breadcrumbs.js +31 -0
  474. package/dist/framework-components/breadcrumbs/breadcrumbs.js.map +1 -0
  475. package/dist/framework-components/drawer/drawer-types.d.ts +2 -2
  476. package/dist/framework-components/drawer/drawer-types.js +2 -0
  477. package/dist/framework-components/drawer/drawer-types.js.map +1 -0
  478. package/dist/framework-components/drawer/drawer.d.ts +2 -2
  479. package/dist/framework-components/drawer/drawer.js +10 -0
  480. package/dist/framework-components/drawer/drawer.js.map +1 -0
  481. package/dist/framework-components/scaffold/scaffold-context.d.ts +2 -2
  482. package/dist/framework-components/scaffold/scaffold-context.js +10 -0
  483. package/dist/framework-components/scaffold/scaffold-context.js.map +1 -0
  484. package/dist/framework-components/scaffold/scaffold-types.d.ts +1 -1
  485. package/dist/framework-components/scaffold/scaffold-types.js +2 -0
  486. package/dist/framework-components/scaffold/scaffold-types.js.map +1 -0
  487. package/dist/framework-components/scaffold/scaffold.d.ts +2 -2
  488. package/dist/framework-components/scaffold/scaffold.js +76 -0
  489. package/dist/framework-components/scaffold/scaffold.js.map +1 -0
  490. package/dist/framework-components/sidebar/sidebar-assets.js +4 -0
  491. package/dist/framework-components/sidebar/sidebar-assets.js.map +1 -0
  492. package/dist/framework-components/sidebar/sidebar-context.d.ts +2 -2
  493. package/dist/framework-components/sidebar/sidebar-context.js +9 -0
  494. package/dist/framework-components/sidebar/sidebar-context.js.map +1 -0
  495. package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo-types.js +2 -0
  496. package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo-types.js.map +1 -0
  497. package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.d.ts +1 -1
  498. package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.js +12 -0
  499. package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.js.map +1 -0
  500. package/dist/framework-components/sidebar/sidebar-types.d.ts +1 -1
  501. package/dist/framework-components/sidebar/sidebar-types.js +2 -0
  502. package/dist/framework-components/sidebar/sidebar-types.js.map +1 -0
  503. package/dist/framework-components/sidebar/sidebar.d.ts +3 -3
  504. package/dist/framework-components/sidebar/sidebar.js +42 -0
  505. package/dist/framework-components/sidebar/sidebar.js.map +1 -0
  506. package/dist/hooks/useDynamicVirtualList.d.ts +76 -0
  507. package/dist/hooks/useDynamicVirtualList.d.ts.map +1 -0
  508. package/dist/hooks/useDynamicVirtualList.js +208 -0
  509. package/dist/hooks/useDynamicVirtualList.js.map +1 -0
  510. package/dist/hooks/useFixedVirtualList.d.ts +1 -1
  511. package/dist/hooks/useFixedVirtualList.js +64 -0
  512. package/dist/hooks/useFixedVirtualList.js.map +1 -0
  513. package/dist/hooks/useShortcut.d.ts +1 -1
  514. package/dist/hooks/useShortcut.js +86 -0
  515. package/dist/hooks/useShortcut.js.map +1 -0
  516. package/dist/hooks/useTour/useTour-context-internal.d.ts +2 -2
  517. package/dist/hooks/useTour/useTour-context-internal.js +7 -0
  518. package/dist/hooks/useTour/useTour-context-internal.js.map +1 -0
  519. package/dist/hooks/useTour/useTour-context.d.ts +3 -3
  520. package/dist/hooks/useTour/useTour-context.js +54 -0
  521. package/dist/hooks/useTour/useTour-context.js.map +1 -0
  522. package/dist/hooks/useTour/useTour-types.d.ts +1 -1
  523. package/dist/hooks/useTour/useTour-types.js +2 -0
  524. package/dist/hooks/useTour/useTour-types.js.map +1 -0
  525. package/dist/hooks/useTour/useTour.d.ts +1 -1
  526. package/dist/hooks/useTour/useTour.js +408 -0
  527. package/dist/hooks/useTour/useTour.js.map +1 -0
  528. package/dist/hooks/useVirtualListScroll.d.ts +1 -1
  529. package/dist/hooks/useVirtualListScroll.js +79 -0
  530. package/dist/hooks/useVirtualListScroll.js.map +1 -0
  531. package/dist/index.d.ts +3 -0
  532. package/dist/index.d.ts.map +1 -1
  533. package/dist/index.js +63 -0
  534. package/dist/index.js.map +1 -0
  535. package/dist/providers/ai-assistant/ai-assistant-prompts.d.ts +1 -1
  536. package/dist/providers/ai-assistant/ai-assistant-prompts.js +98 -0
  537. package/dist/providers/ai-assistant/ai-assistant-prompts.js.map +1 -0
  538. package/dist/providers/ai-assistant/ai-assistant-types.js +5 -0
  539. package/dist/providers/ai-assistant/ai-assistant-types.js.map +1 -0
  540. package/dist/providers/ai-assistant/ai-assistant-validator.d.ts +1 -1
  541. package/dist/providers/ai-assistant/ai-assistant-validator.js +74 -0
  542. package/dist/providers/ai-assistant/ai-assistant-validator.js.map +1 -0
  543. package/dist/providers/ai-assistant/ai-chat-panel-types.d.ts +1 -1
  544. package/dist/providers/ai-assistant/ai-chat-panel-types.js +2 -0
  545. package/dist/providers/ai-assistant/ai-chat-panel-types.js.map +1 -0
  546. package/dist/providers/ai-assistant/ai-chat-panel.d.ts +1 -1
  547. package/dist/providers/ai-assistant/ai-chat-panel.js +111 -0
  548. package/dist/providers/ai-assistant/ai-chat-panel.js.map +1 -0
  549. package/dist/providers/shortcut/shortcut-context.d.ts +2 -2
  550. package/dist/providers/shortcut/shortcut-context.js +7 -0
  551. package/dist/providers/shortcut/shortcut-context.js.map +1 -0
  552. package/dist/providers/shortcut/shortcut-provider.d.ts +1 -1
  553. package/dist/providers/shortcut/shortcut-provider.js +267 -0
  554. package/dist/providers/shortcut/shortcut-provider.js.map +1 -0
  555. package/dist/providers/theme/index.js +2 -0
  556. package/dist/providers/theme/index.js.map +1 -0
  557. package/dist/providers/theme/theme-provider-types.js +2 -0
  558. package/dist/providers/theme/theme-provider-types.js.map +1 -0
  559. package/dist/providers/theme/themeProvider.d.ts +2 -2
  560. package/dist/providers/theme/themeProvider.js +17 -0
  561. package/dist/providers/theme/themeProvider.js.map +1 -0
  562. package/dist/test/vitest.utils.js +2 -0
  563. package/dist/test/vitest.utils.js.map +1 -0
  564. package/dist/types/global-types.js +10 -0
  565. package/dist/types/global-types.js.map +1 -0
  566. package/dist/types/storybook-types.js +2 -0
  567. package/dist/types/storybook-types.js.map +1 -0
  568. package/dist/utility-components/avatar/avatar-types.d.ts +1 -1
  569. package/dist/utility-components/avatar/avatar-types.js +2 -0
  570. package/dist/utility-components/avatar/avatar-types.js.map +1 -0
  571. package/dist/utility-components/avatar/avatar.d.ts +2 -2
  572. package/dist/utility-components/avatar/avatar.js +10 -0
  573. package/dist/utility-components/avatar/avatar.js.map +1 -0
  574. package/dist/utility-components/chip/chip-types.d.ts +2 -2
  575. package/dist/utility-components/chip/chip-types.js +2 -0
  576. package/dist/utility-components/chip/chip-types.js.map +1 -0
  577. package/dist/utility-components/chip/chip.d.ts +2 -2
  578. package/dist/utility-components/chip/chip.js +11 -0
  579. package/dist/utility-components/chip/chip.js.map +1 -0
  580. package/dist/utility-components/helper-text/helper-text-types.d.ts +1 -1
  581. package/dist/utility-components/helper-text/helper-text-types.js +2 -0
  582. package/dist/utility-components/helper-text/helper-text-types.js.map +1 -0
  583. package/dist/utility-components/helper-text/helper-text.d.ts +1 -1
  584. package/dist/utility-components/helper-text/helper-text.js +12 -0
  585. package/dist/utility-components/helper-text/helper-text.js.map +1 -0
  586. package/dist/utility-components/icon/icon-assets.js +95 -0
  587. package/dist/utility-components/icon/icon-assets.js.map +1 -0
  588. package/dist/utility-components/icon/icon-types.d.ts +1 -1
  589. package/dist/utility-components/icon/icon-types.js +2 -0
  590. package/dist/utility-components/icon/icon-types.js.map +1 -0
  591. package/dist/utility-components/icon/icon.d.ts +2 -2
  592. package/dist/utility-components/icon/icon.js +28 -0
  593. package/dist/utility-components/icon/icon.js.map +1 -0
  594. package/dist/utility-components/label/label-types.js +2 -0
  595. package/dist/utility-components/label/label-types.js.map +1 -0
  596. package/dist/utility-components/label/label.d.ts +1 -1
  597. package/dist/utility-components/label/label.js +10 -0
  598. package/dist/utility-components/label/label.js.map +1 -0
  599. package/dist/utility-components/overlay-panel/overlay-panel-types.js +2 -0
  600. package/dist/utility-components/overlay-panel/overlay-panel-types.js.map +1 -0
  601. package/dist/utility-components/overlay-panel/overlay-panel.d.ts +2 -2
  602. package/dist/utility-components/overlay-panel/overlay-panel.js +98 -0
  603. package/dist/utility-components/overlay-panel/overlay-panel.js.map +1 -0
  604. package/dist/utility-components/overlay-panel/use-focus-trap.d.ts +1 -1
  605. package/dist/utility-components/overlay-panel/use-focus-trap.js +61 -0
  606. package/dist/utility-components/overlay-panel/use-focus-trap.js.map +1 -0
  607. package/dist/utility-components/skeleton/skeleton-types.js +2 -0
  608. package/dist/utility-components/skeleton/skeleton-types.js.map +1 -0
  609. package/dist/utility-components/skeleton/skeleton.d.ts +2 -2
  610. package/dist/utility-components/skeleton/skeleton.js +14 -0
  611. package/dist/utility-components/skeleton/skeleton.js.map +1 -0
  612. package/dist/utility-components/stack/stack-types.js +2 -0
  613. package/dist/utility-components/stack/stack-types.js.map +1 -0
  614. package/dist/utility-components/stack/stack.d.ts +2 -2
  615. package/dist/utility-components/stack/stack.js +12 -0
  616. package/dist/utility-components/stack/stack.js.map +1 -0
  617. package/dist/utility-components/toast/toast-types.d.ts +1 -1
  618. package/dist/utility-components/toast/toast-types.js +2 -0
  619. package/dist/utility-components/toast/toast-types.js.map +1 -0
  620. package/dist/utility-components/toast/toast.d.ts +2 -2
  621. package/dist/utility-components/toast/toast.js +21 -0
  622. package/dist/utility-components/toast/toast.js.map +1 -0
  623. package/dist/utils/general.d.ts +1 -1
  624. package/dist/utils/general.js +27 -0
  625. package/dist/utils/general.js.map +1 -0
  626. package/dist/utils/shortcut-utils.js +164 -0
  627. package/dist/utils/shortcut-utils.js.map +1 -0
  628. package/package.json +1 -1
  629. package/dist/assets/svg/alert.svg +0 -1
  630. package/dist/assets/svg/arrow-down-up.svg +0 -1
  631. package/dist/assets/svg/arrow-down.svg +0 -1
  632. package/dist/assets/svg/arrow-left.svg +0 -1
  633. package/dist/assets/svg/arrow-right.svg +0 -1
  634. package/dist/assets/svg/arrow-up.svg +0 -1
  635. package/dist/assets/svg/arrow_drop_down.svg +0 -1
  636. package/dist/assets/svg/calendar.svg +0 -1
  637. package/dist/assets/svg/check.svg +0 -1
  638. package/dist/assets/svg/chevron-down.svg +0 -1
  639. package/dist/assets/svg/chevron-right.svg +0 -1
  640. package/dist/assets/svg/clipboard.svg +0 -1
  641. package/dist/assets/svg/close.svg +0 -1
  642. package/dist/assets/svg/copy.svg +0 -1
  643. package/dist/assets/svg/cursor.svg +0 -1
  644. package/dist/assets/svg/cut.svg +0 -1
  645. package/dist/assets/svg/delete.svg +0 -1
  646. package/dist/assets/svg/dock-left-arrow.svg +0 -1
  647. package/dist/assets/svg/dock-right-arrow.svg +0 -1
  648. package/dist/assets/svg/document-outline.svg +0 -1
  649. package/dist/assets/svg/download.svg +0 -1
  650. package/dist/assets/svg/drag.svg +0 -1
  651. package/dist/assets/svg/error.svg +0 -1
  652. package/dist/assets/svg/expand-right.svg +0 -1
  653. package/dist/assets/svg/expand.svg +0 -1
  654. package/dist/assets/svg/eye.svg +0 -1
  655. package/dist/assets/svg/fullscreen.svg +0 -1
  656. package/dist/assets/svg/gear.svg +0 -1
  657. package/dist/assets/svg/groups.svg +0 -1
  658. package/dist/assets/svg/help.svg +0 -1
  659. package/dist/assets/svg/info.svg +0 -1
  660. package/dist/assets/svg/logo.svg +0 -9
  661. package/dist/assets/svg/menu.svg +0 -1
  662. package/dist/assets/svg/message-bubble-question-mark.svg +0 -1
  663. package/dist/assets/svg/pencil.svg +0 -1
  664. package/dist/assets/svg/plus.svg +0 -1
  665. package/dist/assets/svg/restio.svg +0 -5
  666. package/dist/assets/svg/search.svg +0 -1
  667. package/dist/assets/svg/send.svg +0 -1
  668. package/dist/assets/svg/shrink-right.svg +0 -1
  669. package/dist/assets/svg/sidebar.svg +0 -1
  670. package/dist/assets/svg/terminal.svg +0 -1
  671. package/dist/assets/svg/timer.svg +0 -1
  672. package/dist/assets/svg/warning.svg +0 -1
  673. package/dist/assets/svg/zoom-minus.svg +0 -1
  674. package/dist/assets/svg/zoom-plus.svg +0 -1
  675. package/dist/restio-ui.cjs.js +0 -109
  676. package/dist/restio-ui.es.js +0 -34431
  677. package/dist/ui.css +0 -2
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { SidebarLogo } from "./sidebar-logo/sidebar-logo";
3
+ import { SidebarContext, useSidebar } from "./sidebar-context";
4
+ import { useScaffold } from "../../framework-components/scaffold/scaffold-context";
5
+ import style from "./sidebar.module.css";
6
+ import { Button } from "../../components/button/button";
7
+ import Typography from "../../components/typography/typography";
8
+ import Menu from "../../components/menu/menu";
9
+ export const Sidebar = ({ children }) => {
10
+ const { isSidebarOpen, toggleSidebar, isHoveringLogo, setHoveringLogo } = useScaffold();
11
+ // Use scaffold context for all sidebar state
12
+ const toggle = toggleSidebar;
13
+ const sidebar = {
14
+ sidebar: `${style["rst-sidebar"]}`,
15
+ };
16
+ return (_jsx(SidebarContext.Provider, { value: { isOpen: isSidebarOpen, toggle, setHoveringLogo, isHoveringLogo }, children: _jsx("div", { style: {
17
+ width: isSidebarOpen ? 220 : 40,
18
+ alignItems: isSidebarOpen ? "" : "center",
19
+ }, className: sidebar.sidebar, children: children }) }));
20
+ };
21
+ // Keep simple children inside the file for now
22
+ const Item = ({ leadingVisual, label, shortcut, onClick }) => {
23
+ const { isOpen } = useSidebar();
24
+ return isOpen ? (_jsx(Menu.Item, { leadingVisual: leadingVisual, "aria-label": label, shortcut: shortcut, label: label, onClick: onClick })) : (_jsx(Button, { leadingVisual: leadingVisual, "aria-label": label, variant: "invisible", onClick: () => onClick }));
25
+ };
26
+ const Section = ({ title, children }) => {
27
+ const sidebarSection = {
28
+ sectionContainer: `${style["rst-sidebar-section"]}`,
29
+ };
30
+ const { isOpen } = useSidebar();
31
+ return (_jsxs("div", { className: sidebarSection.sectionContainer, children: [title && isOpen && (_jsx("div", { children: _jsx(Typography, { variant: "label", children: title }) })), children] }));
32
+ };
33
+ const User = ({ avatar, name }) => {
34
+ const { isOpen } = useSidebar();
35
+ return (_jsxs("div", { className: style["rst-sidebar-user"], children: [avatar, isOpen && _jsx("span", { style: { marginLeft: 8 }, children: name })] }));
36
+ };
37
+ Sidebar.displayName = "Sidebar";
38
+ Sidebar.Logo = SidebarLogo;
39
+ Sidebar.Item = Item;
40
+ Sidebar.Section = Section;
41
+ Sidebar.User = User;
42
+ //# sourceMappingURL=sidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar.js","sourceRoot":"","sources":["../../../src/framework-components/sidebar/sidebar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAEnF,OAAO,KAAK,MAAM,sBAAsB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,UAAU,MAAM,wCAAwC,CAAC;AAChE,OAAO,IAAI,MAAM,4BAA4B,CAAC;AAS9C,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAE,QAAQ,EAAgB,EAAE,EAAE;IACpD,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,GAAG,WAAW,EAAE,CAAC;IAExF,6CAA6C;IAC7C,MAAM,MAAM,GAAG,aAAa,CAAC;IAE7B,MAAM,OAAO,GAAG;QACd,OAAO,EAAE,GAAG,KAAK,CAAC,aAAa,CAAC,EAAE;KACnC,CAAC;IAEF,OAAO,CACL,KAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,E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AG,KAAK,GAAc,GAC9C,CACP,EACA,QAAQ,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAa,EAAE,EAAE;IAC3C,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,CAAC;IAChC,OAAO,CACL,eAAK,SAAS,EAAE,KAAK,CAAC,kBAAkB,CAAC,aACtC,MAAM,EACN,MAAM,IAAI,eAAM,KAAK,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,YAAG,IAAI,GAAQ,IACpD,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAChC,OAAO,CAAC,IAAI,GAAG,WAAW,CAAC;AAC3B,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AACpB,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1B,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC"}
@@ -0,0 +1,76 @@
1
+ export interface DynamicVirtualItem {
2
+ /** Original item index in the full list */
3
+ index: number;
4
+ /** Top offset from the top of the total scrollable area, in pixels */
5
+ start: number;
6
+ /** Measured (or estimated) height in pixels */
7
+ size: number;
8
+ }
9
+ export interface UseDynamicVirtualListOptions {
10
+ /** Total number of items in the list */
11
+ count: number;
12
+ /** Fallback height used for items that have not been measured yet */
13
+ estimatedItemHeight?: number;
14
+ /**
15
+ * Extra items rendered above and below the visible viewport.
16
+ * A larger value makes scrolling smoother at the cost of slightly more DOM nodes.
17
+ * Defaults to 10.
18
+ */
19
+ overscan?: number;
20
+ }
21
+ export interface UseDynamicVirtualListResult {
22
+ /** Items that should be rendered right now */
23
+ virtualItems: DynamicVirtualItem[];
24
+ /** Total scrollable height in pixels (for the spacer element) */
25
+ totalSize: number;
26
+ /** Attach this ref to the scrollable container div */
27
+ containerRef: React.RefObject<HTMLDivElement | null>;
28
+ /** Attach this handler to the scrollable container's onScroll */
29
+ onScroll: (e: React.UIEvent<HTMLDivElement>) => void;
30
+ /**
31
+ * Callback ref to attach to each rendered item element.
32
+ * Call with `(el, index)` — el will be null when the item unmounts.
33
+ */
34
+ measureElement: (el: Element | null, index: number) => void;
35
+ /** Scroll the container so the given index is in view */
36
+ scrollToIndex: (index: number) => void;
37
+ /** First rendered index (including overscan) */
38
+ startIndex: number;
39
+ /** Last rendered index (including overscan) */
40
+ endIndex: number;
41
+ }
42
+ /**
43
+ * A dynamic-height virtual list hook inspired by TanStack Virtual.
44
+ *
45
+ * Unlike fixed-height virtualizers, this hook uses a ResizeObserver to measure
46
+ * each rendered item's actual height and falls back to `estimatedItemHeight` for
47
+ * items that have not yet been rendered. This allows rows with variable content
48
+ * (wrapped text, expandable cells, group headers) to scroll correctly.
49
+ *
50
+ * Usage:
51
+ * ```tsx
52
+ * const { virtualItems, totalSize, containerRef, onScroll, measureElement } =
53
+ * useDynamicVirtualList({ count: rows.length, estimatedItemHeight: 40, overscan: 10 });
54
+ *
55
+ * return (
56
+ * <div ref={containerRef} onScroll={onScroll} style={{ height: 400, overflowY: "auto" }}>
57
+ * <div style={{ height: totalSize, position: "relative" }}>
58
+ * {virtualItems.map(({ index, start }) => (
59
+ * <div
60
+ * key={index}
61
+ * ref={(el) => measureElement(el, index)}
62
+ * style={{ position: "absolute", top: start, width: "100%" }}
63
+ * >
64
+ * {rows[index]}
65
+ * </div>
66
+ * ))}
67
+ * </div>
68
+ * </div>
69
+ * );
70
+ * ```
71
+ *
72
+ * For table usage, pair with padding `<tr>` spacers at the top and bottom of
73
+ * `<tbody>` and attach `measureElement` to each `<tr>` via a ref callback.
74
+ */
75
+ export declare function useDynamicVirtualList({ count, estimatedItemHeight, overscan, }: UseDynamicVirtualListOptions): UseDynamicVirtualListResult;
76
+ //# sourceMappingURL=useDynamicVirtualList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDynamicVirtualList.d.ts","sourceRoot":"","sources":["../../src/hooks/useDynamicVirtualList.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,4BAA4B;IAC3C,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,2BAA2B;IAC1C,8CAA8C;IAC9C,YAAY,EAAE,kBAAkB,EAAE,CAAC;IACnC,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD,iEAAiE;IACjE,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACrD;;;OAGG;IACH,cAAc,EAAE,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,yDAAyD;IACzD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gDAAgD;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,mBAAwB,EACxB,QAAa,GACd,EAAE,4BAA4B,GAAG,2BAA2B,CA6K5D"}
@@ -0,0 +1,208 @@
1
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
2
+ /**
3
+ * Binary search: returns the largest index i in [0, count-1] such that
4
+ * offsets[i] <= target. Assumes offsets is sorted ascending (length = count + 1).
5
+ */
6
+ function findItemAtOffset(offsets, target, count) {
7
+ if (count === 0)
8
+ return 0;
9
+ let lo = 0;
10
+ let hi = count - 1;
11
+ while (lo < hi) {
12
+ const mid = (lo + hi + 1) >> 1;
13
+ if (offsets[mid] <= target) {
14
+ lo = mid;
15
+ }
16
+ else {
17
+ hi = mid - 1;
18
+ }
19
+ }
20
+ return lo;
21
+ }
22
+ /**
23
+ * A dynamic-height virtual list hook inspired by TanStack Virtual.
24
+ *
25
+ * Unlike fixed-height virtualizers, this hook uses a ResizeObserver to measure
26
+ * each rendered item's actual height and falls back to `estimatedItemHeight` for
27
+ * items that have not yet been rendered. This allows rows with variable content
28
+ * (wrapped text, expandable cells, group headers) to scroll correctly.
29
+ *
30
+ * Usage:
31
+ * ```tsx
32
+ * const { virtualItems, totalSize, containerRef, onScroll, measureElement } =
33
+ * useDynamicVirtualList({ count: rows.length, estimatedItemHeight: 40, overscan: 10 });
34
+ *
35
+ * return (
36
+ * <div ref={containerRef} onScroll={onScroll} style={{ height: 400, overflowY: "auto" }}>
37
+ * <div style={{ height: totalSize, position: "relative" }}>
38
+ * {virtualItems.map(({ index, start }) => (
39
+ * <div
40
+ * key={index}
41
+ * ref={(el) => measureElement(el, index)}
42
+ * style={{ position: "absolute", top: start, width: "100%" }}
43
+ * >
44
+ * {rows[index]}
45
+ * </div>
46
+ * ))}
47
+ * </div>
48
+ * </div>
49
+ * );
50
+ * ```
51
+ *
52
+ * For table usage, pair with padding `<tr>` spacers at the top and bottom of
53
+ * `<tbody>` and attach `measureElement` to each `<tr>` via a ref callback.
54
+ */
55
+ export function useDynamicVirtualList({ count, estimatedItemHeight = 40, overscan = 10, }) {
56
+ // ── Height cache ───────────────────────────────────────────────────────────
57
+ // Stored in refs so mutations don't cause extra renders; a version counter
58
+ // triggers a re-computation of offsets only when a height actually changes.
59
+ const sizeCache = useRef(new Map());
60
+ // ResizeObserver bookkeeping
61
+ const observedElements = useRef(new Map()); // el → index
62
+ const indexToElement = useRef(new Map()); // index → el
63
+ const resizeObserver = useRef(null);
64
+ // Incremented whenever sizeCache changes — drives offsets recomputation
65
+ const [version, setVersion] = useState(0);
66
+ // Scroll position
67
+ const [scrollTop, setScrollTop] = useState(0);
68
+ // Measured viewport height (updated by a second ResizeObserver on the container)
69
+ const [viewportHeight, setViewportHeight] = useState(0);
70
+ const containerRef = useRef(null);
71
+ // ── ResizeObserver for item heights ──────────────────────────────────────
72
+ useEffect(() => {
73
+ const ro = new ResizeObserver((entries) => {
74
+ let changed = false;
75
+ for (const entry of entries) {
76
+ const index = observedElements.current.get(entry.target);
77
+ if (index === undefined)
78
+ continue;
79
+ // borderBoxSize includes padding and border — matches offsetHeight
80
+ const newHeight = entry.borderBoxSize?.[0]?.blockSize ?? entry.contentRect.height;
81
+ if (newHeight > 0 && sizeCache.current.get(index) !== newHeight) {
82
+ sizeCache.current.set(index, newHeight);
83
+ changed = true;
84
+ }
85
+ }
86
+ if (changed) {
87
+ setVersion((v) => v + 1);
88
+ }
89
+ });
90
+ resizeObserver.current = ro;
91
+ return () => {
92
+ ro.disconnect();
93
+ };
94
+ }, []);
95
+ // ── ResizeObserver for the container viewport ─────────────────────────────
96
+ useEffect(() => {
97
+ const container = containerRef.current;
98
+ if (!container)
99
+ return;
100
+ const ro = new ResizeObserver(([entry]) => {
101
+ setViewportHeight(entry.contentRect.height);
102
+ });
103
+ ro.observe(container);
104
+ // Capture the initial size synchronously so the first paint is correct
105
+ setViewportHeight(container.clientHeight);
106
+ return () => ro.disconnect();
107
+ }, []);
108
+ // ── measureElement callback ───────────────────────────────────────────────
109
+ const measureElement = useCallback((el, index) => {
110
+ if (el === null) {
111
+ // Item unmounted — stop observing
112
+ const existing = indexToElement.current.get(index);
113
+ if (existing) {
114
+ resizeObserver.current?.unobserve(existing);
115
+ observedElements.current.delete(existing);
116
+ indexToElement.current.delete(index);
117
+ }
118
+ return;
119
+ }
120
+ // No-op if the same element is already registered for this index
121
+ if (indexToElement.current.get(index) === el)
122
+ return;
123
+ // Clean up the previous element registered at this index
124
+ const prevEl = indexToElement.current.get(index);
125
+ if (prevEl) {
126
+ resizeObserver.current?.unobserve(prevEl);
127
+ observedElements.current.delete(prevEl);
128
+ }
129
+ // Clean up if this DOM element was previously registered at a different index
130
+ if (observedElements.current.has(el)) {
131
+ resizeObserver.current?.unobserve(el);
132
+ observedElements.current.delete(el);
133
+ }
134
+ observedElements.current.set(el, index);
135
+ indexToElement.current.set(index, el);
136
+ resizeObserver.current?.observe(el);
137
+ }, []);
138
+ // ── Cumulative offsets ────────────────────────────────────────────────────
139
+ // offsets[i] = top of item i
140
+ // offsets[i+1] = bottom of item i
141
+ // offsets[count] = totalSize
142
+ const offsets = useMemo(() => {
143
+ void version; // reactive dependency — recompute when any height changes
144
+ const arr = new Float64Array(count + 1);
145
+ arr[0] = 0;
146
+ for (let i = 0; i < count; i++) {
147
+ arr[i + 1] = arr[i] + (sizeCache.current.get(i) ?? estimatedItemHeight);
148
+ }
149
+ return arr;
150
+ }, [count, estimatedItemHeight, version]);
151
+ const totalSize = count > 0 ? offsets[count] : 0;
152
+ // ── Visible range + overscan ──────────────────────────────────────────────
153
+ const { startIndex, endIndex } = useMemo(() => {
154
+ if (count === 0)
155
+ return { startIndex: 0, endIndex: -1 };
156
+ // Use a conservative viewport estimate on the first render (before the
157
+ // ResizeObserver fires) so the initial paint always has visible items.
158
+ const effectiveViewport = viewportHeight > 0 ? viewportHeight : estimatedItemHeight * 15;
159
+ const rawStart = findItemAtOffset(offsets, scrollTop, count);
160
+ const rawEnd = findItemAtOffset(offsets, scrollTop + effectiveViewport, count);
161
+ return {
162
+ startIndex: Math.max(0, rawStart - overscan),
163
+ endIndex: Math.min(count - 1, rawEnd + overscan),
164
+ };
165
+ }, [offsets, scrollTop, viewportHeight, count, overscan, estimatedItemHeight]);
166
+ // ── Virtual items ─────────────────────────────────────────────────────────
167
+ const virtualItems = useMemo(() => {
168
+ const items = [];
169
+ for (let i = startIndex; i <= endIndex; i++) {
170
+ items.push({
171
+ index: i,
172
+ start: offsets[i],
173
+ size: offsets[i + 1] - offsets[i],
174
+ });
175
+ }
176
+ return items;
177
+ }, [startIndex, endIndex, offsets]);
178
+ // ── Scroll handlers ───────────────────────────────────────────────────────
179
+ const onScroll = useCallback((e) => {
180
+ setScrollTop(e.currentTarget.scrollTop);
181
+ }, []);
182
+ const scrollToIndex = useCallback((index) => {
183
+ const container = containerRef.current;
184
+ if (!container || index < 0 || index >= count)
185
+ return;
186
+ const itemTop = offsets[index];
187
+ const itemBottom = offsets[index + 1];
188
+ const viewTop = container.scrollTop;
189
+ const viewBottom = viewTop + container.clientHeight;
190
+ if (itemTop < viewTop) {
191
+ container.scrollTop = itemTop;
192
+ }
193
+ else if (itemBottom > viewBottom) {
194
+ container.scrollTop = itemBottom - container.clientHeight;
195
+ }
196
+ }, [offsets, count]);
197
+ return {
198
+ virtualItems,
199
+ totalSize,
200
+ containerRef,
201
+ onScroll,
202
+ measureElement,
203
+ scrollToIndex,
204
+ startIndex,
205
+ endIndex,
206
+ };
207
+ }
208
+ //# sourceMappingURL=useDynamicVirtualList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDynamicVirtualList.js","sourceRoot":"","sources":["../../src/hooks/useDynamicVirtualList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AA8C1E;;;GAGG;AACH,SAAS,gBAAgB,CAAC,OAAqB,EAAE,MAAc,EAAE,KAAa;IAC5E,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAC1B,IAAI,EAAE,GAAG,CAAC,CAAC;IACX,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC,CAAC;IACnB,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC;QACf,MAAM,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,IA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AAG,WAAW,CAC/B,CAAC,KAAa,EAAE,EAAE;QAChB,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAC;QACvC,IAAI,CAAC,SAAS,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,KAAK;YAAE,OAAO;QACtD,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QAC/B,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QACtC,MAAM,OAAO,GAAG,SAAS,CAAC,SAAS,CAAC;QACpC,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC,YAAY,CAAC;QACpD,IAAI,OAAO,GAAG,OAAO,EAAE,CAAC;YACtB,SAAS,CAAC,SAAS,GAAG,OAAO,CAAC;QAChC,CAAC;aAAM,IAAI,UAAU,GAAG,UAAU,EAAE,CAAC;YACnC,SAAS,CAAC,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC,YAAY,CAAC;QAC5D,CAAC;IACH,CAAC,EACD,CAAC,OAAO,EAAE,KAAK,CAAC,CACjB,CAAC;IAEF,OAAO;QACL,YAAY;QACZ,SAAS;QACT,YAAY;QACZ,QAAQ;QACR,cAAc;QACd,aAAa;QACb,UAAU;QACV,QAAQ;KACT,CAAC;AACJ,CAAC"}
@@ -6,7 +6,7 @@ interface UseFixedVirtualListOptions<T> {
6
6
  }
7
7
  export declare function useFixedVirtualList<T>({ items, itemHeight, containerHeight, overscan }: UseFixedVirtualListOptions<T>): {
8
8
  containerProps: {
9
- ref: import('react').RefObject<HTMLDivElement | null>;
9
+ ref: import("react").RefObject<HTMLDivElement | null>;
10
10
  onScroll: (e: React.UIEvent<HTMLDivElement>) => void;
11
11
  style: {
12
12
  maxHeight: string;
@@ -0,0 +1,64 @@
1
+ import { useCallback, useMemo, useRef, useState } from "react";
2
+ export function useFixedVirtualList({ items, itemHeight, containerHeight, overscan = 5 }) {
3
+ const [scrollTop, setScrollTop] = useState(0);
4
+ const containerRef = useRef(null);
5
+ const totalHeight = items.length * itemHeight;
6
+ const { startIndex, endIndex } = useMemo(() => {
7
+ const start = Math.max(0, Math.floor(scrollTop / itemHeight) - overscan);
8
+ const end = Math.min(items.length - 1, Math.floor((scrollTop + containerHeight) / itemHeight) + overscan);
9
+ return { startIndex: start, endIndex: end };
10
+ }, [scrollTop, itemHeight, containerHeight, items.length, overscan]);
11
+ const virtualItems = useMemo(() => {
12
+ const result = [];
13
+ for (let i = startIndex; i <= endIndex; i++) {
14
+ result.push({
15
+ item: items[i],
16
+ index: i,
17
+ offsetTop: i * itemHeight,
18
+ });
19
+ }
20
+ return result;
21
+ }, [items, startIndex, endIndex, itemHeight]);
22
+ const onScroll = useCallback((e) => {
23
+ setScrollTop(e.currentTarget.scrollTop);
24
+ }, []);
25
+ const scrollToIndex = useCallback((index) => {
26
+ const el = containerRef.current;
27
+ if (!el)
28
+ return;
29
+ const top = index * itemHeight;
30
+ const bottom = top + itemHeight;
31
+ const viewTop = el.scrollTop;
32
+ const viewBottom = viewTop + containerHeight;
33
+ if (top < viewTop) {
34
+ el.scrollTop = top;
35
+ }
36
+ else if (bottom > viewBottom) {
37
+ el.scrollTop = bottom - containerHeight;
38
+ }
39
+ }, [itemHeight, containerHeight]);
40
+ return {
41
+ containerProps: {
42
+ ref: containerRef,
43
+ onScroll,
44
+ style: {
45
+ maxHeight: `${containerHeight}px`,
46
+ overflowY: "auto",
47
+ position: "relative",
48
+ },
49
+ },
50
+ innerProps: {
51
+ style: {
52
+ height: `${totalHeight}px`,
53
+ position: "relative",
54
+ width: "100%",
55
+ },
56
+ },
57
+ virtualItems,
58
+ scrollToIndex,
59
+ scrollTop,
60
+ startIndex,
61
+ endIndex,
62
+ };
63
+ }
64
+ //# sourceMappingURL=useFixedVirtualList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFixedVirtualList.js","sourceRoot":"","sources":["../../src/hooks/useFixedVirtualList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW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;aACd;SACF;QACD,YAAY;QACZ,aAAa;QACb,SAAS;QACT,UAAU;QACV,QAAQ;KACT,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ShortcutConfig, UseShortcutOptions } from '../custom-components/shortcut-tooltip/shortcut-tooltip-types';
1
+ import type { ShortcutConfig, UseShortcutOptions } from "../custom-components/shortcut-tooltip/shortcut-tooltip-types";
2
2
  /**
3
3
  * Hook for registering keyboard shortcuts with automatic lifecycle management
4
4
  *
@@ -0,0 +1,86 @@
1
+ import { useContext, useEffect, useCallback, useRef, useMemo } from "react";
2
+ import { ShortcutContext } from "../providers/shortcut/shortcut-context";
3
+ import { useId } from 'react';
4
+ /**
5
+ * Hook for registering keyboard shortcuts with automatic lifecycle management
6
+ *
7
+ * @param options - Configuration options for shortcut behavior
8
+ * @returns Object with register, unregister, activate, deactivate, and trigger functions
9
+ */
10
+ export const useShortcut = (options = {}) => {
11
+ const context = useContext(ShortcutContext);
12
+ const registeredShortcuts = useRef([]);
13
+ const { scope = 'component', enabled = true } = options;
14
+ const id = useId();
15
+ // Generate a unique component ID for component-scoped shortcuts
16
+ const componentId = useMemo(() => scope === 'component' ? `component-${id}` : undefined, [scope, id]);
17
+ if (!context) {
18
+ throw new Error('useShortcut must be used within a ShortcutProvider');
19
+ }
20
+ const { registerShortcut, unregisterShortcut, triggerShortcut, registerComponent, unregisterComponent } = context;
21
+ /**
22
+ * Registers a keyboard shortcut with the specified configuration
23
+ *
24
+ * @param keys - Keyboard combination (e.g., "ctrl+y", "cmd+shift+s")
25
+ * @param config - Shortcut configuration including action, name, and optional hold duration
26
+ *
27
+ * Examples:
28
+ * - Instant: register("ctrl+s", { name: "Save", action: () => save() })
29
+ * - Hold: register("ctrl+y", { name: "Delete", action: () => delete(), holdDuration: 3000 })
30
+ */
31
+ const register = useCallback((keys, config) => {
32
+ if (!enabled)
33
+ return;
34
+ registerShortcut(keys, config, componentId);
35
+ registeredShortcuts.current.push(keys);
36
+ }, [registerShortcut, componentId, enabled]);
37
+ /**
38
+ * Unregisters a previously registered keyboard shortcut
39
+ *
40
+ * @param keys - The keyboard combination to remove (e.g., "ctrl+y")
41
+ */
42
+ const unregister = useCallback((keys) => {
43
+ unregisterShortcut(keys);
44
+ registeredShortcuts.current = registeredShortcuts.current.filter(k => k !== keys);
45
+ }, [unregisterShortcut]);
46
+ /**
47
+ * Event handlers for activating/deactivating component-scoped shortcuts
48
+ * These should be attached to the target element for focus/hover-based activation
49
+ */
50
+ const handleActivate = useCallback(() => {
51
+ if (scope === 'component' && componentId && enabled) {
52
+ registerComponent(componentId);
53
+ }
54
+ }, [scope, componentId, registerComponent, enabled]);
55
+ const handleDeactivate = useCallback(() => {
56
+ if (scope === 'component' && componentId) {
57
+ unregisterComponent(componentId);
58
+ }
59
+ }, [scope, componentId, unregisterComponent]);
60
+ // Auto-cleanup component-scoped shortcuts on unmount
61
+ useEffect(() => {
62
+ if (scope === 'component') {
63
+ return () => {
64
+ registeredShortcuts.current.forEach(keys => {
65
+ unregisterShortcut(keys);
66
+ });
67
+ if (componentId) {
68
+ unregisterComponent(componentId);
69
+ }
70
+ };
71
+ }
72
+ }, [scope, unregisterShortcut, componentId, unregisterComponent]);
73
+ return {
74
+ /** Register a new keyboard shortcut */
75
+ register,
76
+ /** Unregister an existing keyboard shortcut */
77
+ unregister,
78
+ /** Programmatically trigger a shortcut (for testing or manual execution) */
79
+ trigger: triggerShortcut,
80
+ /** Activate component-scoped shortcuts (attach to onFocus/onMouseEnter) */
81
+ activate: handleActivate,
82
+ /** Deactivate component-scoped shortcuts (attach to onBlur/onMouseLeave) */
83
+ deactivate: handleDeactivate,
84
+ };
85
+ };
86
+ //# sourceMappingURL=useShortcut.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useShortcut.js","sourceRoot":"","sources":["../../src/hooks/useShortcut.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,M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4EAA4E;QAC5E,OAAO,EAAE,eAAe;QACxB,2EAA2E;QAC3E,QAAQ,EAAE,cAAc;QACxB,4EAA4E;QAC5E,UAAU,EAAE,gBAAgB;KAC7B,CAAC;AACJ,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
- import { TourContextValue } from './useTour-types';
1
+ import type { TourContextValue } from "./useTour-types";
2
2
  /**
3
3
  * Internal React context for multi-tour coordination.
4
4
  * Import this only in `useTour.tsx` and `useTour-context.tsx`.
5
5
  */
6
- export declare const TourContext: import('react').Context<TourContextValue | null>;
6
+ export declare const TourContext: import("react").Context<TourContextValue | null>;
7
7
  //# sourceMappingURL=useTour-context-internal.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { createContext } from "react";
2
+ /**
3
+ * Internal React context for multi-tour coordination.
4
+ * Import this only in `useTour.tsx` and `useTour-context.tsx`.
5
+ */
6
+ export const TourContext = createContext(null);
7
+ //# sourceMappingURL=useTour-context-internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTour-context-internal.js","sourceRoot":"","sources":["../../../src/hooks/useTour/useTour-context-internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAA0B,IAAI,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
- import { ReactNode } from 'react';
2
- import { TourContext } from './useTour-context-internal';
3
- import { TourManagerInstance } from './useTour-types';
1
+ import type { ReactNode } from "react";
2
+ import { TourContext } from "./useTour-context-internal";
3
+ import type { TourManagerInstance } from "./useTour-types";
4
4
  export { TourContext };
5
5
  interface TourProviderProps {
6
6
  readonly children: ReactNode;
@@ -0,0 +1,54 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useContext, useRef, useState, useCallback } from "react";
3
+ import { TourContext } from "./useTour-context-internal";
4
+ export { TourContext };
5
+ export function TourProvider({ children }) {
6
+ const [activeTourId, setActiveTourIdState] = useState(null);
7
+ const [registeredTourIds, setRegisteredTourIds] = useState([]);
8
+ const instancesRef = useRef({});
9
+ const setActiveTourId = useCallback((tourId) => {
10
+ setActiveTourIdState((prev) => {
11
+ if (prev && prev !== tourId) {
12
+ const prevInstance = instancesRef.current[prev];
13
+ prevInstance?.stop();
14
+ }
15
+ return tourId;
16
+ });
17
+ }, []);
18
+ const registerTour = useCallback((tourId, instance) => {
19
+ instancesRef.current[tourId] = instance;
20
+ setRegisteredTourIds((prev) => (prev.includes(tourId) ? prev : [...prev, tourId]));
21
+ }, []);
22
+ const unregisterTour = useCallback((tourId) => {
23
+ delete instancesRef.current[tourId];
24
+ setRegisteredTourIds((prev) => prev.filter((id) => id !== tourId));
25
+ }, []);
26
+ return (_jsx(TourContext.Provider, { value: { activeTourId, setActiveTourId, instancesRef, registeredTourIds, registerTour, unregisterTour }, children: children }));
27
+ }
28
+ // ─── useTourManager ───────────────────────────────────────────────────────────
29
+ export function useTourManager() {
30
+ const ctx = useContext(TourContext);
31
+ if (!ctx) {
32
+ throw new Error("[useTourManager] must be used inside a <TourProvider>. " + "Wrap your component tree with <TourProvider> to enable multi-tour management.");
33
+ }
34
+ const { activeTourId, setActiveTourId, instancesRef, registeredTourIds } = ctx;
35
+ // Derived from state — safe to compute during render
36
+ const tours = Object.fromEntries(registeredTourIds.map((id) => [id, { tourId: id, isActive: id === activeTourId }]));
37
+ const startTour = useCallback((tourId) => {
38
+ const instance = instancesRef.current[tourId];
39
+ if (!instance) {
40
+ console.warn(`[useTourManager] No tour registered with id "${tourId}".`);
41
+ return;
42
+ }
43
+ setActiveTourId(tourId);
44
+ instance.start();
45
+ }, [instancesRef, setActiveTourId]);
46
+ const stopActiveTour = useCallback(() => {
47
+ if (!activeTourId)
48
+ return;
49
+ instancesRef.current[activeTourId]?.stop();
50
+ setActiveTourId(null);
51
+ }, [activeTourId, instancesRef, setActiveTourId]);
52
+ return { tours, activeTourId, startTour, stopActiveTour };
53
+ }
54
+ //# s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;YACd,OAAO,CAAC,IAAI,CAAC,gDAAgD,MAAM,IAAI,CAAC,CAAC;YACzE,OAAO;QACT,CAAC;QACD,eAAe,CAAC,MAAM,CAAC,CAAC;QACxB,QAAQ,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC,EACD,CAAC,YAAY,EAAE,eAAe,CAAC,CAChC,CAAC;IAEF,MAAM,cAAc,GAAG,WAAW,CAAC,GAAG,EAAE;QACtC,IAAI,CAAC,YAAY;YAAE,OAAO;QAC1B,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC;QAC3C,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;IAElD,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;AAC5D,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ReactNode, MutableRefObject } from 'react';
1
+ import type { ReactNode, MutableRefObject } from "react";
2
2
  export type TourPlacement = "top" | "bottom" | "left" | "right" | "auto";
3
3
  /**
4
4
  * Defines what interaction on the highlighted element automatically advances
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=useTour-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTour-types.js","sourceRoot":"","sources":["../../../src/hooks/useTour/useTour-types.ts"],"names":[],"mappings":""}