@graphysdk/react-renderer 1.9.0-beta.1790607168916 → 1.9.0-beta.1790607706146
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 +42 -42
- package/dist/{history-chords-Bw-7IlCd.js → history-chords-DtVsr3wh.js} +18 -17
- package/dist/history-chords-UXho7u0a.cjs +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +36 -0
- package/dist/index.mjs +160 -158
- package/package.json +2 -2
- package/dist/history-chords-CbwQsode.cjs +0 -2
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $t as
|
|
2
|
-
import { n as
|
|
1
|
+
import { $t as Bt, A as Ot, At as ge, B as Kt, Bt as Ft, Ct as jt, Et as U, Ht as Ut, I as Yt, Jt as Wt, L as Vt, Lt as Xt, M as Qt, Mt as V, Nt as he, Pt as zt, Qt as Jt, Rt as pe, Ut as Zt, Vt as er, a as tr, an as rr, cn as nr, ct as sr, dn as fe, dt as ar, en as ve, fn as X, gt as or, h as ir, i as cr, in as lr, j as dr, jt as ur, kt as ye, ln as mr, mn as Y, n as gr, nn as hr, nt as pr, on as fr, pn as Se, r as vr, rt as yr, s as Sr, sn as br, t as be, tn as K, tt as Er, un as Tr, ut as Rr, vt as Nr, w as Cr, wt as Gr, yt as qr, z as Dr } from "./history-chords-DtVsr3wh.js";
|
|
2
|
+
import { n as kr } from "./theme.contract.css-AyXDNf0F.js";
|
|
3
3
|
import { COMPILER_STAGE_KEYS as Q, Geom as Ee, GraphCompilationSession as Te, areEditTargetsEqual as Re, buildDiagnostic as ee, createAnchorResolver as Ne, createCompiler as Ce, createDataLabelPlacementResolver as Ge, createSpecBuilder as qe, createStyleResolver as De, findAnnotation as Ie, findLayerById as te, isCompilerCachingEnabled as ke, resolveDefinition as we, setCompilerCachingEnabled as _e, toPercent as B } from "@graphysdk/viz-engine";
|
|
4
4
|
import { Component as Pe, useCallback as f, useEffect as H, useId as Le, useImperativeHandle as $e, useMemo as M, useRef as re, useState as b, useSyncExternalStore as Me } from "react";
|
|
5
5
|
import { Fragment as He, jsx as i, jsxs as v } from "react/jsx-runtime";
|
|
@@ -72,10 +72,10 @@ var Ue = class extends Pe {
|
|
|
72
72
|
}, Ye = (e, t) => {
|
|
73
73
|
const n = e.filter((r) => We(r, t));
|
|
74
74
|
return n.length === e.length ? e : n;
|
|
75
|
-
}, We = (e, t) => e.kind === "annotation" ? Ie(t.annotations, e.id) !== null : e.kind === "observations" ? te(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? te(t.layers, e.layerId) !== void 0 : !0,
|
|
76
|
-
selection:
|
|
75
|
+
}, We = (e, t) => e.kind === "annotation" ? Ie(t.annotations, e.id) !== null : e.kind === "observations" ? te(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? te(t.layers, e.layerId) !== void 0 : !0, ae = [], Ve = () => z((e) => ({
|
|
76
|
+
selection: ae,
|
|
77
77
|
setSelection: (t) => e((n) => Xe(n.selection, t) ? n : { selection: t }),
|
|
78
|
-
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection:
|
|
78
|
+
clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: ae })
|
|
79
79
|
})), Xe = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((n, r) => {
|
|
80
80
|
const s = t[r];
|
|
81
81
|
return s !== void 0 && Re(n, s);
|
|
@@ -143,7 +143,7 @@ var Ue = class extends Pe {
|
|
|
143
143
|
return [...e.slice(r), t];
|
|
144
144
|
};
|
|
145
145
|
function nt(e) {
|
|
146
|
-
const t = e.filter(ce), n = /* @__PURE__ */ new Set([...Object.keys(
|
|
146
|
+
const t = e.filter(ce), n = /* @__PURE__ */ new Set([...Object.keys(he), ...t.map((l) => l.geom)]), r = [], s = /* @__PURE__ */ new Set();
|
|
147
147
|
for (const l of e) {
|
|
148
148
|
const d = le(l);
|
|
149
149
|
d === null || n.has(d.type) || s.has(d.type) || (s.add(d.type), r.push({
|
|
@@ -168,9 +168,9 @@ function nt(e) {
|
|
|
168
168
|
count: 1
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
|
-
const
|
|
171
|
+
const o = [];
|
|
172
172
|
for (const { geom: l, coord: d, count: g } of c.values())
|
|
173
|
-
g < 2 ||
|
|
173
|
+
g < 2 || o.push({
|
|
174
174
|
kind: "user-input",
|
|
175
175
|
severity: "warning",
|
|
176
176
|
code: "DUPLICATE_REGISTERED_TYPE",
|
|
@@ -181,47 +181,47 @@ function nt(e) {
|
|
|
181
181
|
},
|
|
182
182
|
suggestion: `Keep a single render-only override for ('${l}', '${d}').`
|
|
183
183
|
});
|
|
184
|
-
return
|
|
184
|
+
return o.push(...dt(e)), {
|
|
185
185
|
errors: r,
|
|
186
|
-
warnings:
|
|
186
|
+
warnings: o
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
189
|
function st(e, t) {
|
|
190
190
|
const { coordSystem: n, layers: r } = e, s = /* @__PURE__ */ new Set(), c = [];
|
|
191
|
-
for (const
|
|
192
|
-
t(
|
|
191
|
+
for (const o of r)
|
|
192
|
+
t(o.geom, n.type) !== null || s.has(o.geom) || (s.add(o.geom), c.push({
|
|
193
193
|
kind: "user-input",
|
|
194
194
|
severity: "warning",
|
|
195
195
|
code: "MISSING_GEOM_RENDERER",
|
|
196
|
-
message: `No renderer for geom '${
|
|
196
|
+
message: `No renderer for geom '${o.geom}' under ${n.type} coords; the layer is not painted.`,
|
|
197
197
|
context: {
|
|
198
|
-
requested:
|
|
198
|
+
requested: o.geom,
|
|
199
199
|
kind: "geom-renderer"
|
|
200
200
|
},
|
|
201
|
-
suggestion: `Register a renderer for ('${
|
|
201
|
+
suggestion: `Register a renderer for ('${o.geom}', '${n.type}') via \`defineGeomRenderer\`.`
|
|
202
202
|
}));
|
|
203
203
|
return c;
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function at(e, t) {
|
|
206
206
|
const { coordSystem: n, layers: r } = e, s = /* @__PURE__ */ new Set(), c = [];
|
|
207
|
-
for (const
|
|
208
|
-
if (
|
|
209
|
-
const l = t(
|
|
210
|
-
l === null || l.hitTest || V(l) || (s.add(
|
|
207
|
+
for (const o of r) {
|
|
208
|
+
if (o.interactive === !1 || o.spatialKind !== "render-hit-test" || s.has(o.geom)) continue;
|
|
209
|
+
const l = t(o.geom, n.type);
|
|
210
|
+
l === null || l.hitTest || V(l) || (s.add(o.geom), c.push({
|
|
211
211
|
kind: "user-input",
|
|
212
212
|
severity: "warning",
|
|
213
213
|
code: "MISSING_RENDER_HIT_TEST",
|
|
214
|
-
message: `Geom '${
|
|
214
|
+
message: `Geom '${o.geom}' declares spatialKind 'render-hit-test' but its renderer provides no hit-test; the layer has no hover.`,
|
|
215
215
|
context: {
|
|
216
|
-
requested:
|
|
216
|
+
requested: o.geom,
|
|
217
217
|
kind: "geom-renderer"
|
|
218
218
|
},
|
|
219
|
-
suggestion: `Add a \`hitTest\` factory (precomputed geometry) or an overlay render (\`{ fn, options: { overlay: true } }\`, live simulation) to the renderer for ('${
|
|
219
|
+
suggestion: `Add a \`hitTest\` factory (precomputed geometry) or an overlay render (\`{ fn, options: { overlay: true } }\`, live simulation) to the renderer for ('${o.geom}', '${n.type}').`
|
|
220
220
|
}));
|
|
221
221
|
}
|
|
222
222
|
return c;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function ot(e) {
|
|
225
225
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
226
226
|
for (const r of e.layers) {
|
|
227
227
|
const s = r.identityKey;
|
|
@@ -241,16 +241,16 @@ function at(e) {
|
|
|
241
241
|
}
|
|
242
242
|
function it(e, t) {
|
|
243
243
|
const { coordSystem: n, layers: r } = e, s = /* @__PURE__ */ new Set(), c = [];
|
|
244
|
-
for (const
|
|
245
|
-
if (
|
|
246
|
-
const l = t(
|
|
247
|
-
l === null || !l.hitTest || !V(l) || (s.add(
|
|
244
|
+
for (const o of r) {
|
|
245
|
+
if (o.interactive === !1 || o.spatialKind !== "render-hit-test" || s.has(o.geom)) continue;
|
|
246
|
+
const l = t(o.geom, n.type);
|
|
247
|
+
l === null || !l.hitTest || !V(l) || (s.add(o.geom), c.push({
|
|
248
248
|
kind: "user-input",
|
|
249
249
|
severity: "warning",
|
|
250
250
|
code: "CONFLICTING_RENDER_HIT_TEST",
|
|
251
|
-
message: `Geom '${
|
|
251
|
+
message: `Geom '${o.geom}' declares both a \`hitTest\` factory and an overlay render; these are alternatives, so only the overlay is used.`,
|
|
252
252
|
context: {
|
|
253
|
-
requested:
|
|
253
|
+
requested: o.geom,
|
|
254
254
|
kind: "geom-renderer"
|
|
255
255
|
},
|
|
256
256
|
suggestion: "Keep one: a `hitTest` factory for precomputed geometry, OR an overlay render (`{ fn, options: { overlay: true } }`) for a live simulation."
|
|
@@ -276,16 +276,16 @@ function ct(e, t) {
|
|
|
276
276
|
}
|
|
277
277
|
function lt(e, t) {
|
|
278
278
|
const { coordSystem: n, layers: r } = e, s = /* @__PURE__ */ new Set(), c = [];
|
|
279
|
-
for (const
|
|
280
|
-
if (
|
|
281
|
-
const l = t(
|
|
282
|
-
l === null || !V(l) || (s.add(
|
|
279
|
+
for (const o of r) {
|
|
280
|
+
if (o.interactive === !1 || o.spatialKind === "render-hit-test" || s.has(o.geom)) continue;
|
|
281
|
+
const l = t(o.geom, n.type);
|
|
282
|
+
l === null || !V(l) || (s.add(o.geom), c.push({
|
|
283
283
|
kind: "user-input",
|
|
284
284
|
severity: "warning",
|
|
285
285
|
code: "OVERLAY_REQUIRES_RENDER_HIT_TEST",
|
|
286
|
-
message: `Geom '${
|
|
286
|
+
message: `Geom '${o.geom}' declares an overlay render but its layer's spatialKind is '${o.spatialKind}', not 'render-hit-test'; the overlay's push-path hover resolves to nothing.`,
|
|
287
287
|
context: {
|
|
288
|
-
requested:
|
|
288
|
+
requested: o.geom,
|
|
289
289
|
kind: "geom-renderer"
|
|
290
290
|
},
|
|
291
291
|
suggestion: "Have the geom's manifest yield spatialKind 'render-hit-test' so the scene layer carries the `byKey` index the overlay's `pushHover` resolves against."
|
|
@@ -314,45 +314,45 @@ function dt(e) {
|
|
|
314
314
|
var ut = (e) => z((t) => ({
|
|
315
315
|
scene: e,
|
|
316
316
|
setScene: (n) => t((r) => r.scene === n ? r : { scene: n })
|
|
317
|
-
})), mt = ({ spec: e, data: t, customPalettes: n, colorScheme: r, plugins: s, resolveRenderer: c, anchorResolver:
|
|
317
|
+
})), mt = ({ spec: e, data: t, customPalettes: n, colorScheme: r, plugins: s, resolveRenderer: c, anchorResolver: o, onSpecChange: l, onError: d, onWarnings: g }) => {
|
|
318
318
|
const E = U(l), D = U(d), N = U(g), [{ session: h, compileBus: u }] = b(() => {
|
|
319
|
-
const
|
|
319
|
+
const a = Ce({ plugins: s });
|
|
320
320
|
return {
|
|
321
|
-
session: new Te(
|
|
322
|
-
compileBus: Je(
|
|
321
|
+
session: new Te(a),
|
|
322
|
+
compileBus: Je(a)
|
|
323
323
|
};
|
|
324
|
-
}), [m] = b(() => nt(s ?? [])), C = re(null), [I] = b(gt), y = re(null), G = f((
|
|
325
|
-
if (!
|
|
326
|
-
if (y.current) y.current.getState().setScene(
|
|
324
|
+
}), [m] = b(() => nt(s ?? [])), C = re(null), [I] = b(gt), y = re(null), G = f((a) => m.errors.length === 0 ? a : [...m.errors, ...a ?? []], [m]), _ = f((a) => {
|
|
325
|
+
if (!a.ok) return a.errors;
|
|
326
|
+
if (y.current) y.current.getState().setScene(a.scene);
|
|
327
327
|
else {
|
|
328
|
-
const p = ut(
|
|
328
|
+
const p = ut(a.scene);
|
|
329
329
|
p.subscribe(I.notify), y.current = p, I.notify();
|
|
330
330
|
}
|
|
331
331
|
return null;
|
|
332
332
|
}, [I]), [k, P] = b(() => {
|
|
333
|
-
const
|
|
333
|
+
const a = h.compile({
|
|
334
334
|
spec: e,
|
|
335
335
|
data: t,
|
|
336
336
|
customPalettes: n,
|
|
337
337
|
colorScheme: r
|
|
338
338
|
});
|
|
339
|
-
return C.current =
|
|
340
|
-
}), T = f((
|
|
341
|
-
...
|
|
342
|
-
...st(
|
|
343
|
-
...
|
|
344
|
-
...
|
|
345
|
-
...it(
|
|
346
|
-
...lt(
|
|
347
|
-
...ct(
|
|
348
|
-
] :
|
|
349
|
-
|
|
350
|
-
}, [D]), q = f((
|
|
351
|
-
|
|
339
|
+
return C.current = a, G(_(a));
|
|
340
|
+
}), T = f((a) => a.ok ? [
|
|
341
|
+
...a.warnings,
|
|
342
|
+
...st(a.scene, c),
|
|
343
|
+
...at(a.scene, c),
|
|
344
|
+
...ot(a.scene),
|
|
345
|
+
...it(a.scene, c),
|
|
346
|
+
...lt(a.scene, c),
|
|
347
|
+
...ct(a.scene, o)
|
|
348
|
+
] : a.warnings, [c, o]), R = f((a) => {
|
|
349
|
+
a.length !== 0 && (Y(a), D.current?.(a));
|
|
350
|
+
}, [D]), q = f((a) => {
|
|
351
|
+
a.length !== 0 && (Y(a), N.current?.(a));
|
|
352
352
|
}, [N]);
|
|
353
353
|
H(() => {
|
|
354
|
-
const
|
|
355
|
-
|
|
354
|
+
const a = C.current;
|
|
355
|
+
a && (R([...m.errors, ...a.ok ? [] : a.errors]), q([...m.warnings, ...T(a)]), a.ok && u.emit({ kind: "init" }));
|
|
356
356
|
}, [
|
|
357
357
|
u,
|
|
358
358
|
R,
|
|
@@ -360,16 +360,16 @@ var ut = (e) => z((t) => ({
|
|
|
360
360
|
m,
|
|
361
361
|
T
|
|
362
362
|
]), H(() => {
|
|
363
|
-
const
|
|
363
|
+
const a = h.update({
|
|
364
364
|
spec: e,
|
|
365
365
|
data: t,
|
|
366
366
|
customPalettes: n,
|
|
367
367
|
colorScheme: r
|
|
368
368
|
});
|
|
369
|
-
if (!
|
|
370
|
-
|
|
371
|
-
const p = _(
|
|
372
|
-
P(G(p)), p && R(p), q(T(
|
|
369
|
+
if (!a) return;
|
|
370
|
+
a.committedSpec && E.current?.(a.committedSpec);
|
|
371
|
+
const p = _(a.result);
|
|
372
|
+
P(G(p)), p && R(p), q(T(a.result)), p || u.emit({ kind: a.specChanged ? "spec" : "data" });
|
|
373
373
|
}, [
|
|
374
374
|
e,
|
|
375
375
|
t,
|
|
@@ -384,27 +384,27 @@ var ut = (e) => z((t) => ({
|
|
|
384
384
|
T,
|
|
385
385
|
E
|
|
386
386
|
]);
|
|
387
|
-
const w = f((
|
|
388
|
-
P((p) => p === null ? p : G(null)), q(T(
|
|
387
|
+
const w = f((a) => {
|
|
388
|
+
P((p) => p === null ? p : G(null)), q(T(a));
|
|
389
389
|
}, [
|
|
390
390
|
G,
|
|
391
391
|
q,
|
|
392
392
|
T
|
|
393
|
-
]), L = f((
|
|
394
|
-
|
|
393
|
+
]), L = f((a) => {
|
|
394
|
+
a.scene && y.current?.getState().setScene(a.scene), a.result && w(a.result), a.command && u.emit({
|
|
395
395
|
kind: "command",
|
|
396
|
-
command:
|
|
397
|
-
}),
|
|
396
|
+
command: a.command
|
|
397
|
+
}), a.spec && E.current?.(a.spec), a.errors && R([...a.errors]);
|
|
398
398
|
}, [
|
|
399
399
|
w,
|
|
400
400
|
u,
|
|
401
401
|
E,
|
|
402
402
|
R
|
|
403
|
-
]), S = f((
|
|
404
|
-
for (const p of
|
|
405
|
-
return
|
|
406
|
-
}, [L]), j = f((
|
|
407
|
-
S(h.applyCommand(
|
|
403
|
+
]), S = f((a) => {
|
|
404
|
+
for (const p of a) L(p);
|
|
405
|
+
return a.some((p) => !!p.scene);
|
|
406
|
+
}, [L]), j = f((a, p) => {
|
|
407
|
+
S(h.applyCommand(a, p));
|
|
408
408
|
}, [h, S]), x = f(() => {
|
|
409
409
|
S(h.commit());
|
|
410
410
|
}, [h, S]), A = f(() => S(h.undo()), [h, S]), Z = f(() => S(h.redo()), [h, S]), ue = M(() => ({
|
|
@@ -434,8 +434,8 @@ var ut = (e) => z((t) => ({
|
|
|
434
434
|
}),
|
|
435
435
|
notify: () => e.forEach((t) => t())
|
|
436
436
|
};
|
|
437
|
-
}, ht = ({ data: e, spec: t, plugins: n = [], formattingLocale: r, handleRef: s, onSpecChange: c, onError:
|
|
438
|
-
const [D] = b(() =>
|
|
437
|
+
}, ht = ({ data: e, spec: t, plugins: n = [], formattingLocale: r, handleRef: s, onSpecChange: c, onError: o, onWarnings: l, customPalettes: d, colorScheme: g = "light", children: E }) => {
|
|
438
|
+
const [D] = b(() => ge(n.filter(ce))), N = Le(), [h] = b(() => Ne(n)), [u] = b(() => Ge(n)), [m] = b(() => Ve()), [C] = b(() => ye()), I = M(() => De({ colorScheme: g }), [g]), { store: y, dispatch: G, commit: _, history: k, subscribe: P, getScene: T, compileBus: R, compileErrors: q } = mt({
|
|
439
439
|
spec: t,
|
|
440
440
|
data: e,
|
|
441
441
|
customPalettes: d,
|
|
@@ -444,7 +444,7 @@ var ut = (e) => z((t) => ({
|
|
|
444
444
|
resolveRenderer: D,
|
|
445
445
|
anchorResolver: h,
|
|
446
446
|
onSpecChange: c,
|
|
447
|
-
onError:
|
|
447
|
+
onError: o,
|
|
448
448
|
onWarnings: l
|
|
449
449
|
});
|
|
450
450
|
H(() => {
|
|
@@ -505,13 +505,13 @@ var ut = (e) => z((t) => ({
|
|
|
505
505
|
]);
|
|
506
506
|
return /* @__PURE__ */ i(Ue, {
|
|
507
507
|
forcedErrors: q,
|
|
508
|
-
onError:
|
|
508
|
+
onError: o,
|
|
509
509
|
resetKeys: [t, e],
|
|
510
|
-
children: L ? /* @__PURE__ */ i(
|
|
510
|
+
children: L ? /* @__PURE__ */ i(fe.Provider, {
|
|
511
511
|
value: L,
|
|
512
|
-
children: /* @__PURE__ */ i(
|
|
512
|
+
children: /* @__PURE__ */ i(pe, {
|
|
513
513
|
value: D,
|
|
514
|
-
children: /* @__PURE__ */ i(
|
|
514
|
+
children: /* @__PURE__ */ i(Se, {
|
|
515
515
|
value: u,
|
|
516
516
|
children: E
|
|
517
517
|
})
|
|
@@ -519,7 +519,7 @@ var ut = (e) => z((t) => ({
|
|
|
519
519
|
}) : null
|
|
520
520
|
});
|
|
521
521
|
};
|
|
522
|
-
function
|
|
522
|
+
function xr(e) {
|
|
523
523
|
const t = qe(e);
|
|
524
524
|
return {
|
|
525
525
|
...t,
|
|
@@ -529,7 +529,7 @@ function Mr(e) {
|
|
|
529
529
|
})
|
|
530
530
|
};
|
|
531
531
|
}
|
|
532
|
-
var
|
|
532
|
+
var Ar = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__PURE__ */ i(F.circle, {
|
|
533
533
|
initial: !1,
|
|
534
534
|
animate: {
|
|
535
535
|
cx: t,
|
|
@@ -543,7 +543,7 @@ var Hr = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__P
|
|
|
543
543
|
cy: n,
|
|
544
544
|
r,
|
|
545
545
|
...s
|
|
546
|
-
}),
|
|
546
|
+
}), Br = ({ shouldAnimateTransitions: e, x1: t, y1: n, x2: r, y2: s, ...c }) => e ? /* @__PURE__ */ i(F.line, {
|
|
547
547
|
initial: !1,
|
|
548
548
|
animate: {
|
|
549
549
|
x1: t,
|
|
@@ -559,7 +559,7 @@ var Hr = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__P
|
|
|
559
559
|
x2: r,
|
|
560
560
|
y2: s,
|
|
561
561
|
...c
|
|
562
|
-
}),
|
|
562
|
+
}), Or = ({ shouldAnimateTransitions: e, x: t, y: n, width: r, height: s, ...c }) => e ? /* @__PURE__ */ i(F.rect, {
|
|
563
563
|
initial: !1,
|
|
564
564
|
animate: {
|
|
565
565
|
attrX: t,
|
|
@@ -575,7 +575,7 @@ var Hr = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__P
|
|
|
575
575
|
width: r,
|
|
576
576
|
height: s,
|
|
577
577
|
...c
|
|
578
|
-
}),
|
|
578
|
+
}), Kr = ({ shouldAnimateTransitions: e, d: t, source: n, ...r }) => e ? /* @__PURE__ */ i(pt, {
|
|
579
579
|
d: t,
|
|
580
580
|
source: n,
|
|
581
581
|
...r
|
|
@@ -583,12 +583,12 @@ var Hr = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__P
|
|
|
583
583
|
d: t,
|
|
584
584
|
...r
|
|
585
585
|
}), pt = ({ d: e, source: t, ...n }) => {
|
|
586
|
-
const r =
|
|
586
|
+
const r = ve(e, K, t);
|
|
587
587
|
return /* @__PURE__ */ i(F.path, {
|
|
588
588
|
d: r,
|
|
589
589
|
...n
|
|
590
590
|
});
|
|
591
|
-
},
|
|
591
|
+
}, Fr = ({ children: e, ...t }) => /* @__PURE__ */ i("svg", {
|
|
592
592
|
viewBox: "0 0 1 1",
|
|
593
593
|
preserveAspectRatio: "none",
|
|
594
594
|
width: "100%",
|
|
@@ -596,7 +596,7 @@ var Hr = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__P
|
|
|
596
596
|
pointerEvents: "none",
|
|
597
597
|
...t,
|
|
598
598
|
children: e
|
|
599
|
-
}),
|
|
599
|
+
}), jr = ({ box: e, children: t }) => /* @__PURE__ */ i("svg", {
|
|
600
600
|
x: B(e.x0),
|
|
601
601
|
y: B(e.y0),
|
|
602
602
|
width: B(e.x1 - e.x0),
|
|
@@ -606,7 +606,7 @@ var Hr = ({ shouldAnimateTransitions: e, cx: t, cy: n, r, ...s }) => e ? /* @__P
|
|
|
606
606
|
children: t
|
|
607
607
|
}), ft = "drqe3u0", vt = "drqe3u1", yt = "drqe3u2", St = "drqe3u3", $ = "drqe3u4", bt = "drqe3u5", Et = "drqe3u6", Tt = "drqe3u7", O = "drqe3u8", Rt = "drqe3u9", Nt = "drqe3ua";
|
|
608
608
|
var Ct = "drqe3uc", Gt = "drqe3ud", qt = "drqe3ue", Dt = "drqe3uf";
|
|
609
|
-
var It = "drqe3uh", kt = "drqe3ui",
|
|
609
|
+
var It = "drqe3uh", kt = "drqe3ui", oe = {
|
|
610
610
|
enabled: "drqe3uk drqe3uj",
|
|
611
611
|
disabled: "drqe3ul drqe3uj"
|
|
612
612
|
}, ie = {
|
|
@@ -616,8 +616,8 @@ var It = "drqe3uh", kt = "drqe3ui", ae = {
|
|
|
616
616
|
ran: "drqe3uq drqe3up",
|
|
617
617
|
cached: "drqe3ur drqe3up",
|
|
618
618
|
untouched: "drqe3us drqe3up"
|
|
619
|
-
},
|
|
620
|
-
const { compileBus: r } = X(), [s] = b(() => Ze()), [c,
|
|
619
|
+
}, Ur = ({ width: e = 440, style: t, className: n } = {}) => {
|
|
620
|
+
const { compileBus: r } = X(), [s] = b(() => Ze()), [c, o] = b(!1), [l, d] = b(ke);
|
|
621
621
|
H(() => {
|
|
622
622
|
const { recordCompile: u } = s.getState(), m = r.getLastTrigger(), C = r.getLastCompile();
|
|
623
623
|
return m && C && u(m, C), r.subscribe(u);
|
|
@@ -645,7 +645,7 @@ var It = "drqe3uh", kt = "drqe3ui", ae = {
|
|
|
645
645
|
children: N ? "production: stats disabled" : g ? `last: ${g.label} · ${J(g.durationMs)}` : "awaiting first compile…"
|
|
646
646
|
})] }), /* @__PURE__ */ i("button", {
|
|
647
647
|
type: "button",
|
|
648
|
-
onClick: () =>
|
|
648
|
+
onClick: () => o((u) => !u),
|
|
649
649
|
className: Dt,
|
|
650
650
|
children: c ? "▾" : "▴"
|
|
651
651
|
})]
|
|
@@ -655,7 +655,7 @@ var It = "drqe3uh", kt = "drqe3ui", ae = {
|
|
|
655
655
|
children: [/* @__PURE__ */ v("button", {
|
|
656
656
|
type: "button",
|
|
657
657
|
onClick: h,
|
|
658
|
-
className: l ?
|
|
658
|
+
className: l ? oe.enabled : oe.disabled,
|
|
659
659
|
"aria-pressed": l,
|
|
660
660
|
children: ["cache ", l ? "enabled" : "disabled"]
|
|
661
661
|
}), /* @__PURE__ */ i("span", {
|
|
@@ -775,14 +775,14 @@ var It = "drqe3uh", kt = "drqe3ui", ae = {
|
|
|
775
775
|
let n = 0;
|
|
776
776
|
for (const r of Q) t(e[r]) && (n += 1);
|
|
777
777
|
return n;
|
|
778
|
-
}, J = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`,
|
|
779
|
-
const { history: e } = X(), { stack: t, undo: n, redo: r } = e, s = f((l) => t.subscribe(l), [t]), c = f(() => t.getSnapshot(), [t]),
|
|
778
|
+
}, J = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, Yr = () => {
|
|
779
|
+
const { history: e } = X(), { stack: t, undo: n, redo: r } = e, s = f((l) => t.subscribe(l), [t]), c = f(() => t.getSnapshot(), [t]), o = Me(s, c, c);
|
|
780
780
|
return M(() => ({
|
|
781
|
-
...
|
|
781
|
+
...o,
|
|
782
782
|
undo: n,
|
|
783
783
|
redo: r
|
|
784
784
|
}), [
|
|
785
|
-
|
|
785
|
+
o,
|
|
786
786
|
n,
|
|
787
787
|
r
|
|
788
788
|
]);
|
|
@@ -797,17 +797,17 @@ var It = "drqe3uh", kt = "drqe3ui", ae = {
|
|
|
797
797
|
"range",
|
|
798
798
|
"reset",
|
|
799
799
|
"submit"
|
|
800
|
-
]),
|
|
800
|
+
]), Wr = (e, t = {}) => {
|
|
801
801
|
const { target: n, enabled: r = !0 } = t;
|
|
802
802
|
H(() => {
|
|
803
803
|
const s = Mt(n);
|
|
804
804
|
if (!r || !s) return;
|
|
805
|
-
const c = (
|
|
806
|
-
if (!Ht(
|
|
807
|
-
const l =
|
|
805
|
+
const c = (o) => {
|
|
806
|
+
if (!Ht(o) || o.defaultPrevented || xt(o.target)) return;
|
|
807
|
+
const l = be(o);
|
|
808
808
|
if (!l) return;
|
|
809
809
|
const d = e.current;
|
|
810
|
-
d && (l === "undo" ? d.undo() : d.redo()) &&
|
|
810
|
+
d && (l === "undo" ? d.undo() : d.redo()) && o.preventDefault();
|
|
811
811
|
};
|
|
812
812
|
return s.addEventListener("keydown", c), () => s.removeEventListener("keydown", c);
|
|
813
813
|
}, [
|
|
@@ -815,66 +815,68 @@ var It = "drqe3uh", kt = "drqe3ui", ae = {
|
|
|
815
815
|
n,
|
|
816
816
|
r
|
|
817
817
|
]);
|
|
818
|
-
}, Mt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, Ht = (e) => "key" in e, xt = (e) => e instanceof HTMLInputElement ? !$t.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1,
|
|
818
|
+
}, Mt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, Ht = (e) => "key" in e, xt = (e) => e instanceof HTMLInputElement ? !$t.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, Vr = () => {
|
|
819
819
|
const { targetBoundaryStore: e } = X();
|
|
820
820
|
return W(e, (t) => t.boundary);
|
|
821
821
|
};
|
|
822
822
|
export {
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
823
|
+
Dr as BrandMark,
|
|
824
|
+
Ut as CanvasTextMeasurer,
|
|
825
|
+
Vt as DefaultFooter,
|
|
826
|
+
Sr as DefaultGrid,
|
|
827
|
+
Yt as DefaultHeader,
|
|
828
|
+
Xt as DefaultSwatch,
|
|
829
|
+
pr as DefaultTooltip,
|
|
830
|
+
Ur as DevToolsPanel,
|
|
831
831
|
or as GRAPH_MODES,
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
832
|
+
Ar as GeomCircle,
|
|
833
|
+
Br as GeomLine,
|
|
834
|
+
Kr as GeomPath,
|
|
835
|
+
Or as GeomRect,
|
|
836
836
|
Ue as GraphErrorBoundary,
|
|
837
837
|
ne as GraphErrorPanel,
|
|
838
838
|
ht as GraphProvider,
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
839
|
+
tr as GraphRenderer,
|
|
840
|
+
Gr as HoverProvider,
|
|
841
|
+
zt as IntroFade,
|
|
842
|
+
Bt as IntroWipeClip,
|
|
843
|
+
Ft as TextMeasurerProvider,
|
|
844
|
+
sr as ThemeProvider,
|
|
845
|
+
jr as UnitBoxSvg,
|
|
846
|
+
Fr as UnitSpaceSvg,
|
|
847
|
+
hr as buildDotsEditOutlineShapes,
|
|
848
|
+
xr as createGraphyKit,
|
|
849
|
+
Rr as darkTheme,
|
|
850
|
+
ur as defineGeomRenderer,
|
|
851
|
+
ar as lightTheme,
|
|
852
|
+
Wt as lightenCss,
|
|
853
|
+
rr as projectPointCartesian,
|
|
854
854
|
Ye as pruneSelection,
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
vr as
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
855
|
+
Kt as resolveBrandMarkVisual,
|
|
856
|
+
lr as scalePointToPanel,
|
|
857
|
+
Ot as stampAxisEditTarget,
|
|
858
|
+
dr as stampGridEditTarget,
|
|
859
|
+
Qt as stampLegendEditTarget,
|
|
860
|
+
qr as useElementScreenRect,
|
|
861
|
+
jt as useGeomHitTest,
|
|
862
|
+
Nr as useGeomHover,
|
|
863
|
+
fr as useGeomReaderTree,
|
|
864
|
+
br as useGeomStyleReader,
|
|
865
|
+
gr as useGraphCommands,
|
|
866
|
+
cr as useGraphHandle,
|
|
867
|
+
Yr as useGraphHistory,
|
|
868
|
+
Wr as useGraphHistoryShortcuts,
|
|
869
|
+
Er as useGraphLocale,
|
|
870
|
+
ir as useGraphSelection,
|
|
871
|
+
Cr as useGuidesTakePress,
|
|
872
|
+
vr as useHandleScene,
|
|
873
|
+
yr as useHoverState,
|
|
874
|
+
Jt as usePaintDefs,
|
|
875
|
+
Zt as useResolvedStyle,
|
|
876
|
+
Tr as useSceneSelector,
|
|
877
|
+
nr as useStyleReaderTree,
|
|
878
|
+
mr as useStyleResolver,
|
|
879
|
+
Vr as useTargetBoundary,
|
|
880
|
+
er as useTextMeasurer,
|
|
881
|
+
kr as vars
|
|
880
882
|
};
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"visualization",
|
|
12
12
|
"renderer"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.9.0-beta.
|
|
14
|
+
"version": "1.9.0-beta.1790607706146",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"sideEffects": [
|
|
17
17
|
"**/*.css.ts",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"react-colorful": "^5.6.1",
|
|
56
56
|
"react-intl": "^8.1.3",
|
|
57
57
|
"zustand": "^5.0.12",
|
|
58
|
-
"@graphysdk/viz-engine": "1.9.0-beta.
|
|
58
|
+
"@graphysdk/viz-engine": "1.9.0-beta.1790607706146"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@tiptap/core": "^3.0.0",
|