@burdenoff/fluidgrids-fe-sdk 2026.1111.21 → 2026.1111.23

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 (64) hide show
  1. package/README.md +13 -0
  2. package/dist/{AiStudioPage-CJdzRL26.js → AiStudioPage-CLrMe8v8.js} +5 -5
  3. package/dist/{ApprovalInboxPage-dbBDSJ-f.js → ApprovalInboxPage-D8vhnloO.js} +1 -1
  4. package/dist/{DataSinkDashboardPage-hrwQSvks.js → DataSinkDashboardPage-DDvNPS8Z.js} +1 -1
  5. package/dist/{DataTablesPage-BZy2z0LB.js → DataTablesPage-BpnF13UT.js} +9 -1
  6. package/dist/{ExecutionDetailPage-DKp421Fj.js → ExecutionDetailPage-DmICvIpH.js} +12 -7
  7. package/dist/{ExecutionsListPage-DwJQfDPt.js → ExecutionsListPage-D63aCXJH.js} +4 -4
  8. package/dist/{FluidGridsProvider-CbY91ZQq.js → FluidGridsProvider-CWyQ8ziM.js} +2 -1
  9. package/dist/{HistoryPage-BLXZJDoJ.js → HistoryPage-CNXgUMb0.js} +1 -1
  10. package/dist/{HumanRequestCard-D-ooVPDn.js → HumanRequestCard-mOhr-Ic9.js} +239 -31
  11. package/dist/{InsightsPage-ChnoW5U4.js → InsightsPage-Duo83yAM.js} +1 -1
  12. package/dist/{MissingNodesInstallModal-mYFfy9Gg.js → MissingNodesInstallModal-Q3RYBvS8.js} +1 -1
  13. package/dist/{QuotaExhaustedDialog-DWm_YWL7.js → QuotaExhaustedDialog-ChBoJnRo.js} +3 -2
  14. package/dist/{SettingsPage-CXoKX0px.js → SettingsPage-DI_vIG7t.js} +2 -2
  15. package/dist/{TemplateCard-HIMsb47R.js → TemplateCard-6W2q2wiK.js} +4 -3
  16. package/dist/{TemplateConfigurationModal-BNtbJ2fv.js → TemplateConfigurationModal-qNQGP7cm.js} +1 -1
  17. package/dist/{TemplateDetailPanel-C6Zh2WRF.js → TemplateDetailPanel-CQvYqhVO.js} +1 -1
  18. package/dist/{TemplatePreview-_wUMSwh_.js → TemplatePreview-Bb2f4enx.js} +4 -4
  19. package/dist/{TemplatesPage-DBfL-ao9.js → TemplatesPage-Bvg6R2P9.js} +6 -5
  20. package/dist/{WorkflowBuilder-CMZi6wQE.js → WorkflowBuilder-CabLzwS5.js} +8 -8
  21. package/dist/{WorkflowBuilder-CYmpQtIQ.js → WorkflowBuilder-TgKSGNlu.js} +3 -3
  22. package/dist/{WorkflowSearchRedirect-iWzvY9Qo.js → WorkflowSearchRedirect-33Vs4FKc.js} +1 -1
  23. package/dist/{WorkflowsList-C8aoqtRE.js → WorkflowsList-C3bHLpSv.js} +147 -22
  24. package/dist/agent-tools.js +1 -1
  25. package/dist/{agentTools-CrEWQ5st.js → agentTools-BU5crBtm.js} +3 -3
  26. package/dist/{canvasNoteTools-6BQYNCee.js → canvasNoteTools-DeSl4BAF.js} +2 -2
  27. package/dist/{code-editor-field-CoRq10k7.js → code-editor-field-CfP0QYUD.js} +1 -1
  28. package/dist/executions.js +2 -2
  29. package/dist/{flow-builder-Dwev-C_g.js → flow-builder-xokwiaT1.js} +16 -73
  30. package/dist/fluidgridsEvents-Dm5CaHtr.js +162 -0
  31. package/dist/history.js +1 -1
  32. package/dist/{index-6JR2vD9J.d.ts → index-D507rsk2.d.ts} +19 -19
  33. package/dist/index.d.ts +3 -2
  34. package/dist/index.js +31 -29
  35. package/dist/{node-detail-view-BFBSKj5w.js → node-detail-view-DGrDIjS-.js} +5 -5
  36. package/dist/{node-editor-tab-body-Cz9kOlxu.js → node-editor-tab-body-eOsmnUvx.js} +2 -2
  37. package/dist/observability.d.ts +1 -1
  38. package/dist/observability.js +2 -2
  39. package/dist/{popover-xPh0iIzy.js → popover-B1aKz7DC.js} +1 -1
  40. package/dist/{quick-config-panel-Ym05lyGn.js → quick-config-panel-Bc7isfv0.js} +3 -3
  41. package/dist/quota-Cdt8yz7N.js +152 -0
  42. package/dist/quota.d.ts +3 -0
  43. package/dist/quota.js +4 -0
  44. package/dist/runsQuota-DsniKiSg.d.ts +20 -0
  45. package/dist/runsQuota-DvXR6mRN.js +100 -0
  46. package/dist/{schedule-panel-54D5W5Qk.js → schedule-panel-BnqaUnnz.js} +153 -7
  47. package/dist/settings.js +1 -1
  48. package/dist/{sidebar-node-editor-LL3ofDN7.js → sidebar-node-editor-CdlEDGKh.js} +3 -3
  49. package/dist/templates.js +2 -2
  50. package/dist/{uiMarkTools-nlmzsHQM.js → uiMarkTools-DZ6akjQK.js} +1 -1
  51. package/dist/useActionParam-B0ebTZmg.js +83 -0
  52. package/dist/{useDurableParity-BScby67i.js → useDurableParity-BApRraSO.js} +1 -1
  53. package/dist/{useExecutions-B0VzQcY2.js → useExecutions-C2a4EcvC.js} +2 -2
  54. package/dist/{useObservability-FfQGgW6W.js → useObservability-BmbeK5bG.js} +2 -2
  55. package/dist/{useRunHistory-BZJg72kd.js → useRunHistory-CqfDFRzr.js} +1 -1
  56. package/dist/{useWorkflowCodeExport-CUWMlJbi.js → useWorkflowCodeExport-DebpM48M.js} +1 -1
  57. package/dist/{useWorkflows-Czz5DlL0.js → useWorkflows-D1-rYzGK.js} +2 -2
  58. package/dist/workflow-builder.js +4 -4
  59. package/dist/workflow-pages.d.ts +1 -1
  60. package/dist/workflow-pages.js +15 -15
  61. package/dist/workflows-list.d.ts +6 -0
  62. package/dist/workflows-list.js +3 -2
  63. package/package.json +5 -1
  64. package/dist/fluidgridsEvents-CNdcrUNN.js +0 -310
@@ -0,0 +1,162 @@
1
+ "use client";
2
+ import { i as WORKFLOWS_QUOTA_NAME, r as RUNS_QUOTA_NAME } from "./quota-Cdt8yz7N.js";
3
+
4
+ // src/analytics/fluidgridsEvents.ts
5
+ /** `component` stamped on every event so devtools/OTel can tell the emitter. */
6
+ const FLUIDGRIDS_ANALYTICS_COMPONENT = "fluidgrids-fe-sdk";
7
+ /** Upper bound for a slug-like dimension; anything longer is not a slug. */
8
+ const MAX_DIMENSION_LENGTH = 64;
9
+ const SLUG_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_./:-]*$/;
10
+ /**
11
+ * Keep a dimension only when it is a short slug (`integration/slack`,
12
+ * `trigger_webhook`, `marketing`). Anything else — spaces, free text, a very
13
+ * long value — is dropped rather than risk sending user data.
14
+ */
15
+ function toDimension(value) {
16
+ if (typeof value !== "string") return void 0;
17
+ const trimmed = value.trim();
18
+ if (!trimmed || trimmed.length > MAX_DIMENSION_LENGTH) return void 0;
19
+ return SLUG_PATTERN.test(trimmed) ? trimmed : void 0;
20
+ }
21
+ /** Non-empty string id, or undefined. */
22
+ function idOrUndefined(value) {
23
+ return typeof value === "string" && value.length > 0 ? value : void 0;
24
+ }
25
+ /** A finite, non-negative integer count, or undefined. */
26
+ function countOrUndefined(value) {
27
+ return typeof value === "number" && Number.isFinite(value) && value >= 0 ? Math.round(value) : void 0;
28
+ }
29
+ function emit(bus, name, payload) {
30
+ if (!bus) return;
31
+ const clean = Object.fromEntries(Object.entries(payload).filter(([, value]) => value !== void 0));
32
+ try {
33
+ bus.emit(name, clean, { component: FLUIDGRIDS_ANALYTICS_COMPONENT });
34
+ } catch (error) {
35
+ console.warn(`[fluidgrids analytics] failed to emit ${name}`, error);
36
+ }
37
+ }
38
+ function asRecord(value) {
39
+ return typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
40
+ }
41
+ /**
42
+ * The executable node list of a workflow definition, wherever it sits: the
43
+ * flow store's `{ nodes }`, a saved `definitionJson` (`{ data: { nodes } }`) or
44
+ * a raw list.
45
+ */
46
+ function nodesOf(definition) {
47
+ if (Array.isArray(definition)) return definition;
48
+ const record = asRecord(definition);
49
+ if (!record) return [];
50
+ if (Array.isArray(record.nodes)) return record.nodes;
51
+ const data = asRecord(record.data);
52
+ if (data && Array.isArray(data.nodes)) return data.nodes;
53
+ return [];
54
+ }
55
+ function isTriggerNode(node) {
56
+ if ((typeof node.type === "string" ? node.type.toLowerCase() : "").includes("trigger")) return true;
57
+ const data = asRecord(node.data);
58
+ return data?.isTrigger === true || data?.category === "trigger";
59
+ }
60
+ /** Node-type slug of the workflow's trigger node, when it has one. */
61
+ function triggerTypeOf(definition) {
62
+ const trigger = nodesOf(definition).find(isTriggerNode);
63
+ return trigger ? toDimension(trigger.type) : void 0;
64
+ }
65
+ /** Number of executable nodes on the canvas. */
66
+ function nodeCountOf(definition) {
67
+ const nodes = nodesOf(definition);
68
+ return nodes.length > 0 ? nodes.length : void 0;
69
+ }
70
+ /** `fluidgrids.workflow.created` — a new workflow exists in the workspace. */
71
+ function emitWorkflowCreated(bus, fact) {
72
+ emit(bus, "fluidgrids.workflow.created", {
73
+ workspaceId: idOrUndefined(fact.workspaceId),
74
+ workflowId: idOrUndefined(fact.workflowId),
75
+ source: fact.source,
76
+ triggerType: triggerTypeOf(fact.definition),
77
+ nodeCount: nodeCountOf(fact.definition)
78
+ });
79
+ }
80
+ /** `fluidgrids.workflow.published` — a version was activated. */
81
+ function emitWorkflowPublished(bus, fact) {
82
+ emit(bus, "fluidgrids.workflow.published", {
83
+ workspaceId: idOrUndefined(fact.workspaceId),
84
+ workflowId: idOrUndefined(fact.workflowId),
85
+ triggerType: triggerTypeOf(fact.definition),
86
+ nodeCount: nodeCountOf(fact.definition)
87
+ });
88
+ }
89
+ /** `fluidgrids.workflow.run_started` — the backend accepted a run. */
90
+ function emitRunStarted(bus, fact) {
91
+ emit(bus, "fluidgrids.workflow.run_started", {
92
+ workspaceId: idOrUndefined(fact.workspaceId),
93
+ workflowId: idOrUndefined(fact.workflowId),
94
+ executionId: idOrUndefined(fact.executionId),
95
+ trigger: fact.trigger
96
+ });
97
+ }
98
+ /**
99
+ * `fluidgrids.workflow.run_failed` — a run this user started ended FAILED.
100
+ * `errorCode` is the run's machine error classification (`TIMEOUT`,
101
+ * `VALIDATION`, …), never its message.
102
+ */
103
+ function emitRunFailed(bus, fact) {
104
+ emit(bus, "fluidgrids.workflow.run_failed", {
105
+ workspaceId: idOrUndefined(fact.workspaceId),
106
+ workflowId: idOrUndefined(fact.workflowId),
107
+ executionId: idOrUndefined(fact.executionId),
108
+ trigger: fact.trigger,
109
+ errorCode: toDimension(fact.errorCode),
110
+ durationMs: countOrUndefined(fact.durationMs)
111
+ });
112
+ }
113
+ /** `fluidgrids.template.used` — a store template became a workflow. */
114
+ function emitTemplateUsed(bus, fact) {
115
+ emit(bus, "fluidgrids.template.used", {
116
+ workspaceId: idOrUndefined(fact.workspaceId),
117
+ templateId: idOrUndefined(fact.templateId),
118
+ category: toDimension(fact.category)
119
+ });
120
+ }
121
+ /** `fluidgrids.node.installed` — a store node was installed. */
122
+ function emitNodeInstalled(bus, fact) {
123
+ emit(bus, "fluidgrids.node.installed", {
124
+ workspaceId: idOrUndefined(fact.workspaceId),
125
+ nodeType: toDimension(fact.nodeType),
126
+ source: fact.source
127
+ });
128
+ }
129
+ /** `fluidgrids.quota.workflow_limit_hit` — a create was refused at the limit. */
130
+ function emitWorkflowLimitHit(bus, fact) {
131
+ emit(bus, "fluidgrids.quota.workflow_limit_hit", {
132
+ workspaceId: idOrUndefined(fact.workspaceId),
133
+ quotaKey: WORKFLOWS_QUOTA_NAME,
134
+ surface: fact.surface
135
+ });
136
+ }
137
+ /** `fluidgrids.quota.run_limit_hit` — a run was refused at the monthly limit. */
138
+ function emitRunLimitHit(bus, fact) {
139
+ emit(bus, "fluidgrids.quota.run_limit_hit", {
140
+ workspaceId: idOrUndefined(fact.workspaceId),
141
+ quotaKey: toDimension(fact.quotaKey) ?? "fluidgrids.runs.monthly",
142
+ surface: fact.surface
143
+ });
144
+ }
145
+ /** `fluidgrids.billing.upgrade_clicked` — a FluidGrids upgrade CTA was clicked. */
146
+ function emitUpgradeClicked(bus, fact) {
147
+ emit(bus, "fluidgrids.billing.upgrade_clicked", {
148
+ workspaceId: idOrUndefined(fact.workspaceId),
149
+ surface: fact.surface,
150
+ quotaKey: toDimension(fact.quotaKey)
151
+ });
152
+ }
153
+ /**
154
+ * Map a run's backend mode/trigger to the analytics trigger dimension. The
155
+ * builder's debug paths are always `TEST`; anything else a person started by
156
+ * hand is `manual`.
157
+ */
158
+ function runTriggerFromMode(mode) {
159
+ return typeof mode === "string" && mode.toUpperCase() === "TEST" ? "test" : "manual";
160
+ }
161
+
162
+ export { emitTemplateUsed as a, emitWorkflowLimitHit as c, runTriggerFromMode as d, emitRunStarted as i, emitWorkflowPublished as l, emitRunFailed as n, emitUpgradeClicked as o, emitRunLimitHit as r, emitWorkflowCreated as s, emitNodeInstalled as t, nodesOf as u };
package/dist/history.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use client";
2
- import { t as HistoryPage } from "./HistoryPage-BLXZJDoJ.js";
2
+ import { t as HistoryPage } from "./HistoryPage-CNXgUMb0.js";
3
3
 
4
4
  export { HistoryPage };