@graphysdk/react-renderer 1.9.0-beta.1795708068076 → 1.9.0-beta.1795773309240
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 +155 -1
- package/dist/editable.mjs +3385 -7201
- package/dist/history-chords-B2-10FJz.cjs +2 -0
- package/dist/{history-chords-Buxa3waC.js → history-chords-D0dxpjAS.js} +1778 -1804
- package/dist/history-chords.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.mjs +163 -163
- package/dist/rich-text-editor-module-Bwgb_RyF.js +891 -0
- package/dist/rich-text-editor-module-q1jI1hQi.cjs +1 -0
- package/dist/rich-text-editor-module.css +1 -1
- package/dist/start-arrow-button-B1mfKZVJ.cjs +1 -0
- package/dist/start-arrow-button-B3eETYt0.js +5506 -0
- package/dist/start-arrow-button.css +1 -1
- package/package.json +4 -4
- package/dist/history-chords-DDZ_6FBc.cjs +0 -2
- package/dist/rich-text-editor-module-BjO3665Z.js +0 -974
- package/dist/rich-text-editor-module-DiUIhnGd.cjs +0 -1
- package/dist/start-arrow-button-CGhJeFr2.js +0 -1569
- package/dist/start-arrow-button-DjGnXDVD.cjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as zr,
|
|
2
|
-
import { COMPILER_STAGE_KEYS as le, DEFAULT_LOCALE as ct, Geom as lt, GraphCompilationSession as dt, areEditTargetsEqual as ut, buildDiagnostic as ge, buildPointSymbolPath as mt, canonicalizeLocale as ht, createAnchorResolver as gt, createCompiler as pt, createDataLabelPlacementResolver as ft, createSpecBuilder as vt, createStyleResolver as De, findAnnotation as yt, findIntlLocale as St, findLayerById as pe, foldGeomCornerRadii as bt, getLegendGroupKey as
|
|
3
|
-
import { Component as Nt, useCallback as f, useEffect as q, useId as It, useImperativeHandle as
|
|
1
|
+
import { $n as ee, An as zr, Ar as $e, Bn as Vr, Cn as He, Cr as jr, Dn as Me, En as Yr, Er as xe, Ft as Xr, Gn as W, Gt as Jr, H as Qr, Ht as Zr, In as en, It as tn, J as rn, Jn as Ae, Jt as nn, Kn as Ie, Kt as sn, Mn as on, Mr as ce, N as an, Nt as cn, On as Oe, Or as se, Pt as ln, Q as dn, Qn as Be, Sn as te, Sr as un, Tr as Ke, U as mn, Un as hn, V as gn, Wn as pn, X as fn, Xn as Ce, Yn as re, Z as vn, Zn as Fe, _r as Ue, a as yn, an as Sn, ar as bn, bn as Gn, br as Pe, cr as We, dn as ze, dr as Ve, fn as je, gn as Ye, gr as Xe, hr as Je, i as Tn, in as En, jn as Rn, jr as Qe, kn as wn, kr as he, l as Nn, lr as Ze, mn as et, mr as Le, n as In, nr as z, on as Cn, or as Pn, pn as tt, pr as rt, qn as Ln, r as Dn, rr as _n, sn as qn, sr as nt, t as st, tn as kn, tr as $n, ur as Hn, vn as ot, vr as it, w as Mn, wn as xn, wr as An, xn as On, xr as Bn, yn as at, yr as oe } from "./history-chords-D0dxpjAS.js";
|
|
2
|
+
import { COMPILER_STAGE_KEYS as le, DEFAULT_LOCALE as ct, Geom as lt, GraphCompilationSession as dt, areEditTargetsEqual as ut, buildDiagnostic as ge, buildPointSymbolPath as mt, canonicalizeLocale as ht, createAnchorResolver as gt, createCompiler as pt, createDataLabelPlacementResolver as ft, createSpecBuilder as vt, createStyleResolver as De, findAnnotation as yt, findIntlLocale as St, findLayerById as pe, foldGeomCornerRadii as bt, getLegendGroupKey as Gt, isCompilerCachingEnabled as Tt, isGeometricSymbol as de, isImageSymbol as Et, resolveDefinition as Rt, resolveGeomCornerRadiusPx as fe, setCompilerCachingEnabled as wt, toPercent as Q } from "@graphysdk/viz-engine";
|
|
3
|
+
import { Component as Nt, useCallback as f, useEffect as q, useId as It, useImperativeHandle as Ct, useMemo as x, useRef as ve, useState as v, useSyncExternalStore as Pt } from "react";
|
|
4
4
|
import { Fragment as Lt, jsx as c, jsxs as y } from "react/jsx-runtime";
|
|
5
5
|
import { useStore as ie } from "zustand";
|
|
6
6
|
import { createStore as ue } from "zustand/vanilla";
|
|
@@ -75,16 +75,16 @@ var xt = class extends Nt {
|
|
|
75
75
|
if (e.position === "none") return t;
|
|
76
76
|
for (const r of e.drawn)
|
|
77
77
|
if (!(!r.hidesGroups || r.display !== "pill"))
|
|
78
|
-
for (const n of r.items) t.add(
|
|
78
|
+
for (const n of r.items) t.add(Gt(r, n));
|
|
79
79
|
return t;
|
|
80
80
|
}, Ot = (e, t) => {
|
|
81
81
|
const r = e.filter((n) => Bt(n, t));
|
|
82
82
|
return r.length === e.length ? e : r;
|
|
83
|
-
}, Bt = (e, t) => e.kind === "annotation" ? yt(t.annotations, e.id) !== null : e.kind === "observations" ? pe(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? pe(t.layers, e.layerId) !== void 0 : !0, be = [],
|
|
83
|
+
}, Bt = (e, t) => e.kind === "annotation" ? yt(t.annotations, e.id) !== null : e.kind === "observations" ? pe(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? pe(t.layers, e.layerId) !== void 0 : !0, be = [], Kt = () => ue((e) => ({
|
|
84
84
|
selection: be,
|
|
85
|
-
setSelection: (t) => e((r) =>
|
|
85
|
+
setSelection: (t) => e((r) => Ft(r.selection, t) ? r : { selection: t }),
|
|
86
86
|
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: be })
|
|
87
|
-
})),
|
|
87
|
+
})), Ft = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
|
|
88
88
|
const s = t[n];
|
|
89
89
|
return s !== void 0 && ut(r, s);
|
|
90
90
|
}), Ut = 5, Wt = (e) => {
|
|
@@ -150,8 +150,8 @@ var xt = class extends Nt {
|
|
|
150
150
|
const n = e.length >= r ? e.length - (r - 1) : 0;
|
|
151
151
|
return [...e.slice(n), t];
|
|
152
152
|
};
|
|
153
|
-
function
|
|
154
|
-
const t = e.filter(_e), r = /* @__PURE__ */ new Set([...Object.keys(
|
|
153
|
+
function Ge(e) {
|
|
154
|
+
const t = e.filter(_e), r = /* @__PURE__ */ new Set([...Object.keys(He), ...t.map((l) => l.geom)]), n = [], s = /* @__PURE__ */ new Set();
|
|
155
155
|
for (const l of e) {
|
|
156
156
|
const d = qe(l);
|
|
157
157
|
d === null || r.has(d.type) || s.has(d.type) || (s.add(d.type), n.push({
|
|
@@ -210,12 +210,12 @@ function Xt(e, t) {
|
|
|
210
210
|
}));
|
|
211
211
|
return a;
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function Jt(e, t) {
|
|
214
214
|
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), a = [];
|
|
215
215
|
for (const i of n) {
|
|
216
216
|
if (i.interactive === !1 || i.spatialKind !== "renderHitTest" || s.has(i.geom)) continue;
|
|
217
217
|
const l = t(i.geom, r.type);
|
|
218
|
-
l === null || l.hitTest ||
|
|
218
|
+
l === null || l.hitTest || te(l) || (s.add(i.geom), a.push({
|
|
219
219
|
kind: "userInput",
|
|
220
220
|
severity: "warning",
|
|
221
221
|
code: "MISSING_RENDER_HIT_TEST",
|
|
@@ -229,7 +229,7 @@ function Qt(e, t) {
|
|
|
229
229
|
}
|
|
230
230
|
return a;
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function Qt(e) {
|
|
233
233
|
const t = /* @__PURE__ */ new Set(), r = [];
|
|
234
234
|
for (const n of e.layers) {
|
|
235
235
|
const s = n.identityKey;
|
|
@@ -252,7 +252,7 @@ function Zt(e, t) {
|
|
|
252
252
|
for (const i of n) {
|
|
253
253
|
if (i.interactive === !1 || i.spatialKind !== "renderHitTest" || s.has(i.geom)) continue;
|
|
254
254
|
const l = t(i.geom, r.type);
|
|
255
|
-
l === null || !l.hitTest || !
|
|
255
|
+
l === null || !l.hitTest || !te(l) || (s.add(i.geom), a.push({
|
|
256
256
|
kind: "userInput",
|
|
257
257
|
severity: "warning",
|
|
258
258
|
code: "CONFLICTING_RENDER_HIT_TEST",
|
|
@@ -287,7 +287,7 @@ function tr(e, t) {
|
|
|
287
287
|
for (const i of n) {
|
|
288
288
|
if (i.interactive === !1 || i.spatialKind === "renderHitTest" || s.has(i.geom)) continue;
|
|
289
289
|
const l = t(i.geom, r.type);
|
|
290
|
-
l === null || !
|
|
290
|
+
l === null || !te(l) || (s.add(i.geom), a.push({
|
|
291
291
|
kind: "userInput",
|
|
292
292
|
severity: "warning",
|
|
293
293
|
code: "LIVE_RENDER_REQUIRES_RENDER_HIT_TEST",
|
|
@@ -303,7 +303,7 @@ function tr(e, t) {
|
|
|
303
303
|
}
|
|
304
304
|
function rr(e, t) {
|
|
305
305
|
let r;
|
|
306
|
-
return e.layers.flatMap((n, s) =>
|
|
306
|
+
return e.layers.flatMap((n, s) => te(t(n.geom, e.coordSystem.type)) ? nr(n) ? (r ??= De().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
|
|
307
307
|
kind: "userInput",
|
|
308
308
|
severity: "warning",
|
|
309
309
|
code: "INVALID_STYLE_RULE",
|
|
@@ -339,8 +339,8 @@ var or = (e) => ue((t) => ({
|
|
|
339
339
|
scene: e,
|
|
340
340
|
setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
|
|
341
341
|
})), ir = ({ spec: e, data: t, colorScheme: r, hiddenGroups: n, plugins: s, theme: a, resolveRenderer: i, anchorResolver: l, onSpecChange: d, onError: g, onWarnings: S }) => {
|
|
342
|
-
const
|
|
343
|
-
|
|
342
|
+
const G = oe(d), N = oe(g), P = oe(S), [h] = v(() => $e(ae, (o) => {
|
|
343
|
+
P.current?.(o);
|
|
344
344
|
})), [{ session: m, compileBus: p, findGeom: V }] = v(() => {
|
|
345
345
|
const o = pt({
|
|
346
346
|
plugins: s,
|
|
@@ -352,17 +352,17 @@ var or = (e) => ue((t) => ({
|
|
|
352
352
|
findGeom: (u) => o.findGeom(u)
|
|
353
353
|
};
|
|
354
354
|
}), [w] = v(() => {
|
|
355
|
-
const o =
|
|
355
|
+
const o = Ge(s ?? []), u = Ge(a?.plugins ?? []);
|
|
356
356
|
return {
|
|
357
357
|
errors: [...u.errors, ...o.errors],
|
|
358
358
|
warnings: [...u.warnings, ...o.warnings]
|
|
359
359
|
};
|
|
360
|
-
}), k = ve(null), [b] = v(ar),
|
|
360
|
+
}), k = ve(null), [b] = v(ar), T = ve(null), L = f((o) => w.errors.length === 0 ? o : [...w.errors, ...o ?? []], [w]), $ = f((o) => {
|
|
361
361
|
if (!o.ok) return o.errors;
|
|
362
|
-
if (
|
|
362
|
+
if (T.current) T.current.getState().setScene(o.scene);
|
|
363
363
|
else {
|
|
364
364
|
const u = or(o.scene);
|
|
365
|
-
u.subscribe(b.notify),
|
|
365
|
+
u.subscribe(b.notify), T.current = u, b.notify();
|
|
366
366
|
}
|
|
367
367
|
return null;
|
|
368
368
|
}, [b]), [E, A] = v(() => {
|
|
@@ -376,21 +376,21 @@ var or = (e) => ue((t) => ({
|
|
|
376
376
|
}), I = f((o) => o.ok ? [
|
|
377
377
|
...o.warnings,
|
|
378
378
|
...Xt(o.scene, i),
|
|
379
|
-
...
|
|
380
|
-
...
|
|
379
|
+
...Jt(o.scene, i),
|
|
380
|
+
...Qt(o.scene),
|
|
381
381
|
...Zt(o.scene, i),
|
|
382
382
|
...tr(o.scene, i),
|
|
383
383
|
...rr(o.scene, i),
|
|
384
384
|
...er(o.scene, l)
|
|
385
|
-
] : o.warnings, [i, l]),
|
|
385
|
+
] : o.warnings, [i, l]), C = f((o) => {
|
|
386
386
|
o.length !== 0 && (ae(o), N.current?.(o));
|
|
387
387
|
}, [N]);
|
|
388
388
|
q(() => {
|
|
389
389
|
const o = k.current;
|
|
390
|
-
o && (
|
|
390
|
+
o && (C([...w.errors, ...o.ok ? [] : o.errors]), h(se, [...w.warnings, ...I(o)]), o.ok && p.emit({ kind: "init" }));
|
|
391
391
|
}, [
|
|
392
392
|
p,
|
|
393
|
-
|
|
393
|
+
C,
|
|
394
394
|
h,
|
|
395
395
|
w,
|
|
396
396
|
I
|
|
@@ -402,9 +402,9 @@ var or = (e) => ue((t) => ({
|
|
|
402
402
|
hiddenGroups: n
|
|
403
403
|
});
|
|
404
404
|
if (!o) return;
|
|
405
|
-
o.committedSpec &&
|
|
405
|
+
o.committedSpec && G.current?.(o.committedSpec);
|
|
406
406
|
const u = $(o.result);
|
|
407
|
-
A(L(u)), u &&
|
|
407
|
+
A(L(u)), u && C(u), h(se, I(o.result)), u || p.emit({ kind: o.hasSpecChange ? "spec" : "data" });
|
|
408
408
|
}, [
|
|
409
409
|
e,
|
|
410
410
|
t,
|
|
@@ -413,28 +413,28 @@ var or = (e) => ue((t) => ({
|
|
|
413
413
|
m,
|
|
414
414
|
p,
|
|
415
415
|
$,
|
|
416
|
-
|
|
416
|
+
C,
|
|
417
417
|
h,
|
|
418
418
|
L,
|
|
419
419
|
I,
|
|
420
|
-
|
|
420
|
+
G
|
|
421
421
|
]);
|
|
422
422
|
const O = f((o) => {
|
|
423
|
-
A((u) => u === null ? u : L(null)), h(
|
|
423
|
+
A((u) => u === null ? u : L(null)), h(se, I(o));
|
|
424
424
|
}, [
|
|
425
425
|
L,
|
|
426
426
|
h,
|
|
427
427
|
I
|
|
428
428
|
]), D = f((o) => {
|
|
429
|
-
o.scene &&
|
|
429
|
+
o.scene && T.current?.getState().setScene(o.scene), o.result && O(o.result), o.command && p.emit({
|
|
430
430
|
kind: "command",
|
|
431
431
|
command: o.command
|
|
432
|
-
}), o.spec &&
|
|
432
|
+
}), o.spec && G.current?.(o.spec), o.errors && C([...o.errors]);
|
|
433
433
|
}, [
|
|
434
434
|
O,
|
|
435
435
|
p,
|
|
436
|
-
|
|
437
|
-
|
|
436
|
+
G,
|
|
437
|
+
C
|
|
438
438
|
]), R = f((o) => {
|
|
439
439
|
for (const u of o) D(u);
|
|
440
440
|
return o.some((u) => !!u.scene);
|
|
@@ -442,12 +442,12 @@ var or = (e) => ue((t) => ({
|
|
|
442
442
|
R(m.applyCommand(o, u));
|
|
443
443
|
}, [m, R]), Y = f(() => {
|
|
444
444
|
R(m.commit());
|
|
445
|
-
}, [m, R]), X = f(() => R(m.undo()), [m, R]), B = f(() => R(m.redo()), [m, R]),
|
|
445
|
+
}, [m, R]), X = f(() => R(m.undo()), [m, R]), B = f(() => R(m.redo()), [m, R]), K = f((o) => {
|
|
446
446
|
const u = m.preview(o).find((_) => _.scene)?.scene;
|
|
447
|
-
return u ? (
|
|
447
|
+
return u ? (T.current?.getState().setScene(u), !0) : !1;
|
|
448
448
|
}, [m]), H = f(() => {
|
|
449
449
|
const o = m.scene;
|
|
450
|
-
o &&
|
|
450
|
+
o && T.current?.getState().setScene(o);
|
|
451
451
|
}, [m]), M = x(() => ({
|
|
452
452
|
stack: m.history,
|
|
453
453
|
undo: X,
|
|
@@ -456,16 +456,16 @@ var or = (e) => ue((t) => ({
|
|
|
456
456
|
m,
|
|
457
457
|
X,
|
|
458
458
|
B
|
|
459
|
-
]),
|
|
459
|
+
]), J = f(() => T.current?.getState().scene ?? null, []);
|
|
460
460
|
return {
|
|
461
|
-
store:
|
|
461
|
+
store: T.current,
|
|
462
462
|
dispatch: j,
|
|
463
463
|
commit: Y,
|
|
464
|
-
paintPreview:
|
|
464
|
+
paintPreview: K,
|
|
465
465
|
clearPreview: H,
|
|
466
466
|
history: M,
|
|
467
467
|
subscribe: b.subscribe,
|
|
468
|
-
getScene:
|
|
468
|
+
getScene: J,
|
|
469
469
|
compileBus: p,
|
|
470
470
|
compileErrors: E,
|
|
471
471
|
findGeom: V,
|
|
@@ -479,31 +479,31 @@ var or = (e) => ue((t) => ({
|
|
|
479
479
|
}),
|
|
480
480
|
notify: () => e.forEach((t) => t())
|
|
481
481
|
};
|
|
482
|
-
}, cr = ["cartesian", "polar"], lr = ({ mode: e =
|
|
483
|
-
const r =
|
|
484
|
-
return /* @__PURE__ */ c(
|
|
482
|
+
}, cr = ["cartesian", "polar"], lr = ({ mode: e = Ye.readonly, ...t }) => {
|
|
483
|
+
const r = ot(e);
|
|
484
|
+
return /* @__PURE__ */ c(tt, {
|
|
485
485
|
mode: r,
|
|
486
486
|
children: /* @__PURE__ */ c(dr, {
|
|
487
487
|
...t,
|
|
488
488
|
mode: r
|
|
489
489
|
})
|
|
490
490
|
});
|
|
491
|
-
}, dr = ({ data: e, spec: t, plugins: r = [], theme: n, glyphs: s, formattingLocale: a, handleRef: i, onSpecChange: l, onError: d, onWarnings: g, colorScheme: S = "light", mode:
|
|
492
|
-
const [
|
|
491
|
+
}, dr = ({ data: e, spec: t, plugins: r = [], theme: n, glyphs: s, formattingLocale: a, handleRef: i, onSpecChange: l, onError: d, onWarnings: g, colorScheme: S = "light", mode: G, children: N }) => {
|
|
492
|
+
const [P] = v(() => n), [h] = v(() => Ve(n?.glyphs, s)), m = P?.colorScheme ?? S, [p] = v(() => at([...P?.plugins ?? [], ...r].filter(_e)));
|
|
493
493
|
mr(p, h);
|
|
494
|
-
const V = It(), [w] = v(() => gt(r)), [k] = v(() => ft(r)), [b] = v(() =>
|
|
494
|
+
const V = It(), [w] = v(() => gt(r)), [k] = v(() => ft(r)), [b] = v(() => Kt()), [T] = v(() => ze()), L = x(() => De({ colorScheme: m }), [m]), $ = et(), { store: E, dispatch: A, commit: I, paintPreview: C, clearPreview: O, history: D, subscribe: R, getScene: j, compileBus: Y, compileErrors: X, findGeom: B, reportWarningSource: K } = ir({
|
|
495
495
|
spec: t,
|
|
496
496
|
data: e,
|
|
497
497
|
colorScheme: m,
|
|
498
|
-
hiddenGroups:
|
|
498
|
+
hiddenGroups: je(),
|
|
499
499
|
plugins: r,
|
|
500
|
-
theme:
|
|
500
|
+
theme: P,
|
|
501
501
|
resolveRenderer: p,
|
|
502
502
|
anchorResolver: w,
|
|
503
503
|
onSpecChange: l,
|
|
504
504
|
onError: d,
|
|
505
505
|
onWarnings: g
|
|
506
|
-
}), H = hr(a,
|
|
506
|
+
}), H = hr(a, K);
|
|
507
507
|
q(() => {
|
|
508
508
|
if (E)
|
|
509
509
|
return E.subscribe((o, u) => {
|
|
@@ -524,15 +524,15 @@ var or = (e) => ue((t) => ({
|
|
|
524
524
|
const M = x(() => ({
|
|
525
525
|
dispatch: A,
|
|
526
526
|
commit: I,
|
|
527
|
-
paintPreview:
|
|
527
|
+
paintPreview: C,
|
|
528
528
|
clearPreview: O
|
|
529
529
|
}), [
|
|
530
530
|
A,
|
|
531
531
|
I,
|
|
532
|
-
|
|
532
|
+
C,
|
|
533
533
|
O
|
|
534
534
|
]);
|
|
535
|
-
|
|
535
|
+
Ct(i, () => ({
|
|
536
536
|
commands: M,
|
|
537
537
|
undo: D.undo,
|
|
538
538
|
redo: D.redo,
|
|
@@ -557,50 +557,50 @@ var or = (e) => ue((t) => ({
|
|
|
557
557
|
h,
|
|
558
558
|
p
|
|
559
559
|
]);
|
|
560
|
-
const
|
|
560
|
+
const J = x(() => E ? {
|
|
561
561
|
chartId: V,
|
|
562
562
|
store: E,
|
|
563
563
|
selectionStore: b,
|
|
564
|
-
targetBoundaryStore:
|
|
564
|
+
targetBoundaryStore: T,
|
|
565
565
|
commands: M,
|
|
566
566
|
history: D,
|
|
567
567
|
formattingLocale: H,
|
|
568
568
|
compileBus: Y,
|
|
569
569
|
colorScheme: m,
|
|
570
|
-
mode:
|
|
570
|
+
mode: G,
|
|
571
571
|
styleResolver: L,
|
|
572
572
|
anchorResolver: w,
|
|
573
573
|
findGeom: B,
|
|
574
|
-
reportLayoutWarnings:
|
|
574
|
+
reportLayoutWarnings: K
|
|
575
575
|
} : null, [
|
|
576
576
|
V,
|
|
577
577
|
E,
|
|
578
578
|
b,
|
|
579
|
-
|
|
579
|
+
T,
|
|
580
580
|
M,
|
|
581
581
|
D,
|
|
582
582
|
H,
|
|
583
583
|
Y,
|
|
584
584
|
m,
|
|
585
|
-
|
|
585
|
+
G,
|
|
586
586
|
L,
|
|
587
587
|
w,
|
|
588
588
|
B,
|
|
589
|
-
|
|
589
|
+
K
|
|
590
590
|
]);
|
|
591
591
|
return /* @__PURE__ */ c(xt, {
|
|
592
592
|
forcedErrors: X,
|
|
593
593
|
onError: d,
|
|
594
594
|
resetKeys: [t, e],
|
|
595
|
-
children:
|
|
596
|
-
value:
|
|
597
|
-
children: /* @__PURE__ */ c(
|
|
595
|
+
children: J ? /* @__PURE__ */ c(Qe.Provider, {
|
|
596
|
+
value: J,
|
|
597
|
+
children: /* @__PURE__ */ c(Me, {
|
|
598
598
|
value: p,
|
|
599
|
-
children: /* @__PURE__ */ c(
|
|
599
|
+
children: /* @__PURE__ */ c(xe, {
|
|
600
600
|
value: k,
|
|
601
601
|
children: /* @__PURE__ */ c(W, {
|
|
602
|
-
shapes:
|
|
603
|
-
children: /* @__PURE__ */ c(
|
|
602
|
+
shapes: P?.shapes,
|
|
603
|
+
children: /* @__PURE__ */ c(Ze, {
|
|
604
604
|
glyphs: h,
|
|
605
605
|
children: N
|
|
606
606
|
})
|
|
@@ -654,7 +654,7 @@ var U = (e, t) => {
|
|
|
654
654
|
};
|
|
655
655
|
}, gr = ({ animateTransitions: e, cx: t, cy: r, r: n, effects: s, ...a }) => {
|
|
656
656
|
const i = z(s);
|
|
657
|
-
return e ? /* @__PURE__ */ c(
|
|
657
|
+
return e ? /* @__PURE__ */ c(Je, {
|
|
658
658
|
animate: {
|
|
659
659
|
cx: t,
|
|
660
660
|
cy: r,
|
|
@@ -671,7 +671,7 @@ var U = (e, t) => {
|
|
|
671
671
|
});
|
|
672
672
|
}, pr = ({ animateTransitions: e, x1: t, y1: r, x2: n, y2: s, effects: a, ...i }) => {
|
|
673
673
|
const l = z(a);
|
|
674
|
-
return e ? /* @__PURE__ */ c(
|
|
674
|
+
return e ? /* @__PURE__ */ c(Xe, {
|
|
675
675
|
animate: {
|
|
676
676
|
x1: t,
|
|
677
677
|
y1: r,
|
|
@@ -706,7 +706,7 @@ var U = (e, t) => {
|
|
|
706
706
|
width: n,
|
|
707
707
|
height: s
|
|
708
708
|
};
|
|
709
|
-
return /* @__PURE__ */ c(
|
|
709
|
+
return /* @__PURE__ */ c(it, {
|
|
710
710
|
animate: a === void 0 || i === void 0 ? S : {
|
|
711
711
|
...S,
|
|
712
712
|
rx: a,
|
|
@@ -728,17 +728,17 @@ var U = (e, t) => {
|
|
|
728
728
|
...s
|
|
729
729
|
});
|
|
730
730
|
}, Xn = (e) => {
|
|
731
|
-
const { Circle: t } =
|
|
731
|
+
const { Circle: t } = re(), { animateTransitions: r } = ee(), { symbol: n, ...s } = e, a = {
|
|
732
732
|
...s,
|
|
733
733
|
animateTransitions: r
|
|
734
734
|
};
|
|
735
735
|
return n !== void 0 && n !== "circle" ? /* @__PURE__ */ c("g", {
|
|
736
736
|
style: z(e.effects),
|
|
737
737
|
"data-testid": e["data-testid"],
|
|
738
|
-
children: /* @__PURE__ */ c(
|
|
738
|
+
children: /* @__PURE__ */ c(nt, {
|
|
739
739
|
symbol: n,
|
|
740
|
-
cx:
|
|
741
|
-
cy:
|
|
740
|
+
cx: Te(e.cx),
|
|
741
|
+
cy: Te(e.cy),
|
|
742
742
|
size: e.r * 2,
|
|
743
743
|
fill: e.fill ?? "currentColor",
|
|
744
744
|
fillOpacity: e.fillOpacity,
|
|
@@ -753,27 +753,27 @@ var U = (e, t) => {
|
|
|
753
753
|
} : null
|
|
754
754
|
})
|
|
755
755
|
}) : t === void 0 ? gr(a) : /* @__PURE__ */ c(W, { children: /* @__PURE__ */ c(t, { ...a }) });
|
|
756
|
-
},
|
|
757
|
-
const { Line: t } =
|
|
756
|
+
}, Jn = (e) => {
|
|
757
|
+
const { Line: t } = re(), { animateTransitions: r } = ee(), n = {
|
|
758
758
|
...e,
|
|
759
759
|
animateTransitions: r
|
|
760
760
|
};
|
|
761
761
|
return t === void 0 ? pr(n) : /* @__PURE__ */ c(W, { children: /* @__PURE__ */ c(t, { ...n }) });
|
|
762
|
-
},
|
|
763
|
-
const { Rect: r } =
|
|
762
|
+
}, Qn = ({ cornerRadius: e, ...t }) => {
|
|
763
|
+
const { Rect: r } = re(), n = Ce()?.size ?? null, s = Ae(), { animateTransitions: a } = ee(), i = {
|
|
764
764
|
...t,
|
|
765
765
|
animateTransitions: a,
|
|
766
766
|
...Sr(e, t, n, s)
|
|
767
767
|
};
|
|
768
768
|
return r === void 0 ? fr(i) : /* @__PURE__ */ c(W, { children: /* @__PURE__ */ c(r, { ...i }) });
|
|
769
769
|
}, Zn = (e) => {
|
|
770
|
-
const { Path: t } =
|
|
770
|
+
const { Path: t } = re(), { animateTransitions: r } = ee(), n = {
|
|
771
771
|
...e,
|
|
772
772
|
animateTransitions: r
|
|
773
773
|
};
|
|
774
774
|
return t === void 0 ? vr(n) : /* @__PURE__ */ c(W, { children: /* @__PURE__ */ c(t, { ...n }) });
|
|
775
|
-
},
|
|
776
|
-
d:
|
|
775
|
+
}, Te = (e) => typeof e == "number" ? `${e}px` : e, yr = ({ d: e, source: t, ...r }) => /* @__PURE__ */ c(Ue, {
|
|
776
|
+
d: Be(e, Pe, t),
|
|
777
777
|
...r
|
|
778
778
|
}), Sr = (e, t, r, n) => {
|
|
779
779
|
if (e === void 0) return {};
|
|
@@ -805,7 +805,7 @@ var U = (e, t) => {
|
|
|
805
805
|
rx: e / t.x,
|
|
806
806
|
ry: e / t.y
|
|
807
807
|
}, es = ({ symbol: e, size: t, fill: r, fillOpacity: n, stroke: s, strokeOpacity: a, strokeWidth: i }) => {
|
|
808
|
-
const l =
|
|
808
|
+
const l = rt(), d = Oe(), g = Ke((N) => N.coordSystem.type), S = Gr(e, d("point", g)?.symbols ?? [], l), G = {
|
|
809
809
|
size: t,
|
|
810
810
|
fill: r,
|
|
811
811
|
fillOpacity: n,
|
|
@@ -821,13 +821,13 @@ var U = (e, t) => {
|
|
|
821
821
|
strokeOpacity: a,
|
|
822
822
|
strokeWidth: i,
|
|
823
823
|
strokeLinejoin: "round"
|
|
824
|
-
}) : /* @__PURE__ */ c(
|
|
824
|
+
}) : /* @__PURE__ */ c(We, {
|
|
825
825
|
symbol: S,
|
|
826
826
|
glyphs: l,
|
|
827
|
-
...
|
|
827
|
+
...G
|
|
828
828
|
});
|
|
829
|
-
},
|
|
830
|
-
const r =
|
|
829
|
+
}, Gr = (e, t, r) => Et(e) || t.includes(e) || !de(e) && r.has(e) ? e : t[0] ?? "circle", ts = ({ children: e, ...t }) => {
|
|
830
|
+
const r = Ce()?.size ?? null;
|
|
831
831
|
return /* @__PURE__ */ c("svg", {
|
|
832
832
|
viewBox: "0 0 1 1",
|
|
833
833
|
preserveAspectRatio: "none",
|
|
@@ -835,30 +835,30 @@ var U = (e, t) => {
|
|
|
835
835
|
height: "100%",
|
|
836
836
|
pointerEvents: "none",
|
|
837
837
|
...t,
|
|
838
|
-
children: /* @__PURE__ */ c(
|
|
838
|
+
children: /* @__PURE__ */ c(Ie, {
|
|
839
839
|
size: r,
|
|
840
840
|
space: "unit",
|
|
841
841
|
children: e
|
|
842
842
|
})
|
|
843
843
|
});
|
|
844
844
|
}, rs = ({ box: e, children: t }) => {
|
|
845
|
-
const r =
|
|
845
|
+
const r = Fe(), n = r === null ? null : r.width * (e.x1 - e.x0), s = r === null ? null : r.height * (e.y1 - e.y0), a = x(() => n === null || s === null ? null : {
|
|
846
846
|
width: n,
|
|
847
847
|
height: s
|
|
848
848
|
}, [n, s]);
|
|
849
849
|
return /* @__PURE__ */ c("svg", {
|
|
850
|
-
x:
|
|
851
|
-
y:
|
|
852
|
-
width:
|
|
853
|
-
height:
|
|
850
|
+
x: Q(e.x0),
|
|
851
|
+
y: Q(e.y0),
|
|
852
|
+
width: Q(e.x1 - e.x0),
|
|
853
|
+
height: Q(e.y1 - e.y0),
|
|
854
854
|
overflow: "hidden",
|
|
855
855
|
pointerEvents: "none",
|
|
856
|
-
children: /* @__PURE__ */ c(
|
|
856
|
+
children: /* @__PURE__ */ c(Ie, {
|
|
857
857
|
size: a,
|
|
858
858
|
children: t
|
|
859
859
|
})
|
|
860
860
|
});
|
|
861
|
-
},
|
|
861
|
+
}, Tr = "drqe3u0", Er = "drqe3u1", Rr = "drqe3u2", wr = "drqe3u3", F = "drqe3u4", Nr = "drqe3u5", Ir = "drqe3u6", Cr = "drqe3u7", Z = "drqe3u8", Pr = "drqe3u9", Lr = "drqe3ua";
|
|
862
862
|
var Dr = "drqe3uc", _r = "drqe3ud", qr = "drqe3ue", kr = "drqe3uf";
|
|
863
863
|
var $r = "drqe3uh", Hr = "drqe3ui", we = {
|
|
864
864
|
enabled: "drqe3uk drqe3uj",
|
|
@@ -871,12 +871,12 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
|
|
|
871
871
|
cached: "drqe3ur drqe3up",
|
|
872
872
|
untouched: "drqe3us drqe3up"
|
|
873
873
|
}, ns = ({ width: e = 440, style: t, className: r } = {}) => {
|
|
874
|
-
const { compileBus: n } = ce(), [s] = v(() => zt()), [a, i] = v(!1), [l, d] = v(
|
|
874
|
+
const { compileBus: n } = ce(), [s] = v(() => zt()), [a, i] = v(!1), [l, d] = v(Tt);
|
|
875
875
|
q(() => {
|
|
876
876
|
const { recordCompile: h } = s.getState(), m = n.getLastTrigger(), p = n.getLastCompile();
|
|
877
877
|
return m && p && h(m, p), n.subscribe(h);
|
|
878
878
|
}, [s, n]);
|
|
879
|
-
const g = ie(s, (h) => h.lastCompile), S = ie(s, (h) => h.history),
|
|
879
|
+
const g = ie(s, (h) => h.lastCompile), S = ie(s, (h) => h.history), G = n.getCacheStats(), N = g === null && S.length === 0, P = () => {
|
|
880
880
|
d((h) => {
|
|
881
881
|
const m = !h;
|
|
882
882
|
return wt(m), m;
|
|
@@ -890,7 +890,7 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
|
|
|
890
890
|
},
|
|
891
891
|
children: [
|
|
892
892
|
/* @__PURE__ */ y("div", {
|
|
893
|
-
className:
|
|
893
|
+
className: Tr,
|
|
894
894
|
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ c("div", {
|
|
895
895
|
className: Er,
|
|
896
896
|
children: "compile cache"
|
|
@@ -908,7 +908,7 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
|
|
|
908
908
|
className: "drqe3ub",
|
|
909
909
|
children: [/* @__PURE__ */ y("button", {
|
|
910
910
|
type: "button",
|
|
911
|
-
onClick:
|
|
911
|
+
onClick: P,
|
|
912
912
|
className: l ? we.enabled : we.disabled,
|
|
913
913
|
"aria-pressed": l,
|
|
914
914
|
children: ["cache ", l ? "enabled" : "disabled"]
|
|
@@ -920,7 +920,7 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
|
|
|
920
920
|
!a && !N && /* @__PURE__ */ y(Lt, { children: [/* @__PURE__ */ c(Mr, {
|
|
921
921
|
delta: g?.stages,
|
|
922
922
|
durations: g?.stageDurationsMs,
|
|
923
|
-
cumulative:
|
|
923
|
+
cumulative: G
|
|
924
924
|
}), /* @__PURE__ */ c(xr, { entries: S })] })
|
|
925
925
|
]
|
|
926
926
|
});
|
|
@@ -934,23 +934,23 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
|
|
|
934
934
|
children: "stage"
|
|
935
935
|
}),
|
|
936
936
|
/* @__PURE__ */ c("th", {
|
|
937
|
-
className:
|
|
937
|
+
className: F,
|
|
938
938
|
children: "time"
|
|
939
939
|
}),
|
|
940
940
|
/* @__PURE__ */ c("th", {
|
|
941
|
-
className:
|
|
941
|
+
className: F,
|
|
942
942
|
children: "Δ miss"
|
|
943
943
|
}),
|
|
944
944
|
/* @__PURE__ */ c("th", {
|
|
945
|
-
className:
|
|
945
|
+
className: F,
|
|
946
946
|
children: "Δ hit"
|
|
947
947
|
}),
|
|
948
948
|
/* @__PURE__ */ c("th", {
|
|
949
|
-
className:
|
|
949
|
+
className: F,
|
|
950
950
|
children: "total miss"
|
|
951
951
|
}),
|
|
952
952
|
/* @__PURE__ */ c("th", {
|
|
953
|
-
className:
|
|
953
|
+
className: F,
|
|
954
954
|
children: "total hit"
|
|
955
955
|
})
|
|
956
956
|
]
|
|
@@ -1008,12 +1008,12 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
|
|
|
1008
1008
|
"aria-hidden": !0
|
|
1009
1009
|
}),
|
|
1010
1010
|
/* @__PURE__ */ c("span", {
|
|
1011
|
-
className:
|
|
1011
|
+
className: Cr,
|
|
1012
1012
|
title: t.label,
|
|
1013
1013
|
children: t.label
|
|
1014
1014
|
}),
|
|
1015
1015
|
/* @__PURE__ */ y("span", {
|
|
1016
|
-
className:
|
|
1016
|
+
className: Pr,
|
|
1017
1017
|
children: [
|
|
1018
1018
|
r,
|
|
1019
1019
|
"/",
|
|
@@ -1030,7 +1030,7 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
|
|
|
1030
1030
|
for (const n of le) t(e[n]) && (r += 1);
|
|
1031
1031
|
return r;
|
|
1032
1032
|
}, me = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, ss = () => {
|
|
1033
|
-
const { history: e } = ce(), { stack: t, undo: r, redo: n } = e, s = f((l) => t.subscribe(l), [t]), a = f(() => t.getSnapshot(), [t]), i =
|
|
1033
|
+
const { history: e } = ce(), { stack: t, undo: r, redo: n } = e, s = f((l) => t.subscribe(l), [t]), a = f(() => t.getSnapshot(), [t]), i = Pt(s, a, a);
|
|
1034
1034
|
return x(() => ({
|
|
1035
1035
|
...i,
|
|
1036
1036
|
undo: r,
|
|
@@ -1054,11 +1054,11 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
|
|
|
1054
1054
|
]), os = (e, t = {}) => {
|
|
1055
1055
|
const { target: r, enabled: n = !0 } = t;
|
|
1056
1056
|
q(() => {
|
|
1057
|
-
const s =
|
|
1057
|
+
const s = Kr(r);
|
|
1058
1058
|
if (!n || !s) return;
|
|
1059
1059
|
const a = (i) => {
|
|
1060
|
-
if (!
|
|
1061
|
-
const l =
|
|
1060
|
+
if (!Fr(i) || i.defaultPrevented || Ur(i.target)) return;
|
|
1061
|
+
const l = st(i);
|
|
1062
1062
|
if (!l) return;
|
|
1063
1063
|
const d = e.current;
|
|
1064
1064
|
d && (l === "undo" ? d.undo() : d.redo()) && i.preventDefault();
|
|
@@ -1069,84 +1069,84 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
|
|
|
1069
1069
|
r,
|
|
1070
1070
|
n
|
|
1071
1071
|
]);
|
|
1072
|
-
},
|
|
1072
|
+
}, Kr = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, Fr = (e) => "key" in e, Ur = (e) => e instanceof HTMLInputElement ? !Br.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, is = () => {
|
|
1073
1073
|
const { targetBoundaryStore: e } = ce();
|
|
1074
1074
|
return ie(e, (t) => t.boundary);
|
|
1075
1075
|
};
|
|
1076
1076
|
export {
|
|
1077
|
-
|
|
1078
|
-
|
|
1077
|
+
Rn as CanvasTextMeasurer,
|
|
1078
|
+
fn as DefaultFooter,
|
|
1079
1079
|
gr as DefaultGeomCircle,
|
|
1080
1080
|
pr as DefaultGeomLine,
|
|
1081
1081
|
vr as DefaultGeomPath,
|
|
1082
1082
|
fr as DefaultGeomRect,
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1083
|
+
Nn as DefaultGrid,
|
|
1084
|
+
rn as DefaultHeader,
|
|
1085
|
+
Yr as DefaultSwatch,
|
|
1086
|
+
Xr as DefaultTooltip,
|
|
1087
1087
|
ns as DevToolsPanel,
|
|
1088
|
-
|
|
1088
|
+
Ye as GRAPH_MODES,
|
|
1089
1089
|
Xn as GeomCircle,
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1090
|
+
Jn as GeomLine,
|
|
1091
|
+
Sn as GeomOverpaint,
|
|
1092
|
+
pn as GeomPanelSizeProvider,
|
|
1093
1093
|
Zn as GeomPath,
|
|
1094
|
-
|
|
1094
|
+
Qn as GeomRect,
|
|
1095
1095
|
xt as GraphErrorBoundary,
|
|
1096
1096
|
ye as GraphErrorPanel,
|
|
1097
1097
|
lr as GraphProvider,
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1098
|
+
yn as GraphRenderer,
|
|
1099
|
+
vn as GraphyBadge,
|
|
1100
|
+
qn as HoverProvider,
|
|
1101
|
+
nn as IntlProvider,
|
|
1102
|
+
xn as IntroFade,
|
|
1103
|
+
hn as IntroWipeClip,
|
|
1104
1104
|
es as SymbolFigure,
|
|
1105
|
-
|
|
1106
|
-
|
|
1105
|
+
wn as TextMeasurerProvider,
|
|
1106
|
+
Zr as ThemeProvider,
|
|
1107
1107
|
rs as UnitBoxSvg,
|
|
1108
1108
|
ts as UnitSpaceSvg,
|
|
1109
|
-
|
|
1109
|
+
bn as buildDotsEditOutlineShapes,
|
|
1110
1110
|
jn as createGraphyKit,
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1111
|
+
Jr as darkTheme,
|
|
1112
|
+
Gn as defineGeomRenderer,
|
|
1113
|
+
Hn as defineGlyph,
|
|
1114
|
+
On as getBuiltInEditOutlineShapes,
|
|
1115
|
+
sn as lightTheme,
|
|
1116
|
+
en as lightenCss,
|
|
1117
1117
|
Ot as pruneSelection,
|
|
1118
1118
|
U as readPositionPixels,
|
|
1119
1119
|
Yn as readRectPixels,
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1120
|
+
dn as resolveGraphyBadgeVariant,
|
|
1121
|
+
_n as resolvePathStroke,
|
|
1122
|
+
Pn as scalePointToPanel,
|
|
1123
|
+
gn as stampAxisEditTarget,
|
|
1124
|
+
Qr as stampGridEditTarget,
|
|
1125
|
+
mn as stampLegendEditTarget,
|
|
1126
|
+
kn as useElementScreenRect,
|
|
1127
1127
|
cn as useFormattingLocale,
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1128
|
+
Cn as useGeomHitTest,
|
|
1129
|
+
En as useGeomHover,
|
|
1130
|
+
Ln as useGeomPanelSize,
|
|
1131
|
+
Bn as useGeomReaderTree,
|
|
1132
|
+
un as useGeomStyleReader,
|
|
1133
|
+
Fe as useGeomViewportSize,
|
|
1134
|
+
ee as useGraphAnimation,
|
|
1135
|
+
In as useGraphCommands,
|
|
1136
|
+
Tn as useGraphHandle,
|
|
1137
1137
|
ss as useGraphHistory,
|
|
1138
1138
|
os as useGraphHistoryShortcuts,
|
|
1139
|
-
|
|
1140
|
-
|
|
1139
|
+
ln as useGraphLocale,
|
|
1140
|
+
Mn as useGraphSelection,
|
|
1141
1141
|
an as useGuidesTakePress,
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1142
|
+
Dn as useHandleScene,
|
|
1143
|
+
tn as useHoverState,
|
|
1144
|
+
$n as usePaintDefs,
|
|
1145
1145
|
on as useResolvedStyle,
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1146
|
+
Ke as useSceneSelector,
|
|
1147
|
+
jr as useStyleReaderTree,
|
|
1148
|
+
An as useStyleResolver,
|
|
1149
1149
|
is as useTargetBoundary,
|
|
1150
|
-
|
|
1151
|
-
|
|
1150
|
+
zr as useTextMeasurer,
|
|
1151
|
+
Vr as vars
|
|
1152
1152
|
};
|