@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.
- package/LICENSE +21 -0
- package/README.md +49 -0
- package/dist/bezier.d.ts +30 -0
- package/dist/bezier.d.ts.map +1 -0
- package/dist/bezier.js +70 -0
- package/dist/bezier.js.map +1 -0
- package/dist/comment-renderer.d.ts +35 -0
- package/dist/comment-renderer.d.ts.map +1 -0
- package/dist/comment-renderer.js +194 -0
- package/dist/comment-renderer.js.map +1 -0
- package/dist/edge-paths.d.ts +24 -0
- package/dist/edge-paths.d.ts.map +1 -0
- package/dist/edge-paths.js +123 -0
- package/dist/edge-paths.js.map +1 -0
- package/dist/edge-renderer.d.ts +29 -0
- package/dist/edge-renderer.d.ts.map +1 -0
- package/dist/edge-renderer.js +99 -0
- package/dist/edge-renderer.js.map +1 -0
- package/dist/geom.d.ts +46 -0
- package/dist/geom.d.ts.map +1 -0
- package/dist/geom.js +54 -0
- package/dist/geom.js.map +1 -0
- package/dist/grid.d.ts +12 -0
- package/dist/grid.d.ts.map +1 -0
- package/dist/grid.js +35 -0
- package/dist/grid.js.map +1 -0
- package/dist/icons.d.ts +14 -0
- package/dist/icons.d.ts.map +1 -0
- package/dist/icons.js +32 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/interaction.d.ts +69 -0
- package/dist/interaction.d.ts.map +1 -0
- package/dist/interaction.js +229 -0
- package/dist/interaction.js.map +1 -0
- package/dist/layout.d.ts +126 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +360 -0
- package/dist/layout.js.map +1 -0
- package/dist/macro-frame.d.ts +29 -0
- package/dist/macro-frame.d.ts.map +1 -0
- package/dist/macro-frame.js +116 -0
- package/dist/macro-frame.js.map +1 -0
- package/dist/node-renderer.d.ts +102 -0
- package/dist/node-renderer.d.ts.map +1 -0
- package/dist/node-renderer.js +776 -0
- package/dist/node-renderer.js.map +1 -0
- package/dist/reroute-renderer.d.ts +25 -0
- package/dist/reroute-renderer.d.ts.map +1 -0
- package/dist/reroute-renderer.js +163 -0
- package/dist/reroute-renderer.js.map +1 -0
- package/dist/style.d.ts +56 -0
- package/dist/style.d.ts.map +1 -0
- package/dist/style.js +102 -0
- package/dist/style.js.map +1 -0
- package/dist/text-measure.d.ts +6 -0
- package/dist/text-measure.d.ts.map +1 -0
- package/dist/text-measure.js +21 -0
- package/dist/text-measure.js.map +1 -0
- package/dist/theme.d.ts +86 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +2 -0
- package/dist/theme.js.map +1 -0
- package/dist/viewport-math.d.ts +68 -0
- package/dist/viewport-math.d.ts.map +1 -0
- package/dist/viewport-math.js +106 -0
- package/dist/viewport-math.js.map +1 -0
- package/dist/viewport.d.ts +28 -0
- package/dist/viewport.d.ts.map +1 -0
- package/dist/viewport.js +47 -0
- package/dist/viewport.js.map +1 -0
- package/dist/virtualize.d.ts +55 -0
- package/dist/virtualize.d.ts.map +1 -0
- package/dist/virtualize.js +96 -0
- package/dist/virtualize.js.map +1 -0
- package/dist/widget-renderer.d.ts +150 -0
- package/dist/widget-renderer.d.ts.map +1 -0
- package/dist/widget-renderer.js +399 -0
- package/dist/widget-renderer.js.map +1 -0
- package/dist/xen-theme.d.ts +8 -0
- package/dist/xen-theme.d.ts.map +1 -0
- package/dist/xen-theme.js +23 -0
- package/dist/xen-theme.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
import { BitmapText, Container, Graphics, Sprite, Text, Texture } from 'pixi.js';
|
|
2
|
+
import { comboOptions, widgetValue, widgetVisibility, widgetBindKey, widgetIsVisible } from '@xenolithengine/graph-core';
|
|
3
|
+
import { pinRowCount, pinRowHeights, pinBandHeight, pinRowCenterY, pinRowIndexFor, isFreeFloating, freeFloatingHeight } from './layout.js';
|
|
4
|
+
export function isDomWidgetController(c) {
|
|
5
|
+
return 'mount' in c;
|
|
6
|
+
}
|
|
7
|
+
export function resolveWidgetStyle(tokens, override) {
|
|
8
|
+
const c = tokens.color.widget;
|
|
9
|
+
const g = tokens.geometry.widget;
|
|
10
|
+
const o = override ?? {};
|
|
11
|
+
return {
|
|
12
|
+
bg: o.bg ?? c.bg, bgHover: o.bgHover ?? c.bgHover, bgFocused: o.bgFocused ?? c.bgFocused,
|
|
13
|
+
track: o.track ?? c.track, fill: o.fill ?? c.fill, fillAlpha: o.fillAlpha ?? c.fillAlpha,
|
|
14
|
+
text: o.text ?? c.text, label: o.label ?? c.label, placeholder: o.placeholder ?? c.placeholder,
|
|
15
|
+
border: o.border ?? c.border, borderFocused: o.borderFocused ?? c.borderFocused,
|
|
16
|
+
selection: o.selection ?? c.selection, knob: o.knob ?? c.knob,
|
|
17
|
+
radius: o.radius ?? g.radius, paddingX: o.paddingX ?? g.paddingX, paddingY: o.paddingY ?? g.paddingY,
|
|
18
|
+
borderWidth: o.borderWidth ?? g.borderWidth,
|
|
19
|
+
toggleWidth: o.toggleWidth ?? g.toggleWidth, toggleHeight: o.toggleHeight ?? g.toggleHeight,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** The active widget theme as CSS custom properties. The editor sets these on each DOM-mounted
|
|
23
|
+
* custom widget's host element, so a widget author (any framework, or vanilla) can style with
|
|
24
|
+
* `var(--xeno-accent)`, `var(--xeno-bg)`, … and look correct in every theme — and restyle for free
|
|
25
|
+
* when the theme changes. This is the basis for a theme-agnostic widget/plugin ecosystem. */
|
|
26
|
+
export function widgetCssVars(c) {
|
|
27
|
+
return {
|
|
28
|
+
'--xeno-accent': c.fill,
|
|
29
|
+
'--xeno-bg': c.bg,
|
|
30
|
+
'--xeno-bg-hover': c.bgHover,
|
|
31
|
+
'--xeno-bg-focused': c.bgFocused,
|
|
32
|
+
'--xeno-track': c.track,
|
|
33
|
+
'--xeno-text': c.text,
|
|
34
|
+
'--xeno-muted': c.label,
|
|
35
|
+
'--xeno-placeholder': c.placeholder,
|
|
36
|
+
'--xeno-border': c.border,
|
|
37
|
+
'--xeno-border-focused': c.borderFocused,
|
|
38
|
+
'--xeno-selection': c.selection,
|
|
39
|
+
'--xeno-knob': c.knob,
|
|
40
|
+
'--xeno-radius': `${c.radius}px`,
|
|
41
|
+
'--xeno-padding-x': `${c.paddingX}px`,
|
|
42
|
+
'--xeno-padding-y': `${c.paddingY}px`,
|
|
43
|
+
'--xeno-border-width': `${c.borderWidth}px`,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/** The active theme as panel/control CSS custom properties. The editor sets these on the host root
|
|
47
|
+
* so in-editor chrome — `<XenolithPanel>`, `<XenolithControls>`, buttons, any framework component
|
|
48
|
+
* portalled into `editor.overlayRoot` — styles with `var(--xeno-panel)`, `var(--xeno-accent)`, …
|
|
49
|
+
* and restyles for free on `setTheme`. Complements `widgetCssVars` (per-widget input surfaces);
|
|
50
|
+
* shares the `--xeno-accent`/`--xeno-text`/`--xeno-muted`/`--xeno-border`/`--xeno-radius` vocabulary. */
|
|
51
|
+
export function themeCssVars(tokens) {
|
|
52
|
+
const c = tokens.color;
|
|
53
|
+
return {
|
|
54
|
+
'--xeno-accent': c.widget.fill,
|
|
55
|
+
'--xeno-canvas': c.surface.canvas,
|
|
56
|
+
'--xeno-panel': c.surface.panel,
|
|
57
|
+
'--xeno-elevated': c.surface.elevated,
|
|
58
|
+
'--xeno-surface-muted': c.surface.muted,
|
|
59
|
+
'--xeno-text': c.text.primary,
|
|
60
|
+
'--xeno-text-secondary': c.text.secondary,
|
|
61
|
+
'--xeno-muted': c.text.muted,
|
|
62
|
+
'--xeno-border': c.surface.outline,
|
|
63
|
+
'--xeno-divider': c.surface.divider,
|
|
64
|
+
'--xeno-radius': `${tokens.geometry.widget.radius}px`,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function controlHeight(w, rowHeight) {
|
|
68
|
+
// A custom widget declares its own height; everything else fits the standard control row.
|
|
69
|
+
if (w.type === 'custom')
|
|
70
|
+
return w.height ?? rowHeight;
|
|
71
|
+
return rowHeight;
|
|
72
|
+
}
|
|
73
|
+
/** Pick the value a widget should display this frame. The contract: a widget bound to an IN-pin
|
|
74
|
+
* with `visibility:'always'` is a DISPLAY widget — when the pin is wired it shows the upstream
|
|
75
|
+
* runtime value (via the host's `pinLiveValue` callback); otherwise it shows its stored state.
|
|
76
|
+
* Applies to BOTH custom and built-in widgets (slider/number/text/combo/color/toggle) — the
|
|
77
|
+
* promise is the same regardless of widget type. */
|
|
78
|
+
export function resolveDisplayValue(spec, node, ctx) {
|
|
79
|
+
const bind = widgetBindKey(spec);
|
|
80
|
+
if (bind && widgetVisibility(spec) === 'always' && ctx?.isPinConnected(bind) && ctx?.pinLiveValue) {
|
|
81
|
+
const live = ctx.pinLiveValue(bind);
|
|
82
|
+
if (live !== undefined)
|
|
83
|
+
return live;
|
|
84
|
+
}
|
|
85
|
+
return widgetValue(node, spec);
|
|
86
|
+
}
|
|
87
|
+
/** Local-space rects for every visible widget. The canon: every widget is bound to one IN-pin
|
|
88
|
+
* (via `widgetBindKey`) and renders INSIDE that pin's row — pin dot + label on the left, control
|
|
89
|
+
* on the right. `button` widgets aren't pin-bound — they stack in an "actions row" under the pin
|
|
90
|
+
* block. Visibility per widget follows `widgetVisibility`: input controls hide on connect, custom
|
|
91
|
+
* widgets display live runtime values when connected. Returns rects in source order; pin-bound
|
|
92
|
+
* ones whose pin can't be resolved (or is hoisted to the header) are silently skipped. */
|
|
93
|
+
export function computeWidgetRects(node, width, tokens, ctx) {
|
|
94
|
+
if (!node.widgets || node.widgets.length === 0)
|
|
95
|
+
return [];
|
|
96
|
+
// Per-row pin heights so a tall custom widget grows ONLY its row (other rows stay theme rowH).
|
|
97
|
+
const rowHeights = pinRowHeights(node, tokens.pin.rowHeight, tokens.widget.rowHeight, ctx?.isPinConnected);
|
|
98
|
+
const bandH = pinBandHeight(rowHeights, tokens.pin.rowSpacing);
|
|
99
|
+
// Pin label / widget column inset — keeps left/right edges of widget rects aligned with the pin
|
|
100
|
+
// label columns above them. Falls back to widget.paddingX only when pin geometry is absent.
|
|
101
|
+
const padX = (tokens.pin.diameter !== undefined && tokens.pin.labelGap !== undefined)
|
|
102
|
+
? tokens.pin.diameter / 2 + tokens.pin.labelGap
|
|
103
|
+
: tokens.widget.paddingX;
|
|
104
|
+
// Free-floating custom widgets band starts below the pin block; one row per widget at its own
|
|
105
|
+
// declared height. Then the actions row stacks underneath.
|
|
106
|
+
let bandY = tokens.node.headerHeight + tokens.header.toPinsGap + bandH + tokens.widget.gap;
|
|
107
|
+
const out = [];
|
|
108
|
+
// Pass 1 — free-floating widgets (body band). Text widgets get extra height for their label
|
|
109
|
+
// row + field; multiline text grows to 3 rows. Without this a labelled `text` widget collapses
|
|
110
|
+
// to one row and only the label paints — no visible input area (image #43 regression).
|
|
111
|
+
for (const w of node.widgets) {
|
|
112
|
+
if (!isFreeFloating(node, w))
|
|
113
|
+
continue;
|
|
114
|
+
if (!widgetIsVisible(w, node))
|
|
115
|
+
continue;
|
|
116
|
+
const h = freeFloatingHeight(w, tokens.widget.rowHeight);
|
|
117
|
+
out.push({ id: w.id, x: padX, y: bandY, width: width - padX * 2, height: h });
|
|
118
|
+
bandY += h + tokens.widget.gap;
|
|
119
|
+
}
|
|
120
|
+
// Pass 2 — buttons (actions row, beneath the free band).
|
|
121
|
+
let actionsY = bandY;
|
|
122
|
+
for (const w of node.widgets) {
|
|
123
|
+
if (w.type !== 'button')
|
|
124
|
+
continue;
|
|
125
|
+
if (!widgetIsVisible(w, node))
|
|
126
|
+
continue;
|
|
127
|
+
const h = tokens.widget.rowHeight;
|
|
128
|
+
out.push({ id: w.id, x: padX, y: actionsY, width: width - padX * 2, height: h });
|
|
129
|
+
actionsY += h + tokens.widget.gap;
|
|
130
|
+
}
|
|
131
|
+
// Pass 3 — pin-bound widgets inline in their pin rows.
|
|
132
|
+
for (const w of node.widgets) {
|
|
133
|
+
if (w.type === 'button' || isFreeFloating(node, w))
|
|
134
|
+
continue;
|
|
135
|
+
const bindKey = widgetBindKey(w);
|
|
136
|
+
if (bindKey === undefined)
|
|
137
|
+
continue;
|
|
138
|
+
const visible = (widgetVisibility(w) === 'always' || !(ctx?.isPinConnected(bindKey))) && widgetIsVisible(w, node);
|
|
139
|
+
if (!visible)
|
|
140
|
+
continue;
|
|
141
|
+
const rowIdx = pinRowIndexFor(node, bindKey);
|
|
142
|
+
if (rowIdx === undefined)
|
|
143
|
+
continue; // pin not found OR hoisted into header — nowhere to host it
|
|
144
|
+
const cy = pinRowCenterY(rowHeights, rowIdx, tokens.pin.rowSpacing, tokens.node.headerHeight, tokens.header.toPinsGap);
|
|
145
|
+
// The widget takes the row's full natural height (so a 120px curve fits). Clamp only against
|
|
146
|
+
// the row's actual height (never crops a custom widget by clipping to default rowHeight).
|
|
147
|
+
const h = Math.min(controlHeight(w, tokens.widget.rowHeight), rowHeights[rowIdx]);
|
|
148
|
+
// Custom widgets declaring their own height render as a SQUARE (width = height) anchored to
|
|
149
|
+
// the right edge — curve editors, XY pads, image previews all want a 1:1 aspect by default.
|
|
150
|
+
// Standard controls (number/slider/combo/toggle/color/text) stretch across the row's right
|
|
151
|
+
// half so the value/track has room to breathe.
|
|
152
|
+
const wantsSquare = w.type === 'custom' && w.height !== undefined;
|
|
153
|
+
const rightX = width - padX;
|
|
154
|
+
let wX, wW;
|
|
155
|
+
if (wantsSquare) {
|
|
156
|
+
wW = Math.min(h, width - 2 * padX);
|
|
157
|
+
wX = rightX - wW;
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
wX = Math.floor(width / 2);
|
|
161
|
+
wW = width - wX - padX;
|
|
162
|
+
}
|
|
163
|
+
out.push({ id: w.id, x: wX, y: Math.round(cy - h / 2), width: wW, height: h });
|
|
164
|
+
}
|
|
165
|
+
return out;
|
|
166
|
+
}
|
|
167
|
+
const num = (v) => (typeof v === 'number' ? v : Number(v) || 0);
|
|
168
|
+
/** Builds the WebGL widget rows for a node's expanded form. Pure PIXI — interaction is wired by the
|
|
169
|
+
* editor against `widgetHit`. */
|
|
170
|
+
export function renderWidgets(node, width, tokens, layoutTokens, customWidgets, ctx) {
|
|
171
|
+
const container = new Container({ label: `widgets:${node.id}` });
|
|
172
|
+
const rects = computeWidgetRects(node, width, layoutTokens, ctx);
|
|
173
|
+
const fontFamily = tokens.typography.fontFamily;
|
|
174
|
+
const labelSize = tokens.typography.label.size;
|
|
175
|
+
const wRowHeight = layoutTokens.widget.rowHeight;
|
|
176
|
+
const byId = new Map();
|
|
177
|
+
const specById = new Map(node.widgets?.map((w) => [w.id, w]) ?? []);
|
|
178
|
+
for (const rect of rects) {
|
|
179
|
+
const spec = specById.get(rect.id);
|
|
180
|
+
// Per-widget resolved style: theme widget tokens + this widget's own `style` override.
|
|
181
|
+
const c = resolveWidgetStyle(tokens, spec.style);
|
|
182
|
+
const radius = c.radius, padX = c.paddingX, padY = c.paddingY, borderW = c.borderWidth;
|
|
183
|
+
const row = new Container();
|
|
184
|
+
row.position.set(rect.x, rect.y);
|
|
185
|
+
container.addChild(row);
|
|
186
|
+
// Custom widget: canvas-draw path paints into a 2D canvas → texture. DOM-mounted controllers
|
|
187
|
+
// are positioned over the widget by the editor; here we just leave the (transparent) rect.
|
|
188
|
+
const controller = spec.type === 'custom' ? customWidgets?.get(spec.renderer) : undefined;
|
|
189
|
+
if (spec.type === 'custom' && controller && !isDomWidgetController(controller) && typeof document !== 'undefined') {
|
|
190
|
+
const dpr = Math.min(2, (globalThis.devicePixelRatio || 1));
|
|
191
|
+
const cv = document.createElement('canvas');
|
|
192
|
+
cv.width = Math.max(1, Math.round(rect.width * dpr));
|
|
193
|
+
cv.height = Math.max(1, Math.round(rect.height * dpr));
|
|
194
|
+
const c2d = cv.getContext('2d');
|
|
195
|
+
const tex = Texture.from({ resource: cv });
|
|
196
|
+
const sprite = new Sprite(tex);
|
|
197
|
+
sprite.width = rect.width;
|
|
198
|
+
sprite.height = rect.height;
|
|
199
|
+
row.addChild(sprite);
|
|
200
|
+
const redraw = (value) => {
|
|
201
|
+
c2d.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
202
|
+
c2d.clearRect(0, 0, rect.width, rect.height);
|
|
203
|
+
// Clip the author's draw to the widget rect so nothing can paint outside the node (the canvas
|
|
204
|
+
// bitmap already bounds it; this makes the contract explicit + covers shadows/strokes).
|
|
205
|
+
c2d.save();
|
|
206
|
+
c2d.beginPath();
|
|
207
|
+
c2d.rect(0, 0, rect.width, rect.height);
|
|
208
|
+
c2d.clip();
|
|
209
|
+
controller.draw(c2d, { value, node, width: rect.width, height: rect.height, accent: c.fill, text: c.text, muted: c.label });
|
|
210
|
+
c2d.restore();
|
|
211
|
+
tex.source.update();
|
|
212
|
+
};
|
|
213
|
+
redraw(resolveDisplayValue(spec, node, ctx));
|
|
214
|
+
byId.set(rect.id, { spec, redraw });
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
// Labels sit at the row's LEFT EDGE (row-local x=0) — aligned with the bg-box's left edge for
|
|
218
|
+
// text/combo, and with the row's outer margin for boxless widgets (toggle/color/slider). The
|
|
219
|
+
// OUTER outer-padX already insets the row inside the node; the label re-applying its own padX
|
|
220
|
+
// would shift it RIGHT of the box and break label-stack alignment vertically.
|
|
221
|
+
const label = (text, color = c.label, align = 'left') => {
|
|
222
|
+
const t = new BitmapText({ text, style: { fontFamily, fontSize: labelSize, fontWeight: '500', fill: color } });
|
|
223
|
+
t.anchor.set(align === 'right' ? 1 : 0, 0.5);
|
|
224
|
+
t.position.set(align === 'right' ? rect.width : 0, rect.height / 2);
|
|
225
|
+
return t;
|
|
226
|
+
};
|
|
227
|
+
// Static layers (built once): field background/border + static label. Dynamic layer (slider
|
|
228
|
+
// fill, toggle knob) + value text are MUTATED in `redraw`, never recreated — recreating Text
|
|
229
|
+
// every frame both garbled the node (stacked copies) and churned GPU textures.
|
|
230
|
+
const field = (g) => g.roundRect(0, 0, rect.width, rect.height, radius).fill({ color: c.bg }).stroke({ color: c.border, width: borderW });
|
|
231
|
+
const bg = new Graphics();
|
|
232
|
+
const dyn = new Graphics();
|
|
233
|
+
row.addChild(bg, dyn);
|
|
234
|
+
let valueText = null;
|
|
235
|
+
switch (spec.type) {
|
|
236
|
+
case 'number':
|
|
237
|
+
case 'slider': {
|
|
238
|
+
// Number + slider are SINGLE-row with label INSIDE the track / field, so the label gets
|
|
239
|
+
// inset by padX (and the right-aligned value by the same on the right) — otherwise the
|
|
240
|
+
// text touches the rounded corner. Box-style labels (text/combo) sit ABOVE the box and
|
|
241
|
+
// align with the row's left edge — that's handled by the helper's x=0 default.
|
|
242
|
+
if (spec.type === 'number')
|
|
243
|
+
field(bg);
|
|
244
|
+
else
|
|
245
|
+
bg.roundRect(0, 0, rect.width, rect.height, radius).fill({ color: c.track });
|
|
246
|
+
const lab = label(spec.label);
|
|
247
|
+
lab.position.x = padX;
|
|
248
|
+
row.addChild(lab);
|
|
249
|
+
valueText = label('', c.text, 'right');
|
|
250
|
+
valueText.position.x = rect.width - padX;
|
|
251
|
+
row.addChild(valueText);
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
case 'combo': {
|
|
255
|
+
// Same vertical structure as the text widget: label on its own row above the field box.
|
|
256
|
+
// Keeps every box-style widget (text + combo) aligned to the SAME left margin, so labels
|
|
257
|
+
// line up across the whole node. A label-less combo collapses to a single-row box.
|
|
258
|
+
const hasLabel = spec.label.length > 0;
|
|
259
|
+
const boxTop = hasLabel ? wRowHeight : 0;
|
|
260
|
+
bg.roundRect(0, boxTop, rect.width, rect.height - boxTop, radius).fill({ color: c.bg }).stroke({ color: c.border, width: borderW });
|
|
261
|
+
if (hasLabel) {
|
|
262
|
+
const lab = label(spec.label);
|
|
263
|
+
lab.anchor.set(0, 0.5);
|
|
264
|
+
lab.position.set(0, boxTop / 2);
|
|
265
|
+
row.addChild(lab);
|
|
266
|
+
}
|
|
267
|
+
// Chevron inside the field box (vertically centred in the box, not the whole row).
|
|
268
|
+
const cx = rect.width - padX, cy = boxTop + (rect.height - boxTop) / 2;
|
|
269
|
+
bg.moveTo(cx - 7, cy - 2).lineTo(cx - 3.5, cy + 2).lineTo(cx, cy - 2).stroke({ color: c.label, width: 1.2 });
|
|
270
|
+
// Value text inside the field box, left-aligned (matches the placeholder/value position of
|
|
271
|
+
// the text widget). Anchor (0, 0.5) + y at box centre.
|
|
272
|
+
valueText = new BitmapText({ text: '', style: { fontFamily, fontSize: labelSize, fontWeight: '500', fill: c.text } });
|
|
273
|
+
valueText.anchor.set(0, 0.5);
|
|
274
|
+
valueText.position.set(padX, cy);
|
|
275
|
+
row.addChild(valueText);
|
|
276
|
+
// Clip so a long value doesn't bleed past the chevron.
|
|
277
|
+
const clip = new Graphics().rect(padX, boxTop, rect.width - padX * 2 - 8, rect.height - boxTop).fill({ color: 0xffffff });
|
|
278
|
+
row.addChild(clip);
|
|
279
|
+
valueText.mask = clip;
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
282
|
+
case 'text': {
|
|
283
|
+
// The label sits on its own row ABOVE the field box (outside it); the box (bg + value +
|
|
284
|
+
// the DOM editor) occupies the area below. A label-less text widget is just the box.
|
|
285
|
+
const hasLabel = spec.label.length > 0;
|
|
286
|
+
const boxTop = hasLabel ? wRowHeight : 0;
|
|
287
|
+
bg.roundRect(0, boxTop, rect.width, rect.height - boxTop, radius).fill({ color: c.bg }).stroke({ color: c.border, width: borderW });
|
|
288
|
+
if (hasLabel) {
|
|
289
|
+
const lab = label(spec.label);
|
|
290
|
+
lab.anchor.set(0, 0.5);
|
|
291
|
+
lab.position.set(0, boxTop / 2);
|
|
292
|
+
row.addChild(lab);
|
|
293
|
+
}
|
|
294
|
+
// Editable text VALUE stays a regular Text (not BitmapText) so its vertical metrics match
|
|
295
|
+
// the DOM <textarea>/<input> editor exactly — otherwise the glyphs jump on focus.
|
|
296
|
+
valueText = new Text({
|
|
297
|
+
text: '',
|
|
298
|
+
style: { fontFamily, fontSize: labelSize, fontWeight: '400', fill: c.text,
|
|
299
|
+
wordWrap: !!spec.multiline, wordWrapWidth: rect.width - padX * 2, breakWords: true,
|
|
300
|
+
...(spec.multiline ? { lineHeight: labelSize * 1.2 } : {}) },
|
|
301
|
+
});
|
|
302
|
+
valueText.anchor.set(0, spec.multiline ? 0 : 0.5);
|
|
303
|
+
valueText.position.set(padX, spec.multiline ? boxTop + padY : boxTop + (rect.height - boxTop) / 2);
|
|
304
|
+
row.addChild(valueText);
|
|
305
|
+
const clip = new Graphics().rect(padX, boxTop, rect.width - padX * 2, rect.height - boxTop).fill({ color: 0xffffff });
|
|
306
|
+
row.addChild(clip);
|
|
307
|
+
valueText.mask = clip;
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
310
|
+
case 'toggle':
|
|
311
|
+
case 'color':
|
|
312
|
+
row.addChild(label(spec.label));
|
|
313
|
+
break;
|
|
314
|
+
case 'button': {
|
|
315
|
+
bg.roundRect(0, 0, rect.width, rect.height, radius).fill({ color: c.track });
|
|
316
|
+
const t = label(spec.label, c.text, 'left');
|
|
317
|
+
t.anchor.set(0.5, 0.5);
|
|
318
|
+
t.position.set(rect.width / 2, rect.height / 2);
|
|
319
|
+
t.style.fontWeight = '600';
|
|
320
|
+
row.addChild(t);
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
case 'custom':
|
|
324
|
+
// DOM-mounted controllers own their whole rect (the editor positions the element over it) —
|
|
325
|
+
// draw nothing, or we'd paint a label/box UNDER the live element. Only a custom widget with
|
|
326
|
+
// no registered controller gets a placeholder box+label so it isn't invisible.
|
|
327
|
+
if (!(controller && isDomWidgetController(controller))) {
|
|
328
|
+
field(bg);
|
|
329
|
+
row.addChild(label(spec.label));
|
|
330
|
+
}
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
const redraw = (value) => {
|
|
334
|
+
switch (spec.type) {
|
|
335
|
+
case 'number':
|
|
336
|
+
if (valueText)
|
|
337
|
+
valueText.text = spec.unit ? `${value}${spec.unit}` : String(value);
|
|
338
|
+
break;
|
|
339
|
+
case 'slider': {
|
|
340
|
+
const frac = spec.max > spec.min ? Math.min(1, Math.max(0, (num(value) - spec.min) / (spec.max - spec.min))) : 0;
|
|
341
|
+
dyn.clear().roundRect(0, 0, rect.width * frac, rect.height, radius).fill({ color: c.fill, alpha: c.fillAlpha });
|
|
342
|
+
if (valueText)
|
|
343
|
+
valueText.text = String(value);
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
case 'combo': {
|
|
347
|
+
const opt = comboOptions(spec).find((o) => o.value === value);
|
|
348
|
+
if (valueText)
|
|
349
|
+
valueText.text = String(opt?.label ?? value);
|
|
350
|
+
break;
|
|
351
|
+
}
|
|
352
|
+
case 'text': {
|
|
353
|
+
const s = String(value ?? '');
|
|
354
|
+
if (valueText) {
|
|
355
|
+
valueText.text = s.length > 0 ? s : (spec.placeholder ?? '');
|
|
356
|
+
valueText.style.fill = s ? c.text : c.placeholder;
|
|
357
|
+
}
|
|
358
|
+
break;
|
|
359
|
+
}
|
|
360
|
+
case 'toggle': {
|
|
361
|
+
const on = Boolean(value);
|
|
362
|
+
const trackW = c.toggleWidth, trackH = c.toggleHeight, tx = rect.width - trackW, ty = (rect.height - trackH) / 2;
|
|
363
|
+
dyn.clear()
|
|
364
|
+
.roundRect(tx, ty, trackW, trackH, trackH / 2).fill({ color: on ? c.fill : c.track })
|
|
365
|
+
.circle(on ? tx + trackW - trackH / 2 : tx + trackH / 2, ty + trackH / 2, trackH / 2 - 2).fill({ color: c.knob });
|
|
366
|
+
break;
|
|
367
|
+
}
|
|
368
|
+
case 'color': {
|
|
369
|
+
const sw = 40, sh = rect.height - padY * 2, sx = rect.width - sw, sy = padY;
|
|
370
|
+
dyn.clear().roundRect(sx, sy, sw, sh, radius).fill({ color: String(value) || '#000000' }).stroke({ color: c.border, width: borderW });
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
default:
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
redraw(resolveDisplayValue(spec, node, ctx));
|
|
378
|
+
byId.set(rect.id, { spec, redraw });
|
|
379
|
+
}
|
|
380
|
+
return {
|
|
381
|
+
container,
|
|
382
|
+
rects,
|
|
383
|
+
widgetHit(localX, localY) {
|
|
384
|
+
for (const rect of rects) {
|
|
385
|
+
const spec = specById.get(rect.id);
|
|
386
|
+
if (spec.disabled)
|
|
387
|
+
continue;
|
|
388
|
+
if (localX >= rect.x && localX <= rect.x + rect.width && localY >= rect.y && localY <= rect.y + rect.height) {
|
|
389
|
+
return { id: rect.id, spec, rect };
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
return null;
|
|
393
|
+
},
|
|
394
|
+
update(id, value) {
|
|
395
|
+
byId.get(id)?.redraw(value);
|
|
396
|
+
},
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
//# sourceMappingURL=widget-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-renderer.js","sourceRoot":"","sources":["../src/widget-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAgD,MAAM,4BAA4B,CAAA;AAEtK,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAuC1I,MAAM,UAAU,qBAAqB,CAAC,CAAyB;IAC7D,OAAO,OAAO,IAAI,CAAC,CAAA;AACrB,CAAC;AAaD,MAAM,UAAU,kBAAkB,CAAC,MAAiB,EAAE,QAAsB;IAC1E,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAA;IAC7B,MAAM,C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AA;gBACnC,IAAI,IAAI,CAAC,QAAQ;oBAAE,SAAQ;gBAC3B,IAAI,MAAM,IAAI,IAAI,CAAC,CAAC,IAAI,MAAM,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,IAAI,MAAM,IAAI,IAAI,CAAC,CAAC,IAAI,MAAM,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;oBAC5G,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;gBACpC,CAAC;YACH,CAAC;YACD,OAAO,IAAI,CAAA;QACb,CAAC;QACD,MAAM,CAAC,EAAE,EAAE,KAAK;YACd,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAA;QAC7B,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { XenolithTheme } from './theme.js';
|
|
2
|
+
/**
|
|
3
|
+
* The default Xen theme — pure tokens, no custom render hooks. The editor falls back to the
|
|
4
|
+
* built-in `renderNode` / `drawEdge` / `createGridSprite` for every element, so this theme is
|
|
5
|
+
* the visual identity of the library out of the box.
|
|
6
|
+
*/
|
|
7
|
+
export declare const xenTheme: XenolithTheme;
|
|
8
|
+
//# sourceMappingURL=xen-theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xen-theme.d.ts","sourceRoot":"","sources":["../src/xen-theme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,aAetB,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { xenTokens } from '@xenolithengine/graph-theme-xen';
|
|
2
|
+
/**
|
|
3
|
+
* The default Xen theme — pure tokens, no custom render hooks. The editor falls back to the
|
|
4
|
+
* built-in `renderNode` / `drawEdge` / `createGridSprite` for every element, so this theme is
|
|
5
|
+
* the visual identity of the library out of the box.
|
|
6
|
+
*/
|
|
7
|
+
export const xenTheme = {
|
|
8
|
+
id: 'xen',
|
|
9
|
+
tokens: xenTokens,
|
|
10
|
+
paletteStyle: {
|
|
11
|
+
panelBackground: '#191919',
|
|
12
|
+
panelBorder: '#424242',
|
|
13
|
+
panelShadow: '0 16px 48px rgba(0, 0, 0, 0.6)',
|
|
14
|
+
panelRadius: '10px',
|
|
15
|
+
textColor: '#FFFFFF',
|
|
16
|
+
mutedColor: '#B8B8B8',
|
|
17
|
+
accent: '#FCB400',
|
|
18
|
+
rowSelectedBackground: 'rgba(252, 180, 0, 0.14)',
|
|
19
|
+
inputBackground: '#0F110E',
|
|
20
|
+
inputBorder: '#363636',
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=xen-theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xen-theme.js","sourceRoot":"","sources":["../src/xen-theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAG3D;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAkB;IACrC,EAAE,EAAE,KAAK;IACT,MAAM,EAAE,SAAS;IACjB,YAAY,EAAE;QACZ,eAAe,EAAQ,SAAS;QAChC,WAAW,EAAY,SAAS;QAChC,WAAW,EAAY,gCAAgC;QACvD,WAAW,EAAY,MAAM;QAC7B,SAAS,EAAc,SAAS;QAChC,UAAU,EAAa,SAAS;QAChC,MAAM,EAAiB,SAAS;QAChC,qBAAqB,EAAE,yBAAyB;QAChD,eAAe,EAAQ,SAAS;QAChC,WAAW,EAAY,SAAS;KACjC;CACF,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xenolithengine/graph-render-pixi",
|
|
3
|
+
"version": "0.7.0-beta.0",
|
|
4
|
+
"description": "PIXI v8 renderer for XenolithGraph. PIXI is a peer dependency.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@xenolithengine/graph-core": "0.7.0-beta.0",
|
|
23
|
+
"@xenolithengine/graph-theme-xen": "0.7.0-beta.0"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"pixi.js": "^8.6.0",
|
|
27
|
+
"@xenolithengine/graph-theme-xen": "0.7.0-beta.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"jsdom": "^25.0.0",
|
|
31
|
+
"pixi.js": "^8.6.0",
|
|
32
|
+
"typescript": "^5.7.0",
|
|
33
|
+
"vitest": "^3.0.0"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"node-editor",
|
|
37
|
+
"webgl",
|
|
38
|
+
"pixi",
|
|
39
|
+
"pixijs",
|
|
40
|
+
"renderer",
|
|
41
|
+
"graph-renderer"
|
|
42
|
+
],
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
},
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/XenolithEngine/xenolith-graph.git",
|
|
49
|
+
"directory": "packages/render-pixi"
|
|
50
|
+
},
|
|
51
|
+
"homepage": "https://xenolithengine.github.io/xenolith-graph/",
|
|
52
|
+
"bugs": {
|
|
53
|
+
"url": "https://github.com/XenolithEngine/xenolith-graph/issues"
|
|
54
|
+
},
|
|
55
|
+
"author": "XenolithEngine",
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "tsc -b",
|
|
58
|
+
"dev": "tsc -b --watch",
|
|
59
|
+
"test": "vitest run",
|
|
60
|
+
"lint": "eslint src",
|
|
61
|
+
"typecheck": "tsc --noEmit"
|
|
62
|
+
}
|
|
63
|
+
}
|