@graphysdk/react-renderer 1.9.0-beta.1792135965871 → 1.9.0-beta.1792146771330
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.mjs +3366 -3077
- package/dist/{history-chords-C3Im3MXJ.js → history-chords-Ctrxtnx5.js} +1948 -1940
- package/dist/history-chords-DvW66mC4.cjs +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.mjs +118 -117
- package/package.json +3 -3
- package/dist/history-chords-wWhFwrO8.cjs +0 -2
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { COMPILER_STAGE_KEYS as ee, Geom as De, GraphCompilationSession as qe, areEditTargetsEqual as Ie, buildDiagnostic as ne, createAnchorResolver as we, createCompiler as Pe, createDataLabelPlacementResolver as _e, createSpecBuilder as ke, createStyleResolver as me, findAnnotation as Le, findLayerById as se, isCompilerCachingEnabled as $e, resolveDefinition as
|
|
3
|
-
import { Component as He, createContext as Ae, useCallback as f, useContext as Be, useEffect as
|
|
1
|
+
import { $t as Zt, A as er, At as tr, B as rr, Bt as nr, Cn as J, Ct as sr, Ft as Se, It as be, Jt as or, Kt as ar, L as ir, Lt as cr, M as lr, Mt as z, R as dr, Rt as Y, Ut as ur, V as mr, Wt as Ee, Yt as hr, _n as gr, a as pr, an as fr, at as vr, bn as Z, cn as j, dn as yr, fn as Sr, ft as br, gn as Er, h as Tr, hn as Rr, ht as Nr, i as Cr, it as Gr, j as Dr, kt as qr, ln as Ir, mn as wr, mt as Pr, n as _r, nn as kr, on as Lr, pn as $r, qt as Mr, r as xr, s as Hr, sn as Te, st as Ar, t as Re, vn as Br, w as Or, wt as Kr, xn as Ne, xt as Fr, yn as Ce, zt as Ge } from "./history-chords-Ctrxtnx5.js";
|
|
2
|
+
import { COMPILER_STAGE_KEYS as ee, Geom as De, GraphCompilationSession as qe, areEditTargetsEqual as Ie, buildDiagnostic as ne, createAnchorResolver as we, createCompiler as Pe, createDataLabelPlacementResolver as _e, createSpecBuilder as ke, createStyleResolver as me, findAnnotation as Le, findLayerById as se, isCompilerCachingEnabled as $e, resolveDefinition as Me, setCompilerCachingEnabled as xe, toPercent as F } from "@graphysdk/viz-engine";
|
|
3
|
+
import { Component as He, createContext as Ae, useCallback as f, useContext as Be, useEffect as x, useId as Oe, useImperativeHandle as Ke, useMemo as M, useRef as oe, useState as b, useSyncExternalStore as Fe } from "react";
|
|
4
4
|
import { Fragment as Ue, jsx as a, jsxs as v } from "react/jsx-runtime";
|
|
5
|
-
import { useStore as
|
|
5
|
+
import { useStore as Q } from "zustand";
|
|
6
6
|
import { motion as V } from "motion/react";
|
|
7
7
|
import { createStore as te } from "zustand/vanilla";
|
|
8
|
-
import
|
|
9
|
-
import './index.css';var
|
|
10
|
-
var We = "_1a5iqpb3", Xe = "_1a5iqpb4",
|
|
8
|
+
import Ye from "clsx";
|
|
9
|
+
import './index.css';var je = "_1a5iqpb0", Ve = "_1a5iqpb1";
|
|
10
|
+
var We = "_1a5iqpb3", Xe = "_1a5iqpb4", ze = "_1a5iqpb5";
|
|
11
11
|
var ae = ({ errors: e }) => {
|
|
12
12
|
const [t, ...r] = e;
|
|
13
13
|
return /* @__PURE__ */ v("div", {
|
|
14
14
|
role: "alert",
|
|
15
|
-
className:
|
|
15
|
+
className: je,
|
|
16
16
|
children: [
|
|
17
17
|
/* @__PURE__ */ a("strong", {
|
|
18
18
|
className: Ve,
|
|
@@ -33,7 +33,7 @@ var ae = ({ errors: e }) => {
|
|
|
33
33
|
children: e.code
|
|
34
34
|
}),
|
|
35
35
|
/* @__PURE__ */ a("p", {
|
|
36
|
-
className:
|
|
36
|
+
className: ze,
|
|
37
37
|
children: e.message
|
|
38
38
|
}),
|
|
39
39
|
e.suggestion && /* @__PURE__ */ a("p", {
|
|
@@ -42,10 +42,10 @@ var ae = ({ errors: e }) => {
|
|
|
42
42
|
})
|
|
43
43
|
]
|
|
44
44
|
});
|
|
45
|
-
function
|
|
45
|
+
function Je(e = [], t = []) {
|
|
46
46
|
return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
|
|
47
47
|
}
|
|
48
|
-
var
|
|
48
|
+
var Qe = class extends He {
|
|
49
49
|
constructor(...e) {
|
|
50
50
|
super(...e), this.state = { caughtDiagnostic: null };
|
|
51
51
|
}
|
|
@@ -54,10 +54,10 @@ var Je = class extends He {
|
|
|
54
54
|
}
|
|
55
55
|
componentDidCatch(e, t) {
|
|
56
56
|
const r = ne(e);
|
|
57
|
-
|
|
57
|
+
J([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
|
|
58
58
|
}
|
|
59
59
|
componentDidUpdate(e) {
|
|
60
|
-
this.state.caughtDiagnostic && !
|
|
60
|
+
this.state.caughtDiagnostic && !Je(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
|
|
61
61
|
}
|
|
62
62
|
render() {
|
|
63
63
|
const { caughtDiagnostic: e } = this.state;
|
|
@@ -69,7 +69,7 @@ var Je = class extends He {
|
|
|
69
69
|
value: e,
|
|
70
70
|
children: t
|
|
71
71
|
}), W = () => Be(ge), pe = (e) => typeof e == "object" && "geom" in e && "render" in e, fe = (e) => {
|
|
72
|
-
const t =
|
|
72
|
+
const t = Me(e);
|
|
73
73
|
return t instanceof De ? t : null;
|
|
74
74
|
}, Ze = (e, t) => {
|
|
75
75
|
const r = e.filter((n) => et(n, t));
|
|
@@ -146,7 +146,7 @@ var Je = class extends He {
|
|
|
146
146
|
};
|
|
147
147
|
function dt(e, t) {
|
|
148
148
|
let r;
|
|
149
|
-
return e.layers.flatMap((n, s) =>
|
|
149
|
+
return e.layers.flatMap((n, s) => Y(t(n.geom, e.coordSystem.type)) ? vt(n) ? (r ??= me().readers(e), yt(n, r.geom(n)) ? [{
|
|
150
150
|
kind: "user-input",
|
|
151
151
|
severity: "warning",
|
|
152
152
|
code: "INVALID_STYLE_RULE",
|
|
@@ -160,7 +160,7 @@ function dt(e, t) {
|
|
|
160
160
|
}] : []) : [] : []);
|
|
161
161
|
}
|
|
162
162
|
function le(e) {
|
|
163
|
-
const t = e.filter(pe), r = /* @__PURE__ */ new Set([...Object.keys(
|
|
163
|
+
const t = e.filter(pe), r = /* @__PURE__ */ new Set([...Object.keys(Ge), ...t.map((l) => l.geom)]), n = [], s = /* @__PURE__ */ new Set();
|
|
164
164
|
for (const l of e) {
|
|
165
165
|
const d = fe(l);
|
|
166
166
|
d === null || r.has(d.type) || s.has(d.type) || (s.add(d.type), n.push({
|
|
@@ -224,7 +224,7 @@ function mt(e, t) {
|
|
|
224
224
|
for (const i of n) {
|
|
225
225
|
if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || s.has(i.geom)) continue;
|
|
226
226
|
const l = t(i.geom, r.type);
|
|
227
|
-
l === null || l.hitTest ||
|
|
227
|
+
l === null || l.hitTest || Y(l) || (s.add(i.geom), c.push({
|
|
228
228
|
kind: "user-input",
|
|
229
229
|
severity: "warning",
|
|
230
230
|
code: "MISSING_RENDER_HIT_TEST",
|
|
@@ -261,7 +261,7 @@ function gt(e, t) {
|
|
|
261
261
|
for (const i of n) {
|
|
262
262
|
if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || s.has(i.geom)) continue;
|
|
263
263
|
const l = t(i.geom, r.type);
|
|
264
|
-
l === null || !l.hitTest || !
|
|
264
|
+
l === null || !l.hitTest || !Y(l) || (s.add(i.geom), c.push({
|
|
265
265
|
kind: "user-input",
|
|
266
266
|
severity: "warning",
|
|
267
267
|
code: "CONFLICTING_RENDER_HIT_TEST",
|
|
@@ -296,7 +296,7 @@ function ft(e, t) {
|
|
|
296
296
|
for (const i of n) {
|
|
297
297
|
if (i.interactive === !1 || i.spatialKind === "render-hit-test" || s.has(i.geom)) continue;
|
|
298
298
|
const l = t(i.geom, r.type);
|
|
299
|
-
l === null || !
|
|
299
|
+
l === null || !Y(l) || (s.add(i.geom), c.push({
|
|
300
300
|
kind: "user-input",
|
|
301
301
|
severity: "warning",
|
|
302
302
|
code: "OVERLAY_REQUIRES_RENDER_HIT_TEST",
|
|
@@ -339,7 +339,7 @@ var bt = (e) => te((t) => ({
|
|
|
339
339
|
scene: e,
|
|
340
340
|
setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
|
|
341
341
|
})), Et = ({ spec: e, data: t, colorScheme: r, plugins: n, theme: s, resolveRenderer: c, anchorResolver: i, onSpecChange: l, onError: d, onWarnings: g }) => {
|
|
342
|
-
const C =
|
|
342
|
+
const C = z(l), G = z(d), T = z(g), [{ session: h, compileBus: u }] = b(() => {
|
|
343
343
|
const o = Pe({
|
|
344
344
|
plugins: n,
|
|
345
345
|
theme: s
|
|
@@ -379,11 +379,11 @@ var bt = (e) => te((t) => ({
|
|
|
379
379
|
...dt(o.scene, c),
|
|
380
380
|
...pt(o.scene, i)
|
|
381
381
|
] : o.warnings, [c, i]), q = f((o) => {
|
|
382
|
-
o.length !== 0 && (
|
|
382
|
+
o.length !== 0 && (J(o), G.current?.(o));
|
|
383
383
|
}, [G]), I = f((o) => {
|
|
384
|
-
o.length !== 0 && (
|
|
384
|
+
o.length !== 0 && (J(o), T.current?.(o));
|
|
385
385
|
}, [T]);
|
|
386
|
-
|
|
386
|
+
x(() => {
|
|
387
387
|
const o = R.current;
|
|
388
388
|
o && (q([...p.errors, ...o.ok ? [] : o.errors]), I([...p.warnings, ...E(o)]), o.ok && u.emit({ kind: "init" }));
|
|
389
389
|
}, [
|
|
@@ -392,7 +392,7 @@ var bt = (e) => te((t) => ({
|
|
|
392
392
|
I,
|
|
393
393
|
p,
|
|
394
394
|
E
|
|
395
|
-
]),
|
|
395
|
+
]), x(() => {
|
|
396
396
|
const o = h.update({
|
|
397
397
|
spec: e,
|
|
398
398
|
data: t,
|
|
@@ -438,7 +438,7 @@ var bt = (e) => te((t) => ({
|
|
|
438
438
|
S(h.applyCommand(o, m));
|
|
439
439
|
}, [h, S]), P = f(() => {
|
|
440
440
|
S(h.commit());
|
|
441
|
-
}, [h, S]), K = f(() => S(h.undo()), [h, S]), L = f(() => S(h.redo()), [h, S]), X =
|
|
441
|
+
}, [h, S]), K = f(() => S(h.undo()), [h, S]), L = f(() => S(h.redo()), [h, S]), X = M(() => ({
|
|
442
442
|
stack: h.history,
|
|
443
443
|
undo: K,
|
|
444
444
|
redo: L
|
|
@@ -466,7 +466,7 @@ var bt = (e) => te((t) => ({
|
|
|
466
466
|
notify: () => e.forEach((t) => t())
|
|
467
467
|
};
|
|
468
468
|
}, Rt = ({ data: e, spec: t, plugins: r = [], theme: n, formattingLocale: s, handleRef: c, onSpecChange: i, onError: l, onWarnings: d, colorScheme: g = "light", children: C }) => {
|
|
469
|
-
const [G] = b(() => n), T = G?.colorScheme ?? g, [h] = b(() =>
|
|
469
|
+
const [G] = b(() => n), T = G?.colorScheme ?? g, [h] = b(() => be([...G?.plugins ?? [], ...r].filter(pe))), u = Oe(), [p] = b(() => we(r)), [R] = b(() => _e(r)), [y] = b(() => tt()), [D] = b(() => Se()), w = M(() => me({ colorScheme: T }), [T]), { store: N, dispatch: A, commit: _, history: E, subscribe: q, getScene: I, compileBus: k, compileErrors: B } = Et({
|
|
470
470
|
spec: t,
|
|
471
471
|
data: e,
|
|
472
472
|
colorScheme: T,
|
|
@@ -478,7 +478,7 @@ var bt = (e) => te((t) => ({
|
|
|
478
478
|
onError: l,
|
|
479
479
|
onWarnings: d
|
|
480
480
|
});
|
|
481
|
-
|
|
481
|
+
x(() => {
|
|
482
482
|
if (N)
|
|
483
483
|
return N.subscribe((P, K) => {
|
|
484
484
|
if (P.scene.spec === K.scene.spec) return;
|
|
@@ -486,7 +486,7 @@ var bt = (e) => te((t) => ({
|
|
|
486
486
|
L.length !== 0 && X(Ze(L, P.scene.spec));
|
|
487
487
|
});
|
|
488
488
|
}, [N, y]);
|
|
489
|
-
const S =
|
|
489
|
+
const S = M(() => ({
|
|
490
490
|
dispatch: A,
|
|
491
491
|
commit: _
|
|
492
492
|
}), [A, _]);
|
|
@@ -509,7 +509,7 @@ var bt = (e) => te((t) => ({
|
|
|
509
509
|
y,
|
|
510
510
|
R
|
|
511
511
|
]);
|
|
512
|
-
const O =
|
|
512
|
+
const O = M(() => N ? {
|
|
513
513
|
chartId: u,
|
|
514
514
|
store: N,
|
|
515
515
|
selectionStore: y,
|
|
@@ -534,15 +534,15 @@ var bt = (e) => te((t) => ({
|
|
|
534
534
|
w,
|
|
535
535
|
p
|
|
536
536
|
]);
|
|
537
|
-
return /* @__PURE__ */ a(
|
|
537
|
+
return /* @__PURE__ */ a(Qe, {
|
|
538
538
|
forcedErrors: B,
|
|
539
539
|
onError: l,
|
|
540
540
|
resetKeys: [t, e],
|
|
541
|
-
children: O ? /* @__PURE__ */ a(
|
|
541
|
+
children: O ? /* @__PURE__ */ a(Ce.Provider, {
|
|
542
542
|
value: O,
|
|
543
|
-
children: /* @__PURE__ */ a(
|
|
543
|
+
children: /* @__PURE__ */ a(Ee, {
|
|
544
544
|
value: h,
|
|
545
|
-
children: /* @__PURE__ */ a(
|
|
545
|
+
children: /* @__PURE__ */ a(Ne, {
|
|
546
546
|
value: R,
|
|
547
547
|
children: /* @__PURE__ */ a(H, {
|
|
548
548
|
shapes: G?.shapes,
|
|
@@ -553,7 +553,7 @@ var bt = (e) => te((t) => ({
|
|
|
553
553
|
}) : null
|
|
554
554
|
});
|
|
555
555
|
};
|
|
556
|
-
function
|
|
556
|
+
function Jr({ theme: e, ...t } = {}) {
|
|
557
557
|
const r = ke(t);
|
|
558
558
|
return {
|
|
559
559
|
...r,
|
|
@@ -571,7 +571,7 @@ var Nt = ({ shouldAnimateTransitions: e, cx: t, cy: r, r: n, ...s }) => e ? /* @
|
|
|
571
571
|
cy: r,
|
|
572
572
|
r: n
|
|
573
573
|
},
|
|
574
|
-
transition:
|
|
574
|
+
transition: j,
|
|
575
575
|
...s
|
|
576
576
|
}) : /* @__PURE__ */ a("circle", {
|
|
577
577
|
cx: t,
|
|
@@ -586,7 +586,7 @@ var Nt = ({ shouldAnimateTransitions: e, cx: t, cy: r, r: n, ...s }) => e ? /* @
|
|
|
586
586
|
x2: n,
|
|
587
587
|
y2: s
|
|
588
588
|
},
|
|
589
|
-
transition:
|
|
589
|
+
transition: j,
|
|
590
590
|
...c
|
|
591
591
|
}) : /* @__PURE__ */ a("line", {
|
|
592
592
|
x1: t,
|
|
@@ -602,7 +602,7 @@ var Nt = ({ shouldAnimateTransitions: e, cx: t, cy: r, r: n, ...s }) => e ? /* @
|
|
|
602
602
|
width: n,
|
|
603
603
|
height: s
|
|
604
604
|
},
|
|
605
|
-
transition:
|
|
605
|
+
transition: j,
|
|
606
606
|
...c
|
|
607
607
|
}) : /* @__PURE__ */ a("rect", {
|
|
608
608
|
x: t,
|
|
@@ -617,25 +617,25 @@ var Nt = ({ shouldAnimateTransitions: e, cx: t, cy: r, r: n, ...s }) => e ? /* @
|
|
|
617
617
|
}) : /* @__PURE__ */ a("path", {
|
|
618
618
|
d: t,
|
|
619
619
|
...n
|
|
620
|
-
}),
|
|
620
|
+
}), Qr = (e) => {
|
|
621
621
|
const { Circle: t } = W();
|
|
622
622
|
return t === void 0 ? Nt(e) : /* @__PURE__ */ a(H, { children: /* @__PURE__ */ a(t, { ...e }) });
|
|
623
|
-
},
|
|
623
|
+
}, Zr = (e) => {
|
|
624
624
|
const { Line: t } = W();
|
|
625
625
|
return t === void 0 ? Ct(e) : /* @__PURE__ */ a(H, { children: /* @__PURE__ */ a(t, { ...e }) });
|
|
626
|
-
},
|
|
626
|
+
}, en = (e) => {
|
|
627
627
|
const { Rect: t } = W();
|
|
628
628
|
return t === void 0 ? Gt(e) : /* @__PURE__ */ a(H, { children: /* @__PURE__ */ a(t, { ...e }) });
|
|
629
|
-
},
|
|
629
|
+
}, tn = (e) => {
|
|
630
630
|
const { Path: t } = W();
|
|
631
631
|
return t === void 0 ? Dt(e) : /* @__PURE__ */ a(H, { children: /* @__PURE__ */ a(t, { ...e }) });
|
|
632
632
|
}, qt = ({ d: e, source: t, ...r }) => {
|
|
633
|
-
const n =
|
|
633
|
+
const n = Te(e, j, t);
|
|
634
634
|
return /* @__PURE__ */ a(V.path, {
|
|
635
635
|
d: n,
|
|
636
636
|
...r
|
|
637
637
|
});
|
|
638
|
-
},
|
|
638
|
+
}, rn = ({ children: e, ...t }) => /* @__PURE__ */ a("svg", {
|
|
639
639
|
viewBox: "0 0 1 1",
|
|
640
640
|
preserveAspectRatio: "none",
|
|
641
641
|
width: "100%",
|
|
@@ -643,7 +643,7 @@ var Nt = ({ shouldAnimateTransitions: e, cx: t, cy: r, r: n, ...s }) => e ? /* @
|
|
|
643
643
|
pointerEvents: "none",
|
|
644
644
|
...t,
|
|
645
645
|
children: e
|
|
646
|
-
}),
|
|
646
|
+
}), nn = ({ box: e, children: t }) => /* @__PURE__ */ a("svg", {
|
|
647
647
|
x: F(e.x0),
|
|
648
648
|
y: F(e.y0),
|
|
649
649
|
width: F(e.x1 - e.x0),
|
|
@@ -651,7 +651,7 @@ var Nt = ({ shouldAnimateTransitions: e, cx: t, cy: r, r: n, ...s }) => e ? /* @
|
|
|
651
651
|
overflow: "hidden",
|
|
652
652
|
pointerEvents: "none",
|
|
653
653
|
children: t
|
|
654
|
-
}), It = "drqe3u0", wt = "drqe3u1", Pt = "drqe3u2", _t = "drqe3u3", $ = "drqe3u4", kt = "drqe3u5", Lt = "drqe3u6", $t = "drqe3u7", U = "drqe3u8",
|
|
654
|
+
}), It = "drqe3u0", wt = "drqe3u1", Pt = "drqe3u2", _t = "drqe3u3", $ = "drqe3u4", kt = "drqe3u5", Lt = "drqe3u6", $t = "drqe3u7", U = "drqe3u8", Mt = "drqe3u9", xt = "drqe3ua";
|
|
655
655
|
var Ht = "drqe3uc", At = "drqe3ud", Bt = "drqe3ue", Ot = "drqe3uf";
|
|
656
656
|
var Kt = "drqe3uh", Ft = "drqe3ui", de = {
|
|
657
657
|
enabled: "drqe3uk drqe3uj",
|
|
@@ -663,20 +663,20 @@ var Kt = "drqe3uh", Ft = "drqe3ui", de = {
|
|
|
663
663
|
ran: "drqe3uq drqe3up",
|
|
664
664
|
cached: "drqe3ur drqe3up",
|
|
665
665
|
untouched: "drqe3us drqe3up"
|
|
666
|
-
},
|
|
666
|
+
}, sn = ({ width: e = 440, style: t, className: r } = {}) => {
|
|
667
667
|
const { compileBus: n } = Z(), [s] = b(() => at()), [c, i] = b(!1), [l, d] = b($e);
|
|
668
|
-
|
|
668
|
+
x(() => {
|
|
669
669
|
const { recordCompile: u } = s.getState(), p = n.getLastTrigger(), R = n.getLastCompile();
|
|
670
670
|
return p && R && u(p, R), n.subscribe(u);
|
|
671
671
|
}, [s, n]);
|
|
672
|
-
const g =
|
|
672
|
+
const g = Q(s, (u) => u.lastCompile), C = Q(s, (u) => u.history), G = n.getCacheStats(), T = g === null && C.length === 0, h = () => {
|
|
673
673
|
d((u) => {
|
|
674
674
|
const p = !u;
|
|
675
|
-
return
|
|
675
|
+
return xe(p), p;
|
|
676
676
|
});
|
|
677
677
|
};
|
|
678
678
|
return /* @__PURE__ */ v("div", {
|
|
679
|
-
className:
|
|
679
|
+
className: Ye(xt, r),
|
|
680
680
|
style: {
|
|
681
681
|
width: e,
|
|
682
682
|
...t
|
|
@@ -714,7 +714,7 @@ var Kt = "drqe3uh", Ft = "drqe3ui", de = {
|
|
|
714
714
|
delta: g?.stages,
|
|
715
715
|
durations: g?.stageDurationsMs,
|
|
716
716
|
cumulative: G
|
|
717
|
-
}), /* @__PURE__ */ a(
|
|
717
|
+
}), /* @__PURE__ */ a(Yt, { entries: C })] })
|
|
718
718
|
]
|
|
719
719
|
});
|
|
720
720
|
}, Ut = ({ delta: e, durations: t, cumulative: r }) => /* @__PURE__ */ v("table", {
|
|
@@ -748,7 +748,7 @@ var Kt = "drqe3uh", Ft = "drqe3ui", de = {
|
|
|
748
748
|
})
|
|
749
749
|
]
|
|
750
750
|
}) }), /* @__PURE__ */ a("tbody", { children: ee.map((n) => {
|
|
751
|
-
const s = e?.[n], c =
|
|
751
|
+
const s = e?.[n], c = jt(s);
|
|
752
752
|
return /* @__PURE__ */ v("tr", {
|
|
753
753
|
className: Ht,
|
|
754
754
|
children: [
|
|
@@ -786,7 +786,7 @@ var Kt = "drqe3uh", Ft = "drqe3ui", de = {
|
|
|
786
786
|
]
|
|
787
787
|
}, n);
|
|
788
788
|
}) })]
|
|
789
|
-
}),
|
|
789
|
+
}), Yt = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ v("div", {
|
|
790
790
|
className: At,
|
|
791
791
|
children: [/* @__PURE__ */ a("div", {
|
|
792
792
|
className: Ft,
|
|
@@ -806,7 +806,7 @@ var Kt = "drqe3uh", Ft = "drqe3ui", de = {
|
|
|
806
806
|
children: t.label
|
|
807
807
|
}),
|
|
808
808
|
/* @__PURE__ */ v("span", {
|
|
809
|
-
className:
|
|
809
|
+
className: Mt,
|
|
810
810
|
children: [
|
|
811
811
|
r,
|
|
812
812
|
"/",
|
|
@@ -818,13 +818,13 @@ var Kt = "drqe3uh", Ft = "drqe3ui", de = {
|
|
|
818
818
|
]
|
|
819
819
|
}, t.id);
|
|
820
820
|
})]
|
|
821
|
-
}),
|
|
821
|
+
}), jt = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", Vt = (e, t) => {
|
|
822
822
|
let r = 0;
|
|
823
823
|
for (const n of ee) t(e[n]) && (r += 1);
|
|
824
824
|
return r;
|
|
825
|
-
}, re = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`,
|
|
825
|
+
}, re = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, on = () => {
|
|
826
826
|
const { history: e } = Z(), { stack: t, undo: r, redo: n } = e, s = f((l) => t.subscribe(l), [t]), c = f(() => t.getSnapshot(), [t]), i = Fe(s, c, c);
|
|
827
|
-
return
|
|
827
|
+
return M(() => ({
|
|
828
828
|
...i,
|
|
829
829
|
undo: r,
|
|
830
830
|
redo: n
|
|
@@ -844,14 +844,14 @@ var Kt = "drqe3uh", Ft = "drqe3ui", de = {
|
|
|
844
844
|
"range",
|
|
845
845
|
"reset",
|
|
846
846
|
"submit"
|
|
847
|
-
]),
|
|
847
|
+
]), an = (e, t = {}) => {
|
|
848
848
|
const { target: r, enabled: n = !0 } = t;
|
|
849
|
-
|
|
849
|
+
x(() => {
|
|
850
850
|
const s = Xt(r);
|
|
851
851
|
if (!n || !s) return;
|
|
852
852
|
const c = (i) => {
|
|
853
|
-
if (!
|
|
854
|
-
const l =
|
|
853
|
+
if (!zt(i) || i.defaultPrevented || Jt(i.target)) return;
|
|
854
|
+
const l = Re(i);
|
|
855
855
|
if (!l) return;
|
|
856
856
|
const d = e.current;
|
|
857
857
|
d && (l === "undo" ? d.undo() : d.redo()) && i.preventDefault();
|
|
@@ -862,72 +862,73 @@ var Kt = "drqe3uh", Ft = "drqe3ui", de = {
|
|
|
862
862
|
r,
|
|
863
863
|
n
|
|
864
864
|
]);
|
|
865
|
-
}, Xt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e,
|
|
865
|
+
}, Xt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, zt = (e) => "key" in e, Jt = (e) => e instanceof HTMLInputElement ? !Wt.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, cn = () => {
|
|
866
866
|
const { targetBoundaryStore: e } = Z();
|
|
867
|
-
return
|
|
867
|
+
return Q(e, (t) => t.boundary);
|
|
868
868
|
};
|
|
869
869
|
export {
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
870
|
+
rr as BrandMark,
|
|
871
|
+
or as CanvasTextMeasurer,
|
|
872
|
+
dr as DefaultFooter,
|
|
873
873
|
Nt as DefaultGeomCircle,
|
|
874
874
|
Ct as DefaultGeomLine,
|
|
875
875
|
Dt as DefaultGeomPath,
|
|
876
876
|
Gt as DefaultGeomRect,
|
|
877
|
-
|
|
877
|
+
Hr as DefaultGrid,
|
|
878
878
|
ir as DefaultHeader,
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
879
|
+
ur as DefaultSwatch,
|
|
880
|
+
vr as DefaultTooltip,
|
|
881
|
+
sn as DevToolsPanel,
|
|
882
|
+
Fr as GRAPH_MODES,
|
|
883
|
+
Qr as GeomCircle,
|
|
884
|
+
Zr as GeomLine,
|
|
885
|
+
tn as GeomPath,
|
|
886
|
+
en as GeomRect,
|
|
887
|
+
Qe as GraphErrorBoundary,
|
|
888
888
|
ae as GraphErrorPanel,
|
|
889
889
|
Rt as GraphProvider,
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
890
|
+
pr as GraphRenderer,
|
|
891
|
+
tr as HoverProvider,
|
|
892
|
+
nr as IntroFade,
|
|
893
|
+
Lr as IntroWipeClip,
|
|
894
|
+
ar as TextMeasurerProvider,
|
|
895
|
+
br as ThemeProvider,
|
|
896
|
+
nn as UnitBoxSvg,
|
|
897
|
+
rn as UnitSpaceSvg,
|
|
898
|
+
yr as buildDotsEditOutlineShapes,
|
|
899
|
+
Jr as createGraphyKit,
|
|
900
|
+
Pr as darkTheme,
|
|
901
|
+
cr as defineGeomRenderer,
|
|
902
|
+
Nr as lightTheme,
|
|
903
|
+
Zt as lightenCss,
|
|
904
|
+
$r as projectPointCartesian,
|
|
905
905
|
Ze as pruneSelection,
|
|
906
906
|
mr as resolveBrandMarkVisual,
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
on as
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
xr as
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
Er as
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
Mr as
|
|
907
|
+
Ir as resolvePathStroke,
|
|
908
|
+
Sr as scalePointToPanel,
|
|
909
|
+
er as stampAxisEditTarget,
|
|
910
|
+
Dr as stampGridEditTarget,
|
|
911
|
+
lr as stampLegendEditTarget,
|
|
912
|
+
Kr as useElementScreenRect,
|
|
913
|
+
qr as useGeomHitTest,
|
|
914
|
+
sr as useGeomHover,
|
|
915
|
+
wr as useGeomReaderTree,
|
|
916
|
+
Rr as useGeomStyleReader,
|
|
917
|
+
_r as useGraphCommands,
|
|
918
|
+
Cr as useGraphHandle,
|
|
919
|
+
on as useGraphHistory,
|
|
920
|
+
an as useGraphHistoryShortcuts,
|
|
921
|
+
Gr as useGraphLocale,
|
|
922
|
+
Tr as useGraphSelection,
|
|
923
|
+
Or as useGuidesTakePress,
|
|
924
|
+
xr as useHandleScene,
|
|
925
|
+
Ar as useHoverState,
|
|
926
|
+
fr as usePaintDefs,
|
|
927
|
+
hr as useResolvedStyle,
|
|
928
|
+
Br as useSceneSelector,
|
|
929
|
+
Er as useStyleReaderTree,
|
|
930
|
+
gr as useStyleResolver,
|
|
931
|
+
cn as useTargetBoundary,
|
|
932
|
+
Mr as useTextMeasurer,
|
|
933
|
+
kr as vars
|
|
933
934
|
};
|
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.1792146771330",
|
|
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.1792146771330"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@tiptap/core": "^3.0.0",
|
|
@@ -151,8 +151,8 @@
|
|
|
151
151
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
152
152
|
"vitest": "^4.1.11",
|
|
153
153
|
"@graphytools/eslint-plugin-graphy": "1.0.0",
|
|
154
|
-
"@graphytools/typescript-config": "0.0.1",
|
|
155
154
|
"@graphytools/vitest-config": "1.0.0",
|
|
155
|
+
"@graphytools/typescript-config": "0.0.1",
|
|
156
156
|
"@graphytools/eslint-config": "0.0.1"
|
|
157
157
|
},
|
|
158
158
|
"publishConfig": {
|