@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,23 @@
1
+ export type FlowEditorContextValue = {
2
+ readonly hoveredEdgeId: string | null;
3
+ readonly highlightedNodeId: string | null;
4
+ readonly highlightedEdgeIds: ReadonlySet<string>;
5
+ readonly invalidNodeIds: ReadonlySet<string>;
6
+ readonly remoteSelectedNodeIds: ReadonlySet<string>;
7
+ readonly requestInsert: (edgeId: string) => void;
8
+ readonly deleteNode: (id: string) => void;
9
+ readonly deleteEdge: (id: string) => void;
10
+ readonly duplicateNode: (id: string) => void;
11
+ /** Read-only run replay overlay: gates editing affordances and colors nodes/edges by run status. */
12
+ readonly replay: boolean;
13
+ /** Per-node run status (`ok` / `error` / `running` / `waiting` / `skipped`) keyed by node id. */
14
+ readonly statusByNode: Readonly<Record<string, string>>;
15
+ /** Per-node run duration (ms) keyed by node id, shown as the node's stat during replay. */
16
+ readonly durationByNode: Readonly<Record<string, number>>;
17
+ /** Per source node, the handle ids whose outgoing edge the run took (branch highlight). */
18
+ readonly takenHandlesByNode: Readonly<Record<string, readonly string[]>>;
19
+ /** Traversed edges keyed by `from->to` node-pair, for the replay path highlight. */
20
+ readonly traversedEdgeIds: ReadonlySet<string>;
21
+ };
22
+ export declare const FlowEditorContext: import("react").Context<FlowEditorContextValue | null>;
23
+ export declare function useFlowEditor(): FlowEditorContextValue | null;
@@ -0,0 +1,6 @@
1
+ 'use client';
2
+ import { createContext, useContext } from 'react';
3
+ export const FlowEditorContext = createContext(null);
4
+ export function useFlowEditor() {
5
+ return useContext(FlowEditorContext);
6
+ }
@@ -0,0 +1,60 @@
1
+ import { type Edge as RfEdge, type Node as RfNode } from 'reactflow';
2
+ export declare const GRID = 4;
3
+ export declare const NODE_W = 200;
4
+ export declare const NODE_H = 64;
5
+ export declare function snapCoord(value: number): number;
6
+ export declare function edgeId(source: string, target: string, handle?: string | null): string;
7
+ export declare function rfEdge<TEdge = unknown>(source: string, target: string, opts?: {
8
+ handle?: string | null;
9
+ data?: TEdge;
10
+ active?: boolean;
11
+ type?: string;
12
+ }): RfEdge<TEdge>;
13
+ export declare function findFreePosition<TData = unknown>(nodes: ReadonlyArray<Pick<RfNode<TData>, 'id' | 'position' | 'width' | 'height'>>, desired: {
14
+ x: number;
15
+ y: number;
16
+ }, excludeId?: string): {
17
+ x: number;
18
+ y: number;
19
+ };
20
+ export type InlineInsert<TData> = {
21
+ position: {
22
+ x: number;
23
+ y: number;
24
+ };
25
+ shiftDownstream: (node: RfNode<TData>) => RfNode<TData>;
26
+ };
27
+ export declare function inlineInsertOnEdge<TData>(source: Pick<RfNode<TData>, 'position'>, target: Pick<RfNode<TData>, 'position'>): InlineInsert<TData> | null;
28
+ export declare function restitchEdgesWithoutNode<TEdge>(edges: RfEdge<TEdge>[], id: string, buildBridge: (args: {
29
+ source: string;
30
+ target: string;
31
+ handle: string | undefined;
32
+ upstream: RfEdge<TEdge>;
33
+ }) => RfEdge<TEdge>): RfEdge<TEdge>[];
34
+ export declare function wouldCycle(edges: ReadonlyArray<Pick<RfEdge, 'source' | 'target'>>, source: string, target: string): boolean;
35
+ export declare function wouldCycleFromAdjacency(adjacency: Map<string, readonly string[]>, source: string, target: string): boolean;
36
+ export declare function layeredLayout<TData = unknown, TEdge = unknown>(nodes: RfNode<TData>[], edges: RfEdge<TEdge>[], handleOrderOf?: (sourceId: string, sourceHandle: string | null | undefined) => number | null): Map<string, {
37
+ x: number;
38
+ y: number;
39
+ }>;
40
+ export type DagHistory<TSnapshot> = {
41
+ record: (snapshot: TSnapshot, coalesceKey?: string | null) => void;
42
+ undo: (current: TSnapshot) => TSnapshot | null;
43
+ redo: (current: TSnapshot) => TSnapshot | null;
44
+ clear: () => void;
45
+ canUndo: () => boolean;
46
+ canRedo: () => boolean;
47
+ };
48
+ export declare function createDagHistory<TSnapshot>(limit?: number, now?: () => number): DagHistory<TSnapshot>;
49
+ export type ClipboardPayload<TData, TEdge> = {
50
+ kind: string;
51
+ nodes: Array<Pick<RfNode<TData>, 'id' | 'position' | 'data'>>;
52
+ edges: Array<Pick<RfEdge<TEdge>, 'id' | 'source' | 'target' | 'sourceHandle' | 'data'>>;
53
+ };
54
+ export declare function serializeClipboard<TData, TEdge>(kind: string, nodes: RfNode<TData>[], edges: RfEdge<TEdge>[], selectedIds: ReadonlySet<string>): ClipboardPayload<TData, TEdge>;
55
+ export declare function deserializeClipboard<TData, TEdge>(expectedKind: string, payload: ClipboardPayload<TData, TEdge>, opts?: {
56
+ nodeType?: string;
57
+ }): {
58
+ nodes: RfNode<TData>[];
59
+ edges: RfEdge<TEdge>[];
60
+ } | null;
@@ -0,0 +1,296 @@
1
+ import {} from 'reactflow';
2
+ export const GRID = 4;
3
+ export const NODE_W = 200;
4
+ export const NODE_H = 64;
5
+ const HISTORY_LIMIT = 50;
6
+ const HISTORY_COALESCE_MS = 1200;
7
+ export function snapCoord(value) {
8
+ return Math.round(value / GRID) * GRID;
9
+ }
10
+ export function edgeId(source, target, handle) {
11
+ return handle ? `${source}:${handle}->${target}` : `${source}->${target}`;
12
+ }
13
+ export function rfEdge(source, target, opts = {}) {
14
+ const { handle, data, type = 'atmos' } = opts;
15
+ return {
16
+ id: edgeId(source, target, handle),
17
+ source,
18
+ target,
19
+ ...(handle ? { sourceHandle: handle } : {}),
20
+ type,
21
+ ...(data !== undefined ? { data } : {}),
22
+ };
23
+ }
24
+ export function findFreePosition(nodes, desired, excludeId) {
25
+ const margin = 16;
26
+ let candidate = { x: snapCoord(desired.x), y: snapCoord(desired.y) };
27
+ for (let i = 0; i < 64; i += 1) {
28
+ const overlaps = nodes.some((node) => {
29
+ if (node.id === excludeId)
30
+ return false;
31
+ const w = node.width ?? NODE_W;
32
+ const h = node.height ?? NODE_H;
33
+ return (candidate.x < node.position.x + w + margin &&
34
+ candidate.x + NODE_W + margin > node.position.x &&
35
+ candidate.y < node.position.y + h + margin &&
36
+ candidate.y + NODE_H + margin > node.position.y);
37
+ });
38
+ if (!overlaps)
39
+ return candidate;
40
+ candidate = { x: candidate.x, y: candidate.y + NODE_H + 32 };
41
+ }
42
+ return candidate;
43
+ }
44
+ // Insert a node onto a left-to-right edge without dropping it below the line:
45
+ // the new node takes the target's column (aligned to the source/target line)
46
+ // and the target plus everything to its right slides one layer over to open the
47
+ // gap. Returns null when the edge isn't forward (target left of source), so the
48
+ // caller can fall back to free-position placement.
49
+ export function inlineInsertOnEdge(source, target) {
50
+ const threshold = target.position.x;
51
+ if (threshold <= source.position.x)
52
+ return null;
53
+ const position = {
54
+ x: threshold,
55
+ y: snapCoord((source.position.y + target.position.y) / 2),
56
+ };
57
+ const shiftDownstream = (node) => node.position.x >= threshold
58
+ ? { ...node, position: { ...node.position, x: node.position.x + LAYER_X } }
59
+ : node;
60
+ return { position, shiftDownstream };
61
+ }
62
+ export function restitchEdgesWithoutNode(edges, id, buildBridge) {
63
+ const incoming = edges.filter((e) => e.target === id);
64
+ const outgoing = edges.filter((e) => e.source === id);
65
+ const remaining = edges.filter((e) => e.source !== id && e.target !== id);
66
+ const kept = [...remaining];
67
+ for (const i of incoming) {
68
+ for (const o of outgoing) {
69
+ if (i.source === o.target)
70
+ continue;
71
+ const handle = i.sourceHandle ?? undefined;
72
+ const bridgeId = edgeId(i.source, o.target, handle);
73
+ if (kept.some((e) => e.id === bridgeId ||
74
+ (e.source === i.source &&
75
+ e.target === o.target &&
76
+ (e.sourceHandle ?? null) === (handle ?? null))))
77
+ continue;
78
+ if (wouldCycle(kept, i.source, o.target))
79
+ continue;
80
+ kept.push(buildBridge({ source: i.source, target: o.target, handle, upstream: i }));
81
+ }
82
+ }
83
+ return kept;
84
+ }
85
+ export function wouldCycle(edges, source, target) {
86
+ if (source === target)
87
+ return true;
88
+ const adjacency = new Map();
89
+ for (const e of edges) {
90
+ const list = adjacency.get(e.source) ?? [];
91
+ list.push(e.target);
92
+ adjacency.set(e.source, list);
93
+ }
94
+ return wouldCycleFromAdjacency(adjacency, source, target);
95
+ }
96
+ export function wouldCycleFromAdjacency(adjacency, source, target) {
97
+ if (source === target)
98
+ return true;
99
+ const stack = [target];
100
+ const seen = new Set();
101
+ while (stack.length) {
102
+ const current = stack.pop();
103
+ if (current === source)
104
+ return true;
105
+ if (seen.has(current))
106
+ continue;
107
+ seen.add(current);
108
+ for (const next of adjacency.get(current) ?? [])
109
+ stack.push(next);
110
+ }
111
+ return false;
112
+ }
113
+ const LAYER_X = 280;
114
+ const ROW_Y = 120;
115
+ const LAYOUT_ORIGIN = { x: 48, y: 80 };
116
+ export function layeredLayout(nodes, edges, handleOrderOf) {
117
+ const incoming = new Map();
118
+ const outgoing = new Map();
119
+ for (const n of nodes)
120
+ incoming.set(n.id, 0);
121
+ for (const e of edges) {
122
+ if (!incoming.has(e.target) || !incoming.has(e.source))
123
+ continue;
124
+ incoming.set(e.target, (incoming.get(e.target) ?? 0) + 1);
125
+ const list = outgoing.get(e.source) ?? [];
126
+ list.push(e.target);
127
+ outgoing.set(e.source, list);
128
+ }
129
+ const layer = new Map();
130
+ for (const n of nodes)
131
+ layer.set(n.id, 0);
132
+ const indegree = new Map(incoming);
133
+ const queue = nodes.filter((n) => (incoming.get(n.id) ?? 0) === 0).map((n) => n.id);
134
+ const visited = new Set();
135
+ while (queue.length) {
136
+ const id = queue.shift();
137
+ if (visited.has(id))
138
+ continue;
139
+ visited.add(id);
140
+ const here = layer.get(id) ?? 0;
141
+ for (const next of outgoing.get(id) ?? []) {
142
+ layer.set(next, Math.max(layer.get(next) ?? 0, here + 1));
143
+ indegree.set(next, (indegree.get(next) ?? 1) - 1);
144
+ if ((indegree.get(next) ?? 0) <= 0)
145
+ queue.push(next);
146
+ }
147
+ }
148
+ const byLayer = new Map();
149
+ for (const n of nodes) {
150
+ const l = layer.get(n.id) ?? 0;
151
+ const list = byLayer.get(l) ?? [];
152
+ list.push(n.id);
153
+ byLayer.set(l, list);
154
+ }
155
+ const parents = new Map();
156
+ const fallbackOrder = new Map();
157
+ for (const e of edges) {
158
+ if (!incoming.has(e.target) || !incoming.has(e.source))
159
+ continue;
160
+ let handleOrder = handleOrderOf?.(e.source, e.sourceHandle) ?? null;
161
+ if (handleOrder == null) {
162
+ handleOrder = fallbackOrder.get(e.source) ?? 0;
163
+ fallbackOrder.set(e.source, handleOrder + 1);
164
+ }
165
+ const list = parents.get(e.target) ?? [];
166
+ list.push({ id: e.source, handleOrder });
167
+ parents.set(e.target, list);
168
+ }
169
+ const inputOrder = new Map();
170
+ nodes.forEach((n, i) => inputOrder.set(n.id, i));
171
+ // Order each layer top-to-bottom so a node sits next to its parents
172
+ // (barycenter), and siblings stack in the same order as the source handles
173
+ // they leave from. Without this, targets keep their input order and edges
174
+ // weave across the gap, crossing each other and the nodes between layers.
175
+ const rank = new Map();
176
+ const result = new Map();
177
+ for (const l of [...byLayer.keys()].sort((a, b) => a - b)) {
178
+ const ranked = (byLayer.get(l) ?? []).map((id) => {
179
+ const placed = (parents.get(id) ?? []).filter((p) => rank.has(p.id));
180
+ const barycenter = placed.length
181
+ ? placed.reduce((sum, p) => sum + (rank.get(p.id) ?? 0), 0) / placed.length
182
+ : Number.POSITIVE_INFINITY;
183
+ const sibling = placed.length
184
+ ? placed.reduce((sum, p) => sum + p.handleOrder, 0) / placed.length
185
+ : 0;
186
+ return { id, barycenter, sibling, input: inputOrder.get(id) ?? 0 };
187
+ });
188
+ ranked.sort((a, b) => a.barycenter - b.barycenter || a.sibling - b.sibling || a.input - b.input);
189
+ ranked.forEach((entry, row) => {
190
+ rank.set(entry.id, row);
191
+ result.set(entry.id, { x: LAYOUT_ORIGIN.x + l * LAYER_X, y: LAYOUT_ORIGIN.y + row * ROW_Y });
192
+ });
193
+ }
194
+ return result;
195
+ }
196
+ export function createDagHistory(limit = HISTORY_LIMIT, now = Date.now) {
197
+ const past = [];
198
+ let future = [];
199
+ let lastKey = null;
200
+ let lastAt = 0;
201
+ return {
202
+ record(snapshot, coalesceKey = null) {
203
+ const ts = now();
204
+ future = [];
205
+ if (coalesceKey &&
206
+ coalesceKey === lastKey &&
207
+ ts - lastAt < HISTORY_COALESCE_MS &&
208
+ past.length > 0) {
209
+ lastAt = ts;
210
+ return;
211
+ }
212
+ const serialized = JSON.stringify(snapshot);
213
+ lastKey = coalesceKey;
214
+ lastAt = ts;
215
+ if (past[past.length - 1] === serialized)
216
+ return;
217
+ past.push(serialized);
218
+ if (past.length > limit)
219
+ past.shift();
220
+ },
221
+ undo(current) {
222
+ const prev = past.pop();
223
+ if (!prev)
224
+ return null;
225
+ future.push(JSON.stringify(current));
226
+ lastKey = null;
227
+ return JSON.parse(prev);
228
+ },
229
+ redo(current) {
230
+ const next = future.pop();
231
+ if (!next)
232
+ return null;
233
+ past.push(JSON.stringify(current));
234
+ if (past.length > limit)
235
+ past.shift();
236
+ lastKey = null;
237
+ return JSON.parse(next);
238
+ },
239
+ clear() {
240
+ past.length = 0;
241
+ future = [];
242
+ lastKey = null;
243
+ lastAt = 0;
244
+ },
245
+ canUndo: () => past.length > 0,
246
+ canRedo: () => future.length > 0,
247
+ };
248
+ }
249
+ export function serializeClipboard(kind, nodes, edges, selectedIds) {
250
+ return {
251
+ kind,
252
+ nodes: nodes
253
+ .filter((n) => selectedIds.has(n.id))
254
+ .map(({ id, position, data }) => ({ id, position, data })),
255
+ edges: edges
256
+ .filter((e) => selectedIds.has(e.source) && selectedIds.has(e.target))
257
+ .map(({ id, source, target, sourceHandle, data }) => ({
258
+ id,
259
+ source,
260
+ target,
261
+ sourceHandle,
262
+ data,
263
+ })),
264
+ };
265
+ }
266
+ let pasteSeq = 0;
267
+ export function deserializeClipboard(expectedKind, payload, opts = {}) {
268
+ if (payload.kind !== expectedKind || payload.nodes.length === 0)
269
+ return null;
270
+ const nodeType = opts.nodeType ?? 'atmos';
271
+ pasteSeq += 1;
272
+ const suffix = `${Date.now().toString(36)}-${pasteSeq.toString(36)}`;
273
+ const idMap = new Map(payload.nodes.map((n, i) => [n.id, `${n.id}-copy-${suffix}-${i}`]));
274
+ const nodes = payload.nodes.map((n) => ({
275
+ id: idMap.get(n.id),
276
+ type: nodeType,
277
+ position: { x: n.position.x + 32, y: n.position.y + 32 },
278
+ selected: true,
279
+ data: n.data,
280
+ }));
281
+ const edges = payload.edges.reduce((acc, e) => {
282
+ const source = idMap.get(e.source);
283
+ const target = idMap.get(e.target);
284
+ if (!source || !target)
285
+ return acc;
286
+ acc.push({
287
+ ...rfEdge(source, target, {
288
+ ...(e.sourceHandle ? { handle: e.sourceHandle } : {}),
289
+ ...(e.data !== undefined ? { data: e.data } : {}),
290
+ type: nodeType,
291
+ }),
292
+ });
293
+ return acc;
294
+ }, []);
295
+ return { nodes, edges };
296
+ }
@@ -0,0 +1,4 @@
1
+ import type { StickyNote } from './sticky-notes.js';
2
+ export declare function MiniMapStickyOverlay({ annotations }: {
3
+ annotations: StickyNote[];
4
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,45 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useStore, getNodesBounds, getBoundsOfRects } from 'reactflow';
4
+ const ELEMENT_WIDTH = 200;
5
+ const ELEMENT_HEIGHT = 150;
6
+ const OFFSET_SCALE = 5;
7
+ const NOTE_WIDTH = 208;
8
+ const NOTE_HEIGHT = 120;
9
+ const NOTE_FILL = {
10
+ yellow: 'color-mix(in srgb, var(--color-amber-300) 28%, transparent)',
11
+ blue: 'color-mix(in srgb, var(--color-sky-300) 28%, transparent)',
12
+ green: 'color-mix(in srgb, var(--color-emerald-300) 28%, transparent)',
13
+ rose: 'color-mix(in srgb, var(--color-rose-300) 28%, transparent)',
14
+ };
15
+ const NOTE_STROKE = {
16
+ yellow: 'color-mix(in srgb, var(--color-amber-400) 45%, transparent)',
17
+ blue: 'color-mix(in srgb, var(--color-sky-400) 45%, transparent)',
18
+ green: 'color-mix(in srgb, var(--color-emerald-400) 45%, transparent)',
19
+ rose: 'color-mix(in srgb, var(--color-rose-400) 45%, transparent)',
20
+ };
21
+ const viewBoxSelector = (s) => {
22
+ const nodes = s.getNodes();
23
+ const viewBB = {
24
+ x: -s.transform[0] / s.transform[2],
25
+ y: -s.transform[1] / s.transform[2],
26
+ width: s.width / s.transform[2],
27
+ height: s.height / s.transform[2],
28
+ };
29
+ return nodes.length > 0 ? getBoundsOfRects(getNodesBounds(nodes, s.nodeOrigin), viewBB) : viewBB;
30
+ };
31
+ export function MiniMapStickyOverlay({ annotations }) {
32
+ const bounds = useStore(viewBoxSelector);
33
+ if (annotations.length === 0)
34
+ return null;
35
+ const viewScale = Math.max(bounds.width / ELEMENT_WIDTH, bounds.height / ELEMENT_HEIGHT);
36
+ const offset = OFFSET_SCALE * viewScale;
37
+ const x = bounds.x - (viewScale * ELEMENT_WIDTH - bounds.width) / 2 - offset;
38
+ const y = bounds.y - (viewScale * ELEMENT_HEIGHT - bounds.height) / 2 - offset;
39
+ const width = viewScale * ELEMENT_WIDTH + offset * 2;
40
+ const height = viewScale * ELEMENT_HEIGHT + offset * 2;
41
+ return (_jsx("svg", { width: ELEMENT_WIDTH, height: ELEMENT_HEIGHT, viewBox: `${x} ${y} ${width} ${height}`, className: "pointer-events-none", "aria-hidden": true, children: annotations.map((note) => {
42
+ const color = note.color ?? 'yellow';
43
+ return (_jsx("rect", { x: note.x, y: note.y, width: NOTE_WIDTH, height: NOTE_HEIGHT, rx: 6, fill: NOTE_FILL[color], stroke: NOTE_STROKE[color], strokeWidth: viewScale }, note.id));
44
+ }) }));
45
+ }
@@ -0,0 +1,46 @@
1
+ import { type ReactNode } from 'react';
2
+ export type FlowNodeSourceHandle = {
3
+ id: string;
4
+ top?: string | number;
5
+ label?: ReactNode;
6
+ };
7
+ export type FlowNodeTopTab = {
8
+ icon?: ReactNode;
9
+ label: ReactNode;
10
+ testId?: string;
11
+ };
12
+ export type FlowNodeCardProps = {
13
+ selected?: boolean;
14
+ highlighted?: boolean;
15
+ remoteSelected?: boolean;
16
+ running?: boolean;
17
+ completed?: boolean;
18
+ /** Amber outline for a node the run is paused on, awaiting approval. */
19
+ waiting?: boolean;
20
+ /** Destructive outline for a node whose run step failed. */
21
+ failed?: boolean;
22
+ /** Faded + dashed treatment for a node the run never reached (skipped branch). */
23
+ dimmed?: boolean;
24
+ /** Config/setup problem: destructive outline plus an alert marker on the icon. */
25
+ error?: boolean;
26
+ errorLabel?: string;
27
+ icon: ReactNode;
28
+ chipClassName?: string;
29
+ title: ReactNode;
30
+ summary?: ReactNode;
31
+ /** Small circular run-status marker pinned to the card's top-right corner. */
32
+ statusBadge?: ReactNode;
33
+ stat?: ReactNode;
34
+ topTab?: FlowNodeTopTab | null;
35
+ sourceHandles?: ReadonlyArray<FlowNodeSourceHandle>;
36
+ alwaysRowHandles?: boolean;
37
+ /** Source-handle rows to highlight as the branch the run actually took. */
38
+ takenHandleIds?: ReadonlySet<string>;
39
+ showTargetHandle?: boolean;
40
+ toolbarActions?: ReactNode;
41
+ width?: number;
42
+ height?: number;
43
+ headerClassName?: string;
44
+ testId?: string;
45
+ };
46
+ export declare function FlowNodeCard({ selected, highlighted, remoteSelected, running, completed, waiting, failed, dimmed, error, errorLabel, icon, chipClassName, title, summary, statusBadge, stat, topTab, sourceHandles, alwaysRowHandles, takenHandleIds, showTargetHandle, toolbarActions, width, height, headerClassName, testId, }: FlowNodeCardProps): import("react").JSX.Element;
@@ -0,0 +1,56 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useEffect } from 'react';
4
+ import { Handle, NodeToolbar, Position, useNodeId, useUpdateNodeInternals } from 'reactflow';
5
+ import { AlertCircle } from 'lucide-react';
6
+ import { cn } from '../../lib/cn.js';
7
+ const HANDLE_CLASS = '!bg-background !border-border hover:!border-primary hover:!bg-primary/20 !size-2.5 !z-30 transition-colors';
8
+ const COMPLETED_HANDLE_CLASS = '!border-primary';
9
+ const HEADER_H = 56;
10
+ export function FlowNodeCard({ selected = false, highlighted = false, remoteSelected = false, running = false, completed = false, waiting = false, failed = false, dimmed = false, error = false, errorLabel, icon, chipClassName, title, summary, statusBadge, stat, topTab, sourceHandles = [], alwaysRowHandles = false, takenHandleIds, showTargetHandle = true, toolbarActions, width = 200, height = 64, headerClassName, testId, }) {
11
+ const hasTab = topTab != null;
12
+ const rowMode = sourceHandles.length > 1 || (alwaysRowHandles && sourceHandles.length >= 1);
13
+ const soleHandle = sourceHandles.length === 1 ? sourceHandles[0] : null;
14
+ const active = selected || highlighted;
15
+ const handleClass = cn(HANDLE_CLASS, completed && COMPLETED_HANDLE_CLASS);
16
+ // React Flow caches handle geometry per node; reordering handles keeps the node
17
+ // size unchanged so the ResizeObserver never fires. Without this, edges keep
18
+ // pointing at the old handle positions after a reorder.
19
+ const nodeId = useNodeId();
20
+ const updateNodeInternals = useUpdateNodeInternals();
21
+ const handleSignature = sourceHandles.map((h) => h.id).join('|');
22
+ useEffect(() => {
23
+ if (nodeId)
24
+ updateNodeInternals(nodeId);
25
+ }, [nodeId, handleSignature, updateNodeInternals]);
26
+ return (_jsxs("div", { "data-testid": testId, style: rowMode ? { width, minHeight: height } : { width, height }, className: cn('bg-background group relative isolate rounded-lg border border-transparent shadow-[0_1px_2px_rgba(15,23,42,0.06)] transition-opacity select-none', 'before:pointer-events-none before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:transition-colors',
27
+ // The visible border is an ::after overlay above the trigger tab (z-10),
28
+ // so it stays unbroken where the tab meets the card.
29
+ 'after:pointer-events-none after:absolute after:-inset-px after:z-20 after:rounded-[inherit] after:border after:transition-colors', hasTab && 'rounded-tl-none', dimmed && 'opacity-45 after:border-dashed', error
30
+ ? cn('after:border-destructive/70 before:bg-destructive/[0.05] ring-destructive/30', active ? 'ring-2' : 'ring-1')
31
+ : highlighted
32
+ ? 'after:border-primary/70 before:bg-primary/[0.055] ring-primary/25 ring-2'
33
+ : selected
34
+ ? cn('before:bg-primary/[0.04] ring-primary/20 ring-2', completed ? 'after:border-primary' : 'after:border-primary/60')
35
+ : remoteSelected
36
+ ? 'ring-2 ring-sky-400/25 before:bg-sky-400/[0.055] after:border-sky-400/70'
37
+ : waiting
38
+ ? 'after:border-amber-500/70 before:bg-amber-500/[0.06]'
39
+ : failed
40
+ ? 'after:border-destructive/70 before:bg-destructive/[0.05]'
41
+ : completed
42
+ ? 'after:border-primary'
43
+ : 'after:border-border/70 hover:after:border-foreground/25', (completed || waiting || failed) && 'after:border-[1.6px]', running && !error && 'after:border-primary/30'), children: [running ? _jsx("span", { "aria-hidden": true, className: "flow-node-running-ring" }) : null, toolbarActions != null ? (_jsx(NodeToolbar, { isVisible: selected, position: Position.Top, align: "end", offset: 6, children: _jsx("div", { className: "border-border/70 bg-background/95 flex items-center gap-1 rounded-md border p-0.5 shadow-sm", children: toolbarActions }) })) : null, hasTab ? (_jsxs("span", { "data-testid": topTab.testId, className: cn('absolute -top-[18px] flex h-[18px] max-w-full items-center gap-1.5 rounded-t-lg border border-b-0 px-2 font-mono text-[10px] leading-none',
44
+ // When the trigger ran, the tab joins the completed outline as one
45
+ // open silhouette: its left edge aligns with the card's -inset-px
46
+ // border, it rides above the border overlay (z-30), and its ::after
47
+ // paints over the full border band beneath it so no seam shows.
48
+ completed && !error
49
+ ? 'border-primary bg-background text-primary after:bg-background -left-px z-30 border-[1.6px] after:absolute after:inset-x-0 after:-bottom-px after:h-1'
50
+ : active
51
+ ? 'border-primary/30 bg-primary/[0.06] text-primary left-0 z-10'
52
+ : 'border-border/70 bg-muted/60 text-muted-foreground left-0 z-10'), children: [topTab.icon != null ? (_jsx("span", { "aria-hidden": true, className: "flex shrink-0 items-center", children: topTab.icon })) : (_jsx("span", { className: "size-1.5 shrink-0 rounded-full bg-current/45", "aria-hidden": true })), _jsx("span", { className: "truncate", children: topTab.label })] })) : null, statusBadge != null ? (_jsx("span", { className: "absolute -top-2 -right-2 z-30 flex", children: statusBadge })) : null, _jsxs("div", { className: cn('flex min-w-0 items-center gap-2.5 p-3', headerClassName), style: { height: rowMode ? HEADER_H : height }, children: [_jsxs("span", { className: "relative flex shrink-0", children: [_jsx("span", { "aria-hidden": true, className: cn('flex size-8 items-center justify-center rounded-md', chipClassName), children: icon }), error ? (_jsx("span", { role: "img", "aria-label": errorLabel, className: "bg-background absolute -top-1 -right-1 flex size-3.5 items-center justify-center rounded-full", children: _jsx(AlertCircle, { className: "text-destructive size-3.5", strokeWidth: 2, fill: "var(--background)" }) })) : null] }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "flex min-w-0 items-center gap-1.5", children: _jsx("span", { className: "text-foreground/95 truncate text-[12.5px] leading-4 font-medium", children: title }) }), _jsxs("div", { className: "mt-0.5 flex min-w-0 items-center gap-1.5", children: [summary != null ? summary : null, stat ? (_jsx("span", { className: "text-muted-foreground/80 ml-auto shrink-0 font-mono text-[10px] tabular-nums", children: stat })) : null] })] })] }), rowMode ? (_jsx("div", { className: "border-border/55 border-t", children: sourceHandles.map((h) => {
53
+ const taken = takenHandleIds?.has(h.id) ?? false;
54
+ return (_jsxs("div", { className: cn('border-border/40 relative flex h-[22px] items-center justify-end gap-1.5 border-b px-2 text-[10px] last:border-b-0', taken ? 'text-primary bg-primary/[0.06] font-medium' : 'text-muted-foreground'), children: [_jsx("span", { className: "truncate font-mono", children: h.label }), _jsx(Handle, { id: h.id, type: "source", position: Position.Right, className: handleClass })] }, h.id));
55
+ }) })) : null, showTargetHandle ? (_jsx(Handle, { type: "target", position: Position.Left, style: rowMode ? { top: HEADER_H / 2 } : undefined, className: handleClass })) : null, !rowMode ? (soleHandle ? (_jsx(Handle, { id: soleHandle.id, type: "source", position: Position.Right, style: { top: soleHandle.top }, className: handleClass })) : (_jsx(Handle, { type: "source", position: Position.Right, className: handleClass }))) : null] }));
56
+ }
@@ -0,0 +1,40 @@
1
+ import { type DragEvent as ReactDragEvent, type ReactNode } from 'react';
2
+ export type NodeLibraryItem = {
3
+ kind: string;
4
+ label: string;
5
+ description?: string;
6
+ icon: ReactNode;
7
+ keywords?: readonly string[];
8
+ categoryLabel?: string;
9
+ iconChipClassName?: string;
10
+ };
11
+ export type NodeLibraryGroup = {
12
+ groupLabel: string;
13
+ items: NodeLibraryItem[];
14
+ note?: string;
15
+ };
16
+ export declare function nodeSearchRank(needle: string, name: string, category: string, description: string, keywords?: readonly string[]): number | null;
17
+ export declare function NodeSearchList({ groups, onPick, isKindAvailable, emptyText, searchPlaceholder, resultsHeading, testIdPrefix, draggable, onItemDragStart, fill, }: {
18
+ groups: NodeLibraryGroup[];
19
+ onPick: (kind: string) => void;
20
+ isKindAvailable?: (kind: string) => boolean;
21
+ emptyText: string;
22
+ searchPlaceholder: string;
23
+ resultsHeading: string;
24
+ testIdPrefix?: string;
25
+ draggable?: boolean;
26
+ onItemDragStart?: (kind: string, event: ReactDragEvent<HTMLDivElement>) => void;
27
+ fill?: boolean;
28
+ }): import("react").JSX.Element;
29
+ export declare function NodePicker({ title, groups, onPick, onClose, isKindAvailable, emptyText, searchPlaceholder, resultsHeading, closeLabel, testIdPrefix, }: {
30
+ title: ReactNode;
31
+ groups: NodeLibraryGroup[];
32
+ onPick: (kind: string) => void;
33
+ onClose: () => void;
34
+ isKindAvailable?: (kind: string) => boolean;
35
+ emptyText: string;
36
+ searchPlaceholder: string;
37
+ resultsHeading: string;
38
+ closeLabel: string;
39
+ testIdPrefix?: string;
40
+ }): import("react").JSX.Element;
@@ -0,0 +1,54 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useMemo, useState } from 'react';
4
+ import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from '../../components/command.js';
5
+ import { cn } from '../../lib/cn.js';
6
+ export function nodeSearchRank(needle, name, category, description, keywords = []) {
7
+ const n = name.toLowerCase();
8
+ if (n.startsWith(needle))
9
+ return 0;
10
+ if (n.split(/[^a-z0-9]+/i).some((word) => word.startsWith(needle)))
11
+ return 1;
12
+ if (n.includes(needle))
13
+ return 2;
14
+ if (keywords.some((keyword) => keyword.toLowerCase().startsWith(needle)))
15
+ return 3;
16
+ if (keywords.some((keyword) => keyword.toLowerCase().includes(needle)))
17
+ return 4;
18
+ if (category.toLowerCase().includes(needle))
19
+ return 5;
20
+ if (description.toLowerCase().includes(needle))
21
+ return 6;
22
+ return null;
23
+ }
24
+ export function NodeSearchList({ groups, onPick, isKindAvailable, emptyText, searchPlaceholder, resultsHeading, testIdPrefix = 'flow-pick', draggable = false, onItemDragStart, fill = false, }) {
25
+ const [query, setQuery] = useState('');
26
+ const needle = query.trim().toLowerCase();
27
+ const ranked = useMemo(() => {
28
+ if (!needle)
29
+ return null;
30
+ const matches = [];
31
+ for (const group of groups) {
32
+ for (const item of group.items) {
33
+ const rank = nodeSearchRank(needle, item.label, item.categoryLabel ?? group.groupLabel, item.description ?? '', item.keywords ?? []);
34
+ if (rank !== null)
35
+ matches.push({ item, rank });
36
+ }
37
+ }
38
+ return matches.sort((a, b) => a.rank - b.rank || a.item.label.localeCompare(b.item.label));
39
+ }, [groups, needle]);
40
+ const renderItem = (item, showCategory) => {
41
+ const disabled = isKindAvailable ? !isKindAvailable(item.kind) : false;
42
+ const canDrag = draggable && !disabled;
43
+ return (_jsxs(CommandItem, { value: `${item.label} ${item.description ?? ''} ${item.categoryLabel ?? ''} ${(item.keywords ?? []).join(' ')}`, disabled: disabled, onSelect: () => {
44
+ if (!disabled)
45
+ onPick(item.kind);
46
+ }, "data-testid": `${testIdPrefix}-${item.kind}`, draggable: canDrag, onDragStart: canDrag ? (event) => onItemDragStart?.(item.kind, event) : undefined, className: cn(disabled && 'cursor-not-allowed opacity-45', canDrag && 'cursor-grab active:cursor-grabbing'), children: [_jsx("span", { className: cn('inline-flex size-6 shrink-0 items-center justify-center rounded-md', item.iconChipClassName ?? 'bg-muted/55 text-muted-foreground'), children: item.icon }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsxs("span", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-foreground block truncate text-[12.5px]", children: item.label }), showCategory && item.categoryLabel ? (_jsx("span", { className: "text-muted-foreground/80 ml-auto shrink-0 text-[10.5px]", children: item.categoryLabel })) : null] }), item.description ? (_jsx("span", { className: "text-muted-foreground block truncate text-[11px]", children: item.description })) : null] })] }, item.kind));
47
+ };
48
+ return (_jsxs(Command, { shouldFilter: false, className: cn(fill && 'flex h-full min-h-0 flex-col'), children: [_jsx(CommandInput, { placeholder: searchPlaceholder, className: "h-10", value: query, onValueChange: setQuery }), _jsxs("div", { className: cn('relative', fill && 'min-h-0 flex-1'), children: [_jsxs(CommandList, { className: cn('overscroll-contain pb-4', fill ? 'h-full max-h-none min-h-0 flex-1' : 'max-h-[min(56vh,420px)]'), children: [_jsx(CommandEmpty, { children: emptyText }), ranked
49
+ ? ranked.length > 0 && (_jsx(CommandGroup, { heading: resultsHeading, children: ranked.map((match) => renderItem(match.item, true)) }))
50
+ : groups.map((group) => (_jsxs(CommandGroup, { heading: group.groupLabel, children: [group.note ? (_jsx("p", { className: "text-muted-foreground px-2 pb-1.5 text-[11px] leading-snug", children: group.note })) : null, group.items.map((item) => renderItem(item, false))] }, group.groupLabel)))] }), _jsx("div", { "aria-hidden": true, className: "from-background pointer-events-none absolute inset-x-0 bottom-0 h-6 bg-gradient-to-t to-transparent" })] })] }));
51
+ }
52
+ export function NodePicker({ title, groups, onPick, onClose, isKindAvailable, emptyText, searchPlaceholder, resultsHeading, closeLabel, testIdPrefix, }) {
53
+ return (_jsxs("div", { className: "absolute inset-0 z-20 flex items-start justify-center pt-16", role: "dialog", "aria-modal": "true", children: [_jsx("button", { type: "button", "aria-label": closeLabel, onClick: onClose, className: "bg-background/30 absolute inset-0 cursor-default backdrop-blur-[1px]" }), _jsxs("div", { className: "border-border/70 bg-background relative max-h-[70%] w-[min(420px,calc(100%-24px))] overflow-hidden rounded-lg border shadow-lg", children: [_jsx("div", { className: "border-border/60 bg-background sticky top-0 border-b px-3 py-2 text-[12.5px] font-medium", children: title }), _jsx(NodeSearchList, { groups: groups, onPick: onPick, isKindAvailable: isKindAvailable, emptyText: emptyText, searchPlaceholder: searchPlaceholder, resultsHeading: resultsHeading, ...(testIdPrefix ? { testIdPrefix } : {}) })] })] }));
54
+ }