@graphysdk/react-renderer 1.9.0-beta.1792409717036 → 1.9.0-beta.1792410301640
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 -6
- package/dist/editable.mjs +1717 -1685
- package/dist/history-chords-Coid8oNw.cjs +2 -0
- package/dist/{history-chords-CABMe8pp.js → history-chords-J77rC1ob.js} +1063 -1055
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +123 -123
- package/package.json +2 -2
- package/dist/history-chords-C7IuqY3m.cjs +0 -2
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { At as or, Bt as
|
|
2
|
-
import { COMPILER_STAGE_KEYS as re, Geom as Le, GraphCompilationSession as
|
|
3
|
-
import { Component as Ue, useCallback as v, useEffect as H, useId as
|
|
1
|
+
import { An as te, At as or, Bt as ar, Cn as ir, Dn as cr, Dt as lr, En as dr, Ft as Z, H as ur, Ht as Ne, Kt as mr, M as hr, Mt as gr, N as pr, Nn as J, Nt as vr, On as fr, Qt as yr, R as Sr, Rt as Ge, Sn as br, Tn as Er, Tt as Tr, Ut as Rr, V as Nr, Vt as Y, Xt as Gr, Yt as Cr, Zt as Dr, _n as z, _t as wr, a as Pr, an as qr, at as Ir, cn as _r, ct as kr, dn as fe, fn as Ce, gn as De, h as Lr, hn as Mr, i as xr, j as $r, jn as we, jt as Hr, kn as Pe, ln as ye, mn as W, mt as Ar, n as Br, nn as Or, ot as Kr, pn as qe, qt as Ie, r as Fr, s as jr, t as _e, un as A, vn as V, vt as Ur, w as Yr, wn as zr, xn as Wr, yn as Vr, z as Xr, zt as ke } from "./history-chords-J77rC1ob.js";
|
|
2
|
+
import { COMPILER_STAGE_KEYS as re, Geom as Le, GraphCompilationSession as Me, areEditTargetsEqual as xe, buildDiagnostic as oe, createAnchorResolver as $e, createCompiler as He, createDataLabelPlacementResolver as Ae, createSpecBuilder as Be, createStyleResolver as Se, findAnnotation as Oe, findLayerById as ae, isCompilerCachingEnabled as Ke, resolveDefinition as Fe, resolveGeomCornerRadiusPx as ie, setCompilerCachingEnabled as je, toPercent as j } from "@graphysdk/viz-engine";
|
|
3
|
+
import { Component as Ue, useCallback as v, useEffect as H, useId as Ye, useImperativeHandle as ze, useMemo as _, useRef as ce, useState as b, useSyncExternalStore as We } from "react";
|
|
4
4
|
import { Fragment as Ve, jsx as c, jsxs as f } from "react/jsx-runtime";
|
|
5
5
|
import { useStore as ee } from "zustand";
|
|
6
6
|
import { motion as X } from "motion/react";
|
|
7
7
|
import { createStore as ne } from "zustand/vanilla";
|
|
8
8
|
import Xe from "clsx";
|
|
9
|
-
import './index.css';var
|
|
10
|
-
var
|
|
9
|
+
import './index.css';var Qe = "_1a5iqpb0", Ze = "_1a5iqpb1";
|
|
10
|
+
var Je = "_1a5iqpb3", et = "_1a5iqpb4", tt = "_1a5iqpb5";
|
|
11
11
|
var le = ({ errors: e }) => {
|
|
12
12
|
const [t, ...r] = e;
|
|
13
13
|
return /* @__PURE__ */ f("div", {
|
|
14
14
|
role: "alert",
|
|
15
|
-
className:
|
|
15
|
+
className: Qe,
|
|
16
16
|
children: [
|
|
17
17
|
/* @__PURE__ */ c("strong", {
|
|
18
|
-
className:
|
|
18
|
+
className: Ze,
|
|
19
19
|
children: "This chart could not be rendered."
|
|
20
20
|
}),
|
|
21
21
|
t && /* @__PURE__ */ c(de, { diagnostic: t }),
|
|
@@ -26,7 +26,7 @@ var le = ({ errors: e }) => {
|
|
|
26
26
|
]
|
|
27
27
|
});
|
|
28
28
|
}, de = ({ diagnostic: e }) => /* @__PURE__ */ f("div", {
|
|
29
|
-
className:
|
|
29
|
+
className: Je,
|
|
30
30
|
children: [
|
|
31
31
|
/* @__PURE__ */ c("span", {
|
|
32
32
|
className: et,
|
|
@@ -54,7 +54,7 @@ var nt = class extends Ue {
|
|
|
54
54
|
}
|
|
55
55
|
componentDidCatch(e, t) {
|
|
56
56
|
const r = oe(e);
|
|
57
|
-
|
|
57
|
+
J([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
|
|
58
58
|
}
|
|
59
59
|
componentDidUpdate(e) {
|
|
60
60
|
this.state.caughtDiagnostic && !rt(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
|
|
@@ -77,7 +77,7 @@ var nt = class extends Ue {
|
|
|
77
77
|
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: ue })
|
|
78
78
|
})), it = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
|
|
79
79
|
const s = t[n];
|
|
80
|
-
return s !== void 0 &&
|
|
80
|
+
return s !== void 0 && xe(r, s);
|
|
81
81
|
}), ct = process.env.NODE_ENV !== "production", lt = 5, dt = (e) => {
|
|
82
82
|
if (!ct) return {
|
|
83
83
|
emit: () => {
|
|
@@ -206,7 +206,7 @@ function vt(e, t) {
|
|
|
206
206
|
for (const a of n) {
|
|
207
207
|
if (a.interactive === !1 || a.spatialKind !== "render-hit-test" || s.has(a.geom)) continue;
|
|
208
208
|
const l = t(a.geom, r.type);
|
|
209
|
-
l === null || l.hitTest ||
|
|
209
|
+
l === null || l.hitTest || Y(l) || (s.add(a.geom), i.push({
|
|
210
210
|
kind: "user-input",
|
|
211
211
|
severity: "warning",
|
|
212
212
|
code: "MISSING_RENDER_HIT_TEST",
|
|
@@ -243,7 +243,7 @@ function yt(e, t) {
|
|
|
243
243
|
for (const a of n) {
|
|
244
244
|
if (a.interactive === !1 || a.spatialKind !== "render-hit-test" || s.has(a.geom)) continue;
|
|
245
245
|
const l = t(a.geom, r.type);
|
|
246
|
-
l === null || !l.hitTest || !
|
|
246
|
+
l === null || !l.hitTest || !Y(l) || (s.add(a.geom), i.push({
|
|
247
247
|
kind: "user-input",
|
|
248
248
|
severity: "warning",
|
|
249
249
|
code: "CONFLICTING_RENDER_HIT_TEST",
|
|
@@ -278,7 +278,7 @@ function bt(e, t) {
|
|
|
278
278
|
for (const a of n) {
|
|
279
279
|
if (a.interactive === !1 || a.spatialKind === "render-hit-test" || s.has(a.geom)) continue;
|
|
280
280
|
const l = t(a.geom, r.type);
|
|
281
|
-
l === null || !
|
|
281
|
+
l === null || !Y(l) || (s.add(a.geom), i.push({
|
|
282
282
|
kind: "user-input",
|
|
283
283
|
severity: "warning",
|
|
284
284
|
code: "LIVE_RENDER_REQUIRES_RENDER_HIT_TEST",
|
|
@@ -294,7 +294,7 @@ function bt(e, t) {
|
|
|
294
294
|
}
|
|
295
295
|
function Et(e, t) {
|
|
296
296
|
let r;
|
|
297
|
-
return e.layers.flatMap((n, s) =>
|
|
297
|
+
return e.layers.flatMap((n, s) => Y(t(n.geom, e.coordSystem.type)) ? Tt(n) ? (r ??= Se().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
|
|
298
298
|
kind: "user-input",
|
|
299
299
|
severity: "warning",
|
|
300
300
|
code: "INVALID_STYLE_RULE",
|
|
@@ -330,13 +330,13 @@ var Nt = (e) => ne((t) => ({
|
|
|
330
330
|
scene: e,
|
|
331
331
|
setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
|
|
332
332
|
})), Gt = ({ spec: e, data: t, colorScheme: r, plugins: n, theme: s, resolveRenderer: i, anchorResolver: a, onSpecChange: l, onError: d, onWarnings: m }) => {
|
|
333
|
-
const G =
|
|
333
|
+
const G = Z(l), C = Z(d), T = Z(m), [{ session: g, compileBus: u }] = b(() => {
|
|
334
334
|
const o = He({
|
|
335
335
|
plugins: n,
|
|
336
336
|
theme: s
|
|
337
337
|
});
|
|
338
338
|
return {
|
|
339
|
-
session: new
|
|
339
|
+
session: new Me(o),
|
|
340
340
|
compileBus: dt(o)
|
|
341
341
|
};
|
|
342
342
|
}), [p] = b(() => {
|
|
@@ -345,12 +345,12 @@ var Nt = (e) => ne((t) => ({
|
|
|
345
345
|
errors: [...h.errors, ...o.errors],
|
|
346
346
|
warnings: [...h.warnings, ...o.warnings]
|
|
347
347
|
};
|
|
348
|
-
}), R = ce(null), [y] = b(Ct),
|
|
348
|
+
}), R = ce(null), [y] = b(Ct), D = ce(null), q = v((o) => p.errors.length === 0 ? o : [...p.errors, ...o ?? []], [p]), N = v((o) => {
|
|
349
349
|
if (!o.ok) return o.errors;
|
|
350
|
-
if (
|
|
350
|
+
if (D.current) D.current.getState().setScene(o.scene);
|
|
351
351
|
else {
|
|
352
352
|
const h = Nt(o.scene);
|
|
353
|
-
h.subscribe(y.notify),
|
|
353
|
+
h.subscribe(y.notify), D.current = h, y.notify();
|
|
354
354
|
}
|
|
355
355
|
return null;
|
|
356
356
|
}, [y]), [B, k] = b(() => {
|
|
@@ -369,17 +369,17 @@ var Nt = (e) => ne((t) => ({
|
|
|
369
369
|
...bt(o.scene, i),
|
|
370
370
|
...Et(o.scene, i),
|
|
371
371
|
...St(o.scene, a)
|
|
372
|
-
] : o.warnings, [i, a]),
|
|
373
|
-
o.length !== 0 && (
|
|
372
|
+
] : o.warnings, [i, a]), w = v((o) => {
|
|
373
|
+
o.length !== 0 && (J(o), C.current?.(o));
|
|
374
374
|
}, [C]), P = v((o) => {
|
|
375
|
-
o.length !== 0 && (
|
|
375
|
+
o.length !== 0 && (J(o), T.current?.(o));
|
|
376
376
|
}, [T]);
|
|
377
377
|
H(() => {
|
|
378
378
|
const o = R.current;
|
|
379
|
-
o && (
|
|
379
|
+
o && (w([...p.errors, ...o.ok ? [] : o.errors]), P([...p.warnings, ...E(o)]), o.ok && u.emit({ kind: "init" }));
|
|
380
380
|
}, [
|
|
381
381
|
u,
|
|
382
|
-
|
|
382
|
+
w,
|
|
383
383
|
P,
|
|
384
384
|
p,
|
|
385
385
|
E
|
|
@@ -392,7 +392,7 @@ var Nt = (e) => ne((t) => ({
|
|
|
392
392
|
if (!o) return;
|
|
393
393
|
o.committedSpec && G.current?.(o.committedSpec);
|
|
394
394
|
const h = N(o.result);
|
|
395
|
-
k(q(h)), h &&
|
|
395
|
+
k(q(h)), h && w(h), P(E(o.result)), h || u.emit({ kind: o.specChanged ? "spec" : "data" });
|
|
396
396
|
}, [
|
|
397
397
|
e,
|
|
398
398
|
t,
|
|
@@ -400,7 +400,7 @@ var Nt = (e) => ne((t) => ({
|
|
|
400
400
|
g,
|
|
401
401
|
u,
|
|
402
402
|
N,
|
|
403
|
-
|
|
403
|
+
w,
|
|
404
404
|
P,
|
|
405
405
|
q,
|
|
406
406
|
E,
|
|
@@ -413,15 +413,15 @@ var Nt = (e) => ne((t) => ({
|
|
|
413
413
|
P,
|
|
414
414
|
E
|
|
415
415
|
]), O = v((o) => {
|
|
416
|
-
o.scene &&
|
|
416
|
+
o.scene && D.current?.getState().setScene(o.scene), o.result && L(o.result), o.command && u.emit({
|
|
417
417
|
kind: "command",
|
|
418
418
|
command: o.command
|
|
419
|
-
}), o.spec && G.current?.(o.spec), o.errors &&
|
|
419
|
+
}), o.spec && G.current?.(o.spec), o.errors && w([...o.errors]);
|
|
420
420
|
}, [
|
|
421
421
|
L,
|
|
422
422
|
u,
|
|
423
423
|
G,
|
|
424
|
-
|
|
424
|
+
w
|
|
425
425
|
]), S = v((o) => {
|
|
426
426
|
for (const h of o) O(h);
|
|
427
427
|
return o.some((h) => !!h.scene);
|
|
@@ -429,20 +429,20 @@ var Nt = (e) => ne((t) => ({
|
|
|
429
429
|
S(g.applyCommand(o, h));
|
|
430
430
|
}, [g, S]), I = v(() => {
|
|
431
431
|
S(g.commit());
|
|
432
|
-
}, [g, S]), F = v(() => S(g.undo()), [g, S]),
|
|
432
|
+
}, [g, S]), F = v(() => S(g.undo()), [g, S]), M = v(() => S(g.redo()), [g, S]), Q = _(() => ({
|
|
433
433
|
stack: g.history,
|
|
434
434
|
undo: F,
|
|
435
|
-
redo:
|
|
435
|
+
redo: M
|
|
436
436
|
}), [
|
|
437
437
|
g,
|
|
438
438
|
F,
|
|
439
|
-
|
|
440
|
-
]), Re = v(() =>
|
|
439
|
+
M
|
|
440
|
+
]), Re = v(() => D.current?.getState().scene ?? null, []);
|
|
441
441
|
return {
|
|
442
|
-
store:
|
|
442
|
+
store: D.current,
|
|
443
443
|
dispatch: K,
|
|
444
444
|
commit: I,
|
|
445
|
-
history:
|
|
445
|
+
history: Q,
|
|
446
446
|
subscribe: y.subscribe,
|
|
447
447
|
getScene: Re,
|
|
448
448
|
compileBus: u,
|
|
@@ -456,8 +456,8 @@ var Nt = (e) => ne((t) => ({
|
|
|
456
456
|
}),
|
|
457
457
|
notify: () => e.forEach((t) => t())
|
|
458
458
|
};
|
|
459
|
-
},
|
|
460
|
-
const [C] = b(() => n), T = C?.colorScheme ?? m, [g] = b(() =>
|
|
459
|
+
}, Dt = ({ data: e, spec: t, plugins: r = [], theme: n, formattingLocale: s, handleRef: i, onSpecChange: a, onError: l, onWarnings: d, colorScheme: m = "light", children: G }) => {
|
|
460
|
+
const [C] = b(() => n), T = C?.colorScheme ?? m, [g] = b(() => ke([...C?.plugins ?? [], ...r].filter(be))), u = Ye(), [p] = b(() => $e(r)), [R] = b(() => Ae(r)), [y] = b(() => at()), [D] = b(() => Ge()), q = _(() => Se({ colorScheme: T }), [T]), { store: N, dispatch: B, commit: k, history: E, subscribe: w, getScene: P, compileBus: L, compileErrors: O } = Gt({
|
|
461
461
|
spec: t,
|
|
462
462
|
data: e,
|
|
463
463
|
colorScheme: T,
|
|
@@ -473,19 +473,19 @@ var Nt = (e) => ne((t) => ({
|
|
|
473
473
|
if (N)
|
|
474
474
|
return N.subscribe((I, F) => {
|
|
475
475
|
if (I.scene.spec === F.scene.spec) return;
|
|
476
|
-
const { selection:
|
|
477
|
-
|
|
476
|
+
const { selection: M, setSelection: Q } = y.getState();
|
|
477
|
+
M.length !== 0 && Q(st(M, I.scene.spec));
|
|
478
478
|
});
|
|
479
479
|
}, [N, y]);
|
|
480
480
|
const S = _(() => ({
|
|
481
481
|
dispatch: B,
|
|
482
482
|
commit: k
|
|
483
483
|
}), [B, k]);
|
|
484
|
-
|
|
484
|
+
ze(i, () => ({
|
|
485
485
|
commands: S,
|
|
486
486
|
undo: E.undo,
|
|
487
487
|
redo: E.redo,
|
|
488
|
-
subscribe:
|
|
488
|
+
subscribe: w,
|
|
489
489
|
getScene: P,
|
|
490
490
|
getSelection: () => y.getState().selection,
|
|
491
491
|
setSelection: (I) => y.getState().setSelection(I),
|
|
@@ -495,7 +495,7 @@ var Nt = (e) => ne((t) => ({
|
|
|
495
495
|
}), [
|
|
496
496
|
S,
|
|
497
497
|
E,
|
|
498
|
-
|
|
498
|
+
w,
|
|
499
499
|
P,
|
|
500
500
|
y,
|
|
501
501
|
R
|
|
@@ -504,7 +504,7 @@ var Nt = (e) => ne((t) => ({
|
|
|
504
504
|
chartId: u,
|
|
505
505
|
store: N,
|
|
506
506
|
selectionStore: y,
|
|
507
|
-
targetBoundaryStore:
|
|
507
|
+
targetBoundaryStore: D,
|
|
508
508
|
commands: S,
|
|
509
509
|
history: E,
|
|
510
510
|
formattingLocale: s,
|
|
@@ -516,7 +516,7 @@ var Nt = (e) => ne((t) => ({
|
|
|
516
516
|
u,
|
|
517
517
|
N,
|
|
518
518
|
y,
|
|
519
|
-
|
|
519
|
+
D,
|
|
520
520
|
S,
|
|
521
521
|
E,
|
|
522
522
|
s,
|
|
@@ -529,11 +529,11 @@ var Nt = (e) => ne((t) => ({
|
|
|
529
529
|
forcedErrors: O,
|
|
530
530
|
onError: l,
|
|
531
531
|
resetKeys: [t, e],
|
|
532
|
-
children: K ? /* @__PURE__ */ c(
|
|
532
|
+
children: K ? /* @__PURE__ */ c(Pe.Provider, {
|
|
533
533
|
value: K,
|
|
534
|
-
children: /* @__PURE__ */ c(
|
|
534
|
+
children: /* @__PURE__ */ c(Ie, {
|
|
535
535
|
value: g,
|
|
536
|
-
children: /* @__PURE__ */ c(
|
|
536
|
+
children: /* @__PURE__ */ c(we, {
|
|
537
537
|
value: R,
|
|
538
538
|
children: /* @__PURE__ */ c(A, {
|
|
539
539
|
shapes: C?.shapes,
|
|
@@ -548,7 +548,7 @@ function sn({ theme: e, ...t } = {}) {
|
|
|
548
548
|
const r = Be(t);
|
|
549
549
|
return {
|
|
550
550
|
...r,
|
|
551
|
-
GraphProvider: (s) => /* @__PURE__ */ c(
|
|
551
|
+
GraphProvider: (s) => /* @__PURE__ */ c(Dt, {
|
|
552
552
|
...s,
|
|
553
553
|
plugins: r.plugins,
|
|
554
554
|
theme: e
|
|
@@ -568,8 +568,8 @@ var $ = (e, t) => {
|
|
|
568
568
|
width: l,
|
|
569
569
|
height: d
|
|
570
570
|
};
|
|
571
|
-
},
|
|
572
|
-
const a =
|
|
571
|
+
}, wt = ({ shouldAnimateTransitions: e, cx: t, cy: r, r: n, effects: s, ...i }) => {
|
|
572
|
+
const a = V(s);
|
|
573
573
|
return e ? /* @__PURE__ */ c(X.circle, {
|
|
574
574
|
initial: !1,
|
|
575
575
|
animate: {
|
|
@@ -588,7 +588,7 @@ var $ = (e, t) => {
|
|
|
588
588
|
...i
|
|
589
589
|
});
|
|
590
590
|
}, Pt = ({ shouldAnimateTransitions: e, x1: t, y1: r, x2: n, y2: s, effects: i, ...a }) => {
|
|
591
|
-
const l =
|
|
591
|
+
const l = V(i);
|
|
592
592
|
return e ? /* @__PURE__ */ c(X.line, {
|
|
593
593
|
initial: !1,
|
|
594
594
|
animate: {
|
|
@@ -609,7 +609,7 @@ var $ = (e, t) => {
|
|
|
609
609
|
...a
|
|
610
610
|
});
|
|
611
611
|
}, qt = ({ shouldAnimateTransitions: e, x: t, y: r, width: n, height: s, rx: i, ry: a, effects: l, ...d }) => {
|
|
612
|
-
const m =
|
|
612
|
+
const m = V(l);
|
|
613
613
|
return e ? /* @__PURE__ */ c(X.rect, {
|
|
614
614
|
initial: !1,
|
|
615
615
|
animate: {
|
|
@@ -636,7 +636,7 @@ var $ = (e, t) => {
|
|
|
636
636
|
...d
|
|
637
637
|
});
|
|
638
638
|
}, It = ({ shouldAnimateTransitions: e, d: t, source: r, effects: n, ...s }) => {
|
|
639
|
-
const i =
|
|
639
|
+
const i = V(n);
|
|
640
640
|
return e ? /* @__PURE__ */ c(_t, {
|
|
641
641
|
d: t,
|
|
642
642
|
source: r,
|
|
@@ -649,12 +649,12 @@ var $ = (e, t) => {
|
|
|
649
649
|
});
|
|
650
650
|
}, an = (e) => {
|
|
651
651
|
const { Circle: t } = W();
|
|
652
|
-
return t === void 0 ?
|
|
652
|
+
return t === void 0 ? wt(e) : /* @__PURE__ */ c(A, { children: /* @__PURE__ */ c(t, { ...e }) });
|
|
653
653
|
}, cn = (e) => {
|
|
654
654
|
const { Line: t } = W();
|
|
655
655
|
return t === void 0 ? Pt(e) : /* @__PURE__ */ c(A, { children: /* @__PURE__ */ c(t, { ...e }) });
|
|
656
656
|
}, ln = ({ cornerRadius: e, ...t }) => {
|
|
657
|
-
const { Rect: r } = W(), n = fe(), s =
|
|
657
|
+
const { Rect: r } = W(), n = fe(), s = qe(), i = {
|
|
658
658
|
...t,
|
|
659
659
|
...kt(e, t, n, s)
|
|
660
660
|
};
|
|
@@ -663,7 +663,7 @@ var $ = (e, t) => {
|
|
|
663
663
|
const { Path: t } = W();
|
|
664
664
|
return t === void 0 ? It(e) : /* @__PURE__ */ c(A, { children: /* @__PURE__ */ c(t, { ...e }) });
|
|
665
665
|
}, _t = ({ d: e, source: t, ...r }) => {
|
|
666
|
-
const n =
|
|
666
|
+
const n = De(e, z, t);
|
|
667
667
|
return /* @__PURE__ */ c(X.path, {
|
|
668
668
|
d: n,
|
|
669
669
|
...r
|
|
@@ -711,7 +711,7 @@ var $ = (e, t) => {
|
|
|
711
711
|
})
|
|
712
712
|
});
|
|
713
713
|
}, mn = ({ box: e, children: t }) => {
|
|
714
|
-
const r =
|
|
714
|
+
const r = Ce(), n = r === null ? null : r.width * (e.x1 - e.x0), s = r === null ? null : r.height * (e.y1 - e.y0), i = _(() => n === null || s === null ? null : {
|
|
715
715
|
width: n,
|
|
716
716
|
height: s
|
|
717
717
|
}, [n, s]);
|
|
@@ -727,9 +727,9 @@ var $ = (e, t) => {
|
|
|
727
727
|
children: t
|
|
728
728
|
})
|
|
729
729
|
});
|
|
730
|
-
},
|
|
731
|
-
var jt = "drqe3uc", Ut = "drqe3ud",
|
|
732
|
-
var
|
|
730
|
+
}, Mt = "drqe3u0", xt = "drqe3u1", $t = "drqe3u2", Ht = "drqe3u3", x = "drqe3u4", At = "drqe3u5", Bt = "drqe3u6", Ot = "drqe3u7", U = "drqe3u8", Kt = "drqe3u9", Ft = "drqe3ua";
|
|
731
|
+
var jt = "drqe3uc", Ut = "drqe3ud", Yt = "drqe3ue", zt = "drqe3uf";
|
|
732
|
+
var Wt = "drqe3uh", Vt = "drqe3ui", pe = {
|
|
733
733
|
enabled: "drqe3uk drqe3uj",
|
|
734
734
|
disabled: "drqe3ul drqe3uj"
|
|
735
735
|
}, ve = {
|
|
@@ -759,17 +759,17 @@ var zt = "drqe3uh", Vt = "drqe3ui", pe = {
|
|
|
759
759
|
},
|
|
760
760
|
children: [
|
|
761
761
|
/* @__PURE__ */ f("div", {
|
|
762
|
-
className:
|
|
762
|
+
className: Mt,
|
|
763
763
|
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ c("div", {
|
|
764
|
-
className:
|
|
764
|
+
className: xt,
|
|
765
765
|
children: "compile cache"
|
|
766
766
|
}), /* @__PURE__ */ c("div", {
|
|
767
|
-
className:
|
|
767
|
+
className: Yt,
|
|
768
768
|
children: T ? "production: stats disabled" : m ? `last: ${m.label} · ${se(m.durationMs)}` : "awaiting first compile…"
|
|
769
769
|
})] }), /* @__PURE__ */ c("button", {
|
|
770
770
|
type: "button",
|
|
771
771
|
onClick: () => a((u) => !u),
|
|
772
|
-
className:
|
|
772
|
+
className: zt,
|
|
773
773
|
children: i ? "▾" : "▴"
|
|
774
774
|
})]
|
|
775
775
|
}),
|
|
@@ -790,41 +790,41 @@ var zt = "drqe3uh", Vt = "drqe3ui", pe = {
|
|
|
790
790
|
delta: m?.stages,
|
|
791
791
|
durations: m?.stageDurationsMs,
|
|
792
792
|
cumulative: C
|
|
793
|
-
}), /* @__PURE__ */ c(
|
|
793
|
+
}), /* @__PURE__ */ c(Qt, { entries: G })] })
|
|
794
794
|
]
|
|
795
795
|
});
|
|
796
796
|
}, Xt = ({ delta: e, durations: t, cumulative: r }) => /* @__PURE__ */ f("table", {
|
|
797
797
|
className: $t,
|
|
798
798
|
children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ f("tr", {
|
|
799
|
-
className:
|
|
799
|
+
className: Wt,
|
|
800
800
|
children: [
|
|
801
801
|
/* @__PURE__ */ c("th", {
|
|
802
802
|
className: Ht,
|
|
803
803
|
children: "stage"
|
|
804
804
|
}),
|
|
805
805
|
/* @__PURE__ */ c("th", {
|
|
806
|
-
className:
|
|
806
|
+
className: x,
|
|
807
807
|
children: "time"
|
|
808
808
|
}),
|
|
809
809
|
/* @__PURE__ */ c("th", {
|
|
810
|
-
className:
|
|
810
|
+
className: x,
|
|
811
811
|
children: "Δ miss"
|
|
812
812
|
}),
|
|
813
813
|
/* @__PURE__ */ c("th", {
|
|
814
|
-
className:
|
|
814
|
+
className: x,
|
|
815
815
|
children: "Δ hit"
|
|
816
816
|
}),
|
|
817
817
|
/* @__PURE__ */ c("th", {
|
|
818
|
-
className:
|
|
818
|
+
className: x,
|
|
819
819
|
children: "total miss"
|
|
820
820
|
}),
|
|
821
821
|
/* @__PURE__ */ c("th", {
|
|
822
|
-
className:
|
|
822
|
+
className: x,
|
|
823
823
|
children: "total hit"
|
|
824
824
|
})
|
|
825
825
|
]
|
|
826
826
|
}) }), /* @__PURE__ */ c("tbody", { children: re.map((n) => {
|
|
827
|
-
const s = e?.[n], i =
|
|
827
|
+
const s = e?.[n], i = Zt(s);
|
|
828
828
|
return /* @__PURE__ */ f("tr", {
|
|
829
829
|
className: jt,
|
|
830
830
|
children: [
|
|
@@ -862,13 +862,13 @@ var zt = "drqe3uh", Vt = "drqe3ui", pe = {
|
|
|
862
862
|
]
|
|
863
863
|
}, n);
|
|
864
864
|
}) })]
|
|
865
|
-
}),
|
|
865
|
+
}), Qt = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ f("div", {
|
|
866
866
|
className: Ut,
|
|
867
867
|
children: [/* @__PURE__ */ c("div", {
|
|
868
868
|
className: Vt,
|
|
869
869
|
children: "recent compiles"
|
|
870
870
|
}), e.map((t) => {
|
|
871
|
-
const r =
|
|
871
|
+
const r = Jt(t.stages, (i) => i.misses > 0), n = re.length;
|
|
872
872
|
return /* @__PURE__ */ f("div", {
|
|
873
873
|
className: Bt,
|
|
874
874
|
children: [
|
|
@@ -894,12 +894,12 @@ var zt = "drqe3uh", Vt = "drqe3ui", pe = {
|
|
|
894
894
|
]
|
|
895
895
|
}, t.id);
|
|
896
896
|
})]
|
|
897
|
-
}),
|
|
897
|
+
}), Zt = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", Jt = (e, t) => {
|
|
898
898
|
let r = 0;
|
|
899
899
|
for (const n of re) t(e[n]) && (r += 1);
|
|
900
900
|
return r;
|
|
901
901
|
}, se = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, gn = () => {
|
|
902
|
-
const { history: e } = te(), { stack: t, undo: r, redo: n } = e, s = v((l) => t.subscribe(l), [t]), i = v(() => t.getSnapshot(), [t]), a =
|
|
902
|
+
const { history: e } = te(), { stack: t, undo: r, redo: n } = e, s = v((l) => t.subscribe(l), [t]), i = v(() => t.getSnapshot(), [t]), a = We(s, i, i);
|
|
903
903
|
return _(() => ({
|
|
904
904
|
...a,
|
|
905
905
|
undo: r,
|
|
@@ -943,72 +943,72 @@ var zt = "drqe3uh", Vt = "drqe3ui", pe = {
|
|
|
943
943
|
return ee(e, (t) => t.boundary);
|
|
944
944
|
};
|
|
945
945
|
export {
|
|
946
|
-
|
|
947
|
-
|
|
946
|
+
Nr as BrandMark,
|
|
947
|
+
Dr as CanvasTextMeasurer,
|
|
948
948
|
Xr as DefaultFooter,
|
|
949
|
-
|
|
949
|
+
wt as DefaultGeomCircle,
|
|
950
950
|
Pt as DefaultGeomLine,
|
|
951
951
|
It as DefaultGeomPath,
|
|
952
952
|
qt as DefaultGeomRect,
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
953
|
+
jr as DefaultGrid,
|
|
954
|
+
Sr as DefaultHeader,
|
|
955
|
+
mr as DefaultSwatch,
|
|
956
|
+
Kr as DefaultTooltip,
|
|
957
957
|
hn as DevToolsPanel,
|
|
958
|
-
|
|
958
|
+
Tr as GRAPH_MODES,
|
|
959
959
|
an as GeomCircle,
|
|
960
960
|
cn as GeomLine,
|
|
961
|
-
|
|
961
|
+
Hr as GeomOverpaint,
|
|
962
962
|
dn as GeomPath,
|
|
963
963
|
ln as GeomRect,
|
|
964
964
|
nt as GraphErrorBoundary,
|
|
965
965
|
le as GraphErrorPanel,
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
966
|
+
Dt as GraphProvider,
|
|
967
|
+
Pr as GraphRenderer,
|
|
968
|
+
vr as HoverProvider,
|
|
969
|
+
Rr as IntroFade,
|
|
970
|
+
Mr as IntroWipeClip,
|
|
971
|
+
Cr as TextMeasurerProvider,
|
|
972
|
+
Ar as ThemeProvider,
|
|
973
973
|
mn as UnitBoxSvg,
|
|
974
974
|
un as UnitSpaceSvg,
|
|
975
|
-
|
|
975
|
+
Wr as buildDotsEditOutlineShapes,
|
|
976
976
|
sn as createGraphyKit,
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
977
|
+
wr as darkTheme,
|
|
978
|
+
ar as defineGeomRenderer,
|
|
979
|
+
Ur as lightTheme,
|
|
980
|
+
Or as lightenCss,
|
|
981
|
+
ir as projectPointCartesian,
|
|
982
982
|
st as pruneSelection,
|
|
983
983
|
$ as readPositionPixels,
|
|
984
984
|
on as readRectPixels,
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
985
|
+
ur as resolveBrandMarkVisual,
|
|
986
|
+
Vr as resolvePathStroke,
|
|
987
|
+
br as scalePointToPanel,
|
|
988
|
+
$r as stampAxisEditTarget,
|
|
989
|
+
hr as stampGridEditTarget,
|
|
990
|
+
pr as stampLegendEditTarget,
|
|
991
|
+
lr as useElementScreenRect,
|
|
992
|
+
gr as useGeomHitTest,
|
|
993
|
+
or as useGeomHover,
|
|
994
|
+
Ce as useGeomPanelSize,
|
|
995
|
+
zr as useGeomReaderTree,
|
|
996
|
+
Er as useGeomStyleReader,
|
|
997
|
+
Br as useGraphCommands,
|
|
998
|
+
xr as useGraphHandle,
|
|
999
999
|
gn as useGraphHistory,
|
|
1000
1000
|
pn as useGraphHistoryShortcuts,
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1001
|
+
Ir as useGraphLocale,
|
|
1002
|
+
Lr as useGraphSelection,
|
|
1003
|
+
Yr as useGuidesTakePress,
|
|
1004
1004
|
Fr as useHandleScene,
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1005
|
+
kr as useHoverState,
|
|
1006
|
+
_r as usePaintDefs,
|
|
1007
|
+
yr as useResolvedStyle,
|
|
1008
|
+
fr as useSceneSelector,
|
|
1009
|
+
dr as useStyleReaderTree,
|
|
1010
|
+
cr as useStyleResolver,
|
|
1011
1011
|
vn as useTargetBoundary,
|
|
1012
|
-
|
|
1013
|
-
|
|
1012
|
+
Gr as useTextMeasurer,
|
|
1013
|
+
qr as vars
|
|
1014
1014
|
};
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"visualization",
|
|
12
12
|
"renderer"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.9.0-beta.
|
|
14
|
+
"version": "1.9.0-beta.1792410301640",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"sideEffects": [
|
|
17
17
|
"**/*.css.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"react-colorful": "^5.6.1",
|
|
51
51
|
"react-intl": "^8.1.3",
|
|
52
52
|
"zustand": "^5.0.12",
|
|
53
|
-
"@graphysdk/viz-engine": "1.9.0-beta.
|
|
53
|
+
"@graphysdk/viz-engine": "1.9.0-beta.1792410301640"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@tiptap/core": "^3.0.0",
|