@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,33 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { cva } from 'class-variance-authority';
4
+ import { Check, MessageSquare } from 'lucide-react';
5
+ import { cn } from '../lib/cn.js';
6
+ // A comment pin — the small anchored marker that sits on a commented object (a
7
+ // slide block, a whole slide) and, when activated, opens its thread. Generalised
8
+ // as an atom so any anchored-thread surface (canvas objects, a map, a diff line)
9
+ // reads as one system. Purely presentational + a button; positioning is the
10
+ // caller's job.
11
+ const commentPinVariants = cva('atmos-comment-pin inline-flex select-none cursor-pointer items-center justify-center gap-1 rounded-full rounded-bl-[4px] border shadow-sm outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background [&_svg]:pointer-events-none [&_svg]:shrink-0', {
12
+ variants: {
13
+ tone: {
14
+ open: 'border-border bg-card text-foreground hover:bg-muted',
15
+ resolved: 'border-border/60 bg-muted text-muted-foreground hover:bg-muted/80',
16
+ },
17
+ active: {
18
+ true: 'ring-2 ring-ring ring-offset-1 ring-offset-background',
19
+ false: '',
20
+ },
21
+ size: {
22
+ sm: 'h-5 min-w-5 px-1 text-[10.5px]',
23
+ default: 'h-6 min-w-6 px-1.5 text-[11px]',
24
+ },
25
+ },
26
+ defaultVariants: { tone: 'open', active: false, size: 'default' },
27
+ });
28
+ export function CommentPin({ className, count, resolved = false, active = false, size, tone, ...props }) {
29
+ const resolvedTone = tone ?? (resolved ? 'resolved' : 'open');
30
+ const iconClass = size === 'sm' ? 'size-3' : 'size-3.5';
31
+ return (_jsxs("button", { type: "button", "data-slot": "comment-pin", "data-resolved": resolved || undefined, "data-active": active || undefined, className: cn(commentPinVariants({ tone: resolvedTone, active, size, className })), ...props, children: [resolved ? (_jsx(Check, { className: iconClass, strokeWidth: 2, "aria-hidden": true })) : (_jsx(MessageSquare, { className: iconClass, strokeWidth: 1.75, "aria-hidden": true })), typeof count === 'number' && count > 0 ? (_jsx("span", { className: "font-mono tabular-nums leading-none", children: count })) : null] }));
32
+ }
33
+ export { commentPinVariants };
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ export type ConfidenceLevel = 'low' | 'medium' | 'high';
3
+ export declare function confidenceLevel(value: number): ConfidenceLevel;
4
+ export interface ConfidenceMeterProps extends React.ComponentProps<'span'> {
5
+ value: number;
6
+ label: string;
7
+ showValue?: boolean;
8
+ showLabel?: boolean;
9
+ valueText?: string;
10
+ }
11
+ export declare function ConfidenceMeter({ value, label, showValue, showLabel, valueText, className, ...props }: ConfidenceMeterProps): React.JSX.Element;
@@ -0,0 +1,24 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import { cn } from '../lib/cn.js';
5
+ export function confidenceLevel(value) {
6
+ if (value < 0.5)
7
+ return 'low';
8
+ if (value < 0.8)
9
+ return 'medium';
10
+ return 'high';
11
+ }
12
+ const FILLED_TONE = {
13
+ low: 'bg-warning-9',
14
+ medium: 'bg-muted-foreground/70',
15
+ high: 'bg-foreground/70',
16
+ };
17
+ const FILLED_BARS = { low: 1, medium: 2, high: 3 };
18
+ export function ConfidenceMeter({ value, label, showValue = false, showLabel = false, valueText, className, ...props }) {
19
+ const clamped = Math.max(0, Math.min(1, Number.isFinite(value) ? value : 0));
20
+ const level = confidenceLevel(clamped);
21
+ const filled = FILLED_BARS[level];
22
+ const pct = valueText ?? `${Math.round(clamped * 100)}%`;
23
+ return (_jsxs("span", { "data-slot": "confidence-meter", "data-level": level, role: "meter", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(clamped * 100), "aria-label": `${label} ${pct}`, title: `${label} ${pct}`, className: cn('inline-flex items-center gap-1.5', className), ...props, children: [showLabel ? _jsx("span", { className: "text-muted-foreground", children: label }) : null, _jsx("span", { "aria-hidden": true, className: "flex items-end gap-0.5", children: [0, 1, 2].map((index) => _jsx("span", { className: cn('w-0.5 rounded-full', index === 0 ? 'h-1.5' : index === 1 ? 'h-2' : 'h-2.5', index < filled ? FILLED_TONE[level] : 'bg-border') }, index)) }), showValue ? _jsx("span", { className: "font-mono text-[11px] tabular-nums text-muted-foreground", children: pct }) : null] }));
24
+ }
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+ import { ContextMenu as ContextMenuPrimitive } from 'radix-ui';
3
+ declare function ContextMenu({ onOpenChange, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>): React.JSX.Element;
4
+ /**
5
+ * Publishes `data-context-menu-open` while its menu is open, which `data-state` cannot
6
+ * say on its own: a trigger that is also a hover-card or tooltip anchor wears
7
+ * `data-state="open"` for those too, so a row keyed off it lights up on hover. Selectable
8
+ * rows key their focus ring off this attribute instead, and so keep looking focused while
9
+ * the menu they opened holds focus in their place — off the trigger itself where the row
10
+ * is the trigger, and off `group/context-menu` where the trigger wraps it.
11
+ */
12
+ declare function ContextMenuTrigger({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): React.JSX.Element;
13
+ declare function ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>): React.JSX.Element;
14
+ declare function ContextMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
15
+ inset?: boolean;
16
+ variant?: 'default' | 'destructive';
17
+ }): React.JSX.Element;
18
+ declare function ContextMenuCheckboxItem({ className, children, checked, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem> & {
19
+ inset?: boolean;
20
+ }): React.JSX.Element;
21
+ declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>): React.JSX.Element;
22
+ declare function ContextMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
23
+ inset?: boolean;
24
+ }): React.JSX.Element;
25
+ declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
26
+ declare function ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>): React.JSX.Element;
27
+ declare function ContextMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
28
+ inset?: boolean;
29
+ }): React.JSX.Element;
30
+ declare function ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>): React.JSX.Element;
31
+ export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuSeparator, ContextMenuLabel, ContextMenuShortcut, ContextMenuSub, ContextMenuSubTrigger, ContextMenuSubContent, };
@@ -0,0 +1,54 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import { ContextMenu as ContextMenuPrimitive } from 'radix-ui';
5
+ import { CheckIcon, ChevronRight } from 'lucide-react';
6
+ import { cn } from '../lib/cn.js';
7
+ const ContextMenuOpenContext = React.createContext(false);
8
+ function ContextMenu({ onOpenChange, ...props }) {
9
+ const [open, setOpen] = React.useState(false);
10
+ return (_jsx(ContextMenuOpenContext.Provider, { value: open, children: _jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", onOpenChange: (next) => {
11
+ setOpen(next);
12
+ onOpenChange?.(next);
13
+ }, ...props }) }));
14
+ }
15
+ /**
16
+ * Publishes `data-context-menu-open` while its menu is open, which `data-state` cannot
17
+ * say on its own: a trigger that is also a hover-card or tooltip anchor wears
18
+ * `data-state="open"` for those too, so a row keyed off it lights up on hover. Selectable
19
+ * rows key their focus ring off this attribute instead, and so keep looking focused while
20
+ * the menu they opened holds focus in their place — off the trigger itself where the row
21
+ * is the trigger, and off `group/context-menu` where the trigger wraps it.
22
+ */
23
+ function ContextMenuTrigger({ className, ...props }) {
24
+ const open = React.useContext(ContextMenuOpenContext);
25
+ return (_jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", "data-context-menu-open": open ? '' : undefined, className: cn('group/context-menu', className), ...props }));
26
+ }
27
+ function ContextMenuContent({ className, ...props }) {
28
+ return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Content, { "data-slot": "context-menu-content", className: cn('bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 w-max max-w-[calc(100vw-2rem)] min-w-32 overflow-hidden rounded-lg p-1 shadow-md ring-1 duration-100', className), ...props }) }));
29
+ }
30
+ function ContextMenuItem({ className, inset, variant = 'default', ...props }) {
31
+ return (_jsx(ContextMenuPrimitive.Item, { "data-slot": "context-menu-item", "data-inset": inset, "data-variant": variant, className: cn("group/context-menu-item focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
32
+ }
33
+ function ContextMenuCheckboxItem({ className, children, checked, inset, ...props }) {
34
+ return (_jsxs(ContextMenuPrimitive.CheckboxItem, { "data-slot": "context-menu-checkbox-item", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute right-2 flex items-center justify-center", "data-slot": "context-menu-checkbox-item-indicator", children: _jsx(ContextMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
35
+ }
36
+ function ContextMenuSeparator({ className, ...props }) {
37
+ return (_jsx(ContextMenuPrimitive.Separator, { "data-slot": "context-menu-separator", className: cn('bg-border -mx-1 my-1 h-px', className), ...props }));
38
+ }
39
+ function ContextMenuLabel({ className, inset, ...props }) {
40
+ return (_jsx(ContextMenuPrimitive.Label, { "data-slot": "context-menu-label", "data-inset": inset, className: cn('text-muted-foreground/70 px-1.5 py-1 text-[10.5px] font-medium tracking-[0.04em] data-inset:pl-7', className), ...props }));
41
+ }
42
+ function ContextMenuShortcut({ className, ...props }) {
43
+ return (_jsx("span", { "data-slot": "context-menu-shortcut", className: cn('text-muted-foreground/60 ml-auto pl-4 font-mono text-[10.5px] tracking-widest', className), ...props }));
44
+ }
45
+ function ContextMenuSub({ ...props }) {
46
+ return _jsx(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
47
+ }
48
+ function ContextMenuSubTrigger({ className, inset, children, ...props }) {
49
+ return (_jsxs(ContextMenuPrimitive.SubTrigger, { "data-slot": "context-menu-sub-trigger", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(ChevronRight, { className: "text-muted-foreground/70 ml-auto size-3.5" })] }));
50
+ }
51
+ function ContextMenuSubContent({ className, ...props }) {
52
+ return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.SubContent, { "data-slot": "context-menu-sub-content", className: cn('bg-popover text-popover-foreground ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 w-max max-w-[calc(100vw-2rem)] min-w-32 overflow-hidden rounded-lg p-1 shadow-md ring-1 duration-100', className), ...props }) }));
53
+ }
54
+ export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuSeparator, ContextMenuLabel, ContextMenuShortcut, ContextMenuSub, ContextMenuSubTrigger, ContextMenuSubContent, };
@@ -0,0 +1,12 @@
1
+ import { type IconButtonProps } from './icon-button.js';
2
+ export interface CopyButtonProps extends Omit<IconButtonProps, 'children' | 'tooltip'> {
3
+ /** The text put on the clipboard. */
4
+ value: string;
5
+ /** Names what is copied — "Copy access target". Used as tooltip and accessible name. */
6
+ label: string;
7
+ /** Shown in the tooltip while the check mark is up. */
8
+ copiedLabel?: string;
9
+ onCopied?: () => void;
10
+ onCopyFailed?: (error: unknown) => void;
11
+ }
12
+ export declare function CopyButton({ value, label, copiedLabel, onCopied, onCopyFailed, size, ...props }: CopyButtonProps): import("react").JSX.Element;
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useEffect, useRef, useState } from 'react';
4
+ import { Check, Copy } from 'lucide-react';
5
+ import { IconButton } from './icon-button.js';
6
+ const COPIED_FEEDBACK_MS = 1500;
7
+ export function CopyButton({ value, label, copiedLabel = label, onCopied, onCopyFailed, size = 'xs', ...props }) {
8
+ const [copied, setCopied] = useState(false);
9
+ const [tooltipOpen, setTooltipOpen] = useState(false);
10
+ const feedbackTimer = useRef(undefined);
11
+ useEffect(() => () => clearTimeout(feedbackTimer.current), []);
12
+ async function copy() {
13
+ try {
14
+ await navigator.clipboard.writeText(value);
15
+ }
16
+ catch (error) {
17
+ onCopyFailed?.(error);
18
+ return;
19
+ }
20
+ setCopied(true);
21
+ // The press itself closed the tooltip, and the confirmation is what it has to say.
22
+ setTooltipOpen(true);
23
+ clearTimeout(feedbackTimer.current);
24
+ feedbackTimer.current = setTimeout(() => {
25
+ setCopied(false);
26
+ // Held open by us, not by the pointer, so nothing else would take it back down.
27
+ setTooltipOpen(false);
28
+ }, COPIED_FEEDBACK_MS);
29
+ onCopied?.();
30
+ }
31
+ return (_jsx(IconButton, { size: size, "aria-label": label, tooltip: copied ? copiedLabel : label, tooltipOpen: tooltipOpen, onTooltipOpenChange: setTooltipOpen, onClick: () => void copy(), ...props, children: copied ? _jsx(Check, { "aria-hidden": true }) : _jsx(Copy, { "aria-hidden": true }) }));
32
+ }
@@ -0,0 +1,29 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type FormatDateTime } from '../lib/date-time-format.js';
3
+ export interface DatePickerProps {
4
+ value: string | undefined;
5
+ onChange: (value: string | undefined) => void;
6
+ placeholder?: string;
7
+ disabled?: boolean;
8
+ fromDate?: string;
9
+ locale?: string;
10
+ format?: FormatDateTime;
11
+ 'aria-label'?: string;
12
+ closeOnSelect?: boolean;
13
+ align?: 'start' | 'center' | 'end';
14
+ className?: string;
15
+ size?: 'sm' | 'default';
16
+ }
17
+ export declare function DatePicker({ value, onChange, placeholder, disabled, fromDate, locale, format, 'aria-label': ariaLabel, closeOnSelect, align, className, size, }: DatePickerProps): import("react").JSX.Element;
18
+ export interface DatePickerPopoverProps {
19
+ value: string | null;
20
+ onSelect: (date: string | null) => void;
21
+ children: ReactNode;
22
+ align?: 'start' | 'center' | 'end';
23
+ locale?: string;
24
+ format?: FormatDateTime;
25
+ closeOnSelect?: boolean;
26
+ open?: boolean;
27
+ onOpenChange?: (open: boolean) => void;
28
+ }
29
+ export declare function DatePickerPopover({ value, onSelect, children, align, locale, format, closeOnSelect, open: openProp, onOpenChange, }: DatePickerPopoverProps): import("react").JSX.Element;
@@ -0,0 +1,86 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useMemo, useState, } from 'react';
4
+ import { CalendarIcon } from 'lucide-react';
5
+ import { Calendar } from './calendar.js';
6
+ import { Popover, PopoverContent, PopoverTrigger } from './popover.js';
7
+ import { PickerField } from './picker-field.js';
8
+ import { parseLooseDate } from '../lib/parse-loose.js';
9
+ import { cn } from '../lib/cn.js';
10
+ import { resolveDateTimeFormat } from '../lib/date-time-format.js';
11
+ function ymd(d) {
12
+ return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;
13
+ }
14
+ function parseCivilDate(value) {
15
+ if (!value)
16
+ return null;
17
+ const [y, m, d] = value.split('-').map(Number);
18
+ if (!y || !m || !d)
19
+ return null;
20
+ return new Date(y, m - 1, d);
21
+ }
22
+ export function DatePicker({ value, onChange, placeholder, disabled, fromDate, locale, format, 'aria-label': ariaLabel, closeOnSelect = true, align = 'start', className, size = 'default', }) {
23
+ const resolvedLocale = locale ?? 'en';
24
+ const [open, setOpen] = useState(false);
25
+ const [typed, setTyped] = useState(null);
26
+ const today = useMemo(() => {
27
+ const d = new Date();
28
+ return new Date(d.getFullYear(), d.getMonth(), d.getDate());
29
+ }, []);
30
+ const preview = useMemo(() => (typed ? parseLooseDate(typed, today) : null), [typed, today]);
31
+ const display = useMemo(() => {
32
+ const parsed = parseCivilDate(value);
33
+ if (!parsed)
34
+ return '';
35
+ return resolveDateTimeFormat(format, resolvedLocale)(parsed, {
36
+ year: 'numeric',
37
+ month: 'short',
38
+ day: 'numeric',
39
+ });
40
+ }, [value, format, resolvedLocale]);
41
+ const beforeMin = (next) => Boolean(fromDate && next < fromDate);
42
+ const commit = (next) => {
43
+ setTyped(null);
44
+ onChange(next);
45
+ };
46
+ const handleSelect = (next) => {
47
+ if (next && beforeMin(next))
48
+ return;
49
+ commit(next ?? undefined);
50
+ if (next && closeOnSelect)
51
+ setOpen(false);
52
+ };
53
+ const handleKeyDown = (e) => {
54
+ if (e.key !== 'Enter')
55
+ return;
56
+ e.preventDefault();
57
+ if (preview) {
58
+ const next = ymd(preview);
59
+ if (beforeMin(next))
60
+ return;
61
+ commit(next);
62
+ setOpen(false);
63
+ }
64
+ };
65
+ const gridValue = preview ? ymd(preview) : (value ?? null);
66
+ return (_jsx(PickerField, { open: open, onOpenChange: (next) => {
67
+ setOpen(next);
68
+ if (!next)
69
+ setTyped(null);
70
+ }, display: display, typed: typed, onTypedChange: setTyped, onInputKeyDown: handleKeyDown, placeholder: placeholder, parseState: typed ? (preview ? 'ok' : 'unparseable') : 'empty', icon: _jsx(CalendarIcon, { className: "size-4", strokeWidth: 1.8 }), disabled: disabled, size: size, align: align, "aria-label": ariaLabel, className: cn('w-[160px]', className), contentClassName: "p-3", children: _jsx(Calendar, { value: gridValue, locale: resolvedLocale, format: format, typeable: false, minDate: fromDate, onSelect: handleSelect }, gridValue ? gridValue.slice(0, 7) : 'none') }));
71
+ }
72
+ export function DatePickerPopover({ value, onSelect, children, align = 'start', locale, format, closeOnSelect = true, open: openProp, onOpenChange, }) {
73
+ const [uncontrolledOpen, setUncontrolledOpen] = useState(false);
74
+ const isControlled = openProp !== undefined;
75
+ const open = isControlled ? openProp : uncontrolledOpen;
76
+ const setOpen = (next) => {
77
+ if (!isControlled)
78
+ setUncontrolledOpen(next);
79
+ onOpenChange?.(next);
80
+ };
81
+ return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: children }), _jsx(PopoverContent, { align: align, sideOffset: 6, className: "w-auto p-3", "data-testid": "date-picker-popover", children: _jsx(Calendar, { value: value, locale: locale, format: format, autoFocusInput: true, onSelect: (next) => {
82
+ onSelect(next);
83
+ if (closeOnSelect)
84
+ setOpen(false);
85
+ } }) })] }));
86
+ }
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { type FormatDateTime } from '../lib/date-time-format.js';
3
+ type DateTileSize = 'sm' | 'md';
4
+ export interface DateTileProps extends Omit<React.ComponentProps<'time'>, 'children'> {
5
+ date: Date | string | null | undefined;
6
+ locale?: string;
7
+ format?: FormatDateTime;
8
+ size?: DateTileSize;
9
+ }
10
+ export declare function DateTile({ date, locale, format, size, className, ...props }: DateTileProps): React.JSX.Element;
11
+ export {};
@@ -0,0 +1,16 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import { cn } from '../lib/cn.js';
5
+ import { resolveDateTimeFormat } from '../lib/date-time-format.js';
6
+ const sizeBox = { sm: 'size-10 rounded-md', md: 'size-12 rounded-lg' };
7
+ const dayText = { sm: 'text-[14px]', md: 'text-[16px]' };
8
+ export function DateTile({ date, locale, format, size = 'md', className, ...props }) {
9
+ const value = typeof date === 'string' ? new Date(date) : date;
10
+ const valid = value != null && !Number.isNaN(value.getTime());
11
+ const fmt = resolveDateTimeFormat(format, locale);
12
+ const weekday = valid ? fmt(value, { weekday: 'short' }) : '';
13
+ const day = valid ? fmt(value, { day: 'numeric' }) : '–';
14
+ const month = valid ? fmt(value, { month: 'short' }) : '';
15
+ return (_jsxs("time", { "data-slot": "date-tile", "data-size": size, dateTime: valid ? value.toISOString() : undefined, className: cn('flex shrink-0 flex-col items-center justify-center gap-px border border-border/60 bg-background text-center leading-none shadow-xs', sizeBox[size], className), ...props, children: [_jsx("span", { className: "font-mono text-[9px] text-muted-foreground/70", children: weekday }), _jsx("span", { className: cn('font-semibold tabular-nums text-foreground', dayText[size]), children: day }), _jsx("span", { className: "font-mono text-[9px] text-muted-foreground/70", children: month })] }));
16
+ }
@@ -0,0 +1,25 @@
1
+ import { type FormatDateTime } from '../lib/date-time-format.js';
2
+ export interface DateTimePickerLabels {
3
+ placeholder: string;
4
+ preview: (when: string) => string;
5
+ timeAria: string;
6
+ }
7
+ export interface DateTimePickerProps {
8
+ value: Date | null;
9
+ onChange: (next: Date | null) => void;
10
+ mode?: 'datetime' | 'time';
11
+ step?: number;
12
+ minDate?: string;
13
+ placeholder?: string;
14
+ locale?: string;
15
+ format?: FormatDateTime;
16
+ parseTimeZone?: string;
17
+ align?: 'start' | 'center' | 'end';
18
+ disabled?: boolean;
19
+ className?: string;
20
+ size?: 'sm' | 'default';
21
+ 'aria-label'?: string;
22
+ labels?: Partial<DateTimePickerLabels>;
23
+ }
24
+ export declare function civilDateForTimeZone(instant: Date, timeZone?: string): Date;
25
+ export declare function DateTimePicker({ value, onChange, mode, step, minDate, placeholder, locale, format, parseTimeZone, align, disabled, className, size, 'aria-label': ariaLabel, labels: labelsProp, }: DateTimePickerProps): import("react").JSX.Element;
@@ -0,0 +1,153 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useId, useMemo, useState, } from 'react';
4
+ import { CalendarClock, Clock } from 'lucide-react';
5
+ import { Calendar } from './calendar.js';
6
+ import { PickerField } from './picker-field.js';
7
+ import { TimeColumn, buildTimeSlots, useTimeNavigation } from './time-column.js';
8
+ import { parseLooseDateTime } from '../lib/parse-loose-datetime.js';
9
+ import { parseLooseTime } from '../lib/parse-loose-time.js';
10
+ import { cn } from '../lib/cn.js';
11
+ import { resolveDateTimeFormat } from '../lib/date-time-format.js';
12
+ const DEFAULT_LABELS = {
13
+ placeholder: 'Choose a date and time',
14
+ preview: (when) => `Preview: ${when}`,
15
+ timeAria: 'Choose a time',
16
+ };
17
+ function ymd(d) {
18
+ return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;
19
+ }
20
+ function minutesOf(d) {
21
+ return d.getHours() * 60 + d.getMinutes();
22
+ }
23
+ function fromYmd(value) {
24
+ const [y, m, d] = value.split('-').map(Number);
25
+ if (!y || !m || !d)
26
+ return null;
27
+ return new Date(y, m - 1, d);
28
+ }
29
+ function compose(day, minutes) {
30
+ return new Date(day.getFullYear(), day.getMonth(), day.getDate(), Math.floor(minutes / 60), minutes % 60, 0, 0);
31
+ }
32
+ export function civilDateForTimeZone(instant, timeZone) {
33
+ if (!timeZone)
34
+ return instant;
35
+ try {
36
+ const parts = new Intl.DateTimeFormat('en-US', {
37
+ timeZone,
38
+ year: 'numeric',
39
+ month: '2-digit',
40
+ day: '2-digit',
41
+ hour: '2-digit',
42
+ minute: '2-digit',
43
+ second: '2-digit',
44
+ hourCycle: 'h23',
45
+ }).formatToParts(instant);
46
+ const value = (type) => Number(parts.find((p) => p.type === type)?.value);
47
+ const year = value('year');
48
+ const month = value('month');
49
+ const day = value('day');
50
+ const hour = value('hour');
51
+ const minute = value('minute');
52
+ const second = value('second');
53
+ if (!year || !month || !day || Number.isNaN(hour) || Number.isNaN(minute))
54
+ return instant;
55
+ return new Date(year, month - 1, day, hour, minute, Number.isNaN(second) ? 0 : second, 0);
56
+ }
57
+ catch {
58
+ return instant;
59
+ }
60
+ }
61
+ export function DateTimePicker({ value, onChange, mode = 'datetime', step = 15, minDate, placeholder, locale, format, parseTimeZone, align = 'start', disabled, className, size = 'sm', 'aria-label': ariaLabel, labels: labelsProp, }) {
62
+ const labels = { ...DEFAULT_LABELS, ...labelsProp };
63
+ const resolvedLocale = locale ?? 'en';
64
+ const listboxId = useId();
65
+ const [open, setOpen] = useState(false);
66
+ const [typed, setTyped] = useState(null);
67
+ const carrier = () => value ?? civilDateForTimeZone(new Date(), parseTimeZone);
68
+ const preview = useMemo(() => {
69
+ if (!typed)
70
+ return null;
71
+ if (mode === 'time') {
72
+ const parsed = parseLooseTime(typed);
73
+ if (!parsed)
74
+ return null;
75
+ return compose(carrier(), parsed.hour * 60 + parsed.minute);
76
+ }
77
+ return parseLooseDateTime(typed, civilDateForTimeZone(new Date(), parseTimeZone));
78
+ // eslint-disable-next-line react-hooks/exhaustive-deps
79
+ }, [typed, mode, value, parseTimeZone]);
80
+ const fmt = useMemo(() => {
81
+ const boundFormat = resolveDateTimeFormat(format, resolvedLocale);
82
+ const options = mode === 'time'
83
+ ? { hour: 'numeric', minute: '2-digit' }
84
+ : {
85
+ weekday: 'short',
86
+ month: 'short',
87
+ day: 'numeric',
88
+ hour: 'numeric',
89
+ minute: '2-digit',
90
+ };
91
+ return (d) => boundFormat(d, options);
92
+ }, [format, resolvedLocale, mode]);
93
+ const display = value ? fmt(value) : '';
94
+ const previewLabel = preview ? fmt(preview) : null;
95
+ const gridValue = preview ? ymd(preview) : value ? ymd(value) : null;
96
+ const columnMinutes = preview ? minutesOf(preview) : value ? minutesOf(value) : null;
97
+ const slots = useMemo(() => buildTimeSlots(step, 0, 24 * 60 - 1), [step]);
98
+ const { active, setActive, move } = useTimeNavigation({
99
+ slots,
100
+ selectedMinutes: value ? minutesOf(value) : null,
101
+ });
102
+ const optionId = (minutes) => `${listboxId}-opt-${minutes}`;
103
+ const commit = (next) => {
104
+ setTyped(null);
105
+ setActive(null);
106
+ onChange(next);
107
+ };
108
+ const pickDay = (day) => {
109
+ if (!day) {
110
+ commit(null);
111
+ return;
112
+ }
113
+ const d = fromYmd(day);
114
+ if (!d)
115
+ return;
116
+ commit(compose(d, columnMinutes ?? 9 * 60));
117
+ };
118
+ const pickTime = (minutes) => {
119
+ commit(compose(value ?? carrier(), minutes));
120
+ if (mode === 'time')
121
+ setOpen(false);
122
+ };
123
+ const handleKeyDown = (e) => {
124
+ if (e.key === 'ArrowDown' || (e.ctrlKey && (e.key === 'n' || e.key === 'N'))) {
125
+ e.preventDefault();
126
+ setTyped(null);
127
+ move(1);
128
+ }
129
+ else if (e.key === 'ArrowUp' || (e.ctrlKey && (e.key === 'p' || e.key === 'P'))) {
130
+ e.preventDefault();
131
+ setTyped(null);
132
+ move(-1);
133
+ }
134
+ else if (e.key === 'Enter') {
135
+ e.preventDefault();
136
+ if (preview) {
137
+ commit(preview);
138
+ setOpen(false);
139
+ }
140
+ else if (active !== null) {
141
+ pickTime(active);
142
+ setOpen(false);
143
+ }
144
+ }
145
+ };
146
+ return (_jsxs(PickerField, { open: open, onOpenChange: (next) => {
147
+ setOpen(next);
148
+ if (!next) {
149
+ setTyped(null);
150
+ setActive(null);
151
+ }
152
+ }, display: display, typed: typed, onTypedChange: setTyped, onInputKeyDown: handleKeyDown, placeholder: placeholder ?? labels.placeholder, parseState: typed ? (preview ? 'ok' : 'unparseable') : 'empty', icon: mode === 'time' ? (_jsx(Clock, { className: "size-3.5", strokeWidth: 1.8 })) : (_jsx(CalendarClock, { className: "size-3.5", strokeWidth: 1.8 })), disabled: disabled, size: size, align: align, "aria-label": ariaLabel, className: cn(mode === 'time' ? 'w-[116px]' : 'w-[212px]', className), listboxId: listboxId, activeDescendantId: active !== null ? optionId(active) : undefined, children: [previewLabel ? (_jsx("p", { className: "text-muted-foreground border-border/60 border-b px-3 py-1.5 text-[11px] tabular-nums", children: labels.preview(previewLabel) })) : null, _jsxs("div", { className: "flex items-stretch", children: [mode !== 'time' && (_jsxs(_Fragment, { children: [_jsx("div", { className: "p-2.5", children: _jsx(Calendar, { value: gridValue, locale: resolvedLocale, format: format, typeable: false, minDate: minDate, onSelect: pickDay, className: "w-[244px]" }, gridValue ? gridValue.slice(0, 7) : 'none') }), _jsx("div", { className: "bg-border/60 w-px self-stretch" })] })), _jsx(TimeColumn, { id: listboxId, optionId: optionId, slots: slots, selectedMinutes: columnMinutes, activeMinutes: active, onPick: pickTime, locale: resolvedLocale, format: format, "aria-label": labels.timeAria })] })] }));
153
+ }
@@ -0,0 +1,2 @@
1
+ export declare function collapseMiddleItems<T>(items: readonly T[], collapsedItem: T, tailItems?: number): T[];
2
+ export declare function collapsedMiddleItems<T>(items: readonly T[], tailItems?: number): T[];
@@ -0,0 +1,18 @@
1
+ // Folding one segment away buys no room — the ellipsis is as wide as the name it hides.
2
+ const MIN_COLLAPSED_ITEMS = 2;
3
+ function collapsedRange(count, tailItems) {
4
+ const start = 1;
5
+ const end = count - Math.max(0, tailItems);
6
+ return end - start < MIN_COLLAPSED_ITEMS ? null : { start, end };
7
+ }
8
+ export function collapseMiddleItems(items, collapsedItem, tailItems = 2) {
9
+ const range = collapsedRange(items.length, tailItems);
10
+ const root = items[0];
11
+ if (!range || root === undefined)
12
+ return [...items];
13
+ return [root, collapsedItem, ...items.slice(range.end)];
14
+ }
15
+ export function collapsedMiddleItems(items, tailItems = 2) {
16
+ const range = collapsedRange(items.length, tailItems);
17
+ return range ? items.slice(range.start, range.end) : [];
18
+ }
@@ -0,0 +1,28 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface DetailNavBarLabels {
3
+ breadcrumb: string;
4
+ back?: string;
5
+ previous: string;
6
+ next: string;
7
+ }
8
+ export interface DetailNavBarCrumb {
9
+ label: ReactNode;
10
+ icon?: ReactNode;
11
+ }
12
+ export interface DetailNavBarProps {
13
+ labels: DetailNavBarLabels;
14
+ origin?: DetailNavBarCrumb & {
15
+ onSelect?: () => void;
16
+ };
17
+ current: DetailNavBarCrumb;
18
+ position?: ReactNode;
19
+ onPrevious?: () => void;
20
+ onNext?: () => void;
21
+ canGoPrevious?: boolean;
22
+ canGoNext?: boolean;
23
+ actions?: ReactNode;
24
+ chromeFont?: string;
25
+ className?: string;
26
+ dataTestId?: string;
27
+ }
28
+ export declare function DetailNavBar({ labels, origin, current, position, onPrevious, onNext, canGoPrevious, canGoNext, actions, chromeFont, className, dataTestId, }: DetailNavBarProps): import("react").JSX.Element;
@@ -0,0 +1,28 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { ChevronDown, ChevronLeft, ChevronUp } from 'lucide-react';
4
+ import { DetailBreadcrumb, DetailTopBar } from './detail-top-bar.js';
5
+ import { IconButton } from './icon-button.js';
6
+ export function DetailNavBar({ labels, origin, current, position, onPrevious, onNext, canGoPrevious = false, canGoNext = false, actions, chromeFont, className, dataTestId = 'detail-nav-bar', }) {
7
+ const items = [];
8
+ if (origin) {
9
+ const goesBack = Boolean(origin.onSelect);
10
+ items.push({
11
+ id: 'origin',
12
+ label: origin.label,
13
+ icon: goesBack ? _jsx(ChevronLeft, { className: "size-3.5 shrink-0", "aria-hidden": true }) : origin.icon,
14
+ onSelect: origin.onSelect,
15
+ ariaLabel: goesBack ? labels.back : undefined,
16
+ title: goesBack ? labels.back : undefined,
17
+ });
18
+ }
19
+ items.push({
20
+ id: 'current',
21
+ label: current.label,
22
+ icon: current.icon,
23
+ current: true,
24
+ className: 'font-normal',
25
+ });
26
+ const navigable = Boolean(onPrevious || onNext);
27
+ return (_jsx(DetailTopBar, { chromeFont: chromeFont, className: className, dataTestId: dataTestId, trail: _jsx(DetailBreadcrumb, { ariaLabel: labels.breadcrumb, items: items }), actions: _jsxs(_Fragment, { children: [actions, position ? (_jsx("span", { className: "text-muted-foreground/70 min-w-12 px-1 text-center font-mono text-[11px] tabular-nums", "data-testid": "detail-nav-position", children: position })) : null, navigable ? (_jsxs(_Fragment, { children: [_jsx(IconButton, { tooltip: labels.previous, "aria-label": labels.previous, disabled: !canGoPrevious, onClick: onPrevious, "data-testid": "detail-nav-previous", children: _jsx(ChevronUp, {}) }), _jsx(IconButton, { tooltip: labels.next, "aria-label": labels.next, disabled: !canGoNext, onClick: onNext, "data-testid": "detail-nav-next", children: _jsx(ChevronDown, {}) })] })) : null] }) }));
28
+ }