@graphysdk/react-renderer 1.9.0-beta.1790233123402 → 1.9.0-beta.1790263076123
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.d.ts +3 -0
- package/dist/editable.mjs +2924 -2834
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +38 -2
- package/dist/index.mjs +119 -119
- package/dist/{use-target-boundary-wO7GBGCI.js → use-target-boundary-4MJrqeJ9.js} +3528 -3064
- package/dist/use-target-boundary-CfIbCLSH.cjs +2 -0
- package/package.json +4 -4
- package/dist/use-target-boundary-DMdRic0P.cjs +0 -2
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as le, B as $t, Bt as Ht, Dt as K, Ht as xt, Jt as Mt, L as Lt, Lt as Pt, M as Bt, Mt as At, N as Ot, Nt as U, Pt as ue, R as Kt, Rt as me, T as jt, Tt as Ut, Ut as Ft, V as Yt, Vt, _t as Wt, a as Xt, an as Jt, bt as Qt, c as zt, cn as j, dt as Zt, ft as er, g as tr, i as rr, in as nr, it as sr, j as or, jt as ge, lt as ir, n as he, nn as ar, o as cr, on as pe, r as dr, rn as lr, rt as ur, sn as oe, t as mr, tn as gr, wt as hr, yt as pr } from "./use-target-boundary-4MJrqeJ9.js";
|
|
2
2
|
import { n as vr } from "./theme.contract.css-AyXDNf0F.js";
|
|
3
|
-
import { COMPILER_STAGE_KEYS as
|
|
4
|
-
import { Component as Ge, useCallback as f, useEffect as M, useId as ke, useImperativeHandle as we, useMemo as
|
|
3
|
+
import { COMPILER_STAGE_KEYS as F, Geom as fe, GraphCompilationSession as ve, areEditTargetsEqual as ye, buildDiagnostic as J, createAnchorResolver as Se, createCompiler as be, createSpecBuilder as Ee, createStyleResolver as Te, findAnnotation as Re, findLayerById as Q, isCompilerCachingEnabled as Ne, resolveDefinition as qe, setCompilerCachingEnabled as Ce, toPercent as B } from "@graphysdk/viz-engine";
|
|
4
|
+
import { Component as Ge, useCallback as f, useEffect as M, useId as ke, useImperativeHandle as we, useMemo as x, useRef as z, useState as b, useSyncExternalStore as Ie } from "react";
|
|
5
5
|
import { Fragment as De, jsx as c, jsxs as v } from "react/jsx-runtime";
|
|
6
6
|
import { useStore as Z } from "zustand";
|
|
7
7
|
import { createStore as Y } from "zustand/vanilla";
|
|
8
8
|
import _e from "clsx";
|
|
9
|
-
import './index.css';var $e = "_1a5iqpb0",
|
|
10
|
-
var
|
|
9
|
+
import './index.css';var $e = "_1a5iqpb0", He = "_1a5iqpb1";
|
|
10
|
+
var xe = "_1a5iqpb3", Me = "_1a5iqpb4", Le = "_1a5iqpb5";
|
|
11
11
|
var ee = ({ errors: e }) => {
|
|
12
12
|
const [t, ...n] = e;
|
|
13
13
|
return /* @__PURE__ */ v("div", {
|
|
@@ -15,7 +15,7 @@ var ee = ({ errors: e }) => {
|
|
|
15
15
|
className: $e,
|
|
16
16
|
children: [
|
|
17
17
|
/* @__PURE__ */ c("strong", {
|
|
18
|
-
className:
|
|
18
|
+
className: He,
|
|
19
19
|
children: "This chart could not be rendered."
|
|
20
20
|
}),
|
|
21
21
|
t && /* @__PURE__ */ c(te, { diagnostic: t }),
|
|
@@ -26,7 +26,7 @@ var ee = ({ errors: e }) => {
|
|
|
26
26
|
]
|
|
27
27
|
});
|
|
28
28
|
}, te = ({ diagnostic: e }) => /* @__PURE__ */ v("div", {
|
|
29
|
-
className:
|
|
29
|
+
className: xe,
|
|
30
30
|
children: [
|
|
31
31
|
/* @__PURE__ */ c("span", {
|
|
32
32
|
className: Me,
|
|
@@ -50,10 +50,10 @@ var Be = class extends Ge {
|
|
|
50
50
|
super(...e), this.state = { caughtDiagnostic: null };
|
|
51
51
|
}
|
|
52
52
|
static getDerivedStateFromError(e) {
|
|
53
|
-
return { caughtDiagnostic:
|
|
53
|
+
return { caughtDiagnostic: J(e) };
|
|
54
54
|
}
|
|
55
55
|
componentDidCatch(e, t) {
|
|
56
|
-
const n =
|
|
56
|
+
const n = J(e);
|
|
57
57
|
j([n]), this.props.onError?.([n]), console.error("Chart render component stack:", t.componentStack);
|
|
58
58
|
}
|
|
59
59
|
componentDidUpdate(e) {
|
|
@@ -65,24 +65,24 @@ var Be = class extends Ge {
|
|
|
65
65
|
const { forcedErrors: t, children: n } = this.props;
|
|
66
66
|
return t && t.length > 0 ? /* @__PURE__ */ c(ee, { errors: t }) : n;
|
|
67
67
|
}
|
|
68
|
-
}, ie = (e) => typeof e == "object" && "geom" in e && "render" in e,
|
|
69
|
-
const t =
|
|
68
|
+
}, ie = (e) => typeof e == "object" && "geom" in e && "render" in e, Ae = (e) => {
|
|
69
|
+
const t = qe(e);
|
|
70
70
|
return t instanceof fe ? t : null;
|
|
71
|
-
},
|
|
71
|
+
}, Oe = (e, t) => {
|
|
72
72
|
const n = e.filter((r) => Ke(r, t));
|
|
73
73
|
return n.length === e.length ? e : n;
|
|
74
|
-
}, Ke = (e, t) => e.kind === "annotation" ? Re(t.annotations, e.id) !== null : e.kind === "observations" ?
|
|
74
|
+
}, Ke = (e, t) => e.kind === "annotation" ? Re(t.annotations, e.id) !== null : e.kind === "observations" ? Q(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? Q(t.layers, e.layerId) !== void 0 : !0, re = [], je = () => Y((e) => ({
|
|
75
75
|
selection: re,
|
|
76
|
-
setSelection: (t) => e((n) =>
|
|
76
|
+
setSelection: (t) => e((n) => Ue(n.selection, t) ? n : { selection: t }),
|
|
77
77
|
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: re })
|
|
78
|
-
})),
|
|
78
|
+
})), Ue = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((n, r) => {
|
|
79
79
|
const o = t[r];
|
|
80
80
|
return o !== void 0 && ye(n, o);
|
|
81
|
-
}),
|
|
82
|
-
if (!
|
|
81
|
+
}), Fe = process.env.NODE_ENV !== "production", Ye = 5, Ve = (e) => {
|
|
82
|
+
if (!Fe) return {
|
|
83
83
|
emit: () => {
|
|
84
84
|
},
|
|
85
|
-
subscribe: () =>
|
|
85
|
+
subscribe: () => Xe,
|
|
86
86
|
getLastTrigger: () => null,
|
|
87
87
|
getLastCompile: () => null,
|
|
88
88
|
getCacheStats: () => e.getCacheStats()
|
|
@@ -113,20 +113,20 @@ var Be = class extends Ge {
|
|
|
113
113
|
if (r.lastSnapshot === n) return r;
|
|
114
114
|
const o = {
|
|
115
115
|
id: r.nextId,
|
|
116
|
-
label:
|
|
116
|
+
label: Je(t),
|
|
117
117
|
stages: n.stages,
|
|
118
118
|
stageDurationsMs: n.stageDurationsMs,
|
|
119
119
|
durationMs: n.durationMs
|
|
120
120
|
};
|
|
121
121
|
return {
|
|
122
122
|
lastCompile: o,
|
|
123
|
-
history:
|
|
123
|
+
history: Qe(r.history, o, Ye),
|
|
124
124
|
nextId: r.nextId + 1,
|
|
125
125
|
lastSnapshot: n
|
|
126
126
|
};
|
|
127
127
|
})
|
|
128
|
-
})),
|
|
129
|
-
},
|
|
128
|
+
})), Xe = () => {
|
|
129
|
+
}, Je = (e) => {
|
|
130
130
|
switch (e.kind) {
|
|
131
131
|
case "init":
|
|
132
132
|
return "init";
|
|
@@ -137,14 +137,14 @@ var Be = class extends Ge {
|
|
|
137
137
|
case "command":
|
|
138
138
|
return e.command.metadata.description;
|
|
139
139
|
}
|
|
140
|
-
},
|
|
140
|
+
}, Qe = (e, t, n) => {
|
|
141
141
|
const r = e.length >= n ? e.length - (n - 1) : 0;
|
|
142
142
|
return [...e.slice(r), t];
|
|
143
143
|
};
|
|
144
|
-
function
|
|
145
|
-
const t = e.filter(ie), n = /* @__PURE__ */ new Set([...Object.keys(
|
|
144
|
+
function ze(e) {
|
|
145
|
+
const t = e.filter(ie), n = /* @__PURE__ */ new Set([...Object.keys(ue), ...t.map((d) => d.geom)]), r = [], o = /* @__PURE__ */ new Set();
|
|
146
146
|
for (const d of e) {
|
|
147
|
-
const u =
|
|
147
|
+
const u = Ae(d);
|
|
148
148
|
u === null || n.has(u.type) || o.has(u.type) || (o.add(u.type), r.push({
|
|
149
149
|
kind: "user-input",
|
|
150
150
|
severity: "error",
|
|
@@ -206,7 +206,7 @@ function et(e, t) {
|
|
|
206
206
|
for (const i of r) {
|
|
207
207
|
if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || o.has(i.geom)) continue;
|
|
208
208
|
const d = t(i.geom, n.type);
|
|
209
|
-
d === null || d.hitTest ||
|
|
209
|
+
d === null || d.hitTest || U(d) || (o.add(i.geom), a.push({
|
|
210
210
|
kind: "user-input",
|
|
211
211
|
severity: "warning",
|
|
212
212
|
code: "MISSING_RENDER_HIT_TEST",
|
|
@@ -243,7 +243,7 @@ function rt(e, t) {
|
|
|
243
243
|
for (const i of r) {
|
|
244
244
|
if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || o.has(i.geom)) continue;
|
|
245
245
|
const d = t(i.geom, n.type);
|
|
246
|
-
d === null || !d.hitTest || !
|
|
246
|
+
d === null || !d.hitTest || !U(d) || (o.add(i.geom), a.push({
|
|
247
247
|
kind: "user-input",
|
|
248
248
|
severity: "warning",
|
|
249
249
|
code: "CONFLICTING_RENDER_HIT_TEST",
|
|
@@ -278,7 +278,7 @@ function st(e, t) {
|
|
|
278
278
|
for (const i of r) {
|
|
279
279
|
if (i.interactive === !1 || i.spatialKind === "render-hit-test" || o.has(i.geom)) continue;
|
|
280
280
|
const d = t(i.geom, n.type);
|
|
281
|
-
d === null || !
|
|
281
|
+
d === null || !U(d) || (o.add(i.geom), a.push({
|
|
282
282
|
kind: "user-input",
|
|
283
283
|
severity: "warning",
|
|
284
284
|
code: "OVERLAY_REQUIRES_RENDER_HIT_TEST",
|
|
@@ -296,13 +296,13 @@ var ot = (e) => Y((t) => ({
|
|
|
296
296
|
scene: e,
|
|
297
297
|
setScene: (n) => t((r) => r.scene === n ? r : { scene: n })
|
|
298
298
|
})), it = ({ spec: e, data: t, customPalettes: n, colorScheme: r, plugins: o, resolveRenderer: a, anchorResolver: i, onSpecChange: d, onError: u, onWarnings: m }) => {
|
|
299
|
-
const T = K(d), I = K(u),
|
|
299
|
+
const T = K(d), I = K(u), C = K(m), [{ session: g, compileBus: l }] = b(() => {
|
|
300
300
|
const s = be({ plugins: o });
|
|
301
301
|
return {
|
|
302
302
|
session: new ve(s),
|
|
303
303
|
compileBus: Ve(s)
|
|
304
304
|
};
|
|
305
|
-
}), [p] = b(() =>
|
|
305
|
+
}), [p] = b(() => ze(o ?? [])), G = z(null), [y] = b(at), R = z(null), k = f((s) => p.errors.length === 0 ? s : [...p.errors, ...s ?? []], [p]), N = f((s) => {
|
|
306
306
|
if (!s.ok) return s.errors;
|
|
307
307
|
if (R.current) R.current.getState().setScene(s.scene);
|
|
308
308
|
else {
|
|
@@ -318,7 +318,7 @@ var ot = (e) => Y((t) => ({
|
|
|
318
318
|
colorScheme: r
|
|
319
319
|
});
|
|
320
320
|
return G.current = s, k(N(s));
|
|
321
|
-
}),
|
|
321
|
+
}), q = f((s) => s.ok ? [
|
|
322
322
|
...s.warnings,
|
|
323
323
|
...Ze(s.scene, a),
|
|
324
324
|
...et(s.scene, a),
|
|
@@ -329,17 +329,17 @@ var ot = (e) => Y((t) => ({
|
|
|
329
329
|
] : s.warnings, [a, i]), w = f((s) => {
|
|
330
330
|
s.length !== 0 && (j(s), I.current?.(s));
|
|
331
331
|
}, [I]), S = f((s) => {
|
|
332
|
-
s.length !== 0 && (j(s),
|
|
333
|
-
}, [
|
|
332
|
+
s.length !== 0 && (j(s), C.current?.(s));
|
|
333
|
+
}, [C]);
|
|
334
334
|
M(() => {
|
|
335
335
|
const s = G.current;
|
|
336
|
-
s && (w([...p.errors, ...s.ok ? [] : s.errors]), S([...p.warnings, ...
|
|
336
|
+
s && (w([...p.errors, ...s.ok ? [] : s.errors]), S([...p.warnings, ...q(s)]), s.ok && l.emit({ kind: "init" }));
|
|
337
337
|
}, [
|
|
338
338
|
l,
|
|
339
339
|
w,
|
|
340
340
|
S,
|
|
341
341
|
p,
|
|
342
|
-
|
|
342
|
+
q
|
|
343
343
|
]), M(() => {
|
|
344
344
|
const s = g.update({
|
|
345
345
|
spec: e,
|
|
@@ -350,7 +350,7 @@ var ot = (e) => Y((t) => ({
|
|
|
350
350
|
if (!s) return;
|
|
351
351
|
s.committedSpec && T.current?.(s.committedSpec);
|
|
352
352
|
const h = N(s.result);
|
|
353
|
-
_(k(h)), h && w(h), S(
|
|
353
|
+
_(k(h)), h && w(h), S(q(s.result)), h || l.emit({ kind: s.specChanged ? "spec" : "data" });
|
|
354
354
|
}, [
|
|
355
355
|
e,
|
|
356
356
|
t,
|
|
@@ -362,15 +362,15 @@ var ot = (e) => Y((t) => ({
|
|
|
362
362
|
w,
|
|
363
363
|
S,
|
|
364
364
|
k,
|
|
365
|
-
|
|
365
|
+
q,
|
|
366
366
|
T
|
|
367
367
|
]);
|
|
368
368
|
const $ = f((s) => {
|
|
369
|
-
_((h) => h === null ? h : k(null)), S(
|
|
369
|
+
_((h) => h === null ? h : k(null)), S(q(s));
|
|
370
370
|
}, [
|
|
371
371
|
k,
|
|
372
372
|
S,
|
|
373
|
-
|
|
373
|
+
q
|
|
374
374
|
]), D = f((s) => {
|
|
375
375
|
s.scene && R.current?.getState().setScene(s.scene), s.result && $(s.result), s.command && l.emit({
|
|
376
376
|
kind: "command",
|
|
@@ -386,21 +386,21 @@ var ot = (e) => Y((t) => ({
|
|
|
386
386
|
return s.some((h) => !!h.scene);
|
|
387
387
|
}, [D]), P = f((s, h) => {
|
|
388
388
|
E(g.applyCommand(s, h));
|
|
389
|
-
}, [g, E]),
|
|
389
|
+
}, [g, E]), O = f(() => {
|
|
390
390
|
E(g.commit());
|
|
391
|
-
}, [g, E]), W = f(() => E(g.undo()), [g, E]),
|
|
391
|
+
}, [g, E]), W = f(() => E(g.undo()), [g, E]), X = f(() => E(g.redo()), [g, E]), ce = x(() => ({
|
|
392
392
|
stack: g.history,
|
|
393
393
|
undo: W,
|
|
394
|
-
redo:
|
|
394
|
+
redo: X
|
|
395
395
|
}), [
|
|
396
396
|
g,
|
|
397
397
|
W,
|
|
398
|
-
|
|
398
|
+
X
|
|
399
399
|
]), de = f(() => R.current?.getState().scene ?? null, []);
|
|
400
400
|
return {
|
|
401
401
|
store: R.current,
|
|
402
402
|
dispatch: P,
|
|
403
|
-
commit:
|
|
403
|
+
commit: O,
|
|
404
404
|
history: ce,
|
|
405
405
|
subscribe: y.subscribe,
|
|
406
406
|
getScene: de,
|
|
@@ -416,7 +416,7 @@ var ot = (e) => Y((t) => ({
|
|
|
416
416
|
notify: () => e.forEach((t) => t())
|
|
417
417
|
};
|
|
418
418
|
}, ct = ({ data: e, spec: t, plugins: n = [], formattingLocale: r, handleRef: o, onSpecChange: a, onError: i, onWarnings: d, customPalettes: u, colorScheme: m = "light", children: T }) => {
|
|
419
|
-
const [I] = b(() =>
|
|
419
|
+
const [I] = b(() => ge(n.filter(ie))), C = ke(), [g] = b(() => Se(n)), [l] = b(() => je()), [p] = b(() => le()), G = x(() => Te({ colorScheme: m }), [m]), { store: y, dispatch: R, commit: k, history: N, subscribe: L, getScene: _, compileBus: q, compileErrors: w } = it({
|
|
420
420
|
spec: t,
|
|
421
421
|
data: e,
|
|
422
422
|
customPalettes: u,
|
|
@@ -432,11 +432,11 @@ var ot = (e) => Y((t) => ({
|
|
|
432
432
|
if (y)
|
|
433
433
|
return y.subscribe((D, E) => {
|
|
434
434
|
if (D.scene.spec === E.scene.spec) return;
|
|
435
|
-
const { selection: P, setSelection:
|
|
436
|
-
P.length !== 0 &&
|
|
435
|
+
const { selection: P, setSelection: O } = l.getState();
|
|
436
|
+
P.length !== 0 && O(Oe(P, D.scene.spec));
|
|
437
437
|
});
|
|
438
438
|
}, [y, l]);
|
|
439
|
-
const S =
|
|
439
|
+
const S = x(() => ({
|
|
440
440
|
dispatch: R,
|
|
441
441
|
commit: k
|
|
442
442
|
}), [R, k]);
|
|
@@ -456,27 +456,27 @@ var ot = (e) => Y((t) => ({
|
|
|
456
456
|
_,
|
|
457
457
|
l
|
|
458
458
|
]);
|
|
459
|
-
const $ =
|
|
460
|
-
chartId:
|
|
459
|
+
const $ = x(() => y ? {
|
|
460
|
+
chartId: C,
|
|
461
461
|
store: y,
|
|
462
462
|
selectionStore: l,
|
|
463
463
|
targetBoundaryStore: p,
|
|
464
464
|
commands: S,
|
|
465
465
|
history: N,
|
|
466
466
|
formattingLocale: r,
|
|
467
|
-
compileBus:
|
|
467
|
+
compileBus: q,
|
|
468
468
|
colorScheme: m,
|
|
469
469
|
styleResolver: G,
|
|
470
470
|
anchorResolver: g
|
|
471
471
|
} : null, [
|
|
472
|
-
|
|
472
|
+
C,
|
|
473
473
|
y,
|
|
474
474
|
l,
|
|
475
475
|
p,
|
|
476
476
|
S,
|
|
477
477
|
N,
|
|
478
478
|
r,
|
|
479
|
-
|
|
479
|
+
q,
|
|
480
480
|
m,
|
|
481
481
|
G,
|
|
482
482
|
g
|
|
@@ -487,7 +487,7 @@ var ot = (e) => Y((t) => ({
|
|
|
487
487
|
resetKeys: [t, e],
|
|
488
488
|
children: $ ? /* @__PURE__ */ c(pe.Provider, {
|
|
489
489
|
value: $,
|
|
490
|
-
children: /* @__PURE__ */ c(
|
|
490
|
+
children: /* @__PURE__ */ c(me, {
|
|
491
491
|
value: I,
|
|
492
492
|
children: T
|
|
493
493
|
})
|
|
@@ -504,7 +504,7 @@ function Nr(e) {
|
|
|
504
504
|
})
|
|
505
505
|
};
|
|
506
506
|
}
|
|
507
|
-
var
|
|
507
|
+
var qr = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
|
|
508
508
|
viewBox: "0 0 1 1",
|
|
509
509
|
preserveAspectRatio: "none",
|
|
510
510
|
width: "100%",
|
|
@@ -512,7 +512,7 @@ var Cr = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
|
|
|
512
512
|
pointerEvents: "none",
|
|
513
513
|
...t,
|
|
514
514
|
children: e
|
|
515
|
-
}),
|
|
515
|
+
}), Cr = ({ box: e, children: t }) => /* @__PURE__ */ c("svg", {
|
|
516
516
|
x: B(e.x0),
|
|
517
517
|
y: B(e.y0),
|
|
518
518
|
width: B(e.x1 - e.x0),
|
|
@@ -520,7 +520,7 @@ var Cr = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
|
|
|
520
520
|
overflow: "hidden",
|
|
521
521
|
pointerEvents: "none",
|
|
522
522
|
children: t
|
|
523
|
-
}), dt = "drqe3u0", lt = "drqe3u1", ut = "drqe3u2", mt = "drqe3u3",
|
|
523
|
+
}), dt = "drqe3u0", lt = "drqe3u1", ut = "drqe3u2", mt = "drqe3u3", H = "drqe3u4", gt = "drqe3u5", ht = "drqe3u6", pt = "drqe3u7", A = "drqe3u8", ft = "drqe3u9", vt = "drqe3ua";
|
|
524
524
|
var yt = "drqe3uc", St = "drqe3ud", bt = "drqe3ue", Et = "drqe3uf";
|
|
525
525
|
var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
|
|
526
526
|
enabled: "drqe3uk drqe3uj",
|
|
@@ -538,10 +538,10 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
|
|
|
538
538
|
const { recordCompile: l } = o.getState(), p = r.getLastTrigger(), G = r.getLastCompile();
|
|
539
539
|
return p && G && l(p, G), r.subscribe(l);
|
|
540
540
|
}, [o, r]);
|
|
541
|
-
const m = Z(o, (l) => l.lastCompile), T = Z(o, (l) => l.history), I = r.getCacheStats(),
|
|
541
|
+
const m = Z(o, (l) => l.lastCompile), T = Z(o, (l) => l.history), I = r.getCacheStats(), C = m === null && T.length === 0, g = () => {
|
|
542
542
|
u((l) => {
|
|
543
543
|
const p = !l;
|
|
544
|
-
return
|
|
544
|
+
return Ce(p), p;
|
|
545
545
|
});
|
|
546
546
|
};
|
|
547
547
|
return /* @__PURE__ */ v("div", {
|
|
@@ -558,7 +558,7 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
|
|
|
558
558
|
children: "compile cache"
|
|
559
559
|
}), /* @__PURE__ */ c("div", {
|
|
560
560
|
className: bt,
|
|
561
|
-
children:
|
|
561
|
+
children: C ? "production: stats disabled" : m ? `last: ${m.label} · ${V(m.durationMs)}` : "awaiting first compile…"
|
|
562
562
|
})] }), /* @__PURE__ */ c("button", {
|
|
563
563
|
type: "button",
|
|
564
564
|
onClick: () => i((l) => !l),
|
|
@@ -579,11 +579,11 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
|
|
|
579
579
|
children: "next compile reflects this toggle"
|
|
580
580
|
})]
|
|
581
581
|
}),
|
|
582
|
-
!a && !
|
|
582
|
+
!a && !C && /* @__PURE__ */ v(De, { children: [/* @__PURE__ */ c(Nt, {
|
|
583
583
|
delta: m?.stages,
|
|
584
584
|
durations: m?.stageDurationsMs,
|
|
585
585
|
cumulative: I
|
|
586
|
-
}), /* @__PURE__ */ c(
|
|
586
|
+
}), /* @__PURE__ */ c(qt, { entries: T })] })
|
|
587
587
|
]
|
|
588
588
|
});
|
|
589
589
|
}, Nt = ({ delta: e, durations: t, cumulative: n }) => /* @__PURE__ */ v("table", {
|
|
@@ -596,28 +596,28 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
|
|
|
596
596
|
children: "stage"
|
|
597
597
|
}),
|
|
598
598
|
/* @__PURE__ */ c("th", {
|
|
599
|
-
className:
|
|
599
|
+
className: H,
|
|
600
600
|
children: "time"
|
|
601
601
|
}),
|
|
602
602
|
/* @__PURE__ */ c("th", {
|
|
603
|
-
className:
|
|
603
|
+
className: H,
|
|
604
604
|
children: "Δ miss"
|
|
605
605
|
}),
|
|
606
606
|
/* @__PURE__ */ c("th", {
|
|
607
|
-
className:
|
|
607
|
+
className: H,
|
|
608
608
|
children: "Δ hit"
|
|
609
609
|
}),
|
|
610
610
|
/* @__PURE__ */ c("th", {
|
|
611
|
-
className:
|
|
611
|
+
className: H,
|
|
612
612
|
children: "total miss"
|
|
613
613
|
}),
|
|
614
614
|
/* @__PURE__ */ c("th", {
|
|
615
|
-
className:
|
|
615
|
+
className: H,
|
|
616
616
|
children: "total hit"
|
|
617
617
|
})
|
|
618
618
|
]
|
|
619
|
-
}) }), /* @__PURE__ */ c("tbody", { children:
|
|
620
|
-
const o = e?.[r], a =
|
|
619
|
+
}) }), /* @__PURE__ */ c("tbody", { children: F.map((r) => {
|
|
620
|
+
const o = e?.[r], a = Ct(o);
|
|
621
621
|
return /* @__PURE__ */ v("tr", {
|
|
622
622
|
className: yt,
|
|
623
623
|
children: [
|
|
@@ -633,7 +633,7 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
|
|
|
633
633
|
]
|
|
634
634
|
}),
|
|
635
635
|
/* @__PURE__ */ c("td", {
|
|
636
|
-
className:
|
|
636
|
+
className: A,
|
|
637
637
|
children: t === void 0 || a === "untouched" ? "—" : V(t[r])
|
|
638
638
|
}),
|
|
639
639
|
/* @__PURE__ */ c("td", {
|
|
@@ -641,27 +641,27 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
|
|
|
641
641
|
children: o?.misses ?? 0
|
|
642
642
|
}),
|
|
643
643
|
/* @__PURE__ */ c("td", {
|
|
644
|
-
className:
|
|
644
|
+
className: A,
|
|
645
645
|
children: o?.hits ?? 0
|
|
646
646
|
}),
|
|
647
647
|
/* @__PURE__ */ c("td", {
|
|
648
|
-
className:
|
|
648
|
+
className: A,
|
|
649
649
|
children: n[r].misses
|
|
650
650
|
}),
|
|
651
651
|
/* @__PURE__ */ c("td", {
|
|
652
|
-
className:
|
|
652
|
+
className: A,
|
|
653
653
|
children: n[r].hits
|
|
654
654
|
})
|
|
655
655
|
]
|
|
656
656
|
}, r);
|
|
657
657
|
}) })]
|
|
658
|
-
}),
|
|
658
|
+
}), qt = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ v("div", {
|
|
659
659
|
className: St,
|
|
660
660
|
children: [/* @__PURE__ */ c("div", {
|
|
661
661
|
className: Rt,
|
|
662
662
|
children: "recent compiles"
|
|
663
663
|
}), e.map((t) => {
|
|
664
|
-
const n = Gt(t.stages, (a) => a.misses > 0), r =
|
|
664
|
+
const n = Gt(t.stages, (a) => a.misses > 0), r = F.length;
|
|
665
665
|
return /* @__PURE__ */ v("div", {
|
|
666
666
|
className: ht,
|
|
667
667
|
children: [
|
|
@@ -687,13 +687,13 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
|
|
|
687
687
|
]
|
|
688
688
|
}, t.id);
|
|
689
689
|
})]
|
|
690
|
-
}),
|
|
690
|
+
}), Ct = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", Gt = (e, t) => {
|
|
691
691
|
let n = 0;
|
|
692
|
-
for (const r of
|
|
692
|
+
for (const r of F) t(e[r]) && (n += 1);
|
|
693
693
|
return n;
|
|
694
694
|
}, V = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, kr = () => {
|
|
695
695
|
const { history: e } = oe(), { stack: t, undo: n, redo: r } = e, o = f((d) => t.subscribe(d), [t]), a = f(() => t.getSnapshot(), [t]), i = Ie(o, a, a);
|
|
696
|
-
return
|
|
696
|
+
return x(() => ({
|
|
697
697
|
...i,
|
|
698
698
|
undo: n,
|
|
699
699
|
redo: r
|
|
@@ -733,52 +733,52 @@ var Tt = "drqe3uh", Rt = "drqe3ui", ne = {
|
|
|
733
733
|
]);
|
|
734
734
|
}, wt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, It = (e) => "key" in e, Dt = (e) => e instanceof HTMLInputElement ? !kt.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1;
|
|
735
735
|
export {
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
736
|
+
$t as BrandMark,
|
|
737
|
+
xt as CanvasTextMeasurer,
|
|
738
|
+
Kt as DefaultFooter,
|
|
739
|
+
zt as DefaultGrid,
|
|
740
|
+
Lt as DefaultHeader,
|
|
741
|
+
Pt as DefaultSwatch,
|
|
742
|
+
ur as DefaultTooltip,
|
|
743
743
|
Gr as DevToolsPanel,
|
|
744
|
-
|
|
744
|
+
Wt as GRAPH_MODES,
|
|
745
745
|
Be as GraphErrorBoundary,
|
|
746
746
|
ee as GraphErrorPanel,
|
|
747
747
|
ct as GraphProvider,
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
748
|
+
cr as GraphRenderer,
|
|
749
|
+
Ut as HoverProvider,
|
|
750
|
+
Ht as TextMeasurerProvider,
|
|
751
|
+
ir as ThemeProvider,
|
|
752
|
+
Cr as UnitBoxSvg,
|
|
753
|
+
qr as UnitSpaceSvg,
|
|
754
754
|
Nr as createGraphyKit,
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
755
|
+
Zt as darkTheme,
|
|
756
|
+
At as defineGeomRenderer,
|
|
757
|
+
er as lightTheme,
|
|
758
|
+
Mt as lightenCss,
|
|
759
|
+
Oe as pruneSelection,
|
|
760
|
+
Yt as resolveBrandMarkVisual,
|
|
761
|
+
or as stampAxisEditTarget,
|
|
762
|
+
Bt as stampGridEditTarget,
|
|
763
|
+
Ot as stampLegendEditTarget,
|
|
764
|
+
Qt as useElementScreenRect,
|
|
765
|
+
hr as useGeomHitTest,
|
|
766
|
+
pr as useGeomHover,
|
|
767
|
+
gr as useGeomReaderTree,
|
|
768
|
+
dr as useGraphCommands,
|
|
769
|
+
Xt as useGraphHandle,
|
|
770
770
|
kr as useGraphHistory,
|
|
771
771
|
wr as useGraphHistoryShortcuts,
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
772
|
+
tr as useGraphSelection,
|
|
773
|
+
jt as useGuidesTakePress,
|
|
774
|
+
rr as useHandleScene,
|
|
775
|
+
sr as useHoverState,
|
|
776
|
+
Ft as useResolvedStyle,
|
|
777
|
+
Jt as useSceneSelector,
|
|
778
|
+
ar as useStyleReaderTree,
|
|
779
|
+
lr as useStyleReaders,
|
|
780
|
+
nr as useStyleResolver,
|
|
781
|
+
mr as useTargetBoundary,
|
|
782
|
+
Vt as useTextMeasurer,
|
|
783
783
|
vr as vars
|
|
784
784
|
};
|