@atmos.build/ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (431) hide show
  1. package/README.md +45 -0
  2. package/dist/components/alert-dialog.d.ts +14 -0
  3. package/dist/components/alert-dialog.js +40 -0
  4. package/dist/components/at-search.d.ts +35 -0
  5. package/dist/components/at-search.js +57 -0
  6. package/dist/components/attachment-thumbnail-stack.d.ts +13 -0
  7. package/dist/components/attachment-thumbnail-stack.js +23 -0
  8. package/dist/components/audio-preview.d.ts +33 -0
  9. package/dist/components/audio-preview.js +176 -0
  10. package/dist/components/avatar-uploader.d.ts +29 -0
  11. package/dist/components/avatar-uploader.js +67 -0
  12. package/dist/components/avatar.d.ts +12 -0
  13. package/dist/components/avatar.js +38 -0
  14. package/dist/components/badge.d.ts +9 -0
  15. package/dist/components/badge.js +25 -0
  16. package/dist/components/button-group.d.ts +12 -0
  17. package/dist/components/button-group.js +29 -0
  18. package/dist/components/button.d.ts +10 -0
  19. package/dist/components/button.js +42 -0
  20. package/dist/components/calendar.d.ts +26 -0
  21. package/dist/components/calendar.js +154 -0
  22. package/dist/components/channel-list.d.ts +33 -0
  23. package/dist/components/channel-list.js +40 -0
  24. package/dist/components/charts/area-chart.d.ts +2 -0
  25. package/dist/components/charts/area-chart.js +5 -0
  26. package/dist/components/charts/bar-chart.d.ts +2 -0
  27. package/dist/components/charts/bar-chart.js +58 -0
  28. package/dist/components/charts/colors.d.ts +2 -0
  29. package/dist/components/charts/colors.js +42 -0
  30. package/dist/components/charts/hover.d.ts +20 -0
  31. package/dist/components/charts/hover.js +31 -0
  32. package/dist/components/charts/index.d.ts +10 -0
  33. package/dist/components/charts/index.js +9 -0
  34. package/dist/components/charts/layout.d.ts +35 -0
  35. package/dist/components/charts/layout.js +101 -0
  36. package/dist/components/charts/legend.d.ts +6 -0
  37. package/dist/components/charts/legend.js +7 -0
  38. package/dist/components/charts/line-area-chart.d.ts +4 -0
  39. package/dist/components/charts/line-area-chart.js +86 -0
  40. package/dist/components/charts/line-chart.d.ts +2 -0
  41. package/dist/components/charts/line-chart.js +5 -0
  42. package/dist/components/charts/pie-chart.d.ts +2 -0
  43. package/dist/components/charts/pie-chart.js +22 -0
  44. package/dist/components/charts/radar-chart.d.ts +2 -0
  45. package/dist/components/charts/radar-chart.js +29 -0
  46. package/dist/components/charts/radial-chart.d.ts +2 -0
  47. package/dist/components/charts/radial-chart.js +19 -0
  48. package/dist/components/charts/scatter-chart.d.ts +2 -0
  49. package/dist/components/charts/scatter-chart.js +16 -0
  50. package/dist/components/charts/story-data.d.ts +24 -0
  51. package/dist/components/charts/story-data.js +48 -0
  52. package/dist/components/charts/types.d.ts +43 -0
  53. package/dist/components/charts/types.js +1 -0
  54. package/dist/components/checkbox.d.ts +4 -0
  55. package/dist/components/checkbox.js +10 -0
  56. package/dist/components/chip.d.ts +25 -0
  57. package/dist/components/chip.js +36 -0
  58. package/dist/components/code-editor-theme.d.ts +19 -0
  59. package/dist/components/code-editor-theme.js +100 -0
  60. package/dist/components/collapsible-section-header.d.ts +82 -0
  61. package/dist/components/collapsible-section-header.js +82 -0
  62. package/dist/components/collection-view/collection-view-group-settings.d.ts +73 -0
  63. package/dist/components/collection-view/collection-view-group-settings.js +55 -0
  64. package/dist/components/collection-view/collection-view-settings.d.ts +115 -0
  65. package/dist/components/collection-view/collection-view-settings.js +146 -0
  66. package/dist/components/collection-view/collection-view.d.ts +87 -0
  67. package/dist/components/collection-view/collection-view.js +95 -0
  68. package/dist/components/collection-view/index.d.ts +6 -0
  69. package/dist/components/collection-view/index.js +6 -0
  70. package/dist/components/collection-view/use-collection-detail-navigation.d.ts +11 -0
  71. package/dist/components/collection-view/use-collection-detail-navigation.js +12 -0
  72. package/dist/components/collection-view/use-collection-escape.d.ts +9 -0
  73. package/dist/components/collection-view/use-collection-escape.js +20 -0
  74. package/dist/components/collection-view/use-collection-selection.d.ts +42 -0
  75. package/dist/components/collection-view/use-collection-selection.js +203 -0
  76. package/dist/components/color-picker.d.ts +18 -0
  77. package/dist/components/color-picker.js +77 -0
  78. package/dist/components/color-swatch-list.d.ts +16 -0
  79. package/dist/components/color-swatch-list.js +60 -0
  80. package/dist/components/combobox/combobox.d.ts +4 -0
  81. package/dist/components/combobox/combobox.js +70 -0
  82. package/dist/components/combobox/compound.d.ts +68 -0
  83. package/dist/components/combobox/compound.js +151 -0
  84. package/dist/components/combobox/context.d.ts +34 -0
  85. package/dist/components/combobox/context.js +123 -0
  86. package/dist/components/combobox/create-step.d.ts +12 -0
  87. package/dist/components/combobox/create-step.js +8 -0
  88. package/dist/components/combobox/index.d.ts +10 -0
  89. package/dist/components/combobox/index.js +5 -0
  90. package/dist/components/combobox/inline-create-form.d.ts +24 -0
  91. package/dist/components/combobox/inline-create-form.js +43 -0
  92. package/dist/components/combobox/types.d.ts +57 -0
  93. package/dist/components/combobox/types.js +10 -0
  94. package/dist/components/command.d.ts +35 -0
  95. package/dist/components/command.js +76 -0
  96. package/dist/components/comment-pin.d.ts +13 -0
  97. package/dist/components/comment-pin.js +33 -0
  98. package/dist/components/confidence-meter.d.ts +11 -0
  99. package/dist/components/confidence-meter.js +24 -0
  100. package/dist/components/context-menu.d.ts +31 -0
  101. package/dist/components/context-menu.js +54 -0
  102. package/dist/components/copy-button.d.ts +12 -0
  103. package/dist/components/copy-button.js +32 -0
  104. package/dist/components/date-picker.d.ts +29 -0
  105. package/dist/components/date-picker.js +86 -0
  106. package/dist/components/date-tile.d.ts +11 -0
  107. package/dist/components/date-tile.js +16 -0
  108. package/dist/components/date-time-picker.d.ts +25 -0
  109. package/dist/components/date-time-picker.js +153 -0
  110. package/dist/components/detail-breadcrumb-utils.d.ts +2 -0
  111. package/dist/components/detail-breadcrumb-utils.js +18 -0
  112. package/dist/components/detail-nav-bar.d.ts +28 -0
  113. package/dist/components/detail-nav-bar.js +28 -0
  114. package/dist/components/detail-top-bar.d.ts +49 -0
  115. package/dist/components/detail-top-bar.js +41 -0
  116. package/dist/components/dialog.d.ts +22 -0
  117. package/dist/components/dialog.js +51 -0
  118. package/dist/components/dropdown-menu.d.ts +29 -0
  119. package/dist/components/dropdown-menu.js +52 -0
  120. package/dist/components/editable-doc-title.d.ts +17 -0
  121. package/dist/components/editable-doc-title.js +147 -0
  122. package/dist/components/empty-state.d.ts +12 -0
  123. package/dist/components/empty-state.js +6 -0
  124. package/dist/components/filter-condition-editor.d.ts +18 -0
  125. package/dist/components/filter-condition-editor.js +102 -0
  126. package/dist/components/form-dialog.d.ts +30 -0
  127. package/dist/components/form-dialog.js +52 -0
  128. package/dist/components/formula-editor.d.ts +18 -0
  129. package/dist/components/formula-editor.js +154 -0
  130. package/dist/components/hover-card.d.ts +52 -0
  131. package/dist/components/hover-card.js +51 -0
  132. package/dist/components/icon-button.d.ts +15 -0
  133. package/dist/components/icon-button.js +18 -0
  134. package/dist/components/inline-alert.d.ts +11 -0
  135. package/dist/components/inline-alert.js +17 -0
  136. package/dist/components/input.d.ts +3 -0
  137. package/dist/components/input.js +7 -0
  138. package/dist/components/kanban-board.d.ts +27 -0
  139. package/dist/components/kanban-board.js +145 -0
  140. package/dist/components/kbd.d.ts +3 -0
  141. package/dist/components/kbd.js +8 -0
  142. package/dist/components/label.d.ts +4 -0
  143. package/dist/components/label.js +9 -0
  144. package/dist/components/markdown-editor/index.d.ts +4 -0
  145. package/dist/components/markdown-editor/index.js +2 -0
  146. package/dist/components/markdown-editor/markdown-editor.d.ts +16 -0
  147. package/dist/components/markdown-editor/markdown-editor.js +53 -0
  148. package/dist/components/markdown-editor/serialize.d.ts +12 -0
  149. package/dist/components/markdown-editor/serialize.js +122 -0
  150. package/dist/components/markdown-editor/vim.d.ts +8 -0
  151. package/dist/components/markdown-editor/vim.js +394 -0
  152. package/dist/components/metric-grid.d.ts +41 -0
  153. package/dist/components/metric-grid.js +39 -0
  154. package/dist/components/microphone-priority.d.ts +29 -0
  155. package/dist/components/microphone-priority.js +15 -0
  156. package/dist/components/middle-truncate.d.ts +6 -0
  157. package/dist/components/middle-truncate.js +15 -0
  158. package/dist/components/multi-combobox.d.ts +48 -0
  159. package/dist/components/multi-combobox.js +221 -0
  160. package/dist/components/naut-avatar-engine.d.ts +83 -0
  161. package/dist/components/naut-avatar-engine.js +803 -0
  162. package/dist/components/naut-avatar.d.ts +31 -0
  163. package/dist/components/naut-avatar.js +108 -0
  164. package/dist/components/navigable-list.d.ts +4 -0
  165. package/dist/components/navigable-list.js +20 -0
  166. package/dist/components/note-icon-picker.d.ts +20 -0
  167. package/dist/components/note-icon-picker.js +84 -0
  168. package/dist/components/note-icon.d.ts +690 -0
  169. package/dist/components/note-icon.js +353 -0
  170. package/dist/components/note-row.d.ts +33 -0
  171. package/dist/components/note-row.js +29 -0
  172. package/dist/components/overlapping-dots.d.ts +10 -0
  173. package/dist/components/overlapping-dots.js +13 -0
  174. package/dist/components/overview-card.d.ts +12 -0
  175. package/dist/components/overview-card.js +9 -0
  176. package/dist/components/panel-header.d.ts +8 -0
  177. package/dist/components/panel-header.js +6 -0
  178. package/dist/components/panel-section-states.d.ts +9 -0
  179. package/dist/components/panel-section-states.js +10 -0
  180. package/dist/components/person-avatar.d.ts +10 -0
  181. package/dist/components/person-avatar.js +23 -0
  182. package/dist/components/photo-avatar.d.ts +11 -0
  183. package/dist/components/photo-avatar.js +24 -0
  184. package/dist/components/picker-field.d.ts +23 -0
  185. package/dist/components/picker-field.js +24 -0
  186. package/dist/components/popover-stack.d.ts +26 -0
  187. package/dist/components/popover-stack.js +89 -0
  188. package/dist/components/popover.d.ts +12 -0
  189. package/dist/components/popover.js +31 -0
  190. package/dist/components/portal-login-barrier.d.ts +12 -0
  191. package/dist/components/portal-login-barrier.js +41 -0
  192. package/dist/components/presence-dot.d.ts +8 -0
  193. package/dist/components/presence-dot.js +15 -0
  194. package/dist/components/presence-overlay.d.ts +27 -0
  195. package/dist/components/presence-overlay.js +34 -0
  196. package/dist/components/property-list.d.ts +64 -0
  197. package/dist/components/property-list.js +313 -0
  198. package/dist/components/property-panel.d.ts +54 -0
  199. package/dist/components/property-panel.js +87 -0
  200. package/dist/components/property-selector.d.ts +36 -0
  201. package/dist/components/property-selector.js +141 -0
  202. package/dist/components/provenance-chip.d.ts +12 -0
  203. package/dist/components/provenance-chip.js +17 -0
  204. package/dist/components/qr-code.d.ts +13 -0
  205. package/dist/components/qr-code.js +42 -0
  206. package/dist/components/qr-encode.d.ts +2 -0
  207. package/dist/components/qr-encode.js +469 -0
  208. package/dist/components/quantity-stepper.d.ts +25 -0
  209. package/dist/components/quantity-stepper.js +43 -0
  210. package/dist/components/radio-group.d.ts +5 -0
  211. package/dist/components/radio-group.js +13 -0
  212. package/dist/components/rename-dialog.d.ts +19 -0
  213. package/dist/components/rename-dialog.js +35 -0
  214. package/dist/components/row-surface.d.ts +1 -0
  215. package/dist/components/row-surface.js +5 -0
  216. package/dist/components/row-trailing.d.ts +30 -0
  217. package/dist/components/row-trailing.js +59 -0
  218. package/dist/components/run-status-badge.d.ts +16 -0
  219. package/dist/components/run-status-badge.js +43 -0
  220. package/dist/components/scroll-area.d.ts +5 -0
  221. package/dist/components/scroll-area.js +12 -0
  222. package/dist/components/select.d.ts +15 -0
  223. package/dist/components/select.js +39 -0
  224. package/dist/components/selectable-card.d.ts +33 -0
  225. package/dist/components/selectable-card.js +66 -0
  226. package/dist/components/separator.d.ts +3 -0
  227. package/dist/components/separator.js +8 -0
  228. package/dist/components/settings-dialog-shell.d.ts +46 -0
  229. package/dist/components/settings-dialog-shell.js +48 -0
  230. package/dist/components/shimmer-text.d.ts +8 -0
  231. package/dist/components/shimmer-text.js +26 -0
  232. package/dist/components/side-panel-tokens.d.ts +27 -0
  233. package/dist/components/side-panel-tokens.js +26 -0
  234. package/dist/components/side-panel.d.ts +94 -0
  235. package/dist/components/side-panel.js +106 -0
  236. package/dist/components/skeleton.d.ts +2 -0
  237. package/dist/components/skeleton.js +6 -0
  238. package/dist/components/sortable.d.ts +65 -0
  239. package/dist/components/sortable.js +110 -0
  240. package/dist/components/spec-strip.d.ts +18 -0
  241. package/dist/components/spec-strip.js +15 -0
  242. package/dist/components/speech-playback.d.ts +25 -0
  243. package/dist/components/speech-playback.js +35 -0
  244. package/dist/components/sql-editor.d.ts +13 -0
  245. package/dist/components/sql-editor.js +228 -0
  246. package/dist/components/stat-tile.d.ts +7 -0
  247. package/dist/components/stat-tile.js +6 -0
  248. package/dist/components/status-badge.d.ts +17 -0
  249. package/dist/components/status-badge.js +8 -0
  250. package/dist/components/status-tone.d.ts +9 -0
  251. package/dist/components/status-tone.js +10 -0
  252. package/dist/components/sticky-header-fade.d.ts +8 -0
  253. package/dist/components/sticky-header-fade.js +11 -0
  254. package/dist/components/swatch-button.d.ts +14 -0
  255. package/dist/components/swatch-button.js +25 -0
  256. package/dist/components/switch.d.ts +6 -0
  257. package/dist/components/switch.js +9 -0
  258. package/dist/components/system-load/index.d.ts +6 -0
  259. package/dist/components/system-load/index.js +6 -0
  260. package/dist/components/system-load/load-block.d.ts +20 -0
  261. package/dist/components/system-load/load-block.js +23 -0
  262. package/dist/components/system-load/load-grid.d.ts +16 -0
  263. package/dist/components/system-load/load-grid.js +23 -0
  264. package/dist/components/system-load/load-meter.d.ts +25 -0
  265. package/dist/components/system-load/load-meter.js +29 -0
  266. package/dist/components/system-load/load-tone.d.ts +21 -0
  267. package/dist/components/system-load/load-tone.js +29 -0
  268. package/dist/components/system-load/meter-row.d.ts +31 -0
  269. package/dist/components/system-load/meter-row.js +29 -0
  270. package/dist/components/system-load/resource-meter.d.ts +19 -0
  271. package/dist/components/system-load/resource-meter.js +15 -0
  272. package/dist/components/tab-title-bar.d.ts +12 -0
  273. package/dist/components/tab-title-bar.js +9 -0
  274. package/dist/components/table.d.ts +10 -0
  275. package/dist/components/table.js +29 -0
  276. package/dist/components/tabs.d.ts +11 -0
  277. package/dist/components/tabs.js +97 -0
  278. package/dist/components/template-chip-input.d.ts +36 -0
  279. package/dist/components/template-chip-input.js +271 -0
  280. package/dist/components/template-input.d.ts +24 -0
  281. package/dist/components/template-input.js +57 -0
  282. package/dist/components/terminal-spinner.d.ts +11 -0
  283. package/dist/components/terminal-spinner.js +48 -0
  284. package/dist/components/textarea.d.ts +3 -0
  285. package/dist/components/textarea.js +7 -0
  286. package/dist/components/time-column.d.ts +24 -0
  287. package/dist/components/time-column.js +60 -0
  288. package/dist/components/timestamped-transcript.d.ts +38 -0
  289. package/dist/components/timestamped-transcript.js +29 -0
  290. package/dist/components/timezone-picker.d.ts +22 -0
  291. package/dist/components/timezone-picker.js +60 -0
  292. package/dist/components/tooltip.d.ts +11 -0
  293. package/dist/components/tooltip.js +29 -0
  294. package/dist/components/transcription-overlay.d.ts +47 -0
  295. package/dist/components/transcription-overlay.js +30 -0
  296. package/dist/components/usage-bar.d.ts +17 -0
  297. package/dist/components/usage-bar.js +26 -0
  298. package/dist/components/view-query-bar.d.ts +13 -0
  299. package/dist/components/view-query-bar.js +13 -0
  300. package/dist/components/view-query-controls.d.ts +159 -0
  301. package/dist/components/view-query-controls.js +109 -0
  302. package/dist/components/view-save-menu.d.ts +20 -0
  303. package/dist/components/view-save-menu.js +13 -0
  304. package/dist/components/view-sort-editor.d.ts +40 -0
  305. package/dist/components/view-sort-editor.js +47 -0
  306. package/dist/components/voice-line.d.ts +37 -0
  307. package/dist/components/voice-line.js +293 -0
  308. package/dist/components/weekly-schedule-editor.d.ts +15 -0
  309. package/dist/components/weekly-schedule-editor.js +28 -0
  310. package/dist/flow/canvas/canvas-frame.d.ts +160 -0
  311. package/dist/flow/canvas/canvas-frame.js +521 -0
  312. package/dist/flow/canvas/collaborator-layer.d.ts +12 -0
  313. package/dist/flow/canvas/collaborator-layer.js +43 -0
  314. package/dist/flow/canvas/connector-edge.d.ts +22 -0
  315. package/dist/flow/canvas/connector-edge.js +61 -0
  316. package/dist/flow/canvas/editor-context.d.ts +23 -0
  317. package/dist/flow/canvas/editor-context.js +6 -0
  318. package/dist/flow/canvas/graph-core.d.ts +60 -0
  319. package/dist/flow/canvas/graph-core.js +296 -0
  320. package/dist/flow/canvas/minimap-sticky-overlay.d.ts +4 -0
  321. package/dist/flow/canvas/minimap-sticky-overlay.js +45 -0
  322. package/dist/flow/canvas/node-card.d.ts +46 -0
  323. package/dist/flow/canvas/node-card.js +56 -0
  324. package/dist/flow/canvas/node-library.d.ts +40 -0
  325. package/dist/flow/canvas/node-library.js +54 -0
  326. package/dist/flow/canvas/sticky-notes.d.ts +25 -0
  327. package/dist/flow/canvas/sticky-notes.js +101 -0
  328. package/dist/flow/collaborative-graph-presence.d.ts +28 -0
  329. package/dist/flow/collaborative-graph-presence.js +55 -0
  330. package/dist/flow/collaborative-graph-sync.d.ts +40 -0
  331. package/dist/flow/collaborative-graph-sync.js +127 -0
  332. package/dist/flow/editor/adapter.d.ts +64 -0
  333. package/dist/flow/editor/adapter.js +1 -0
  334. package/dist/flow/editor/command-registry.d.ts +10 -0
  335. package/dist/flow/editor/command-registry.js +35 -0
  336. package/dist/flow/editor/dag-canvas.d.ts +18 -0
  337. package/dist/flow/editor/dag-canvas.js +33 -0
  338. package/dist/flow/editor/flow-editor.d.ts +54 -0
  339. package/dist/flow/editor/flow-editor.js +199 -0
  340. package/dist/flow/editor/issues-popover.d.ts +11 -0
  341. package/dist/flow/editor/issues-popover.js +70 -0
  342. package/dist/flow/editor/library-rail.d.ts +19 -0
  343. package/dist/flow/editor/library-rail.js +25 -0
  344. package/dist/flow/editor/make-controller.d.ts +18 -0
  345. package/dist/flow/editor/make-controller.js +44 -0
  346. package/dist/flow/editor/node-chip.d.ts +2 -0
  347. package/dist/flow/editor/node-chip.js +16 -0
  348. package/dist/flow/editor/save-publish-bar.d.ts +27 -0
  349. package/dist/flow/editor/save-publish-bar.js +14 -0
  350. package/dist/flow/editor/settings-dialog.d.ts +11 -0
  351. package/dist/flow/editor/settings-dialog.js +11 -0
  352. package/dist/flow/editor/settings-shell.d.ts +21 -0
  353. package/dist/flow/editor/settings-shell.js +20 -0
  354. package/dist/flow/editor/side-rail.d.ts +22 -0
  355. package/dist/flow/editor/side-rail.js +15 -0
  356. package/dist/flow/editor/use-dag-editor.d.ts +94 -0
  357. package/dist/flow/editor/use-dag-editor.js +502 -0
  358. package/dist/flow/index.d.ts +25 -0
  359. package/dist/flow/index.js +25 -0
  360. package/dist/flow/presence-motion.d.ts +10 -0
  361. package/dist/flow/presence-motion.js +88 -0
  362. package/dist/flow/styles.css +1 -0
  363. package/dist/flow/use-collaborative-graph.d.ts +61 -0
  364. package/dist/flow/use-collaborative-graph.js +396 -0
  365. package/dist/flow/use-debounced-value.d.ts +1 -0
  366. package/dist/flow/use-debounced-value.js +10 -0
  367. package/dist/hooks/use-detail-nav.d.ts +11 -0
  368. package/dist/hooks/use-detail-nav.js +49 -0
  369. package/dist/hooks/use-flush-on-hide.d.ts +1 -0
  370. package/dist/hooks/use-flush-on-hide.js +21 -0
  371. package/dist/hooks/use-media-query.d.ts +1 -0
  372. package/dist/hooks/use-media-query.js +20 -0
  373. package/dist/hooks/use-virtualizer.d.ts +1 -0
  374. package/dist/hooks/use-virtualizer.js +1 -0
  375. package/dist/index.d.ts +139 -0
  376. package/dist/index.js +139 -0
  377. package/dist/lib/brand-style.d.ts +6 -0
  378. package/dist/lib/brand-style.js +16 -0
  379. package/dist/lib/cn.d.ts +2 -0
  380. package/dist/lib/cn.js +5 -0
  381. package/dist/lib/composited-glint.d.ts +7 -0
  382. package/dist/lib/composited-glint.js +98 -0
  383. package/dist/lib/date-time-format.d.ts +2 -0
  384. package/dist/lib/date-time-format.js +21 -0
  385. package/dist/lib/disclosure-state.d.ts +11 -0
  386. package/dist/lib/disclosure-state.js +22 -0
  387. package/dist/lib/label-swatches.d.ts +10 -0
  388. package/dist/lib/label-swatches.js +24 -0
  389. package/dist/lib/local-ui-state.d.ts +10 -0
  390. package/dist/lib/local-ui-state.js +95 -0
  391. package/dist/lib/parse-loose-datetime.d.ts +1 -0
  392. package/dist/lib/parse-loose-datetime.js +180 -0
  393. package/dist/lib/parse-loose-time.d.ts +6 -0
  394. package/dist/lib/parse-loose-time.js +53 -0
  395. package/dist/lib/parse-loose.d.ts +1 -0
  396. package/dist/lib/parse-loose.js +170 -0
  397. package/dist/lib/react-19-jsx.d.ts +8 -0
  398. package/dist/lib/react-19-jsx.js +1 -0
  399. package/dist/lib/view-chrome.d.ts +5 -0
  400. package/dist/lib/view-chrome.js +5 -0
  401. package/dist/lib/view-query/config.d.ts +26 -0
  402. package/dist/lib/view-query/config.js +162 -0
  403. package/dist/lib/view-query/evaluate.d.ts +11 -0
  404. package/dist/lib/view-query/evaluate.js +196 -0
  405. package/dist/lib/view-query/group-order.d.ts +25 -0
  406. package/dist/lib/view-query/group-order.js +49 -0
  407. package/dist/lib/view-query/index.d.ts +6 -0
  408. package/dist/lib/view-query/index.js +6 -0
  409. package/dist/lib/view-query/model.d.ts +34 -0
  410. package/dist/lib/view-query/model.js +88 -0
  411. package/dist/lib/view-query/sort.d.ts +7 -0
  412. package/dist/lib/view-query/sort.js +30 -0
  413. package/dist/lib/view-query/types.d.ts +70 -0
  414. package/dist/lib/view-query/types.js +12 -0
  415. package/dist/lib/weekly-schedule.d.ts +8 -0
  416. package/dist/lib/weekly-schedule.js +10 -0
  417. package/dist/mcp-app/index.d.ts +4 -0
  418. package/dist/mcp-app/index.js +3 -0
  419. package/dist/mcp-app/shadcn.css +629 -0
  420. package/dist/mcp-app/styles.css +72 -0
  421. package/dist/mcp-app/theme.d.ts +2 -0
  422. package/dist/mcp-app/theme.js +62 -0
  423. package/dist/mcp-app/use-atmos-mcp-app.d.ts +109 -0
  424. package/dist/mcp-app/use-atmos-mcp-app.js +30 -0
  425. package/dist/mcp-app/vite.d.ts +7 -0
  426. package/dist/mcp-app/vite.js +30 -0
  427. package/dist/tokens/index.d.ts +7 -0
  428. package/dist/tokens/index.js +7 -0
  429. package/dist/tokens/semantic.css +110 -0
  430. package/dist/tokens/tokens.css +195 -0
  431. package/package.json +98 -0
@@ -0,0 +1,100 @@
1
+ 'use client';
2
+ import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
3
+ import { EditorView } from '@codemirror/view';
4
+ import { tags as t } from '@lezer/highlight';
5
+ /**
6
+ * How every CodeMirror surface in atmOS looks.
7
+ *
8
+ * The colours are the app's own tokens rather than a packaged editor theme, so an editor
9
+ * follows the workspace into dark mode and stays the same instrument whether it is holding
10
+ * a SQL statement, a formula, or a file off a machine. A packaged theme would be a second
11
+ * palette to keep in sync with the first, and it would be wrong the moment the app's is.
12
+ */
13
+ export const atmosEditorTheme = EditorView.theme({
14
+ '&': {
15
+ color: 'var(--foreground)',
16
+ backgroundColor: 'transparent',
17
+ },
18
+ '&.cm-focused': { outline: 'none' },
19
+ '.cm-scroller': {
20
+ fontFamily: 'var(--font-mono, ui-monospace, monospace)',
21
+ lineHeight: '1.6',
22
+ },
23
+ '.cm-content': {
24
+ fontFamily: 'var(--font-mono, ui-monospace, monospace)',
25
+ caretColor: 'var(--foreground)',
26
+ padding: '8px 0',
27
+ },
28
+ '.cm-cursor, .cm-dropCursor': { borderLeftColor: 'var(--foreground)' },
29
+ '.cm-placeholder': { color: 'var(--muted-foreground)' },
30
+ '.cm-selectionBackground, &.cm-focused .cm-selectionBackground, .cm-content ::selection': {
31
+ backgroundColor: 'color-mix(in oklch, var(--primary) 22%, transparent)',
32
+ },
33
+ '.cm-activeLine': {
34
+ backgroundColor: 'color-mix(in oklch, var(--muted) 45%, transparent)',
35
+ },
36
+ '.cm-gutters': {
37
+ backgroundColor: 'transparent',
38
+ color: 'color-mix(in oklch, var(--muted-foreground) 70%, transparent)',
39
+ border: 'none',
40
+ },
41
+ '.cm-activeLineGutter': {
42
+ backgroundColor: 'color-mix(in oklch, var(--muted) 45%, transparent)',
43
+ color: 'var(--foreground)',
44
+ },
45
+ '.cm-lineNumbers .cm-gutterElement': { padding: '0 8px 0 12px', minWidth: '0' },
46
+ '.cm-matchingBracket': {
47
+ backgroundColor: 'color-mix(in oklch, var(--primary) 18%, transparent)',
48
+ outline: 'none',
49
+ color: 'inherit',
50
+ },
51
+ });
52
+ /**
53
+ * One palette across every grammar. Markdown gets structure without changing size or
54
+ * family — a heading reads as a heading, but the file still reads as a file, which is the
55
+ * difference between an editor and a preview.
56
+ */
57
+ export const atmosEditorHighlight = HighlightStyle.define([
58
+ {
59
+ tag: [t.keyword, t.modifier, t.operatorKeyword, t.controlKeyword, t.definitionKeyword],
60
+ color: 'var(--cm-keyword)',
61
+ fontWeight: '600',
62
+ },
63
+ {
64
+ tag: [t.typeName, t.standard(t.name), t.number, t.bool, t.null, t.atom],
65
+ color: 'var(--cm-number)',
66
+ },
67
+ { tag: [t.string, t.special(t.string), t.character], color: 'var(--cm-string)' },
68
+ {
69
+ tag: [t.function(t.variableName), t.function(t.propertyName), t.special(t.name)],
70
+ color: 'var(--cm-function)',
71
+ },
72
+ { tag: [t.propertyName, t.attributeName], color: 'var(--cm-name)' },
73
+ { tag: [t.name, t.variableName], color: 'var(--cm-ident)' },
74
+ {
75
+ tag: [
76
+ t.operator,
77
+ t.punctuation,
78
+ t.separator,
79
+ t.paren,
80
+ t.bracket,
81
+ t.squareBracket,
82
+ t.brace,
83
+ ],
84
+ color: 'var(--cm-operator)',
85
+ },
86
+ { tag: [t.comment, t.lineComment, t.blockComment], color: 'var(--muted-foreground)', fontStyle: 'italic' },
87
+ { tag: t.heading, color: 'var(--cm-keyword)', fontWeight: '600' },
88
+ { tag: t.strong, fontWeight: '600' },
89
+ { tag: t.emphasis, fontStyle: 'italic' },
90
+ { tag: t.link, color: 'var(--cm-function)', textDecoration: 'underline' },
91
+ { tag: t.url, color: 'var(--cm-string)' },
92
+ { tag: t.monospace, color: 'var(--cm-string)' },
93
+ { tag: [t.meta, t.processingInstruction], color: 'var(--muted-foreground)' },
94
+ { tag: t.invalid, color: 'var(--destructive)' },
95
+ ]);
96
+ /** The theme and its highlighting, which are only ever wanted together. */
97
+ export const atmosEditorAppearance = [
98
+ atmosEditorTheme,
99
+ syntaxHighlighting(atmosEditorHighlight),
100
+ ];
@@ -0,0 +1,82 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const headerVariants: (props?: ({
4
+ size?: "panel" | "settings" | null | undefined;
5
+ variant?: "section" | "row" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export type CollapsibleSectionHeaderVariant = 'section' | 'row';
8
+ type CollapsibleSectionHeaderContainerProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'children' | 'className'> & {
9
+ [key: `data-${string}`]: string | number | boolean | undefined;
10
+ };
11
+ type CollapsibleSectionHeaderCommonProps = Omit<React.ComponentProps<'button'>, 'onClick' | 'onToggle'> & VariantProps<typeof headerVariants> & {
12
+ open: boolean;
13
+ onToggle: () => void;
14
+ label: React.ReactNode;
15
+ leadingIcon?: React.ReactNode;
16
+ depth?: number;
17
+ badge?: React.ReactNode;
18
+ action?: React.ReactNode;
19
+ actionVisibility?: 'hover' | 'persistent' | 'always';
20
+ containerProps?: CollapsibleSectionHeaderContainerProps;
21
+ labelClassName?: string;
22
+ className?: string;
23
+ };
24
+ export type CollapsibleSectionHeaderProps = CollapsibleSectionHeaderCommonProps & ({
25
+ onLabelClick: React.MouseEventHandler<HTMLElement>;
26
+ labelProps?: Omit<React.ComponentPropsWithoutRef<'button'>, 'children' | 'onClick'>;
27
+ toggleLabel: string;
28
+ onClick?: never;
29
+ } | {
30
+ onLabelClick?: never;
31
+ labelProps?: never;
32
+ toggleLabel?: string;
33
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
34
+ });
35
+ export declare const CollapsibleSectionHeader: React.ForwardRefExoticComponent<(Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "onClick" | "onToggle"> & VariantProps<(props?: ({
36
+ size?: "panel" | "settings" | null | undefined;
37
+ variant?: "section" | "row" | null | undefined;
38
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
39
+ open: boolean;
40
+ onToggle: () => void;
41
+ label: React.ReactNode;
42
+ leadingIcon?: React.ReactNode;
43
+ depth?: number;
44
+ badge?: React.ReactNode;
45
+ action?: React.ReactNode;
46
+ actionVisibility?: "hover" | "persistent" | "always";
47
+ containerProps?: CollapsibleSectionHeaderContainerProps;
48
+ labelClassName?: string;
49
+ className?: string;
50
+ } & {
51
+ onLabelClick: React.MouseEventHandler<HTMLElement>;
52
+ labelProps?: Omit<React.ComponentPropsWithoutRef<"button">, "children" | "onClick">;
53
+ toggleLabel: string;
54
+ onClick?: never;
55
+ }, "ref"> | Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "onClick" | "onToggle"> & VariantProps<(props?: ({
56
+ size?: "panel" | "settings" | null | undefined;
57
+ variant?: "section" | "row" | null | undefined;
58
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
59
+ open: boolean;
60
+ onToggle: () => void;
61
+ label: React.ReactNode;
62
+ leadingIcon?: React.ReactNode;
63
+ depth?: number;
64
+ badge?: React.ReactNode;
65
+ action?: React.ReactNode;
66
+ actionVisibility?: "hover" | "persistent" | "always";
67
+ containerProps?: CollapsibleSectionHeaderContainerProps;
68
+ labelClassName?: string;
69
+ className?: string;
70
+ } & {
71
+ onLabelClick?: never;
72
+ labelProps?: never;
73
+ toggleLabel?: string;
74
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
75
+ }, "ref">) & React.RefAttributes<HTMLDivElement>>;
76
+ export interface CollapsibleSectionContentProps extends React.ComponentProps<'div'> {
77
+ open?: boolean;
78
+ innerClassName?: string;
79
+ unmountOnExit?: boolean;
80
+ }
81
+ export declare const CollapsibleSectionContent: React.ForwardRefExoticComponent<Omit<CollapsibleSectionContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
82
+ export { headerVariants as collapsibleSectionHeaderVariants };
@@ -0,0 +1,82 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import { ChevronRight } from 'lucide-react';
5
+ import { cva } from 'class-variance-authority';
6
+ import { cn } from '../lib/cn.js';
7
+ import { RowTrailing } from './row-trailing.js';
8
+ import { NavigableListItem } from './navigable-list.js';
9
+ import { sidePanelRowClassName } from './side-panel-tokens.js';
10
+ const headerVariants = cva('text-muted-foreground/75 flex min-w-0 cursor-pointer items-center font-medium outline-none transition-colors group-hover/section-header:text-foreground focus-visible:text-foreground', {
11
+ variants: {
12
+ size: {
13
+ panel: 'h-7 px-2 text-[11px]',
14
+ settings: 'h-6 px-2 text-[10.5px] text-muted-foreground/75',
15
+ },
16
+ variant: {
17
+ section: 'flex-1 gap-1.5',
18
+ // A row takes its left inset from the container, which is where depth is counted,
19
+ // so the trigger adds none of its own and lands on the same x as a labelled row.
20
+ row: 'gap-1 px-0 text-[12.5px] text-muted-foreground',
21
+ },
22
+ },
23
+ defaultVariants: { size: 'panel', variant: 'section' },
24
+ });
25
+ const Chevron = ({ open }) => (_jsx(ChevronRight, { "data-slot": "collapsible-section-chevron", className: cn('text-muted-foreground/70 size-2.5 shrink-0 opacity-0 transition-[opacity,transform] duration-125 ease-[var(--ease-out-expo)] group-hover/section-header:opacity-100 group-has-[:focus-visible]/section-header:opacity-100 motion-reduce:transition-none', open && 'rotate-90'), strokeWidth: 1.5, "aria-hidden": true }));
26
+ export const CollapsibleSectionHeader = React.forwardRef(function CollapsibleSectionHeader({ open, onToggle, label, leadingIcon, depth = 0, badge, action, actionVisibility = 'hover', onLabelClick, labelProps, toggleLabel, containerProps, size, variant = 'section', className, labelClassName, onKeyDown, ...props }, ref) {
27
+ const actionSwapsWithBadge = Boolean(action) && actionVisibility === 'hover';
28
+ const labelId = React.useId();
29
+ const { style: containerStyle, ...restContainerProps } = containerProps ?? {};
30
+ const depthStyle = {
31
+ ...containerStyle,
32
+ ...(variant === 'row' ? { paddingLeft: 8 + depth * 12 } : {}),
33
+ };
34
+ const handleDisclosureKeyDown = (event, additionalHandler) => {
35
+ additionalHandler?.(event);
36
+ onKeyDown?.(event);
37
+ if (event.defaultPrevented)
38
+ return;
39
+ if (event.key === 'ArrowRight' && !open) {
40
+ event.preventDefault();
41
+ onToggle();
42
+ }
43
+ else if (event.key === 'ArrowLeft' && open) {
44
+ event.preventDefault();
45
+ onToggle();
46
+ }
47
+ };
48
+ return (_jsxs("div", { ref: ref, "data-slot": "collapsible-section-header", "data-open": open, "data-variant": variant, "data-depth": depth, className: cn(sidePanelRowClassName(), 'group/section-header group/side-panel-item cursor-pointer px-0 pr-1', variant === 'row' && 'font-normal', className), style: depthStyle, ...restContainerProps, children: [onLabelClick ? (_jsxs("div", { "data-slot": "collapsible-section-label-trigger", className: cn('relative flex min-w-0 flex-1 items-center',
49
+ // The toggle-button branch takes its left gutter from headerVariants; this
50
+ // branch has no such button, so it carries the same gutter itself — without
51
+ // it a clickable-label header sits a padding to the left of every sibling row.
52
+ variant === 'row' ? 'gap-2' : 'pl-2'), children: [_jsx(NavigableListItem, { children: _jsx("button", { type: "button", ...labelProps, "aria-labelledby": labelProps?.['aria-label'] ? undefined : labelId, onClick: onLabelClick, onKeyDown: (event) => handleDisclosureKeyDown(event, labelProps?.onKeyDown), className: cn('absolute inset-0 w-full rounded-md outline-none', labelProps?.className), ...props }) }), leadingIcon ? (_jsx("span", { "data-slot": "collapsible-section-leading-icon", className: "pointer-events-none relative flex size-4 shrink-0 items-center justify-center", children: leadingIcon })) : null, _jsx("span", { id: labelId, "data-slot": "collapsible-section-label", className: cn('pointer-events-none relative truncate text-[12.5px] font-medium', labelClassName), children: label }), _jsx("button", { type: "button", "aria-label": toggleLabel, "aria-expanded": open, onPointerDown: (event) => event.stopPropagation(), onClick: (event) => {
53
+ event.stopPropagation();
54
+ onToggle();
55
+ }, onKeyDown: handleDisclosureKeyDown, className: "relative flex size-7 shrink-0 items-center justify-center rounded-sm outline-none", children: _jsx(Chevron, { open: open }) }), actionSwapsWithBadge ? null : badge] })) : (_jsx(NavigableListItem, { children: _jsxs("button", { type: "button", "aria-expanded": open, onClick: onToggle, onKeyDown: handleDisclosureKeyDown, className: cn(headerVariants({ size, variant }), 'flex-1'), ...props, children: [leadingIcon ? (_jsx("span", { "data-slot": "collapsible-section-leading-icon", className: "flex size-4 shrink-0 items-center justify-center", children: leadingIcon })) : null, _jsx("span", { "data-slot": "collapsible-section-label", className: cn('truncate', labelClassName), children: label }), _jsx(Chevron, { open: open }), actionSwapsWithBadge || !badge ? null : _jsx("span", { className: "ml-auto", children: badge })] }) })), actionSwapsWithBadge ? (_jsx(RowTrailing, { className: "mr-1.5", resting: badge, actions: action })) : action ? (_jsx("span", { className: cn('ml-auto flex items-center gap-0.5', actionVisibility === 'persistent' &&
56
+ 'opacity-60 transition-opacity group-hover/section-header:opacity-100 group-has-[:focus-visible]/section-header:opacity-100'), children: action })) : null] }));
57
+ });
58
+ export const CollapsibleSectionContent = React.forwardRef(function CollapsibleSectionContent({ open = true, unmountOnExit = false, className, innerClassName, children, onTransitionEnd, ...props }, ref) {
59
+ const [present, setPresent] = React.useState(open);
60
+ React.useEffect(() => {
61
+ const reduceMotion = !open &&
62
+ unmountOnExit &&
63
+ typeof window.matchMedia === 'function' &&
64
+ window.matchMedia('(prefers-reduced-motion: reduce)').matches;
65
+ if (!open && !reduceMotion)
66
+ return;
67
+ const frame = window.requestAnimationFrame(() => setPresent(open));
68
+ return () => window.cancelAnimationFrame(frame);
69
+ }, [open, unmountOnExit]);
70
+ return (_jsx("div", { ref: ref, ...props, "data-slot": "collapsible-section-content", "data-open": open, "aria-hidden": open ? undefined : true, inert: open ? undefined : true, className: cn('grid overflow-hidden transition-[grid-template-rows,opacity] duration-150 ease-[var(--ease-out-expo)] motion-reduce:transition-none', open ? 'grid-rows-[1fr] opacity-100' : 'grid-rows-[0fr] opacity-0', className), onTransitionEnd: (event) => {
71
+ onTransitionEnd?.(event);
72
+ if (unmountOnExit &&
73
+ !open &&
74
+ event.target === event.currentTarget &&
75
+ event.propertyName === 'grid-template-rows') {
76
+ setPresent(false);
77
+ }
78
+ }, children: _jsx("div", { className: "min-h-0 overflow-hidden", children: _jsx("div", { className: cn('origin-top transition-[opacity,transform] duration-125 ease-[var(--ease-out-expo)] motion-reduce:transition-none', open
79
+ ? 'translate-y-0 scale-100 opacity-100 delay-50'
80
+ : '-translate-y-0.5 scale-[0.97] opacity-0', innerClassName), children: !unmountOnExit || open || present ? children : null }) }) }));
81
+ });
82
+ export { headerVariants as collapsibleSectionHeaderVariants };
@@ -0,0 +1,73 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { GroupItemOrder } from '../../lib/view-query/index.js';
3
+ export declare const collectionViewSettingsRowClass: string;
4
+ export interface CollectionViewSettingsGroupAxis {
5
+ id: string;
6
+ label: string;
7
+ icon?: ReactNode;
8
+ }
9
+ export interface CollectionViewSettingsGroupItem {
10
+ id: string;
11
+ label: string;
12
+ icon?: ReactNode;
13
+ empty?: boolean;
14
+ hidden?: boolean;
15
+ }
16
+ export interface CollectionViewSettingsGroupLabels {
17
+ groupBy: string;
18
+ groupOrder: string;
19
+ orderManual: string;
20
+ orderAlphabetical: string;
21
+ orderItemCount: string;
22
+ hideEmptyGroups: string;
23
+ groups: string;
24
+ showAllGroups: string;
25
+ removeGrouping: string;
26
+ reorder: string;
27
+ showGroup: (group: string) => string;
28
+ hideGroup: (group: string) => string;
29
+ }
30
+ export interface CollectionViewSettingsGroupAxisPageLabels {
31
+ search: string;
32
+ noMatches: string;
33
+ }
34
+ export interface CollectionViewSettingsGroupAxisPageProps {
35
+ axes: readonly CollectionViewSettingsGroupAxis[];
36
+ value?: string;
37
+ onSelect: (id: string) => void;
38
+ labels: CollectionViewSettingsGroupAxisPageLabels;
39
+ testIdPrefix: string;
40
+ }
41
+ export interface CollectionViewSettingsSelectRowOption {
42
+ id: string;
43
+ label: string;
44
+ icon?: ReactNode;
45
+ }
46
+ export interface CollectionViewSettingsSelectRowProps {
47
+ icon: ReactNode;
48
+ label: string;
49
+ value: string;
50
+ options: readonly CollectionViewSettingsSelectRowOption[];
51
+ selectedId: string;
52
+ onSelect?: (id: string) => void;
53
+ testId: string;
54
+ }
55
+ export interface CollectionViewSettingsGroupPageProps {
56
+ axes: readonly CollectionViewSettingsGroupAxis[];
57
+ value: string;
58
+ items: readonly CollectionViewSettingsGroupItem[];
59
+ itemOrder: GroupItemOrder;
60
+ hideEmptyGroups: boolean;
61
+ labels: CollectionViewSettingsGroupLabels;
62
+ testIdPrefix: string;
63
+ onOpenAxisPage: () => void;
64
+ onRemoveGrouping: () => void;
65
+ onItemOrderChange?: (next: GroupItemOrder) => void;
66
+ onReorderItems?: (ids: string[]) => void;
67
+ onHideEmptyGroupsChange?: (next: boolean) => void;
68
+ onToggleItemVisibility?: (id: string) => void;
69
+ onShowAllItems?: () => void;
70
+ }
71
+ export declare function CollectionViewSettingsSelectRow({ icon, label, value, options, selectedId, onSelect, testId, }: CollectionViewSettingsSelectRowProps): React.ReactElement;
72
+ export declare function CollectionViewSettingsGroupAxisPage({ axes, value, onSelect, labels, testIdPrefix, }: CollectionViewSettingsGroupAxisPageProps): React.ReactElement;
73
+ export declare function CollectionViewSettingsGroupPage({ axes, value, items, itemOrder, hideEmptyGroups, labels, testIdPrefix, onOpenAxisPage, onRemoveGrouping, onItemOrderChange, onReorderItems, onHideEmptyGroupsChange, onToggleItemVisibility, onShowAllItems, }: CollectionViewSettingsGroupPageProps): React.ReactElement;
@@ -0,0 +1,55 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState } from 'react';
4
+ import { ArrowDownUp, ChevronRight, Eye, EyeOff, GripVertical, Trash2, Type, } from 'lucide-react';
5
+ import { Button } from '../button.js';
6
+ import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from '../command.js';
7
+ import { DragHandle, SortableList } from '../sortable.js';
8
+ import { Switch } from '../switch.js';
9
+ import { CollectionViewSettingsSectionRow } from './collection-view-settings.js';
10
+ import { viewListRowClass } from '../../lib/view-chrome.js';
11
+ import { cn } from '../../lib/cn.js';
12
+ export const collectionViewSettingsRowClass = cn(viewListRowClass, 'flex w-full items-center gap-2 text-left leading-none');
13
+ const NO_GROUPING_AXIS_ID = 'none';
14
+ export function CollectionViewSettingsSelectRow({ icon, label, value, options, selectedId, onSelect, testId, }) {
15
+ const [open, setOpen] = useState(false);
16
+ return (_jsxs("div", { className: "relative", children: [_jsxs("button", { type: "button", onClick: () => setOpen((prev) => !prev), className: cn(collectionViewSettingsRowClass, 'text-foreground hover:bg-muted/55'), "data-testid": testId, children: [_jsx("span", { className: "text-muted-foreground", children: icon }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: label }), _jsx("span", { className: "text-muted-foreground max-w-[126px] truncate", children: value }), _jsx(ChevronRight, { className: cn('text-muted-foreground/70 size-4 shrink-0 transition-transform', open && 'rotate-90'), strokeWidth: 1.8 })] }), open ? (_jsx("div", { className: "border-border/60 bg-background mx-2 mb-1 grid gap-0.5 rounded-lg border p-1", children: options.map((option) => (_jsxs("button", { type: "button", onClick: () => {
17
+ onSelect?.(option.id);
18
+ setOpen(false);
19
+ }, "data-checked": option.id === selectedId ? 'true' : undefined, className: cn(collectionViewSettingsRowClass, option.id === selectedId
20
+ ? 'text-foreground'
21
+ : 'text-muted-foreground hover:text-foreground'), children: [option.icon ? _jsx("span", { className: "text-muted-foreground", children: option.icon }) : null, _jsx("span", { className: "min-w-0 flex-1 truncate", children: option.label })] }, option.id))) })) : null] }));
22
+ }
23
+ export function CollectionViewSettingsGroupAxisPage({ axes, value, onSelect, labels, testIdPrefix, }) {
24
+ return (_jsxs(Command, { className: "rounded-none bg-transparent p-0 pt-1", children: [_jsx(CommandInput, { variant: "boxed", placeholder: labels.search }), _jsxs(CommandList, { className: "max-h-[336px] px-2 pb-2", children: [_jsx(CommandEmpty, { className: "text-muted-foreground py-6 text-[12px]", children: labels.noMatches }), _jsx(CommandGroup, { className: "p-0", children: axes
25
+ .filter((axis) => axis.id !== NO_GROUPING_AXIS_ID)
26
+ .map((axis) => {
27
+ const active = value === axis.id;
28
+ return (_jsxs(CommandItem, { value: axis.label, "data-checked": active ? 'true' : undefined, onSelect: () => onSelect(axis.id), className: cn('text-[13px]', active ? 'text-foreground' : 'text-muted-foreground hover:text-foreground'), "data-testid": `${testIdPrefix}-groupby-${axis.id}`, children: [axis.icon ? _jsx("span", { className: "inline-flex shrink-0", children: axis.icon }) : null, _jsx("span", { className: "min-w-0 flex-1 truncate", children: axis.label })] }, axis.id));
29
+ }) })] })] }));
30
+ }
31
+ export function CollectionViewSettingsGroupPage({ axes, value, items, itemOrder, hideEmptyGroups, labels, testIdPrefix, onOpenAxisPage, onRemoveGrouping, onItemOrderChange, onReorderItems, onHideEmptyGroupsChange, onToggleItemVisibility, onShowAllItems, }) {
32
+ const currentAxis = axes.find((axis) => axis.id === value);
33
+ const orderOptions = [
34
+ {
35
+ id: 'manual',
36
+ label: labels.orderManual,
37
+ icon: _jsx(GripVertical, { className: "size-4", strokeWidth: 1.7 }),
38
+ },
39
+ {
40
+ id: 'alphabetical',
41
+ label: labels.orderAlphabetical,
42
+ icon: _jsx(Type, { className: "size-4", strokeWidth: 1.7 }),
43
+ },
44
+ {
45
+ id: 'item_count',
46
+ label: labels.orderItemCount,
47
+ icon: _jsx(ArrowDownUp, { className: "size-4", strokeWidth: 1.7 }),
48
+ },
49
+ ];
50
+ const hiddenCount = items.filter((item) => item.hidden).length;
51
+ return (_jsxs("div", { className: "grid gap-0", children: [_jsx(CollectionViewSettingsSectionRow, { icon: currentAxis?.icon, label: labels.groupBy, summary: currentAxis?.label, onClick: onOpenAxisPage, testId: `${testIdPrefix}-group-setting-axis` }), _jsx(CollectionViewSettingsSelectRow, { icon: _jsx(GripVertical, { className: "size-4", strokeWidth: 1.7 }), label: labels.groupOrder, value: orderOptions.find((option) => option.id === itemOrder)?.label ?? labels.orderManual, options: orderOptions, selectedId: itemOrder, onSelect: (next) => onItemOrderChange?.(next), testId: `${testIdPrefix}-group-setting-order` }), _jsxs("label", { className: cn(collectionViewSettingsRowClass, 'text-foreground hover:bg-muted/55 cursor-pointer'), children: [_jsx("span", { className: "min-w-0 flex-1 truncate", children: labels.hideEmptyGroups }), _jsx(Switch, { size: "sm", checked: hideEmptyGroups, onCheckedChange: (next) => onHideEmptyGroupsChange?.(next), "aria-label": labels.hideEmptyGroups, "data-testid": `${testIdPrefix}-hide-empty-groups` })] }), _jsx("div", { className: "bg-border/60 mx-1 my-2 h-px" }), _jsxs("div", { className: "flex h-8 items-center justify-between gap-2 px-2", children: [_jsx("span", { className: "text-muted-foreground text-[12px] font-medium", children: labels.groups }), hiddenCount > 0 ? (_jsx(Button, { type: "button", variant: "link", onClick: onShowAllItems, className: "h-auto p-0 text-[12px]", "data-testid": `${testIdPrefix}-show-all-groups`, children: labels.showAllGroups })) : null] }), _jsx(SortableList, { items: [...items], keyOf: (item) => item.id, handle: true, disabled: !onReorderItems || items.length < 2, onReorder: (_, detail) => onReorderItems?.(detail.nextIds), className: "grid max-h-[176px] gap-0.5 overflow-y-auto pr-1", renderItem: (item, args) => (_jsx(GroupItemRow, { item: item, dragHandleProps: args.dragHandleProps, isDragging: args.isDragging, onToggleVisibility: onToggleItemVisibility, visibilityLabel: item.hidden ? labels.showGroup(item.label) : labels.hideGroup(item.label), reorderLabel: labels.reorder, testIdPrefix: testIdPrefix })) }), _jsx("div", { className: "bg-border/60 mx-1 my-2 h-px" }), _jsxs("button", { type: "button", onClick: onRemoveGrouping, className: cn(collectionViewSettingsRowClass, 'text-muted-foreground hover:bg-muted/55 hover:text-foreground'), "data-testid": `${testIdPrefix}-remove-grouping`, children: [_jsx(Trash2, { className: "size-4", strokeWidth: 1.7 }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: labels.removeGrouping })] })] }));
52
+ }
53
+ function GroupItemRow({ item, dragHandleProps, isDragging, onToggleVisibility, visibilityLabel, reorderLabel, testIdPrefix, }) {
54
+ return (_jsxs("div", { className: cn(collectionViewSettingsRowClass, 'group', item.hidden && 'text-muted-foreground/60', isDragging && 'relative z-10 opacity-70 shadow-sm'), children: [_jsx(DragHandle, { dragHandleProps: dragHandleProps, "aria-label": reorderLabel, className: "text-muted-foreground/60 size-4 shrink-0 opacity-100" }), item.icon ? _jsx("span", { className: "inline-flex shrink-0 items-center", children: item.icon }) : null, _jsx("span", { className: cn('min-w-0 flex-1 truncate text-[13px]', item.hidden ? 'line-through' : 'text-foreground/90', item.empty && !item.hidden && 'text-muted-foreground'), children: item.label }), _jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", onClick: () => onToggleVisibility?.(item.id), "aria-pressed": !item.hidden, "aria-label": visibilityLabel, title: visibilityLabel, disabled: !onToggleVisibility, className: "text-muted-foreground hover:text-foreground size-6 rounded-lg", "data-testid": `${testIdPrefix}-toggle-group-${item.id}`, children: item.hidden ? (_jsx(EyeOff, { className: "size-3.5", strokeWidth: 1.7 })) : (_jsx(Eye, { className: "size-3.5", strokeWidth: 1.7 })) })] }));
55
+ }
@@ -0,0 +1,115 @@
1
+ import { type ComponentProps, type ReactNode } from 'react';
2
+ import { StackedPopoverContent } from '../popover-stack.js';
3
+ import { Button } from '../button.js';
4
+ export interface CollectionViewSettingsLabels {
5
+ settings: string;
6
+ back: string;
7
+ close: string;
8
+ searchFields: string;
9
+ noFields: string;
10
+ refineSearch: string;
11
+ }
12
+ export interface CollectionViewSettingsSection {
13
+ id: string;
14
+ label: string;
15
+ icon?: ReactNode;
16
+ summary?: ReactNode;
17
+ content: ReactNode;
18
+ disabled?: boolean;
19
+ showInRoot?: boolean;
20
+ testId?: string;
21
+ contentPadding?: 'default' | 'none';
22
+ }
23
+ export interface CollectionViewSettingsProps {
24
+ labels: CollectionViewSettingsLabels;
25
+ sections: readonly CollectionViewSettingsSection[];
26
+ identity?: CollectionViewSettingsIdentityProps;
27
+ open?: boolean;
28
+ defaultOpen?: boolean;
29
+ onOpenChange?: (open: boolean) => void;
30
+ align?: ComponentProps<typeof StackedPopoverContent>['align'];
31
+ triggerTestId?: string;
32
+ triggerClassName?: string;
33
+ contentClassName?: string;
34
+ showTriggerLabel?: boolean;
35
+ }
36
+ export interface CollectionViewSettingsIdentityProps {
37
+ name: string;
38
+ icon?: ReactNode;
39
+ renameLabel: string;
40
+ readOnly?: boolean;
41
+ onRename?: (name: string) => void | Promise<void>;
42
+ }
43
+ export interface CollectionViewSettingsChoice<TValue extends string> {
44
+ value: TValue;
45
+ label: string;
46
+ icon?: ReactNode;
47
+ }
48
+ export interface CollectionViewSettingsChoiceGroupProps<TValue extends string> {
49
+ value: TValue;
50
+ choices: readonly CollectionViewSettingsChoice<TValue>[];
51
+ onChange: (value: TValue) => void;
52
+ columns?: 2 | 3;
53
+ presentation?: 'row' | 'tile';
54
+ testIdPrefix?: string;
55
+ className?: string;
56
+ }
57
+ export interface CollectionViewSettingsNavigation {
58
+ page: string;
59
+ openPage: (page: string) => void;
60
+ replacePage: (page: string) => void;
61
+ goBack: () => void;
62
+ close: () => void;
63
+ }
64
+ export declare function useCollectionViewSettingsNavigation(): CollectionViewSettingsNavigation;
65
+ export declare function CollectionViewSettings({ labels, sections, identity, open: controlledOpen, defaultOpen, onOpenChange, align, triggerTestId, triggerClassName, contentClassName, showTriggerLabel, }: CollectionViewSettingsProps): React.ReactElement;
66
+ export declare function CollectionViewSettingsIdentity({ name, icon, renameLabel, readOnly, onRename, }: CollectionViewSettingsIdentityProps): React.ReactElement;
67
+ export declare function CollectionViewSettingsChoiceGroup<TValue extends string>({ value, choices, onChange, columns, presentation, testIdPrefix, className, }: CollectionViewSettingsChoiceGroupProps<TValue>): React.ReactElement;
68
+ export declare function CollectionViewSettingsSectionRow({ label, icon, summary, disabled, testId, onClick, }: Omit<CollectionViewSettingsSection, 'id' | 'content'> & {
69
+ onClick: () => void;
70
+ }): import("react").JSX.Element;
71
+ export declare function CollectionViewSettingsPage({ className, padding, ...props }: ComponentProps<'div'> & {
72
+ padding?: 'default' | 'none';
73
+ }): React.ReactElement;
74
+ export declare function CollectionViewSettingsAddAction({ children, className, ...props }: ComponentProps<typeof Button>): React.ReactElement;
75
+ export interface CollectionViewSettingsField<TField extends string = string> {
76
+ id: TField;
77
+ label: string;
78
+ icon?: ReactNode;
79
+ keywords?: readonly string[];
80
+ disabled?: boolean;
81
+ }
82
+ export interface CollectionViewSettingsFieldPickerProps<TField extends string = string> {
83
+ fields: readonly CollectionViewSettingsField<TField>[];
84
+ labels: Pick<CollectionViewSettingsLabels, 'searchFields' | 'noFields' | 'refineSearch'>;
85
+ onSelect: (field: TField) => void;
86
+ selectedField?: TField;
87
+ selectedFields?: ReadonlySet<TField>;
88
+ className?: string;
89
+ }
90
+ export declare function CollectionViewSettingsFieldPicker<TField extends string>({ fields, labels, onSelect, selectedField, selectedFields, className, }: CollectionViewSettingsFieldPickerProps<TField>): React.ReactElement;
91
+ export interface CollectionViewSettingsSort<TField extends string = string> {
92
+ id: string;
93
+ field: TField;
94
+ dir: 'asc' | 'desc';
95
+ }
96
+ export interface CollectionViewSettingsSortPageProps<TField extends string = string> {
97
+ sorts: readonly CollectionViewSettingsSort<TField>[];
98
+ fields: readonly CollectionViewSettingsField<TField>[];
99
+ labels: {
100
+ addSort: string;
101
+ ascending: string;
102
+ descending: string;
103
+ chooseField: string;
104
+ remove: string;
105
+ reorder: string;
106
+ searchFields: string;
107
+ };
108
+ onChange: (sorts: CollectionViewSettingsSort<TField>[]) => void;
109
+ createSort: (field: TField) => CollectionViewSettingsSort<TField>;
110
+ className?: string;
111
+ addButtonTestId?: string;
112
+ noFieldsLabel?: string;
113
+ refineSearchLabel: string;
114
+ }
115
+ export declare function CollectionViewSettingsSortPage<TField extends string>({ sorts, fields, labels, onChange, createSort, className, addButtonTestId, noFieldsLabel, refineSearchLabel, }: CollectionViewSettingsSortPageProps<TField>): React.ReactElement;