@graphysdk/react-renderer 1.9.0-beta.1790592001943 → 1.9.0-beta.1790603505508
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.mjs +1954 -1882
- package/dist/history-chords-CwL9tYR_.cjs +2 -0
- package/dist/{use-target-boundary-Dbdlvyoe.js → history-chords-uAlcJltN.js} +2563 -2560
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +129 -126
- package/package.json +2 -2
- package/dist/use-target-boundary-C8p4kyWR.cjs +0 -2
- /package/dist/{use-target-boundary.css → history-chords.css} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
3
|
-
import { COMPILER_STAGE_KEYS as
|
|
4
|
-
import { Component as
|
|
1
|
+
import { A as xt, At as ge, B as At, Bt, Ct as Ot, Et as F, Ht as Kt, I as Ft, Jt as jt, L as Ut, Lt as Yt, M as Wt, Mt as Y, Nt as he, Pt as Vt, Qt, Rt as pe, Ut as Xt, Vt as zt, a as Jt, an as Zt, cn as er, ct as tr, dn as W, dt as rr, en as ae, fn as fe, gt as nr, h as sr, i as or, in as ar, j as ir, jt as cr, kt as ve, ln as lr, n as dr, nt as ur, on as mr, pn as j, r as gr, rn as hr, rt as pr, s as fr, sn as vr, t as ye, tn as yr, un as Se, ut as Sr, vt as br, w as Er, wt as Tr, yt as Rr, z as Nr } from "./history-chords-uAlcJltN.js";
|
|
2
|
+
import { n as qr } from "./theme.contract.css-AyXDNf0F.js";
|
|
3
|
+
import { COMPILER_STAGE_KEYS as V, Geom as be, GraphCompilationSession as Ee, areEditTargetsEqual as Te, buildDiagnostic as J, createAnchorResolver as Re, createCompiler as Ne, createDataLabelPlacementResolver as Ce, createSpecBuilder as qe, createStyleResolver as De, findAnnotation as Ge, findLayerById as Z, isCompilerCachingEnabled as Ie, resolveDefinition as we, setCompilerCachingEnabled as ke, toPercent as B } from "@graphysdk/viz-engine";
|
|
4
|
+
import { Component as _e, useCallback as f, useEffect as M, useId as Le, useImperativeHandle as Pe, useMemo as H, useRef as ee, useState as b, useSyncExternalStore as $e } from "react";
|
|
5
5
|
import { Fragment as He, jsx as c, jsxs as v } from "react/jsx-runtime";
|
|
6
|
-
import { useStore as
|
|
6
|
+
import { useStore as U } from "zustand";
|
|
7
7
|
import { motion as ie } from "motion/react";
|
|
8
|
-
import { createStore as
|
|
8
|
+
import { createStore as Q } from "zustand/vanilla";
|
|
9
9
|
import Me from "clsx";
|
|
10
10
|
import './index.css';var xe = "_1a5iqpb0", Ae = "_1a5iqpb1";
|
|
11
11
|
var Be = "_1a5iqpb3", Oe = "_1a5iqpb4", Ke = "_1a5iqpb5";
|
|
12
|
-
var
|
|
12
|
+
var te = ({ errors: e }) => {
|
|
13
13
|
const [t, ...n] = e;
|
|
14
14
|
return /* @__PURE__ */ v("div", {
|
|
15
15
|
role: "alert",
|
|
@@ -19,14 +19,14 @@ var ee = ({ errors: e }) => {
|
|
|
19
19
|
className: Ae,
|
|
20
20
|
children: "This chart could not be rendered."
|
|
21
21
|
}),
|
|
22
|
-
t && /* @__PURE__ */ c(
|
|
22
|
+
t && /* @__PURE__ */ c(re, { diagnostic: t }),
|
|
23
23
|
n.length > 0 && /* @__PURE__ */ c("ul", {
|
|
24
24
|
className: "_1a5iqpb2",
|
|
25
|
-
children: n.map((r, s) => /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
|
|
25
|
+
children: n.map((r, s) => /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(re, { diagnostic: r }) }, `${r.code}-${s}`))
|
|
26
26
|
})
|
|
27
27
|
]
|
|
28
28
|
});
|
|
29
|
-
},
|
|
29
|
+
}, re = ({ diagnostic: e }) => /* @__PURE__ */ v("div", {
|
|
30
30
|
className: Be,
|
|
31
31
|
children: [
|
|
32
32
|
/* @__PURE__ */ c("span", {
|
|
@@ -46,15 +46,15 @@ var ee = ({ errors: e }) => {
|
|
|
46
46
|
function Fe(e = [], t = []) {
|
|
47
47
|
return e.length === t.length && e.every((n, r) => Object.is(n, t[r]));
|
|
48
48
|
}
|
|
49
|
-
var je = class extends
|
|
49
|
+
var je = class extends _e {
|
|
50
50
|
constructor(...e) {
|
|
51
51
|
super(...e), this.state = { caughtDiagnostic: null };
|
|
52
52
|
}
|
|
53
53
|
static getDerivedStateFromError(e) {
|
|
54
|
-
return { caughtDiagnostic:
|
|
54
|
+
return { caughtDiagnostic: J(e) };
|
|
55
55
|
}
|
|
56
56
|
componentDidCatch(e, t) {
|
|
57
|
-
const n =
|
|
57
|
+
const n = J(e);
|
|
58
58
|
j([n]), this.props.onError?.([n]), console.error("Chart render component stack:", t.componentStack);
|
|
59
59
|
}
|
|
60
60
|
componentDidUpdate(e) {
|
|
@@ -62,9 +62,9 @@ var je = class extends ke {
|
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
64
|
const { caughtDiagnostic: e } = this.state;
|
|
65
|
-
if (e) return /* @__PURE__ */ c(
|
|
65
|
+
if (e) return /* @__PURE__ */ c(te, { errors: [e] });
|
|
66
66
|
const { forcedErrors: t, children: n } = this.props;
|
|
67
|
-
return t && t.length > 0 ? /* @__PURE__ */ c(
|
|
67
|
+
return t && t.length > 0 ? /* @__PURE__ */ c(te, { errors: t }) : n;
|
|
68
68
|
}
|
|
69
69
|
}, ce = (e) => typeof e == "object" && "geom" in e && "render" in e, le = (e) => {
|
|
70
70
|
const t = we(e);
|
|
@@ -72,15 +72,15 @@ var je = class extends ke {
|
|
|
72
72
|
}, Ue = (e, t) => {
|
|
73
73
|
const n = e.filter((r) => Ye(r, t));
|
|
74
74
|
return n.length === e.length ? e : n;
|
|
75
|
-
}, Ye = (e, t) => e.kind === "annotation" ? Ge(t.annotations, e.id) !== null : e.kind === "observations" ?
|
|
76
|
-
selection:
|
|
75
|
+
}, Ye = (e, t) => e.kind === "annotation" ? Ge(t.annotations, e.id) !== null : e.kind === "observations" ? Z(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? Z(t.layers, e.layerId) !== void 0 : !0, ne = [], We = () => Q((e) => ({
|
|
76
|
+
selection: ne,
|
|
77
77
|
setSelection: (t) => e((n) => Ve(n.selection, t) ? n : { selection: t }),
|
|
78
|
-
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection:
|
|
78
|
+
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: ne })
|
|
79
79
|
})), Ve = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((n, r) => {
|
|
80
80
|
const s = t[r];
|
|
81
81
|
return s !== void 0 && Te(n, s);
|
|
82
|
-
}),
|
|
83
|
-
if (!
|
|
82
|
+
}), Qe = process.env.NODE_ENV !== "production", Xe = 5, ze = (e) => {
|
|
83
|
+
if (!Qe) return {
|
|
84
84
|
emit: () => {
|
|
85
85
|
},
|
|
86
86
|
subscribe: () => Ze,
|
|
@@ -105,7 +105,7 @@ var je = class extends ke {
|
|
|
105
105
|
getLastCompile: () => e.getLastCompile(),
|
|
106
106
|
getCacheStats: () => e.getCacheStats()
|
|
107
107
|
};
|
|
108
|
-
}, Je = () =>
|
|
108
|
+
}, Je = () => Q((e) => ({
|
|
109
109
|
lastCompile: null,
|
|
110
110
|
history: [],
|
|
111
111
|
nextId: 1,
|
|
@@ -121,7 +121,7 @@ var je = class extends ke {
|
|
|
121
121
|
};
|
|
122
122
|
return {
|
|
123
123
|
lastCompile: s,
|
|
124
|
-
history: tt(r.history, s,
|
|
124
|
+
history: tt(r.history, s, Xe),
|
|
125
125
|
nextId: r.nextId + 1,
|
|
126
126
|
lastSnapshot: n
|
|
127
127
|
};
|
|
@@ -207,7 +207,7 @@ function st(e, t) {
|
|
|
207
207
|
for (const a of r) {
|
|
208
208
|
if (a.interactive === !1 || a.spatialKind !== "render-hit-test" || s.has(a.geom)) continue;
|
|
209
209
|
const l = t(a.geom, n.type);
|
|
210
|
-
l === null || l.hitTest ||
|
|
210
|
+
l === null || l.hitTest || Y(l) || (s.add(a.geom), i.push({
|
|
211
211
|
kind: "user-input",
|
|
212
212
|
severity: "warning",
|
|
213
213
|
code: "MISSING_RENDER_HIT_TEST",
|
|
@@ -244,7 +244,7 @@ function at(e, t) {
|
|
|
244
244
|
for (const a of r) {
|
|
245
245
|
if (a.interactive === !1 || a.spatialKind !== "render-hit-test" || s.has(a.geom)) continue;
|
|
246
246
|
const l = t(a.geom, n.type);
|
|
247
|
-
l === null || !l.hitTest || !
|
|
247
|
+
l === null || !l.hitTest || !Y(l) || (s.add(a.geom), i.push({
|
|
248
248
|
kind: "user-input",
|
|
249
249
|
severity: "warning",
|
|
250
250
|
code: "CONFLICTING_RENDER_HIT_TEST",
|
|
@@ -279,7 +279,7 @@ function ct(e, t) {
|
|
|
279
279
|
for (const a of r) {
|
|
280
280
|
if (a.interactive === !1 || a.spatialKind === "render-hit-test" || s.has(a.geom)) continue;
|
|
281
281
|
const l = t(a.geom, n.type);
|
|
282
|
-
l === null || !
|
|
282
|
+
l === null || !Y(l) || (s.add(a.geom), i.push({
|
|
283
283
|
kind: "user-input",
|
|
284
284
|
severity: "warning",
|
|
285
285
|
code: "OVERLAY_REQUIRES_RENDER_HIT_TEST",
|
|
@@ -311,7 +311,7 @@ function lt(e) {
|
|
|
311
311
|
}
|
|
312
312
|
return n;
|
|
313
313
|
}
|
|
314
|
-
var dt = (e) =>
|
|
314
|
+
var dt = (e) => Q((t) => ({
|
|
315
315
|
scene: e,
|
|
316
316
|
setScene: (n) => t((r) => r.scene === n ? r : { scene: n })
|
|
317
317
|
})), ut = ({ spec: e, data: t, customPalettes: n, colorScheme: r, plugins: s, resolveRenderer: i, anchorResolver: a, onSpecChange: l, onError: d, onWarnings: g }) => {
|
|
@@ -319,9 +319,9 @@ var dt = (e) => W((t) => ({
|
|
|
319
319
|
const o = Ne({ plugins: s });
|
|
320
320
|
return {
|
|
321
321
|
session: new Ee(o),
|
|
322
|
-
compileBus:
|
|
322
|
+
compileBus: ze(o)
|
|
323
323
|
};
|
|
324
|
-
}), [m] = b(() => rt(s ?? [])), C =
|
|
324
|
+
}), [m] = b(() => rt(s ?? [])), C = ee(null), [I] = b(mt), y = ee(null), q = f((o) => m.errors.length === 0 ? o : [...m.errors, ...o ?? []], [m]), _ = f((o) => {
|
|
325
325
|
if (!o.ok) return o.errors;
|
|
326
326
|
if (y.current) y.current.getState().setScene(o.scene);
|
|
327
327
|
else {
|
|
@@ -336,7 +336,7 @@ var dt = (e) => W((t) => ({
|
|
|
336
336
|
customPalettes: n,
|
|
337
337
|
colorScheme: r
|
|
338
338
|
});
|
|
339
|
-
return C.current = o, q(
|
|
339
|
+
return C.current = o, q(_(o));
|
|
340
340
|
}), T = f((o) => o.ok ? [
|
|
341
341
|
...o.warnings,
|
|
342
342
|
...nt(o.scene, i),
|
|
@@ -368,7 +368,7 @@ var dt = (e) => W((t) => ({
|
|
|
368
368
|
});
|
|
369
369
|
if (!o) return;
|
|
370
370
|
o.committedSpec && E.current?.(o.committedSpec);
|
|
371
|
-
const p =
|
|
371
|
+
const p = _(o.result);
|
|
372
372
|
L(q(p)), p && R(p), D(T(o.result)), p || u.emit({ kind: o.specChanged ? "spec" : "data" });
|
|
373
373
|
}, [
|
|
374
374
|
e,
|
|
@@ -377,26 +377,26 @@ var dt = (e) => W((t) => ({
|
|
|
377
377
|
r,
|
|
378
378
|
h,
|
|
379
379
|
u,
|
|
380
|
-
|
|
380
|
+
_,
|
|
381
381
|
R,
|
|
382
382
|
D,
|
|
383
383
|
q,
|
|
384
384
|
T,
|
|
385
385
|
E
|
|
386
386
|
]);
|
|
387
|
-
const
|
|
387
|
+
const k = f((o) => {
|
|
388
388
|
L((p) => p === null ? p : q(null)), D(T(o));
|
|
389
389
|
}, [
|
|
390
390
|
q,
|
|
391
391
|
D,
|
|
392
392
|
T
|
|
393
393
|
]), P = f((o) => {
|
|
394
|
-
o.scene && y.current?.getState().setScene(o.scene), o.result &&
|
|
394
|
+
o.scene && y.current?.getState().setScene(o.scene), o.result && k(o.result), o.command && u.emit({
|
|
395
395
|
kind: "command",
|
|
396
396
|
command: o.command
|
|
397
397
|
}), o.spec && E.current?.(o.spec), o.errors && R([...o.errors]);
|
|
398
398
|
}, [
|
|
399
|
-
|
|
399
|
+
k,
|
|
400
400
|
u,
|
|
401
401
|
E,
|
|
402
402
|
R
|
|
@@ -407,14 +407,14 @@ var dt = (e) => W((t) => ({
|
|
|
407
407
|
S(h.applyCommand(o, p));
|
|
408
408
|
}, [h, S]), x = f(() => {
|
|
409
409
|
S(h.commit());
|
|
410
|
-
}, [h, S]), A = f(() => S(h.undo()), [h, S]),
|
|
410
|
+
}, [h, S]), A = f(() => S(h.undo()), [h, S]), z = f(() => S(h.redo()), [h, S]), ue = H(() => ({
|
|
411
411
|
stack: h.history,
|
|
412
412
|
undo: A,
|
|
413
|
-
redo:
|
|
413
|
+
redo: z
|
|
414
414
|
}), [
|
|
415
415
|
h,
|
|
416
416
|
A,
|
|
417
|
-
|
|
417
|
+
z
|
|
418
418
|
]), me = f(() => y.current?.getState().scene ?? null, []);
|
|
419
419
|
return {
|
|
420
420
|
store: y.current,
|
|
@@ -435,7 +435,7 @@ var dt = (e) => W((t) => ({
|
|
|
435
435
|
notify: () => e.forEach((t) => t())
|
|
436
436
|
};
|
|
437
437
|
}, gt = ({ data: e, spec: t, plugins: n = [], formattingLocale: r, handleRef: s, onSpecChange: i, onError: a, onWarnings: l, customPalettes: d, colorScheme: g = "light", children: E }) => {
|
|
438
|
-
const [G] = b(() =>
|
|
438
|
+
const [G] = b(() => ge(n.filter(ce))), N = Le(), [h] = b(() => Re(n)), [u] = b(() => Ce(n)), [m] = b(() => We()), [C] = b(() => ve()), I = H(() => De({ colorScheme: g }), [g]), { store: y, dispatch: q, commit: _, history: w, subscribe: L, getScene: T, compileBus: R, compileErrors: D } = ut({
|
|
439
439
|
spec: t,
|
|
440
440
|
data: e,
|
|
441
441
|
customPalettes: d,
|
|
@@ -455,12 +455,12 @@ var dt = (e) => W((t) => ({
|
|
|
455
455
|
x.length !== 0 && A(Ue(x, S.scene.spec));
|
|
456
456
|
});
|
|
457
457
|
}, [y, m]);
|
|
458
|
-
const
|
|
458
|
+
const k = H(() => ({
|
|
459
459
|
dispatch: q,
|
|
460
|
-
commit:
|
|
461
|
-
}), [q,
|
|
460
|
+
commit: _
|
|
461
|
+
}), [q, _]);
|
|
462
462
|
Pe(s, () => ({
|
|
463
|
-
commands:
|
|
463
|
+
commands: k,
|
|
464
464
|
undo: w.undo,
|
|
465
465
|
redo: w.redo,
|
|
466
466
|
subscribe: L,
|
|
@@ -471,7 +471,7 @@ var dt = (e) => W((t) => ({
|
|
|
471
471
|
canPlaceDataLabels: u.hasCapability,
|
|
472
472
|
canFormatDataLabelsAsPercentages: u.hasPercentageFormat
|
|
473
473
|
}), [
|
|
474
|
-
|
|
474
|
+
k,
|
|
475
475
|
w,
|
|
476
476
|
L,
|
|
477
477
|
T,
|
|
@@ -483,7 +483,7 @@ var dt = (e) => W((t) => ({
|
|
|
483
483
|
store: y,
|
|
484
484
|
selectionStore: m,
|
|
485
485
|
targetBoundaryStore: C,
|
|
486
|
-
commands:
|
|
486
|
+
commands: k,
|
|
487
487
|
history: w,
|
|
488
488
|
formattingLocale: r,
|
|
489
489
|
compileBus: R,
|
|
@@ -495,7 +495,7 @@ var dt = (e) => W((t) => ({
|
|
|
495
495
|
y,
|
|
496
496
|
m,
|
|
497
497
|
C,
|
|
498
|
-
|
|
498
|
+
k,
|
|
499
499
|
w,
|
|
500
500
|
r,
|
|
501
501
|
R,
|
|
@@ -507,11 +507,11 @@ var dt = (e) => W((t) => ({
|
|
|
507
507
|
forcedErrors: D,
|
|
508
508
|
onError: a,
|
|
509
509
|
resetKeys: [t, e],
|
|
510
|
-
children: P ? /* @__PURE__ */ c(
|
|
510
|
+
children: P ? /* @__PURE__ */ c(Se.Provider, {
|
|
511
511
|
value: P,
|
|
512
|
-
children: /* @__PURE__ */ c(
|
|
512
|
+
children: /* @__PURE__ */ c(pe, {
|
|
513
513
|
value: G,
|
|
514
|
-
children: /* @__PURE__ */ c(
|
|
514
|
+
children: /* @__PURE__ */ c(fe, {
|
|
515
515
|
value: u,
|
|
516
516
|
children: E
|
|
517
517
|
})
|
|
@@ -519,7 +519,7 @@ var dt = (e) => W((t) => ({
|
|
|
519
519
|
}) : null
|
|
520
520
|
});
|
|
521
521
|
};
|
|
522
|
-
function
|
|
522
|
+
function Pr(e) {
|
|
523
523
|
const t = qe(e);
|
|
524
524
|
return {
|
|
525
525
|
...t,
|
|
@@ -529,7 +529,7 @@ function $r(e) {
|
|
|
529
529
|
})
|
|
530
530
|
};
|
|
531
531
|
}
|
|
532
|
-
var
|
|
532
|
+
var $r = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__PURE__ */ c(ie.circle, {
|
|
533
533
|
initial: !1,
|
|
534
534
|
animate: {
|
|
535
535
|
cx: t,
|
|
@@ -543,7 +543,7 @@ var Hr = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__P
|
|
|
543
543
|
cy: n,
|
|
544
544
|
r,
|
|
545
545
|
...s
|
|
546
|
-
}),
|
|
546
|
+
}), Hr = ({ shouldAnimateTransitions: e, x1: t, y1: n, x2: r, y2: s, ...i }) => e ? /* @__PURE__ */ c(ie.line, {
|
|
547
547
|
initial: !1,
|
|
548
548
|
animate: {
|
|
549
549
|
x1: t,
|
|
@@ -559,7 +559,7 @@ var Hr = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__P
|
|
|
559
559
|
x2: r,
|
|
560
560
|
y2: s,
|
|
561
561
|
...i
|
|
562
|
-
}),
|
|
562
|
+
}), Mr = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
|
|
563
563
|
viewBox: "0 0 1 1",
|
|
564
564
|
preserveAspectRatio: "none",
|
|
565
565
|
width: "100%",
|
|
@@ -567,7 +567,7 @@ var Hr = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__P
|
|
|
567
567
|
pointerEvents: "none",
|
|
568
568
|
...t,
|
|
569
569
|
children: e
|
|
570
|
-
}),
|
|
570
|
+
}), xr = ({ box: e, children: t }) => /* @__PURE__ */ c("svg", {
|
|
571
571
|
x: B(e.x0),
|
|
572
572
|
y: B(e.y0),
|
|
573
573
|
width: B(e.x1 - e.x0),
|
|
@@ -577,26 +577,26 @@ var Hr = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__P
|
|
|
577
577
|
children: t
|
|
578
578
|
}), ht = "drqe3u0", pt = "drqe3u1", ft = "drqe3u2", vt = "drqe3u3", $ = "drqe3u4", yt = "drqe3u5", St = "drqe3u6", bt = "drqe3u7", O = "drqe3u8", Et = "drqe3u9", Tt = "drqe3ua";
|
|
579
579
|
var Rt = "drqe3uc", Nt = "drqe3ud", Ct = "drqe3ue", qt = "drqe3uf";
|
|
580
|
-
var Dt = "drqe3uh", Gt = "drqe3ui",
|
|
580
|
+
var Dt = "drqe3uh", Gt = "drqe3ui", se = {
|
|
581
581
|
enabled: "drqe3uk drqe3uj",
|
|
582
582
|
disabled: "drqe3ul drqe3uj"
|
|
583
|
-
},
|
|
583
|
+
}, oe = {
|
|
584
584
|
ran: "drqe3un drqe3um",
|
|
585
585
|
dim: "drqe3uo drqe3um"
|
|
586
586
|
}, de = {
|
|
587
587
|
ran: "drqe3uq drqe3up",
|
|
588
588
|
cached: "drqe3ur drqe3up",
|
|
589
589
|
untouched: "drqe3us drqe3up"
|
|
590
|
-
},
|
|
591
|
-
const { compileBus: r } =
|
|
590
|
+
}, Ar = ({ width: e = 440, style: t, className: n } = {}) => {
|
|
591
|
+
const { compileBus: r } = W(), [s] = b(() => Je()), [i, a] = b(!1), [l, d] = b(Ie);
|
|
592
592
|
M(() => {
|
|
593
593
|
const { recordCompile: u } = s.getState(), m = r.getLastTrigger(), C = r.getLastCompile();
|
|
594
594
|
return m && C && u(m, C), r.subscribe(u);
|
|
595
595
|
}, [s, r]);
|
|
596
|
-
const g =
|
|
596
|
+
const g = U(s, (u) => u.lastCompile), E = U(s, (u) => u.history), G = r.getCacheStats(), N = g === null && E.length === 0, h = () => {
|
|
597
597
|
d((u) => {
|
|
598
598
|
const m = !u;
|
|
599
|
-
return
|
|
599
|
+
return ke(m), m;
|
|
600
600
|
});
|
|
601
601
|
};
|
|
602
602
|
return /* @__PURE__ */ v("div", {
|
|
@@ -613,7 +613,7 @@ var Dt = "drqe3uh", Gt = "drqe3ui", ne = {
|
|
|
613
613
|
children: "compile cache"
|
|
614
614
|
}), /* @__PURE__ */ c("div", {
|
|
615
615
|
className: Ct,
|
|
616
|
-
children: N ? "production: stats disabled" : g ? `last: ${g.label} · ${
|
|
616
|
+
children: N ? "production: stats disabled" : g ? `last: ${g.label} · ${X(g.durationMs)}` : "awaiting first compile…"
|
|
617
617
|
})] }), /* @__PURE__ */ c("button", {
|
|
618
618
|
type: "button",
|
|
619
619
|
onClick: () => a((u) => !u),
|
|
@@ -626,7 +626,7 @@ var Dt = "drqe3uh", Gt = "drqe3ui", ne = {
|
|
|
626
626
|
children: [/* @__PURE__ */ v("button", {
|
|
627
627
|
type: "button",
|
|
628
628
|
onClick: h,
|
|
629
|
-
className: l ?
|
|
629
|
+
className: l ? se.enabled : se.disabled,
|
|
630
630
|
"aria-pressed": l,
|
|
631
631
|
children: ["cache ", l ? "enabled" : "disabled"]
|
|
632
632
|
}), /* @__PURE__ */ c("span", {
|
|
@@ -671,8 +671,8 @@ var Dt = "drqe3uh", Gt = "drqe3ui", ne = {
|
|
|
671
671
|
children: "total hit"
|
|
672
672
|
})
|
|
673
673
|
]
|
|
674
|
-
}) }), /* @__PURE__ */ c("tbody", { children:
|
|
675
|
-
const s = e?.[r], i =
|
|
674
|
+
}) }), /* @__PURE__ */ c("tbody", { children: V.map((r) => {
|
|
675
|
+
const s = e?.[r], i = kt(s);
|
|
676
676
|
return /* @__PURE__ */ v("tr", {
|
|
677
677
|
className: Rt,
|
|
678
678
|
children: [
|
|
@@ -689,10 +689,10 @@ var Dt = "drqe3uh", Gt = "drqe3ui", ne = {
|
|
|
689
689
|
}),
|
|
690
690
|
/* @__PURE__ */ c("td", {
|
|
691
691
|
className: O,
|
|
692
|
-
children: t === void 0 || i === "untouched" ? "—" :
|
|
692
|
+
children: t === void 0 || i === "untouched" ? "—" : X(t[r])
|
|
693
693
|
}),
|
|
694
694
|
/* @__PURE__ */ c("td", {
|
|
695
|
-
className: i === "ran" ?
|
|
695
|
+
className: i === "ran" ? oe.ran : oe.dim,
|
|
696
696
|
children: s?.misses ?? 0
|
|
697
697
|
}),
|
|
698
698
|
/* @__PURE__ */ c("td", {
|
|
@@ -716,7 +716,7 @@ var Dt = "drqe3uh", Gt = "drqe3ui", ne = {
|
|
|
716
716
|
className: Gt,
|
|
717
717
|
children: "recent compiles"
|
|
718
718
|
}), e.map((t) => {
|
|
719
|
-
const n =
|
|
719
|
+
const n = _t(t.stages, (i) => i.misses > 0), r = V.length;
|
|
720
720
|
return /* @__PURE__ */ v("div", {
|
|
721
721
|
className: St,
|
|
722
722
|
children: [
|
|
@@ -736,18 +736,18 @@ var Dt = "drqe3uh", Gt = "drqe3ui", ne = {
|
|
|
736
736
|
"/",
|
|
737
737
|
r,
|
|
738
738
|
" ran · ",
|
|
739
|
-
|
|
739
|
+
X(t.durationMs)
|
|
740
740
|
]
|
|
741
741
|
})
|
|
742
742
|
]
|
|
743
743
|
}, t.id);
|
|
744
744
|
})]
|
|
745
|
-
}),
|
|
745
|
+
}), kt = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", _t = (e, t) => {
|
|
746
746
|
let n = 0;
|
|
747
|
-
for (const r of
|
|
747
|
+
for (const r of V) t(e[r]) && (n += 1);
|
|
748
748
|
return n;
|
|
749
|
-
},
|
|
750
|
-
const { history: e } =
|
|
749
|
+
}, X = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, Br = () => {
|
|
750
|
+
const { history: e } = W(), { stack: t, undo: n, redo: r } = e, s = f((l) => t.subscribe(l), [t]), i = f(() => t.getSnapshot(), [t]), a = $e(s, i, i);
|
|
751
751
|
return H(() => ({
|
|
752
752
|
...a,
|
|
753
753
|
undo: n,
|
|
@@ -768,14 +768,14 @@ var Dt = "drqe3uh", Gt = "drqe3ui", ne = {
|
|
|
768
768
|
"range",
|
|
769
769
|
"reset",
|
|
770
770
|
"submit"
|
|
771
|
-
]),
|
|
771
|
+
]), Or = (e, t = {}) => {
|
|
772
772
|
const { target: n, enabled: r = !0 } = t;
|
|
773
773
|
M(() => {
|
|
774
774
|
const s = Pt(n);
|
|
775
775
|
if (!r || !s) return;
|
|
776
776
|
const i = (a) => {
|
|
777
777
|
if (!$t(a) || a.defaultPrevented || Ht(a.target)) return;
|
|
778
|
-
const l =
|
|
778
|
+
const l = ye(a);
|
|
779
779
|
if (!l) return;
|
|
780
780
|
const d = e.current;
|
|
781
781
|
d && (l === "undo" ? d.undo() : d.redo()) && a.preventDefault();
|
|
@@ -786,61 +786,64 @@ var Dt = "drqe3uh", Gt = "drqe3ui", ne = {
|
|
|
786
786
|
n,
|
|
787
787
|
r
|
|
788
788
|
]);
|
|
789
|
-
}, Pt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, $t = (e) => "key" in e, Ht = (e) => e instanceof HTMLInputElement ? !Lt.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1
|
|
789
|
+
}, Pt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, $t = (e) => "key" in e, Ht = (e) => e instanceof HTMLInputElement ? !Lt.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, Kr = () => {
|
|
790
|
+
const { targetBoundaryStore: e } = W();
|
|
791
|
+
return U(e, (t) => t.boundary);
|
|
792
|
+
};
|
|
790
793
|
export {
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
794
|
+
Nr as BrandMark,
|
|
795
|
+
Kt as CanvasTextMeasurer,
|
|
796
|
+
Ut as DefaultFooter,
|
|
797
|
+
fr as DefaultGrid,
|
|
798
|
+
Ft as DefaultHeader,
|
|
799
|
+
Yt as DefaultSwatch,
|
|
800
|
+
ur as DefaultTooltip,
|
|
801
|
+
Ar as DevToolsPanel,
|
|
802
|
+
nr as GRAPH_MODES,
|
|
803
|
+
$r as GeomCircle,
|
|
804
|
+
Hr as GeomLine,
|
|
802
805
|
je as GraphErrorBoundary,
|
|
803
|
-
|
|
806
|
+
te as GraphErrorPanel,
|
|
804
807
|
gt as GraphProvider,
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
808
|
+
Jt as GraphRenderer,
|
|
809
|
+
Tr as HoverProvider,
|
|
810
|
+
Vt as IntroFade,
|
|
811
|
+
Qt as IntroWipeClip,
|
|
812
|
+
Bt as TextMeasurerProvider,
|
|
813
|
+
tr as ThemeProvider,
|
|
814
|
+
xr as UnitBoxSvg,
|
|
815
|
+
Mr as UnitSpaceSvg,
|
|
816
|
+
yr as buildDotsEditOutlineShapes,
|
|
817
|
+
Pr as createGraphyKit,
|
|
818
|
+
Sr as darkTheme,
|
|
819
|
+
cr as defineGeomRenderer,
|
|
820
|
+
rr as lightTheme,
|
|
821
|
+
jt as lightenCss,
|
|
822
|
+
ar as projectPointCartesian,
|
|
820
823
|
Ue as pruneSelection,
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
824
|
+
At as resolveBrandMarkVisual,
|
|
825
|
+
hr as scalePointToPanel,
|
|
826
|
+
xt as stampAxisEditTarget,
|
|
827
|
+
ir as stampGridEditTarget,
|
|
828
|
+
Wt as stampLegendEditTarget,
|
|
829
|
+
Rr as useElementScreenRect,
|
|
830
|
+
Ot as useGeomHitTest,
|
|
831
|
+
br as useGeomHover,
|
|
832
|
+
Zt as useGeomReaderTree,
|
|
833
|
+
mr as useGeomStyleReader,
|
|
834
|
+
dr as useGraphCommands,
|
|
835
|
+
or as useGraphHandle,
|
|
836
|
+
Br as useGraphHistory,
|
|
837
|
+
Or as useGraphHistoryShortcuts,
|
|
838
|
+
sr as useGraphSelection,
|
|
839
|
+
Er as useGuidesTakePress,
|
|
840
|
+
gr as useHandleScene,
|
|
841
|
+
pr as useHoverState,
|
|
842
|
+
Xt as useResolvedStyle,
|
|
843
|
+
lr as useSceneSelector,
|
|
844
|
+
vr as useStyleReaderTree,
|
|
845
|
+
er as useStyleResolver,
|
|
846
|
+
Kr as useTargetBoundary,
|
|
847
|
+
zt as useTextMeasurer,
|
|
848
|
+
qr as vars
|
|
846
849
|
};
|
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.1790603505508",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"sideEffects": [
|
|
17
17
|
"**/*.css.ts",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"react-colorful": "^5.6.1",
|
|
56
56
|
"react-intl": "^8.1.3",
|
|
57
57
|
"zustand": "^5.0.12",
|
|
58
|
-
"@graphysdk/viz-engine": "1.9.0-beta.
|
|
58
|
+
"@graphysdk/viz-engine": "1.9.0-beta.1790603505508"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@tiptap/core": "^3.0.0",
|