@graphty/graphty-element 2.3.1 → 2.4.0

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.
Files changed (69) hide show
  1. package/AGENTS.md +4 -3
  2. package/dist/ai.js +3 -3
  3. package/dist/catalog.js +28 -27
  4. package/dist/chunks/{AiManager-BBmGJbH4.js → AiManager-BD9XK30e.js} +5 -5
  5. package/dist/chunks/{DataSource-OeN3NeyD.js → DataSource-B8vf2uhW.js} +3 -3
  6. package/dist/chunks/{GraphSession-Bef1AYw9.js → GraphSession-dcwOjGJh.js} +2821 -2743
  7. package/dist/chunks/{GraphtyError-BwcnblTH.js → GraphtyError-B93WRH3e.js} +8 -6
  8. package/dist/chunks/{GraphtyLogger-5KEttFUo.js → GraphtyLogger-CqOVV13Y.js} +2 -2
  9. package/dist/chunks/{NodeStyle-DKj7HjMJ.js → NodeStyle-CtmA7dXi.js} +16 -14
  10. package/dist/chunks/{VoiceInputAdapter-Dr9Gcmds.js → VoiceInputAdapter-D0tHHi9G.js} +1 -1
  11. package/dist/chunks/{XRPivotCameraController-BbfgZWpS.js → XRPivotCameraController-DTfhvhHz.js} +2 -2
  12. package/dist/chunks/{algorithms-CpX56sUB.js → algorithms-BF0X6RPw.js} +780 -635
  13. package/dist/chunks/{capability-check-Blhb2aBB.js → capability-check-BJzlK4oL.js} +1 -1
  14. package/dist/chunks/{detect-Cqwshr9a.js → detect-vJxK7n0D.js} +2 -2
  15. package/dist/chunks/{format-detection-BXGO1lSn.js → format-detection-C80TLQ2e.js} +1 -1
  16. package/dist/chunks/{index-C0mIoumR.js → index-2xkq7wyD.js} +2623 -2241
  17. package/dist/chunks/{optionsFromZod-17lkrAJs.js → optionsFromZod-BuTOFgVM.js} +146 -139
  18. package/dist/chunks/{paletteRegistry-x7WOEKZY.js → paletteRegistry-A63C71Gn.js} +8 -6
  19. package/dist/chunks/{registry-CSba5QGJ.js → registry-jB46Gmeb.js} +1 -1
  20. package/dist/chunks/{scales-BRwl51k8.js → scales-B2d-7Bf0.js} +572 -399
  21. package/dist/chunks/{types-B7bX5c0K.js → types-C_c53VgR.js} +31 -26
  22. package/dist/commands.d.ts +4 -0
  23. package/dist/custom-elements.json +1 -1
  24. package/dist/extend.js +8 -8
  25. package/dist/graphty-catalog.json +245 -12
  26. package/dist/graphty.bundle.js +37836 -36835
  27. package/dist/graphty.js +11 -11
  28. package/dist/logging.js +2 -2
  29. package/dist/schema.d.ts +1 -1
  30. package/dist/schema.js +42 -40
  31. package/dist/session.js +6 -6
  32. package/dist/src/Graph.d.ts +79 -7
  33. package/dist/src/acceleration/AccelerationController.d.ts +14 -3
  34. package/dist/src/acceleration/types.d.ts +78 -0
  35. package/dist/src/algorithms/KCoreAlgorithm.d.ts +26 -0
  36. package/dist/src/algorithms/LinkPredictionAlgorithm.d.ts +41 -0
  37. package/dist/src/catalog/algorithms.d.ts +5 -5
  38. package/dist/src/catalog/index.d.ts +2 -2
  39. package/dist/src/catalog/layouts.d.ts +7 -6
  40. package/dist/src/catalog/types.d.ts +77 -6
  41. package/dist/src/config/EdgeStyle.d.ts +35 -0
  42. package/dist/src/config/index.d.ts +1 -1
  43. package/dist/src/data/GEXFDataSource.d.ts +23 -0
  44. package/dist/src/errors/codes.d.ts +14 -0
  45. package/dist/src/events.d.ts +30 -0
  46. package/dist/src/graphty-element.d.ts +66 -26
  47. package/dist/src/layout/GridLayoutEngine.d.ts +37 -0
  48. package/dist/src/layout/LayoutEngine.d.ts +7 -7
  49. package/dist/src/layout/NGraphLayoutEngine.d.ts +2 -0
  50. package/dist/src/layout/RadialLayoutEngine.d.ts +37 -0
  51. package/dist/src/layout/SimulationLayoutEngine.d.ts +12 -0
  52. package/dist/src/managers/DataManager.d.ts +69 -2
  53. package/dist/src/managers/EventManager.d.ts +10 -4
  54. package/dist/src/managers/GraphContext.d.ts +2 -1
  55. package/dist/src/managers/LayoutManager.d.ts +30 -3
  56. package/dist/src/meshes/MeshCache.d.ts +18 -0
  57. package/dist/src/meshes/NodeEffects.d.ts +16 -11
  58. package/dist/src/meshes/NodeMesh.d.ts +2 -2
  59. package/dist/src/meshes/RichTextParser.d.ts +26 -0
  60. package/dist/src/meshes/RichTextRenderer.d.ts +0 -1
  61. package/dist/src/session/cost/estimate.d.ts +1 -1
  62. package/dist/src/session/layout.d.ts +3 -3
  63. package/dist/src/session/runs/RunsApi.d.ts +1 -1
  64. package/dist/src/session/styles/StylesApi.d.ts +6 -0
  65. package/dist/src/session/styles/intern.d.ts +26 -5
  66. package/dist/src/session/styles/repaint.d.ts +2 -1
  67. package/dist/src/session/types.d.ts +6 -6
  68. package/dist/webgpu.js +2 -2
  69. package/package.json +6 -6
@@ -27,6 +27,8 @@ const N = {
27
27
  E_PARSE_FAILED: "E_PARSE_FAILED",
28
28
  E_EDGE_ENDPOINTS_UNRESOLVED: "E_EDGE_ENDPOINTS_UNRESOLVED",
29
29
  E_ID_MISSING: "E_ID_MISSING",
30
+ E_EMPTY_LOAD: "E_EMPTY_LOAD",
31
+ E_SUPERSEDED: "E_SUPERSEDED",
30
32
  E_TOO_LARGE: "E_TOO_LARGE",
31
33
  E_OUT_OF_MEMORY: "E_OUT_OF_MEMORY",
32
34
  E_CAP_EXCEEDED: "E_CAP_EXCEEDED",
@@ -54,8 +56,8 @@ const N = {
54
56
  function s(_) {
55
57
  return typeof _ == "string" && Object.hasOwn(N, _);
56
58
  }
57
- const r = Object.freeze({});
58
- function D(_) {
59
+ const o = Object.freeze({});
60
+ function r(_) {
59
61
  if (typeof _ != "object" || _ === null || !("code" in _))
60
62
  return;
61
63
  const { code: E } = _;
@@ -74,7 +76,7 @@ class e extends Error {
74
76
  * failure.
75
77
  */
76
78
  constructor(E) {
77
- super(E.message, E.cause === void 0 ? void 0 : { cause: E.cause }), this.name = "GraphtyError", Object.setPrototypeOf(this, new.target.prototype), this.code = E.code, this.source = E.source, this.recoverable = E.recoverable ?? !1, this.details = E.details === void 0 ? r : Object.freeze({ ...E.details }), E.target !== void 0 && (this.target = E.target);
79
+ super(E.message, E.cause === void 0 ? void 0 : { cause: E.cause }), this.name = "GraphtyError", Object.setPrototypeOf(this, new.target.prototype), this.code = E.code, this.source = E.source, this.recoverable = E.recoverable ?? !1, this.details = E.details === void 0 ? o : Object.freeze({ ...E.details }), E.target !== void 0 && (this.target = E.target);
78
80
  }
79
81
  /**
80
82
  * Re-reports a failure from somewhere else as a `GraphtyError`.
@@ -92,12 +94,12 @@ class e extends Error {
92
94
  static wrap(E, O) {
93
95
  if (E instanceof e)
94
96
  return E;
95
- const A = D(E), t = R(E), o = O.message ?? (E instanceof Error ? E.message : String(E)), T = t === void 0 ? O.details : { ...O.details, sourceCode: t };
97
+ const A = r(E), t = R(E), T = O.message ?? (E instanceof Error ? E.message : String(E)), D = t === void 0 ? O.details : { ...O.details, sourceCode: t };
96
98
  return new e({
97
99
  ...O,
98
100
  code: A ?? O.code,
99
- message: o,
100
- details: T,
101
+ message: T,
102
+ details: D,
101
103
  cause: E
102
104
  });
103
105
  }
@@ -1,5 +1,5 @@
1
- import { G as c } from "./GraphtyError-BwcnblTH.js";
2
- import { c as $ } from "./types-B7bX5c0K.js";
1
+ import { G as c } from "./GraphtyError-B93WRH3e.js";
2
+ import { c as $ } from "./types-C_c53VgR.js";
3
3
  function G(e) {
4
4
  const t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set();
5
5
  let s = null;
@@ -63,7 +63,7 @@ const u = {
63
63
  "bottom",
64
64
  "bottom-left",
65
65
  "bottom-right"
66
- ]), d = t.enum(["left", "center", "right"]), _ = t.enum(["none", "pulse", "bounce", "shake", "glow", "fill"]), E = t.enum([
66
+ ]), d = t.enum(["left", "center", "right"]), _ = t.enum(["none", "pulse", "bounce", "shake", "glow", "fill"]), s = t.enum([
67
67
  "notification",
68
68
  "label",
69
69
  "label-success",
@@ -73,7 +73,7 @@ const u = {
73
73
  "icon",
74
74
  "progress",
75
75
  "dot"
76
- ]), s = t.enum(["linear", "radial"]), O = t.enum(["vertical", "horizontal", "diagonal"]), R = t.enum(["round", "bevel", "miter"]), c = t.strictObject({
76
+ ]), E = t.enum(["linear", "radial"]), O = t.enum(["vertical", "horizontal", "diagonal"]), R = t.enum(["round", "bevel", "miter"]), c = t.strictObject({
77
77
  width: t.number(),
78
78
  color: a,
79
79
  spacing: t.number()
@@ -130,7 +130,7 @@ const u = {
130
130
  // Background effects
131
131
  backgroundPadding: t.number().default(0).optional(),
132
132
  backgroundGradient: t.boolean().default(!1).optional(),
133
- backgroundGradientType: s.default("linear").optional(),
133
+ backgroundGradientType: E.default("linear").optional(),
134
134
  backgroundGradientColors: t.array(a).optional(),
135
135
  backgroundGradientDirection: O.default("vertical").optional(),
136
136
  // Pointer/Arrow
@@ -144,7 +144,7 @@ const u = {
144
144
  animation: _.default("none").optional(),
145
145
  animationSpeed: t.number().default(1).optional(),
146
146
  // Badge
147
- badge: E.optional(),
147
+ badge: s.optional(),
148
148
  icon: t.string().optional(),
149
149
  iconPosition: t.enum(["left", "right"]).default("left").optional(),
150
150
  progress: t.number().min(0).max(1).optional(),
@@ -205,7 +205,7 @@ const u = {
205
205
  // Repeating wave period meshes
206
206
  "zigzag"
207
207
  // Repeating zigzag period meshes
208
- ]), m = t.strictObject({
208
+ ]), f = t.strictObject({
209
209
  type: b.optional(),
210
210
  animationSpeed: t.number().min(0).optional(),
211
211
  width: t.number().positive().optional(),
@@ -234,7 +234,7 @@ const u = {
234
234
  }), g = t.strictObject({
235
235
  arrowHead: n.optional(),
236
236
  arrowTail: n.optional(),
237
- line: m.optional(),
237
+ line: f.optional(),
238
238
  label: e.prefault({ location: "top" }).optional()
239
239
  // effects: glow // https://playground.babylonjs.com/#H1LRZ3#35
240
240
  }), S = {
@@ -250,7 +250,7 @@ const u = {
250
250
  arrowHead: n.parse({
251
251
  type: "normal"
252
252
  })
253
- }, f = t.enum([
253
+ }, m = t.enum([
254
254
  "box",
255
255
  "sphere",
256
256
  "cylinder",
@@ -280,7 +280,7 @@ const u = {
280
280
  shape: t.strictObject({
281
281
  // 0 is legal and draws the smallest visible node; hide a node with `visible: false`.
282
282
  size: t.number().nonnegative().optional(),
283
- type: f.optional()
283
+ type: m.optional()
284
284
  // custom mesh https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/custom/custom
285
285
  // import mesh https://doc.babylonjs.com/typedoc/functions/BABYLON.ImportMeshAsync
286
286
  }).optional(),
@@ -334,14 +334,16 @@ const u = {
334
334
  }
335
335
  };
336
336
  export {
337
- g as E,
338
- f as N,
337
+ I as E,
338
+ m as N,
339
339
  r as P,
340
340
  e as R,
341
341
  L as S,
342
- U as a,
343
- C as b,
344
- T as c,
342
+ b as a,
343
+ g as b,
344
+ U as c,
345
345
  S as d,
346
- u as e
346
+ C as e,
347
+ T as f,
348
+ u as g
347
349
  };
@@ -1,4 +1,4 @@
1
- import { i as ke, j as up } from "./algorithms-CpX56sUB.js";
1
+ import { i as ke, j as up } from "./algorithms-BF0X6RPw.js";
2
2
  var ee = { exports: {} };
3
3
  var fp = ee.exports, oo;
4
4
  function op() {
@@ -1,7 +1,7 @@
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-C0mIoumR.js";
2
+ import { P as M } from "./index-2xkq7wyD.js";
3
3
  import "@babylonjs/core/Culling/ray";
4
- import { G as x } from "./GraphtyLogger-5KEttFUo.js";
4
+ import { G as x } from "./GraphtyLogger-CqOVV13Y.js";
5
5
  function v(H, t = 0.15) {
6
6
  if (Math.abs(H) < t)
7
7
  return 0;