@graphysdk/react-renderer 1.9.0-beta.1793017273153 → 1.9.0-beta.1793027249956

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/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { $t as or, An as Ne, At as ar, Bt as ir, Cn as cr, Dn as lr, Dt as dr, En as ur, Ft as J, H as mr, Ht as W, Jt as Ge, M as hr, Mn as Ce, Mt as gr, N as pr, Nt as vr, On as fr, Pn as Z, Qt as yr, R as Sr, Rt as De, Sn as br, Tn as Er, Tt as Tr, Ut as we, V as Rr, Vt as Nr, Wt as Gr, Xt as Cr, Zt as Dr, _n as Pe, _t as wr, a as Pr, at as qr, bn as Ir, ct as _r, dn as A, fn as fe, gn as kr, h as Lr, hn as z, i as Mr, j as $r, jn as te, jt as xr, kn as Hr, ln as Ar, mn as qe, mt as Br, n as Or, on as Kr, ot as Fr, pn as Ie, qt as jr, r as Ur, rn as Wr, s as zr, t as _e, un as ye, vn as Y, vt as Yr, w as Vr, wn as Xr, yn as V, z as Qr, zt as ke } from "./history-chords-CzGv1JKQ.js";
2
- import { COMPILER_STAGE_KEYS as re, Geom as Le, GraphCompilationSession as Me, areEditTargetsEqual as $e, buildDiagnostic as oe, createAnchorResolver as xe, createCompiler as He, createDataLabelPlacementResolver as Ae, createSpecBuilder as Be, createStyleResolver as Se, findAnnotation as Oe, findLayerById as ae, isCompilerCachingEnabled as Ke, resolveDefinition as Fe, resolveGeomCornerRadiusPx as ie, setCompilerCachingEnabled as je, toPercent as j } from "@graphysdk/viz-engine";
3
- import { Component as Ue, useCallback as v, useEffect as H, useId as We, useImperativeHandle as ze, useMemo as _, useRef as ce, useState as b, useSyncExternalStore as Ye } from "react";
1
+ import { $t as or, An as Ne, At as ar, B as ir, Bt as cr, Cn as lr, Dn as dr, Dt as ur, En as mr, Ft as J, Ht as W, Jt as Ge, M as hr, Mn as Ce, Mt as gr, N as pr, Nt as vr, On as fr, Pn as Z, Qt as yr, R as Sr, Rt as Ie, Sn as br, Tn as Er, Tt as Tr, Ut as De, V as Rr, Vt as Nr, Wt as Gr, Xt as Cr, Zt as Ir, _n as we, _t as Dr, a as wr, at as Pr, bn as qr, ct as _r, dn as B, fn as fe, gn as kr, h as Lr, hn as z, i as Hr, j as $r, jn as te, jt as Mr, kn as xr, ln as Br, mn as Pe, mt as Ar, n as Or, on as Kr, ot as Fr, pn as qe, qt as jr, r as Ur, rn as Wr, s as zr, t as _e, un as ye, vn as Y, vt as Yr, w as Vr, wn as Xr, yn as V, z as Qr, zt as ke } from "./history-chords-KlzXRZPg.js";
2
+ import { COMPILER_STAGE_KEYS as re, Geom as Le, GraphCompilationSession as He, areEditTargetsEqual as $e, buildDiagnostic as oe, createAnchorResolver as Me, createCompiler as xe, createDataLabelPlacementResolver as Be, createSpecBuilder as Ae, createStyleResolver as Se, findAnnotation as Oe, findLayerById as ae, isCompilerCachingEnabled as Ke, resolveDefinition as Fe, resolveGeomCornerRadiusPx as ie, setCompilerCachingEnabled as je, toPercent as j } from "@graphysdk/viz-engine";
3
+ import { Component as Ue, useCallback as v, useEffect as x, useId as We, useImperativeHandle as ze, useMemo as _, useRef as ce, useState as b, useSyncExternalStore as Ye } from "react";
4
4
  import { Fragment as Ve, jsx as c, jsxs as f } from "react/jsx-runtime";
5
5
  import { useStore as ee } from "zustand";
6
6
  import { motion as X } from "motion/react";
@@ -142,11 +142,11 @@ var nt = class extends Ue {
142
142
  return [...e.slice(n), t];
143
143
  };
144
144
  function me(e) {
145
- const t = e.filter(be), r = /* @__PURE__ */ new Set([...Object.keys(we), ...t.map((l) => l.geom)]), n = [], s = /* @__PURE__ */ new Set();
145
+ const t = e.filter(be), r = /* @__PURE__ */ new Set([...Object.keys(De), ...t.map((l) => l.geom)]), n = [], s = /* @__PURE__ */ new Set();
146
146
  for (const l of e) {
147
147
  const d = Ee(l);
148
148
  d === null || r.has(d.type) || s.has(d.type) || (s.add(d.type), n.push({
149
- kind: "user-input",
149
+ kind: "userInput",
150
150
  severity: "error",
151
151
  code: "MISSING_GEOM_RENDERER",
152
152
  message: `Custom geom '${d.type}' is registered but has no renderer.`,
@@ -170,7 +170,7 @@ function me(e) {
170
170
  const a = [];
171
171
  for (const { geom: l, coord: d, count: m } of i.values())
172
172
  m < 2 || a.push({
173
- kind: "user-input",
173
+ kind: "userInput",
174
174
  severity: "warning",
175
175
  code: "DUPLICATE_REGISTERED_TYPE",
176
176
  message: `Multiple render-only overrides register ('${l}', '${d}') (${m} entries); the last in the array wins.`,
@@ -189,7 +189,7 @@ function pt(e, t) {
189
189
  const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
190
190
  for (const a of n)
191
191
  t(a.geom, r.type) !== null || s.has(a.geom) || (s.add(a.geom), i.push({
192
- kind: "user-input",
192
+ kind: "userInput",
193
193
  severity: "warning",
194
194
  code: "MISSING_GEOM_RENDERER",
195
195
  message: `No renderer for geom '${a.geom}' under ${r.type} coords; the layer is not painted.`,
@@ -204,13 +204,13 @@ function pt(e, t) {
204
204
  function vt(e, t) {
205
205
  const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
206
206
  for (const a of n) {
207
- if (a.interactive === !1 || a.spatialKind !== "render-hit-test" || s.has(a.geom)) continue;
207
+ if (a.interactive === !1 || a.spatialKind !== "renderHitTest" || s.has(a.geom)) continue;
208
208
  const l = t(a.geom, r.type);
209
209
  l === null || l.hitTest || W(l) || (s.add(a.geom), i.push({
210
- kind: "user-input",
210
+ kind: "userInput",
211
211
  severity: "warning",
212
212
  code: "MISSING_RENDER_HIT_TEST",
213
- message: `Geom '${a.geom}' declares spatialKind 'render-hit-test' but its renderer provides no hit-test; the layer has no hover.`,
213
+ message: `Geom '${a.geom}' declares spatialKind 'renderHitTest' but its renderer provides no hit-test; the layer has no hover.`,
214
214
  context: {
215
215
  requested: a.geom,
216
216
  kind: "geom-renderer"
@@ -224,8 +224,8 @@ function ft(e) {
224
224
  const t = /* @__PURE__ */ new Set(), r = [];
225
225
  for (const n of e.layers) {
226
226
  const s = n.identityKey;
227
- n.interactive !== !1 && (n.spatialKind !== "render-hit-test" || typeof s != "object" || t.has(n.geom) || n.data.hasVariable(s.variable) || (t.add(n.geom), r.push({
228
- kind: "user-input",
227
+ n.interactive !== !1 && (n.spatialKind !== "renderHitTest" || typeof s != "object" || t.has(n.geom) || n.data.hasVariable(s.variable) || (t.add(n.geom), r.push({
228
+ kind: "userInput",
229
229
  severity: "warning",
230
230
  code: "RENDER_HIT_TEST_IDENTITY",
231
231
  message: `Geom '${n.geom}' keys its identity on '${s.variable}', a column its compile output does not emit; its hover lookup is empty.`,
@@ -241,10 +241,10 @@ function ft(e) {
241
241
  function yt(e, t) {
242
242
  const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
243
243
  for (const a of n) {
244
- if (a.interactive === !1 || a.spatialKind !== "render-hit-test" || s.has(a.geom)) continue;
244
+ if (a.interactive === !1 || a.spatialKind !== "renderHitTest" || s.has(a.geom)) continue;
245
245
  const l = t(a.geom, r.type);
246
246
  l === null || !l.hitTest || !W(l) || (s.add(a.geom), i.push({
247
- kind: "user-input",
247
+ kind: "userInput",
248
248
  severity: "warning",
249
249
  code: "CONFLICTING_RENDER_HIT_TEST",
250
250
  message: `Geom '${a.geom}' declares both a \`hitTest\` factory and a live render; these are alternatives, so only the live render is used.`,
@@ -260,8 +260,8 @@ function yt(e, t) {
260
260
  function St(e, t) {
261
261
  const r = /* @__PURE__ */ new Set(), n = [];
262
262
  for (const s of e.layers)
263
- s.interactive !== !1 && (s.spatialKind !== "render-hit-test" || r.has(s.geom) || t.hasCapability(s.geom) || (r.add(s.geom), n.push({
264
- kind: "user-input",
263
+ s.interactive !== !1 && (s.spatialKind !== "renderHitTest" || r.has(s.geom) || t.hasCapability(s.geom) || (r.add(s.geom), n.push({
264
+ kind: "userInput",
265
265
  severity: "warning",
266
266
  code: "MISSING_ANCHOR_CAPABILITY",
267
267
  message: `Geom '${s.geom}' declares no \`resolveAnchorPosition\`; its observations cannot be annotated, so the editor overlay paints no creation trigger on them.`,
@@ -276,18 +276,18 @@ function St(e, t) {
276
276
  function bt(e, t) {
277
277
  const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
278
278
  for (const a of n) {
279
- if (a.interactive === !1 || a.spatialKind === "render-hit-test" || s.has(a.geom)) continue;
279
+ if (a.interactive === !1 || a.spatialKind === "renderHitTest" || s.has(a.geom)) continue;
280
280
  const l = t(a.geom, r.type);
281
281
  l === null || !W(l) || (s.add(a.geom), i.push({
282
- kind: "user-input",
282
+ kind: "userInput",
283
283
  severity: "warning",
284
284
  code: "LIVE_RENDER_REQUIRES_RENDER_HIT_TEST",
285
- message: `Geom '${a.geom}' declares a live render but its layer's spatialKind is '${a.spatialKind}', not 'render-hit-test'; its push-path hover resolves to nothing.`,
285
+ 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.`,
286
286
  context: {
287
287
  requested: a.geom,
288
288
  kind: "geom-renderer"
289
289
  },
290
- suggestion: "Have the geom's manifest yield spatialKind 'render-hit-test' so the scene layer carries the `byKey` index the live render's `pushHover` resolves against."
290
+ suggestion: "Have the geom's manifest yield spatialKind 'renderHitTest' so the scene layer carries the `byKey` index the live render's `pushHover` resolves against."
291
291
  }));
292
292
  }
293
293
  return i;
@@ -295,7 +295,7 @@ function bt(e, t) {
295
295
  function Et(e, t) {
296
296
  let r;
297
297
  return e.layers.flatMap((n, s) => W(t(n.geom, e.coordSystem.type)) ? Tt(n) ? (r ??= Se().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
298
- kind: "user-input",
298
+ kind: "userInput",
299
299
  severity: "warning",
300
300
  code: "INVALID_STYLE_RULE",
301
301
  message: `Style 'overpaint' in state 'hovered' is not supported on live geom '${n.geom}' (layer '${n.id}'); it is ignored.`,
@@ -313,7 +313,7 @@ function Rt(e) {
313
313
  for (const n of e) {
314
314
  const s = Ee(n);
315
315
  s === null || t.has(s.type) || s.dataLabelCoordTypes.length === 0 || s.getDataLabelPlacements !== void 0 || (t.add(s.type), r.push({
316
- kind: "user-input",
316
+ kind: "userInput",
317
317
  severity: "warning",
318
318
  code: "MISSING_DATA_LABEL_PLACEMENT",
319
319
  message: `Geom '${s.type}' declares \`dataLabelCoordTypes\` but implements no \`getDataLabelPlacements\`; its layers paint no data labels.`,
@@ -331,12 +331,12 @@ var Nt = (e) => ne((t) => ({
331
331
  setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
332
332
  })), Gt = ({ spec: e, data: t, colorScheme: r, plugins: n, theme: s, resolveRenderer: i, anchorResolver: a, onSpecChange: l, onError: d, onWarnings: m }) => {
333
333
  const G = J(l), C = J(d), T = J(m), [{ session: g, compileBus: u }] = b(() => {
334
- const o = He({
334
+ const o = xe({
335
335
  plugins: n,
336
336
  theme: s
337
337
  });
338
338
  return {
339
- session: new Me(o),
339
+ session: new He(o),
340
340
  compileBus: dt(o)
341
341
  };
342
342
  }), [p] = b(() => {
@@ -345,21 +345,21 @@ var Nt = (e) => ne((t) => ({
345
345
  errors: [...h.errors, ...o.errors],
346
346
  warnings: [...h.warnings, ...o.warnings]
347
347
  };
348
- }), R = ce(null), [y] = b(Ct), D = ce(null), q = v((o) => p.errors.length === 0 ? o : [...p.errors, ...o ?? []], [p]), N = v((o) => {
348
+ }), R = ce(null), [y] = b(Ct), I = ce(null), P = v((o) => p.errors.length === 0 ? o : [...p.errors, ...o ?? []], [p]), N = v((o) => {
349
349
  if (!o.ok) return o.errors;
350
- if (D.current) D.current.getState().setScene(o.scene);
350
+ if (I.current) I.current.getState().setScene(o.scene);
351
351
  else {
352
352
  const h = Nt(o.scene);
353
- h.subscribe(y.notify), D.current = h, y.notify();
353
+ h.subscribe(y.notify), I.current = h, y.notify();
354
354
  }
355
355
  return null;
356
- }, [y]), [B, k] = b(() => {
356
+ }, [y]), [A, k] = b(() => {
357
357
  const o = g.compile({
358
358
  spec: e,
359
359
  data: t,
360
360
  colorScheme: r
361
361
  });
362
- return R.current = o, q(N(o));
362
+ return R.current = o, P(N(o));
363
363
  }), E = v((o) => o.ok ? [
364
364
  ...o.warnings,
365
365
  ...pt(o.scene, i),
@@ -369,21 +369,21 @@ var Nt = (e) => ne((t) => ({
369
369
  ...bt(o.scene, i),
370
370
  ...Et(o.scene, i),
371
371
  ...St(o.scene, a)
372
- ] : o.warnings, [i, a]), w = v((o) => {
372
+ ] : o.warnings, [i, a]), D = v((o) => {
373
373
  o.length !== 0 && (Z(o), C.current?.(o));
374
- }, [C]), P = v((o) => {
374
+ }, [C]), w = v((o) => {
375
375
  o.length !== 0 && (Z(o), T.current?.(o));
376
376
  }, [T]);
377
- H(() => {
377
+ x(() => {
378
378
  const o = R.current;
379
- o && (w([...p.errors, ...o.ok ? [] : o.errors]), P([...p.warnings, ...E(o)]), o.ok && u.emit({ kind: "init" }));
379
+ o && (D([...p.errors, ...o.ok ? [] : o.errors]), w([...p.warnings, ...E(o)]), o.ok && u.emit({ kind: "init" }));
380
380
  }, [
381
381
  u,
382
+ D,
382
383
  w,
383
- P,
384
384
  p,
385
385
  E
386
- ]), H(() => {
386
+ ]), x(() => {
387
387
  const o = g.update({
388
388
  spec: e,
389
389
  data: t,
@@ -392,7 +392,7 @@ var Nt = (e) => ne((t) => ({
392
392
  if (!o) return;
393
393
  o.committedSpec && G.current?.(o.committedSpec);
394
394
  const h = N(o.result);
395
- k(q(h)), h && w(h), P(E(o.result)), h || u.emit({ kind: o.hasSpecChange ? "spec" : "data" });
395
+ k(P(h)), h && D(h), w(E(o.result)), h || u.emit({ kind: o.hasSpecChange ? "spec" : "data" });
396
396
  }, [
397
397
  e,
398
398
  t,
@@ -400,53 +400,53 @@ var Nt = (e) => ne((t) => ({
400
400
  g,
401
401
  u,
402
402
  N,
403
+ D,
403
404
  w,
404
405
  P,
405
- q,
406
406
  E,
407
407
  G
408
408
  ]);
409
409
  const L = v((o) => {
410
- k((h) => h === null ? h : q(null)), P(E(o));
410
+ k((h) => h === null ? h : P(null)), w(E(o));
411
411
  }, [
412
- q,
413
412
  P,
413
+ w,
414
414
  E
415
415
  ]), O = v((o) => {
416
- o.scene && D.current?.getState().setScene(o.scene), o.result && L(o.result), o.command && u.emit({
416
+ o.scene && I.current?.getState().setScene(o.scene), o.result && L(o.result), o.command && u.emit({
417
417
  kind: "command",
418
418
  command: o.command
419
- }), o.spec && G.current?.(o.spec), o.errors && w([...o.errors]);
419
+ }), o.spec && G.current?.(o.spec), o.errors && D([...o.errors]);
420
420
  }, [
421
421
  L,
422
422
  u,
423
423
  G,
424
- w
424
+ D
425
425
  ]), S = v((o) => {
426
426
  for (const h of o) O(h);
427
427
  return o.some((h) => !!h.scene);
428
428
  }, [O]), K = v((o, h) => {
429
429
  S(g.applyCommand(o, h));
430
- }, [g, S]), I = v(() => {
430
+ }, [g, S]), q = v(() => {
431
431
  S(g.commit());
432
- }, [g, S]), F = v(() => S(g.undo()), [g, S]), M = v(() => S(g.redo()), [g, S]), Q = _(() => ({
432
+ }, [g, S]), F = v(() => S(g.undo()), [g, S]), H = v(() => S(g.redo()), [g, S]), Q = _(() => ({
433
433
  stack: g.history,
434
434
  undo: F,
435
- redo: M
435
+ redo: H
436
436
  }), [
437
437
  g,
438
438
  F,
439
- M
440
- ]), Re = v(() => D.current?.getState().scene ?? null, []);
439
+ H
440
+ ]), Re = v(() => I.current?.getState().scene ?? null, []);
441
441
  return {
442
- store: D.current,
442
+ store: I.current,
443
443
  dispatch: K,
444
- commit: I,
444
+ commit: q,
445
445
  history: Q,
446
446
  subscribe: y.subscribe,
447
447
  getScene: Re,
448
448
  compileBus: u,
449
- compileErrors: B
449
+ compileErrors: A
450
450
  };
451
451
  }, Ct = () => {
452
452
  const e = /* @__PURE__ */ new Set();
@@ -456,8 +456,8 @@ var Nt = (e) => ne((t) => ({
456
456
  }),
457
457
  notify: () => e.forEach((t) => t())
458
458
  };
459
- }, Dt = ({ data: e, spec: t, plugins: r = [], theme: n, formattingLocale: s, handleRef: i, onSpecChange: a, onError: l, onWarnings: d, colorScheme: m = "light", children: G }) => {
460
- const [C] = b(() => n), T = C?.colorScheme ?? m, [g] = b(() => ke([...C?.plugins ?? [], ...r].filter(be))), u = We(), [p] = b(() => xe(r)), [R] = b(() => Ae(r)), [y] = b(() => at()), [D] = b(() => De()), q = _(() => Se({ colorScheme: T }), [T]), { store: N, dispatch: B, commit: k, history: E, subscribe: w, getScene: P, compileBus: L, compileErrors: O } = Gt({
459
+ }, It = ({ data: e, spec: t, plugins: r = [], theme: n, formattingLocale: s, handleRef: i, onSpecChange: a, onError: l, onWarnings: d, colorScheme: m = "light", children: G }) => {
460
+ const [C] = b(() => n), T = C?.colorScheme ?? m, [g] = b(() => ke([...C?.plugins ?? [], ...r].filter(be))), u = We(), [p] = b(() => Me(r)), [R] = b(() => Be(r)), [y] = b(() => at()), [I] = b(() => Ie()), P = _(() => Se({ colorScheme: T }), [T]), { store: N, dispatch: A, commit: k, history: E, subscribe: D, getScene: w, compileBus: L, compileErrors: O } = Gt({
461
461
  spec: t,
462
462
  data: e,
463
463
  colorScheme: T,
@@ -469,34 +469,34 @@ var Nt = (e) => ne((t) => ({
469
469
  onError: l,
470
470
  onWarnings: d
471
471
  });
472
- H(() => {
472
+ x(() => {
473
473
  if (N)
474
- return N.subscribe((I, F) => {
475
- if (I.scene.spec === F.scene.spec) return;
476
- const { selection: M, setSelection: Q } = y.getState();
477
- M.length !== 0 && Q(st(M, I.scene.spec));
474
+ return N.subscribe((q, F) => {
475
+ if (q.scene.spec === F.scene.spec) return;
476
+ const { selection: H, setSelection: Q } = y.getState();
477
+ H.length !== 0 && Q(st(H, q.scene.spec));
478
478
  });
479
479
  }, [N, y]);
480
480
  const S = _(() => ({
481
- dispatch: B,
481
+ dispatch: A,
482
482
  commit: k
483
- }), [B, k]);
483
+ }), [A, k]);
484
484
  ze(i, () => ({
485
485
  commands: S,
486
486
  undo: E.undo,
487
487
  redo: E.redo,
488
- subscribe: w,
489
- getScene: P,
488
+ subscribe: D,
489
+ getScene: w,
490
490
  getSelection: () => y.getState().selection,
491
- setSelection: (I) => y.getState().setSelection(I),
491
+ setSelection: (q) => y.getState().setSelection(q),
492
492
  subscribeSelection: y.subscribe,
493
493
  canPlaceDataLabels: R.hasCapability,
494
494
  canFormatDataLabelsAsPercentages: R.hasPercentageFormat
495
495
  }), [
496
496
  S,
497
497
  E,
498
+ D,
498
499
  w,
499
- P,
500
500
  y,
501
501
  R
502
502
  ]);
@@ -504,25 +504,25 @@ var Nt = (e) => ne((t) => ({
504
504
  chartId: u,
505
505
  store: N,
506
506
  selectionStore: y,
507
- targetBoundaryStore: D,
507
+ targetBoundaryStore: I,
508
508
  commands: S,
509
509
  history: E,
510
510
  formattingLocale: s,
511
511
  compileBus: L,
512
512
  colorScheme: T,
513
- styleResolver: q,
513
+ styleResolver: P,
514
514
  anchorResolver: p
515
515
  } : null, [
516
516
  u,
517
517
  N,
518
518
  y,
519
- D,
519
+ I,
520
520
  S,
521
521
  E,
522
522
  s,
523
523
  L,
524
524
  T,
525
- q,
525
+ P,
526
526
  p
527
527
  ]);
528
528
  return /* @__PURE__ */ c(nt, {
@@ -535,7 +535,7 @@ var Nt = (e) => ne((t) => ({
535
535
  value: g,
536
536
  children: /* @__PURE__ */ c(Ce, {
537
537
  value: R,
538
- children: /* @__PURE__ */ c(A, {
538
+ children: /* @__PURE__ */ c(B, {
539
539
  shapes: C?.shapes,
540
540
  children: G
541
541
  })
@@ -545,30 +545,30 @@ var Nt = (e) => ne((t) => ({
545
545
  });
546
546
  };
547
547
  function on({ theme: e, ...t } = {}) {
548
- const r = Be(t);
548
+ const r = Ae(t);
549
549
  return {
550
550
  ...r,
551
- GraphProvider: (s) => /* @__PURE__ */ c(Dt, {
551
+ GraphProvider: (s) => /* @__PURE__ */ c(It, {
552
552
  ...s,
553
553
  plugins: r.plugins,
554
554
  theme: e
555
555
  })
556
556
  };
557
557
  }
558
- var x = (e, t) => {
558
+ var M = (e, t) => {
559
559
  if (typeof e == "number") return Number.isFinite(e) ? e : null;
560
560
  if (!e.endsWith("%")) return null;
561
561
  const r = Number.parseFloat(e);
562
562
  return Number.isFinite(r) ? r / 100 * t : null;
563
563
  }, an = ({ x: e, y: t, width: r, height: n }, s) => {
564
- const i = x(e, s.width), a = x(t, s.height), l = x(r, s.width), d = x(n, s.height);
564
+ const i = M(e, s.width), a = M(t, s.height), l = M(r, s.width), d = M(n, s.height);
565
565
  return i === null || a === null || l === null || d === null ? null : {
566
566
  x: i,
567
567
  y: a,
568
568
  width: l,
569
569
  height: d
570
570
  };
571
- }, wt = ({ animateTransitions: e, cx: t, cy: r, r: n, effects: s, ...i }) => {
571
+ }, Dt = ({ animateTransitions: e, cx: t, cy: r, r: n, effects: s, ...i }) => {
572
572
  const a = V(s);
573
573
  return e ? /* @__PURE__ */ c(X.circle, {
574
574
  initial: !1,
@@ -587,7 +587,7 @@ var x = (e, t) => {
587
587
  style: a,
588
588
  ...i
589
589
  });
590
- }, Pt = ({ animateTransitions: e, x1: t, y1: r, x2: n, y2: s, effects: i, ...a }) => {
590
+ }, wt = ({ animateTransitions: e, x1: t, y1: r, x2: n, y2: s, effects: i, ...a }) => {
591
591
  const l = V(i);
592
592
  return e ? /* @__PURE__ */ c(X.line, {
593
593
  initial: !1,
@@ -608,7 +608,7 @@ var x = (e, t) => {
608
608
  style: l,
609
609
  ...a
610
610
  });
611
- }, qt = ({ animateTransitions: e, x: t, y: r, width: n, height: s, rx: i, ry: a, effects: l, ...d }) => {
611
+ }, Pt = ({ animateTransitions: e, x: t, y: r, width: n, height: s, rx: i, ry: a, effects: l, ...d }) => {
612
612
  const m = V(l);
613
613
  return e ? /* @__PURE__ */ c(X.rect, {
614
614
  initial: !1,
@@ -635,7 +635,7 @@ var x = (e, t) => {
635
635
  style: m,
636
636
  ...d
637
637
  });
638
- }, It = ({ animateTransitions: e, d: t, source: r, effects: n, ...s }) => {
638
+ }, qt = ({ animateTransitions: e, d: t, source: r, effects: n, ...s }) => {
639
639
  const i = V(n);
640
640
  return e ? /* @__PURE__ */ c(_t, {
641
641
  d: t,
@@ -649,21 +649,21 @@ var x = (e, t) => {
649
649
  });
650
650
  }, cn = (e) => {
651
651
  const { Circle: t } = z();
652
- return t === void 0 ? wt(e) : /* @__PURE__ */ c(A, { children: /* @__PURE__ */ c(t, { ...e }) });
652
+ return t === void 0 ? Dt(e) : /* @__PURE__ */ c(B, { children: /* @__PURE__ */ c(t, { ...e }) });
653
653
  }, ln = (e) => {
654
654
  const { Line: t } = z();
655
- return t === void 0 ? Pt(e) : /* @__PURE__ */ c(A, { children: /* @__PURE__ */ c(t, { ...e }) });
655
+ return t === void 0 ? wt(e) : /* @__PURE__ */ c(B, { children: /* @__PURE__ */ c(t, { ...e }) });
656
656
  }, dn = ({ cornerRadius: e, ...t }) => {
657
- const { Rect: r } = z(), n = fe(), s = qe(), i = {
657
+ const { Rect: r } = z(), n = fe(), s = Pe(), i = {
658
658
  ...t,
659
659
  ...kt(e, t, n, s)
660
660
  };
661
- return r === void 0 ? qt(i) : /* @__PURE__ */ c(A, { children: /* @__PURE__ */ c(r, { ...i }) });
661
+ return r === void 0 ? Pt(i) : /* @__PURE__ */ c(B, { children: /* @__PURE__ */ c(r, { ...i }) });
662
662
  }, un = (e) => {
663
663
  const { Path: t } = z();
664
- return t === void 0 ? It(e) : /* @__PURE__ */ c(A, { children: /* @__PURE__ */ c(t, { ...e }) });
664
+ return t === void 0 ? qt(e) : /* @__PURE__ */ c(B, { children: /* @__PURE__ */ c(t, { ...e }) });
665
665
  }, _t = ({ d: e, source: t, ...r }) => {
666
- const n = Pe(e, Y, t);
666
+ const n = we(e, Y, t);
667
667
  return /* @__PURE__ */ c(X.path, {
668
668
  d: n,
669
669
  ...r
@@ -687,7 +687,7 @@ var x = (e, t) => {
687
687
  }, he = (e, t, r) => {
688
688
  if (typeof e == "number") return Number.isFinite(e) ? Math.abs(e) * r : null;
689
689
  if (t === void 0) return null;
690
- const n = x(e, t);
690
+ const n = M(e, t);
691
691
  return n === null ? null : Math.abs(n);
692
692
  }, ge = (e, t) => t.x <= 0 || t.y <= 0 ? {
693
693
  rx: 0,
@@ -711,7 +711,7 @@ var x = (e, t) => {
711
711
  })
712
712
  });
713
713
  }, hn = ({ box: e, children: t }) => {
714
- const r = Ie(), n = r === null ? null : r.width * (e.x1 - e.x0), s = r === null ? null : r.height * (e.y1 - e.y0), i = _(() => n === null || s === null ? null : {
714
+ const r = qe(), n = r === null ? null : r.width * (e.x1 - e.x0), s = r === null ? null : r.height * (e.y1 - e.y0), i = _(() => n === null || s === null ? null : {
715
715
  width: n,
716
716
  height: s
717
717
  }, [n, s]);
@@ -727,7 +727,7 @@ var x = (e, t) => {
727
727
  children: t
728
728
  })
729
729
  });
730
- }, Mt = "drqe3u0", $t = "drqe3u1", xt = "drqe3u2", Ht = "drqe3u3", $ = "drqe3u4", At = "drqe3u5", Bt = "drqe3u6", Ot = "drqe3u7", U = "drqe3u8", Kt = "drqe3u9", Ft = "drqe3ua";
730
+ }, Ht = "drqe3u0", $t = "drqe3u1", Mt = "drqe3u2", xt = "drqe3u3", $ = "drqe3u4", Bt = "drqe3u5", At = "drqe3u6", Ot = "drqe3u7", U = "drqe3u8", Kt = "drqe3u9", Ft = "drqe3ua";
731
731
  var jt = "drqe3uc", Ut = "drqe3ud", Wt = "drqe3ue", zt = "drqe3uf";
732
732
  var Yt = "drqe3uh", Vt = "drqe3ui", pe = {
733
733
  enabled: "drqe3uk drqe3uj",
@@ -741,7 +741,7 @@ var Yt = "drqe3uh", Vt = "drqe3ui", pe = {
741
741
  untouched: "drqe3us drqe3up"
742
742
  }, gn = ({ width: e = 440, style: t, className: r } = {}) => {
743
743
  const { compileBus: n } = te(), [s] = b(() => ut()), [i, a] = b(!1), [l, d] = b(Ke);
744
- H(() => {
744
+ x(() => {
745
745
  const { recordCompile: u } = s.getState(), p = n.getLastTrigger(), R = n.getLastCompile();
746
746
  return p && R && u(p, R), n.subscribe(u);
747
747
  }, [s, n]);
@@ -759,7 +759,7 @@ var Yt = "drqe3uh", Vt = "drqe3ui", pe = {
759
759
  },
760
760
  children: [
761
761
  /* @__PURE__ */ f("div", {
762
- className: Mt,
762
+ className: Ht,
763
763
  children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ c("div", {
764
764
  className: $t,
765
765
  children: "compile cache"
@@ -794,12 +794,12 @@ var Yt = "drqe3uh", Vt = "drqe3ui", pe = {
794
794
  ]
795
795
  });
796
796
  }, Xt = ({ delta: e, durations: t, cumulative: r }) => /* @__PURE__ */ f("table", {
797
- className: xt,
797
+ className: Mt,
798
798
  children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ f("tr", {
799
799
  className: Yt,
800
800
  children: [
801
801
  /* @__PURE__ */ c("th", {
802
- className: Ht,
802
+ className: xt,
803
803
  children: "stage"
804
804
  }),
805
805
  /* @__PURE__ */ c("th", {
@@ -829,7 +829,7 @@ var Yt = "drqe3uh", Vt = "drqe3ui", pe = {
829
829
  className: jt,
830
830
  children: [
831
831
  /* @__PURE__ */ f("td", {
832
- className: At,
832
+ className: Bt,
833
833
  children: [
834
834
  /* @__PURE__ */ c("span", {
835
835
  className: Te[i],
@@ -870,7 +870,7 @@ var Yt = "drqe3uh", Vt = "drqe3ui", pe = {
870
870
  }), e.map((t) => {
871
871
  const r = Zt(t.stages, (i) => i.misses > 0), n = re.length;
872
872
  return /* @__PURE__ */ f("div", {
873
- className: Bt,
873
+ className: At,
874
874
  children: [
875
875
  /* @__PURE__ */ c("span", {
876
876
  className: Te[r === 0 ? "cached" : "ran"],
@@ -922,7 +922,7 @@ var Yt = "drqe3uh", Vt = "drqe3ui", pe = {
922
922
  "submit"
923
923
  ]), vn = (e, t = {}) => {
924
924
  const { target: r, enabled: n = !0 } = t;
925
- H(() => {
925
+ x(() => {
926
926
  const s = tr(r);
927
927
  if (!n || !s) return;
928
928
  const i = (a) => {
@@ -943,13 +943,12 @@ var Yt = "drqe3uh", Vt = "drqe3ui", pe = {
943
943
  return ee(e, (t) => t.boundary);
944
944
  };
945
945
  export {
946
- Rr as BrandMark,
947
946
  yr as CanvasTextMeasurer,
948
947
  Qr as DefaultFooter,
949
- wt as DefaultGeomCircle,
950
- Pt as DefaultGeomLine,
951
- It as DefaultGeomPath,
952
- qt as DefaultGeomRect,
948
+ Dt as DefaultGeomCircle,
949
+ wt as DefaultGeomLine,
950
+ qt as DefaultGeomPath,
951
+ Pt as DefaultGeomRect,
953
952
  zr as DefaultGrid,
954
953
  Sr as DefaultHeader,
955
954
  jr as DefaultSwatch,
@@ -958,58 +957,59 @@ export {
958
957
  Tr as GRAPH_MODES,
959
958
  cn as GeomCircle,
960
959
  ln as GeomLine,
961
- xr as GeomOverpaint,
960
+ Mr as GeomOverpaint,
962
961
  un as GeomPath,
963
962
  dn as GeomRect,
964
963
  nt as GraphErrorBoundary,
965
964
  le as GraphErrorPanel,
966
- Dt as GraphProvider,
967
- Pr as GraphRenderer,
965
+ It as GraphProvider,
966
+ wr as GraphRenderer,
967
+ ir as GraphyBadge,
968
968
  vr as HoverProvider,
969
969
  Gr as IntroFade,
970
970
  kr as IntroWipeClip,
971
971
  Cr as TextMeasurerProvider,
972
- Br as ThemeProvider,
972
+ Ar as ThemeProvider,
973
973
  hn as UnitBoxSvg,
974
974
  mn as UnitSpaceSvg,
975
975
  br as buildDotsEditOutlineShapes,
976
976
  on as createGraphyKit,
977
- wr as darkTheme,
978
- ir as defineGeomRenderer,
977
+ Dr as darkTheme,
978
+ cr as defineGeomRenderer,
979
979
  Nr as getBuiltInEditOutlineShapes,
980
980
  Yr as lightTheme,
981
981
  Wr as lightenCss,
982
982
  Xr as projectPointCartesian,
983
983
  st as pruneSelection,
984
- x as readPositionPixels,
984
+ M as readPositionPixels,
985
985
  an as readRectPixels,
986
- mr as resolveBrandMarkVisual,
987
- Ir as resolvePathStroke,
988
- cr as scalePointToPanel,
986
+ Rr as resolveGraphyBadgeVariant,
987
+ qr as resolvePathStroke,
988
+ lr as scalePointToPanel,
989
989
  $r as stampAxisEditTarget,
990
990
  hr as stampGridEditTarget,
991
991
  pr as stampLegendEditTarget,
992
- dr as useElementScreenRect,
992
+ ur as useElementScreenRect,
993
993
  gr as useGeomHitTest,
994
994
  ar as useGeomHover,
995
- Ie as useGeomPanelSize,
995
+ qe as useGeomPanelSize,
996
996
  Er as useGeomReaderTree,
997
- ur as useGeomStyleReader,
997
+ mr as useGeomStyleReader,
998
998
  Or as useGraphCommands,
999
- Mr as useGraphHandle,
999
+ Hr as useGraphHandle,
1000
1000
  pn as useGraphHistory,
1001
1001
  vn as useGraphHistoryShortcuts,
1002
- qr as useGraphLocale,
1002
+ Pr as useGraphLocale,
1003
1003
  Lr as useGraphSelection,
1004
1004
  Vr as useGuidesTakePress,
1005
1005
  Ur as useHandleScene,
1006
1006
  _r as useHoverState,
1007
- Ar as usePaintDefs,
1007
+ Br as usePaintDefs,
1008
1008
  or as useResolvedStyle,
1009
- Hr as useSceneSelector,
1010
- lr as useStyleReaderTree,
1009
+ xr as useSceneSelector,
1010
+ dr as useStyleReaderTree,
1011
1011
  fr as useStyleResolver,
1012
1012
  fn as useTargetBoundary,
1013
- Dr as useTextMeasurer,
1013
+ Ir as useTextMeasurer,
1014
1014
  Kr as vars
1015
1015
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "visualization",
12
12
  "renderer"
13
13
  ],
14
- "version": "1.9.0-beta.1793017273153",
14
+ "version": "1.9.0-beta.1793027249956",
15
15
  "type": "module",
16
16
  "sideEffects": [
17
17
  "**/*.css.ts",
@@ -50,7 +50,7 @@
50
50
  "react-colorful": "^5.6.1",
51
51
  "react-intl": "^8.1.3",
52
52
  "zustand": "^5.0.12",
53
- "@graphysdk/viz-engine": "1.9.0-beta.1793017273153"
53
+ "@graphysdk/viz-engine": "1.9.0-beta.1793027249956"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@tiptap/core": "^3.0.0",