@powerhousedao/workflow 6.2.3-dev.24 → 6.2.3-dev.25

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 (306) hide show
  1. package/README.md +37 -0
  2. package/dist/browser/BlockSelector-QQgOCVH3.js +1355 -0
  3. package/dist/browser/BlockSelector-QQgOCVH3.js.map +1 -0
  4. package/dist/browser/{PieceMarkdown-CZYNY1qQ.js → PieceMarkdown-BY_aQD0M.js} +120 -86
  5. package/dist/browser/PieceMarkdown-BY_aQD0M.js.map +1 -0
  6. package/dist/browser/assets/{entry-CSJBrcX5.js → entry-GDzXcBs1.js} +2 -3
  7. package/dist/browser/assets/{projection-entry-D67cdPsg.js → projection-entry-BJpyPvov.js} +7 -13
  8. package/dist/browser/{connection-DEe5aDuU.js → connection-BUum0hJI.js} +2 -2
  9. package/dist/browser/{connection-DEe5aDuU.js.map → connection-BUum0hJI.js.map} +1 -1
  10. package/dist/browser/connection-form-XKR4zQgQ.js +533 -0
  11. package/dist/browser/connection-form-XKR4zQgQ.js.map +1 -0
  12. package/dist/browser/data-tree-DKrDFeQg.js +1896 -0
  13. package/dist/browser/data-tree-DKrDFeQg.js.map +1 -0
  14. package/dist/browser/document-models/connection/index.js +2 -2
  15. package/dist/browser/document-models/index.js +3 -3
  16. package/dist/browser/document-models/workflow/index.js +2 -2
  17. package/dist/browser/{document-models-BYheX-te.js → document-models-C6ebrsd9.js} +3 -3
  18. package/dist/browser/{document-models-BYheX-te.js.map → document-models-C6ebrsd9.js.map} +1 -1
  19. package/dist/browser/{editor-D0sdUxJa.js → editor-BxtfhdPP.js} +3348 -1610
  20. package/dist/browser/editor-BxtfhdPP.js.map +1 -0
  21. package/dist/browser/editor-C_E_JTp6.js +257 -0
  22. package/dist/browser/editor-C_E_JTp6.js.map +1 -0
  23. package/dist/browser/editor-kbIdHU7F.js +1511 -0
  24. package/dist/browser/editor-kbIdHU7F.js.map +1 -0
  25. package/dist/browser/editors/connection-editor/module.js +1 -1
  26. package/dist/browser/editors/connection-editor/module.js.map +1 -1
  27. package/dist/browser/editors/workflow-editor/module.js +1 -1
  28. package/dist/browser/editors/workflow-editor/module.js.map +1 -1
  29. package/dist/browser/editors/workflow-studio/module.js +1 -1
  30. package/dist/browser/editors/workflow-studio/module.js.map +1 -1
  31. package/dist/browser/index.js +7 -5
  32. package/dist/browser/index.js.map +1 -1
  33. package/dist/browser/{module-CYQnNZWl.js → module-Bkms70LV.js} +3 -3
  34. package/dist/browser/{module-CYQnNZWl.js.map → module-Bkms70LV.js.map} +1 -1
  35. package/dist/{node/module-IA-Ay7ig.mjs → browser/module-jDZ4pq3W.js} +2 -2
  36. package/dist/browser/{module-12vI18HY.js.map → module-jDZ4pq3W.js.map} +1 -1
  37. package/dist/browser/piece-auth-Z4mZEOtL.js +113 -0
  38. package/dist/browser/piece-auth-Z4mZEOtL.js.map +1 -0
  39. package/dist/browser/reactor/index.js +2 -2
  40. package/dist/browser/{chunk-BoAXSpZd.js → rolldown-runtime-DC62tzP2.js} +2 -2
  41. package/dist/browser/{runtime-api-DKlnn45K.js → runtime-api-xwvg5PzA.js} +40 -123
  42. package/dist/browser/runtime-api-xwvg5PzA.js.map +1 -0
  43. package/dist/browser/style.css +26 -0
  44. package/dist/browser/trigger-text-CdNxQOHw.js +551 -0
  45. package/dist/browser/trigger-text-CdNxQOHw.js.map +1 -0
  46. package/dist/browser/upgrade-manifests-BLrv3cf2.js +8 -0
  47. package/dist/browser/{upgrade-manifests-Cnpfo6kC.js.map → upgrade-manifests-BLrv3cf2.js.map} +1 -1
  48. package/dist/browser/{workflow-CFZUezoY.js → workflow-CGtVlhr8.js} +2 -2
  49. package/dist/browser/{workflow-CFZUezoY.js.map → workflow-CGtVlhr8.js.map} +1 -1
  50. package/dist/node/BlockSelector-COZm6-ev.mjs +1355 -0
  51. package/dist/node/BlockSelector-COZm6-ev.mjs.map +1 -0
  52. package/dist/node/{PieceMarkdown-D9nI2gI2.mjs → PieceMarkdown-Ejo9UTqJ.mjs} +113 -81
  53. package/dist/node/PieceMarkdown-Ejo9UTqJ.mjs.map +1 -0
  54. package/dist/node/{connection-DGsS2Db3.mjs → connection-D544oqVW.mjs} +2 -2
  55. package/dist/node/{connection-DGsS2Db3.mjs.map → connection-D544oqVW.mjs.map} +1 -1
  56. package/dist/node/connection-form-BLduFusc.mjs +533 -0
  57. package/dist/node/connection-form-BLduFusc.mjs.map +1 -0
  58. package/dist/node/data-tree-CmiGqG7C.mjs +1903 -0
  59. package/dist/node/data-tree-CmiGqG7C.mjs.map +1 -0
  60. package/dist/node/document-models/connection/index.mjs +2 -2
  61. package/dist/node/document-models/index.mjs +3 -3
  62. package/dist/node/document-models/workflow/index.mjs +2 -2
  63. package/dist/node/editor-BNgGzvAL.mjs +1511 -0
  64. package/dist/node/editor-BNgGzvAL.mjs.map +1 -0
  65. package/dist/node/{editor-sVzt1o51.mjs → editor-CLDjPgdl.mjs} +3200 -1508
  66. package/dist/node/editor-CLDjPgdl.mjs.map +1 -0
  67. package/dist/node/editor-CN4PEGrW.mjs +257 -0
  68. package/dist/node/editor-CN4PEGrW.mjs.map +1 -0
  69. package/dist/node/editors/connection-editor/module.mjs +1 -1
  70. package/dist/node/editors/connection-editor/module.mjs.map +1 -1
  71. package/dist/node/editors/workflow-editor/module.mjs +1 -1
  72. package/dist/node/editors/workflow-editor/module.mjs.map +1 -1
  73. package/dist/node/editors/workflow-studio/module.mjs +1 -1
  74. package/dist/node/editors/workflow-studio/module.mjs.map +1 -1
  75. package/dist/node/index.mjs +8 -6
  76. package/dist/node/index.mjs.map +1 -1
  77. package/dist/{browser/module-12vI18HY.js → node/module-BMwJQh65.mjs} +2 -2
  78. package/dist/node/{module-IA-Ay7ig.mjs.map → module-BMwJQh65.mjs.map} +1 -1
  79. package/dist/node/{module-IRMgzJC1.mjs → module-DuxxhgKs.mjs} +3 -3
  80. package/dist/node/{module-IRMgzJC1.mjs.map → module-DuxxhgKs.mjs.map} +1 -1
  81. package/dist/node/piece-auth-Z4mZEOtL.mjs +113 -0
  82. package/dist/node/piece-auth-Z4mZEOtL.mjs.map +1 -0
  83. package/dist/node/pieces/index.mjs.map +1 -1
  84. package/dist/node/pieces/reactor/index.mjs +226 -488
  85. package/dist/node/pieces/reactor/index.mjs.map +1 -1
  86. package/dist/node/{chunk-BSw8zbkd.mjs → rolldown-runtime-BMI-E3GI.mjs} +11 -4
  87. package/dist/node/{runtime-api-CtvvFHut.mjs → runtime-api-xwvg5PzA.mjs} +40 -123
  88. package/dist/node/runtime-api-xwvg5PzA.mjs.map +1 -0
  89. package/dist/node/style.css +26 -0
  90. package/dist/node/trigger-text-qj_U3Qzd.mjs +551 -0
  91. package/dist/node/trigger-text-qj_U3Qzd.mjs.map +1 -0
  92. package/dist/node/upgrade-manifests-C1sl_M-H.mjs +8 -0
  93. package/dist/node/{upgrade-manifests-3VN0Bfcf.mjs.map → upgrade-manifests-C1sl_M-H.mjs.map} +1 -1
  94. package/dist/node/{workflow-fFvyypuu.mjs → workflow-C-uuQPnf.mjs} +2 -2
  95. package/dist/node/{workflow-fFvyypuu.mjs.map → workflow-C-uuQPnf.mjs.map} +1 -1
  96. package/dist/style.css +927 -252
  97. package/dist/types/document-models/connection/upgrades/versions.d.ts.map +1 -1
  98. package/dist/types/document-models/connection/v1/actions.d.ts +6 -10
  99. package/dist/types/document-models/connection/v1/actions.d.ts.map +1 -1
  100. package/dist/types/document-models/connection/v1/gen/config/creators.d.ts.map +1 -1
  101. package/dist/types/document-models/connection/v1/gen/config/error.d.ts.map +1 -1
  102. package/dist/types/document-models/connection/v1/gen/connection/creators.d.ts.map +1 -1
  103. package/dist/types/document-models/connection/v1/gen/health/creators.d.ts.map +1 -1
  104. package/dist/types/document-models/connection/v1/gen/schema/zod.d.ts.map +1 -1
  105. package/dist/types/document-models/connection/v1/module.d.ts +6 -10
  106. package/dist/types/document-models/connection/v1/module.d.ts.map +1 -1
  107. package/dist/types/document-models/connection/v1/tests/document-model.test.d.ts +0 -8
  108. package/dist/types/document-models/connection/v1/tests/document-model.test.d.ts.map +1 -1
  109. package/dist/types/document-models/document-models.d.ts +15 -23
  110. package/dist/types/document-models/document-models.d.ts.map +1 -1
  111. package/dist/types/document-models/workflow/upgrades/versions.d.ts.map +1 -1
  112. package/dist/types/document-models/workflow/v1/actions.d.ts +9 -13
  113. package/dist/types/document-models/workflow/v1/actions.d.ts.map +1 -1
  114. package/dist/types/document-models/workflow/v1/gen/edges/creators.d.ts.map +1 -1
  115. package/dist/types/document-models/workflow/v1/gen/edges/error.d.ts.map +1 -1
  116. package/dist/types/document-models/workflow/v1/gen/policy/creators.d.ts.map +1 -1
  117. package/dist/types/document-models/workflow/v1/gen/runtime/creators.d.ts.map +1 -1
  118. package/dist/types/document-models/workflow/v1/gen/schema/zod.d.ts.map +1 -1
  119. package/dist/types/document-models/workflow/v1/gen/steps/creators.d.ts.map +1 -1
  120. package/dist/types/document-models/workflow/v1/gen/steps/error.d.ts.map +1 -1
  121. package/dist/types/document-models/workflow/v1/gen/trigger/creators.d.ts.map +1 -1
  122. package/dist/types/document-models/workflow/v1/gen/trigger/error.d.ts.map +1 -1
  123. package/dist/types/document-models/workflow/v1/gen/variables/creators.d.ts.map +1 -1
  124. package/dist/types/document-models/workflow/v1/gen/variables/error.d.ts.map +1 -1
  125. package/dist/types/document-models/workflow/v1/gen/workflow/creators.d.ts.map +1 -1
  126. package/dist/types/document-models/workflow/v1/module.d.ts +9 -13
  127. package/dist/types/document-models/workflow/v1/module.d.ts.map +1 -1
  128. package/dist/types/document-models/workflow/v1/tests/document-model.test.d.ts +0 -8
  129. package/dist/types/document-models/workflow/v1/tests/document-model.test.d.ts.map +1 -1
  130. package/dist/types/editors/connection-editor/ConnectionToolbar.d.ts +2 -0
  131. package/dist/types/editors/connection-editor/ConnectionToolbar.d.ts.map +1 -1
  132. package/dist/types/editors/connection-editor/UsedBy.d.ts +6 -0
  133. package/dist/types/editors/connection-editor/UsedBy.d.ts.map +1 -0
  134. package/dist/types/editors/connection-editor/connection-callbacks.d.ts.map +1 -1
  135. package/dist/types/editors/connection-editor/connection-callbacks.test.d.ts +2 -0
  136. package/dist/types/editors/connection-editor/connection-callbacks.test.d.ts.map +1 -0
  137. package/dist/types/editors/connection-editor/connection-form.d.ts +5 -1
  138. package/dist/types/editors/connection-editor/connection-form.d.ts.map +1 -1
  139. package/dist/types/editors/connection-editor/connection-usage.d.ts.map +1 -0
  140. package/dist/types/editors/connection-editor/connection-usage.test.d.ts.map +1 -0
  141. package/dist/types/editors/connection-editor/editor.d.ts.map +1 -1
  142. package/dist/types/editors/connection-editor/piece-auth.d.ts +2 -0
  143. package/dist/types/editors/connection-editor/piece-auth.d.ts.map +1 -1
  144. package/dist/types/editors/connection-editor/status.d.ts +3 -1
  145. package/dist/types/editors/connection-editor/status.d.ts.map +1 -1
  146. package/dist/types/editors/shared/DocumentErrorBoundary.d.ts.map +1 -1
  147. package/dist/types/editors/shared/controls.d.ts +98 -0
  148. package/dist/types/editors/shared/controls.d.ts.map +1 -0
  149. package/dist/types/editors/shared/data-tree.d.ts +5 -0
  150. package/dist/types/editors/shared/data-tree.d.ts.map +1 -0
  151. package/dist/types/editors/shared/data-viewer.d.ts +7 -0
  152. package/dist/types/editors/shared/data-viewer.d.ts.map +1 -0
  153. package/dist/types/editors/shared/editor-chrome.d.ts +7 -0
  154. package/dist/types/editors/shared/editor-chrome.d.ts.map +1 -0
  155. package/dist/types/editors/shared/icons.d.ts +36 -0
  156. package/dist/types/editors/shared/icons.d.ts.map +1 -0
  157. package/dist/types/editors/workflow-editor/editor.d.ts.map +1 -1
  158. package/dist/types/editors/workflow-editor/runtime-api.d.ts +2 -0
  159. package/dist/types/editors/workflow-editor/runtime-api.d.ts.map +1 -1
  160. package/dist/types/editors/workflow-editor/ui/ActionListEditor.d.ts.map +1 -1
  161. package/dist/types/editors/workflow-editor/ui/Autocomplete.d.ts +1 -0
  162. package/dist/types/editors/workflow-editor/ui/Autocomplete.d.ts.map +1 -1
  163. package/dist/types/editors/workflow-editor/ui/BlockSelector.d.ts +1 -0
  164. package/dist/types/editors/workflow-editor/ui/BlockSelector.d.ts.map +1 -1
  165. package/dist/types/editors/workflow-editor/ui/ConnectionField.d.ts.map +1 -1
  166. package/dist/types/editors/workflow-editor/ui/CreateConnectionModal.d.ts +1 -1
  167. package/dist/types/editors/workflow-editor/ui/CreateConnectionModal.d.ts.map +1 -1
  168. package/dist/types/editors/workflow-editor/ui/ExpressionPicker.d.ts.map +1 -1
  169. package/dist/types/editors/workflow-editor/ui/PieceMarkdown.d.ts.map +1 -1
  170. package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts.map +1 -1
  171. package/dist/types/editors/workflow-editor/ui/ScheduleBuilder.d.ts +5 -0
  172. package/dist/types/editors/workflow-editor/ui/ScheduleBuilder.d.ts.map +1 -0
  173. package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts +1 -0
  174. package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts.map +1 -1
  175. package/dist/types/editors/workflow-editor/ui/WorkflowCanvas.d.ts.map +1 -1
  176. package/dist/types/editors/workflow-editor/ui/WorkflowEditorApp.d.ts +3 -0
  177. package/dist/types/editors/workflow-editor/ui/WorkflowEditorApp.d.ts.map +1 -1
  178. package/dist/types/editors/workflow-editor/ui/ap-edge.d.ts.map +1 -1
  179. package/dist/types/editors/workflow-editor/ui/ap-layout.d.ts +1 -0
  180. package/dist/types/editors/workflow-editor/ui/ap-layout.d.ts.map +1 -1
  181. package/dist/types/editors/workflow-editor/ui/ap-nodes.d.ts.map +1 -1
  182. package/dist/types/editors/workflow-editor/ui/block-meta.d.ts +6 -0
  183. package/dist/types/editors/workflow-editor/ui/block-meta.d.ts.map +1 -1
  184. package/dist/types/editors/workflow-editor/ui/connection-create.d.ts +1 -1
  185. package/dist/types/editors/workflow-editor/ui/connection-create.d.ts.map +1 -1
  186. package/dist/types/editors/workflow-editor/ui/forms.d.ts +14 -0
  187. package/dist/types/editors/workflow-editor/ui/forms.d.ts.map +1 -1
  188. package/dist/types/editors/workflow-editor/ui/model.test.d.ts +2 -0
  189. package/dist/types/editors/workflow-editor/ui/model.test.d.ts.map +1 -0
  190. package/dist/types/editors/workflow-editor/ui/schedule-draft.d.ts +35 -0
  191. package/dist/types/editors/workflow-editor/ui/schedule-draft.d.ts.map +1 -0
  192. package/dist/types/editors/workflow-editor/ui/schedule-draft.test.d.ts +2 -0
  193. package/dist/types/editors/workflow-editor/ui/schedule-draft.test.d.ts.map +1 -0
  194. package/dist/types/editors/workflow-editor/ui/trigger-text.d.ts +9 -0
  195. package/dist/types/editors/workflow-editor/ui/trigger-text.d.ts.map +1 -0
  196. package/dist/types/editors/workflow-editor/ui/trigger-text.test.d.ts +2 -0
  197. package/dist/types/editors/workflow-editor/ui/trigger-text.test.d.ts.map +1 -0
  198. package/dist/types/editors/workflow-editor/ui/validation.d.ts.map +1 -1
  199. package/dist/types/editors/workflow-studio/components/RunsTable.d.ts +2 -0
  200. package/dist/types/editors/workflow-studio/components/RunsTable.d.ts.map +1 -1
  201. package/dist/types/editors/workflow-studio/components/RunsView.d.ts.map +1 -1
  202. package/dist/types/editors/workflow-studio/components/Sidebar.d.ts +1 -1
  203. package/dist/types/editors/workflow-studio/components/Sidebar.d.ts.map +1 -1
  204. package/dist/types/editors/workflow-studio/components/WorkflowBoard.d.ts +8 -0
  205. package/dist/types/editors/workflow-studio/components/WorkflowBoard.d.ts.map +1 -0
  206. package/dist/types/editors/workflow-studio/components/WorkflowHeader.d.ts.map +1 -1
  207. package/dist/types/editors/workflow-studio/components/WorkflowSteps.d.ts.map +1 -1
  208. package/dist/types/editors/workflow-studio/components/WorkflowStudio.d.ts.map +1 -1
  209. package/dist/types/editors/workflow-studio/components/chain.d.ts +18 -0
  210. package/dist/types/editors/workflow-studio/components/chain.d.ts.map +1 -0
  211. package/dist/types/editors/workflow-studio/components/run-format.d.ts +29 -6
  212. package/dist/types/editors/workflow-studio/components/run-format.d.ts.map +1 -1
  213. package/dist/types/editors/workflow-studio/components/run-format.test.d.ts +2 -0
  214. package/dist/types/editors/workflow-studio/components/run-format.test.d.ts.map +1 -0
  215. package/dist/types/editors/workflow-studio/components/run-timeline.test.d.ts +2 -0
  216. package/dist/types/editors/workflow-studio/components/run-timeline.test.d.ts.map +1 -0
  217. package/dist/types/editors/workflow-studio/components/ui.d.ts +20 -0
  218. package/dist/types/editors/workflow-studio/components/ui.d.ts.map +1 -0
  219. package/dist/types/editors/workflow-studio/components/useRuns.d.ts +1 -1
  220. package/dist/types/editors/workflow-studio/components/useRuns.d.ts.map +1 -1
  221. package/dist/types/pieces/index.d.ts.map +1 -1
  222. package/dist/types/pieces/reactor/index.d.ts.map +1 -1
  223. package/dist/types/pieces/reactor/lib/reactor.d.ts.map +1 -1
  224. package/dist/types/pieces/reactor/lib/triggers/document-event.d.ts +12 -12
  225. package/dist/types/playwright.config.d.ts +3 -0
  226. package/dist/types/playwright.config.d.ts.map +1 -0
  227. package/dist/types/scripts/ui-shots.d.ts +2 -0
  228. package/dist/types/scripts/ui-shots.d.ts.map +1 -0
  229. package/dist/types/scripts/ui-stack.d.ts +77 -0
  230. package/dist/types/scripts/ui-stack.d.ts.map +1 -0
  231. package/dist/types/test/ui/connection-editor.spec.d.ts +2 -0
  232. package/dist/types/test/ui/connection-editor.spec.d.ts.map +1 -0
  233. package/dist/types/test/ui/data-viewer.spec.d.ts +2 -0
  234. package/dist/types/test/ui/data-viewer.spec.d.ts.map +1 -0
  235. package/dist/types/test/ui/fixtures.d.ts +9 -0
  236. package/dist/types/test/ui/fixtures.d.ts.map +1 -0
  237. package/dist/types/test/ui/global-setup.d.ts +2 -0
  238. package/dist/types/test/ui/global-setup.d.ts.map +1 -0
  239. package/dist/types/test/ui/pieces.spec.d.ts +2 -0
  240. package/dist/types/test/ui/pieces.spec.d.ts.map +1 -0
  241. package/dist/types/test/ui/step-panel.spec.d.ts +2 -0
  242. package/dist/types/test/ui/step-panel.spec.d.ts.map +1 -0
  243. package/dist/types/test/ui/studio.spec.d.ts +2 -0
  244. package/dist/types/test/ui/studio.spec.d.ts.map +1 -0
  245. package/dist/types/vitest.config.d.ts.map +1 -1
  246. package/package.json +17 -11
  247. package/dist/browser/PieceMarkdown-CZYNY1qQ.js.map +0 -1
  248. package/dist/browser/ap-layout-BpKqIHQt.js +0 -337
  249. package/dist/browser/ap-layout-BpKqIHQt.js.map +0 -1
  250. package/dist/browser/connection-form-B1SkwNgY.js +0 -453
  251. package/dist/browser/connection-form-B1SkwNgY.js.map +0 -1
  252. package/dist/browser/editor-CCKpl-Gd.js +0 -1550
  253. package/dist/browser/editor-CCKpl-Gd.js.map +0 -1
  254. package/dist/browser/editor-CIZRPdKM.js +0 -134
  255. package/dist/browser/editor-CIZRPdKM.js.map +0 -1
  256. package/dist/browser/editor-D0sdUxJa.js.map +0 -1
  257. package/dist/browser/runtime-api-DKlnn45K.js.map +0 -1
  258. package/dist/browser/status-kpDX5CIA.js +0 -11
  259. package/dist/browser/status-kpDX5CIA.js.map +0 -1
  260. package/dist/browser/upgrade-manifests-Cnpfo6kC.js +0 -8
  261. package/dist/browser/use-runtime-url-By5q3sa_.js +0 -174
  262. package/dist/browser/use-runtime-url-By5q3sa_.js.map +0 -1
  263. package/dist/node/PieceMarkdown-D9nI2gI2.mjs.map +0 -1
  264. package/dist/node/ap-layout-Dzhi9JFC.mjs +0 -337
  265. package/dist/node/ap-layout-Dzhi9JFC.mjs.map +0 -1
  266. package/dist/node/connection-form-DejaNF09.mjs +0 -453
  267. package/dist/node/connection-form-DejaNF09.mjs.map +0 -1
  268. package/dist/node/editor-DfFRZS9L.mjs +0 -134
  269. package/dist/node/editor-DfFRZS9L.mjs.map +0 -1
  270. package/dist/node/editor-NbAB78He.mjs +0 -1550
  271. package/dist/node/editor-NbAB78He.mjs.map +0 -1
  272. package/dist/node/editor-sVzt1o51.mjs.map +0 -1
  273. package/dist/node/runtime-api-CtvvFHut.mjs.map +0 -1
  274. package/dist/node/status-CDRcDUMS.mjs +0 -11
  275. package/dist/node/status-CDRcDUMS.mjs.map +0 -1
  276. package/dist/node/upgrade-manifests-3VN0Bfcf.mjs +0 -8
  277. package/dist/node/use-runtime-url-BbFEkaZy.mjs +0 -174
  278. package/dist/node/use-runtime-url-BbFEkaZy.mjs.map +0 -1
  279. package/dist/types/document-models/connection/v1/tests/config.test.d.ts +0 -2
  280. package/dist/types/document-models/connection/v1/tests/config.test.d.ts.map +0 -1
  281. package/dist/types/document-models/connection/v1/tests/connection.test.d.ts +0 -2
  282. package/dist/types/document-models/connection/v1/tests/connection.test.d.ts.map +0 -1
  283. package/dist/types/document-models/connection/v1/tests/health.test.d.ts +0 -2
  284. package/dist/types/document-models/connection/v1/tests/health.test.d.ts.map +0 -1
  285. package/dist/types/document-models/workflow/v1/tests/edges.test.d.ts +0 -2
  286. package/dist/types/document-models/workflow/v1/tests/edges.test.d.ts.map +0 -1
  287. package/dist/types/document-models/workflow/v1/tests/policy.test.d.ts +0 -2
  288. package/dist/types/document-models/workflow/v1/tests/policy.test.d.ts.map +0 -1
  289. package/dist/types/document-models/workflow/v1/tests/runtime.test.d.ts +0 -2
  290. package/dist/types/document-models/workflow/v1/tests/runtime.test.d.ts.map +0 -1
  291. package/dist/types/document-models/workflow/v1/tests/steps.test.d.ts +0 -2
  292. package/dist/types/document-models/workflow/v1/tests/steps.test.d.ts.map +0 -1
  293. package/dist/types/document-models/workflow/v1/tests/trigger.test.d.ts +0 -2
  294. package/dist/types/document-models/workflow/v1/tests/trigger.test.d.ts.map +0 -1
  295. package/dist/types/document-models/workflow/v1/tests/variables.test.d.ts +0 -2
  296. package/dist/types/document-models/workflow/v1/tests/variables.test.d.ts.map +0 -1
  297. package/dist/types/document-models/workflow/v1/tests/workflow.test.d.ts +0 -2
  298. package/dist/types/document-models/workflow/v1/tests/workflow.test.d.ts.map +0 -1
  299. package/dist/types/editors/workflow-studio/components/ConnectionView.d.ts +0 -7
  300. package/dist/types/editors/workflow-studio/components/ConnectionView.d.ts.map +0 -1
  301. package/dist/types/editors/workflow-studio/components/EditorToolbar.d.ts +0 -8
  302. package/dist/types/editors/workflow-studio/components/EditorToolbar.d.ts.map +0 -1
  303. package/dist/types/editors/workflow-studio/components/connection-usage.d.ts.map +0 -1
  304. package/dist/types/editors/workflow-studio/components/connection-usage.test.d.ts.map +0 -1
  305. /package/dist/types/editors/{workflow-studio/components → connection-editor}/connection-usage.d.ts +0 -0
  306. /package/dist/types/editors/{workflow-studio/components → connection-editor}/connection-usage.test.d.ts +0 -0
@@ -1,1550 +0,0 @@
1
- import { E as packageFromConnectorId, f as fireWorkflow, g as rerunRun, l as fetchRuns } from "./runtime-api-CtvvFHut.mjs";
2
- import { y as actions } from "./module-IA-Ay7ig.mjs";
3
- import { y as actions$1 } from "./module-IRMgzJC1.mjs";
4
- import { r as useWorkflowDocumentsInSelectedDrive } from "./workflow-fFvyypuu.mjs";
5
- import { i as errorMessage, n as DocumentErrorBoundary, r as DocumentLoadError, t as useSyncWorkflowRuntimeUrl } from "./use-runtime-url-BbFEkaZy.mjs";
6
- import { t as CONNECTION_STATUS_STYLES } from "./status-CDRcDUMS.mjs";
7
- import { i as portRank, l as usePieceLogos, o as blockMeta } from "./ap-layout-Dzhi9JFC.mjs";
8
- import { addDocument, setSelectedNode, showDeleteNodeModal, useDispatch, useDocumentSafe, useFileNodesInSelectedDrive, usePHToast, useSelectedDrive, useSelectedNode, useSetPHAppConfig } from "@powerhousedao/reactor-browser";
9
- import { Fragment, useCallback, useEffect, useMemo, useRef, useState } from "react";
10
- import { jsx, jsxs } from "react/jsx-runtime";
11
- //#region editors/workflow-studio/components/run-format.ts
12
- const RUN_STATUSES = [
13
- "RUNNING",
14
- "SUCCEEDED",
15
- "FAILED"
16
- ];
17
- const RUN_DOT = {
18
- SUCCEEDED: "bg-green-500",
19
- FAILED: "bg-red-500",
20
- RUNNING: "bg-amber-400",
21
- PARKED: "bg-slate-400",
22
- CANCELLED: "bg-slate-400"
23
- };
24
- const RUN_TEXT = {
25
- SUCCEEDED: "text-green-700",
26
- FAILED: "text-red-700",
27
- RUNNING: "text-amber-700"
28
- };
29
- const STEP_TEXT = {
30
- SUCCEEDED: "text-green-600",
31
- FAILED: "text-red-600",
32
- SKIPPED: "text-slate-400",
33
- REPLAYED: "text-sky-600"
34
- };
35
- const WORKFLOW_STATUS_DOT = {
36
- ENABLED: "bg-green-500",
37
- DRAFT: "bg-slate-300",
38
- DISABLED: "bg-amber-400",
39
- ARCHIVED: "bg-slate-200"
40
- };
41
- const CONNECTION_STATUS_DOT = {
42
- OK: "bg-green-500",
43
- ERROR: "bg-red-500",
44
- REVOKED: "bg-red-400",
45
- UNCONFIGURED: "bg-slate-300"
46
- };
47
- const WORKFLOW_STATUS_STYLES = {
48
- ENABLED: "bg-green-100 text-green-700",
49
- DRAFT: "bg-slate-100 text-slate-500",
50
- DISABLED: "bg-amber-100 text-amber-700",
51
- ARCHIVED: "bg-slate-200 text-slate-400"
52
- };
53
- function formatDuration(startedAt, endedAt) {
54
- if (!endedAt) return "…";
55
- const ms = new Date(endedAt).getTime() - new Date(startedAt).getTime();
56
- if (ms < 1e3) return `${ms}ms`;
57
- if (ms < 6e4) return `${(ms / 1e3).toFixed(1)}s`;
58
- return `${Math.floor(ms / 6e4)}m ${Math.round(ms % 6e4 / 1e3)}s`;
59
- }
60
- function durationMs(startedAt, endedAt) {
61
- if (!endedAt) return null;
62
- return new Date(endedAt).getTime() - new Date(startedAt).getTime();
63
- }
64
- function formatWhen(startedAt) {
65
- const diff = Date.now() - new Date(startedAt).getTime();
66
- if (diff < 6e4) return "just now";
67
- if (diff < 36e5) return `${Math.floor(diff / 6e4)}m ago`;
68
- if (diff < 864e5) return `${Math.floor(diff / 36e5)}h ago`;
69
- return new Date(startedAt).toLocaleDateString();
70
- }
71
- function formatAbsolute(iso) {
72
- return new Date(iso).toLocaleString();
73
- }
74
- function formatTrigger(kind) {
75
- return kind.replace(/[-_]/g, " ").toLowerCase();
76
- }
77
- function runStats(runs) {
78
- const succeeded = runs.filter((run) => run.status === "SUCCEEDED").length;
79
- const failed = runs.filter((run) => run.status === "FAILED").length;
80
- const finished = succeeded + failed;
81
- return {
82
- total: runs.length,
83
- succeeded,
84
- failed,
85
- running: runs.filter((run) => run.status === "RUNNING").length,
86
- lastRun: runs[0],
87
- successRate: finished === 0 ? null : Math.round(succeeded / finished * 100)
88
- };
89
- }
90
- //#endregion
91
- //#region editors/workflow-studio/components/EditorToolbar.tsx
92
- const WORKFLOW_TYPE$3 = "powerhouse/workflow";
93
- function Fact(props) {
94
- return /* @__PURE__ */ jsxs("span", {
95
- className: "flex items-baseline gap-1.5",
96
- title: props.title,
97
- children: [/* @__PURE__ */ jsx("span", {
98
- className: "text-[11px] text-slate-400",
99
- children: props.label
100
- }), /* @__PURE__ */ jsx("span", {
101
- className: "text-xs tabular-nums text-slate-700",
102
- children: props.value
103
- })]
104
- });
105
- }
106
- function EditorToolbar(props) {
107
- const { data: document } = useDocumentSafe(props.node?.id ?? null);
108
- const isWorkflow = document?.header.documentType === WORKFLOW_TYPE$3;
109
- const state = isWorkflow ? document.state.global : void 0;
110
- const stats = runStats(props.runs ?? []);
111
- const lastRun = isWorkflow ? stats.lastRun : void 0;
112
- return /* @__PURE__ */ jsxs("div", {
113
- className: "flex flex-wrap items-center gap-x-4 gap-y-2 border-b border-solid border-slate-200 bg-slate-50 px-3 py-2",
114
- children: [
115
- /* @__PURE__ */ jsxs("button", {
116
- type: "button",
117
- className: "flex items-center gap-1.5 rounded border border-solid border-slate-300 bg-white px-2 py-1 text-xs font-medium text-slate-600 hover:border-slate-400 hover:text-slate-900",
118
- onClick: props.onBack,
119
- children: [/* @__PURE__ */ jsx("span", {
120
- "aria-hidden": true,
121
- children: "←"
122
- }), isWorkflow ? "Back to runs" : "Back to overview"]
123
- }),
124
- /* @__PURE__ */ jsx("span", {
125
- className: "min-w-0 truncate text-sm font-medium text-slate-800",
126
- children: state?.name || props.node?.name || "Untitled"
127
- }),
128
- state ? /* @__PURE__ */ jsx("span", {
129
- className: `rounded px-2 py-0.5 text-[11px] font-semibold ${WORKFLOW_STATUS_STYLES[state.status] ?? "bg-slate-100 text-slate-500"}`,
130
- children: state.status
131
- }) : null,
132
- isWorkflow ? /* @__PURE__ */ jsxs("span", {
133
- className: "ml-auto flex flex-wrap items-center gap-x-4 gap-y-1",
134
- children: [
135
- lastRun ? /* @__PURE__ */ jsxs("span", {
136
- className: "flex items-baseline gap-1.5",
137
- title: formatAbsolute(lastRun.startedAt),
138
- children: [/* @__PURE__ */ jsx("span", {
139
- className: "text-[11px] text-slate-400",
140
- children: "Last run"
141
- }), /* @__PURE__ */ jsxs("span", {
142
- className: "flex items-center gap-1.5 text-xs",
143
- children: [
144
- /* @__PURE__ */ jsx("span", { className: `h-2 w-2 shrink-0 rounded-full ${RUN_DOT[lastRun.status] ?? "bg-slate-300"}` }),
145
- /* @__PURE__ */ jsx("span", {
146
- className: RUN_TEXT[lastRun.status] ?? "text-slate-700",
147
- children: formatWhen(lastRun.startedAt)
148
- }),
149
- /* @__PURE__ */ jsx("span", {
150
- className: "tabular-nums text-slate-400",
151
- children: formatDuration(lastRun.startedAt, lastRun.endedAt)
152
- })
153
- ]
154
- })]
155
- }) : /* @__PURE__ */ jsx(Fact, {
156
- label: "Last run",
157
- value: "Never run"
158
- }),
159
- stats.successRate !== null ? /* @__PURE__ */ jsx(Fact, {
160
- label: "Success",
161
- value: `${stats.successRate}%`,
162
- title: `${stats.succeeded} of ${stats.succeeded + stats.failed} finished runs succeeded`
163
- }) : null,
164
- /* @__PURE__ */ jsx(Fact, {
165
- label: "Runs",
166
- value: String(stats.total)
167
- })
168
- ]
169
- }) : null
170
- ]
171
- });
172
- }
173
- //#endregion
174
- //#region editors/workflow-studio/components/connection-usage.ts
175
- function connectionUsage(connectionId, workflows) {
176
- const usage = [];
177
- for (const workflow of workflows) {
178
- const trigger = workflow.trigger?.connectionId === connectionId;
179
- const steps = workflow.steps.filter((step) => step.connectionId === connectionId);
180
- if (trigger || steps.length > 0) usage.push({
181
- workflow,
182
- trigger,
183
- steps
184
- });
185
- }
186
- return usage.sort((a, b) => a.workflow.name.localeCompare(b.workflow.name));
187
- }
188
- function enabledDependents(usage) {
189
- return usage.filter((entry) => entry.workflow.status === "ENABLED").length;
190
- }
191
- //#endregion
192
- //#region editors/workflow-studio/components/ConnectionView.tsx
193
- const CONNECTION_TYPE$1 = "powerhouse/connection";
194
- const ACTION$1 = "rounded border border-solid border-slate-300 bg-white px-2.5 py-1 text-xs font-medium text-slate-700 hover:border-slate-400 hover:bg-slate-50";
195
- function Stat$1(props) {
196
- return /* @__PURE__ */ jsxs("div", {
197
- className: "min-w-0 grow border-l border-solid border-slate-200 px-3 py-2 first:border-l-0 first:pl-0",
198
- children: [/* @__PURE__ */ jsx("div", {
199
- className: "text-[11px] text-slate-400",
200
- children: props.label
201
- }), /* @__PURE__ */ jsx("div", {
202
- className: "truncate text-xs text-slate-800",
203
- children: props.children
204
- })]
205
- });
206
- }
207
- function configEntries(config) {
208
- if (!config || typeof config !== "object" || Array.isArray(config)) return [];
209
- return Object.entries(config).map(([key, value]) => [key, typeof value === "string" ? value : JSON.stringify(value)]);
210
- }
211
- function ConnectionView(props) {
212
- const connectionId = props.node.id;
213
- const { data: document, error, reload } = useDocumentSafe(connectionId);
214
- const [, dispatch] = useDispatch(document);
215
- const workflows = useWorkflowDocumentsInSelectedDrive();
216
- if (error !== void 0) return /* @__PURE__ */ jsx(DocumentLoadError, {
217
- title: "This connection could not be loaded",
218
- documentId: connectionId,
219
- error,
220
- onRetry: () => {
221
- reload();
222
- }
223
- });
224
- if (document?.header.documentType !== CONNECTION_TYPE$1) return null;
225
- const state = document.state.global;
226
- const revoked = state.status === "REVOKED";
227
- const packageName = packageFromConnectorId(state.connectorId);
228
- const usage = connectionUsage(connectionId, (workflows ?? []).map((workflow) => ({
229
- id: workflow.header.id,
230
- name: workflow.state.global.name || workflow.header.name || "Untitled",
231
- status: workflow.state.global.status,
232
- trigger: workflow.state.global.trigger,
233
- steps: workflow.state.global.steps
234
- })));
235
- const atRisk = enabledDependents(usage);
236
- const config = configEntries(state.config);
237
- const setStatus = (status) => dispatch(actions.recordCheckResult({
238
- status,
239
- checkedAt: (/* @__PURE__ */ new Date()).toISOString()
240
- }));
241
- return /* @__PURE__ */ jsxs("div", {
242
- className: "mx-auto w-full max-w-5xl p-6",
243
- children: [
244
- /* @__PURE__ */ jsxs("header", {
245
- className: "mb-4",
246
- children: [/* @__PURE__ */ jsxs("div", {
247
- className: "flex flex-wrap items-center gap-2",
248
- children: [
249
- /* @__PURE__ */ jsx("h2", {
250
- className: "min-w-0 truncate text-base font-semibold text-slate-800",
251
- children: state.name || props.node.name || "Untitled connection"
252
- }),
253
- /* @__PURE__ */ jsx("span", {
254
- className: `rounded px-2 py-0.5 text-[11px] font-semibold ${CONNECTION_STATUS_STYLES[state.status]}`,
255
- children: state.status
256
- }),
257
- /* @__PURE__ */ jsx("span", { className: "grow" }),
258
- /* @__PURE__ */ jsx("button", {
259
- type: "button",
260
- className: ACTION$1,
261
- onClick: props.onEdit,
262
- children: "Edit connection"
263
- }),
264
- /* @__PURE__ */ jsx("button", {
265
- type: "button",
266
- className: ACTION$1,
267
- onClick: () => setStatus(revoked ? "OK" : "REVOKED"),
268
- children: revoked ? "Reactivate" : "Revoke"
269
- }),
270
- /* @__PURE__ */ jsx("button", {
271
- type: "button",
272
- className: "rounded border border-solid border-red-200 bg-white px-2.5 py-1 text-xs font-medium text-red-600 hover:border-red-300 hover:bg-red-50",
273
- onClick: () => showDeleteNodeModal(props.node),
274
- children: "Delete"
275
- })
276
- ]
277
- }), /* @__PURE__ */ jsxs("div", {
278
- className: "mt-3 flex flex-wrap items-stretch rounded-md border border-solid border-slate-200 bg-white px-3",
279
- children: [
280
- /* @__PURE__ */ jsx(Stat$1, {
281
- label: "Connector",
282
- children: packageName || /* @__PURE__ */ jsx("span", {
283
- className: "text-slate-400",
284
- children: "None picked"
285
- })
286
- }),
287
- /* @__PURE__ */ jsx(Stat$1, {
288
- label: "Auth",
289
- children: state.authType
290
- }),
291
- /* @__PURE__ */ jsx(Stat$1, {
292
- label: "Account",
293
- children: state.accountLabel ?? /* @__PURE__ */ jsx("span", {
294
- className: "text-slate-400",
295
- children: "—"
296
- })
297
- }),
298
- /* @__PURE__ */ jsx(Stat$1, {
299
- label: "Last checked",
300
- children: state.lastCheckedAt ? formatAbsolute(state.lastCheckedAt) : /* @__PURE__ */ jsx("span", {
301
- className: "text-slate-400",
302
- children: "Never"
303
- })
304
- }),
305
- /* @__PURE__ */ jsx(Stat$1, {
306
- label: "Secrets",
307
- children: /* @__PURE__ */ jsx("span", {
308
- className: "tabular-nums",
309
- children: state.secretRefs.length
310
- })
311
- }),
312
- /* @__PURE__ */ jsx(Stat$1, {
313
- label: "Used by",
314
- children: /* @__PURE__ */ jsxs("span", {
315
- className: "tabular-nums",
316
- children: [usage.length, atRisk > 0 ? /* @__PURE__ */ jsxs("span", {
317
- className: "text-slate-400",
318
- children: [
319
- " · ",
320
- atRisk,
321
- " enabled"
322
- ]
323
- }) : null]
324
- })
325
- })
326
- ]
327
- })]
328
- }),
329
- state.lastError ? /* @__PURE__ */ jsx("p", {
330
- className: "mb-4 rounded bg-red-50 px-3 py-2 text-xs text-red-600",
331
- children: state.lastError
332
- }) : null,
333
- /* @__PURE__ */ jsxs("section", {
334
- className: "mb-4 rounded-md border border-solid border-slate-200 bg-white px-3 py-3",
335
- children: [/* @__PURE__ */ jsx("h3", {
336
- className: "mb-2 text-[11px] text-slate-400",
337
- children: "Used by"
338
- }), usage.length === 0 ? /* @__PURE__ */ jsx("p", {
339
- className: "text-xs text-slate-500",
340
- children: "No workflow uses this connection yet. Bind it to a step in a workflow's editor."
341
- }) : /* @__PURE__ */ jsx("ul", {
342
- className: "flex flex-col gap-1",
343
- children: usage.map((entry) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("button", {
344
- type: "button",
345
- className: "flex w-full items-center gap-2 rounded px-1 py-1 text-left hover:bg-slate-50",
346
- onClick: () => props.onOpenWorkflow(entry.workflow.id),
347
- children: [
348
- /* @__PURE__ */ jsx("span", {
349
- className: `h-1.5 w-1.5 shrink-0 rounded-full ${WORKFLOW_STATUS_DOT[entry.workflow.status] ?? "bg-slate-300"}`,
350
- title: entry.workflow.status
351
- }),
352
- /* @__PURE__ */ jsx("span", {
353
- className: "shrink-0 text-xs font-medium text-slate-700",
354
- children: entry.workflow.name
355
- }),
356
- /* @__PURE__ */ jsxs("span", {
357
- className: "truncate text-[11px] text-slate-400",
358
- children: [
359
- entry.trigger ? "trigger" : null,
360
- entry.trigger && entry.steps.length > 0 ? " · " : null,
361
- entry.steps.map((step) => step.key).join(", ")
362
- ]
363
- })
364
- ]
365
- }) }, entry.workflow.id))
366
- })]
367
- }),
368
- /* @__PURE__ */ jsxs("section", {
369
- className: "rounded-md border border-solid border-slate-200 bg-white px-3 py-3",
370
- children: [/* @__PURE__ */ jsx("h3", {
371
- className: "mb-2 text-[11px] text-slate-400",
372
- children: "Configuration"
373
- }), config.length === 0 && state.secretRefs.length === 0 ? /* @__PURE__ */ jsxs("p", {
374
- className: "text-xs text-slate-500",
375
- children: [
376
- "Nothing configured yet.",
377
- " ",
378
- /* @__PURE__ */ jsx("button", {
379
- type: "button",
380
- className: "underline hover:text-slate-800",
381
- onClick: props.onEdit,
382
- children: "Open the editor"
383
- }),
384
- " ",
385
- "to fill it in."
386
- ]
387
- }) : /* @__PURE__ */ jsxs("dl", {
388
- className: "flex flex-col gap-1",
389
- children: [config.map(([key, value]) => /* @__PURE__ */ jsxs("div", {
390
- className: "flex gap-2 text-xs",
391
- children: [/* @__PURE__ */ jsx("dt", {
392
- className: "w-40 shrink-0 truncate text-slate-500",
393
- children: key
394
- }), /* @__PURE__ */ jsx("dd", {
395
- className: "min-w-0 truncate text-slate-800",
396
- children: value
397
- })]
398
- }, key)), state.secretRefs.map((ref) => /* @__PURE__ */ jsxs("div", {
399
- className: "flex gap-2 text-xs",
400
- children: [/* @__PURE__ */ jsx("dt", {
401
- className: "w-40 shrink-0 truncate text-slate-500",
402
- children: ref.name
403
- }), /* @__PURE__ */ jsx("dd", {
404
- className: "text-slate-400",
405
- children: "stored secret · never displayed"
406
- })]
407
- }, ref.id))]
408
- })]
409
- })
410
- ]
411
- });
412
- }
413
- //#endregion
414
- //#region editors/workflow-studio/components/RunsTable.tsx
415
- const CONTROL = "rounded border border-solid border-slate-300 bg-white px-2 py-1 text-xs text-slate-700 focus:border-slate-400 focus:outline-none";
416
- function stringify(value) {
417
- if (value === void 0) return "";
418
- try {
419
- return JSON.stringify(value, null, 2);
420
- } catch {
421
- return String(value);
422
- }
423
- }
424
- function StepRow(props) {
425
- const { step } = props;
426
- const meta = blockMeta(step.blockType);
427
- const [open, setOpen] = useState(false);
428
- return /* @__PURE__ */ jsxs("div", {
429
- className: "border-t border-solid border-slate-100 first:border-t-0",
430
- children: [/* @__PURE__ */ jsxs("button", {
431
- type: "button",
432
- "aria-expanded": open,
433
- className: "flex w-full items-center gap-2 px-3 py-1.5 text-left hover:bg-white focus-visible:bg-white focus-visible:outline-none",
434
- onClick: () => setOpen((value) => !value),
435
- children: [
436
- /* @__PURE__ */ jsx("span", {
437
- className: `w-16 shrink-0 text-[11px] font-semibold ${STEP_TEXT[step.status] ?? "text-slate-500"}`,
438
- children: step.status
439
- }),
440
- /* @__PURE__ */ jsx("span", {
441
- className: "shrink-0 text-xs font-medium text-slate-700",
442
- children: step.stepKey
443
- }),
444
- /* @__PURE__ */ jsxs("span", {
445
- className: "truncate text-xs text-slate-400",
446
- children: [
447
- meta.displayName,
448
- " · ",
449
- meta.subtitle
450
- ]
451
- }),
452
- step.port ? /* @__PURE__ */ jsxs("span", {
453
- className: "ml-auto shrink-0 rounded bg-slate-100 px-1 text-[10px] text-slate-500",
454
- children: ["→ ", step.port]
455
- }) : null
456
- ]
457
- }), open ? /* @__PURE__ */ jsxs("div", {
458
- className: "space-y-1 px-3 pb-2",
459
- children: [
460
- step.error ? /* @__PURE__ */ jsx("pre", {
461
- className: "overflow-x-auto rounded bg-red-50 p-2 text-[11px] text-red-600",
462
- children: step.error
463
- }) : null,
464
- /* @__PURE__ */ jsxs("details", { children: [/* @__PURE__ */ jsx("summary", {
465
- className: "cursor-pointer text-[11px] text-slate-400",
466
- children: "input"
467
- }), /* @__PURE__ */ jsx("pre", {
468
- className: "max-h-48 overflow-auto rounded bg-white p-2 text-[11px] text-slate-600",
469
- children: stringify(step.input)
470
- })] }),
471
- /* @__PURE__ */ jsxs("details", { children: [/* @__PURE__ */ jsx("summary", {
472
- className: "cursor-pointer text-[11px] text-slate-400",
473
- children: "output"
474
- }), /* @__PURE__ */ jsx("pre", {
475
- className: "max-h-48 overflow-auto rounded bg-white p-2 text-[11px] text-slate-600",
476
- children: stringify(step.output)
477
- })] })
478
- ]
479
- }) : null]
480
- });
481
- }
482
- function RunDetail(props) {
483
- const { run } = props;
484
- const [rerunning, setRerunning] = useState(false);
485
- const [rerunError, setRerunError] = useState(null);
486
- return /* @__PURE__ */ jsxs("div", {
487
- className: "space-y-2 bg-slate-50 px-4 py-3",
488
- children: [
489
- run.error ? /* @__PURE__ */ jsx("p", {
490
- className: "rounded bg-red-50 px-2 py-1 text-xs text-red-600",
491
- children: run.error
492
- }) : null,
493
- /* @__PURE__ */ jsxs("div", {
494
- className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-[11px] text-slate-500",
495
- children: [
496
- /* @__PURE__ */ jsxs("span", { children: ["run ", /* @__PURE__ */ jsx("span", {
497
- className: "font-mono",
498
- children: run.id.slice(0, 8)
499
- })] }),
500
- /* @__PURE__ */ jsxs("span", { children: ["started ", formatAbsolute(run.startedAt)] }),
501
- run.rerunOf ? /* @__PURE__ */ jsxs("span", { children: ["resumes ", /* @__PURE__ */ jsx("span", {
502
- className: "font-mono",
503
- children: run.rerunOf.slice(0, 8)
504
- })] }) : null,
505
- run.status === "FAILED" ? /* @__PURE__ */ jsx("button", {
506
- type: "button",
507
- disabled: rerunning,
508
- className: "rounded border border-solid border-slate-300 bg-white px-2 py-1 font-medium text-slate-600 hover:border-slate-400 disabled:opacity-50",
509
- onClick: () => {
510
- setRerunning(true);
511
- setRerunError(null);
512
- rerunRun(run.id).then((result) => setRerunError(result.error)).catch((error) => setRerunError(error instanceof Error ? error.message : String(error))).finally(() => {
513
- setRerunning(false);
514
- props.onChanged();
515
- });
516
- },
517
- children: rerunning ? "Rerunning…" : "↻ Rerun from failure"
518
- }) : null,
519
- rerunError ? /* @__PURE__ */ jsx("span", {
520
- className: "text-red-600",
521
- children: rerunError
522
- }) : null
523
- ]
524
- }),
525
- run.steps.length === 0 ? /* @__PURE__ */ jsx("p", {
526
- className: "text-xs text-slate-400",
527
- children: "This run recorded no steps."
528
- }) : /* @__PURE__ */ jsx("div", {
529
- className: "rounded border border-solid border-slate-200 bg-slate-50",
530
- children: run.steps.map((step) => /* @__PURE__ */ jsx(StepRow, { step }, step.stepId + step.stepKey))
531
- })
532
- ]
533
- });
534
- }
535
- function SortHeader(props) {
536
- return /* @__PURE__ */ jsx("th", {
537
- scope: "col",
538
- className: props.className,
539
- children: /* @__PURE__ */ jsxs("button", {
540
- type: "button",
541
- className: `flex items-center gap-1 hover:text-slate-700 ${props.active ? "text-slate-700" : ""}`,
542
- onClick: props.onClick,
543
- children: [props.label, /* @__PURE__ */ jsx("span", {
544
- "aria-hidden": true,
545
- className: props.active ? "" : "opacity-0",
546
- children: props.descending ? "↓" : "↑"
547
- })]
548
- })
549
- });
550
- }
551
- function RunsTable(props) {
552
- const [query, setQuery] = useState("");
553
- const [status, setStatus] = useState("ALL");
554
- const [workflow, setWorkflow] = useState("ALL");
555
- const [trigger, setTrigger] = useState("ALL");
556
- const [sort, setSort] = useState("startedAt");
557
- const [descending, setDescending] = useState(true);
558
- const [expanded, setExpanded] = useState(null);
559
- const workflowOptions = useMemo(() => [...new Map(props.runs.map((run) => [run.workflowId, run.workflowName]))].map(([id, name]) => ({
560
- id,
561
- name
562
- })).sort((a, b) => a.name.localeCompare(b.name)), [props.runs]);
563
- const triggerOptions = useMemo(() => [...new Set(props.runs.map((run) => run.triggerKind))].sort(), [props.runs]);
564
- const scoped = useMemo(() => {
565
- const needle = query.trim().toLowerCase();
566
- return props.runs.filter((run) => {
567
- if (workflow !== "ALL" && run.workflowId !== workflow) return false;
568
- if (trigger !== "ALL" && run.triggerKind !== trigger) return false;
569
- if (!needle) return true;
570
- return run.workflowName.toLowerCase().includes(needle) || run.id.toLowerCase().includes(needle) || (run.error?.toLowerCase().includes(needle) ?? false) || run.steps.some((step) => step.stepKey.toLowerCase().includes(needle));
571
- });
572
- }, [
573
- props.runs,
574
- query,
575
- workflow,
576
- trigger
577
- ]);
578
- const counts = useMemo(() => ({
579
- ALL: scoped.length,
580
- RUNNING: scoped.filter((run) => run.status === "RUNNING").length,
581
- SUCCEEDED: scoped.filter((run) => run.status === "SUCCEEDED").length,
582
- FAILED: scoped.filter((run) => run.status === "FAILED").length
583
- }), [scoped]);
584
- const visible = useMemo(() => {
585
- const rows = scoped.filter((run) => status === "ALL" || run.status === status);
586
- const direction = descending ? -1 : 1;
587
- return [...rows].sort((a, b) => {
588
- if (sort === "duration") return ((durationMs(a.startedAt, a.endedAt) ?? Infinity) - (durationMs(b.startedAt, b.endedAt) ?? Infinity)) * direction;
589
- return (new Date(a.startedAt).getTime() - new Date(b.startedAt).getTime()) * direction;
590
- });
591
- }, [
592
- scoped,
593
- status,
594
- sort,
595
- descending
596
- ]);
597
- const filtered = query.trim() || workflow !== "ALL" || trigger !== "ALL";
598
- const sortBy = (key) => {
599
- if (key === sort) {
600
- setDescending((value) => !value);
601
- return;
602
- }
603
- setSort(key);
604
- setDescending(true);
605
- };
606
- return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("div", {
607
- className: "mb-2 flex flex-wrap items-center gap-2",
608
- children: [
609
- /* @__PURE__ */ jsx("div", {
610
- className: "flex overflow-hidden rounded border border-solid border-slate-300",
611
- children: ["ALL", ...RUN_STATUSES].map((option) => /* @__PURE__ */ jsxs("button", {
612
- type: "button",
613
- "aria-pressed": status === option,
614
- className: `border-r border-solid border-slate-200 px-2.5 py-1 text-xs last:border-r-0 ${status === option ? "bg-slate-800 text-white" : "bg-white text-slate-600 hover:bg-slate-50"}`,
615
- onClick: () => setStatus(option),
616
- children: [option === "ALL" ? "All" : option.charAt(0) + option.slice(1).toLowerCase(), /* @__PURE__ */ jsx("span", {
617
- className: "ml-1.5 tabular-nums opacity-60",
618
- children: counts[option]
619
- })]
620
- }, option))
621
- }),
622
- /* @__PURE__ */ jsx("input", {
623
- type: "search",
624
- className: `${CONTROL} w-44`,
625
- placeholder: "Search runs",
626
- value: query,
627
- onChange: (event) => setQuery(event.target.value)
628
- }),
629
- props.showWorkflow && workflowOptions.length > 1 ? /* @__PURE__ */ jsxs("select", {
630
- className: CONTROL,
631
- value: workflow,
632
- onChange: (event) => setWorkflow(event.target.value),
633
- children: [/* @__PURE__ */ jsx("option", {
634
- value: "ALL",
635
- children: "Every workflow"
636
- }), workflowOptions.map((option) => /* @__PURE__ */ jsx("option", {
637
- value: option.id,
638
- children: option.name
639
- }, option.id))]
640
- }) : null,
641
- triggerOptions.length > 1 ? /* @__PURE__ */ jsxs("select", {
642
- className: CONTROL,
643
- value: trigger,
644
- onChange: (event) => setTrigger(event.target.value),
645
- children: [/* @__PURE__ */ jsx("option", {
646
- value: "ALL",
647
- children: "Every trigger"
648
- }), triggerOptions.map((option) => /* @__PURE__ */ jsx("option", {
649
- value: option,
650
- children: formatTrigger(option)
651
- }, option))]
652
- }) : null,
653
- filtered ? /* @__PURE__ */ jsx("button", {
654
- type: "button",
655
- className: "text-xs text-slate-500 underline hover:text-slate-800",
656
- onClick: () => {
657
- setQuery("");
658
- setWorkflow("ALL");
659
- setTrigger("ALL");
660
- },
661
- children: "Clear filters"
662
- }) : null,
663
- /* @__PURE__ */ jsxs("span", {
664
- className: "ml-auto text-[11px] tabular-nums text-slate-400",
665
- children: [
666
- visible.length,
667
- " of ",
668
- props.runs.length,
669
- " runs"
670
- ]
671
- })
672
- ]
673
- }), /* @__PURE__ */ jsx("div", {
674
- className: "overflow-x-auto rounded-md border border-solid border-slate-200 bg-white",
675
- children: /* @__PURE__ */ jsxs("table", {
676
- className: "w-full border-collapse text-left",
677
- children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", {
678
- className: "border-b border-solid border-slate-200 text-[11px] font-medium text-slate-400",
679
- children: [
680
- /* @__PURE__ */ jsx("th", {
681
- scope: "col",
682
- className: "px-3 py-2",
683
- children: "Status"
684
- }),
685
- props.showWorkflow ? /* @__PURE__ */ jsx("th", {
686
- scope: "col",
687
- className: "px-3 py-2",
688
- children: "Workflow"
689
- }) : null,
690
- /* @__PURE__ */ jsx("th", {
691
- scope: "col",
692
- className: "px-3 py-2",
693
- children: "Trigger"
694
- }),
695
- /* @__PURE__ */ jsx(SortHeader, {
696
- label: "Started",
697
- className: "px-3 py-2",
698
- active: sort === "startedAt",
699
- descending,
700
- onClick: () => sortBy("startedAt")
701
- }),
702
- /* @__PURE__ */ jsx(SortHeader, {
703
- label: "Duration",
704
- className: "px-3 py-2",
705
- active: sort === "duration",
706
- descending,
707
- onClick: () => sortBy("duration")
708
- }),
709
- /* @__PURE__ */ jsx("th", {
710
- scope: "col",
711
- className: "px-3 py-2",
712
- children: "Steps"
713
- }),
714
- /* @__PURE__ */ jsx("th", {
715
- scope: "col",
716
- className: "w-8 px-3 py-2",
717
- children: /* @__PURE__ */ jsx("span", {
718
- className: "sr-only",
719
- children: "Details"
720
- })
721
- })
722
- ]
723
- }) }), /* @__PURE__ */ jsx("tbody", { children: visible.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
724
- colSpan: props.showWorkflow ? 7 : 6,
725
- className: "px-3 py-6 text-center text-sm text-slate-400",
726
- children: "No runs match these filters."
727
- }) }) : visible.map((run) => {
728
- const open = expanded === run.id;
729
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("tr", {
730
- className: `cursor-pointer border-b border-solid border-slate-100 text-sm ${open ? "bg-slate-50" : "hover:bg-slate-50"}`,
731
- onClick: () => setExpanded(open ? null : run.id),
732
- children: [
733
- /* @__PURE__ */ jsx("td", {
734
- className: "px-3 py-2",
735
- children: /* @__PURE__ */ jsxs("span", {
736
- className: "flex items-center gap-2",
737
- children: [/* @__PURE__ */ jsx("span", { className: `h-2 w-2 shrink-0 rounded-full ${RUN_DOT[run.status] ?? "bg-slate-300"}` }), /* @__PURE__ */ jsx("span", {
738
- className: `text-xs font-medium ${RUN_TEXT[run.status] ?? "text-slate-500"}`,
739
- children: run.status.charAt(0) + run.status.slice(1).toLowerCase()
740
- })]
741
- })
742
- }),
743
- props.showWorkflow ? /* @__PURE__ */ jsx("td", {
744
- className: "max-w-48 truncate px-3 py-2 text-slate-800",
745
- children: run.workflowName
746
- }) : null,
747
- /* @__PURE__ */ jsxs("td", {
748
- className: "px-3 py-2 text-xs text-slate-500",
749
- children: [formatTrigger(run.triggerKind), /* @__PURE__ */ jsxs("span", {
750
- className: "ml-1 text-slate-300",
751
- children: ["v", run.workflowVersion]
752
- })]
753
- }),
754
- /* @__PURE__ */ jsx("td", {
755
- className: "whitespace-nowrap px-3 py-2 text-xs tabular-nums text-slate-500",
756
- title: formatAbsolute(run.startedAt),
757
- children: formatWhen(run.startedAt)
758
- }),
759
- /* @__PURE__ */ jsx("td", {
760
- className: "whitespace-nowrap px-3 py-2 text-xs tabular-nums text-slate-500",
761
- children: formatDuration(run.startedAt, run.endedAt)
762
- }),
763
- /* @__PURE__ */ jsx("td", {
764
- className: "px-3 py-2 text-xs tabular-nums text-slate-500",
765
- children: run.steps.length
766
- }),
767
- /* @__PURE__ */ jsx("td", {
768
- className: "px-3 py-2",
769
- children: /* @__PURE__ */ jsx("button", {
770
- type: "button",
771
- "aria-expanded": open,
772
- "aria-label": `${open ? "Hide" : "Show"} steps of the run started ${formatAbsolute(run.startedAt)}`,
773
- className: "rounded px-1 text-xs text-slate-400 hover:text-slate-700",
774
- onClick: (event) => {
775
- event.stopPropagation();
776
- setExpanded(open ? null : run.id);
777
- },
778
- children: /* @__PURE__ */ jsx("span", {
779
- "aria-hidden": true,
780
- children: open ? "▾" : "▸"
781
- })
782
- })
783
- })
784
- ]
785
- }), open ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
786
- colSpan: props.showWorkflow ? 7 : 6,
787
- className: "border-b border-solid border-slate-200 p-0",
788
- children: /* @__PURE__ */ jsx(RunDetail, {
789
- run,
790
- onChanged: props.onChanged
791
- })
792
- }) }) : null] }, run.id);
793
- }) })]
794
- })
795
- })] });
796
- }
797
- //#endregion
798
- //#region editors/workflow-studio/components/RunsView.tsx
799
- function RunsView(props) {
800
- const [firing, setFiring] = useState(false);
801
- const [fireError, setFireError] = useState(null);
802
- const { runs } = props;
803
- return /* @__PURE__ */ jsxs("div", {
804
- className: "w-full",
805
- children: [
806
- /* @__PURE__ */ jsxs("div", {
807
- className: "mb-3 flex items-center gap-3",
808
- children: [
809
- /* @__PURE__ */ jsx("h2", {
810
- className: "text-base font-semibold text-slate-800",
811
- children: props.title
812
- }),
813
- /* @__PURE__ */ jsx("span", { className: "grow" }),
814
- props.onFire ? /* @__PURE__ */ jsx("button", {
815
- type: "button",
816
- disabled: firing,
817
- className: "rounded bg-blue-600 px-3 py-1.5 text-xs font-semibold text-white hover:bg-blue-700 disabled:opacity-50",
818
- onClick: () => {
819
- setFiring(true);
820
- setFireError(null);
821
- props.onFire().then((fireResultError) => setFireError(fireResultError)).catch((fireCallError) => setFireError(fireCallError instanceof Error ? fireCallError.message : String(fireCallError))).finally(() => {
822
- setFiring(false);
823
- props.reload();
824
- });
825
- },
826
- children: firing ? "Running…" : "▶ Run workflow"
827
- }) : null
828
- ]
829
- }),
830
- fireError ? /* @__PURE__ */ jsx("p", {
831
- className: "mb-2 rounded bg-red-50 px-3 py-2 text-xs text-red-600",
832
- children: fireError
833
- }) : null,
834
- props.error ? /* @__PURE__ */ jsxs("p", {
835
- className: "rounded bg-amber-50 px-3 py-2 text-xs text-amber-700",
836
- children: [
837
- "The workflow runtime is unreachable, so runs cannot be listed:",
838
- " ",
839
- props.error
840
- ]
841
- }) : runs === null ? /* @__PURE__ */ jsx("p", {
842
- className: "text-sm text-slate-400",
843
- children: "Loading runs…"
844
- }) : runs.length === 0 ? /* @__PURE__ */ jsxs("p", {
845
- className: "rounded-md border border-solid border-slate-200 bg-white px-3 py-6 text-center text-sm text-slate-400",
846
- children: [
847
- "No runs yet",
848
- props.onFire ? " — run the workflow to record the first one" : "",
849
- "."
850
- ]
851
- }) : /* @__PURE__ */ jsx(RunsTable, {
852
- runs,
853
- showWorkflow: props.showWorkflow,
854
- onChanged: props.reload
855
- })
856
- ]
857
- });
858
- }
859
- //#endregion
860
- //#region editors/workflow-studio/components/Sidebar.tsx
861
- const WORKFLOW_TYPE$2 = "powerhouse/workflow";
862
- function documentName(document, fallback) {
863
- return (document?.state?.global)?.name || fallback || "(unnamed)";
864
- }
865
- function documentStatus(document) {
866
- return (document?.state?.global)?.status;
867
- }
868
- function Row(props) {
869
- return /* @__PURE__ */ jsxs("div", {
870
- className: `group mx-2 flex items-center rounded ${props.active ? "bg-white ring-1 ring-slate-200" : "hover:bg-slate-100"}`,
871
- children: [/* @__PURE__ */ jsx("button", {
872
- type: "button",
873
- "aria-current": props.active ? "true" : void 0,
874
- className: `flex min-w-0 grow items-center gap-2 px-2 py-1.5 text-left text-sm ${props.active ? "text-slate-900" : "text-slate-600"}`,
875
- onClick: props.onClick,
876
- children: props.children
877
- }), props.trailing]
878
- });
879
- }
880
- const ROW_ACTION = "shrink-0 rounded px-1 py-0.5 text-xs text-slate-400 opacity-0 hover:bg-slate-200 hover:text-slate-700 focus-visible:opacity-100 group-hover:opacity-100";
881
- const DELETE_ACTION = `${ROW_ACTION} hover:bg-red-100 hover:text-red-600`;
882
- function DeleteButton(props) {
883
- return /* @__PURE__ */ jsx("button", {
884
- type: "button",
885
- title: "Delete",
886
- "aria-label": `Delete ${props.label}`,
887
- className: DELETE_ACTION,
888
- onClick: () => showDeleteNodeModal(props.node),
889
- children: /* @__PURE__ */ jsx("span", {
890
- "aria-hidden": true,
891
- children: "🗑"
892
- })
893
- });
894
- }
895
- function NodeRow(props) {
896
- const { node } = props;
897
- const { data: document, error } = useDocumentSafe(node.id);
898
- useEffect(() => {
899
- if (error !== void 0) console.error(`Failed to load document ${node.id}:`, error);
900
- }, [error, node.id]);
901
- if (error !== void 0) return /* @__PURE__ */ jsxs(Row, {
902
- active: props.active,
903
- onClick: props.onOpen,
904
- trailing: /* @__PURE__ */ jsx("span", {
905
- className: "mr-1.5 flex shrink-0 items-center",
906
- children: /* @__PURE__ */ jsx(DeleteButton, {
907
- node,
908
- label: node.name || node.id
909
- })
910
- }),
911
- children: [/* @__PURE__ */ jsx("span", {
912
- className: "shrink-0 text-xs text-red-600",
913
- title: `Could not load ${node.id}: ${errorMessage(error)}`,
914
- "aria-hidden": true,
915
- children: "⚠"
916
- }), /* @__PURE__ */ jsx("span", {
917
- className: "min-w-0 truncate text-red-600",
918
- children: node.name || "(unnamed)"
919
- })]
920
- });
921
- const status = documentStatus(document);
922
- const dots = node.documentType === WORKFLOW_TYPE$2 ? WORKFLOW_STATUS_DOT : CONNECTION_STATUS_DOT;
923
- return /* @__PURE__ */ jsxs(Row, {
924
- active: props.active,
925
- onClick: props.onOpen,
926
- trailing: /* @__PURE__ */ jsxs("span", {
927
- className: "mr-1.5 flex shrink-0 items-center",
928
- children: [props.onEdit ? /* @__PURE__ */ jsx("button", {
929
- type: "button",
930
- title: "Open in editor",
931
- "aria-label": `Open ${documentName(document, node.name)} in the editor`,
932
- className: ROW_ACTION,
933
- onClick: props.onEdit,
934
- children: /* @__PURE__ */ jsx("span", {
935
- "aria-hidden": true,
936
- children: "✎"
937
- })
938
- }) : null, /* @__PURE__ */ jsx(DeleteButton, {
939
- node,
940
- label: documentName(document, node.name)
941
- })]
942
- }),
943
- children: [/* @__PURE__ */ jsx("span", {
944
- className: `h-1.5 w-1.5 shrink-0 rounded-full ${status ? dots[status] ?? "bg-slate-300" : "bg-slate-200"}`,
945
- title: status
946
- }), /* @__PURE__ */ jsx("span", {
947
- className: "min-w-0 truncate",
948
- children: documentName(document, node.name)
949
- })]
950
- });
951
- }
952
- function Section(props) {
953
- return /* @__PURE__ */ jsxs("div", {
954
- className: "mt-2",
955
- children: [/* @__PURE__ */ jsxs("div", {
956
- className: "mb-1.5 flex items-center justify-between border-y border-solid border-slate-200 bg-slate-100 px-4 py-1.5",
957
- children: [/* @__PURE__ */ jsx("span", {
958
- className: "text-[11px] font-bold uppercase tracking-wider text-slate-600",
959
- children: props.title
960
- }), /* @__PURE__ */ jsx("button", {
961
- type: "button",
962
- disabled: props.creating,
963
- className: "flex h-5 w-5 items-center justify-center rounded border border-solid border-transparent text-sm leading-none text-slate-500 hover:border-slate-300 hover:bg-white hover:text-slate-800 disabled:opacity-50",
964
- title: props.addLabel,
965
- "aria-label": props.addLabel,
966
- onClick: props.onCreate,
967
- children: /* @__PURE__ */ jsx("span", {
968
- "aria-hidden": true,
969
- children: "+"
970
- })
971
- })]
972
- }), props.nodes.length === 0 ? /* @__PURE__ */ jsx("p", {
973
- className: "px-4 py-1 text-xs text-slate-400",
974
- children: props.empty
975
- }) : /* @__PURE__ */ jsx("div", {
976
- className: "flex flex-col gap-0.5",
977
- children: props.nodes.map((node) => /* @__PURE__ */ jsx(NodeRow, {
978
- node,
979
- active: props.activeId === node.id,
980
- onOpen: () => props.onOpen(node),
981
- onEdit: props.onEdit ? () => props.onEdit(node) : void 0
982
- }, node.id))
983
- })]
984
- });
985
- }
986
- function Sidebar(props) {
987
- return /* @__PURE__ */ jsxs("aside", {
988
- className: "w-60 shrink-0 overflow-y-auto border-r border-solid border-slate-200 bg-slate-50 py-2",
989
- children: [
990
- /* @__PURE__ */ jsxs(Row, {
991
- active: props.allRunsActive,
992
- onClick: props.onShowAllRuns,
993
- children: [/* @__PURE__ */ jsx("span", {
994
- "aria-hidden": true,
995
- className: "shrink-0 text-xs text-slate-400",
996
- children: "☰"
997
- }), /* @__PURE__ */ jsx("span", {
998
- className: "font-medium",
999
- children: "All runs"
1000
- })]
1001
- }),
1002
- /* @__PURE__ */ jsx(Section, {
1003
- title: "Workflows",
1004
- addLabel: "New workflow",
1005
- empty: "No workflows yet. Use + to add one.",
1006
- nodes: props.workflows,
1007
- activeId: props.activeId,
1008
- onOpen: props.onOpenWorkflow,
1009
- onEdit: props.onEditWorkflow,
1010
- onCreate: props.onCreateWorkflow,
1011
- creating: props.creating
1012
- }),
1013
- /* @__PURE__ */ jsx(Section, {
1014
- title: "Connections",
1015
- addLabel: "New connection",
1016
- empty: "No connections yet. Use + to add one.",
1017
- nodes: props.connections,
1018
- activeId: props.activeId,
1019
- onOpen: props.onOpenConnection,
1020
- onEdit: props.onEditConnection,
1021
- onCreate: props.onCreateConnection,
1022
- creating: props.creating
1023
- })
1024
- ]
1025
- });
1026
- }
1027
- //#endregion
1028
- //#region editors/workflow-studio/components/use-hash-selection.ts
1029
- function readHash() {
1030
- return window.location.hash.replace(/^#/, "") || void 0;
1031
- }
1032
- function useHashSelection() {
1033
- const [selected, setSelected] = useState(readHash);
1034
- useEffect(() => {
1035
- const sync = () => setSelected(readHash());
1036
- window.addEventListener("hashchange", sync);
1037
- window.addEventListener("popstate", sync);
1038
- return () => {
1039
- window.removeEventListener("hashchange", sync);
1040
- window.removeEventListener("popstate", sync);
1041
- };
1042
- }, []);
1043
- return [selected, useCallback((id) => {
1044
- setSelected(id);
1045
- const url = new URL(window.location.href);
1046
- url.hash = id ?? "";
1047
- window.history.replaceState(null, "", url);
1048
- }, [])];
1049
- }
1050
- //#endregion
1051
- //#region editors/workflow-studio/components/useRuns.ts
1052
- const POLL_MS = 5e3;
1053
- function useRuns(scope) {
1054
- const { workflowId, driveId, limit } = scope;
1055
- const [runs, setRuns] = useState(null);
1056
- const [error, setError] = useState(null);
1057
- const load = useRef(() => void 0);
1058
- useEffect(() => {
1059
- let cancelled = false;
1060
- const run = () => {
1061
- fetchRuns({
1062
- workflowId,
1063
- driveId,
1064
- limit
1065
- }).then((result) => {
1066
- if (cancelled) return;
1067
- setRuns(result);
1068
- setError(null);
1069
- }, (loadError) => {
1070
- if (cancelled) return;
1071
- setError(loadError instanceof Error ? loadError.message : String(loadError));
1072
- });
1073
- };
1074
- load.current = run;
1075
- setRuns(null);
1076
- run();
1077
- const timer = setInterval(run, POLL_MS);
1078
- return () => {
1079
- cancelled = true;
1080
- clearInterval(timer);
1081
- };
1082
- }, [
1083
- workflowId,
1084
- driveId,
1085
- limit
1086
- ]);
1087
- return {
1088
- runs,
1089
- error,
1090
- reload: useCallback(() => load.current(), [])
1091
- };
1092
- }
1093
- //#endregion
1094
- //#region editors/workflow-studio/components/step-outline.ts
1095
- function stepOutline(args) {
1096
- const stepById = new Map(args.steps.map((step) => [step.id, step]));
1097
- const outgoing = /* @__PURE__ */ new Map();
1098
- for (const edge of args.edges) {
1099
- if (!stepById.has(edge.to)) continue;
1100
- const list = outgoing.get(edge.from) ?? [];
1101
- list.push(edge);
1102
- outgoing.set(edge.from, list);
1103
- }
1104
- for (const list of outgoing.values()) list.sort((a, b) => portRank(a.port) - portRank(b.port));
1105
- const rows = [];
1106
- const seen = /* @__PURE__ */ new Set();
1107
- const walk = (fromId, port) => {
1108
- const step = stepById.get(fromId);
1109
- if (step) {
1110
- if (seen.has(fromId)) return;
1111
- seen.add(fromId);
1112
- rows.push({
1113
- step,
1114
- port: port === "next" ? null : port
1115
- });
1116
- }
1117
- for (const edge of outgoing.get(fromId) ?? []) walk(edge.to, edge.port);
1118
- };
1119
- if (args.triggerId) walk(args.triggerId, null);
1120
- return {
1121
- rows,
1122
- orphans: args.steps.filter((step) => !seen.has(step.id))
1123
- };
1124
- }
1125
- //#endregion
1126
- //#region editors/workflow-studio/components/WorkflowSteps.tsx
1127
- const STEP_DOT = {
1128
- ...RUN_DOT,
1129
- SKIPPED: "bg-slate-300",
1130
- REPLAYED: "bg-sky-400"
1131
- };
1132
- function ChipLogo(props) {
1133
- const [broken, setBroken] = useState(false);
1134
- if (props.logoUrl && !broken) return /* @__PURE__ */ jsx("img", {
1135
- src: props.logoUrl,
1136
- alt: "",
1137
- className: "h-4 w-4 shrink-0",
1138
- onError: () => setBroken(true)
1139
- });
1140
- return /* @__PURE__ */ jsx("span", {
1141
- className: "w-4 shrink-0 text-center text-xs text-slate-400",
1142
- children: props.glyph ?? "▪"
1143
- });
1144
- }
1145
- function Chip(props) {
1146
- return /* @__PURE__ */ jsxs("button", {
1147
- type: "button",
1148
- title: props.status ? `${props.subtitle} · ${props.status}` : props.subtitle,
1149
- className: `flex max-w-56 items-center gap-2 rounded border border-solid px-2 py-1 text-left hover:border-slate-400 ${props.muted ? "border-dashed border-slate-300 bg-slate-50" : "border-slate-200 bg-white"}`,
1150
- onClick: props.onClick,
1151
- children: [
1152
- /* @__PURE__ */ jsx(ChipLogo, {
1153
- logoUrl: props.logoUrl,
1154
- glyph: props.glyph
1155
- }),
1156
- /* @__PURE__ */ jsxs("span", {
1157
- className: "min-w-0",
1158
- children: [/* @__PURE__ */ jsx("span", {
1159
- className: "block truncate text-xs font-medium text-slate-700",
1160
- children: props.title
1161
- }), /* @__PURE__ */ jsx("span", {
1162
- className: "block truncate text-[11px] text-slate-400",
1163
- children: props.subtitle
1164
- })]
1165
- }),
1166
- props.status ? /* @__PURE__ */ jsx("span", { className: `ml-1 h-2 w-2 shrink-0 rounded-full ${STEP_DOT[props.status] ?? "bg-slate-300"}` }) : null
1167
- ]
1168
- });
1169
- }
1170
- function Arrow(props) {
1171
- return /* @__PURE__ */ jsxs("span", {
1172
- className: "flex shrink-0 items-center gap-1 text-slate-300",
1173
- children: [/* @__PURE__ */ jsx("span", {
1174
- "aria-hidden": true,
1175
- children: "→"
1176
- }), props.port ? /* @__PURE__ */ jsx("span", {
1177
- className: "rounded bg-slate-100 px-1 text-[10px] text-slate-500",
1178
- children: props.port
1179
- }) : null]
1180
- });
1181
- }
1182
- function WorkflowSteps(props) {
1183
- const { state } = props;
1184
- usePieceLogos();
1185
- const outline = stepOutline({
1186
- triggerId: state.trigger?.id,
1187
- steps: state.steps,
1188
- edges: state.edges
1189
- });
1190
- const statusByKey = new Map((props.latestRun?.steps ?? []).map((step) => [step.stepKey, step.status]));
1191
- const chipFor = (step, muted) => {
1192
- const meta = blockMeta(step.blockType);
1193
- return /* @__PURE__ */ jsx(Chip, {
1194
- title: step.name || step.key,
1195
- subtitle: meta.displayName,
1196
- glyph: meta.glyph,
1197
- logoUrl: meta.logoUrl,
1198
- status: statusByKey.get(step.key),
1199
- muted,
1200
- onClick: props.onOpenEditor
1201
- }, step.id);
1202
- };
1203
- if (!state.trigger && state.steps.length === 0) return /* @__PURE__ */ jsx("section", {
1204
- className: "mt-3 rounded-md border border-solid border-slate-200 bg-white px-3 py-4",
1205
- children: /* @__PURE__ */ jsxs("p", {
1206
- className: "text-xs text-slate-500",
1207
- children: [
1208
- "This workflow has no trigger or steps yet.",
1209
- " ",
1210
- /* @__PURE__ */ jsx("button", {
1211
- type: "button",
1212
- className: "underline hover:text-slate-800",
1213
- onClick: props.onOpenEditor,
1214
- children: "Open the editor"
1215
- }),
1216
- " ",
1217
- "to build it."
1218
- ]
1219
- })
1220
- });
1221
- const triggerMeta = state.trigger ? blockMeta(state.trigger.blockType) : null;
1222
- return /* @__PURE__ */ jsxs("section", {
1223
- className: "mt-3 rounded-md border border-solid border-slate-200 bg-white px-3 py-3",
1224
- children: [
1225
- /* @__PURE__ */ jsxs("div", {
1226
- className: "mb-2 flex items-baseline gap-2",
1227
- children: [/* @__PURE__ */ jsx("h3", {
1228
- className: "text-[11px] text-slate-400",
1229
- children: "Steps"
1230
- }), /* @__PURE__ */ jsx("span", {
1231
- className: "text-[11px] tabular-nums text-slate-400",
1232
- children: state.steps.length
1233
- })]
1234
- }),
1235
- /* @__PURE__ */ jsxs("div", {
1236
- className: "flex flex-wrap items-center gap-2",
1237
- children: [triggerMeta && state.trigger ? /* @__PURE__ */ jsx(Chip, {
1238
- title: triggerMeta.displayName,
1239
- subtitle: "Trigger",
1240
- glyph: triggerMeta.glyph,
1241
- logoUrl: triggerMeta.logoUrl,
1242
- muted: false,
1243
- onClick: props.onOpenEditor
1244
- }) : /* @__PURE__ */ jsx("span", {
1245
- className: "rounded border border-dashed border-slate-300 px-2 py-1 text-[11px] text-slate-400",
1246
- children: "No trigger"
1247
- }), outline.rows.map((row) => /* @__PURE__ */ jsxs("span", {
1248
- className: "flex items-center gap-2",
1249
- children: [/* @__PURE__ */ jsx(Arrow, { port: row.port }), chipFor(row.step, false)]
1250
- }, row.step.id))]
1251
- }),
1252
- outline.orphans.length > 0 ? /* @__PURE__ */ jsxs("div", {
1253
- className: "mt-3 border-t border-solid border-slate-100 pt-2",
1254
- children: [/* @__PURE__ */ jsx("p", {
1255
- className: "mb-2 text-[11px] text-slate-400",
1256
- children: "Not connected to the trigger, so runs never reach these:"
1257
- }), /* @__PURE__ */ jsx("div", {
1258
- className: "flex flex-wrap items-center gap-2",
1259
- children: outline.orphans.map((step) => chipFor(step, true))
1260
- })]
1261
- }) : null
1262
- ]
1263
- });
1264
- }
1265
- //#endregion
1266
- //#region editors/workflow-studio/components/WorkflowHeader.tsx
1267
- const WORKFLOW_TYPE$1 = "powerhouse/workflow";
1268
- const ACTION = "rounded border border-solid border-slate-300 bg-white px-2.5 py-1 text-xs font-medium text-slate-700 hover:border-slate-400 hover:bg-slate-50";
1269
- function Stat(props) {
1270
- return /* @__PURE__ */ jsxs("div", {
1271
- className: "min-w-0 grow border-l border-solid border-slate-200 px-3 py-2 first:border-l-0 first:pl-0",
1272
- children: [/* @__PURE__ */ jsx("div", {
1273
- className: "text-[11px] text-slate-400",
1274
- children: props.label
1275
- }), /* @__PURE__ */ jsx("div", {
1276
- className: "truncate text-xs text-slate-800",
1277
- children: props.children
1278
- })]
1279
- });
1280
- }
1281
- function WorkflowHeader(props) {
1282
- const workflowId = props.node.id;
1283
- const { data: document, error, reload } = useDocumentSafe(workflowId);
1284
- const [, dispatch] = useDispatch(document);
1285
- if (error !== void 0) return /* @__PURE__ */ jsx(DocumentLoadError, {
1286
- title: "This workflow could not be loaded",
1287
- documentId: workflowId,
1288
- error,
1289
- onRetry: () => {
1290
- reload();
1291
- }
1292
- });
1293
- if (document?.header.documentType !== WORKFLOW_TYPE$1) return null;
1294
- const state = document.state.global;
1295
- const enabled = state.status === "ENABLED";
1296
- const stats = runStats(props.runs ?? []);
1297
- const trigger = state.trigger ? blockMeta(state.trigger.blockType).displayName : null;
1298
- return /* @__PURE__ */ jsxs("header", {
1299
- className: "mb-4",
1300
- children: [
1301
- /* @__PURE__ */ jsxs("div", {
1302
- className: "flex flex-wrap items-center gap-2",
1303
- children: [
1304
- /* @__PURE__ */ jsx("h2", {
1305
- className: "min-w-0 truncate text-base font-semibold text-slate-800",
1306
- children: state.name || props.node.name || "Untitled workflow"
1307
- }),
1308
- /* @__PURE__ */ jsx("span", {
1309
- className: `rounded px-2 py-0.5 text-[11px] font-semibold ${WORKFLOW_STATUS_STYLES[state.status] ?? "bg-slate-100 text-slate-500"}`,
1310
- children: state.status
1311
- }),
1312
- /* @__PURE__ */ jsx("span", { className: "grow" }),
1313
- /* @__PURE__ */ jsx("button", {
1314
- type: "button",
1315
- className: ACTION,
1316
- onClick: () => dispatch(actions$1.setWorkflowStatus({ status: enabled ? "DISABLED" : "ENABLED" })),
1317
- children: enabled ? "Disable" : "Enable"
1318
- }),
1319
- /* @__PURE__ */ jsx("button", {
1320
- type: "button",
1321
- className: ACTION,
1322
- onClick: props.onEdit,
1323
- children: "Edit workflow"
1324
- }),
1325
- /* @__PURE__ */ jsx("button", {
1326
- type: "button",
1327
- className: "rounded border border-solid border-red-200 bg-white px-2.5 py-1 text-xs font-medium text-red-600 hover:border-red-300 hover:bg-red-50",
1328
- onClick: () => showDeleteNodeModal(props.node),
1329
- children: "Delete"
1330
- })
1331
- ]
1332
- }),
1333
- state.description ? /* @__PURE__ */ jsx("p", {
1334
- className: "mt-1 max-w-2xl text-xs text-slate-500",
1335
- children: state.description
1336
- }) : null,
1337
- /* @__PURE__ */ jsxs("div", {
1338
- className: "mt-3 flex flex-wrap items-stretch rounded-md border border-solid border-slate-200 bg-white px-3",
1339
- children: [
1340
- /* @__PURE__ */ jsx(Stat, {
1341
- label: "Trigger",
1342
- children: trigger ?? /* @__PURE__ */ jsx("span", {
1343
- className: "text-slate-400",
1344
- children: "None set"
1345
- })
1346
- }),
1347
- /* @__PURE__ */ jsx(Stat, {
1348
- label: "Last run",
1349
- children: stats.lastRun ? /* @__PURE__ */ jsxs("span", {
1350
- className: "flex items-center gap-1.5",
1351
- title: formatAbsolute(stats.lastRun.startedAt),
1352
- children: [/* @__PURE__ */ jsx("span", { className: `h-2 w-2 shrink-0 rounded-full ${RUN_DOT[stats.lastRun.status] ?? "bg-slate-300"}` }), /* @__PURE__ */ jsx("span", {
1353
- className: RUN_TEXT[stats.lastRun.status] ?? "",
1354
- children: formatWhen(stats.lastRun.startedAt)
1355
- })]
1356
- }) : /* @__PURE__ */ jsx("span", {
1357
- className: "text-slate-400",
1358
- children: "Never run"
1359
- })
1360
- }),
1361
- /* @__PURE__ */ jsx(Stat, {
1362
- label: "Recent runs",
1363
- children: /* @__PURE__ */ jsxs("span", {
1364
- className: "tabular-nums",
1365
- children: [
1366
- stats.total,
1367
- stats.failed > 0 ? /* @__PURE__ */ jsxs("span", {
1368
- className: "text-red-600",
1369
- children: [
1370
- " · ",
1371
- stats.failed,
1372
- " failed"
1373
- ]
1374
- }) : null,
1375
- stats.running > 0 ? /* @__PURE__ */ jsxs("span", {
1376
- className: "text-amber-700",
1377
- children: [
1378
- " · ",
1379
- stats.running,
1380
- " running"
1381
- ]
1382
- }) : null
1383
- ]
1384
- })
1385
- }),
1386
- /* @__PURE__ */ jsx(Stat, {
1387
- label: "Success rate",
1388
- children: stats.successRate === null ? /* @__PURE__ */ jsx("span", {
1389
- className: "text-slate-400",
1390
- children: "—"
1391
- }) : /* @__PURE__ */ jsxs("span", {
1392
- className: "tabular-nums",
1393
- children: [stats.successRate, "%"]
1394
- })
1395
- }),
1396
- /* @__PURE__ */ jsx(Stat, {
1397
- label: "Version",
1398
- children: /* @__PURE__ */ jsxs("span", {
1399
- className: "tabular-nums",
1400
- children: ["v", state.version]
1401
- })
1402
- })
1403
- ]
1404
- }),
1405
- /* @__PURE__ */ jsx(WorkflowSteps, {
1406
- state,
1407
- latestRun: stats.lastRun,
1408
- onOpenEditor: props.onEdit
1409
- })
1410
- ]
1411
- });
1412
- }
1413
- //#endregion
1414
- //#region editors/workflow-studio/components/WorkflowStudio.tsx
1415
- const WORKFLOW_TYPE = "powerhouse/workflow";
1416
- const CONNECTION_TYPE = "powerhouse/connection";
1417
- function WorkflowStudio(props) {
1418
- const [drive] = useSelectedDrive();
1419
- const fileNodes = useFileNodesInSelectedDrive() ?? [];
1420
- const selectedNode = useSelectedNode();
1421
- const selectedNodeId = selectedNode?.id;
1422
- const toast = usePHToast();
1423
- const [selectedId, select] = useHashSelection();
1424
- const [creating, setCreating] = useState(false);
1425
- const driveId = drive.header.id;
1426
- const workflows = fileNodes.filter((node) => node.documentType === WORKFLOW_TYPE);
1427
- const connections = fileNodes.filter((node) => node.documentType === CONNECTION_TYPE);
1428
- const editorOpen = Boolean(props.children && selectedNodeId);
1429
- const create = (documentType, baseName, count) => {
1430
- if (creating) return;
1431
- setCreating(true);
1432
- addDocument(driveId, `${baseName} ${count + 1}`, documentType).then((node) => {
1433
- select(node.id);
1434
- setSelectedNode(node.id);
1435
- }).catch((error) => {
1436
- toast?.(error instanceof Error ? error.message : `Failed to create ${baseName}`, { type: "error" });
1437
- }).finally(() => setCreating(false));
1438
- };
1439
- const showRuns = (node) => {
1440
- setSelectedNode(void 0);
1441
- select(node?.id);
1442
- };
1443
- const liveTarget = workflows.find((node) => node.id === selectedId) ?? null;
1444
- const liveConnection = connections.find((node) => node.id === selectedId) ?? null;
1445
- const openNode = fileNodes.find((node) => node.id === selectedNodeId);
1446
- const selectionExists = fileNodes.some((node) => node.id === selectedId);
1447
- useEffect(() => {
1448
- if (selectedId && fileNodes.length > 0 && !selectionExists) select(void 0);
1449
- }, [
1450
- fileNodes.length,
1451
- select,
1452
- selectedId,
1453
- selectionExists
1454
- ]);
1455
- const editedWorkflow = editorOpen ? workflows.find((node) => node.id === selectedNodeId) ?? null : null;
1456
- const focusedWorkflow = editedWorkflow ?? liveTarget;
1457
- const { runs, error: runsError, reload: reloadRuns } = useRuns({
1458
- workflowId: focusedWorkflow?.id,
1459
- driveId: focusedWorkflow ? void 0 : driveId
1460
- });
1461
- const { data: targetDocument } = useDocumentSafe(liveTarget?.id ?? null);
1462
- const manualTrigger = targetDocument?.header.documentType === WORKFLOW_TYPE && targetDocument.state.global.trigger?.blockType === "core#manual";
1463
- return /* @__PURE__ */ jsxs("div", {
1464
- className: "flex h-full min-h-0",
1465
- children: [/* @__PURE__ */ jsx(Sidebar, {
1466
- workflows,
1467
- connections,
1468
- activeId: selectedId,
1469
- allRunsActive: !selectedId,
1470
- creating,
1471
- onShowAllRuns: () => showRuns(null),
1472
- onOpenWorkflow: (node) => showRuns(node),
1473
- onEditWorkflow: (node) => {
1474
- select(node.id);
1475
- setSelectedNode(node.id);
1476
- },
1477
- onOpenConnection: (node) => showRuns(node),
1478
- onEditConnection: (node) => {
1479
- select(node.id);
1480
- setSelectedNode(node.id);
1481
- },
1482
- onCreateWorkflow: () => create(WORKFLOW_TYPE, "Workflow", workflows.length),
1483
- onCreateConnection: () => create(CONNECTION_TYPE, "Connection", connections.length)
1484
- }), /* @__PURE__ */ jsx("main", {
1485
- className: "min-w-0 flex-1 overflow-y-auto",
1486
- children: editorOpen ? /* @__PURE__ */ jsxs("div", {
1487
- className: "flex h-full min-h-0 flex-col",
1488
- children: [/* @__PURE__ */ jsx(EditorToolbar, {
1489
- node: openNode,
1490
- runs: editedWorkflow ? runs : null,
1491
- onBack: () => setSelectedNode(void 0)
1492
- }), /* @__PURE__ */ jsx("div", {
1493
- className: "flex min-h-0 flex-1 flex-col [&>#document-editor-container]:min-h-0",
1494
- children: /* @__PURE__ */ jsx(DocumentErrorBoundary, {
1495
- documentId: selectedNodeId,
1496
- label: selectedNode?.name,
1497
- onDismiss: () => setSelectedNode(void 0),
1498
- children: props.children
1499
- }, selectedNodeId)
1500
- })]
1501
- }) : liveConnection ? /* @__PURE__ */ jsx(ConnectionView, {
1502
- node: liveConnection,
1503
- onEdit: () => {
1504
- select(liveConnection.id);
1505
- setSelectedNode(liveConnection.id);
1506
- },
1507
- onOpenWorkflow: (workflowId) => select(workflowId)
1508
- }, liveConnection.id) : /* @__PURE__ */ jsxs("div", {
1509
- className: "mx-auto w-full max-w-5xl p-6",
1510
- children: [liveTarget ? /* @__PURE__ */ jsx(WorkflowHeader, {
1511
- node: liveTarget,
1512
- runs,
1513
- onEdit: () => setSelectedNode(liveTarget.id)
1514
- }, liveTarget.id) : null, /* @__PURE__ */ jsx(RunsView, {
1515
- title: liveTarget ? "Runs" : "All runs in this drive",
1516
- runs,
1517
- error: runsError,
1518
- reload: reloadRuns,
1519
- showWorkflow: liveTarget === null,
1520
- onFire: liveTarget && manualTrigger ? () => fireWorkflow(liveTarget.id).then((result) => result.error) : void 0
1521
- })]
1522
- })
1523
- })]
1524
- });
1525
- }
1526
- //#endregion
1527
- //#region editors/workflow-studio/config.ts
1528
- const editorConfig = {
1529
- isDragAndDropEnabled: true,
1530
- allowedDocumentTypes: ["powerhouse/workflow", "powerhouse/connection"]
1531
- };
1532
- //#endregion
1533
- //#region editors/workflow-studio/editor.tsx
1534
- /**
1535
- * WARNING: DO NOT EDIT
1536
- * This file is auto-generated and updated by codegen
1537
- */
1538
- /** Editor component for the app */
1539
- function Editor(props) {
1540
- useSetPHAppConfig(editorConfig);
1541
- useSyncWorkflowRuntimeUrl();
1542
- return /* @__PURE__ */ jsx("div", {
1543
- className: "h-full min-h-0 bg-background",
1544
- children: /* @__PURE__ */ jsx(WorkflowStudio, { children: props.children })
1545
- });
1546
- }
1547
- //#endregion
1548
- export { Editor as default };
1549
-
1550
- //# sourceMappingURL=editor-NbAB78He.mjs.map