@ultrst-armada/floks 1.13.20 → 1.14.0
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/.krusbl-release-attestation.json +3 -3
- package/package.json +8 -7
- package/packages/canvas-ui/dist/MovableSocketView.d.ts +1 -1
- package/packages/canvas-ui/dist/NodeCard.d.ts +1 -1
- package/packages/canvas-ui/dist/NodeDetailsPanel.d.ts +1 -1
- package/packages/canvas-ui/dist/NodeGraphCanvas.d.ts +1 -1
- package/packages/canvas-ui/dist/Viewer2DNodes.d.ts +1 -1
- package/packages/canvas-ui/dist/WireRenderer.d.ts +1 -1
- package/packages/canvas-ui/dist/authoring/UiAuthoringValidationPanel.d.ts +1 -1
- package/packages/canvas-ui/dist/{chunk-RH5NINIT.js → chunk-A7BSZ5QO.js} +28 -103
- package/packages/canvas-ui/dist/chunk-FPRATI44.js +45 -0
- package/packages/canvas-ui/dist/{chunk-ZJXRL74D.js → chunk-KAKAFGVH.js} +22 -16
- package/packages/canvas-ui/dist/{chunk-YHEIL67R.js → chunk-SRGVIYC5.js} +6 -6
- package/packages/canvas-ui/dist/{chunk-7CYX3B6O.js → chunk-TKOMIUCU.js} +1 -1
- package/packages/canvas-ui/dist/{chunk-XVAHT5WE.js → chunk-ZDADZVQ2.js} +363 -59
- package/packages/canvas-ui/dist/{chunk-QRYNQ36L.js → chunk-ZSVXR3HU.js} +1 -1
- package/packages/canvas-ui/dist/editor/MonacoEditor.d.ts +1 -1
- package/packages/canvas-ui/dist/editor/index.js +1 -1
- package/packages/canvas-ui/dist/fod/index.js +3 -3
- package/packages/canvas-ui/dist/frnl-editable-node-graph/FrnlEditableNodeGraph.d.ts +1 -1
- package/packages/canvas-ui/dist/frnl-editable-node-graph/index.js +2 -2
- package/packages/canvas-ui/dist/graph-2d/CanvasBackground2D.d.ts +1 -1
- package/packages/canvas-ui/dist/graph-2d/MagneticTraces2D.d.ts +2 -2
- package/packages/canvas-ui/dist/graph-2d/Node2DBase.d.ts +3 -3
- package/packages/canvas-ui/dist/graph-2d/NodeRenderer2D.d.ts +3 -3
- package/packages/canvas-ui/dist/graph-2d/RecorderWaveformDisplay.d.ts +1 -1
- package/packages/canvas-ui/dist/graph-2d/Socket2D.d.ts +1 -1
- package/packages/canvas-ui/dist/graph-2d/Wire2D.d.ts +1 -1
- package/packages/canvas-ui/dist/graph-2d/index.js +9 -9
- package/packages/canvas-ui/dist/graph-2d/socketCoordinates.d.ts +1 -1
- package/packages/canvas-ui/dist/graph-2d/types.d.ts +1 -1
- package/packages/canvas-ui/dist/graph-2d/useCanvas2DMagnetic.d.ts +4 -4
- package/packages/canvas-ui/dist/index.js +38 -38
- package/packages/canvas-ui/dist/node-graph-ui/ghost/GhostNodeCard.d.ts +1 -1
- package/packages/canvas-ui/dist/node-graph-ui/ghost/GhostSolidifyBar.d.ts +1 -1
- package/packages/canvas-ui/dist/node-graph-ui/ghost/GhostTraceLayer.d.ts +1 -1
- package/packages/canvas-ui/dist/node-graph-ui/react-flow/ReactFlowAdapter.d.ts +4 -4
- package/packages/canvas-ui/dist/node-graph-ui/toolbar/GraphToolbar.d.ts +1 -1
- package/packages/canvas-ui/dist/node-graph-ui/widgets/CanvasContextMenu.d.ts +1 -1
- package/packages/canvas-ui/dist/node-graph-ui/widgets/CompatibleNodePicker.d.ts +1 -1
- package/packages/canvas-ui/dist/node-graph-ui/widgets/MagneticTraceLayer.d.ts +1 -1
- package/packages/canvas-ui/dist/node-graph-ui/widgets/NodeSearchPalette.d.ts +1 -1
- package/packages/canvas-ui/dist/predictive/PredictiveGhostNodeCard/PredictiveGhostNodeCard.d.ts +2 -2
- package/packages/canvas-ui/dist/predictive/PredictiveGhostNodeCard/types.d.ts +1 -1
- package/packages/canvas-ui/dist/predictive/PredictiveLayer2D.d.ts +1 -2
- package/packages/canvas-ui/dist/predictive/index.js +3 -3
- package/packages/canvas-ui/dist/predictive/usePredictiveGraph2D.d.ts +4 -5
- package/packages/canvas-ui/dist/useGhostRouting.d.ts +1 -1
- package/packages/canvas-ui/dist/useNodeGraph.d.ts +1 -1
- package/packages/canvas-ui/package.json +5 -6
- package/packages/contracts/dist/index.d.ts +396 -1
- package/packages/contracts/dist/index.js +201 -1
- package/packages/contracts/dist/state-graph.d.ts +456 -0
- package/packages/contracts/dist/state-graph.js +282 -0
- package/packages/contracts/package.json +6 -1
- package/packages/ui/dist/{chunk-3YYPBZS2.js → chunk-W6ENIFEW.js} +3 -3
- package/packages/ui/dist/components/auth/LuthAuthClient.d.ts +4 -4
- package/packages/ui/dist/components/auth/index.js +1 -1
- package/packages/ui/dist/components/auth/luthAuthTypes.d.ts +2 -2
- package/packages/ui/dist/index.js +1 -1
- package/packages/ui/package.json +3 -3
- package/packages/canvas-ui/dist/chunk-U2SC3RMJ.js +0 -391
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
// src/state-graph.ts
|
|
2
|
+
var SpaceNode = class {
|
|
3
|
+
id;
|
|
4
|
+
type;
|
|
5
|
+
position;
|
|
6
|
+
name;
|
|
7
|
+
label;
|
|
8
|
+
width;
|
|
9
|
+
height;
|
|
10
|
+
radius;
|
|
11
|
+
active;
|
|
12
|
+
socketOffsets;
|
|
13
|
+
inputs;
|
|
14
|
+
outputs;
|
|
15
|
+
constructor(p) {
|
|
16
|
+
Object.assign(this, p);
|
|
17
|
+
this.id = p.id;
|
|
18
|
+
this.type = p.type;
|
|
19
|
+
this.position = p.position;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var ContainerNode = class extends SpaceNode {
|
|
23
|
+
};
|
|
24
|
+
var ModuleNode = class extends SpaceNode {
|
|
25
|
+
};
|
|
26
|
+
var TriggerNode = class extends SpaceNode {
|
|
27
|
+
intervalBeats;
|
|
28
|
+
};
|
|
29
|
+
var EffectNode = class extends SpaceNode {
|
|
30
|
+
effectType;
|
|
31
|
+
compressorConfig;
|
|
32
|
+
multibandCompressorConfig;
|
|
33
|
+
limiterConfig;
|
|
34
|
+
reverbConfig;
|
|
35
|
+
delayConfig;
|
|
36
|
+
saturationConfig;
|
|
37
|
+
};
|
|
38
|
+
var RecorderNode = class extends SpaceNode {
|
|
39
|
+
isArmed;
|
|
40
|
+
};
|
|
41
|
+
var SIGNAL_TYPES = { audio_stereo: { colorStr: "#00ffff" }, audio_mono: { colorStr: "#38bdf8" }, audio_packet: { colorStr: "#818cf8" }, trigger: { colorStr: "#eab308" }, midi_stream: { colorStr: "#ec4899" }, midi_packet: { colorStr: "#f43f5e" }, curve_stream: { colorStr: "#10b981" }, curve_packet: { colorStr: "#34d399" }, component: { colorStr: "#a855f7" }, AUDIO: { colorStr: "#38bdf8" }, MIDI: { colorStr: "#ec4899" }, TRIGGER: { colorStr: "#eab308" }, DATA: { colorStr: "#10b981" }, DEFAULT: { colorStr: "#60a5fa" } };
|
|
42
|
+
var GraphNodeParent = class {
|
|
43
|
+
static calculateConstrainedSocketOffset(node, _socketId, isOutput, index, total, clearance = 14) {
|
|
44
|
+
const w = node.width ?? 180, h = node.height ?? 120, c = Math.max(1, total), pitch = Math.min(40, Math.max(60, h - 40) / c);
|
|
45
|
+
return { x: isOutput ? w / 2 + Math.max(12, clearance) : -w / 2 - Math.max(12, clearance), y: c === 1 ? 0 : -((c - 1) * pitch) / 2 + index * pitch };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
function getNodeSockets(node) {
|
|
49
|
+
const f = (s) => ({ ...s, socketId: s.socketId ?? s.id, nodeId: node.id });
|
|
50
|
+
return { inputs: (node.inputs ?? []).map(f), outputs: (node.outputs ?? []).map(f) };
|
|
51
|
+
}
|
|
52
|
+
function calculateSocketCoordinates(baseY, o) {
|
|
53
|
+
const c = Math.max(12, o.clearance ?? 14), n = o.nudge ?? { x: 0, y: 0 }, w = o.cardWidth / 2, b = o.isOutput ? w + c : -w - c;
|
|
54
|
+
return { baseX: b, effectiveX: b + n.x, effectiveY: baseY + n.y, nudge: n };
|
|
55
|
+
}
|
|
56
|
+
function getBeamPoints(n, baseW = 5, headW = 1.2) {
|
|
57
|
+
const vx = -n.x, vy = -n.y, d = Math.hypot(vx, vy);
|
|
58
|
+
if (d < 1) return "";
|
|
59
|
+
const px = -vy / d, py = vx / d;
|
|
60
|
+
return `${-px * headW},${-py * headW} ${px * headW},${py * headW} ${vx + px * baseW},${vy + py * baseW} ${vx - px * baseW},${vy - py * baseW}`;
|
|
61
|
+
}
|
|
62
|
+
function describeSvgArc(cx, cy, r, startDeg, endDeg) {
|
|
63
|
+
const rad = (d) => (d - 90) * Math.PI / 180, a = rad(startDeg), b = rad(endDeg), x1 = cx + r * Math.cos(a), y1 = cy + r * Math.sin(a), x2 = cx + r * Math.cos(b), y2 = cy + r * Math.sin(b), large = Math.abs(endDeg - startDeg) <= 180 ? "0" : "1", sweep = endDeg > startDeg ? "1" : "0";
|
|
64
|
+
return `M ${x1} ${y1} A ${r} ${r} 0 ${large} ${sweep} ${x2} ${y2}`;
|
|
65
|
+
}
|
|
66
|
+
function zoomAtPoint(mx, my, delta, v, c = {}) {
|
|
67
|
+
const z = clampZoom(v.zoom + delta, c), gx = (mx - v.panX) / v.zoom, gy = (my - v.panY) / v.zoom;
|
|
68
|
+
return { zoom: z, panX: mx - gx * z, panY: my - gy * z };
|
|
69
|
+
}
|
|
70
|
+
function clampZoom(z, c = {}) {
|
|
71
|
+
return Math.max(c.minZoom ?? 0.25, Math.min(c.maxZoom ?? 2.5, z));
|
|
72
|
+
}
|
|
73
|
+
function canvasToScreen(x, y, v) {
|
|
74
|
+
return { x: x * v.zoom + v.panX, y: y * v.zoom + v.panY };
|
|
75
|
+
}
|
|
76
|
+
function isNodeInCenterDeadZone(n, v, w, h, dz = 80) {
|
|
77
|
+
const p = canvasToScreen(n.position.x, n.position.y, v);
|
|
78
|
+
return Math.abs(p.x - w / 2) < dz && Math.abs(p.y - h / 2) < dz;
|
|
79
|
+
}
|
|
80
|
+
function getCenterPanForNode(n, v, w, h) {
|
|
81
|
+
const p = canvasToScreen(n.position.x, n.position.y, v);
|
|
82
|
+
return { x: v.panX + w / 2 - p.x, y: v.panY + h / 2 - p.y };
|
|
83
|
+
}
|
|
84
|
+
function getNodesInSelection(nodes, s, v) {
|
|
85
|
+
return nodes.filter((n) => {
|
|
86
|
+
const p = canvasToScreen(n.position.x, n.position.y, v);
|
|
87
|
+
return p.x >= s.x && p.x <= s.x + s.width && p.y >= s.y && p.y <= s.y + s.height;
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
var ConnectionRuleStore = class {
|
|
91
|
+
static types = /* @__PURE__ */ new Map();
|
|
92
|
+
static registerNodeTypes(d) {
|
|
93
|
+
for (const x of d) this.types.set(x.type, x);
|
|
94
|
+
}
|
|
95
|
+
static listNodeTypes() {
|
|
96
|
+
return [...this.types.values()];
|
|
97
|
+
}
|
|
98
|
+
static getNodeType(t) {
|
|
99
|
+
return this.types.get(t);
|
|
100
|
+
}
|
|
101
|
+
static canConnect(a, b) {
|
|
102
|
+
const x = (a.dataType || "ANY").toUpperCase(), y = (b.dataType || "ANY").toUpperCase();
|
|
103
|
+
return x === "ANY" || y === "ANY" || x === "*" || y === "*" || x === y;
|
|
104
|
+
}
|
|
105
|
+
static resolve(a, b) {
|
|
106
|
+
return { wireType: "DEFAULT", allowed: this.canConnect(a, b) };
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
var GhostStore = class _GhostStore {
|
|
110
|
+
static instance = null;
|
|
111
|
+
isActive = false;
|
|
112
|
+
ghostNodes = [];
|
|
113
|
+
ghostTraces = [];
|
|
114
|
+
scenarioIndex = 0;
|
|
115
|
+
hoveredGhostId = null;
|
|
116
|
+
listeners = /* @__PURE__ */ new Set();
|
|
117
|
+
static getInstance() {
|
|
118
|
+
return this.instance ??= new _GhostStore();
|
|
119
|
+
}
|
|
120
|
+
subscribe(f) {
|
|
121
|
+
this.listeners.add(f);
|
|
122
|
+
return () => this.listeners.delete(f);
|
|
123
|
+
}
|
|
124
|
+
setPredictions(n, t) {
|
|
125
|
+
this.ghostNodes = n;
|
|
126
|
+
this.ghostTraces = t;
|
|
127
|
+
this.isActive = n.length > 0;
|
|
128
|
+
this.scenarioIndex = 0;
|
|
129
|
+
this.notify();
|
|
130
|
+
}
|
|
131
|
+
cycleScenario(max = 3) {
|
|
132
|
+
const count = Math.max(max, ...this.ghostNodes.map((n) => n.scenarioIndex + 1));
|
|
133
|
+
this.scenarioIndex = (this.scenarioIndex + 1) % count;
|
|
134
|
+
this.notify();
|
|
135
|
+
}
|
|
136
|
+
setHoveredGhostId(id) {
|
|
137
|
+
this.hoveredGhostId = id;
|
|
138
|
+
this.notify();
|
|
139
|
+
}
|
|
140
|
+
getActiveGhostNodes() {
|
|
141
|
+
return this.ghostNodes.filter((n) => n.scenarioIndex === this.scenarioIndex);
|
|
142
|
+
}
|
|
143
|
+
getActiveGhostTraces() {
|
|
144
|
+
return this.ghostTraces.filter((t) => t.scenarioIndex === this.scenarioIndex);
|
|
145
|
+
}
|
|
146
|
+
clear() {
|
|
147
|
+
this.isActive = false;
|
|
148
|
+
this.ghostNodes = [];
|
|
149
|
+
this.ghostTraces = [];
|
|
150
|
+
this.scenarioIndex = 0;
|
|
151
|
+
this.hoveredGhostId = null;
|
|
152
|
+
this.notify();
|
|
153
|
+
}
|
|
154
|
+
notify() {
|
|
155
|
+
for (const f of this.listeners) f();
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
function inferGhostNodes(selected, defs, o = {}) {
|
|
159
|
+
const count = Math.max(1, o.scenarioCount ?? 3), max = o.maxSuggestionsPerNode ?? 2, out = [];
|
|
160
|
+
for (const s of selected) {
|
|
161
|
+
const outputs = s.outputs ?? [];
|
|
162
|
+
if (!outputs.length) continue;
|
|
163
|
+
const scored = defs.filter((d) => d.type !== s.type).map((def) => ({ def, m: outputs.flatMap((x) => {
|
|
164
|
+
const i = def.inputs?.find((y) => ConnectionRuleStore.canConnect(x, y));
|
|
165
|
+
return i ? [{ sourceSocketId: x.id, targetSocketId: i.id, wireType: "DEFAULT" }] : [];
|
|
166
|
+
}) })).filter((x) => x.m.length).sort((a, b) => b.m.length - a.m.length);
|
|
167
|
+
for (let si = 0; si < count; si++) for (const [i, x] of scored.slice(si * max, (si + 1) * max).entries()) out.push({ id: "ghost-" + s.id + "-" + x.def.type + "-" + si + "-" + i, nodeType: x.def.type, label: x.def.label ?? x.def.type, scenarioIndex: si, score: x.m.length * 10, sourceNodeId: s.id, socketMappings: x.m, relativeOffset: { x: 260, y: i * 140 } });
|
|
168
|
+
}
|
|
169
|
+
return out;
|
|
170
|
+
}
|
|
171
|
+
function resolveGhostLayout(cs, nodes, defs) {
|
|
172
|
+
const map = new Map(nodes.map((n) => [n.id, n])), dm = new Map(defs.map((d) => [d.type, d])), occ = nodes.map((n) => ({ x: n.position.x, y: n.position.y, width: n.width ?? 180, height: n.height ?? 120 }));
|
|
173
|
+
return cs.map((c) => {
|
|
174
|
+
const s = map.get(c.sourceNodeId), d = dm.get(c.nodeType), r = { x: (s?.position.x ?? 0) + (s?.width ?? 180) + 80, y: (s?.position.y ?? 0) + c.relativeOffset.y, width: 180, height: 120 };
|
|
175
|
+
occ.push(r);
|
|
176
|
+
return { id: c.id, nodeType: c.nodeType, label: c.label, position: { x: r.x, y: r.y }, size: { width: r.width, height: r.height }, scenarioIndex: c.scenarioIndex, sourceNodeId: c.sourceNodeId, socketMappings: c.socketMappings, inputs: (d?.inputs ?? []).map((h) => ({ id: h.id, label: h.label ?? h.id, type: "input", dataType: h.dataType })), outputs: (d?.outputs ?? []).map((h) => ({ id: h.id, label: h.label ?? h.id, type: "output", dataType: h.dataType })) };
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
function buildGhostTraces(gs, nodes) {
|
|
180
|
+
const m = new Map(nodes.map((n) => [n.id, n])), out = [];
|
|
181
|
+
for (const g of gs) {
|
|
182
|
+
const s = m.get(g.sourceNodeId);
|
|
183
|
+
if (!s) continue;
|
|
184
|
+
for (const x of g.socketMappings) out.push({ id: "trace-" + g.id + "-" + x.sourceSocketId, sourceNodeId: s.id, sourceSocketId: x.sourceSocketId, targetGhostNodeId: g.id, targetSocketId: x.targetSocketId, wireType: x.wireType, scenarioIndex: g.scenarioIndex, pathD: "M " + (s.position.x + (s.width ?? 180)) + "," + s.position.y + " L " + g.position.x + "," + g.position.y });
|
|
185
|
+
}
|
|
186
|
+
return out;
|
|
187
|
+
}
|
|
188
|
+
function computePredictiveGraph(nodes, connections, scenarioIndex = 0) {
|
|
189
|
+
const ghosts = [], traces = [], map = /* @__PURE__ */ new Map();
|
|
190
|
+
const connected = new Set(connections.map((c) => c.fromNodeId + ":" + c.toNodeId));
|
|
191
|
+
for (const p of nodes) {
|
|
192
|
+
const cs = nodes.filter((c) => c.id !== p.id && c.type !== p.type).slice(0, 2), pg = [];
|
|
193
|
+
cs.forEach((c, i) => {
|
|
194
|
+
const side = i % 2 === 0 ? 1 : -1, id = "ghost-" + p.id + "-" + c.id + "-" + scenarioIndex + "-" + i, w = SIGNAL_TYPES[signalType(c.type)]?.colorStr ?? SIGNAL_TYPES.DEFAULT.colorStr;
|
|
195
|
+
if (connected.has(p.id + ":" + c.id)) return;
|
|
196
|
+
const g = { id, parentNodeId: p.id, parentSocketId: "predictive-" + (side > 0 ? "output" : "input"), parentSocketPolarity: side > 0 ? "output" : "input", parentSocketSignalType: signalType(c.type), parentSocketLabel: side > 0 ? "Output" : "Input", archetypeId: c.type, category: "browser", label: c.label ?? c.name ?? c.type, description: "Predicted browser-safe graph continuation", iconName: c.type, colorHex: w, badge: "PREDICT", matchingSocketId: "predictive-" + (side > 0 ? "input" : "output"), spawnType: { type: c.type }, worldPosition: [p.position[0] + side * 5, p.position[1], p.position[2] + (i - 0.5) * 2.6], slotIndex: i, candidateIndex: i, totalCandidates: cs.length, prototypeNode: c };
|
|
197
|
+
pg.push(g);
|
|
198
|
+
ghosts.push(g);
|
|
199
|
+
traces.push({ id: "ptrace-" + id, ghostNodeId: id, sourceNodeId: side > 0 ? p.id : id, sourceHandleId: "predictive-output", targetNodeId: side > 0 ? id : p.id, targetHandleId: "predictive-input", wireType: signalType(c.type), isFromGhostToParent: side < 0, color: w });
|
|
200
|
+
});
|
|
201
|
+
if (pg.length) map.set(p.id, pg);
|
|
202
|
+
}
|
|
203
|
+
return { ghostNodes: ghosts, traces, selectedNodesWithGhosts: map };
|
|
204
|
+
}
|
|
205
|
+
function signalType(t) {
|
|
206
|
+
const v = t.toUpperCase();
|
|
207
|
+
return v.includes("AUDIO") ? "AUDIO" : v.includes("MIDI") ? "MIDI" : v.includes("TRIGGER") ? "TRIGGER" : "DATA";
|
|
208
|
+
}
|
|
209
|
+
var MagneticGraphManager = class {
|
|
210
|
+
threshold;
|
|
211
|
+
landmarks = [];
|
|
212
|
+
constructor(t = 320) {
|
|
213
|
+
this.threshold = t;
|
|
214
|
+
}
|
|
215
|
+
computeTraces(nodes) {
|
|
216
|
+
const out = [];
|
|
217
|
+
for (let i = 0; i < nodes.length; i++) for (let j = i + 1; j < nodes.length; j++) {
|
|
218
|
+
const a = nodes[i], b = nodes[j], d = Math.hypot(a.position[0] - b.position[0], a.position[2] - b.position[2]);
|
|
219
|
+
if (d > this.threshold) continue;
|
|
220
|
+
const x = getNodeSockets(a).outputs[0], y = getNodeSockets(b).inputs[0];
|
|
221
|
+
if (x && y) out.push({ id: "trace-" + a.id + "-" + b.id, sourceNodeId: a.id, targetNodeId: b.id, sourceHandleId: x.socketId ?? x.id, targetHandleId: y.socketId ?? y.id, wireType: x.signalType ?? x.dataType ?? "DEFAULT", spatialScore: d });
|
|
222
|
+
}
|
|
223
|
+
return out;
|
|
224
|
+
}
|
|
225
|
+
resolveAutoSolidification(nodes, traces, connections) {
|
|
226
|
+
return traces.filter((t) => !connections.some((c) => c.fromNodeId === t.sourceNodeId && c.toNodeId === t.targetNodeId));
|
|
227
|
+
}
|
|
228
|
+
saveLandmark(name, camera) {
|
|
229
|
+
const x = { id: "landmark-" + Date.now(), name, camera: { ...camera } };
|
|
230
|
+
this.landmarks = [...this.landmarks.filter((l) => l.name !== name), x];
|
|
231
|
+
return x;
|
|
232
|
+
}
|
|
233
|
+
getLandmarks() {
|
|
234
|
+
return [...this.landmarks];
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
var GraphWireParent = class {
|
|
238
|
+
id;
|
|
239
|
+
signalType;
|
|
240
|
+
flowSpeedMultiplier;
|
|
241
|
+
constructor(p) {
|
|
242
|
+
this.id = p.id;
|
|
243
|
+
this.signalType = p.signalType ?? "trigger";
|
|
244
|
+
this.flowSpeedMultiplier = p.flowSpeedMultiplier ?? 1;
|
|
245
|
+
}
|
|
246
|
+
calculateCubicBezier2D(p1, p2) {
|
|
247
|
+
const dx = Math.max(Math.abs(p2.x - p1.x) * 0.5, 45), cp1 = { x: p1.x + dx, y: p1.y + (p2.y - p1.y) * 0.25 }, cp2 = { x: p2.x - dx, y: p2.y - (p2.y - p1.y) * 0.25 };
|
|
248
|
+
return { pathD: "M " + p1.x + "," + p1.y + " C " + cp1.x + "," + cp1.y + " " + cp2.x + "," + cp2.y + " " + p2.x + "," + p2.y, cp1, cp2 };
|
|
249
|
+
}
|
|
250
|
+
calculatePulsePoint2D(t, p1, p2, c1, c2) {
|
|
251
|
+
const u = 1 - t;
|
|
252
|
+
return { x: u * u * u * p1.x + 3 * u * u * t * c1.x + 3 * u * t * t * c2.x + t * t * t * p2.x, y: u * u * u * p1.y + 3 * u * u * t * c1.y + 3 * u * t * t * c2.y + t * t * t * p2.y };
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
export {
|
|
256
|
+
ConnectionRuleStore,
|
|
257
|
+
ContainerNode,
|
|
258
|
+
EffectNode,
|
|
259
|
+
GhostStore,
|
|
260
|
+
GraphNodeParent,
|
|
261
|
+
GraphWireParent,
|
|
262
|
+
MagneticGraphManager,
|
|
263
|
+
ModuleNode,
|
|
264
|
+
RecorderNode,
|
|
265
|
+
SIGNAL_TYPES,
|
|
266
|
+
SpaceNode,
|
|
267
|
+
TriggerNode,
|
|
268
|
+
buildGhostTraces,
|
|
269
|
+
calculateSocketCoordinates,
|
|
270
|
+
canvasToScreen,
|
|
271
|
+
clampZoom,
|
|
272
|
+
computePredictiveGraph,
|
|
273
|
+
describeSvgArc,
|
|
274
|
+
getBeamPoints,
|
|
275
|
+
getCenterPanForNode,
|
|
276
|
+
getNodeSockets,
|
|
277
|
+
getNodesInSelection,
|
|
278
|
+
inferGhostNodes,
|
|
279
|
+
isNodeInCenterDeadZone,
|
|
280
|
+
resolveGhostLayout,
|
|
281
|
+
zoomAtPoint
|
|
282
|
+
};
|
|
@@ -17,10 +17,15 @@
|
|
|
17
17
|
"import": "./dist/index.js",
|
|
18
18
|
"types": "./dist/index.d.ts",
|
|
19
19
|
"default": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./state-graph": {
|
|
22
|
+
"import": "./dist/state-graph.js",
|
|
23
|
+
"types": "./dist/state-graph.d.ts",
|
|
24
|
+
"default": "./dist/state-graph.js"
|
|
20
25
|
}
|
|
21
26
|
},
|
|
22
27
|
"scripts": {
|
|
23
|
-
"build": "tsup src/index.ts --format esm --dts --clean --external zod",
|
|
28
|
+
"build": "tsup src/index.ts src/state-graph.ts --format esm --dts --clean --external zod",
|
|
24
29
|
"typecheck": "tsc --noEmit",
|
|
25
30
|
"clean": "rm -rf dist"
|
|
26
31
|
},
|
|
@@ -280,13 +280,13 @@ import { useCallback, useEffect as useEffect2, useMemo as useMemo2, useRef, useS
|
|
|
280
280
|
import {
|
|
281
281
|
resolveClientOrigin,
|
|
282
282
|
resolveClientEnvironment
|
|
283
|
-
} from "@
|
|
283
|
+
} from "@dinilmusick/gutts/auth";
|
|
284
284
|
import {
|
|
285
285
|
DEFAULT_LUTH_URL,
|
|
286
286
|
LuthAuthClient,
|
|
287
287
|
createLuthAuthClient
|
|
288
|
-
} from "@
|
|
289
|
-
import { LuthAuthError } from "@
|
|
288
|
+
} from "@dinilmusick/gutts/auth";
|
|
289
|
+
import { LuthAuthError } from "@dinilmusick/gutts/auth";
|
|
290
290
|
var resolveLuthOrigin = resolveClientOrigin;
|
|
291
291
|
var resolveLuthEnvironment = resolveClientEnvironment;
|
|
292
292
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { resolveClientOrigin, resolveClientEnvironment } from '@
|
|
2
|
-
export { DEFAULT_LUTH_URL, LuthAuthClient, createLuthAuthClient, } from '@
|
|
3
|
-
export type { DeploymentEnvironment, EmailSignInCredentials, EmailSignUpData, GoogleSignInOptions, LuthAuthClientConfig, LuthAuthTokenStore, LuthSession, LuthUser, LuthSessionResult, RegisterApplicationResult, } from '@
|
|
4
|
-
export { LuthAuthError } from '@
|
|
1
|
+
import { resolveClientOrigin, resolveClientEnvironment } from '@dinilmusick/gutts/auth';
|
|
2
|
+
export { DEFAULT_LUTH_URL, LuthAuthClient, createLuthAuthClient, } from '@dinilmusick/gutts/auth';
|
|
3
|
+
export type { DeploymentEnvironment, EmailSignInCredentials, EmailSignUpData, GoogleSignInOptions, LuthAuthClientConfig, LuthAuthTokenStore, LuthSession, LuthUser, LuthSessionResult, RegisterApplicationResult, } from '@dinilmusick/gutts/auth';
|
|
4
|
+
export { LuthAuthError } from '@dinilmusick/gutts/auth';
|
|
5
5
|
export declare const resolveLuthOrigin: typeof resolveClientOrigin;
|
|
6
6
|
export declare const resolveLuthEnvironment: typeof resolveClientEnvironment;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { DeploymentEnvironment, LuthAuthClientConfig, LuthAuthTokenStore, RegisterApplicationResult, LuthUser, LuthSession, LuthSessionResult, EmailSignInCredentials, EmailSignUpData, GoogleSignInOptions, } from '@
|
|
2
|
-
export { LuthAuthError } from '@
|
|
1
|
+
export type { DeploymentEnvironment, LuthAuthClientConfig, LuthAuthTokenStore, RegisterApplicationResult, LuthUser, LuthSession, LuthSessionResult, EmailSignInCredentials, EmailSignUpData, GoogleSignInOptions, } from '@dinilmusick/gutts/auth';
|
|
2
|
+
export { LuthAuthError } from '@dinilmusick/gutts/auth';
|
package/packages/ui/package.json
CHANGED
|
@@ -107,18 +107,18 @@
|
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
"scripts": {
|
|
110
|
-
"build": "tsup src/index.ts src/theme/index.ts src/palette/index.ts src/hierarchy/index.ts src/frnl/index.ts src/frnl/store.ts src/components/base/index.ts src/components/containers/index.ts src/components/composite/index.ts src/components/layout/index.ts src/components/bottom-strip/index.ts src/components/settings/index.ts src/components/auth/index.ts src/components/workspace/index.ts src/components/tiles/index.ts src/components/timeline/index.ts src/components/graph/index.ts src/components/ai/index.ts src/serviceUIComponents/index.ts --format esm --clean --external react --external react-dom --external lucide-react --external @ultrst-armada/frnlts --external @
|
|
110
|
+
"build": "tsup src/index.ts src/theme/index.ts src/palette/index.ts src/hierarchy/index.ts src/frnl/index.ts src/frnl/store.ts src/components/base/index.ts src/components/containers/index.ts src/components/composite/index.ts src/components/layout/index.ts src/components/bottom-strip/index.ts src/components/settings/index.ts src/components/auth/index.ts src/components/workspace/index.ts src/components/tiles/index.ts src/components/timeline/index.ts src/components/graph/index.ts src/components/ai/index.ts src/serviceUIComponents/index.ts --format esm --clean --external react --external react-dom --external lucide-react --external @ultrst-armada/frnlts --external @dinilmusick/gutts",
|
|
111
111
|
"typecheck": "tsc --noEmit",
|
|
112
112
|
"clean": "rm -rf dist",
|
|
113
113
|
"build:types": "tsc --emitDeclarationOnly --outDir dist --declarationMap false"
|
|
114
114
|
},
|
|
115
115
|
"dependencies": {
|
|
116
116
|
"zod": "^3.24.1",
|
|
117
|
-
"@ultrst-armada/frnlts": "^0.5.
|
|
117
|
+
"@ultrst-armada/frnlts": "^0.5.7",
|
|
118
118
|
"zustand": "^5.0.3",
|
|
119
119
|
"@xyflow/react": "^12.8.6",
|
|
120
120
|
"d3-force": "^3.0.0",
|
|
121
|
-
"@
|
|
121
|
+
"@dinilmusick/gutts": "^2.0.2"
|
|
122
122
|
},
|
|
123
123
|
"peerDependencies": {
|
|
124
124
|
"lucide-react": ">=0.300.0",
|