@pstdio/ui 0.26.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (620) hide show
  1. package/dist/EquationComponent-DDd5UoIP.js +65 -0
  2. package/dist/EquationComponent-DDd5UoIP.js.map +1 -0
  3. package/dist/MermaidComponent-Cxg7NtjX.js +90 -0
  4. package/dist/MermaidComponent-Cxg7NtjX.js.map +1 -0
  5. package/dist/browser-storage-C_ipoNwP.js +37 -0
  6. package/dist/browser-storage-C_ipoNwP.js.map +1 -0
  7. package/dist/chat-ui.d.ts +688 -2
  8. package/dist/chat-ui.js +3271 -2848
  9. package/dist/chat-ui.js.map +1 -1
  10. package/dist/data-table-stats-row-UuTinYfL.js +415 -0
  11. package/dist/data-table-stats-row-UuTinYfL.js.map +1 -0
  12. package/dist/data-table.d.ts +174 -2
  13. package/dist/data-table.js +1349 -1187
  14. package/dist/data-table.js.map +1 -1
  15. package/dist/diff-bubble-DZsarmSG.js +61 -0
  16. package/dist/diff-bubble-DZsarmSG.js.map +1 -0
  17. package/dist/diff-drawer-45rpk3aq.js +776 -0
  18. package/dist/diff-drawer-45rpk3aq.js.map +1 -0
  19. package/dist/diff-editor-CGpeyoCE.js +124 -0
  20. package/dist/diff-editor-CGpeyoCE.js.map +1 -0
  21. package/dist/diff-size-Dydn_Uw5.js +61 -0
  22. package/dist/diff-size-Dydn_Uw5.js.map +1 -0
  23. package/dist/diff-viewer-hGkaF_zW.js +558 -0
  24. package/dist/diff-viewer-hGkaF_zW.js.map +1 -0
  25. package/dist/diff.d.ts +128 -2
  26. package/dist/diff.js +163 -1302
  27. package/dist/diff.js.map +1 -1
  28. package/dist/empty-state-3mVV_pV-.js +38 -0
  29. package/dist/empty-state-3mVV_pV-.js.map +1 -0
  30. package/dist/file-change-badge-0QFNv82B.js +64 -0
  31. package/dist/file-change-badge-0QFNv82B.js.map +1 -0
  32. package/dist/index-BfFLdci8.d.ts +189 -0
  33. package/dist/index-Dd6e8lU_.d.ts +61 -0
  34. package/dist/index-DlmvvQ6x.d.ts +143 -0
  35. package/dist/index.d.ts +1504 -40
  36. package/dist/index.js +3121 -2707
  37. package/dist/index.js.map +1 -1
  38. package/dist/kanban-renderer.d.ts +339 -2
  39. package/dist/kanban-renderer.js +1413 -1085
  40. package/dist/kanban-renderer.js.map +1 -1
  41. package/dist/list-row-De9R2zKU.js +1008 -0
  42. package/dist/list-row-De9R2zKU.js.map +1 -0
  43. package/dist/mermaid-renderer-DImi0fDp.js +553 -0
  44. package/dist/mermaid-renderer-DImi0fDp.js.map +1 -0
  45. package/dist/mermaid.d.ts +12 -2
  46. package/dist/mermaid.js +2 -5
  47. package/dist/monaco-browser-CLRPSE4-.js +14 -0
  48. package/dist/monaco-browser-CLRPSE4-.js.map +1 -0
  49. package/dist/param-editor-I0dKQeeZ.js +225 -0
  50. package/dist/param-editor-I0dKQeeZ.js.map +1 -0
  51. package/dist/param-editor-field-CBguLs_b.js +2368 -0
  52. package/dist/param-editor-field-CBguLs_b.js.map +1 -0
  53. package/dist/param-editor.d.ts +407 -2
  54. package/dist/param-editor.js +3 -47
  55. package/dist/prism-pSHJejZx.js +646 -0
  56. package/dist/prism-pSHJejZx.js.map +1 -0
  57. package/dist/radio-CiFrDN6O.js +54 -0
  58. package/dist/radio-CiFrDN6O.js.map +1 -0
  59. package/dist/resource-badge-95WPVlZf.d.ts +76 -0
  60. package/dist/rich-text-BgDvOEGH.js +7021 -0
  61. package/dist/rich-text-BgDvOEGH.js.map +1 -0
  62. package/dist/rich-text.d.ts +3 -2
  63. package/dist/rich-text.js +2 -429
  64. package/dist/rolldown-runtime-Dy4uBu1J.js +11 -0
  65. package/dist/scroll-area-Cr1lNXAr.js +100 -0
  66. package/dist/scroll-area-Cr1lNXAr.js.map +1 -0
  67. package/dist/slider-hwHYe98I.js +423 -0
  68. package/dist/slider-hwHYe98I.js.map +1 -0
  69. package/dist/style.css +2 -1
  70. package/dist/terminal.d.ts +203 -2
  71. package/dist/terminal.js +324 -360
  72. package/dist/terminal.js.map +1 -1
  73. package/dist/theme-0cbWICbg.js +2936 -0
  74. package/dist/theme-0cbWICbg.js.map +1 -0
  75. package/dist/theme-preference-pzfuK5cH.js +101 -0
  76. package/dist/theme-preference-pzfuK5cH.js.map +1 -0
  77. package/dist/theme.d.ts +3 -2
  78. package/dist/theme.js +2 -15
  79. package/dist/tree-list-BUfDQz3v.js +1449 -0
  80. package/dist/tree-list-BUfDQz3v.js.map +1 -0
  81. package/dist/types-yjKBk07w.d.ts +161 -0
  82. package/dist/workspace-badge-Brm3Xr3m.d.ts +75 -0
  83. package/dist/workspace-badge-DrvH8WKV.js +241 -0
  84. package/dist/workspace-badge-DrvH8WKV.js.map +1 -0
  85. package/dist-monaco/assets/codicon-ngg6Pgfi.ttf +0 -0
  86. package/dist-monaco/assets/css.worker-DFdt6_zu.js +89 -0
  87. package/dist-monaco/assets/editor.worker-O-CH8JUO.js +26 -0
  88. package/dist-monaco/assets/html.worker-JUzsMP-j.js +502 -0
  89. package/dist-monaco/assets/json.worker-B4dEhy0e.js +58 -0
  90. package/dist-monaco/assets/ts.worker-CmEKzkmF.js +67734 -0
  91. package/dist-monaco/monaco.css +1 -0
  92. package/dist-monaco/monaco.js +1201 -0
  93. package/package.json +26 -13
  94. package/dist/EquationComponent-DeDYHvqY.js +0 -62
  95. package/dist/EquationComponent-DeDYHvqY.js.map +0 -1
  96. package/dist/MermaidComponent-X__B6qib.js +0 -60
  97. package/dist/MermaidComponent-X__B6qib.js.map +0 -1
  98. package/dist/activity-timeline-BynMjXSB.js +0 -283
  99. package/dist/activity-timeline-BynMjXSB.js.map +0 -1
  100. package/dist/alert-ubcrW24X.js +0 -33
  101. package/dist/alert-ubcrW24X.js.map +0 -1
  102. package/dist/browser-storage-BinyFNJX.js +0 -40
  103. package/dist/browser-storage-BinyFNJX.js.map +0 -1
  104. package/dist/components/activity/activity-avatar.d.ts +0 -9
  105. package/dist/components/activity/activity-comment.d.ts +0 -27
  106. package/dist/components/activity/activity-composer.d.ts +0 -18
  107. package/dist/components/activity/activity-event.d.ts +0 -12
  108. package/dist/components/activity/activity-root.d.ts +0 -15
  109. package/dist/components/activity/activity-timeline.d.ts +0 -6
  110. package/dist/components/activity/activity.types.d.ts +0 -5
  111. package/dist/components/activity/index.d.ts +0 -25
  112. package/dist/components/chat-ui/components/ai-conversation.d.ts +0 -603
  113. package/dist/components/chat-ui/components/ai-message.d.ts +0 -91
  114. package/dist/components/chat-ui/components/ai-response.d.ts +0 -5
  115. package/dist/components/chat-ui/components/approval-prompt.d.ts +0 -8
  116. package/dist/components/chat-ui/components/attachment-list.d.ts +0 -23
  117. package/dist/components/chat-ui/components/auto-scroll.d.ts +0 -37
  118. package/dist/components/chat-ui/components/chat-history-story.d.ts +0 -14
  119. package/dist/components/chat-ui/components/chat-input-actions.d.ts +0 -13
  120. package/dist/components/chat-ui/components/chat-input-attachments.d.ts +0 -12
  121. package/dist/components/chat-ui/components/chat-input-history.d.ts +0 -6
  122. package/dist/components/chat-ui/components/chat-input-question-prompt.d.ts +0 -36
  123. package/dist/components/chat-ui/components/chat-input.d.ts +0 -33
  124. package/dist/components/chat-ui/components/chat-message-animation.d.ts +0 -22
  125. package/dist/components/chat-ui/components/chat-message-list-items.d.ts +0 -17
  126. package/dist/components/chat-ui/components/chat-message-list.d.ts +0 -12
  127. package/dist/components/chat-ui/components/chat-panel-composer.d.ts +0 -49
  128. package/dist/components/chat-ui/components/chat-panel-sticky-user-message.d.ts +0 -13
  129. package/dist/components/chat-ui/components/chat-panel.d.ts +0 -45
  130. package/dist/components/chat-ui/components/chat-skeleton.d.ts +0 -1
  131. package/dist/components/chat-ui/components/composer-constants.d.ts +0 -1
  132. package/dist/components/chat-ui/components/conversation-browse.d.ts +0 -22
  133. package/dist/components/chat-ui/components/message-action-panel.d.ts +0 -10
  134. package/dist/components/chat-ui/components/message-parts-renderer.d.ts +0 -13
  135. package/dist/components/chat-ui/components/message-types.d.ts +0 -116
  136. package/dist/components/chat-ui/components/model-swap-separator.d.ts +0 -5
  137. package/dist/components/chat-ui/components/queued-follow-up-list-state.d.ts +0 -4
  138. package/dist/components/chat-ui/components/queued-follow-up-list.d.ts +0 -11
  139. package/dist/components/chat-ui/components/send-button.d.ts +0 -7
  140. package/dist/components/chat-ui/components/timeline-title.d.ts +0 -6
  141. package/dist/components/chat-ui/components/timeline-tool-blocks.d.ts +0 -14
  142. package/dist/components/chat-ui/components/timeline.d.ts +0 -113
  143. package/dist/components/chat-ui/components/tool-invocation-timeline.d.ts +0 -8
  144. package/dist/components/chat-ui/components/use-chat-input-history.d.ts +0 -16
  145. package/dist/components/chat-ui/components/working-indicator.d.ts +0 -9
  146. package/dist/components/chat-ui/components/workspace-hub.d.ts +0 -19
  147. package/dist/components/chat-ui/index.d.ts +0 -19
  148. package/dist/components/chat-ui/mocks/library/index.d.ts +0 -10
  149. package/dist/components/chat-ui/performance/chat-mount-metrics.d.ts +0 -37
  150. package/dist/components/chat-ui/performance/chat-panel.perf.d.ts +0 -18
  151. package/dist/components/chat-ui/performance/chat-performance-fixtures.d.ts +0 -28
  152. package/dist/components/chat-ui/performance/chat-performance-panel.d.ts +0 -23
  153. package/dist/components/chat-ui/performance/chat-performance-story-utils.d.ts +0 -30
  154. package/dist/components/chat-ui/tool-rendering/apply-patch-renderer.d.ts +0 -2
  155. package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +0 -13
  156. package/dist/components/chat-ui/tool-rendering/default-renderers.d.ts +0 -13
  157. package/dist/components/chat-ui/tool-rendering/edit-renderer.d.ts +0 -2
  158. package/dist/components/chat-ui/tool-rendering/index.d.ts +0 -3
  159. package/dist/components/chat-ui/tool-rendering/question-prompt.d.ts +0 -9
  160. package/dist/components/chat-ui/tool-rendering/question-renderer.d.ts +0 -10
  161. package/dist/components/chat-ui/tool-rendering/shared.d.ts +0 -53
  162. package/dist/components/chat-ui/tool-rendering/standard-renderers.d.ts +0 -7
  163. package/dist/components/chat-ui/tool-rendering/todowrite-renderer.d.ts +0 -10
  164. package/dist/components/chat-ui/tool-rendering/types.d.ts +0 -12
  165. package/dist/components/chat-ui/utils/diff.d.ts +0 -21
  166. package/dist/components/chat-ui/utils/editor-state.d.ts +0 -1
  167. package/dist/components/chat-ui/utils/get-icon.d.ts +0 -36
  168. package/dist/components/chat-ui/utils/tool-name.d.ts +0 -2
  169. package/dist/components/command-palette/index.d.ts +0 -4
  170. package/dist/components/command-palette/palette-filter.d.ts +0 -23
  171. package/dist/components/command-palette/palette-list.d.ts +0 -11
  172. package/dist/components/command-palette/palette-shortcut.d.ts +0 -12
  173. package/dist/components/command-palette/palette.d.ts +0 -48
  174. package/dist/components/data-table/build-columns.d.ts +0 -16
  175. package/dist/components/data-table/categorical-color-cell.d.ts +0 -8
  176. package/dist/components/data-table/color-cell-style.d.ts +0 -13
  177. package/dist/components/data-table/color-scale-cell.d.ts +0 -7
  178. package/dist/components/data-table/data-table-column-menu.d.ts +0 -17
  179. package/dist/components/data-table/data-table-header.d.ts +0 -12
  180. package/dist/components/data-table/data-table-row-display.d.ts +0 -11
  181. package/dist/components/data-table/data-table-skeleton.d.ts +0 -13
  182. package/dist/components/data-table/data-table-stat-chart.d.ts +0 -21
  183. package/dist/components/data-table/data-table-state.d.ts +0 -27
  184. package/dist/components/data-table/data-table-stats-row.d.ts +0 -11
  185. package/dist/components/data-table/data-table-stats.d.ts +0 -19
  186. package/dist/components/data-table/data-table-table-parts.d.ts +0 -22
  187. package/dist/components/data-table/data-table.d.ts +0 -2
  188. package/dist/components/data-table/data-table.story-descriptions.d.ts +0 -6
  189. package/dist/components/data-table/data-table.story-fixtures.d.ts +0 -6
  190. package/dist/components/data-table/edit-mode-data-table-body.d.ts +0 -30
  191. package/dist/components/data-table/edit-mode-data-table-cell.d.ts +0 -16
  192. package/dist/components/data-table/edit-mode-data-table-editors.d.ts +0 -19
  193. package/dist/components/data-table/edit-mode-data-table-header.d.ts +0 -24
  194. package/dist/components/data-table/edit-mode-data-table-selection.d.ts +0 -12
  195. package/dist/components/data-table/edit-mode-data-table.d.ts +0 -2
  196. package/dist/components/data-table/edit-mode-story.d.ts +0 -5
  197. package/dist/components/data-table/friendly-json-display.d.ts +0 -31
  198. package/dist/components/data-table/helpers.d.ts +0 -10
  199. package/dist/components/data-table/index.d.ts +0 -7
  200. package/dist/components/data-table/json-cell.d.ts +0 -6
  201. package/dist/components/data-table/pagination-footer.d.ts +0 -11
  202. package/dist/components/data-table/selection-toolbar.d.ts +0 -11
  203. package/dist/components/data-table/types.d.ts +0 -117
  204. package/dist/components/diff-viewer/build-changed-files-tree.d.ts +0 -4
  205. package/dist/components/diff-viewer/code-editor.d.ts +0 -45
  206. package/dist/components/diff-viewer/diff-bubble.d.ts +0 -14
  207. package/dist/components/diff-viewer/diff-card-body.d.ts +0 -60
  208. package/dist/components/diff-viewer/diff-card-content.d.ts +0 -23
  209. package/dist/components/diff-viewer/diff-card-load-state.d.ts +0 -9
  210. package/dist/components/diff-viewer/diff-card.d.ts +0 -46
  211. package/dist/components/diff-viewer/diff-drawer-empty-state.d.ts +0 -1
  212. package/dist/components/diff-viewer/diff-drawer-height.d.ts +0 -10
  213. package/dist/components/diff-viewer/diff-drawer-scroll.d.ts +0 -28
  214. package/dist/components/diff-viewer/diff-drawer.d.ts +0 -29
  215. package/dist/components/diff-viewer/diff-editor.d.ts +0 -20
  216. package/dist/components/diff-viewer/diff-size.d.ts +0 -16
  217. package/dist/components/diff-viewer/diff-view-adapter.d.ts +0 -27
  218. package/dist/components/diff-viewer/diff-viewer-options-menu.d.ts +0 -16
  219. package/dist/components/diff-viewer/diff-viewer.d.ts +0 -14
  220. package/dist/components/diff-viewer/diff-viewer.store.d.ts +0 -21
  221. package/dist/components/diff-viewer/file-change-badge.d.ts +0 -3
  222. package/dist/components/diff-viewer/file-list-panel.d.ts +0 -18
  223. package/dist/components/diff-viewer/index.d.ts +0 -9
  224. package/dist/components/diff-viewer/monaco-browser.d.ts +0 -1
  225. package/dist/components/diff-viewer/types.d.ts +0 -13
  226. package/dist/components/diff-viewer/use-selected-diff-scroll.d.ts +0 -23
  227. package/dist/components/file-browser/column-file-browser.d.ts +0 -20
  228. package/dist/components/internal/performance-panel.d.ts +0 -40
  229. package/dist/components/internal/style-guide.d.ts +0 -14
  230. package/dist/components/internal/token-editor-controls.d.ts +0 -8
  231. package/dist/components/internal/token-editor-data.d.ts +0 -40
  232. package/dist/components/internal/token-editor-state.d.ts +0 -22
  233. package/dist/components/kanban-renderer/collection-badge.d.ts +0 -7
  234. package/dist/components/kanban-renderer/display-menu.d.ts +0 -16
  235. package/dist/components/kanban-renderer/filter-menu.d.ts +0 -12
  236. package/dist/components/kanban-renderer/index.d.ts +0 -19
  237. package/dist/components/kanban-renderer/kanban-renderer-attribute-badge.d.ts +0 -7
  238. package/dist/components/kanban-renderer/kanban-renderer-badge-helpers.d.ts +0 -46
  239. package/dist/components/kanban-renderer/kanban-renderer-board-column-header.d.ts +0 -8
  240. package/dist/components/kanban-renderer/kanban-renderer-board-group-section.d.ts +0 -17
  241. package/dist/components/kanban-renderer/kanban-renderer-board-move.d.ts +0 -21
  242. package/dist/components/kanban-renderer/kanban-renderer-board.d.ts +0 -49
  243. package/dist/components/kanban-renderer/kanban-renderer-card.d.ts +0 -17
  244. package/dist/components/kanban-renderer/kanban-renderer-content.d.ts +0 -27
  245. package/dist/components/kanban-renderer/kanban-renderer-create-dialog.d.ts +0 -12
  246. package/dist/components/kanban-renderer/kanban-renderer-create-field.d.ts +0 -10
  247. package/dist/components/kanban-renderer/kanban-renderer-enum-helpers.d.ts +0 -10
  248. package/dist/components/kanban-renderer/kanban-renderer-grouping.d.ts +0 -23
  249. package/dist/components/kanban-renderer/kanban-renderer-helpers.d.ts +0 -58
  250. package/dist/components/kanban-renderer/kanban-renderer-list-items.d.ts +0 -25
  251. package/dist/components/kanban-renderer/kanban-renderer-list.d.ts +0 -43
  252. package/dist/components/kanban-renderer/kanban-renderer-story-fixtures.d.ts +0 -14
  253. package/dist/components/kanban-renderer/kanban-renderer-toolbar.d.ts +0 -15
  254. package/dist/components/kanban-renderer/kanban-renderer-view-bar.d.ts +0 -14
  255. package/dist/components/kanban-renderer/kanban-renderer-views.d.ts +0 -12
  256. package/dist/components/kanban-renderer/kanban-renderer.d.ts +0 -43
  257. package/dist/components/kanban-renderer/types.d.ts +0 -159
  258. package/dist/components/kanban-renderer/use-kanban-renderer-store.d.ts +0 -78
  259. package/dist/components/kanban-renderer/use-resolved-attributes.d.ts +0 -14
  260. package/dist/components/layout/header.d.ts +0 -7
  261. package/dist/components/layout/horizontal-menu-stack.d.ts +0 -6
  262. package/dist/components/layout/index.d.ts +0 -8
  263. package/dist/components/layout/item-section.d.ts +0 -11
  264. package/dist/components/layout/panel-header.constants.d.ts +0 -3
  265. package/dist/components/layout/resizable-split-layout.d.ts +0 -22
  266. package/dist/components/layout/resizable-split-layout.geometry.d.ts +0 -56
  267. package/dist/components/layout/resizable-split-layout.handle.d.ts +0 -25
  268. package/dist/components/layout/resizable-split-layout.panels.d.ts +0 -29
  269. package/dist/components/layout/resizable-split-layout.root-size.d.ts +0 -3
  270. package/dist/components/list-row/list-row-actions.d.ts +0 -11
  271. package/dist/components/list-row/list-row-chrome.d.ts +0 -11
  272. package/dist/components/list-row/list-row-content.d.ts +0 -17
  273. package/dist/components/list-row/list-row-menu.d.ts +0 -12
  274. package/dist/components/list-row/list-row-root-props.d.ts +0 -34
  275. package/dist/components/list-row/list-row.d.ts +0 -2
  276. package/dist/components/list-row/list-row.types.d.ts +0 -109
  277. package/dist/components/list-row/searchable-action-menu.d.ts +0 -6
  278. package/dist/components/mermaid-renderer/download-png.d.ts +0 -7
  279. package/dist/components/mermaid-renderer/index.d.ts +0 -2
  280. package/dist/components/mermaid-renderer/mermaid-error-state.d.ts +0 -6
  281. package/dist/components/mermaid-renderer/mermaid-fixtures.d.ts +0 -9
  282. package/dist/components/mermaid-renderer/mermaid-fullscreen.d.ts +0 -10
  283. package/dist/components/mermaid-renderer/mermaid-renderer.d.ts +0 -8
  284. package/dist/components/mermaid-renderer/mermaid-svg-view.d.ts +0 -12
  285. package/dist/components/mermaid-renderer/mermaid-toolbar.d.ts +0 -12
  286. package/dist/components/mermaid-renderer/mermaid-zoom.d.ts +0 -6
  287. package/dist/components/mermaid-renderer/svg-data-url.d.ts +0 -6
  288. package/dist/components/mermaid-renderer/use-mermaid-render.d.ts +0 -5
  289. package/dist/components/notification-center/index.d.ts +0 -2
  290. package/dist/components/notification-center/notification-center.d.ts +0 -2
  291. package/dist/components/notification-center/notification-center.types.d.ts +0 -37
  292. package/dist/components/overlays/attached-menu.d.ts +0 -6
  293. package/dist/components/overlays/attached-panel.d.ts +0 -9
  294. package/dist/components/overlays/attachment-chip.d.ts +0 -13
  295. package/dist/components/overlays/bubble-button.d.ts +0 -10
  296. package/dist/components/overlays/bubble-panel.d.ts +0 -18
  297. package/dist/components/overlays/delete-confirmation-modal.d.ts +0 -13
  298. package/dist/components/overlays/dialog-accept-shortcut.d.ts +0 -12
  299. package/dist/components/overlays/index.d.ts +0 -17
  300. package/dist/components/overlays/repo-picker-dialog.d.ts +0 -25
  301. package/dist/components/overlays/resource-context-menu.d.ts +0 -35
  302. package/dist/components/overlays/search-modal-content.d.ts +0 -20
  303. package/dist/components/overlays/searchable-menu-input.d.ts +0 -9
  304. package/dist/components/overlays/searchable-menu.d.ts +0 -65
  305. package/dist/components/param-editor/index.d.ts +0 -31
  306. package/dist/components/param-editor/inputs/action-input.d.ts +0 -14
  307. package/dist/components/param-editor/inputs/anchor-grid-input.d.ts +0 -12
  308. package/dist/components/param-editor/inputs/anchor-grid.d.ts +0 -4
  309. package/dist/components/param-editor/inputs/boolean-input.d.ts +0 -13
  310. package/dist/components/param-editor/inputs/color-input.d.ts +0 -14
  311. package/dist/components/param-editor/inputs/date-input.d.ts +0 -16
  312. package/dist/components/param-editor/inputs/file-upload-input.d.ts +0 -15
  313. package/dist/components/param-editor/inputs/file-upload-value.d.ts +0 -7
  314. package/dist/components/param-editor/inputs/horizontal-text-input.d.ts +0 -13
  315. package/dist/components/param-editor/inputs/markdown-input.d.ts +0 -13
  316. package/dist/components/param-editor/inputs/number-input.d.ts +0 -18
  317. package/dist/components/param-editor/inputs/numeric-value.d.ts +0 -6
  318. package/dist/components/param-editor/inputs/range-input.d.ts +0 -18
  319. package/dist/components/param-editor/inputs/range-value.d.ts +0 -5
  320. package/dist/components/param-editor/inputs/resource-input-chips.d.ts +0 -15
  321. package/dist/components/param-editor/inputs/resource-input.d.ts +0 -20
  322. package/dist/components/param-editor/inputs/segmented-input.d.ts +0 -15
  323. package/dist/components/param-editor/inputs/selection-input.d.ts +0 -27
  324. package/dist/components/param-editor/inputs/selection-menu.d.ts +0 -39
  325. package/dist/components/param-editor/inputs/slider-marks.d.ts +0 -5
  326. package/dist/components/param-editor/inputs/text-input.d.ts +0 -14
  327. package/dist/components/param-editor/inputs/vector-input.d.ts +0 -17
  328. package/dist/components/param-editor/inputs/vector-value.d.ts +0 -7
  329. package/dist/components/param-editor/param-editor-advanced-field.d.ts +0 -14
  330. package/dist/components/param-editor/param-editor-control-fixtures.d.ts +0 -24
  331. package/dist/components/param-editor/param-editor-control-item.d.ts +0 -15
  332. package/dist/components/param-editor/param-editor-control-list.d.ts +0 -5
  333. package/dist/components/param-editor/param-editor-field-label.d.ts +0 -1
  334. package/dist/components/param-editor/param-editor-field.d.ts +0 -13
  335. package/dist/components/param-editor/param-editor-horizontal.d.ts +0 -11
  336. package/dist/components/param-editor/param-editor-inline-group.d.ts +0 -5
  337. package/dist/components/param-editor/param-editor-label.d.ts +0 -7
  338. package/dist/components/param-editor/param-editor-presentation.d.ts +0 -3
  339. package/dist/components/param-editor/param-editor-read-only-field.d.ts +0 -9
  340. package/dist/components/param-editor/param-editor-read-only-value.d.ts +0 -8
  341. package/dist/components/param-editor/param-editor-row.d.ts +0 -17
  342. package/dist/components/param-editor/param-editor-section.d.ts +0 -17
  343. package/dist/components/param-editor/param-editor.d.ts +0 -12
  344. package/dist/components/param-editor/param-editor.types.d.ts +0 -31
  345. package/dist/components/param-editor/resolve-param-value.d.ts +0 -2
  346. package/dist/components/primitives/alert.d.ts +0 -9
  347. package/dist/components/primitives/breadcrumb.d.ts +0 -20
  348. package/dist/components/primitives/checkbox.d.ts +0 -8
  349. package/dist/components/primitives/chip.d.ts +0 -4
  350. package/dist/components/primitives/content-placeholder.d.ts +0 -6
  351. package/dist/components/primitives/empty-state.d.ts +0 -12
  352. package/dist/components/primitives/error-boundary.d.ts +0 -26
  353. package/dist/components/primitives/glyph-icon.d.ts +0 -16
  354. package/dist/components/primitives/icon-color-picker.d.ts +0 -15
  355. package/dist/components/primitives/icon-options.d.ts +0 -301
  356. package/dist/components/primitives/index.d.ts +0 -39
  357. package/dist/components/primitives/info-card.d.ts +0 -12
  358. package/dist/components/primitives/integration-card.d.ts +0 -12
  359. package/dist/components/primitives/number-input.d.ts +0 -6
  360. package/dist/components/primitives/radio.d.ts +0 -8
  361. package/dist/components/primitives/resource-badge.d.ts +0 -64
  362. package/dist/components/primitives/scroll-area.d.ts +0 -17
  363. package/dist/components/primitives/segmented-control.d.ts +0 -20
  364. package/dist/components/primitives/session-indicator.d.ts +0 -15
  365. package/dist/components/primitives/simple-card.d.ts +0 -5
  366. package/dist/components/primitives/slider.d.ts +0 -5
  367. package/dist/components/primitives/switch.d.ts +0 -15
  368. package/dist/components/primitives/tag-swatch.d.ts +0 -10
  369. package/dist/components/primitives/toaster.d.ts +0 -3
  370. package/dist/components/primitives/tooltip.d.ts +0 -11
  371. package/dist/components/primitives/workspace-badge.d.ts +0 -23
  372. package/dist/components/rich-text/collaborative-markdown-editor/awareness-cursors.d.ts +0 -5
  373. package/dist/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.d.ts +0 -9
  374. package/dist/components/rich-text/index.d.ts +0 -19
  375. package/dist/components/rich-text/lazy-markdown-editor.d.ts +0 -2
  376. package/dist/components/rich-text/markdown-editor/markdown-editor-scrolling.play.d.ts +0 -4
  377. package/dist/components/rich-text/markdown-editor/markdown-editor.d.ts +0 -17
  378. package/dist/components/rich-text/markdown-editor/markdown-table.story-fixture.d.ts +0 -3
  379. package/dist/components/rich-text/markdown-editor/plugins/MarkdownSectionNavigationPlugin.d.ts +0 -8
  380. package/dist/components/rich-text/markdown-editor/plugins/MarkdownSlashCommandPlugin.d.ts +0 -1
  381. package/dist/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +0 -21
  382. package/dist/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +0 -2
  383. package/dist/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/index.d.ts +0 -2
  384. package/dist/components/rich-text/markdown-editor/plugins/markdown-history-plugin.d.ts +0 -1
  385. package/dist/components/rich-text/markdown-editor/plugins/markdown-section-navigation.d.ts +0 -20
  386. package/dist/components/rich-text/prompt-input/commands.d.ts +0 -2
  387. package/dist/components/rich-text/prompt-input/events.d.ts +0 -2
  388. package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.d.ts +0 -1
  389. package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.d.ts +0 -3
  390. package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.d.ts +0 -1
  391. package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +0 -16
  392. package/dist/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.d.ts +0 -7
  393. package/dist/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.d.ts +0 -6
  394. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuOption.d.ts +0 -12
  395. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.d.ts +0 -11
  396. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.d.ts +0 -9
  397. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.d.ts +0 -12
  398. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.d.ts +0 -2
  399. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.d.ts +0 -14
  400. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.d.ts +0 -9
  401. package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.d.ts +0 -2
  402. package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.d.ts +0 -7
  403. package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +0 -25
  404. package/dist/components/rich-text/prompt-input/plugins/keyboard-shortcuts.d.ts +0 -11
  405. package/dist/components/rich-text/prompt-input/prompt-input.d.ts +0 -27
  406. package/dist/components/rich-text/prompt-input/theme/prompt-input-theme.d.ts +0 -3
  407. package/dist/components/rich-text/prompt-input/utils.d.ts +0 -22
  408. package/dist/components/rich-text/resource-activity-feed/resource-activity-feed.d.ts +0 -58
  409. package/dist/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +0 -21
  410. package/dist/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +0 -2
  411. package/dist/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/index.d.ts +0 -2
  412. package/dist/components/rich-text/rich-message/rich-message.d.ts +0 -10
  413. package/dist/components/rich-text/shared/components/content-editable.d.ts +0 -9
  414. package/dist/components/rich-text/shared/components/default-rich-text-components.d.ts +0 -3
  415. package/dist/components/rich-text/shared/editor-config.d.ts +0 -5
  416. package/dist/components/rich-text/shared/lexical-code.d.ts +0 -2
  417. package/dist/components/rich-text/shared/markdown-ast.d.ts +0 -7
  418. package/dist/components/rich-text/shared/markdown-codec.d.ts +0 -3
  419. package/dist/components/rich-text/shared/markdown-export.d.ts +0 -2
  420. package/dist/components/rich-text/shared/markdown-import.d.ts +0 -2
  421. package/dist/components/rich-text/shared/markdown-inline.d.ts +0 -5
  422. package/dist/components/rich-text/shared/markdown-source-document.d.ts +0 -7
  423. package/dist/components/rich-text/shared/markdown-source-links.d.ts +0 -11
  424. package/dist/components/rich-text/shared/markdown-source-map.d.ts +0 -10
  425. package/dist/components/rich-text/shared/markdown-table.d.ts +0 -41
  426. package/dist/components/rich-text/shared/markdown-url-context.d.ts +0 -9
  427. package/dist/components/rich-text/shared/markdown-url.d.ts +0 -3
  428. package/dist/components/rich-text/shared/nodes/DataTableNode.d.ts +0 -24
  429. package/dist/components/rich-text/shared/nodes/MarkdownImageNode.d.ts +0 -35
  430. package/dist/components/rich-text/shared/nodes/MarkdownLinkNode.d.ts +0 -18
  431. package/dist/components/rich-text/shared/nodes/RawHtmlNode.d.ts +0 -31
  432. package/dist/components/rich-text/shared/plugins/CodePlugin/CodeBlockActionsPlugin.d.ts +0 -4
  433. package/dist/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.d.ts +0 -3
  434. package/dist/components/rich-text/shared/plugins/CodePlugin/CodeHighlightingPlugin.d.ts +0 -1
  435. package/dist/components/rich-text/shared/plugins/EquationPlugin/EquationComponent.d.ts +0 -6
  436. package/dist/components/rich-text/shared/plugins/EquationPlugin/EquationNode.d.ts +0 -26
  437. package/dist/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.d.ts +0 -4
  438. package/dist/components/rich-text/shared/plugins/EquationPlugin/KatexRenderer.d.ts +0 -4
  439. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.d.ts +0 -4
  440. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/floating-toolbar-buttons.d.ts +0 -18
  441. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +0 -1
  442. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/resolve-block-type.d.ts +0 -17
  443. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/should-show-floating-toolbar.d.ts +0 -12
  444. package/dist/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.d.ts +0 -13
  445. package/dist/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.d.ts +0 -2
  446. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.d.ts +0 -4
  447. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.d.ts +0 -1
  448. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/commands.d.ts +0 -2
  449. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/index.d.ts +0 -3
  450. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/link-editor-content.d.ts +0 -18
  451. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.d.ts +0 -2
  452. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/link-edit-state.d.ts +0 -1
  453. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/selection-link-url.d.ts +0 -2
  454. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.d.ts +0 -1
  455. package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.d.ts +0 -2
  456. package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidComponent.d.ts +0 -6
  457. package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidNode.d.ts +0 -23
  458. package/dist/components/rich-text/shared/plugins/StateUpdatePlugin.d.ts +0 -6
  459. package/dist/components/rich-text/shared/plugins/ToggleEditablePlugin.d.ts +0 -3
  460. package/dist/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +0 -1
  461. package/dist/components/rich-text/shared/prism-global.d.ts +0 -2
  462. package/dist/components/rich-text/shared/transformers/markdown-transformers-test-utils.d.ts +0 -3
  463. package/dist/components/rich-text/shared/transformers/markdown-transformers.d.ts +0 -16
  464. package/dist/components/rich-text/shared/types/rich-text-components.d.ts +0 -15
  465. package/dist/components/rich-text/theme/rich-text-theme.d.ts +0 -3
  466. package/dist/components/rich-text/types.d.ts +0 -8
  467. package/dist/components/rich-text/utils/inferResourceType.d.ts +0 -1
  468. package/dist/components/rich-text/utils/markdown.d.ts +0 -5
  469. package/dist/components/rich-text/utils/mediaType.d.ts +0 -1
  470. package/dist/components/sidenav/sidenav-footer.d.ts +0 -6
  471. package/dist/components/sidenav/sidenav-header.d.ts +0 -6
  472. package/dist/components/sidenav/sidenav.d.ts +0 -2
  473. package/dist/components/sidenav/sidenav.store.d.ts +0 -49
  474. package/dist/components/sidenav/sidenav.types.d.ts +0 -31
  475. package/dist/components/tab-strip/tab-visibility-filter.d.ts +0 -22
  476. package/dist/components/tab-strip/tab-visibility.store.d.ts +0 -41
  477. package/dist/components/tab-strip/window-tabs.d.ts +0 -15
  478. package/dist/components/tab-strip/window-title-bar.d.ts +0 -6
  479. package/dist/components/tag-editor/index.d.ts +0 -8
  480. package/dist/components/tag-editor/tag-editor-heading.d.ts +0 -11
  481. package/dist/components/tag-editor/tag-editor-row.d.ts +0 -20
  482. package/dist/components/tag-editor/tag-editor-save-bar.d.ts +0 -13
  483. package/dist/components/tag-editor/tag-editor.d.ts +0 -2
  484. package/dist/components/tag-editor/tag-editor.types.d.ts +0 -57
  485. package/dist/components/tag-editor/tag-settings-panel.d.ts +0 -30
  486. package/dist/components/terminal/bind-session.d.ts +0 -33
  487. package/dist/components/terminal/index.d.ts +0 -6
  488. package/dist/components/terminal/scripted-bridge.d.ts +0 -35
  489. package/dist/components/terminal/terminal-contract.d.ts +0 -22
  490. package/dist/components/terminal/terminal-theme.d.ts +0 -12
  491. package/dist/components/terminal/terminal.d.ts +0 -56
  492. package/dist/components/terminal/types.d.ts +0 -35
  493. package/dist/components/terminal/use-terminal-session.d.ts +0 -21
  494. package/dist/components/tree-list/tree-list-background.d.ts +0 -8
  495. package/dist/components/tree-list/tree-list-drag-provider.d.ts +0 -13
  496. package/dist/components/tree-list/tree-list-drag.d.ts +0 -7
  497. package/dist/components/tree-list/tree-list-inline-creation-story.d.ts +0 -3
  498. package/dist/components/tree-list/tree-list-inline-input.d.ts +0 -9
  499. package/dist/components/tree-list/tree-list-model.d.ts +0 -58
  500. package/dist/components/tree-list/tree-list-move-surface.d.ts +0 -7
  501. package/dist/components/tree-list/tree-list-node-row.d.ts +0 -21
  502. package/dist/components/tree-list/tree-list-order-filter.d.ts +0 -2
  503. package/dist/components/tree-list/tree-list-order.store.d.ts +0 -45
  504. package/dist/components/tree-list/tree-list-reorder.d.ts +0 -24
  505. package/dist/components/tree-list/tree-list-section-header.d.ts +0 -14
  506. package/dist/components/tree-list/tree-list-sortable.d.ts +0 -24
  507. package/dist/components/tree-list/tree-list-visibility-filter.d.ts +0 -24
  508. package/dist/components/tree-list/tree-list-visibility.store.d.ts +0 -45
  509. package/dist/components/tree-list/tree-list.d.ts +0 -41
  510. package/dist/components/tree-list/tree-list.types.d.ts +0 -63
  511. package/dist/components/tree-list/use-tree-list-keyboard-navigation.d.ts +0 -15
  512. package/dist/diff-bubble-DvUPRnfB.js +0 -183
  513. package/dist/diff-bubble-DvUPRnfB.js.map +0 -1
  514. package/dist/edit-mode-data-table-Nfmfi7bz.js +0 -847
  515. package/dist/edit-mode-data-table-Nfmfi7bz.js.map +0 -1
  516. package/dist/empty-state-Bo4HVrgr.js +0 -34
  517. package/dist/empty-state-Bo4HVrgr.js.map +0 -1
  518. package/dist/foundations/gallery/gallery-frame.d.ts +0 -21
  519. package/dist/foundations/gallery/sections/badges-section.d.ts +0 -1
  520. package/dist/foundations/gallery/sections/buttons-section.d.ts +0 -1
  521. package/dist/foundations/gallery/sections/composite-chat-section.d.ts +0 -1
  522. package/dist/foundations/gallery/sections/composites-section.d.ts +0 -1
  523. package/dist/foundations/gallery/sections/feedback-section.d.ts +0 -1
  524. package/dist/foundations/gallery/sections/input-authoring-card.d.ts +0 -1
  525. package/dist/foundations/gallery/sections/inputs-section.d.ts +0 -1
  526. package/dist/foundations/gallery/sections/layout-section.d.ts +0 -1
  527. package/dist/foundations/gallery/sections/navigation-identity-section.d.ts +0 -1
  528. package/dist/foundations/gallery/sections/overlays-section.d.ts +0 -1
  529. package/dist/foundations/gallery/sections/panels-section.d.ts +0 -1
  530. package/dist/foundations/gallery/sections/param-editor-composite-card.d.ts +0 -1
  531. package/dist/foundations/gallery/sections/settings-composite-cards.d.ts +0 -1
  532. package/dist/kanban-renderer-toolbar-Buek4icz.js +0 -1375
  533. package/dist/kanban-renderer-toolbar-Buek4icz.js.map +0 -1
  534. package/dist/lazy-markdown-editor-PzIBc9-l.js +0 -42
  535. package/dist/lazy-markdown-editor-PzIBc9-l.js.map +0 -1
  536. package/dist/list-row-DHzRa9-O.js +0 -815
  537. package/dist/list-row-DHzRa9-O.js.map +0 -1
  538. package/dist/markdown-BCfPxNpb.js +0 -1663
  539. package/dist/markdown-BCfPxNpb.js.map +0 -1
  540. package/dist/markdown-editor-CsJ4KNGu.js +0 -1034
  541. package/dist/markdown-editor-CsJ4KNGu.js.map +0 -1
  542. package/dist/mermaid-renderer-D0YP0FmJ.js +0 -425
  543. package/dist/mermaid-renderer-D0YP0FmJ.js.map +0 -1
  544. package/dist/mermaid.js.map +0 -1
  545. package/dist/monaco-browser-l82HnffN.js +0 -22
  546. package/dist/monaco-browser-l82HnffN.js.map +0 -1
  547. package/dist/param-editor-CFM2Nf3l.js +0 -161
  548. package/dist/param-editor-CFM2Nf3l.js.map +0 -1
  549. package/dist/param-editor-field-Bj-AGUY6.js +0 -1728
  550. package/dist/param-editor-field-Bj-AGUY6.js.map +0 -1
  551. package/dist/param-editor.js.map +0 -1
  552. package/dist/prism-n5gcERyD.js +0 -202
  553. package/dist/prism-n5gcERyD.js.map +0 -1
  554. package/dist/radio-BfjibByI.js +0 -51
  555. package/dist/radio-BfjibByI.js.map +0 -1
  556. package/dist/rich-message-q6Y6QJOq.js +0 -633
  557. package/dist/rich-message-q6Y6QJOq.js.map +0 -1
  558. package/dist/rich-text.js.map +0 -1
  559. package/dist/scroll-area-BMbg1WcD.js +0 -91
  560. package/dist/scroll-area-BMbg1WcD.js.map +0 -1
  561. package/dist/slider-DBHjdxsU.js +0 -1092
  562. package/dist/slider-DBHjdxsU.js.map +0 -1
  563. package/dist/test-utils/local-storage.d.ts +0 -1
  564. package/dist/theme/custom/index.d.ts +0 -2
  565. package/dist/theme/custom/vscode-theme.d.ts +0 -32
  566. package/dist/theme/global.d.ts +0 -62
  567. package/dist/theme/index.d.ts +0 -3
  568. package/dist/theme/primitives/colors.d.ts +0 -1081
  569. package/dist/theme/primitives/fonts.d.ts +0 -84
  570. package/dist/theme/primitives/sizes.d.ts +0 -207
  571. package/dist/theme/recipes/activity-comment.d.ts +0 -36
  572. package/dist/theme/recipes/alert.d.ts +0 -1
  573. package/dist/theme/recipes/badge.d.ts +0 -58
  574. package/dist/theme/recipes/button.d.ts +0 -188
  575. package/dist/theme/recipes/color-picker.d.ts +0 -18
  576. package/dist/theme/recipes/dialog.d.ts +0 -1
  577. package/dist/theme/recipes/divider.d.ts +0 -1
  578. package/dist/theme/recipes/drawer.d.ts +0 -1
  579. package/dist/theme/recipes/editable.d.ts +0 -46
  580. package/dist/theme/recipes/form.d.ts +0 -1
  581. package/dist/theme/recipes/input.d.ts +0 -94
  582. package/dist/theme/recipes/kbd.d.ts +0 -41
  583. package/dist/theme/recipes/menu.d.ts +0 -1
  584. package/dist/theme/recipes/number-input.d.ts +0 -98
  585. package/dist/theme/recipes/popover.d.ts +0 -16
  586. package/dist/theme/recipes/progress-circle.d.ts +0 -28
  587. package/dist/theme/recipes/resizable-split-layout.d.ts +0 -106
  588. package/dist/theme/recipes/segmented-control.d.ts +0 -22
  589. package/dist/theme/recipes/skeleton.d.ts +0 -1
  590. package/dist/theme/recipes/switch.d.ts +0 -18
  591. package/dist/theme/recipes/tabs.d.ts +0 -80
  592. package/dist/theme/recipes/textarea.d.ts +0 -62
  593. package/dist/theme/recipes/timeline.d.ts +0 -83
  594. package/dist/theme/recipes/tooltip.d.ts +0 -1
  595. package/dist/theme/recipes/window-title-bar.d.ts +0 -19
  596. package/dist/theme/shadowless-default-config.d.ts +0 -2
  597. package/dist/theme/theme.d.ts +0 -2
  598. package/dist/theme/tokens/borders.d.ts +0 -17
  599. package/dist/theme/tokens/colors-background.d.ts +0 -260
  600. package/dist/theme/tokens/colors-visualization.d.ts +0 -162
  601. package/dist/theme/tokens/colors.d.ts +0 -878
  602. package/dist/theme/tokens/layer-styles.d.ts +0 -1
  603. package/dist/theme/tokens/text.d.ts +0 -1
  604. package/dist/theme-AzJH4Om3.js +0 -3999
  605. package/dist/theme-AzJH4Om3.js.map +0 -1
  606. package/dist/theme-preference-DxGW1qg-.js +0 -114
  607. package/dist/theme-preference-DxGW1qg-.js.map +0 -1
  608. package/dist/theme.js.map +0 -1
  609. package/dist/tree-list-CPjbGTvs.js +0 -1348
  610. package/dist/tree-list-CPjbGTvs.js.map +0 -1
  611. package/dist/utils/apply-file-icon-theme-preference.d.ts +0 -35
  612. package/dist/utils/apply-theme-preference.d.ts +0 -22
  613. package/dist/utils/browser-storage.d.ts +0 -7
  614. package/dist/utils/file-icon-theme-preference.d.ts +0 -15
  615. package/dist/utils/get-file-type-icon.d.ts +0 -2
  616. package/dist/utils/prism.d.ts +0 -1
  617. package/dist/utils/resolve-file-icon-element.d.ts +0 -8
  618. package/dist/utils/theme-preference.d.ts +0 -20
  619. package/dist/workspace-badge-CuOcmnZc.js +0 -175
  620. package/dist/workspace-badge-CuOcmnZc.js.map +0 -1
@@ -1,1199 +1,1361 @@
1
- import { jsx as a, jsxs as _, Fragment as ct } from "react/jsx-runtime";
2
- import { c as z } from "react/compiler-runtime";
3
- import { Text as O, Popover as te, HStack as Ee, Portal as ue, Image as dt, Button as ut, chakra as ae, Icon as ee, Menu as G, IconButton as we, Stack as ze, Box as re, Table as L, Flex as oe, Skeleton as Be } from "@chakra-ui/react";
4
- import { flexRender as be, useReactTable as mt, getPaginationRowModel as ft, getCoreRowModel as ht, getSortedRowModel as gt } from "@tanstack/react-table";
5
- import { isValidElement as Fe, cloneElement as bt, useRef as Te, useState as Q, useEffect as Ke, Fragment as pt } from "react";
6
- import { S as xe, T as Je } from "./scroll-area-BMbg1WcD.js";
7
- import { u as St } from "./kanban-renderer-toolbar-Buek4icz.js";
8
- import { Braces as wt, ChevronRight as xt, CircleHelp as yt, Minus as Ct, Check as ye, ChevronDown as vt, Settings2 as Rt, GripVertical as It, ArrowUpAZ as Xe, ArrowDownAZ as qe, MoreVertical as At } from "lucide-react";
9
- import { C as Ce, S as $t } from "./prism-n5gcERyD.js";
10
- import { L as ce, S as _t, R as kt } from "./list-row-DHzRa9-O.js";
11
- import { c as ie, g as zt, i as Ge, f as Tt, D as Dt, E as Vt, r as Mt, a as De, s as Pt, b as Ht, d as Lt, e as Ot, h as Wt, j as Nt, k as jt, l as Et, m as Bt, n as Ft, o as Kt, S as Jt, P as Xt } from "./edit-mode-data-table-Nfmfi7bz.js";
12
- import { P as qt } from "./param-editor-CFM2Nf3l.js";
13
- import { useSensors as Gt, useSensor as Ut, PointerSensor as Yt, DndContext as Zt, closestCenter as Qt } from "@dnd-kit/core";
14
- import { SortableContext as eo, verticalListSortingStrategy as to, useSortable as oo } from "@dnd-kit/sortable";
15
- import { CSS as lo } from "@dnd-kit/utilities";
16
- import { useChart as no, Chart as Ve } from "@chakra-ui/charts";
17
- import { XAxis as ro, YAxis as io, Bar as so, Tooltip as ao, BarChart as co, useActiveTooltipCoordinate as uo, usePlotArea as mo } from "recharts";
18
- const Ue = (o, e) => e.find((t) => Object.is(t.value, o))?.color ?? null, fo = (o) => {
19
- const {
20
- children: e
21
- } = o;
22
- return e;
23
- }, ho = "#111827", go = "#ffffff", bo = "#000000", po = 4.5, So = (o) => o.split("").map((e) => e + e).join(""), ne = (o) => {
24
- const e = o.trim(), t = e.startsWith("#") ? e.slice(1) : e, l = t.length === 3 ? So(t) : t;
25
- return /^[\da-f]{6}$/i.test(l) ? {
26
- r: Number.parseInt(l.slice(0, 2), 16),
27
- g: Number.parseInt(l.slice(2, 4), 16),
28
- b: Number.parseInt(l.slice(4, 6), 16)
29
- } : null;
30
- }, he = (o) => {
31
- const e = o / 255;
32
- return e <= 0.03928 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4;
33
- }, Me = (o) => 0.2126 * he(o.r) + 0.7152 * he(o.g) + 0.0722 * he(o.b), wo = (o, e) => {
34
- const t = Me(o), l = Me(e), n = Math.max(t, l), i = Math.min(t, l);
35
- return (n + 0.05) / (i + 0.05);
36
- }, pe = (o) => {
37
- const e = (t) => Math.round(t).toString(16).padStart(2, "0");
38
- return `#${e(o.r)}${e(o.g)}${e(o.b)}`;
39
- }, Ye = (o, e, t) => ({
40
- r: o.r * (1 - t) + e.r * t,
41
- g: o.g * (1 - t) + e.g * t,
42
- b: o.b * (1 - t) + e.b * t
43
- }), Pe = (o, e) => {
44
- for (let t = 1; t <= 50; t += 1) {
45
- const l = Ye(o, e, t / 50);
46
- if (wo(l, o) >= po)
47
- return {
48
- color: pe(l),
49
- step: t
50
- };
51
- }
52
- return {
53
- color: pe(e),
54
- step: 50
55
- };
56
- }, He = (o) => {
57
- const e = ne(o);
58
- if (!e) return ho;
59
- const t = ne(bo), l = ne(go), n = Pe(e, t), i = Pe(e, l);
60
- return n.step <= i.step ? n.color : i.color;
61
- }, xo = (o, e, t) => {
62
- const l = ne(o), n = ne(e);
63
- return !l || !n ? null : pe(Ye(l, n, 1 - t));
64
- }, Le = (o) => {
65
- const e = o.foreground?.light ?? He(o.light), t = o.foreground?.dark ?? He(o.dark);
66
- return {
67
- backgroundColor: `light-dark(${o.light}, ${o.dark})`,
68
- color: `light-dark(${e}, ${t})`
69
- };
70
- }, yo = (o) => Math.round(o * 100) / 100, se = (o, e, t) => {
71
- const l = xo(o, e, t);
72
- return l || `color-mix(in srgb, ${o} ${yo(t * 100)}%, ${e})`;
73
- }, Co = (o, e, t) => {
74
- const l = o.foreground && e.foreground ? {
75
- light: se(o.foreground.light, e.foreground.light, t),
76
- dark: se(o.foreground.dark, e.foreground.dark, t)
77
- } : void 0;
78
- return {
79
- light: se(o.light, e.light, t),
80
- dark: se(o.dark, e.dark, t),
81
- ...l ? {
82
- foreground: l
83
- } : {}
84
- };
85
- }, Ze = (o, e) => {
86
- if (typeof o != "number" || !Number.isFinite(o) || e.length < 2) return null;
87
- const t = e[0], l = e[e.length - 1];
88
- if (l.value - t.value <= 0) return null;
89
- if (o <= t.value) return t.color;
90
- if (o >= l.value) return l.color;
91
- const i = e.findIndex((u) => o <= u.value), c = e[i - 1], s = e[i], d = 1 - (o - c.value) / (s.value - c.value);
92
- return Co(c.color, s.color, d);
93
- }, vo = (o) => {
94
- const e = z(2), {
95
- value: t
96
- } = o;
97
- let l;
98
- return e[0] !== t ? (l = /* @__PURE__ */ a(O, { textStyle: "paragraph/S/medium", fontVariantNumeric: "tabular-nums", truncate: !0, children: t }), e[0] = t, e[1] = l) : l = e[1], l;
99
- }, Ro = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, Io = /(^|\s)(avatar|image|logo|photo|picture|thumbnail)(\s|$)/i, Ao = (o) => {
100
- const e = o.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
101
- return e ? `${e[0]?.toUpperCase()}${e.slice(1)}` : "Details";
102
- }, ge = (o) => o.map((e) => /^\d+$/.test(e) ? e : Ao(e)).join(" / "), $o = (o) => o.every((e) => e === null || typeof e != "object"), Se = (o, e, t) => {
103
- if (Array.isArray(o)) {
104
- if (o.length === 0 || $o(o)) {
105
- t.push({
106
- label: ge(e),
107
- value: o
108
- });
109
- return;
110
- }
111
- o.forEach((l, n) => {
112
- Se(l, [...e, String(n + 1)], t);
113
- });
114
- return;
115
- }
116
- if (o !== null && typeof o == "object") {
117
- const l = Object.entries(o);
118
- if (l.length === 0) {
119
- t.push({
120
- label: ge(e),
121
- value: null
122
- });
123
- return;
124
- }
125
- l.forEach(([n, i]) => {
126
- Se(i, [...e, n], t);
127
- });
128
- return;
129
- }
130
- t.push({
131
- label: ge(e),
132
- value: o
133
- });
134
- }, Qe = (o) => {
135
- if (typeof o != "string") return o;
136
- try {
137
- return JSON.parse(o);
138
- } catch {
139
- return o;
140
- }
141
- }, ve = (o) => {
142
- const e = [];
143
- return Se(Qe(o), [], e), e.map((t) => ({
144
- ...t,
145
- label: t.label || "Value"
146
- }));
147
- }, me = (o, e) => {
148
- if (typeof o != "string") return !1;
149
- if (o.startsWith("data:image/")) return !0;
150
- try {
151
- const t = new URL(o);
152
- return t.protocol !== "http:" && t.protocol !== "https:" ? !1 : Ro.test(t.pathname) || Io.test(e);
153
- } catch {
154
- return !1;
155
- }
156
- }, Re = (o, e) => Array.isArray(o) && o.length > 0 && o.every((t) => me(t, e)), Oe = (o) => o == null || o === "" ? "Not provided" : typeof o == "boolean" ? o ? "Yes" : "No" : String(o), _o = (o) => Array.isArray(o) ? o.length === 0 ? "None" : o.map(Oe).join(", ") : Oe(o), ko = (o) => {
157
- const e = Qe(o);
158
- if (Array.isArray(e) && e.length === 0 || e !== null && typeof e == "object" && Object.keys(e).length === 0)
159
- return "No details";
160
- const t = ve(o).filter((i) => !me(i.value, i.label) && !Re(i.value, i.label));
161
- if (t.length === 0) return "No details";
162
- const l = t.slice(0, 2).map((i) => _o(i.value)), n = t.length - l.length;
163
- return [...l, n > 0 ? `${n} more` : null].filter(Boolean).join(" · ");
164
- }, zo = (o) => {
165
- const {
166
- label: e,
167
- value: t
168
- } = o;
169
- return me(t, e) ? {
170
- type: "image",
171
- src: String(t),
172
- alt: `${e} preview`
173
- } : Array.isArray(t) && Re(t, e) ? {
174
- type: "image-gallery",
175
- images: t.map((l, n) => ({
176
- src: String(l),
177
- alt: `${e} ${n + 1} preview`
178
- }))
179
- } : Array.isArray(t) ? t : t === void 0 ? null : t;
180
- }, To = (o) => ve(o).map((e, t) => ({
181
- id: `friendly-json-${t}`,
182
- name: e.label,
183
- type: "readOnly",
184
- value: zo(e)
185
- })), Do = (o) => {
186
- const e = z(4), {
187
- value: t
188
- } = o;
189
- let l;
190
- e[0] !== t ? (l = To(t), e[0] = t, e[1] = l) : l = e[1];
191
- let n;
192
- return e[2] !== l ? (n = /* @__PURE__ */ a(qt, { params: l, readOnly: !0, fullWidth: !0 }), e[2] = l, e[3] = n) : n = e[3], n;
193
- }, Vo = (o) => o.stopPropagation(), Mo = (o) => {
194
- const e = z(49), {
195
- columnLabel: t,
196
- value: l
197
- } = o;
198
- let n, i, c, s, r, d, u, m, f, h, S, b, x, g, v, w;
199
- if (e[0] !== t || e[1] !== l) {
200
- const M = ve(l).flatMap(Po).slice(0, 2);
201
- let D;
202
- e[18] !== l ? (D = ko(l), e[18] = l, e[19] = D) : D = e[19], s = D, c = te.Root, e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = {
203
- placement: "bottom-start",
204
- offset: {
205
- mainAxis: 6
206
- }
207
- }, e[20] = m) : m = e[20], i = te.Trigger, u = !0, n = ut, r = `View ${t} details`, d = "ghost", f = "xs", h = "full", S = "0", b = "28px", x = "2xs", g = "flex-start", v = Vo, w = M.length > 0 ? /* @__PURE__ */ a(Ee, { gap: "-1", flexShrink: "0", children: M.map(Ho) }) : /* @__PURE__ */ a(wt, { size: 14 }), e[0] = t, e[1] = l, e[2] = n, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m, e[10] = f, e[11] = h, e[12] = S, e[13] = b, e[14] = x, e[15] = g, e[16] = v, e[17] = w;
208
- } else
209
- n = e[2], i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9], f = e[10], h = e[11], S = e[12], b = e[13], x = e[14], g = e[15], v = e[16], w = e[17];
210
- let p;
211
- e[21] !== s ? (p = /* @__PURE__ */ a(O, { flex: "1", minWidth: "0", textAlign: "left", textStyle: "paragraph/S/regular", truncate: !0, children: s }), e[21] = s, e[22] = p) : p = e[22];
212
- let R;
213
- e[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ a(xt, { size: 12 }), e[23] = R) : R = e[23];
214
- let C;
215
- e[24] !== n || e[25] !== r || e[26] !== d || e[27] !== p || e[28] !== f || e[29] !== h || e[30] !== S || e[31] !== b || e[32] !== x || e[33] !== g || e[34] !== v || e[35] !== w ? (C = /* @__PURE__ */ _(n, { "aria-label": r, variant: d, size: f, width: h, minWidth: S, height: b, paddingX: x, justifyContent: g, onClick: v, children: [
216
- w,
217
- p,
218
- R
219
- ] }), e[24] = n, e[25] = r, e[26] = d, e[27] = p, e[28] = f, e[29] = h, e[30] = S, e[31] = b, e[32] = x, e[33] = g, e[34] = v, e[35] = w, e[36] = C) : C = e[36];
220
- let y;
221
- e[37] !== i || e[38] !== u || e[39] !== C ? (y = /* @__PURE__ */ a(i, { asChild: u, children: C }), e[37] = i, e[38] = u, e[39] = C, e[40] = y) : y = e[40];
222
- let A;
223
- e[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = {
224
- overscrollBehavior: "contain"
225
- }, e[41] = A) : A = e[41];
226
- let $;
227
- e[42] !== l ? ($ = /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a(te.Positioner, { children: /* @__PURE__ */ a(te.Content, { width: "min(380px, calc(100vw - 32px))", padding: "0", background: "bg", overflow: "hidden", children: /* @__PURE__ */ a(xe, { maxH: "360px", viewportProps: A, children: /* @__PURE__ */ a(Do, { value: l }) }) }) }) }), e[42] = l, e[43] = $) : $ = e[43];
228
- let T;
229
- return e[44] !== c || e[45] !== m || e[46] !== y || e[47] !== $ ? (T = /* @__PURE__ */ _(c, { positioning: m, children: [
230
- y,
231
- $
232
- ] }), e[44] = c, e[45] = m, e[46] = y, e[47] = $, e[48] = T) : T = e[48], T;
1
+ import { a as e, n as t } from "./prism-pSHJejZx.js";
2
+ import { n, t as r } from "./scroll-area-Cr1lNXAr.js";
3
+ import { i, s as a, t as o } from "./list-row-De9R2zKU.js";
4
+ import { A as s, C as c, D as l, E as u, F as d, I as f, M as p, N as m, O as h, P as g, R as _, S as v, T as y, Y as b, b as x, g as S, h as C, j as w, k as T, m as E, w as D, x as O, y as ee, z as k } from "./rich-text-BgDvOEGH.js";
5
+ import { t as A } from "./diff-bubble-DZsarmSG.js";
6
+ import { n as j } from "./param-editor-I0dKQeeZ.js";
7
+ import { Badge as M, Box as te, Button as N, Flex as P, HStack as F, Icon as I, IconButton as ne, Image as L, Menu as R, Popover as z, Portal as B, Skeleton as V, Stack as re, Table as H, Text as U, chakra as W } from "@chakra-ui/react";
8
+ import { c as G } from "react/compiler-runtime";
9
+ import { jsx as K, jsxs as q } from "react/jsx-runtime";
10
+ import { Fragment as ie, Suspense as ae, cloneElement as oe, isValidElement as J, lazy as se, useEffect as ce, useRef as le, useState as Y } from "react";
11
+ import { ArrowDownAZ as ue, ArrowUpAZ as de, Braces as fe, Check as pe, ChevronDown as me, ChevronRight as X, CircleHelp as he, GripVertical as ge, Minus as Z, MoreVertical as _e, Settings2 as ve } from "lucide-react";
12
+ import { DndContext as ye, PointerSensor as be, closestCenter as xe, useSensor as Se, useSensors as Ce } from "@dnd-kit/core";
13
+ import { SortableContext as Q, useSortable as we, verticalListSortingStrategy as Te } from "@dnd-kit/sortable";
14
+ import { CSS as Ee } from "@dnd-kit/utilities";
15
+ import { flexRender as De, getCoreRowModel as Oe, getPaginationRowModel as ke, getSortedRowModel as Ae, useReactTable as je } from "@tanstack/react-table";
16
+ //#region src/components/data-table/categorical-color-cell.tsx
17
+ var Me = (e, t) => t.find((t) => Object.is(t.value, e))?.color ?? null, Ne = (e) => {
18
+ let { children: t } = e;
19
+ return t;
20
+ }, Pe = "#111827", Fe = "#ffffff", Ie = "#000000", Le = 4.5, Re = (e) => e.split("").map((e) => e + e).join(""), $ = (e) => {
21
+ let t = e.trim(), n = t.startsWith("#") ? t.slice(1) : t, r = n.length === 3 ? Re(n) : n;
22
+ return /^[\da-f]{6}$/i.test(r) ? {
23
+ r: Number.parseInt(r.slice(0, 2), 16),
24
+ g: Number.parseInt(r.slice(2, 4), 16),
25
+ b: Number.parseInt(r.slice(4, 6), 16)
26
+ } : null;
27
+ }, ze = (e) => {
28
+ let t = e / 255;
29
+ return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
30
+ }, Be = (e) => .2126 * ze(e.r) + .7152 * ze(e.g) + .0722 * ze(e.b), Ve = (e, t) => {
31
+ let n = Be(e), r = Be(t), i = Math.max(n, r), a = Math.min(n, r);
32
+ return (i + .05) / (a + .05);
33
+ }, He = (e) => {
34
+ let t = (e) => Math.round(e).toString(16).padStart(2, "0");
35
+ return `#${t(e.r)}${t(e.g)}${t(e.b)}`;
36
+ }, Ue = (e, t, n) => ({
37
+ r: e.r * (1 - n) + t.r * n,
38
+ g: e.g * (1 - n) + t.g * n,
39
+ b: e.b * (1 - n) + t.b * n
40
+ }), We = (e, t) => {
41
+ for (let n = 1; n <= 50; n += 1) {
42
+ let r = Ue(e, t, n / 50);
43
+ if (Ve(r, e) >= Le) return {
44
+ color: He(r),
45
+ step: n
46
+ };
47
+ }
48
+ return {
49
+ color: He(t),
50
+ step: 50
51
+ };
52
+ }, Ge = (e) => {
53
+ let t = $(e);
54
+ if (!t) return Pe;
55
+ let n = $(Ie), r = $(Fe), i = We(t, n), a = We(t, r);
56
+ return i.step <= a.step ? i.color : a.color;
57
+ }, Ke = (e, t, n) => {
58
+ let r = $(e), i = $(t);
59
+ return !r || !i ? null : He(Ue(r, i, 1 - n));
60
+ }, qe = (e) => {
61
+ let t = e.foreground?.light ?? Ge(e.light), n = e.foreground?.dark ?? Ge(e.dark);
62
+ return {
63
+ backgroundColor: `light-dark(${e.light}, ${e.dark})`,
64
+ color: `light-dark(${t}, ${n})`
65
+ };
66
+ }, Je = (e) => Math.round(e * 100) / 100, Ye = (e, t, n) => Ke(e, t, n) || `color-mix(in srgb, ${e} ${Je(n * 100)}%, ${t})`, Xe = (e, t, n) => {
67
+ let r = e.foreground && t.foreground ? {
68
+ light: Ye(e.foreground.light, t.foreground.light, n),
69
+ dark: Ye(e.foreground.dark, t.foreground.dark, n)
70
+ } : void 0;
71
+ return {
72
+ light: Ye(e.light, t.light, n),
73
+ dark: Ye(e.dark, t.dark, n),
74
+ ...r ? { foreground: r } : {}
75
+ };
76
+ }, Ze = (e, t) => {
77
+ if (typeof e != "number" || !Number.isFinite(e) || t.length < 2) return null;
78
+ let n = t[0], r = t[t.length - 1];
79
+ if (r.value - n.value <= 0) return null;
80
+ if (e <= n.value) return n.color;
81
+ if (e >= r.value) return r.color;
82
+ let i = t.findIndex((t) => e <= t.value), a = t[i - 1], o = t[i], s = 1 - (e - a.value) / (o.value - a.value);
83
+ return Xe(a.color, o.color, s);
84
+ }, Qe = (e) => {
85
+ let t = G(2), { value: n } = e, r;
86
+ return t[0] === n ? r = t[1] : (r = /* @__PURE__ */ K(U, {
87
+ textStyle: "paragraph/S/medium",
88
+ fontVariantNumeric: "tabular-nums",
89
+ truncate: !0,
90
+ children: n
91
+ }), t[0] = n, t[1] = r), r;
92
+ }, $e = (e) => {
93
+ let t = G(6), { value: n, categories: r } = e, i;
94
+ t[0] !== r || t[1] !== n ? (i = r?.find((e) => e.value === n)?.palette ?? "gray", t[0] = r, t[1] = n, t[2] = i) : i = t[2];
95
+ let a = i, o = String(n), s;
96
+ return t[3] !== a || t[4] !== o ? (s = /* @__PURE__ */ K(M, {
97
+ variant: "subtle",
98
+ size: "sm",
99
+ colorPalette: a,
100
+ maxW: "full",
101
+ truncate: !0,
102
+ children: o
103
+ }), t[3] = a, t[4] = o, t[5] = s) : s = t[5], s;
104
+ }, et = [
105
+ {
106
+ unit: "year",
107
+ seconds: 31536e3
108
+ },
109
+ {
110
+ unit: "month",
111
+ seconds: 2592e3
112
+ },
113
+ {
114
+ unit: "day",
115
+ seconds: 86400
116
+ },
117
+ {
118
+ unit: "hour",
119
+ seconds: 3600
120
+ },
121
+ {
122
+ unit: "minute",
123
+ seconds: 60
124
+ }
125
+ ], tt = (e) => {
126
+ if (typeof e != "string") return null;
127
+ let t = Date.parse(e);
128
+ return Number.isNaN(t) ? null : new Date(t);
129
+ }, nt = (e, t = /* @__PURE__ */ new Date(), n) => {
130
+ let r = tt(e);
131
+ if (!r) return null;
132
+ let i = new Intl.RelativeTimeFormat(n, { numeric: "auto" }), a = (r.getTime() - t.getTime()) / 1e3, o = et.find((e) => Math.abs(a) >= e.seconds);
133
+ return o ? i.format(Math.round(a / o.seconds), o.unit) : i.format(0, "second");
134
+ }, rt = (e) => {
135
+ let t = G(12), { value: r } = e, [i, a] = Y(it), o, s;
136
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (o = () => {
137
+ let e = setInterval(() => a(/* @__PURE__ */ new Date()), 6e4);
138
+ return () => clearInterval(e);
139
+ }, s = [], t[0] = o, t[1] = s) : (o = t[0], s = t[1]), ce(o, s);
140
+ let c;
141
+ t[2] !== i || t[3] !== r ? (c = nt(r, i), t[2] = i, t[3] = r, t[4] = c) : c = t[4];
142
+ let l = c, u;
143
+ t[5] === r ? u = t[6] : (u = new Date(r).toLocaleString(void 0, {
144
+ dateStyle: "medium",
145
+ timeStyle: "short"
146
+ }), t[5] = r, t[6] = u);
147
+ let d = u, f;
148
+ t[7] === l ? f = t[8] : (f = /* @__PURE__ */ K(U, {
149
+ as: "span",
150
+ tabIndex: 0,
151
+ textStyle: "paragraph/S/regular",
152
+ color: "fg.muted",
153
+ whiteSpace: "nowrap",
154
+ children: l
155
+ }), t[7] = l, t[8] = f);
156
+ let p;
157
+ return t[9] !== d || t[10] !== f ? (p = /* @__PURE__ */ K(n, {
158
+ content: d,
159
+ openDelay: 300,
160
+ children: f
161
+ }), t[9] = d, t[10] = f, t[11] = p) : p = t[11], p;
233
162
  };
234
- function Po(o) {
235
- return me(o.value, o.label) ? [o] : !Array.isArray(o.value) || !Re(o.value, o.label) ? [] : o.value.map((e, t) => ({
236
- label: `${o.label} ${t + 1}`,
237
- value: e
238
- }));
163
+ function it() {
164
+ return /* @__PURE__ */ new Date();
239
165
  }
240
- function Ho(o) {
241
- return /* @__PURE__ */ a(dt, { src: String(o.value), alt: `${o.label} preview`, boxSize: "22px", borderRadius: "xs", borderWidth: "1px", borderColor: "border.subtle", objectFit: "cover" }, o.label);
242
- }
243
- const We = (o) => Ge(o) ? o.sortValue : o, Lo = (o, e) => o === e ? 0 : o == null ? 1 : e == null ? -1 : typeof o == "number" && typeof e == "number" ? o - e : String(o).localeCompare(String(e)), Oo = (o) => Fe(o) ? bt(o, {
244
- style: {
245
- ...o.props.style,
246
- flexWrap: "nowrap",
247
- minWidth: 0,
248
- whiteSpace: "nowrap"
249
- }
250
- }) : o, de = (o) => {
251
- o.stopPropagation();
252
- }, Wo = (o) => {
253
- const e = z(8), {
254
- table: t
255
- } = o, l = t.getIsAllRowsSelected(), n = !l && t.getIsSomeRowsSelected(), i = l ? !0 : n ? "indeterminate" : !1, c = n ? Ct : ye;
256
- let s;
257
- e[0] !== c ? (s = /* @__PURE__ */ a(ee, { as: c, boxSize: "12px", strokeWidth: "3" }), e[0] = c, e[1] = s) : s = e[1];
258
- let r;
259
- e[2] !== t ? (r = (u) => t.toggleAllRowsSelected(u.checked === !0), e[2] = t, e[3] = r) : r = e[3];
260
- let d;
261
- return e[4] !== i || e[5] !== s || e[6] !== r ? (d = /* @__PURE__ */ a(Ce, { checked: i, "aria-label": "Select all", icon: s, onClick: de, onCheckedChange: r }), e[4] = i, e[5] = s, e[6] = r, e[7] = d) : d = e[7], d;
262
- }, No = (o) => {
263
- const e = z(6), {
264
- row: t,
265
- selectedRowIds: l
266
- } = o, n = !!l?.[t.id];
267
- let i;
268
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ a(ee, { as: ye, boxSize: "12px", strokeWidth: "3" }), e[0] = i) : i = e[0];
269
- let c;
270
- e[1] !== t ? (c = (r) => t.toggleSelected(r.checked === !0), e[1] = t, e[2] = c) : c = e[2];
271
- let s;
272
- return e[3] !== n || e[4] !== c ? (s = /* @__PURE__ */ a(Ce, { checked: n, "aria-label": "Select row", icon: i, onClick: de, onCheckedChange: c }), e[3] = n, e[4] = c, e[5] = s) : s = e[5], s;
273
- }, jo = (o, e) => {
274
- const t = new Set(e.map((l) => l.label));
275
- return [...e, ...o.filter((l) => !t.has(l.label))];
276
- }, Eo = (o) => {
277
- const e = z(30), {
278
- row: t,
279
- actions: l,
280
- getActions: n
281
- } = o;
282
- let i, c, s, r, d, u, m, f, h;
283
- if (e[0] !== l || e[1] !== n || e[2] !== t) {
284
- h = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
285
- e: {
286
- const v = jo(l, n?.(t.original) ?? []);
287
- if (v.length === 0) {
288
- h = null;
289
- break e;
290
- }
291
- r = G.Root, e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ a(G.Trigger, { asChild: !0, children: /* @__PURE__ */ a(we, { "aria-label": "Row actions", size: "2xs", variant: "ghost", onClick: de, children: /* @__PURE__ */ a(ee, { as: vt, boxSize: "14px" }) }) }), e[12] = f) : f = e[12], s = ue, c = G.Positioner, i = G.Content, d = "popover", u = "bg";
292
- let w;
293
- e[13] !== t ? (w = (p) => /* @__PURE__ */ a(G.Item, { value: p.label, asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", tone: p.destructive ? "danger" : "default", label: p.label, icon: p.icon, onClick: de, onActivate: () => p.onSelect(t.original) }) }, p.label), e[13] = t, e[14] = w) : w = e[14], m = v.map(w);
294
- }
295
- e[0] = l, e[1] = n, e[2] = t, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m, e[10] = f, e[11] = h;
296
- } else
297
- i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9], f = e[10], h = e[11];
298
- if (h !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
299
- return h;
300
- let S;
301
- e[15] !== i || e[16] !== d || e[17] !== u || e[18] !== m ? (S = /* @__PURE__ */ a(i, { zIndex: d, bg: u, children: m }), e[15] = i, e[16] = d, e[17] = u, e[18] = m, e[19] = S) : S = e[19];
302
- let b;
303
- e[20] !== c || e[21] !== S ? (b = /* @__PURE__ */ a(c, { children: S }), e[20] = c, e[21] = S, e[22] = b) : b = e[22];
304
- let x;
305
- e[23] !== s || e[24] !== b ? (x = /* @__PURE__ */ a(s, { children: b }), e[23] = s, e[24] = b, e[25] = x) : x = e[25];
306
- let g;
307
- return e[26] !== r || e[27] !== f || e[28] !== x ? (g = /* @__PURE__ */ _(r, { children: [
308
- f,
309
- x
310
- ] }), e[26] = r, e[27] = f, e[28] = x, e[29] = g) : g = e[29], g;
311
- }, Ne = (o) => {
312
- const e = z(15), {
313
- value: t,
314
- wrapRows: l
315
- } = o;
316
- let n, i;
317
- if (e[0] !== t || e[1] !== l) {
318
- i = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
319
- e:
320
- if (n = Tt(t), Fe(n)) {
321
- const m = l ? "visible" : "hidden", f = l ? "anywhere" : void 0, h = l ? "normal" : "nowrap", S = l ? n : Oo(n);
322
- let b;
323
- e[4] !== m || e[5] !== f || e[6] !== h || e[7] !== S ? (b = /* @__PURE__ */ a(ae.span, { display: "inline-flex", maxWidth: "full", minW: "0", overflow: m, overflowWrap: f, whiteSpace: h, children: S }), e[4] = m, e[5] = f, e[6] = h, e[7] = S, e[8] = b) : b = e[8], i = b;
324
- break e;
325
- }
326
- e[0] = t, e[1] = l, e[2] = n, e[3] = i;
327
- } else
328
- n = e[2], i = e[3];
329
- if (i !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
330
- return i;
331
- const c = l ? "visible" : "hidden", s = l ? "anywhere" : void 0, r = l ? void 0 : "ellipsis", d = l ? "normal" : "nowrap";
332
- let u;
333
- return e[9] !== n || e[10] !== c || e[11] !== s || e[12] !== r || e[13] !== d ? (u = /* @__PURE__ */ a(O, { maxWidth: "full", overflow: c, overflowWrap: s, textOverflow: r, textStyle: "paragraph/S/regular", whiteSpace: d, children: n }), e[9] = n, e[10] = c, e[11] = s, e[12] = r, e[13] = d, e[14] = u) : u = e[14], u;
334
- }, Bo = (o) => {
335
- const e = z(11), {
336
- columnLabel: t,
337
- renderer: l,
338
- value: n,
339
- wrapRows: i
340
- } = o;
341
- if (l?.type === "json") {
342
- let s;
343
- return e[0] !== t || e[1] !== n ? (s = /* @__PURE__ */ a(Mo, { columnLabel: t, value: n }), e[0] = t, e[1] = n, e[2] = s) : s = e[2], s;
344
- }
345
- if (l?.type === "color-scale" && Ze(n, l.stops) && typeof n == "number") {
346
- let r;
347
- return e[3] !== n ? (r = /* @__PURE__ */ a(vo, { value: n }), e[3] = n, e[4] = r) : r = e[4], r;
348
- }
349
- if (l?.type === "categorical-color" && Ue(n, l.categories)) {
350
- let r;
351
- return e[5] !== n || e[6] !== i ? (r = /* @__PURE__ */ a(fo, { children: /* @__PURE__ */ a(Ne, { value: n, wrapRows: i }) }), e[5] = n, e[6] = i, e[7] = r) : r = e[7], r;
352
- }
353
- let c;
354
- return e[8] !== n || e[9] !== i ? (c = /* @__PURE__ */ a(Ne, { value: n, wrapRows: i }), e[8] = n, e[9] = i, e[10] = c) : c = e[10], c;
355
- }, Fo = (o, e) => {
356
- if (e?.type === "color-scale") {
357
- const t = Ze(o, e.stops);
358
- if (t && typeof o == "number") return Le(t);
359
- }
360
- if (e?.type === "categorical-color") {
361
- const t = Ue(o, e.categories);
362
- if (t) return Le(t);
363
- }
364
- };
365
- function Ko(o, e, t = {}) {
366
- const {
367
- columnIcons: l,
368
- columnDescriptions: n,
369
- compactHeaders: i,
370
- enableSelection: c = !1,
371
- rowActions: s = [],
372
- getRowActions: r,
373
- selectedRowIds: d,
374
- columnRenderers: u,
375
- wrapRows: m = !1
376
- } = t, f = ie.accessor((x, g) => g + 1, {
377
- header: "",
378
- id: "rowIndex",
379
- enableResizing: !1,
380
- size: 20,
381
- cell: (x) => /* @__PURE__ */ a(ae.span, { display: "block", textStyle: "paragraph/S/regular", textAlign: "center", children: x.getValue() })
382
- }), h = ie.display({
383
- id: "rowSelection",
384
- header: Wo,
385
- cell: (x) => /* @__PURE__ */ a(No, { ...x, selectedRowIds: d }),
386
- enableResizing: !1,
387
- enableSorting: !1,
388
- size: 36
389
- }), S = e.map((x) => {
390
- const g = x || "-", v = o.map((y) => y[g]), w = u?.[g], p = l?.[g], R = p === void 0 ? zt(v) : p, C = n?.[g];
391
- return ie.accessor((y) => y[g], {
392
- id: g,
393
- header: () => {
394
- const y = i?.[g] ?? g;
395
- return /* @__PURE__ */ _(ae.span, { display: "inline-flex", alignItems: "center", gap: "4px", minW: "0", maxW: "full", overflow: "hidden", children: [
396
- R,
397
- /* @__PURE__ */ a(ae.span, { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: y }),
398
- C ? /* @__PURE__ */ a(Je, { content: C, children: /* @__PURE__ */ a(ee, { as: yt, "aria-label": `About ${y}`, boxSize: "12px", color: "fg.muted", cursor: "help", flexShrink: 0, opacity: 0.6, tabIndex: 0 }) }) : null
399
- ] });
400
- },
401
- cell: (y) => /* @__PURE__ */ a(Bo, { columnLabel: g, renderer: w, value: y.getValue(), wrapRows: m }),
402
- meta: {
403
- getCellStyle: (y) => Fo(y, w)
404
- },
405
- sortingFn: (y, A) => {
406
- const $ = We(y.original[g]), T = We(A.original[g]);
407
- return Lo($, T);
408
- }
409
- });
410
- }), b = ie.display({
411
- id: "rowActions",
412
- header: "",
413
- cell: (x) => /* @__PURE__ */ a(Eo, { ...x, actions: s, getActions: r }),
414
- enableResizing: !1,
415
- enableSorting: !1,
416
- size: 36
417
- });
418
- return [f, ...c ? [h] : [], ...S, ...s.length > 0 || r ? [b] : []];
419
- }
420
- const Jo = (o) => {
421
- const e = z(28), {
422
- column: t,
423
- checked: l,
424
- onColumnVisibilityChange: n
425
- } = o;
426
- let i;
427
- e[0] !== t.id ? (i = {
428
- id: t.id
429
- }, e[0] = t.id, e[1] = i) : i = e[1];
430
- const {
431
- attributes: c,
432
- listeners: s,
433
- setNodeRef: r,
434
- transform: d,
435
- transition: u,
436
- isDragging: m
437
- } = oo(i);
438
- let f;
439
- e[2] !== d ? (f = lo.Transform.toString(d), e[2] = d, e[3] = f) : f = e[3];
440
- const h = m ? 0.5 : 1;
441
- let S;
442
- e[4] !== f || e[5] !== h || e[6] !== u ? (S = {
443
- transform: f,
444
- transition: u,
445
- opacity: h
446
- }, e[4] = f, e[5] = h, e[6] = u, e[7] = S) : S = e[7];
447
- const b = S;
448
- let x;
449
- e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = {
450
- bg: "bg.hover"
451
- }, e[8] = x) : x = e[8];
452
- let g;
453
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ a(It, { size: 14 }), e[9] = g) : g = e[9];
454
- let v;
455
- e[10] !== c || e[11] !== s ? (v = /* @__PURE__ */ a(re, { as: "span", display: "inline-flex", cursor: "grab", color: "fg.muted", ...c, ...s, children: g }), e[10] = c, e[11] = s, e[12] = v) : v = e[12];
456
- let w;
457
- e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ a(ee, { as: ye, boxSize: "12px", strokeWidth: "3" }), e[13] = w) : w = e[13];
458
- let p;
459
- e[14] !== t.id || e[15] !== n ? (p = (A) => n(t.id, A.checked === !0), e[14] = t.id, e[15] = n, e[16] = p) : p = e[16];
460
- let R;
461
- e[17] !== t.label ? (R = /* @__PURE__ */ a(O, { as: "span", textStyle: "label/S/regular", truncate: !0, children: t.label }), e[17] = t.label, e[18] = R) : R = e[18];
462
- let C;
463
- e[19] !== l || e[20] !== p || e[21] !== R ? (C = /* @__PURE__ */ a(Ce, { checked: l, flex: "1", minW: "0", width: "full", flexDirection: "row-reverse", justifyContent: "space-between", size: "sm", icon: w, onCheckedChange: p, children: R }), e[19] = l, e[20] = p, e[21] = R, e[22] = C) : C = e[22];
464
- let y;
465
- return e[23] !== r || e[24] !== b || e[25] !== C || e[26] !== v ? (y = /* @__PURE__ */ _(Ee, { ref: r, style: b, gap: "2xs", minW: "0", width: "full", borderRadius: "xs", px: "xs", py: "2xs", _hover: x, children: [
466
- v,
467
- C
468
- ] }), e[23] = r, e[24] = b, e[25] = C, e[26] = v, e[27] = y) : y = e[27], y;
469
- }, Xo = (o) => {
470
- const e = z(47), {
471
- columns: t,
472
- visibleColumnIds: l,
473
- wrapRows: n,
474
- showStats: i,
475
- statsAvailable: c,
476
- onColumnVisibilityChange: s,
477
- onColumnReorder: r,
478
- onWrapRowsChange: d,
479
- onStatsVisibilityChange: u
480
- } = o, m = Te(null), f = Te(null), [h, S] = Q(!1), [b, x] = Q("");
481
- let g;
482
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = {
483
- activationConstraint: {
484
- distance: 5
485
- }
486
- }, e[0] = g) : g = e[0];
487
- const v = Gt(Ut(Yt, g));
488
- let w;
489
- if (e[1] !== t || e[2] !== b) {
490
- const k = b.trim().toLowerCase();
491
- w = k ? t.filter((B) => B.label.toLowerCase().includes(k)) : t, e[1] = t, e[2] = b, e[3] = w;
492
- } else
493
- w = e[3];
494
- const p = w;
495
- let R;
496
- e[4] !== r ? (R = (k) => {
497
- const {
498
- active: B,
499
- over: F
500
- } = k;
501
- !F || B.id === F.id || r(String(B.id), String(F.id));
502
- }, e[4] = r, e[5] = R) : R = e[5];
503
- const C = R;
504
- let y, A;
505
- e[6] !== h ? (y = () => {
506
- if (!h)
507
- return;
508
- const k = (F) => {
509
- const le = F.target;
510
- le instanceof Node && (f.current?.contains(le) || m.current?.contains(le) || S(!1));
511
- }, B = (F) => {
512
- F.key === "Escape" && S(!1);
513
- };
514
- return document.addEventListener("pointerdown", k), document.addEventListener("keydown", B, !0), () => {
515
- document.removeEventListener("pointerdown", k), document.removeEventListener("keydown", B, !0);
516
- };
517
- }, A = [h], e[6] = h, e[7] = y, e[8] = A) : (y = e[7], A = e[8]), Ke(y, A);
518
- let $;
519
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = {
520
- placement: "bottom-end",
521
- offset: {
522
- mainAxis: 8
523
- },
524
- getAnchorElement: () => m.current
525
- }, e[9] = $) : $ = e[9];
526
- let T;
527
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ a(te.Trigger, { asChild: !0, children: /* @__PURE__ */ a(we, { ref: m, "aria-label": "Display settings", variant: "ghost", size: "sm", onClick: () => S(qo), children: /* @__PURE__ */ a(ee, { as: Rt, boxSize: "14px" }) }) }), e[10] = T) : T = e[10];
528
- let P;
529
- e[11] !== d || e[12] !== n ? (P = /* @__PURE__ */ a(Dt, { showDivider: !0, wrapRows: n, onWrapRowsChange: d }), e[11] = d, e[12] = n, e[13] = P) : P = e[13];
530
- let M;
531
- e[14] !== u || e[15] !== i || e[16] !== c ? (M = c ? /* @__PURE__ */ a(re, { borderBottomWidth: "1px", borderColor: "border.subtle", padding: "xs", children: /* @__PURE__ */ a($t, { checked: i, inputProps: {
532
- role: "switch"
533
- }, width: "full", flexDirection: "row-reverse", justifyContent: "space-between", onCheckedChange: (k) => u(k.checked === !0), children: /* @__PURE__ */ a(O, { as: "span", textStyle: "label/S/regular", children: "Statistics" }) }) }) : null, e[14] = u, e[15] = i, e[16] = c, e[17] = M) : M = e[17];
534
- let D;
535
- e[18] !== b ? (D = /* @__PURE__ */ a(_t, { value: b, placeholder: "Search columns", onValueChange: x }), e[18] = b, e[19] = D) : D = e[19];
536
- let K;
537
- e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (K = {
538
- overscrollBehavior: "contain"
539
- }, e[20] = K) : K = e[20];
540
- let W;
541
- e[21] !== t ? (W = t.map(Go), e[21] = t, e[22] = W) : W = e[22];
542
- let N;
543
- if (e[23] !== p || e[24] !== s || e[25] !== l) {
544
- let k;
545
- e[27] !== s || e[28] !== l ? (k = (B) => /* @__PURE__ */ a(Jo, { column: B, checked: l.has(B.id), onColumnVisibilityChange: s }, B.id), e[27] = s, e[28] = l, e[29] = k) : k = e[29], N = p.map(k), e[23] = p, e[24] = s, e[25] = l, e[26] = N;
546
- } else
547
- N = e[26];
548
- let J;
549
- e[30] !== N ? (J = /* @__PURE__ */ a(ze, { gap: "1px", children: N }), e[30] = N, e[31] = J) : J = e[31];
550
- let X;
551
- e[32] !== W || e[33] !== J ? (X = /* @__PURE__ */ a(eo, { items: W, strategy: to, children: J }), e[32] = W, e[33] = J, e[34] = X) : X = e[34];
552
- let j;
553
- e[35] !== C || e[36] !== v || e[37] !== X ? (j = /* @__PURE__ */ a(xe, { maxH: "280px", viewportProps: K, children: /* @__PURE__ */ a(re, { padding: "2xs", children: /* @__PURE__ */ a(Zt, { sensors: v, collisionDetection: Qt, onDragEnd: C, children: X }) }) }), e[35] = C, e[36] = v, e[37] = X, e[38] = j) : j = e[38];
554
- let H;
555
- e[39] !== j || e[40] !== P || e[41] !== M || e[42] !== D ? (H = /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a(te.Positioner, { children: /* @__PURE__ */ a(te.Content, { ref: f, width: "min(320px, calc(100vw - 32px))", p: "0", bg: "bg", overflow: "hidden", children: /* @__PURE__ */ _(ze, { gap: "0", children: [
556
- P,
557
- M,
558
- D,
559
- j
560
- ] }) }) }) }), e[39] = j, e[40] = P, e[41] = M, e[42] = D, e[43] = H) : H = e[43];
561
- let E;
562
- return e[44] !== h || e[45] !== H ? (E = /* @__PURE__ */ _(te.Root, { open: h, closeOnInteractOutside: !1, positioning: $, children: [
563
- T,
564
- H
565
- ] }), e[44] = h, e[45] = H, e[46] = E) : E = e[46], E;
166
+ //#endregion
167
+ //#region src/components/data-table/data-table-diff-cell.tsx
168
+ var at = (e) => {
169
+ let t = G(3), { value: n } = e, r;
170
+ return t[0] !== n.additions || t[1] !== n.deletions ? (r = /* @__PURE__ */ K(A, {
171
+ additions: n.additions,
172
+ deletions: n.deletions,
173
+ variant: "ghost",
174
+ size: "small"
175
+ }), t[0] = n.additions, t[1] = n.deletions, t[2] = r) : r = t[2], r;
176
+ }, ot = (e) => {
177
+ let t = G(14), { value: r } = e, i;
178
+ t[0] === r ? i = t[1] : (i = r.slice(0, -5), t[0] = r, t[1] = i);
179
+ let a = i, o;
180
+ t[2] === r ? o = t[3] : (o = r.slice(-5), t[2] = r, t[3] = o);
181
+ let s = o, c;
182
+ t[4] === a ? c = t[5] : (c = /* @__PURE__ */ K(W.span, {
183
+ overflow: "hidden",
184
+ textOverflow: "ellipsis",
185
+ children: a
186
+ }), t[4] = a, t[5] = c);
187
+ let l;
188
+ t[6] === s ? l = t[7] : (l = /* @__PURE__ */ K(W.span, {
189
+ flexShrink: 0,
190
+ children: s
191
+ }), t[6] = s, t[7] = l);
192
+ let u;
193
+ t[8] !== c || t[9] !== l ? (u = /* @__PURE__ */ q(W.span, {
194
+ display: "inline-flex",
195
+ minW: "0",
196
+ maxW: "full",
197
+ tabIndex: 0,
198
+ textStyle: "paragraph/S/regular",
199
+ whiteSpace: "nowrap",
200
+ children: [c, l]
201
+ }), t[8] = c, t[9] = l, t[10] = u) : u = t[10];
202
+ let d;
203
+ return t[11] !== u || t[12] !== r ? (d = /* @__PURE__ */ K(n, {
204
+ content: r,
205
+ openDelay: 300,
206
+ children: u
207
+ }), t[11] = u, t[12] = r, t[13] = d) : d = t[13], d;
208
+ }, st = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, ct = /(^|\s)(avatar|image|logo|photo|picture|thumbnail)(\s|$)/i, lt = (e) => {
209
+ let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
210
+ return t ? `${t[0]?.toUpperCase()}${t.slice(1)}` : "Details";
211
+ }, ut = (e) => e.map((e) => /^\d+$/.test(e) ? e : lt(e)).join(" / "), dt = (e) => e.every((e) => typeof e != "object" || !e), ft = (e, t, n) => {
212
+ if (Array.isArray(e)) {
213
+ if (e.length === 0 || dt(e)) {
214
+ n.push({
215
+ label: ut(t),
216
+ value: e
217
+ });
218
+ return;
219
+ }
220
+ e.forEach((e, r) => {
221
+ ft(e, [...t, String(r + 1)], n);
222
+ });
223
+ return;
224
+ }
225
+ if (typeof e == "object" && e) {
226
+ let r = Object.entries(e);
227
+ if (r.length === 0) {
228
+ n.push({
229
+ label: ut(t),
230
+ value: null
231
+ });
232
+ return;
233
+ }
234
+ r.forEach(([e, r]) => {
235
+ ft(r, [...t, e], n);
236
+ });
237
+ return;
238
+ }
239
+ n.push({
240
+ label: ut(t),
241
+ value: e
242
+ });
243
+ }, pt = (e) => {
244
+ if (typeof e != "string") return e;
245
+ try {
246
+ return JSON.parse(e);
247
+ } catch {
248
+ return e;
249
+ }
250
+ }, mt = (e) => {
251
+ let t = [];
252
+ return ft(pt(e), [], t), t.map((e) => ({
253
+ ...e,
254
+ label: e.label || "Value"
255
+ }));
256
+ }, ht = (e, t) => {
257
+ if (typeof e != "string") return !1;
258
+ if (e.startsWith("data:image/")) return !0;
259
+ try {
260
+ let n = new URL(e);
261
+ return n.protocol !== "http:" && n.protocol !== "https:" ? !1 : st.test(n.pathname) || ct.test(t);
262
+ } catch {
263
+ return !1;
264
+ }
265
+ }, gt = (e, t) => Array.isArray(e) && e.length > 0 && e.every((e) => ht(e, t)), _t = (e) => e == null || e === "" ? "Not provided" : typeof e == "boolean" ? e ? "Yes" : "No" : String(e), vt = (e) => Array.isArray(e) ? e.length === 0 ? "None" : e.map(_t).join(", ") : _t(e), yt = (e) => {
266
+ let t = pt(e);
267
+ if (Array.isArray(t) && t.length === 0 || typeof t == "object" && t && Object.keys(t).length === 0) return "No details";
268
+ let n = mt(e).filter((e) => !ht(e.value, e.label) && !gt(e.value, e.label));
269
+ if (n.length === 0) return "No details";
270
+ let r = n.slice(0, 2).map((e) => vt(e.value)), i = n.length - r.length;
271
+ return [...r, i > 0 ? `${i} more` : null].filter(Boolean).join(" · ");
272
+ }, bt = (e) => {
273
+ let { label: t, value: n } = e;
274
+ return ht(n, t) ? {
275
+ type: "image",
276
+ src: String(n),
277
+ alt: `${t} preview`
278
+ } : Array.isArray(n) && gt(n, t) ? {
279
+ type: "image-gallery",
280
+ images: n.map((e, n) => ({
281
+ src: String(e),
282
+ alt: `${t} ${n + 1} preview`
283
+ }))
284
+ } : Array.isArray(n) ? n : n === void 0 ? null : n;
285
+ }, xt = (e) => mt(e).map((e, t) => ({
286
+ id: `friendly-json-${t}`,
287
+ name: e.label,
288
+ type: "readOnly",
289
+ value: bt(e)
290
+ })), St = (e) => {
291
+ let t = G(4), { value: n } = e, r;
292
+ t[0] === n ? r = t[1] : (r = xt(n), t[0] = n, t[1] = r);
293
+ let i;
294
+ return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ K(j, {
295
+ params: r,
296
+ readOnly: !0,
297
+ fullWidth: !0
298
+ }), t[2] = r, t[3] = i), i;
299
+ }, Ct = (e) => e.stopPropagation(), wt = (e) => {
300
+ let t = G(49), { columnLabel: n, value: i } = e, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b;
301
+ if (t[0] !== n || t[1] !== i) {
302
+ let e = mt(i).flatMap(Tt).slice(0, 2), r;
303
+ t[18] === i ? r = t[19] : (r = yt(i), t[18] = i, t[19] = r), c = r, s = z.Root, t[20] === Symbol.for("react.memo_cache_sentinel") ? (f = {
304
+ placement: "bottom-start",
305
+ offset: { mainAxis: 6 }
306
+ }, t[20] = f) : f = t[20], o = z.Trigger, d = !0, a = N, l = `View ${n} details`, u = "ghost", p = "xs", m = "full", h = "0", g = "28px", _ = "2xs", v = "flex-start", y = Ct, b = e.length > 0 ? /* @__PURE__ */ K(F, {
307
+ gap: "-1",
308
+ flexShrink: "0",
309
+ children: e.map(Et)
310
+ }) : /* @__PURE__ */ K(fe, { size: 14 }), t[0] = n, t[1] = i, t[2] = a, t[3] = o, t[4] = s, t[5] = c, t[6] = l, t[7] = u, t[8] = d, t[9] = f, t[10] = p, t[11] = m, t[12] = h, t[13] = g, t[14] = _, t[15] = v, t[16] = y, t[17] = b;
311
+ } else a = t[2], o = t[3], s = t[4], c = t[5], l = t[6], u = t[7], d = t[8], f = t[9], p = t[10], m = t[11], h = t[12], g = t[13], _ = t[14], v = t[15], y = t[16], b = t[17];
312
+ let x;
313
+ t[21] === c ? x = t[22] : (x = /* @__PURE__ */ K(U, {
314
+ flex: "1",
315
+ minWidth: "0",
316
+ textAlign: "left",
317
+ textStyle: "paragraph/S/regular",
318
+ truncate: !0,
319
+ children: c
320
+ }), t[21] = c, t[22] = x);
321
+ let S;
322
+ t[23] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ K(X, { size: 12 }), t[23] = S) : S = t[23];
323
+ let C;
324
+ t[24] !== a || t[25] !== l || t[26] !== u || t[27] !== x || t[28] !== p || t[29] !== m || t[30] !== h || t[31] !== g || t[32] !== _ || t[33] !== v || t[34] !== y || t[35] !== b ? (C = /* @__PURE__ */ q(a, {
325
+ "aria-label": l,
326
+ variant: u,
327
+ size: p,
328
+ width: m,
329
+ minWidth: h,
330
+ height: g,
331
+ paddingX: _,
332
+ justifyContent: v,
333
+ onClick: y,
334
+ children: [
335
+ b,
336
+ x,
337
+ S
338
+ ]
339
+ }), t[24] = a, t[25] = l, t[26] = u, t[27] = x, t[28] = p, t[29] = m, t[30] = h, t[31] = g, t[32] = _, t[33] = v, t[34] = y, t[35] = b, t[36] = C) : C = t[36];
340
+ let w;
341
+ t[37] !== o || t[38] !== d || t[39] !== C ? (w = /* @__PURE__ */ K(o, {
342
+ asChild: d,
343
+ children: C
344
+ }), t[37] = o, t[38] = d, t[39] = C, t[40] = w) : w = t[40];
345
+ let T;
346
+ t[41] === Symbol.for("react.memo_cache_sentinel") ? (T = { overscrollBehavior: "contain" }, t[41] = T) : T = t[41];
347
+ let E;
348
+ t[42] === i ? E = t[43] : (E = /* @__PURE__ */ K(B, { children: /* @__PURE__ */ K(z.Positioner, { children: /* @__PURE__ */ K(z.Content, {
349
+ width: "min(380px, calc(100vw - 32px))",
350
+ padding: "0",
351
+ background: "bg",
352
+ overflow: "hidden",
353
+ children: /* @__PURE__ */ K(r, {
354
+ maxH: "360px",
355
+ viewportProps: T,
356
+ children: /* @__PURE__ */ K(St, { value: i })
357
+ })
358
+ }) }) }), t[42] = i, t[43] = E);
359
+ let D;
360
+ return t[44] !== s || t[45] !== f || t[46] !== w || t[47] !== E ? (D = /* @__PURE__ */ q(s, {
361
+ positioning: f,
362
+ children: [w, E]
363
+ }), t[44] = s, t[45] = f, t[46] = w, t[47] = E, t[48] = D) : D = t[48], D;
566
364
  };
567
- function qo(o) {
568
- return !o;
365
+ function Tt(e) {
366
+ return ht(e.value, e.label) ? [e] : !Array.isArray(e.value) || !gt(e.value, e.label) ? [] : e.value.map((t, n) => ({
367
+ label: `${e.label} ${n + 1}`,
368
+ value: t
369
+ }));
569
370
  }
570
- function Go(o) {
571
- return o.id;
371
+ function Et(e) {
372
+ return /* @__PURE__ */ K(L, {
373
+ src: String(e.value),
374
+ alt: `${e.label} preview`,
375
+ boxSize: "22px",
376
+ borderRadius: "xs",
377
+ borderWidth: "1px",
378
+ borderColor: "border.subtle",
379
+ objectFit: "cover"
380
+ }, e.label);
572
381
  }
573
- const Uo = () => {
574
- const o = z(11), e = uo(), t = mo();
575
- if (!e || !t)
576
- return null;
577
- const l = t.y + t.height;
578
- let n;
579
- o[0] !== e.x || o[1] !== t.y || o[2] !== l ? (n = /* @__PURE__ */ a("line", { x1: e.x, x2: e.x, y1: t.y, y2: l }), o[0] = e.x, o[1] = t.y, o[2] = l, o[3] = n) : n = o[3];
580
- const i = t.x + t.width;
581
- let c;
582
- o[4] !== e.y || o[5] !== t.x || o[6] !== i ? (c = /* @__PURE__ */ a("line", { x1: t.x, x2: i, y1: e.y, y2: e.y }), o[4] = e.y, o[5] = t.x, o[6] = i, o[7] = c) : c = o[7];
583
- let s;
584
- return o[8] !== n || o[9] !== c ? (s = /* @__PURE__ */ _("g", { pointerEvents: "none", stroke: "var(--chakra-colors-border-emphasized)", strokeWidth: "1", children: [
585
- n,
586
- c
587
- ] }), o[8] = n, o[9] = c, o[10] = s) : s = o[10], s;
588
- }, et = (o) => {
589
- const e = z(47), {
590
- data: t,
591
- dataKey: l,
592
- color: n,
593
- height: i,
594
- ariaLabel: c,
595
- tooltipLabel: s,
596
- tooltipValue: r,
597
- tooltipSeriesLabel: d,
598
- layout: u,
599
- categoryKey: m,
600
- domain: f,
601
- barSize: h,
602
- barCategoryGap: S
603
- } = o, b = u === void 0 ? "horizontal" : u, x = S === void 0 ? 1 : S;
604
- let g;
605
- e[0] !== n || e[1] !== l ? (g = [{
606
- name: l,
607
- color: n
608
- }], e[0] = n, e[1] = l, e[2] = g) : g = e[2];
609
- let v;
610
- e[3] !== t || e[4] !== g ? (v = {
611
- data: t,
612
- series: g
613
- }, e[3] = t, e[4] = g, e[5] = v) : v = e[5];
614
- const w = no(v);
615
- let p;
616
- e[6] !== l ? (p = (k) => k[l], e[6] = l, e[7] = p) : p = e[7];
617
- const R = p;
618
- let C;
619
- e[8] !== m ? (C = m ? (k) => k[m] : void 0, e[8] = m, e[9] = C) : C = e[9];
620
- const y = C, A = w.data;
621
- let $;
622
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = {
623
- top: 2,
624
- right: 0,
625
- bottom: 0,
626
- left: 0
627
- }, e[10] = $) : $ = e[10];
628
- let T;
629
- e[11] !== f || e[12] !== y || e[13] !== b ? (T = b === "vertical" ? /* @__PURE__ */ _(ct, { children: [
630
- /* @__PURE__ */ a(ro, { type: "number", domain: f, hide: !0 }),
631
- /* @__PURE__ */ a(io, { type: "category", dataKey: y, hide: !0 })
632
- ] }) : null, e[11] = f, e[12] = y, e[13] = b, e[14] = T) : T = e[14];
633
- let P;
634
- e[15] !== w || e[16] !== n ? (P = w.color(n), e[15] = w, e[16] = n, e[17] = P) : P = e[17];
635
- let M;
636
- e[18] !== h || e[19] !== R || e[20] !== P ? (M = /* @__PURE__ */ a(so, { dataKey: R, fill: P, barSize: h, isAnimationActive: !1 }), e[18] = h, e[19] = R, e[20] = P, e[21] = M) : M = e[21];
637
- let D;
638
- e[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = {
639
- x: !0,
640
- y: !0
641
- }, e[22] = D) : D = e[22];
642
- let K;
643
- e[23] !== s ? (K = (k, B) => {
644
- const F = B[0]?.payload;
645
- return F ? s(F) : k;
646
- }, e[23] = s, e[24] = K) : K = e[24];
647
- let W;
648
- e[25] !== d || e[26] !== r ? (W = (k) => [r(k), d], e[25] = d, e[26] = r, e[27] = W) : W = e[27];
649
- let N;
650
- e[28] !== K || e[29] !== W ? (N = /* @__PURE__ */ a(Ve.Tooltip, { labelFormatter: K, formatter: W }), e[28] = K, e[29] = W, e[30] = N) : N = e[30];
651
- let J;
652
- e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (J = /* @__PURE__ */ a(Uo, {}), e[31] = J) : J = e[31];
653
- let X;
654
- e[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (X = {
655
- zIndex: 1800
656
- }, e[32] = X) : X = e[32];
657
- let j;
658
- e[33] !== N ? (j = /* @__PURE__ */ a(ao, { allowEscapeViewBox: D, content: N, cursor: J, isAnimationActive: !1, wrapperStyle: X }), e[33] = N, e[34] = j) : j = e[34];
659
- let H;
660
- e[35] !== x || e[36] !== w.data || e[37] !== b || e[38] !== M || e[39] !== j || e[40] !== T ? (H = /* @__PURE__ */ _(co, { responsive: !0, data: A, layout: b, margin: $, barCategoryGap: x, children: [
661
- T,
662
- M,
663
- j
664
- ] }), e[35] = x, e[36] = w.data, e[37] = b, e[38] = M, e[39] = j, e[40] = T, e[41] = H) : H = e[41];
665
- let E;
666
- return e[42] !== c || e[43] !== w || e[44] !== i || e[45] !== H ? (E = /* @__PURE__ */ a(Ve.Root, { chart: w, height: i, aspectRatio: "auto", cursor: "crosshair", "aria-label": c, children: H }), e[42] = c, e[43] = w, e[44] = i, e[45] = H, e[46] = E) : E = e[46], E;
667
- }, Yo = (o) => Ge(o) ? o.sortValue : o, Ie = (o, e) => o.map((t) => Yo(t[e])).filter((t) => t != null && t !== ""), Zo = (o, e) => new Set(Ie(o, e)).size, Qo = (o, e, t) => {
668
- const l = Ie(o, e), n = /* @__PURE__ */ new Map();
669
- for (const r of l)
670
- n.set(r, (n.get(r) ?? 0) + 1);
671
- const i = [...n.entries()].map(([r, d]) => ({
672
- label: String(r),
673
- count: d,
674
- percentage: Math.round(d / l.length * 100)
675
- })).sort((r, d) => d.count - r.count || r.label.localeCompare(d.label)), c = i.slice(0, t), s = i.slice(t).reduce((r, d) => r + d.count, 0);
676
- return s === 0 ? c : [...c, {
677
- label: "Other",
678
- count: s,
679
- percentage: Math.round(s / l.length * 100)
680
- }];
681
- }, el = (o, e, t) => {
682
- const l = Ie(o, e).filter((r) => typeof r == "number");
683
- if (l.length === 0) return null;
684
- const n = Math.min(...l), i = Math.max(...l), c = (i - n) / t, s = Array.from({
685
- length: t
686
- }, (r, d) => ({
687
- start: n + c * d,
688
- end: n + c * (d + 1),
689
- count: 0
690
- }));
691
- for (const r of l) {
692
- const d = r === i || c === 0 ? t - 1 : Math.floor((r - n) / c);
693
- s[d].count += 1;
694
- }
695
- return {
696
- min: n,
697
- max: i,
698
- bins: s
699
- };
700
- }, Y = new Intl.NumberFormat(void 0, {
701
- maximumFractionDigits: 2
702
- }).format, tt = "vis.categorical.1", ot = (o) => {
703
- const e = z(10), {
704
- value: t,
705
- count: l
706
- } = o;
707
- let n;
708
- e[0] !== t ? (n = /* @__PURE__ */ a(O, { textStyle: "label/L/medium", lineHeight: "1", maxWidth: "100%", truncate: !0, children: t }), e[0] = t, e[1] = n) : n = e[1];
709
- let i;
710
- e[2] !== l ? (i = Y(l), e[2] = l, e[3] = i) : i = e[3];
711
- const c = l === 1 ? "value" : "values";
712
- let s;
713
- e[4] !== i || e[5] !== c ? (s = /* @__PURE__ */ _(O, { textStyle: "label/XS", color: "fg.muted", children: [
714
- i,
715
- " ",
716
- c
717
- ] }), e[4] = i, e[5] = c, e[6] = s) : s = e[6];
718
- let r;
719
- return e[7] !== n || e[8] !== s ? (r = /* @__PURE__ */ _(oe, { "data-single-value-stat": !0, direction: "column", gap: "2xs", alignItems: "flex-start", minWidth: "0", children: [
720
- n,
721
- s
722
- ] }), e[7] = n, e[8] = s, e[9] = r) : r = e[9], r;
723
- }, tl = (o) => {
724
- const e = z(22), {
725
- rows: t,
726
- columnId: l
727
- } = o;
728
- let n, i, c, s, r, d, u, m;
729
- if (e[0] !== l || e[1] !== t) {
730
- const b = Zo(t, l);
731
- i = oe, d = "column", u = "2xs", m = "flex-start", n = O, c = "label/L/medium", s = "1", r = Y(b), e[0] = l, e[1] = t, e[2] = n, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m;
732
- } else
733
- n = e[2], i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9];
734
- let f;
735
- e[10] !== n || e[11] !== c || e[12] !== s || e[13] !== r ? (f = /* @__PURE__ */ a(n, { textStyle: c, lineHeight: s, children: r }), e[10] = n, e[11] = c, e[12] = s, e[13] = r, e[14] = f) : f = e[14];
736
- let h;
737
- e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: "unique values" }), e[15] = h) : h = e[15];
738
- let S;
739
- return e[16] !== i || e[17] !== d || e[18] !== u || e[19] !== m || e[20] !== f ? (S = /* @__PURE__ */ _(i, { direction: d, gap: u, alignItems: m, children: [
740
- f,
741
- h
742
- ] }), e[16] = i, e[17] = d, e[18] = u, e[19] = m, e[20] = f, e[21] = S) : S = e[21], S;
743
- }, ol = (o) => {
744
- const e = z(36), {
745
- rows: t,
746
- columnId: l,
747
- binCount: n
748
- } = o;
749
- let i, c, s, r, d, u, m, f, h, S, b, x, g, v;
750
- if (e[0] !== n || e[1] !== l || e[2] !== t) {
751
- u = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
752
- e: {
753
- const C = el(t, l, n);
754
- if (!C) {
755
- let A;
756
- e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: "No numeric values" }), e[17] = A) : A = e[17], u = A;
757
- break e;
758
- }
759
- const y = C.bins.reduce(sl, 0);
760
- if (C.min === C.max) {
761
- u = /* @__PURE__ */ a(ot, { value: Y(C.min), count: y });
762
- break e;
763
- }
764
- s = oe, b = "column", x = "100%", g = "2xs", v = /* @__PURE__ */ a(et, { data: C.bins, dataKey: "count", color: tt, height: "40px", ariaLabel: `Distribution for ${l}`, tooltipLabel: al, tooltipValue: cl, tooltipSeriesLabel: "Count" }), c = oe, f = "space-between", h = "xs", S = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: Y(C.min) }), i = O, r = "label/XS/regular", d = "fg.muted", m = Y(C.max);
765
- }
766
- e[0] = n, e[1] = l, e[2] = t, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m, e[10] = f, e[11] = h, e[12] = S, e[13] = b, e[14] = x, e[15] = g, e[16] = v;
767
- } else
768
- i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9], f = e[10], h = e[11], S = e[12], b = e[13], x = e[14], g = e[15], v = e[16];
769
- if (u !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
770
- return u;
771
- let w;
772
- e[18] !== i || e[19] !== r || e[20] !== d || e[21] !== m ? (w = /* @__PURE__ */ a(i, { textStyle: r, color: d, children: m }), e[18] = i, e[19] = r, e[20] = d, e[21] = m, e[22] = w) : w = e[22];
773
- let p;
774
- e[23] !== c || e[24] !== w || e[25] !== f || e[26] !== h || e[27] !== S ? (p = /* @__PURE__ */ _(c, { justifyContent: f, gap: h, children: [
775
- S,
776
- w
777
- ] }), e[23] = c, e[24] = w, e[25] = f, e[26] = h, e[27] = S, e[28] = p) : p = e[28];
778
- let R;
779
- return e[29] !== s || e[30] !== p || e[31] !== b || e[32] !== x || e[33] !== g || e[34] !== v ? (R = /* @__PURE__ */ _(s, { direction: b, width: x, gap: g, children: [
780
- v,
781
- p
782
- ] }), e[29] = s, e[30] = p, e[31] = b, e[32] = x, e[33] = g, e[34] = v, e[35] = R) : R = e[35], R;
783
- }, ll = (o) => {
784
- const e = z(15), {
785
- rows: t,
786
- columnId: l,
787
- limit: n
788
- } = o;
789
- let i, c, s, r, d, u;
790
- if (e[0] !== l || e[1] !== n || e[2] !== t) {
791
- u = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
792
- e: {
793
- const f = Qo(t, l, n);
794
- if (f.length === 1 && f[0]) {
795
- u = /* @__PURE__ */ a(ot, { value: f[0].label, count: f[0].count });
796
- break e;
797
- }
798
- i = oe, c = "column", s = "100%", r = "2xs", d = f.map(ml);
799
- }
800
- e[0] = l, e[1] = n, e[2] = t, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u;
801
- } else
802
- i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8];
803
- if (u !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
804
- return u;
805
- let m;
806
- return e[9] !== i || e[10] !== c || e[11] !== s || e[12] !== r || e[13] !== d ? (m = /* @__PURE__ */ a(i, { direction: c, width: s, gap: r, children: d }), e[9] = i, e[10] = c, e[11] = s, e[12] = r, e[13] = d, e[14] = m) : m = e[14], m;
807
- }, nl = (o) => {
808
- const e = z(11), {
809
- rows: t,
810
- columnId: l,
811
- stat: n
812
- } = o;
813
- if (n.type === "unique") {
814
- let s;
815
- return e[0] !== l || e[1] !== t ? (s = /* @__PURE__ */ a(tl, { rows: t, columnId: l }), e[0] = l, e[1] = t, e[2] = s) : s = e[2], s;
816
- }
817
- if (n.type === "histogram") {
818
- const s = n.bins ?? 10;
819
- let r;
820
- return e[3] !== l || e[4] !== t || e[5] !== s ? (r = /* @__PURE__ */ a(ol, { rows: t, columnId: l, binCount: s }), e[3] = l, e[4] = t, e[5] = s, e[6] = r) : r = e[6], r;
821
- }
822
- const i = n.limit ?? 2;
823
- let c;
824
- return e[7] !== l || e[8] !== t || e[9] !== i ? (c = /* @__PURE__ */ a(ll, { rows: t, columnId: l, limit: i }), e[7] = l, e[8] = t, e[9] = i, e[10] = c) : c = e[10], c;
825
- }, rl = (o) => {
826
- const e = z(12), {
827
- header: t,
828
- headerGroup: l,
829
- rows: n,
830
- columnStats: i,
831
- fullWidth: c
832
- } = o, s = i[t.column.id], r = s?.type;
833
- let d;
834
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
835
- borderRight: "none"
836
- }, e[0] = d) : d = e[0];
837
- const u = c && l.headers.indexOf(t) === l.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
838
- let m;
839
- e[1] !== u ? (m = {
840
- width: u
841
- }, e[1] = u, e[2] = m) : m = e[2];
842
- let f;
843
- e[3] !== t.column.id || e[4] !== n || e[5] !== s ? (f = s ? /* @__PURE__ */ a(nl, { rows: n, columnId: t.column.id, stat: s }) : null, e[3] = t.column.id, e[4] = n, e[5] = s, e[6] = f) : f = e[6];
844
- let h;
845
- return e[7] !== t.column.id || e[8] !== r || e[9] !== m || e[10] !== f ? (h = /* @__PURE__ */ a(L.ColumnHeader, { "data-column-id": t.column.id, "data-stat-type": r, borderRight: "1px solid", _last: d, borderColor: "border.subtle", padding: "xs", verticalAlign: "middle", overflow: "hidden", style: m, children: f }), e[7] = t.column.id, e[8] = r, e[9] = m, e[10] = f, e[11] = h) : h = e[11], h;
846
- }, il = (o) => {
847
- const e = z(8), {
848
- headerGroup: t,
849
- rows: l,
850
- columnStats: n,
851
- fullWidth: i,
852
- noBorder: c
853
- } = o;
854
- if (!t.headers.some((m) => n[m.column.id]))
855
- return null;
856
- const r = c ? "none" : "1px solid";
857
- let d;
858
- e[0] !== n || e[1] !== i || e[2] !== t || e[3] !== l ? (d = t.headers.map((m) => /* @__PURE__ */ a(rl, { header: m, headerGroup: t, rows: l, columnStats: n, fullWidth: i }, m.id)), e[0] = n, e[1] = i, e[2] = t, e[3] = l, e[4] = d) : d = e[4];
859
- let u;
860
- return e[5] !== r || e[6] !== d ? (u = /* @__PURE__ */ a(L.Row, { className: "data-table-stats-row", borderRight: r, borderColor: "border.subtle", children: d }), e[5] = r, e[6] = d, e[7] = u) : u = e[7], u;
382
+ //#endregion
383
+ //#region src/components/data-table/data-table-cell-renderers.tsx
384
+ var Dt = (e) => J(e) ? oe(e, { style: {
385
+ ...e.props.style,
386
+ flexWrap: "nowrap",
387
+ minWidth: 0,
388
+ whiteSpace: "nowrap"
389
+ } }) : e, Ot = (e) => {
390
+ e.stopPropagation();
391
+ }, kt = (t) => {
392
+ let n = G(8), { table: r } = t, i = r.getIsAllRowsSelected(), a = !i && r.getIsSomeRowsSelected(), o = i ? !0 : a ? "indeterminate" : !1, s = a ? Z : pe, c;
393
+ n[0] === s ? c = n[1] : (c = /* @__PURE__ */ K(I, {
394
+ as: s,
395
+ boxSize: "12px",
396
+ strokeWidth: "3"
397
+ }), n[0] = s, n[1] = c);
398
+ let l;
399
+ n[2] === r ? l = n[3] : (l = (e) => r.toggleAllRowsSelected(e.checked === !0), n[2] = r, n[3] = l);
400
+ let u;
401
+ return n[4] !== o || n[5] !== c || n[6] !== l ? (u = /* @__PURE__ */ K(e, {
402
+ checked: o,
403
+ "aria-label": "Select all",
404
+ icon: c,
405
+ onClick: Ot,
406
+ onCheckedChange: l
407
+ }), n[4] = o, n[5] = c, n[6] = l, n[7] = u) : u = n[7], u;
408
+ }, At = (t) => {
409
+ let n = G(6), { row: r, column: i } = t, { selectedRowIds: a } = i.columnDef.meta, o = !!a?.[r.id], s;
410
+ n[0] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ K(I, {
411
+ as: pe,
412
+ boxSize: "12px",
413
+ strokeWidth: "3"
414
+ }), n[0] = s) : s = n[0];
415
+ let c;
416
+ n[1] === r ? c = n[2] : (c = (e) => r.toggleSelected(e.checked === !0), n[1] = r, n[2] = c);
417
+ let l;
418
+ return n[3] !== o || n[4] !== c ? (l = /* @__PURE__ */ K(e, {
419
+ checked: o,
420
+ "aria-label": "Select row",
421
+ icon: s,
422
+ onClick: Ot,
423
+ onCheckedChange: c
424
+ }), n[3] = o, n[4] = c, n[5] = l) : l = n[5], l;
425
+ }, jt = (e, t) => {
426
+ let n = new Set(t.map((e) => e.label));
427
+ return [...t, ...e.filter((e) => !n.has(e.label))];
428
+ }, Mt = (e) => {
429
+ let t = G(30), { row: n, column: r } = e, { rowActions: i, getRowActions: a } = r.columnDef.meta, s, c, l, u, d, f, p, m, h;
430
+ if (t[0] !== a || t[1] !== n || t[2] !== i) {
431
+ h = Symbol.for("react.early_return_sentinel");
432
+ bb0: {
433
+ let e = jt(i === void 0 ? [] : i, a?.(n.original) ?? []);
434
+ if (e.length === 0) {
435
+ h = null;
436
+ break bb0;
437
+ }
438
+ u = R.Root, t[12] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ K(R.Trigger, {
439
+ asChild: !0,
440
+ children: /* @__PURE__ */ K(ne, {
441
+ "aria-label": "Row actions",
442
+ size: "2xs",
443
+ variant: "ghost",
444
+ onClick: Ot,
445
+ children: /* @__PURE__ */ K(I, {
446
+ as: me,
447
+ boxSize: "14px"
448
+ })
449
+ })
450
+ }), t[12] = m) : m = t[12], l = B, c = R.Positioner, s = R.Content, d = "popover", f = "bg";
451
+ let r;
452
+ t[13] === n ? r = t[14] : (r = (e) => /* @__PURE__ */ K(R.Item, {
453
+ value: e.label,
454
+ asChild: !0,
455
+ children: /* @__PURE__ */ K(o, {
456
+ asChild: !0,
457
+ variant: "full-width",
458
+ tone: e.destructive ? "danger" : "default",
459
+ label: e.label,
460
+ icon: e.icon,
461
+ onClick: Ot,
462
+ onActivate: () => e.onSelect(n.original)
463
+ })
464
+ }, e.label), t[13] = n, t[14] = r), p = e.map(r);
465
+ }
466
+ t[0] = a, t[1] = n, t[2] = i, t[3] = s, t[4] = c, t[5] = l, t[6] = u, t[7] = d, t[8] = f, t[9] = p, t[10] = m, t[11] = h;
467
+ } else s = t[3], c = t[4], l = t[5], u = t[6], d = t[7], f = t[8], p = t[9], m = t[10], h = t[11];
468
+ if (h !== Symbol.for("react.early_return_sentinel")) return h;
469
+ let g;
470
+ t[15] !== s || t[16] !== d || t[17] !== f || t[18] !== p ? (g = /* @__PURE__ */ K(s, {
471
+ zIndex: d,
472
+ bg: f,
473
+ children: p
474
+ }), t[15] = s, t[16] = d, t[17] = f, t[18] = p, t[19] = g) : g = t[19];
475
+ let _;
476
+ t[20] !== c || t[21] !== g ? (_ = /* @__PURE__ */ K(c, { children: g }), t[20] = c, t[21] = g, t[22] = _) : _ = t[22];
477
+ let v;
478
+ t[23] !== l || t[24] !== _ ? (v = /* @__PURE__ */ K(l, { children: _ }), t[23] = l, t[24] = _, t[25] = v) : v = t[25];
479
+ let y;
480
+ return t[26] !== u || t[27] !== m || t[28] !== v ? (y = /* @__PURE__ */ q(u, { children: [m, v] }), t[26] = u, t[27] = m, t[28] = v, t[29] = y) : y = t[29], y;
481
+ }, Nt = (e) => {
482
+ let t = G(15), { value: n, wrapRows: r } = e, i, a;
483
+ if (t[0] !== n || t[1] !== r) {
484
+ a = Symbol.for("react.early_return_sentinel");
485
+ bb0: if (i = d(n), J(i)) {
486
+ let e = r ? "visible" : "hidden", n = r ? "anywhere" : void 0, o = r ? "normal" : "nowrap", s = r ? i : Dt(i), c;
487
+ t[4] !== e || t[5] !== n || t[6] !== o || t[7] !== s ? (c = /* @__PURE__ */ K(W.span, {
488
+ display: "inline-flex",
489
+ maxWidth: "full",
490
+ minW: "0",
491
+ overflow: e,
492
+ overflowWrap: n,
493
+ whiteSpace: o,
494
+ children: s
495
+ }), t[4] = e, t[5] = n, t[6] = o, t[7] = s, t[8] = c) : c = t[8], a = c;
496
+ break bb0;
497
+ }
498
+ t[0] = n, t[1] = r, t[2] = i, t[3] = a;
499
+ } else i = t[2], a = t[3];
500
+ if (a !== Symbol.for("react.early_return_sentinel")) return a;
501
+ let o = r ? "visible" : "hidden", s = r ? "anywhere" : void 0, c = r ? void 0 : "ellipsis", l = r ? "normal" : "nowrap", u;
502
+ return t[9] !== i || t[10] !== o || t[11] !== s || t[12] !== c || t[13] !== l ? (u = /* @__PURE__ */ K(U, {
503
+ maxWidth: "full",
504
+ overflow: o,
505
+ overflowWrap: s,
506
+ textOverflow: c,
507
+ textStyle: "paragraph/S/regular",
508
+ whiteSpace: l,
509
+ children: i
510
+ }), t[9] = i, t[10] = o, t[11] = s, t[12] = c, t[13] = l, t[14] = u) : u = t[14], u;
511
+ }, Pt = (e) => {
512
+ let t = G(20), { columnLabel: n, renderer: r, value: i, wrapRows: a } = e;
513
+ if (r?.type === "json") {
514
+ let e;
515
+ return t[0] !== n || t[1] !== i ? (e = /* @__PURE__ */ K(wt, {
516
+ columnLabel: n,
517
+ value: i
518
+ }), t[0] = n, t[1] = i, t[2] = e) : e = t[2], e;
519
+ }
520
+ if (r?.type === "badge" && [
521
+ "string",
522
+ "number",
523
+ "boolean"
524
+ ].includes(typeof i)) {
525
+ let e = i, n;
526
+ return t[3] !== r.categories || t[4] !== e ? (n = /* @__PURE__ */ K($e, {
527
+ value: e,
528
+ categories: r.categories
529
+ }), t[3] = r.categories, t[4] = e, t[5] = n) : n = t[5], n;
530
+ }
531
+ if (r?.type === "diff" && p(i)) {
532
+ let e;
533
+ return t[6] === i ? e = t[7] : (e = /* @__PURE__ */ K(at, { value: i }), t[6] = i, t[7] = e), e;
534
+ }
535
+ if (r?.type === "path" && typeof i == "string" && !a) {
536
+ let e;
537
+ return t[8] === i ? e = t[9] : (e = /* @__PURE__ */ K(ot, { value: i }), t[8] = i, t[9] = e), e;
538
+ }
539
+ if (r?.type === "date" && nt(i)) {
540
+ let e = i, n;
541
+ return t[10] === e ? n = t[11] : (n = /* @__PURE__ */ K(rt, { value: e }), t[10] = e, t[11] = n), n;
542
+ }
543
+ if (r?.type === "color-scale" && Ze(i, r.stops) && typeof i == "number") {
544
+ let e;
545
+ return t[12] === i ? e = t[13] : (e = /* @__PURE__ */ K(Qe, { value: i }), t[12] = i, t[13] = e), e;
546
+ }
547
+ if (r?.type === "categorical-color" && Me(i, r.categories)) {
548
+ let e;
549
+ return t[14] !== i || t[15] !== a ? (e = /* @__PURE__ */ K(Ne, { children: /* @__PURE__ */ K(Nt, {
550
+ value: i,
551
+ wrapRows: a
552
+ }) }), t[14] = i, t[15] = a, t[16] = e) : e = t[16], e;
553
+ }
554
+ let o;
555
+ return t[17] !== i || t[18] !== a ? (o = /* @__PURE__ */ K(Nt, {
556
+ value: i,
557
+ wrapRows: a
558
+ }), t[17] = i, t[18] = a, t[19] = o) : o = t[19], o;
559
+ }, Ft = (e) => {
560
+ let t = G(4), { getValue: n } = e, r;
561
+ t[0] === n ? r = t[1] : (r = n(), t[0] = n, t[1] = r);
562
+ let i;
563
+ return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ K(W.span, {
564
+ display: "block",
565
+ textStyle: "paragraph/S/regular",
566
+ textAlign: "center",
567
+ children: r
568
+ }), t[2] = r, t[3] = i), i;
569
+ }, It = (e) => {
570
+ let t = G(7), { column: n, getValue: r } = e, { renderer: i, wrapRows: a } = n.columnDef.meta, o = a !== void 0 && a, s = n.id, c;
571
+ t[0] === r ? c = t[1] : (c = r(), t[0] = r, t[1] = c);
572
+ let l;
573
+ return t[2] !== n.id || t[3] !== i || t[4] !== c || t[5] !== o ? (l = /* @__PURE__ */ K(Pt, {
574
+ columnLabel: s,
575
+ renderer: i,
576
+ value: c,
577
+ wrapRows: o
578
+ }), t[2] = n.id, t[3] = i, t[4] = c, t[5] = o, t[6] = l) : l = t[6], l;
579
+ }, Lt = (e) => {
580
+ let t = G(9), { column: r } = e, { headerLabel: i, headerIcon: a, columnDescription: o } = r.columnDef.meta, s;
581
+ t[0] === i ? s = t[1] : (s = /* @__PURE__ */ K(W.span, {
582
+ overflow: "hidden",
583
+ textOverflow: "ellipsis",
584
+ whiteSpace: "nowrap",
585
+ children: i
586
+ }), t[0] = i, t[1] = s);
587
+ let c;
588
+ t[2] !== o || t[3] !== i ? (c = o ? /* @__PURE__ */ K(n, {
589
+ content: o,
590
+ children: /* @__PURE__ */ K(I, {
591
+ as: he,
592
+ "aria-label": `About ${i}`,
593
+ boxSize: "12px",
594
+ color: "fg.muted",
595
+ cursor: "help",
596
+ flexShrink: 0,
597
+ opacity: .6,
598
+ tabIndex: 0
599
+ })
600
+ }) : null, t[2] = o, t[3] = i, t[4] = c) : c = t[4];
601
+ let l;
602
+ return t[5] !== a || t[6] !== s || t[7] !== c ? (l = /* @__PURE__ */ q(W.span, {
603
+ display: "inline-flex",
604
+ alignItems: "center",
605
+ gap: "4px",
606
+ minW: "0",
607
+ maxW: "full",
608
+ overflow: "hidden",
609
+ children: [
610
+ a,
611
+ s,
612
+ c
613
+ ]
614
+ }), t[5] = a, t[6] = s, t[7] = c, t[8] = l) : l = t[8], l;
615
+ }, Rt = (e, t) => e === t ? 0 : e == null ? 1 : t == null ? -1 : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t)), zt = (e, t) => {
616
+ if (t?.type === "color-scale") {
617
+ let n = Ze(e, t.stops);
618
+ if (n && typeof e == "number") return qe(n);
619
+ }
620
+ if (t?.type === "categorical-color") {
621
+ let n = Me(e, t.categories);
622
+ if (n) return qe(n);
623
+ }
861
624
  };
862
- function sl(o, e) {
863
- return o + e.count;
864
- }
865
- function al(o) {
866
- return `${Y(o.start)} – ${Y(o.end)}`;
625
+ function Bt(e, t, n = {}) {
626
+ let { columnIcons: r, columnDescriptions: i, compactHeaders: a, enableSelection: o = !1, selectedRowIds: s, rowActions: c = [], getRowActions: l, columnRenderers: u, wrapRows: d = !1 } = n, p = g.accessor((e, t) => t + 1, {
627
+ header: "",
628
+ id: "rowIndex",
629
+ enableResizing: !1,
630
+ size: 20,
631
+ cell: Ft
632
+ }), h = g.display({
633
+ id: "rowSelection",
634
+ header: kt,
635
+ cell: At,
636
+ meta: { selectedRowIds: s },
637
+ enableResizing: !1,
638
+ enableSorting: !1,
639
+ size: 36
640
+ }), _ = t.map((t) => {
641
+ let n = t || "-", o = e.map((e) => e[n]), s = u?.[n], c = r?.[n], l = c === void 0 ? f(o) : c, p = i?.[n];
642
+ return g.accessor((e) => e[n], {
643
+ id: n,
644
+ header: Lt,
645
+ cell: It,
646
+ meta: {
647
+ headerLabel: a?.[n] ?? n,
648
+ headerIcon: l,
649
+ columnDescription: p,
650
+ renderer: s,
651
+ wrapRows: d,
652
+ getCellStyle: (e) => zt(e, s)
653
+ },
654
+ sortingFn: (e, t) => Rt(m(e.original[n], s), m(t.original[n], s))
655
+ });
656
+ }), v = g.display({
657
+ id: "rowActions",
658
+ header: "",
659
+ cell: Mt,
660
+ meta: {
661
+ rowActions: c,
662
+ getRowActions: l
663
+ },
664
+ enableResizing: !1,
665
+ enableSorting: !1,
666
+ size: 36
667
+ });
668
+ return [
669
+ p,
670
+ ...o ? [h] : [],
671
+ ..._,
672
+ ...c.length > 0 || l ? [v] : []
673
+ ];
867
674
  }
868
- function cl(o) {
869
- return `${Y(Number(o))} values`;
870
- }
871
- function dl(o) {
872
- return `${o.label} · ${Y(o.count)} values`;
873
- }
874
- function ul(o) {
875
- return `${Y(Number(o))}%`;
675
+ //#endregion
676
+ //#region src/components/data-table/data-table-column-menu.tsx
677
+ var Vt = (t) => {
678
+ let n = G(28), { column: r, checked: i, onColumnVisibilityChange: a } = t, o;
679
+ n[0] === r.id ? o = n[1] : (o = { id: r.id }, n[0] = r.id, n[1] = o);
680
+ let { attributes: s, listeners: c, setNodeRef: l, transform: u, transition: d, isDragging: f } = we(o), p;
681
+ n[2] === u ? p = n[3] : (p = Ee.Transform.toString(u), n[2] = u, n[3] = p);
682
+ let m = f ? .5 : 1, h;
683
+ n[4] !== p || n[5] !== m || n[6] !== d ? (h = {
684
+ transform: p,
685
+ transition: d,
686
+ opacity: m
687
+ }, n[4] = p, n[5] = m, n[6] = d, n[7] = h) : h = n[7];
688
+ let g = h, _;
689
+ n[8] === Symbol.for("react.memo_cache_sentinel") ? (_ = { bg: "bg.hover" }, n[8] = _) : _ = n[8];
690
+ let v;
691
+ n[9] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ K(ge, { size: 14 }), n[9] = v) : v = n[9];
692
+ let y;
693
+ n[10] !== s || n[11] !== c ? (y = /* @__PURE__ */ K(te, {
694
+ as: "span",
695
+ display: "inline-flex",
696
+ cursor: "grab",
697
+ color: "fg.muted",
698
+ ...s,
699
+ ...c,
700
+ children: v
701
+ }), n[10] = s, n[11] = c, n[12] = y) : y = n[12];
702
+ let b;
703
+ n[13] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ K(I, {
704
+ as: pe,
705
+ boxSize: "12px",
706
+ strokeWidth: "3"
707
+ }), n[13] = b) : b = n[13];
708
+ let x;
709
+ n[14] !== r.id || n[15] !== a ? (x = (e) => a(r.id, e.checked === !0), n[14] = r.id, n[15] = a, n[16] = x) : x = n[16];
710
+ let S;
711
+ n[17] === r.label ? S = n[18] : (S = /* @__PURE__ */ K(U, {
712
+ as: "span",
713
+ textStyle: "label/S/regular",
714
+ truncate: !0,
715
+ children: r.label
716
+ }), n[17] = r.label, n[18] = S);
717
+ let C;
718
+ n[19] !== i || n[20] !== x || n[21] !== S ? (C = /* @__PURE__ */ K(e, {
719
+ checked: i,
720
+ flex: "1",
721
+ minW: "0",
722
+ width: "full",
723
+ flexDirection: "row-reverse",
724
+ justifyContent: "space-between",
725
+ size: "sm",
726
+ icon: b,
727
+ onCheckedChange: x,
728
+ children: S
729
+ }), n[19] = i, n[20] = x, n[21] = S, n[22] = C) : C = n[22];
730
+ let w;
731
+ return n[23] !== l || n[24] !== g || n[25] !== C || n[26] !== y ? (w = /* @__PURE__ */ q(F, {
732
+ ref: l,
733
+ style: g,
734
+ gap: "2xs",
735
+ minW: "0",
736
+ width: "full",
737
+ borderRadius: "xs",
738
+ px: "xs",
739
+ py: "2xs",
740
+ _hover: _,
741
+ children: [y, C]
742
+ }), n[23] = l, n[24] = g, n[25] = C, n[26] = y, n[27] = w) : w = n[27], w;
743
+ }, Ht = (e) => {
744
+ let n = G(47), { columns: a, visibleColumnIds: o, wrapRows: s, showStats: c, statsAvailable: l, onColumnVisibilityChange: u, onColumnReorder: d, onWrapRowsChange: f, onStatsVisibilityChange: p } = e, m = le(null), h = le(null), [g, v] = Y(!1), [y, b] = Y(""), x;
745
+ n[0] === Symbol.for("react.memo_cache_sentinel") ? (x = { activationConstraint: { distance: 5 } }, n[0] = x) : x = n[0];
746
+ let S = Ce(Se(be, x)), C;
747
+ if (n[1] !== a || n[2] !== y) {
748
+ let e = y.trim().toLowerCase();
749
+ C = e ? a.filter((t) => t.label.toLowerCase().includes(e)) : a, n[1] = a, n[2] = y, n[3] = C;
750
+ } else C = n[3];
751
+ let w = C, T;
752
+ n[4] === d ? T = n[5] : (T = (e) => {
753
+ let { active: t, over: n } = e;
754
+ n && t.id !== n.id && d(String(t.id), String(n.id));
755
+ }, n[4] = d, n[5] = T);
756
+ let E = T, D, O;
757
+ n[6] === g ? (D = n[7], O = n[8]) : (D = () => {
758
+ if (!g) return;
759
+ let e = (e) => {
760
+ let t = e.target;
761
+ t instanceof Node && (h.current?.contains(t) || m.current?.contains(t) || v(!1));
762
+ }, t = (e) => {
763
+ e.key === "Escape" && v(!1);
764
+ };
765
+ return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t, !0), () => {
766
+ document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t, !0);
767
+ };
768
+ }, O = [g], n[6] = g, n[7] = D, n[8] = O), ce(D, O);
769
+ let ee;
770
+ n[9] === Symbol.for("react.memo_cache_sentinel") ? (ee = {
771
+ placement: "bottom-end",
772
+ offset: { mainAxis: 8 },
773
+ getAnchorElement: () => m.current
774
+ }, n[9] = ee) : ee = n[9];
775
+ let k;
776
+ n[10] === Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ K(z.Trigger, {
777
+ asChild: !0,
778
+ children: /* @__PURE__ */ K(ne, {
779
+ ref: m,
780
+ "aria-label": "Display settings",
781
+ variant: "ghost",
782
+ size: "sm",
783
+ onClick: () => v(Ut),
784
+ children: /* @__PURE__ */ K(I, {
785
+ as: ve,
786
+ boxSize: "14px"
787
+ })
788
+ })
789
+ }), n[10] = k) : k = n[10];
790
+ let A;
791
+ n[11] !== f || n[12] !== s ? (A = /* @__PURE__ */ K(_, {
792
+ showDivider: !0,
793
+ wrapRows: s,
794
+ onWrapRowsChange: f
795
+ }), n[11] = f, n[12] = s, n[13] = A) : A = n[13];
796
+ let j;
797
+ n[14] !== p || n[15] !== c || n[16] !== l ? (j = l ? /* @__PURE__ */ K(te, {
798
+ borderBottomWidth: "1px",
799
+ borderColor: "border.subtle",
800
+ padding: "xs",
801
+ children: /* @__PURE__ */ K(t, {
802
+ checked: c,
803
+ inputProps: { role: "switch" },
804
+ width: "full",
805
+ flexDirection: "row-reverse",
806
+ justifyContent: "space-between",
807
+ onCheckedChange: (e) => p(e.checked === !0),
808
+ children: /* @__PURE__ */ K(U, {
809
+ as: "span",
810
+ textStyle: "label/S/regular",
811
+ children: "Statistics"
812
+ })
813
+ })
814
+ }) : null, n[14] = p, n[15] = c, n[16] = l, n[17] = j) : j = n[17];
815
+ let M;
816
+ n[18] === y ? M = n[19] : (M = /* @__PURE__ */ K(i, {
817
+ value: y,
818
+ placeholder: "Search columns",
819
+ onValueChange: b
820
+ }), n[18] = y, n[19] = M);
821
+ let N;
822
+ n[20] === Symbol.for("react.memo_cache_sentinel") ? (N = { overscrollBehavior: "contain" }, n[20] = N) : N = n[20];
823
+ let P;
824
+ n[21] === a ? P = n[22] : (P = a.map(Wt), n[21] = a, n[22] = P);
825
+ let F;
826
+ if (n[23] !== w || n[24] !== u || n[25] !== o) {
827
+ let e;
828
+ n[27] !== u || n[28] !== o ? (e = (e) => /* @__PURE__ */ K(Vt, {
829
+ column: e,
830
+ checked: o.has(e.id),
831
+ onColumnVisibilityChange: u
832
+ }, e.id), n[27] = u, n[28] = o, n[29] = e) : e = n[29], F = w.map(e), n[23] = w, n[24] = u, n[25] = o, n[26] = F;
833
+ } else F = n[26];
834
+ let L;
835
+ n[30] === F ? L = n[31] : (L = /* @__PURE__ */ K(re, {
836
+ gap: "1px",
837
+ children: F
838
+ }), n[30] = F, n[31] = L);
839
+ let R;
840
+ n[32] !== P || n[33] !== L ? (R = /* @__PURE__ */ K(Q, {
841
+ items: P,
842
+ strategy: Te,
843
+ children: L
844
+ }), n[32] = P, n[33] = L, n[34] = R) : R = n[34];
845
+ let V;
846
+ n[35] !== E || n[36] !== S || n[37] !== R ? (V = /* @__PURE__ */ K(r, {
847
+ maxH: "280px",
848
+ viewportProps: N,
849
+ children: /* @__PURE__ */ K(te, {
850
+ padding: "2xs",
851
+ children: /* @__PURE__ */ K(ye, {
852
+ sensors: S,
853
+ collisionDetection: xe,
854
+ onDragEnd: E,
855
+ children: R
856
+ })
857
+ })
858
+ }), n[35] = E, n[36] = S, n[37] = R, n[38] = V) : V = n[38];
859
+ let H;
860
+ n[39] !== V || n[40] !== A || n[41] !== j || n[42] !== M ? (H = /* @__PURE__ */ K(B, { children: /* @__PURE__ */ K(z.Positioner, { children: /* @__PURE__ */ K(z.Content, {
861
+ ref: h,
862
+ width: "min(320px, calc(100vw - 32px))",
863
+ p: "0",
864
+ bg: "bg",
865
+ overflow: "hidden",
866
+ children: /* @__PURE__ */ q(re, {
867
+ gap: "0",
868
+ children: [
869
+ A,
870
+ j,
871
+ M,
872
+ V
873
+ ]
874
+ })
875
+ }) }) }), n[39] = V, n[40] = A, n[41] = j, n[42] = M, n[43] = H) : H = n[43];
876
+ let W;
877
+ return n[44] !== g || n[45] !== H ? (W = /* @__PURE__ */ q(z.Root, {
878
+ open: g,
879
+ closeOnInteractOutside: !1,
880
+ positioning: ee,
881
+ children: [k, H]
882
+ }), n[44] = g, n[45] = H, n[46] = W) : W = n[46], W;
883
+ };
884
+ function Ut(e) {
885
+ return !e;
876
886
  }
877
- function ml(o) {
878
- return /* @__PURE__ */ _(re, { position: "relative", height: "18px", children: [
879
- /* @__PURE__ */ a(et, { data: [o], dataKey: "percentage", categoryKey: "label", color: tt, height: "18px", ariaLabel: `${o.label}: ${o.percentage}%`, layout: "vertical", domain: [0, 100], barSize: 18, tooltipLabel: dl, tooltipValue: ul, tooltipSeriesLabel: "Share" }),
880
- /* @__PURE__ */ _(oe, { position: "absolute", inset: "0", paddingX: "2xs", justifyContent: "space-between", gap: "xs", pointerEvents: "none", children: [
881
- /* @__PURE__ */ a(O, { textStyle: "label/2XS", color: "fg.inverted", truncate: !0, children: o.label }),
882
- /* @__PURE__ */ _(O, { textStyle: "label/2XS/medium", color: "fg.muted", children: [
883
- o.percentage,
884
- "%"
885
- ] })
886
- ] })
887
- ] }, o.label);
887
+ function Wt(e) {
888
+ return e.id;
888
889
  }
889
- const fl = /* @__PURE__ */ new Set(["rowIndex", "rowSelection", "rowActions"]), hl = (o) => o === "asc" ? Xe : o === "desc" ? qe : At, gl = (o) => {
890
- const e = z(37), {
891
- header: t,
892
- headerGroup: l,
893
- table: n,
894
- fullWidth: i,
895
- hasDescription: c
896
- } = o;
897
- let s, r, d;
898
- if (e[0] !== t.column || e[1] !== n) {
899
- r = t.column.getIsSorted();
900
- let $;
901
- e[5] !== t.column.id || e[6] !== n ? ($ = !fl.has(t.column.id) && n.getCoreRowModel().rows.length > 1, e[5] = t.column.id, e[6] = n, e[7] = $) : $ = e[7], s = $, d = hl(r), e[0] = t.column, e[1] = n, e[2] = s, e[3] = r, e[4] = d;
902
- } else
903
- s = e[2], r = e[3], d = e[4];
904
- const u = d;
905
- let m;
906
- e[8] !== t ? (m = t.column.id === "rowSelection" ? "Select all" : be(t.column.columnDef.header, t.getContext()), e[8] = t, e[9] = m) : m = e[9];
907
- const f = m, h = t.column.id;
908
- let S;
909
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = {
910
- borderRight: "none"
911
- }, e[10] = S) : S = e[10];
912
- const b = t.id, x = i && l.headers.indexOf(t) === l.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
913
- let g;
914
- e[11] !== x ? (g = {
915
- width: x
916
- }, e[11] = x, e[12] = g) : g = e[12];
917
- let v;
918
- e[13] !== t ? (v = be(t.column.columnDef.header, t.getContext()), e[13] = t, e[14] = v) : v = e[14];
919
- let w;
920
- e[15] !== v ? (w = /* @__PURE__ */ a(O, { as: "div", textStyle: "label/S/medium", lineHeight: "1.2", truncate: !0, children: v }), e[15] = v, e[16] = w) : w = e[16];
921
- let p;
922
- e[17] !== u || e[18] !== s || e[19] !== t.column || e[20] !== r ? (p = s && /* @__PURE__ */ _(G.Root, { children: [
923
- /* @__PURE__ */ a(G.Trigger, { asChild: !0, children: /* @__PURE__ */ a(we, { ml: "2px", size: "2xs", "aria-label": r ? `Sorted ${r}` : "Sort column", variant: "ghost", visibility: r ? "visible" : "hidden", _groupHover: {
924
- visibility: "visible"
925
- }, children: /* @__PURE__ */ a(ee, { as: u, boxSize: "14px" }) }) }),
926
- /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a(G.Positioner, { children: /* @__PURE__ */ _(G.Content, { zIndex: "popover", bg: "bg", children: [
927
- /* @__PURE__ */ a(G.Item, { value: "sort-asc", asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", label: "Sort ascending", icon: /* @__PURE__ */ a(ee, { as: Xe, boxSize: "16px" }), disabled: r === "asc", onActivate: () => t.column.toggleSorting(!1) }) }),
928
- /* @__PURE__ */ a(G.Item, { value: "sort-desc", asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", label: "Sort descending", icon: /* @__PURE__ */ a(ee, { as: qe, boxSize: "16px" }), disabled: r === "desc", onActivate: () => t.column.toggleSorting(!0) }) }),
929
- r && /* @__PURE__ */ a(G.Item, { value: "clear-sort", asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", label: "Clear sort", onActivate: () => t.column.clearSorting() }) })
930
- ] }) }) })
931
- ] }), e[17] = u, e[18] = s, e[19] = t.column, e[20] = r, e[21] = p) : p = e[21];
932
- let R;
933
- e[22] !== t ? (R = t.column.getCanResize() && /* @__PURE__ */ a("span", { onDoubleClick: () => t.column.resetSize(), onMouseDown: t.getResizeHandler(), onTouchStart: t.getResizeHandler(), className: `resizer ${t.column.getIsResizing() ? "isResizing" : ""}` }), e[22] = t, e[23] = R) : R = e[23];
934
- let C;
935
- e[24] !== R || e[25] !== w || e[26] !== p ? (C = /* @__PURE__ */ _(oe, { className: "group", alignItems: "center", justifyContent: "space-between", gap: "1", flex: "1", minW: "0", children: [
936
- w,
937
- p,
938
- R
939
- ] }), e[24] = R, e[25] = w, e[26] = p, e[27] = C) : C = e[27];
940
- let y;
941
- e[28] !== c || e[29] !== C || e[30] !== f ? (y = /* @__PURE__ */ a(Je, { content: f, disabled: c, children: C }), e[28] = c, e[29] = C, e[30] = f, e[31] = y) : y = e[31];
942
- let A;
943
- return e[32] !== t.column.id || e[33] !== t.id || e[34] !== y || e[35] !== g ? (A = /* @__PURE__ */ a(L.ColumnHeader, { "data-column-id": h, textTransform: "none", borderRight: "1px solid", _last: S, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", overflow: "hidden", position: "relative", verticalAlign: "middle", whiteSpace: "nowrap", style: g, children: y }, b), e[32] = t.column.id, e[33] = t.id, e[34] = y, e[35] = g, e[36] = A) : A = e[36], A;
944
- }, bl = (o) => {
945
- const e = z(26), {
946
- cell: t,
947
- row: l,
948
- wrapRows: n,
949
- getCellContextMenuActions: i
950
- } = o, c = t.column.columnDef.meta;
951
- let s;
952
- e[0] !== t || e[1] !== c ? (s = c?.getCellStyle?.(t.getValue()), e[0] = t, e[1] = c, e[2] = s) : s = e[2];
953
- const r = s;
954
- let d;
955
- if (e[3] !== t || e[4] !== i || e[5] !== l.id || e[6] !== l.original) {
956
- const A = {
957
- row: l.original,
958
- rowId: l.id,
959
- columnId: t.column.id,
960
- value: t.getValue()
961
- };
962
- d = i?.(A).map(($) => ({
963
- key: $.label,
964
- label: $.label,
965
- icon: $.icon,
966
- onClick: () => $.onSelect(A)
967
- })) ?? [], e[3] = t, e[4] = i, e[5] = l.id, e[6] = l.original, e[7] = d;
968
- } else
969
- d = e[7];
970
- const u = d, m = t.column.id, f = n ? "anywhere" : void 0, h = n ? void 0 : "10", S = n ? void 0 : "10";
971
- let b;
972
- e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {
973
- borderRight: "none"
974
- }, e[8] = b) : b = e[8];
975
- const x = t.id, g = n ? void 0 : "ellipsis", v = n ? "top" : "middle", w = n ? "normal" : "nowrap";
976
- let p;
977
- e[9] !== t ? (p = be(t.column.columnDef.cell, t.getContext()), e[9] = t, e[10] = p) : p = e[10];
978
- let R;
979
- e[11] !== t.column.id || e[12] !== t.id || e[13] !== r || e[14] !== w || e[15] !== p || e[16] !== f || e[17] !== h || e[18] !== S || e[19] !== g || e[20] !== v ? (R = /* @__PURE__ */ a(L.Cell, { "data-column-id": m, width: "fit-content", maxWidth: "12rem", overflow: "hidden", overflowWrap: f, padding: "xs", height: h, maxHeight: S, borderRight: "1px solid", borderColor: "border.subtle", _last: b, borderBottom: "none", textStyle: "paragraph/S/regular", textOverflow: g, verticalAlign: v, whiteSpace: w, style: r, children: p }, x), e[11] = t.column.id, e[12] = t.id, e[13] = r, e[14] = w, e[15] = p, e[16] = f, e[17] = h, e[18] = S, e[19] = g, e[20] = v, e[21] = R) : R = e[21];
980
- const C = R;
981
- if (u.length === 0)
982
- return C;
983
- let y;
984
- return e[22] !== t.id || e[23] !== C || e[24] !== u ? (y = /* @__PURE__ */ a(kt, { actions: u, children: C }, t.id), e[22] = t.id, e[23] = C, e[24] = u, e[25] = y) : y = e[25], y;
985
- }, pl = (o) => {
986
- const e = z(23), {
987
- row: t,
988
- noBorder: l,
989
- rowIsInteractive: n,
990
- rowIsActive: i,
991
- rowIsSelected: c,
992
- wrapRows: s,
993
- onRowClick: r,
994
- getCellContextMenuActions: d
995
- } = o, u = t.id, m = i ? "true" : void 0, f = c ? "true" : void 0, h = c ? "true" : void 0, S = s ? void 0 : "10", b = n ? "pointer" : void 0;
996
- let x;
997
- e[0] !== r || e[1] !== t.original || e[2] !== n ? (x = n ? () => r?.(t.original) : void 0, e[0] = r, e[1] = t.original, e[2] = n, e[3] = x) : x = e[3];
998
- const g = l ? "none" : "1px solid", v = l ? "none" : "1px solid", w = l ? "none" : "1px solid";
999
- let p;
1000
- e[4] !== w ? (p = {
1001
- borderBottom: w,
1002
- borderColor: "border.subtle"
1003
- }, e[4] = w, e[5] = p) : p = e[5];
1004
- const R = i ? "bg.active" : "bg";
1005
- let C;
1006
- e[6] !== d || e[7] !== t || e[8] !== s ? (C = t.getVisibleCells().map((A) => /* @__PURE__ */ a(bl, { cell: A, row: t, wrapRows: s, getCellContextMenuActions: d }, A.id)), e[6] = d, e[7] = t, e[8] = s, e[9] = C) : C = e[9];
1007
- let y;
1008
- return e[10] !== t.id || e[11] !== m || e[12] !== p || e[13] !== R || e[14] !== C || e[15] !== f || e[16] !== h || e[17] !== S || e[18] !== b || e[19] !== x || e[20] !== g || e[21] !== v ? (y = /* @__PURE__ */ a(L.Row, { "data-active": m, "data-selected": f, "aria-selected": h, height: S, cursor: b, onClick: x, borderTop: g, borderBottom: "1px solid", borderRight: v, _last: p, borderColor: "border.subtle", background: R, children: C }, u), e[10] = t.id, e[11] = m, e[12] = p, e[13] = R, e[14] = C, e[15] = f, e[16] = h, e[17] = S, e[18] = b, e[19] = x, e[20] = g, e[21] = v, e[22] = y) : y = e[22], y;
1009
- }, Sl = (o, e) => o.map((t) => ({
1010
- id: t,
1011
- label: e?.[t] ?? t
1012
- })), wl = (o) => {
1013
- const e = z(12), {
1014
- table: t,
1015
- pagination: l,
1016
- pageSizeOptions: n
1017
- } = o;
1018
- let i;
1019
- e[0] !== t ? (i = t.getPageCount(), e[0] = t, e[1] = i) : i = e[1];
1020
- const c = l.pageIndex, s = l.pageSize;
1021
- let r;
1022
- e[2] !== t ? (r = t.getCoreRowModel(), e[2] = t, e[3] = r) : r = e[3];
1023
- let d;
1024
- return e[4] !== n || e[5] !== l.pageIndex || e[6] !== l.pageSize || e[7] !== i || e[8] !== r.rows.length || e[9] !== t.setPageIndex || e[10] !== t.setPageSize ? (d = /* @__PURE__ */ a(Xt, { pageCount: i, pageIndex: c, pageSize: s, pageSizeOptions: n, totalRows: r.rows.length, onPageChange: t.setPageIndex, onPageSizeChange: t.setPageSize }), e[4] = n, e[5] = l.pageIndex, e[6] = l.pageSize, e[7] = i, e[8] = r.rows.length, e[9] = t.setPageIndex, e[10] = t.setPageSize, e[11] = d) : d = e[11], d;
1025
- }, xl = (o) => {
1026
- const {
1027
- data: e,
1028
- noBorder: t,
1029
- fullWidth: l,
1030
- hiddenColumns: n,
1031
- onRowClick: i,
1032
- isRowInteractive: c,
1033
- activeRowId: s,
1034
- columnIcons: r,
1035
- columnDescriptions: d,
1036
- compactHeaders: u,
1037
- columnStats: m,
1038
- columnRenderers: f,
1039
- initialPageSize: h,
1040
- pageSizeOptions: S = [10, 20, 30, 50, 100],
1041
- rowActions: b = [],
1042
- getRowActions: x,
1043
- getRowId: g,
1044
- toolbarStorageKey: v,
1045
- enableRowActivation: w = !1,
1046
- getCellContextMenuActions: p
1047
- } = o, [R, C] = Q([]), [y, A] = Q(() => ({
1048
- pageIndex: 0,
1049
- pageSize: Mt({
1050
- initialPageSize: h
1051
- })
1052
- })), [$, T] = Q({}), [P, M] = Q(!0), [D, K] = Q(!1), [W, N] = Q(() => {
1053
- const I = new Set(n ?? []);
1054
- return Object.keys(e[0] || {}).filter((V) => !I.has(V));
1055
- }), [J, X] = Q(() => /* @__PURE__ */ new Set()), j = new Set(n ?? []), H = Object.keys(e[0] || {}).filter((I) => !j.has(I)), E = De(H, W), k = new Set(E.filter((I) => !J.has(I))), B = E.filter((I) => k.has(I)), F = Pt(o), le = Ht(o), Ae = Lt(e, E, u), $e = Ot(e, E, g), _e = Wt({
1056
- toolbarStorageKey: v,
1057
- columnKeys: H
1058
- }), lt = St(_e, (I) => I.filters, {
1059
- settings: {
1060
- viewMode: "list"
1061
- },
1062
- views: o.defaultViews,
1063
- activeViewId: o.defaultActiveViewId
1064
- }), ke = Nt($e, lt, Ae).map((I) => I.sourceRow), nt = Ko(e, B, {
1065
- columnIcons: r,
1066
- columnDescriptions: d,
1067
- compactHeaders: u,
1068
- enableSelection: F,
1069
- rowActions: b,
1070
- getRowActions: x,
1071
- selectedRowIds: $,
1072
- columnRenderers: f,
1073
- wrapRows: D
1074
- }), q = mt({
1075
- data: ke,
1076
- columns: nt,
1077
- defaultColumn: {
1078
- size: 150,
1079
- minSize: 40,
1080
- maxSize: 800
1081
- },
1082
- state: {
1083
- sorting: R,
1084
- pagination: y,
1085
- rowSelection: $
1086
- },
1087
- getRowId: (I, V) => jt(I, V, g),
1088
- columnResizeMode: "onChange",
1089
- columnResizeDirection: "ltr",
1090
- onSortingChange: C,
1091
- onPaginationChange: A,
1092
- onRowSelectionChange: T,
1093
- getSortedRowModel: gt(),
1094
- getCoreRowModel: ht(),
1095
- getPaginationRowModel: ft(),
1096
- enableMultiRowSelection: F,
1097
- enableRowSelection: F,
1098
- autoResetAll: !1
1099
- });
1100
- Ke(() => {
1101
- const I = q.getPageCount();
1102
- I === 0 || y.pageIndex < I || A((V) => ({
1103
- ...V,
1104
- pageIndex: Math.max(I - 1, 0)
1105
- }));
1106
- }, [y.pageIndex, q]);
1107
- const rt = (() => {
1108
- const I = q.getFlatHeaders(), V = {};
1109
- for (let Z = 0; Z < I.length; Z++) {
1110
- const U = I[Z];
1111
- V[`--header-${U.id}-size`] = U.getSize(), V[`--col-${U.column.id}-size`] = U.column.getSize();
1112
- }
1113
- return V;
1114
- })(), fe = q.getSelectedRowModel().rows, it = q.getCoreRowModel().rows, st = Et(fe), at = /* @__PURE__ */ a(Xo, { columns: Sl(E, u), visibleColumnIds: k, wrapRows: D, showStats: P, statsAvailable: !!m, onColumnVisibilityChange: (I, V) => X((Z) => {
1115
- const U = new Set(Z);
1116
- return V ? U.delete(I) : U.add(I), U;
1117
- }), onColumnReorder: (I, V) => N((Z) => Bt(De(H, Z), I, V)), onWrapRowsChange: K, onStatsVisibilityChange: M });
1118
- return /* @__PURE__ */ _(oe, { direction: "column", height: "100%", width: "100%", children: [
1119
- /* @__PURE__ */ a(Ft, { rows: $e, storageKey: _e, attributes: Ae, columnControl: at, defaultViews: o.defaultViews, defaultActiveViewId: o.defaultActiveViewId }),
1120
- /* @__PURE__ */ _(re, { position: "relative", flex: "1", minHeight: "0", children: [
1121
- /* @__PURE__ */ a(xe, { height: "100%", maxWidth: "unset", showHorizontalScrollbar: !0, children: /* @__PURE__ */ _(L.Root, { className: `data-table${l ? " full-width" : ""}`, style: {
1122
- ...rt,
1123
- width: l ? "100%" : q.getTotalSize()
1124
- }, children: [
1125
- /* @__PURE__ */ a(L.Header, { children: q.getHeaderGroups().map((I) => /* @__PURE__ */ _(pt, { children: [
1126
- /* @__PURE__ */ a(L.Row, { className: "data-table-column-header-row", borderRight: t ? "none" : "1px solid", borderColor: "border.subtle", children: I.headers.map((V) => /* @__PURE__ */ a(gl, { header: V, headerGroup: I, table: q, fullWidth: l, hasDescription: !!d?.[V.column.id] }, V.id)) }),
1127
- m && P ? /* @__PURE__ */ a(il, { headerGroup: I, rows: ke, columnStats: m, noBorder: t, fullWidth: l }) : null
1128
- ] }, I.id)) }),
1129
- /* @__PURE__ */ a(L.Body, { children: q.getRowModel().rows.map((I) => {
1130
- const V = i ? c?.(I.original) ?? !0 : !1, Z = Kt({
1131
- enableRowActivation: w,
1132
- activeRowId: s,
1133
- rowId: I.id
1134
- }), U = I.getIsSelected();
1135
- return /* @__PURE__ */ a(pl, { row: I, noBorder: t, rowIsInteractive: V, rowIsActive: Z, rowIsSelected: U, wrapRows: D, onRowClick: i, getCellContextMenuActions: p }, I.id);
1136
- }) })
1137
- ] }) }),
1138
- F && fe.length > 0 ? /* @__PURE__ */ a(Jt, { selectedCount: fe.length, totalCount: it.length, onClearSelection: () => q.toggleAllRowsSelected(!1), onSelectAll: () => q.toggleAllRowsSelected(!0), actions: le, selectedRows: st }) : null
1139
- ] }),
1140
- q.getPageCount() > 1 && /* @__PURE__ */ a(wl, { table: q, pagination: y, pageSizeOptions: S })
1141
- ] });
1142
- }, jl = (o) => {
1143
- const e = z(4);
1144
- if (o.editMode) {
1145
- let l;
1146
- return e[0] !== o ? (l = /* @__PURE__ */ a(Vt, { ...o }), e[0] = o, e[1] = l) : l = e[1], l;
1147
- }
1148
- let t;
1149
- return e[2] !== o ? (t = /* @__PURE__ */ a(xl, { ...o }), e[2] = o, e[3] = t) : t = e[3], t;
1150
- }, je = ["70%", "45%", "60%", "35%", "55%"], El = (o) => {
1151
- const e = z(15), {
1152
- columns: t,
1153
- columnCount: l,
1154
- rowCount: n
1155
- } = o, i = l === void 0 ? 3 : l, c = n === void 0 ? 5 : n;
1156
- let s;
1157
- e[0] !== i || e[1] !== t ? (s = t && t.length > 0 ? t : Array.from({
1158
- length: i
1159
- }, yl), e[0] = i, e[1] = t, e[2] = s) : s = e[2];
1160
- const r = s;
1161
- let d;
1162
- e[3] !== r ? (d = r.map(Cl), e[3] = r, e[4] = d) : d = e[4];
1163
- let u;
1164
- e[5] !== d ? (u = /* @__PURE__ */ a(L.Header, { children: /* @__PURE__ */ a(L.Row, { className: "data-table-column-header-row", borderRight: "1px solid", borderColor: "border.subtle", children: d }) }), e[5] = d, e[6] = u) : u = e[6];
1165
- let m;
1166
- if (e[7] !== r || e[8] !== c) {
1167
- let h;
1168
- e[10] !== r ? (h = (S, b) => /* @__PURE__ */ a(L.Row, { children: r.map((x, g) => /* @__PURE__ */ a(L.Cell, { padding: "xs", borderRight: "1px solid", borderColor: "border.subtle", _last: {
1169
- borderRight: "none"
1170
- }, borderBottom: "none", children: /* @__PURE__ */ a(Be, { height: "14px", width: je[(b + g) % je.length], borderRadius: "xs" }) }, x.id)) }, b), e[10] = r, e[11] = h) : h = e[11], m = /* @__PURE__ */ a(L.Body, { children: Array.from({
1171
- length: c
1172
- }, h) }), e[7] = r, e[8] = c, e[9] = m;
1173
- } else
1174
- m = e[9];
1175
- let f;
1176
- return e[12] !== u || e[13] !== m ? (f = /* @__PURE__ */ _(L.Root, { className: "data-table full-width", width: "100%", children: [
1177
- u,
1178
- m
1179
- ] }), e[12] = u, e[13] = m, e[14] = f) : f = e[14], f;
890
+ //#endregion
891
+ //#region src/components/data-table/data-table-table-parts.tsx
892
+ var Gt = /* @__PURE__ */ new Set([
893
+ "rowIndex",
894
+ "rowSelection",
895
+ "rowActions"
896
+ ]), Kt = (e) => e === "asc" ? de : e === "desc" ? ue : _e, qt = (e) => {
897
+ let t = G(37), { header: r, headerGroup: i, table: a, fullWidth: s, hasDescription: c } = e, l, u, d;
898
+ if (t[0] !== r.column || t[1] !== a) {
899
+ u = r.column.getIsSorted();
900
+ let e;
901
+ t[5] !== r.column.id || t[6] !== a ? (e = !Gt.has(r.column.id) && a.getCoreRowModel().rows.length > 1, t[5] = r.column.id, t[6] = a, t[7] = e) : e = t[7], l = e, d = Kt(u), t[0] = r.column, t[1] = a, t[2] = l, t[3] = u, t[4] = d;
902
+ } else l = t[2], u = t[3], d = t[4];
903
+ let f = d, p;
904
+ t[8] === r ? p = t[9] : (p = r.column.id === "rowSelection" ? "Select all" : De(r.column.columnDef.header, r.getContext()), t[8] = r, t[9] = p);
905
+ let m = p, h = r.column.id, g;
906
+ t[10] === Symbol.for("react.memo_cache_sentinel") ? (g = { borderRight: "none" }, t[10] = g) : g = t[10];
907
+ let _ = r.id, v = s && i.headers.indexOf(r) === i.headers.length - 1 ? void 0 : `calc(var(--header-${r.id}-size) * 1px)`, y;
908
+ t[11] === v ? y = t[12] : (y = { width: v }, t[11] = v, t[12] = y);
909
+ let b;
910
+ t[13] === r ? b = t[14] : (b = De(r.column.columnDef.header, r.getContext()), t[13] = r, t[14] = b);
911
+ let x;
912
+ t[15] === b ? x = t[16] : (x = /* @__PURE__ */ K(U, {
913
+ as: "div",
914
+ textStyle: "label/S/medium",
915
+ lineHeight: "1.2",
916
+ truncate: !0,
917
+ children: b
918
+ }), t[15] = b, t[16] = x);
919
+ let S;
920
+ t[17] !== f || t[18] !== l || t[19] !== r.column || t[20] !== u ? (S = l && /* @__PURE__ */ q(R.Root, { children: [/* @__PURE__ */ K(R.Trigger, {
921
+ asChild: !0,
922
+ children: /* @__PURE__ */ K(ne, {
923
+ ml: "2px",
924
+ size: "2xs",
925
+ "aria-label": u ? `Sorted ${u}` : "Sort column",
926
+ variant: "ghost",
927
+ visibility: u ? "visible" : "hidden",
928
+ _groupHover: { visibility: "visible" },
929
+ children: /* @__PURE__ */ K(I, {
930
+ as: f,
931
+ boxSize: "14px"
932
+ })
933
+ })
934
+ }), /* @__PURE__ */ K(B, { children: /* @__PURE__ */ K(R.Positioner, { children: /* @__PURE__ */ q(R.Content, {
935
+ zIndex: "popover",
936
+ bg: "bg",
937
+ children: [
938
+ /* @__PURE__ */ K(R.Item, {
939
+ value: "sort-asc",
940
+ asChild: !0,
941
+ children: /* @__PURE__ */ K(o, {
942
+ asChild: !0,
943
+ variant: "full-width",
944
+ label: "Sort ascending",
945
+ icon: /* @__PURE__ */ K(I, {
946
+ as: de,
947
+ boxSize: "16px"
948
+ }),
949
+ disabled: u === "asc",
950
+ onActivate: () => r.column.toggleSorting(!1)
951
+ })
952
+ }),
953
+ /* @__PURE__ */ K(R.Item, {
954
+ value: "sort-desc",
955
+ asChild: !0,
956
+ children: /* @__PURE__ */ K(o, {
957
+ asChild: !0,
958
+ variant: "full-width",
959
+ label: "Sort descending",
960
+ icon: /* @__PURE__ */ K(I, {
961
+ as: ue,
962
+ boxSize: "16px"
963
+ }),
964
+ disabled: u === "desc",
965
+ onActivate: () => r.column.toggleSorting(!0)
966
+ })
967
+ }),
968
+ u && /* @__PURE__ */ K(R.Item, {
969
+ value: "clear-sort",
970
+ asChild: !0,
971
+ children: /* @__PURE__ */ K(o, {
972
+ asChild: !0,
973
+ variant: "full-width",
974
+ label: "Clear sort",
975
+ onActivate: () => r.column.clearSorting()
976
+ })
977
+ })
978
+ ]
979
+ }) }) })] }), t[17] = f, t[18] = l, t[19] = r.column, t[20] = u, t[21] = S) : S = t[21];
980
+ let C;
981
+ t[22] === r ? C = t[23] : (C = r.column.getCanResize() && /* @__PURE__ */ K("span", {
982
+ onDoubleClick: () => r.column.resetSize(),
983
+ onMouseDown: r.getResizeHandler(),
984
+ onTouchStart: r.getResizeHandler(),
985
+ className: `resizer ${r.column.getIsResizing() ? "isResizing" : ""}`
986
+ }), t[22] = r, t[23] = C);
987
+ let w;
988
+ t[24] !== C || t[25] !== x || t[26] !== S ? (w = /* @__PURE__ */ q(P, {
989
+ className: "group",
990
+ alignItems: "center",
991
+ justifyContent: "space-between",
992
+ gap: "1",
993
+ flex: "1",
994
+ minW: "0",
995
+ children: [
996
+ x,
997
+ S,
998
+ C
999
+ ]
1000
+ }), t[24] = C, t[25] = x, t[26] = S, t[27] = w) : w = t[27];
1001
+ let T;
1002
+ t[28] !== c || t[29] !== w || t[30] !== m ? (T = /* @__PURE__ */ K(n, {
1003
+ content: m,
1004
+ disabled: c,
1005
+ children: w
1006
+ }), t[28] = c, t[29] = w, t[30] = m, t[31] = T) : T = t[31];
1007
+ let E;
1008
+ return t[32] !== r.column.id || t[33] !== r.id || t[34] !== T || t[35] !== y ? (E = /* @__PURE__ */ K(H.ColumnHeader, {
1009
+ "data-column-id": h,
1010
+ textTransform: "none",
1011
+ borderRight: "1px solid",
1012
+ _last: g,
1013
+ borderColor: "border.subtle",
1014
+ paddingX: "xs",
1015
+ paddingY: "xs",
1016
+ overflow: "hidden",
1017
+ position: "relative",
1018
+ verticalAlign: "middle",
1019
+ whiteSpace: "nowrap",
1020
+ style: y,
1021
+ children: T
1022
+ }, _), t[32] = r.column.id, t[33] = r.id, t[34] = T, t[35] = y, t[36] = E) : E = t[36], E;
1023
+ }, Jt = (e) => {
1024
+ let t = G(26), { cell: n, row: r, wrapRows: i, getCellContextMenuActions: o } = e, s = n.column.columnDef.meta, c;
1025
+ t[0] !== n || t[1] !== s ? (c = s?.getCellStyle?.(n.getValue()), t[0] = n, t[1] = s, t[2] = c) : c = t[2];
1026
+ let l = c, u;
1027
+ if (t[3] !== n || t[4] !== o || t[5] !== r.id || t[6] !== r.original) {
1028
+ let e = {
1029
+ row: r.original,
1030
+ rowId: r.id,
1031
+ columnId: n.column.id,
1032
+ value: n.getValue()
1033
+ };
1034
+ u = o?.(e).map((t) => ({
1035
+ key: t.label,
1036
+ label: t.label,
1037
+ icon: t.icon,
1038
+ onClick: () => t.onSelect(e)
1039
+ })) ?? [], t[3] = n, t[4] = o, t[5] = r.id, t[6] = r.original, t[7] = u;
1040
+ } else u = t[7];
1041
+ let d = u, f = n.column.id, p = i ? "anywhere" : void 0, m = i ? void 0 : "10", h = i ? void 0 : "10", g;
1042
+ t[8] === Symbol.for("react.memo_cache_sentinel") ? (g = { borderRight: "none" }, t[8] = g) : g = t[8];
1043
+ let _ = n.id, v = i ? void 0 : "ellipsis", y = i ? "top" : "middle", b = i ? "normal" : "nowrap", x;
1044
+ t[9] === n ? x = t[10] : (x = De(n.column.columnDef.cell, n.getContext()), t[9] = n, t[10] = x);
1045
+ let S;
1046
+ t[11] !== n.column.id || t[12] !== n.id || t[13] !== l || t[14] !== b || t[15] !== x || t[16] !== p || t[17] !== m || t[18] !== h || t[19] !== v || t[20] !== y ? (S = /* @__PURE__ */ K(H.Cell, {
1047
+ "data-column-id": f,
1048
+ width: "fit-content",
1049
+ maxWidth: "12rem",
1050
+ overflow: "hidden",
1051
+ overflowWrap: p,
1052
+ padding: "xs",
1053
+ height: m,
1054
+ maxHeight: h,
1055
+ borderRight: "1px solid",
1056
+ borderColor: "border.subtle",
1057
+ _last: g,
1058
+ borderBottom: "none",
1059
+ textStyle: "paragraph/S/regular",
1060
+ textOverflow: v,
1061
+ verticalAlign: y,
1062
+ whiteSpace: b,
1063
+ style: l,
1064
+ children: x
1065
+ }, _), t[11] = n.column.id, t[12] = n.id, t[13] = l, t[14] = b, t[15] = x, t[16] = p, t[17] = m, t[18] = h, t[19] = v, t[20] = y, t[21] = S) : S = t[21];
1066
+ let C = S;
1067
+ if (d.length === 0) return C;
1068
+ let w;
1069
+ return t[22] !== n.id || t[23] !== C || t[24] !== d ? (w = /* @__PURE__ */ K(a, {
1070
+ actions: d,
1071
+ children: C
1072
+ }, n.id), t[22] = n.id, t[23] = C, t[24] = d, t[25] = w) : w = t[25], w;
1073
+ }, Yt = (e) => {
1074
+ let t = G(23), { row: n, noBorder: r, rowIsInteractive: i, rowIsActive: a, rowIsSelected: o, wrapRows: s, onRowClick: c, getCellContextMenuActions: l } = e, u = n.id, d = a ? "true" : void 0, f = o ? "true" : void 0, p = o ? "true" : void 0, m = s ? void 0 : "10", h = i ? "pointer" : void 0, g;
1075
+ t[0] !== c || t[1] !== n.original || t[2] !== i ? (g = i ? () => c?.(n.original) : void 0, t[0] = c, t[1] = n.original, t[2] = i, t[3] = g) : g = t[3];
1076
+ let _ = r ? "none" : "1px solid", v = r ? "none" : "1px solid", y = r ? "none" : "1px solid", b;
1077
+ t[4] === y ? b = t[5] : (b = {
1078
+ borderBottom: y,
1079
+ borderColor: "border.subtle"
1080
+ }, t[4] = y, t[5] = b);
1081
+ let x = a ? "bg.active" : "bg", S;
1082
+ t[6] !== l || t[7] !== n || t[8] !== s ? (S = n.getVisibleCells().map((e) => /* @__PURE__ */ K(Jt, {
1083
+ cell: e,
1084
+ row: n,
1085
+ wrapRows: s,
1086
+ getCellContextMenuActions: l
1087
+ }, e.id)), t[6] = l, t[7] = n, t[8] = s, t[9] = S) : S = t[9];
1088
+ let C;
1089
+ return t[10] !== n.id || t[11] !== d || t[12] !== b || t[13] !== x || t[14] !== S || t[15] !== f || t[16] !== p || t[17] !== m || t[18] !== h || t[19] !== g || t[20] !== _ || t[21] !== v ? (C = /* @__PURE__ */ K(H.Row, {
1090
+ "data-active": d,
1091
+ "data-selected": f,
1092
+ "aria-selected": p,
1093
+ height: m,
1094
+ cursor: h,
1095
+ onClick: g,
1096
+ borderTop: _,
1097
+ borderBottom: "1px solid",
1098
+ borderRight: v,
1099
+ _last: b,
1100
+ borderColor: "border.subtle",
1101
+ background: x,
1102
+ children: S
1103
+ }, u), t[10] = n.id, t[11] = d, t[12] = b, t[13] = x, t[14] = S, t[15] = f, t[16] = p, t[17] = m, t[18] = h, t[19] = g, t[20] = _, t[21] = v, t[22] = C) : C = t[22], C;
1104
+ }, Xt = se(() => import("./data-table-stats-row-UuTinYfL.js").then((e) => ({ default: e.DataTableStatsRow }))), Zt = (e, t) => e.map((e) => ({
1105
+ id: e,
1106
+ label: t?.[e] ?? e
1107
+ })), Qt = (e) => {
1108
+ let t = {};
1109
+ for (let n of e.getFlatHeaders()) t[`--header-${n.id}-size`] = n.getSize(), t[`--col-${n.column.id}-size`] = n.column.getSize();
1110
+ return t;
1111
+ }, $t = (e) => {
1112
+ let t = G(12), { table: n, pagination: r, pageSizeOptions: i } = e, a;
1113
+ t[0] === n ? a = t[1] : (a = n.getPageCount(), t[0] = n, t[1] = a);
1114
+ let o = r.pageIndex, s = r.pageSize, c;
1115
+ t[2] === n ? c = t[3] : (c = n.getCoreRowModel(), t[2] = n, t[3] = c);
1116
+ let l;
1117
+ return t[4] !== i || t[5] !== r.pageIndex || t[6] !== r.pageSize || t[7] !== a || t[8] !== c.rows.length || t[9] !== n.setPageIndex || t[10] !== n.setPageSize ? (l = /* @__PURE__ */ K(S, {
1118
+ pageCount: a,
1119
+ pageIndex: o,
1120
+ pageSize: s,
1121
+ pageSizeOptions: i,
1122
+ totalRows: c.rows.length,
1123
+ onPageChange: n.setPageIndex,
1124
+ onPageSizeChange: n.setPageSize
1125
+ }), t[4] = i, t[5] = r.pageIndex, t[6] = r.pageSize, t[7] = a, t[8] = c.rows.length, t[9] = n.setPageIndex, t[10] = n.setPageSize, t[11] = l) : l = t[11], l;
1126
+ }, en = (e) => {
1127
+ let { data: t, noBorder: n, fullWidth: i, hiddenColumns: a, defaultHiddenColumns: o, defaultShowStats: d = !0, onRowClick: f, isRowInteractive: p, activeRowId: m, columnIcons: g, columnDescriptions: _, compactHeaders: S, columnStats: E, columnRenderers: A, initialPageSize: j, pageSizeOptions: M = [
1128
+ 10,
1129
+ 20,
1130
+ 30,
1131
+ 50,
1132
+ 100
1133
+ ], rowActions: N = [], getRowActions: F, getRowId: I, toolbarStorageKey: ne, enableRowActivation: L = !1, getCellContextMenuActions: R } = e, [z, B] = Y([]), [V, re] = Y(() => ({
1134
+ pageIndex: 0,
1135
+ pageSize: l({ initialPageSize: j })
1136
+ })), [U, W] = Y({}), [G, oe] = Y(d), [J, se] = Y(!1), [le, ue] = Y(() => {
1137
+ let e = new Set(a ?? []);
1138
+ return Object.keys(t[0] || {}).filter((t) => !e.has(t));
1139
+ }), [de, fe] = Y(() => new Set(o)), pe = new Set(a ?? []), me = Object.keys(t[0] || {}).filter((e) => !pe.has(e)), X = D(me, le), he = new Set(X.filter((e) => !de.has(e))), ge = X.filter((e) => he.has(e)), Z = T(e), _e = h(e), ve = ee(t, X, S, A), ye = x(t, X, I, A), be = u({
1140
+ toolbarStorageKey: ne,
1141
+ columnKeys: me
1142
+ }), xe = b(be, (e) => e.filters, {
1143
+ settings: { viewMode: "list" },
1144
+ views: e.defaultViews,
1145
+ activeViewId: e.defaultActiveViewId
1146
+ }), Se = O(ye, xe, ve).map((e) => e.sourceRow), Ce = Bt(t, ge, {
1147
+ columnIcons: g,
1148
+ columnDescriptions: _,
1149
+ compactHeaders: S,
1150
+ enableSelection: Z,
1151
+ rowActions: N,
1152
+ getRowActions: F,
1153
+ selectedRowIds: U,
1154
+ columnRenderers: A,
1155
+ wrapRows: J
1156
+ }), Q = je({
1157
+ data: Se,
1158
+ columns: Ce,
1159
+ defaultColumn: {
1160
+ size: 150,
1161
+ minSize: 40,
1162
+ maxSize: 800
1163
+ },
1164
+ state: {
1165
+ sorting: z,
1166
+ pagination: V,
1167
+ rowSelection: U
1168
+ },
1169
+ getRowId: (e, t) => y(e, t, I),
1170
+ columnResizeMode: "onChange",
1171
+ columnResizeDirection: "ltr",
1172
+ onSortingChange: B,
1173
+ onPaginationChange: re,
1174
+ onRowSelectionChange: W,
1175
+ getSortedRowModel: Ae(),
1176
+ getCoreRowModel: Oe(),
1177
+ getPaginationRowModel: ke(),
1178
+ enableMultiRowSelection: Z,
1179
+ enableRowSelection: Z,
1180
+ autoResetAll: !1
1181
+ });
1182
+ ce(() => {
1183
+ let e = Q.getPageCount();
1184
+ e === 0 || V.pageIndex < e || re((t) => ({
1185
+ ...t,
1186
+ pageIndex: Math.max(e - 1, 0)
1187
+ }));
1188
+ }, [V.pageIndex, Q]);
1189
+ let we = Qt(Q), Te = Q.getSelectedRowModel().rows, Ee = Q.getCoreRowModel().rows, De = v(Te), Me = /* @__PURE__ */ K(Ht, {
1190
+ columns: Zt(X, S),
1191
+ visibleColumnIds: he,
1192
+ wrapRows: J,
1193
+ showStats: G,
1194
+ statsAvailable: !!E,
1195
+ onColumnVisibilityChange: (e, t) => fe((n) => w(n, e, t)),
1196
+ onColumnReorder: (e, t) => ue((n) => c(D(me, n), e, t)),
1197
+ onWrapRowsChange: se,
1198
+ onStatsVisibilityChange: oe
1199
+ });
1200
+ return /* @__PURE__ */ q(P, {
1201
+ direction: "column",
1202
+ height: "100%",
1203
+ width: "100%",
1204
+ children: [
1205
+ /* @__PURE__ */ K(k, {
1206
+ rows: ye,
1207
+ storageKey: be,
1208
+ attributes: ve,
1209
+ columnControl: Me,
1210
+ defaultViews: e.defaultViews,
1211
+ defaultActiveViewId: e.defaultActiveViewId
1212
+ }),
1213
+ /* @__PURE__ */ q(te, {
1214
+ position: "relative",
1215
+ flex: "1",
1216
+ minHeight: "0",
1217
+ children: [/* @__PURE__ */ K(r, {
1218
+ height: "100%",
1219
+ maxWidth: "unset",
1220
+ showHorizontalScrollbar: !0,
1221
+ children: /* @__PURE__ */ q(H.Root, {
1222
+ className: `data-table${i ? " full-width" : ""}`,
1223
+ style: {
1224
+ ...we,
1225
+ width: i ? "100%" : Q.getTotalSize()
1226
+ },
1227
+ children: [/* @__PURE__ */ K(H.Header, { children: Q.getHeaderGroups().map((e) => /* @__PURE__ */ q(ie, { children: [/* @__PURE__ */ K(H.Row, {
1228
+ className: "data-table-column-header-row",
1229
+ borderRight: n ? "none" : "1px solid",
1230
+ borderColor: "border.subtle",
1231
+ children: e.headers.map((t) => /* @__PURE__ */ K(qt, {
1232
+ header: t,
1233
+ headerGroup: e,
1234
+ table: Q,
1235
+ fullWidth: i,
1236
+ hasDescription: !!_?.[t.column.id]
1237
+ }, t.id))
1238
+ }), E && G ? /* @__PURE__ */ K(ae, {
1239
+ fallback: null,
1240
+ children: /* @__PURE__ */ K(Xt, {
1241
+ headerGroup: e,
1242
+ rows: Se,
1243
+ columnStats: E,
1244
+ noBorder: n,
1245
+ fullWidth: i
1246
+ })
1247
+ }) : null] }, e.id)) }), /* @__PURE__ */ K(H.Body, { children: Q.getRowModel().rows.map((e) => {
1248
+ let t = f ? p?.(e.original) ?? !0 : !1, r = s({
1249
+ enableRowActivation: L,
1250
+ activeRowId: m,
1251
+ rowId: e.id
1252
+ }), i = e.getIsSelected();
1253
+ return /* @__PURE__ */ K(Yt, {
1254
+ row: e,
1255
+ noBorder: n,
1256
+ rowIsInteractive: t,
1257
+ rowIsActive: r,
1258
+ rowIsSelected: i,
1259
+ wrapRows: J,
1260
+ onRowClick: f,
1261
+ getCellContextMenuActions: R
1262
+ }, e.id);
1263
+ }) })]
1264
+ })
1265
+ }), Z && Te.length > 0 ? /* @__PURE__ */ K(C, {
1266
+ selectedCount: Te.length,
1267
+ totalCount: Ee.length,
1268
+ onClearSelection: () => Q.toggleAllRowsSelected(!1),
1269
+ onSelectAll: () => Q.toggleAllRowsSelected(!0),
1270
+ actions: _e,
1271
+ selectedRows: De
1272
+ }) : null]
1273
+ }),
1274
+ Q.getPageCount() > 1 && /* @__PURE__ */ K($t, {
1275
+ table: Q,
1276
+ pagination: V,
1277
+ pageSizeOptions: M
1278
+ })
1279
+ ]
1280
+ });
1281
+ }, tn = (e) => {
1282
+ let t = G(4);
1283
+ if (e.editMode) {
1284
+ let n;
1285
+ return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ K(E, { ...e }), t[0] = e, t[1] = n), n;
1286
+ }
1287
+ let n;
1288
+ return t[2] === e ? n = t[3] : (n = /* @__PURE__ */ K(en, { ...e }), t[2] = e, t[3] = n), n;
1289
+ }, nn = [
1290
+ "70%",
1291
+ "45%",
1292
+ "60%",
1293
+ "35%",
1294
+ "55%"
1295
+ ], rn = (e) => {
1296
+ let t = G(15), { columns: n, columnCount: r, rowCount: i } = e, a = r === void 0 ? 3 : r, o = i === void 0 ? 5 : i, s;
1297
+ t[0] !== a || t[1] !== n ? (s = n && n.length > 0 ? n : Array.from({ length: a }, an), t[0] = a, t[1] = n, t[2] = s) : s = t[2];
1298
+ let c = s, l;
1299
+ t[3] === c ? l = t[4] : (l = c.map(on), t[3] = c, t[4] = l);
1300
+ let u;
1301
+ t[5] === l ? u = t[6] : (u = /* @__PURE__ */ K(H.Header, { children: /* @__PURE__ */ K(H.Row, {
1302
+ className: "data-table-column-header-row",
1303
+ borderRight: "1px solid",
1304
+ borderColor: "border.subtle",
1305
+ children: l
1306
+ }) }), t[5] = l, t[6] = u);
1307
+ let d;
1308
+ if (t[7] !== c || t[8] !== o) {
1309
+ let e;
1310
+ t[10] === c ? e = t[11] : (e = (e, t) => /* @__PURE__ */ K(H.Row, { children: c.map((e, n) => /* @__PURE__ */ K(H.Cell, {
1311
+ padding: "xs",
1312
+ borderRight: "1px solid",
1313
+ borderColor: "border.subtle",
1314
+ _last: { borderRight: "none" },
1315
+ borderBottom: "none",
1316
+ children: /* @__PURE__ */ K(V, {
1317
+ height: "14px",
1318
+ width: nn[(t + n) % nn.length],
1319
+ borderRadius: "xs"
1320
+ })
1321
+ }, e.id)) }, t), t[10] = c, t[11] = e), d = /* @__PURE__ */ K(H.Body, { children: Array.from({ length: o }, e) }), t[7] = c, t[8] = o, t[9] = d;
1322
+ } else d = t[9];
1323
+ let f;
1324
+ return t[12] !== u || t[13] !== d ? (f = /* @__PURE__ */ q(H.Root, {
1325
+ className: "data-table full-width",
1326
+ width: "100%",
1327
+ children: [u, d]
1328
+ }), t[12] = u, t[13] = d, t[14] = f) : f = t[14], f;
1180
1329
  };
1181
- function yl(o, e) {
1182
- return {
1183
- id: `column-${e + 1}`,
1184
- label: ""
1185
- };
1330
+ function an(e, t) {
1331
+ return {
1332
+ id: `column-${t + 1}`,
1333
+ label: ""
1334
+ };
1186
1335
  }
1187
- function Cl(o) {
1188
- return /* @__PURE__ */ a(L.ColumnHeader, { textTransform: "none", borderRight: "1px solid", _last: {
1189
- borderRight: "none"
1190
- }, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", whiteSpace: "nowrap", children: o.label ? /* @__PURE__ */ a(O, { as: "div", textStyle: "label/S/medium", lineHeight: "1.2", truncate: !0, children: o.label }) : /* @__PURE__ */ a(Be, { height: "12px", width: "4rem", borderRadius: "xs" }) }, o.id);
1336
+ function on(e) {
1337
+ return /* @__PURE__ */ K(H.ColumnHeader, {
1338
+ textTransform: "none",
1339
+ borderRight: "1px solid",
1340
+ _last: { borderRight: "none" },
1341
+ borderColor: "border.subtle",
1342
+ paddingX: "xs",
1343
+ paddingY: "xs",
1344
+ whiteSpace: "nowrap",
1345
+ children: e.label ? /* @__PURE__ */ K(U, {
1346
+ as: "div",
1347
+ textStyle: "label/S/medium",
1348
+ lineHeight: "1.2",
1349
+ truncate: !0,
1350
+ children: e.label
1351
+ }) : /* @__PURE__ */ K(V, {
1352
+ height: "12px",
1353
+ width: "4rem",
1354
+ borderRadius: "xs"
1355
+ })
1356
+ }, e.id);
1191
1357
  }
1192
- export {
1193
- jl as DataTable,
1194
- El as DataTableSkeleton,
1195
- Do as FriendlyJsonDisplay,
1196
- Tt as formatDisplayValue,
1197
- zt as getIcon
1198
- };
1199
- //# sourceMappingURL=data-table.js.map
1358
+ //#endregion
1359
+ export { tn as DataTable, rn as DataTableSkeleton, St as FriendlyJsonDisplay, d as formatDisplayValue, f as getIcon };
1360
+
1361
+ //# sourceMappingURL=data-table.js.map