@xenolithengine/graph-render-pixi 0.7.0-beta.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.
Files changed (87) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +49 -0
  3. package/dist/bezier.d.ts +30 -0
  4. package/dist/bezier.d.ts.map +1 -0
  5. package/dist/bezier.js +70 -0
  6. package/dist/bezier.js.map +1 -0
  7. package/dist/comment-renderer.d.ts +35 -0
  8. package/dist/comment-renderer.d.ts.map +1 -0
  9. package/dist/comment-renderer.js +194 -0
  10. package/dist/comment-renderer.js.map +1 -0
  11. package/dist/edge-paths.d.ts +24 -0
  12. package/dist/edge-paths.d.ts.map +1 -0
  13. package/dist/edge-paths.js +123 -0
  14. package/dist/edge-paths.js.map +1 -0
  15. package/dist/edge-renderer.d.ts +29 -0
  16. package/dist/edge-renderer.d.ts.map +1 -0
  17. package/dist/edge-renderer.js +99 -0
  18. package/dist/edge-renderer.js.map +1 -0
  19. package/dist/geom.d.ts +46 -0
  20. package/dist/geom.d.ts.map +1 -0
  21. package/dist/geom.js +54 -0
  22. package/dist/geom.js.map +1 -0
  23. package/dist/grid.d.ts +12 -0
  24. package/dist/grid.d.ts.map +1 -0
  25. package/dist/grid.js +35 -0
  26. package/dist/grid.js.map +1 -0
  27. package/dist/icons.d.ts +14 -0
  28. package/dist/icons.d.ts.map +1 -0
  29. package/dist/icons.js +32 -0
  30. package/dist/icons.js.map +1 -0
  31. package/dist/index.d.ts +34 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +20 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/interaction.d.ts +69 -0
  36. package/dist/interaction.d.ts.map +1 -0
  37. package/dist/interaction.js +229 -0
  38. package/dist/interaction.js.map +1 -0
  39. package/dist/layout.d.ts +126 -0
  40. package/dist/layout.d.ts.map +1 -0
  41. package/dist/layout.js +360 -0
  42. package/dist/layout.js.map +1 -0
  43. package/dist/macro-frame.d.ts +29 -0
  44. package/dist/macro-frame.d.ts.map +1 -0
  45. package/dist/macro-frame.js +116 -0
  46. package/dist/macro-frame.js.map +1 -0
  47. package/dist/node-renderer.d.ts +102 -0
  48. package/dist/node-renderer.d.ts.map +1 -0
  49. package/dist/node-renderer.js +776 -0
  50. package/dist/node-renderer.js.map +1 -0
  51. package/dist/reroute-renderer.d.ts +25 -0
  52. package/dist/reroute-renderer.d.ts.map +1 -0
  53. package/dist/reroute-renderer.js +163 -0
  54. package/dist/reroute-renderer.js.map +1 -0
  55. package/dist/style.d.ts +56 -0
  56. package/dist/style.d.ts.map +1 -0
  57. package/dist/style.js +102 -0
  58. package/dist/style.js.map +1 -0
  59. package/dist/text-measure.d.ts +6 -0
  60. package/dist/text-measure.d.ts.map +1 -0
  61. package/dist/text-measure.js +21 -0
  62. package/dist/text-measure.js.map +1 -0
  63. package/dist/theme.d.ts +86 -0
  64. package/dist/theme.d.ts.map +1 -0
  65. package/dist/theme.js +2 -0
  66. package/dist/theme.js.map +1 -0
  67. package/dist/viewport-math.d.ts +68 -0
  68. package/dist/viewport-math.d.ts.map +1 -0
  69. package/dist/viewport-math.js +106 -0
  70. package/dist/viewport-math.js.map +1 -0
  71. package/dist/viewport.d.ts +28 -0
  72. package/dist/viewport.d.ts.map +1 -0
  73. package/dist/viewport.js +47 -0
  74. package/dist/viewport.js.map +1 -0
  75. package/dist/virtualize.d.ts +55 -0
  76. package/dist/virtualize.d.ts.map +1 -0
  77. package/dist/virtualize.js +96 -0
  78. package/dist/virtualize.js.map +1 -0
  79. package/dist/widget-renderer.d.ts +150 -0
  80. package/dist/widget-renderer.d.ts.map +1 -0
  81. package/dist/widget-renderer.js +399 -0
  82. package/dist/widget-renderer.js.map +1 -0
  83. package/dist/xen-theme.d.ts +8 -0
  84. package/dist/xen-theme.d.ts.map +1 -0
  85. package/dist/xen-theme.js +23 -0
  86. package/dist/xen-theme.js.map +1 -0
  87. package/package.json +63 -0
package/dist/layout.js ADDED
@@ -0,0 +1,360 @@
1
+ import { widgetBindKey, widgetVisibility, widgetIsVisible } from '@xenolithengine/graph-core';
2
+ /** Height of the actions row appended below the pin block: leading gap, button rows stacked with
3
+ * gaps between them. Returns 0 when there are no button widgets. Pin-bound widgets aren't here —
4
+ * they ride inside their pin row, not in a band. */
5
+ function actionsRowHeight(node, geo) {
6
+ if (!geo || !node.widgets || node.widgets.length === 0)
7
+ return 0;
8
+ const buttons = node.widgets.filter((w) => w.type === 'button');
9
+ if (buttons.length === 0)
10
+ return 0;
11
+ return geo.gap + buttons.length * geo.rowHeight + geo.gap * (buttons.length - 1);
12
+ }
13
+ /** A widget is "free-floating" (rides in the body band, not a pin row) in two cases:
14
+ * 1. `custom` widget whose declared bind key doesn't resolve to any pin — these are node-level
15
+ * editors (schema editor, color palette, multi-field panel) that legitimately don't belong
16
+ * to one specific pin.
17
+ * 2. Any widget with explicit `freeFloating: true` — n8n-style config fields (HTTP body, auth
18
+ * token, etc.) that aren't connectable from outside but still need rendering. Bypasses the
19
+ * usual "non-custom widget needs a pin to render" rule.
20
+ * Standard non-custom widgets without a pin or the explicit flag are still silently dropped. */
21
+ export function isFreeFloating(node, w) {
22
+ if (w.type === 'button')
23
+ return false; // buttons live in the actions row, not the body band
24
+ if (w.freeFloating === true)
25
+ return true;
26
+ if (w.type !== 'custom')
27
+ return false;
28
+ const bind = widgetBindKey(w);
29
+ if (bind === undefined)
30
+ return false;
31
+ return findPinByKey(node, bind) === undefined;
32
+ }
33
+ /** A pin is "hidden" when its bound widget evaluates `displayOptions.show=false` AND the pin has
34
+ * no incident edge. The edge clause prevents an active wire from dangling: once a pin is wired,
35
+ * hiding it would orphan the edge visually. Pins without a widget never hide. */
36
+ function pinIsHidden(node, pin, isPinConnected) {
37
+ if (!node.widgets)
38
+ return false;
39
+ // Find the widget bound to this pin (by label or id, mirroring widgetBindKey resolution).
40
+ const w = node.widgets.find((ww) => {
41
+ const bind = widgetBindKey(ww);
42
+ return bind !== undefined && (bind === pin.label || bind === String(pin.id));
43
+ });
44
+ if (!w)
45
+ return false;
46
+ if (widgetIsVisible(w, node))
47
+ return false;
48
+ const bind = widgetBindKey(w);
49
+ if (bind === undefined)
50
+ return true;
51
+ return !isPinConnected?.(bind);
52
+ }
53
+ /** Filter out pins whose widget is `displayOptions.show=false` and aren't wired — see `pinIsHidden`.
54
+ * Use this everywhere layout reads `node.pins` so a conditionally-hidden field collapses cleanly. */
55
+ function visiblePins(node, isPinConnected) {
56
+ return node.pins.filter((p) => !pinIsHidden(node, p, isPinConnected));
57
+ }
58
+ /** Vertical footprint a free-floating widget takes in the body band — covers `text` widgets that
59
+ * need an extra row for their label above the field, and multiline text fields that want 3 rows
60
+ * for the editor box. Custom widgets honour their declared height. Everyone else fits one row. */
61
+ export function freeFloatingHeight(w, rowHeight) {
62
+ if (w.type === 'custom')
63
+ return w.height ?? rowHeight;
64
+ if (w.type === 'text') {
65
+ const field = w.multiline ? rowHeight * 3 : rowHeight;
66
+ return w.label ? field + rowHeight : field;
67
+ }
68
+ // Combo: label-above-field, mirrored from the text widget pattern so box-style widgets line up.
69
+ if (w.type === 'combo')
70
+ return w.label ? rowHeight * 2 : rowHeight;
71
+ return rowHeight;
72
+ }
73
+ /** Height of the body band reserved for free-floating widgets that are CURRENTLY visible: leading
74
+ * gap, each visible widget's declared height, gaps between. Zero when nothing is visible (so a
75
+ * node with conditional widgets shrinks back to compact when all of them are hidden). */
76
+ function freeWidgetsBandHeight(node, geo) {
77
+ if (!geo || !node.widgets || node.widgets.length === 0)
78
+ return 0;
79
+ const free = node.widgets.filter((w) => isFreeFloating(node, w) && widgetIsVisible(w, node));
80
+ if (free.length === 0)
81
+ return 0;
82
+ let h = geo.gap;
83
+ for (let i = 0; i < free.length; i++) {
84
+ const w = free[i];
85
+ h += freeFloatingHeight(w, geo.rowHeight);
86
+ if (i < free.length - 1)
87
+ h += geo.gap;
88
+ }
89
+ return h;
90
+ }
91
+ /** Partition pins into the UE-Blueprint sections: exec pins occupy a row band at the TOP (exec-in
92
+ * left, exec-out right), data pins fill rows below — regardless of declaration order. */
93
+ export function sectionPins(pins) {
94
+ const execIn = [], execOut = [], dataIn = [], dataOut = [];
95
+ for (const p of pins) {
96
+ if (p.kind === 'exec')
97
+ (p.direction === 'in' ? execIn : execOut).push(p);
98
+ else
99
+ (p.direction === 'in' ? dataIn : dataOut).push(p);
100
+ }
101
+ return { execIn, execOut, dataIn, dataOut };
102
+ }
103
+ /** Exec pins always sit in the body band. (Earlier the renderer hoisted a lone exec onto the header
104
+ * line UE-style, but a node may have multiple exec-outs — e.g. Branch/Sequence — and the asymmetry
105
+ * between "hoisted when one, body when many" was confusing. Consistency wins.) */
106
+ function hoisted(_execIn, _execOut) {
107
+ return { hoistIn: false, hoistOut: false };
108
+ }
109
+ /** Body pin rows: the exec band (only NON-hoisted exec pins) plus the data band. Hoisted exec pins
110
+ * ride the header line and don't take a body row. */
111
+ export function pinRowCount(pins) {
112
+ const { execIn, execOut, dataIn, dataOut } = sectionPins(pins);
113
+ const { hoistIn, hoistOut } = hoisted(execIn, execOut);
114
+ const bodyExecRows = Math.max(hoistIn ? 0 : execIn.length, hoistOut ? 0 : execOut.length);
115
+ return bodyExecRows + Math.max(dataIn.length, dataOut.length);
116
+ }
117
+ /** Effective height of each pin row — HYBRID rhythm:
118
+ * - All rows share a UNIFORM base = max(pin.rowHeight, widget.rowHeight if any standard bound
119
+ * widget is visible). Keeps the vertical rhythm consistent across the pin band so labels and
120
+ * standard controls align row-by-row.
121
+ * - A row whose visible bound widget is a CUSTOM widget with its own declared height (curve, XY
122
+ * pad, image preview…) grows ONLY that row to fit. Other rows stay at the base — so a single
123
+ * tall preview doesn't balloon the whole node into mostly-empty space.
124
+ * Drives `naturalHeight`, `computeNodeLayout`, and `computeWidgetRects`. */
125
+ export function pinRowHeights(node, pinRowHeight, widgetRowHeight, isPinConnected) {
126
+ const rows = pinRowCount(visiblePins(node, isPinConnected));
127
+ // Step 1 — uniform base. Bumped to widget.rowHeight when any standard pin-bound widget is visible.
128
+ let base = pinRowHeight;
129
+ const perRow = new Array(rows).fill(undefined);
130
+ if (node.widgets) {
131
+ for (const w of node.widgets) {
132
+ const bind = widgetBindKey(w);
133
+ if (bind === undefined)
134
+ continue; // button — actions row
135
+ if (!findPinByKey(node, bind))
136
+ continue; // orphan
137
+ const visible = (widgetVisibility(w) === 'always' || !(isPinConnected?.(bind))) && widgetIsVisible(w, node);
138
+ if (!visible)
139
+ continue;
140
+ const rowIdx = pinRowIndexFor(node, bind);
141
+ if (rowIdx === undefined)
142
+ continue;
143
+ if (w.type === 'custom' && w.height !== undefined) {
144
+ // Per-row override for tall custom widgets.
145
+ perRow[rowIdx] = Math.max(perRow[rowIdx] ?? 0, w.height);
146
+ }
147
+ else {
148
+ // Standard widget — bumps the uniform base.
149
+ if (widgetRowHeight > base)
150
+ base = widgetRowHeight;
151
+ }
152
+ }
153
+ }
154
+ const out = new Array(rows);
155
+ for (let i = 0; i < rows; i++)
156
+ out[i] = Math.max(base, perRow[i] ?? 0);
157
+ return out;
158
+ }
159
+ /** Sum of all pin row heights + the spacings between them. */
160
+ export function pinBandHeight(rowHeights, rowSpacing) {
161
+ if (rowHeights.length === 0)
162
+ return 0;
163
+ let h = 0;
164
+ for (const r of rowHeights)
165
+ h += r;
166
+ return h + (rowHeights.length - 1) * rowSpacing;
167
+ }
168
+ /** Y of a pin row's centre relative to the node's TOP edge (i.e. local-space y). */
169
+ export function pinRowCenterY(rowHeights, rowIdx, rowSpacing, headerHeight, headerToPinsGap) {
170
+ let y = headerHeight + headerToPinsGap;
171
+ for (let i = 0; i < rowIdx; i++)
172
+ y += rowHeights[i] + rowSpacing;
173
+ return y + rowHeights[rowIdx] / 2;
174
+ }
175
+ /** Per-node uniform effective row height — backward-compat shim. Equals the max of per-row
176
+ * heights. New code should call `pinRowHeights` for accuracy. */
177
+ export function effectivePinRowHeight(node, pinRowHeight, widgetRowHeight, isPinConnected) {
178
+ const heights = pinRowHeights(node, pinRowHeight, widgetRowHeight, isPinConnected);
179
+ let max = pinRowHeight;
180
+ for (const r of heights)
181
+ if (r > max)
182
+ max = r;
183
+ return max;
184
+ }
185
+ /** Match a pinKey against a pin: by label first (schema authors can't predict auto-minted ids),
186
+ * then by id (loaded graphs may bind by serialized id). */
187
+ function pinMatches(pin, pinKey) {
188
+ return pin.label === pinKey || String(pin.id) === pinKey;
189
+ }
190
+ /** Find the pin on a node whose label (or id) matches `pinKey`. Used to resolve a widget's
191
+ * declared binding to a concrete pin. */
192
+ export function findPinByKey(node, pinKey) {
193
+ for (const p of node.pins)
194
+ if (pinMatches(p, pinKey))
195
+ return p;
196
+ return undefined;
197
+ }
198
+ /** Find a pin's row index inside the body band (header-relative). Used to position a pin-bound
199
+ * widget inside the row that contains its pin. Returns undefined when the pin is hoisted onto
200
+ * the header line (no body row to place the widget in). */
201
+ export function pinRowIndexFor(node, pinKey) {
202
+ const { execIn, execOut, dataIn, dataOut } = sectionPins(visiblePins(node));
203
+ const { hoistIn, hoistOut } = hoisted(execIn, execOut);
204
+ const bodyExecIn = hoistIn ? [] : execIn;
205
+ const bodyExecOut = hoistOut ? [] : execOut;
206
+ const bodyExecRows = Math.max(bodyExecIn.length, bodyExecOut.length);
207
+ for (let i = 0; i < bodyExecIn.length; i++)
208
+ if (pinMatches(bodyExecIn[i], pinKey))
209
+ return i;
210
+ for (let i = 0; i < bodyExecOut.length; i++)
211
+ if (pinMatches(bodyExecOut[i], pinKey))
212
+ return i;
213
+ for (let i = 0; i < dataIn.length; i++)
214
+ if (pinMatches(dataIn[i], pinKey))
215
+ return bodyExecRows + i;
216
+ for (let i = 0; i < dataOut.length; i++)
217
+ if (pinMatches(dataOut[i], pinKey))
218
+ return bodyExecRows + i;
219
+ return undefined;
220
+ }
221
+ /** Body height = header + pin rows (each row grown to fit its tallest visible bound widget) +
222
+ * free-floating custom widgets body band + optional actions row of button widgets + bottom
223
+ * padding mirroring the header→pins gap. */
224
+ function naturalHeight(node, tokens, isPinConnected) {
225
+ const rows = pinRowCount(visiblePins(node, isPinConnected));
226
+ const freeBand = freeWidgetsBandHeight(node, tokens.widget);
227
+ const actions = actionsRowHeight(node, tokens.widget);
228
+ if (rows === 0 && actions === 0 && freeBand === 0)
229
+ return tokens.node.headerHeight + tokens.header.toPinsGap;
230
+ const heights = pinRowHeights(node, tokens.pin.rowHeight, tokens.widget?.rowHeight ?? tokens.pin.rowHeight, isPinConnected);
231
+ const rowsHeight = pinBandHeight(heights, tokens.pin.rowSpacing);
232
+ return tokens.node.headerHeight + tokens.header.toPinsGap + rowsHeight + freeBand + actions + tokens.header.toPinsGap;
233
+ }
234
+ /** Gap kept between an input label's right edge and the opposite output label's left edge so the
235
+ * two columns never touch. */
236
+ const LABEL_COLUMN_GUTTER = 14;
237
+ /** Max width a header title may add to the node. Beyond this the renderer ellipsises the title rather
238
+ * than stretching the node — keeps a pathological rename from producing a giant node. */
239
+ const TITLE_MAX_WIDTH = 220;
240
+ /** Natural body width that fits the header title and every input/output label pair without
241
+ * overlap. Mirrors the exact placement geometry in `renderNode` (title inset, pin label
242
+ * insets) so the measured width matches what is actually drawn. */
243
+ function naturalWidth(node, title, tokens, measure, isPinConnected) {
244
+ // Title region: chevron sits at the left, title starts just past it. Keep the same trailing
245
+ // padding on the right as the chevron's left inset for visual symmetry.
246
+ const chevronCenterX = tokens.node.headerPadding + 8 + tokens.header.chevronSize / 2 - 4;
247
+ const titleX = chevronCenterX + tokens.header.chevronSize / 2 + tokens.header.titleGap;
248
+ // Cap the title's pull on width: short titles size the node fully, but a very long title is
249
+ // ellipsised by the renderer instead of stretching the node forever. Pin/widget rows still drive
250
+ // width uncapped, so a long PIN label always fits.
251
+ const titleW = Math.min(measure(title, tokens.typography.titleSize, tokens.typography.titleWeight), TITLE_MAX_WIDTH);
252
+ const { execIn, execOut, dataIn, dataOut } = sectionPins(visiblePins(node, isPinConnected));
253
+ const { hoistIn, hoistOut } = hoisted(execIn, execOut);
254
+ // A hoisted exec-out sits at the header's right edge — reserve room so the title can't collide with it.
255
+ const headerExecReserve = hoistOut ? tokens.pin.diameter + tokens.header.titleGap : 0;
256
+ const titleNeed = titleX + titleW + tokens.node.headerPadding + 6 + headerExecReserve;
257
+ // Pin labels are inset from each edge by (pin radius + labelGap). Rows pair an input with the output
258
+ // on the same row; their labels must not collide. Only NON-hoisted exec pins sit in the body band;
259
+ // a hoisted single exec rides the header line and doesn't constrain a body row.
260
+ const sidePad = tokens.pin.diameter / 2 + tokens.pin.labelGap;
261
+ const labelW = (p) => p?.label ? measure(p.label, tokens.typography.labelSize, tokens.typography.labelWeight) : 0;
262
+ let rowNeed = 0;
263
+ const rowPair = (a, b) => {
264
+ const inW = labelW(a), outW = labelW(b);
265
+ const gutter = inW > 0 && outW > 0 ? LABEL_COLUMN_GUTTER : 0;
266
+ rowNeed = Math.max(rowNeed, sidePad + inW + gutter + outW + sidePad);
267
+ };
268
+ const bodyExecIn = hoistIn ? [] : execIn;
269
+ const bodyExecOut = hoistOut ? [] : execOut;
270
+ for (let i = 0; i < Math.max(bodyExecIn.length, bodyExecOut.length); i++)
271
+ rowPair(bodyExecIn[i], bodyExecOut[i]);
272
+ for (let j = 0; j < Math.max(dataIn.length, dataOut.length); j++)
273
+ rowPair(dataIn[j], dataOut[j]);
274
+ // Pin-bound widget: its pin's label sits on the left, control on the right of the same row.
275
+ // For a custom widget that declares its own `height`, we render the control as a SQUARE — so the
276
+ // width to reserve is the widget's height. Standard controls reserve the theme `controlMinWidth`.
277
+ // A button widget stretches the full content width; its label itself must fit.
278
+ let widgetNeed = 0;
279
+ if (tokens.widget && node.widgets) {
280
+ for (const w of node.widgets) {
281
+ if (w.type === 'button') {
282
+ const btnW = measure(w.label, tokens.typography.labelSize, tokens.typography.labelWeight);
283
+ widgetNeed = Math.max(widgetNeed, sidePad + btnW + sidePad);
284
+ continue;
285
+ }
286
+ const bind = widgetBindKey(w);
287
+ if (bind === undefined)
288
+ continue;
289
+ // Free-floating custom widget: full-width band row, just declared height (square not required).
290
+ if (isFreeFloating(node, w)) {
291
+ if (!widgetIsVisible(w, node))
292
+ continue;
293
+ const h = w.type === 'custom' ? (w.height ?? tokens.widget.rowHeight) : tokens.widget.rowHeight;
294
+ widgetNeed = Math.max(widgetNeed, sidePad + h + sidePad); // square-ish min so the body looks balanced
295
+ continue;
296
+ }
297
+ const visible = (widgetVisibility(w) === 'always' || !isPinConnected?.(bind)) && widgetIsVisible(w, node);
298
+ if (!visible)
299
+ continue;
300
+ const pinLabel = node.pins.find((p) => p.label === bind || String(p.id) === bind)?.label ?? '';
301
+ const lblW = measure(pinLabel, tokens.typography.labelSize, tokens.typography.labelWeight);
302
+ const ctrlW = (w.type === 'custom' && w.height !== undefined) ? w.height : tokens.widget.controlMinWidth;
303
+ widgetNeed = Math.max(widgetNeed, sidePad + lblW + LABEL_COLUMN_GUTTER + ctrlW + sidePad);
304
+ }
305
+ }
306
+ return Math.max(tokens.node.minWidth, Math.ceil(titleNeed), Math.ceil(rowNeed), Math.ceil(widgetNeed));
307
+ }
308
+ /** Resolved render size for a node lacking an explicit `size`. Single source of truth: the editor
309
+ * backfills `node.size` with this so renderer, geom bounds, edge endpoints and the backdrop all
310
+ * agree on dimensions. */
311
+ export function measureNodeSize(node, title, tokens, measure, isPinConnected) {
312
+ return {
313
+ x: naturalWidth(node, title, tokens, measure, isPinConnected),
314
+ y: naturalHeight(node, tokens, isPinConnected),
315
+ };
316
+ }
317
+ export function computeNodeLayout(node, tokens, isPinConnected) {
318
+ const width = node.size?.x ?? tokens.node.minWidth;
319
+ const height = node.size?.y ?? naturalHeight(node, tokens, isPinConnected);
320
+ const body = {
321
+ x: node.position.x,
322
+ y: node.position.y,
323
+ width,
324
+ height,
325
+ };
326
+ const header = {
327
+ x: node.position.x,
328
+ y: node.position.y,
329
+ width,
330
+ height: tokens.node.headerHeight,
331
+ };
332
+ // Per-row pin heights — a row with a tall custom-widget bound to its pin (e.g. a 120px curve
333
+ // editor) grows just THAT row, leaving the rest at the theme's pinRowHeight.
334
+ const rowHeights = pinRowHeights(node, tokens.pin.rowHeight, tokens.widget?.rowHeight ?? tokens.pin.rowHeight, isPinConnected);
335
+ const rowY = (rowIdx) => node.position.y + pinRowCenterY(rowHeights, rowIdx, tokens.pin.rowSpacing, tokens.node.headerHeight, tokens.header.toPinsGap);
336
+ // UE-Blueprint placement. A single label-less exec pin is HOISTED onto the header line (exec-in at
337
+ // the header's left edge, exec-out at the right, centred on the title). Otherwise exec pins form the
338
+ // top body band (exec-in left / exec-out right), with data pins below — independent of declaration order.
339
+ const { execIn, execOut, dataIn, dataOut } = sectionPins(visiblePins(node, isPinConnected));
340
+ const { hoistIn, hoistOut } = hoisted(execIn, execOut);
341
+ const headerY = node.position.y + tokens.node.headerHeight / 2;
342
+ const pins = [];
343
+ const place = (list, side, startRow) => {
344
+ const x = side === 'left' ? node.position.x : node.position.x + width;
345
+ list.forEach((p, i) => pins.push({ id: p.id, x, y: rowY(startRow + i), side }));
346
+ };
347
+ if (hoistIn)
348
+ pins.push({ id: execIn[0].id, x: node.position.x, y: headerY, side: 'left' });
349
+ if (hoistOut)
350
+ pins.push({ id: execOut[0].id, x: node.position.x + width, y: headerY, side: 'right' });
351
+ const bodyExecIn = hoistIn ? [] : execIn;
352
+ const bodyExecOut = hoistOut ? [] : execOut;
353
+ const bodyExecRows = Math.max(bodyExecIn.length, bodyExecOut.length);
354
+ place(bodyExecIn, 'left', 0);
355
+ place(bodyExecOut, 'right', 0);
356
+ place(dataIn, 'left', bodyExecRows);
357
+ place(dataOut, 'right', bodyExecRows);
358
+ return { body, header, pins };
359
+ }
360
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAS7F;;qDAEqD;AACrD,SAAS,gBAAgB,CAAC,IAAU,EAAE,GAA+B;IACnE,IAAI,CAAC,GAAG,IAAI,CAAC,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EAAE,EAAE,MAAM,CAAC,CAAC,CAAE,CAAC,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;IAC3F,IAAI,QAAQ;QAAE,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC,CAAE,CAAC,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAA;IACtG,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAA;IACxC,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAA;IAC3C,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACpE,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;IAC5B,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;IAC9B,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,CAAA;IACnC,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAA;IAErC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;AAC/B,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { Container } from 'pixi.js';
2
+ import type { XenTokens } from '@xenolithengine/graph-theme-xen';
3
+ export type MacroFrameState = 'default' | 'hover' | 'selected';
4
+ export interface FrameRect {
5
+ x: number;
6
+ y: number;
7
+ width: number;
8
+ height: number;
9
+ }
10
+ export interface MacroFrameView {
11
+ readonly container: Container;
12
+ /** Header strip — interactive (editor wires double-click to collapse). */
13
+ readonly header: Container;
14
+ /** Body rect — interactive; captures clicks inside the frame. The editor wires it so a click in an
15
+ * ancestor frame's body (outside a deeper open child) collapses the child. */
16
+ readonly body: Container;
17
+ readonly headerHeight: number;
18
+ update(rect: FrameRect, title: string): void;
19
+ setState(state: MacroFrameState): void;
20
+ destroy(): void;
21
+ }
22
+ /**
23
+ * Expanded-macro frame — a themed group rectangle drawn behind the member nodes. The accent is the
24
+ * theme's `category.macro` colour and the header follows the theme's frame style (`gradient` = Xen
25
+ * node-header recipe; `tint` = Liquid Glass flat accent inset), so a macro reads natively in each
26
+ * theme. Body is non-interactive (clicks reach members); only the header captures pointer events.
27
+ */
28
+ export declare function renderMacroFrame(tokens: XenTokens, headerStyle?: 'gradient' | 'tint'): MacroFrameView;
29
+ //# sourceMappingURL=macro-frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"macro-frame.d.ts","sourceRoot":"","sources":["../src/macro-frame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,SAAS,EAA0B,MAAM,SAAS,CAAA;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAEhE,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAA;AAC9D,MAAM,WAAW,SAAS;IAAG,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AAElF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,0EAA0E;IAC1E,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B;mFAC+E;IAC/E,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5C,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,CAAA;IACtC,OAAO,IAAI,IAAI,CAAA;CAChB;AAgBD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,GAAE,UAAU,GAAG,MAAmB,GAAG,cAAc,CAuFjH"}
@@ -0,0 +1,116 @@
1
+ import { BitmapText, Color, Container, Graphics, FillGradient } from 'pixi.js';
2
+ const rgba = (color, a) => {
3
+ const c = new Color(color);
4
+ return `rgba(${Math.round(c.red * 255)}, ${Math.round(c.green * 255)}, ${Math.round(c.blue * 255)}, ${a})`;
5
+ };
6
+ function topRoundedRect(g, w, h, r) {
7
+ const radius = Math.max(0, Math.min(r, w / 2, h));
8
+ return g.moveTo(radius, 0).lineTo(w - radius, 0).arcTo(w, 0, w, radius, radius)
9
+ .lineTo(w, h).lineTo(0, h).lineTo(0, radius).arcTo(0, 0, radius, 0, radius).closePath();
10
+ }
11
+ function topRimPath(g, w, r) {
12
+ const radius = Math.max(0, Math.min(r, w / 2));
13
+ return g.moveTo(0, radius).arcTo(0, 0, radius, 0, radius).lineTo(w - radius, 0).arcTo(w, 0, w, radius, radius);
14
+ }
15
+ /**
16
+ * Expanded-macro frame — a themed group rectangle drawn behind the member nodes. The accent is the
17
+ * theme's `category.macro` colour and the header follows the theme's frame style (`gradient` = Xen
18
+ * node-header recipe; `tint` = Liquid Glass flat accent inset), so a macro reads natively in each
19
+ * theme. Body is non-interactive (clicks reach members); only the header captures pointer events.
20
+ */
21
+ export function renderMacroFrame(tokens, headerStyle = 'gradient') {
22
+ const geo = tokens.geometry.comment;
23
+ const typo = tokens.typography.comment;
24
+ const headerHeight = geo.headerHeight;
25
+ const radius = geo.radius ?? tokens.geometry.node.radius;
26
+ const accent = tokens.category.macro.accent;
27
+ const container = new Container({ label: 'macro-frame' });
28
+ // Body is interactive so a click on empty space INSIDE the expanded frame is captured here (not
29
+ // treated as a click-outside that would collapse the macro). Members sit above and take their own clicks.
30
+ const body = new Graphics();
31
+ body.eventMode = 'static';
32
+ body.on('pointerdown', (e) => e.stopPropagation());
33
+ const headerBase = new Graphics();
34
+ headerBase.eventMode = 'none';
35
+ const headerFillG = new Graphics();
36
+ headerFillG.eventMode = 'none';
37
+ const headerHighlight = new Graphics();
38
+ headerHighlight.eventMode = 'none';
39
+ const headerRim = new Graphics();
40
+ headerRim.eventMode = 'none';
41
+ const border = new Graphics();
42
+ border.eventMode = 'none';
43
+ const header = new Container({ label: 'macro-frame-header' });
44
+ header.eventMode = 'static';
45
+ header.cursor = 'pointer';
46
+ const headerHit = new Graphics();
47
+ headerHit.eventMode = 'static';
48
+ header.addChild(headerHit);
49
+ const title = new BitmapText({
50
+ text: 'Macro',
51
+ style: { fontFamily: tokens.typography.fontFamily, fontSize: typo.size, fontWeight: '700', fill: typo.color },
52
+ });
53
+ title.eventMode = 'none';
54
+ title.anchor.set(0, 0.5);
55
+ title.x = 10;
56
+ title.y = headerHeight / 2;
57
+ container.addChild(body, headerBase, headerFillG, headerHighlight, border, headerRim, header, title);
58
+ const highlightGrad = new FillGradient({
59
+ type: 'linear', start: { x: 0, y: 0 }, end: { x: 0, y: 1 },
60
+ colorStops: [{ offset: 0, color: 'rgba(255,255,255,0.25)' }, { offset: 0.6, color: 'rgba(255,255,255,0)' }], textureSpace: 'local',
61
+ });
62
+ const rimGrad = new FillGradient({
63
+ type: 'linear', start: { x: 0, y: 0 }, end: { x: 0, y: 1 },
64
+ colorStops: [{ offset: 0, color: 'rgba(255,255,255,0.8)' }, { offset: 1, color: 'rgba(255,255,255,0)' }], textureSpace: 'local',
65
+ });
66
+ const headerFill = new FillGradient({
67
+ type: 'linear', start: { x: 0, y: 0 }, end: { x: 1, y: 0 },
68
+ colorStops: [{ offset: 0, color: rgba(accent, 0.6) }, { offset: 1, color: rgba(accent, 0) }], textureSpace: 'local',
69
+ });
70
+ let cur = { x: 0, y: 0, width: 0, height: 0 };
71
+ let state = 'default';
72
+ const drawBorder = () => {
73
+ const w = cur.width, h = cur.height;
74
+ border.clear();
75
+ if (state === 'selected')
76
+ border.roundRect(0, 0, w, h, radius).stroke({ color: 0xffffff, width: 2, alpha: 0.95 });
77
+ else
78
+ border.roundRect(0, 0, w, h, radius).stroke({ color: accent, width: state === 'hover' ? 2 : 1.5, alpha: state === 'hover' ? 0.9 : 0.6 });
79
+ };
80
+ const update = (rect, label) => {
81
+ cur = rect;
82
+ const w = rect.width, h = rect.height;
83
+ container.position.set(rect.x, rect.y);
84
+ // Expanded macro reads as a focused panel — a fairly opaque body so members inside stand out and
85
+ // the rest of the graph (behind it) is visually pushed back.
86
+ body.clear().roundRect(0, 0, w, h, radius).fill({ color: tokens.color.surface.canvas, alpha: 0.86 })
87
+ .roundRect(0, 0, w, h, radius).fill({ color: tokens.color.surface.node, alpha: 0.55 })
88
+ .roundRect(0, 0, w, h, radius).fill({ color: accent, alpha: 0.12 });
89
+ headerBase.clear();
90
+ headerFillG.clear();
91
+ headerHighlight.clear();
92
+ headerRim.clear();
93
+ if (headerStyle === 'tint') {
94
+ headerFillG.roundRect(2, 2, w - 4, headerHeight - 1, Math.max(0, radius - 1)).fill({ color: accent, alpha: 0.45 });
95
+ }
96
+ else {
97
+ topRoundedRect(headerBase, w, headerHeight, radius).fill({ color: tokens.color.surface.node });
98
+ topRoundedRect(headerFillG, w, headerHeight, radius).fill(headerFill);
99
+ topRoundedRect(headerHighlight, w, headerHeight, radius).fill(highlightGrad);
100
+ topRimPath(headerRim, w, radius).stroke({ width: 0.75, fill: rimGrad, alignment: 0 });
101
+ }
102
+ headerHit.clear().rect(0, 0, w, headerHeight).fill({ color: 0xffffff, alpha: 0.001 });
103
+ title.text = label;
104
+ drawBorder();
105
+ };
106
+ return {
107
+ container, header, body, headerHeight,
108
+ update,
109
+ setState: (s) => { if (s !== state) {
110
+ state = s;
111
+ drawBorder();
112
+ } },
113
+ destroy: () => { highlightGrad.destroy(); rimGrad.destroy(); headerFill.destroy(); container.destroy({ children: true }); },
114
+ };
115
+ }
116
+ //# sourceMappingURL=macro-frame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"macro-frame.js","sourceRoot":"","sources":["../src/macro-frame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAmB9E,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,CAAS,EAAU,EAAE;IAChD,MAAM,CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,CAAA;IAC1B,OAAO,QAAQ,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAA;AAC5G,CAAC,CAAA;AACD,SAAS,cAAc,CAAC,CAAW,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS;IAClE,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IACjD,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC;SAC5E,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM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