@burdenoff/fluidgrids-fe-sdk 2026.1113.1 → 2026.1113.2

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 (127) hide show
  1. package/dist/{AiStudioPage-D3MAk-bs.js → AiStudioPage-5KYZ8r8-.js} +464 -7
  2. package/dist/{ApprovalInboxPage-Bb8H9ruw.js → ApprovalInboxPage-BsJX4osU.js} +4 -3
  3. package/dist/{ConnectionFormDialog-Bg9_OdHX.js → ConnectionFormDialog-Dr1-CTan.js} +2 -1
  4. package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
  5. package/dist/{DataSinkDashboardPage-Dc2QuJbL.js → DataSinkDashboardPage-8ZDn85e2.js} +1 -1
  6. package/dist/{DataTablesPage-Cv4veaKK.js → DataTablesPage-BBvABuxE.js} +5 -4
  7. package/dist/{EntityTagPicker-D8ws706D.js → EntityTagPicker-BppBSEJk.js} +2 -2
  8. package/dist/{ExecutionDetailPage-CTVGE-d-.js → ExecutionDetailPage-BXDF2eoT.js} +1444 -18
  9. package/dist/ExecutionsListDocument-CzdLPpj5.js +1259 -0
  10. package/dist/{ExecutionsListPage-J0sJPuoM.js → ExecutionsListPage--4BthM8L.js} +285 -11
  11. package/dist/FailureTriagePanel-B5WCSRFo.js +1252 -0
  12. package/dist/{FluidGridsProvider-C4FVNz0n.js → FluidGridsProvider-Dc_Jhtch.js} +8666 -8734
  13. package/dist/{HistoryPage-B9XcTPrO.js → HistoryPage-BvFk2m1m.js} +4 -3
  14. package/dist/{InsightsPage-DFOltjyj.js → InsightsPage-Dwmb02F6.js} +2682 -5
  15. package/dist/{MissingNodesInstallModal-D8H-YNCJ.js → MissingNodesInstallModal-Cze674hp.js} +2 -2
  16. package/dist/{NodesPage-YQ-hP60x.js → NodesPage-C5Dq-ru-.js} +3 -2
  17. package/dist/{OpenTemplateAsCodeButton-hH26HQCk.js → OpenTemplateAsCodeButton-8MZHih6I.js} +2 -2
  18. package/dist/{PaidTemplateConfirm-DoKWMBtR.js → PaidTemplateConfirm-0G-gv29n.js} +1 -1
  19. package/dist/{PublishCustomNodeAction-5XXnSA3H.js → PublishCustomNodeAction-OOY35dUv.js} +1 -1
  20. package/dist/QuotaExhaustedDialog-wvu_-WJ-.js +55 -0
  21. package/dist/{RunnerStatusPill-Ctg4TJcP.js → RunnerStatusPill-Bh7mEsPh.js} +2 -1
  22. package/dist/{RunnersPage-CAt4YDhB.js → RunnersPage-DHeuUDil.js} +2 -2
  23. package/dist/{SettingsPage-DEKPCVVP.js → SettingsPage-CfjXiGpb.js} +694 -14
  24. package/dist/{TagFilterSelect-CwM2-DU6.js → TagFilterSelect-CAShgvbS.js} +1 -1
  25. package/dist/{TaskQueuesPage-Dhi6SIT4.js → TaskQueuesPage--Mmn36b-.js} +3 -3
  26. package/dist/{TemplateCard-DVSd_4zJ.js → TemplateCard-BA_9em22.js} +644 -352
  27. package/dist/{TemplateConfigurationModal-BKi1z7z7.js → TemplateConfigurationModal-BT3PaR0O.js} +4 -3
  28. package/dist/{TemplateDetailPanel-DK1gF7P5.js → TemplateDetailPanel-BxFNnlXm.js} +2 -1
  29. package/dist/{TemplatePreview-DuSX2Q7H.js → TemplatePreview-Bagja6WN.js} +7 -7
  30. package/dist/{TemplatesPage-CAWHh61l.js → TemplatesPage-CAajpJ5w.js} +711 -6
  31. package/dist/{VariablesPage-D7CoatWf.js → VariablesPage-CgUBKhAe.js} +3 -3
  32. package/dist/{VersionDiffDialog-DGwysiyE.js → VersionDiffDialog-D9W5Fm56.js} +233 -129
  33. package/dist/VersionLifecycleBar-DuphLOT0.js +131 -0
  34. package/dist/{WorkflowBuilder-DAeoQi5E.js → WorkflowBuilder-DMpSPElu.js} +16 -13
  35. package/dist/{WorkflowBuilder-BJgqDboZ.js → WorkflowBuilder-v8h8skwG.js} +5 -5
  36. package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
  37. package/dist/WorkflowEditLeaseStatusDocument-Dp62med3.js +627 -0
  38. package/dist/WorkflowProposalCard-zCdUpCk8.js +249 -0
  39. package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
  40. package/dist/{WorkflowSearchRedirect-CMEvd_AR.js → WorkflowSearchRedirect-G78lINAE.js} +1 -1
  41. package/dist/{WorkflowShareDialog-BgHRsDP0.js → WorkflowShareDialog-B7VOgr4-.js} +304 -3
  42. package/dist/WorkflowVersionsDocument-CfPMloRW.js +3195 -0
  43. package/dist/{WorkflowsList-CcQPxWKL.js → WorkflowsList-CPYzfE4K.js} +11 -9
  44. package/dist/agent-form-D0uLvzx4.js +718 -0
  45. package/dist/{agentTools-DKpNKztf.js → agentTools-DTXUqtfu.js} +4 -4
  46. package/dist/api-BZVyX5d2.js +2286 -0
  47. package/dist/api-BqA-f-AD.js +8064 -0
  48. package/dist/app-BJUvugPM.js +3813 -0
  49. package/dist/assert-rules-CPNrO44K.js +318 -0
  50. package/dist/attach-node-helpers-CNsYtLOR.js +32 -0
  51. package/dist/badge-CXfPhoMH.js +26 -0
  52. package/dist/{canvasNoteTools-C_AN79m0.js → canvasNoteTools-DmfZwtnL.js} +3 -3
  53. package/dist/{channel-CZ70oI81.js → channel-DtF1n_ab.js} +1 -1
  54. package/dist/client-Ctl4jmY3.js +127 -0
  55. package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
  56. package/dist/{code-editor-field-Dt6KNWwN.js → code-editor-field-Cv907s3W.js} +2 -2
  57. package/dist/{codec-client-CJ95Rmqo.js → codec-client-CAYl6j46.js} +2 -1
  58. package/dist/conditionBuilder-D8aLGL1w.js +1134 -0
  59. package/dist/config-X97zrIvn.js +600 -0
  60. package/dist/{definition-canvas-Bshn_dSP.js → definition-canvas-DL25_6NH.js} +1 -1
  61. package/dist/{dialog-Cjb4lB4D.js → dialog-BVd152GS.js} +3 -14
  62. package/dist/durable-nodes-DXCCQYWD.js +81 -0
  63. package/dist/errors-xPZ-IbQd.js +142 -0
  64. package/dist/executions.js +2 -2
  65. package/dist/{flow-builder-D3Hl2AFk.js → flow-builder-Dv5fWJ6F.js} +9301 -8189
  66. package/dist/{node-registry-refresh-Dy0uRg9f.js → global-client-DP_Wxe5t.js} +2 -27
  67. package/dist/global-operations-7pvXw_j9.js +145 -0
  68. package/dist/history.js +1 -1
  69. package/dist/{index-CWcP-tG1.d.ts → index-DtMUtXNq.d.ts} +247 -247
  70. package/dist/index.d.ts +1 -1
  71. package/dist/index.js +4403 -46
  72. package/dist/input-ChT6Q-Pr.js +17 -0
  73. package/dist/logs-panel-DtG93ocy.js +342 -0
  74. package/dist/mapping-colors-BIX_YeCQ.js +48 -0
  75. package/dist/{node-detail-view-bVLeYarT.js → node-detail-view-BKI_2kM6.js} +12 -11
  76. package/dist/{node-editor-tab-body-JHHVtQgR.js → node-editor-tab-body-Cc1MWEFR.js} +3 -3
  77. package/dist/{node-operation-selection-DAbS6jSY.js → node-operation-selection-Czeeb2D4.js} +2 -139
  78. package/dist/node-registry-refresh-s3okf83X.js +27 -0
  79. package/dist/nodes.js +1 -1
  80. package/dist/notesKey-5EaREBGA.js +12 -0
  81. package/dist/observability.d.ts +1 -1
  82. package/dist/observability.js +2 -2
  83. package/dist/{popover-Xx3gN7vg.js → popover-DDv7J1Kl.js} +717 -6
  84. package/dist/{quick-config-panel-BvVQXuIL.js → quick-config-panel-BPCRfqWI.js} +4 -4
  85. package/dist/read-only-context-Dt9N9SIG.js +18 -0
  86. package/dist/{schedule-panel-DCb40TPN.js → schedule-panel-C1KwfLCE.js} +14 -12
  87. package/dist/settings.js +1 -1
  88. package/dist/{shared-CMfn30xT.js → shared-Ctl9ZHo1.js} +2 -1
  89. package/dist/{sidebar-node-editor-DxCWFZG2.js → sidebar-node-editor-d9Rlq5pU.js} +4 -4
  90. package/dist/sticky-notes-23j-wL6Q.js +96 -0
  91. package/dist/template-code-dqRunGOv.js +184 -0
  92. package/dist/template-preview-C01KV277.js +29 -0
  93. package/dist/templates.js +2 -2
  94. package/dist/token-refresh-link-BjN7H4qA.js +291 -0
  95. package/dist/useAgentDefinitions-ZKX2N9aP.js +3101 -0
  96. package/dist/useConnections-BlB0gbOB.js +931 -0
  97. package/dist/useDurableParity-BgLH_SCF.js +2088 -0
  98. package/dist/{useEntityTags-Db4Pc8_M.js → useEntityTags-4iW6UTly.js} +227 -3
  99. package/dist/{useExecutions-DOpG1pUQ.js → useExecutions-Bm7q_UwN.js} +6 -3
  100. package/dist/useGlobalStoreClient-DMTrywdX.js +24 -0
  101. package/dist/{useHumanRequests-ZiR0sSzS.js → useHumanRequests-DwG2tQ3f.js} +2 -1
  102. package/dist/{useObservability-rQmwhoZZ.js → useObservability-DPATdbw7.js} +4 -2
  103. package/dist/{useRunHistory-COn6dl7l.js → useRunHistory-CGfjCsJ3.js} +1122 -4
  104. package/dist/{useVariables-2ddyJX4a.js → useVariables-DFdZofLQ.js} +2 -1
  105. package/dist/{useWorkflowCodeExport-ZoUJKRSK.js → useWorkflowCodeExport-D_mCuhKP.js} +289 -4
  106. package/dist/useWorkflowOrganization-r5FWNBs6.js +1690 -0
  107. package/dist/useWorkflowProposal-Bh2_qjmM.js +7478 -0
  108. package/dist/{useWorkflows-jOW60YmD.js → useWorkflows-aqVD7kGa.js} +694 -4
  109. package/dist/workflow-builder.js +5 -5
  110. package/dist/{workflow-code-transfer-l9wO34S0.js → workflow-code-transfer-5C0HUzae.js} +1 -53
  111. package/dist/workflow-host.js +4 -2
  112. package/dist/workflow-pages.d.ts +1 -1
  113. package/dist/workflow-pages.js +19 -19
  114. package/dist/workflow-preview.js +3 -2
  115. package/dist/workflows-list.js +1 -1
  116. package/package.json +1 -1
  117. package/dist/FailureTriagePanel-BbYFYeV_.js +0 -311
  118. package/dist/WorkflowProposalCard-DGMdZC4R.js +0 -1432
  119. package/dist/agent-form-Bfvm32j1.js +0 -83
  120. package/dist/api-DQtHXbIg.js +0 -224
  121. package/dist/api-MeAm6g7E.js +0 -55
  122. package/dist/client-C9XSzSXr.js +0 -1147
  123. package/dist/graphql-operation-types-C9qbvRa8.js +0 -53122
  124. package/dist/useAgentDefinitions-_hgNCK1A.js +0 -550
  125. package/dist/useConnections-Cs7LCWEM.js +0 -401
  126. package/dist/useDurableParity-CcLeCDfv.js +0 -504
  127. package/dist/useWorkflowOrganization-QxVePSkk.js +0 -282
@@ -0,0 +1,600 @@
1
+ "use client";
2
+ import { t as __exportAll } from "./rolldown-runtime-hDbaFkMy.js";
3
+ import { create } from "zustand";
4
+
5
+ // src/modules/executions/store/executionsStore.ts
6
+ const DEFAULT_EXECUTIONS_FILTER = {
7
+ status: "all",
8
+ workflowKey: "",
9
+ dateRange: {
10
+ start: null,
11
+ end: null,
12
+ preset: "all"
13
+ },
14
+ search: "",
15
+ triggerType: "all",
16
+ durationMinSeconds: null,
17
+ durationMaxSeconds: null,
18
+ errorType: "all",
19
+ nodeId: "",
20
+ failedNodeType: "",
21
+ tagId: "",
22
+ workflowId: ""
23
+ };
24
+ const defaultPagination = {
25
+ page: 1,
26
+ pageSize: 25,
27
+ total: 0
28
+ };
29
+ const useExecutionsStore = create((set) => ({
30
+ viewMode: "table",
31
+ selectedExecution: null,
32
+ expandedRows: /* @__PURE__ */ new Set(),
33
+ selection: {
34
+ runIds: [],
35
+ allSelected: false
36
+ },
37
+ filter: DEFAULT_EXECUTIONS_FILTER,
38
+ pagination: defaultPagination,
39
+ isFilterPanelOpen: false,
40
+ isDetailsPanelOpen: false,
41
+ autoRefresh: true,
42
+ autoRefreshInterval: 5e3,
43
+ liveRunIds: /* @__PURE__ */ new Set(),
44
+ setViewMode: (mode) => set({ viewMode: mode }),
45
+ setSelectedExecution: (execution) => set({
46
+ selectedExecution: execution,
47
+ isDetailsPanelOpen: execution !== null
48
+ }),
49
+ toggleRowExpanded: (runId) => set((state) => {
50
+ const newExpanded = new Set(state.expandedRows);
51
+ if (newExpanded.has(runId)) newExpanded.delete(runId);
52
+ else newExpanded.add(runId);
53
+ return { expandedRows: newExpanded };
54
+ }),
55
+ setSelection: (selection) => set({ selection }),
56
+ toggleSelectRun: (runId) => set((state) => {
57
+ return { selection: {
58
+ runIds: state.selection.runIds.includes(runId) ? state.selection.runIds.filter((id) => id !== runId) : [...state.selection.runIds, runId],
59
+ allSelected: false
60
+ } };
61
+ }),
62
+ selectAll: (runIds) => set((state) => ({ selection: {
63
+ runIds: state.selection.allSelected ? [] : runIds,
64
+ allSelected: !state.selection.allSelected
65
+ } })),
66
+ clearSelection: () => set({ selection: {
67
+ runIds: [],
68
+ allSelected: false
69
+ } }),
70
+ updateFilter: (filterUpdate) => set((state) => ({
71
+ filter: {
72
+ ...state.filter,
73
+ ...filterUpdate
74
+ },
75
+ pagination: {
76
+ ...state.pagination,
77
+ page: 1
78
+ }
79
+ })),
80
+ setStatusFilter: (status) => set((state) => ({
81
+ filter: {
82
+ ...state.filter,
83
+ status
84
+ },
85
+ pagination: {
86
+ ...state.pagination,
87
+ page: 1
88
+ }
89
+ })),
90
+ setWorkflowFilter: (workflowKey) => set((state) => ({
91
+ filter: {
92
+ ...state.filter,
93
+ workflowKey
94
+ },
95
+ pagination: {
96
+ ...state.pagination,
97
+ page: 1
98
+ }
99
+ })),
100
+ setDateRange: (dateRange) => set((state) => ({
101
+ filter: {
102
+ ...state.filter,
103
+ dateRange
104
+ },
105
+ pagination: {
106
+ ...state.pagination,
107
+ page: 1
108
+ }
109
+ })),
110
+ setSearchQuery: (search) => set((state) => ({
111
+ filter: {
112
+ ...state.filter,
113
+ search
114
+ },
115
+ pagination: {
116
+ ...state.pagination,
117
+ page: 1
118
+ }
119
+ })),
120
+ setTriggerTypeFilter: (triggerType) => set((state) => ({
121
+ filter: {
122
+ ...state.filter,
123
+ triggerType
124
+ },
125
+ pagination: {
126
+ ...state.pagination,
127
+ page: 1
128
+ }
129
+ })),
130
+ setDurationFilter: (durationMinSeconds, durationMaxSeconds) => set((state) => ({
131
+ filter: {
132
+ ...state.filter,
133
+ durationMinSeconds,
134
+ durationMaxSeconds
135
+ },
136
+ pagination: {
137
+ ...state.pagination,
138
+ page: 1
139
+ }
140
+ })),
141
+ setErrorTypeFilter: (errorType) => set((state) => ({
142
+ filter: {
143
+ ...state.filter,
144
+ errorType
145
+ },
146
+ pagination: {
147
+ ...state.pagination,
148
+ page: 1
149
+ }
150
+ })),
151
+ setNodeFilter: (nodeId) => set((state) => ({
152
+ filter: {
153
+ ...state.filter,
154
+ nodeId
155
+ },
156
+ pagination: {
157
+ ...state.pagination,
158
+ page: 1
159
+ }
160
+ })),
161
+ setFailedNodeTypeFilter: (failedNodeType) => set((state) => ({
162
+ filter: {
163
+ ...state.filter,
164
+ failedNodeType
165
+ },
166
+ pagination: {
167
+ ...state.pagination,
168
+ page: 1
169
+ }
170
+ })),
171
+ setTagFilter: (tagId) => set((state) => ({
172
+ filter: {
173
+ ...state.filter,
174
+ tagId
175
+ },
176
+ pagination: {
177
+ ...state.pagination,
178
+ page: 1
179
+ }
180
+ })),
181
+ setWorkflowIdFilter: (workflowId) => set((state) => ({
182
+ filter: {
183
+ ...state.filter,
184
+ workflowId
185
+ },
186
+ pagination: {
187
+ ...state.pagination,
188
+ page: 1
189
+ }
190
+ })),
191
+ resetFilters: () => set({
192
+ filter: DEFAULT_EXECUTIONS_FILTER,
193
+ pagination: { ...defaultPagination }
194
+ }),
195
+ setPage: (page) => set((state) => ({ pagination: {
196
+ ...state.pagination,
197
+ page
198
+ } })),
199
+ setPageSize: (pageSize) => set((state) => ({ pagination: {
200
+ ...state.pagination,
201
+ pageSize,
202
+ page: 1
203
+ } })),
204
+ setTotal: (total) => set((state) => ({ pagination: {
205
+ ...state.pagination,
206
+ total
207
+ } })),
208
+ toggleFilterPanel: () => set((state) => ({ isFilterPanelOpen: !state.isFilterPanelOpen })),
209
+ toggleDetailsPanel: () => set((state) => ({ isDetailsPanelOpen: !state.isDetailsPanelOpen })),
210
+ setAutoRefresh: (enabled) => set({ autoRefresh: enabled }),
211
+ setAutoRefreshInterval: (interval) => set({ autoRefreshInterval: interval }),
212
+ addLiveRun: (runId) => set((state) => {
213
+ const newLiveRunIds = new Set(state.liveRunIds);
214
+ newLiveRunIds.add(runId);
215
+ return { liveRunIds: newLiveRunIds };
216
+ }),
217
+ removeLiveRun: (runId) => set((state) => {
218
+ const newLiveRunIds = new Set(state.liveRunIds);
219
+ newLiveRunIds.delete(runId);
220
+ return { liveRunIds: newLiveRunIds };
221
+ }),
222
+ clearLiveRuns: () => set({ liveRunIds: /* @__PURE__ */ new Set() })
223
+ }));
224
+
225
+ // src/theme/fluidgridsTheme.ts
226
+ const color = (...cssVariables) => ({
227
+ kind: "color",
228
+ cssVariables
229
+ });
230
+ const length = (...cssVariables) => ({
231
+ kind: "length",
232
+ cssVariables
233
+ });
234
+ const font = (...cssVariables) => ({
235
+ kind: "font",
236
+ cssVariables
237
+ });
238
+ /**
239
+ * Theme token → the fe-libs semantic CSS variables it sets. This table is the
240
+ * public contract: a token keeps its variables across minor releases.
241
+ */
242
+ const FLUIDGRIDS_THEME_TOKEN_MAP = {
243
+ "colors.bgCanvas": color("--color-bg-canvas"),
244
+ "colors.bgSurface": color("--color-bg-surface"),
245
+ "colors.bgElevated": color("--color-bg-elevated"),
246
+ "colors.bgSunken": color("--color-bg-sunken"),
247
+ "colors.textPrimary": color("--color-text-primary"),
248
+ "colors.textSecondary": color("--color-text-secondary"),
249
+ "colors.textMuted": color("--color-text-muted"),
250
+ "colors.borderDefault": color("--color-border-default"),
251
+ "colors.borderSubtle": color("--color-border-subtle"),
252
+ "colors.borderStrong": color("--color-border-strong"),
253
+ "colors.primary": color("--color-action-primary-bg", "--color-action-primary-border"),
254
+ "colors.primaryHover": color("--color-action-primary-bgHover"),
255
+ "colors.primaryActive": color("--color-action-primary-bgActive"),
256
+ "colors.primaryText": color("--color-action-primary-text"),
257
+ "colors.success": color("--color-status-success-bg"),
258
+ "colors.warning": color("--color-status-warning-bg"),
259
+ "colors.error": color("--color-status-error-bg"),
260
+ "colors.info": color("--color-status-info-bg"),
261
+ "radius.base": length("--radius"),
262
+ "radius.card": length("--radius-card"),
263
+ "radius.button": length("--radius-button"),
264
+ "radius.input": length("--radius-input"),
265
+ "font.body": font("--font-family-body", "--font-sans"),
266
+ "font.heading": font("--font-family-heading"),
267
+ "font.mono": font("--font-family-mono", "--font-mono")
268
+ };
269
+ const MAX_VALUE_LENGTH = 200;
270
+ const FORBIDDEN_VALUE = /[;{}<>\\!@"`]|\/\*|\*\/|url\s*\(|expression\s*\(|image\s*\(|image-set\s*\(|javascript:|@import/i;
271
+ const HEX_COLOR = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
272
+ const NAMED_COLOR = /^[a-z]{3,30}$/i;
273
+ const COLOR_FUNCTION = /^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color|color-mix)\([a-z0-9#%.,/\s()+-]*\)$/i;
274
+ const CSS_VAR = /^var\(--[a-z0-9-]+\)$/i;
275
+ const LENGTH = /^(?:0|\d*\.?\d+(?:px|rem|em|%|vh|vw|vmin|vmax|ch|ex|pt))$/i;
276
+ const CALC = /^calc\([a-z0-9%.\s()*/+-]*\)$/i;
277
+ const FONT_FAMILY_ITEM = /^(?:[a-z0-9][a-z0-9 _-]*|'[a-z0-9 _-]+')$/i;
278
+ function balancedParentheses(value) {
279
+ let depth = 0;
280
+ for (const char of value) {
281
+ if (char === "(") depth += 1;
282
+ if (char === ")") depth -= 1;
283
+ if (depth < 0) return false;
284
+ }
285
+ return depth === 0;
286
+ }
287
+ /**
288
+ * Validate one token value. Returns the trimmed value, or null when it is not
289
+ * a plain CSS value of the expected kind.
290
+ */
291
+ function sanitizeThemeValue(kind, value) {
292
+ if (typeof value !== "string") return null;
293
+ const trimmed = value.trim();
294
+ if (!trimmed || trimmed.length > MAX_VALUE_LENGTH) return null;
295
+ if (FORBIDDEN_VALUE.test(trimmed) || !balancedParentheses(trimmed)) return null;
296
+ if (CSS_VAR.test(trimmed)) return trimmed;
297
+ switch (kind) {
298
+ case "color": return HEX_COLOR.test(trimmed) || NAMED_COLOR.test(trimmed) || COLOR_FUNCTION.test(trimmed) ? trimmed : null;
299
+ case "length": return LENGTH.test(trimmed) || CALC.test(trimmed) ? trimmed : null;
300
+ case "font": {
301
+ const items = trimmed.split(",").map((item) => item.trim());
302
+ return items.every((item) => FONT_FAMILY_ITEM.test(item)) ? items.join(", ") : null;
303
+ }
304
+ }
305
+ }
306
+ function warnDropped(key, value) {
307
+ console.warn(`[FluidGrids SDK] theme token "${key}" ignored: ${JSON.stringify(value)} is not a plain CSS value.`);
308
+ }
309
+ /** Relative luminance of a hex colour, or null for any other notation. */
310
+ function hexLuminance(value) {
311
+ if (!HEX_COLOR.test(value)) return null;
312
+ let hex = value.slice(1);
313
+ if (hex.length <= 4) hex = hex.split("").map((digit) => digit + digit).join("");
314
+ const [red = 0, green = 0, blue = 0] = [
315
+ 0,
316
+ 2,
317
+ 4
318
+ ].map((offset) => {
319
+ const channel = parseInt(hex.slice(offset, offset + 2), 16) / 255;
320
+ return channel <= .03928 ? channel / 12.92 : Math.pow((channel + .055) / 1.055, 2.4);
321
+ });
322
+ return .2126 * red + .7152 * green + .0722 * blue;
323
+ }
324
+ /**
325
+ * The resolved mode of a theme: the shortcut itself, `theme.mode`, or
326
+ * undefined when the theme leaves the mode to the host.
327
+ */
328
+ function themeMode(theme) {
329
+ if (theme === "light" || theme === "dark") return theme;
330
+ if (theme && typeof theme === "object") return theme.mode === "light" || theme.mode === "dark" ? theme.mode : void 0;
331
+ }
332
+ function groupEntries(theme, group) {
333
+ const values = theme[group];
334
+ if (!values || typeof values !== "object") return [];
335
+ return Object.entries(values);
336
+ }
337
+ function isTokenKey(key) {
338
+ return Object.prototype.hasOwnProperty.call(FLUIDGRIDS_THEME_TOKEN_MAP, key);
339
+ }
340
+ /**
341
+ * Turn a theme into the CSS custom properties it sets. Pure: no DOM access.
342
+ *
343
+ * Values that are not plain CSS values of the token's kind (anything with
344
+ * `;`, `{`, `}`, `url(`, `expression(`, quotes other than single-quoted font
345
+ * names, …) are dropped with a console warning. Unknown keys are dropped the
346
+ * same way. When `colors.primary` is set, the hover / pressed shades and the
347
+ * text colour are derived from it unless they are set explicitly; the text
348
+ * colour is picked for contrast when `primary` is a hex colour.
349
+ */
350
+ function themeToCssVariables(theme) {
351
+ const variables = {};
352
+ if (!theme || typeof theme !== "object") return variables;
353
+ const colors = {};
354
+ for (const group of [
355
+ "colors",
356
+ "radius",
357
+ "font"
358
+ ]) for (const [name, raw] of groupEntries(theme, group)) {
359
+ if (raw === void 0) continue;
360
+ const key = `${group}.${name}`;
361
+ if (!isTokenKey(key)) {
362
+ warnDropped(key, raw);
363
+ continue;
364
+ }
365
+ const mapping = FLUIDGRIDS_THEME_TOKEN_MAP[key];
366
+ const value = sanitizeThemeValue(mapping.kind, raw);
367
+ if (value === null) {
368
+ warnDropped(key, raw);
369
+ continue;
370
+ }
371
+ if (group === "colors") colors[name] = value;
372
+ for (const cssVariable of mapping.cssVariables) variables[cssVariable] = value;
373
+ }
374
+ const primary = colors.primary;
375
+ if (primary) {
376
+ if (!colors.primaryHover) variables["--color-action-primary-bgHover"] = `color-mix(in oklab, ${primary} 84%, var(--palette-black))`;
377
+ if (!colors.primaryActive) variables["--color-action-primary-bgActive"] = `color-mix(in oklab, ${primary} 70%, var(--palette-black))`;
378
+ if (!colors.primaryText) {
379
+ const luminance = hexLuminance(primary);
380
+ if (luminance !== null) variables["--color-action-primary-text"] = luminance > .4 ? "var(--palette-black)" : "var(--palette-white)";
381
+ }
382
+ }
383
+ return variables;
384
+ }
385
+ const stack = [];
386
+ let nextId = 1;
387
+ let observer = null;
388
+ const hostVariables = /* @__PURE__ */ new Map();
389
+ const appliedVariables = /* @__PURE__ */ new Map();
390
+ let hostMode = null;
391
+ function readHostMode(root) {
392
+ return {
393
+ dataTheme: root.getAttribute("data-theme"),
394
+ dark: root.classList.contains("dark")
395
+ };
396
+ }
397
+ function writeMode(root, mode) {
398
+ if (mode.dataTheme === null) root.removeAttribute("data-theme");
399
+ else if (root.getAttribute("data-theme") !== mode.dataTheme) root.setAttribute("data-theme", mode.dataTheme);
400
+ if (root.classList.contains("dark") !== mode.dark) root.classList.toggle("dark", mode.dark);
401
+ }
402
+ function modeDrifted(root, mode) {
403
+ return root.getAttribute("data-theme") !== mode || root.classList.contains("dark") !== (mode === "dark");
404
+ }
405
+ function restoreVariable(root, name) {
406
+ const previous = hostVariables.get(name) ?? "";
407
+ if (previous) root.style.setProperty(name, previous);
408
+ else root.style.removeProperty(name);
409
+ hostVariables.delete(name);
410
+ appliedVariables.delete(name);
411
+ }
412
+ function forceVariable(root, name, value) {
413
+ root.style.setProperty(name, value);
414
+ appliedVariables.set(name, root.style.getPropertyValue(name));
415
+ }
416
+ /** Re-force the winning theme where something else changed it. */
417
+ function reconcileDrift() {
418
+ const top = stack.at(-1);
419
+ if (!top || typeof document === "undefined") return;
420
+ const root = document.documentElement;
421
+ for (const [name, value] of Object.entries(top.variables)) {
422
+ const current = root.style.getPropertyValue(name);
423
+ if (current !== appliedVariables.get(name)) {
424
+ hostVariables.set(name, current);
425
+ forceVariable(root, name, value);
426
+ }
427
+ }
428
+ if (top.mode && modeDrifted(root, top.mode)) {
429
+ hostMode = readHostMode(root);
430
+ writeMode(root, {
431
+ dataTheme: top.mode,
432
+ dark: top.mode === "dark"
433
+ });
434
+ }
435
+ }
436
+ /** Make the document match the top of the stack. */
437
+ function sync() {
438
+ if (typeof document === "undefined") return;
439
+ const root = document.documentElement;
440
+ const top = stack.at(-1);
441
+ const wanted = top?.variables ?? {};
442
+ for (const name of [...appliedVariables.keys()]) if (!(name in wanted)) restoreVariable(root, name);
443
+ for (const [name, value] of Object.entries(wanted)) {
444
+ if (!hostVariables.has(name)) hostVariables.set(name, root.style.getPropertyValue(name));
445
+ if (appliedVariables.get(name) !== value) forceVariable(root, name, value);
446
+ }
447
+ if (top?.mode) {
448
+ if (!hostMode) hostMode = readHostMode(root);
449
+ writeMode(root, {
450
+ dataTheme: top.mode,
451
+ dark: top.mode === "dark"
452
+ });
453
+ } else if (hostMode) {
454
+ writeMode(root, hostMode);
455
+ hostMode = null;
456
+ }
457
+ if (!top) {
458
+ observer?.disconnect();
459
+ observer = null;
460
+ return;
461
+ }
462
+ if (!observer && typeof MutationObserver !== "undefined") {
463
+ observer = new MutationObserver(reconcileDrift);
464
+ observer.observe(root, {
465
+ attributes: true,
466
+ attributeFilter: [
467
+ "style",
468
+ "data-theme",
469
+ "class"
470
+ ]
471
+ });
472
+ }
473
+ }
474
+ /**
475
+ * Apply a theme to the document and return a function that removes it again.
476
+ *
477
+ * Sets each variable from {@link themeToCssVariables} as an inline custom
478
+ * property on `document.documentElement`, and for a mode sets `data-theme`
479
+ * and the `.dark` class. While applied, the values are re-forced if something
480
+ * else (a host ThemeProvider) rewrites them. Disposing restores the inline
481
+ * values and mode the document had (including any change the host made in
482
+ * between). When several themes are applied, the most recent one wins.
483
+ * Calling the returned function more than once is safe. Without a DOM
484
+ * (server rendering) it does nothing.
485
+ */
486
+ function applyFluidGridsTheme(theme) {
487
+ if (typeof document === "undefined") return () => void 0;
488
+ const entry = {
489
+ id: nextId++,
490
+ variables: themeToCssVariables(theme),
491
+ mode: themeMode(theme)
492
+ };
493
+ stack.push(entry);
494
+ sync();
495
+ let disposed = false;
496
+ return () => {
497
+ if (disposed) return;
498
+ disposed = true;
499
+ const index = stack.findIndex((active) => active.id === entry.id);
500
+ if (index >= 0) stack.splice(index, 1);
501
+ sync();
502
+ };
503
+ }
504
+ /**
505
+ * Stable key for a theme value, so callers can tell two theme objects with the
506
+ * same content apart from a real change (hosts often pass inline objects).
507
+ */
508
+ function themeKey(theme) {
509
+ if (!theme) return "";
510
+ if (typeof theme === "string") return theme;
511
+ const sortedGroup = (group) => groupEntries(theme, group).filter(([, value]) => value !== void 0).sort(([a], [b]) => a.localeCompare(b));
512
+ return JSON.stringify([
513
+ theme.mode ?? null,
514
+ sortedGroup("colors"),
515
+ sortedGroup("radius"),
516
+ sortedGroup("font")
517
+ ]);
518
+ }
519
+
520
+ // src/config/index.ts
521
+ var config_exports = /* @__PURE__ */ __exportAll({ getFluidGridsConfig: () => getFluidGridsConfig });
522
+ let runtimeConfig = {
523
+ apiGatewayUrl: "",
524
+ workspaceId: ""
525
+ };
526
+ /**
527
+ * Get current configuration via proxy for live access
528
+ */
529
+ const config = new Proxy({}, { get(_, prop) {
530
+ return runtimeConfig[prop];
531
+ } });
532
+ /**
533
+ * Get the full configuration object
534
+ */
535
+ function getFluidGridsConfig() {
536
+ return { ...runtimeConfig };
537
+ }
538
+ /**
539
+ * Set runtime configuration
540
+ */
541
+ function setFluidGridsConfig(newConfig) {
542
+ const previous = runtimeConfig;
543
+ runtimeConfig = {
544
+ ...runtimeConfig,
545
+ ...newConfig
546
+ };
547
+ if (previous.authToken !== runtimeConfig.authToken || previous.workspaceToken !== runtimeConfig.workspaceToken) tokenRevision += 1;
548
+ if ("theme" in newConfig) syncConfigTheme(newConfig.theme);
549
+ }
550
+ /**
551
+ * Reset configuration to defaults
552
+ */
553
+ function resetFluidGridsConfig() {
554
+ tokenRevision += 1;
555
+ runtimeConfig = {
556
+ apiGatewayUrl: "",
557
+ workspaceId: ""
558
+ };
559
+ syncConfigTheme(void 0);
560
+ }
561
+ let tokenRevision = 0;
562
+ /** Current token revision. Internal: used by the SDK's Apollo clients. */
563
+ function getFluidGridsTokenRevision() {
564
+ return tokenRevision;
565
+ }
566
+ let configTheme = null;
567
+ function syncConfigTheme(theme) {
568
+ const key = themeKey(theme);
569
+ if (configTheme?.key === key) return;
570
+ const previous = configTheme;
571
+ configTheme = key ? {
572
+ key,
573
+ dispose: applyFluidGridsTheme(theme)
574
+ } : null;
575
+ previous?.dispose();
576
+ }
577
+ function normalizeOrigin(origin) {
578
+ return origin.replace(/\/$/, "");
579
+ }
580
+ function validateTrustedOrigin(trustedOrigins) {
581
+ if (typeof window === "undefined" || !trustedOrigins?.length) return;
582
+ const currentOrigin = normalizeOrigin(window.location.origin);
583
+ if (!trustedOrigins.map(normalizeOrigin).includes(currentOrigin)) throw new Error(`FluidGrids SDK blocked untrusted origin: ${currentOrigin}`);
584
+ }
585
+ /**
586
+ * Get the GraphQL endpoint URL
587
+ */
588
+ function getGraphQLEndpoint(baseUrl) {
589
+ const url = baseUrl || runtimeConfig.apiGatewayUrl;
590
+ if (!url) throw new Error("FluidGrids SDK requires apiGatewayUrl to be configured");
591
+ const normalizedBase = url.endsWith("/") ? url.slice(0, -1) : url;
592
+ if (normalizedBase.endsWith("/graphql")) return normalizedBase;
593
+ return `${normalizedBase}/workspaces/graphql`;
594
+ }
595
+ /** Clear user execution state only when a host session ends or changes identity. */
596
+ function resetFluidGridsExecutionState() {
597
+ useExecutionsStore.setState(useExecutionsStore.getInitialState(), true);
598
+ }
599
+
600
+ export { getGraphQLEndpoint as a, setFluidGridsConfig as c, applyFluidGridsTheme as d, sanitizeThemeValue as f, useExecutionsStore as g, DEFAULT_EXECUTIONS_FILTER as h, getFluidGridsTokenRevision as i, validateTrustedOrigin as l, themeToCssVariables as m, config_exports as n, resetFluidGridsConfig as o, themeKey as p, getFluidGridsConfig as r, resetFluidGridsExecutionState as s, config as t, FLUIDGRIDS_THEME_TOKEN_MAP as u };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { F as mergeStickyNotes } from "./node-operation-selection-DAbS6jSY.js";
2
+ import { r as mergeStickyNotes } from "./sticky-notes-23j-wL6Q.js";
3
3
 
4
4
  // src/builder/live/definition-canvas.ts
5
5
  function isRecord(value) {
@@ -1,22 +1,11 @@
1
1
  "use client";
2
- import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
3
2
  import { t as cn } from "./cn-QqidFIgr.js";
4
- import { forwardRef } from "react";
3
+ import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
4
+ import "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { XIcon } from "lucide-react";
7
7
  import * as DialogPrimitive from "@radix-ui/react-dialog";
8
8
 
9
- // src/ui/input.tsx
10
- const Input = forwardRef(({ className, type, ...props }, ref) => {
11
- return /* @__PURE__ */ jsx("input", {
12
- type,
13
- className: cn("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className),
14
- ref,
15
- ...props
16
- });
17
- });
18
- Input.displayName = "Input";
19
-
20
9
  // src/ui/dialog.tsx
21
10
  function Dialog({ ...props }) {
22
11
  return /* @__PURE__ */ jsx(DialogPrimitive.Root, {
@@ -102,4 +91,4 @@ function DialogDescription({ className, ...props }) {
102
91
  });
103
92
  }
104
93
 
105
- export { DialogFooter as a, DialogPortal as c, Input as d, DialogDescription as i, DialogTitle as l, DialogClose as n, DialogHeader as o, DialogContent as r, DialogOverlay as s, Dialog as t, DialogTrigger as u };
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 };