@graphysdk/react-renderer 2.0.0-beta.1788534616557 → 2.0.0-beta.1788537926468
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/{dev.utils-CXRlUmw2.cjs → dev.utils-C5W6wbHd.cjs} +1 -1
- package/dist/{dev.utils-CzXWvwtn.js → dev.utils-HBVa4Fj9.js} +1 -1
- package/dist/editable.cjs +1 -1
- package/dist/editable.mjs +2 -2
- package/dist/graph-config.cjs +1 -1
- package/dist/graph-config.mjs +1 -1
- package/dist/history-chords-Be8dhdUq.cjs +1 -0
- package/dist/{history-chords-WjboHZs5.js → history-chords-d5sl-JzC.js} +241 -241
- package/dist/history-chords.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +309 -305
- package/package.json +2 -2
- package/dist/history-chords-Dn-_MJlI.cjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { Ct as
|
|
2
|
-
import { f as
|
|
3
|
-
import { COMPILER_STAGE_KEYS as j, Geom as
|
|
4
|
-
import { Component as
|
|
5
|
-
import { Fragment as
|
|
1
|
+
import { Ct as wt, Ft as te, M as It, Mt as Dt, Nt as $t, O as xt, Pt as ce, St as de, Tt as Ht, X as Mt, Y as Pt, _ as Lt, _t as le, a as Kt, bt as ue, ct as Bt, gt as K, i as Ot, it as At, j as jt, jt as Yt, k as Ft, lt as Ut, mt as Wt, n as Vt, pt as Xt, r as Qt, rt as zt, s as Jt, t as me, tt as Zt, vt as er, wt as tr, xt as rr, yt as A } from "./history-chords-d5sl-JzC.js";
|
|
2
|
+
import { f as sr, t as ge } from "./dev.utils-HBVa4Fj9.js";
|
|
3
|
+
import { COMPILER_STAGE_KEYS as j, Geom as he, GraphCompilationSession as pe, areEditTargetsEqual as fe, buildDiagnostic as W, createAnchorResolver as ve, createCompiler as ye, createGraphyBuilder as be, findAnnotation as Se, isCompilerCachingEnabled as Ee, resolveDefinition as Te, setCompilerCachingEnabled as Ce } from "@graphysdk/viz-engine";
|
|
4
|
+
import { Component as Ne, useCallback as f, useEffect as $, useId as Re, useImperativeHandle as qe, useMemo as P, useRef as V, useState as C, useSyncExternalStore as Ge } from "react";
|
|
5
|
+
import { Fragment as _e, jsx as d, jsxs as v } from "react/jsx-runtime";
|
|
6
6
|
import { useStore as X } from "zustand";
|
|
7
7
|
import { createStore as Y } from "zustand/vanilla";
|
|
8
|
-
import
|
|
8
|
+
import ke from "clsx";
|
|
9
9
|
import './index.css';function O(e) {
|
|
10
10
|
for (const t of e) (t.severity === "error" ? console.error : console.warn)(`[graphy] ${t.code}: ${t.message}`, t);
|
|
11
11
|
}
|
|
12
|
-
var
|
|
13
|
-
var
|
|
12
|
+
var we = "_1a5iqpb0", Ie = "_1a5iqpb1";
|
|
13
|
+
var De = "_1a5iqpb3", $e = "_1a5iqpb4", xe = "_1a5iqpb5";
|
|
14
14
|
var Q = ({ errors: e }) => {
|
|
15
15
|
const [t, ...r] = e;
|
|
16
16
|
return /* @__PURE__ */ v("div", {
|
|
17
17
|
role: "alert",
|
|
18
|
-
className:
|
|
18
|
+
className: we,
|
|
19
19
|
children: [
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
className:
|
|
20
|
+
/* @__PURE__ */ d("strong", {
|
|
21
|
+
className: Ie,
|
|
22
22
|
children: "This chart could not be rendered."
|
|
23
23
|
}),
|
|
24
|
-
t && /* @__PURE__ */
|
|
25
|
-
r.length > 0 && /* @__PURE__ */
|
|
24
|
+
t && /* @__PURE__ */ d(z, { diagnostic: t }),
|
|
25
|
+
r.length > 0 && /* @__PURE__ */ d("ul", {
|
|
26
26
|
className: "_1a5iqpb2",
|
|
27
|
-
children: r.map((n, o) => /* @__PURE__ */
|
|
27
|
+
children: r.map((n, o) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ d(z, { diagnostic: n }) }, `${n.code}-${o}`))
|
|
28
28
|
})
|
|
29
29
|
]
|
|
30
30
|
});
|
|
31
31
|
}, z = ({ diagnostic: e }) => /* @__PURE__ */ v("div", {
|
|
32
|
-
className:
|
|
32
|
+
className: De,
|
|
33
33
|
children: [
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
className:
|
|
34
|
+
/* @__PURE__ */ d("span", {
|
|
35
|
+
className: $e,
|
|
36
36
|
children: e.code
|
|
37
37
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
className:
|
|
38
|
+
/* @__PURE__ */ d("p", {
|
|
39
|
+
className: xe,
|
|
40
40
|
children: e.message
|
|
41
41
|
}),
|
|
42
|
-
e.suggestion && /* @__PURE__ */
|
|
42
|
+
e.suggestion && /* @__PURE__ */ d("p", {
|
|
43
43
|
className: "_1a5iqpb6",
|
|
44
44
|
children: e.suggestion
|
|
45
45
|
})
|
|
46
46
|
]
|
|
47
47
|
});
|
|
48
|
-
function
|
|
48
|
+
function He(e = [], t = []) {
|
|
49
49
|
return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
|
|
50
50
|
}
|
|
51
|
-
var
|
|
51
|
+
var Me = class extends Ne {
|
|
52
52
|
constructor(...e) {
|
|
53
53
|
super(...e), this.state = { caughtDiagnostic: null };
|
|
54
54
|
}
|
|
@@ -60,32 +60,32 @@ var He = class extends Ce {
|
|
|
60
60
|
O([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
|
|
61
61
|
}
|
|
62
62
|
componentDidUpdate(e) {
|
|
63
|
-
this.state.caughtDiagnostic && !
|
|
63
|
+
this.state.caughtDiagnostic && !He(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
66
|
const { caughtDiagnostic: e } = this.state;
|
|
67
|
-
if (e) return /* @__PURE__ */
|
|
67
|
+
if (e) return /* @__PURE__ */ d(Q, { errors: [e] });
|
|
68
68
|
const { forcedErrors: t, children: r } = this.props;
|
|
69
|
-
return t && t.length > 0 ? /* @__PURE__ */
|
|
69
|
+
return t && t.length > 0 ? /* @__PURE__ */ d(Q, { errors: t }) : r;
|
|
70
70
|
}
|
|
71
|
-
}, re = (e) => typeof e == "object" && "geom" in e && "render" in e,
|
|
72
|
-
const t =
|
|
73
|
-
return t instanceof
|
|
74
|
-
},
|
|
75
|
-
const r = e.filter((n) =>
|
|
71
|
+
}, re = (e) => typeof e == "object" && "geom" in e && "render" in e, Pe = (e) => {
|
|
72
|
+
const t = Te(e);
|
|
73
|
+
return t instanceof he ? t : null;
|
|
74
|
+
}, Le = (e, t) => {
|
|
75
|
+
const r = e.filter((n) => Ke(n, t));
|
|
76
76
|
return r.length === e.length ? e : r;
|
|
77
|
-
},
|
|
77
|
+
}, Ke = (e, t) => e.kind !== "annotation" ? !0 : Se(t.annotations, e.id) !== null, J = [], Be = () => Y((e) => ({
|
|
78
78
|
selection: J,
|
|
79
|
-
setSelection: (t) => e((r) =>
|
|
79
|
+
setSelection: (t) => e((r) => Oe(r.selection, t) ? r : { selection: t }),
|
|
80
80
|
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: J })
|
|
81
|
-
})),
|
|
81
|
+
})), Oe = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
|
|
82
82
|
const o = t[n];
|
|
83
|
-
return o !== void 0 &&
|
|
84
|
-
}),
|
|
85
|
-
if (!
|
|
83
|
+
return o !== void 0 && fe(r, o);
|
|
84
|
+
}), Ae = 5, je = (e) => {
|
|
85
|
+
if (!ge) return {
|
|
86
86
|
emit: () => {
|
|
87
87
|
},
|
|
88
|
-
subscribe: () =>
|
|
88
|
+
subscribe: () => Fe,
|
|
89
89
|
getLastTrigger: () => null,
|
|
90
90
|
getLastCompile: () => null,
|
|
91
91
|
getCacheStats: () => e.getCacheStats()
|
|
@@ -97,7 +97,7 @@ var He = class extends Ce {
|
|
|
97
97
|
const o = e.getLastCompile();
|
|
98
98
|
if (o) {
|
|
99
99
|
r = n;
|
|
100
|
-
for (const
|
|
100
|
+
for (const a of t) a(n, o);
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
103
|
subscribe: (n) => (t.add(n), () => {
|
|
@@ -107,7 +107,7 @@ var He = class extends Ce {
|
|
|
107
107
|
getLastCompile: () => e.getLastCompile(),
|
|
108
108
|
getCacheStats: () => e.getCacheStats()
|
|
109
109
|
};
|
|
110
|
-
},
|
|
110
|
+
}, Ye = () => Y((e) => ({
|
|
111
111
|
lastCompile: null,
|
|
112
112
|
history: [],
|
|
113
113
|
nextId: 1,
|
|
@@ -116,19 +116,19 @@ var He = class extends Ce {
|
|
|
116
116
|
if (n.lastSnapshot === r) return n;
|
|
117
117
|
const o = {
|
|
118
118
|
id: n.nextId,
|
|
119
|
-
label:
|
|
119
|
+
label: Ue(t),
|
|
120
120
|
stages: r.stages,
|
|
121
121
|
durationMs: r.durationMs
|
|
122
122
|
};
|
|
123
123
|
return {
|
|
124
124
|
lastCompile: o,
|
|
125
|
-
history:
|
|
125
|
+
history: We(n.history, o, Ae),
|
|
126
126
|
nextId: n.nextId + 1,
|
|
127
127
|
lastSnapshot: r
|
|
128
128
|
};
|
|
129
129
|
})
|
|
130
|
-
})),
|
|
131
|
-
},
|
|
130
|
+
})), Fe = () => {
|
|
131
|
+
}, Ue = (e) => {
|
|
132
132
|
switch (e.kind) {
|
|
133
133
|
case "init":
|
|
134
134
|
return "init";
|
|
@@ -139,58 +139,58 @@ var He = class extends Ce {
|
|
|
139
139
|
case "command":
|
|
140
140
|
return e.command.metadata.description;
|
|
141
141
|
}
|
|
142
|
-
},
|
|
142
|
+
}, We = (e, t, r) => {
|
|
143
143
|
const n = e.length >= r ? e.length - (r - 1) : 0;
|
|
144
144
|
return [...e.slice(n), t];
|
|
145
145
|
};
|
|
146
|
-
function
|
|
147
|
-
const t = e.filter(re), r = /* @__PURE__ */ new Set([...Object.keys(
|
|
148
|
-
for (const
|
|
149
|
-
const
|
|
150
|
-
|
|
146
|
+
function Ve(e) {
|
|
147
|
+
const t = e.filter(re), r = /* @__PURE__ */ new Set([...Object.keys(ue), ...t.map((c) => c.geom)]), n = [], o = /* @__PURE__ */ new Set();
|
|
148
|
+
for (const c of e) {
|
|
149
|
+
const l = Pe(c);
|
|
150
|
+
l === null || r.has(l.type) || o.has(l.type) || (o.add(l.type), n.push({
|
|
151
151
|
kind: "user-input",
|
|
152
152
|
severity: "error",
|
|
153
153
|
code: "MISSING_GEOM_RENDERER",
|
|
154
|
-
message: `Custom geom '${
|
|
154
|
+
message: `Custom geom '${l.type}' is registered but has no renderer.`,
|
|
155
155
|
context: {
|
|
156
|
-
requested:
|
|
156
|
+
requested: l.type,
|
|
157
157
|
kind: "geom-renderer"
|
|
158
158
|
},
|
|
159
|
-
suggestion: `Add a render half for it: \`defineGeomRenderer(${
|
|
159
|
+
suggestion: `Add a render half for it: \`defineGeomRenderer(${l.type}Geom, { coord, render })\`, then include it in \`plugins\`.`
|
|
160
160
|
}));
|
|
161
161
|
}
|
|
162
|
-
const
|
|
163
|
-
for (const
|
|
164
|
-
if ("definition" in
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
geom:
|
|
168
|
-
coord:
|
|
162
|
+
const a = /* @__PURE__ */ new Map();
|
|
163
|
+
for (const c of t) {
|
|
164
|
+
if ("definition" in c) continue;
|
|
165
|
+
const l = `${c.geom}|${c.coord}`, h = a.get(l);
|
|
166
|
+
h ? h.count += 1 : a.set(l, {
|
|
167
|
+
geom: c.geom,
|
|
168
|
+
coord: c.coord,
|
|
169
169
|
count: 1
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
const i = [];
|
|
173
|
-
for (const { geom:
|
|
174
|
-
|
|
173
|
+
for (const { geom: c, coord: l, count: h } of a.values())
|
|
174
|
+
h < 2 || i.push({
|
|
175
175
|
kind: "user-input",
|
|
176
176
|
severity: "warning",
|
|
177
177
|
code: "DUPLICATE_REGISTERED_TYPE",
|
|
178
|
-
message: `Multiple render-only overrides register ('${
|
|
178
|
+
message: `Multiple render-only overrides register ('${c}', '${l}') (${h} entries); the last in the array wins.`,
|
|
179
179
|
context: {
|
|
180
|
-
requested: `${
|
|
180
|
+
requested: `${c}@${l}`,
|
|
181
181
|
kind: "geom-renderer"
|
|
182
182
|
},
|
|
183
|
-
suggestion: `Keep a single render-only override for ('${
|
|
183
|
+
suggestion: `Keep a single render-only override for ('${c}', '${l}').`
|
|
184
184
|
});
|
|
185
185
|
return {
|
|
186
186
|
errors: n,
|
|
187
187
|
warnings: i
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(),
|
|
190
|
+
function Xe(e, t) {
|
|
191
|
+
const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), a = [];
|
|
192
192
|
for (const i of n)
|
|
193
|
-
t(i.geom, r.type) !== null || o.has(i.geom) || (o.add(i.geom),
|
|
193
|
+
t(i.geom, r.type) !== null || o.has(i.geom) || (o.add(i.geom), a.push({
|
|
194
194
|
kind: "user-input",
|
|
195
195
|
severity: "warning",
|
|
196
196
|
code: "MISSING_GEOM_RENDERER",
|
|
@@ -201,14 +201,14 @@ function Ve(e, t) {
|
|
|
201
201
|
},
|
|
202
202
|
suggestion: `Register a renderer for ('${i.geom}', '${r.type}') via \`defineGeomRenderer\`.`
|
|
203
203
|
}));
|
|
204
|
-
return
|
|
204
|
+
return a;
|
|
205
205
|
}
|
|
206
|
-
function
|
|
207
|
-
const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(),
|
|
206
|
+
function Qe(e, t) {
|
|
207
|
+
const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), a = [];
|
|
208
208
|
for (const i of n) {
|
|
209
209
|
if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || o.has(i.geom)) continue;
|
|
210
|
-
const
|
|
211
|
-
|
|
210
|
+
const c = t(i.geom, r.type);
|
|
211
|
+
c === null || c.hitTest || A(c) || (o.add(i.geom), a.push({
|
|
212
212
|
kind: "user-input",
|
|
213
213
|
severity: "warning",
|
|
214
214
|
code: "MISSING_RENDER_HIT_TEST",
|
|
@@ -220,9 +220,9 @@ function Xe(e, t) {
|
|
|
220
220
|
suggestion: `Add a \`hitTest\` factory (precomputed geometry) or an overlay render (\`{ fn, options: { overlay: true } }\`, live simulation) to the renderer for ('${i.geom}', '${r.type}').`
|
|
221
221
|
}));
|
|
222
222
|
}
|
|
223
|
-
return
|
|
223
|
+
return a;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function ze(e) {
|
|
226
226
|
const t = /* @__PURE__ */ new Set(), r = [];
|
|
227
227
|
for (const n of e.layers) {
|
|
228
228
|
const o = n.identityKey;
|
|
@@ -240,12 +240,12 @@ function Qe(e) {
|
|
|
240
240
|
}
|
|
241
241
|
return r;
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(),
|
|
243
|
+
function Je(e, t) {
|
|
244
|
+
const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), a = [];
|
|
245
245
|
for (const i of n) {
|
|
246
246
|
if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || o.has(i.geom)) continue;
|
|
247
|
-
const
|
|
248
|
-
|
|
247
|
+
const c = t(i.geom, r.type);
|
|
248
|
+
c === null || !c.hitTest || !A(c) || (o.add(i.geom), a.push({
|
|
249
249
|
kind: "user-input",
|
|
250
250
|
severity: "warning",
|
|
251
251
|
code: "CONFLICTING_RENDER_HIT_TEST",
|
|
@@ -257,9 +257,9 @@ function ze(e, t) {
|
|
|
257
257
|
suggestion: "Keep one: a `hitTest` factory for precomputed geometry, OR an overlay render (`{ fn, options: { overlay: true } }`) for a live simulation."
|
|
258
258
|
}));
|
|
259
259
|
}
|
|
260
|
-
return
|
|
260
|
+
return a;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function Ze(e, t) {
|
|
263
263
|
const r = /* @__PURE__ */ new Set(), n = [];
|
|
264
264
|
for (const o of e.layers)
|
|
265
265
|
o.interactive !== !1 && (o.spatialKind !== "render-hit-test" || r.has(o.geom) || t.hasCapability(o.geom) || (r.add(o.geom), n.push({
|
|
@@ -275,12 +275,12 @@ function Je(e, t) {
|
|
|
275
275
|
})));
|
|
276
276
|
return n;
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(),
|
|
278
|
+
function et(e, t) {
|
|
279
|
+
const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), a = [];
|
|
280
280
|
for (const i of n) {
|
|
281
281
|
if (i.interactive === !1 || i.spatialKind === "render-hit-test" || o.has(i.geom)) continue;
|
|
282
|
-
const
|
|
283
|
-
|
|
282
|
+
const c = t(i.geom, r.type);
|
|
283
|
+
c === null || !A(c) || (o.add(i.geom), a.push({
|
|
284
284
|
kind: "user-input",
|
|
285
285
|
severity: "warning",
|
|
286
286
|
code: "OVERLAY_REQUIRES_RENDER_HIT_TEST",
|
|
@@ -292,102 +292,105 @@ function Ze(e, t) {
|
|
|
292
292
|
suggestion: "Have the geom's manifest yield spatialKind 'render-hit-test' so the compiled layer carries the `byKey` index the overlay's `pushHover` resolves against."
|
|
293
293
|
}));
|
|
294
294
|
}
|
|
295
|
-
return
|
|
295
|
+
return a;
|
|
296
296
|
}
|
|
297
|
-
var
|
|
297
|
+
var tt = (e) => Y((t) => ({
|
|
298
298
|
compiled: e,
|
|
299
299
|
setCompiled: (r) => t((n) => n.compiled === r ? n : { compiled: r })
|
|
300
|
-
})),
|
|
301
|
-
const
|
|
302
|
-
const s =
|
|
300
|
+
})), rt = ({ input: e, data: t, customPalettes: r, colorScheme: n, plugins: o, resolveRenderer: a, anchorResolver: i, onChange: c, onError: l, onWarnings: h }) => {
|
|
301
|
+
const T = K(c), w = K(l), q = K(h), [{ session: g, compileBus: u }] = C(() => {
|
|
302
|
+
const s = ye({ plugins: o });
|
|
303
303
|
return {
|
|
304
|
-
session: new
|
|
305
|
-
compileBus:
|
|
304
|
+
session: new pe(s),
|
|
305
|
+
compileBus: je(s)
|
|
306
306
|
};
|
|
307
|
-
}), [
|
|
307
|
+
}), [m] = C(() => Ve(o ?? [])), y = V(null), [_] = C(nt), N = V(null), b = f((s) => m.errors.length === 0 ? s : [...m.errors, ...s ?? []], [m]), I = f((s) => {
|
|
308
308
|
if (!s.ok) return s.errors;
|
|
309
|
-
if (
|
|
309
|
+
if (N.current) N.current.getState().setCompiled(s.compiled);
|
|
310
310
|
else {
|
|
311
|
-
const p =
|
|
312
|
-
p.subscribe(
|
|
311
|
+
const p = tt(s.compiled);
|
|
312
|
+
p.subscribe(_.notify), N.current = p, _.notify();
|
|
313
313
|
}
|
|
314
314
|
return null;
|
|
315
|
-
}, [
|
|
315
|
+
}, [_]), [x, D] = C(() => {
|
|
316
316
|
const s = g.compile({
|
|
317
317
|
input: e,
|
|
318
318
|
data: t,
|
|
319
|
-
customPalettes: r
|
|
319
|
+
customPalettes: r,
|
|
320
|
+
colorScheme: n
|
|
320
321
|
});
|
|
321
|
-
return
|
|
322
|
-
}),
|
|
322
|
+
return y.current = s, b(I(s));
|
|
323
|
+
}), G = f((s) => s.ok ? [
|
|
323
324
|
...s.warnings,
|
|
324
|
-
...
|
|
325
|
-
...
|
|
326
|
-
...
|
|
327
|
-
...
|
|
328
|
-
...
|
|
329
|
-
...
|
|
330
|
-
] : s.warnings, [
|
|
331
|
-
s.length !== 0 && (O(s), q.current?.(s));
|
|
332
|
-
}, [q]), S = f((s) => {
|
|
325
|
+
...Xe(s.compiled, a),
|
|
326
|
+
...Qe(s.compiled, a),
|
|
327
|
+
...ze(s.compiled),
|
|
328
|
+
...Je(s.compiled, a),
|
|
329
|
+
...et(s.compiled, a),
|
|
330
|
+
...Ze(s.compiled, i)
|
|
331
|
+
] : s.warnings, [a, i]), S = f((s) => {
|
|
333
332
|
s.length !== 0 && (O(s), w.current?.(s));
|
|
334
|
-
}, [w])
|
|
333
|
+
}, [w]), R = f((s) => {
|
|
334
|
+
s.length !== 0 && (O(s), q.current?.(s));
|
|
335
|
+
}, [q]);
|
|
335
336
|
$(() => {
|
|
336
|
-
const s =
|
|
337
|
-
s && (
|
|
337
|
+
const s = y.current;
|
|
338
|
+
s && (S([...m.errors, ...s.ok ? [] : s.errors]), R([...m.warnings, ...G(s)]), s.ok && u.emit({ kind: "init" }));
|
|
338
339
|
}, [
|
|
339
|
-
b,
|
|
340
|
-
_,
|
|
341
|
-
S,
|
|
342
340
|
u,
|
|
343
|
-
|
|
341
|
+
S,
|
|
342
|
+
R,
|
|
343
|
+
m,
|
|
344
|
+
G
|
|
344
345
|
]), $(() => {
|
|
345
346
|
const s = g.update({
|
|
346
347
|
input: e,
|
|
347
348
|
data: t,
|
|
348
|
-
customPalettes: r
|
|
349
|
+
customPalettes: r,
|
|
350
|
+
colorScheme: n
|
|
349
351
|
});
|
|
350
352
|
if (!s) return;
|
|
351
|
-
s.sealedInput &&
|
|
352
|
-
const p =
|
|
353
|
-
|
|
353
|
+
s.sealedInput && T.current?.(s.sealedInput);
|
|
354
|
+
const p = I(s.result);
|
|
355
|
+
D(b(p)), p && S(p), R(G(s.result)), p || u.emit({ kind: s.inputChanged ? "input" : "data" });
|
|
354
356
|
}, [
|
|
355
357
|
e,
|
|
356
358
|
t,
|
|
357
359
|
r,
|
|
360
|
+
n,
|
|
358
361
|
g,
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
_,
|
|
362
|
+
u,
|
|
363
|
+
I,
|
|
362
364
|
S,
|
|
363
|
-
G,
|
|
364
365
|
R,
|
|
365
|
-
|
|
366
|
+
b,
|
|
367
|
+
G,
|
|
368
|
+
T
|
|
366
369
|
]);
|
|
367
|
-
const
|
|
368
|
-
|
|
370
|
+
const k = f((s) => {
|
|
371
|
+
D((p) => p === null ? p : b(null)), R(G(s));
|
|
369
372
|
}, [
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
]),
|
|
374
|
-
s.compiled &&
|
|
373
|
+
b,
|
|
374
|
+
R,
|
|
375
|
+
G
|
|
376
|
+
]), H = f((s) => {
|
|
377
|
+
s.compiled && N.current?.getState().setCompiled(s.compiled), s.result && k(s.result), s.command && u.emit({
|
|
375
378
|
kind: "command",
|
|
376
379
|
command: s.command
|
|
377
|
-
}), s.input &&
|
|
380
|
+
}), s.input && T.current?.(s.input), s.errors && S([...s.errors]);
|
|
378
381
|
}, [
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
382
|
+
k,
|
|
383
|
+
u,
|
|
384
|
+
T,
|
|
385
|
+
S
|
|
383
386
|
]), E = f((s) => {
|
|
384
|
-
for (const p of s)
|
|
387
|
+
for (const p of s) H(p);
|
|
385
388
|
return s.some((p) => !!p.compiled);
|
|
386
|
-
}, [
|
|
389
|
+
}, [H]), L = f((s, p) => {
|
|
387
390
|
E(g.applyCommand(s, p));
|
|
388
|
-
}, [g, E]),
|
|
391
|
+
}, [g, E]), oe = f(() => {
|
|
389
392
|
E(g.seal());
|
|
390
|
-
}, [g, E]), F = f(() => E(g.undo()), [g, E]), U = f(() => E(g.redo()), [g, E]),
|
|
393
|
+
}, [g, E]), F = f(() => E(g.undo()), [g, E]), U = f(() => E(g.redo()), [g, E]), ie = P(() => ({
|
|
391
394
|
stack: g.history,
|
|
392
395
|
undo: F,
|
|
393
396
|
redo: U
|
|
@@ -395,18 +398,18 @@ var et = (e) => Y((t) => ({
|
|
|
395
398
|
g,
|
|
396
399
|
F,
|
|
397
400
|
U
|
|
398
|
-
]),
|
|
401
|
+
]), ae = f(() => N.current?.getState().compiled ?? null, []);
|
|
399
402
|
return {
|
|
400
|
-
store:
|
|
401
|
-
dispatch:
|
|
402
|
-
seal:
|
|
403
|
-
history:
|
|
404
|
-
subscribe:
|
|
405
|
-
getCompiled:
|
|
406
|
-
compileBus:
|
|
403
|
+
store: N.current,
|
|
404
|
+
dispatch: L,
|
|
405
|
+
seal: oe,
|
|
406
|
+
history: ie,
|
|
407
|
+
subscribe: _.subscribe,
|
|
408
|
+
getCompiled: ae,
|
|
409
|
+
compileBus: u,
|
|
407
410
|
compileErrors: x
|
|
408
411
|
};
|
|
409
|
-
},
|
|
412
|
+
}, nt = () => {
|
|
410
413
|
const e = /* @__PURE__ */ new Set();
|
|
411
414
|
return {
|
|
412
415
|
subscribe: (t) => (e.add(t), () => {
|
|
@@ -414,93 +417,94 @@ var et = (e) => Y((t) => ({
|
|
|
414
417
|
}),
|
|
415
418
|
notify: () => e.forEach((t) => t())
|
|
416
419
|
};
|
|
417
|
-
},
|
|
418
|
-
const [
|
|
420
|
+
}, st = {}, ot = ({ data: e, input: t, plugins: r = [], formattingLocale: n, handleRef: o, onChange: a, onError: i, onWarnings: c, customPalettes: l, colorScheme: h = "light", themeOverrides: T = st, children: w }) => {
|
|
421
|
+
const [q] = C(() => le(r.filter(re))), g = Re(), [u] = C(() => ve(r)), [m] = C(() => Be()), { store: y, dispatch: _, seal: N, history: b, subscribe: I, getCompiled: x, compileBus: D, compileErrors: G } = rt({
|
|
419
422
|
input: t,
|
|
420
423
|
data: e,
|
|
421
|
-
customPalettes:
|
|
424
|
+
customPalettes: l,
|
|
425
|
+
colorScheme: h,
|
|
422
426
|
plugins: r,
|
|
423
|
-
resolveRenderer:
|
|
427
|
+
resolveRenderer: q,
|
|
424
428
|
anchorResolver: u,
|
|
425
|
-
onChange:
|
|
429
|
+
onChange: a,
|
|
426
430
|
onError: i,
|
|
427
|
-
onWarnings:
|
|
431
|
+
onWarnings: c
|
|
428
432
|
});
|
|
429
433
|
$(() => {
|
|
430
434
|
if (y)
|
|
431
|
-
return y.subscribe((k,
|
|
432
|
-
if (k.compiled.spec ===
|
|
433
|
-
const { selection:
|
|
434
|
-
|
|
435
|
+
return y.subscribe((k, H) => {
|
|
436
|
+
if (k.compiled.spec === H.compiled.spec) return;
|
|
437
|
+
const { selection: E, setSelection: L } = m.getState();
|
|
438
|
+
E.length !== 0 && L(Le(E, k.compiled.spec));
|
|
435
439
|
});
|
|
436
|
-
}, [y,
|
|
440
|
+
}, [y, m]);
|
|
437
441
|
const S = P(() => ({
|
|
438
|
-
dispatch:
|
|
439
|
-
seal:
|
|
440
|
-
}), [
|
|
441
|
-
|
|
442
|
+
dispatch: _,
|
|
443
|
+
seal: N
|
|
444
|
+
}), [_, N]);
|
|
445
|
+
qe(o, () => ({
|
|
442
446
|
commands: S,
|
|
443
|
-
undo:
|
|
444
|
-
redo:
|
|
445
|
-
subscribe:
|
|
446
|
-
getCompiled:
|
|
447
|
-
getSelection: () =>
|
|
448
|
-
setSelection: (k) =>
|
|
449
|
-
subscribeSelection:
|
|
447
|
+
undo: b.undo,
|
|
448
|
+
redo: b.redo,
|
|
449
|
+
subscribe: I,
|
|
450
|
+
getCompiled: x,
|
|
451
|
+
getSelection: () => m.getState().selection,
|
|
452
|
+
setSelection: (k) => m.getState().setSelection(k),
|
|
453
|
+
subscribeSelection: m.subscribe
|
|
450
454
|
}), [
|
|
451
455
|
S,
|
|
452
|
-
|
|
453
|
-
x,
|
|
456
|
+
b,
|
|
454
457
|
I,
|
|
455
|
-
|
|
458
|
+
x,
|
|
459
|
+
m
|
|
456
460
|
]);
|
|
457
|
-
const
|
|
458
|
-
chartId:
|
|
461
|
+
const R = P(() => y ? {
|
|
462
|
+
chartId: g,
|
|
459
463
|
store: y,
|
|
460
|
-
selectionStore:
|
|
464
|
+
selectionStore: m,
|
|
461
465
|
commands: S,
|
|
462
|
-
history:
|
|
466
|
+
history: b,
|
|
463
467
|
formattingLocale: n,
|
|
464
|
-
compileBus:
|
|
465
|
-
colorScheme:
|
|
466
|
-
themeOverrides:
|
|
468
|
+
compileBus: D,
|
|
469
|
+
colorScheme: h,
|
|
470
|
+
themeOverrides: T,
|
|
467
471
|
anchorResolver: u
|
|
468
472
|
} : null, [
|
|
469
|
-
|
|
473
|
+
g,
|
|
470
474
|
y,
|
|
471
|
-
|
|
475
|
+
m,
|
|
472
476
|
S,
|
|
473
|
-
|
|
477
|
+
b,
|
|
474
478
|
n,
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
479
|
+
D,
|
|
480
|
+
h,
|
|
481
|
+
T,
|
|
478
482
|
u
|
|
479
483
|
]);
|
|
480
|
-
return /* @__PURE__ */
|
|
481
|
-
forcedErrors:
|
|
484
|
+
return /* @__PURE__ */ d(Me, {
|
|
485
|
+
forcedErrors: G,
|
|
482
486
|
onError: i,
|
|
483
487
|
resetKeys: [t, e],
|
|
484
|
-
children:
|
|
485
|
-
value:
|
|
486
|
-
children: /* @__PURE__ */
|
|
487
|
-
value:
|
|
488
|
+
children: R ? /* @__PURE__ */ d(ce.Provider, {
|
|
489
|
+
value: R,
|
|
490
|
+
children: /* @__PURE__ */ d(de, {
|
|
491
|
+
value: q,
|
|
488
492
|
children: w
|
|
489
493
|
})
|
|
490
494
|
}) : null
|
|
491
495
|
});
|
|
492
496
|
};
|
|
493
|
-
function
|
|
494
|
-
const t =
|
|
497
|
+
function ur(e) {
|
|
498
|
+
const t = be(e);
|
|
495
499
|
return {
|
|
496
500
|
...t,
|
|
497
|
-
GraphProvider: (n) => /* @__PURE__ */
|
|
501
|
+
GraphProvider: (n) => /* @__PURE__ */ d(ot, {
|
|
498
502
|
...n,
|
|
499
503
|
plugins: t.plugins
|
|
500
504
|
})
|
|
501
505
|
};
|
|
502
506
|
}
|
|
503
|
-
var
|
|
507
|
+
var mr = ({ children: e, ...t }) => /* @__PURE__ */ d("svg", {
|
|
504
508
|
viewBox: "0 0 1 1",
|
|
505
509
|
preserveAspectRatio: "none",
|
|
506
510
|
width: "100%",
|
|
@@ -508,9 +512,9 @@ var ur = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
|
|
|
508
512
|
pointerEvents: "none",
|
|
509
513
|
...t,
|
|
510
514
|
children: e
|
|
511
|
-
}),
|
|
512
|
-
var
|
|
513
|
-
var
|
|
515
|
+
}), it = "drqe3u0", at = "drqe3u1", ct = "drqe3u2", dt = "drqe3u3", M = "drqe3u4", lt = "drqe3u5", ut = "drqe3u6", mt = "drqe3u7", B = "drqe3u8", gt = "drqe3u9", ht = "drqe3ua";
|
|
516
|
+
var pt = "drqe3uc", ft = "drqe3ud", vt = "drqe3ue", yt = "drqe3uf";
|
|
517
|
+
var bt = "drqe3uh", St = "drqe3ui", Z = {
|
|
514
518
|
enabled: "drqe3uk drqe3uj",
|
|
515
519
|
disabled: "drqe3ul drqe3uj"
|
|
516
520
|
}, ee = {
|
|
@@ -520,94 +524,94 @@ var yt = "drqe3uh", bt = "drqe3ui", Z = {
|
|
|
520
524
|
ran: "drqe3uq drqe3up",
|
|
521
525
|
cached: "drqe3ur drqe3up",
|
|
522
526
|
untouched: "drqe3us drqe3up"
|
|
523
|
-
},
|
|
524
|
-
const { compileBus: n } = te(), [o] =
|
|
527
|
+
}, gr = ({ width: e = 380, style: t, className: r } = {}) => {
|
|
528
|
+
const { compileBus: n } = te(), [o] = C(() => Ye()), [a, i] = C(!1), [c, l] = C(Ee);
|
|
525
529
|
$(() => {
|
|
526
|
-
const { recordCompile: u } = o.getState(),
|
|
527
|
-
return
|
|
530
|
+
const { recordCompile: u } = o.getState(), m = n.getLastTrigger(), y = n.getLastCompile();
|
|
531
|
+
return m && y && u(m, y), n.subscribe(u);
|
|
528
532
|
}, [o, n]);
|
|
529
|
-
const
|
|
530
|
-
|
|
531
|
-
const
|
|
532
|
-
return
|
|
533
|
+
const h = X(o, (u) => u.lastCompile), T = X(o, (u) => u.history), w = n.getCacheStats(), q = h === null && T.length === 0, g = () => {
|
|
534
|
+
l((u) => {
|
|
535
|
+
const m = !u;
|
|
536
|
+
return Ce(m), m;
|
|
533
537
|
});
|
|
534
538
|
};
|
|
535
539
|
return /* @__PURE__ */ v("div", {
|
|
536
|
-
className:
|
|
540
|
+
className: ke(ht, r),
|
|
537
541
|
style: {
|
|
538
542
|
width: e,
|
|
539
543
|
...t
|
|
540
544
|
},
|
|
541
545
|
children: [
|
|
542
546
|
/* @__PURE__ */ v("div", {
|
|
543
|
-
className:
|
|
544
|
-
children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */
|
|
545
|
-
className:
|
|
547
|
+
className: it,
|
|
548
|
+
children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ d("div", {
|
|
549
|
+
className: at,
|
|
546
550
|
children: "compile cache"
|
|
547
|
-
}), /* @__PURE__ */
|
|
548
|
-
className:
|
|
549
|
-
children:
|
|
550
|
-
})] }), /* @__PURE__ */
|
|
551
|
+
}), /* @__PURE__ */ d("div", {
|
|
552
|
+
className: vt,
|
|
553
|
+
children: q ? "production: stats disabled" : h ? `last: ${h.label} · ${se(h.durationMs)}` : "awaiting first compile…"
|
|
554
|
+
})] }), /* @__PURE__ */ d("button", {
|
|
551
555
|
type: "button",
|
|
552
556
|
onClick: () => i((u) => !u),
|
|
553
|
-
className:
|
|
554
|
-
children:
|
|
557
|
+
className: yt,
|
|
558
|
+
children: a ? "▾" : "▴"
|
|
555
559
|
})]
|
|
556
560
|
}),
|
|
557
|
-
!
|
|
561
|
+
!a && /* @__PURE__ */ v("div", {
|
|
558
562
|
className: "drqe3ub",
|
|
559
563
|
children: [/* @__PURE__ */ v("button", {
|
|
560
564
|
type: "button",
|
|
561
|
-
onClick:
|
|
562
|
-
className:
|
|
563
|
-
"aria-pressed":
|
|
564
|
-
children: ["cache ",
|
|
565
|
-
}), /* @__PURE__ */
|
|
565
|
+
onClick: g,
|
|
566
|
+
className: c ? Z.enabled : Z.disabled,
|
|
567
|
+
"aria-pressed": c,
|
|
568
|
+
children: ["cache ", c ? "enabled" : "disabled"]
|
|
569
|
+
}), /* @__PURE__ */ d("span", {
|
|
566
570
|
className: "drqe3ug",
|
|
567
571
|
children: "next compile reflects this toggle"
|
|
568
572
|
})]
|
|
569
573
|
}),
|
|
570
|
-
!
|
|
571
|
-
delta:
|
|
574
|
+
!a && !q && /* @__PURE__ */ v(_e, { children: [/* @__PURE__ */ d(Et, {
|
|
575
|
+
delta: h?.stages,
|
|
572
576
|
cumulative: w
|
|
573
|
-
}), /* @__PURE__ */
|
|
577
|
+
}), /* @__PURE__ */ d(Tt, { entries: T })] })
|
|
574
578
|
]
|
|
575
579
|
});
|
|
576
|
-
},
|
|
577
|
-
className:
|
|
578
|
-
children: [/* @__PURE__ */
|
|
579
|
-
className:
|
|
580
|
+
}, Et = ({ delta: e, cumulative: t }) => /* @__PURE__ */ v("table", {
|
|
581
|
+
className: ct,
|
|
582
|
+
children: [/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ v("tr", {
|
|
583
|
+
className: bt,
|
|
580
584
|
children: [
|
|
581
|
-
/* @__PURE__ */
|
|
582
|
-
className:
|
|
585
|
+
/* @__PURE__ */ d("th", {
|
|
586
|
+
className: dt,
|
|
583
587
|
children: "stage"
|
|
584
588
|
}),
|
|
585
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ d("th", {
|
|
586
590
|
className: M,
|
|
587
591
|
children: "Δ miss"
|
|
588
592
|
}),
|
|
589
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ d("th", {
|
|
590
594
|
className: M,
|
|
591
595
|
children: "Δ hit"
|
|
592
596
|
}),
|
|
593
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ d("th", {
|
|
594
598
|
className: M,
|
|
595
599
|
children: "total miss"
|
|
596
600
|
}),
|
|
597
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ d("th", {
|
|
598
602
|
className: M,
|
|
599
603
|
children: "total hit"
|
|
600
604
|
})
|
|
601
605
|
]
|
|
602
|
-
}) }), /* @__PURE__ */
|
|
603
|
-
const n = e?.[r], o =
|
|
606
|
+
}) }), /* @__PURE__ */ d("tbody", { children: j.map((r) => {
|
|
607
|
+
const n = e?.[r], o = Ct(n);
|
|
604
608
|
return /* @__PURE__ */ v("tr", {
|
|
605
|
-
className:
|
|
609
|
+
className: pt,
|
|
606
610
|
children: [
|
|
607
611
|
/* @__PURE__ */ v("td", {
|
|
608
612
|
className: lt,
|
|
609
613
|
children: [
|
|
610
|
-
/* @__PURE__ */
|
|
614
|
+
/* @__PURE__ */ d("span", {
|
|
611
615
|
className: ne[o],
|
|
612
616
|
"aria-hidden": !0
|
|
613
617
|
}),
|
|
@@ -615,46 +619,46 @@ var yt = "drqe3uh", bt = "drqe3ui", Z = {
|
|
|
615
619
|
r
|
|
616
620
|
]
|
|
617
621
|
}),
|
|
618
|
-
/* @__PURE__ */
|
|
622
|
+
/* @__PURE__ */ d("td", {
|
|
619
623
|
className: o === "ran" ? ee.ran : ee.dim,
|
|
620
624
|
children: n?.misses ?? 0
|
|
621
625
|
}),
|
|
622
|
-
/* @__PURE__ */
|
|
626
|
+
/* @__PURE__ */ d("td", {
|
|
623
627
|
className: B,
|
|
624
628
|
children: n?.hits ?? 0
|
|
625
629
|
}),
|
|
626
|
-
/* @__PURE__ */
|
|
630
|
+
/* @__PURE__ */ d("td", {
|
|
627
631
|
className: B,
|
|
628
632
|
children: t[r].misses
|
|
629
633
|
}),
|
|
630
|
-
/* @__PURE__ */
|
|
634
|
+
/* @__PURE__ */ d("td", {
|
|
631
635
|
className: B,
|
|
632
636
|
children: t[r].hits
|
|
633
637
|
})
|
|
634
638
|
]
|
|
635
639
|
}, r);
|
|
636
640
|
}) })]
|
|
637
|
-
}),
|
|
638
|
-
className:
|
|
639
|
-
children: [/* @__PURE__ */
|
|
640
|
-
className:
|
|
641
|
+
}), Tt = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ v("div", {
|
|
642
|
+
className: ft,
|
|
643
|
+
children: [/* @__PURE__ */ d("div", {
|
|
644
|
+
className: St,
|
|
641
645
|
children: "recent compiles"
|
|
642
646
|
}), e.map((t) => {
|
|
643
|
-
const r =
|
|
647
|
+
const r = Nt(t.stages, (a) => a.misses > 0), n = j.length;
|
|
644
648
|
return /* @__PURE__ */ v("div", {
|
|
645
|
-
className:
|
|
649
|
+
className: ut,
|
|
646
650
|
children: [
|
|
647
|
-
/* @__PURE__ */
|
|
651
|
+
/* @__PURE__ */ d("span", {
|
|
648
652
|
className: ne[r === 0 ? "cached" : "ran"],
|
|
649
653
|
"aria-hidden": !0
|
|
650
654
|
}),
|
|
651
|
-
/* @__PURE__ */
|
|
652
|
-
className:
|
|
655
|
+
/* @__PURE__ */ d("span", {
|
|
656
|
+
className: mt,
|
|
653
657
|
title: t.label,
|
|
654
658
|
children: t.label
|
|
655
659
|
}),
|
|
656
660
|
/* @__PURE__ */ v("span", {
|
|
657
|
-
className:
|
|
661
|
+
className: gt,
|
|
658
662
|
children: [
|
|
659
663
|
r,
|
|
660
664
|
"/",
|
|
@@ -666,12 +670,12 @@ var yt = "drqe3uh", bt = "drqe3ui", Z = {
|
|
|
666
670
|
]
|
|
667
671
|
}, t.id);
|
|
668
672
|
})]
|
|
669
|
-
}),
|
|
673
|
+
}), Ct = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", Nt = (e, t) => {
|
|
670
674
|
let r = 0;
|
|
671
675
|
for (const n of j) t(e[n]) && (r += 1);
|
|
672
676
|
return r;
|
|
673
|
-
}, se = (e) => e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`,
|
|
674
|
-
const { history: e } = te(), { stack: t, undo: r, redo: n } = e, o = f((
|
|
677
|
+
}, se = (e) => e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, hr = () => {
|
|
678
|
+
const { history: e } = te(), { stack: t, undo: r, redo: n } = e, o = f((c) => t.subscribe(c), [t]), a = f(() => t.getSnapshot(), [t]), i = Ge(o, a, a);
|
|
675
679
|
return P(() => ({
|
|
676
680
|
...i,
|
|
677
681
|
undo: r,
|
|
@@ -681,7 +685,7 @@ var yt = "drqe3uh", bt = "drqe3ui", Z = {
|
|
|
681
685
|
r,
|
|
682
686
|
n
|
|
683
687
|
]);
|
|
684
|
-
},
|
|
688
|
+
}, Rt = /* @__PURE__ */ new Set([
|
|
685
689
|
"button",
|
|
686
690
|
"checkbox",
|
|
687
691
|
"color",
|
|
@@ -692,61 +696,61 @@ var yt = "drqe3uh", bt = "drqe3ui", Z = {
|
|
|
692
696
|
"range",
|
|
693
697
|
"reset",
|
|
694
698
|
"submit"
|
|
695
|
-
]),
|
|
699
|
+
]), pr = (e, t = {}) => {
|
|
696
700
|
const { target: r, enabled: n = !0 } = t;
|
|
697
701
|
$(() => {
|
|
698
|
-
const o =
|
|
702
|
+
const o = qt(r);
|
|
699
703
|
if (!n || !o) return;
|
|
700
|
-
const
|
|
701
|
-
if (!
|
|
702
|
-
const
|
|
703
|
-
if (!
|
|
704
|
-
const
|
|
705
|
-
|
|
704
|
+
const a = (i) => {
|
|
705
|
+
if (!Gt(i) || i.defaultPrevented || _t(i.target)) return;
|
|
706
|
+
const c = me(i);
|
|
707
|
+
if (!c) return;
|
|
708
|
+
const l = e.current;
|
|
709
|
+
l && (c === "undo" ? l.undo() : l.redo()) && i.preventDefault();
|
|
706
710
|
};
|
|
707
|
-
return o.addEventListener("keydown",
|
|
711
|
+
return o.addEventListener("keydown", a), () => o.removeEventListener("keydown", a);
|
|
708
712
|
}, [
|
|
709
713
|
e,
|
|
710
714
|
r,
|
|
711
715
|
n
|
|
712
716
|
]);
|
|
713
|
-
},
|
|
717
|
+
}, qt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, Gt = (e) => "key" in e, _t = (e) => e instanceof HTMLInputElement ? !Rt.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1;
|
|
714
718
|
export {
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
719
|
+
jt as BrandMark,
|
|
720
|
+
Ht as CanvasTextMeasurer,
|
|
721
|
+
Ft as DefaultFooter,
|
|
722
|
+
Jt as DefaultGrid,
|
|
723
|
+
xt as DefaultHeader,
|
|
724
|
+
rr as DefaultSwatch,
|
|
725
|
+
Pt as DefaultTooltip,
|
|
726
|
+
gr as DevToolsPanel,
|
|
727
|
+
Me as GraphErrorBoundary,
|
|
724
728
|
Q as GraphErrorPanel,
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
729
|
+
ot as GraphProvider,
|
|
730
|
+
Kt as GraphRenderer,
|
|
731
|
+
Wt as HoverProvider,
|
|
732
|
+
wt as TextMeasurerProvider,
|
|
733
|
+
Zt as ThemeProvider,
|
|
734
|
+
mr as UnitSpaceSvg,
|
|
735
|
+
ur as createGraphyKit,
|
|
736
|
+
zt as darkTheme,
|
|
737
|
+
er as defineGeomRenderer,
|
|
738
|
+
At as lightTheme,
|
|
739
|
+
Yt as lightenCss,
|
|
740
|
+
Le as pruneSelection,
|
|
741
|
+
It as resolveBrandMarkVisual,
|
|
742
|
+
$t as useCompiledSelector,
|
|
743
|
+
Ut as useElementScreenRect,
|
|
744
|
+
Xt as useGeomHitTest,
|
|
745
|
+
Bt as useGeomHover,
|
|
746
|
+
Vt as useGraphCommands,
|
|
747
|
+
Ot as useGraphHandle,
|
|
748
|
+
hr as useGraphHistory,
|
|
749
|
+
pr as useGraphHistoryShortcuts,
|
|
750
|
+
Lt as useGraphSelection,
|
|
751
|
+
Qt as useHandleCompiled,
|
|
752
|
+
Mt as useHoverState,
|
|
753
|
+
Dt as useStyleReaders,
|
|
754
|
+
tr as useTextMeasurer,
|
|
755
|
+
sr as vars
|
|
752
756
|
};
|