@dxos/plugin-automation 0.7.5-labs.c0e040f → 0.7.5-labs.d199c0f

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 (320) hide show
  1. package/dist/lib/browser/AutomationPanel-ITYXSN5Z.mjs +132 -0
  2. package/dist/lib/browser/AutomationPanel-ITYXSN5Z.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-R4JH4TLE.mjs → chunk-OFDNNRLE.mjs} +3 -8
  4. package/dist/lib/browser/chunk-OFDNNRLE.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-U7QLNY2S.mjs +8 -0
  6. package/dist/lib/browser/chunk-U7QLNY2S.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-WY2C7JY4.mjs +119 -0
  8. package/dist/lib/browser/chunk-WY2C7JY4.mjs.map +7 -0
  9. package/dist/lib/browser/complementary-panel-4CPOJL4Y.mjs +56 -0
  10. package/dist/lib/browser/complementary-panel-4CPOJL4Y.mjs.map +7 -0
  11. package/dist/lib/browser/index.mjs +21 -377
  12. package/dist/lib/browser/index.mjs.map +4 -4
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/react-surface-SAPMN4PF.mjs +27 -0
  15. package/dist/lib/browser/react-surface-SAPMN4PF.mjs.map +7 -0
  16. package/dist/lib/node/{chunk-QXIHYOMF.cjs → AutomationPanel-X33HHDMQ.cjs} +19 -132
  17. package/dist/lib/node/AutomationPanel-X33HHDMQ.cjs.map +7 -0
  18. package/dist/lib/node/chunk-7Q5SNGCL.cjs +148 -0
  19. package/dist/lib/node/chunk-7Q5SNGCL.cjs.map +7 -0
  20. package/dist/lib/node/chunk-CB5OB6JH.cjs +40 -0
  21. package/dist/lib/node/chunk-CB5OB6JH.cjs.map +7 -0
  22. package/dist/lib/node/{chunk-EQYHOTGG.cjs → chunk-ORMEYEBE.cjs} +6 -12
  23. package/dist/lib/node/chunk-ORMEYEBE.cjs.map +7 -0
  24. package/dist/lib/node/complementary-panel-ZYJJ42ZU.cjs +72 -0
  25. package/dist/lib/node/complementary-panel-ZYJJ42ZU.cjs.map +7 -0
  26. package/dist/lib/node/index.cjs +36 -378
  27. package/dist/lib/node/index.cjs.map +4 -4
  28. package/dist/lib/node/meta.json +1 -1
  29. package/dist/lib/node/{react-surface-JT6SVCPK.cjs → react-surface-2WRVAPGR.cjs} +9 -34
  30. package/dist/lib/node/react-surface-2WRVAPGR.cjs.map +7 -0
  31. package/dist/lib/node-esm/AutomationPanel-HY3GB4BT.mjs +133 -0
  32. package/dist/lib/node-esm/AutomationPanel-HY3GB4BT.mjs.map +7 -0
  33. package/dist/lib/node-esm/{chunk-EMVA6QUT.mjs → chunk-6MUUH67V.mjs} +3 -8
  34. package/dist/lib/node-esm/chunk-6MUUH67V.mjs.map +7 -0
  35. package/dist/lib/node-esm/chunk-R3P2WPBQ.mjs +10 -0
  36. package/dist/lib/node-esm/chunk-R3P2WPBQ.mjs.map +7 -0
  37. package/dist/lib/node-esm/chunk-UDD2VA6G.mjs +120 -0
  38. package/dist/lib/node-esm/chunk-UDD2VA6G.mjs.map +7 -0
  39. package/dist/lib/node-esm/complementary-panel-S42RIIAY.mjs +57 -0
  40. package/dist/lib/node-esm/complementary-panel-S42RIIAY.mjs.map +7 -0
  41. package/dist/lib/node-esm/index.mjs +21 -377
  42. package/dist/lib/node-esm/index.mjs.map +4 -4
  43. package/dist/lib/node-esm/meta.json +1 -1
  44. package/dist/lib/node-esm/react-surface-QWLPOYXO.mjs +28 -0
  45. package/dist/lib/node-esm/react-surface-QWLPOYXO.mjs.map +7 -0
  46. package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
  47. package/dist/types/src/capabilities/{ai-client.d.ts → complementary-panel.d.ts} +2 -3
  48. package/dist/types/src/capabilities/complementary-panel.d.ts.map +1 -0
  49. package/dist/types/src/capabilities/index.d.ts +1 -180
  50. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  51. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  52. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +1 -2
  53. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  54. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
  55. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -2
  56. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  57. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
  58. package/dist/types/src/components/index.d.ts +1 -12
  59. package/dist/types/src/components/index.d.ts.map +1 -1
  60. package/dist/types/src/index.d.ts +1 -3
  61. package/dist/types/src/index.d.ts.map +1 -1
  62. package/dist/types/src/meta.d.ts +0 -2
  63. package/dist/types/src/meta.d.ts.map +1 -1
  64. package/dist/types/src/testing/index.d.ts +0 -1
  65. package/dist/types/src/testing/index.d.ts.map +1 -1
  66. package/dist/types/src/testing/test-functions.d.ts +0 -2
  67. package/dist/types/src/testing/test-functions.d.ts.map +1 -1
  68. package/dist/types/src/translations.d.ts +1 -94
  69. package/dist/types/src/translations.d.ts.map +1 -1
  70. package/package.json +23 -74
  71. package/src/AutomationPlugin.tsx +9 -64
  72. package/src/capabilities/complementary-panel.ts +56 -0
  73. package/src/capabilities/index.ts +1 -5
  74. package/src/capabilities/react-surface.tsx +3 -23
  75. package/src/components/AutomationPanel/AutomationPanel.stories.tsx +1 -2
  76. package/src/components/AutomationPanel/AutomationPanel.tsx +56 -49
  77. package/src/components/TriggerEditor/TriggerEditor.stories.tsx +1 -2
  78. package/src/components/index.ts +0 -8
  79. package/src/index.ts +2 -3
  80. package/src/meta.ts +1 -4
  81. package/src/testing/index.ts +0 -1
  82. package/src/testing/test-functions.ts +0 -7
  83. package/src/translations.ts +1 -29
  84. package/dist/lib/browser/AutomationPanel-VW2XIUPU.mjs +0 -8
  85. package/dist/lib/browser/AutomationPanel-VW2XIUPU.mjs.map +0 -7
  86. package/dist/lib/browser/ChatContainer-OLRZNGWK.mjs +0 -12
  87. package/dist/lib/browser/ChatContainer-OLRZNGWK.mjs.map +0 -7
  88. package/dist/lib/browser/ai-client-5CNY6JBF.mjs +0 -22
  89. package/dist/lib/browser/ai-client-5CNY6JBF.mjs.map +0 -7
  90. package/dist/lib/browser/app-graph-builder-6H7MDCXE.mjs +0 -197
  91. package/dist/lib/browser/app-graph-builder-6H7MDCXE.mjs.map +0 -7
  92. package/dist/lib/browser/chunk-2H2EUYXL.mjs +0 -15
  93. package/dist/lib/browser/chunk-2H2EUYXL.mjs.map +0 -7
  94. package/dist/lib/browser/chunk-ITG6CBKL.mjs +0 -1602
  95. package/dist/lib/browser/chunk-ITG6CBKL.mjs.map +0 -7
  96. package/dist/lib/browser/chunk-MRBC5J4T.mjs +0 -518
  97. package/dist/lib/browser/chunk-MRBC5J4T.mjs.map +0 -7
  98. package/dist/lib/browser/chunk-NQFZ6XRX.mjs +0 -243
  99. package/dist/lib/browser/chunk-NQFZ6XRX.mjs.map +0 -7
  100. package/dist/lib/browser/chunk-Q4IMHYGH.mjs +0 -150
  101. package/dist/lib/browser/chunk-Q4IMHYGH.mjs.map +0 -7
  102. package/dist/lib/browser/chunk-R4JH4TLE.mjs.map +0 -7
  103. package/dist/lib/browser/intent-resolver-BWAXKT27.mjs +0 -29
  104. package/dist/lib/browser/intent-resolver-BWAXKT27.mjs.map +0 -7
  105. package/dist/lib/browser/react-surface-O6SHIBCA.mjs +0 -58
  106. package/dist/lib/browser/react-surface-O6SHIBCA.mjs.map +0 -7
  107. package/dist/lib/browser/types/index.mjs +0 -24
  108. package/dist/lib/browser/types/index.mjs.map +0 -7
  109. package/dist/lib/node/AutomationPanel-G6EDDYWW.cjs +0 -26
  110. package/dist/lib/node/AutomationPanel-G6EDDYWW.cjs.map +0 -7
  111. package/dist/lib/node/ChatContainer-GRZDJIG5.cjs +0 -33
  112. package/dist/lib/node/ChatContainer-GRZDJIG5.cjs.map +0 -7
  113. package/dist/lib/node/ai-client-FKLPDELV.cjs +0 -38
  114. package/dist/lib/node/ai-client-FKLPDELV.cjs.map +0 -7
  115. package/dist/lib/node/app-graph-builder-7JMJLZIE.cjs +0 -212
  116. package/dist/lib/node/app-graph-builder-7JMJLZIE.cjs.map +0 -7
  117. package/dist/lib/node/chunk-CFBERLTN.cjs +0 -1586
  118. package/dist/lib/node/chunk-CFBERLTN.cjs.map +0 -7
  119. package/dist/lib/node/chunk-EQYHOTGG.cjs.map +0 -7
  120. package/dist/lib/node/chunk-FQUY77HT.cjs +0 -527
  121. package/dist/lib/node/chunk-FQUY77HT.cjs.map +0 -7
  122. package/dist/lib/node/chunk-GB7245FH.cjs +0 -173
  123. package/dist/lib/node/chunk-GB7245FH.cjs.map +0 -7
  124. package/dist/lib/node/chunk-QXIHYOMF.cjs.map +0 -7
  125. package/dist/lib/node/chunk-U5Z7LFWB.cjs +0 -34
  126. package/dist/lib/node/chunk-U5Z7LFWB.cjs.map +0 -7
  127. package/dist/lib/node/intent-resolver-C6OKFVEW.cjs +0 -44
  128. package/dist/lib/node/intent-resolver-C6OKFVEW.cjs.map +0 -7
  129. package/dist/lib/node/react-surface-JT6SVCPK.cjs.map +0 -7
  130. package/dist/lib/node/types/index.cjs +0 -46
  131. package/dist/lib/node/types/index.cjs.map +0 -7
  132. package/dist/lib/node-esm/AutomationPanel-V3IWQAMO.mjs +0 -9
  133. package/dist/lib/node-esm/AutomationPanel-V3IWQAMO.mjs.map +0 -7
  134. package/dist/lib/node-esm/ChatContainer-ORVWQPJO.mjs +0 -13
  135. package/dist/lib/node-esm/ChatContainer-ORVWQPJO.mjs.map +0 -7
  136. package/dist/lib/node-esm/ai-client-XGNA6SJ5.mjs +0 -23
  137. package/dist/lib/node-esm/ai-client-XGNA6SJ5.mjs.map +0 -7
  138. package/dist/lib/node-esm/app-graph-builder-C6NUQGCU.mjs +0 -198
  139. package/dist/lib/node-esm/app-graph-builder-C6NUQGCU.mjs.map +0 -7
  140. package/dist/lib/node-esm/chunk-2OKJZ4ZW.mjs +0 -519
  141. package/dist/lib/node-esm/chunk-2OKJZ4ZW.mjs.map +0 -7
  142. package/dist/lib/node-esm/chunk-6HLBYDUI.mjs +0 -244
  143. package/dist/lib/node-esm/chunk-6HLBYDUI.mjs.map +0 -7
  144. package/dist/lib/node-esm/chunk-7VPT3OO3.mjs +0 -1603
  145. package/dist/lib/node-esm/chunk-7VPT3OO3.mjs.map +0 -7
  146. package/dist/lib/node-esm/chunk-DNCXRGAF.mjs +0 -151
  147. package/dist/lib/node-esm/chunk-DNCXRGAF.mjs.map +0 -7
  148. package/dist/lib/node-esm/chunk-EMVA6QUT.mjs.map +0 -7
  149. package/dist/lib/node-esm/chunk-IJRTDSKN.mjs +0 -16
  150. package/dist/lib/node-esm/chunk-IJRTDSKN.mjs.map +0 -7
  151. package/dist/lib/node-esm/intent-resolver-DCP4ZDBA.mjs +0 -30
  152. package/dist/lib/node-esm/intent-resolver-DCP4ZDBA.mjs.map +0 -7
  153. package/dist/lib/node-esm/react-surface-DSVM33SA.mjs +0 -59
  154. package/dist/lib/node-esm/react-surface-DSVM33SA.mjs.map +0 -7
  155. package/dist/lib/node-esm/types/index.mjs +0 -25
  156. package/dist/lib/node-esm/types/index.mjs.map +0 -7
  157. package/dist/types/src/artifacts.stories.d.ts +0 -16
  158. package/dist/types/src/artifacts.stories.d.ts.map +0 -1
  159. package/dist/types/src/capabilities/ai-client.d.ts.map +0 -1
  160. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -181
  161. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  162. package/dist/types/src/capabilities/capabilities.d.ts +0 -5
  163. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  164. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  165. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  166. package/dist/types/src/components/AmbientChatDialog/AmbientChatDialog.d.ts +0 -3
  167. package/dist/types/src/components/AmbientChatDialog/AmbientChatDialog.d.ts.map +0 -1
  168. package/dist/types/src/components/AmbientChatDialog/AmbientChatDialog.stories.d.ts +0 -8
  169. package/dist/types/src/components/AmbientChatDialog/AmbientChatDialog.stories.d.ts.map +0 -1
  170. package/dist/types/src/components/AmbientChatDialog/index.d.ts +0 -2
  171. package/dist/types/src/components/AmbientChatDialog/index.d.ts.map +0 -1
  172. package/dist/types/src/components/Box/StatusLine.d.ts +0 -11
  173. package/dist/types/src/components/Box/StatusLine.d.ts.map +0 -1
  174. package/dist/types/src/components/Box/StatusLine.stories.d.ts +0 -9
  175. package/dist/types/src/components/Box/StatusLine.stories.d.ts.map +0 -1
  176. package/dist/types/src/components/Box/Tabbed.d.ts +0 -15
  177. package/dist/types/src/components/Box/Tabbed.d.ts.map +0 -1
  178. package/dist/types/src/components/Box/Tabbed.stories.d.ts +0 -8
  179. package/dist/types/src/components/Box/Tabbed.stories.d.ts.map +0 -1
  180. package/dist/types/src/components/Box/ToggleContainer.d.ts +0 -13
  181. package/dist/types/src/components/Box/ToggleContainer.d.ts.map +0 -1
  182. package/dist/types/src/components/Box/ToggleContainer.stories.d.ts +0 -9
  183. package/dist/types/src/components/Box/ToggleContainer.stories.d.ts.map +0 -1
  184. package/dist/types/src/components/Box/index.d.ts +0 -4
  185. package/dist/types/src/components/Box/index.d.ts.map +0 -1
  186. package/dist/types/src/components/ChatContainer/ChatContainer.d.ts +0 -7
  187. package/dist/types/src/components/ChatContainer/ChatContainer.d.ts.map +0 -1
  188. package/dist/types/src/components/ChatContainer/index.d.ts +0 -4
  189. package/dist/types/src/components/ChatContainer/index.d.ts.map +0 -1
  190. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts +0 -14
  191. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts.map +0 -1
  192. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts +0 -8
  193. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts.map +0 -1
  194. package/dist/types/src/components/MarkdownViewer/index.d.ts +0 -2
  195. package/dist/types/src/components/MarkdownViewer/index.d.ts.map +0 -1
  196. package/dist/types/src/components/Prompt/Prompt.d.ts +0 -7
  197. package/dist/types/src/components/Prompt/Prompt.d.ts.map +0 -1
  198. package/dist/types/src/components/Prompt/Prompt.stories.d.ts +0 -8
  199. package/dist/types/src/components/Prompt/Prompt.stories.d.ts.map +0 -1
  200. package/dist/types/src/components/Prompt/index.d.ts +0 -2
  201. package/dist/types/src/components/Prompt/index.d.ts.map +0 -1
  202. package/dist/types/src/components/Prompt/prompt-autocomplete.d.ts +0 -20
  203. package/dist/types/src/components/Prompt/prompt-autocomplete.d.ts.map +0 -1
  204. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts +0 -10
  205. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts.map +0 -1
  206. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts +0 -6
  207. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts.map +0 -1
  208. package/dist/types/src/components/PromptEditor/index.d.ts +0 -2
  209. package/dist/types/src/components/PromptEditor/index.d.ts.map +0 -1
  210. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts +0 -4
  211. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts.map +0 -1
  212. package/dist/types/src/components/PromptEditor/types.d.ts +0 -18
  213. package/dist/types/src/components/PromptEditor/types.d.ts.map +0 -1
  214. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts +0 -6
  215. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts.map +0 -1
  216. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts +0 -8
  217. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts.map +0 -1
  218. package/dist/types/src/components/ServiceRegistry/index.d.ts +0 -2
  219. package/dist/types/src/components/ServiceRegistry/index.d.ts.map +0 -1
  220. package/dist/types/src/components/Thread/Thread.d.ts +0 -11
  221. package/dist/types/src/components/Thread/Thread.d.ts.map +0 -1
  222. package/dist/types/src/components/Thread/Thread.stories.d.ts +0 -11
  223. package/dist/types/src/components/Thread/Thread.stories.d.ts.map +0 -1
  224. package/dist/types/src/components/Thread/ThreadMessage.d.ts +0 -12
  225. package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +0 -1
  226. package/dist/types/src/components/Thread/index.d.ts +0 -2
  227. package/dist/types/src/components/Thread/index.d.ts.map +0 -1
  228. package/dist/types/src/hooks/email.d.ts +0 -4
  229. package/dist/types/src/hooks/email.d.ts.map +0 -1
  230. package/dist/types/src/hooks/index.d.ts +0 -6
  231. package/dist/types/src/hooks/index.d.ts.map +0 -1
  232. package/dist/types/src/hooks/invocation-handler.d.ts +0 -5
  233. package/dist/types/src/hooks/invocation-handler.d.ts.map +0 -1
  234. package/dist/types/src/hooks/processor.d.ts +0 -70
  235. package/dist/types/src/hooks/processor.d.ts.map +0 -1
  236. package/dist/types/src/hooks/processor.test.d.ts +0 -2
  237. package/dist/types/src/hooks/processor.test.d.ts.map +0 -1
  238. package/dist/types/src/hooks/useChatProcessor.d.ts +0 -7
  239. package/dist/types/src/hooks/useChatProcessor.d.ts.map +0 -1
  240. package/dist/types/src/hooks/useLocalTriggerManager.d.ts +0 -3
  241. package/dist/types/src/hooks/useLocalTriggerManager.d.ts.map +0 -1
  242. package/dist/types/src/hooks/useMessageQueue.d.ts +0 -41
  243. package/dist/types/src/hooks/useMessageQueue.d.ts.map +0 -1
  244. package/dist/types/src/hooks/useServices.d.ts +0 -7
  245. package/dist/types/src/hooks/useServices.d.ts.map +0 -1
  246. package/dist/types/src/presets.d.ts +0 -9
  247. package/dist/types/src/presets.d.ts.map +0 -1
  248. package/dist/types/src/testing/test-services.d.ts +0 -5
  249. package/dist/types/src/testing/test-services.d.ts.map +0 -1
  250. package/dist/types/src/tools/function.d.ts +0 -5
  251. package/dist/types/src/tools/function.d.ts.map +0 -1
  252. package/dist/types/src/tools/index.d.ts +0 -3
  253. package/dist/types/src/tools/index.d.ts.map +0 -1
  254. package/dist/types/src/tools/openapi.d.ts +0 -10
  255. package/dist/types/src/tools/openapi.d.ts.map +0 -1
  256. package/dist/types/src/tools/openapi.test.d.ts +0 -2
  257. package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
  258. package/dist/types/src/types/index.d.ts +0 -4
  259. package/dist/types/src/types/index.d.ts.map +0 -1
  260. package/dist/types/src/types/registry.d.ts +0 -10
  261. package/dist/types/src/types/registry.d.ts.map +0 -1
  262. package/dist/types/src/types/schema.d.ts +0 -221
  263. package/dist/types/src/types/schema.d.ts.map +0 -1
  264. package/dist/types/src/types/types.d.ts +0 -18
  265. package/dist/types/src/types/types.d.ts.map +0 -1
  266. package/src/artifacts.stories.tsx +0 -241
  267. package/src/capabilities/ai-client.ts +0 -19
  268. package/src/capabilities/app-graph-builder.ts +0 -187
  269. package/src/capabilities/capabilities.ts +0 -12
  270. package/src/capabilities/intent-resolver.ts +0 -27
  271. package/src/components/AmbientChatDialog/AmbientChatDialog.stories.tsx +0 -44
  272. package/src/components/AmbientChatDialog/AmbientChatDialog.tsx +0 -63
  273. package/src/components/AmbientChatDialog/index.ts +0 -5
  274. package/src/components/Box/StatusLine.stories.tsx +0 -52
  275. package/src/components/Box/StatusLine.tsx +0 -76
  276. package/src/components/Box/Tabbed.stories.tsx +0 -51
  277. package/src/components/Box/Tabbed.tsx +0 -89
  278. package/src/components/Box/ToggleContainer.stories.tsx +0 -110
  279. package/src/components/Box/ToggleContainer.tsx +0 -108
  280. package/src/components/Box/index.ts +0 -7
  281. package/src/components/ChatContainer/ChatContainer.tsx +0 -52
  282. package/src/components/ChatContainer/index.ts +0 -8
  283. package/src/components/MarkdownViewer/MarkdownViewer.stories.tsx +0 -56
  284. package/src/components/MarkdownViewer/MarkdownViewer.tsx +0 -79
  285. package/src/components/MarkdownViewer/index.ts +0 -5
  286. package/src/components/Prompt/Prompt.stories.tsx +0 -50
  287. package/src/components/Prompt/Prompt.tsx +0 -39
  288. package/src/components/Prompt/index.ts +0 -5
  289. package/src/components/Prompt/prompt-autocomplete.ts +0 -200
  290. package/src/components/PromptEditor/PromptEditor.stories.tsx +0 -64
  291. package/src/components/PromptEditor/PromptEditor.tsx +0 -222
  292. package/src/components/PromptEditor/index.ts +0 -5
  293. package/src/components/PromptEditor/prompt-extension.ts +0 -43
  294. package/src/components/PromptEditor/types.tsx +0 -28
  295. package/src/components/ServiceRegistry/ServiceRegistry.stories.tsx +0 -49
  296. package/src/components/ServiceRegistry/ServiceRegistry.tsx +0 -76
  297. package/src/components/ServiceRegistry/index.ts +0 -5
  298. package/src/components/Thread/Thread.stories.tsx +0 -197
  299. package/src/components/Thread/Thread.tsx +0 -156
  300. package/src/components/Thread/ThreadMessage.tsx +0 -225
  301. package/src/components/Thread/index.ts +0 -5
  302. package/src/hooks/email.ts +0 -49
  303. package/src/hooks/index.ts +0 -10
  304. package/src/hooks/invocation-handler.ts +0 -109
  305. package/src/hooks/processor.test.ts +0 -15
  306. package/src/hooks/processor.ts +0 -210
  307. package/src/hooks/useChatProcessor.tsx +0 -86
  308. package/src/hooks/useLocalTriggerManager.ts +0 -82
  309. package/src/hooks/useMessageQueue.ts +0 -23
  310. package/src/hooks/useServices.ts +0 -28
  311. package/src/presets.ts +0 -248
  312. package/src/testing/test-services.ts +0 -131
  313. package/src/tools/function.ts +0 -47
  314. package/src/tools/index.ts +0 -6
  315. package/src/tools/openapi.test.ts +0 -224
  316. package/src/tools/openapi.ts +0 -331
  317. package/src/types/index.ts +0 -7
  318. package/src/types/registry.ts +0 -26
  319. package/src/types/schema.ts +0 -132
  320. package/src/types/types.ts +0 -21
@@ -1,241 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import '@dxos-theme';
6
-
7
- import { type StoryObj, type Meta } from '@storybook/react';
8
- import React, { useCallback, useEffect, useMemo, useState } from 'react';
9
-
10
- import { Capabilities, IntentPlugin, Surface, useCapabilities, useIntentDispatcher } from '@dxos/app-framework';
11
- import { withPluginManager } from '@dxos/app-framework/testing';
12
- import { Message, type Tool } from '@dxos/artifact';
13
- import { capabilities, genericTools, localServiceEndpoints, type IsObject } from '@dxos/artifact-testing';
14
- import { AIServiceClientImpl } from '@dxos/assistant';
15
- import { createStatic, ObjectId } from '@dxos/echo-schema';
16
- import { EdgeHttpClient } from '@dxos/edge-client';
17
- import { invariant } from '@dxos/invariant';
18
- import { DXN, QueueSubspaceTags, SpaceId } from '@dxos/keys';
19
- import { ChessPlugin } from '@dxos/plugin-chess';
20
- import { ChessType } from '@dxos/plugin-chess/types';
21
- import { ClientPlugin } from '@dxos/plugin-client';
22
- import { MapPlugin } from '@dxos/plugin-map';
23
- import { SpacePlugin } from '@dxos/plugin-space';
24
- import { TablePlugin } from '@dxos/plugin-table';
25
- import { useSpace } from '@dxos/react-client/echo';
26
- import { useQueue } from '@dxos/react-edge-client';
27
- import { IconButton, Input, Toolbar } from '@dxos/react-ui';
28
- import { mx } from '@dxos/react-ui-theme';
29
- import { withLayout, withSignals, withTheme } from '@dxos/storybook-utils';
30
-
31
- import { Thread, type ThreadProps } from './components';
32
- import { ChatProcessor } from './hooks';
33
- import { createProcessorOptions } from './testing';
34
- import translations from './translations';
35
-
36
- const endpoints = localServiceEndpoints;
37
-
38
- type RenderProps = {
39
- items?: IsObject[];
40
- prompts?: string[];
41
- } & Pick<ThreadProps, 'debug'>;
42
-
43
- // TODO(burdon): Use ChatContainer.
44
- const Render = ({ items: _items, prompts = [], ...props }: RenderProps) => {
45
- const space = useSpace();
46
- const artifactDefinitions = useCapabilities(Capabilities.ArtifactDefinition);
47
- const tools = useMemo<Tool[]>(
48
- () => [...genericTools, ...artifactDefinitions.flatMap((definition) => definition.tools)],
49
- [genericTools, artifactDefinitions],
50
- );
51
-
52
- const [aiClient] = useState(() => new AIServiceClientImpl({ endpoint: endpoints.ai }));
53
- const [edgeClient] = useState(() => new EdgeHttpClient(endpoints.edge));
54
- const { dispatchPromise: dispatch } = useIntentDispatcher();
55
- const processor = useMemo<ChatProcessor | undefined>(() => {
56
- if (!space) {
57
- return;
58
- }
59
-
60
- return new ChatProcessor(
61
- aiClient,
62
- tools,
63
- {
64
- space,
65
- dispatch,
66
- },
67
- createProcessorOptions(artifactDefinitions.map((definition) => definition.instructions)),
68
- );
69
- }, [aiClient, tools, space, dispatch, artifactDefinitions]);
70
-
71
- // Queue.
72
- const [queueDxn, setQueueDxn] = useState(() => randomQueueDxn());
73
- const queue = useQueue<Message>(edgeClient, DXN.tryParse(queueDxn));
74
-
75
- useEffect(() => {
76
- if (queue?.items.length === 0 && !queue.isLoading && prompts.length > 0) {
77
- queue.append([
78
- createStatic(Message, {
79
- role: 'assistant',
80
- content: prompts.map(
81
- (prompt) =>
82
- ({
83
- type: 'json',
84
- disposition: 'suggest',
85
- json: JSON.stringify({ text: prompt }),
86
- }) as const,
87
- ),
88
- }),
89
- ]);
90
- }
91
- }, [queueDxn, prompts, queue?.items.length, queue?.isLoading]);
92
-
93
- // State.
94
- const artifactItems: any[] = []; // TODO(burdon): Query from space.
95
- const messages = [...(queue?.items ?? []), ...(processor?.messages.value ?? [])];
96
-
97
- const handleSubmit = processor
98
- ? async (message: string) => {
99
- invariant(processor);
100
- if (processor.streaming.value) {
101
- await processor.cancel();
102
- }
103
-
104
- invariant(queue);
105
- await processor.request(message, {
106
- history: queue.items,
107
- onComplete: (messages) => {
108
- queue.append(messages);
109
- },
110
- });
111
- }
112
- : undefined;
113
-
114
- const handleSuggest = useCallback(
115
- (text: string) => {
116
- void handleSubmit?.(text);
117
- },
118
- [handleSubmit],
119
- );
120
-
121
- const handleDelete = useCallback(
122
- (id: string) => {
123
- invariant(ObjectId.isValid(id), 'Invalid message id');
124
- void queue?.delete([id]);
125
- },
126
- [queue],
127
- );
128
-
129
- return (
130
- <div className='grid grid-cols-2 w-full h-full divide-x divide-separator overflow-hidden'>
131
- {/* Thread */}
132
- <div className='flex flex-col gap-4 overflow-hidden'>
133
- <Toolbar.Root classNames='p-2'>
134
- <Input.Root>
135
- <Input.TextInput
136
- spellCheck={false}
137
- placeholder='Queue DXN'
138
- value={queueDxn}
139
- // onClick={() => setQueueDxn('')} Why?????
140
- onChange={(ev) => setQueueDxn(ev.target.value)}
141
- />
142
- <IconButton
143
- iconOnly
144
- label='Copy DXN'
145
- icon='ph--copy--regular'
146
- onClick={() => navigator.clipboard.writeText(queueDxn)}
147
- />
148
- <IconButton
149
- iconOnly
150
- label='Clear history'
151
- icon='ph--trash--regular'
152
- onClick={() => setQueueDxn(randomQueueDxn())}
153
- />
154
- <IconButton iconOnly label='Stop' icon='ph--stop--regular' onClick={() => processor?.cancel()} />
155
- </Input.Root>
156
- </Toolbar.Root>
157
-
158
- <Thread
159
- messages={messages}
160
- streaming={processor?.streaming.value}
161
- onSubmit={processor ? handleSubmit : undefined}
162
- onSuggest={processor ? handleSuggest : undefined}
163
- onDelete={processor ? handleDelete : undefined}
164
- {...props}
165
- />
166
- </div>
167
-
168
- {/* Artifacts Deck/Mosaic */}
169
- <div className='overflow-hidden grid grid-rows-[2fr_1fr] divide-y divide-separator'>
170
- {artifactItems.length > 0 && (
171
- <div className={mx('flex grow overflow-hidden', artifactItems.length === 1 && 'row-span-2')}>
172
- <Surface role='canvas-node' limit={1} data={artifactItems[0]} />
173
- </div>
174
- )}
175
-
176
- {artifactItems.length > 1 && (
177
- <div className='flex shrink-0 overflow-hidden divide-x divide-separator'>
178
- <div className='flex flex-1 h-full'>
179
- {artifactItems.slice(1, 3).map((item, idx) => (
180
- <Surface key={idx} role='canvas-node' limit={1} data={item} />
181
- ))}
182
- </div>
183
- </div>
184
- )}
185
- </div>
186
- </div>
187
- );
188
- };
189
-
190
- const randomQueueDxn = () =>
191
- new DXN(DXN.kind.QUEUE, [QueueSubspaceTags.DATA, SpaceId.random(), ObjectId.random()]).toString();
192
-
193
- const meta: Meta<typeof Render> = {
194
- title: 'plugins/plugin-automation/artifacts',
195
- render: Render,
196
- decorators: [
197
- withSignals,
198
- withPluginManager({
199
- plugins: [
200
- ClientPlugin({
201
- onClientInitialized: async (_, client) => {
202
- await client.halo.createIdentity();
203
- },
204
- }),
205
- SpacePlugin({ observability: false }),
206
- IntentPlugin(),
207
- ChessPlugin(),
208
- MapPlugin(),
209
- TablePlugin(),
210
- ],
211
- capabilities,
212
- }),
213
- withTheme,
214
- withLayout({ fullscreen: true, tooltips: true }),
215
- ],
216
- parameters: {
217
- translations,
218
- },
219
- };
220
-
221
- export default meta;
222
-
223
- type Story = StoryObj<typeof Render>;
224
-
225
- export const Default: Story = {
226
- args: {
227
- debug: true,
228
- prompts: ['Ask me a question', 'Show me a chess puzzle'],
229
- },
230
- };
231
-
232
- export const WithInitialItems: Story = {
233
- args: {
234
- debug: true,
235
- items: [
236
- createStatic(ChessType, {
237
- fen: 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1',
238
- }),
239
- ],
240
- },
241
- };
@@ -1,19 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { contributes, type PluginsContext } from '@dxos/app-framework';
6
- import { AIServiceClientImpl } from '@dxos/assistant';
7
- import { ClientCapabilities } from '@dxos/plugin-client';
8
-
9
- import { AutomationCapabilities } from './capabilities';
10
-
11
- // TODO(wittjosiah): Factor out.
12
- const DEFAULT_AI_SERVICE_URL = 'http://localhost:8788';
13
-
14
- export default (context: PluginsContext) => {
15
- const client = context.requestCapability(ClientCapabilities.Client);
16
- const endpoint = client.config.values.runtime?.services?.ai?.server ?? DEFAULT_AI_SERVICE_URL;
17
- const aiClient = new AIServiceClientImpl({ endpoint });
18
- return contributes(AutomationCapabilities.AiClient, aiClient);
19
- };
@@ -1,187 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { Capabilities, contributes, createIntent, LayoutAction, type PluginsContext } from '@dxos/app-framework';
6
- import { ClientCapabilities } from '@dxos/plugin-client';
7
- import { createExtension, type Node, ROOT_ID, toSignal } from '@dxos/plugin-graph';
8
- import { memoizeQuery } from '@dxos/plugin-space';
9
- import { getTypename, parseId, SpaceState } from '@dxos/react-client/echo';
10
-
11
- import { AMBIENT_CHAT_DIALOG, AUTOMATION_PLUGIN } from '../meta';
12
-
13
- export default (context: PluginsContext) => {
14
- const resolve = (typename: string) =>
15
- context.requestCapabilities(Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {};
16
-
17
- return contributes(Capabilities.AppGraphBuilder, [
18
- createExtension({
19
- id: `${AUTOMATION_PLUGIN}/ambient-chat`,
20
- filter: (node): node is Node<null> => node.id === ROOT_ID,
21
- actions: () => [
22
- {
23
- id: `${LayoutAction.UpdateDialog._tag}/ambient-chat/open`,
24
- data: async () => {
25
- const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
26
- await dispatch(
27
- createIntent(LayoutAction.UpdateDialog, {
28
- part: 'dialog',
29
- subject: AMBIENT_CHAT_DIALOG,
30
- options: {
31
- state: true,
32
- blockAlign: 'end',
33
- },
34
- }),
35
- );
36
- },
37
- properties: {
38
- label: ['open ambient chat label', { ns: AUTOMATION_PLUGIN }],
39
- icon: 'ph--chat-centered-text--regular',
40
- disposition: 'pin-end',
41
- keyBinding: {
42
- macos: 'shift+meta+k',
43
- windows: 'shift+ctrl+k',
44
- },
45
- },
46
- },
47
- ],
48
- }),
49
- createExtension({
50
- id: `${AUTOMATION_PLUGIN}/service-registry`,
51
- resolver: ({ id }) => {
52
- if (!id.endsWith('~service-registry')) {
53
- return;
54
- }
55
-
56
- const type = 'orphan-settings-for-subject';
57
- const icon = 'ph--plugs--regular';
58
-
59
- const client = context.requestCapability(ClientCapabilities.Client);
60
- const [subjectId] = id.split('~');
61
- const { spaceId } = parseId(subjectId);
62
- const spaces = toSignal(
63
- (onChange) => client.spaces.subscribe(() => onChange()).unsubscribe,
64
- () => client.spaces.get(),
65
- );
66
- const space = spaces?.find((space) => space.id === spaceId && space.state.get() === SpaceState.SPACE_READY);
67
- return {
68
- id,
69
- type,
70
- data: null,
71
- properties: {
72
- icon,
73
- label: ['service registry label', { ns: AUTOMATION_PLUGIN }],
74
- object: null,
75
- space,
76
- },
77
- };
78
- },
79
- }),
80
- createExtension({
81
- id: `${AUTOMATION_PLUGIN}/automation-for-subject`,
82
- resolver: ({ id }) => {
83
- if (!id.endsWith('~automation')) {
84
- return;
85
- }
86
-
87
- const type = 'orphan-settings-for-subject';
88
- const icon = 'ph--magic-wand--regular';
89
-
90
- const client = context.requestCapability(ClientCapabilities.Client);
91
- const [subjectId] = id.split('~');
92
- const { spaceId, objectId } = parseId(subjectId);
93
- const spaces = toSignal(
94
- (onChange) => client.spaces.subscribe(() => onChange()).unsubscribe,
95
- () => client.spaces.get(),
96
- );
97
- const space = spaces?.find((space) => space.id === spaceId && space.state.get() === SpaceState.SPACE_READY);
98
- if (!objectId) {
99
- // TODO(burdon): Ref SPACE_PLUGIN ns.
100
- const label = space
101
- ? space.properties.name || ['unnamed space label', { ns: AUTOMATION_PLUGIN }]
102
- : ['unnamed object settings label', { ns: AUTOMATION_PLUGIN }];
103
-
104
- // TODO(wittjosiah): Support comments for arbitrary subjects.
105
- // This is to ensure that the comments panel is not stuck on an old object.
106
- return {
107
- id,
108
- type,
109
- data: null,
110
- properties: {
111
- icon,
112
- label,
113
- showResolvedThreads: false,
114
- object: null,
115
- space,
116
- },
117
- };
118
- }
119
-
120
- const [object] = memoizeQuery(space, { id: objectId });
121
- if (!object || !subjectId) {
122
- return;
123
- }
124
-
125
- const meta = resolve(getTypename(object) ?? '');
126
- const label = meta.label?.(object) ||
127
- object.name ||
128
- meta.placeholder || ['unnamed object settings label', { ns: AUTOMATION_PLUGIN }];
129
-
130
- return {
131
- id,
132
- type,
133
- data: null,
134
- properties: {
135
- icon,
136
- label,
137
- object,
138
- },
139
- };
140
- },
141
- }),
142
- createExtension({
143
- id: `${AUTOMATION_PLUGIN}/assistant-for-subject`,
144
- resolver: ({ id }) => {
145
- if (!id.endsWith('~assistant')) {
146
- return;
147
- }
148
-
149
- const client = context.requestCapability(ClientCapabilities.Client);
150
- const [subjectId] = id.split('~');
151
- const { spaceId, objectId } = parseId(subjectId);
152
- const spaces = toSignal(
153
- (onChange) => client.spaces.subscribe(() => onChange()).unsubscribe,
154
- () => client.spaces.get(),
155
- );
156
- const space = spaces?.find((space) => space.id === spaceId && space.state.get() === SpaceState.SPACE_READY);
157
- if (!objectId) {
158
- // TODO(wittjosiah): Support assistant for arbitrary subjects.
159
- // This is to ensure that the assistant panel is not stuck on an old object.
160
- return {
161
- id,
162
- type: 'orphan-automation-for-subject',
163
- data: null,
164
- properties: {
165
- icon: 'ph--atom--regular',
166
- label: ['assistant panel label', { ns: AUTOMATION_PLUGIN }],
167
- object: null,
168
- space,
169
- },
170
- };
171
- }
172
-
173
- const [object] = memoizeQuery(space, { id: objectId });
174
- return {
175
- id,
176
- type: 'orphan-automation-for-subject',
177
- data: null,
178
- properties: {
179
- icon: 'ph--atom--regular',
180
- label: ['assistant panel label', { ns: AUTOMATION_PLUGIN }],
181
- object,
182
- },
183
- };
184
- },
185
- }),
186
- ]);
187
- };
@@ -1,12 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { defineCapability } from '@dxos/app-framework';
6
- import { type AIServiceClientImpl } from '@dxos/assistant';
7
-
8
- import { AUTOMATION_PLUGIN } from '../meta';
9
-
10
- export namespace AutomationCapabilities {
11
- export const AiClient = defineCapability<AIServiceClientImpl>(`${AUTOMATION_PLUGIN}/capability/ai-client`);
12
- }
@@ -1,27 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { Capabilities, contributes, createResolver } from '@dxos/app-framework';
6
- import { ObjectId } from '@dxos/echo-schema';
7
- import { create, makeRef } from '@dxos/live-object';
8
-
9
- import { AutomationAction, AIChatType } from '../types';
10
-
11
- export default () =>
12
- contributes(
13
- Capabilities.IntentResolver,
14
- createResolver({
15
- intent: AutomationAction.Create,
16
- resolve: ({ name }) => ({
17
- data: {
18
- object: create(AIChatType, {
19
- name,
20
- // TODO(burdon): ???
21
- // new DXN(DXN.kind.QUEUE, [QueueSubspaceTags.DATA, SpaceId.random(), ObjectId.random()]).toString(),
22
- queue: makeRef({ id: ObjectId.random() }),
23
- }),
24
- },
25
- }),
26
- }),
27
- );
@@ -1,44 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import '@dxos-theme';
6
-
7
- import { type StoryObj, type Meta } from '@storybook/react';
8
- import React, { useState } from 'react';
9
-
10
- import { Dialog, Toolbar } from '@dxos/react-ui';
11
- import { withTheme, withLayout } from '@dxos/storybook-utils';
12
-
13
- import { AmbientChatDialog } from './AmbientChatDialog';
14
- import translations from '../../translations';
15
-
16
- const meta: Meta<typeof AmbientChatDialog> = {
17
- title: 'plugins/plugin-automation/AmbientChatDialog',
18
- component: AmbientChatDialog,
19
- render: () => {
20
- const [open, setOpen] = useState(true);
21
- return (
22
- <>
23
- <div>
24
- <Toolbar.Root>
25
- <Toolbar.Button onClick={() => setOpen(true)}>Open</Toolbar.Button>
26
- </Toolbar.Root>
27
- </div>
28
- <Dialog.Root open={open} onOpenChange={setOpen}>
29
- <AmbientChatDialog />
30
- </Dialog.Root>
31
- </>
32
- );
33
- },
34
- decorators: [withTheme, withLayout({ fullscreen: true, tooltips: true })],
35
- parameters: {
36
- translations,
37
- },
38
- };
39
-
40
- export default meta;
41
-
42
- type Story = StoryObj<typeof AmbientChatDialog>;
43
-
44
- export const Default: Story = {};
@@ -1,63 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import React, { type PropsWithChildren, useState } from 'react';
6
-
7
- import { Dialog, Icon, IconButton, useTranslation } from '@dxos/react-ui';
8
- import { resizeAttributes, ResizeHandle, type Size, sizeStyle } from '@dxos/react-ui-dnd';
9
-
10
- import { AUTOMATION_PLUGIN } from '../../meta';
11
- import { Prompt } from '../Prompt';
12
-
13
- const preventDefault = (event: Event) => event.preventDefault();
14
-
15
- export const AmbientChatDialog = ({ children }: PropsWithChildren) => {
16
- const { t } = useTranslation(AUTOMATION_PLUGIN);
17
- const [size, setSize] = useState<Size>('min-content');
18
- const [iter, setIter] = useState(0);
19
- return (
20
- <div role='none' className='dx-dialog__overlay bg-transparent pointer-events-none' data-block-align='end'>
21
- <Dialog.Content
22
- onInteractOutside={preventDefault}
23
- classNames='pointer-events-auto relative overflow-hidden is-[500px] max-is-none'
24
- inOverlayLayout
25
- {...resizeAttributes}
26
- style={{
27
- ...sizeStyle(size, 'vertical'),
28
- maxBlockSize: 'calc(100dvh - env(safe-area-inset-bottom) - env(safe-area-inset-top) - 8rem)',
29
- }}
30
- >
31
- <ResizeHandle
32
- key={iter}
33
- side='block-start'
34
- defaultSize='min-content'
35
- minSize={5}
36
- fallbackSize={5}
37
- iconPosition='center'
38
- onSizeChange={setSize}
39
- />
40
-
41
- <div className='flex w-full items-center'>
42
- <Dialog.Title classNames='sr-only'>{t('ambient chat dialog title')}</Dialog.Title>
43
- <Dialog.Close>
44
- <Icon icon='ph--x--regular' size={4} />
45
- </Dialog.Close>
46
- <div className='grow' />
47
- <IconButton
48
- variant='ghost'
49
- icon='ph--caret-down--regular'
50
- iconOnly
51
- label='Shrink'
52
- onClick={() => {
53
- setIter((iter) => iter + 1);
54
- setSize('min-content');
55
- }}
56
- />
57
- </div>
58
-
59
- <Prompt autoFocus lineWrapping />
60
- </Dialog.Content>
61
- </div>
62
- );
63
- };
@@ -1,5 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- export * from './AmbientChatDialog';
@@ -1,52 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import '@dxos-theme';
6
-
7
- import { type StoryObj, type Meta } from '@storybook/react';
8
- import React, { useState } from 'react';
9
-
10
- import { faker } from '@dxos/random';
11
- import { Button } from '@dxos/react-ui';
12
- import { withLayout, withTheme, withSignals } from '@dxos/storybook-utils';
13
-
14
- import { StatusLine } from './StatusLine';
15
-
16
- const meta: Meta<typeof StatusLine> = {
17
- title: 'plugins/plugin-automation/StatusLine',
18
- component: StatusLine,
19
- decorators: [withSignals, withTheme, withLayout()],
20
- parameters: {
21
- layout: 'centered',
22
- },
23
- };
24
-
25
- export default meta;
26
-
27
- type Story = StoryObj<typeof StatusLine>;
28
-
29
- export const Default: Story = {
30
- args: {
31
- classNames: 'w-96 px-2',
32
- lines: Array.from({ length: 5 }, (_, i) => `${i}. ${faker.lorem.paragraph()}`),
33
- autoAdvance: true,
34
- },
35
- };
36
-
37
- export const Demo: Story = {
38
- render: () => {
39
- const [lines, setLines] = useState<string[]>([]);
40
-
41
- return (
42
- <div className='flex flex-col w-96 gap-4'>
43
- <StatusLine lines={lines} autoAdvance advance={500} />
44
- <div>
45
- <Button onClick={() => setLines((lines) => [...lines, `${lines.length + 1}. ${faker.lorem.paragraph()}`])}>
46
- Add
47
- </Button>
48
- </div>
49
- </div>
50
- );
51
- },
52
- };