@graphty/graphty-element 2.3.0 → 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.
- package/AGENTS.md +4 -3
- package/dist/ai.js +115 -222
- package/dist/catalog.js +46 -44
- package/dist/chunks/{AiManager-Bd_r1Hei.js → AiManager-BD9XK30e.js} +793 -654
- package/dist/chunks/{DataSource-bt0DhBjG.js → DataSource-B8vf2uhW.js} +3 -3
- package/dist/chunks/{GraphSession-iNyKm7Ds.js → GraphSession-dcwOjGJh.js} +3028 -2918
- package/dist/chunks/{GraphStyle-D0PXnZKu.js → GraphStyle-Cwr55SAE.js} +5 -2
- package/dist/chunks/{GraphtyError-BwcnblTH.js → GraphtyError-B93WRH3e.js} +8 -6
- package/dist/chunks/{GraphtyLogger-5KEttFUo.js → GraphtyLogger-CqOVV13Y.js} +2 -2
- package/dist/chunks/{NodeStyle-DKj7HjMJ.js → NodeStyle-CtmA7dXi.js} +16 -14
- package/dist/chunks/{VoiceInputAdapter-DszYl6Ha.js → VoiceInputAdapter-D0tHHi9G.js} +1 -1
- package/dist/chunks/{XRPivotCameraController-XtxbbZ-D.js → XRPivotCameraController-DTfhvhHz.js} +2 -2
- package/dist/chunks/algorithms-BF0X6RPw.js +3627 -0
- package/dist/chunks/{capability-check-BqIEXcun.js → capability-check-BJzlK4oL.js} +1 -1
- package/dist/chunks/{detect-DM29BEaB.js → detect-vJxK7n0D.js} +2 -2
- package/dist/chunks/{format-detection-BEdmtvsy.js → format-detection-C80TLQ2e.js} +1 -1
- package/dist/chunks/{index-CD0_RJv-.js → index-2xkq7wyD.js} +11482 -10971
- package/dist/chunks/optionsFromZod-BuTOFgVM.js +2572 -0
- package/dist/chunks/paletteRegistry-A63C71Gn.js +1155 -0
- package/dist/chunks/{registry-CSba5QGJ.js → registry-jB46Gmeb.js} +1 -1
- package/dist/chunks/scales-B2d-7Bf0.js +3220 -0
- package/dist/chunks/{types-B7bX5c0K.js → types-C_c53VgR.js} +31 -26
- package/dist/commands.d.ts +4 -0
- package/dist/custom-elements.json +1 -1
- package/dist/extend.js +45 -45
- package/dist/graphty-catalog.json +245 -12
- package/dist/graphty.bundle.js +40762 -39403
- package/dist/graphty.js +33 -33
- package/dist/logging.js +2 -2
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +42 -40
- package/dist/session.d.ts +1 -1
- package/dist/session.js +29 -30
- package/dist/src/Graph.d.ts +112 -10
- package/dist/src/acceleration/AccelerationController.d.ts +14 -3
- package/dist/src/acceleration/types.d.ts +78 -0
- package/dist/src/algorithms/KCoreAlgorithm.d.ts +26 -0
- package/dist/src/algorithms/LinkPredictionAlgorithm.d.ts +41 -0
- package/dist/src/camera/builtins.d.ts +14 -1
- package/dist/src/camera/types.d.ts +7 -0
- package/dist/src/cameras/CameraManager.d.ts +13 -0
- package/dist/src/cameras/OrbitCameraController.d.ts +9 -0
- package/dist/src/catalog/algorithms.d.ts +5 -5
- package/dist/src/catalog/index.d.ts +2 -2
- package/dist/src/catalog/layouts.d.ts +7 -6
- package/dist/src/catalog/types.d.ts +87 -6
- package/dist/src/config/EdgeStyle.d.ts +35 -0
- package/dist/src/config/GraphStyle.d.ts +5 -1
- package/dist/src/config/StyleTemplate.d.ts +2 -2
- package/dist/src/config/index.d.ts +1 -1
- package/dist/src/data/GEXFDataSource.d.ts +23 -0
- package/dist/src/errors/codes.d.ts +14 -0
- package/dist/src/events.d.ts +30 -0
- package/dist/src/graphty-element.d.ts +77 -32
- package/dist/src/layout/GridLayoutEngine.d.ts +37 -0
- package/dist/src/layout/LayoutEngine.d.ts +7 -7
- package/dist/src/layout/NGraphLayoutEngine.d.ts +2 -0
- package/dist/src/layout/RadialLayoutEngine.d.ts +37 -0
- package/dist/src/layout/SimulationLayoutEngine.d.ts +12 -0
- package/dist/src/managers/DataManager.d.ts +69 -2
- package/dist/src/managers/EventManager.d.ts +10 -4
- package/dist/src/managers/GraphContext.d.ts +2 -1
- package/dist/src/managers/LayoutManager.d.ts +30 -3
- package/dist/src/managers/StylePainter.d.ts +9 -0
- package/dist/src/managers/UpdateManager.d.ts +5 -0
- package/dist/src/meshes/MeshCache.d.ts +18 -0
- package/dist/src/meshes/NodeEffects.d.ts +16 -11
- package/dist/src/meshes/NodeMesh.d.ts +2 -2
- package/dist/src/meshes/RichTextParser.d.ts +26 -0
- package/dist/src/meshes/RichTextRenderer.d.ts +0 -1
- package/dist/src/session/cost/estimate.d.ts +1 -1
- package/dist/src/session/layout.d.ts +3 -3
- package/dist/src/session/results/index.d.ts +1 -1
- package/dist/src/session/results/statistics.d.ts +8 -1
- package/dist/src/session/results/types.d.ts +33 -0
- package/dist/src/session/runs/RunsApi.d.ts +1 -1
- package/dist/src/session/selection/targets.d.ts +4 -1
- package/dist/src/session/styles/StylesApi.d.ts +6 -0
- package/dist/src/session/styles/intern.d.ts +26 -5
- package/dist/src/session/styles/predicate.d.ts +26 -1
- package/dist/src/session/styles/repaint.d.ts +13 -1
- package/dist/src/session/styles/selector.d.ts +13 -1
- package/dist/src/session/styles/sources.d.ts +9 -0
- package/dist/src/session/types.d.ts +6 -6
- package/dist/webgpu.js +2 -2
- package/package.json +6 -6
- package/dist/chunks/Algorithm-RQ629NLb.js +0 -494
- package/dist/chunks/cameras-ii4vngYY.js +0 -435
- package/dist/chunks/paletteRegistry-DnWHQsAD.js +0 -3166
- package/dist/chunks/scales-DyuwlJKI.js +0 -6087
|
@@ -33,8 +33,11 @@ const l = o.strictObject({
|
|
|
33
33
|
addDefaultStyle: o.boolean().default(!0),
|
|
34
34
|
background: i.prefault({ backgroundType: "color", color: "whitesmoke" }),
|
|
35
35
|
selection: t.optional(),
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
/**
|
|
37
|
+
* How far the camera starts from the graph, in scene units. Set, it places the camera and
|
|
38
|
+
* turns off the element's automatic zoom-to-fit; unset, the graph is framed to fit.
|
|
39
|
+
*/
|
|
40
|
+
startingCameraDistance: o.number().optional(),
|
|
38
41
|
layout: o.string().optional(),
|
|
39
42
|
// No default - let Graph constructor set the default
|
|
40
43
|
layoutOptions: o.looseObject({}).optional(),
|
|
@@ -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
|
|
58
|
-
function
|
|
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 ?
|
|
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 =
|
|
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:
|
|
100
|
-
details:
|
|
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-
|
|
2
|
-
import { c as $ } from "./types-
|
|
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"]),
|
|
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
|
-
]),
|
|
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:
|
|
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:
|
|
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
|
-
]),
|
|
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:
|
|
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
|
-
},
|
|
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:
|
|
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
|
-
|
|
338
|
-
|
|
337
|
+
I as E,
|
|
338
|
+
m as N,
|
|
339
339
|
r as P,
|
|
340
340
|
e as R,
|
|
341
341
|
L as S,
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
342
|
+
b as a,
|
|
343
|
+
g as b,
|
|
344
|
+
U as c,
|
|
345
345
|
S as d,
|
|
346
|
-
|
|
346
|
+
C as e,
|
|
347
|
+
T as f,
|
|
348
|
+
u as g
|
|
347
349
|
};
|
package/dist/chunks/{XRPivotCameraController-XtxbbZ-D.js → XRPivotCameraController-DTfhvhHz.js}
RENAMED
|
@@ -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-
|
|
2
|
+
import { P as M } from "./index-2xkq7wyD.js";
|
|
3
3
|
import "@babylonjs/core/Culling/ray";
|
|
4
|
-
import { G as x } from "./GraphtyLogger-
|
|
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;
|