@graphysdk/react-renderer 1.9.0-beta.1795532892391 → 1.9.0-beta.1795606078423
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 +4 -2
- package/dist/editable.mjs +6131 -5581
- package/dist/{history-chords-CWO3RcQe.js → history-chords-D81GmhCY.js} +1828 -1810
- package/dist/history-chords-VpwilkFA.cjs +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +128 -128
- package/package.json +5 -5
- package/dist/history-chords-oZXY9ZIm.cjs +0 -2
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as Or, $
|
|
1
|
+
import { $n as Or, $t as Br, At as Fr, Bn as Kr, Bt as Ur, Cn as Wr, Cr as $e, Dn as zr, Gn as He, H as Vr, Hn as J, In as Yr, Jn as jr, Kn as Z, Ln as Xr, Lt as Qr, Nn as Jr, Ot as Zr, P as en, Qn as tn, Qt as rn, Rn as K, Sn as nn, Sr as me, Tr as ae, U as sn, Un as Ie, Ut as on, Vn as xe, Vt as an, W as cn, Wn as Me, X as ln, Xn as dn, Yn as U, Yt as un, _n as mn, _r as hn, a as gn, an as Ae, bn as pn, cr as Oe, dn as fn, dr as Be, en as vn, er as Fe, et as yn, fn as Sn, fr as re, gr as bn, hn as Tn, hr as Rn, i as En, ir as Ke, jt as Gn, kt as Nn, l as In, ln as Ue, lr as We, mn as ze, mr as wn, n as Cn, nr as Ve, nt as Pn, or as Ye, pn as ee, pr as we, r as Ln, rr as Dn, sn as je, sr as Ce, t as Xe, tn as _n, tr as Qe, tt as qn, un as Je, ur as Ze, vn as et, vr as tt, w as kn, wr as rt, xn as $n, xr as ne, yn as nt, yr as st, zn as Pe } from "./history-chords-D81GmhCY.js";
|
|
2
2
|
import { COMPILER_STAGE_KEYS as ie, DEFAULT_LOCALE as ot, Geom as at, GraphCompilationSession as it, areEditTargetsEqual as ct, buildDiagnostic as he, buildPointSymbolPath as lt, canonicalizeLocale as dt, createAnchorResolver as ut, createCompiler as mt, createDataLabelPlacementResolver as ht, createSpecBuilder as gt, createStyleResolver as Le, findAnnotation as pt, findIntlLocale as ft, findLayerById as ge, foldGeomCornerRadii as vt, isCompilerCachingEnabled as yt, isGeometricSymbol as ce, isImageSymbol as St, resolveDefinition as bt, resolveGeomCornerRadiusPx as pe, setCompilerCachingEnabled as Tt, toPercent as X } from "@graphysdk/viz-engine";
|
|
3
3
|
import { Component as Rt, useCallback as f, useEffect as D, useId as Et, useImperativeHandle as Gt, useMemo as $, useRef as fe, useState as v, useSyncExternalStore as Nt } from "react";
|
|
4
4
|
import { Fragment as It, jsx as c, jsxs as y } from "react/jsx-runtime";
|
|
@@ -71,17 +71,17 @@ var kt = class extends Rt {
|
|
|
71
71
|
const t = bt(e);
|
|
72
72
|
return t instanceof at ? t : null;
|
|
73
73
|
}, $t = (e, t) => {
|
|
74
|
-
const r = e.filter((n) =>
|
|
74
|
+
const r = e.filter((n) => Ht(n, t));
|
|
75
75
|
return r.length === e.length ? e : r;
|
|
76
|
-
},
|
|
76
|
+
}, Ht = (e, t) => e.kind === "annotation" ? pt(t.annotations, e.id) !== null : e.kind === "observations" ? ge(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? ge(t.layers, e.layerId) !== void 0 : !0, Se = [], xt = () => le((e) => ({
|
|
77
77
|
selection: Se,
|
|
78
|
-
setSelection: (t) => e((r) =>
|
|
78
|
+
setSelection: (t) => e((r) => Mt(r.selection, t) ? r : { selection: t }),
|
|
79
79
|
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: Se })
|
|
80
|
-
})),
|
|
80
|
+
})), Mt = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
|
|
81
81
|
const s = t[n];
|
|
82
82
|
return s !== void 0 && ct(r, s);
|
|
83
83
|
}), At = 5, Ot = (e) => {
|
|
84
|
-
if (!
|
|
84
|
+
if (!Ce) return {
|
|
85
85
|
emit: () => {
|
|
86
86
|
},
|
|
87
87
|
subscribe: () => Ft,
|
|
@@ -222,7 +222,7 @@ function zt(e, t) {
|
|
|
222
222
|
}
|
|
223
223
|
return o;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function Vt(e) {
|
|
226
226
|
const t = /* @__PURE__ */ new Set(), r = [];
|
|
227
227
|
for (const n of e.layers) {
|
|
228
228
|
const s = n.identityKey;
|
|
@@ -240,7 +240,7 @@ function Yt(e) {
|
|
|
240
240
|
}
|
|
241
241
|
return r;
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function Yt(e, t) {
|
|
244
244
|
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), o = [];
|
|
245
245
|
for (const a of n) {
|
|
246
246
|
if (a.interactive === !1 || a.spatialKind !== "renderHitTest" || s.has(a.geom)) continue;
|
|
@@ -294,9 +294,9 @@ function Xt(e, t) {
|
|
|
294
294
|
}
|
|
295
295
|
return o;
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Qt(e, t) {
|
|
298
298
|
let r;
|
|
299
|
-
return e.layers.flatMap((n, s) => ee(t(n.geom, e.coordSystem.type)) ?
|
|
299
|
+
return e.layers.flatMap((n, s) => ee(t(n.geom, e.coordSystem.type)) ? Jt(n) ? (r ??= Le().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
|
|
300
300
|
kind: "userInput",
|
|
301
301
|
severity: "warning",
|
|
302
302
|
code: "INVALID_STYLE_RULE",
|
|
@@ -309,7 +309,7 @@ function Jt(e, t) {
|
|
|
309
309
|
suggestion: "Remove the hovered overpaint, or paint the hover treatment in the geom's live render."
|
|
310
310
|
}]) : [] : []);
|
|
311
311
|
}
|
|
312
|
-
var
|
|
312
|
+
var Jt = (e) => [e.styles.defaults, e.styles.overrides].some((t) => t.some((r) => r.state === "hovered" && (r.declarations.overpaint?.length ?? 0) > 0));
|
|
313
313
|
function Zt(e) {
|
|
314
314
|
const t = /* @__PURE__ */ new Set(), r = [];
|
|
315
315
|
for (const n of e) {
|
|
@@ -332,7 +332,7 @@ var er = (e) => le((t) => ({
|
|
|
332
332
|
scene: e,
|
|
333
333
|
setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
|
|
334
334
|
})), tr = ({ spec: e, data: t, colorScheme: r, plugins: n, theme: s, resolveRenderer: o, anchorResolver: a, onSpecChange: l, onError: d, onWarnings: h }) => {
|
|
335
|
-
const p =
|
|
335
|
+
const p = re(l), C = re(d), P = re(h), [R] = v(() => $e(oe, (i) => {
|
|
336
336
|
P.current?.(i);
|
|
337
337
|
})), [{ session: u, compileBus: g, findGeom: G }] = v(() => {
|
|
338
338
|
const i = mt({
|
|
@@ -350,7 +350,7 @@ var er = (e) => le((t) => ({
|
|
|
350
350
|
errors: [...m.errors, ...i.errors],
|
|
351
351
|
warnings: [...m.warnings, ...i.warnings]
|
|
352
352
|
};
|
|
353
|
-
}),
|
|
353
|
+
}), H = fe(null), [L] = v(rr), T = fe(null), S = f((i) => E.errors.length === 0 ? i : [...E.errors, ...i ?? []], [E]), _ = f((i) => {
|
|
354
354
|
if (!i.ok) return i.errors;
|
|
355
355
|
if (T.current) T.current.getState().setScene(i.scene);
|
|
356
356
|
else {
|
|
@@ -364,22 +364,22 @@ var er = (e) => le((t) => ({
|
|
|
364
364
|
data: t,
|
|
365
365
|
colorScheme: r
|
|
366
366
|
});
|
|
367
|
-
return
|
|
367
|
+
return H.current = i, S(_(i));
|
|
368
368
|
}), I = f((i) => i.ok ? [
|
|
369
369
|
...i.warnings,
|
|
370
370
|
...Wt(i.scene, o),
|
|
371
371
|
...zt(i.scene, o),
|
|
372
|
-
...
|
|
373
|
-
...
|
|
372
|
+
...Vt(i.scene),
|
|
373
|
+
...Yt(i.scene, o),
|
|
374
374
|
...Xt(i.scene, o),
|
|
375
|
-
...
|
|
375
|
+
...Qt(i.scene, o),
|
|
376
376
|
...jt(i.scene, a)
|
|
377
377
|
] : i.warnings, [o, a]), w = f((i) => {
|
|
378
378
|
i.length !== 0 && (oe(i), C.current?.(i));
|
|
379
379
|
}, [C]);
|
|
380
380
|
D(() => {
|
|
381
|
-
const i =
|
|
382
|
-
i && (w([...E.errors, ...i.ok ? [] : i.errors]), R(
|
|
381
|
+
const i = H.current;
|
|
382
|
+
i && (w([...E.errors, ...i.ok ? [] : i.errors]), R(ne, [...E.warnings, ...I(i)]), i.ok && g.emit({ kind: "init" }));
|
|
383
383
|
}, [
|
|
384
384
|
g,
|
|
385
385
|
w,
|
|
@@ -395,7 +395,7 @@ var er = (e) => le((t) => ({
|
|
|
395
395
|
if (!i) return;
|
|
396
396
|
i.committedSpec && p.current?.(i.committedSpec);
|
|
397
397
|
const m = _(i.result);
|
|
398
|
-
N(S(m)), m && w(m), R(
|
|
398
|
+
N(S(m)), m && w(m), R(ne, I(i.result)), m || g.emit({ kind: i.hasSpecChange ? "spec" : "data" });
|
|
399
399
|
}, [
|
|
400
400
|
e,
|
|
401
401
|
t,
|
|
@@ -409,30 +409,30 @@ var er = (e) => le((t) => ({
|
|
|
409
409
|
I,
|
|
410
410
|
p
|
|
411
411
|
]);
|
|
412
|
-
const
|
|
413
|
-
N((m) => m === null ? m : S(null)), R(
|
|
412
|
+
const x = f((i) => {
|
|
413
|
+
N((m) => m === null ? m : S(null)), R(ne, I(i));
|
|
414
414
|
}, [
|
|
415
415
|
S,
|
|
416
416
|
R,
|
|
417
417
|
I
|
|
418
|
-
]),
|
|
419
|
-
i.scene && T.current?.getState().setScene(i.scene), i.result &&
|
|
418
|
+
]), M = f((i) => {
|
|
419
|
+
i.scene && T.current?.getState().setScene(i.scene), i.result && x(i.result), i.command && g.emit({
|
|
420
420
|
kind: "command",
|
|
421
421
|
command: i.command
|
|
422
422
|
}), i.spec && p.current?.(i.spec), i.errors && w([...i.errors]);
|
|
423
423
|
}, [
|
|
424
|
-
|
|
424
|
+
x,
|
|
425
425
|
g,
|
|
426
426
|
p,
|
|
427
427
|
w
|
|
428
428
|
]), b = f((i) => {
|
|
429
|
-
for (const m of i)
|
|
429
|
+
for (const m of i) M(m);
|
|
430
430
|
return i.some((m) => !!m.scene);
|
|
431
|
-
}, [
|
|
431
|
+
}, [M]), z = f((i, m) => {
|
|
432
432
|
b(u.applyCommand(i, m));
|
|
433
|
-
}, [u, b]),
|
|
433
|
+
}, [u, b]), V = f(() => {
|
|
434
434
|
b(u.commit());
|
|
435
|
-
}, [u, b]), A = f(() => b(u.undo()), [u, b]),
|
|
435
|
+
}, [u, b]), A = f(() => b(u.undo()), [u, b]), Y = f(() => b(u.redo()), [u, b]), j = f((i) => {
|
|
436
436
|
const m = u.preview(i).find((te) => te.scene)?.scene;
|
|
437
437
|
return m ? (T.current?.getState().setScene(m), !0) : !1;
|
|
438
438
|
}, [u]), O = f(() => {
|
|
@@ -441,16 +441,16 @@ var er = (e) => le((t) => ({
|
|
|
441
441
|
}, [u]), q = $(() => ({
|
|
442
442
|
stack: u.history,
|
|
443
443
|
undo: A,
|
|
444
|
-
redo:
|
|
444
|
+
redo: Y
|
|
445
445
|
}), [
|
|
446
446
|
u,
|
|
447
447
|
A,
|
|
448
|
-
|
|
448
|
+
Y
|
|
449
449
|
]), k = f(() => T.current?.getState().scene ?? null, []);
|
|
450
450
|
return {
|
|
451
451
|
store: T.current,
|
|
452
452
|
dispatch: z,
|
|
453
|
-
commit:
|
|
453
|
+
commit: V,
|
|
454
454
|
paintPreview: j,
|
|
455
455
|
clearPreview: O,
|
|
456
456
|
history: q,
|
|
@@ -470,9 +470,9 @@ var er = (e) => le((t) => ({
|
|
|
470
470
|
notify: () => e.forEach((t) => t())
|
|
471
471
|
};
|
|
472
472
|
}, nr = ["cartesian", "polar"], sr = ({ data: e, spec: t, plugins: r = [], theme: n, glyphs: s, formattingLocale: o, handleRef: a, onSpecChange: l, onError: d, onWarnings: h, colorScheme: p = "light", mode: C = je.readonly, children: P }) => {
|
|
473
|
-
const R = Ue(C), [u] = v(() => n), [g] = v(() =>
|
|
473
|
+
const R = Ue(C), [u] = v(() => n), [g] = v(() => Ke(n?.glyphs, s)), G = u?.colorScheme ?? p, [E] = v(() => Je([...u?.plugins ?? [], ...r].filter(De)));
|
|
474
474
|
ar(E, g);
|
|
475
|
-
const
|
|
475
|
+
const H = Et(), [L] = v(() => ut(r)), [T] = v(() => ht(r)), [S] = v(() => xt()), [_] = v(() => Ae()), W = $(() => Le({ colorScheme: G }), [G]), { store: N, dispatch: I, commit: w, paintPreview: x, clearPreview: M, history: b, subscribe: z, getScene: V, compileBus: A, compileErrors: Y, findGeom: j, reportWarningSource: O } = tr({
|
|
476
476
|
spec: t,
|
|
477
477
|
data: e,
|
|
478
478
|
colorScheme: G,
|
|
@@ -495,20 +495,20 @@ var er = (e) => le((t) => ({
|
|
|
495
495
|
const k = $(() => ({
|
|
496
496
|
dispatch: I,
|
|
497
497
|
commit: w,
|
|
498
|
-
paintPreview:
|
|
499
|
-
clearPreview:
|
|
498
|
+
paintPreview: x,
|
|
499
|
+
clearPreview: M
|
|
500
500
|
}), [
|
|
501
501
|
I,
|
|
502
502
|
w,
|
|
503
|
-
|
|
504
|
-
|
|
503
|
+
x,
|
|
504
|
+
M
|
|
505
505
|
]);
|
|
506
506
|
Gt(a, () => ({
|
|
507
507
|
commands: k,
|
|
508
508
|
undo: b.undo,
|
|
509
509
|
redo: b.redo,
|
|
510
510
|
subscribe: z,
|
|
511
|
-
getScene:
|
|
511
|
+
getScene: V,
|
|
512
512
|
formattingLocale: q,
|
|
513
513
|
getSelection: () => S.getState().selection,
|
|
514
514
|
setSelection: (m) => S.getState().setSelection(m),
|
|
@@ -521,7 +521,7 @@ var er = (e) => le((t) => ({
|
|
|
521
521
|
k,
|
|
522
522
|
b,
|
|
523
523
|
z,
|
|
524
|
-
|
|
524
|
+
V,
|
|
525
525
|
q,
|
|
526
526
|
S,
|
|
527
527
|
T,
|
|
@@ -529,7 +529,7 @@ var er = (e) => le((t) => ({
|
|
|
529
529
|
E
|
|
530
530
|
]);
|
|
531
531
|
const i = $(() => N ? {
|
|
532
|
-
chartId:
|
|
532
|
+
chartId: H,
|
|
533
533
|
store: N,
|
|
534
534
|
selectionStore: S,
|
|
535
535
|
targetBoundaryStore: _,
|
|
@@ -544,7 +544,7 @@ var er = (e) => le((t) => ({
|
|
|
544
544
|
findGeom: j,
|
|
545
545
|
reportLayoutWarnings: O
|
|
546
546
|
} : null, [
|
|
547
|
-
|
|
547
|
+
H,
|
|
548
548
|
N,
|
|
549
549
|
S,
|
|
550
550
|
_,
|
|
@@ -560,18 +560,18 @@ var er = (e) => le((t) => ({
|
|
|
560
560
|
O
|
|
561
561
|
]);
|
|
562
562
|
return /* @__PURE__ */ c(kt, {
|
|
563
|
-
forcedErrors:
|
|
563
|
+
forcedErrors: Y,
|
|
564
564
|
onError: d,
|
|
565
565
|
resetKeys: [t, e],
|
|
566
|
-
children: i ? /* @__PURE__ */ c(
|
|
566
|
+
children: i ? /* @__PURE__ */ c(rt.Provider, {
|
|
567
567
|
value: i,
|
|
568
|
-
children: /* @__PURE__ */ c(
|
|
568
|
+
children: /* @__PURE__ */ c(et, {
|
|
569
569
|
value: E,
|
|
570
|
-
children: /* @__PURE__ */ c(
|
|
570
|
+
children: /* @__PURE__ */ c(st, {
|
|
571
571
|
value: T,
|
|
572
572
|
children: /* @__PURE__ */ c(K, {
|
|
573
573
|
shapes: u?.shapes,
|
|
574
|
-
children: /* @__PURE__ */ c(
|
|
574
|
+
children: /* @__PURE__ */ c(Ve, {
|
|
575
575
|
glyphs: g,
|
|
576
576
|
children: P
|
|
577
577
|
})
|
|
@@ -582,7 +582,7 @@ var er = (e) => le((t) => ({
|
|
|
582
582
|
});
|
|
583
583
|
}, or = (e, t) => (e ?? []).filter((r) => !ce(r) && !t.has(r)), ar = (e, t) => {
|
|
584
584
|
D(() => {
|
|
585
|
-
if (!
|
|
585
|
+
if (!Ce) return;
|
|
586
586
|
const r = new Set(t.map(({ name: n }) => n));
|
|
587
587
|
for (const n of nr) for (const s of or(e("point", n)?.symbols, r)) console.warn(`[graphy] The ${n} point renderer lists "${s}", but no glyph has that name. The shape menu offers it, and SymbolFigure draws the first listed symbol in its place.`);
|
|
588
588
|
}, [e, t]);
|
|
@@ -625,7 +625,7 @@ var F = (e, t) => {
|
|
|
625
625
|
};
|
|
626
626
|
}, cr = ({ animateTransitions: e, cx: t, cy: r, r: n, effects: s, ...o }) => {
|
|
627
627
|
const a = U(s);
|
|
628
|
-
return e ? /* @__PURE__ */ c(
|
|
628
|
+
return e ? /* @__PURE__ */ c(Oe, {
|
|
629
629
|
animate: {
|
|
630
630
|
cx: t,
|
|
631
631
|
cy: r,
|
|
@@ -677,7 +677,7 @@ var F = (e, t) => {
|
|
|
677
677
|
width: n,
|
|
678
678
|
height: s
|
|
679
679
|
};
|
|
680
|
-
return /* @__PURE__ */ c(
|
|
680
|
+
return /* @__PURE__ */ c(Be, {
|
|
681
681
|
animate: o === void 0 || a === void 0 ? p : {
|
|
682
682
|
...p,
|
|
683
683
|
rx: o,
|
|
@@ -699,14 +699,14 @@ var F = (e, t) => {
|
|
|
699
699
|
...s
|
|
700
700
|
});
|
|
701
701
|
}, Un = (e) => {
|
|
702
|
-
const { Circle: t } =
|
|
702
|
+
const { Circle: t } = J(), { animateTransitions: r } = Z(), { symbol: n, ...s } = e, o = {
|
|
703
703
|
...s,
|
|
704
704
|
animateTransitions: r
|
|
705
705
|
};
|
|
706
706
|
return n !== void 0 && n !== "circle" ? /* @__PURE__ */ c("g", {
|
|
707
707
|
style: U(e.effects),
|
|
708
708
|
"data-testid": e["data-testid"],
|
|
709
|
-
children: /* @__PURE__ */ c(
|
|
709
|
+
children: /* @__PURE__ */ c(Fe, {
|
|
710
710
|
symbol: n,
|
|
711
711
|
cx: Te(e.cx),
|
|
712
712
|
cy: Te(e.cy),
|
|
@@ -718,33 +718,33 @@ var F = (e, t) => {
|
|
|
718
718
|
strokeOpacity: e.strokeOpacity,
|
|
719
719
|
strokeWidth: e.strokeWidth,
|
|
720
720
|
motion: r ? {
|
|
721
|
-
transition:
|
|
721
|
+
transition: we,
|
|
722
722
|
intro: !1,
|
|
723
723
|
fadesIn: !1
|
|
724
724
|
} : null
|
|
725
725
|
})
|
|
726
726
|
}) : t === void 0 ? cr(o) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(t, { ...o }) });
|
|
727
727
|
}, Wn = (e) => {
|
|
728
|
-
const { Line: t } =
|
|
728
|
+
const { Line: t } = J(), { animateTransitions: r } = Z(), n = {
|
|
729
729
|
...e,
|
|
730
730
|
animateTransitions: r
|
|
731
731
|
};
|
|
732
732
|
return t === void 0 ? lr(n) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(t, { ...n }) });
|
|
733
733
|
}, zn = ({ cornerRadius: e, ...t }) => {
|
|
734
|
-
const { Rect: r } =
|
|
734
|
+
const { Rect: r } = J(), n = Ie()?.size ?? null, s = xe(), { animateTransitions: o } = Z(), a = {
|
|
735
735
|
...t,
|
|
736
736
|
animateTransitions: o,
|
|
737
737
|
...hr(e, t, n, s)
|
|
738
738
|
};
|
|
739
739
|
return r === void 0 ? dr(a) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(r, { ...a }) });
|
|
740
|
-
},
|
|
741
|
-
const { Path: t } =
|
|
740
|
+
}, Vn = (e) => {
|
|
741
|
+
const { Path: t } = J(), { animateTransitions: r } = Z(), n = {
|
|
742
742
|
...e,
|
|
743
743
|
animateTransitions: r
|
|
744
744
|
};
|
|
745
745
|
return t === void 0 ? ur(n) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(t, { ...n }) });
|
|
746
|
-
}, Te = (e) => typeof e == "number" ? `${e}px` : e, mr = ({ d: e, source: t, ...r }) => /* @__PURE__ */ c(
|
|
747
|
-
d:
|
|
746
|
+
}, Te = (e) => typeof e == "number" ? `${e}px` : e, mr = ({ d: e, source: t, ...r }) => /* @__PURE__ */ c(Ze, {
|
|
747
|
+
d: He(e, we, t),
|
|
748
748
|
...r
|
|
749
749
|
}), hr = (e, t, r, n) => {
|
|
750
750
|
if (e === void 0) return {};
|
|
@@ -775,8 +775,8 @@ var F = (e, t) => {
|
|
|
775
775
|
} : {
|
|
776
776
|
rx: e / t.x,
|
|
777
777
|
ry: e / t.y
|
|
778
|
-
},
|
|
779
|
-
const l =
|
|
778
|
+
}, Yn = ({ symbol: e, size: t, fill: r, fillOpacity: n, stroke: s, strokeOpacity: o, strokeWidth: a }) => {
|
|
779
|
+
const l = Ye(), d = nt(), h = tt((P) => P.coordSystem.type), p = pr(e, d("point", h)?.symbols ?? [], l), C = {
|
|
780
780
|
size: t,
|
|
781
781
|
fill: r,
|
|
782
782
|
fillOpacity: n,
|
|
@@ -792,13 +792,13 @@ var F = (e, t) => {
|
|
|
792
792
|
strokeOpacity: o,
|
|
793
793
|
strokeWidth: a,
|
|
794
794
|
strokeLinejoin: "round"
|
|
795
|
-
}) : /* @__PURE__ */ c(
|
|
795
|
+
}) : /* @__PURE__ */ c(Qe, {
|
|
796
796
|
symbol: p,
|
|
797
797
|
glyphs: l,
|
|
798
798
|
...C
|
|
799
799
|
});
|
|
800
800
|
}, pr = (e, t, r) => St(e) || t.includes(e) || !ce(e) && r.has(e) ? e : t[0] ?? "circle", jn = ({ children: e, ...t }) => {
|
|
801
|
-
const r =
|
|
801
|
+
const r = Ie()?.size ?? null;
|
|
802
802
|
return /* @__PURE__ */ c("svg", {
|
|
803
803
|
viewBox: "0 0 1 1",
|
|
804
804
|
preserveAspectRatio: "none",
|
|
@@ -806,14 +806,14 @@ var F = (e, t) => {
|
|
|
806
806
|
height: "100%",
|
|
807
807
|
pointerEvents: "none",
|
|
808
808
|
...t,
|
|
809
|
-
children: /* @__PURE__ */ c(
|
|
809
|
+
children: /* @__PURE__ */ c(Pe, {
|
|
810
810
|
size: r,
|
|
811
811
|
space: "unit",
|
|
812
812
|
children: e
|
|
813
813
|
})
|
|
814
814
|
});
|
|
815
815
|
}, Xn = ({ box: e, children: t }) => {
|
|
816
|
-
const r =
|
|
816
|
+
const r = Me(), n = r === null ? null : r.width * (e.x1 - e.x0), s = r === null ? null : r.height * (e.y1 - e.y0), o = $(() => n === null || s === null ? null : {
|
|
817
817
|
width: n,
|
|
818
818
|
height: s
|
|
819
819
|
}, [n, s]);
|
|
@@ -824,12 +824,12 @@ var F = (e, t) => {
|
|
|
824
824
|
height: X(e.y1 - e.y0),
|
|
825
825
|
overflow: "hidden",
|
|
826
826
|
pointerEvents: "none",
|
|
827
|
-
children: /* @__PURE__ */ c(
|
|
827
|
+
children: /* @__PURE__ */ c(Pe, {
|
|
828
828
|
size: o,
|
|
829
829
|
children: t
|
|
830
830
|
})
|
|
831
831
|
});
|
|
832
|
-
}, fr = "drqe3u0", vr = "drqe3u1", yr = "drqe3u2", Sr = "drqe3u3", B = "drqe3u4", br = "drqe3u5", Tr = "drqe3u6", Rr = "drqe3u7",
|
|
832
|
+
}, fr = "drqe3u0", vr = "drqe3u1", yr = "drqe3u2", Sr = "drqe3u3", B = "drqe3u4", br = "drqe3u5", Tr = "drqe3u6", Rr = "drqe3u7", Q = "drqe3u8", Er = "drqe3u9", Gr = "drqe3ua";
|
|
833
833
|
var Nr = "drqe3uc", Ir = "drqe3ud", wr = "drqe3ue", Cr = "drqe3uf";
|
|
834
834
|
var Pr = "drqe3uh", Lr = "drqe3ui", Ge = {
|
|
835
835
|
enabled: "drqe3uk drqe3uj",
|
|
@@ -841,7 +841,7 @@ var Pr = "drqe3uh", Lr = "drqe3ui", Ge = {
|
|
|
841
841
|
ran: "drqe3uq drqe3up",
|
|
842
842
|
cached: "drqe3ur drqe3up",
|
|
843
843
|
untouched: "drqe3us drqe3up"
|
|
844
|
-
},
|
|
844
|
+
}, Qn = ({ width: e = 440, style: t, className: r } = {}) => {
|
|
845
845
|
const { compileBus: n } = ae(), [s] = v(() => Bt()), [o, a] = v(!1), [l, d] = v(yt);
|
|
846
846
|
D(() => {
|
|
847
847
|
const { recordCompile: u } = s.getState(), g = n.getLastTrigger(), G = n.getLastCompile();
|
|
@@ -942,7 +942,7 @@ var Pr = "drqe3uh", Lr = "drqe3ui", Ge = {
|
|
|
942
942
|
]
|
|
943
943
|
}),
|
|
944
944
|
/* @__PURE__ */ c("td", {
|
|
945
|
-
className:
|
|
945
|
+
className: Q,
|
|
946
946
|
children: t === void 0 || o === "untouched" ? "—" : de(t[n])
|
|
947
947
|
}),
|
|
948
948
|
/* @__PURE__ */ c("td", {
|
|
@@ -950,15 +950,15 @@ var Pr = "drqe3uh", Lr = "drqe3ui", Ge = {
|
|
|
950
950
|
children: s?.misses ?? 0
|
|
951
951
|
}),
|
|
952
952
|
/* @__PURE__ */ c("td", {
|
|
953
|
-
className:
|
|
953
|
+
className: Q,
|
|
954
954
|
children: s?.hits ?? 0
|
|
955
955
|
}),
|
|
956
956
|
/* @__PURE__ */ c("td", {
|
|
957
|
-
className:
|
|
957
|
+
className: Q,
|
|
958
958
|
children: r[n].misses
|
|
959
959
|
}),
|
|
960
960
|
/* @__PURE__ */ c("td", {
|
|
961
|
-
className:
|
|
961
|
+
className: Q,
|
|
962
962
|
children: r[n].hits
|
|
963
963
|
})
|
|
964
964
|
]
|
|
@@ -1000,7 +1000,7 @@ var Pr = "drqe3uh", Lr = "drqe3ui", Ge = {
|
|
|
1000
1000
|
let r = 0;
|
|
1001
1001
|
for (const n of ie) t(e[n]) && (r += 1);
|
|
1002
1002
|
return r;
|
|
1003
|
-
}, de = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`,
|
|
1003
|
+
}, de = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, Jn = () => {
|
|
1004
1004
|
const { history: e } = ae(), { stack: t, undo: r, redo: n } = e, s = f((l) => t.subscribe(l), [t]), o = f(() => t.getSnapshot(), [t]), a = Nt(s, o, o);
|
|
1005
1005
|
return $(() => ({
|
|
1006
1006
|
...a,
|
|
@@ -1025,11 +1025,11 @@ var Pr = "drqe3uh", Lr = "drqe3ui", Ge = {
|
|
|
1025
1025
|
]), Zn = (e, t = {}) => {
|
|
1026
1026
|
const { target: r, enabled: n = !0 } = t;
|
|
1027
1027
|
D(() => {
|
|
1028
|
-
const s =
|
|
1028
|
+
const s = Hr(r);
|
|
1029
1029
|
if (!n || !s) return;
|
|
1030
1030
|
const o = (a) => {
|
|
1031
|
-
if (!
|
|
1032
|
-
const l =
|
|
1031
|
+
if (!xr(a) || a.defaultPrevented || Mr(a.target)) return;
|
|
1032
|
+
const l = Xe(a);
|
|
1033
1033
|
if (!l) return;
|
|
1034
1034
|
const d = e.current;
|
|
1035
1035
|
d && (l === "undo" ? d.undo() : d.redo()) && a.preventDefault();
|
|
@@ -1040,84 +1040,84 @@ var Pr = "drqe3uh", Lr = "drqe3ui", Ge = {
|
|
|
1040
1040
|
r,
|
|
1041
1041
|
n
|
|
1042
1042
|
]);
|
|
1043
|
-
},
|
|
1043
|
+
}, Hr = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, xr = (e) => "key" in e, Mr = (e) => e instanceof HTMLInputElement ? !$r.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, es = () => {
|
|
1044
1044
|
const { targetBoundaryStore: e } = ae();
|
|
1045
1045
|
return se(e, (t) => t.boundary);
|
|
1046
1046
|
};
|
|
1047
1047
|
export {
|
|
1048
|
-
|
|
1049
|
-
|
|
1048
|
+
nn as CanvasTextMeasurer,
|
|
1049
|
+
yn as DefaultFooter,
|
|
1050
1050
|
cr as DefaultGeomCircle,
|
|
1051
1051
|
lr as DefaultGeomLine,
|
|
1052
1052
|
ur as DefaultGeomPath,
|
|
1053
1053
|
dr as DefaultGeomRect,
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1054
|
+
In as DefaultGrid,
|
|
1055
|
+
ln as DefaultHeader,
|
|
1056
|
+
mn as DefaultSwatch,
|
|
1057
|
+
Fr as DefaultTooltip,
|
|
1058
|
+
Qn as DevToolsPanel,
|
|
1059
1059
|
je as GRAPH_MODES,
|
|
1060
1060
|
Un as GeomCircle,
|
|
1061
1061
|
Wn as GeomLine,
|
|
1062
|
-
|
|
1062
|
+
Br as GeomOverpaint,
|
|
1063
1063
|
Xr as GeomPanelSizeProvider,
|
|
1064
|
-
|
|
1064
|
+
Vn as GeomPath,
|
|
1065
1065
|
zn as GeomRect,
|
|
1066
1066
|
kt as GraphErrorBoundary,
|
|
1067
1067
|
ve as GraphErrorPanel,
|
|
1068
1068
|
sr as GraphProvider,
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1069
|
+
gn as GraphRenderer,
|
|
1070
|
+
qn as GraphyBadge,
|
|
1071
|
+
_n as HoverProvider,
|
|
1072
|
+
on as IntlProvider,
|
|
1073
|
+
Tn as IntroFade,
|
|
1074
|
+
Yr as IntroWipeClip,
|
|
1075
|
+
Yn as SymbolFigure,
|
|
1076
|
+
pn as TextMeasurerProvider,
|
|
1077
|
+
Qr as ThemeProvider,
|
|
1078
1078
|
Xn as UnitBoxSvg,
|
|
1079
1079
|
jn as UnitSpaceSvg,
|
|
1080
|
-
|
|
1080
|
+
tn as buildDotsEditOutlineShapes,
|
|
1081
1081
|
Fn as createGraphyKit,
|
|
1082
1082
|
Ur as darkTheme,
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1083
|
+
fn as defineGeomRenderer,
|
|
1084
|
+
Dn as defineGlyph,
|
|
1085
|
+
Sn as getBuiltInEditOutlineShapes,
|
|
1086
|
+
an as lightTheme,
|
|
1087
|
+
zr as lightenCss,
|
|
1088
1088
|
$t as pruneSelection,
|
|
1089
1089
|
F as readPositionPixels,
|
|
1090
1090
|
Kn as readRectPixels,
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1091
|
+
Pn as resolveGraphyBadgeVariant,
|
|
1092
|
+
dn as resolvePathStroke,
|
|
1093
|
+
Or as scalePointToPanel,
|
|
1094
|
+
Vr as stampAxisEditTarget,
|
|
1095
|
+
sn as stampGridEditTarget,
|
|
1096
|
+
cn as stampLegendEditTarget,
|
|
1097
|
+
un as useElementScreenRect,
|
|
1098
|
+
Zr as useFormattingLocale,
|
|
1099
|
+
vn as useGeomHitTest,
|
|
1100
|
+
rn as useGeomHover,
|
|
1101
1101
|
Kr as useGeomPanelSize,
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1102
|
+
wn as useGeomReaderTree,
|
|
1103
|
+
Rn as useGeomStyleReader,
|
|
1104
|
+
Me as useGeomViewportSize,
|
|
1105
1105
|
Z as useGraphAnimation,
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1106
|
+
Cn as useGraphCommands,
|
|
1107
|
+
En as useGraphHandle,
|
|
1108
|
+
Jn as useGraphHistory,
|
|
1109
1109
|
Zn as useGraphHistoryShortcuts,
|
|
1110
|
-
|
|
1110
|
+
Nn as useGraphLocale,
|
|
1111
1111
|
kn as useGraphSelection,
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1112
|
+
en as useGuidesTakePress,
|
|
1113
|
+
Ln as useHandleScene,
|
|
1114
|
+
Gn as useHoverState,
|
|
1115
|
+
jr as usePaintDefs,
|
|
1116
|
+
Wr as useResolvedStyle,
|
|
1117
|
+
tt as useSceneSelector,
|
|
1118
|
+
bn as useStyleReaderTree,
|
|
1119
|
+
hn as useStyleResolver,
|
|
1120
1120
|
es as useTargetBoundary,
|
|
1121
|
-
|
|
1122
|
-
|
|
1121
|
+
$n as useTextMeasurer,
|
|
1122
|
+
Jr as vars
|
|
1123
1123
|
};
|
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.1795606078423",
|
|
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.1795606078423"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@tiptap/core": "^3.0.0",
|
|
@@ -150,10 +150,10 @@
|
|
|
150
150
|
"vite-plugin-dts": "^4.5.4",
|
|
151
151
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
152
152
|
"vitest": "^4.1.11",
|
|
153
|
-
"@graphytools/
|
|
154
|
-
"@graphytools/vitest-config": "1.0.0",
|
|
153
|
+
"@graphytools/typescript-config": "0.0.1",
|
|
155
154
|
"@graphytools/eslint-plugin-graphy": "1.0.0",
|
|
156
|
-
"@graphytools/
|
|
155
|
+
"@graphytools/vitest-config": "1.0.0",
|
|
156
|
+
"@graphytools/eslint-config": "0.0.1"
|
|
157
157
|
},
|
|
158
158
|
"publishConfig": {
|
|
159
159
|
"access": "public"
|