@umodeapporg/ui 0.23.0 → 0.23.1

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 (65) hide show
  1. package/dist/assets/umode-ui.css +0 -105
  2. package/dist/components/Form/ControlledSelect.js +5 -3
  3. package/dist/components/Form/ControlledSelect.js.map +1 -1
  4. package/dist/locales/en/ui.json.d.ts +0 -67
  5. package/dist/locales/en/ui.json.js +0 -3
  6. package/dist/locales/en/ui.json.js.map +1 -1
  7. package/dist/locales/index.d.ts +0 -134
  8. package/dist/locales/pt/ui.json.d.ts +0 -67
  9. package/dist/locales/pt/ui.json.js +0 -3
  10. package/dist/locales/pt/ui.json.js.map +1 -1
  11. package/package.json +1 -10
  12. package/dist/components/UI/Flow/FlowBlockNode.d.ts +0 -35
  13. package/dist/components/UI/Flow/FlowBlockNode.js +0 -84
  14. package/dist/components/UI/Flow/FlowBlockNode.js.map +0 -1
  15. package/dist/components/UI/Flow/FlowCanvas.d.ts +0 -22
  16. package/dist/components/UI/Flow/FlowCanvas.js +0 -263
  17. package/dist/components/UI/Flow/FlowCanvas.js.map +0 -1
  18. package/dist/components/UI/Flow/FlowConnectionEdge.d.ts +0 -10
  19. package/dist/components/UI/Flow/FlowConnectionEdge.js +0 -54
  20. package/dist/components/UI/Flow/FlowConnectionEdge.js.map +0 -1
  21. package/dist/components/UI/Flow/FlowEditorProvider.d.ts +0 -17
  22. package/dist/components/UI/Flow/FlowEditorProvider.js +0 -27
  23. package/dist/components/UI/Flow/FlowEditorProvider.js.map +0 -1
  24. package/dist/components/UI/Flow/FlowInspector.d.ts +0 -11
  25. package/dist/components/UI/Flow/FlowInspector.js +0 -124
  26. package/dist/components/UI/Flow/FlowInspector.js.map +0 -1
  27. package/dist/components/UI/Flow/FlowIssueList.d.ts +0 -8
  28. package/dist/components/UI/Flow/FlowIssueList.js +0 -55
  29. package/dist/components/UI/Flow/FlowIssueList.js.map +0 -1
  30. package/dist/components/UI/Flow/FlowLaneMap.d.ts +0 -30
  31. package/dist/components/UI/Flow/FlowLaneMap.js +0 -206
  32. package/dist/components/UI/Flow/FlowLaneMap.js.map +0 -1
  33. package/dist/components/UI/Flow/FlowNodeShell.d.ts +0 -20
  34. package/dist/components/UI/Flow/FlowNodeShell.js +0 -81
  35. package/dist/components/UI/Flow/FlowNodeShell.js.map +0 -1
  36. package/dist/components/UI/Flow/FlowPalette.d.ts +0 -7
  37. package/dist/components/UI/Flow/FlowPalette.js +0 -90
  38. package/dist/components/UI/Flow/FlowPalette.js.map +0 -1
  39. package/dist/components/UI/Flow/FlowResizablePanel.d.ts +0 -20
  40. package/dist/components/UI/Flow/FlowResizablePanel.js +0 -117
  41. package/dist/components/UI/Flow/FlowResizablePanel.js.map +0 -1
  42. package/dist/components/UI/Flow/FlowZoomControls.d.ts +0 -12
  43. package/dist/components/UI/Flow/FlowZoomControls.js +0 -53
  44. package/dist/components/UI/Flow/FlowZoomControls.js.map +0 -1
  45. package/dist/components/UI/Flow/flowBlockRegistry.d.ts +0 -12
  46. package/dist/components/UI/Flow/flowBlockRegistry.js +0 -15
  47. package/dist/components/UI/Flow/flowBlockRegistry.js.map +0 -1
  48. package/dist/components/UI/Flow/flowConstants.d.ts +0 -2
  49. package/dist/components/UI/Flow/flowConstants.js +0 -5
  50. package/dist/components/UI/Flow/flowConstants.js.map +0 -1
  51. package/dist/components/UI/Flow/flowEditorStore.d.ts +0 -44
  52. package/dist/components/UI/Flow/flowEditorStore.js +0 -258
  53. package/dist/components/UI/Flow/flowEditorStore.js.map +0 -1
  54. package/dist/components/UI/Flow/flowGraph.d.ts +0 -32
  55. package/dist/components/UI/Flow/flowGraph.js +0 -156
  56. package/dist/components/UI/Flow/flowGraph.js.map +0 -1
  57. package/dist/components/UI/Flow/flowTypes.d.ts +0 -74
  58. package/dist/components/UI/Flow/flowTypes.js +0 -2
  59. package/dist/components/UI/Flow/flowTypes.js.map +0 -1
  60. package/dist/components/UI/Flow/index.d.ts +0 -14
  61. package/dist/components/UI/Flow/index.js +0 -43
  62. package/dist/components/UI/Flow/index.js.map +0 -1
  63. package/dist/components/UI/Flow/useFlowLabels.d.ts +0 -10
  64. package/dist/components/UI/Flow/useFlowLabels.js +0 -51
  65. package/dist/components/UI/Flow/useFlowLabels.js.map +0 -1
@@ -1,32 +0,0 @@
1
- import { IFlowBlockRegistry } from './flowBlockRegistry';
2
- import { IFlowGraph, IFlowIssue, IFlowNode, IFlowPosition, TFlowPortId } from './flowTypes';
3
- /** The flow reads left to right: one level per column, siblings stacked in the column. */
4
- export declare const FLOW_LEVEL_GAP = 336;
5
- export declare const FLOW_SIBLING_GAP = 176;
6
- export declare const triggerNodesOf: (graph: IFlowGraph, registry: IFlowBlockRegistry) => Array<IFlowNode>;
7
- /** Node ids reachable from `startNodeId` following edges, the start included. */
8
- export declare const reachableFrom: (graph: IFlowGraph, startNodeId: string) => Set<string>;
9
- /** The node ids of the first cycle found, in order, or null when the graph has none. */
10
- export declare const findCycle: (graph: IFlowGraph) => Array<string> | null;
11
- export interface IFlowConnectionCandidate {
12
- source: string;
13
- sourcePort: TFlowPortId;
14
- target: string;
15
- }
16
- /**
17
- * The V0 shape is a tree with no fan-out: one input per block, one edge per output
18
- * port, no edge into a trigger and no cycle. Keeping this rule here lets the canvas
19
- * refuse a bad connection while it is being drawn, not only when publishing.
20
- */
21
- export declare const canConnect: (graph: IFlowGraph, registry: IFlowBlockRegistry, candidate: IFlowConnectionCandidate) => boolean;
22
- /** The structural rules of the V0 shape, plus each block's own `validate`. */
23
- export declare const validateFlowGraph: (graph: IFlowGraph, registry: IFlowBlockRegistry) => Array<IFlowIssue>;
24
- export declare const hasBlockingIssues: (issues: Array<IFlowIssue>) => boolean;
25
- /**
26
- * Lays the tree out by levels from the trigger: each level one column to the right,
27
- * siblings stacked in the column. Used only for a flow with no saved positions (one born from a rule) or when
28
- * the user asks for it; a position the user arranged is data and is never overwritten
29
- * implicitly.
30
- */
31
- export declare const layoutFlowByLevels: (graph: IFlowGraph, registry: IFlowBlockRegistry) => Record<string, IFlowPosition>;
32
- export declare const hasSavedPositions: (graph: IFlowGraph) => boolean;
@@ -1,156 +0,0 @@
1
- const FLOW_LEVEL_GAP = 336;
2
- const FLOW_SIBLING_GAP = 176;
3
- const nodesOf = (graph) => Array.isArray(graph?.nodes) ? graph.nodes : [];
4
- const edgesOf = (graph) => Array.isArray(graph?.edges) ? graph.edges : [];
5
- const outgoingByNode = (graph) => {
6
- const outgoing = /* @__PURE__ */ new Map();
7
- for (const edge of edgesOf(graph)) {
8
- outgoing.set(edge.source, [...outgoing.get(edge.source) ?? [], edge]);
9
- }
10
- return outgoing;
11
- };
12
- const triggerNodesOf = (graph, registry) => nodesOf(graph).filter((node) => registry.get(node.type)?.category === "trigger");
13
- const reachableFrom = (graph, startNodeId) => {
14
- const outgoing = outgoingByNode(graph);
15
- const visited = /* @__PURE__ */ new Set();
16
- const pending = [startNodeId];
17
- while (pending.length > 0) {
18
- const nodeId = pending.pop();
19
- if (nodeId === void 0 || visited.has(nodeId)) continue;
20
- visited.add(nodeId);
21
- for (const edge of outgoing.get(nodeId) ?? []) pending.push(edge.target);
22
- }
23
- return visited;
24
- };
25
- const findCycle = (graph) => {
26
- const outgoing = outgoingByNode(graph);
27
- const state = /* @__PURE__ */ new Map();
28
- const path = [];
29
- const visit = (nodeId) => {
30
- state.set(nodeId, "visiting");
31
- path.push(nodeId);
32
- for (const edge of outgoing.get(nodeId) ?? []) {
33
- const targetState = state.get(edge.target);
34
- if (targetState === "visiting") return path.slice(path.indexOf(edge.target));
35
- if (targetState === void 0) {
36
- const cycle = visit(edge.target);
37
- if (cycle) return cycle;
38
- }
39
- }
40
- path.pop();
41
- state.set(nodeId, "done");
42
- return null;
43
- };
44
- for (const node of nodesOf(graph)) {
45
- if (state.has(node.nodeId)) continue;
46
- const cycle = visit(node.nodeId);
47
- if (cycle) return cycle;
48
- }
49
- return null;
50
- };
51
- const canConnect = (graph, registry, candidate) => {
52
- const { source, sourcePort, target } = candidate;
53
- if (!source || !target || source === target) return false;
54
- const nodes = nodesOf(graph);
55
- const sourceNode = nodes.find((node) => node.nodeId === source);
56
- const targetNode = nodes.find((node) => node.nodeId === target);
57
- if (!sourceNode || !targetNode) return false;
58
- const sourceDefinition = registry.get(sourceNode.type);
59
- const targetDefinition = registry.get(targetNode.type);
60
- if (!sourceDefinition?.outputs.includes(sourcePort)) return false;
61
- if (!targetDefinition || targetDefinition.category === "trigger") return false;
62
- const edges = edgesOf(graph);
63
- if (edges.some((edge) => edge.source === source && edge.sourcePort === sourcePort)) return false;
64
- if (edges.some((edge) => edge.target === target)) return false;
65
- return !reachableFrom(graph, target).has(source);
66
- };
67
- const validateFlowGraph = (graph, registry) => {
68
- const issues = [];
69
- const nodes = nodesOf(graph);
70
- const edges = edgesOf(graph);
71
- for (const node of nodes) {
72
- const definition = registry.get(node.type);
73
- if (!definition) {
74
- issues.push({ code: "unknownBlock", severity: "error", nodeId: node.nodeId });
75
- continue;
76
- }
77
- for (const blockIssue of definition.validate(node.config) ?? []) {
78
- issues.push({ ...blockIssue, nodeId: node.nodeId });
79
- }
80
- }
81
- const triggers = triggerNodesOf(graph, registry);
82
- if (triggers.length === 0) issues.push({ code: "missingTrigger", severity: "error" });
83
- triggers.slice(1).forEach((trigger) => {
84
- issues.push({ code: "multipleTriggers", severity: "error", nodeId: trigger.nodeId });
85
- });
86
- const firstTrigger = triggers[0];
87
- if (firstTrigger) {
88
- const reachable = reachableFrom(graph, firstTrigger.nodeId);
89
- nodes.filter((node) => !reachable.has(node.nodeId) && registry.get(node.type)?.category !== "trigger").forEach((node) => issues.push({ code: "unreachableNode", severity: "error", nodeId: node.nodeId }));
90
- }
91
- const inputCount = /* @__PURE__ */ new Map();
92
- const portCount = /* @__PURE__ */ new Map();
93
- for (const edge of edges) {
94
- inputCount.set(edge.target, (inputCount.get(edge.target) ?? 0) + 1);
95
- const portKey = `${edge.source}|${edge.sourcePort}`;
96
- portCount.set(portKey, (portCount.get(portKey) ?? 0) + 1);
97
- }
98
- inputCount.forEach((count, nodeId) => {
99
- if (count > 1) issues.push({ code: "multipleInputs", severity: "error", nodeId });
100
- });
101
- edges.filter((edge) => (portCount.get(`${edge.source}|${edge.sourcePort}`) ?? 0) > 1).forEach(
102
- (edge) => issues.push({ code: "portFanOut", severity: "error", edgeId: edge.edgeId, nodeId: edge.source })
103
- );
104
- const cycle = findCycle(graph);
105
- if (cycle) cycle.forEach((nodeId) => issues.push({ code: "cycle", severity: "error", nodeId }));
106
- nodes.filter((node) => registry.get(node.type)?.outputs.includes("true")).filter((node) => !edges.some((edge) => edge.source === node.nodeId && edge.sourcePort === "true")).forEach((node) => issues.push({ code: "missingTrueBranch", severity: "warning", nodeId: node.nodeId }));
107
- return issues;
108
- };
109
- const hasBlockingIssues = (issues) => (issues ?? []).some((issue) => issue.severity === "error");
110
- const layoutFlowByLevels = (graph, registry) => {
111
- const nodes = nodesOf(graph);
112
- const outgoing = outgoingByNode(graph);
113
- const levelOf = /* @__PURE__ */ new Map();
114
- const roots = triggerNodesOf(graph, registry);
115
- const queue = roots.map((root) => root.nodeId);
116
- roots.forEach((root) => levelOf.set(root.nodeId, 0));
117
- while (queue.length > 0) {
118
- const nodeId = queue.shift();
119
- if (nodeId === void 0) continue;
120
- const level = levelOf.get(nodeId) ?? 0;
121
- for (const edge of outgoing.get(nodeId) ?? []) {
122
- if (levelOf.has(edge.target)) continue;
123
- levelOf.set(edge.target, level + 1);
124
- queue.push(edge.target);
125
- }
126
- }
127
- const deepestLevel = Math.max(-1, ...Array.from(levelOf.values()));
128
- nodes.filter((node) => !levelOf.has(node.nodeId)).forEach((node) => levelOf.set(node.nodeId, deepestLevel + 1));
129
- const nodesByLevel = /* @__PURE__ */ new Map();
130
- nodes.forEach((node) => {
131
- const level = levelOf.get(node.nodeId) ?? 0;
132
- nodesByLevel.set(level, [...nodesByLevel.get(level) ?? [], node.nodeId]);
133
- });
134
- const positions = {};
135
- nodesByLevel.forEach((nodeIds, level) => {
136
- const columnHeight = (nodeIds.length - 1) * FLOW_SIBLING_GAP;
137
- nodeIds.forEach((nodeId, index) => {
138
- positions[nodeId] = { x: level * FLOW_LEVEL_GAP, y: index * FLOW_SIBLING_GAP - columnHeight / 2 };
139
- });
140
- });
141
- return positions;
142
- };
143
- const hasSavedPositions = (graph) => nodesOf(graph).some((node) => node.position && (node.position.x !== 0 || node.position.y !== 0));
144
- export {
145
- FLOW_LEVEL_GAP,
146
- FLOW_SIBLING_GAP,
147
- canConnect,
148
- findCycle,
149
- hasBlockingIssues,
150
- hasSavedPositions,
151
- layoutFlowByLevels,
152
- reachableFrom,
153
- triggerNodesOf,
154
- validateFlowGraph
155
- };
156
- //# sourceMappingURL=flowGraph.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flowGraph.js","sources":["../../../../src/components/UI/Flow/flowGraph.ts"],"sourcesContent":["import type { IFlowBlockRegistry } from './flowBlockRegistry';\nimport type { IFlowEdge, IFlowGraph, IFlowIssue, IFlowNode, IFlowPosition, TFlowPortId } from './flowTypes';\n\n/** The flow reads left to right: one level per column, siblings stacked in the column. */\nexport const FLOW_LEVEL_GAP = 336;\nexport const FLOW_SIBLING_GAP = 176;\n\nconst nodesOf = (graph: IFlowGraph): Array<IFlowNode> => (Array.isArray(graph?.nodes) ? graph.nodes : []);\nconst edgesOf = (graph: IFlowGraph): Array<IFlowEdge> => (Array.isArray(graph?.edges) ? graph.edges : []);\n\nconst outgoingByNode = (graph: IFlowGraph): Map<string, Array<IFlowEdge>> => {\n const outgoing = new Map<string, Array<IFlowEdge>>();\n for (const edge of edgesOf(graph)) {\n outgoing.set(edge.source, [...(outgoing.get(edge.source) ?? []), edge]);\n }\n return outgoing;\n};\n\nexport const triggerNodesOf = (graph: IFlowGraph, registry: IFlowBlockRegistry): Array<IFlowNode> =>\n nodesOf(graph).filter((node) => registry.get(node.type)?.category === 'trigger');\n\n/** Node ids reachable from `startNodeId` following edges, the start included. */\nexport const reachableFrom = (graph: IFlowGraph, startNodeId: string): Set<string> => {\n const outgoing = outgoingByNode(graph);\n const visited = new Set<string>();\n const pending = [startNodeId];\n while (pending.length > 0) {\n const nodeId = pending.pop();\n if (nodeId === undefined || visited.has(nodeId)) continue;\n visited.add(nodeId);\n for (const edge of outgoing.get(nodeId) ?? []) pending.push(edge.target);\n }\n return visited;\n};\n\n/** The node ids of the first cycle found, in order, or null when the graph has none. */\nexport const findCycle = (graph: IFlowGraph): Array<string> | null => {\n const outgoing = outgoingByNode(graph);\n const state = new Map<string, 'visiting' | 'done'>();\n const path: Array<string> = [];\n\n const visit = (nodeId: string): Array<string> | null => {\n state.set(nodeId, 'visiting');\n path.push(nodeId);\n for (const edge of outgoing.get(nodeId) ?? []) {\n const targetState = state.get(edge.target);\n if (targetState === 'visiting') return path.slice(path.indexOf(edge.target));\n if (targetState === undefined) {\n const cycle = visit(edge.target);\n if (cycle) return cycle;\n }\n }\n path.pop();\n state.set(nodeId, 'done');\n return null;\n };\n\n for (const node of nodesOf(graph)) {\n if (state.has(node.nodeId)) continue;\n const cycle = visit(node.nodeId);\n if (cycle) return cycle;\n }\n return null;\n};\n\nexport interface IFlowConnectionCandidate {\n source: string;\n sourcePort: TFlowPortId;\n target: string;\n}\n\n/**\n * The V0 shape is a tree with no fan-out: one input per block, one edge per output\n * port, no edge into a trigger and no cycle. Keeping this rule here lets the canvas\n * refuse a bad connection while it is being drawn, not only when publishing.\n */\nexport const canConnect = (\n graph: IFlowGraph,\n registry: IFlowBlockRegistry,\n candidate: IFlowConnectionCandidate,\n): boolean => {\n const { source, sourcePort, target } = candidate;\n if (!source || !target || source === target) return false;\n\n const nodes = nodesOf(graph);\n const sourceNode = nodes.find((node) => node.nodeId === source);\n const targetNode = nodes.find((node) => node.nodeId === target);\n if (!sourceNode || !targetNode) return false;\n\n const sourceDefinition = registry.get(sourceNode.type);\n const targetDefinition = registry.get(targetNode.type);\n if (!sourceDefinition?.outputs.includes(sourcePort)) return false;\n if (!targetDefinition || targetDefinition.category === 'trigger') return false;\n\n const edges = edgesOf(graph);\n if (edges.some((edge) => edge.source === source && edge.sourcePort === sourcePort)) return false;\n if (edges.some((edge) => edge.target === target)) return false;\n\n return !reachableFrom(graph, target).has(source);\n};\n\n/** The structural rules of the V0 shape, plus each block's own `validate`. */\nexport const validateFlowGraph = (graph: IFlowGraph, registry: IFlowBlockRegistry): Array<IFlowIssue> => {\n const issues: Array<IFlowIssue> = [];\n const nodes = nodesOf(graph);\n const edges = edgesOf(graph);\n\n for (const node of nodes) {\n const definition = registry.get(node.type);\n if (!definition) {\n issues.push({ code: 'unknownBlock', severity: 'error', nodeId: node.nodeId });\n continue;\n }\n for (const blockIssue of definition.validate(node.config) ?? []) {\n issues.push({ ...blockIssue, nodeId: node.nodeId });\n }\n }\n\n const triggers = triggerNodesOf(graph, registry);\n if (triggers.length === 0) issues.push({ code: 'missingTrigger', severity: 'error' });\n triggers.slice(1).forEach((trigger) => {\n issues.push({ code: 'multipleTriggers', severity: 'error', nodeId: trigger.nodeId });\n });\n\n const firstTrigger = triggers[0];\n if (firstTrigger) {\n const reachable = reachableFrom(graph, firstTrigger.nodeId);\n nodes\n .filter((node) => !reachable.has(node.nodeId) && registry.get(node.type)?.category !== 'trigger')\n .forEach((node) => issues.push({ code: 'unreachableNode', severity: 'error', nodeId: node.nodeId }));\n }\n\n const inputCount = new Map<string, number>();\n const portCount = new Map<string, number>();\n for (const edge of edges) {\n inputCount.set(edge.target, (inputCount.get(edge.target) ?? 0) + 1);\n const portKey = `${edge.source}|${edge.sourcePort}`;\n portCount.set(portKey, (portCount.get(portKey) ?? 0) + 1);\n }\n inputCount.forEach((count, nodeId) => {\n if (count > 1) issues.push({ code: 'multipleInputs', severity: 'error', nodeId });\n });\n edges\n .filter((edge) => (portCount.get(`${edge.source}|${edge.sourcePort}`) ?? 0) > 1)\n .forEach((edge) =>\n issues.push({ code: 'portFanOut', severity: 'error', edgeId: edge.edgeId, nodeId: edge.source }),\n );\n\n const cycle = findCycle(graph);\n if (cycle) cycle.forEach((nodeId) => issues.push({ code: 'cycle', severity: 'error', nodeId }));\n\n nodes\n .filter((node) => registry.get(node.type)?.outputs.includes('true'))\n .filter((node) => !edges.some((edge) => edge.source === node.nodeId && edge.sourcePort === 'true'))\n .forEach((node) => issues.push({ code: 'missingTrueBranch', severity: 'warning', nodeId: node.nodeId }));\n\n return issues;\n};\n\nexport const hasBlockingIssues = (issues: Array<IFlowIssue>): boolean =>\n (issues ?? []).some((issue) => issue.severity === 'error');\n\n/**\n * Lays the tree out by levels from the trigger: each level one column to the right,\n * siblings stacked in the column. Used only for a flow with no saved positions (one born from a rule) or when\n * the user asks for it; a position the user arranged is data and is never overwritten\n * implicitly.\n */\nexport const layoutFlowByLevels = (graph: IFlowGraph, registry: IFlowBlockRegistry): Record<string, IFlowPosition> => {\n const nodes = nodesOf(graph);\n const outgoing = outgoingByNode(graph);\n const levelOf = new Map<string, number>();\n const roots = triggerNodesOf(graph, registry);\n const queue: Array<string> = roots.map((root) => root.nodeId);\n roots.forEach((root) => levelOf.set(root.nodeId, 0));\n\n while (queue.length > 0) {\n const nodeId = queue.shift();\n if (nodeId === undefined) continue;\n const level = levelOf.get(nodeId) ?? 0;\n for (const edge of outgoing.get(nodeId) ?? []) {\n if (levelOf.has(edge.target)) continue;\n levelOf.set(edge.target, level + 1);\n queue.push(edge.target);\n }\n }\n\n const deepestLevel = Math.max(-1, ...Array.from(levelOf.values()));\n nodes.filter((node) => !levelOf.has(node.nodeId)).forEach((node) => levelOf.set(node.nodeId, deepestLevel + 1));\n\n const nodesByLevel = new Map<number, Array<string>>();\n nodes.forEach((node) => {\n const level = levelOf.get(node.nodeId) ?? 0;\n nodesByLevel.set(level, [...(nodesByLevel.get(level) ?? []), node.nodeId]);\n });\n\n const positions: Record<string, IFlowPosition> = {};\n nodesByLevel.forEach((nodeIds, level) => {\n const columnHeight = (nodeIds.length - 1) * FLOW_SIBLING_GAP;\n nodeIds.forEach((nodeId, index) => {\n positions[nodeId] = { x: level * FLOW_LEVEL_GAP, y: index * FLOW_SIBLING_GAP - columnHeight / 2 };\n });\n });\n return positions;\n};\n\nexport const hasSavedPositions = (graph: IFlowGraph): boolean =>\n nodesOf(graph).some((node) => node.position && (node.position.x !== 0 || node.position.y !== 0));\n"],"names":[],"mappings":"AAIO,MAAM,iBAAiB;AACvB,MAAM,mBAAmB;AAEhC,MAAM,UAAU,CAAC,UAAyC,MAAM,QAAQ,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAA;AACtG,MAAM,UAAU,CAAC,UAAyC,MAAM,QAAQ,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAA;AAEtG,MAAM,iBAAiB,CAAC,UAAqD;AAC3E,QAAM,+BAAe,IAAA;AACrB,aAAW,QAAQ,QAAQ,KAAK,GAAG;AACjC,aAAS,IAAI,KAAK,QAAQ,CAAC,GAAI,SAAS,IAAI,KAAK,MAAM,KAAK,CAAA,GAAK,IAAI,CAAC;AAAA,EACxE;AACA,SAAO;AACT;AAEO,MAAM,iBAAiB,CAAC,OAAmB,aAChD,QAAQ,KAAK,EAAE,OAAO,CAAC,SAAS,SAAS,IAAI,KAAK,IAAI,GAAG,aAAa,SAAS;AAG1E,MAAM,gBAAgB,CAAC,OAAmB,gBAAqC;AACpF,QAAM,WAAW,eAAe,KAAK;AACrC,QAAM,8BAAc,IAAA;AACpB,QAAM,UAAU,CAAC,WAAW;AAC5B,SAAO,QAAQ,SAAS,GAAG;AACzB,UAAM,SAAS,QAAQ,IAAA;AACvB,QAAI,WAAW,UAAa,QAAQ,IAAI,MAAM,EAAG;AACjD,YAAQ,IAAI,MAAM;AAClB,eAAW,QAAQ,SAAS,IAAI,MAAM,KAAK,CAAA,EAAI,SAAQ,KAAK,KAAK,MAAM;AAAA,EACzE;AACA,SAAO;AACT;AAGO,MAAM,YAAY,CAAC,UAA4C;AACpE,QAAM,WAAW,eAAe,KAAK;AACrC,QAAM,4BAAY,IAAA;AAClB,QAAM,OAAsB,CAAA;AAE5B,QAAM,QAAQ,CAAC,WAAy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AC,UAChC,QAAQ,KAAK,EAAE,KAAK,CAAC,SAAS,KAAK,aAAa,KAAK,SAAS,MAAM,KAAK,KAAK,SAAS,MAAM,EAAE;"}
@@ -1,74 +0,0 @@
1
- import { ComponentType, ReactNode } from 'react';
2
- import { SymbolCodepoints } from '../MaterialSymbol';
3
- export type TFlowPortId = 'next' | 'true' | 'false' | 'error';
4
- export type TFlowBlockCategory = 'trigger' | 'condition' | 'action';
5
- export interface IFlowPosition {
6
- x: number;
7
- y: number;
8
- }
9
- export interface IFlowNode<TConfig = unknown> {
10
- nodeId: string;
11
- type: string;
12
- typeVersion: number;
13
- config: TConfig;
14
- position: IFlowPosition;
15
- label?: string;
16
- disabled?: boolean;
17
- }
18
- export interface IFlowEdge {
19
- edgeId: string;
20
- source: string;
21
- sourcePort: TFlowPortId;
22
- target: string;
23
- }
24
- export interface IFlowGraph {
25
- nodes: Array<IFlowNode>;
26
- edges: Array<IFlowEdge>;
27
- }
28
- export type TFlowIssueSeverity = 'error' | 'warning';
29
- export type TFlowGraphIssueCode = 'missingTrigger' | 'multipleTriggers' | 'unknownBlock' | 'unreachableNode' | 'multipleInputs' | 'portFanOut' | 'cycle' | 'missingTrueBranch';
30
- export interface IFlowIssue {
31
- /** A graph rule from `TFlowGraphIssueCode`, or a block-specific code from its `validate`. */
32
- code: string;
33
- severity: TFlowIssueSeverity;
34
- /** Already translated by the block. Graph issues leave it empty and the UI names them. */
35
- message?: string;
36
- nodeId?: string;
37
- edgeId?: string;
38
- }
39
- export type TFlowRunStepStatus = 'passed' | 'failed' | 'skipped' | 'wouldRun' | 'error' | 'blocked';
40
- /** The result of one run (real or simulated) painted over the canvas. */
41
- export interface IFlowRunOverlay {
42
- steps: Record<string, TFlowRunStepStatus>;
43
- traversedEdgeIds: Array<string>;
44
- }
45
- export interface IFlowBlockConfigPanelProps<TConfig> {
46
- config: TConfig;
47
- onChange: (next: TConfig) => void;
48
- readOnly?: boolean;
49
- }
50
- export type TFlowBlockIssue = Omit<IFlowIssue, 'nodeId' | 'edgeId'>;
51
- export interface IFlowBlockDefinition<TConfig = unknown> {
52
- /** Namespaced and stable: `trigger.recordEvent`, `action.moveWorkflowCard`. */
53
- type: string;
54
- typeVersion: number;
55
- category: TFlowBlockCategory;
56
- icon: SymbolCodepoints;
57
- /** Translated by the host. */
58
- label: string;
59
- description?: string;
60
- outputs: Array<TFlowPortId>;
61
- /** How many of this block a flow may hold; omit for no limit. */
62
- maxInstances?: number;
63
- createDefaultConfig: () => TConfig;
64
- migrateConfig?: (config: unknown, fromVersion: number) => TConfig;
65
- ConfigPanel: ComponentType<IFlowBlockConfigPanelProps<TConfig>>;
66
- /** When one block stands for several kinds (chosen inside it), the icon and name of the chosen kind. */
67
- resolveIcon?: (config: TConfig) => SymbolCodepoints | undefined;
68
- resolveLabel?: (config: TConfig) => string | undefined;
69
- /** One line inside the block on the canvas. */
70
- renderSummary: (config: TConfig) => ReactNode;
71
- /** This block's piece of the "When..., if..., then..." sentence. */
72
- describe: (config: TConfig) => string;
73
- validate: (config: TConfig) => Array<TFlowBlockIssue>;
74
- }
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=flowTypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flowTypes.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,14 +0,0 @@
1
- export { createFlowBlockRegistry, defineFlowBlock, type IFlowBlockRegistry } from './flowBlockRegistry';
2
- export { default as FlowCanvas, type IFlowCanvasProps } from './FlowCanvas';
3
- export { FLOW_BLOCK_DRAG_TYPE } from './flowConstants';
4
- export { default as FlowEditorProvider, useFlowBlockRegistry, useFlowEditor, useFlowEditorStore, } from './FlowEditorProvider';
5
- export { createFlowEditorStore, type IFlowEditorState, type TFlowEditorStore } from './flowEditorStore';
6
- export { canConnect, findCycle, FLOW_LEVEL_GAP, FLOW_SIBLING_GAP, hasBlockingIssues, hasSavedPositions, layoutFlowByLevels, reachableFrom, triggerNodesOf, validateFlowGraph, } from './flowGraph';
7
- export { default as FlowInspector } from './FlowInspector';
8
- export { default as FlowIssueList } from './FlowIssueList';
9
- export { default as FlowLaneMap, type IFlowArc, type IFlowLane, type TFlowArcTone } from './FlowLaneMap';
10
- export { default as FlowNodeShell, type IFlowNodeShellProps } from './FlowNodeShell';
11
- export { default as FlowPalette } from './FlowPalette';
12
- export { default as FlowResizablePanel, type IFlowResizablePanelProps } from './FlowResizablePanel';
13
- export type * from './flowTypes';
14
- export { FLOW_RUN_STATUS_TONE, useFlowLabels } from './useFlowLabels';
@@ -1,43 +0,0 @@
1
- import { createFlowBlockRegistry, defineFlowBlock } from "./flowBlockRegistry.js";
2
- import { default as default2 } from "./FlowCanvas.js";
3
- import { FLOW_BLOCK_DRAG_TYPE } from "./flowConstants.js";
4
- import { default as default3, useFlowBlockRegistry, useFlowEditor, useFlowEditorStore } from "./FlowEditorProvider.js";
5
- import { createFlowEditorStore } from "./flowEditorStore.js";
6
- import { FLOW_LEVEL_GAP, FLOW_SIBLING_GAP, canConnect, findCycle, hasBlockingIssues, hasSavedPositions, layoutFlowByLevels, reachableFrom, triggerNodesOf, validateFlowGraph } from "./flowGraph.js";
7
- import { default as default4 } from "./FlowInspector.js";
8
- import { default as default5 } from "./FlowIssueList.js";
9
- import { default as default6 } from "./FlowLaneMap.js";
10
- import { default as default7 } from "./FlowNodeShell.js";
11
- import { default as default8 } from "./FlowPalette.js";
12
- import { default as default9 } from "./FlowResizablePanel.js";
13
- import { FLOW_RUN_STATUS_TONE, useFlowLabels } from "./useFlowLabels.js";
14
- export {
15
- FLOW_BLOCK_DRAG_TYPE,
16
- FLOW_LEVEL_GAP,
17
- FLOW_RUN_STATUS_TONE,
18
- FLOW_SIBLING_GAP,
19
- default2 as FlowCanvas,
20
- default3 as FlowEditorProvider,
21
- default4 as FlowInspector,
22
- default5 as FlowIssueList,
23
- default6 as FlowLaneMap,
24
- default7 as FlowNodeShell,
25
- default8 as FlowPalette,
26
- default9 as FlowResizablePanel,
27
- canConnect,
28
- createFlowBlockRegistry,
29
- createFlowEditorStore,
30
- defineFlowBlock,
31
- findCycle,
32
- hasBlockingIssues,
33
- hasSavedPositions,
34
- layoutFlowByLevels,
35
- reachableFrom,
36
- triggerNodesOf,
37
- useFlowBlockRegistry,
38
- useFlowEditor,
39
- useFlowEditorStore,
40
- useFlowLabels,
41
- validateFlowGraph
42
- };
43
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -1,10 +0,0 @@
1
- import { TChipTone } from '../Chips/chipTones';
2
- import { IFlowIssue, TFlowBlockCategory, TFlowPortId, TFlowRunStepStatus } from './flowTypes';
3
- export declare const FLOW_RUN_STATUS_TONE: Record<TFlowRunStepStatus, TChipTone>;
4
- /** Every label the flow UI shows, spelled as literal keys so the translation tooling can read them. */
5
- export declare const useFlowLabels: () => {
6
- ports: Record<TFlowPortId, string>;
7
- categories: Record<TFlowBlockCategory, string>;
8
- runStatus: Record<TFlowRunStepStatus, string>;
9
- issueMessage: (issue: IFlowIssue) => string;
10
- };
@@ -1,51 +0,0 @@
1
- import { useMemo } from "react";
2
- import { useTranslation } from "react-i18next";
3
- const FLOW_RUN_STATUS_TONE = {
4
- passed: "success",
5
- wouldRun: "info",
6
- skipped: "neutral",
7
- blocked: "warning",
8
- failed: "danger",
9
- error: "danger"
10
- };
11
- const useFlowLabels = () => {
12
- const { t } = useTranslation("ui");
13
- return useMemo(() => {
14
- const ports = {
15
- next: t("flow.ports.next"),
16
- true: t("flow.ports.true"),
17
- false: t("flow.ports.false"),
18
- error: t("flow.ports.error")
19
- };
20
- const categories = {
21
- trigger: t("flow.categories.trigger"),
22
- condition: t("flow.categories.condition"),
23
- action: t("flow.categories.action")
24
- };
25
- const runStatus = {
26
- passed: t("flow.run.passed"),
27
- failed: t("flow.run.failed"),
28
- skipped: t("flow.run.skipped"),
29
- wouldRun: t("flow.run.wouldRun"),
30
- error: t("flow.run.error"),
31
- blocked: t("flow.run.blocked")
32
- };
33
- const graphIssues = {
34
- missingTrigger: t("flow.issues.missingTrigger"),
35
- multipleTriggers: t("flow.issues.multipleTriggers"),
36
- unknownBlock: t("flow.issues.unknownBlock"),
37
- unreachableNode: t("flow.issues.unreachableNode"),
38
- multipleInputs: t("flow.issues.multipleInputs"),
39
- portFanOut: t("flow.issues.portFanOut"),
40
- cycle: t("flow.issues.cycle"),
41
- missingTrueBranch: t("flow.issues.missingTrueBranch")
42
- };
43
- const issueMessage = (issue) => issue.message ?? graphIssues[issue.code] ?? issue.code;
44
- return { ports, categories, runStatus, issueMessage };
45
- }, [t]);
46
- };
47
- export {
48
- FLOW_RUN_STATUS_TONE,
49
- useFlowLabels
50
- };
51
- //# sourceMappingURL=useFlowLabels.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFlowLabels.js","sources":["../../../../src/components/UI/Flow/useFlowLabels.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { TChipTone } from '@/components/UI/Chips/chipTones';\n\nimport type { IFlowIssue, TFlowBlockCategory, TFlowGraphIssueCode, TFlowPortId, TFlowRunStepStatus } from './flowTypes';\n\nexport const FLOW_RUN_STATUS_TONE: Record<TFlowRunStepStatus, TChipTone> = {\n passed: 'success',\n wouldRun: 'info',\n skipped: 'neutral',\n blocked: 'warning',\n failed: 'danger',\n error: 'danger',\n};\n\n/** Every label the flow UI shows, spelled as literal keys so the translation tooling can read them. */\nexport const useFlowLabels = () => {\n const { t } = useTranslation('ui');\n\n return useMemo(() => {\n const ports: Record<TFlowPortId, string> = {\n next: t('flow.ports.next'),\n true: t('flow.ports.true'),\n false: t('flow.ports.false'),\n error: t('flow.ports.error'),\n };\n const categories: Record<TFlowBlockCategory, string> = {\n trigger: t('flow.categories.trigger'),\n condition: t('flow.categories.condition'),\n action: t('flow.categories.action'),\n };\n const runStatus: Record<TFlowRunStepStatus, string> = {\n passed: t('flow.run.passed'),\n failed: t('flow.run.failed'),\n skipped: t('flow.run.skipped'),\n wouldRun: t('flow.run.wouldRun'),\n error: t('flow.run.error'),\n blocked: t('flow.run.blocked'),\n };\n const graphIssues: Record<TFlowGraphIssueCode, string> = {\n missingTrigger: t('flow.issues.missingTrigger'),\n multipleTriggers: t('flow.issues.multipleTriggers'),\n unknownBlock: t('flow.issues.unknownBlock'),\n unreachableNode: t('flow.issues.unreachableNode'),\n multipleInputs: t('flow.issues.multipleInputs'),\n portFanOut: t('flow.issues.portFanOut'),\n cycle: t('flow.issues.cycle'),\n missingTrueBranch: t('flow.issues.missingTrueBranch'),\n };\n const issueMessage = (issue: IFlowIssue): string =>\n issue.message ?? graphIssues[issue.code as TFlowGraphIssueCode] ?? issue.code;\n\n return { ports, categories, runStatus, issueMessage };\n }, [t]);\n};\n"],"names":[],"mappings":";;AAOO,MAAM,uBAA8D;AAAA,EACzE,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,OAAO;AACT;AAGO,MAAM,gBAAgB,MAAM;AACjC,QAAM,EAAE,EAAA,IAAM,eAAe,IAAI;AAEjC,SAAO,QAAQ,MAAM;AACnB,UAAM,QAAqC;AAAA,MACzC,MAAM,EAAE,iBAAiB;AAAA,MACzB,MAAM,EAAE,iBAAiB;AAAA,MACzB,OAAO,EAAE,kBAAkB;AAAA,MAC3B,OAAO,EAAE,kBAAkB;AAAA,IAAA;AAE7B,UAAM,aAAiD;AAAA,MACrD,SAAS,EAAE,yBAAyB;AAAA,MACpC,WAAW,EAAE,2BAA2B;AAAA,MACxC,QAAQ,EAAE,wBAAwB;AAAA,IAAA;AAEpC,UAAM,YAAgD;AAAA,MACpD,QAAQ,EAAE,iBAAiB;AAAA,MAC3B,QAAQ,EAAE,iBAAiB;AAAA,MAC3B,SAAS,EAAE,kBAAkB;AAAA,MAC7B,UAAU,EAAE,mBAAmB;AAAA,MAC/B,OAAO,EAAE,gBAAgB;AAAA,M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