@graphysdk/react-renderer 1.9.0-beta.1789467548664 → 1.9.0-beta.1789545386500
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/dist/editable.cjs +1 -1
- package/dist/editable.css +1 -1
- package/dist/editable.d.ts +5 -5
- package/dist/editable.mjs +161 -161
- package/dist/graph-config.cjs +1 -1
- package/dist/graph-config.d.ts +11 -11
- package/dist/graph-config.mjs +1 -1
- package/dist/{history-chords-DYyA8P8x.js → history-chords-DUMZMIc_.js} +1138 -1134
- package/dist/{history-chords-PbUU5Ryz.cjs → history-chords-kAwHzxZz.cjs} +2 -2
- package/dist/history-chords.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +60 -53
- package/dist/index.mjs +150 -149
- package/dist/{theme.contract.css-pudzI2o1.js → theme.contract.css-DaZ5UPN0.js} +11 -11
- package/dist/{theme.contract.css-CEjZ4rbL.cjs → theme.contract.css-Dd-73-Je.cjs} +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as Dt, At as $t, Bt as Ht, Ct as le, Dt as ue, Et as xt, Ht as
|
|
2
|
-
import { n as
|
|
3
|
-
import { COMPILER_STAGE_KEYS as j, Geom as pe, GraphCompilationSession as fe, areEditTargetsEqual as ve, buildDiagnostic as
|
|
4
|
-
import { Component as qe, useCallback as f, useEffect as H, useId as Ie, useImperativeHandle as ke, useMemo as $, useRef as z, useState as
|
|
1
|
+
import { A as Dt, At as $t, Bt as Ht, Ct as le, Dt as ue, Et as xt, Ht as he, It as Mt, M as Pt, N as Lt, Ot as Bt, Rt as Ot, St as U, Ut as ne, Vt as At, Wt as K, X as Kt, Z as Ut, _ as jt, _t as Ft, a as Yt, at as Wt, bt as ge, dt as Vt, ft as Xt, gt as zt, i as Qt, it as Zt, k as Jt, kt as er, lt as tr, n as rr, nt as nr, r as sr, s as or, t as me, xt as ir, yt as O, zt as ar } from "./history-chords-DUMZMIc_.js";
|
|
2
|
+
import { n as dr } from "./theme.contract.css-DaZ5UPN0.js";
|
|
3
|
+
import { COMPILER_STAGE_KEYS as j, Geom as pe, GraphCompilationSession as fe, areEditTargetsEqual as ve, buildDiagnostic as V, createAnchorResolver as ye, createCompiler as Se, createGraphyBuilder as be, createStyleResolver as Ee, findAnnotation as Re, findLayerById as X, isCompilerCachingEnabled as Te, resolveDefinition as Ne, setCompilerCachingEnabled as Ce, toPercent as P } from "@graphysdk/viz-engine";
|
|
4
|
+
import { Component as qe, useCallback as f, useEffect as H, useId as Ie, useImperativeHandle as ke, useMemo as $, useRef as z, useState as R, useSyncExternalStore as Ge } from "react";
|
|
5
5
|
import { Fragment as _e, jsx as d, jsxs as v } from "react/jsx-runtime";
|
|
6
6
|
import { useStore as Q } from "zustand";
|
|
7
7
|
import { createStore as F } from "zustand/vanilla";
|
|
@@ -50,10 +50,10 @@ var Le = class extends qe {
|
|
|
50
50
|
super(...e), this.state = { caughtDiagnostic: null };
|
|
51
51
|
}
|
|
52
52
|
static getDerivedStateFromError(e) {
|
|
53
|
-
return { caughtDiagnostic:
|
|
53
|
+
return { caughtDiagnostic: V(e) };
|
|
54
54
|
}
|
|
55
55
|
componentDidCatch(e, t) {
|
|
56
|
-
const r =
|
|
56
|
+
const r = V(e);
|
|
57
57
|
K([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
|
|
58
58
|
}
|
|
59
59
|
componentDidUpdate(e) {
|
|
@@ -66,12 +66,12 @@ var Le = class extends qe {
|
|
|
66
66
|
return t && t.length > 0 ? /* @__PURE__ */ d(Z, { errors: t }) : r;
|
|
67
67
|
}
|
|
68
68
|
}, se = (e) => typeof e == "object" && "geom" in e && "render" in e, Be = (e) => {
|
|
69
|
-
const t =
|
|
69
|
+
const t = Ne(e);
|
|
70
70
|
return t instanceof pe ? t : null;
|
|
71
71
|
}, Oe = (e, t) => {
|
|
72
72
|
const r = e.filter((n) => Ae(n, t));
|
|
73
73
|
return r.length === e.length ? e : r;
|
|
74
|
-
}, Ae = (e, t) => e.kind === "annotation" ?
|
|
74
|
+
}, Ae = (e, t) => e.kind === "annotation" ? Re(t.annotations, e.id) !== null : e.kind === "observations" ? X(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? X(t.layers, e.layerId) !== void 0 : !0, ee = [], Ke = () => F((e) => ({
|
|
75
75
|
selection: ee,
|
|
76
76
|
setSelection: (t) => e((r) => Ue(r.selection, t) ? r : { selection: t }),
|
|
77
77
|
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: ee })
|
|
@@ -82,7 +82,7 @@ var Le = class extends qe {
|
|
|
82
82
|
if (!je) return {
|
|
83
83
|
emit: () => {
|
|
84
84
|
},
|
|
85
|
-
subscribe: () =>
|
|
85
|
+
subscribe: () => Ve,
|
|
86
86
|
getLastTrigger: () => null,
|
|
87
87
|
getLastCompile: () => null,
|
|
88
88
|
getCacheStats: () => e.getCacheStats()
|
|
@@ -104,7 +104,7 @@ var Le = class extends qe {
|
|
|
104
104
|
getLastCompile: () => e.getLastCompile(),
|
|
105
105
|
getCacheStats: () => e.getCacheStats()
|
|
106
106
|
};
|
|
107
|
-
},
|
|
107
|
+
}, We = () => F((e) => ({
|
|
108
108
|
lastCompile: null,
|
|
109
109
|
history: [],
|
|
110
110
|
nextId: 1,
|
|
@@ -124,7 +124,7 @@ var Le = class extends qe {
|
|
|
124
124
|
lastSnapshot: r
|
|
125
125
|
};
|
|
126
126
|
})
|
|
127
|
-
})),
|
|
127
|
+
})), Ve = () => {
|
|
128
128
|
}, Xe = (e) => {
|
|
129
129
|
switch (e.kind) {
|
|
130
130
|
case "init":
|
|
@@ -159,20 +159,20 @@ function Qe(e) {
|
|
|
159
159
|
const a = /* @__PURE__ */ new Map();
|
|
160
160
|
for (const c of t) {
|
|
161
161
|
if ("definition" in c) continue;
|
|
162
|
-
const u = `${c.geom}|${c.coord}`,
|
|
163
|
-
|
|
162
|
+
const u = `${c.geom}|${c.coord}`, h = a.get(u);
|
|
163
|
+
h ? h.count += 1 : a.set(u, {
|
|
164
164
|
geom: c.geom,
|
|
165
165
|
coord: c.coord,
|
|
166
166
|
count: 1
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
169
|
const i = [];
|
|
170
|
-
for (const { geom: c, coord: u, count:
|
|
171
|
-
|
|
170
|
+
for (const { geom: c, coord: u, count: h } of a.values())
|
|
171
|
+
h < 2 || i.push({
|
|
172
172
|
kind: "user-input",
|
|
173
173
|
severity: "warning",
|
|
174
174
|
code: "DUPLICATE_REGISTERED_TYPE",
|
|
175
|
-
message: `Multiple render-only overrides register ('${c}', '${u}') (${
|
|
175
|
+
message: `Multiple render-only overrides register ('${c}', '${u}') (${h} entries); the last in the array wins.`,
|
|
176
176
|
context: {
|
|
177
177
|
requested: `${c}@${u}`,
|
|
178
178
|
kind: "geom-renderer"
|
|
@@ -286,123 +286,123 @@ function nt(e, t) {
|
|
|
286
286
|
requested: i.geom,
|
|
287
287
|
kind: "geom-renderer"
|
|
288
288
|
},
|
|
289
|
-
suggestion: "Have the geom's manifest yield spatialKind 'render-hit-test' so the
|
|
289
|
+
suggestion: "Have the geom's manifest yield spatialKind 'render-hit-test' so the scene layer carries the `byKey` index the overlay's `pushHover` resolves against."
|
|
290
290
|
}));
|
|
291
291
|
}
|
|
292
292
|
return a;
|
|
293
293
|
}
|
|
294
294
|
var st = (e) => F((t) => ({
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
})), ot = ({ input: e, data: t, customPalettes: r, colorScheme: n, plugins: o, resolveRenderer: a, anchorResolver: i, onChange: c, onError: u, onWarnings:
|
|
298
|
-
const
|
|
299
|
-
const s =
|
|
295
|
+
scene: e,
|
|
296
|
+
setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
|
|
297
|
+
})), ot = ({ input: e, data: t, customPalettes: r, colorScheme: n, plugins: o, resolveRenderer: a, anchorResolver: i, onChange: c, onError: u, onWarnings: h }) => {
|
|
298
|
+
const T = O(c), k = O(u), q = O(h), [{ session: g, compileBus: l }] = R(() => {
|
|
299
|
+
const s = Se({ plugins: o });
|
|
300
300
|
return {
|
|
301
301
|
session: new fe(s),
|
|
302
302
|
compileBus: Ye(s)
|
|
303
303
|
};
|
|
304
|
-
}), [p] =
|
|
304
|
+
}), [p] = R(() => Qe(o ?? [])), y = z(null), [G] = R(it), N = z(null), S = f((s) => p.errors.length === 0 ? s : [...p.errors, ...s ?? []], [p]), w = f((s) => {
|
|
305
305
|
if (!s.ok) return s.errors;
|
|
306
|
-
if (
|
|
306
|
+
if (N.current) N.current.getState().setScene(s.scene);
|
|
307
307
|
else {
|
|
308
|
-
const
|
|
309
|
-
|
|
308
|
+
const m = st(s.scene);
|
|
309
|
+
m.subscribe(G.notify), N.current = m, G.notify();
|
|
310
310
|
}
|
|
311
311
|
return null;
|
|
312
|
-
}, [G]), [x, D] =
|
|
313
|
-
const s =
|
|
312
|
+
}, [G]), [x, D] = R(() => {
|
|
313
|
+
const s = g.compile({
|
|
314
314
|
input: e,
|
|
315
315
|
data: t,
|
|
316
316
|
customPalettes: r,
|
|
317
317
|
colorScheme: n
|
|
318
318
|
});
|
|
319
|
-
return y.current = s,
|
|
319
|
+
return y.current = s, S(w(s));
|
|
320
320
|
}), I = f((s) => s.ok ? [
|
|
321
321
|
...s.warnings,
|
|
322
|
-
...Ze(s.
|
|
323
|
-
...Je(s.
|
|
324
|
-
...et(s.
|
|
325
|
-
...tt(s.
|
|
326
|
-
...nt(s.
|
|
327
|
-
...rt(s.
|
|
328
|
-
] : s.warnings, [a, i]),
|
|
322
|
+
...Ze(s.scene, a),
|
|
323
|
+
...Je(s.scene, a),
|
|
324
|
+
...et(s.scene),
|
|
325
|
+
...tt(s.scene, a),
|
|
326
|
+
...nt(s.scene, a),
|
|
327
|
+
...rt(s.scene, i)
|
|
328
|
+
] : s.warnings, [a, i]), b = f((s) => {
|
|
329
329
|
s.length !== 0 && (K(s), k.current?.(s));
|
|
330
|
-
}, [k]),
|
|
330
|
+
}, [k]), C = f((s) => {
|
|
331
331
|
s.length !== 0 && (K(s), q.current?.(s));
|
|
332
332
|
}, [q]);
|
|
333
333
|
H(() => {
|
|
334
334
|
const s = y.current;
|
|
335
|
-
s && (
|
|
335
|
+
s && (b([...p.errors, ...s.ok ? [] : s.errors]), C([...p.warnings, ...I(s)]), s.ok && l.emit({ kind: "init" }));
|
|
336
336
|
}, [
|
|
337
337
|
l,
|
|
338
|
-
|
|
339
|
-
|
|
338
|
+
b,
|
|
339
|
+
C,
|
|
340
340
|
p,
|
|
341
341
|
I
|
|
342
342
|
]), H(() => {
|
|
343
|
-
const s =
|
|
343
|
+
const s = g.update({
|
|
344
344
|
input: e,
|
|
345
345
|
data: t,
|
|
346
346
|
customPalettes: r,
|
|
347
347
|
colorScheme: n
|
|
348
348
|
});
|
|
349
349
|
if (!s) return;
|
|
350
|
-
s.sealedInput &&
|
|
351
|
-
const
|
|
352
|
-
D(
|
|
350
|
+
s.sealedInput && T.current?.(s.sealedInput);
|
|
351
|
+
const m = w(s.result);
|
|
352
|
+
D(S(m)), m && b(m), C(I(s.result)), m || l.emit({ kind: s.inputChanged ? "input" : "data" });
|
|
353
353
|
}, [
|
|
354
354
|
e,
|
|
355
355
|
t,
|
|
356
356
|
r,
|
|
357
357
|
n,
|
|
358
|
-
|
|
358
|
+
g,
|
|
359
359
|
l,
|
|
360
360
|
w,
|
|
361
|
-
S,
|
|
362
|
-
T,
|
|
363
361
|
b,
|
|
362
|
+
C,
|
|
363
|
+
S,
|
|
364
364
|
I,
|
|
365
|
-
|
|
365
|
+
T
|
|
366
366
|
]);
|
|
367
367
|
const _ = f((s) => {
|
|
368
|
-
D((
|
|
368
|
+
D((m) => m === null ? m : S(null)), C(I(s));
|
|
369
369
|
}, [
|
|
370
|
-
|
|
371
|
-
|
|
370
|
+
S,
|
|
371
|
+
C,
|
|
372
372
|
I
|
|
373
373
|
]), M = f((s) => {
|
|
374
|
-
s.
|
|
374
|
+
s.scene && N.current?.getState().setScene(s.scene), s.result && _(s.result), s.command && l.emit({
|
|
375
375
|
kind: "command",
|
|
376
376
|
command: s.command
|
|
377
|
-
}), s.input &&
|
|
377
|
+
}), s.input && T.current?.(s.input), s.errors && b([...s.errors]);
|
|
378
378
|
}, [
|
|
379
379
|
_,
|
|
380
380
|
l,
|
|
381
|
-
|
|
382
|
-
|
|
381
|
+
T,
|
|
382
|
+
b
|
|
383
383
|
]), E = f((s) => {
|
|
384
|
-
for (const
|
|
385
|
-
return s.some((
|
|
386
|
-
}, [M]), B = f((s,
|
|
387
|
-
E(
|
|
388
|
-
}, [
|
|
389
|
-
E(
|
|
390
|
-
}, [
|
|
391
|
-
stack:
|
|
384
|
+
for (const m of s) M(m);
|
|
385
|
+
return s.some((m) => !!m.scene);
|
|
386
|
+
}, [M]), B = f((s, m) => {
|
|
387
|
+
E(g.applyCommand(s, m));
|
|
388
|
+
}, [g, E]), ae = f(() => {
|
|
389
|
+
E(g.seal());
|
|
390
|
+
}, [g, E]), Y = f(() => E(g.undo()), [g, E]), W = f(() => E(g.redo()), [g, E]), ce = $(() => ({
|
|
391
|
+
stack: g.history,
|
|
392
392
|
undo: Y,
|
|
393
|
-
redo:
|
|
393
|
+
redo: W
|
|
394
394
|
}), [
|
|
395
|
-
|
|
395
|
+
g,
|
|
396
396
|
Y,
|
|
397
|
-
|
|
398
|
-
]), de = f(() =>
|
|
397
|
+
W
|
|
398
|
+
]), de = f(() => N.current?.getState().scene ?? null, []);
|
|
399
399
|
return {
|
|
400
|
-
store:
|
|
400
|
+
store: N.current,
|
|
401
401
|
dispatch: B,
|
|
402
402
|
seal: ae,
|
|
403
403
|
history: ce,
|
|
404
404
|
subscribe: G.subscribe,
|
|
405
|
-
|
|
405
|
+
getScene: de,
|
|
406
406
|
compileBus: l,
|
|
407
407
|
compileErrors: x
|
|
408
408
|
};
|
|
@@ -414,15 +414,15 @@ var st = (e) => F((t) => ({
|
|
|
414
414
|
}),
|
|
415
415
|
notify: () => e.forEach((t) => t())
|
|
416
416
|
};
|
|
417
|
-
}, at = ({ data: e, input: t, plugins: r = [], formattingLocale: n, handleRef: o, onChange: a, onError: i, onWarnings: c, customPalettes: u, colorScheme:
|
|
418
|
-
const [k] =
|
|
417
|
+
}, at = ({ data: e, input: t, plugins: r = [], formattingLocale: n, handleRef: o, onChange: a, onError: i, onWarnings: c, customPalettes: u, colorScheme: h = "light", children: T }) => {
|
|
418
|
+
const [k] = R(() => ge(r.filter(se))), q = Ie(), [g] = R(() => ye(r)), [l] = R(() => Ke()), p = $(() => Ee({ colorScheme: h }), [h]), { store: y, dispatch: G, seal: N, history: S, subscribe: w, getScene: x, compileBus: D, compileErrors: I } = ot({
|
|
419
419
|
input: t,
|
|
420
420
|
data: e,
|
|
421
421
|
customPalettes: u,
|
|
422
|
-
colorScheme:
|
|
422
|
+
colorScheme: h,
|
|
423
423
|
plugins: r,
|
|
424
424
|
resolveRenderer: k,
|
|
425
|
-
anchorResolver:
|
|
425
|
+
anchorResolver: g,
|
|
426
426
|
onChange: a,
|
|
427
427
|
onError: i,
|
|
428
428
|
onWarnings: c
|
|
@@ -430,69 +430,69 @@ var st = (e) => F((t) => ({
|
|
|
430
430
|
H(() => {
|
|
431
431
|
if (y)
|
|
432
432
|
return y.subscribe((_, M) => {
|
|
433
|
-
if (_.
|
|
433
|
+
if (_.scene.spec === M.scene.spec) return;
|
|
434
434
|
const { selection: E, setSelection: B } = l.getState();
|
|
435
|
-
E.length !== 0 && B(Oe(E, _.
|
|
435
|
+
E.length !== 0 && B(Oe(E, _.scene.spec));
|
|
436
436
|
});
|
|
437
437
|
}, [y, l]);
|
|
438
|
-
const
|
|
438
|
+
const b = $(() => ({
|
|
439
439
|
dispatch: G,
|
|
440
|
-
seal:
|
|
441
|
-
}), [G,
|
|
440
|
+
seal: N
|
|
441
|
+
}), [G, N]);
|
|
442
442
|
ke(o, () => ({
|
|
443
|
-
commands:
|
|
444
|
-
undo:
|
|
445
|
-
redo:
|
|
443
|
+
commands: b,
|
|
444
|
+
undo: S.undo,
|
|
445
|
+
redo: S.redo,
|
|
446
446
|
subscribe: w,
|
|
447
|
-
|
|
447
|
+
getScene: x,
|
|
448
448
|
getSelection: () => l.getState().selection,
|
|
449
449
|
setSelection: (_) => l.getState().setSelection(_),
|
|
450
450
|
subscribeSelection: l.subscribe
|
|
451
451
|
}), [
|
|
452
|
-
S,
|
|
453
452
|
b,
|
|
453
|
+
S,
|
|
454
454
|
w,
|
|
455
455
|
x,
|
|
456
456
|
l
|
|
457
457
|
]);
|
|
458
|
-
const
|
|
458
|
+
const C = $(() => y ? {
|
|
459
459
|
chartId: q,
|
|
460
460
|
store: y,
|
|
461
461
|
selectionStore: l,
|
|
462
|
-
commands:
|
|
463
|
-
history:
|
|
462
|
+
commands: b,
|
|
463
|
+
history: S,
|
|
464
464
|
formattingLocale: n,
|
|
465
465
|
compileBus: D,
|
|
466
|
-
colorScheme:
|
|
466
|
+
colorScheme: h,
|
|
467
467
|
styleResolver: p,
|
|
468
|
-
anchorResolver:
|
|
468
|
+
anchorResolver: g
|
|
469
469
|
} : null, [
|
|
470
470
|
q,
|
|
471
471
|
y,
|
|
472
472
|
l,
|
|
473
|
-
S,
|
|
474
473
|
b,
|
|
474
|
+
S,
|
|
475
475
|
n,
|
|
476
476
|
D,
|
|
477
|
-
|
|
477
|
+
h,
|
|
478
478
|
p,
|
|
479
|
-
|
|
479
|
+
g
|
|
480
480
|
]);
|
|
481
481
|
return /* @__PURE__ */ d(Le, {
|
|
482
482
|
forcedErrors: I,
|
|
483
483
|
onError: i,
|
|
484
484
|
resetKeys: [t, e],
|
|
485
|
-
children:
|
|
486
|
-
value:
|
|
485
|
+
children: C ? /* @__PURE__ */ d(he.Provider, {
|
|
486
|
+
value: C,
|
|
487
487
|
children: /* @__PURE__ */ d(ue, {
|
|
488
488
|
value: k,
|
|
489
|
-
children:
|
|
489
|
+
children: T
|
|
490
490
|
})
|
|
491
491
|
}) : null
|
|
492
492
|
});
|
|
493
493
|
};
|
|
494
|
-
function
|
|
495
|
-
const t =
|
|
494
|
+
function fr(e) {
|
|
495
|
+
const t = be(e);
|
|
496
496
|
return {
|
|
497
497
|
...t,
|
|
498
498
|
GraphProvider: (n) => /* @__PURE__ */ d(at, {
|
|
@@ -501,7 +501,7 @@ function pr(e) {
|
|
|
501
501
|
})
|
|
502
502
|
};
|
|
503
503
|
}
|
|
504
|
-
var
|
|
504
|
+
var vr = ({ children: e, ...t }) => /* @__PURE__ */ d("svg", {
|
|
505
505
|
viewBox: "0 0 1 1",
|
|
506
506
|
preserveAspectRatio: "none",
|
|
507
507
|
width: "100%",
|
|
@@ -509,7 +509,7 @@ var fr = ({ children: e, ...t }) => /* @__PURE__ */ d("svg", {
|
|
|
509
509
|
pointerEvents: "none",
|
|
510
510
|
...t,
|
|
511
511
|
children: e
|
|
512
|
-
}),
|
|
512
|
+
}), yr = ({ box: e, children: t }) => /* @__PURE__ */ d("svg", {
|
|
513
513
|
x: P(e.x0),
|
|
514
514
|
y: P(e.y0),
|
|
515
515
|
width: P(e.x1 - e.x0),
|
|
@@ -517,9 +517,9 @@ var fr = ({ children: e, ...t }) => /* @__PURE__ */ d("svg", {
|
|
|
517
517
|
overflow: "hidden",
|
|
518
518
|
pointerEvents: "none",
|
|
519
519
|
children: t
|
|
520
|
-
}), ct = "drqe3u0", dt = "drqe3u1", lt = "drqe3u2", ut = "drqe3u3", L = "drqe3u4",
|
|
521
|
-
var vt = "drqe3uc", yt = "drqe3ud",
|
|
522
|
-
var Et = "drqe3uh",
|
|
520
|
+
}), ct = "drqe3u0", dt = "drqe3u1", lt = "drqe3u2", ut = "drqe3u3", L = "drqe3u4", ht = "drqe3u5", gt = "drqe3u6", mt = "drqe3u7", A = "drqe3u8", pt = "drqe3u9", ft = "drqe3ua";
|
|
521
|
+
var vt = "drqe3uc", yt = "drqe3ud", St = "drqe3ue", bt = "drqe3uf";
|
|
522
|
+
var Et = "drqe3uh", Rt = "drqe3ui", te = {
|
|
523
523
|
enabled: "drqe3uk drqe3uj",
|
|
524
524
|
disabled: "drqe3ul drqe3uj"
|
|
525
525
|
}, re = {
|
|
@@ -529,16 +529,16 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
529
529
|
ran: "drqe3uq drqe3up",
|
|
530
530
|
cached: "drqe3ur drqe3up",
|
|
531
531
|
untouched: "drqe3us drqe3up"
|
|
532
|
-
},
|
|
533
|
-
const { compileBus: n } = ne(), [o] =
|
|
532
|
+
}, Sr = ({ width: e = 380, style: t, className: r } = {}) => {
|
|
533
|
+
const { compileBus: n } = ne(), [o] = R(() => We()), [a, i] = R(!1), [c, u] = R(Te);
|
|
534
534
|
H(() => {
|
|
535
535
|
const { recordCompile: l } = o.getState(), p = n.getLastTrigger(), y = n.getLastCompile();
|
|
536
536
|
return p && y && l(p, y), n.subscribe(l);
|
|
537
537
|
}, [o, n]);
|
|
538
|
-
const
|
|
538
|
+
const h = Q(o, (l) => l.lastCompile), T = Q(o, (l) => l.history), k = n.getCacheStats(), q = h === null && T.length === 0, g = () => {
|
|
539
539
|
u((l) => {
|
|
540
540
|
const p = !l;
|
|
541
|
-
return
|
|
541
|
+
return Ce(p), p;
|
|
542
542
|
});
|
|
543
543
|
};
|
|
544
544
|
return /* @__PURE__ */ v("div", {
|
|
@@ -554,12 +554,12 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
554
554
|
className: dt,
|
|
555
555
|
children: "compile cache"
|
|
556
556
|
}), /* @__PURE__ */ d("div", {
|
|
557
|
-
className:
|
|
558
|
-
children: q ? "production: stats disabled" :
|
|
557
|
+
className: St,
|
|
558
|
+
children: q ? "production: stats disabled" : h ? `last: ${h.label} · ${ie(h.durationMs)}` : "awaiting first compile…"
|
|
559
559
|
})] }), /* @__PURE__ */ d("button", {
|
|
560
560
|
type: "button",
|
|
561
561
|
onClick: () => i((l) => !l),
|
|
562
|
-
className:
|
|
562
|
+
className: bt,
|
|
563
563
|
children: a ? "▾" : "▴"
|
|
564
564
|
})]
|
|
565
565
|
}),
|
|
@@ -567,7 +567,7 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
567
567
|
className: "drqe3ub",
|
|
568
568
|
children: [/* @__PURE__ */ v("button", {
|
|
569
569
|
type: "button",
|
|
570
|
-
onClick:
|
|
570
|
+
onClick: g,
|
|
571
571
|
className: c ? te.enabled : te.disabled,
|
|
572
572
|
"aria-pressed": c,
|
|
573
573
|
children: ["cache ", c ? "enabled" : "disabled"]
|
|
@@ -576,13 +576,13 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
576
576
|
children: "next compile reflects this toggle"
|
|
577
577
|
})]
|
|
578
578
|
}),
|
|
579
|
-
!a && !q && /* @__PURE__ */ v(_e, { children: [/* @__PURE__ */ d(
|
|
580
|
-
delta:
|
|
579
|
+
!a && !q && /* @__PURE__ */ v(_e, { children: [/* @__PURE__ */ d(Tt, {
|
|
580
|
+
delta: h?.stages,
|
|
581
581
|
cumulative: k
|
|
582
|
-
}), /* @__PURE__ */ d(
|
|
582
|
+
}), /* @__PURE__ */ d(Nt, { entries: T })] })
|
|
583
583
|
]
|
|
584
584
|
});
|
|
585
|
-
},
|
|
585
|
+
}, Tt = ({ delta: e, cumulative: t }) => /* @__PURE__ */ v("table", {
|
|
586
586
|
className: lt,
|
|
587
587
|
children: [/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ v("tr", {
|
|
588
588
|
className: Et,
|
|
@@ -609,12 +609,12 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
609
609
|
})
|
|
610
610
|
]
|
|
611
611
|
}) }), /* @__PURE__ */ d("tbody", { children: j.map((r) => {
|
|
612
|
-
const n = e?.[r], o =
|
|
612
|
+
const n = e?.[r], o = Ct(n);
|
|
613
613
|
return /* @__PURE__ */ v("tr", {
|
|
614
614
|
className: vt,
|
|
615
615
|
children: [
|
|
616
616
|
/* @__PURE__ */ v("td", {
|
|
617
|
-
className:
|
|
617
|
+
className: ht,
|
|
618
618
|
children: [
|
|
619
619
|
/* @__PURE__ */ d("span", {
|
|
620
620
|
className: oe[o],
|
|
@@ -643,22 +643,22 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
643
643
|
]
|
|
644
644
|
}, r);
|
|
645
645
|
}) })]
|
|
646
|
-
}),
|
|
646
|
+
}), Nt = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ v("div", {
|
|
647
647
|
className: yt,
|
|
648
648
|
children: [/* @__PURE__ */ d("div", {
|
|
649
|
-
className:
|
|
649
|
+
className: Rt,
|
|
650
650
|
children: "recent compiles"
|
|
651
651
|
}), e.map((t) => {
|
|
652
652
|
const r = qt(t.stages, (a) => a.misses > 0), n = j.length;
|
|
653
653
|
return /* @__PURE__ */ v("div", {
|
|
654
|
-
className:
|
|
654
|
+
className: gt,
|
|
655
655
|
children: [
|
|
656
656
|
/* @__PURE__ */ d("span", {
|
|
657
657
|
className: oe[r === 0 ? "cached" : "ran"],
|
|
658
658
|
"aria-hidden": !0
|
|
659
659
|
}),
|
|
660
660
|
/* @__PURE__ */ d("span", {
|
|
661
|
-
className:
|
|
661
|
+
className: mt,
|
|
662
662
|
title: t.label,
|
|
663
663
|
children: t.label
|
|
664
664
|
}),
|
|
@@ -675,7 +675,7 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
675
675
|
]
|
|
676
676
|
}, t.id);
|
|
677
677
|
})]
|
|
678
|
-
}),
|
|
678
|
+
}), Ct = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", qt = (e, t) => {
|
|
679
679
|
let r = 0;
|
|
680
680
|
for (const n of j) t(e[n]) && (r += 1);
|
|
681
681
|
return r;
|
|
@@ -701,14 +701,14 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
701
701
|
"range",
|
|
702
702
|
"reset",
|
|
703
703
|
"submit"
|
|
704
|
-
]),
|
|
704
|
+
]), Er = (e, t = {}) => {
|
|
705
705
|
const { target: r, enabled: n = !0 } = t;
|
|
706
706
|
H(() => {
|
|
707
707
|
const o = kt(r);
|
|
708
708
|
if (!n || !o) return;
|
|
709
709
|
const a = (i) => {
|
|
710
710
|
if (!Gt(i) || i.defaultPrevented || _t(i.target)) return;
|
|
711
|
-
const c =
|
|
711
|
+
const c = me(i);
|
|
712
712
|
if (!c) return;
|
|
713
713
|
const u = e.current;
|
|
714
714
|
u && (c === "undo" ? u.undo() : u.redo()) && i.preventDefault();
|
|
@@ -724,41 +724,42 @@ export {
|
|
|
724
724
|
Pt as BrandMark,
|
|
725
725
|
$t as CanvasTextMeasurer,
|
|
726
726
|
Dt as DefaultFooter,
|
|
727
|
-
|
|
728
|
-
|
|
727
|
+
or as DefaultGrid,
|
|
728
|
+
Jt as DefaultHeader,
|
|
729
729
|
xt as DefaultSwatch,
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
730
|
+
Kt as DefaultTooltip,
|
|
731
|
+
Sr as DevToolsPanel,
|
|
732
|
+
tr as GRAPH_MODES,
|
|
733
733
|
Le as GraphErrorBoundary,
|
|
734
734
|
Z as GraphErrorPanel,
|
|
735
735
|
at as GraphProvider,
|
|
736
|
-
|
|
737
|
-
|
|
736
|
+
Yt as GraphRenderer,
|
|
737
|
+
Ft as HoverProvider,
|
|
738
738
|
Bt as TextMeasurerProvider,
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
739
|
+
nr as ThemeProvider,
|
|
740
|
+
yr as UnitBoxSvg,
|
|
741
|
+
vr as UnitSpaceSvg,
|
|
742
|
+
fr as createGraphyKit,
|
|
743
|
+
Zt as darkTheme,
|
|
744
|
+
ir as defineGeomRenderer,
|
|
745
|
+
Wt as lightTheme,
|
|
746
746
|
Mt as lightenCss,
|
|
747
747
|
Oe as pruneSelection,
|
|
748
748
|
Lt as resolveBrandMarkVisual,
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
Xt as useGeomHitTest,
|
|
749
|
+
Xt as useElementScreenRect,
|
|
750
|
+
zt as useGeomHitTest,
|
|
752
751
|
Vt as useGeomHover,
|
|
753
|
-
|
|
754
|
-
|
|
752
|
+
rr as useGraphCommands,
|
|
753
|
+
Qt as useGraphHandle,
|
|
755
754
|
br as useGraphHistory,
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
755
|
+
Er as useGraphHistoryShortcuts,
|
|
756
|
+
jt as useGraphSelection,
|
|
757
|
+
sr as useHandleScene,
|
|
758
|
+
Ut as useHoverState,
|
|
759
|
+
At as useSceneSelector,
|
|
760
|
+
Ot as useStyleReaderTree,
|
|
761
|
+
ar as useStyleReaders,
|
|
762
|
+
Ht as useStyleResolver,
|
|
763
|
+
er as useTextMeasurer,
|
|
764
|
+
dr as vars
|
|
764
765
|
};
|
|
@@ -14,17 +14,17 @@ import './theme.contract.css';var a = [
|
|
|
14
14
|
white: "var(--graphy-white)",
|
|
15
15
|
black: "var(--graphy-black)",
|
|
16
16
|
transparent: "var(--graphy-transparent)",
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
gray100: "var(--graphy-gray-100)",
|
|
18
|
+
gray95: "var(--graphy-gray-95)",
|
|
19
|
+
gray90: "var(--graphy-gray-90)",
|
|
20
|
+
gray85: "var(--graphy-gray-85)",
|
|
21
|
+
gray80: "var(--graphy-gray-80)",
|
|
22
|
+
gray75: "var(--graphy-gray-75)",
|
|
23
|
+
gray70: "var(--graphy-gray-70)",
|
|
24
|
+
gray60: "var(--graphy-gray-60)",
|
|
25
|
+
gray50: "var(--graphy-gray-50)",
|
|
26
|
+
gray0: "var(--graphy-gray-0)",
|
|
27
|
+
grayGradient80: "var(--graphy-gray-gradient-80)",
|
|
28
28
|
green60: "var(--graphy-green-60)",
|
|
29
29
|
green50: "var(--graphy-green-50)",
|
|
30
30
|
red60: "var(--graphy-red-60)",
|