@graphty/graphty-element 2.2.1 → 2.2.3

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-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";
1
+ import { f as p } from "./chunks/AiManager-DC3JWPeM.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-DC3JWPeM.js";
3
3
  import { A as te } from "./chunks/ApiKeyManager-C0ac91dE.js";
4
- import { V as se } from "./chunks/VoiceInputAdapter-Bbze1r8k.js";
4
+ import { V as se } from "./chunks/VoiceInputAdapter-BueUG885.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-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";
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-DKsbJE2L.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-ii4vngYY.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-Bbze1r8k.js";
1
+ import { l as _ } from "./VoiceInputAdapter-BueUG885.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-CeJYi-Na.js";
6
+ import { N as H, c as B, C as X } from "./cameras-ii4vngYY.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";
@@ -1,11 +1,11 @@
1
1
  import { INVALID_INDEX as B, GraphBuilder as Ys, remapArray as Hs } from "@graphty/graph-format";
2
2
  import { z as F } from "zod/v4";
3
3
  import { G as S, A as Ks, i as xt } from "./GraphtyError-BwcnblTH.js";
4
- import { e as Qs, b as Xs, d as Js } from "./NodeStyle-Cup9O1lu.js";
4
+ import { e as Qs, b as Xs, d as Js } from "./NodeStyle-DKj7HjMJ.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-ulKMZPfG.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-DKsbJE2L.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-CeJYi-Na.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-ii4vngYY.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";
@@ -219,6 +219,10 @@ const u = {
219
219
  * thousands and the frame rate collapses. Set this to cap it: the elements are then
220
220
  * spread evenly over the edge whatever its length or width.
221
221
  *
222
+ * It applies to the discrete patterns only (dot, star, box, dash, diamond, dash-dot).
223
+ * Zigzag and sinewave are drawn as fixed-length connected segments that always tile the
224
+ * whole edge, so they ignore it.
225
+ *
222
226
  * This is a USER choice, deliberately. The renderer does not silently impose a ceiling,
223
227
  * because that would change how a graph looks to buy performance the caller never asked
224
228
  * for -- the same reason an algorithm's style layer never mutes another layer.
@@ -1,4 +1,4 @@
1
- import { g as ke, h as up } from "./cameras-CeJYi-Na.js";
1
+ import { g as ke, h as up } from "./cameras-ii4vngYY.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-Cz47b_vU.js";
2
+ import { P as M } from "./index-COss7yTG.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) {
@@ -1,5 +1,5 @@
1
1
  import { c as y } from "./common-DWNKjpH_.js";
2
- import { N as b, E as g } from "./NodeStyle-Cup9O1lu.js";
2
+ import { N as b, E as g } from "./NodeStyle-DKj7HjMJ.js";
3
3
  import { j as f, e as N } from "./Algorithm-RQ629NLb.js";
4
4
  var L = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
5
5
  function z(e) {
@@ -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 d(e) {
12
+ function i(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 w = t ? a[r].repeat(2) : a.slice(r * 2, r * 2 + 2);
20
- return parseInt(w, 16);
19
+ const m = t ? a[r].repeat(2) : a.slice(r * 2, r * 2 + 2);
20
+ return parseInt(m, 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 = `#${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))}` };
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))}` };
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.", 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 = {
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 = {
52
52
  "node.color": {
53
53
  channel: "node.color",
54
54
  target: "node",
@@ -214,7 +214,7 @@ const A = b.options, x = g.shape.line.unwrap().shape.type.unwrap().options, h =
214
214
  min: 2,
215
215
  stylePath: "line.patternCount",
216
216
  renderable: !0,
217
- caveat: "A cap on how many dots or dashes a patterned edge draws, and it applies to a patterned line only: a solid line has no elements to count. Left unset, the spacing rule decides, so a long edge or a thin one draws more of them."
217
+ caveat: "A cap on how many dots or dashes a patterned edge draws, and it applies to a patterned line only: a solid line has no elements to count, and zigzag and sinewave always tile the whole edge, so they ignore it. Left unset, the spacing rule decides, so a long edge or a thin one draws more of them."
218
218
  },
219
219
  "edge.curvature": {
220
220
  channel: "edge.curvature",
@@ -268,7 +268,7 @@ const A = b.options, x = g.shape.line.unwrap().shape.type.unwrap().options, h =
268
268
  accepts: "text",
269
269
  stylePath: "arrowHead.text.text",
270
270
  renderable: !0,
271
- caveat: i
271
+ caveat: d
272
272
  },
273
273
  "edge.arrowHeadTextStyle": {
274
274
  channel: "edge.arrowHeadTextStyle",
@@ -277,7 +277,7 @@ const A = b.options, x = g.shape.line.unwrap().shape.type.unwrap().options, h =
277
277
  accepts: "labelStyle",
278
278
  stylePath: "arrowHead.text",
279
279
  renderable: !0,
280
- caveat: i
280
+ caveat: d
281
281
  },
282
282
  "edge.arrowTail": {
283
283
  channel: "edge.arrowTail",
@@ -322,7 +322,7 @@ const A = b.options, x = g.shape.line.unwrap().shape.type.unwrap().options, h =
322
322
  accepts: "text",
323
323
  stylePath: "arrowTail.text.text",
324
324
  renderable: !0,
325
- caveat: i
325
+ caveat: d
326
326
  },
327
327
  "edge.arrowTailTextStyle": {
328
328
  channel: "edge.arrowTailTextStyle",
@@ -331,7 +331,7 @@ const A = b.options, x = g.shape.line.unwrap().shape.type.unwrap().options, h =
331
331
  accepts: "labelStyle",
332
332
  stylePath: "arrowTail.text",
333
333
  renderable: !0,
334
- caveat: i
334
+ caveat: d
335
335
  },
336
336
  "edge.animationSpeed": {
337
337
  channel: "edge.animationSpeed",
@@ -373,7 +373,7 @@ function R(e) {
373
373
  (a) => a.target === e
374
374
  );
375
375
  }
376
- const m = Object.freeze([
376
+ const w = Object.freeze([
377
377
  {
378
378
  id: "fitToGraph",
379
379
  plainName: "Fit to graph",
@@ -411,15 +411,15 @@ const m = Object.freeze([
411
411
  }
412
412
  ]);
413
413
  function k(e) {
414
- return m.find((a) => a.id === e) ?? f(e)?.descriptor;
414
+ return w.find((a) => a.id === e) ?? f(e)?.descriptor;
415
415
  }
416
416
  function F(e) {
417
- return [...m, ...N()].filter(
417
+ return [...w, ...N()].filter(
418
418
  (a) => a.modes.includes(e)
419
419
  );
420
420
  }
421
421
  export {
422
- m as C,
422
+ w as C,
423
423
  C as N,
424
424
  u as a,
425
425
  l as b,
@@ -1,4 +1,4 @@
1
- import { c as i, B as m } from "./index-Cz47b_vU.js";
1
+ import { c as i, B as m } from "./index-COss7yTG.js";
2
2
  async function p(n, e) {
3
3
  let s;
4
4
  try {