@graphysdk/react-renderer 1.9.0-beta.1793621290212 → 1.9.0-beta.1793631379825
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editable.cjs +1 -1
- package/dist/editable.mjs +3 -3
- package/dist/history-chords-BvgP8ej0.cjs +2 -0
- package/dist/{history-chords-BHE3wDew.js → history-chords-C93BbGsu.js} +3360 -2948
- package/dist/history-chords.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.mjs +279 -277
- package/package.json +5 -5
- package/dist/history-chords-nCeyn2px.cjs +0 -2
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { $t as
|
|
2
|
-
import { COMPILER_STAGE_KEYS as se, DEFAULT_LOCALE as He, Geom as $e, GraphCompilationSession as xe, areEditTargetsEqual as Me, buildDiagnostic as ie, canonicalizeLocale as Ae, createAnchorResolver as Be, createCompiler as Oe, createDataLabelPlacementResolver as Fe, createSpecBuilder as Ke, createStyleResolver as Ee, findAnnotation as Ue, findIntlLocale as je, findLayerById as ce,
|
|
3
|
-
import { Component as
|
|
4
|
-
import { Fragment as
|
|
1
|
+
import { $t as ur, An as mr, B as hr, Bt as Ne, Dn as gr, Dt as pr, En as fr, Ft as vr, Gt as Ie, Ht as yr, In as V, Kt as Sr, Lt as z, M as br, Mn as Ce, Mt as Er, N as Tr, Nn as ne, Nt as Rr, On as Gr, Pn as De, Pt as Nr, Qt as Ir, R as Cr, Sn as Dr, Tn as wr, Ut as Lr, V as Pr, Vt as we, Wt as X, Xt as Le, Yt as qr, _n as Q, a as _r, an as kr, at as Hr, bn as J, cn as $r, dn as xr, en as Mr, fn as Se, gn as Pe, h as Ar, hn as qe, ht as Br, i as Or, j as Fr, jn as Kr, kn as Ur, kt as jr, lt as Wr, mn as be, n as Yr, ot as zr, pn as B, r as Vr, s as Xr, st as Qr, t as _e, tn as Jr, vn as Zr, vt as en, w as tn, wn as rn, xn as Z, xt as nn, yn as ke, yt as sn, z as on } from "./history-chords-C93BbGsu.js";
|
|
2
|
+
import { COMPILER_STAGE_KEYS as se, DEFAULT_LOCALE as He, Geom as $e, GraphCompilationSession as xe, areEditTargetsEqual as Me, buildDiagnostic as ie, canonicalizeLocale as Ae, createAnchorResolver as Be, createCompiler as Oe, createDataLabelPlacementResolver as Fe, createSpecBuilder as Ke, createStyleResolver as Ee, findAnnotation as Ue, findIntlLocale as je, findLayerById as ce, foldGeomCornerRadii as We, isCompilerCachingEnabled as Ye, resolveDefinition as ze, resolveGeomCornerRadiusPx as le, setCompilerCachingEnabled as Ve, toPercent as W } from "@graphysdk/viz-engine";
|
|
3
|
+
import { Component as Xe, useCallback as p, useEffect as H, useId as Qe, useImperativeHandle as Je, useMemo as k, useRef as de, useState as S, useSyncExternalStore as Ze } from "react";
|
|
4
|
+
import { Fragment as et, jsx as c, jsxs as f } from "react/jsx-runtime";
|
|
5
5
|
import { useStore as re } from "zustand";
|
|
6
6
|
import { motion as ee } from "motion/react";
|
|
7
7
|
import { createStore as oe } from "zustand/vanilla";
|
|
8
|
-
import
|
|
9
|
-
import './index.css';var
|
|
10
|
-
var
|
|
8
|
+
import tt from "clsx";
|
|
9
|
+
import './index.css';var rt = "_1a5iqpb0", nt = "_1a5iqpb1";
|
|
10
|
+
var st = "_1a5iqpb3", ot = "_1a5iqpb4", at = "_1a5iqpb5";
|
|
11
11
|
var ue = ({ errors: e }) => {
|
|
12
12
|
const [t, ...r] = e;
|
|
13
13
|
return /* @__PURE__ */ f("div", {
|
|
14
14
|
role: "alert",
|
|
15
|
-
className:
|
|
15
|
+
className: rt,
|
|
16
16
|
children: [
|
|
17
17
|
/* @__PURE__ */ c("strong", {
|
|
18
|
-
className:
|
|
18
|
+
className: nt,
|
|
19
19
|
children: "This chart could not be rendered."
|
|
20
20
|
}),
|
|
21
21
|
t && /* @__PURE__ */ c(me, { diagnostic: t }),
|
|
@@ -26,14 +26,14 @@ var ue = ({ errors: e }) => {
|
|
|
26
26
|
]
|
|
27
27
|
});
|
|
28
28
|
}, me = ({ diagnostic: e }) => /* @__PURE__ */ f("div", {
|
|
29
|
-
className:
|
|
29
|
+
className: st,
|
|
30
30
|
children: [
|
|
31
31
|
/* @__PURE__ */ c("span", {
|
|
32
|
-
className:
|
|
32
|
+
className: ot,
|
|
33
33
|
children: e.code
|
|
34
34
|
}),
|
|
35
35
|
/* @__PURE__ */ c("p", {
|
|
36
|
-
className:
|
|
36
|
+
className: at,
|
|
37
37
|
children: e.message
|
|
38
38
|
}),
|
|
39
39
|
e.suggestion && /* @__PURE__ */ c("p", {
|
|
@@ -42,10 +42,10 @@ var ue = ({ errors: e }) => {
|
|
|
42
42
|
})
|
|
43
43
|
]
|
|
44
44
|
});
|
|
45
|
-
function
|
|
45
|
+
function it(e = [], t = []) {
|
|
46
46
|
return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
|
|
47
47
|
}
|
|
48
|
-
var
|
|
48
|
+
var ct = class extends Xe {
|
|
49
49
|
constructor(...e) {
|
|
50
50
|
super(...e), this.state = { caughtDiagnostic: null };
|
|
51
51
|
}
|
|
@@ -57,7 +57,7 @@ var it = class extends Ve {
|
|
|
57
57
|
V([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 && !it(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
|
|
61
61
|
}
|
|
62
62
|
render() {
|
|
63
63
|
const { caughtDiagnostic: e } = this.state;
|
|
@@ -66,23 +66,23 @@ var it = class extends Ve {
|
|
|
66
66
|
return t && t.length > 0 ? /* @__PURE__ */ c(ue, { errors: t }) : r;
|
|
67
67
|
}
|
|
68
68
|
}, Te = (e) => typeof e == "object" && "geom" in e && "render" in e, Re = (e) => {
|
|
69
|
-
const t =
|
|
69
|
+
const t = ze(e);
|
|
70
70
|
return t instanceof $e ? t : null;
|
|
71
|
-
},
|
|
72
|
-
const r = e.filter((n) =>
|
|
71
|
+
}, lt = (e, t) => {
|
|
72
|
+
const r = e.filter((n) => dt(n, t));
|
|
73
73
|
return r.length === e.length ? e : r;
|
|
74
|
-
},
|
|
74
|
+
}, dt = (e, t) => e.kind === "annotation" ? Ue(t.annotations, e.id) !== null : e.kind === "observations" ? ce(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? ce(t.layers, e.layerId) !== void 0 : !0, he = [], ut = () => oe((e) => ({
|
|
75
75
|
selection: he,
|
|
76
|
-
setSelection: (t) => e((r) =>
|
|
76
|
+
setSelection: (t) => e((r) => mt(r.selection, t) ? r : { selection: t }),
|
|
77
77
|
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: he })
|
|
78
|
-
})),
|
|
78
|
+
})), mt = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
|
|
79
79
|
const s = t[n];
|
|
80
80
|
return s !== void 0 && Me(r, s);
|
|
81
|
-
}),
|
|
82
|
-
if (!
|
|
81
|
+
}), ht = process.env.NODE_ENV !== "production", gt = 5, pt = (e) => {
|
|
82
|
+
if (!ht) return {
|
|
83
83
|
emit: () => {
|
|
84
84
|
},
|
|
85
|
-
subscribe: () =>
|
|
85
|
+
subscribe: () => vt,
|
|
86
86
|
getLastTrigger: () => null,
|
|
87
87
|
getLastCompile: () => null,
|
|
88
88
|
getCacheStats: () => e.getCacheStats()
|
|
@@ -94,7 +94,7 @@ var it = class extends Ve {
|
|
|
94
94
|
const s = e.getLastCompile();
|
|
95
95
|
if (s) {
|
|
96
96
|
r = n;
|
|
97
|
-
for (const
|
|
97
|
+
for (const o of t) o(n, s);
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
subscribe: (n) => (t.add(n), () => {
|
|
@@ -104,7 +104,7 @@ var it = class extends Ve {
|
|
|
104
104
|
getLastCompile: () => e.getLastCompile(),
|
|
105
105
|
getCacheStats: () => e.getCacheStats()
|
|
106
106
|
};
|
|
107
|
-
},
|
|
107
|
+
}, ft = () => oe((e) => ({
|
|
108
108
|
lastCompile: null,
|
|
109
109
|
history: [],
|
|
110
110
|
nextId: 1,
|
|
@@ -113,20 +113,20 @@ var it = class extends Ve {
|
|
|
113
113
|
if (n.lastSnapshot === r) return n;
|
|
114
114
|
const s = {
|
|
115
115
|
id: n.nextId,
|
|
116
|
-
label:
|
|
116
|
+
label: yt(t),
|
|
117
117
|
stages: r.stages,
|
|
118
118
|
stageDurationsMs: r.stageDurationsMs,
|
|
119
119
|
durationMs: r.durationMs
|
|
120
120
|
};
|
|
121
121
|
return {
|
|
122
122
|
lastCompile: s,
|
|
123
|
-
history:
|
|
123
|
+
history: St(n.history, s, gt),
|
|
124
124
|
nextId: n.nextId + 1,
|
|
125
125
|
lastSnapshot: r
|
|
126
126
|
};
|
|
127
127
|
})
|
|
128
|
-
})),
|
|
129
|
-
},
|
|
128
|
+
})), vt = () => {
|
|
129
|
+
}, yt = (e) => {
|
|
130
130
|
switch (e.kind) {
|
|
131
131
|
case "init":
|
|
132
132
|
return "init";
|
|
@@ -137,7 +137,7 @@ var it = class extends Ve {
|
|
|
137
137
|
case "command":
|
|
138
138
|
return e.command.metadata.description;
|
|
139
139
|
}
|
|
140
|
-
},
|
|
140
|
+
}, St = (e, t, r) => {
|
|
141
141
|
const n = e.length >= r ? e.length - (r - 1) : 0;
|
|
142
142
|
return [...e.slice(n), t];
|
|
143
143
|
};
|
|
@@ -157,18 +157,18 @@ function ge(e) {
|
|
|
157
157
|
suggestion: `Add a render half for it: \`defineGeomRenderer(${d.type}Geom, { coord, render })\`, then include it in \`plugins\`.`
|
|
158
158
|
}));
|
|
159
159
|
}
|
|
160
|
-
const
|
|
160
|
+
const o = /* @__PURE__ */ new Map();
|
|
161
161
|
for (const l of t) {
|
|
162
162
|
if ("definition" in l) continue;
|
|
163
|
-
const d = `${l.geom}|${l.coord}`, g =
|
|
164
|
-
g ? g.count += 1 :
|
|
163
|
+
const d = `${l.geom}|${l.coord}`, g = o.get(d);
|
|
164
|
+
g ? g.count += 1 : o.set(d, {
|
|
165
165
|
geom: l.geom,
|
|
166
166
|
coord: l.coord,
|
|
167
167
|
count: 1
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
const a = [];
|
|
171
|
-
for (const { geom: l, coord: d, count: g } of
|
|
171
|
+
for (const { geom: l, coord: d, count: g } of o.values())
|
|
172
172
|
g < 2 || a.push({
|
|
173
173
|
kind: "userInput",
|
|
174
174
|
severity: "warning",
|
|
@@ -180,15 +180,15 @@ function ge(e) {
|
|
|
180
180
|
},
|
|
181
181
|
suggestion: `Keep a single render-only override for ('${l}', '${d}').`
|
|
182
182
|
});
|
|
183
|
-
return a.push(...
|
|
183
|
+
return a.push(...Dt(e)), {
|
|
184
184
|
errors: n,
|
|
185
185
|
warnings: a
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
188
|
+
function bt(e, t) {
|
|
189
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), o = [];
|
|
190
190
|
for (const a of n)
|
|
191
|
-
t(a.geom, r.type) !== null || s.has(a.geom) || (s.add(a.geom),
|
|
191
|
+
t(a.geom, r.type) !== null || s.has(a.geom) || (s.add(a.geom), o.push({
|
|
192
192
|
kind: "userInput",
|
|
193
193
|
severity: "warning",
|
|
194
194
|
code: "MISSING_GEOM_RENDERER",
|
|
@@ -199,14 +199,14 @@ function St(e, t) {
|
|
|
199
199
|
},
|
|
200
200
|
suggestion: `Register a renderer for ('${a.geom}', '${r.type}') via \`defineGeomRenderer\`.`
|
|
201
201
|
}));
|
|
202
|
-
return
|
|
202
|
+
return o;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
204
|
+
function Et(e, t) {
|
|
205
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), o = [];
|
|
206
206
|
for (const a of n) {
|
|
207
207
|
if (a.interactive === !1 || a.spatialKind !== "renderHitTest" || s.has(a.geom)) continue;
|
|
208
208
|
const l = t(a.geom, r.type);
|
|
209
|
-
l === null || l.hitTest || X(l) || (s.add(a.geom),
|
|
209
|
+
l === null || l.hitTest || X(l) || (s.add(a.geom), o.push({
|
|
210
210
|
kind: "userInput",
|
|
211
211
|
severity: "warning",
|
|
212
212
|
code: "MISSING_RENDER_HIT_TEST",
|
|
@@ -218,9 +218,9 @@ function bt(e, t) {
|
|
|
218
218
|
suggestion: `Add a \`hitTest\` factory (precomputed geometry) or a live render (\`{ fn, options: { live: true } }\`, live simulation) to the renderer for ('${a.geom}', '${r.type}').`
|
|
219
219
|
}));
|
|
220
220
|
}
|
|
221
|
-
return
|
|
221
|
+
return o;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function Tt(e) {
|
|
224
224
|
const t = /* @__PURE__ */ new Set(), r = [];
|
|
225
225
|
for (const n of e.layers) {
|
|
226
226
|
const s = n.identityKey;
|
|
@@ -238,12 +238,12 @@ function Et(e) {
|
|
|
238
238
|
}
|
|
239
239
|
return r;
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
241
|
+
function Rt(e, t) {
|
|
242
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), o = [];
|
|
243
243
|
for (const a of n) {
|
|
244
244
|
if (a.interactive === !1 || a.spatialKind !== "renderHitTest" || s.has(a.geom)) continue;
|
|
245
245
|
const l = t(a.geom, r.type);
|
|
246
|
-
l === null || !l.hitTest || !X(l) || (s.add(a.geom),
|
|
246
|
+
l === null || !l.hitTest || !X(l) || (s.add(a.geom), o.push({
|
|
247
247
|
kind: "userInput",
|
|
248
248
|
severity: "warning",
|
|
249
249
|
code: "CONFLICTING_RENDER_HIT_TEST",
|
|
@@ -255,9 +255,9 @@ function Tt(e, t) {
|
|
|
255
255
|
suggestion: "Keep one: a `hitTest` factory for precomputed geometry, OR a live render (`{ fn, options: { live: true } }`) for a live simulation."
|
|
256
256
|
}));
|
|
257
257
|
}
|
|
258
|
-
return
|
|
258
|
+
return o;
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function Gt(e, t) {
|
|
261
261
|
const r = /* @__PURE__ */ new Set(), n = [];
|
|
262
262
|
for (const s of e.layers)
|
|
263
263
|
s.interactive !== !1 && (s.spatialKind !== "renderHitTest" || r.has(s.geom) || t.hasCapability(s.geom) || (r.add(s.geom), n.push({
|
|
@@ -274,11 +274,11 @@ function Rt(e, t) {
|
|
|
274
274
|
return n;
|
|
275
275
|
}
|
|
276
276
|
function Nt(e, t) {
|
|
277
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
277
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), o = [];
|
|
278
278
|
for (const a of n) {
|
|
279
279
|
if (a.interactive === !1 || a.spatialKind === "renderHitTest" || s.has(a.geom)) continue;
|
|
280
280
|
const l = t(a.geom, r.type);
|
|
281
|
-
l === null || !X(l) || (s.add(a.geom),
|
|
281
|
+
l === null || !X(l) || (s.add(a.geom), o.push({
|
|
282
282
|
kind: "userInput",
|
|
283
283
|
severity: "warning",
|
|
284
284
|
code: "LIVE_RENDER_REQUIRES_RENDER_HIT_TEST",
|
|
@@ -290,11 +290,11 @@ function Nt(e, t) {
|
|
|
290
290
|
suggestion: "Have the geom's manifest yield spatialKind 'renderHitTest' so the scene layer carries the `byKey` index the live render's `pushHover` resolves against."
|
|
291
291
|
}));
|
|
292
292
|
}
|
|
293
|
-
return
|
|
293
|
+
return o;
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function It(e, t) {
|
|
296
296
|
let r;
|
|
297
|
-
return e.layers.flatMap((n, s) => X(t(n.geom, e.coordSystem.type)) ?
|
|
297
|
+
return e.layers.flatMap((n, s) => X(t(n.geom, e.coordSystem.type)) ? Ct(n) ? (r ??= Ee().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
|
|
298
298
|
kind: "userInput",
|
|
299
299
|
severity: "warning",
|
|
300
300
|
code: "INVALID_STYLE_RULE",
|
|
@@ -307,8 +307,8 @@ function Gt(e, t) {
|
|
|
307
307
|
suggestion: "Remove the hovered overpaint, or paint the hover treatment in the geom's live render."
|
|
308
308
|
}]) : [] : []);
|
|
309
309
|
}
|
|
310
|
-
var
|
|
311
|
-
function
|
|
310
|
+
var Ct = (e) => [e.styles.defaults, e.styles.overrides].some((t) => t.some((r) => r.state === "hovered" && (r.declarations.overpaint?.length ?? 0) > 0));
|
|
311
|
+
function Dt(e) {
|
|
312
312
|
const t = /* @__PURE__ */ new Set(), r = [];
|
|
313
313
|
for (const n of e) {
|
|
314
314
|
const s = Re(n);
|
|
@@ -326,58 +326,58 @@ function Ct(e) {
|
|
|
326
326
|
}
|
|
327
327
|
return r;
|
|
328
328
|
}
|
|
329
|
-
var
|
|
329
|
+
var wt = (e) => oe((t) => ({
|
|
330
330
|
scene: e,
|
|
331
331
|
setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
|
|
332
|
-
})),
|
|
333
|
-
const
|
|
334
|
-
const
|
|
332
|
+
})), Lt = ({ spec: e, data: t, colorScheme: r, plugins: n, theme: s, resolveRenderer: o, anchorResolver: a, onSpecChange: l, onError: d, onWarnings: g }) => {
|
|
333
|
+
const N = z(l), I = z(d), T = z(g), [{ session: u, compileBus: m, findGeom: R }] = S(() => {
|
|
334
|
+
const i = Oe({
|
|
335
335
|
plugins: n,
|
|
336
336
|
theme: s
|
|
337
337
|
});
|
|
338
338
|
return {
|
|
339
|
-
session: new xe(
|
|
340
|
-
compileBus:
|
|
341
|
-
findGeom: (h) =>
|
|
339
|
+
session: new xe(i),
|
|
340
|
+
compileBus: pt(i),
|
|
341
|
+
findGeom: (h) => i.findGeom(h)
|
|
342
342
|
};
|
|
343
343
|
}), [v] = S(() => {
|
|
344
|
-
const
|
|
344
|
+
const i = ge(n ?? []), h = ge(s?.plugins ?? []);
|
|
345
345
|
return {
|
|
346
|
-
errors: [...h.errors, ...
|
|
347
|
-
warnings: [...h.warnings, ...
|
|
346
|
+
errors: [...h.errors, ...i.errors],
|
|
347
|
+
warnings: [...h.warnings, ...i.warnings]
|
|
348
348
|
};
|
|
349
|
-
}), P = de(null), [y] = S(
|
|
350
|
-
if (!
|
|
351
|
-
if (C.current) C.current.getState().setScene(
|
|
349
|
+
}), P = de(null), [y] = S(Pt), C = de(null), L = p((i) => v.errors.length === 0 ? i : [...v.errors, ...i ?? []], [v]), G = p((i) => {
|
|
350
|
+
if (!i.ok) return i.errors;
|
|
351
|
+
if (C.current) C.current.getState().setScene(i.scene);
|
|
352
352
|
else {
|
|
353
|
-
const h =
|
|
353
|
+
const h = wt(i.scene);
|
|
354
354
|
h.subscribe(y.notify), C.current = h, y.notify();
|
|
355
355
|
}
|
|
356
356
|
return null;
|
|
357
357
|
}, [y]), [O, $] = S(() => {
|
|
358
|
-
const
|
|
358
|
+
const i = u.compile({
|
|
359
359
|
spec: e,
|
|
360
360
|
data: t,
|
|
361
361
|
colorScheme: r
|
|
362
362
|
});
|
|
363
|
-
return P.current =
|
|
364
|
-
}), b = p((
|
|
365
|
-
...
|
|
366
|
-
...
|
|
367
|
-
...
|
|
368
|
-
...
|
|
369
|
-
...
|
|
370
|
-
...Nt(
|
|
371
|
-
...
|
|
372
|
-
...
|
|
373
|
-
] :
|
|
374
|
-
|
|
375
|
-
}, [I]), w = p((
|
|
376
|
-
|
|
363
|
+
return P.current = i, L(G(i));
|
|
364
|
+
}), b = p((i) => i.ok ? [
|
|
365
|
+
...i.warnings,
|
|
366
|
+
...bt(i.scene, o),
|
|
367
|
+
...Et(i.scene, o),
|
|
368
|
+
...Tt(i.scene),
|
|
369
|
+
...Rt(i.scene, o),
|
|
370
|
+
...Nt(i.scene, o),
|
|
371
|
+
...It(i.scene, o),
|
|
372
|
+
...Gt(i.scene, a)
|
|
373
|
+
] : i.warnings, [o, a]), D = p((i) => {
|
|
374
|
+
i.length !== 0 && (V(i), I.current?.(i));
|
|
375
|
+
}, [I]), w = p((i) => {
|
|
376
|
+
i.length !== 0 && (V(i), T.current?.(i));
|
|
377
377
|
}, [T]);
|
|
378
378
|
H(() => {
|
|
379
|
-
const
|
|
380
|
-
|
|
379
|
+
const i = P.current;
|
|
380
|
+
i && (D([...v.errors, ...i.ok ? [] : i.errors]), w([...v.warnings, ...b(i)]), i.ok && m.emit({ kind: "init" }));
|
|
381
381
|
}, [
|
|
382
382
|
m,
|
|
383
383
|
D,
|
|
@@ -385,49 +385,49 @@ var Dt = (e) => oe((t) => ({
|
|
|
385
385
|
v,
|
|
386
386
|
b
|
|
387
387
|
]), H(() => {
|
|
388
|
-
const
|
|
388
|
+
const i = u.update({
|
|
389
389
|
spec: e,
|
|
390
390
|
data: t,
|
|
391
391
|
colorScheme: r
|
|
392
392
|
});
|
|
393
|
-
if (!
|
|
394
|
-
|
|
395
|
-
const h =
|
|
396
|
-
$(L(h)), h && D(h), w(b(
|
|
393
|
+
if (!i) return;
|
|
394
|
+
i.committedSpec && N.current?.(i.committedSpec);
|
|
395
|
+
const h = G(i.result);
|
|
396
|
+
$(L(h)), h && D(h), w(b(i.result)), h || m.emit({ kind: i.hasSpecChange ? "spec" : "data" });
|
|
397
397
|
}, [
|
|
398
398
|
e,
|
|
399
399
|
t,
|
|
400
400
|
r,
|
|
401
401
|
u,
|
|
402
402
|
m,
|
|
403
|
-
|
|
403
|
+
G,
|
|
404
404
|
D,
|
|
405
405
|
w,
|
|
406
406
|
L,
|
|
407
407
|
b,
|
|
408
|
-
|
|
408
|
+
N
|
|
409
409
|
]);
|
|
410
|
-
const x = p((
|
|
411
|
-
$((h) => h === null ? h : L(null)), w(b(
|
|
410
|
+
const x = p((i) => {
|
|
411
|
+
$((h) => h === null ? h : L(null)), w(b(i));
|
|
412
412
|
}, [
|
|
413
413
|
L,
|
|
414
414
|
w,
|
|
415
415
|
b
|
|
416
|
-
]), F = p((
|
|
417
|
-
|
|
416
|
+
]), F = p((i) => {
|
|
417
|
+
i.scene && C.current?.getState().setScene(i.scene), i.result && x(i.result), i.command && m.emit({
|
|
418
418
|
kind: "command",
|
|
419
|
-
command:
|
|
420
|
-
}),
|
|
419
|
+
command: i.command
|
|
420
|
+
}), i.spec && N.current?.(i.spec), i.errors && D([...i.errors]);
|
|
421
421
|
}, [
|
|
422
422
|
x,
|
|
423
423
|
m,
|
|
424
|
-
|
|
424
|
+
N,
|
|
425
425
|
D
|
|
426
|
-
]), E = p((
|
|
427
|
-
for (const h of
|
|
428
|
-
return
|
|
429
|
-
}, [F]), _ = p((
|
|
430
|
-
E(u.applyCommand(
|
|
426
|
+
]), E = p((i) => {
|
|
427
|
+
for (const h of i) F(h);
|
|
428
|
+
return i.some((h) => !!h.scene);
|
|
429
|
+
}, [F]), _ = p((i, h) => {
|
|
430
|
+
E(u.applyCommand(i, h));
|
|
431
431
|
}, [u, E]), K = p(() => {
|
|
432
432
|
E(u.commit());
|
|
433
433
|
}, [u, E]), q = p(() => E(u.undo()), [u, E]), U = p(() => E(u.redo()), [u, E]), j = k(() => ({
|
|
@@ -450,7 +450,7 @@ var Dt = (e) => oe((t) => ({
|
|
|
450
450
|
compileErrors: O,
|
|
451
451
|
findGeom: R
|
|
452
452
|
};
|
|
453
|
-
},
|
|
453
|
+
}, Pt = () => {
|
|
454
454
|
const e = /* @__PURE__ */ new Set();
|
|
455
455
|
return {
|
|
456
456
|
subscribe: (t) => (e.add(t), () => {
|
|
@@ -458,8 +458,8 @@ var Dt = (e) => oe((t) => ({
|
|
|
458
458
|
}),
|
|
459
459
|
notify: () => e.forEach((t) => t())
|
|
460
460
|
};
|
|
461
|
-
},
|
|
462
|
-
const I =
|
|
461
|
+
}, qt = ({ data: e, spec: t, plugins: r = [], theme: n, formattingLocale: s, handleRef: o, onSpecChange: a, onError: l, onWarnings: d, colorScheme: g = "light", children: N }) => {
|
|
462
|
+
const I = _t(s, d), [T] = S(() => n), u = T?.colorScheme ?? g, [m] = S(() => we([...T?.plugins ?? [], ...r].filter(Te))), R = Qe(), [v] = S(() => Be(r)), [P] = S(() => Fe(r)), [y] = S(() => ut()), [C] = S(() => Ne()), L = k(() => Ee({ colorScheme: u }), [u]), { store: G, dispatch: O, commit: $, history: b, subscribe: D, getScene: w, compileBus: x, compileErrors: F, findGeom: E } = Lt({
|
|
463
463
|
spec: t,
|
|
464
464
|
data: e,
|
|
465
465
|
colorScheme: u,
|
|
@@ -472,18 +472,18 @@ var Dt = (e) => oe((t) => ({
|
|
|
472
472
|
onWarnings: d
|
|
473
473
|
});
|
|
474
474
|
H(() => {
|
|
475
|
-
if (
|
|
476
|
-
return
|
|
475
|
+
if (G)
|
|
476
|
+
return G.subscribe((q, U) => {
|
|
477
477
|
if (q.scene.spec === U.scene.spec) return;
|
|
478
478
|
const { selection: j, setSelection: te } = y.getState();
|
|
479
|
-
j.length !== 0 && te(
|
|
479
|
+
j.length !== 0 && te(lt(j, q.scene.spec));
|
|
480
480
|
});
|
|
481
|
-
}, [
|
|
481
|
+
}, [G, y]);
|
|
482
482
|
const _ = k(() => ({
|
|
483
483
|
dispatch: O,
|
|
484
484
|
commit: $
|
|
485
485
|
}), [O, $]);
|
|
486
|
-
|
|
486
|
+
Je(o, () => ({
|
|
487
487
|
commands: _,
|
|
488
488
|
undo: b.undo,
|
|
489
489
|
redo: b.redo,
|
|
@@ -504,9 +504,9 @@ var Dt = (e) => oe((t) => ({
|
|
|
504
504
|
y,
|
|
505
505
|
P
|
|
506
506
|
]);
|
|
507
|
-
const K = k(() =>
|
|
507
|
+
const K = k(() => G ? {
|
|
508
508
|
chartId: R,
|
|
509
|
-
store:
|
|
509
|
+
store: G,
|
|
510
510
|
selectionStore: y,
|
|
511
511
|
targetBoundaryStore: C,
|
|
512
512
|
commands: _,
|
|
@@ -519,7 +519,7 @@ var Dt = (e) => oe((t) => ({
|
|
|
519
519
|
findGeom: E
|
|
520
520
|
} : null, [
|
|
521
521
|
R,
|
|
522
|
-
|
|
522
|
+
G,
|
|
523
523
|
y,
|
|
524
524
|
C,
|
|
525
525
|
_,
|
|
@@ -531,7 +531,7 @@ var Dt = (e) => oe((t) => ({
|
|
|
531
531
|
v,
|
|
532
532
|
E
|
|
533
533
|
]);
|
|
534
|
-
return /* @__PURE__ */ c(
|
|
534
|
+
return /* @__PURE__ */ c(ct, {
|
|
535
535
|
forcedErrors: F,
|
|
536
536
|
onError: l,
|
|
537
537
|
resetKeys: [t, e],
|
|
@@ -543,13 +543,13 @@ var Dt = (e) => oe((t) => ({
|
|
|
543
543
|
value: P,
|
|
544
544
|
children: /* @__PURE__ */ c(B, {
|
|
545
545
|
shapes: T?.shapes,
|
|
546
|
-
children:
|
|
546
|
+
children: N
|
|
547
547
|
})
|
|
548
548
|
})
|
|
549
549
|
})
|
|
550
550
|
}) : null
|
|
551
551
|
});
|
|
552
|
-
},
|
|
552
|
+
}, _t = (e, t) => {
|
|
553
553
|
const r = z(t);
|
|
554
554
|
return H(() => {
|
|
555
555
|
if (e === void 0 || je(e) !== void 0) return;
|
|
@@ -562,11 +562,11 @@ var Dt = (e) => oe((t) => ({
|
|
|
562
562
|
V(n), r.current?.(n);
|
|
563
563
|
}, [e, r]), e === void 0 ? void 0 : Ae(e);
|
|
564
564
|
};
|
|
565
|
-
function
|
|
565
|
+
function gn({ theme: e, ...t } = {}) {
|
|
566
566
|
const r = Ke(t);
|
|
567
567
|
return {
|
|
568
568
|
...r,
|
|
569
|
-
GraphProvider: (s) => /* @__PURE__ */ c(
|
|
569
|
+
GraphProvider: (s) => /* @__PURE__ */ c(qt, {
|
|
570
570
|
...s,
|
|
571
571
|
plugins: r.plugins,
|
|
572
572
|
theme: e
|
|
@@ -578,15 +578,15 @@ var A = (e, t) => {
|
|
|
578
578
|
if (!e.endsWith("%")) return null;
|
|
579
579
|
const r = Number.parseFloat(e);
|
|
580
580
|
return Number.isFinite(r) ? r / 100 * t : null;
|
|
581
|
-
},
|
|
582
|
-
const
|
|
583
|
-
return
|
|
584
|
-
x:
|
|
581
|
+
}, pn = ({ x: e, y: t, width: r, height: n }, s) => {
|
|
582
|
+
const o = A(e, s.width), a = A(t, s.height), l = A(r, s.width), d = A(n, s.height);
|
|
583
|
+
return o === null || a === null || l === null || d === null ? null : {
|
|
584
|
+
x: o,
|
|
585
585
|
y: a,
|
|
586
586
|
width: l,
|
|
587
587
|
height: d
|
|
588
588
|
};
|
|
589
|
-
},
|
|
589
|
+
}, kt = ({ animateTransitions: e, cx: t, cy: r, r: n, effects: s, ...o }) => {
|
|
590
590
|
const a = Z(s);
|
|
591
591
|
return e ? /* @__PURE__ */ c(ee.circle, {
|
|
592
592
|
initial: !1,
|
|
@@ -597,16 +597,16 @@ var A = (e, t) => {
|
|
|
597
597
|
},
|
|
598
598
|
transition: J,
|
|
599
599
|
style: a,
|
|
600
|
-
...
|
|
600
|
+
...o
|
|
601
601
|
}) : /* @__PURE__ */ c("circle", {
|
|
602
602
|
cx: t,
|
|
603
603
|
cy: r,
|
|
604
604
|
r: n,
|
|
605
605
|
style: a,
|
|
606
|
-
...
|
|
606
|
+
...o
|
|
607
607
|
});
|
|
608
|
-
},
|
|
609
|
-
const l = Z(
|
|
608
|
+
}, Ht = ({ animateTransitions: e, x1: t, y1: r, x2: n, y2: s, effects: o, ...a }) => {
|
|
609
|
+
const l = Z(o);
|
|
610
610
|
return e ? /* @__PURE__ */ c(ee.line, {
|
|
611
611
|
initial: !1,
|
|
612
612
|
animate: {
|
|
@@ -626,7 +626,7 @@ var A = (e, t) => {
|
|
|
626
626
|
style: l,
|
|
627
627
|
...a
|
|
628
628
|
});
|
|
629
|
-
},
|
|
629
|
+
}, $t = ({ animateTransitions: e, x: t, y: r, width: n, height: s, rx: o, ry: a, effects: l, ...d }) => {
|
|
630
630
|
const g = Z(l);
|
|
631
631
|
return e ? /* @__PURE__ */ c(ee.rect, {
|
|
632
632
|
initial: !1,
|
|
@@ -635,8 +635,8 @@ var A = (e, t) => {
|
|
|
635
635
|
attrY: r,
|
|
636
636
|
width: n,
|
|
637
637
|
height: s,
|
|
638
|
-
...
|
|
639
|
-
rx:
|
|
638
|
+
...o !== void 0 && a !== void 0 ? {
|
|
639
|
+
rx: o,
|
|
640
640
|
ry: a
|
|
641
641
|
} : {}
|
|
642
642
|
},
|
|
@@ -648,55 +648,57 @@ var A = (e, t) => {
|
|
|
648
648
|
y: r,
|
|
649
649
|
width: n,
|
|
650
650
|
height: s,
|
|
651
|
-
rx:
|
|
651
|
+
rx: o,
|
|
652
652
|
ry: a,
|
|
653
653
|
style: g,
|
|
654
654
|
...d
|
|
655
655
|
});
|
|
656
|
-
},
|
|
657
|
-
const
|
|
658
|
-
return e ? /* @__PURE__ */ c(
|
|
656
|
+
}, xt = ({ animateTransitions: e, d: t, source: r, effects: n, ...s }) => {
|
|
657
|
+
const o = Z(n);
|
|
658
|
+
return e ? /* @__PURE__ */ c(Mt, {
|
|
659
659
|
d: t,
|
|
660
660
|
source: r,
|
|
661
|
-
style:
|
|
661
|
+
style: o,
|
|
662
662
|
...s
|
|
663
663
|
}) : /* @__PURE__ */ c("path", {
|
|
664
664
|
d: t,
|
|
665
|
-
style:
|
|
665
|
+
style: o,
|
|
666
666
|
...s
|
|
667
667
|
});
|
|
668
|
-
}, pn = (e) => {
|
|
669
|
-
const { Circle: t } = Q();
|
|
670
|
-
return t === void 0 ? _t(e) : /* @__PURE__ */ c(B, { children: /* @__PURE__ */ c(t, { ...e }) });
|
|
671
668
|
}, fn = (e) => {
|
|
672
|
-
const {
|
|
669
|
+
const { Circle: t } = Q();
|
|
673
670
|
return t === void 0 ? kt(e) : /* @__PURE__ */ c(B, { children: /* @__PURE__ */ c(t, { ...e }) });
|
|
674
|
-
}, vn = (
|
|
675
|
-
const {
|
|
671
|
+
}, vn = (e) => {
|
|
672
|
+
const { Line: t } = Q();
|
|
673
|
+
return t === void 0 ? Ht(e) : /* @__PURE__ */ c(B, { children: /* @__PURE__ */ c(t, { ...e }) });
|
|
674
|
+
}, yn = ({ cornerRadius: e, ...t }) => {
|
|
675
|
+
const { Rect: r } = Q(), n = be(), s = Pe(), o = {
|
|
676
676
|
...t,
|
|
677
|
-
...
|
|
677
|
+
...At(e, t, n, s)
|
|
678
678
|
};
|
|
679
|
-
return r === void 0 ?
|
|
680
|
-
},
|
|
679
|
+
return r === void 0 ? $t(o) : /* @__PURE__ */ c(B, { children: /* @__PURE__ */ c(r, { ...o }) });
|
|
680
|
+
}, Sn = (e) => {
|
|
681
681
|
const { Path: t } = Q();
|
|
682
|
-
return t === void 0 ?
|
|
683
|
-
},
|
|
682
|
+
return t === void 0 ? xt(e) : /* @__PURE__ */ c(B, { children: /* @__PURE__ */ c(t, { ...e }) });
|
|
683
|
+
}, Mt = ({ d: e, source: t, ...r }) => {
|
|
684
684
|
const n = ke(e, J, t);
|
|
685
685
|
return /* @__PURE__ */ c(ee.path, {
|
|
686
686
|
d: n,
|
|
687
687
|
...r
|
|
688
688
|
});
|
|
689
|
-
},
|
|
689
|
+
}, At = (e, t, r, n) => {
|
|
690
690
|
if (e === void 0) return {};
|
|
691
|
-
const s =
|
|
692
|
-
if (s ===
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
cornerRadius:
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
},
|
|
691
|
+
const s = We(e);
|
|
692
|
+
if (s === void 0) return {};
|
|
693
|
+
const o = Bt(t, r, n);
|
|
694
|
+
if (o === null)
|
|
695
|
+
return s === "full" ? {} : fe(le({ cornerRadius: s }), n);
|
|
696
|
+
const a = Math.min(le({
|
|
697
|
+
cornerRadius: s,
|
|
698
|
+
box: o
|
|
699
|
+
}), Math.min(o.width, o.height) / 2);
|
|
700
|
+
return fe(a, n);
|
|
701
|
+
}, Bt = (e, t, r) => {
|
|
700
702
|
const n = pe(e.width, t?.width, r.x), s = pe(e.height, t?.height, r.y);
|
|
701
703
|
return n === null || s === null ? null : {
|
|
702
704
|
width: n,
|
|
@@ -713,7 +715,7 @@ var A = (e, t) => {
|
|
|
713
715
|
} : {
|
|
714
716
|
rx: e / t.x,
|
|
715
717
|
ry: e / t.y
|
|
716
|
-
},
|
|
718
|
+
}, bn = ({ children: e, ...t }) => {
|
|
717
719
|
const r = be();
|
|
718
720
|
return /* @__PURE__ */ c("svg", {
|
|
719
721
|
viewBox: "0 0 1 1",
|
|
@@ -728,8 +730,8 @@ var A = (e, t) => {
|
|
|
728
730
|
children: e
|
|
729
731
|
})
|
|
730
732
|
});
|
|
731
|
-
},
|
|
732
|
-
const r = qe(), n = r === null ? null : r.width * (e.x1 - e.x0), s = r === null ? null : r.height * (e.y1 - e.y0),
|
|
733
|
+
}, En = ({ box: e, children: t }) => {
|
|
734
|
+
const r = qe(), n = r === null ? null : r.width * (e.x1 - e.x0), s = r === null ? null : r.height * (e.y1 - e.y0), o = k(() => n === null || s === null ? null : {
|
|
733
735
|
width: n,
|
|
734
736
|
height: s
|
|
735
737
|
}, [n, s]);
|
|
@@ -741,57 +743,57 @@ var A = (e, t) => {
|
|
|
741
743
|
overflow: "hidden",
|
|
742
744
|
pointerEvents: "none",
|
|
743
745
|
children: /* @__PURE__ */ c(Se, {
|
|
744
|
-
size:
|
|
746
|
+
size: o,
|
|
745
747
|
children: t
|
|
746
748
|
})
|
|
747
749
|
});
|
|
748
|
-
},
|
|
749
|
-
var
|
|
750
|
-
var
|
|
750
|
+
}, Ot = "drqe3u0", Ft = "drqe3u1", Kt = "drqe3u2", Ut = "drqe3u3", M = "drqe3u4", jt = "drqe3u5", Wt = "drqe3u6", Yt = "drqe3u7", Y = "drqe3u8", zt = "drqe3u9", Vt = "drqe3ua";
|
|
751
|
+
var Xt = "drqe3uc", Qt = "drqe3ud", Jt = "drqe3ue", Zt = "drqe3uf";
|
|
752
|
+
var er = "drqe3uh", tr = "drqe3ui", ve = {
|
|
751
753
|
enabled: "drqe3uk drqe3uj",
|
|
752
754
|
disabled: "drqe3ul drqe3uj"
|
|
753
755
|
}, ye = {
|
|
754
756
|
ran: "drqe3un drqe3um",
|
|
755
757
|
dim: "drqe3uo drqe3um"
|
|
756
|
-
},
|
|
758
|
+
}, Ge = {
|
|
757
759
|
ran: "drqe3uq drqe3up",
|
|
758
760
|
cached: "drqe3ur drqe3up",
|
|
759
761
|
untouched: "drqe3us drqe3up"
|
|
760
|
-
},
|
|
761
|
-
const { compileBus: n } = ne(), [s] = S(() =>
|
|
762
|
+
}, Tn = ({ width: e = 440, style: t, className: r } = {}) => {
|
|
763
|
+
const { compileBus: n } = ne(), [s] = S(() => ft()), [o, a] = S(!1), [l, d] = S(Ye);
|
|
762
764
|
H(() => {
|
|
763
765
|
const { recordCompile: m } = s.getState(), R = n.getLastTrigger(), v = n.getLastCompile();
|
|
764
766
|
return R && v && m(R, v), n.subscribe(m);
|
|
765
767
|
}, [s, n]);
|
|
766
|
-
const g = re(s, (m) => m.lastCompile),
|
|
768
|
+
const g = re(s, (m) => m.lastCompile), N = re(s, (m) => m.history), I = n.getCacheStats(), T = g === null && N.length === 0, u = () => {
|
|
767
769
|
d((m) => {
|
|
768
770
|
const R = !m;
|
|
769
|
-
return
|
|
771
|
+
return Ve(R), R;
|
|
770
772
|
});
|
|
771
773
|
};
|
|
772
774
|
return /* @__PURE__ */ f("div", {
|
|
773
|
-
className:
|
|
775
|
+
className: tt(Vt, r),
|
|
774
776
|
style: {
|
|
775
777
|
width: e,
|
|
776
778
|
...t
|
|
777
779
|
},
|
|
778
780
|
children: [
|
|
779
781
|
/* @__PURE__ */ f("div", {
|
|
780
|
-
className:
|
|
782
|
+
className: Ot,
|
|
781
783
|
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ c("div", {
|
|
782
|
-
className:
|
|
784
|
+
className: Ft,
|
|
783
785
|
children: "compile cache"
|
|
784
786
|
}), /* @__PURE__ */ c("div", {
|
|
785
|
-
className:
|
|
787
|
+
className: Jt,
|
|
786
788
|
children: T ? "production: stats disabled" : g ? `last: ${g.label} · ${ae(g.durationMs)}` : "awaiting first compile…"
|
|
787
789
|
})] }), /* @__PURE__ */ c("button", {
|
|
788
790
|
type: "button",
|
|
789
791
|
onClick: () => a((m) => !m),
|
|
790
|
-
className:
|
|
791
|
-
children:
|
|
792
|
+
className: Zt,
|
|
793
|
+
children: o ? "▾" : "▴"
|
|
792
794
|
})]
|
|
793
795
|
}),
|
|
794
|
-
!
|
|
796
|
+
!o && /* @__PURE__ */ f("div", {
|
|
795
797
|
className: "drqe3ub",
|
|
796
798
|
children: [/* @__PURE__ */ f("button", {
|
|
797
799
|
type: "button",
|
|
@@ -804,20 +806,20 @@ var Zt = "drqe3uh", er = "drqe3ui", ve = {
|
|
|
804
806
|
children: "next compile reflects this toggle"
|
|
805
807
|
})]
|
|
806
808
|
}),
|
|
807
|
-
!
|
|
809
|
+
!o && !T && /* @__PURE__ */ f(et, { children: [/* @__PURE__ */ c(rr, {
|
|
808
810
|
delta: g?.stages,
|
|
809
811
|
durations: g?.stageDurationsMs,
|
|
810
812
|
cumulative: I
|
|
811
|
-
}), /* @__PURE__ */ c(
|
|
813
|
+
}), /* @__PURE__ */ c(nr, { entries: N })] })
|
|
812
814
|
]
|
|
813
815
|
});
|
|
814
|
-
},
|
|
815
|
-
className:
|
|
816
|
+
}, rr = ({ delta: e, durations: t, cumulative: r }) => /* @__PURE__ */ f("table", {
|
|
817
|
+
className: Kt,
|
|
816
818
|
children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ f("tr", {
|
|
817
|
-
className:
|
|
819
|
+
className: er,
|
|
818
820
|
children: [
|
|
819
821
|
/* @__PURE__ */ c("th", {
|
|
820
|
-
className:
|
|
822
|
+
className: Ut,
|
|
821
823
|
children: "stage"
|
|
822
824
|
}),
|
|
823
825
|
/* @__PURE__ */ c("th", {
|
|
@@ -842,15 +844,15 @@ var Zt = "drqe3uh", er = "drqe3ui", ve = {
|
|
|
842
844
|
})
|
|
843
845
|
]
|
|
844
846
|
}) }), /* @__PURE__ */ c("tbody", { children: se.map((n) => {
|
|
845
|
-
const s = e?.[n],
|
|
847
|
+
const s = e?.[n], o = sr(s);
|
|
846
848
|
return /* @__PURE__ */ f("tr", {
|
|
847
|
-
className:
|
|
849
|
+
className: Xt,
|
|
848
850
|
children: [
|
|
849
851
|
/* @__PURE__ */ f("td", {
|
|
850
|
-
className:
|
|
852
|
+
className: jt,
|
|
851
853
|
children: [
|
|
852
854
|
/* @__PURE__ */ c("span", {
|
|
853
|
-
className:
|
|
855
|
+
className: Ge[o],
|
|
854
856
|
"aria-hidden": !0
|
|
855
857
|
}),
|
|
856
858
|
" ",
|
|
@@ -859,10 +861,10 @@ var Zt = "drqe3uh", er = "drqe3ui", ve = {
|
|
|
859
861
|
}),
|
|
860
862
|
/* @__PURE__ */ c("td", {
|
|
861
863
|
className: Y,
|
|
862
|
-
children: t === void 0 ||
|
|
864
|
+
children: t === void 0 || o === "untouched" ? "—" : ae(t[n])
|
|
863
865
|
}),
|
|
864
866
|
/* @__PURE__ */ c("td", {
|
|
865
|
-
className:
|
|
867
|
+
className: o === "ran" ? ye.ran : ye.dim,
|
|
866
868
|
children: s?.misses ?? 0
|
|
867
869
|
}),
|
|
868
870
|
/* @__PURE__ */ c("td", {
|
|
@@ -880,27 +882,27 @@ var Zt = "drqe3uh", er = "drqe3ui", ve = {
|
|
|
880
882
|
]
|
|
881
883
|
}, n);
|
|
882
884
|
}) })]
|
|
883
|
-
}),
|
|
884
|
-
className:
|
|
885
|
+
}), nr = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ f("div", {
|
|
886
|
+
className: Qt,
|
|
885
887
|
children: [/* @__PURE__ */ c("div", {
|
|
886
|
-
className:
|
|
888
|
+
className: tr,
|
|
887
889
|
children: "recent compiles"
|
|
888
890
|
}), e.map((t) => {
|
|
889
|
-
const r =
|
|
891
|
+
const r = or(t.stages, (o) => o.misses > 0), n = se.length;
|
|
890
892
|
return /* @__PURE__ */ f("div", {
|
|
891
|
-
className:
|
|
893
|
+
className: Wt,
|
|
892
894
|
children: [
|
|
893
895
|
/* @__PURE__ */ c("span", {
|
|
894
|
-
className:
|
|
896
|
+
className: Ge[r === 0 ? "cached" : "ran"],
|
|
895
897
|
"aria-hidden": !0
|
|
896
898
|
}),
|
|
897
899
|
/* @__PURE__ */ c("span", {
|
|
898
|
-
className:
|
|
900
|
+
className: Yt,
|
|
899
901
|
title: t.label,
|
|
900
902
|
children: t.label
|
|
901
903
|
}),
|
|
902
904
|
/* @__PURE__ */ f("span", {
|
|
903
|
-
className:
|
|
905
|
+
className: zt,
|
|
904
906
|
children: [
|
|
905
907
|
r,
|
|
906
908
|
"/",
|
|
@@ -912,12 +914,12 @@ var Zt = "drqe3uh", er = "drqe3ui", ve = {
|
|
|
912
914
|
]
|
|
913
915
|
}, t.id);
|
|
914
916
|
})]
|
|
915
|
-
}),
|
|
917
|
+
}), sr = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", or = (e, t) => {
|
|
916
918
|
let r = 0;
|
|
917
919
|
for (const n of se) t(e[n]) && (r += 1);
|
|
918
920
|
return r;
|
|
919
|
-
}, ae = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`,
|
|
920
|
-
const { history: e } = ne(), { stack: t, undo: r, redo: n } = e, s = p((l) => t.subscribe(l), [t]),
|
|
921
|
+
}, ae = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, Rn = () => {
|
|
922
|
+
const { history: e } = ne(), { stack: t, undo: r, redo: n } = e, s = p((l) => t.subscribe(l), [t]), o = p(() => t.getSnapshot(), [t]), a = Ze(s, o, o);
|
|
921
923
|
return k(() => ({
|
|
922
924
|
...a,
|
|
923
925
|
undo: r,
|
|
@@ -927,7 +929,7 @@ var Zt = "drqe3uh", er = "drqe3ui", ve = {
|
|
|
927
929
|
r,
|
|
928
930
|
n
|
|
929
931
|
]);
|
|
930
|
-
},
|
|
932
|
+
}, ar = /* @__PURE__ */ new Set([
|
|
931
933
|
"button",
|
|
932
934
|
"checkbox",
|
|
933
935
|
"color",
|
|
@@ -938,98 +940,98 @@ var Zt = "drqe3uh", er = "drqe3ui", ve = {
|
|
|
938
940
|
"range",
|
|
939
941
|
"reset",
|
|
940
942
|
"submit"
|
|
941
|
-
]),
|
|
943
|
+
]), Gn = (e, t = {}) => {
|
|
942
944
|
const { target: r, enabled: n = !0 } = t;
|
|
943
945
|
H(() => {
|
|
944
|
-
const s =
|
|
946
|
+
const s = ir(r);
|
|
945
947
|
if (!n || !s) return;
|
|
946
|
-
const
|
|
947
|
-
if (!
|
|
948
|
+
const o = (a) => {
|
|
949
|
+
if (!cr(a) || a.defaultPrevented || lr(a.target)) return;
|
|
948
950
|
const l = _e(a);
|
|
949
951
|
if (!l) return;
|
|
950
952
|
const d = e.current;
|
|
951
953
|
d && (l === "undo" ? d.undo() : d.redo()) && a.preventDefault();
|
|
952
954
|
};
|
|
953
|
-
return s.addEventListener("keydown",
|
|
955
|
+
return s.addEventListener("keydown", o), () => s.removeEventListener("keydown", o);
|
|
954
956
|
}, [
|
|
955
957
|
e,
|
|
956
958
|
r,
|
|
957
959
|
n
|
|
958
960
|
]);
|
|
959
|
-
},
|
|
961
|
+
}, ir = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, cr = (e) => "key" in e, lr = (e) => e instanceof HTMLInputElement ? !ar.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, Nn = () => {
|
|
960
962
|
const { targetBoundaryStore: e } = ne();
|
|
961
963
|
return re(e, (t) => t.boundary);
|
|
962
964
|
};
|
|
963
965
|
export {
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
966
|
+
Mr as CanvasTextMeasurer,
|
|
967
|
+
on as DefaultFooter,
|
|
968
|
+
kt as DefaultGeomCircle,
|
|
969
|
+
Ht as DefaultGeomLine,
|
|
970
|
+
xt as DefaultGeomPath,
|
|
971
|
+
$t as DefaultGeomRect,
|
|
972
|
+
Xr as DefaultGrid,
|
|
973
|
+
Cr as DefaultHeader,
|
|
974
|
+
qr as DefaultSwatch,
|
|
975
|
+
Qr as DefaultTooltip,
|
|
976
|
+
Tn as DevToolsPanel,
|
|
977
|
+
pr as GRAPH_MODES,
|
|
978
|
+
fn as GeomCircle,
|
|
979
|
+
vn as GeomLine,
|
|
980
|
+
Rr as GeomOverpaint,
|
|
981
|
+
Sn as GeomPath,
|
|
982
|
+
yn as GeomRect,
|
|
983
|
+
ct as GraphErrorBoundary,
|
|
982
984
|
ue as GraphErrorPanel,
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
985
|
+
qt as GraphProvider,
|
|
986
|
+
_r as GraphRenderer,
|
|
987
|
+
hr as GraphyBadge,
|
|
988
|
+
vr as HoverProvider,
|
|
989
|
+
nn as IntlProvider,
|
|
990
|
+
Sr as IntroFade,
|
|
991
|
+
Zr as IntroWipeClip,
|
|
992
|
+
Ir as TextMeasurerProvider,
|
|
993
|
+
Br as ThemeProvider,
|
|
994
|
+
En as UnitBoxSvg,
|
|
995
|
+
bn as UnitSpaceSvg,
|
|
996
|
+
rn as buildDotsEditOutlineShapes,
|
|
997
|
+
gn as createGraphyKit,
|
|
998
|
+
en as darkTheme,
|
|
999
|
+
yr as defineGeomRenderer,
|
|
1000
|
+
Lr as getBuiltInEditOutlineShapes,
|
|
1001
|
+
sn as lightTheme,
|
|
1002
|
+
kr as lightenCss,
|
|
1003
|
+
fr as projectPointCartesian,
|
|
1004
|
+
lt as pruneSelection,
|
|
1003
1005
|
A as readPositionPixels,
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1006
|
+
pn as readRectPixels,
|
|
1007
|
+
Pr as resolveGraphyBadgeVariant,
|
|
1008
|
+
Dr as resolvePathStroke,
|
|
1009
|
+
wr as scalePointToPanel,
|
|
1010
|
+
Fr as stampAxisEditTarget,
|
|
1011
|
+
br as stampGridEditTarget,
|
|
1012
|
+
Tr as stampLegendEditTarget,
|
|
1013
|
+
jr as useElementScreenRect,
|
|
1014
|
+
Hr as useFormattingLocale,
|
|
1013
1015
|
Nr as useGeomHitTest,
|
|
1014
|
-
|
|
1016
|
+
Er as useGeomHover,
|
|
1015
1017
|
qe as useGeomPanelSize,
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1018
|
+
gr as useGeomReaderTree,
|
|
1019
|
+
Gr as useGeomStyleReader,
|
|
1020
|
+
Yr as useGraphCommands,
|
|
1021
|
+
Or as useGraphHandle,
|
|
1022
|
+
Rn as useGraphHistory,
|
|
1023
|
+
Gn as useGraphHistoryShortcuts,
|
|
1024
|
+
zr as useGraphLocale,
|
|
1025
|
+
Ar as useGraphSelection,
|
|
1026
|
+
tn as useGuidesTakePress,
|
|
1027
|
+
Vr as useHandleScene,
|
|
1028
|
+
Wr as useHoverState,
|
|
1029
|
+
xr as usePaintDefs,
|
|
1030
|
+
Jr as useResolvedStyle,
|
|
1031
|
+
Kr as useSceneSelector,
|
|
1032
|
+
Ur as useStyleReaderTree,
|
|
1033
|
+
mr as useStyleResolver,
|
|
1032
1034
|
Nn as useTargetBoundary,
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
+
ur as useTextMeasurer,
|
|
1036
|
+
$r as vars
|
|
1035
1037
|
};
|