@graphysdk/react-renderer 1.9.0-beta.1795524651682 → 1.9.0-beta.1795525230177
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 +25 -25
- package/dist/history-chords-CET3xtCe.cjs +2 -0
- package/dist/{history-chords-oyGjKaN7.js → history-chords-Ch8BcBMH.js} +1647 -1641
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +554 -549
- package/package.json +4 -4
- package/dist/history-chords-ZSpvXOeV.cjs +0 -2
package/dist/index.mjs
CHANGED
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { COMPILER_STAGE_KEYS as
|
|
3
|
-
import { Component as
|
|
4
|
-
import { Fragment as
|
|
1
|
+
import { $ as Or, $n as $e, Bn as Me, Ct as Br, Et as Fr, Fn as Kr, Ft as Ur, Gn as Wr, H as zr, In as He, It as Yr, Jn as Vr, Jt as jr, Ln as Q, Mn as Xr, Mt as Jr, N as Qr, Nn as K, On as Zr, Pn as Ie, Qn as en, Rn as we, Rt as tn, Sn as rn, Tt as nn, U as sn, Un as on, V as an, Vn as Z, Wn as U, Wt as cn, Xn as xe, Xt as ln, Y as dn, Yn as Ae, Yt as un, Zn as Oe, _n as mn, _r as me, a as hn, an as Be, ar as Fe, br as ae, cn as ee, cr as Ce, dr as gn, en as Ke, et as pn, fn, fr as vn, gn as yn, gr as re, hn as Sn, i as bn, in as Ue, ir as We, jn as Tn, l as Rn, ln as ze, lr as En, mn as Ye, mr as Ve, n as Gn, nn as je, nr as Pe, on as Nn, or as Xe, pn as Je, pr as Qe, qn as In, qt as wn, r as Cn, rr as Ze, sn as Pn, sr as ne, t as et, tr as tt, tt as Ln, un as Dn, ur as _n, vn as qn, vr as rt, w as kn, wt as $n, yr as nt, zn as st } from "./history-chords-Ch8BcBMH.js";
|
|
2
|
+
import { COMPILER_STAGE_KEYS as ie, DEFAULT_LOCALE as ot, Geom as at, GraphCompilationSession as it, areEditTargetsEqual as ct, buildDiagnostic as he, buildPointSymbolPath as lt, canonicalizeLocale as dt, createAnchorResolver as ut, createCompiler as mt, createDataLabelPlacementResolver as ht, createSpecBuilder as gt, createStyleResolver as Le, findAnnotation as pt, findIntlLocale as ft, findLayerById as ge, foldGeomCornerRadii as vt, isCompilerCachingEnabled as yt, isGeometricSymbol as ce, isImageSymbol as St, resolveDefinition as bt, resolveGeomCornerRadiusPx as pe, setCompilerCachingEnabled as Tt, toPercent as X } from "@graphysdk/viz-engine";
|
|
3
|
+
import { Component as Rt, useCallback as f, useEffect as D, useId as Et, useImperativeHandle as Gt, useMemo as $, useRef as fe, useState as v, useSyncExternalStore as Nt } from "react";
|
|
4
|
+
import { Fragment as It, jsx as c, jsxs as y } from "react/jsx-runtime";
|
|
5
5
|
import { useStore as se } from "zustand";
|
|
6
|
-
import { createStore as
|
|
7
|
-
import
|
|
8
|
-
import './index.css';
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { createStore as le } from "zustand/vanilla";
|
|
7
|
+
import wt from "clsx";
|
|
8
|
+
import './index.css';function oe(e) {
|
|
9
|
+
for (const t of e) (t.severity === "error" ? console.error : console.warn)(`[graphy] ${t.code}: ${t.message}`, t);
|
|
10
|
+
}
|
|
11
|
+
var Ct = "_1a5iqpb0", Pt = "_1a5iqpb1";
|
|
12
|
+
var Lt = "_1a5iqpb3", Dt = "_1a5iqpb4", _t = "_1a5iqpb5";
|
|
13
|
+
var ve = ({ errors: e }) => {
|
|
11
14
|
const [t, ...r] = e;
|
|
12
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ y("div", {
|
|
13
16
|
role: "alert",
|
|
14
|
-
className:
|
|
17
|
+
className: Ct,
|
|
15
18
|
children: [
|
|
16
19
|
/* @__PURE__ */ c("strong", {
|
|
17
|
-
className:
|
|
20
|
+
className: Pt,
|
|
18
21
|
children: "This chart could not be rendered."
|
|
19
22
|
}),
|
|
20
|
-
t && /* @__PURE__ */ c(
|
|
23
|
+
t && /* @__PURE__ */ c(ye, { diagnostic: t }),
|
|
21
24
|
r.length > 0 && /* @__PURE__ */ c("ul", {
|
|
22
25
|
className: "_1a5iqpb2",
|
|
23
|
-
children: r.map((n, s) => /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
|
|
26
|
+
children: r.map((n, s) => /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(ye, { diagnostic: n }) }, `${n.code}-${s}`))
|
|
24
27
|
})
|
|
25
28
|
]
|
|
26
29
|
});
|
|
27
|
-
},
|
|
28
|
-
className:
|
|
30
|
+
}, ye = ({ diagnostic: e }) => /* @__PURE__ */ y("div", {
|
|
31
|
+
className: Lt,
|
|
29
32
|
children: [
|
|
30
33
|
/* @__PURE__ */ c("span", {
|
|
31
|
-
className:
|
|
34
|
+
className: Dt,
|
|
32
35
|
children: e.code
|
|
33
36
|
}),
|
|
34
37
|
/* @__PURE__ */ c("p", {
|
|
35
|
-
className:
|
|
38
|
+
className: _t,
|
|
36
39
|
children: e.message
|
|
37
40
|
}),
|
|
38
41
|
e.suggestion && /* @__PURE__ */ c("p", {
|
|
@@ -41,47 +44,47 @@ var ge = ({ errors: e }) => {
|
|
|
41
44
|
})
|
|
42
45
|
]
|
|
43
46
|
});
|
|
44
|
-
function
|
|
47
|
+
function qt(e = [], t = []) {
|
|
45
48
|
return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
|
|
46
49
|
}
|
|
47
|
-
var
|
|
50
|
+
var kt = class extends Rt {
|
|
48
51
|
constructor(...e) {
|
|
49
52
|
super(...e), this.state = { caughtDiagnostic: null };
|
|
50
53
|
}
|
|
51
54
|
static getDerivedStateFromError(e) {
|
|
52
|
-
return { caughtDiagnostic:
|
|
55
|
+
return { caughtDiagnostic: he(e) };
|
|
53
56
|
}
|
|
54
57
|
componentDidCatch(e, t) {
|
|
55
|
-
const r =
|
|
56
|
-
|
|
58
|
+
const r = he(e);
|
|
59
|
+
oe([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
|
|
57
60
|
}
|
|
58
61
|
componentDidUpdate(e) {
|
|
59
|
-
this.state.caughtDiagnostic && !
|
|
62
|
+
this.state.caughtDiagnostic && !qt(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
|
|
60
63
|
}
|
|
61
64
|
render() {
|
|
62
65
|
const { caughtDiagnostic: e } = this.state;
|
|
63
|
-
if (e) return /* @__PURE__ */ c(
|
|
66
|
+
if (e) return /* @__PURE__ */ c(ve, { errors: [e] });
|
|
64
67
|
const { forcedErrors: t, children: r } = this.props;
|
|
65
|
-
return t && t.length > 0 ? /* @__PURE__ */ c(
|
|
68
|
+
return t && t.length > 0 ? /* @__PURE__ */ c(ve, { errors: t }) : r;
|
|
66
69
|
}
|
|
67
|
-
},
|
|
68
|
-
const t =
|
|
69
|
-
return t instanceof
|
|
70
|
-
},
|
|
71
|
-
const r = e.filter((n) =>
|
|
70
|
+
}, De = (e) => typeof e == "object" && "geom" in e && "render" in e, _e = (e) => {
|
|
71
|
+
const t = bt(e);
|
|
72
|
+
return t instanceof at ? t : null;
|
|
73
|
+
}, $t = (e, t) => {
|
|
74
|
+
const r = e.filter((n) => Mt(n, t));
|
|
72
75
|
return r.length === e.length ? e : r;
|
|
73
|
-
},
|
|
74
|
-
selection:
|
|
75
|
-
setSelection: (t) => e((r) =>
|
|
76
|
-
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection:
|
|
77
|
-
})),
|
|
76
|
+
}, Mt = (e, t) => e.kind === "annotation" ? pt(t.annotations, e.id) !== null : e.kind === "observations" ? ge(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? ge(t.layers, e.layerId) !== void 0 : !0, Se = [], Ht = () => le((e) => ({
|
|
77
|
+
selection: Se,
|
|
78
|
+
setSelection: (t) => e((r) => xt(r.selection, t) ? r : { selection: t }),
|
|
79
|
+
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: Se })
|
|
80
|
+
})), xt = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
|
|
78
81
|
const s = t[n];
|
|
79
|
-
return s !== void 0 &&
|
|
80
|
-
}),
|
|
81
|
-
if (!
|
|
82
|
+
return s !== void 0 && ct(r, s);
|
|
83
|
+
}), At = 5, Ot = (e) => {
|
|
84
|
+
if (!Pe) return {
|
|
82
85
|
emit: () => {
|
|
83
86
|
},
|
|
84
|
-
subscribe: () =>
|
|
87
|
+
subscribe: () => Ft,
|
|
85
88
|
getLastTrigger: () => null,
|
|
86
89
|
getLastCompile: () => null,
|
|
87
90
|
getCacheStats: () => e.getCacheStats()
|
|
@@ -93,7 +96,7 @@ var Lt = class extends yt {
|
|
|
93
96
|
const s = e.getLastCompile();
|
|
94
97
|
if (s) {
|
|
95
98
|
r = n;
|
|
96
|
-
for (const
|
|
99
|
+
for (const o of t) o(n, s);
|
|
97
100
|
}
|
|
98
101
|
},
|
|
99
102
|
subscribe: (n) => (t.add(n), () => {
|
|
@@ -103,7 +106,7 @@ var Lt = class extends yt {
|
|
|
103
106
|
getLastCompile: () => e.getLastCompile(),
|
|
104
107
|
getCacheStats: () => e.getCacheStats()
|
|
105
108
|
};
|
|
106
|
-
},
|
|
109
|
+
}, Bt = () => le((e) => ({
|
|
107
110
|
lastCompile: null,
|
|
108
111
|
history: [],
|
|
109
112
|
nextId: 1,
|
|
@@ -112,20 +115,20 @@ var Lt = class extends yt {
|
|
|
112
115
|
if (n.lastSnapshot === r) return n;
|
|
113
116
|
const s = {
|
|
114
117
|
id: n.nextId,
|
|
115
|
-
label:
|
|
118
|
+
label: Kt(t),
|
|
116
119
|
stages: r.stages,
|
|
117
120
|
stageDurationsMs: r.stageDurationsMs,
|
|
118
121
|
durationMs: r.durationMs
|
|
119
122
|
};
|
|
120
123
|
return {
|
|
121
124
|
lastCompile: s,
|
|
122
|
-
history:
|
|
125
|
+
history: Ut(n.history, s, At),
|
|
123
126
|
nextId: n.nextId + 1,
|
|
124
127
|
lastSnapshot: r
|
|
125
128
|
};
|
|
126
129
|
})
|
|
127
|
-
})),
|
|
128
|
-
},
|
|
130
|
+
})), Ft = () => {
|
|
131
|
+
}, Kt = (e) => {
|
|
129
132
|
switch (e.kind) {
|
|
130
133
|
case "init":
|
|
131
134
|
return "init";
|
|
@@ -136,14 +139,14 @@ var Lt = class extends yt {
|
|
|
136
139
|
case "command":
|
|
137
140
|
return e.command.metadata.description;
|
|
138
141
|
}
|
|
139
|
-
},
|
|
142
|
+
}, Ut = (e, t, r) => {
|
|
140
143
|
const n = e.length >= r ? e.length - (r - 1) : 0;
|
|
141
144
|
return [...e.slice(n), t];
|
|
142
145
|
};
|
|
143
|
-
function
|
|
144
|
-
const t = e.filter(
|
|
146
|
+
function be(e) {
|
|
147
|
+
const t = e.filter(De), r = /* @__PURE__ */ new Set([...Object.keys(ze), ...t.map((l) => l.geom)]), n = [], s = /* @__PURE__ */ new Set();
|
|
145
148
|
for (const l of e) {
|
|
146
|
-
const d =
|
|
149
|
+
const d = _e(l);
|
|
147
150
|
d === null || r.has(d.type) || s.has(d.type) || (s.add(d.type), n.push({
|
|
148
151
|
kind: "userInput",
|
|
149
152
|
severity: "error",
|
|
@@ -156,19 +159,19 @@ function ve(e) {
|
|
|
156
159
|
suggestion: `Add a render half for it: \`defineGeomRenderer(${d.type}Geom, { coord, render })\`, then include it in \`plugins\`.`
|
|
157
160
|
}));
|
|
158
161
|
}
|
|
159
|
-
const
|
|
162
|
+
const o = /* @__PURE__ */ new Map();
|
|
160
163
|
for (const l of t) {
|
|
161
164
|
if ("definition" in l) continue;
|
|
162
|
-
const d = `${l.geom}|${l.coord}`, h =
|
|
163
|
-
h ? h.count += 1 :
|
|
165
|
+
const d = `${l.geom}|${l.coord}`, h = o.get(d);
|
|
166
|
+
h ? h.count += 1 : o.set(d, {
|
|
164
167
|
geom: l.geom,
|
|
165
168
|
coord: l.coord,
|
|
166
169
|
count: 1
|
|
167
170
|
});
|
|
168
171
|
}
|
|
169
|
-
const
|
|
170
|
-
for (const { geom: l, coord: d, count: h } of
|
|
171
|
-
h < 2 ||
|
|
172
|
+
const a = [];
|
|
173
|
+
for (const { geom: l, coord: d, count: h } of o.values())
|
|
174
|
+
h < 2 || a.push({
|
|
172
175
|
kind: "userInput",
|
|
173
176
|
severity: "warning",
|
|
174
177
|
code: "DUPLICATE_REGISTERED_TYPE",
|
|
@@ -179,47 +182,47 @@ function ve(e) {
|
|
|
179
182
|
},
|
|
180
183
|
suggestion: `Keep a single render-only override for ('${l}', '${d}').`
|
|
181
184
|
});
|
|
182
|
-
return
|
|
185
|
+
return a.push(...Zt(e)), {
|
|
183
186
|
errors: n,
|
|
184
|
-
warnings:
|
|
187
|
+
warnings: a
|
|
185
188
|
};
|
|
186
189
|
}
|
|
187
|
-
function
|
|
188
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
189
|
-
for (const
|
|
190
|
-
t(
|
|
190
|
+
function Wt(e, t) {
|
|
191
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), o = [];
|
|
192
|
+
for (const a of n)
|
|
193
|
+
t(a.geom, r.type) !== null || s.has(a.geom) || (s.add(a.geom), o.push({
|
|
191
194
|
kind: "userInput",
|
|
192
195
|
severity: "warning",
|
|
193
196
|
code: "MISSING_GEOM_RENDERER",
|
|
194
|
-
message: `No renderer for geom '${
|
|
197
|
+
message: `No renderer for geom '${a.geom}' under ${r.type} coords; the layer is not painted.`,
|
|
195
198
|
context: {
|
|
196
|
-
requested:
|
|
199
|
+
requested: a.geom,
|
|
197
200
|
kind: "geom-renderer"
|
|
198
201
|
},
|
|
199
|
-
suggestion: `Register a renderer for ('${
|
|
202
|
+
suggestion: `Register a renderer for ('${a.geom}', '${r.type}') via \`defineGeomRenderer\`.`
|
|
200
203
|
}));
|
|
201
|
-
return
|
|
204
|
+
return o;
|
|
202
205
|
}
|
|
203
|
-
function
|
|
204
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
205
|
-
for (const
|
|
206
|
-
if (
|
|
207
|
-
const l = t(
|
|
208
|
-
l === null || l.hitTest ||
|
|
206
|
+
function zt(e, t) {
|
|
207
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), o = [];
|
|
208
|
+
for (const a of n) {
|
|
209
|
+
if (a.interactive === !1 || a.spatialKind !== "renderHitTest" || s.has(a.geom)) continue;
|
|
210
|
+
const l = t(a.geom, r.type);
|
|
211
|
+
l === null || l.hitTest || ee(l) || (s.add(a.geom), o.push({
|
|
209
212
|
kind: "userInput",
|
|
210
213
|
severity: "warning",
|
|
211
214
|
code: "MISSING_RENDER_HIT_TEST",
|
|
212
|
-
message: `Geom '${
|
|
215
|
+
message: `Geom '${a.geom}' declares spatialKind 'renderHitTest' but its renderer provides no hit-test; the layer has no hover.`,
|
|
213
216
|
context: {
|
|
214
|
-
requested:
|
|
217
|
+
requested: a.geom,
|
|
215
218
|
kind: "geom-renderer"
|
|
216
219
|
},
|
|
217
|
-
suggestion: `Add a \`hitTest\` factory (precomputed geometry) or a live render (\`{ fn, options: { live: true } }\`, live simulation) to the renderer for ('${
|
|
220
|
+
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}').`
|
|
218
221
|
}));
|
|
219
222
|
}
|
|
220
|
-
return
|
|
223
|
+
return o;
|
|
221
224
|
}
|
|
222
|
-
function
|
|
225
|
+
function Yt(e) {
|
|
223
226
|
const t = /* @__PURE__ */ new Set(), r = [];
|
|
224
227
|
for (const n of e.layers) {
|
|
225
228
|
const s = n.identityKey;
|
|
@@ -237,26 +240,26 @@ function Kt(e) {
|
|
|
237
240
|
}
|
|
238
241
|
return r;
|
|
239
242
|
}
|
|
240
|
-
function
|
|
241
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
242
|
-
for (const
|
|
243
|
-
if (
|
|
244
|
-
const l = t(
|
|
245
|
-
l === null || !l.hitTest || !
|
|
243
|
+
function Vt(e, t) {
|
|
244
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), o = [];
|
|
245
|
+
for (const a of n) {
|
|
246
|
+
if (a.interactive === !1 || a.spatialKind !== "renderHitTest" || s.has(a.geom)) continue;
|
|
247
|
+
const l = t(a.geom, r.type);
|
|
248
|
+
l === null || !l.hitTest || !ee(l) || (s.add(a.geom), o.push({
|
|
246
249
|
kind: "userInput",
|
|
247
250
|
severity: "warning",
|
|
248
251
|
code: "CONFLICTING_RENDER_HIT_TEST",
|
|
249
|
-
message: `Geom '${
|
|
252
|
+
message: `Geom '${a.geom}' declares both a \`hitTest\` factory and a live render; these are alternatives, so only the live render is used.`,
|
|
250
253
|
context: {
|
|
251
|
-
requested:
|
|
254
|
+
requested: a.geom,
|
|
252
255
|
kind: "geom-renderer"
|
|
253
256
|
},
|
|
254
257
|
suggestion: "Keep one: a `hitTest` factory for precomputed geometry, OR a live render (`{ fn, options: { live: true } }`) for a live simulation."
|
|
255
258
|
}));
|
|
256
259
|
}
|
|
257
|
-
return
|
|
260
|
+
return o;
|
|
258
261
|
}
|
|
259
|
-
function
|
|
262
|
+
function jt(e, t) {
|
|
260
263
|
const r = /* @__PURE__ */ new Set(), n = [];
|
|
261
264
|
for (const s of e.layers)
|
|
262
265
|
s.interactive !== !1 && (s.spatialKind !== "renderHitTest" || r.has(s.geom) || t.hasCapability(s.geom) || (r.add(s.geom), n.push({
|
|
@@ -272,28 +275,28 @@ function zt(e, t) {
|
|
|
272
275
|
})));
|
|
273
276
|
return n;
|
|
274
277
|
}
|
|
275
|
-
function
|
|
276
|
-
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(),
|
|
277
|
-
for (const
|
|
278
|
-
if (
|
|
279
|
-
const l = t(
|
|
280
|
-
l === null || !
|
|
278
|
+
function Xt(e, t) {
|
|
279
|
+
const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), o = [];
|
|
280
|
+
for (const a of n) {
|
|
281
|
+
if (a.interactive === !1 || a.spatialKind === "renderHitTest" || s.has(a.geom)) continue;
|
|
282
|
+
const l = t(a.geom, r.type);
|
|
283
|
+
l === null || !ee(l) || (s.add(a.geom), o.push({
|
|
281
284
|
kind: "userInput",
|
|
282
285
|
severity: "warning",
|
|
283
286
|
code: "LIVE_RENDER_REQUIRES_RENDER_HIT_TEST",
|
|
284
|
-
message: `Geom '${
|
|
287
|
+
message: `Geom '${a.geom}' declares a live render but its layer's spatialKind is '${a.spatialKind}', not 'renderHitTest'; its push-path hover resolves to nothing.`,
|
|
285
288
|
context: {
|
|
286
|
-
requested:
|
|
289
|
+
requested: a.geom,
|
|
287
290
|
kind: "geom-renderer"
|
|
288
291
|
},
|
|
289
292
|
suggestion: "Have the geom's manifest yield spatialKind 'renderHitTest' so the scene layer carries the `byKey` index the live render's `pushHover` resolves against."
|
|
290
293
|
}));
|
|
291
294
|
}
|
|
292
|
-
return
|
|
295
|
+
return o;
|
|
293
296
|
}
|
|
294
|
-
function
|
|
297
|
+
function Jt(e, t) {
|
|
295
298
|
let r;
|
|
296
|
-
return e.layers.flatMap((n, s) =>
|
|
299
|
+
return e.layers.flatMap((n, s) => ee(t(n.geom, e.coordSystem.type)) ? Qt(n) ? (r ??= Le().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
|
|
297
300
|
kind: "userInput",
|
|
298
301
|
severity: "warning",
|
|
299
302
|
code: "INVALID_STYLE_RULE",
|
|
@@ -306,11 +309,11 @@ function Yt(e, t) {
|
|
|
306
309
|
suggestion: "Remove the hovered overpaint, or paint the hover treatment in the geom's live render."
|
|
307
310
|
}]) : [] : []);
|
|
308
311
|
}
|
|
309
|
-
var
|
|
310
|
-
function
|
|
312
|
+
var Qt = (e) => [e.styles.defaults, e.styles.overrides].some((t) => t.some((r) => r.state === "hovered" && (r.declarations.overpaint?.length ?? 0) > 0));
|
|
313
|
+
function Zt(e) {
|
|
311
314
|
const t = /* @__PURE__ */ new Set(), r = [];
|
|
312
315
|
for (const n of e) {
|
|
313
|
-
const s =
|
|
316
|
+
const s = _e(n);
|
|
314
317
|
s === null || t.has(s.type) || s.dataLabelCoordTypes.length === 0 || s.getDataLabelPlacements !== void 0 || (t.add(s.type), r.push({
|
|
315
318
|
kind: "userInput",
|
|
316
319
|
severity: "warning",
|
|
@@ -325,139 +328,140 @@ function jt(e) {
|
|
|
325
328
|
}
|
|
326
329
|
return r;
|
|
327
330
|
}
|
|
328
|
-
var
|
|
331
|
+
var er = (e) => le((t) => ({
|
|
329
332
|
scene: e,
|
|
330
333
|
setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
|
|
331
|
-
})),
|
|
332
|
-
const
|
|
333
|
-
|
|
334
|
+
})), tr = ({ spec: e, data: t, colorScheme: r, plugins: n, theme: s, resolveRenderer: o, anchorResolver: a, onSpecChange: l, onError: d, onWarnings: h }) => {
|
|
335
|
+
const p = ne(l), C = ne(d), P = ne(h), [R] = v(() => rt(oe, (i) => {
|
|
336
|
+
P.current?.(i);
|
|
337
|
+
})), [{ session: u, compileBus: g, findGeom: G }] = v(() => {
|
|
338
|
+
const i = mt({
|
|
334
339
|
plugins: n,
|
|
335
340
|
theme: s
|
|
336
341
|
});
|
|
337
342
|
return {
|
|
338
|
-
session: new
|
|
339
|
-
compileBus:
|
|
340
|
-
findGeom: (
|
|
343
|
+
session: new it(i),
|
|
344
|
+
compileBus: Ot(i),
|
|
345
|
+
findGeom: (m) => i.findGeom(m)
|
|
341
346
|
};
|
|
342
|
-
}), [
|
|
343
|
-
const
|
|
347
|
+
}), [E] = v(() => {
|
|
348
|
+
const i = be(n ?? []), m = be(s?.plugins ?? []);
|
|
344
349
|
return {
|
|
345
|
-
errors: [...
|
|
346
|
-
warnings: [...
|
|
350
|
+
errors: [...m.errors, ...i.errors],
|
|
351
|
+
warnings: [...m.warnings, ...i.warnings]
|
|
347
352
|
};
|
|
348
|
-
}),
|
|
349
|
-
if (!
|
|
350
|
-
if (
|
|
353
|
+
}), M = fe(null), [L] = v(rr), T = fe(null), S = f((i) => E.errors.length === 0 ? i : [...E.errors, ...i ?? []], [E]), _ = f((i) => {
|
|
354
|
+
if (!i.ok) return i.errors;
|
|
355
|
+
if (T.current) T.current.getState().setScene(i.scene);
|
|
351
356
|
else {
|
|
352
|
-
const
|
|
353
|
-
|
|
357
|
+
const m = er(i.scene);
|
|
358
|
+
m.subscribe(L.notify), T.current = m, L.notify();
|
|
354
359
|
}
|
|
355
360
|
return null;
|
|
356
|
-
}, [
|
|
357
|
-
const
|
|
361
|
+
}, [L]), [W, N] = v(() => {
|
|
362
|
+
const i = u.compile({
|
|
358
363
|
spec: e,
|
|
359
364
|
data: t,
|
|
360
365
|
colorScheme: r
|
|
361
366
|
});
|
|
362
|
-
return
|
|
363
|
-
}),
|
|
364
|
-
...
|
|
365
|
-
...
|
|
366
|
-
...
|
|
367
|
-
...
|
|
368
|
-
...
|
|
369
|
-
...
|
|
370
|
-
...
|
|
371
|
-
...
|
|
372
|
-
] :
|
|
373
|
-
|
|
374
|
-
}, [
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
const o = D.current;
|
|
379
|
-
o && (b([...y.errors, ...o.ok ? [] : o.errors]), C([...y.warnings, ...P(o)]), o.ok && m.emit({ kind: "init" }));
|
|
367
|
+
return M.current = i, S(_(i));
|
|
368
|
+
}), I = f((i) => i.ok ? [
|
|
369
|
+
...i.warnings,
|
|
370
|
+
...Wt(i.scene, o),
|
|
371
|
+
...zt(i.scene, o),
|
|
372
|
+
...Yt(i.scene),
|
|
373
|
+
...Vt(i.scene, o),
|
|
374
|
+
...Xt(i.scene, o),
|
|
375
|
+
...Jt(i.scene, o),
|
|
376
|
+
...jt(i.scene, a)
|
|
377
|
+
] : i.warnings, [o, a]), w = f((i) => {
|
|
378
|
+
i.length !== 0 && (oe(i), C.current?.(i));
|
|
379
|
+
}, [C]);
|
|
380
|
+
D(() => {
|
|
381
|
+
const i = M.current;
|
|
382
|
+
i && (w([...E.errors, ...i.ok ? [] : i.errors]), R(re, [...E.warnings, ...I(i)]), i.ok && g.emit({ kind: "init" }));
|
|
380
383
|
}, [
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
]),
|
|
387
|
-
const
|
|
384
|
+
g,
|
|
385
|
+
w,
|
|
386
|
+
R,
|
|
387
|
+
E,
|
|
388
|
+
I
|
|
389
|
+
]), D(() => {
|
|
390
|
+
const i = u.update({
|
|
388
391
|
spec: e,
|
|
389
392
|
data: t,
|
|
390
393
|
colorScheme: r
|
|
391
394
|
});
|
|
392
|
-
if (!
|
|
393
|
-
|
|
394
|
-
const
|
|
395
|
-
|
|
395
|
+
if (!i) return;
|
|
396
|
+
i.committedSpec && p.current?.(i.committedSpec);
|
|
397
|
+
const m = _(i.result);
|
|
398
|
+
N(S(m)), m && w(m), R(re, I(i.result)), m || g.emit({ kind: i.hasSpecChange ? "spec" : "data" });
|
|
396
399
|
}, [
|
|
397
400
|
e,
|
|
398
401
|
t,
|
|
399
402
|
r,
|
|
403
|
+
u,
|
|
400
404
|
g,
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
f
|
|
405
|
+
_,
|
|
406
|
+
w,
|
|
407
|
+
R,
|
|
408
|
+
S,
|
|
409
|
+
I,
|
|
410
|
+
p
|
|
408
411
|
]);
|
|
409
|
-
const
|
|
410
|
-
|
|
412
|
+
const H = f((i) => {
|
|
413
|
+
N((m) => m === null ? m : S(null)), R(re, I(i));
|
|
411
414
|
}, [
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
]),
|
|
416
|
-
|
|
415
|
+
S,
|
|
416
|
+
R,
|
|
417
|
+
I
|
|
418
|
+
]), x = f((i) => {
|
|
419
|
+
i.scene && T.current?.getState().setScene(i.scene), i.result && H(i.result), i.command && g.emit({
|
|
417
420
|
kind: "command",
|
|
418
|
-
command:
|
|
419
|
-
}),
|
|
421
|
+
command: i.command
|
|
422
|
+
}), i.spec && p.current?.(i.spec), i.errors && w([...i.errors]);
|
|
420
423
|
}, [
|
|
421
|
-
|
|
422
|
-
m,
|
|
423
|
-
f,
|
|
424
|
-
b
|
|
425
|
-
]), G = p((o) => {
|
|
426
|
-
for (const u of o) A(u);
|
|
427
|
-
return o.some((u) => !!u.scene);
|
|
428
|
-
}, [A]), _ = p((o, u) => {
|
|
429
|
-
G(g.applyCommand(o, u));
|
|
430
|
-
}, [g, G]), W = p(() => {
|
|
431
|
-
G(g.commit());
|
|
432
|
-
}, [g, G]), O = p(() => G(g.undo()), [g, G]), B = p(() => G(g.redo()), [g, G]), ne = p((o) => {
|
|
433
|
-
const u = g.preview(o).find((j) => j.scene)?.scene;
|
|
434
|
-
return u ? (E.current?.getState().setScene(u), !0) : !1;
|
|
435
|
-
}, [g]), Y = p(() => {
|
|
436
|
-
const o = g.scene;
|
|
437
|
-
o && E.current?.getState().setScene(o);
|
|
438
|
-
}, [g]), $ = H(() => ({
|
|
439
|
-
stack: g.history,
|
|
440
|
-
undo: O,
|
|
441
|
-
redo: B
|
|
442
|
-
}), [
|
|
424
|
+
H,
|
|
443
425
|
g,
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
]),
|
|
426
|
+
p,
|
|
427
|
+
w
|
|
428
|
+
]), b = f((i) => {
|
|
429
|
+
for (const m of i) x(m);
|
|
430
|
+
return i.some((m) => !!m.scene);
|
|
431
|
+
}, [x]), z = f((i, m) => {
|
|
432
|
+
b(u.applyCommand(i, m));
|
|
433
|
+
}, [u, b]), Y = f(() => {
|
|
434
|
+
b(u.commit());
|
|
435
|
+
}, [u, b]), A = f(() => b(u.undo()), [u, b]), V = f(() => b(u.redo()), [u, b]), j = f((i) => {
|
|
436
|
+
const m = u.preview(i).find((te) => te.scene)?.scene;
|
|
437
|
+
return m ? (T.current?.getState().setScene(m), !0) : !1;
|
|
438
|
+
}, [u]), O = f(() => {
|
|
439
|
+
const i = u.scene;
|
|
440
|
+
i && T.current?.getState().setScene(i);
|
|
441
|
+
}, [u]), q = $(() => ({
|
|
442
|
+
stack: u.history,
|
|
443
|
+
undo: A,
|
|
444
|
+
redo: V
|
|
445
|
+
}), [
|
|
446
|
+
u,
|
|
447
|
+
A,
|
|
448
|
+
V
|
|
449
|
+
]), k = f(() => T.current?.getState().scene ?? null, []);
|
|
447
450
|
return {
|
|
448
|
-
store:
|
|
449
|
-
dispatch:
|
|
450
|
-
commit:
|
|
451
|
-
paintPreview:
|
|
452
|
-
clearPreview:
|
|
453
|
-
history:
|
|
454
|
-
subscribe:
|
|
455
|
-
getScene:
|
|
456
|
-
compileBus:
|
|
457
|
-
compileErrors:
|
|
458
|
-
findGeom:
|
|
451
|
+
store: T.current,
|
|
452
|
+
dispatch: z,
|
|
453
|
+
commit: Y,
|
|
454
|
+
paintPreview: j,
|
|
455
|
+
clearPreview: O,
|
|
456
|
+
history: q,
|
|
457
|
+
subscribe: L.subscribe,
|
|
458
|
+
getScene: k,
|
|
459
|
+
compileBus: g,
|
|
460
|
+
compileErrors: W,
|
|
461
|
+
findGeom: G,
|
|
462
|
+
reportWarningSource: R
|
|
459
463
|
};
|
|
460
|
-
},
|
|
464
|
+
}, rr = () => {
|
|
461
465
|
const e = /* @__PURE__ */ new Set();
|
|
462
466
|
return {
|
|
463
467
|
subscribe: (t) => (e.add(t), () => {
|
|
@@ -465,179 +469,180 @@ var Xt = (e) => ce((t) => ({
|
|
|
465
469
|
}),
|
|
466
470
|
notify: () => e.forEach((t) => t())
|
|
467
471
|
};
|
|
468
|
-
},
|
|
469
|
-
const
|
|
470
|
-
|
|
471
|
-
const
|
|
472
|
+
}, nr = ["cartesian", "polar"], sr = ({ data: e, spec: t, plugins: r = [], theme: n, glyphs: s, formattingLocale: o, handleRef: a, onSpecChange: l, onError: d, onWarnings: h, colorScheme: p = "light", mode: C = je.readonly, children: P }) => {
|
|
473
|
+
const R = Ue(C), [u] = v(() => n), [g] = v(() => $e(n?.glyphs, s)), G = u?.colorScheme ?? p, [E] = v(() => Be([...u?.plugins ?? [], ...r].filter(De)));
|
|
474
|
+
ar(E, g);
|
|
475
|
+
const M = Et(), [L] = v(() => ut(r)), [T] = v(() => ht(r)), [S] = v(() => Ht()), [_] = v(() => Ke()), W = $(() => Le({ colorScheme: G }), [G]), { store: N, dispatch: I, commit: w, paintPreview: H, clearPreview: x, history: b, subscribe: z, getScene: Y, compileBus: A, compileErrors: V, findGeom: j, reportWarningSource: O } = tr({
|
|
472
476
|
spec: t,
|
|
473
477
|
data: e,
|
|
474
|
-
colorScheme:
|
|
478
|
+
colorScheme: G,
|
|
475
479
|
plugins: r,
|
|
476
|
-
theme:
|
|
477
|
-
resolveRenderer:
|
|
478
|
-
anchorResolver:
|
|
480
|
+
theme: u,
|
|
481
|
+
resolveRenderer: E,
|
|
482
|
+
anchorResolver: L,
|
|
479
483
|
onSpecChange: l,
|
|
480
484
|
onError: d,
|
|
481
485
|
onWarnings: h
|
|
482
|
-
});
|
|
483
|
-
|
|
484
|
-
if (
|
|
485
|
-
return
|
|
486
|
-
if (
|
|
487
|
-
const { selection:
|
|
488
|
-
|
|
486
|
+
}), q = ir(o, O);
|
|
487
|
+
D(() => {
|
|
488
|
+
if (N)
|
|
489
|
+
return N.subscribe((m, te) => {
|
|
490
|
+
if (m.scene.spec === te.scene.spec) return;
|
|
491
|
+
const { selection: ue, setSelection: ke } = S.getState();
|
|
492
|
+
ue.length !== 0 && ke($t(ue, m.scene.spec));
|
|
489
493
|
});
|
|
490
|
-
}, [
|
|
491
|
-
const
|
|
492
|
-
dispatch:
|
|
493
|
-
commit:
|
|
494
|
-
paintPreview:
|
|
495
|
-
clearPreview:
|
|
494
|
+
}, [N, S]);
|
|
495
|
+
const k = $(() => ({
|
|
496
|
+
dispatch: I,
|
|
497
|
+
commit: w,
|
|
498
|
+
paintPreview: H,
|
|
499
|
+
clearPreview: x
|
|
496
500
|
}), [
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
+
I,
|
|
502
|
+
w,
|
|
503
|
+
H,
|
|
504
|
+
x
|
|
501
505
|
]);
|
|
502
|
-
|
|
503
|
-
commands:
|
|
504
|
-
undo:
|
|
505
|
-
redo:
|
|
506
|
-
subscribe:
|
|
507
|
-
getScene:
|
|
508
|
-
formattingLocale:
|
|
509
|
-
getSelection: () =>
|
|
510
|
-
setSelection: (
|
|
511
|
-
subscribeSelection:
|
|
512
|
-
canPlaceDataLabels:
|
|
513
|
-
canFormatDataLabelsAsPercentages:
|
|
514
|
-
getGlyphs: () =>
|
|
515
|
-
getPointSymbols: (
|
|
506
|
+
Gt(a, () => ({
|
|
507
|
+
commands: k,
|
|
508
|
+
undo: b.undo,
|
|
509
|
+
redo: b.redo,
|
|
510
|
+
subscribe: z,
|
|
511
|
+
getScene: Y,
|
|
512
|
+
formattingLocale: q,
|
|
513
|
+
getSelection: () => S.getState().selection,
|
|
514
|
+
setSelection: (m) => S.getState().setSelection(m),
|
|
515
|
+
subscribeSelection: S.subscribe,
|
|
516
|
+
canPlaceDataLabels: T.hasCapability,
|
|
517
|
+
canFormatDataLabelsAsPercentages: T.hasPercentageFormat,
|
|
518
|
+
getGlyphs: () => g,
|
|
519
|
+
getPointSymbols: (m) => E("point", m)?.symbols
|
|
516
520
|
}), [
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
m,
|
|
522
|
-
w,
|
|
521
|
+
k,
|
|
522
|
+
b,
|
|
523
|
+
z,
|
|
524
|
+
Y,
|
|
523
525
|
q,
|
|
524
|
-
|
|
525
|
-
|
|
526
|
+
S,
|
|
527
|
+
T,
|
|
528
|
+
g,
|
|
529
|
+
E
|
|
526
530
|
]);
|
|
527
|
-
const
|
|
528
|
-
chartId:
|
|
529
|
-
store:
|
|
530
|
-
selectionStore:
|
|
531
|
-
targetBoundaryStore:
|
|
532
|
-
commands:
|
|
533
|
-
history:
|
|
534
|
-
formattingLocale:
|
|
535
|
-
compileBus:
|
|
536
|
-
colorScheme:
|
|
537
|
-
mode:
|
|
538
|
-
styleResolver:
|
|
539
|
-
anchorResolver:
|
|
540
|
-
findGeom:
|
|
531
|
+
const i = $(() => N ? {
|
|
532
|
+
chartId: M,
|
|
533
|
+
store: N,
|
|
534
|
+
selectionStore: S,
|
|
535
|
+
targetBoundaryStore: _,
|
|
536
|
+
commands: k,
|
|
537
|
+
history: b,
|
|
538
|
+
formattingLocale: q,
|
|
539
|
+
compileBus: A,
|
|
540
|
+
colorScheme: G,
|
|
541
|
+
mode: R,
|
|
542
|
+
styleResolver: W,
|
|
543
|
+
anchorResolver: L,
|
|
544
|
+
findGeom: j,
|
|
545
|
+
reportLayoutWarnings: O
|
|
541
546
|
} : null, [
|
|
542
|
-
|
|
543
|
-
b,
|
|
544
|
-
w,
|
|
545
|
-
x,
|
|
546
|
-
$,
|
|
547
|
-
_,
|
|
548
|
-
m,
|
|
549
|
-
B,
|
|
550
|
-
D,
|
|
551
|
-
g,
|
|
552
|
-
P,
|
|
547
|
+
M,
|
|
553
548
|
N,
|
|
554
|
-
|
|
549
|
+
S,
|
|
550
|
+
_,
|
|
551
|
+
k,
|
|
552
|
+
b,
|
|
553
|
+
q,
|
|
554
|
+
A,
|
|
555
|
+
G,
|
|
556
|
+
R,
|
|
557
|
+
W,
|
|
558
|
+
L,
|
|
559
|
+
j,
|
|
560
|
+
O
|
|
555
561
|
]);
|
|
556
|
-
return /* @__PURE__ */ c(
|
|
557
|
-
forcedErrors:
|
|
562
|
+
return /* @__PURE__ */ c(kt, {
|
|
563
|
+
forcedErrors: V,
|
|
558
564
|
onError: d,
|
|
559
565
|
resetKeys: [t, e],
|
|
560
|
-
children:
|
|
561
|
-
value:
|
|
562
|
-
children: /* @__PURE__ */ c(
|
|
563
|
-
value:
|
|
564
|
-
children: /* @__PURE__ */ c(
|
|
565
|
-
value:
|
|
566
|
-
children: /* @__PURE__ */ c(
|
|
567
|
-
shapes:
|
|
568
|
-
children: /* @__PURE__ */ c(
|
|
569
|
-
glyphs:
|
|
570
|
-
children:
|
|
566
|
+
children: i ? /* @__PURE__ */ c(nt.Provider, {
|
|
567
|
+
value: i,
|
|
568
|
+
children: /* @__PURE__ */ c(Je, {
|
|
569
|
+
value: E,
|
|
570
|
+
children: /* @__PURE__ */ c(Ve, {
|
|
571
|
+
value: T,
|
|
572
|
+
children: /* @__PURE__ */ c(K, {
|
|
573
|
+
shapes: u?.shapes,
|
|
574
|
+
children: /* @__PURE__ */ c(Oe, {
|
|
575
|
+
glyphs: g,
|
|
576
|
+
children: P
|
|
571
577
|
})
|
|
572
578
|
})
|
|
573
579
|
})
|
|
574
580
|
})
|
|
575
581
|
}) : null
|
|
576
582
|
});
|
|
577
|
-
},
|
|
578
|
-
|
|
579
|
-
if (!
|
|
583
|
+
}, or = (e, t) => (e ?? []).filter((r) => !ce(r) && !t.has(r)), ar = (e, t) => {
|
|
584
|
+
D(() => {
|
|
585
|
+
if (!Pe) return;
|
|
580
586
|
const r = new Set(t.map(({ name: n }) => n));
|
|
581
|
-
for (const n of
|
|
587
|
+
for (const n of nr) for (const s of or(e("point", n)?.symbols, r)) console.warn(`[graphy] The ${n} point renderer lists "${s}", but no glyph has that name. The shape menu offers it, and SymbolFigure draws the first listed symbol in its place.`);
|
|
582
588
|
}, [e, t]);
|
|
583
|
-
},
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
const n = dt(r);
|
|
589
|
+
}, ir = (e, t) => (D(() => {
|
|
590
|
+
if (e === void 0 || ft(e) !== void 0) {
|
|
591
|
+
t(me, []);
|
|
592
|
+
return;
|
|
593
|
+
}
|
|
594
|
+
t(me, [{
|
|
595
|
+
severity: "warning",
|
|
596
|
+
kind: "userInput",
|
|
597
|
+
code: "INVALID_FORMATTING_LOCALE",
|
|
598
|
+
message: `formattingLocale '${e}' is not a tag Intl can format in, so the chart formats in ${ot}.`
|
|
599
|
+
}]);
|
|
600
|
+
}, [e, t]), e === void 0 ? void 0 : dt(e));
|
|
601
|
+
function Fn({ theme: e, glyphs: t, ...r } = {}) {
|
|
602
|
+
const n = gt(r);
|
|
598
603
|
return {
|
|
599
604
|
...n,
|
|
600
|
-
GraphProvider: (
|
|
601
|
-
...
|
|
605
|
+
GraphProvider: (o) => /* @__PURE__ */ c(sr, {
|
|
606
|
+
...o,
|
|
602
607
|
plugins: n.plugins,
|
|
603
608
|
theme: e,
|
|
604
609
|
glyphs: t
|
|
605
610
|
})
|
|
606
611
|
};
|
|
607
612
|
}
|
|
608
|
-
var
|
|
613
|
+
var F = (e, t) => {
|
|
609
614
|
if (typeof e == "number") return Number.isFinite(e) ? e : null;
|
|
610
615
|
if (!e.endsWith("%")) return null;
|
|
611
616
|
const r = Number.parseFloat(e);
|
|
612
617
|
return Number.isFinite(r) ? r / 100 * t : null;
|
|
613
|
-
},
|
|
614
|
-
const
|
|
615
|
-
return
|
|
616
|
-
x:
|
|
617
|
-
y:
|
|
618
|
+
}, Kn = ({ x: e, y: t, width: r, height: n }, s) => {
|
|
619
|
+
const o = F(e, s.width), a = F(t, s.height), l = F(r, s.width), d = F(n, s.height);
|
|
620
|
+
return o === null || a === null || l === null || d === null ? null : {
|
|
621
|
+
x: o,
|
|
622
|
+
y: a,
|
|
618
623
|
width: l,
|
|
619
624
|
height: d
|
|
620
625
|
};
|
|
621
|
-
},
|
|
622
|
-
const
|
|
623
|
-
return e ? /* @__PURE__ */ c(
|
|
626
|
+
}, cr = ({ animateTransitions: e, cx: t, cy: r, r: n, effects: s, ...o }) => {
|
|
627
|
+
const a = U(s);
|
|
628
|
+
return e ? /* @__PURE__ */ c(Ze, {
|
|
624
629
|
animate: {
|
|
625
630
|
cx: t,
|
|
626
631
|
cy: r,
|
|
627
632
|
r: n
|
|
628
633
|
},
|
|
629
|
-
style:
|
|
630
|
-
...
|
|
634
|
+
style: a,
|
|
635
|
+
...o
|
|
631
636
|
}) : /* @__PURE__ */ c("circle", {
|
|
632
637
|
cx: t,
|
|
633
638
|
cy: r,
|
|
634
639
|
r: n,
|
|
635
|
-
style:
|
|
636
|
-
...
|
|
640
|
+
style: a,
|
|
641
|
+
...o
|
|
637
642
|
});
|
|
638
|
-
},
|
|
639
|
-
const l =
|
|
640
|
-
return e ? /* @__PURE__ */ c(
|
|
643
|
+
}, lr = ({ animateTransitions: e, x1: t, y1: r, x2: n, y2: s, effects: o, ...a }) => {
|
|
644
|
+
const l = U(o);
|
|
645
|
+
return e ? /* @__PURE__ */ c(We, {
|
|
641
646
|
animate: {
|
|
642
647
|
x1: t,
|
|
643
648
|
y1: r,
|
|
@@ -645,66 +650,66 @@ var K = (e, t) => {
|
|
|
645
650
|
y2: s
|
|
646
651
|
},
|
|
647
652
|
style: l,
|
|
648
|
-
...
|
|
653
|
+
...a
|
|
649
654
|
}) : /* @__PURE__ */ c("line", {
|
|
650
655
|
x1: t,
|
|
651
656
|
y1: r,
|
|
652
657
|
x2: n,
|
|
653
658
|
y2: s,
|
|
654
659
|
style: l,
|
|
655
|
-
...
|
|
660
|
+
...a
|
|
656
661
|
});
|
|
657
|
-
},
|
|
658
|
-
const h =
|
|
662
|
+
}, dr = ({ animateTransitions: e, x: t, y: r, width: n, height: s, rx: o, ry: a, effects: l, ...d }) => {
|
|
663
|
+
const h = U(l);
|
|
659
664
|
if (!e) return /* @__PURE__ */ c("rect", {
|
|
660
665
|
x: t,
|
|
661
666
|
y: r,
|
|
662
667
|
width: n,
|
|
663
668
|
height: s,
|
|
664
|
-
rx:
|
|
665
|
-
ry:
|
|
669
|
+
rx: o,
|
|
670
|
+
ry: a,
|
|
666
671
|
style: h,
|
|
667
672
|
...d
|
|
668
673
|
});
|
|
669
|
-
const
|
|
674
|
+
const p = {
|
|
670
675
|
x: t,
|
|
671
676
|
y: r,
|
|
672
677
|
width: n,
|
|
673
678
|
height: s
|
|
674
679
|
};
|
|
675
|
-
return /* @__PURE__ */ c(
|
|
676
|
-
animate:
|
|
677
|
-
...
|
|
678
|
-
rx:
|
|
679
|
-
ry:
|
|
680
|
+
return /* @__PURE__ */ c(Xe, {
|
|
681
|
+
animate: o === void 0 || a === void 0 ? p : {
|
|
682
|
+
...p,
|
|
683
|
+
rx: o,
|
|
684
|
+
ry: a
|
|
680
685
|
},
|
|
681
686
|
style: h,
|
|
682
687
|
...d
|
|
683
688
|
});
|
|
684
|
-
},
|
|
685
|
-
const
|
|
686
|
-
return e ? /* @__PURE__ */ c(
|
|
689
|
+
}, ur = ({ animateTransitions: e, d: t, source: r, effects: n, ...s }) => {
|
|
690
|
+
const o = U(n);
|
|
691
|
+
return e ? /* @__PURE__ */ c(mr, {
|
|
687
692
|
d: t,
|
|
688
693
|
source: r,
|
|
689
|
-
style:
|
|
694
|
+
style: o,
|
|
690
695
|
...s
|
|
691
696
|
}) : /* @__PURE__ */ c("path", {
|
|
692
697
|
d: t,
|
|
693
|
-
style:
|
|
698
|
+
style: o,
|
|
694
699
|
...s
|
|
695
700
|
});
|
|
696
|
-
},
|
|
697
|
-
const { Circle: t } =
|
|
701
|
+
}, Un = (e) => {
|
|
702
|
+
const { Circle: t } = Q(), { animateTransitions: r } = Z(), { symbol: n, ...s } = e, o = {
|
|
698
703
|
...s,
|
|
699
704
|
animateTransitions: r
|
|
700
705
|
};
|
|
701
706
|
return n !== void 0 && n !== "circle" ? /* @__PURE__ */ c("g", {
|
|
702
|
-
style:
|
|
707
|
+
style: U(e.effects),
|
|
703
708
|
"data-testid": e["data-testid"],
|
|
704
|
-
children: /* @__PURE__ */ c(
|
|
709
|
+
children: /* @__PURE__ */ c(Ae, {
|
|
705
710
|
symbol: n,
|
|
706
|
-
cx:
|
|
707
|
-
cy:
|
|
711
|
+
cx: Te(e.cx),
|
|
712
|
+
cy: Te(e.cy),
|
|
708
713
|
size: e.r * 2,
|
|
709
714
|
fill: e.fill ?? "currentColor",
|
|
710
715
|
fillOpacity: e.fillOpacity,
|
|
@@ -713,87 +718,87 @@ var K = (e, t) => {
|
|
|
713
718
|
strokeOpacity: e.strokeOpacity,
|
|
714
719
|
strokeWidth: e.strokeWidth,
|
|
715
720
|
motion: r ? {
|
|
716
|
-
transition:
|
|
721
|
+
transition: Ce,
|
|
717
722
|
intro: !1,
|
|
718
723
|
fadesIn: !1
|
|
719
724
|
} : null
|
|
720
725
|
})
|
|
721
|
-
}) : t === void 0 ?
|
|
722
|
-
},
|
|
723
|
-
const { Line: t } =
|
|
726
|
+
}) : t === void 0 ? cr(o) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(t, { ...o }) });
|
|
727
|
+
}, Wn = (e) => {
|
|
728
|
+
const { Line: t } = Q(), { animateTransitions: r } = Z(), n = {
|
|
724
729
|
...e,
|
|
725
730
|
animateTransitions: r
|
|
726
731
|
};
|
|
727
|
-
return t === void 0 ?
|
|
728
|
-
},
|
|
729
|
-
const { Rect: r } =
|
|
732
|
+
return t === void 0 ? lr(n) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(t, { ...n }) });
|
|
733
|
+
}, zn = ({ cornerRadius: e, ...t }) => {
|
|
734
|
+
const { Rect: r } = Q(), n = we()?.size ?? null, s = He(), { animateTransitions: o } = Z(), a = {
|
|
730
735
|
...t,
|
|
731
|
-
animateTransitions:
|
|
732
|
-
...
|
|
736
|
+
animateTransitions: o,
|
|
737
|
+
...hr(e, t, n, s)
|
|
733
738
|
};
|
|
734
|
-
return r === void 0 ?
|
|
735
|
-
},
|
|
736
|
-
const { Path: t } =
|
|
739
|
+
return r === void 0 ? dr(a) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(r, { ...a }) });
|
|
740
|
+
}, Yn = (e) => {
|
|
741
|
+
const { Path: t } = Q(), { animateTransitions: r } = Z(), n = {
|
|
737
742
|
...e,
|
|
738
743
|
animateTransitions: r
|
|
739
744
|
};
|
|
740
|
-
return t === void 0 ?
|
|
741
|
-
},
|
|
742
|
-
d:
|
|
745
|
+
return t === void 0 ? ur(n) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(t, { ...n }) });
|
|
746
|
+
}, Te = (e) => typeof e == "number" ? `${e}px` : e, mr = ({ d: e, source: t, ...r }) => /* @__PURE__ */ c(Fe, {
|
|
747
|
+
d: Me(e, Ce, t),
|
|
743
748
|
...r
|
|
744
|
-
}),
|
|
749
|
+
}), hr = (e, t, r, n) => {
|
|
745
750
|
if (e === void 0) return {};
|
|
746
|
-
const s =
|
|
751
|
+
const s = vt(e);
|
|
747
752
|
if (s === void 0) return {};
|
|
748
|
-
const
|
|
749
|
-
if (
|
|
750
|
-
return s === "full" ? {} :
|
|
751
|
-
const
|
|
753
|
+
const o = gr(t, r, n);
|
|
754
|
+
if (o === null)
|
|
755
|
+
return s === "full" ? {} : Ee(pe({ cornerRadius: s }), n);
|
|
756
|
+
const a = Math.min(pe({
|
|
752
757
|
cornerRadius: s,
|
|
753
|
-
box:
|
|
754
|
-
}), Math.min(
|
|
755
|
-
return
|
|
756
|
-
},
|
|
757
|
-
const n =
|
|
758
|
+
box: o
|
|
759
|
+
}), Math.min(o.width, o.height) / 2);
|
|
760
|
+
return Ee(a, n);
|
|
761
|
+
}, gr = (e, t, r) => {
|
|
762
|
+
const n = Re(e.width, t?.width, r.x), s = Re(e.height, t?.height, r.y);
|
|
758
763
|
return n === null || s === null ? null : {
|
|
759
764
|
width: n,
|
|
760
765
|
height: s
|
|
761
766
|
};
|
|
762
|
-
},
|
|
767
|
+
}, Re = (e, t, r) => {
|
|
763
768
|
if (typeof e == "number") return Number.isFinite(e) ? Math.abs(e) * r : null;
|
|
764
769
|
if (t === void 0) return null;
|
|
765
|
-
const n =
|
|
770
|
+
const n = F(e, t);
|
|
766
771
|
return n === null ? null : Math.abs(n);
|
|
767
|
-
},
|
|
772
|
+
}, Ee = (e, t) => t.x <= 0 || t.y <= 0 ? {
|
|
768
773
|
rx: 0,
|
|
769
774
|
ry: 0
|
|
770
775
|
} : {
|
|
771
776
|
rx: e / t.x,
|
|
772
777
|
ry: e / t.y
|
|
773
|
-
},
|
|
774
|
-
const l =
|
|
778
|
+
}, Vn = ({ symbol: e, size: t, fill: r, fillOpacity: n, stroke: s, strokeOpacity: o, strokeWidth: a }) => {
|
|
779
|
+
const l = tt(), d = Ye(), h = Qe((P) => P.coordSystem.type), p = pr(e, d("point", h)?.symbols ?? [], l), C = {
|
|
775
780
|
size: t,
|
|
776
781
|
fill: r,
|
|
777
782
|
fillOpacity: n,
|
|
778
783
|
stroke: s,
|
|
779
|
-
strokeOpacity:
|
|
780
|
-
strokeWidth:
|
|
784
|
+
strokeOpacity: o,
|
|
785
|
+
strokeWidth: a
|
|
781
786
|
};
|
|
782
|
-
return
|
|
783
|
-
d:
|
|
787
|
+
return ce(p) ? /* @__PURE__ */ c("path", {
|
|
788
|
+
d: lt(p, t),
|
|
784
789
|
fill: r,
|
|
785
790
|
fillOpacity: n,
|
|
786
791
|
stroke: s,
|
|
787
|
-
strokeOpacity:
|
|
788
|
-
strokeWidth:
|
|
792
|
+
strokeOpacity: o,
|
|
793
|
+
strokeWidth: a,
|
|
789
794
|
strokeLinejoin: "round"
|
|
790
|
-
}) : /* @__PURE__ */ c(
|
|
791
|
-
symbol:
|
|
795
|
+
}) : /* @__PURE__ */ c(xe, {
|
|
796
|
+
symbol: p,
|
|
792
797
|
glyphs: l,
|
|
793
|
-
...
|
|
798
|
+
...C
|
|
794
799
|
});
|
|
795
|
-
},
|
|
796
|
-
const r =
|
|
800
|
+
}, pr = (e, t, r) => St(e) || t.includes(e) || !ce(e) && r.has(e) ? e : t[0] ?? "circle", jn = ({ children: e, ...t }) => {
|
|
801
|
+
const r = we()?.size ?? null;
|
|
797
802
|
return /* @__PURE__ */ c("svg", {
|
|
798
803
|
viewBox: "0 0 1 1",
|
|
799
804
|
preserveAspectRatio: "none",
|
|
@@ -801,14 +806,14 @@ var K = (e, t) => {
|
|
|
801
806
|
height: "100%",
|
|
802
807
|
pointerEvents: "none",
|
|
803
808
|
...t,
|
|
804
|
-
children: /* @__PURE__ */ c(
|
|
809
|
+
children: /* @__PURE__ */ c(Ie, {
|
|
805
810
|
size: r,
|
|
806
811
|
space: "unit",
|
|
807
812
|
children: e
|
|
808
813
|
})
|
|
809
814
|
});
|
|
810
|
-
},
|
|
811
|
-
const r =
|
|
815
|
+
}, Xn = ({ box: e, children: t }) => {
|
|
816
|
+
const r = st(), n = r === null ? null : r.width * (e.x1 - e.x0), s = r === null ? null : r.height * (e.y1 - e.y0), o = $(() => n === null || s === null ? null : {
|
|
812
817
|
width: n,
|
|
813
818
|
height: s
|
|
814
819
|
}, [n, s]);
|
|
@@ -819,63 +824,63 @@ var K = (e, t) => {
|
|
|
819
824
|
height: X(e.y1 - e.y0),
|
|
820
825
|
overflow: "hidden",
|
|
821
826
|
pointerEvents: "none",
|
|
822
|
-
children: /* @__PURE__ */ c(
|
|
823
|
-
size:
|
|
827
|
+
children: /* @__PURE__ */ c(Ie, {
|
|
828
|
+
size: o,
|
|
824
829
|
children: t
|
|
825
830
|
})
|
|
826
831
|
});
|
|
827
|
-
},
|
|
828
|
-
var
|
|
829
|
-
var
|
|
832
|
+
}, fr = "drqe3u0", vr = "drqe3u1", yr = "drqe3u2", Sr = "drqe3u3", B = "drqe3u4", br = "drqe3u5", Tr = "drqe3u6", Rr = "drqe3u7", J = "drqe3u8", Er = "drqe3u9", Gr = "drqe3ua";
|
|
833
|
+
var Nr = "drqe3uc", Ir = "drqe3ud", wr = "drqe3ue", Cr = "drqe3uf";
|
|
834
|
+
var Pr = "drqe3uh", Lr = "drqe3ui", Ge = {
|
|
830
835
|
enabled: "drqe3uk drqe3uj",
|
|
831
836
|
disabled: "drqe3ul drqe3uj"
|
|
832
|
-
},
|
|
837
|
+
}, Ne = {
|
|
833
838
|
ran: "drqe3un drqe3um",
|
|
834
839
|
dim: "drqe3uo drqe3um"
|
|
835
|
-
},
|
|
840
|
+
}, qe = {
|
|
836
841
|
ran: "drqe3uq drqe3up",
|
|
837
842
|
cached: "drqe3ur drqe3up",
|
|
838
843
|
untouched: "drqe3us drqe3up"
|
|
839
|
-
},
|
|
840
|
-
const { compileBus: n } =
|
|
841
|
-
|
|
842
|
-
const { recordCompile:
|
|
843
|
-
return
|
|
844
|
+
}, Jn = ({ width: e = 440, style: t, className: r } = {}) => {
|
|
845
|
+
const { compileBus: n } = ae(), [s] = v(() => Bt()), [o, a] = v(!1), [l, d] = v(yt);
|
|
846
|
+
D(() => {
|
|
847
|
+
const { recordCompile: u } = s.getState(), g = n.getLastTrigger(), G = n.getLastCompile();
|
|
848
|
+
return g && G && u(g, G), n.subscribe(u);
|
|
844
849
|
}, [s, n]);
|
|
845
|
-
const h = se(s, (
|
|
846
|
-
d((
|
|
847
|
-
const
|
|
848
|
-
return
|
|
850
|
+
const h = se(s, (u) => u.lastCompile), p = se(s, (u) => u.history), C = n.getCacheStats(), P = h === null && p.length === 0, R = () => {
|
|
851
|
+
d((u) => {
|
|
852
|
+
const g = !u;
|
|
853
|
+
return Tt(g), g;
|
|
849
854
|
});
|
|
850
855
|
};
|
|
851
|
-
return /* @__PURE__ */
|
|
852
|
-
className:
|
|
856
|
+
return /* @__PURE__ */ y("div", {
|
|
857
|
+
className: wt(Gr, r),
|
|
853
858
|
style: {
|
|
854
859
|
width: e,
|
|
855
860
|
...t
|
|
856
861
|
},
|
|
857
862
|
children: [
|
|
858
|
-
/* @__PURE__ */
|
|
859
|
-
className:
|
|
860
|
-
children: [/* @__PURE__ */
|
|
861
|
-
className:
|
|
863
|
+
/* @__PURE__ */ y("div", {
|
|
864
|
+
className: fr,
|
|
865
|
+
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ c("div", {
|
|
866
|
+
className: vr,
|
|
862
867
|
children: "compile cache"
|
|
863
868
|
}), /* @__PURE__ */ c("div", {
|
|
864
|
-
className:
|
|
865
|
-
children:
|
|
869
|
+
className: wr,
|
|
870
|
+
children: P ? "production: stats disabled" : h ? `last: ${h.label} · ${de(h.durationMs)}` : "awaiting first compile…"
|
|
866
871
|
})] }), /* @__PURE__ */ c("button", {
|
|
867
872
|
type: "button",
|
|
868
|
-
onClick: () =>
|
|
869
|
-
className:
|
|
870
|
-
children:
|
|
873
|
+
onClick: () => a((u) => !u),
|
|
874
|
+
className: Cr,
|
|
875
|
+
children: o ? "▾" : "▴"
|
|
871
876
|
})]
|
|
872
877
|
}),
|
|
873
|
-
!
|
|
878
|
+
!o && /* @__PURE__ */ y("div", {
|
|
874
879
|
className: "drqe3ub",
|
|
875
|
-
children: [/* @__PURE__ */
|
|
880
|
+
children: [/* @__PURE__ */ y("button", {
|
|
876
881
|
type: "button",
|
|
877
|
-
onClick:
|
|
878
|
-
className: l ?
|
|
882
|
+
onClick: R,
|
|
883
|
+
className: l ? Ge.enabled : Ge.disabled,
|
|
879
884
|
"aria-pressed": l,
|
|
880
885
|
children: ["cache ", l ? "enabled" : "disabled"]
|
|
881
886
|
}), /* @__PURE__ */ c("span", {
|
|
@@ -883,53 +888,53 @@ var wr = "drqe3uh", Ir = "drqe3ui", Te = {
|
|
|
883
888
|
children: "next compile reflects this toggle"
|
|
884
889
|
})]
|
|
885
890
|
}),
|
|
886
|
-
!
|
|
891
|
+
!o && !P && /* @__PURE__ */ y(It, { children: [/* @__PURE__ */ c(Dr, {
|
|
887
892
|
delta: h?.stages,
|
|
888
893
|
durations: h?.stageDurationsMs,
|
|
889
|
-
cumulative:
|
|
890
|
-
}), /* @__PURE__ */ c(
|
|
894
|
+
cumulative: C
|
|
895
|
+
}), /* @__PURE__ */ c(_r, { entries: p })] })
|
|
891
896
|
]
|
|
892
897
|
});
|
|
893
|
-
},
|
|
894
|
-
className:
|
|
895
|
-
children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */
|
|
896
|
-
className:
|
|
898
|
+
}, Dr = ({ delta: e, durations: t, cumulative: r }) => /* @__PURE__ */ y("table", {
|
|
899
|
+
className: yr,
|
|
900
|
+
children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ y("tr", {
|
|
901
|
+
className: Pr,
|
|
897
902
|
children: [
|
|
898
903
|
/* @__PURE__ */ c("th", {
|
|
899
|
-
className:
|
|
904
|
+
className: Sr,
|
|
900
905
|
children: "stage"
|
|
901
906
|
}),
|
|
902
907
|
/* @__PURE__ */ c("th", {
|
|
903
|
-
className:
|
|
908
|
+
className: B,
|
|
904
909
|
children: "time"
|
|
905
910
|
}),
|
|
906
911
|
/* @__PURE__ */ c("th", {
|
|
907
|
-
className:
|
|
912
|
+
className: B,
|
|
908
913
|
children: "Δ miss"
|
|
909
914
|
}),
|
|
910
915
|
/* @__PURE__ */ c("th", {
|
|
911
|
-
className:
|
|
916
|
+
className: B,
|
|
912
917
|
children: "Δ hit"
|
|
913
918
|
}),
|
|
914
919
|
/* @__PURE__ */ c("th", {
|
|
915
|
-
className:
|
|
920
|
+
className: B,
|
|
916
921
|
children: "total miss"
|
|
917
922
|
}),
|
|
918
923
|
/* @__PURE__ */ c("th", {
|
|
919
|
-
className:
|
|
924
|
+
className: B,
|
|
920
925
|
children: "total hit"
|
|
921
926
|
})
|
|
922
927
|
]
|
|
923
|
-
}) }), /* @__PURE__ */ c("tbody", { children:
|
|
924
|
-
const s = e?.[n],
|
|
925
|
-
return /* @__PURE__ */
|
|
926
|
-
className:
|
|
928
|
+
}) }), /* @__PURE__ */ c("tbody", { children: ie.map((n) => {
|
|
929
|
+
const s = e?.[n], o = qr(s);
|
|
930
|
+
return /* @__PURE__ */ y("tr", {
|
|
931
|
+
className: Nr,
|
|
927
932
|
children: [
|
|
928
|
-
/* @__PURE__ */
|
|
929
|
-
className:
|
|
933
|
+
/* @__PURE__ */ y("td", {
|
|
934
|
+
className: br,
|
|
930
935
|
children: [
|
|
931
936
|
/* @__PURE__ */ c("span", {
|
|
932
|
-
className:
|
|
937
|
+
className: qe[o],
|
|
933
938
|
"aria-hidden": !0
|
|
934
939
|
}),
|
|
935
940
|
" ",
|
|
@@ -938,10 +943,10 @@ var wr = "drqe3uh", Ir = "drqe3ui", Te = {
|
|
|
938
943
|
}),
|
|
939
944
|
/* @__PURE__ */ c("td", {
|
|
940
945
|
className: J,
|
|
941
|
-
children: t === void 0 ||
|
|
946
|
+
children: t === void 0 || o === "untouched" ? "—" : de(t[n])
|
|
942
947
|
}),
|
|
943
948
|
/* @__PURE__ */ c("td", {
|
|
944
|
-
className:
|
|
949
|
+
className: o === "ran" ? Ne.ran : Ne.dim,
|
|
945
950
|
children: s?.misses ?? 0
|
|
946
951
|
}),
|
|
947
952
|
/* @__PURE__ */ c("td", {
|
|
@@ -959,54 +964,54 @@ var wr = "drqe3uh", Ir = "drqe3ui", Te = {
|
|
|
959
964
|
]
|
|
960
965
|
}, n);
|
|
961
966
|
}) })]
|
|
962
|
-
}),
|
|
963
|
-
className:
|
|
967
|
+
}), _r = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ y("div", {
|
|
968
|
+
className: Ir,
|
|
964
969
|
children: [/* @__PURE__ */ c("div", {
|
|
965
|
-
className:
|
|
970
|
+
className: Lr,
|
|
966
971
|
children: "recent compiles"
|
|
967
972
|
}), e.map((t) => {
|
|
968
|
-
const r =
|
|
969
|
-
return /* @__PURE__ */
|
|
970
|
-
className:
|
|
973
|
+
const r = kr(t.stages, (o) => o.misses > 0), n = ie.length;
|
|
974
|
+
return /* @__PURE__ */ y("div", {
|
|
975
|
+
className: Tr,
|
|
971
976
|
children: [
|
|
972
977
|
/* @__PURE__ */ c("span", {
|
|
973
|
-
className:
|
|
978
|
+
className: qe[r === 0 ? "cached" : "ran"],
|
|
974
979
|
"aria-hidden": !0
|
|
975
980
|
}),
|
|
976
981
|
/* @__PURE__ */ c("span", {
|
|
977
|
-
className:
|
|
982
|
+
className: Rr,
|
|
978
983
|
title: t.label,
|
|
979
984
|
children: t.label
|
|
980
985
|
}),
|
|
981
|
-
/* @__PURE__ */
|
|
982
|
-
className:
|
|
986
|
+
/* @__PURE__ */ y("span", {
|
|
987
|
+
className: Er,
|
|
983
988
|
children: [
|
|
984
989
|
r,
|
|
985
990
|
"/",
|
|
986
991
|
n,
|
|
987
992
|
" ran · ",
|
|
988
|
-
|
|
993
|
+
de(t.durationMs)
|
|
989
994
|
]
|
|
990
995
|
})
|
|
991
996
|
]
|
|
992
997
|
}, t.id);
|
|
993
998
|
})]
|
|
994
|
-
}),
|
|
999
|
+
}), qr = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", kr = (e, t) => {
|
|
995
1000
|
let r = 0;
|
|
996
|
-
for (const n of
|
|
1001
|
+
for (const n of ie) t(e[n]) && (r += 1);
|
|
997
1002
|
return r;
|
|
998
|
-
},
|
|
999
|
-
const { history: e } =
|
|
1000
|
-
return
|
|
1001
|
-
...
|
|
1003
|
+
}, de = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, Qn = () => {
|
|
1004
|
+
const { history: e } = ae(), { stack: t, undo: r, redo: n } = e, s = f((l) => t.subscribe(l), [t]), o = f(() => t.getSnapshot(), [t]), a = Nt(s, o, o);
|
|
1005
|
+
return $(() => ({
|
|
1006
|
+
...a,
|
|
1002
1007
|
undo: r,
|
|
1003
1008
|
redo: n
|
|
1004
1009
|
}), [
|
|
1005
|
-
|
|
1010
|
+
a,
|
|
1006
1011
|
r,
|
|
1007
1012
|
n
|
|
1008
1013
|
]);
|
|
1009
|
-
},
|
|
1014
|
+
}, $r = /* @__PURE__ */ new Set([
|
|
1010
1015
|
"button",
|
|
1011
1016
|
"checkbox",
|
|
1012
1017
|
"color",
|
|
@@ -1017,102 +1022,102 @@ var wr = "drqe3uh", Ir = "drqe3ui", Te = {
|
|
|
1017
1022
|
"range",
|
|
1018
1023
|
"reset",
|
|
1019
1024
|
"submit"
|
|
1020
|
-
]),
|
|
1025
|
+
]), Zn = (e, t = {}) => {
|
|
1021
1026
|
const { target: r, enabled: n = !0 } = t;
|
|
1022
|
-
|
|
1023
|
-
const s =
|
|
1027
|
+
D(() => {
|
|
1028
|
+
const s = Mr(r);
|
|
1024
1029
|
if (!n || !s) return;
|
|
1025
|
-
const
|
|
1026
|
-
if (!
|
|
1027
|
-
const l =
|
|
1030
|
+
const o = (a) => {
|
|
1031
|
+
if (!Hr(a) || a.defaultPrevented || xr(a.target)) return;
|
|
1032
|
+
const l = et(a);
|
|
1028
1033
|
if (!l) return;
|
|
1029
1034
|
const d = e.current;
|
|
1030
|
-
d && (l === "undo" ? d.undo() : d.redo()) &&
|
|
1035
|
+
d && (l === "undo" ? d.undo() : d.redo()) && a.preventDefault();
|
|
1031
1036
|
};
|
|
1032
|
-
return s.addEventListener("keydown",
|
|
1037
|
+
return s.addEventListener("keydown", o), () => s.removeEventListener("keydown", o);
|
|
1033
1038
|
}, [
|
|
1034
1039
|
e,
|
|
1035
1040
|
r,
|
|
1036
1041
|
n
|
|
1037
1042
|
]);
|
|
1038
|
-
},
|
|
1039
|
-
const { targetBoundaryStore: e } =
|
|
1043
|
+
}, Mr = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, Hr = (e) => "key" in e, xr = (e) => e instanceof HTMLInputElement ? !$r.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, es = () => {
|
|
1044
|
+
const { targetBoundaryStore: e } = ae();
|
|
1040
1045
|
return se(e, (t) => t.boundary);
|
|
1041
1046
|
};
|
|
1042
1047
|
export {
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1048
|
+
mn as CanvasTextMeasurer,
|
|
1049
|
+
Or as DefaultFooter,
|
|
1050
|
+
cr as DefaultGeomCircle,
|
|
1051
|
+
lr as DefaultGeomLine,
|
|
1052
|
+
ur as DefaultGeomPath,
|
|
1053
|
+
dr as DefaultGeomRect,
|
|
1054
|
+
Rn as DefaultGrid,
|
|
1055
|
+
dn as DefaultHeader,
|
|
1056
|
+
fn as DefaultSwatch,
|
|
1057
|
+
nn as DefaultTooltip,
|
|
1058
|
+
Jn as DevToolsPanel,
|
|
1059
|
+
je as GRAPH_MODES,
|
|
1060
|
+
Un as GeomCircle,
|
|
1061
|
+
Wn as GeomLine,
|
|
1062
|
+
jr as GeomOverpaint,
|
|
1063
|
+
Xr as GeomPanelSizeProvider,
|
|
1064
|
+
Yn as GeomPath,
|
|
1065
|
+
zn as GeomRect,
|
|
1066
|
+
kt as GraphErrorBoundary,
|
|
1067
|
+
ve as GraphErrorPanel,
|
|
1068
|
+
sr as GraphProvider,
|
|
1069
|
+
hn as GraphRenderer,
|
|
1070
|
+
pn as GraphyBadge,
|
|
1071
|
+
ln as HoverProvider,
|
|
1072
|
+
tn as IntlProvider,
|
|
1073
|
+
Dn as IntroFade,
|
|
1074
|
+
Tn as IntroWipeClip,
|
|
1075
|
+
Vn as SymbolFigure,
|
|
1076
|
+
Sn as TextMeasurerProvider,
|
|
1077
|
+
Jr as ThemeProvider,
|
|
1078
|
+
Xn as UnitBoxSvg,
|
|
1079
|
+
jn as UnitSpaceSvg,
|
|
1080
|
+
In as buildDotsEditOutlineShapes,
|
|
1081
|
+
Fn as createGraphyKit,
|
|
1082
|
+
Ur as darkTheme,
|
|
1083
|
+
Nn as defineGeomRenderer,
|
|
1084
|
+
en as defineGlyph,
|
|
1085
|
+
Pn as getBuiltInEditOutlineShapes,
|
|
1086
|
+
Yr as lightTheme,
|
|
1087
|
+
rn as lightenCss,
|
|
1088
|
+
$t as pruneSelection,
|
|
1089
|
+
F as readPositionPixels,
|
|
1090
|
+
Kn as readRectPixels,
|
|
1091
|
+
Ln as resolveGraphyBadgeVariant,
|
|
1092
|
+
Wr as resolvePathStroke,
|
|
1093
|
+
Vr as scalePointToPanel,
|
|
1094
|
+
an as stampAxisEditTarget,
|
|
1095
|
+
zr as stampGridEditTarget,
|
|
1096
|
+
sn as stampLegendEditTarget,
|
|
1097
|
+
cn as useElementScreenRect,
|
|
1098
|
+
Br as useFormattingLocale,
|
|
1099
|
+
un as useGeomHitTest,
|
|
1100
|
+
wn as useGeomHover,
|
|
1101
|
+
Kr as useGeomPanelSize,
|
|
1102
|
+
En as useGeomReaderTree,
|
|
1103
|
+
_n as useGeomStyleReader,
|
|
1104
|
+
st as useGeomViewportSize,
|
|
1105
|
+
Z as useGraphAnimation,
|
|
1106
|
+
Gn as useGraphCommands,
|
|
1107
|
+
bn as useGraphHandle,
|
|
1108
|
+
Qn as useGraphHistory,
|
|
1109
|
+
Zn as useGraphHistoryShortcuts,
|
|
1110
|
+
$n as useGraphLocale,
|
|
1111
|
+
kn as useGraphSelection,
|
|
1112
|
+
Qr as useGuidesTakePress,
|
|
1113
|
+
Cn as useHandleScene,
|
|
1114
|
+
Fr as useHoverState,
|
|
1115
|
+
on as usePaintDefs,
|
|
1116
|
+
qn as useResolvedStyle,
|
|
1117
|
+
Qe as useSceneSelector,
|
|
1118
|
+
gn as useStyleReaderTree,
|
|
1119
|
+
vn as useStyleResolver,
|
|
1120
|
+
es as useTargetBoundary,
|
|
1121
|
+
yn as useTextMeasurer,
|
|
1122
|
+
Zr as vars
|
|
1118
1123
|
};
|