@fluidgrids/fe-sdk 0.0.0-stage → 2026.1203.7

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 (323) hide show
  1. package/README.md +564 -2
  2. package/dist/ActivityOptionsFields-C2u-hY2U.js +142 -0
  3. package/dist/AiStudioPage-B_hNTj-_.js +1137 -0
  4. package/dist/ApprovalInboxPage-ClITra3n.js +1312 -0
  5. package/dist/ChoiceSelect-LkK-uS9J.js +65 -0
  6. package/dist/ConfirmActionDialog-DHWTDRbp.js +31 -0
  7. package/dist/ConnectionFormDialog-C0kDgcrZ.js +153 -0
  8. package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
  9. package/dist/DataSinkDashboardPage-b4ezeqa6.js +278 -0
  10. package/dist/DataTablesPage-C1d9YGHz.js +5575 -0
  11. package/dist/DateTimeField-B1qR4ruo.js +51 -0
  12. package/dist/Disclosure-BNKij7-v.js +45 -0
  13. package/dist/ElementLibraryPage-8jNO6YmE.js +2256 -0
  14. package/dist/ElementLibrarySequenceDocument-B-W8SPzn.js +3979 -0
  15. package/dist/EnsureThemeProvider-BvlNjAd0.js +24 -0
  16. package/dist/EntityTagBadge-1OlP6p0c.js +25 -0
  17. package/dist/EntityTagPicker-BBrU5cE0.js +137 -0
  18. package/dist/ExecuteStepDocument-B4j1mdRT.js +189 -0
  19. package/dist/ExecutionDetailDocument-D6QuM-kp.js +875 -0
  20. package/dist/ExecutionDetailPage-D4CBtFdo.js +12217 -0
  21. package/dist/ExecutionDetailPage-DvQ667OE.d.ts +10 -0
  22. package/dist/ExecutionStatusBadge-BsDVor9t.js +221 -0
  23. package/dist/ExecutionsListDocument-Dan7ZiqB.js +459 -0
  24. package/dist/ExecutionsListPage-B3XT8ITL.js +4307 -0
  25. package/dist/FailureTriagePanel-DOJMaJ0n.js +1285 -0
  26. package/dist/FileDownloadUrlDocument-CVOYKcL5.js +92 -0
  27. package/dist/FluidGridsDocsLink-bX0Hnhxr.js +66 -0
  28. package/dist/FluidGridsMark-CE2blT7K.js +74 -0
  29. package/dist/HeldLoadRegion-BtTxbvOW.js +34 -0
  30. package/dist/HistoryPage-BLoRpJ1R.d.ts +6 -0
  31. package/dist/HistoryPage-BSBISXoj.js +2835 -0
  32. package/dist/Icon-BtQ0HXLh.js +160 -0
  33. package/dist/InsightsPage-D7ybj8N9.js +11245 -0
  34. package/dist/IsolationSetting-vy911E8b.js +1153 -0
  35. package/dist/LibraryParts-DOeNgR8A.js +413 -0
  36. package/dist/ManagedAiPolicyAuthority-BxwJ3ptd.js +40 -0
  37. package/dist/ManagedAiPolicyAuthority-DM3t3wNr.d.ts +18 -0
  38. package/dist/ManagedAiPolicyAuthorityContext-CNkxIOZ1.js +10 -0
  39. package/dist/McpTriggerServers-BCPCAOWB.js +459 -0
  40. package/dist/MissingNodesInstallModal-rO_SEDrC.js +224 -0
  41. package/dist/NavigationV2Provider-DCDt35eG.js +17 -0
  42. package/dist/NodeSchemaIntrospectionDocument-C1vAIcHd.js +95 -0
  43. package/dist/NodesPage-DEbnz9iU.d.ts +6 -0
  44. package/dist/NodesPage-O7KeeKtd.js +653 -0
  45. package/dist/OfflineIcon-TwMKYWjA.js +207 -0
  46. package/dist/OpenTemplateAsCodeButton-BhWJWIF3.js +94 -0
  47. package/dist/PaidTemplateConfirm-_G3ag6S4.js +28 -0
  48. package/dist/PublishCustomNodeAction-CIySbK4c.js +134 -0
  49. package/dist/RecordTaskDialog-BkpCDvhR.js +2078 -0
  50. package/dist/RunActionsMenu-DodOgIQm.js +59 -0
  51. package/dist/RunnerStatusPill-C1v967iq.js +24 -0
  52. package/dist/RunnersPage-dB0RSdY_.js +1929 -0
  53. package/dist/SandboxRuntimeExhaustedNotice-BFOIF93C.js +120 -0
  54. package/dist/SchedulesPage-DPWr1yvf.js +1607 -0
  55. package/dist/SearchBox-BGtYjvfs.js +49 -0
  56. package/dist/SequenceEditor-CFiHeHkR.js +497 -0
  57. package/dist/SettingsPage-0CQBNPZV.js +8695 -0
  58. package/dist/StewardPages-DAJhepen.js +47 -0
  59. package/dist/StewardRunImportPanel-Kva2DO0u.js +2844 -0
  60. package/dist/StoreTemplateCardCompact-CHn5kP7A.js +2166 -0
  61. package/dist/TagFilterSelect-CyA8QrS7.js +42 -0
  62. package/dist/TaskQueuesPage-DdnDCyat.js +3571 -0
  63. package/dist/TechnicalDetails-B0Oi4aZw.js +19 -0
  64. package/dist/TemplateConfigurationModal-CdvCYJLM.js +332 -0
  65. package/dist/TemplateDetailPanel-CbiKciuB.js +222 -0
  66. package/dist/TemplatePreview-cx7-NOeG.js +868 -0
  67. package/dist/TemplatesPage-BG3H-6v6.d.ts +10 -0
  68. package/dist/TemplatesPage-BVQpGYIV.js +3251 -0
  69. package/dist/TerminateExecutionDocument-B_HKNVrN.js +581 -0
  70. package/dist/TranslationBridge-Bd4aJKMs.d.ts +11 -0
  71. package/dist/TranslationBridge-Da-TPgQm.js +68 -0
  72. package/dist/TriggerWorkflowDocument-D9Km2Vv2.js +460 -0
  73. package/dist/UiSequencePickerSequenceDocument-BSYnSDV7.js +607 -0
  74. package/dist/UiStepScreenshot-Qh4QMyUp.js +146 -0
  75. package/dist/UsageTimeSeriesDocument-DcInx9-z.js +177 -0
  76. package/dist/VariablesPage-ChfGuW22.js +2243 -0
  77. package/dist/VersionDiffDialog-Bd2AeUwf.js +1702 -0
  78. package/dist/VersionLifecycleBar-BBeWVtz-.js +143 -0
  79. package/dist/WebhookDeliveriesPage-D66bua0j.js +1563 -0
  80. package/dist/WorkflowBuilder-B6wQD1TK.js +539 -0
  81. package/dist/WorkflowBuilder-DR4ku8Tr.js +1611 -0
  82. package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
  83. package/dist/WorkflowEmbed-BXfFGy0i.js +708 -0
  84. package/dist/WorkflowEmbed-Cbqe1s1z.d.ts +6 -0
  85. package/dist/WorkflowPinnedDataDocument-BODT5omd.js +782 -0
  86. package/dist/WorkflowProposalCard-BruukdeF.js +96 -0
  87. package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
  88. package/dist/WorkflowSearchRedirect-C7zJ2MKH.js +40 -0
  89. package/dist/WorkflowSettingsDrawer-MVU1BKfY.d.ts +18 -0
  90. package/dist/WorkflowSettingsDrawer-gazs97WR.js +196 -0
  91. package/dist/WorkflowShareDialog-e8jJtLjU.js +469 -0
  92. package/dist/WorkflowVersionsDocument-DRVOp8Uj.js +3213 -0
  93. package/dist/WorkflowsList--hR2_8gf.js +4593 -0
  94. package/dist/WorkflowsList-CcNDQge5.d.ts +6 -0
  95. package/dist/WorkflowsListPageDocument-CnzcQm_o.js +934 -0
  96. package/dist/addonCatalog-CbZS4deh.js +58 -0
  97. package/dist/addonCatalog-sjlonAmR.d.ts +15 -0
  98. package/dist/addons.d.ts +3 -0
  99. package/dist/addons.js +4 -0
  100. package/dist/agent-form-Bfvm32j1.js +83 -0
  101. package/dist/agent-tools.d.ts +3 -0
  102. package/dist/agent-tools.js +5 -0
  103. package/dist/agentTools-CyL7DLOF.js +320 -0
  104. package/dist/ai-usage-BrxDgvdR.js +240 -0
  105. package/dist/aiCreditsBridge-BuE92tKo.js +49 -0
  106. package/dist/api-BKq-nIOZ.js +2286 -0
  107. package/dist/api-Ol7I8NxE.js +8289 -0
  108. package/dist/apollo-type-policies.d.ts +11 -0
  109. package/dist/apollo-type-policies.js +64 -0
  110. package/dist/askAboutBridge-ByYsQams.js +106 -0
  111. package/dist/askQuestions-Cmx7VnMm.js +742 -0
  112. package/dist/assert-rules-lfYEMc99.js +318 -0
  113. package/dist/assistant.d.ts +94 -0
  114. package/dist/assistant.js +99 -0
  115. package/dist/attach-node-helpers-HDKQOtrD.js +32 -0
  116. package/dist/badge-CXfPhoMH.js +26 -0
  117. package/dist/basil.generated-BK-EHbwN.js +10 -0
  118. package/dist/browser-steps-DMpS5TyB.js +533 -0
  119. package/dist/builderTimings-pvGnK1m-.js +510 -0
  120. package/dist/button-DG7y_FVJ.js +48 -0
  121. package/dist/canvasNoteTools-BxuP_AYO.js +137 -0
  122. package/dist/card-Bomy_1UG.js +44 -0
  123. package/dist/catalogGrid-BOrfMgi-.js +41 -0
  124. package/dist/channel-CPyQ1NR1.js +212 -0
  125. package/dist/chips-CvNrYJZa.js +27 -0
  126. package/dist/client-holder-C0M5Cfwl.js +68 -0
  127. package/dist/cn-QqidFIgr.js +10 -0
  128. package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
  129. package/dist/code-editor-field-x_JrY8KR.js +113 -0
  130. package/dist/codec-client-DPuD6mw7.js +515 -0
  131. package/dist/conditionBuilder-DwfEF0Q-.js +1144 -0
  132. package/dist/config-DO68jw5k.js +322 -0
  133. package/dist/constants-DgbVc24O.d.ts +296 -0
  134. package/dist/constants-DlRnHBfQ.js +217 -0
  135. package/dist/convert-browser-action-pfecelF7.js +347 -0
  136. package/dist/convert-dialog-B_o22NiJ.js +382 -0
  137. package/dist/create-workflow-first-Azg3JUdX.js +120 -0
  138. package/dist/definition-canvas-Bsda-rDT.js +31 -0
  139. package/dist/dialog-BVd152GS.js +94 -0
  140. package/dist/durable-nodes-BXyYCLxT.js +91 -0
  141. package/dist/duration-CDb7-mT_.js +33 -0
  142. package/dist/edge-mapper-wEAdGVU2.js +4477 -0
  143. package/dist/element-library-DkSlg_VE.js +727 -0
  144. package/dist/entities-I_0kio3q.js +38 -0
  145. package/dist/error-advice-QLr5NCm7.js +65 -0
  146. package/dist/errors-ClKb5sEt.js +188 -0
  147. package/dist/executions.d.ts +3 -0
  148. package/dist/executions.js +5 -0
  149. package/dist/feature-flags-B2qetXKd.js +385 -0
  150. package/dist/field-label-DPZRmE_B.js +153 -0
  151. package/dist/firstWorkflow-C_h0KMB2.js +133 -0
  152. package/dist/flags.d.ts +3 -0
  153. package/dist/flags.js +4 -0
  154. package/dist/flow-builder-DIvLOhz0.js +28038 -0
  155. package/dist/flow-store-holder-CUN7Terz.js +52 -0
  156. package/dist/fluent.generated-CA_e6-4l.js +14 -0
  157. package/dist/fluidgridsEvents-bbEQbwU6.js +175 -0
  158. package/dist/fluidgridsTheme-DUhvOgoy.js +297 -0
  159. package/dist/global-client-BQPuFrFa.js +433 -0
  160. package/dist/global-operations-BG6YgxrM.js +136 -0
  161. package/dist/graphql-types-UTYtujY9.js +21358 -0
  162. package/dist/history.d.ts +3 -0
  163. package/dist/history.js +4 -0
  164. package/dist/index-AoJAa5vU.d.ts +164958 -0
  165. package/dist/index-DEMT3iAM.d.ts +120 -0
  166. package/dist/index-ROZzNGyY.d.ts +76 -0
  167. package/dist/index.d.ts +20 -0
  168. package/dist/index.js +8123 -0
  169. package/dist/ion.generated-mbajjcAg.js +10 -0
  170. package/dist/label-Lzb8ZXf_.js +29 -0
  171. package/dist/labels-rXd9gYQz.js +1236 -0
  172. package/dist/liveCanvas-D5ytXDp8.js +103 -0
  173. package/dist/logos.generated-X6_0kjVR.js +21 -0
  174. package/dist/logs-panel-Cw0DkG0l.js +468 -0
  175. package/dist/lucide.generated-B6NVd3GT.js +29 -0
  176. package/dist/marksStore-a9oIMMot.js +175 -0
  177. package/dist/mcp-trigger-D0nRdvq5.js +307 -0
  178. package/dist/mdi.generated-D1BV74d6.js +292 -0
  179. package/dist/menus-CU3hDGYl.js +160 -0
  180. package/dist/mynaui.generated-DMWr5cXz.js +66 -0
  181. package/dist/navigation-v2.d.ts +3 -0
  182. package/dist/navigation-v2.js +5 -0
  183. package/dist/node-detail-view-Cgm5H1P-.js +1372 -0
  184. package/dist/node-editor-tab-body-CZ0fVuVP.js +187 -0
  185. package/dist/node-operation-selection-CdV3KI_V.js +3534 -0
  186. package/dist/node-registry-refresh-s3okf83X.js +27 -0
  187. package/dist/node-role-TMbnkmeP.js +132 -0
  188. package/dist/node-type-icon-BZa8n4iG.js +33 -0
  189. package/dist/nodes.d.ts +3 -0
  190. package/dist/nodes.js +4 -0
  191. package/dist/notesKey-5EaREBGA.js +12 -0
  192. package/dist/observability.d.ts +3 -0
  193. package/dist/observability.js +5 -0
  194. package/dist/offset-pages-zghoClB3.js +55 -0
  195. package/dist/operations-BBmT9ToP.js +663 -0
  196. package/dist/operations-WxRJWeqO.js +3133 -0
  197. package/dist/output-files-Ba8bu5lv.js +196 -0
  198. package/dist/page-operation-DrWuhd6Y.js +129 -0
  199. package/dist/page-twins.d.ts +13 -0
  200. package/dist/page-twins.js +186 -0
  201. package/dist/pageControlSpecs-DZJ9K37m.js +134 -0
  202. package/dist/pageControlsBridge-0pX9s-3k.js +54 -0
  203. package/dist/pageControlsBridge-DAuT3w7L.d.ts +36 -0
  204. package/dist/panels-PfBBAToE.js +346 -0
  205. package/dist/parts-B7fBcw-B.js +346 -0
  206. package/dist/popover-Dms9Vz3j.js +3389 -0
  207. package/dist/preloadable-lazy-Pp47mqQ9.js +65 -0
  208. package/dist/proactive.d.ts +66 -0
  209. package/dist/proactive.js +237 -0
  210. package/dist/quick-config-panel-DFd77xho.js +451 -0
  211. package/dist/quota-DeA_CJ2e.js +175 -0
  212. package/dist/quota.d.ts +3 -0
  213. package/dist/quota.js +4 -0
  214. package/dist/read-only-context-Dt9N9SIG.js +18 -0
  215. package/dist/relative-time-Dxt8ZIIu.js +55 -0
  216. package/dist/results-CwK_yDxK.js +325 -0
  217. package/dist/rolldown-runtime-hDbaFkMy.js +18 -0
  218. package/dist/route-data.d.ts +12 -0
  219. package/dist/route-data.js +69 -0
  220. package/dist/route-match-C-0_EnAt.d.ts +5 -0
  221. package/dist/route-match-DMkUICYV.js +41 -0
  222. package/dist/route-preload-C4DlGoCd.js +120 -0
  223. package/dist/run-display-UjLAoYqQ.js +81 -0
  224. package/dist/run-history-arGiHzGU.js +285 -0
  225. package/dist/run-list-links-DJn4Mf1T.js +98 -0
  226. package/dist/run-mode-USmM0-Uo.js +82 -0
  227. package/dist/run-parity-CWXqEJqM.js +144 -0
  228. package/dist/runsQuota-B6SyTbne.js +100 -0
  229. package/dist/runsQuota-DsniKiSg.d.ts +20 -0
  230. package/dist/safe-expression-Cw7-SCsm.js +1251 -0
  231. package/dist/save-status-store-C7nEYpfb.js +631 -0
  232. package/dist/schedule-panel-B4GYXzXQ.js +13774 -0
  233. package/dist/schedule-rules-ggVKRkBH.js +358 -0
  234. package/dist/secrets-Re_wSiE3.js +153 -0
  235. package/dist/settings.d.ts +4 -0
  236. package/dist/settings.js +6 -0
  237. package/dist/shared-DAWGGMSM.js +177 -0
  238. package/dist/sidebar-node-editor-6eSSgCzc.js +178 -0
  239. package/dist/solar.generated-CGYuUQAC.js +10 -0
  240. package/dist/stableTabbedDialog-BBhrfXGe.js +20 -0
  241. package/dist/start-url-CT6Yz96K.js +24 -0
  242. package/dist/status-CessxGpm.js +55 -0
  243. package/dist/store-icon-OctYp5zP.js +155 -0
  244. package/dist/styles-WGmTnZ2n.js +26 -0
  245. package/dist/styles.css +139 -0
  246. package/dist/svg-spinners.generated-CIPT7IhM.js +10 -0
  247. package/dist/template-code-CzN6JWNV.js +191 -0
  248. package/dist/template-graph-DLF9dygU.js +20 -0
  249. package/dist/template-preview-DcIIKOOL.js +32 -0
  250. package/dist/template-price-CdUHZRMF.js +40 -0
  251. package/dist/templates.d.ts +3 -0
  252. package/dist/templates.js +5 -0
  253. package/dist/theme-provider-CntfC4_i.js +23 -0
  254. package/dist/transient-DgZfhDfN.js +57 -0
  255. package/dist/typed-calls-C5tO03wq.js +26 -0
  256. package/dist/ui-script-By74Guk3.js +1094 -0
  257. package/dist/ui-script-editor-CqPu2bCN.js +2447 -0
  258. package/dist/ui-step-fix-8uM2_Hft.js +67 -0
  259. package/dist/ui-step-fix-store-CcO1FdRx.js +19 -0
  260. package/dist/ui-step-run-context-o7bLE6KP.js +46 -0
  261. package/dist/ui-target-editor-D2JhB_lD.js +673 -0
  262. package/dist/uiMarkTools-CSznnO1i.js +1054 -0
  263. package/dist/upgradePrompt-BAFBKKW5.js +72 -0
  264. package/dist/use-bare-node-registry-O6mKJO_n.js +11498 -0
  265. package/dist/use-browser-available-hj8wc3Kb.js +241 -0
  266. package/dist/use-edge-mapper-schemas-Bonofxow.js +496 -0
  267. package/dist/use-extension-bridge-B9ZreOkQ.js +608 -0
  268. package/dist/use-mobile-BTqCUjzS.js +27 -0
  269. package/dist/use-sdk-query-C697xZVv.js +116 -0
  270. package/dist/use-workflow-code-editor-CFoRFrZ5.js +753 -0
  271. package/dist/useActionParam-B2tU2BlY.js +85 -0
  272. package/dist/useAgentTokenStream-Bko_J0d0.js +4217 -0
  273. package/dist/useBrowserClients-3v95-gSh.js +103 -0
  274. package/dist/useCodeWorkflowInsights-w0tz9Ap_.js +600 -0
  275. package/dist/useConnections-DsgEJs05.js +439 -0
  276. package/dist/useDebouncedValue-BFekcv6n.js +18 -0
  277. package/dist/useDurableParity-8fnMZmBc.js +1787 -0
  278. package/dist/useEntityTags-D0spL6Ut.js +460 -0
  279. package/dist/useExecutions-2u5nGJJk.js +681 -0
  280. package/dist/useFluidGridsAnalytics-VM8lAi2x.js +238 -0
  281. package/dist/useGlobalStoreClient-BTdhkA2I.js +24 -0
  282. package/dist/useHumanRequests-zlYDp3l1.js +221 -0
  283. package/dist/useNavigationV2-C2WeqN7d.js +29 -0
  284. package/dist/useNavigationV2-DANUmg12.d.ts +9 -0
  285. package/dist/useObservability-BRlQ0tOA.js +285 -0
  286. package/dist/useRequestedProposal-B7uPXfZB.js +51 -0
  287. package/dist/useRunHistory-CXCMUPyf.js +2759 -0
  288. package/dist/useRunLive-D0JvVZT2.js +1060 -0
  289. package/dist/useRunnerList-Dbi59i1K.js +446 -0
  290. package/dist/useRunners-URUc5quU.js +173 -0
  291. package/dist/useRunsPage-DG656UCK.js +2709 -0
  292. package/dist/useVariables-BIelxcWr.js +463 -0
  293. package/dist/useVersionHistoryData-CTjqVw7l.js +292 -0
  294. package/dist/useWorkflowCodeExport-pqxyLHD1.js +522 -0
  295. package/dist/useWorkflowListExport-hcZNvTaB.js +232 -0
  296. package/dist/useWorkflowOrganization-CpBbOrs7.js +1772 -0
  297. package/dist/useWorkflowProposal-BH0VdNMA.js +3280 -0
  298. package/dist/useWorkflows-Cvg-Z_IE.js +1606 -0
  299. package/dist/utils-fvBb5qOD.js +89 -0
  300. package/dist/webhook-deliveries-AvQujaZy.js +99 -0
  301. package/dist/workflow-builder-CJygVkVv.d.ts +2 -0
  302. package/dist/workflow-builder.d.ts +3 -0
  303. package/dist/workflow-builder.js +8 -0
  304. package/dist/workflow-code-transfer-Bsy0JKAZ.js +323 -0
  305. package/dist/workflow-embed.d.ts +3 -0
  306. package/dist/workflow-embed.js +4 -0
  307. package/dist/workflow-git-sync--K9ZsPDC.js +263 -0
  308. package/dist/workflow-host.d.ts +6 -0
  309. package/dist/workflow-host.js +11 -0
  310. package/dist/workflow-pages-D-7ByLTB.d.ts +68 -0
  311. package/dist/workflow-pages.d.ts +3 -0
  312. package/dist/workflow-pages.js +115 -0
  313. package/dist/workflow-preview-canvas-CO8yzdE3.js +848 -0
  314. package/dist/workflow-preview.d.ts +65 -0
  315. package/dist/workflow-preview.js +4 -0
  316. package/dist/workflow-route.d.ts +33 -0
  317. package/dist/workflow-route.js +4 -0
  318. package/dist/workflow-save-state-D0l-DkLf.js +767 -0
  319. package/dist/workflow-transfer-CQnQC-ke.js +104 -0
  320. package/dist/workflowRouteData-BkfVOc-O.js +169 -0
  321. package/dist/workflows-list.d.ts +10 -0
  322. package/dist/workflows-list.js +5 -0
  323. package/package.json +320 -4
@@ -0,0 +1,382 @@
1
+ "use client";
2
+ import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
3
+ import { T as NDV_OVERLAY_Z_INDEX, a as browserStepActionSpec, t as BROWSER_ACTION_NODE_TYPE } from "./browser-steps-DMpS5TyB.js";
4
+ import { E as stepSentence } from "./ui-script-By74Guk3.js";
5
+ import { i as newUseBrowserNode, r as convertedUseBrowserNode, t as convertBrowserActionNode } from "./convert-browser-action-pfecelF7.js";
6
+ import { U as useFlowStore } from "./node-operation-selection-CdV3KI_V.js";
7
+ import { useEffect, useMemo, useRef, useState } from "react";
8
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
+ import { toast } from "sonner";
10
+ import { cn } from "@burdenoff/fe-libs/utils";
11
+ import { Button, ResponsiveDialog, ResponsiveDialogContent, ResponsiveDialogDescription, ResponsiveDialogFooter, ResponsiveDialogHeader, ResponsiveDialogTitle } from "@burdenoff/fe-libs/ui";
12
+
13
+ // src/builder/components/ndv/convert-to-use-browser/conversion-review.tsx
14
+ /**
15
+ * The body of the Convert to Use Browser review (RPA plan P1-11b): why a node
16
+ * cannot be converted, the Run in Browser steps beside the Use Browser steps
17
+ * they become, the values that move to script inputs, what is not carried
18
+ * over, and the script behind "Show technical details".
19
+ *
20
+ * Loaded lazily with the dialog: it reads step sentences from
21
+ * `@burdenoff/ui-engine`.
22
+ */
23
+ /** The English text of each block, by kind; `{{step}}` is a step number. */
24
+ const BLOCK_TEXTS = [
25
+ {
26
+ kind: "unreadable",
27
+ key: "fluidgrids.builder.convertToUseBrowser.block.unreadable",
28
+ fallback: "The steps are not a list the builder can read. Fix them in the JSON view first."
29
+ },
30
+ {
31
+ kind: "noSteps",
32
+ key: "fluidgrids.builder.convertToUseBrowser.block.noSteps",
33
+ fallback: "This node has no steps to convert."
34
+ },
35
+ {
36
+ kind: "mapped",
37
+ key: "fluidgrids.builder.convertToUseBrowser.block.mapped",
38
+ fallback: "The steps are set from earlier data. A Use Browser script is always fixed, so set the steps here first."
39
+ },
40
+ {
41
+ kind: "secret",
42
+ key: "fluidgrids.builder.convertToUseBrowser.block.secret",
43
+ fallback: "Step {{step}} reads $credentials or $secrets. Remove it first: Use Browser types secrets only with a Type secret or Log in step."
44
+ },
45
+ {
46
+ kind: "expression",
47
+ key: "fluidgrids.builder.convertToUseBrowser.block.expression",
48
+ fallback: "Step {{step}}: \"{{setting}}\" uses a value from earlier in the workflow. Use Browser finds elements with fixed targets, so enter a fixed value first."
49
+ },
50
+ {
51
+ kind: "engine",
52
+ key: "fluidgrids.builder.convertToUseBrowser.block.engine",
53
+ fallback: "These steps cannot be converted: {{detail}}"
54
+ }
55
+ ];
56
+ /** The English text of each node setting that is not carried over. */
57
+ const NODE_SETTING_TEXTS = [{
58
+ setting: "tabId",
59
+ key: "fluidgrids.builder.convertToUseBrowser.dropped.tabId",
60
+ fallback: "The fixed tab id is not carried over. Use Browser runs in the tab chosen under Run in."
61
+ }, {
62
+ setting: "runOn",
63
+ key: "fluidgrids.builder.convertToUseBrowser.dropped.runOn",
64
+ fallback: "The Run on choice is not carried over. Use Browser runs on a paired browser."
65
+ }];
66
+ /** A step setting's label in the Run in Browser editor, or its key. */
67
+ function settingLabel(tr, action, key) {
68
+ const param = browserStepActionSpec(action)?.params.find((item) => item.key === key);
69
+ if (param) return tr(`fluidgrids.builder.browserSteps.param.${action}.${param.key}`, param.label);
70
+ if (key === "fields") return tr("fluidgrids.builder.browserSteps.fields", "Fields to read");
71
+ if (key === "name") return tr("fluidgrids.builder.browserSteps.nameLabel", "Result name");
72
+ if (key === "fullPage") return tr("fluidgrids.builder.browserSteps.param.screenshot.fullPage", "Whole page");
73
+ return key;
74
+ }
75
+ /** A Run in Browser action's name in its editor. */
76
+ function legacyActionText(tr, action) {
77
+ const spec = browserStepActionSpec(action);
78
+ return spec ? tr(`fluidgrids.builder.browserSteps.action.${action}`, spec.label) : action;
79
+ }
80
+ function blockText(tr, block) {
81
+ const text = BLOCK_TEXTS.find((item) => item.kind === block.kind);
82
+ if (!text) return block.kind;
83
+ const vars = {};
84
+ if ("step" in block && block.step !== void 0) vars.step = block.step + 1;
85
+ if (block.kind === "expression") vars.setting = settingLabel(tr, block.action, block.key);
86
+ if (block.kind === "engine") vars.detail = block.detail;
87
+ return tr(text.key, text.fallback, vars);
88
+ }
89
+ function droppedText(tr, dropped) {
90
+ return tr("fluidgrids.builder.convertToUseBrowser.dropped.step", "Step {{step}}: \"{{setting}}\" is not carried over.", {
91
+ step: dropped.step + 1,
92
+ setting: settingLabel(tr, dropped.action, dropped.key)
93
+ });
94
+ }
95
+ function nodeSettingText(tr, setting) {
96
+ const text = NODE_SETTING_TEXTS.find((item) => item.setting === setting);
97
+ return text ? tr(text.key, text.fallback) : setting;
98
+ }
99
+ const sectionTitle = "text-xs font-semibold text-foreground";
100
+ function StepComparison({ conversion, testIdPrefix }) {
101
+ const tr = useTr();
102
+ const converted = conversion.script?.steps ?? [];
103
+ const rows = conversion.steps.map((step, index) => ({
104
+ id: `s${index + 1}`,
105
+ number: index + 1,
106
+ step,
107
+ after: converted[index]
108
+ }));
109
+ return /* @__PURE__ */ jsxs("div", {
110
+ className: "overflow-hidden rounded-md border border-border",
111
+ "data-testid": `${testIdPrefix}-convert-steps`,
112
+ children: [/* @__PURE__ */ jsxs("div", {
113
+ className: "grid grid-cols-2 gap-2 border-b border-border bg-muted/40 px-2 py-1 text-[11px] font-semibold text-muted-foreground",
114
+ children: [/* @__PURE__ */ jsx("span", { children: tr("fluidgrids.builder.convertToUseBrowser.before", "Run in Browser") }), /* @__PURE__ */ jsx("span", { children: tr("fluidgrids.builder.convertToUseBrowser.after", "Use Browser") })]
115
+ }), /* @__PURE__ */ jsx("ol", {
116
+ className: "flex max-h-64 flex-col overflow-y-auto",
117
+ children: rows.map(({ id, number, step, after }) => {
118
+ const name = typeof step.name === "string" ? step.name : "";
119
+ const sentence = after ? stepSentence({ ...after }) : null;
120
+ return /* @__PURE__ */ jsxs("li", {
121
+ className: "grid grid-cols-2 gap-2 border-b border-border px-2 py-1 text-xs last:border-b-0",
122
+ "data-testid": `${testIdPrefix}-convert-step-${number - 1}`,
123
+ children: [/* @__PURE__ */ jsxs("span", {
124
+ className: "min-w-0 break-words text-muted-foreground",
125
+ children: [
126
+ number,
127
+ ". ",
128
+ legacyActionText(tr, step.action),
129
+ name && ` (${name})`
130
+ ]
131
+ }), /* @__PURE__ */ jsx("span", {
132
+ className: "min-w-0 break-words text-foreground",
133
+ children: sentence ? `${number}. ${tr(sentence.key, sentence.fallback, sentence.vars)}` : "—"
134
+ })]
135
+ }, id);
136
+ })
137
+ })]
138
+ });
139
+ }
140
+ /** A stable key for a block: its kind, step and setting. */
141
+ function blockKey(block) {
142
+ const step = "step" in block ? String(block.step) : "";
143
+ const key = "key" in block ? block.key : "";
144
+ return `${block.kind}:${step}:${key}`;
145
+ }
146
+ function Blocked({ conversion, testIdPrefix }) {
147
+ const tr = useTr();
148
+ if (conversion.blocked.length === 0) return null;
149
+ return /* @__PURE__ */ jsx("ul", {
150
+ role: "alert",
151
+ className: "flex flex-col gap-1 rounded-md border border-border px-3 py-2 text-xs text-[var(--color-status-error-text)]",
152
+ "data-testid": `${testIdPrefix}-convert-blocked`,
153
+ children: conversion.blocked.map((block) => /* @__PURE__ */ jsx("li", { children: blockText(tr, block) }, blockKey(block)))
154
+ });
155
+ }
156
+ function LiftedInputs({ conversion, testIdPrefix }) {
157
+ const tr = useTr();
158
+ if (conversion.lifted.length === 0) return null;
159
+ return /* @__PURE__ */ jsxs("div", {
160
+ className: "flex flex-col gap-1",
161
+ "data-testid": `${testIdPrefix}-convert-inputs`,
162
+ children: [/* @__PURE__ */ jsx("span", {
163
+ className: sectionTitle,
164
+ children: tr("fluidgrids.builder.convertToUseBrowser.inputsTitle", "Values from the workflow become script inputs")
165
+ }), /* @__PURE__ */ jsx("ul", {
166
+ className: "flex flex-col gap-0.5 text-xs text-muted-foreground",
167
+ children: conversion.lifted.map((item) => /* @__PURE__ */ jsx("li", { children: tr("fluidgrids.builder.convertToUseBrowser.input", "Step {{step}}: \"{{setting}}\" is filled from the input {{input}}.", {
168
+ step: item.step + 1,
169
+ setting: settingLabel(tr, item.action, item.key),
170
+ input: item.input
171
+ }) }, item.input))
172
+ })]
173
+ });
174
+ }
175
+ function Dropped({ conversion, testIdPrefix }) {
176
+ const tr = useTr();
177
+ if (conversion.dropped.length === 0 && conversion.droppedNodeSettings.length === 0) return null;
178
+ return /* @__PURE__ */ jsxs("div", {
179
+ className: "flex flex-col gap-1",
180
+ "data-testid": `${testIdPrefix}-convert-dropped`,
181
+ children: [/* @__PURE__ */ jsx("span", {
182
+ className: sectionTitle,
183
+ children: tr("fluidgrids.builder.convertToUseBrowser.droppedTitle", "Not carried over")
184
+ }), /* @__PURE__ */ jsxs("ul", {
185
+ className: "flex flex-col gap-0.5 text-xs text-[var(--color-status-warning-text)]",
186
+ children: [conversion.droppedNodeSettings.map((setting) => /* @__PURE__ */ jsx("li", { children: nodeSettingText(tr, setting) }, setting)), conversion.dropped.map((item) => /* @__PURE__ */ jsx("li", { children: droppedText(tr, item) }, `${item.step}:${item.key}`))]
187
+ })]
188
+ });
189
+ }
190
+ function TechnicalDetails({ conversion, testIdPrefix }) {
191
+ const tr = useTr();
192
+ const [open, setOpen] = useState(false);
193
+ return /* @__PURE__ */ jsxs("div", {
194
+ className: "flex flex-col gap-1",
195
+ children: [/* @__PURE__ */ jsx("button", {
196
+ type: "button",
197
+ "aria-expanded": open,
198
+ onClick: () => setOpen((current) => !current),
199
+ className: "self-start text-[11px] text-primary hover:underline",
200
+ "data-testid": `${testIdPrefix}-convert-technical-toggle`,
201
+ children: open ? tr("fluidgrids.builder.convertToUseBrowser.hideTechnical", "Hide technical details") : tr("fluidgrids.builder.convertToUseBrowser.showTechnical", "Show technical details")
202
+ }), open && /* @__PURE__ */ jsx("pre", {
203
+ className: "max-h-64 overflow-auto rounded-md border border-border bg-muted/40 p-2 font-mono text-[11px] text-foreground",
204
+ "data-testid": `${testIdPrefix}-convert-technical`,
205
+ children: JSON.stringify({
206
+ script: conversion.script,
207
+ inputs: conversion.inputs
208
+ }, null, 2)
209
+ })]
210
+ });
211
+ }
212
+ /** Everything the person reviews before choosing Convert. */
213
+ function ConversionReview({ conversion, testIdPrefix }) {
214
+ const tr = useTr();
215
+ const convertible = conversion.script !== null;
216
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
217
+ /* @__PURE__ */ jsx(Blocked, {
218
+ conversion,
219
+ testIdPrefix
220
+ }),
221
+ conversion.steps.length > 0 && /* @__PURE__ */ jsx(StepComparison, {
222
+ conversion,
223
+ testIdPrefix
224
+ }),
225
+ /* @__PURE__ */ jsx(LiftedInputs, {
226
+ conversion,
227
+ testIdPrefix
228
+ }),
229
+ /* @__PURE__ */ jsx(Dropped, {
230
+ conversion,
231
+ testIdPrefix
232
+ }),
233
+ convertible && /* @__PURE__ */ jsx("p", {
234
+ className: "text-xs text-muted-foreground",
235
+ "data-testid": `${testIdPrefix}-convert-outputs`,
236
+ children: tr("fluidgrids.builder.convertToUseBrowser.outputs", "The node keeps its connections and its results, extracted, rows, screenshots and finalUrl outputs. failedStep becomes errorCode and steps: check the nodes that read it.")
237
+ }),
238
+ convertible && /* @__PURE__ */ jsx(TechnicalDetails, {
239
+ conversion,
240
+ testIdPrefix
241
+ })
242
+ ] });
243
+ }
244
+
245
+ // src/builder/components/ndv/convert-to-use-browser/use-convert-action.ts
246
+ /**
247
+ * The Convert step of Convert to Use Browser (RPA plan P1-11b): the
248
+ * conversion the dialog shows, and the write that happens only on Convert.
249
+ *
250
+ * The write converts the node as it is on the canvas when the Use Browser
251
+ * manifest has loaded, and writes it only when that is exactly what the
252
+ * person reviewed and the review is still open.
253
+ *
254
+ * This module loads `@burdenoff/ui-engine`; only the lazily loaded dialog
255
+ * imports it.
256
+ */
257
+ /** Whether two conversions write the same node: script, inputs and settings left out. */
258
+ function sameConversion(reviewed, latest) {
259
+ const written = (conversion) => JSON.stringify([
260
+ conversion.script,
261
+ conversion.inputs,
262
+ conversion.dropped,
263
+ conversion.droppedNodeSettings
264
+ ]);
265
+ return written(reviewed) === written(latest);
266
+ }
267
+ /** The conversion of `nodeId` and the Convert that writes it. */
268
+ function useConvertAction(nodeId, createNode, onClose) {
269
+ const tr = useTr();
270
+ const node = useFlowStore((state) => state.workflow.nodes.find((item) => item.id === nodeId));
271
+ const edges = useFlowStore((state) => state.workflow.edges);
272
+ const replaceNode = useFlowStore((state) => state.actions.nodes.replaceNode);
273
+ const [busy, setBusy] = useState(false);
274
+ const [failed, setFailed] = useState(null);
275
+ const mounted = useRef(true);
276
+ useEffect(() => {
277
+ mounted.current = true;
278
+ return () => {
279
+ mounted.current = false;
280
+ };
281
+ }, []);
282
+ const conversion = useMemo(() => node ? convertBrowserActionNode(node, edges) : null, [node, edges]);
283
+ /** What Convert writes now, or why it writes nothing. */
284
+ const prepare = async (reviewed, position) => {
285
+ const fresh = await createNode(position).catch(() => null);
286
+ if (!fresh) return "load";
287
+ const { nodes, edges: latestEdges } = useFlowStore.getState().workflow;
288
+ const current = nodes.find((item) => item.id === nodeId);
289
+ if (current?.type !== "internal:browser-action") return "changed";
290
+ const latest = convertBrowserActionNode(current, latestEdges);
291
+ if (!latest.script || !sameConversion(reviewed, latest)) return "changed";
292
+ return convertedUseBrowserNode(current, fresh, latest);
293
+ };
294
+ const convert = async () => {
295
+ if (!node || !conversion?.script || busy) return;
296
+ setBusy(true);
297
+ setFailed(null);
298
+ let written = false;
299
+ try {
300
+ const result = await prepare(conversion, node.position);
301
+ if (!mounted.current) return;
302
+ if (typeof result === "string") {
303
+ setFailed(result);
304
+ return;
305
+ }
306
+ written = replaceNode(nodeId, result);
307
+ if (!written) {
308
+ setFailed("changed");
309
+ return;
310
+ }
311
+ toast.success(tr("fluidgrids.builder.convertToUseBrowser.done", "Converted to Use Browser. Undo brings the Run in Browser node back."));
312
+ } finally {
313
+ if (mounted.current) setBusy(false);
314
+ }
315
+ if (written) onClose();
316
+ };
317
+ return {
318
+ conversion,
319
+ busy,
320
+ failed,
321
+ convert
322
+ };
323
+ }
324
+
325
+ // src/builder/components/ndv/convert-to-use-browser/convert-dialog.tsx
326
+ function FailedNote({ failed, testIdPrefix }) {
327
+ const tr = useTr();
328
+ return /* @__PURE__ */ jsx("p", {
329
+ role: "alert",
330
+ className: "text-xs text-[var(--color-status-error-text)]",
331
+ "data-testid": `${testIdPrefix}-convert-failed`,
332
+ children: failed === "load" ? tr("fluidgrids.builder.convertToUseBrowser.failed", "Could not load the Use Browser node. Check your connection and try again; the node was not changed.") : tr("fluidgrids.builder.convertToUseBrowser.changed", "This node changed while it was being converted, so nothing was written. Review it and try again.")
333
+ });
334
+ }
335
+ /**
336
+ * The review dialog. Rendered only while the person converts one node; it
337
+ * reads the node and its incoming edges from the flow store.
338
+ */
339
+ function ConvertToUseBrowserDialog({ nodeId, onClose, testIdPrefix = "ndv", createNode = newUseBrowserNode }) {
340
+ const tr = useTr();
341
+ const { conversion, busy, failed, convert } = useConvertAction(nodeId, createNode, onClose);
342
+ const blocked = !conversion || conversion.script === null;
343
+ return /* @__PURE__ */ jsx(ResponsiveDialog, {
344
+ open: true,
345
+ onOpenChange: (open) => {
346
+ if (!open && !busy) onClose();
347
+ },
348
+ children: /* @__PURE__ */ jsxs(ResponsiveDialogContent, {
349
+ style: { zIndex: NDV_OVERLAY_Z_INDEX },
350
+ className: "max-h-[90vh] overflow-y-auto sm:max-w-2xl",
351
+ "data-testid": `${testIdPrefix}-convert-dialog`,
352
+ children: [
353
+ /* @__PURE__ */ jsxs(ResponsiveDialogHeader, { children: [/* @__PURE__ */ jsx(ResponsiveDialogTitle, { children: tr("fluidgrids.builder.convertToUseBrowser.title", "Convert to Use Browser") }), /* @__PURE__ */ jsx(ResponsiveDialogDescription, { children: tr("fluidgrids.builder.convertToUseBrowser.description", "Review the steps below. Nothing changes until you choose Convert. Run in Browser keeps working, so you can also keep this node as it is.") })] }),
354
+ conversion && /* @__PURE__ */ jsx(ConversionReview, {
355
+ conversion,
356
+ testIdPrefix
357
+ }),
358
+ failed && /* @__PURE__ */ jsx(FailedNote, {
359
+ failed,
360
+ testIdPrefix
361
+ }),
362
+ /* @__PURE__ */ jsxs(ResponsiveDialogFooter, { children: [/* @__PURE__ */ jsx(Button, {
363
+ type: "button",
364
+ variant: "outline",
365
+ onClick: onClose,
366
+ disabled: busy,
367
+ "data-testid": `${testIdPrefix}-convert-cancel`,
368
+ children: tr("fluidgrids.builder.convertToUseBrowser.cancel", "Cancel")
369
+ }), /* @__PURE__ */ jsx(Button, {
370
+ type: "button",
371
+ onClick: () => void convert(),
372
+ disabled: blocked || busy,
373
+ className: cn(busy && "opacity-70"),
374
+ "data-testid": `${testIdPrefix}-convert-confirm`,
375
+ children: tr("fluidgrids.builder.convertToUseBrowser.confirm", "Convert")
376
+ })] })
377
+ ]
378
+ })
379
+ });
380
+ }
381
+
382
+ export { ConvertToUseBrowserDialog as default };
@@ -0,0 +1,120 @@
1
+ "use client";
2
+ import { l as findQuotaRefusal } from "./quota-DeA_CJ2e.js";
3
+
4
+ // src/utils/create-workflow-first.ts
5
+ /** The name every blank workflow starts with. */
6
+ const BLANK_WORKFLOW_NAME = "Untitled Workflow";
7
+ /** The first version of a blank workflow. */
8
+ const BLANK_WORKFLOW_VERSION = "v1";
9
+ /**
10
+ * The name a new workflow gets: the one typed (trimmed), else the blank name.
11
+ * Navigation v2's create dialog asks for a name (BOFF-11843); every other
12
+ * caller keeps the blank name.
13
+ */
14
+ function workflowCreateName(name) {
15
+ const trimmed = name?.trim();
16
+ return trimmed ? trimmed : BLANK_WORKFLOW_NAME;
17
+ }
18
+ /** The canvas state of a blank workflow (no nodes, the node store open). */
19
+ function blankWorkflowCanvas(name = BLANK_WORKFLOW_NAME) {
20
+ return {
21
+ name,
22
+ edges: [],
23
+ nodes: [],
24
+ sidebar: {
25
+ active: "store-browse",
26
+ panels: { nodeProperties: { selectedNode: null } }
27
+ }
28
+ };
29
+ }
30
+ /**
31
+ * The `createWorkflowDefinition` input for a blank workflow at `key`/`version`.
32
+ * The definition shape is the one the builder has always written for a new
33
+ * workflow, so a workflow created here opens exactly like one created there.
34
+ * `name` is the name typed in the create dialog; without one the workflow is
35
+ * "Untitled Workflow".
36
+ */
37
+ function blankWorkflowCreateInput(key, version = "v1", name) {
38
+ const workflowName = workflowCreateName(name);
39
+ return {
40
+ workflowKey: key,
41
+ version,
42
+ name: workflowName,
43
+ definitionJson: {
44
+ key,
45
+ name: workflowName,
46
+ workflow_type: "query-conditional",
47
+ data: {
48
+ ...blankWorkflowCanvas(workflowName),
49
+ id: key,
50
+ workflowKey: key,
51
+ version
52
+ },
53
+ meta: {
54
+ creator: "api_create",
55
+ version
56
+ },
57
+ tags: []
58
+ }
59
+ };
60
+ }
61
+ /**
62
+ * The refusal a quota answer means for a workflow create. The builder's save
63
+ * of a new workflow is a create too, so it explains a quota refusal the same
64
+ * way (BOFF-9998).
65
+ */
66
+ function refusalOfQuota(quota) {
67
+ return quota.kind === "exhausted" ? {
68
+ kind: "quota-exhausted",
69
+ quotaName: quota.quotaName
70
+ } : {
71
+ kind: "quota-not-provisioned",
72
+ quotaName: quota.quotaName
73
+ };
74
+ }
75
+ /** Classify the error a refused create reported (null/undefined: unknown). */
76
+ function classifyCreateRefusal(error) {
77
+ const quota = findQuotaRefusal(error);
78
+ return quota ? refusalOfQuota(quota) : { kind: "failed" };
79
+ }
80
+ /** The builder path of a workflow, relative to `basePath`. */
81
+ function builderPathOf(workflow, basePath = "..") {
82
+ return `${basePath === "" ? "" : `${basePath.replace(/\/+$/, "")}/`}workflow/${encodeURIComponent(workflow.workflowKey)}/${encodeURIComponent(workflow.version)}`;
83
+ }
84
+ /**
85
+ * The Runs list filtered to one workflow, from the builder (`basePath` as in
86
+ * `builderPathOf`). The run-detail route takes a run id, never a key.
87
+ */
88
+ function workflowRunsPathOf(workflowKey, basePath = "..") {
89
+ return `${basePath === "" ? "" : `${basePath.replace(/\/+$/, "")}/`}runs?workflowKey=${encodeURIComponent(workflowKey)}`;
90
+ }
91
+ /**
92
+ * Create a workflow (blank unless `options.buildInput` says otherwise) and
93
+ * open it in the builder — in that order. A refused
94
+ * or failed create never navigates, whatever the refusal code.
95
+ */
96
+ async function createThenOpen(deps, options = {}) {
97
+ const key = deps.mintKey();
98
+ let reported = null;
99
+ let created = null;
100
+ try {
101
+ const input = options.buildInput ? options.buildInput(key, "v1", workflowCreateName(options.name)) : blankWorkflowCreateInput(key, "v1", options.name);
102
+ created = await deps.create(input, { onError: (error) => {
103
+ reported = error;
104
+ } });
105
+ } catch (error) {
106
+ reported = error;
107
+ created = null;
108
+ }
109
+ if (!created || !created.workflowKey || !created.version) return {
110
+ status: "refused",
111
+ refusal: classifyCreateRefusal(reported)
112
+ };
113
+ deps.navigate(builderPathOf(created, options.basePath ?? ".."), options.state === void 0 ? void 0 : { state: options.state });
114
+ return {
115
+ status: "opened",
116
+ workflow: created
117
+ };
118
+ }
119
+
120
+ export { refusalOfQuota as a, createThenOpen as i, builderPathOf as n, workflowRunsPathOf as o, classifyCreateRefusal as r, blankWorkflowCreateInput as t };
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ import { o as mergeStickyNotes } from "./field-label-DPZRmE_B.js";
3
+
4
+ // src/builder/live/definition-canvas.ts
5
+ function isRecord(value) {
6
+ return typeof value === "object" && value !== null && !Array.isArray(value);
7
+ }
8
+ function hasId(item) {
9
+ return isRecord(item) && typeof item.id === "string" && item.id.length > 0;
10
+ }
11
+ /** `null` when the definition carries no canvas the builder could load. */
12
+ function canvasFromDefinition(definitionJson) {
13
+ let definition = definitionJson;
14
+ if (typeof definition === "string") try {
15
+ definition = JSON.parse(definition);
16
+ } catch {
17
+ return null;
18
+ }
19
+ if (!isRecord(definition)) return null;
20
+ const data = isRecord(definition.data) ? definition.data : definition;
21
+ if (!Array.isArray(data.nodes)) return null;
22
+ return {
23
+ nodes: mergeStickyNotes({
24
+ nodes: data.nodes,
25
+ stickyNotes: Array.isArray(data.stickyNotes) ? data.stickyNotes : []
26
+ }).filter(hasId),
27
+ edges: (Array.isArray(data.edges) ? data.edges : []).filter(hasId)
28
+ };
29
+ }
30
+
31
+ export { canvasFromDefinition as t };
@@ -0,0 +1,94 @@
1
+ "use client";
2
+ import { t as cn } from "./cn-QqidFIgr.js";
3
+ import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
4
+ import "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { XIcon } from "lucide-react";
7
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
8
+
9
+ // src/ui/dialog.tsx
10
+ function Dialog({ ...props }) {
11
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, {
12
+ "data-slot": "dialog",
13
+ ...props
14
+ });
15
+ }
16
+ function DialogTrigger({ ...props }) {
17
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, {
18
+ "data-slot": "dialog-trigger",
19
+ ...props
20
+ });
21
+ }
22
+ function DialogPortal({ ...props }) {
23
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, {
24
+ "data-slot": "dialog-portal",
25
+ ...props
26
+ });
27
+ }
28
+ function DialogClose({ ...props }) {
29
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, {
30
+ "data-slot": "dialog-close",
31
+ ...props
32
+ });
33
+ }
34
+ function DialogOverlay({ className, ...props }) {
35
+ return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, {
36
+ "data-slot": "dialog-overlay",
37
+ className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-bg-overlay", className),
38
+ ...props
39
+ });
40
+ }
41
+ function DialogContent({ className, children, showCloseButton = true, size = "default", ...props }) {
42
+ const tr = useTr();
43
+ return /* @__PURE__ */ jsxs(DialogPortal, {
44
+ "data-slot": "dialog-portal",
45
+ children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
46
+ "data-slot": "dialog-content",
47
+ className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none", {
48
+ default: "sm:max-w-lg",
49
+ lg: "sm:max-w-3xl",
50
+ xl: "sm:max-w-[1400px] w-[90vw]",
51
+ full: "sm:max-w-[95vw] w-[95vw]"
52
+ }[size], className),
53
+ ...props,
54
+ children: [children, showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
55
+ "data-slot": "dialog-close",
56
+ className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
57
+ children: [/* @__PURE__ */ jsx(XIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
58
+ className: "sr-only",
59
+ children: tr("fluidgrids.ui.dialog.closeLabel", "Close")
60
+ })]
61
+ })]
62
+ })]
63
+ });
64
+ }
65
+ function DialogHeader({ className, ...props }) {
66
+ return /* @__PURE__ */ jsx("div", {
67
+ "data-slot": "dialog-header",
68
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
69
+ ...props
70
+ });
71
+ }
72
+ function DialogFooter({ className, ...props }) {
73
+ return /* @__PURE__ */ jsx("div", {
74
+ "data-slot": "dialog-footer",
75
+ className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
76
+ ...props
77
+ });
78
+ }
79
+ function DialogTitle({ className, ...props }) {
80
+ return /* @__PURE__ */ jsx(DialogPrimitive.Title, {
81
+ "data-slot": "dialog-title",
82
+ className: cn("text-lg leading-none font-semibold", className),
83
+ ...props
84
+ });
85
+ }
86
+ function DialogDescription({ className, ...props }) {
87
+ return /* @__PURE__ */ jsx(DialogPrimitive.Description, {
88
+ "data-slot": "dialog-description",
89
+ className: cn("text-muted-foreground text-sm", className),
90
+ ...props
91
+ });
92
+ }
93
+
94
+ export { DialogFooter as a, DialogPortal as c, DialogDescription as i, DialogTitle as l, DialogClose as n, DialogHeader as o, DialogContent as r, DialogOverlay as s, Dialog as t, DialogTrigger as u };