@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,44 @@
1
+ "use client";
2
+ import { t as cn } from "./cn-QqidFIgr.js";
3
+ import { forwardRef } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+
6
+ // src/ui/card.tsx
7
+ const Card = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
8
+ ref,
9
+ className: cn("rounded-lg border bg-card text-card-foreground shadow-sm transition-all duration-200 ease-out hover:shadow-md", className),
10
+ ...props
11
+ }));
12
+ Card.displayName = "Card";
13
+ const CardHeader = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
14
+ ref,
15
+ className: cn("flex flex-col space-y-1.5 p-6", className),
16
+ ...props
17
+ }));
18
+ CardHeader.displayName = "CardHeader";
19
+ const CardTitle = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("h3", {
20
+ ref,
21
+ className: cn("text-2xl font-semibold leading-none tracking-tight", className),
22
+ ...props
23
+ }));
24
+ CardTitle.displayName = "CardTitle";
25
+ const CardDescription = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", {
26
+ ref,
27
+ className: cn("text-sm text-muted-foreground", className),
28
+ ...props
29
+ }));
30
+ CardDescription.displayName = "CardDescription";
31
+ const CardContent = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
32
+ ref,
33
+ className: cn("p-6 pt-0", className),
34
+ ...props
35
+ }));
36
+ CardContent.displayName = "CardContent";
37
+ const CardFooter = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
38
+ ref,
39
+ className: cn("flex items-center p-6 pt-0", className),
40
+ ...props
41
+ }));
42
+ CardFooter.displayName = "CardFooter";
43
+
44
+ export { CardHeader as a, CardFooter as i, CardContent as n, CardTitle as o, CardDescription as r, Card as t };
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ // src/components/shared/catalogGrid.ts
3
+ /**
4
+ * Catalog grids grow columns, not card width, on big screens (BOFF-14993,
5
+ * item W2).
6
+ *
7
+ * The contract:
8
+ * - Below 1800 px (112.5rem) of viewport nothing changes. The grid keeps
9
+ * today's fixed columns: 1 on phones, then 2 from `sm`, 3 from `lg` and 4
10
+ * from `xl`. So every MacBook, with the sidebar open, collapsed to its rail
11
+ * or with the assistant docked, and every mid-width window show the same
12
+ * columns and card widths as before.
13
+ * - From 1800 px the grid switches to `repeat(auto-fill, minmax(17rem, 1fr))`:
14
+ * each column is at least 17rem (272 px) and the columns share what is
15
+ * left, so a wider page shows more cards instead of wider ones. A 1920 px
16
+ * screen with the sidebar open shows 5, and the 1840 px catalog page on a
17
+ * 27-inch screen (W1, fluidgrids-app) shows 6.
18
+ *
19
+ * The threshold is the widest default MacBook resolution (1728 px, the 16"
20
+ * MacBook Pro) rounded up. It is written in rem on purpose: Tailwind 4 sorts
21
+ * a px arbitrary min-width variant before its rem breakpoints, so
22
+ * `min-[1800px]` would lose to `xl:grid-cols-4` and do nothing.
23
+ * catalogGrid.test.ts compiles the classes with Tailwind and checks the order.
24
+ *
25
+ * `min(17rem, 100%)` keeps a pane narrower than one column from overflowing.
26
+ * auto-fill (not auto-fit) keeps a short last row at card width.
27
+ *
28
+ * Use it only where Navigation v2 is on (FluidGrids); the other apps that
29
+ * embed the SDK keep today's fixed columns.
30
+ */
31
+ const CATALOG_GRID_COLUMNS = "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 min-[112.5rem]:grid-cols-[repeat(auto-fill,minmax(min(17rem,100%),1fr))]";
32
+ /**
33
+ * The same big-screen track for a grid of larger cards (each column at least
34
+ * 20rem, 320 px), added on top of that grid's own fixed columns. The "Copy a
35
+ * workspace workflow" tab on Templates uses it with Navigation v2 on, so its
36
+ * 3 columns become 4 at 1920 px and 5 on the 1840 px catalog page; below
37
+ * 1800 px it changes nothing.
38
+ */
39
+ const BIG_SCREEN_LARGE_CARD_COLUMNS = "min-[112.5rem]:grid-cols-[repeat(auto-fill,minmax(min(20rem,100%),1fr))]";
40
+
41
+ export { CATALOG_GRID_COLUMNS as n, BIG_SCREEN_LARGE_CARD_COLUMNS as t };
@@ -0,0 +1,212 @@
1
+ "use client";
2
+ import { r as getFluidGridsConfig } from "./config-DO68jw5k.js";
3
+ import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
4
+ import { t as Icon } from "./Icon-BtQ0HXLh.js";
5
+ import { useMemo } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { buildActorFallback, useActorProfiles } from "@burdenoff/fe-libs/shared";
8
+
9
+ // src/modules/human-response/utils/recipient.ts
10
+ /**
11
+ * Who an ask went to, for display (BOFF-7651). An in-app ask stores its responders as user ids
12
+ * (the worker cannot resolve names); the UI resolves them to people before showing them.
13
+ */
14
+ const USER_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
15
+ /** The recipient label split into its parts, in order. */
16
+ function recipientParts(recipient) {
17
+ return (recipient ?? "").split(",").map((part) => part.trim()).filter(Boolean);
18
+ }
19
+ /** The user ids in an in-app ask's recipient label, in order and without repeats. */
20
+ function inAppResponderIds(recipient) {
21
+ return [...new Set(recipientParts(recipient).filter((part) => USER_ID.test(part)))];
22
+ }
23
+
24
+ // src/modules/human-response/hooks/useRecipientLabel.ts
25
+ /**
26
+ * The people an ask went to, by name (BOFF-7651). In-app asks carry user ids; they are resolved
27
+ * through the shared actor-profile cache, the same lookup the run page uses for "triggered by".
28
+ * Email addresses, Slack channels and anything else are shown as stored.
29
+ */
30
+ function useRecipientLabel(request, fallback) {
31
+ const idsKey = request.channel === "IN_APP" ? inAppResponderIds(request.recipient).join(",") : "";
32
+ const inputs = useMemo(() => idsKey ? idsKey.split(",").map((actorId) => ({
33
+ actorId,
34
+ actorType: "user"
35
+ })) : [], [idsKey]);
36
+ const config = getFluidGridsConfig();
37
+ const profiles = useActorProfiles(inputs, {
38
+ workspaceId: config.workspaceId || void 0,
39
+ orgId: config.organizationId,
40
+ authToken: config.authToken
41
+ });
42
+ if (!request.recipient) return fallback;
43
+ if (!idsKey) return request.recipient;
44
+ const ids = new Set(idsKey.split(","));
45
+ return recipientParts(request.recipient).map((part) => ids.has(part) ? profiles[part]?.displayName ?? buildActorFallback({
46
+ actorId: part,
47
+ actorType: "user"
48
+ }).displayName : part).join(", ");
49
+ }
50
+
51
+ // src/modules/human-response/utils/approval-progress.ts
52
+ function approvalCounts(approvals) {
53
+ let approved = 0;
54
+ let rejected = 0;
55
+ for (const approval of approvals) if (approval.decision === "APPROVED") approved++;
56
+ else if (approval.decision === "REJECTED") rejected++;
57
+ return {
58
+ approved,
59
+ rejected,
60
+ total: approvals.length
61
+ };
62
+ }
63
+ /** True for an approval that counts several answers (all, or N of them). */
64
+ function hasQuorum(request) {
65
+ return request.responseType === "APPROVAL" && (request.quorum === "all" || request.quorum === "count");
66
+ }
67
+ /** "1 of 2 approvals · 1 declined", or null for an ask without a quorum. */
68
+ function approvalProgressText(request, tr) {
69
+ if (!hasQuorum(request)) return null;
70
+ const counts = approvalCounts(request.approvals ?? []);
71
+ const required = request.requiredApprovals ?? counts.total;
72
+ const progress = request.quorum === "all" ? tr("fluidgrids.humanResponse.approvalProgressAll", "{{approved}} of {{required}} approvals (everyone must approve)", {
73
+ approved: counts.approved,
74
+ required
75
+ }) : tr("fluidgrids.humanResponse.approvalProgressCount", "{{approved}} of {{required}} approvals needed, from {{total}} approvers", {
76
+ approved: counts.approved,
77
+ required,
78
+ total: counts.total
79
+ });
80
+ if (counts.rejected === 0) return progress;
81
+ return `${progress} · ${tr("fluidgrids.humanResponse.approvalDeclinedCount", "{{count}} declined", { count: counts.rejected })}`;
82
+ }
83
+ /** An approver's answer in words. A missing answer reads differently once the ask closed. */
84
+ function approverDecisionLabel(decision, askOpen, tr) {
85
+ if (decision === "APPROVED") return tr("fluidgrids.humanResponse.approverApproved", "Approved");
86
+ if (decision === "REJECTED") return tr("fluidgrids.humanResponse.approverDeclined", "Declined");
87
+ return askOpen ? tr("fluidgrids.humanResponse.approverWaiting", "Not answered yet") : tr("fluidgrids.humanResponse.approverNoAnswer", "Did not answer");
88
+ }
89
+ /** The toast after an in-app answer: the run continued, or the answer waits for the others. */
90
+ function answeredToastText(decision, tr) {
91
+ if (decision === null) return tr("fluidgrids.humanResponse.approvalRecordedToast", "Your answer is recorded. The workflow continues once enough approvers have answered.");
92
+ return decision === "declined" ? tr("fluidgrids.humanResponse.declinedToast", "Declined — the workflow is continuing") : tr("fluidgrids.humanResponse.answeredToast", "Response sent — the workflow is continuing");
93
+ }
94
+ /**
95
+ * Why the caller cannot answer this ask here: they already answered it, it went to someone else,
96
+ * or it is answered through the link in its message.
97
+ */
98
+ function notAnswerableText(request, channelName, tr) {
99
+ if (request.myDecision === "APPROVED") return tr("fluidgrids.humanResponse.youApproved", "You approved this. It is waiting for the other approvers.");
100
+ if (request.myDecision === "REJECTED") return tr("fluidgrids.humanResponse.youDeclined", "You declined this. It is waiting for the other approvers.");
101
+ return request.channel === "IN_APP" ? tr("fluidgrids.humanResponse.notForYou", "This request was sent to someone else.") : tr("fluidgrids.humanResponse.answerByLink", "Answered through the link in the {{channel}} message.", { channel: channelName });
102
+ }
103
+
104
+ // src/modules/human-response/hooks/useApproverNames.ts
105
+ /**
106
+ * Names for the approvers of an approval (BOFF-9956). Approvers are stored as user ids; they are
107
+ * resolved through the shared actor-profile cache, the same lookup the run page uses for
108
+ * "triggered by" and `useRecipientLabel` uses for who an ask went to.
109
+ */
110
+ /** Display name per user id; ids the profile service does not know get the shared fallback. */
111
+ function useApproverNames(userIds) {
112
+ const idsKey = [...new Set(userIds)].join(",");
113
+ const inputs = useMemo(() => idsKey ? idsKey.split(",").map((actorId) => ({
114
+ actorId,
115
+ actorType: "user"
116
+ })) : [], [idsKey]);
117
+ const config = getFluidGridsConfig();
118
+ const profiles = useActorProfiles(inputs, {
119
+ workspaceId: config.workspaceId || void 0,
120
+ orgId: config.organizationId,
121
+ authToken: config.authToken
122
+ });
123
+ return useMemo(() => {
124
+ const names = {};
125
+ for (const input of inputs) names[input.actorId] = profiles[input.actorId]?.displayName ?? buildActorFallback({
126
+ actorId: input.actorId,
127
+ actorType: "user"
128
+ }).displayName;
129
+ return names;
130
+ }, [inputs, profiles]);
131
+ }
132
+
133
+ // src/modules/human-response/components/ApprovalApprovers.tsx
134
+ /**
135
+ * The approvers of an in-app approval (BOFF-9956): where the quorum stands, and who was asked, how
136
+ * (by name or through a role), what each answered, when, and their comment. Shown on the run page
137
+ * and in the Approvals inbox. Renders nothing for an ask that named no approvers and has no answer.
138
+ */
139
+ const DECISION_ICON = {
140
+ APPROVED: "mdi:check-circle-outline",
141
+ REJECTED: "mdi:close-circle-outline",
142
+ PENDING: "mdi:clock-outline"
143
+ };
144
+ const DECISION_TONE = {
145
+ APPROVED: "text-status-success-text",
146
+ REJECTED: "text-status-error-text",
147
+ PENDING: "text-text-secondary"
148
+ };
149
+ /** "1 of 2 approvals needed, from 3 approvers"; nothing for an ask without a quorum. */
150
+ function ApprovalProgress({ request }) {
151
+ const tr = useTr();
152
+ const text = approvalProgressText(request, tr);
153
+ if (!text) return null;
154
+ return /* @__PURE__ */ jsx("p", {
155
+ className: "text-xs font-medium text-text-primary",
156
+ "data-testid": "approval-progress",
157
+ children: text
158
+ });
159
+ }
160
+ function ApprovalApprovers({ request }) {
161
+ const tr = useTr();
162
+ const approvals = request.approvals ?? [];
163
+ const names = useApproverNames(approvals.map((approval) => approval.approverId));
164
+ if (approvals.length === 0) return null;
165
+ const askOpen = request.status === "PENDING";
166
+ return /* @__PURE__ */ jsxs("div", {
167
+ className: "w-full space-y-1.5",
168
+ "data-testid": "approval-approvers",
169
+ children: [/* @__PURE__ */ jsx(ApprovalProgress, { request }), /* @__PURE__ */ jsx("ul", {
170
+ className: "space-y-1",
171
+ children: approvals.map((approval) => /* @__PURE__ */ jsxs("li", {
172
+ className: "flex flex-col gap-0.5 text-xs sm:flex-row sm:flex-wrap sm:items-baseline sm:gap-x-2",
173
+ "data-testid": "approval-approver",
174
+ "data-decision": approval.decision,
175
+ children: [
176
+ /* @__PURE__ */ jsxs("span", {
177
+ className: "flex items-center gap-1 font-medium text-text-primary",
178
+ children: [/* @__PURE__ */ jsx(Icon, {
179
+ icon: DECISION_ICON[approval.decision],
180
+ width: 14,
181
+ className: DECISION_TONE[approval.decision]
182
+ }), names[approval.approverId] ?? approval.approverId]
183
+ }),
184
+ /* @__PURE__ */ jsxs("span", {
185
+ className: "text-text-secondary",
186
+ children: [
187
+ approverDecisionLabel(approval.decision, askOpen, tr),
188
+ approval.answeredAt && ` · ${new Date(approval.answeredAt).toLocaleString()}`,
189
+ approval.assignedFrom && ` · ${tr("fluidgrids.humanResponse.approverViaRole", "asked as {{role}}", { role: approval.assignedFrom })}`
190
+ ]
191
+ }),
192
+ approval.comment && /* @__PURE__ */ jsx("q", {
193
+ className: "w-full whitespace-pre-wrap break-words text-text-primary",
194
+ children: approval.comment
195
+ })
196
+ ]
197
+ }, approval.id))
198
+ })]
199
+ });
200
+ }
201
+
202
+ // src/modules/human-response/utils/channel.ts
203
+ /** "email", "Slack" or "in-app": how an ask reached its recipient. */
204
+ function channelLabel(channel, tr) {
205
+ switch (channel) {
206
+ case "EMAIL": return tr("fluidgrids.humanResponse.channelEmail", "email");
207
+ case "SLACK": return tr("fluidgrids.humanResponse.channelSlack", "Slack");
208
+ default: return tr("fluidgrids.humanResponse.channelInApp", "in-app");
209
+ }
210
+ }
211
+
212
+ export { useRecipientLabel as a, notAnswerableText as i, ApprovalApprovers as n, answeredToastText as r, channelLabel as t };
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ // src/pageTwins/chips.ts
3
+ /**
4
+ * Plain values the page twins and their pages share (BOFF-16258), kept apart from the components
5
+ * so their modules export components only. Imports nothing: the pages that read it stay as light
6
+ * as they were.
7
+ */
8
+ /**
9
+ * The status chips, in the order mockup 12 shows them: the list's statuses
10
+ * (`WorkflowListStatus`, the same four), declared here so the twins import none of the list's
11
+ * state.
12
+ */
13
+ const WORKFLOW_STATUS_CHIPS = [
14
+ "ACTIVE",
15
+ "DRAFT",
16
+ "ARCHIVED",
17
+ "DEPRECATED"
18
+ ];
19
+ /**
20
+ * A twin is a picture: nothing in it takes focus or clicks. Set as an attribute so it holds under
21
+ * React 18 too (which drops a boolean `inert` prop).
22
+ */
23
+ function makeInert(node) {
24
+ node?.setAttribute("inert", "");
25
+ }
26
+
27
+ export { makeInert as n, WORKFLOW_STATUS_CHIPS as t };
@@ -0,0 +1,68 @@
1
+ "use client";
2
+ import { t as __exportAll } from "./rolldown-runtime-hDbaFkMy.js";
3
+
4
+ // src/graphql/client-holder.ts
5
+ var client_holder_exports = /* @__PURE__ */ __exportAll({
6
+ getFluidGridsClient: () => getFluidGridsClient,
7
+ getFluidGridsClientSafe: () => getFluidGridsClientSafe,
8
+ isFluidGridsClientReady: () => isFluidGridsClientReady,
9
+ resetFluidGridsClient: () => resetFluidGridsClient,
10
+ setFluidGridsClient: () => setFluidGridsClient,
11
+ waitForFluidGridsClient: () => waitForFluidGridsClient
12
+ });
13
+ let clientInstance = null;
14
+ /**
15
+ * Set the module-level client (for SDK-managed mode or wrapper injection)
16
+ */
17
+ function setFluidGridsClient(client) {
18
+ clientInstance = client;
19
+ }
20
+ /**
21
+ * Get the module-level client
22
+ * @throws Error if client is not initialized
23
+ */
24
+ function getFluidGridsClient() {
25
+ if (!clientInstance) throw new Error("FluidGrids client not initialized. Use FluidGridsProvider or call setFluidGridsClient().");
26
+ return clientInstance;
27
+ }
28
+ /**
29
+ * Get the client if available, or null if not initialized
30
+ */
31
+ function getFluidGridsClientSafe() {
32
+ return clientInstance;
33
+ }
34
+ /**
35
+ * Check if the client is ready
36
+ */
37
+ function isFluidGridsClientReady() {
38
+ return clientInstance !== null;
39
+ }
40
+ /**
41
+ * Wait for the client to be initialized
42
+ */
43
+ function waitForFluidGridsClient(timeoutMs = 1e4, intervalMs = 100) {
44
+ return new Promise((resolve) => {
45
+ if (clientInstance) {
46
+ resolve(clientInstance);
47
+ return;
48
+ }
49
+ const start = Date.now();
50
+ const timer = setInterval(() => {
51
+ if (clientInstance) {
52
+ clearInterval(timer);
53
+ resolve(clientInstance);
54
+ } else if (Date.now() - start >= timeoutMs) {
55
+ clearInterval(timer);
56
+ resolve(null);
57
+ }
58
+ }, intervalMs);
59
+ });
60
+ }
61
+ /**
62
+ * Reset the client reference (for cleanup on unmount)
63
+ */
64
+ function resetFluidGridsClient() {
65
+ clientInstance = null;
66
+ }
67
+
68
+ export { resetFluidGridsClient as a, isFluidGridsClientReady as i, getFluidGridsClient as n, setFluidGridsClient as o, getFluidGridsClientSafe as r, waitForFluidGridsClient as s, client_holder_exports as t };
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import { clsx } from "clsx";
3
+ import { twMerge } from "tailwind-merge";
4
+
5
+ // src/utils/cn.ts
6
+ function cn(...inputs) {
7
+ return twMerge(clsx(inputs));
8
+ }
9
+
10
+ export { cn as t };
@@ -0,0 +1,46 @@
1
+ "use client";
2
+ // src/builder/components/ndv/code-editor-diagnostics.ts
3
+ /** Maps the service's severity strings onto CodeMirror's three. */
4
+ function editorSeverity(value) {
5
+ const lower = value.toLowerCase();
6
+ if (lower.startsWith("warn")) return "warning";
7
+ if (lower === "info" || lower === "hint" || lower === "suggestion") return "info";
8
+ return "error";
9
+ }
10
+ /** Start offsets of each line of `text`. */
11
+ function lineStarts(text) {
12
+ const starts = [0];
13
+ for (let i = 0; i < text.length; i += 1) if (text.charCodeAt(i) === 10) starts.push(i + 1);
14
+ return starts;
15
+ }
16
+ /**
17
+ * Converts line/column diagnostics into CodeMirror ranges over `text`. A
18
+ * position beyond the text is clamped to its end, so a diagnostic computed for
19
+ * an older text never throws. A column marks the token that starts there (up
20
+ * to the next non-word character); no column marks the whole line.
21
+ */
22
+ function toCodeMirrorDiagnostics(text, diagnostics) {
23
+ const starts = lineStarts(text);
24
+ return diagnostics.map((diagnostic) => {
25
+ const lineIndex = Math.min(Math.max((diagnostic.line ?? 1) - 1, 0), starts.length - 1);
26
+ const lineStart = starts[lineIndex];
27
+ const lineEnd = lineIndex + 1 < starts.length ? starts[lineIndex + 1] - 1 : text.length;
28
+ let from = lineStart;
29
+ let to = lineEnd;
30
+ if (diagnostic.column && diagnostic.column > 0) {
31
+ from = Math.min(lineStart + diagnostic.column - 1, lineEnd);
32
+ to = from;
33
+ while (to < lineEnd && /[\w$]/.test(text.charAt(to))) to += 1;
34
+ if (to === from) to = Math.min(from + 1, lineEnd);
35
+ }
36
+ const message = diagnostic.code ? `${diagnostic.code}: ${diagnostic.message}` : diagnostic.message;
37
+ return {
38
+ from,
39
+ to,
40
+ severity: diagnostic.severity,
41
+ message
42
+ };
43
+ });
44
+ }
45
+
46
+ export { toCodeMirrorDiagnostics as n, editorSeverity as t };
@@ -0,0 +1,113 @@
1
+ "use client";
2
+ import { t as __exportAll } from "./rolldown-runtime-hDbaFkMy.js";
3
+ import { n as toCodeMirrorDiagnostics } from "./code-editor-diagnostics-Zr0cIcx1.js";
4
+ import { n as useBuilderReadOnly } from "./read-only-context-Dt9N9SIG.js";
5
+ import { useEffect, useMemo, useRef, useState } from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ import { cn } from "@burdenoff/fe-libs/utils";
8
+ import CodeMirror, { EditorView } from "@uiw/react-codemirror";
9
+ import { lintGutter, setDiagnostics } from "@codemirror/lint";
10
+
11
+ // src/builder/components/ndv/code-editor-field.tsx
12
+ var code_editor_field_exports = /* @__PURE__ */ __exportAll({ CodeEditorField: () => CodeEditorField });
13
+ /**
14
+ * Loads the grammar for the selected language on demand (BOFF-6695). The
15
+ * lezer parsers are heavy and only one language is ever shown per editor, so
16
+ * each language pack is a separate chunk that loads when an editor for it
17
+ * mounts. `null` until the pack resolves: the editor renders as plain text
18
+ * for that first moment and reconfigures once highlighting arrives.
19
+ */
20
+ function useLanguageExtension(language) {
21
+ const [extension, setExtension] = useState(null);
22
+ useEffect(() => {
23
+ let cancelled = false;
24
+ (language === "python" ? import("@codemirror/lang-python").then((m) => m.python()) : import("@codemirror/lang-javascript").then((m) => m.javascript({ typescript: language === "typescript" }))).then((ext) => {
25
+ if (!cancelled) setExtension(ext);
26
+ });
27
+ return () => {
28
+ cancelled = true;
29
+ };
30
+ }, [language]);
31
+ return extension;
32
+ }
33
+ function normalizeCodeLanguage(value) {
34
+ return typeof value === "string" && value.toLowerCase().startsWith("py") ? "python" : "javascript";
35
+ }
36
+ /**
37
+ * Follows the app shell's `.dark` class on <html> so the editor theme matches
38
+ * the surrounding UI (fe-libs toggles that class; there is no context to read).
39
+ */
40
+ function useIsDarkTheme() {
41
+ const [dark, setDark] = useState(() => typeof document !== "undefined" && document.documentElement.classList.contains("dark"));
42
+ useEffect(() => {
43
+ const root = document.documentElement;
44
+ const observer = new MutationObserver(() => setDark(root.classList.contains("dark")));
45
+ observer.observe(root, {
46
+ attributes: true,
47
+ attributeFilter: ["class"]
48
+ });
49
+ return () => observer.disconnect();
50
+ }, []);
51
+ return dark;
52
+ }
53
+ /**
54
+ * CodeMirror-backed editor for `code`-typed NDV parameters (n8n-style Code
55
+ * node). Purely presentational — the stored value stays a plain string in
56
+ * `args.state`, exactly like the single-line input it replaces.
57
+ */
58
+ function CodeEditorField({ value, language, placeholder, label, onChange, readOnly: readOnlyProp = false, diagnostics, minHeight = "180px", maxHeight = "420px", fill = false, className, "data-testid": testId }) {
59
+ const dark = useIsDarkTheme();
60
+ const withLint = diagnostics !== void 0;
61
+ const builderReadOnly = useBuilderReadOnly();
62
+ const readOnly = readOnlyProp || builderReadOnly;
63
+ const languageExtension = useLanguageExtension(language);
64
+ const extensions = useMemo(() => [
65
+ ...languageExtension ? [languageExtension] : [],
66
+ ...label ? [EditorView.contentAttributes.of({ "aria-label": label })] : [],
67
+ ...withLint ? [lintGutter()] : []
68
+ ], [
69
+ languageExtension,
70
+ label,
71
+ withLint
72
+ ]);
73
+ const viewRef = useRef(null);
74
+ useEffect(() => {
75
+ const view = viewRef.current;
76
+ if (!view || diagnostics === void 0) return;
77
+ view.dispatch(setDiagnostics(view.state, toCodeMirrorDiagnostics(view.state.doc.toString(), diagnostics)));
78
+ }, [diagnostics]);
79
+ return /* @__PURE__ */ jsx("div", {
80
+ "data-testid": testId,
81
+ className: cn("overflow-hidden rounded-md border border-input text-sm transition-colors focus-within:border-primary", fill && "h-full", className),
82
+ onKeyDown: (e) => e.stopPropagation(),
83
+ onMouseDown: (e) => e.stopPropagation(),
84
+ children: /* @__PURE__ */ jsx(CodeMirror, {
85
+ value,
86
+ onChange: readOnly ? void 0 : onChange,
87
+ extensions,
88
+ theme: dark ? "dark" : "light",
89
+ placeholder,
90
+ height: fill ? "100%" : void 0,
91
+ minHeight: fill ? void 0 : minHeight,
92
+ maxHeight: fill ? void 0 : maxHeight,
93
+ className: fill ? "h-full" : void 0,
94
+ editable: !readOnly,
95
+ readOnly,
96
+ onCreateEditor: (view) => {
97
+ viewRef.current = view;
98
+ if (diagnostics?.length) view.dispatch(setDiagnostics(view.state, toCodeMirrorDiagnostics(view.state.doc.toString(), diagnostics)));
99
+ },
100
+ basicSetup: {
101
+ lineNumbers: true,
102
+ foldGutter: true,
103
+ highlightActiveLine: !readOnly,
104
+ autocompletion: !readOnly,
105
+ bracketMatching: true,
106
+ closeBrackets: !readOnly,
107
+ indentOnInput: !readOnly
108
+ }
109
+ })
110
+ });
111
+ }
112
+
113
+ export { code_editor_field_exports as n, normalizeCodeLanguage as r, CodeEditorField as t };