@dxos/plugin-automation 0.8.4-main.c4373fc → 0.8.4-main.c85a9c8dae

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 (332) hide show
  1. package/dist/lib/browser/AutomationPanel-EHRSV2DL.mjs +11 -0
  2. package/dist/lib/browser/AutomationSettings-TJYG77L6.mjs +37 -0
  3. package/dist/lib/browser/AutomationSettings-TJYG77L6.mjs.map +7 -0
  4. package/dist/lib/browser/FunctionsContainer-XHEQSNNO.mjs +43 -0
  5. package/dist/lib/browser/FunctionsContainer-XHEQSNNO.mjs.map +7 -0
  6. package/dist/lib/browser/{FunctionsPanel-NRIKAPQV.mjs → FunctionsPanel-5WPUZGRB.mjs} +3 -3
  7. package/dist/lib/browser/FunctionsRegistry-XRXIZRLL.mjs +10 -0
  8. package/dist/lib/browser/TriggerSettings-HUQT53SV.mjs +13 -0
  9. package/dist/lib/browser/TriggerSettings-HUQT53SV.mjs.map +7 -0
  10. package/dist/lib/browser/app-graph-builder-HLARI3VW.mjs +85 -0
  11. package/dist/lib/browser/app-graph-builder-HLARI3VW.mjs.map +7 -0
  12. package/dist/lib/browser/chunk-3P4R5WNC.mjs +8 -0
  13. package/dist/lib/browser/chunk-3P4R5WNC.mjs.map +7 -0
  14. package/dist/lib/browser/chunk-4EY2KMCM.mjs +272 -0
  15. package/dist/lib/browser/chunk-4EY2KMCM.mjs.map +7 -0
  16. package/dist/lib/browser/chunk-PZNBEKO5.mjs +17 -0
  17. package/dist/lib/browser/chunk-PZNBEKO5.mjs.map +7 -0
  18. package/dist/lib/browser/chunk-QPG3AKFX.mjs +93 -0
  19. package/dist/lib/browser/chunk-QPG3AKFX.mjs.map +7 -0
  20. package/dist/lib/browser/chunk-SEG5OCGB.mjs +31 -0
  21. package/dist/lib/browser/chunk-SEG5OCGB.mjs.map +7 -0
  22. package/dist/lib/browser/chunk-U55ZXRYM.mjs +98 -0
  23. package/dist/lib/browser/chunk-U55ZXRYM.mjs.map +7 -0
  24. package/dist/lib/browser/chunk-WOBCY2FQ.mjs +83 -0
  25. package/dist/lib/browser/chunk-WOBCY2FQ.mjs.map +7 -0
  26. package/dist/lib/browser/chunk-XFXYU645.mjs +96 -0
  27. package/dist/lib/browser/chunk-XFXYU645.mjs.map +7 -0
  28. package/dist/lib/browser/chunk-ZNI2CGQP.mjs +270 -0
  29. package/dist/lib/browser/chunk-ZNI2CGQP.mjs.map +7 -0
  30. package/dist/lib/browser/cli/index.mjs +1108 -0
  31. package/dist/lib/browser/cli/index.mjs.map +7 -0
  32. package/dist/lib/browser/compute-runtime-L2RVWXY2.mjs +124 -0
  33. package/dist/lib/browser/compute-runtime-L2RVWXY2.mjs.map +7 -0
  34. package/dist/lib/browser/hooks/index.mjs +5 -4
  35. package/dist/lib/browser/index.mjs +66 -64
  36. package/dist/lib/browser/index.mjs.map +4 -4
  37. package/dist/lib/browser/meta.json +1 -1
  38. package/dist/lib/browser/operation-resolver-2U6ZQVXR.mjs +83 -0
  39. package/dist/lib/browser/operation-resolver-2U6ZQVXR.mjs.map +7 -0
  40. package/dist/lib/browser/{react-surface-JXFO46V4.mjs → react-surface-U6FAYV42.mjs} +20 -14
  41. package/dist/lib/browser/react-surface-U6FAYV42.mjs.map +7 -0
  42. package/dist/lib/browser/types/index.mjs +10 -4
  43. package/dist/lib/node-esm/{AutomationPanel-GHK5UG4K.mjs → AutomationPanel-F7MPUR7U.mjs} +4 -4
  44. package/dist/lib/node-esm/AutomationSettings-5AHJMILI.mjs +38 -0
  45. package/dist/lib/node-esm/AutomationSettings-5AHJMILI.mjs.map +7 -0
  46. package/dist/lib/node-esm/FunctionsContainer-U5UVRKVT.mjs +44 -0
  47. package/dist/lib/node-esm/FunctionsContainer-U5UVRKVT.mjs.map +7 -0
  48. package/dist/lib/node-esm/{FunctionsPanel-SAMRTELO.mjs → FunctionsPanel-UFL5LT2R.mjs} +3 -3
  49. package/dist/lib/node-esm/FunctionsPanel-UFL5LT2R.mjs.map +7 -0
  50. package/dist/lib/node-esm/FunctionsRegistry-574OBZ5T.mjs +11 -0
  51. package/dist/lib/node-esm/FunctionsRegistry-574OBZ5T.mjs.map +7 -0
  52. package/dist/lib/node-esm/TriggerSettings-RDIJHUKK.mjs +14 -0
  53. package/dist/lib/node-esm/TriggerSettings-RDIJHUKK.mjs.map +7 -0
  54. package/dist/lib/node-esm/app-graph-builder-Z2TMQHVX.mjs +86 -0
  55. package/dist/lib/node-esm/app-graph-builder-Z2TMQHVX.mjs.map +7 -0
  56. package/dist/lib/node-esm/chunk-2X564LII.mjs +10 -0
  57. package/dist/lib/node-esm/chunk-2X564LII.mjs.map +7 -0
  58. package/dist/lib/node-esm/chunk-34HGM46Z.mjs +32 -0
  59. package/dist/lib/node-esm/chunk-34HGM46Z.mjs.map +7 -0
  60. package/dist/lib/node-esm/chunk-4DK33JDH.mjs +84 -0
  61. package/dist/lib/node-esm/chunk-4DK33JDH.mjs.map +7 -0
  62. package/dist/lib/node-esm/{chunk-5MQJPJR2.mjs → chunk-5FXNN3MV.mjs} +6 -2
  63. package/dist/lib/node-esm/chunk-5FXNN3MV.mjs.map +7 -0
  64. package/dist/lib/node-esm/chunk-7AIKTEAX.mjs +273 -0
  65. package/dist/lib/node-esm/chunk-7AIKTEAX.mjs.map +7 -0
  66. package/dist/lib/node-esm/chunk-CMZ4NKSK.mjs +271 -0
  67. package/dist/lib/node-esm/chunk-CMZ4NKSK.mjs.map +7 -0
  68. package/dist/lib/node-esm/chunk-GXFQR3KI.mjs +99 -0
  69. package/dist/lib/node-esm/chunk-GXFQR3KI.mjs.map +7 -0
  70. package/dist/lib/node-esm/chunk-QNPYY3XZ.mjs +94 -0
  71. package/dist/lib/node-esm/chunk-QNPYY3XZ.mjs.map +7 -0
  72. package/dist/lib/node-esm/chunk-RTEXGGBX.mjs +97 -0
  73. package/dist/lib/node-esm/chunk-RTEXGGBX.mjs.map +7 -0
  74. package/dist/lib/node-esm/cli/index.mjs +1109 -0
  75. package/dist/lib/node-esm/cli/index.mjs.map +7 -0
  76. package/dist/lib/node-esm/compute-runtime-XD6A5Q7Q.mjs +125 -0
  77. package/dist/lib/node-esm/compute-runtime-XD6A5Q7Q.mjs.map +7 -0
  78. package/dist/lib/node-esm/hooks/index.mjs +5 -4
  79. package/dist/lib/node-esm/index.mjs +66 -64
  80. package/dist/lib/node-esm/index.mjs.map +4 -4
  81. package/dist/lib/node-esm/meta.json +1 -1
  82. package/dist/lib/node-esm/operation-resolver-XWJGBHJZ.mjs +84 -0
  83. package/dist/lib/node-esm/operation-resolver-XWJGBHJZ.mjs.map +7 -0
  84. package/dist/lib/node-esm/{react-surface-YDJ43B3N.mjs → react-surface-BVNHCWQ7.mjs} +20 -14
  85. package/dist/lib/node-esm/react-surface-BVNHCWQ7.mjs.map +7 -0
  86. package/dist/lib/node-esm/types/index.mjs +10 -4
  87. package/dist/types/src/AutomationPlugin.d.ts +2 -1
  88. package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
  89. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  90. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  92. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  93. package/dist/types/src/capabilities/compute-runtime/compute-runtime.d.ts +6 -0
  94. package/dist/types/src/capabilities/compute-runtime/compute-runtime.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/compute-runtime/index.d.ts +3 -0
  96. package/dist/types/src/capabilities/compute-runtime/index.d.ts.map +1 -0
  97. package/dist/types/src/capabilities/index.d.ts +4 -5
  98. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  99. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  100. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  101. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  102. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  103. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  104. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  105. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  106. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  107. package/dist/types/src/cli/commands/index.d.ts +2 -0
  108. package/dist/types/src/cli/commands/index.d.ts.map +1 -0
  109. package/dist/types/src/cli/commands/trigger/create/index.d.ts +25 -0
  110. package/dist/types/src/cli/commands/trigger/create/index.d.ts.map +1 -0
  111. package/dist/types/src/cli/commands/trigger/create/queue.d.ts +13 -0
  112. package/dist/types/src/cli/commands/trigger/create/queue.d.ts.map +1 -0
  113. package/dist/types/src/cli/commands/trigger/create/subscription.d.ts +15 -0
  114. package/dist/types/src/cli/commands/trigger/create/subscription.d.ts.map +1 -0
  115. package/dist/types/src/cli/commands/trigger/create/timer.d.ts +13 -0
  116. package/dist/types/src/cli/commands/trigger/create/timer.d.ts.map +1 -0
  117. package/dist/types/src/cli/commands/trigger/index.d.ts +57 -0
  118. package/dist/types/src/cli/commands/trigger/index.d.ts.map +1 -0
  119. package/dist/types/src/cli/commands/trigger/list.d.ts +7 -0
  120. package/dist/types/src/cli/commands/trigger/list.d.ts.map +1 -0
  121. package/dist/types/src/cli/commands/trigger/options.d.ts +11 -0
  122. package/dist/types/src/cli/commands/trigger/options.d.ts.map +1 -0
  123. package/dist/types/src/cli/commands/trigger/remove.d.ts +8 -0
  124. package/dist/types/src/cli/commands/trigger/remove.d.ts.map +1 -0
  125. package/dist/types/src/cli/commands/trigger/update/index.d.ts +28 -0
  126. package/dist/types/src/cli/commands/trigger/update/index.d.ts.map +1 -0
  127. package/dist/types/src/cli/commands/trigger/update/queue.d.ts +12 -0
  128. package/dist/types/src/cli/commands/trigger/update/queue.d.ts.map +1 -0
  129. package/dist/types/src/cli/commands/trigger/update/subscription.d.ts +13 -0
  130. package/dist/types/src/cli/commands/trigger/update/subscription.d.ts.map +1 -0
  131. package/dist/types/src/cli/commands/trigger/update/timer.d.ts +11 -0
  132. package/dist/types/src/cli/commands/trigger/update/timer.d.ts.map +1 -0
  133. package/dist/types/src/cli/commands/trigger/util.d.ts +46 -0
  134. package/dist/types/src/cli/commands/trigger/util.d.ts.map +1 -0
  135. package/dist/types/src/cli/index.d.ts +2 -0
  136. package/dist/types/src/cli/index.d.ts.map +1 -0
  137. package/dist/types/src/cli/plugin.d.ts +3 -0
  138. package/dist/types/src/cli/plugin.d.ts.map +1 -0
  139. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +6 -7
  140. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  141. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +5 -0
  142. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
  143. package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -1
  144. package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts +8 -0
  145. package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts.map +1 -0
  146. package/dist/types/src/components/FunctionsRegistry/index.d.ts +4 -0
  147. package/dist/types/src/components/FunctionsRegistry/index.d.ts.map +1 -0
  148. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +12 -9
  149. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +1 -1
  150. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +6 -3
  151. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -1
  152. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +10 -8
  153. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  154. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +74 -2
  155. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
  156. package/dist/types/src/components/index.d.ts +3 -4
  157. package/dist/types/src/components/index.d.ts.map +1 -1
  158. package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts +4 -0
  159. package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts.map +1 -0
  160. package/dist/types/src/containers/AutomationSettings/index.d.ts +3 -0
  161. package/dist/types/src/containers/AutomationSettings/index.d.ts.map +1 -0
  162. package/dist/types/src/{components → containers/FunctionsContainer}/FunctionsContainer.d.ts +0 -1
  163. package/dist/types/src/containers/FunctionsContainer/FunctionsContainer.d.ts.map +1 -0
  164. package/dist/types/src/containers/FunctionsContainer/index.d.ts +3 -0
  165. package/dist/types/src/containers/FunctionsContainer/index.d.ts.map +1 -0
  166. package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts +6 -0
  167. package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts.map +1 -0
  168. package/dist/types/src/containers/TriggerSettings/index.d.ts +3 -0
  169. package/dist/types/src/containers/TriggerSettings/index.d.ts.map +1 -0
  170. package/dist/types/src/containers/index.d.ts +5 -0
  171. package/dist/types/src/containers/index.d.ts.map +1 -0
  172. package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +8 -4
  173. package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +1 -1
  174. package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +6 -5
  175. package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -1
  176. package/dist/types/src/index.d.ts +2 -2
  177. package/dist/types/src/index.d.ts.map +1 -1
  178. package/dist/types/src/meta.d.ts +2 -2
  179. package/dist/types/src/meta.d.ts.map +1 -1
  180. package/dist/types/src/testing/test-functions.d.ts +202 -3
  181. package/dist/types/src/testing/test-functions.d.ts.map +1 -1
  182. package/dist/types/src/translations.d.ts +5 -0
  183. package/dist/types/src/translations.d.ts.map +1 -1
  184. package/dist/types/src/types/capabilities.d.ts +22 -0
  185. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  186. package/dist/types/src/types/events.d.ts +5 -0
  187. package/dist/types/src/types/events.d.ts.map +1 -0
  188. package/dist/types/src/types/index.d.ts +2 -0
  189. package/dist/types/src/types/index.d.ts.map +1 -1
  190. package/dist/types/src/types/schema.d.ts +30 -1
  191. package/dist/types/src/types/schema.d.ts.map +1 -1
  192. package/dist/types/tsconfig.tsbuildinfo +1 -1
  193. package/package.json +66 -47
  194. package/src/AutomationPlugin.tsx +15 -34
  195. package/src/capabilities/app-graph-builder/app-graph-builder.ts +72 -0
  196. package/src/capabilities/app-graph-builder/index.ts +7 -0
  197. package/src/capabilities/compute-runtime/compute-runtime.ts +146 -0
  198. package/src/capabilities/compute-runtime/index.ts +7 -0
  199. package/src/capabilities/index.ts +4 -8
  200. package/src/capabilities/operation-resolver/index.ts +7 -0
  201. package/src/capabilities/operation-resolver/operation-resolver.ts +80 -0
  202. package/src/capabilities/react-surface/index.ts +7 -0
  203. package/src/capabilities/react-surface/react-surface.tsx +61 -0
  204. package/src/cli/commands/index.ts +5 -0
  205. package/src/cli/commands/trigger/create/index.ts +14 -0
  206. package/src/cli/commands/trigger/create/queue.ts +89 -0
  207. package/src/cli/commands/trigger/create/subscription.ts +128 -0
  208. package/src/cli/commands/trigger/create/timer.ts +93 -0
  209. package/src/cli/commands/trigger/index.ts +16 -0
  210. package/src/cli/commands/trigger/list.ts +67 -0
  211. package/src/cli/commands/trigger/options.ts +59 -0
  212. package/src/cli/commands/trigger/remove.ts +45 -0
  213. package/src/cli/commands/trigger/update/index.ts +14 -0
  214. package/src/cli/commands/trigger/update/queue.ts +195 -0
  215. package/src/cli/commands/trigger/update/subscription.ts +278 -0
  216. package/src/cli/commands/trigger/update/timer.ts +193 -0
  217. package/src/cli/commands/trigger/util.ts +395 -0
  218. package/src/cli/index.ts +5 -0
  219. package/src/cli/plugin.ts +24 -0
  220. package/src/components/AutomationPanel/AutomationPanel.stories.tsx +5 -6
  221. package/src/components/AutomationPanel/AutomationPanel.tsx +189 -86
  222. package/src/components/FunctionsPanel/FunctionsPanel.tsx +34 -22
  223. package/src/components/FunctionsRegistry/FunctionsRegistry.tsx +110 -0
  224. package/src/components/FunctionsRegistry/index.ts +8 -0
  225. package/src/components/TriggerEditor/FunctionInputEditor.tsx +34 -33
  226. package/src/components/TriggerEditor/SpecSelector.tsx +12 -11
  227. package/src/components/TriggerEditor/TriggerEditor.stories.tsx +89 -23
  228. package/src/components/TriggerEditor/TriggerEditor.tsx +83 -85
  229. package/src/components/index.ts +1 -2
  230. package/src/{components → containers/AutomationSettings}/AutomationSettings.tsx +9 -12
  231. package/src/containers/AutomationSettings/index.ts +7 -0
  232. package/src/containers/FunctionsContainer/FunctionsContainer.tsx +33 -0
  233. package/src/containers/FunctionsContainer/index.ts +7 -0
  234. package/src/containers/TriggerSettings/TriggerSettings.tsx +26 -0
  235. package/src/containers/TriggerSettings/index.ts +7 -0
  236. package/src/containers/index.ts +9 -0
  237. package/src/hooks/useComputeRuntimeCallback.ts +45 -8
  238. package/src/hooks/useTriggerRuntimeControls.ts +30 -15
  239. package/src/index.ts +2 -2
  240. package/src/meta.ts +7 -4
  241. package/src/testing/test-functions.ts +6 -6
  242. package/src/translations.ts +7 -0
  243. package/src/{capabilities → types}/capabilities.ts +9 -14
  244. package/src/types/events.ts +11 -0
  245. package/src/types/index.ts +2 -0
  246. package/src/types/schema.ts +23 -2
  247. package/dist/lib/browser/AutomationPanel-PNBH5L5C.mjs +0 -11
  248. package/dist/lib/browser/AutomationSettings-3LABN6ER.mjs +0 -69
  249. package/dist/lib/browser/AutomationSettings-3LABN6ER.mjs.map +0 -7
  250. package/dist/lib/browser/FunctionsContainer-HHBMPUOD.mjs +0 -36
  251. package/dist/lib/browser/FunctionsContainer-HHBMPUOD.mjs.map +0 -7
  252. package/dist/lib/browser/app-graph-builder-DV5HMFX4.mjs +0 -81
  253. package/dist/lib/browser/app-graph-builder-DV5HMFX4.mjs.map +0 -7
  254. package/dist/lib/browser/chunk-5ARH77PV.mjs +0 -15
  255. package/dist/lib/browser/chunk-5ARH77PV.mjs.map +0 -7
  256. package/dist/lib/browser/chunk-AY67OUDA.mjs +0 -14
  257. package/dist/lib/browser/chunk-AY67OUDA.mjs.map +0 -7
  258. package/dist/lib/browser/chunk-DLLE4FKP.mjs +0 -94
  259. package/dist/lib/browser/chunk-DLLE4FKP.mjs.map +0 -7
  260. package/dist/lib/browser/chunk-LC3QQU47.mjs +0 -171
  261. package/dist/lib/browser/chunk-LC3QQU47.mjs.map +0 -7
  262. package/dist/lib/browser/chunk-MVPRI3DB.mjs +0 -53
  263. package/dist/lib/browser/chunk-MVPRI3DB.mjs.map +0 -7
  264. package/dist/lib/browser/chunk-NIJWEQRD.mjs +0 -283
  265. package/dist/lib/browser/chunk-NIJWEQRD.mjs.map +0 -7
  266. package/dist/lib/browser/chunk-QT3YWUOT.mjs +0 -14
  267. package/dist/lib/browser/chunk-QT3YWUOT.mjs.map +0 -7
  268. package/dist/lib/browser/chunk-VGBZKM3O.mjs +0 -38
  269. package/dist/lib/browser/chunk-VGBZKM3O.mjs.map +0 -7
  270. package/dist/lib/browser/chunk-WWURMV25.mjs +0 -13
  271. package/dist/lib/browser/chunk-WWURMV25.mjs.map +0 -7
  272. package/dist/lib/browser/compute-runtime-YJREH6WP.mjs +0 -160
  273. package/dist/lib/browser/compute-runtime-YJREH6WP.mjs.map +0 -7
  274. package/dist/lib/browser/intent-resolver-D2OHKQRR.mjs +0 -77
  275. package/dist/lib/browser/intent-resolver-D2OHKQRR.mjs.map +0 -7
  276. package/dist/lib/browser/react-surface-JXFO46V4.mjs.map +0 -7
  277. package/dist/lib/node-esm/AutomationSettings-XENNIIZM.mjs +0 -70
  278. package/dist/lib/node-esm/AutomationSettings-XENNIIZM.mjs.map +0 -7
  279. package/dist/lib/node-esm/FunctionsContainer-ZKVOBUHV.mjs +0 -37
  280. package/dist/lib/node-esm/FunctionsContainer-ZKVOBUHV.mjs.map +0 -7
  281. package/dist/lib/node-esm/app-graph-builder-TR2WXPX2.mjs +0 -82
  282. package/dist/lib/node-esm/app-graph-builder-TR2WXPX2.mjs.map +0 -7
  283. package/dist/lib/node-esm/chunk-3EWMZAU6.mjs +0 -172
  284. package/dist/lib/node-esm/chunk-3EWMZAU6.mjs.map +0 -7
  285. package/dist/lib/node-esm/chunk-5MQJPJR2.mjs.map +0 -7
  286. package/dist/lib/node-esm/chunk-CJUI6AKX.mjs +0 -39
  287. package/dist/lib/node-esm/chunk-CJUI6AKX.mjs.map +0 -7
  288. package/dist/lib/node-esm/chunk-EX74SIDO.mjs +0 -284
  289. package/dist/lib/node-esm/chunk-EX74SIDO.mjs.map +0 -7
  290. package/dist/lib/node-esm/chunk-LWASMQIF.mjs +0 -16
  291. package/dist/lib/node-esm/chunk-LWASMQIF.mjs.map +0 -7
  292. package/dist/lib/node-esm/chunk-QCA543ZR.mjs +0 -54
  293. package/dist/lib/node-esm/chunk-QCA543ZR.mjs.map +0 -7
  294. package/dist/lib/node-esm/chunk-U7LJXQS4.mjs +0 -16
  295. package/dist/lib/node-esm/chunk-U7LJXQS4.mjs.map +0 -7
  296. package/dist/lib/node-esm/chunk-WHCSOUNN.mjs +0 -16
  297. package/dist/lib/node-esm/chunk-WHCSOUNN.mjs.map +0 -7
  298. package/dist/lib/node-esm/chunk-YQXW3JXD.mjs +0 -95
  299. package/dist/lib/node-esm/chunk-YQXW3JXD.mjs.map +0 -7
  300. package/dist/lib/node-esm/compute-runtime-CMEPAYND.mjs +0 -161
  301. package/dist/lib/node-esm/compute-runtime-CMEPAYND.mjs.map +0 -7
  302. package/dist/lib/node-esm/intent-resolver-2LGBVXT5.mjs +0 -78
  303. package/dist/lib/node-esm/intent-resolver-2LGBVXT5.mjs.map +0 -7
  304. package/dist/lib/node-esm/react-surface-YDJ43B3N.mjs.map +0 -7
  305. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  306. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  307. package/dist/types/src/capabilities/capabilities.d.ts +0 -19
  308. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  309. package/dist/types/src/capabilities/compute-runtime.d.ts +0 -5
  310. package/dist/types/src/capabilities/compute-runtime.d.ts.map +0 -1
  311. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  312. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  313. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  314. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  315. package/dist/types/src/components/AutomationSettings.d.ts +0 -5
  316. package/dist/types/src/components/AutomationSettings.d.ts.map +0 -1
  317. package/dist/types/src/components/FunctionsContainer.d.ts.map +0 -1
  318. package/dist/types/src/components/TriggerSettings.d.ts +0 -6
  319. package/dist/types/src/components/TriggerSettings.d.ts.map +0 -1
  320. package/dist/types/src/events.d.ts +0 -4
  321. package/dist/types/src/events.d.ts.map +0 -1
  322. package/src/capabilities/app-graph-builder.ts +0 -87
  323. package/src/capabilities/compute-runtime.ts +0 -138
  324. package/src/capabilities/intent-resolver.ts +0 -72
  325. package/src/capabilities/react-surface.tsx +0 -55
  326. package/src/components/FunctionsContainer.tsx +0 -29
  327. package/src/components/TriggerSettings.tsx +0 -25
  328. package/src/events.ts +0 -11
  329. /package/dist/lib/browser/{AutomationPanel-PNBH5L5C.mjs.map → AutomationPanel-EHRSV2DL.mjs.map} +0 -0
  330. /package/dist/lib/browser/{FunctionsPanel-NRIKAPQV.mjs.map → FunctionsPanel-5WPUZGRB.mjs.map} +0 -0
  331. /package/dist/lib/{node-esm/AutomationPanel-GHK5UG4K.mjs.map → browser/FunctionsRegistry-XRXIZRLL.mjs.map} +0 -0
  332. /package/dist/lib/node-esm/{FunctionsPanel-SAMRTELO.mjs.map → AutomationPanel-F7MPUR7U.mjs.map} +0 -0
@@ -1,284 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- meta
4
- } from "./chunk-5MQJPJR2.mjs";
5
-
6
- // src/components/TriggerEditor/TriggerEditor.tsx
7
- import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
8
- import React3, { useCallback as useCallback3, useMemo as useMemo3 } from "react";
9
- import { ComputeGraph } from "@dxos/conductor";
10
- import { Type as Type2 } from "@dxos/echo";
11
- import { FunctionTrigger, FunctionType, ScriptType } from "@dxos/functions";
12
- import { Filter as Filter2, Ref as Ref2, useQuery } from "@dxos/react-client/echo";
13
- import { Input, useDensityContext, useElevationContext, useThemeContext, useTranslation as useTranslation2 } from "@dxos/react-ui";
14
- import { Editor, createBasicExtensions, createThemeExtensions } from "@dxos/react-ui-editor";
15
- import { Form as Form2, InputHeader, SelectInput as SelectInput2, useRefQueryLookupHandler } from "@dxos/react-ui-form";
16
- import { inputTheme, mx } from "@dxos/react-ui-theme";
17
-
18
- // src/components/TriggerEditor/FunctionInputEditor.tsx
19
- import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
20
- import React, { useCallback, useMemo } from "react";
21
- import { Ref, Type } from "@dxos/echo";
22
- import { useOnTransition } from "@dxos/react-ui";
23
- import { Form, useFormValues } from "@dxos/react-ui-form";
24
- var FunctionInputEditor = ({ functions, getValue, onValueChange, onQueryRefOptions }) => {
25
- var _effect = _useSignals();
26
- try {
27
- const selectedFunctionValue = useFormValues([
28
- "function"
29
- ]);
30
- const selectedFunctionId = useMemo(() => {
31
- if (Ref.isRef(selectedFunctionValue)) {
32
- return selectedFunctionValue.dxn.toString().split("dxn:echo:@:").at(1);
33
- }
34
- }, [
35
- selectedFunctionValue
36
- ]);
37
- const selectedFunction = useMemo(() => functions.find((fn) => fn.id === selectedFunctionId), [
38
- functions,
39
- selectedFunctionId
40
- ]);
41
- useOnTransition(
42
- // Clear function parameter input when the function changes.
43
- selectedFunctionValue,
44
- (prevValue) => {
45
- if (!Ref.isRef(prevValue) || !Ref.isRef(selectedFunctionValue)) {
46
- return false;
47
- }
48
- return prevValue.dxn.toString() !== selectedFunctionValue.dxn.toString();
49
- },
50
- (currValue) => currValue !== void 0,
51
- () => onValueChange("object", {})
52
- );
53
- const inputSchema = useMemo(() => selectedFunction?.inputSchema, [
54
- selectedFunction
55
- ]);
56
- const effectSchema = useMemo(() => inputSchema ? Type.toEffectSchema(inputSchema) : void 0, [
57
- inputSchema
58
- ]);
59
- const propertyCount = inputSchema?.properties ? Object.keys(inputSchema.properties).length : 0;
60
- const values = useMemo(() => getValue() ?? {}, [
61
- getValue
62
- ]);
63
- const handleValuesChanged = useCallback((values2) => {
64
- onValueChange("object", values2);
65
- }, [
66
- onValueChange
67
- ]);
68
- if (selectedFunction === void 0 || effectSchema === void 0 || propertyCount === 0) {
69
- return null;
70
- }
71
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("h3", {
72
- className: "text-md"
73
- }, "Function parameters"), /* @__PURE__ */ React.createElement(Form, {
74
- schema: effectSchema,
75
- values,
76
- onValuesChanged: handleValuesChanged,
77
- onQueryRefOptions,
78
- outerSpacing: false
79
- }));
80
- } finally {
81
- _effect.f();
82
- }
83
- };
84
-
85
- // src/components/TriggerEditor/SpecSelector.tsx
86
- import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
87
- import React2, { useCallback as useCallback2, useMemo as useMemo2 } from "react";
88
- import { Filter, Query } from "@dxos/echo";
89
- import { TriggerKinds } from "@dxos/functions";
90
- import { useTranslation } from "@dxos/react-ui";
91
- import { SelectInput, useInputProps } from "@dxos/react-ui-form";
92
- var SpecSelector = (props) => {
93
- var _effect = _useSignals2();
94
- try {
95
- const { t } = useTranslation(meta.id);
96
- const specProps = useInputProps([
97
- "spec"
98
- ]);
99
- const handleTypeChange = useCallback2((_type, value) => {
100
- const getDefaultTriggerSpec = (kind) => {
101
- switch (kind) {
102
- case "timer":
103
- return {
104
- kind: "timer",
105
- cron: ""
106
- };
107
- case "subscription":
108
- return {
109
- kind: "subscription",
110
- query: {
111
- string: "Query.select(Filter.nothing())",
112
- ast: Query.select(Filter.nothing()).ast
113
- }
114
- };
115
- case "queue":
116
- return {
117
- kind: "queue",
118
- queue: "dxn:"
119
- };
120
- case "email":
121
- return {
122
- kind: "email"
123
- };
124
- case "webhook":
125
- return {
126
- kind: "webhook"
127
- };
128
- default:
129
- return void 0;
130
- }
131
- };
132
- const defaultSpec = getDefaultTriggerSpec(value);
133
- if (!defaultSpec) {
134
- return;
135
- }
136
- specProps.onValueChange("object", defaultSpec);
137
- }, [
138
- specProps
139
- ]);
140
- const options = useMemo2(() => TriggerKinds.map((kind) => ({
141
- value: kind,
142
- label: t(`trigger type ${kind}`)
143
- })), [
144
- t
145
- ]);
146
- return /* @__PURE__ */ React2.createElement(SelectInput, {
147
- ...props,
148
- options,
149
- onValueChange: handleTypeChange
150
- });
151
- } finally {
152
- _effect.f();
153
- }
154
- };
155
-
156
- // src/components/TriggerEditor/TriggerEditor.tsx
157
- var TriggerEditor = ({ space, trigger, readonlySpec, onSave, onCancel }) => {
158
- var _effect = _useSignals3();
159
- try {
160
- const handleSave = (values) => {
161
- onSave?.(values);
162
- };
163
- const handleRefQueryLookup = useRefQueryLookupHandler({
164
- space
165
- });
166
- const Custom = useCustomInputs({
167
- space,
168
- readonlySpec,
169
- onQueryRefOptions: handleRefQueryLookup
170
- });
171
- return /* @__PURE__ */ React3.createElement(Form2, {
172
- outerSpacing: false,
173
- Custom,
174
- schema: FunctionTrigger,
175
- values: trigger,
176
- onSave: handleSave,
177
- onCancel,
178
- onQueryRefOptions: handleRefQueryLookup
179
- });
180
- } finally {
181
- _effect.f();
182
- }
183
- };
184
- var useCustomInputs = ({ space, readonlySpec, onQueryRefOptions }) => {
185
- const { t } = useTranslation2(meta.id);
186
- const functions = useQuery(space, Filter2.type(FunctionType));
187
- const workflows = useQuery(space, Filter2.type(ComputeGraph));
188
- const scripts = useQuery(space, Filter2.type(ScriptType));
189
- return useMemo3(() => ({
190
- // Function selector.
191
- ["function"]: (props) => {
192
- const getValue = useCallback3(() => {
193
- const formValue = props.getValue();
194
- if (Ref2.isRef(formValue)) {
195
- return formValue.dxn.toString();
196
- }
197
- return void 0;
198
- }, [
199
- props
200
- ]);
201
- const handleOnValueChange = useCallback3((_type, dxnString) => {
202
- const dxn = Type2.DXN.parse(dxnString);
203
- if (dxn) {
204
- const ref = Ref2.fromDXN(dxn);
205
- props.onValueChange("object", ref);
206
- }
207
- }, [
208
- props.onValueChange
209
- ]);
210
- return /* @__PURE__ */ React3.createElement(SelectInput2, {
211
- ...props,
212
- getValue,
213
- onValueChange: handleOnValueChange,
214
- options: getWorkflowOptions(workflows).concat(getFunctionOptions(scripts, functions))
215
- });
216
- },
217
- // Spec selector.
218
- ["spec.kind"]: (props) => /* @__PURE__ */ React3.createElement(SpecSelector, {
219
- ...props,
220
- readonly: readonlySpec ? "disabled-input" : false
221
- }),
222
- // TODO(wittjosiah): Copied from ViewEditor.
223
- // Query input editor.
224
- ["spec.query"]: (props) => {
225
- const { themeMode } = useThemeContext();
226
- const density = useDensityContext();
227
- const elevation = useElevationContext();
228
- const value = props.getValue();
229
- const handleChange = useCallback3((text) => props.onValueChange("object", {
230
- ...value,
231
- string: text
232
- }), []);
233
- const extensions = useMemo3(() => [
234
- createBasicExtensions({
235
- readOnly: readonlySpec,
236
- placeholder: t("query placeholder")
237
- }),
238
- createThemeExtensions({
239
- themeMode
240
- })
241
- ], []);
242
- return /* @__PURE__ */ React3.createElement(Input.Root, null, /* @__PURE__ */ React3.createElement(InputHeader, {
243
- label: props.label
244
- }), /* @__PURE__ */ React3.createElement(Editor, {
245
- classNames: mx(inputTheme.input({
246
- density,
247
- elevation
248
- }), "flex items-center", "focus-within:bg-focusSurface focus-within:border-separator focus-within:hover:bg-focusSurface"),
249
- extensions,
250
- value: value.string,
251
- onChange: handleChange
252
- }));
253
- },
254
- // Function input editor.
255
- ["input"]: (props) => /* @__PURE__ */ React3.createElement(FunctionInputEditor, {
256
- ...props,
257
- functions,
258
- onQueryRefOptions
259
- })
260
- }), [
261
- workflows,
262
- scripts,
263
- functions,
264
- readonlySpec
265
- ]);
266
- };
267
- var getWorkflowOptions = (graphs) => {
268
- return graphs.map((graph) => ({
269
- label: `compute-${graph.id}`,
270
- value: `dxn:echo:@:${graph.id}`
271
- }));
272
- };
273
- var getFunctionOptions = (scripts, functions) => {
274
- const getLabel = (fn) => scripts.find((s) => fn.source?.target?.id === s.id)?.name ?? fn.name;
275
- return functions.map((fn) => ({
276
- label: getLabel(fn),
277
- value: `dxn:echo:@:${fn.id}`
278
- }));
279
- };
280
-
281
- export {
282
- TriggerEditor
283
- };
284
- //# sourceMappingURL=chunk-EX74SIDO.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/TriggerEditor/TriggerEditor.tsx", "../../../src/components/TriggerEditor/FunctionInputEditor.tsx", "../../../src/components/TriggerEditor/SpecSelector.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { ComputeGraph } from '@dxos/conductor';\nimport { Type } from '@dxos/echo';\nimport { FunctionTrigger, FunctionType, ScriptType } from '@dxos/functions';\nimport { Filter, Ref, type Space, useQuery } from '@dxos/react-client/echo';\nimport { Input, useDensityContext, useElevationContext, useThemeContext, useTranslation } from '@dxos/react-ui';\nimport { Editor, createBasicExtensions, createThemeExtensions } from '@dxos/react-ui-editor';\nimport { type CustomInputMap, Form, InputHeader, SelectInput, useRefQueryLookupHandler } from '@dxos/react-ui-form';\nimport { inputTheme, mx } from '@dxos/react-ui-theme';\n\nimport { meta } from '../../meta';\n\nimport { FunctionInputEditor, type FunctionInputEditorProps } from './FunctionInputEditor';\nimport { SpecSelector } from './SpecSelector';\n\nexport type TriggerEditorProps = {\n space: Space;\n trigger: FunctionTrigger;\n // TODO(wittjosiah): This needs to apply to whole spec but currently only applies to spec.kind & spec.query.\n readonlySpec?: boolean;\n onSave?: (trigger: Omit<FunctionTrigger, 'id'>) => void;\n onCancel?: () => void;\n};\n\nexport const TriggerEditor = ({ space, trigger, readonlySpec, onSave, onCancel }: TriggerEditorProps) => {\n const handleSave = (values: FunctionTrigger) => {\n onSave?.(values);\n };\n\n const handleRefQueryLookup = useRefQueryLookupHandler({ space });\n const Custom = useCustomInputs({ space, readonlySpec, onQueryRefOptions: handleRefQueryLookup });\n\n return (\n <Form\n outerSpacing={false}\n Custom={Custom}\n schema={FunctionTrigger}\n values={trigger}\n onSave={handleSave}\n onCancel={onCancel}\n onQueryRefOptions={handleRefQueryLookup}\n />\n );\n};\n\nconst useCustomInputs = ({\n space,\n readonlySpec,\n onQueryRefOptions,\n}: {\n space: Space;\n readonlySpec?: boolean;\n onQueryRefOptions: FunctionInputEditorProps['onQueryRefOptions'];\n}) => {\n const { t } = useTranslation(meta.id);\n const functions = useQuery(space, Filter.type(FunctionType));\n const workflows = useQuery(space, Filter.type(ComputeGraph));\n const scripts = useQuery(space, Filter.type(ScriptType));\n\n return useMemo(\n (): CustomInputMap => ({\n // Function selector.\n ['function' satisfies keyof FunctionTrigger]: (props) => {\n const getValue = useCallback(() => {\n const formValue = props.getValue();\n if (Ref.isRef(formValue)) {\n return formValue.dxn.toString() as string;\n }\n return undefined;\n }, [props]);\n\n const handleOnValueChange = useCallback(\n (_type: any, dxnString: string) => {\n const dxn = Type.DXN.parse(dxnString);\n if (dxn) {\n const ref = Ref.fromDXN(dxn);\n props.onValueChange('object', ref);\n }\n },\n [props.onValueChange],\n );\n\n return (\n <SelectInput\n {...props}\n getValue={getValue as any}\n onValueChange={handleOnValueChange}\n options={getWorkflowOptions(workflows).concat(getFunctionOptions(scripts, functions))}\n />\n );\n },\n\n // Spec selector.\n ['spec.kind' as const]: (props) => <SpecSelector {...props} readonly={readonlySpec ? 'disabled-input' : false} />,\n\n // TODO(wittjosiah): Copied from ViewEditor.\n // Query input editor.\n ['spec.query' as const]: (props) => {\n const { themeMode } = useThemeContext();\n const density = useDensityContext();\n const elevation = useElevationContext();\n const value = props.getValue() as any;\n\n // TODO(wittjosiah): Including props.onValueChange in deps causes infinite loop.\n const handleChange = useCallback(\n (text: string) => props.onValueChange('object', { ...value, string: text }),\n [],\n );\n\n const extensions = useMemo(\n () => [\n createBasicExtensions({ readOnly: readonlySpec, placeholder: t('query placeholder') }),\n createThemeExtensions({ themeMode }),\n ],\n [],\n );\n\n // TODO(wittjosiah): This is probably not the right way to do these styles.\n return (\n <Input.Root>\n <InputHeader label={props.label} />\n <Editor\n classNames={mx(\n inputTheme.input({ density, elevation }),\n 'flex items-center',\n 'focus-within:bg-focusSurface focus-within:border-separator focus-within:hover:bg-focusSurface',\n )}\n extensions={extensions}\n value={value.string}\n onChange={handleChange}\n />\n </Input.Root>\n );\n },\n\n // Function input editor.\n ['input' as const]: (props) => (\n <FunctionInputEditor {...props} functions={functions} onQueryRefOptions={onQueryRefOptions} />\n ),\n }),\n [workflows, scripts, functions, readonlySpec],\n );\n};\n\nconst getWorkflowOptions = (graphs: ComputeGraph[]) => {\n return graphs.map((graph) => ({ label: `compute-${graph.id}`, value: `dxn:echo:@:${graph.id}` }));\n};\n\nconst getFunctionOptions = (scripts: ScriptType[], functions: FunctionType[]) => {\n const getLabel = (fn: FunctionType) => scripts.find((s) => fn.source?.target?.id === s.id)?.name ?? fn.name;\n return functions.map((fn) => ({ label: getLabel(fn), value: `dxn:echo:@:${fn.id}` }));\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { Ref, Type } from '@dxos/echo';\nimport { type JsonPath } from '@dxos/echo/internal';\nimport { type FunctionType } from '@dxos/functions';\nimport { useOnTransition } from '@dxos/react-ui';\nimport { Form, type FormInputStateProps, type QueryRefOptions, useFormValues } from '@dxos/react-ui-form';\n\nexport type FunctionInputEditorProps = {\n functions: FunctionType[];\n onQueryRefOptions: QueryRefOptions;\n} & FormInputStateProps;\n\n/**\n * Editor component for function input parameters.\n */\nexport const FunctionInputEditor = ({\n functions,\n getValue,\n onValueChange,\n onQueryRefOptions,\n}: FunctionInputEditorProps) => {\n const selectedFunctionValue = useFormValues(['function' as JsonPath]);\n const selectedFunctionId = useMemo(() => {\n if (Ref.isRef(selectedFunctionValue)) {\n return selectedFunctionValue.dxn.toString().split('dxn:echo:@:').at(1);\n }\n }, [selectedFunctionValue]);\n\n const selectedFunction = useMemo(\n () => functions.find((fn) => fn.id === selectedFunctionId),\n [functions, selectedFunctionId],\n );\n\n useOnTransition(\n // Clear function parameter input when the function changes.\n selectedFunctionValue,\n (prevValue) => {\n if (!Ref.isRef(prevValue) || !Ref.isRef(selectedFunctionValue)) {\n return false;\n }\n\n return prevValue.dxn.toString() !== selectedFunctionValue.dxn.toString();\n },\n (currValue) => currValue !== undefined,\n () => onValueChange('object', {}),\n );\n\n const inputSchema = useMemo(() => selectedFunction?.inputSchema, [selectedFunction]);\n const effectSchema = useMemo(() => (inputSchema ? Type.toEffectSchema(inputSchema) : undefined), [inputSchema]);\n const propertyCount = inputSchema?.properties ? Object.keys(inputSchema.properties).length : 0;\n\n const values = useMemo(() => getValue() ?? {}, [getValue]);\n\n const handleValuesChanged = useCallback(\n (values: any) => {\n onValueChange('object', values);\n },\n [onValueChange],\n );\n\n if (selectedFunction === undefined || effectSchema === undefined || propertyCount === 0) {\n return null;\n }\n\n return (\n <>\n <h3 className='text-md'>Function parameters</h3>\n {/* TODO(ZaymonFC): Try using <FormFields /> internal component for this nesting.\n This would allow errors to flow up to the root context. */}\n <Form\n schema={effectSchema}\n values={values}\n onValuesChanged={handleValuesChanged}\n onQueryRefOptions={onQueryRefOptions}\n outerSpacing={false}\n />\n </>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { Filter, Query } from '@dxos/echo';\nimport { type FunctionTrigger, TriggerKinds, type TriggerType } from '@dxos/functions';\nimport { useTranslation } from '@dxos/react-ui';\nimport { type InputProps, SelectInput, useInputProps } from '@dxos/react-ui-form';\n\nimport { meta } from '../../meta';\n\nexport type SpecSelectorProps = InputProps;\n\nexport const SpecSelector = (props: SpecSelectorProps) => {\n const { t } = useTranslation(meta.id);\n const specProps = useInputProps(['spec' satisfies keyof FunctionTrigger]);\n\n const handleTypeChange = useCallback(\n (_type: any, value: string): TriggerType | undefined => {\n const getDefaultTriggerSpec = (kind: string) => {\n switch (kind) {\n case 'timer':\n return { kind: 'timer', cron: '' };\n case 'subscription':\n return {\n kind: 'subscription',\n query: {\n string: 'Query.select(Filter.nothing())',\n ast: Query.select(Filter.nothing()).ast,\n },\n };\n case 'queue':\n return { kind: 'queue', queue: 'dxn:' };\n case 'email':\n return { kind: 'email' };\n case 'webhook':\n return { kind: 'webhook' };\n default:\n return undefined;\n }\n };\n\n const defaultSpec = getDefaultTriggerSpec(value);\n if (!defaultSpec) {\n return;\n }\n\n // Update the entire spec object, not just the `spec.kind`.\n specProps.onValueChange('object', defaultSpec);\n },\n [specProps],\n );\n\n const options = useMemo(\n () =>\n TriggerKinds.map((kind) => ({\n value: kind,\n label: t(`trigger type ${kind}`),\n })),\n [t],\n );\n\n return <SelectInput {...props} options={options} onValueChange={handleTypeChange} />;\n};\n"],
5
- "mappings": ";;;;;;;AAIA,OAAOA,UAASC,eAAAA,cAAaC,WAAAA,gBAAe;AAE5C,SAASC,oBAAoB;AAC7B,SAASC,QAAAA,aAAY;AACrB,SAASC,iBAAiBC,cAAcC,kBAAkB;AAC1D,SAASC,UAAAA,SAAQC,OAAAA,MAAiBC,gBAAgB;AAClD,SAASC,OAAOC,mBAAmBC,qBAAqBC,iBAAiBC,kBAAAA,uBAAsB;AAC/F,SAASC,QAAQC,uBAAuBC,6BAA6B;AACrE,SAA8BC,QAAAA,OAAMC,aAAaC,eAAAA,cAAaC,gCAAgC;AAC9F,SAASC,YAAYC,UAAU;;;;ACT/B,OAAOC,SAASC,aAAaC,eAAe;AAE5C,SAASC,KAAKC,YAAY;AAG1B,SAASC,uBAAuB;AAChC,SAASC,MAAsDC,qBAAqB;AAU7E,IAAMC,sBAAsB,CAAC,EAClCC,WACAC,UACAC,eACAC,kBAAiB,MACQ;;;AACzB,UAAMC,wBAAwBC,cAAc;MAAC;KAAuB;AACpE,UAAMC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AAqB,CAACzB,SAAuBP,cAAAA;AACjD,QAAMgE,WAAW,CAACC,OAAqB1D,QAAQ2D,KAAK,CAACC,MAAMF,GAAGG,QAAQC,QAAQtE,OAAOoE,EAAEpE,EAAE,GAAGuE,QAAQL,GAAGK;AACvG,SAAOtE,UAAU8D,IAAI,CAACG,QAAQ;IAAEZ,OAAOW,SAASC,EAAAA;IAAKxB,OAAO,cAAcwB,GAAGlE,EAAE;EAAG,EAAA;AACpF;",
6
- "names": ["React", "useCallback", "useMemo", "ComputeGraph", "Type", "FunctionTrigger", "FunctionType", "ScriptType", "Filter", "Ref", "useQuery", "Input", "useDensityContext", "useElevationContext", "useThemeContext", "useTranslation", "Editor", "createBasicExtensions", "createThemeExtensions", "Form", "InputHeader", "SelectInput", "useRefQueryLookupHandler", "inputTheme", "mx", "React", "useCallback", "useMemo", "Ref", "Type", "useOnTransition", "Form", "useFormValues", "FunctionInputEditor", "functions", "getValue", "onValueChange", "onQueryRefOptions", "selectedFunctionValue", "useFormValues", "selectedFunctionId", "useMemo", "Ref", "isRef", "dxn", "toString", "split", "at", "selectedFunction", "find", "fn", "id", "useOnTransition", "prevValue", "currValue", "undefined", "inputSchema", "effectSchema", "Type", "toEffectSchema", "propertyCount", "properties", "Object", "keys", "length", "values", "handleValuesChanged", "useCallback", "h3", "className", "Form", "schema", "onValuesChanged", "outerSpacing", "React", "useCallback", "useMemo", "Filter", "Query", "TriggerKinds", "useTranslation", "SelectInput", "useInputProps", "SpecSelector", "props", "t", "useTranslation", "meta", "id", "specProps", "useInputProps", "handleTypeChange", "useCallback", "_type", "value", "getDefaultTriggerSpec", "kind", "cron", "query", "string", "ast", "Query", "select", "Filter", "nothing", "queue", "undefined", "defaultSpec", "onValueChange", "options", "useMemo", "TriggerKinds", "map", "label", "React", "SelectInput", "TriggerEditor", "space", "trigger", "readonlySpec", "onSave", "onCancel", "handleSave", "values", "handleRefQueryLookup", "useRefQueryLookupHandler", "Custom", "useCustomInputs", "onQueryRefOptions", "React", "Form", "outerSpacing", "schema", "FunctionTrigger", "t", "useTranslation", "meta", "id", "functions", "useQuery", "Filter", "type", "FunctionType", "workflows", "ComputeGraph", "scripts", "ScriptType", "useMemo", "props", "getValue", "useCallback", "formValue", "Ref", "isRef", "dxn", "toString", "undefined", "handleOnValueChange", "_type", "dxnString", "Type", "DXN", "parse", "ref", "fromDXN", "onValueChange", "SelectInput", "options", "getWorkflowOptions", "concat", "getFunctionOptions", "SpecSelector", "readonly", "themeMode", "useThemeContext", "density", "useDensityContext", "elevation", "useElevationContext", "value", "handleChange", "text", "string", "extensions", "createBasicExtensions", "readOnly", "placeholder", "createThemeExtensions", "Input", "Root", "InputHeader", "label", "Editor", "classNames", "mx", "inputTheme", "input", "onChange", "FunctionInputEditor", "graphs", "map", "graph", "getLabel", "fn", "find", "s", "source", "target", "name"]
7
- }
@@ -1,16 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
-
3
- // src/components/index.ts
4
- import { lazy } from "react";
5
- var AutomationPanel = lazy(() => import("./AutomationPanel-GHK5UG4K.mjs"));
6
- var AutomationSettings = lazy(() => import("./AutomationSettings-XENNIIZM.mjs"));
7
- var FunctionsContainer = lazy(() => import("./FunctionsContainer-ZKVOBUHV.mjs"));
8
- var FunctionsPanel = lazy(() => import("./FunctionsPanel-SAMRTELO.mjs"));
9
-
10
- export {
11
- AutomationPanel,
12
- AutomationSettings,
13
- FunctionsContainer,
14
- FunctionsPanel
15
- };
16
- //# sourceMappingURL=chunk-LWASMQIF.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport * from './TriggerEditor';\n\nexport const AutomationPanel = lazy(() => import('./AutomationPanel'));\nexport const AutomationSettings = lazy(() => import('./AutomationSettings'));\nexport const FunctionsContainer = lazy(() => import('./FunctionsContainer'));\nexport const FunctionsPanel = lazy(() => import('./FunctionsPanel'));\n"],
5
- "mappings": ";;;AAIA,SAASA,YAAY;AAId,IAAMC,kBAAkBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AAC1C,IAAMC,qBAAqBD,KAAK,MAAM,OAAO,mCAAA,CAAA;AAC7C,IAAME,qBAAqBF,KAAK,MAAM,OAAO,mCAAA,CAAA;AAC7C,IAAMG,iBAAiBH,KAAK,MAAM,OAAO,+BAAA,CAAA;",
6
- "names": ["lazy", "AutomationPanel", "lazy", "AutomationSettings", "FunctionsContainer", "FunctionsPanel"]
7
- }
@@ -1,54 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- AutomationCapabilities
4
- } from "./chunk-WHCSOUNN.mjs";
5
-
6
- // src/hooks/useComputeRuntimeCallback.ts
7
- import { useCallback } from "react";
8
- import { useCapability } from "@dxos/app-framework";
9
- var useComputeRuntimeCallback = (space, fn, deps) => {
10
- const computeRuntime = useCapability(AutomationCapabilities.ComputeRuntime);
11
- const runtime = space !== void 0 ? computeRuntime.getRuntime(space.id) : void 0;
12
- return useCallback(() => {
13
- if (!runtime) {
14
- throw new TypeError("Space not provided to useComputeRuntimeCallback");
15
- }
16
- return runtime.runPromise(fn());
17
- }, [
18
- runtime,
19
- ...deps ?? []
20
- ]);
21
- };
22
-
23
- // src/hooks/useTriggerRuntimeControls.ts
24
- import * as Effect from "effect/Effect";
25
- import { Filter } from "@dxos/echo";
26
- import { FunctionTrigger, TriggerDispatcher } from "@dxos/functions";
27
- import { useQuery } from "@dxos/react-client/echo";
28
- import { useAsyncState } from "@dxos/react-ui";
29
- var useTriggerRuntimeControls = (space) => {
30
- const triggers = useQuery(space, Filter.type(FunctionTrigger));
31
- const [isRunningState, setIsRunningState] = useAsyncState(useComputeRuntimeCallback(space, () => TriggerDispatcher.pipe(Effect.map((t) => t.running))));
32
- const start = useComputeRuntimeCallback(space, Effect.fnUntraced(function* () {
33
- const dispatcher = yield* TriggerDispatcher;
34
- yield* dispatcher.start();
35
- setIsRunningState(true);
36
- }));
37
- const stop = useComputeRuntimeCallback(space, Effect.fnUntraced(function* () {
38
- const dispatcher = yield* TriggerDispatcher;
39
- yield* dispatcher.stop();
40
- setIsRunningState(false);
41
- }));
42
- return {
43
- triggers,
44
- isRunning: isRunningState ?? false,
45
- start: () => void start(),
46
- stop: () => void stop()
47
- };
48
- };
49
-
50
- export {
51
- useComputeRuntimeCallback,
52
- useTriggerRuntimeControls
53
- };
54
- //# sourceMappingURL=chunk-QCA543ZR.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/hooks/useComputeRuntimeCallback.ts", "../../../src/hooks/useTriggerRuntimeControls.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Effect from 'effect/Effect';\nimport { useCallback } from 'react';\n\nimport { useCapability } from '@dxos/app-framework';\nimport type { Space } from '@dxos/react-client/echo';\n\nimport { AutomationCapabilities } from '../capabilities';\n\n/**\n * Create an effectful function that has access to compute services\n */\nexport const useComputeRuntimeCallback = <T>(\n space: Space | undefined,\n fn: () => Effect.Effect<T, any, AutomationCapabilities.ComputeServices>,\n deps?: React.DependencyList,\n): (() => Promise<T>) => {\n const computeRuntime = useCapability(AutomationCapabilities.ComputeRuntime);\n const runtime = space !== undefined ? computeRuntime.getRuntime(space.id) : undefined;\n\n return useCallback(() => {\n if (!runtime) {\n throw new TypeError('Space not provided to useComputeRuntimeCallback');\n }\n return runtime.runPromise(fn());\n }, [runtime, ...(deps ?? [])]);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Filter } from '@dxos/echo';\nimport { FunctionTrigger, TriggerDispatcher } from '@dxos/functions';\nimport { type Space, useQuery } from '@dxos/react-client/echo';\nimport { useAsyncState } from '@dxos/react-ui';\n\nimport { useComputeRuntimeCallback } from './useComputeRuntimeCallback';\n\ninterface TriggerRuntimeControls {\n triggers: FunctionTrigger[];\n isRunning: boolean;\n start: () => void;\n stop: () => void;\n}\n\nexport const useTriggerRuntimeControls = (space: Space | undefined): TriggerRuntimeControls => {\n const triggers = useQuery(space, Filter.type(FunctionTrigger));\n\n const [isRunningState, setIsRunningState] = useAsyncState(\n useComputeRuntimeCallback(space, () => TriggerDispatcher.pipe(Effect.map((t) => t.running))),\n );\n\n const start = useComputeRuntimeCallback(\n space,\n Effect.fnUntraced(function* () {\n const dispatcher = yield* TriggerDispatcher;\n yield* dispatcher.start();\n setIsRunningState(true);\n }),\n );\n\n const stop = useComputeRuntimeCallback(\n space,\n Effect.fnUntraced(function* () {\n const dispatcher = yield* TriggerDispatcher;\n yield* dispatcher.stop();\n setIsRunningState(false);\n }),\n );\n\n return {\n triggers,\n isRunning: isRunningState ?? false,\n start: () => void start(),\n stop: () => void stop(),\n };\n};\n"],
5
- "mappings": ";;;;;;AAKA,SAASA,mBAAmB;AAE5B,SAASC,qBAAqB;AAQvB,IAAMC,4BAA4B,CACvCC,OACAC,IACAC,SAAAA;AAEA,QAAMC,iBAAiBC,cAAcC,uBAAuBC,cAAc;AAC1E,QAAMC,UAAUP,UAAUQ,SAAYL,eAAeM,WAAWT,MAAMU,EAAE,IAAIF;AAE5E,SAAOG,YAAY,MAAA;AACjB,QAAI,CAACJ,SAAS;AACZ,YAAM,IAAIK,UAAU,iDAAA;IACtB;AACA,WAAOL,QAAQM,WAAWZ,GAAAA,CAAAA;EAC5B,GAAG;IAACM;OAAaL,QAAQ,CAAA;GAAI;AAC/B;;;ACzBA,YAAYY,YAAY;AAExB,SAASC,cAAc;AACvB,SAASC,iBAAiBC,yBAAyB;AACnD,SAAqBC,gBAAgB;AACrC,SAASC,qBAAqB;AAWvB,IAAMC,4BAA4B,CAACC,UAAAA;AACxC,QAAMC,WAAWC,SAASF,OAAOG,OAAOC,KAAKC,eAAAA,CAAAA;AAE7C,QAAM,CAACC,gBAAgBC,iBAAAA,IAAqBC,cAC1CC,0BAA0BT,OAAO,MAAMU,kBAAkBC,KAAYC,WAAI,CAACC,MAAMA,EAAEC,OAAO,CAAA,CAAA,CAAA;AAG3F,QAAMC,QAAQN,0BACZT,OACOgB,kBAAW,aAAA;AAChB,UAAMC,aAAa,OAAOP;AAC1B,WAAOO,WAAWF,MAAK;AACvBR,sBAAkB,IAAA;EACpB,CAAA,CAAA;AAGF,QAAMW,OAAOT,0BACXT,OACOgB,kBAAW,aAAA;AAChB,UAAMC,aAAa,OAAOP;AAC1B,WAAOO,WAAWC,KAAI;AACtBX,sBAAkB,KAAA;EACpB,CAAA,CAAA;AAGF,SAAO;IACLN;IACAkB,WAAWb,kBAAkB;IAC7BS,OAAO,MAAM,KAAKA,MAAAA;IAClBG,MAAM,MAAM,KAAKA,KAAAA;EACnB;AACF;",
6
- "names": ["useCallback", "useCapability", "useComputeRuntimeCallback", "space", "fn", "deps", "computeRuntime", "useCapability", "AutomationCapabilities", "ComputeRuntime", "runtime", "undefined", "getRuntime", "id", "useCallback", "TypeError", "runPromise", "Effect", "Filter", "FunctionTrigger", "TriggerDispatcher", "useQuery", "useAsyncState", "useTriggerRuntimeControls", "space", "triggers", "useQuery", "Filter", "type", "FunctionTrigger", "isRunningState", "setIsRunningState", "useAsyncState", "useComputeRuntimeCallback", "TriggerDispatcher", "pipe", "map", "t", "running", "start", "fnUntraced", "dispatcher", "stop", "isRunning"]
7
- }
@@ -1,16 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
-
3
- // src/capabilities/index.ts
4
- import { lazy } from "@dxos/app-framework";
5
- var AppGraphBuilder = lazy(() => import("./app-graph-builder-TR2WXPX2.mjs"));
6
- var ComputeRuntime = lazy(() => import("./compute-runtime-CMEPAYND.mjs"));
7
- var IntentResolver = lazy(() => import("./intent-resolver-2LGBVXT5.mjs"));
8
- var ReactSurface = lazy(() => import("./react-surface-YDJ43B3N.mjs"));
9
-
10
- export {
11
- AppGraphBuilder,
12
- ComputeRuntime,
13
- IntentResolver,
14
- ReactSurface
15
- };
16
- //# sourceMappingURL=chunk-U7LJXQS4.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = lazy(() => import('./app-graph-builder'));\nexport const ComputeRuntime = lazy(() => import('./compute-runtime'));\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n\nexport * from './capabilities';\n"],
5
- "mappings": ";;;AAIA,SAASA,YAAY;AAEd,IAAMC,kBAAkBC,KAAK,MAAM,OAAO,kCAAA,CAAA;AAC1C,IAAMC,iBAAiBD,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAME,iBAAiBF,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMG,eAAeH,KAAK,MAAM,OAAO,8BAAA,CAAA;",
6
- "names": ["lazy", "AppGraphBuilder", "lazy", "ComputeRuntime", "IntentResolver", "ReactSurface"]
7
- }
@@ -1,16 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- meta
4
- } from "./chunk-5MQJPJR2.mjs";
5
-
6
- // src/capabilities/capabilities.ts
7
- import { defineCapability } from "@dxos/app-framework";
8
- (function(AutomationCapabilities2) {
9
- AutomationCapabilities2.ComputeRuntime = defineCapability(`${meta.id}/capability/compute-runtime`);
10
- })(AutomationCapabilities || (AutomationCapabilities = {}));
11
- var AutomationCapabilities;
12
-
13
- export {
14
- AutomationCapabilities
15
- };
16
- //# sourceMappingURL=chunk-WHCSOUNN.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/capabilities.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as ManagedRuntime from 'effect/ManagedRuntime';\n\nimport { type AiService, type ToolExecutionService, type ToolResolverService } from '@dxos/ai';\nimport { defineCapability } from '@dxos/app-framework';\nimport type {\n CredentialsService,\n DatabaseService,\n FunctionInvocationService,\n InvocationTracer,\n QueueService,\n TriggerDispatcher,\n TriggerStateStore,\n} from '@dxos/functions';\nimport type { SpaceId } from '@dxos/keys';\n\nimport { meta } from '../meta';\n\nexport namespace AutomationCapabilities {\n /**\n * Service stack for executing agents, functions, and triggers.\n */\n export type ComputeServices =\n | TriggerDispatcher\n | AiService.AiService\n | DatabaseService\n | QueueService\n | CredentialsService\n | FunctionInvocationService\n | InvocationTracer\n | TriggerStateStore\n // TODO(dmaretskyi): Those should be provided at AI-chat call site.\n | ToolResolverService\n | ToolExecutionService;\n\n export type ComputeRuntime = ManagedRuntime.ManagedRuntime<AutomationCapabilities.ComputeServices, never>;\n export interface ComputeRuntimeProvider {\n getRuntime(spaceId: SpaceId): ComputeRuntime;\n }\n\n /**\n * Runtime for executing agents, functions, and triggers.\n */\n export const ComputeRuntime = defineCapability<ComputeRuntimeProvider>(`${meta.id}/capability/compute-runtime`);\n}\n"],
5
- "mappings": ";;;;;;AAOA,SAASA,wBAAwB;UAchBC,yBAAAA;0BAyBFC,iBAAiBC,iBAAyC,GAAGC,KAAKC,EAAE,6BAA6B;AAChH,GA1BiBJ,2BAAAA,yBAAAA,CAAAA,EAAAA;;",
6
- "names": ["defineCapability", "AutomationCapabilities", "ComputeRuntime", "defineCapability", "meta", "id"]
7
- }
@@ -1,95 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- meta
4
- } from "./chunk-5MQJPJR2.mjs";
5
-
6
- // src/components/FunctionsPanel/FunctionsPanel.tsx
7
- import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
8
- import * as Schema from "effect/Schema";
9
- import React, { useCallback, useMemo } from "react";
10
- import { LayoutAction, createIntent, useIntentDispatcher } from "@dxos/app-framework";
11
- import { FunctionType, ScriptType } from "@dxos/functions";
12
- import { Filter, fullyQualifiedId, useQuery } from "@dxos/react-client/echo";
13
- import { Button, useTranslation } from "@dxos/react-ui";
14
- import { controlItemClasses } from "@dxos/react-ui-form";
15
- import { List } from "@dxos/react-ui-list";
16
- import { ghostHover, mx } from "@dxos/react-ui-theme";
17
- var grid = "grid grid-cols-[1fr_auto] min-bs-[2.5rem]";
18
- var FunctionsPanel = ({ space }) => {
19
- var _effect = _useSignals();
20
- try {
21
- const { t } = useTranslation(meta.id);
22
- const functions = useQuery(space, Filter.type(FunctionType));
23
- const scripts = useQuery(space, Filter.type(ScriptType));
24
- const { dispatchPromise: dispatch } = useIntentDispatcher();
25
- const functionToScriptMap = useMemo(() => functions.reduce((map, func) => {
26
- const scriptId = func.source?.target?.id;
27
- if (scriptId) {
28
- const script = scripts.find((s) => s.id === scriptId);
29
- if (script) {
30
- map[func.id] = script;
31
- }
32
- }
33
- return map;
34
- }, {}), [
35
- functions,
36
- scripts
37
- ]);
38
- const getScriptName = useCallback((func) => {
39
- const script = functionToScriptMap[func.id];
40
- return script?.name;
41
- }, [
42
- functionToScriptMap
43
- ]);
44
- const handleGoToScript = useCallback((func) => {
45
- const script = functionToScriptMap[func.id];
46
- if (script) {
47
- void dispatch(createIntent(LayoutAction.Open, {
48
- part: "main",
49
- subject: [
50
- fullyQualifiedId(script)
51
- ]
52
- }));
53
- }
54
- }, [
55
- functionToScriptMap,
56
- dispatch
57
- ]);
58
- return /* @__PURE__ */ React.createElement("div", {
59
- role: "none",
60
- className: mx(controlItemClasses)
61
- }, functions.length > 0 && /* @__PURE__ */ React.createElement(List.Root, {
62
- items: functions,
63
- isItem: Schema.is(FunctionType),
64
- getId: (func) => func.id
65
- }, ({ items }) => /* @__PURE__ */ React.createElement("div", {
66
- role: "list",
67
- className: "flex flex-col w-full"
68
- }, items?.map((func) => /* @__PURE__ */ React.createElement(List.Item, {
69
- key: func.id,
70
- item: func,
71
- classNames: mx(grid, ghostHover, "items-center", "pli-2", "min-bs-[3rem]")
72
- }, /* @__PURE__ */ React.createElement("div", {
73
- className: "flex flex-col truncate"
74
- }, /* @__PURE__ */ React.createElement(List.ItemTitle, {
75
- classNames: "truncate"
76
- }, func.name), getScriptName(func) && /* @__PURE__ */ React.createElement("div", {
77
- className: "text-xs text-description truncate"
78
- }, getScriptName(func))), functionToScriptMap[func.id] && /* @__PURE__ */ React.createElement(Button, {
79
- onClick: () => handleGoToScript(func)
80
- }, t("go to function source button label")))))), functions.length === 0 && /* @__PURE__ */ React.createElement("div", {
81
- className: "text-center plb-4 text-gray-500"
82
- }, t("no functions found")));
83
- } finally {
84
- _effect.f();
85
- }
86
- };
87
-
88
- // src/components/FunctionsPanel/index.ts
89
- var FunctionsPanel_default = FunctionsPanel;
90
-
91
- export {
92
- FunctionsPanel,
93
- FunctionsPanel_default
94
- };
95
- //# sourceMappingURL=chunk-YQXW3JXD.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/FunctionsPanel/FunctionsPanel.tsx", "../../../src/components/FunctionsPanel/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport React, { useCallback, useMemo } from 'react';\n\nimport { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';\nimport { FunctionType, ScriptType } from '@dxos/functions';\nimport { Filter, type Space, fullyQualifiedId, useQuery } from '@dxos/react-client/echo';\nimport { Button, useTranslation } from '@dxos/react-ui';\nimport { controlItemClasses } from '@dxos/react-ui-form';\nimport { List } from '@dxos/react-ui-list';\nimport { ghostHover, mx } from '@dxos/react-ui-theme';\n\nimport { meta } from '../../meta';\n\nconst grid = 'grid grid-cols-[1fr_auto] min-bs-[2.5rem]';\n\nexport type FunctionsPanelProps = {\n space: Space;\n};\n\nexport const FunctionsPanel = ({ space }: FunctionsPanelProps) => {\n const { t } = useTranslation(meta.id);\n const functions = useQuery(space, Filter.type(FunctionType));\n const scripts = useQuery(space, Filter.type(ScriptType));\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n\n const functionToScriptMap = useMemo(\n () =>\n functions.reduce(\n (map, func) => {\n const scriptId = func.source?.target?.id;\n if (scriptId) {\n const script = scripts.find((s) => s.id === scriptId);\n if (script) {\n map[func.id] = script;\n }\n }\n return map;\n },\n {} as Record<string, ScriptType>,\n ),\n [functions, scripts],\n );\n\n const getScriptName = useCallback(\n (func: FunctionType) => {\n const script = functionToScriptMap[func.id];\n return script?.name;\n },\n [functionToScriptMap],\n );\n\n const handleGoToScript = useCallback(\n (func: FunctionType) => {\n const script = functionToScriptMap[func.id];\n if (script) {\n void dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [fullyQualifiedId(script)] }));\n }\n },\n [functionToScriptMap, dispatch],\n );\n\n return (\n <div role='none' className={mx(controlItemClasses)}>\n {functions.length > 0 && (\n <List.Root<FunctionType> items={functions} isItem={Schema.is(FunctionType)} getId={(func) => func.id}>\n {({ items }) => (\n <div role='list' className='flex flex-col w-full'>\n {items?.map((func) => (\n <List.Item<FunctionType>\n key={func.id}\n item={func}\n classNames={mx(grid, ghostHover, 'items-center', 'pli-2', 'min-bs-[3rem]')}\n >\n <div className='flex flex-col truncate'>\n <List.ItemTitle classNames='truncate'>{func.name}</List.ItemTitle>\n {getScriptName(func) && (\n <div className='text-xs text-description truncate'>{getScriptName(func)}</div>\n )}\n </div>\n {functionToScriptMap[func.id] && (\n <Button onClick={() => handleGoToScript(func)}>{t('go to function source button label')}</Button>\n )}\n </List.Item>\n ))}\n </div>\n )}\n </List.Root>\n )}\n\n {functions.length === 0 && <div className='text-center plb-4 text-gray-500'>{t('no functions found')}</div>}\n </div>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FunctionsPanel } from './FunctionsPanel';\n\nexport * from './FunctionsPanel';\nexport default FunctionsPanel;\n"],
5
- "mappings": ";;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,SAASC,aAAaC,eAAe;AAE5C,SAASC,cAAcC,cAAcC,2BAA2B;AAChE,SAASC,cAAcC,kBAAkB;AAC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,UAAUoC,SAAS,KAClB,sBAAA,cAACC,KAAKC,MAAI;MAAeC,OAAOvC;MAAWwC,QAAeC,UAAGrC,YAAAA;MAAesC,OAAO,CAAC5B,SAASA,KAAKf;OAC/F,CAAC,EAAEwC,MAAK,MACP,sBAAA,cAACR,OAAAA;MAAIC,MAAK;MAAOC,WAAU;OACxBM,OAAO1B,IAAI,CAACC,SACX,sBAAA,cAACuB,KAAKM,MAAI;MACRC,KAAK9B,KAAKf;MACV8C,MAAM/B;MACNgC,YAAYZ,GAAGzC,MAAMsD,YAAY,gBAAgB,SAAS,eAAA;OAE1D,sBAAA,cAAChB,OAAAA;MAAIE,WAAU;OACb,sBAAA,cAACI,KAAKW,WAAS;MAACF,YAAW;OAAYhC,KAAKS,IAAI,GAC/CF,cAAcP,IAAAA,KACb,sBAAA,cAACiB,OAAAA;MAAIE,WAAU;OAAqCZ,cAAcP,IAAAA,CAAAA,CAAAA,GAGrEJ,oBAAoBI,KAAKf,EAAE,KAC1B,sBAAA,cAACkD,QAAAA;MAAOC,SAAS,MAAM1B,iBAAiBV,IAAAA;OAAQlB,EAAE,oCAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAS/DI,UAAUoC,WAAW,KAAK,sBAAA,cAACL,OAAAA;MAAIE,WAAU;OAAmCrC,EAAE,oBAAA,CAAA,CAAA;;;;AAGrF;;;ACzFA,IAAA,yBAAeuD;",
6
- "names": ["Schema", "React", "useCallback", "useMemo", "LayoutAction", "createIntent", "useIntentDispatcher", "FunctionType", "ScriptType", "Filter", "fullyQualifiedId", "useQuery", "Button", "useTranslation", "controlItemClasses", "List", "ghostHover", "mx", "grid", "FunctionsPanel", "space", "t", "useTranslation", "meta", "id", "functions", "useQuery", "Filter", "type", "FunctionType", "scripts", "ScriptType", "dispatchPromise", "dispatch", "useIntentDispatcher", "functionToScriptMap", "useMemo", "reduce", "map", "func", "scriptId", "source", "target", "script", "find", "s", "getScriptName", "useCallback", "name", "handleGoToScript", "createIntent", "LayoutAction", "Open", "part", "subject", "fullyQualifiedId", "div", "role", "className", "mx", "controlItemClasses", "length", "List", "Root", "items", "isItem", "is", "getId", "Item", "key", "item", "classNames", "ghostHover", "ItemTitle", "Button", "onClick", "FunctionsPanel"]
7
- }