@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.
- package/dist/{AiStudioPage-D3MAk-bs.js → AiStudioPage-5KYZ8r8-.js} +464 -7
- package/dist/{ApprovalInboxPage-Bb8H9ruw.js → ApprovalInboxPage-BsJX4osU.js} +4 -3
- package/dist/{ConnectionFormDialog-Bg9_OdHX.js → ConnectionFormDialog-Dr1-CTan.js} +2 -1
- package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
- package/dist/{DataSinkDashboardPage-Dc2QuJbL.js → DataSinkDashboardPage-8ZDn85e2.js} +1 -1
- package/dist/{DataTablesPage-Cv4veaKK.js → DataTablesPage-BBvABuxE.js} +5 -4
- package/dist/{EntityTagPicker-D8ws706D.js → EntityTagPicker-BppBSEJk.js} +2 -2
- package/dist/{ExecutionDetailPage-CTVGE-d-.js → ExecutionDetailPage-BXDF2eoT.js} +1444 -18
- package/dist/ExecutionsListDocument-CzdLPpj5.js +1259 -0
- package/dist/{ExecutionsListPage-J0sJPuoM.js → ExecutionsListPage--4BthM8L.js} +285 -11
- package/dist/FailureTriagePanel-B5WCSRFo.js +1252 -0
- package/dist/{FluidGridsProvider-C4FVNz0n.js → FluidGridsProvider-Dc_Jhtch.js} +8666 -8734
- package/dist/{HistoryPage-B9XcTPrO.js → HistoryPage-BvFk2m1m.js} +4 -3
- package/dist/{InsightsPage-DFOltjyj.js → InsightsPage-Dwmb02F6.js} +2682 -5
- package/dist/{MissingNodesInstallModal-D8H-YNCJ.js → MissingNodesInstallModal-Cze674hp.js} +2 -2
- package/dist/{NodesPage-YQ-hP60x.js → NodesPage-C5Dq-ru-.js} +3 -2
- package/dist/{OpenTemplateAsCodeButton-hH26HQCk.js → OpenTemplateAsCodeButton-8MZHih6I.js} +2 -2
- package/dist/{PaidTemplateConfirm-DoKWMBtR.js → PaidTemplateConfirm-0G-gv29n.js} +1 -1
- package/dist/{PublishCustomNodeAction-5XXnSA3H.js → PublishCustomNodeAction-OOY35dUv.js} +1 -1
- package/dist/QuotaExhaustedDialog-wvu_-WJ-.js +55 -0
- package/dist/{RunnerStatusPill-Ctg4TJcP.js → RunnerStatusPill-Bh7mEsPh.js} +2 -1
- package/dist/{RunnersPage-CAt4YDhB.js → RunnersPage-DHeuUDil.js} +2 -2
- package/dist/{SettingsPage-DEKPCVVP.js → SettingsPage-CfjXiGpb.js} +694 -14
- package/dist/{TagFilterSelect-CwM2-DU6.js → TagFilterSelect-CAShgvbS.js} +1 -1
- package/dist/{TaskQueuesPage-Dhi6SIT4.js → TaskQueuesPage--Mmn36b-.js} +3 -3
- package/dist/{TemplateCard-DVSd_4zJ.js → TemplateCard-BA_9em22.js} +644 -352
- package/dist/{TemplateConfigurationModal-BKi1z7z7.js → TemplateConfigurationModal-BT3PaR0O.js} +4 -3
- package/dist/{TemplateDetailPanel-DK1gF7P5.js → TemplateDetailPanel-BxFNnlXm.js} +2 -1
- package/dist/{TemplatePreview-DuSX2Q7H.js → TemplatePreview-Bagja6WN.js} +7 -7
- package/dist/{TemplatesPage-CAWHh61l.js → TemplatesPage-CAajpJ5w.js} +711 -6
- package/dist/{VariablesPage-D7CoatWf.js → VariablesPage-CgUBKhAe.js} +3 -3
- package/dist/{VersionDiffDialog-DGwysiyE.js → VersionDiffDialog-D9W5Fm56.js} +233 -129
- package/dist/VersionLifecycleBar-DuphLOT0.js +131 -0
- package/dist/{WorkflowBuilder-DAeoQi5E.js → WorkflowBuilder-DMpSPElu.js} +16 -13
- package/dist/{WorkflowBuilder-BJgqDboZ.js → WorkflowBuilder-v8h8skwG.js} +5 -5
- package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
- package/dist/WorkflowEditLeaseStatusDocument-Dp62med3.js +627 -0
- package/dist/WorkflowProposalCard-zCdUpCk8.js +249 -0
- package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
- package/dist/{WorkflowSearchRedirect-CMEvd_AR.js → WorkflowSearchRedirect-G78lINAE.js} +1 -1
- package/dist/{WorkflowShareDialog-BgHRsDP0.js → WorkflowShareDialog-B7VOgr4-.js} +304 -3
- package/dist/WorkflowVersionsDocument-CfPMloRW.js +3195 -0
- package/dist/{WorkflowsList-CcQPxWKL.js → WorkflowsList-CPYzfE4K.js} +11 -9
- package/dist/agent-form-D0uLvzx4.js +718 -0
- package/dist/{agentTools-DKpNKztf.js → agentTools-DTXUqtfu.js} +4 -4
- package/dist/api-BZVyX5d2.js +2286 -0
- package/dist/api-BqA-f-AD.js +8064 -0
- package/dist/app-BJUvugPM.js +3813 -0
- package/dist/assert-rules-CPNrO44K.js +318 -0
- package/dist/attach-node-helpers-CNsYtLOR.js +32 -0
- package/dist/badge-CXfPhoMH.js +26 -0
- package/dist/{canvasNoteTools-C_AN79m0.js → canvasNoteTools-DmfZwtnL.js} +3 -3
- package/dist/{channel-CZ70oI81.js → channel-DtF1n_ab.js} +1 -1
- package/dist/client-Ctl4jmY3.js +127 -0
- package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
- package/dist/{code-editor-field-Dt6KNWwN.js → code-editor-field-Cv907s3W.js} +2 -2
- package/dist/{codec-client-CJ95Rmqo.js → codec-client-CAYl6j46.js} +2 -1
- package/dist/conditionBuilder-D8aLGL1w.js +1134 -0
- package/dist/config-X97zrIvn.js +600 -0
- package/dist/{definition-canvas-Bshn_dSP.js → definition-canvas-DL25_6NH.js} +1 -1
- package/dist/{dialog-Cjb4lB4D.js → dialog-BVd152GS.js} +3 -14
- package/dist/durable-nodes-DXCCQYWD.js +81 -0
- package/dist/errors-xPZ-IbQd.js +142 -0
- package/dist/executions.js +2 -2
- package/dist/{flow-builder-D3Hl2AFk.js → flow-builder-Dv5fWJ6F.js} +9301 -8189
- package/dist/{node-registry-refresh-Dy0uRg9f.js → global-client-DP_Wxe5t.js} +2 -27
- package/dist/global-operations-7pvXw_j9.js +145 -0
- package/dist/history.js +1 -1
- package/dist/{index-CWcP-tG1.d.ts → index-DtMUtXNq.d.ts} +247 -247
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4403 -46
- package/dist/input-ChT6Q-Pr.js +17 -0
- package/dist/logs-panel-DtG93ocy.js +342 -0
- package/dist/mapping-colors-BIX_YeCQ.js +48 -0
- package/dist/{node-detail-view-bVLeYarT.js → node-detail-view-BKI_2kM6.js} +12 -11
- package/dist/{node-editor-tab-body-JHHVtQgR.js → node-editor-tab-body-Cc1MWEFR.js} +3 -3
- package/dist/{node-operation-selection-DAbS6jSY.js → node-operation-selection-Czeeb2D4.js} +2 -139
- package/dist/node-registry-refresh-s3okf83X.js +27 -0
- package/dist/nodes.js +1 -1
- package/dist/notesKey-5EaREBGA.js +12 -0
- package/dist/observability.d.ts +1 -1
- package/dist/observability.js +2 -2
- package/dist/{popover-Xx3gN7vg.js → popover-DDv7J1Kl.js} +717 -6
- package/dist/{quick-config-panel-BvVQXuIL.js → quick-config-panel-BPCRfqWI.js} +4 -4
- package/dist/read-only-context-Dt9N9SIG.js +18 -0
- package/dist/{schedule-panel-DCb40TPN.js → schedule-panel-C1KwfLCE.js} +14 -12
- package/dist/settings.js +1 -1
- package/dist/{shared-CMfn30xT.js → shared-Ctl9ZHo1.js} +2 -1
- package/dist/{sidebar-node-editor-DxCWFZG2.js → sidebar-node-editor-d9Rlq5pU.js} +4 -4
- package/dist/sticky-notes-23j-wL6Q.js +96 -0
- package/dist/template-code-dqRunGOv.js +184 -0
- package/dist/template-preview-C01KV277.js +29 -0
- package/dist/templates.js +2 -2
- package/dist/token-refresh-link-BjN7H4qA.js +291 -0
- package/dist/useAgentDefinitions-ZKX2N9aP.js +3101 -0
- package/dist/useConnections-BlB0gbOB.js +931 -0
- package/dist/useDurableParity-BgLH_SCF.js +2088 -0
- package/dist/{useEntityTags-Db4Pc8_M.js → useEntityTags-4iW6UTly.js} +227 -3
- package/dist/{useExecutions-DOpG1pUQ.js → useExecutions-Bm7q_UwN.js} +6 -3
- package/dist/useGlobalStoreClient-DMTrywdX.js +24 -0
- package/dist/{useHumanRequests-ZiR0sSzS.js → useHumanRequests-DwG2tQ3f.js} +2 -1
- package/dist/{useObservability-rQmwhoZZ.js → useObservability-DPATdbw7.js} +4 -2
- package/dist/{useRunHistory-COn6dl7l.js → useRunHistory-CGfjCsJ3.js} +1122 -4
- package/dist/{useVariables-2ddyJX4a.js → useVariables-DFdZofLQ.js} +2 -1
- package/dist/{useWorkflowCodeExport-ZoUJKRSK.js → useWorkflowCodeExport-D_mCuhKP.js} +289 -4
- package/dist/useWorkflowOrganization-r5FWNBs6.js +1690 -0
- package/dist/useWorkflowProposal-Bh2_qjmM.js +7478 -0
- package/dist/{useWorkflows-jOW60YmD.js → useWorkflows-aqVD7kGa.js} +694 -4
- package/dist/workflow-builder.js +5 -5
- package/dist/{workflow-code-transfer-l9wO34S0.js → workflow-code-transfer-5C0HUzae.js} +1 -53
- package/dist/workflow-host.js +4 -2
- package/dist/workflow-pages.d.ts +1 -1
- package/dist/workflow-pages.js +19 -19
- package/dist/workflow-preview.js +3 -2
- package/dist/workflows-list.js +1 -1
- package/package.json +1 -1
- package/dist/FailureTriagePanel-BbYFYeV_.js +0 -311
- package/dist/WorkflowProposalCard-DGMdZC4R.js +0 -1432
- package/dist/agent-form-Bfvm32j1.js +0 -83
- package/dist/api-DQtHXbIg.js +0 -224
- package/dist/api-MeAm6g7E.js +0 -55
- package/dist/client-C9XSzSXr.js +0 -1147
- package/dist/graphql-operation-types-C9qbvRa8.js +0 -53122
- package/dist/useAgentDefinitions-_hgNCK1A.js +0 -550
- package/dist/useConnections-Cs7LCWEM.js +0 -401
- package/dist/useDurableParity-CcLeCDfv.js +0 -504
- 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,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 {
|
|
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,
|
|
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 };
|