@graphysdk/react-renderer 1.9.0-beta.1789110926690 → 1.9.0-beta.1789367356750
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.d.ts +15 -7
- package/dist/editable.mjs +2550 -2395
- package/dist/graph-config.cjs +1 -1
- package/dist/graph-config.mjs +1 -1
- package/dist/history-chords-CDNk_XQi.cjs +2 -0
- package/dist/{history-chords-BLPhwLjz.js → history-chords-y2ex4E08.js} +2330 -2264
- package/dist/history-chords.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +14 -6
- package/dist/index.mjs +121 -120
- package/dist/theme.contract.css +1 -0
- package/dist/theme.contract.css-CEjZ4rbL.cjs +1 -0
- package/dist/{theme.contract.css-Rb-GELRv.js → theme.contract.css-pudzI2o1.js} +1 -1
- package/package.json +2 -2
- package/dist/history-chords-SWP7j5EG.cjs +0 -2
- package/dist/theme.contract.css-BHtVczcV.cjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
3
|
-
import { COMPILER_STAGE_KEYS as
|
|
4
|
-
import { Component as qe, useCallback as f, useEffect as x, useId as Ie, useImperativeHandle as
|
|
1
|
+
import { A as Dt, Bt as ne, Ct as le, Dt as $t, Et as xt, It as Ht, Lt as Mt, M as Pt, N as Lt, Ot as Bt, Pt as Ot, Rt as Kt, St as U, Tt as ue, Vt as A, X as At, Z as Ut, _ as jt, _t as Ft, a as Yt, at as Vt, bt as me, dt as Wt, ft as Xt, gt as zt, i as Qt, it as Zt, k as Jt, lt as er, n as tr, nt as rr, r as nr, s as sr, t as he, wt as or, xt as ir, yt as O, zt as ge } from "./history-chords-y2ex4E08.js";
|
|
2
|
+
import { n as cr } from "./theme.contract.css-pudzI2o1.js";
|
|
3
|
+
import { COMPILER_STAGE_KEYS as j, Geom as pe, GraphCompilationSession as fe, areEditTargetsEqual as ve, buildDiagnostic as W, createAnchorResolver as ye, createCompiler as be, createGraphyBuilder as Se, createStyleResolver as Ee, findAnnotation as Ce, findLayerById as X, isCompilerCachingEnabled as Te, resolveDefinition as Ne, setCompilerCachingEnabled as Re, toPercent as P } from "@graphysdk/viz-engine";
|
|
4
|
+
import { Component as qe, useCallback as f, useEffect as x, useId as Ie, useImperativeHandle as Ge, useMemo as $, useRef as z, useState as C, useSyncExternalStore as ke } from "react";
|
|
5
5
|
import { Fragment as we, jsx as d, jsxs as v } from "react/jsx-runtime";
|
|
6
|
-
import { useStore as
|
|
7
|
-
import { createStore as
|
|
6
|
+
import { useStore as Q } from "zustand";
|
|
7
|
+
import { createStore as F } from "zustand/vanilla";
|
|
8
8
|
import _e from "clsx";
|
|
9
9
|
import './index.css';var De = "_1a5iqpb0", $e = "_1a5iqpb1";
|
|
10
10
|
var xe = "_1a5iqpb3", He = "_1a5iqpb4", Me = "_1a5iqpb5";
|
|
11
|
-
var
|
|
11
|
+
var Z = ({ errors: e }) => {
|
|
12
12
|
const [t, ...r] = e;
|
|
13
13
|
return /* @__PURE__ */ v("div", {
|
|
14
14
|
role: "alert",
|
|
@@ -18,14 +18,14 @@ var J = ({ errors: e }) => {
|
|
|
18
18
|
className: $e,
|
|
19
19
|
children: "This chart could not be rendered."
|
|
20
20
|
}),
|
|
21
|
-
t && /* @__PURE__ */ d(
|
|
21
|
+
t && /* @__PURE__ */ d(J, { diagnostic: t }),
|
|
22
22
|
r.length > 0 && /* @__PURE__ */ d("ul", {
|
|
23
23
|
className: "_1a5iqpb2",
|
|
24
|
-
children: r.map((n, o) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ d(
|
|
24
|
+
children: r.map((n, o) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ d(J, { diagnostic: n }) }, `${n.code}-${o}`))
|
|
25
25
|
})
|
|
26
26
|
]
|
|
27
27
|
});
|
|
28
|
-
},
|
|
28
|
+
}, J = ({ diagnostic: e }) => /* @__PURE__ */ v("div", {
|
|
29
29
|
className: xe,
|
|
30
30
|
children: [
|
|
31
31
|
/* @__PURE__ */ d("span", {
|
|
@@ -42,47 +42,47 @@ var J = ({ errors: e }) => {
|
|
|
42
42
|
})
|
|
43
43
|
]
|
|
44
44
|
});
|
|
45
|
-
function
|
|
45
|
+
function Pe(e = [], t = []) {
|
|
46
46
|
return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
|
|
47
47
|
}
|
|
48
|
-
var
|
|
48
|
+
var Le = class extends qe {
|
|
49
49
|
constructor(...e) {
|
|
50
50
|
super(...e), this.state = { caughtDiagnostic: null };
|
|
51
51
|
}
|
|
52
52
|
static getDerivedStateFromError(e) {
|
|
53
|
-
return { caughtDiagnostic:
|
|
53
|
+
return { caughtDiagnostic: W(e) };
|
|
54
54
|
}
|
|
55
55
|
componentDidCatch(e, t) {
|
|
56
|
-
const r =
|
|
56
|
+
const r = W(e);
|
|
57
57
|
A([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 && !Pe(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
|
|
61
61
|
}
|
|
62
62
|
render() {
|
|
63
63
|
const { caughtDiagnostic: e } = this.state;
|
|
64
|
-
if (e) return /* @__PURE__ */ d(
|
|
64
|
+
if (e) return /* @__PURE__ */ d(Z, { errors: [e] });
|
|
65
65
|
const { forcedErrors: t, children: r } = this.props;
|
|
66
|
-
return t && t.length > 0 ? /* @__PURE__ */ d(
|
|
66
|
+
return t && t.length > 0 ? /* @__PURE__ */ d(Z, { errors: t }) : r;
|
|
67
67
|
}
|
|
68
68
|
}, se = (e) => typeof e == "object" && "geom" in e && "render" in e, Be = (e) => {
|
|
69
69
|
const t = Ne(e);
|
|
70
70
|
return t instanceof pe ? t : null;
|
|
71
|
-
},
|
|
72
|
-
const r = e.filter((n) =>
|
|
71
|
+
}, Oe = (e, t) => {
|
|
72
|
+
const r = e.filter((n) => Ke(n, t));
|
|
73
73
|
return r.length === e.length ? e : r;
|
|
74
|
-
},
|
|
74
|
+
}, Ke = (e, t) => e.kind === "annotation" ? Ce(t.annotations, e.id) !== null : e.kind === "observations" ? X(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? X(t.layers, e.layerId) !== void 0 : !0, ee = [], Ae = () => F((e) => ({
|
|
75
75
|
selection: ee,
|
|
76
|
-
setSelection: (t) => e((r) =>
|
|
76
|
+
setSelection: (t) => e((r) => Ue(r.selection, t) ? r : { selection: t }),
|
|
77
77
|
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: ee })
|
|
78
|
-
})),
|
|
78
|
+
})), Ue = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
|
|
79
79
|
const o = t[n];
|
|
80
80
|
return o !== void 0 && ve(r, o);
|
|
81
|
-
}),
|
|
82
|
-
if (!
|
|
81
|
+
}), je = process.env.NODE_ENV !== "production", Fe = 5, Ye = (e) => {
|
|
82
|
+
if (!je) return {
|
|
83
83
|
emit: () => {
|
|
84
84
|
},
|
|
85
|
-
subscribe: () =>
|
|
85
|
+
subscribe: () => We,
|
|
86
86
|
getLastTrigger: () => null,
|
|
87
87
|
getLastCompile: () => null,
|
|
88
88
|
getCacheStats: () => e.getCacheStats()
|
|
@@ -104,7 +104,7 @@ var Pe = class extends qe {
|
|
|
104
104
|
getLastCompile: () => e.getLastCompile(),
|
|
105
105
|
getCacheStats: () => e.getCacheStats()
|
|
106
106
|
};
|
|
107
|
-
},
|
|
107
|
+
}, Ve = () => F((e) => ({
|
|
108
108
|
lastCompile: null,
|
|
109
109
|
history: [],
|
|
110
110
|
nextId: 1,
|
|
@@ -119,12 +119,12 @@ var Pe = class extends qe {
|
|
|
119
119
|
};
|
|
120
120
|
return {
|
|
121
121
|
lastCompile: o,
|
|
122
|
-
history:
|
|
122
|
+
history: ze(n.history, o, Fe),
|
|
123
123
|
nextId: n.nextId + 1,
|
|
124
124
|
lastSnapshot: r
|
|
125
125
|
};
|
|
126
126
|
})
|
|
127
|
-
})),
|
|
127
|
+
})), We = () => {
|
|
128
128
|
}, Xe = (e) => {
|
|
129
129
|
switch (e.kind) {
|
|
130
130
|
case "init":
|
|
@@ -136,12 +136,12 @@ var Pe = class extends qe {
|
|
|
136
136
|
case "command":
|
|
137
137
|
return e.command.metadata.description;
|
|
138
138
|
}
|
|
139
|
-
},
|
|
139
|
+
}, ze = (e, t, r) => {
|
|
140
140
|
const n = e.length >= r ? e.length - (r - 1) : 0;
|
|
141
141
|
return [...e.slice(n), t];
|
|
142
142
|
};
|
|
143
|
-
function
|
|
144
|
-
const t = e.filter(se), r = /* @__PURE__ */ new Set([...Object.keys(
|
|
143
|
+
function Qe(e) {
|
|
144
|
+
const t = e.filter(se), r = /* @__PURE__ */ new Set([...Object.keys(le), ...t.map((c) => c.geom)]), n = [], o = /* @__PURE__ */ new Set();
|
|
145
145
|
for (const c of e) {
|
|
146
146
|
const u = Be(c);
|
|
147
147
|
u === null || r.has(u.type) || o.has(u.type) || (o.add(u.type), n.push({
|
|
@@ -184,7 +184,7 @@ function ze(e) {
|
|
|
184
184
|
warnings: i
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function Ze(e, t) {
|
|
188
188
|
const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), a = [];
|
|
189
189
|
for (const i of n)
|
|
190
190
|
t(i.geom, r.type) !== null || o.has(i.geom) || (o.add(i.geom), a.push({
|
|
@@ -200,12 +200,12 @@ function Je(e, t) {
|
|
|
200
200
|
}));
|
|
201
201
|
return a;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function Je(e, t) {
|
|
204
204
|
const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), a = [];
|
|
205
205
|
for (const i of n) {
|
|
206
206
|
if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || o.has(i.geom)) continue;
|
|
207
207
|
const c = t(i.geom, r.type);
|
|
208
|
-
c === null || c.hitTest ||
|
|
208
|
+
c === null || c.hitTest || U(c) || (o.add(i.geom), a.push({
|
|
209
209
|
kind: "user-input",
|
|
210
210
|
severity: "warning",
|
|
211
211
|
code: "MISSING_RENDER_HIT_TEST",
|
|
@@ -242,7 +242,7 @@ function tt(e, t) {
|
|
|
242
242
|
for (const i of n) {
|
|
243
243
|
if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || o.has(i.geom)) continue;
|
|
244
244
|
const c = t(i.geom, r.type);
|
|
245
|
-
c === null || !c.hitTest || !
|
|
245
|
+
c === null || !c.hitTest || !U(c) || (o.add(i.geom), a.push({
|
|
246
246
|
kind: "user-input",
|
|
247
247
|
severity: "warning",
|
|
248
248
|
code: "CONFLICTING_RENDER_HIT_TEST",
|
|
@@ -277,7 +277,7 @@ function nt(e, t) {
|
|
|
277
277
|
for (const i of n) {
|
|
278
278
|
if (i.interactive === !1 || i.spatialKind === "render-hit-test" || o.has(i.geom)) continue;
|
|
279
279
|
const c = t(i.geom, r.type);
|
|
280
|
-
c === null || !
|
|
280
|
+
c === null || !U(c) || (o.add(i.geom), a.push({
|
|
281
281
|
kind: "user-input",
|
|
282
282
|
severity: "warning",
|
|
283
283
|
code: "OVERLAY_REQUIRES_RENDER_HIT_TEST",
|
|
@@ -291,25 +291,25 @@ function nt(e, t) {
|
|
|
291
291
|
}
|
|
292
292
|
return a;
|
|
293
293
|
}
|
|
294
|
-
var st = (e) =>
|
|
294
|
+
var st = (e) => F((t) => ({
|
|
295
295
|
compiled: e,
|
|
296
296
|
setCompiled: (r) => t((n) => n.compiled === r ? n : { compiled: r })
|
|
297
297
|
})), ot = ({ input: e, data: t, customPalettes: r, colorScheme: n, plugins: o, resolveRenderer: a, anchorResolver: i, onChange: c, onError: u, onWarnings: m }) => {
|
|
298
|
-
const T =
|
|
298
|
+
const T = O(c), G = O(u), q = O(m), [{ session: h, compileBus: l }] = C(() => {
|
|
299
299
|
const s = be({ plugins: o });
|
|
300
300
|
return {
|
|
301
301
|
session: new fe(s),
|
|
302
302
|
compileBus: Ye(s)
|
|
303
303
|
};
|
|
304
|
-
}), [p] = C(() =>
|
|
304
|
+
}), [p] = C(() => Qe(o ?? [])), y = z(null), [k] = C(it), N = z(null), b = f((s) => p.errors.length === 0 ? s : [...p.errors, ...s ?? []], [p]), _ = f((s) => {
|
|
305
305
|
if (!s.ok) return s.errors;
|
|
306
306
|
if (N.current) N.current.getState().setCompiled(s.compiled);
|
|
307
307
|
else {
|
|
308
308
|
const g = st(s.compiled);
|
|
309
|
-
g.subscribe(
|
|
309
|
+
g.subscribe(k.notify), N.current = g, k.notify();
|
|
310
310
|
}
|
|
311
311
|
return null;
|
|
312
|
-
}, [
|
|
312
|
+
}, [k]), [H, D] = C(() => {
|
|
313
313
|
const s = h.compile({
|
|
314
314
|
input: e,
|
|
315
315
|
data: t,
|
|
@@ -319,15 +319,15 @@ var st = (e) => U((t) => ({
|
|
|
319
319
|
return y.current = s, b(_(s));
|
|
320
320
|
}), I = f((s) => s.ok ? [
|
|
321
321
|
...s.warnings,
|
|
322
|
-
...Je(s.compiled, a),
|
|
323
322
|
...Ze(s.compiled, a),
|
|
323
|
+
...Je(s.compiled, a),
|
|
324
324
|
...et(s.compiled),
|
|
325
325
|
...tt(s.compiled, a),
|
|
326
326
|
...nt(s.compiled, a),
|
|
327
327
|
...rt(s.compiled, i)
|
|
328
328
|
] : s.warnings, [a, i]), S = f((s) => {
|
|
329
|
-
s.length !== 0 && (A(s),
|
|
330
|
-
}, [
|
|
329
|
+
s.length !== 0 && (A(s), G.current?.(s));
|
|
330
|
+
}, [G]), R = f((s) => {
|
|
331
331
|
s.length !== 0 && (A(s), q.current?.(s));
|
|
332
332
|
}, [q]);
|
|
333
333
|
x(() => {
|
|
@@ -387,21 +387,21 @@ var st = (e) => U((t) => ({
|
|
|
387
387
|
E(h.applyCommand(s, g));
|
|
388
388
|
}, [h, E]), ae = f(() => {
|
|
389
389
|
E(h.seal());
|
|
390
|
-
}, [h, E]), Y = f(() => E(h.undo()), [h, E]),
|
|
390
|
+
}, [h, E]), Y = f(() => E(h.undo()), [h, E]), V = f(() => E(h.redo()), [h, E]), ce = $(() => ({
|
|
391
391
|
stack: h.history,
|
|
392
392
|
undo: Y,
|
|
393
|
-
redo:
|
|
393
|
+
redo: V
|
|
394
394
|
}), [
|
|
395
395
|
h,
|
|
396
396
|
Y,
|
|
397
|
-
|
|
397
|
+
V
|
|
398
398
|
]), de = f(() => N.current?.getState().compiled ?? null, []);
|
|
399
399
|
return {
|
|
400
400
|
store: N.current,
|
|
401
401
|
dispatch: B,
|
|
402
402
|
seal: ae,
|
|
403
403
|
history: ce,
|
|
404
|
-
subscribe:
|
|
404
|
+
subscribe: k.subscribe,
|
|
405
405
|
getCompiled: de,
|
|
406
406
|
compileBus: l,
|
|
407
407
|
compileErrors: H
|
|
@@ -415,13 +415,13 @@ var st = (e) => U((t) => ({
|
|
|
415
415
|
notify: () => e.forEach((t) => t())
|
|
416
416
|
};
|
|
417
417
|
}, at = ({ data: e, input: t, plugins: r = [], formattingLocale: n, handleRef: o, onChange: a, onError: i, onWarnings: c, customPalettes: u, colorScheme: m = "light", children: T }) => {
|
|
418
|
-
const [
|
|
418
|
+
const [G] = C(() => me(r.filter(se))), q = Ie(), [h] = C(() => ye(r)), [l] = C(() => Ae()), p = $(() => Ee({ colorScheme: m }), [m]), { store: y, dispatch: k, seal: N, history: b, subscribe: _, getCompiled: H, compileBus: D, compileErrors: I } = ot({
|
|
419
419
|
input: t,
|
|
420
420
|
data: e,
|
|
421
421
|
customPalettes: u,
|
|
422
422
|
colorScheme: m,
|
|
423
423
|
plugins: r,
|
|
424
|
-
resolveRenderer:
|
|
424
|
+
resolveRenderer: G,
|
|
425
425
|
anchorResolver: h,
|
|
426
426
|
onChange: a,
|
|
427
427
|
onError: i,
|
|
@@ -432,14 +432,14 @@ var st = (e) => U((t) => ({
|
|
|
432
432
|
return y.subscribe((w, M) => {
|
|
433
433
|
if (w.compiled.spec === M.compiled.spec) return;
|
|
434
434
|
const { selection: E, setSelection: B } = l.getState();
|
|
435
|
-
E.length !== 0 && B(
|
|
435
|
+
E.length !== 0 && B(Oe(E, w.compiled.spec));
|
|
436
436
|
});
|
|
437
437
|
}, [y, l]);
|
|
438
438
|
const S = $(() => ({
|
|
439
|
-
dispatch:
|
|
439
|
+
dispatch: k,
|
|
440
440
|
seal: N
|
|
441
|
-
}), [
|
|
442
|
-
|
|
441
|
+
}), [k, N]);
|
|
442
|
+
Ge(o, () => ({
|
|
443
443
|
commands: S,
|
|
444
444
|
undo: b.undo,
|
|
445
445
|
redo: b.redo,
|
|
@@ -478,20 +478,20 @@ var st = (e) => U((t) => ({
|
|
|
478
478
|
p,
|
|
479
479
|
h
|
|
480
480
|
]);
|
|
481
|
-
return /* @__PURE__ */ d(
|
|
481
|
+
return /* @__PURE__ */ d(Le, {
|
|
482
482
|
forcedErrors: I,
|
|
483
483
|
onError: i,
|
|
484
484
|
resetKeys: [t, e],
|
|
485
|
-
children: R ? /* @__PURE__ */ d(
|
|
485
|
+
children: R ? /* @__PURE__ */ d(ge.Provider, {
|
|
486
486
|
value: R,
|
|
487
487
|
children: /* @__PURE__ */ d(ue, {
|
|
488
|
-
value:
|
|
488
|
+
value: G,
|
|
489
489
|
children: T
|
|
490
490
|
})
|
|
491
491
|
}) : null
|
|
492
492
|
});
|
|
493
493
|
};
|
|
494
|
-
function
|
|
494
|
+
function pr(e) {
|
|
495
495
|
const t = Se(e);
|
|
496
496
|
return {
|
|
497
497
|
...t,
|
|
@@ -501,7 +501,7 @@ function gr(e) {
|
|
|
501
501
|
})
|
|
502
502
|
};
|
|
503
503
|
}
|
|
504
|
-
var
|
|
504
|
+
var fr = ({ children: e, ...t }) => /* @__PURE__ */ d("svg", {
|
|
505
505
|
viewBox: "0 0 1 1",
|
|
506
506
|
preserveAspectRatio: "none",
|
|
507
507
|
width: "100%",
|
|
@@ -509,15 +509,15 @@ var pr = ({ children: e, ...t }) => /* @__PURE__ */ d("svg", {
|
|
|
509
509
|
pointerEvents: "none",
|
|
510
510
|
...t,
|
|
511
511
|
children: e
|
|
512
|
-
}),
|
|
513
|
-
x:
|
|
514
|
-
y:
|
|
515
|
-
width:
|
|
516
|
-
height:
|
|
512
|
+
}), vr = ({ box: e, children: t }) => /* @__PURE__ */ d("svg", {
|
|
513
|
+
x: P(e.x0),
|
|
514
|
+
y: P(e.y0),
|
|
515
|
+
width: P(e.x1 - e.x0),
|
|
516
|
+
height: P(e.y1 - e.y0),
|
|
517
517
|
overflow: "hidden",
|
|
518
518
|
pointerEvents: "none",
|
|
519
519
|
children: t
|
|
520
|
-
}), ct = "drqe3u0", dt = "drqe3u1", lt = "drqe3u2", ut = "drqe3u3",
|
|
520
|
+
}), ct = "drqe3u0", dt = "drqe3u1", lt = "drqe3u2", ut = "drqe3u3", L = "drqe3u4", mt = "drqe3u5", ht = "drqe3u6", gt = "drqe3u7", K = "drqe3u8", pt = "drqe3u9", ft = "drqe3ua";
|
|
521
521
|
var vt = "drqe3uc", yt = "drqe3ud", bt = "drqe3ue", St = "drqe3uf";
|
|
522
522
|
var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
523
523
|
enabled: "drqe3uk drqe3uj",
|
|
@@ -529,13 +529,13 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
529
529
|
ran: "drqe3uq drqe3up",
|
|
530
530
|
cached: "drqe3ur drqe3up",
|
|
531
531
|
untouched: "drqe3us drqe3up"
|
|
532
|
-
},
|
|
533
|
-
const { compileBus: n } = ne(), [o] = C(() =>
|
|
532
|
+
}, yr = ({ width: e = 380, style: t, className: r } = {}) => {
|
|
533
|
+
const { compileBus: n } = ne(), [o] = C(() => Ve()), [a, i] = C(!1), [c, u] = C(Te);
|
|
534
534
|
x(() => {
|
|
535
535
|
const { recordCompile: l } = o.getState(), p = n.getLastTrigger(), y = n.getLastCompile();
|
|
536
536
|
return p && y && l(p, y), n.subscribe(l);
|
|
537
537
|
}, [o, n]);
|
|
538
|
-
const m =
|
|
538
|
+
const m = Q(o, (l) => l.lastCompile), T = Q(o, (l) => l.history), G = n.getCacheStats(), q = m === null && T.length === 0, h = () => {
|
|
539
539
|
u((l) => {
|
|
540
540
|
const p = !l;
|
|
541
541
|
return Re(p), p;
|
|
@@ -578,7 +578,7 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
578
578
|
}),
|
|
579
579
|
!a && !q && /* @__PURE__ */ v(we, { children: [/* @__PURE__ */ d(Tt, {
|
|
580
580
|
delta: m?.stages,
|
|
581
|
-
cumulative:
|
|
581
|
+
cumulative: G
|
|
582
582
|
}), /* @__PURE__ */ d(Nt, { entries: T })] })
|
|
583
583
|
]
|
|
584
584
|
});
|
|
@@ -592,23 +592,23 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
592
592
|
children: "stage"
|
|
593
593
|
}),
|
|
594
594
|
/* @__PURE__ */ d("th", {
|
|
595
|
-
className:
|
|
595
|
+
className: L,
|
|
596
596
|
children: "Δ miss"
|
|
597
597
|
}),
|
|
598
598
|
/* @__PURE__ */ d("th", {
|
|
599
|
-
className:
|
|
599
|
+
className: L,
|
|
600
600
|
children: "Δ hit"
|
|
601
601
|
}),
|
|
602
602
|
/* @__PURE__ */ d("th", {
|
|
603
|
-
className:
|
|
603
|
+
className: L,
|
|
604
604
|
children: "total miss"
|
|
605
605
|
}),
|
|
606
606
|
/* @__PURE__ */ d("th", {
|
|
607
|
-
className:
|
|
607
|
+
className: L,
|
|
608
608
|
children: "total hit"
|
|
609
609
|
})
|
|
610
610
|
]
|
|
611
|
-
}) }), /* @__PURE__ */ d("tbody", { children:
|
|
611
|
+
}) }), /* @__PURE__ */ d("tbody", { children: j.map((r) => {
|
|
612
612
|
const n = e?.[r], o = Rt(n);
|
|
613
613
|
return /* @__PURE__ */ v("tr", {
|
|
614
614
|
className: vt,
|
|
@@ -629,15 +629,15 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
629
629
|
children: n?.misses ?? 0
|
|
630
630
|
}),
|
|
631
631
|
/* @__PURE__ */ d("td", {
|
|
632
|
-
className:
|
|
632
|
+
className: K,
|
|
633
633
|
children: n?.hits ?? 0
|
|
634
634
|
}),
|
|
635
635
|
/* @__PURE__ */ d("td", {
|
|
636
|
-
className:
|
|
636
|
+
className: K,
|
|
637
637
|
children: t[r].misses
|
|
638
638
|
}),
|
|
639
639
|
/* @__PURE__ */ d("td", {
|
|
640
|
-
className:
|
|
640
|
+
className: K,
|
|
641
641
|
children: t[r].hits
|
|
642
642
|
})
|
|
643
643
|
]
|
|
@@ -649,7 +649,7 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
649
649
|
className: Ct,
|
|
650
650
|
children: "recent compiles"
|
|
651
651
|
}), e.map((t) => {
|
|
652
|
-
const r = qt(t.stages, (a) => a.misses > 0), n =
|
|
652
|
+
const r = qt(t.stages, (a) => a.misses > 0), n = j.length;
|
|
653
653
|
return /* @__PURE__ */ v("div", {
|
|
654
654
|
className: ht,
|
|
655
655
|
children: [
|
|
@@ -677,10 +677,10 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
677
677
|
})]
|
|
678
678
|
}), Rt = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", qt = (e, t) => {
|
|
679
679
|
let r = 0;
|
|
680
|
-
for (const n of
|
|
680
|
+
for (const n of j) t(e[n]) && (r += 1);
|
|
681
681
|
return r;
|
|
682
|
-
}, ie = (e) => e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`,
|
|
683
|
-
const { history: e } = ne(), { stack: t, undo: r, redo: n } = e, o = f((c) => t.subscribe(c), [t]), a = f(() => t.getSnapshot(), [t]), i =
|
|
682
|
+
}, ie = (e) => e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, br = () => {
|
|
683
|
+
const { history: e } = ne(), { stack: t, undo: r, redo: n } = e, o = f((c) => t.subscribe(c), [t]), a = f(() => t.getSnapshot(), [t]), i = ke(o, a, a);
|
|
684
684
|
return $(() => ({
|
|
685
685
|
...i,
|
|
686
686
|
undo: r,
|
|
@@ -701,14 +701,14 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
701
701
|
"range",
|
|
702
702
|
"reset",
|
|
703
703
|
"submit"
|
|
704
|
-
]),
|
|
704
|
+
]), Sr = (e, t = {}) => {
|
|
705
705
|
const { target: r, enabled: n = !0 } = t;
|
|
706
706
|
x(() => {
|
|
707
|
-
const o =
|
|
707
|
+
const o = Gt(r);
|
|
708
708
|
if (!n || !o) return;
|
|
709
709
|
const a = (i) => {
|
|
710
|
-
if (!
|
|
711
|
-
const c =
|
|
710
|
+
if (!kt(i) || i.defaultPrevented || wt(i.target)) return;
|
|
711
|
+
const c = he(i);
|
|
712
712
|
if (!c) return;
|
|
713
713
|
const u = e.current;
|
|
714
714
|
u && (c === "undo" ? u.undo() : u.redo()) && i.preventDefault();
|
|
@@ -719,45 +719,46 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
|
|
|
719
719
|
r,
|
|
720
720
|
n
|
|
721
721
|
]);
|
|
722
|
-
},
|
|
722
|
+
}, Gt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, kt = (e) => "key" in e, wt = (e) => e instanceof HTMLInputElement ? !It.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1;
|
|
723
723
|
export {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
724
|
+
Pt as BrandMark,
|
|
725
|
+
Bt as CanvasTextMeasurer,
|
|
726
|
+
Dt as DefaultFooter,
|
|
727
|
+
sr as DefaultGrid,
|
|
728
|
+
Jt as DefaultHeader,
|
|
729
729
|
or as DefaultSwatch,
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
730
|
+
At as DefaultTooltip,
|
|
731
|
+
yr as DevToolsPanel,
|
|
732
|
+
er as GRAPH_MODES,
|
|
733
|
+
Le as GraphErrorBoundary,
|
|
734
|
+
Z as GraphErrorPanel,
|
|
734
735
|
at as GraphProvider,
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
736
|
+
Yt as GraphRenderer,
|
|
737
|
+
Ft as HoverProvider,
|
|
738
|
+
xt as TextMeasurerProvider,
|
|
738
739
|
rr as ThemeProvider,
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
740
|
+
vr as UnitBoxSvg,
|
|
741
|
+
fr as UnitSpaceSvg,
|
|
742
|
+
pr as createGraphyKit,
|
|
743
|
+
Zt as darkTheme,
|
|
744
|
+
ir as defineGeomRenderer,
|
|
745
|
+
Vt as lightTheme,
|
|
746
|
+
Ot as lightenCss,
|
|
747
|
+
Oe as pruneSelection,
|
|
748
|
+
Lt as resolveBrandMarkVisual,
|
|
749
|
+
Kt as useCompiledSelector,
|
|
749
750
|
Xt as useElementScreenRect,
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
751
|
+
zt as useGeomHitTest,
|
|
752
|
+
Wt as useGeomHover,
|
|
753
|
+
tr as useGraphCommands,
|
|
754
|
+
Qt as useGraphHandle,
|
|
755
|
+
br as useGraphHistory,
|
|
756
|
+
Sr as useGraphHistoryShortcuts,
|
|
757
|
+
jt as useGraphSelection,
|
|
758
|
+
nr as useHandleCompiled,
|
|
759
|
+
Ut as useHoverState,
|
|
759
760
|
Ht as useStyleReaders,
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
761
|
+
Mt as useStyleResolver,
|
|
762
|
+
$t as useTextMeasurer,
|
|
763
|
+
cr as vars
|
|
763
764
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('./theme.contract.css');var r=["canvasDefault","canvasBlue","canvasCyan","canvasGreen","canvasYellow","canvasOrange","canvasRed","canvasPink","canvasPurple","canvasGray","canvasInverse"],a={white:"var(--graphy-white)",black:"var(--graphy-black)",transparent:"var(--graphy-transparent)",grey100:"var(--graphy-grey-100)",grey95:"var(--graphy-grey-95)",grey90:"var(--graphy-grey-90)",grey85:"var(--graphy-grey-85)",grey80:"var(--graphy-grey-80)",grey75:"var(--graphy-grey-75)",grey70:"var(--graphy-grey-70)",grey60:"var(--graphy-grey-60)",grey50:"var(--graphy-grey-50)",grey0:"var(--graphy-grey-0)",greyGradient80:"var(--graphy-grey-gradient-80)",green60:"var(--graphy-green-60)",green50:"var(--graphy-green-50)",red60:"var(--graphy-red-60)",red50:"var(--graphy-red-50)",amber70:"var(--graphy-amber-70)",amber50:"var(--graphy-amber-50)",amber40:"var(--graphy-amber-40)",amber30:"var(--graphy-amber-30)",blue80:"var(--graphy-blue-80)",blue60:"var(--graphy-blue-60)",purple50:"var(--graphy-purple-50)",purple30:"var(--graphy-purple-30)",brand:"var(--graphy-brand)",success:"var(--graphy-success)",warning:"var(--graphy-warning)",alert:"var(--graphy-alert)",textPrimary:"var(--graphy-text-primary)",textSecondary:"var(--graphy-text-secondary)",textDisabled:"var(--graphy-text-disabled)",iconPrimary:"var(--graphy-icon-primary)",iconSecondary:"var(--graphy-icon-secondary)",iconStickerBackground:"var(--graphy-icon-sticker-background)",border100:"var(--graphy-border-100)",border50:"var(--graphy-border-50)",border10:"var(--graphy-border-10)",sunkenBackground:"var(--graphy-sunken-background)",defaultBackground:"var(--graphy-default-background)",raisedBackground:"var(--graphy-raised-background)",overlayBackground:"var(--graphy-overlay-background)",overlayBorderGradient:"var(--graphy-overlay-border-gradient)",graphBackground:"var(--graphy-graph-background)",legendFocusOutlineColor:"var(--graphy-legend-focus-outline-color)",annotationFrameBorderColor:"var(--graphy-annotation-frame-border-color)",editMenuTriggerIconColor:"var(--graphy-edit-menu-trigger-icon-color)",tooltipRowGap:"var(--graphy-tooltip-row-gap)",editorControlHeight:"var(--graphy-editor-control-height)",legendSwatchGap:"var(--graphy-legend-swatch-gap)",headlineRowGap:"var(--graphy-headline-row-gap)",canvasDefault:"var(--graphy-canvas-default)",canvasBlue:"var(--graphy-canvas-blue)",canvasCyan:"var(--graphy-canvas-cyan)",canvasGreen:"var(--graphy-canvas-green)",canvasYellow:"var(--graphy-canvas-yellow)",canvasOrange:"var(--graphy-canvas-orange)",canvasRed:"var(--graphy-canvas-red)",canvasPink:"var(--graphy-canvas-pink)",canvasPurple:"var(--graphy-canvas-purple)",canvasGray:"var(--graphy-canvas-gray)",canvasInverse:"var(--graphy-canvas-inverse)",elevationXs:"var(--graphy-elevation-xs)",elevationSm:"var(--graphy-elevation-sm)",elevationMd:"var(--graphy-elevation-md)",elevationLg:"var(--graphy-elevation-lg)",radiiXs:"var(--graphy-radii-xs)",radiiSm:"var(--graphy-radii-sm)",radiiMd:"var(--graphy-radii-md)",radiiLg:"var(--graphy-radii-lg)",spaceXxs:"var(--graphy-space-xxs)",spaceXs:"var(--graphy-space-xs)",spaceSm:"var(--graphy-space-sm)",spaceMd:"var(--graphy-space-md)",spaceLg:"var(--graphy-space-lg)",spaceXl:"var(--graphy-space-xl)",zIndexToolbar:"var(--graphy-z-index-toolbar)",zIndexToolbarTooltip:"var(--graphy-z-index-toolbar-tooltip)",zIndexToolbarPopover:"var(--graphy-z-index-toolbar-popover)",zIndexEditorPopover:"var(--graphy-z-index-editor-popover)",toolbarBackgroundColor:"var(--graphy-toolbar-background-color)",toolbarButtonBackgroundColor:"var(--graphy-toolbar-button-background-color)",toolbarButtonBackgroundColorHovered:"var(--graphy-toolbar-button-background-color-hovered)",toolbarButtonBackgroundColorSelected:"var(--graphy-toolbar-button-background-color-selected)",toolbarSeparatorColor:"var(--graphy-toolbar-separator-color)",fontFamily:"var(--graphy-font-family)",fontFamilyHeading:"var(--graphy-font-family-heading)",fontWeightRegular:"var(--graphy-font-weight-regular)",fontWeightMedium:"var(--graphy-font-weight-medium)",fontWeightSemibold:"var(--graphy-font-weight-semibold)",fontWeightBold:"var(--graphy-font-weight-bold)",fontWeightExtraBold:"var(--graphy-font-weight-extra-bold)",textScale:"var(--graphy-text-scale)",fontSizeXxs:"var(--graphy-font-size-xxs)",fontSizeXs:"var(--graphy-font-size-xs)",fontSizeSm:"var(--graphy-font-size-sm)",fontSizeMd:"var(--graphy-font-size-md)",fontSizeLg:"var(--graphy-font-size-lg)",fontSizeXl:"var(--graphy-font-size-xl)",fontLineHeightXxs:"var(--graphy-font-line-height-xxs)",fontLineHeightXs:"var(--graphy-font-line-height-xs)",fontLineHeightSm:"var(--graphy-font-line-height-sm)",fontLineHeightMd:"var(--graphy-font-line-height-md)",fontLineHeightLg:"var(--graphy-font-line-height-lg)",fontLineHeightXl:"var(--graphy-font-line-height-xl)",fontSizeEditorBody:"var(--graphy-font-size-editor-body)",fontSizeHeadingSm:"var(--graphy-font-size-heading-sm)",fontSizeHeadingMd:"var(--graphy-font-size-heading-md)",fontSizeHeadingLg:"var(--graphy-font-size-heading-lg)",fontLineHeightEditorBody:"var(--graphy-font-line-height-editor-body)",fontLineHeightHeadingSm:"var(--graphy-font-line-height-heading-sm)",fontLineHeightHeadingMd:"var(--graphy-font-line-height-heading-md)",fontLineHeightHeadingLg:"var(--graphy-font-line-height-heading-lg)",fontButton:"var(--graphy-font-button)",fontInput:"var(--graphy-font-input)",fontInputLabel:"var(--graphy-font-input-label)",fontSelectLabel:"var(--graphy-font-select-label)",fontSelectDescription:"var(--graphy-font-select-description)",fontColorSelectLabel:"var(--graphy-font-color-select-label)",fontMenuTitle:"var(--graphy-font-menu-title)",fontMenuGroupTitle:"var(--graphy-font-menu-group-title)",fontMenuItemLabel:"var(--graphy-font-menu-item-label)",fontMenuItemLabelSecondary:"var(--graphy-font-menu-item-label-secondary)",fontUITooltip:"var(--graphy-font-uitooltip)",fontUITooltipSecondary:"var(--graphy-font-uitooltip-secondary)",fontErrorBoundaryTitle:"var(--graphy-font-error-boundary-title)",fontErrorBoundaryMessage:"var(--graphy-font-error-boundary-message)",fontTableCell:"var(--graphy-font-table-cell)",fontTableHeaderCell:"var(--graphy-font-table-header-cell)",fontSourceLabel:"var(--graphy-font-source-label)",fontSourceLink:"var(--graphy-font-source-link)",fontTextEditorH1:"var(--graphy-font-text-editor-h1)",fontTextEditorH2:"var(--graphy-font-text-editor-h2)",fontTextEditorH3:"var(--graphy-font-text-editor-h3)",fontTextEditorH6:"var(--graphy-font-text-editor-h6)",fontTextEditorBody:"var(--graphy-font-text-editor-body)",fontTextEditorLink:"var(--graphy-font-text-editor-link)",fontHighlightModeTitle:"var(--graphy-font-highlight-mode-title)",fontHighlightModeSubtitle:"var(--graphy-font-highlight-mode-subtitle)",fontEditorControlLabel:"var(--graphy-font-editor-control-label)",fontEditorControlValue:"var(--graphy-font-editor-control-value)",fontEditorSectionTitle:"var(--graphy-font-editor-section-title)",fontEditorCaption:"var(--graphy-font-editor-caption)"};Object.defineProperty(exports,"CANVAS_COLOR_KEYS",{enumerable:!0,get:function(){return r}});Object.defineProperty(exports,"vars",{enumerable:!0,get:function(){return a}});
|
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.1789367356750",
|
|
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.1789367356750"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@tiptap/core": "^3.0.0",
|