@graphty/graphty-element 2.2.0 → 2.2.1

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/ai.js CHANGED
@@ -1,7 +1,7 @@
1
- import { f as p } from "./chunks/AiManager-DWwQiBQu.js";
2
- import { A as L, a as M, b as D, C as V, M as j, S as E, c as z, V as N, d as q, e as W, g as G, h as T, i as F, j as U, k as _, l as B, m as J, q as O, s as Y, n as H, o as Q, p as K, r as X, z as Z } from "./chunks/AiManager-DWwQiBQu.js";
1
+ import { f as p } from "./chunks/AiManager-Dp1mOkPm.js";
2
+ import { A as L, a as M, b as D, C as V, M as j, S as E, c as z, V as N, d as q, e as W, g as G, h as T, i as F, j as U, k as _, l as B, m as J, q as O, s as Y, n as H, o as Q, p as K, r as X, z as Z } from "./chunks/AiManager-Dp1mOkPm.js";
3
3
  import { A as te } from "./chunks/ApiKeyManager-C0ac91dE.js";
4
- import { V as se } from "./chunks/VoiceInputAdapter-mD0x3z7t.js";
4
+ import { V as se } from "./chunks/VoiceInputAdapter-Bbze1r8k.js";
5
5
  import { z as r } from "zod";
6
6
  import { A as u } from "./chunks/Algorithm-RQ629NLb.js";
7
7
  const m = r.object({
package/dist/catalog.js CHANGED
@@ -1,5 +1,5 @@
1
- import { B as y, L as f, a as m, P as T, S, U as v, b as O, c as E, l as A, d as N, e as I, p as R, f as k, s as x, g as _ } from "./chunks/scales-BUS7NWy2.js";
2
- import { C, a as L, b as P, c as W, d as U, e as F, f as B } from "./chunks/cameras-DFXNYBze.js";
1
+ import { B as y, L as f, a as m, P as T, S, U as v, b as O, c as E, l as A, d as N, e as I, p as R, f as k, s as x, g as _ } from "./chunks/scales-ulKMZPfG.js";
2
+ import { C, a as L, b as P, c as W, d as U, e as F, f as B } from "./chunks/cameras-CeJYi-Na.js";
3
3
  import { d as M, a as K } from "./chunks/detect-CqN0mC6u.js";
4
4
  import { F as Y, U as G, t as z, u as V, o as q } from "./chunks/paletteRegistry-NrWOKT-A.js";
5
5
  import { L as Z, l as $ } from "./chunks/GraphtyLogger-5KEttFUo.js";
@@ -1,9 +1,9 @@
1
- import { l as _ } from "./VoiceInputAdapter-mD0x3z7t.js";
1
+ import { l as _ } from "./VoiceInputAdapter-Bbze1r8k.js";
2
2
  import { G as K } from "./GraphtyLogger-5KEttFUo.js";
3
3
  import W from "jmespath";
4
4
  import { z as m } from "zod";
5
5
  import { e as G } from "./Algorithm-RQ629NLb.js";
6
- import { N as H, c as B, C as X } from "./cameras-DFXNYBze.js";
6
+ import { N as H, c as B, C as X } from "./cameras-CeJYi-Na.js";
7
7
  import { inferSchema as C } from "@jsonhero/schema-infer";
8
8
  import { i as Z } from "./GraphtyError-BwcnblTH.js";
9
9
  import { createAnthropic as Y } from "@ai-sdk/anthropic";
@@ -3,9 +3,9 @@ import { z as F } from "zod/v4";
3
3
  import { G as S, A as Ks, i as xt } from "./GraphtyError-BwcnblTH.js";
4
4
  import { e as Qs, b as Xs, d as Js } from "./NodeStyle-Cup9O1lu.js";
5
5
  import { E as Zs, B as st, C as rt, p as er, l as tr, k as nr, F as sr, G as ns, H as Pe, I as $e, J as Qt, K as Xt, A as jt, M as Xe, N as rr, O as or, Q as ir, z as ar, w as cr, T as lr } from "./paletteRegistry-NrWOKT-A.js";
6
- import { S as ss, B as ur, a as dr, P as rs, p as fe, k as zt, f as hr, s as fr } from "./scales-BUS7NWy2.js";
6
+ import { S as ss, B as ur, a as dr, P as rs, p as fe, k as zt, f as hr, s as fr } from "./scales-ulKMZPfG.js";
7
7
  import { h as os, k as mr, l as ot, D as gr, e as pr, b as br, m as is } from "./Algorithm-RQ629NLb.js";
8
- import { C as vr, t as de, e as Je, a as as, i as cs, f as Ae, j as yr } from "./cameras-DFXNYBze.js";
8
+ import { C as vr, t as de, e as Je, a as as, i as cs, f as Ae, j as yr } from "./cameras-CeJYi-Na.js";
9
9
  import { a as wr, L as Or } from "./GraphtyLogger-5KEttFUo.js";
10
10
  import { f as Nr } from "./sequential-Zym81qm7.js";
11
11
  import { i as Jt } from "./interpolation-DY-PNpqX.js";
@@ -6501,6 +6501,15 @@ const ul = Object.freeze({
6501
6501
  // describes: one source mesh is precisely the set of nodes sharing one effect configuration.
6502
6502
  "node.outline": "mesh",
6503
6503
  "node.glow": "mesh",
6504
+ // A glow's STRENGTH is keyed the same way. `NodeEffects.syncGlowStrengths` gives each SOURCE
6505
+ // mesh its own intensity (Babylon's per-mesh `setEffectIntensity`, keyed by uniqueId), so two
6506
+ // strengths need two source meshes. As an `instance` channel, two styles differing only in
6507
+ // strength shared one source and were drawn at whichever was applied last.
6508
+ // COST, as for `node.glow`: every distinct strength builds and caches one source mesh, so a
6509
+ // strength computed per node or encoded from data breaks instancing into one mesh per value.
6510
+ // ponytail: quantize the strength in the key (or evict source meshes left with no instances)
6511
+ // if a continuous glow encoding ever shows up in a profile.
6512
+ "node.glowStrength": "mesh",
6504
6513
  "edge.width": "mesh",
6505
6514
  "edge.style": "mesh",
6506
6515
  "edge.patternCount": "mesh",
@@ -6522,15 +6531,6 @@ const ul = Object.freeze({
6522
6531
  // Per-instance state: one buffer write, and never a reason to build a second mesh.
6523
6532
  "node.color": "instance",
6524
6533
  "node.opacity": "instance",
6525
- // A glow's STRENGTH is the opposite case to its colour. Babylon keeps a glow's intensity on
6526
- // the LAYER, one per scene, so no two nodes can ever be drawn at two strengths and a source
6527
- // mesh per strength would buy nothing at all -- which is what it was minting, because
6528
- // `Node.paintFrom` used to apply a node's effects only on the branch that rebuilds the mesh
6529
- // and a channel outside the key therefore never reached the screen. That branch now applies
6530
- // every `instance` channel whether it rebuilds or not, so a strength edit repaints without
6531
- // minting anything. The caveat on the channel says the rest: the last strength applied is
6532
- // the strength every glowing node is drawn at.
6533
- "node.glowStrength": "instance",
6534
6534
  "edge.color": "instance",
6535
6535
  "edge.opacity": "instance",
6536
6536
  // Drawn beside the mesh, and per element by nature.
@@ -1,4 +1,4 @@
1
- import { g as ke, h as up } from "./cameras-DFXNYBze.js";
1
+ import { g as ke, h as up } from "./cameras-CeJYi-Na.js";
2
2
  var ee = { exports: {} };
3
3
  var fp = ee.exports, oo;
4
4
  function op() {
@@ -1,5 +1,5 @@
1
1
  import { Vector3 as f, Quaternion as E, Ray as R, WebXRState as T } from "@babylonjs/core";
2
- import { P as M } from "./index-2VIpMJZP.js";
2
+ import { P as M } from "./index-Cz47b_vU.js";
3
3
  import "@babylonjs/core/Culling/ray";
4
4
  import { G as x } from "./GraphtyLogger-5KEttFUo.js";
5
5
  function v(H, t = 0.15) {
@@ -9,15 +9,15 @@ const T = /^#?(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;
9
9
  function s(e) {
10
10
  return Number.isFinite(e) ? Math.max(0, Math.min(255, Math.round(e))) : 0;
11
11
  }
12
- function i(e) {
12
+ function d(e) {
13
13
  return e.toString(16).padStart(2, "0");
14
14
  }
15
15
  function S(e) {
16
16
  if (!T.test(e))
17
17
  return null;
18
18
  const a = e.startsWith("#") ? e.slice(1) : e, t = a.length <= 4, n = (r) => {
19
- const m = t ? a[r].repeat(2) : a.slice(r * 2, r * 2 + 2);
20
- return parseInt(m, 16);
19
+ const w = t ? a[r].repeat(2) : a.slice(r * 2, r * 2 + 2);
20
+ return parseInt(w, 16);
21
21
  }, o = a.length === 4 || a.length === 8;
22
22
  return {
23
23
  r: n(0),
@@ -45,10 +45,10 @@ function P(e) {
45
45
  }
46
46
  }
47
47
  function c(e) {
48
- const a = s(e.r), t = s(e.g), n = s(e.b), o = Number.isFinite(e.a) ? Math.max(0, Math.min(1, e.a)) : 1, r = `#${i(a)}${i(t)}${i(n)}`;
49
- return { r: a, g: t, b: n, a: o, hex: o === 1 ? r : `${r}${i(Math.round(o * 255))}` };
48
+ const a = s(e.r), t = s(e.g), n = s(e.b), o = Number.isFinite(e.a) ? Math.max(0, Math.min(1, e.a)) : 1, r = `#${d(a)}${d(t)}${d(n)}`;
49
+ return { r: a, g: t, b: n, a: o, hex: o === 1 ? r : `${r}${d(Math.round(o * 255))}` };
50
50
  }
51
- const A = b.options, x = g.shape.line.unwrap().shape.type.unwrap().options, h = g.shape.arrowHead.unwrap().shape.type.unwrap().unwrap().options, C = "An outline has a colour and no width. Babylon draws it with a highlight LAYER, and the stroke's blur size belongs to that layer rather than to a mesh, so every outline on screen is drawn at one width whatever a style asks for -- which is why the node style declares no outline width to ask with. The outline's COLOUR is per style; a width per style would need one highlight layer per width, at a full-screen pass each.", d = 'A caption hangs from the cap at that end of the edge, so an end drawn with no arrow carries none: a tail caption needs `edge.arrowTail` set to something other than "none". The words are what switch a caption on, so a layer that writes only the caption\'s appearance and no words draws nothing, exactly as `node.labelStyle` draws nothing without `node.label`.', p = "A tooltip is drawn on hover and only on hover, so a graph at rest shows none: a layer that writes one changes nothing until a reader points at the node. The words are what switch it on, so a layer that writes only the tooltip's appearance and no words draws nothing, exactly as `node.labelStyle` draws nothing without `node.label`. Only a NODE has a tooltip; `edge.tooltip` was withdrawn in 2.0 because an edge cannot be hovered.", l = {
51
+ const A = b.options, x = g.shape.line.unwrap().shape.type.unwrap().options, h = g.shape.arrowHead.unwrap().shape.type.unwrap().unwrap().options, C = "An outline has a colour and no width. Babylon draws it with a highlight LAYER, and the stroke's blur size belongs to that layer rather than to a mesh, so every outline on screen is drawn at one width whatever a style asks for -- which is why the node style declares no outline width to ask with. The outline's COLOUR is per style; a width per style would need one highlight layer per width, at a full-screen pass each.", i = 'A caption hangs from the cap at that end of the edge, so an end drawn with no arrow carries none: a tail caption needs `edge.arrowTail` set to something other than "none". The words are what switch a caption on, so a layer that writes only the caption\'s appearance and no words draws nothing, exactly as `node.labelStyle` draws nothing without `node.label`.', p = "A tooltip is drawn on hover and only on hover, so a graph at rest shows none: a layer that writes one changes nothing until a reader points at the node. The words are what switch it on, so a layer that writes only the tooltip's appearance and no words draws nothing, exactly as `node.labelStyle` draws nothing without `node.label`. Only a NODE has a tooltip; `edge.tooltip` was withdrawn in 2.0 because an edge cannot be hovered.", l = {
52
52
  "node.color": {
53
53
  channel: "node.color",
54
54
  target: "node",
@@ -143,8 +143,7 @@ const A = b.options, x = g.shape.line.unwrap().shape.type.unwrap().options, h =
143
143
  accepts: "number",
144
144
  min: 0,
145
145
  stylePath: "effect.glow.strength",
146
- renderable: !0,
147
- caveat: "Babylon's glow intensity belongs to the glow LAYER rather than to a mesh, so with two glowing styles on screen both are drawn at whichever strength was applied last. The glow's COLOUR is per style. Per-style strength needs one full-screen pass each."
146
+ renderable: !0
148
147
  },
149
148
  "node.wireframe": {
150
149
  channel: "node.wireframe",
@@ -269,7 +268,7 @@ const A = b.options, x = g.shape.line.unwrap().shape.type.unwrap().options, h =
269
268
  accepts: "text",
270
269
  stylePath: "arrowHead.text.text",
271
270
  renderable: !0,
272
- caveat: d
271
+ caveat: i
273
272
  },
274
273
  "edge.arrowHeadTextStyle": {
275
274
  channel: "edge.arrowHeadTextStyle",
@@ -278,7 +277,7 @@ const A = b.options, x = g.shape.line.unwrap().shape.type.unwrap().options, h =
278
277
  accepts: "labelStyle",
279
278
  stylePath: "arrowHead.text",
280
279
  renderable: !0,
281
- caveat: d
280
+ caveat: i
282
281
  },
283
282
  "edge.arrowTail": {
284
283
  channel: "edge.arrowTail",
@@ -323,7 +322,7 @@ const A = b.options, x = g.shape.line.unwrap().shape.type.unwrap().options, h =
323
322
  accepts: "text",
324
323
  stylePath: "arrowTail.text.text",
325
324
  renderable: !0,
326
- caveat: d
325
+ caveat: i
327
326
  },
328
327
  "edge.arrowTailTextStyle": {
329
328
  channel: "edge.arrowTailTextStyle",
@@ -332,7 +331,7 @@ const A = b.options, x = g.shape.line.unwrap().shape.type.unwrap().options, h =
332
331
  accepts: "labelStyle",
333
332
  stylePath: "arrowTail.text",
334
333
  renderable: !0,
335
- caveat: d
334
+ caveat: i
336
335
  },
337
336
  "edge.animationSpeed": {
338
337
  channel: "edge.animationSpeed",
@@ -374,7 +373,7 @@ function R(e) {
374
373
  (a) => a.target === e
375
374
  );
376
375
  }
377
- const w = Object.freeze([
376
+ const m = Object.freeze([
378
377
  {
379
378
  id: "fitToGraph",
380
379
  plainName: "Fit to graph",
@@ -412,15 +411,15 @@ const w = Object.freeze([
412
411
  }
413
412
  ]);
414
413
  function k(e) {
415
- return w.find((a) => a.id === e) ?? f(e)?.descriptor;
414
+ return m.find((a) => a.id === e) ?? f(e)?.descriptor;
416
415
  }
417
416
  function F(e) {
418
- return [...w, ...N()].filter(
417
+ return [...m, ...N()].filter(
419
418
  (a) => a.modes.includes(e)
420
419
  );
421
420
  }
422
421
  export {
423
- w as C,
422
+ m as C,
424
423
  C as N,
425
424
  u as a,
426
425
  l as b,
@@ -1,4 +1,4 @@
1
- import { c as i, B as m } from "./index-2VIpMJZP.js";
1
+ import { c as i, B as m } from "./index-Cz47b_vU.js";
2
2
  async function p(n, e) {
3
3
  let s;
4
4
  try {