@graphty/graphty-element 2.3.1 → 2.4.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/AGENTS.md +4 -3
- package/dist/ai.js +3 -3
- package/dist/catalog.js +28 -27
- package/dist/chunks/{AiManager-BBmGJbH4.js → AiManager-DNJCoeTO.js} +5 -5
- package/dist/chunks/{DataSource-OeN3NeyD.js → DataSource-xL3Yn0Pa.js} +72 -61
- package/dist/chunks/{GraphSession-Bef1AYw9.js → GraphSession-PFm2tJ_j.js} +2942 -2822
- package/dist/chunks/{GraphtyLogger-5KEttFUo.js → GraphtyLogger-kbOx2zq3.js} +170 -222
- package/dist/chunks/{NodeStyle-DKj7HjMJ.js → NodeStyle-CtmA7dXi.js} +16 -14
- package/dist/chunks/{VoiceInputAdapter-Dr9Gcmds.js → VoiceInputAdapter-CDNKQgUK.js} +1 -1
- package/dist/chunks/{XRPivotCameraController-BbfgZWpS.js → XRPivotCameraController-JdlLBcD7.js} +146 -134
- package/dist/chunks/{algorithms-CpX56sUB.js → algorithms-B87OPYw4.js} +780 -635
- package/dist/chunks/{capability-check-Blhb2aBB.js → capability-check-B2oYf_30.js} +1 -1
- package/dist/chunks/{detect-Cqwshr9a.js → detect-tuYQLJbT.js} +2 -2
- package/dist/chunks/{format-detection-BXGO1lSn.js → format-detection-BG6CMwPO.js} +1 -1
- package/dist/chunks/{index-C0mIoumR.js → index-6GDfNfwJ.js} +3185 -2731
- package/dist/chunks/{optionsFromZod-17lkrAJs.js → optionsFromZod-DHLLiX_8.js} +275 -267
- package/dist/chunks/{paletteRegistry-x7WOEKZY.js → paletteRegistry-jg9uS7wo.js} +72 -70
- package/dist/chunks/pluginRegistry-MaTIDh6l.js +238 -0
- package/dist/chunks/{registry-CSba5QGJ.js → registry-DQeq4B2K.js} +8 -8
- package/dist/chunks/{scales-BRwl51k8.js → scales-BXHmwPXC.js} +572 -399
- 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 +8 -8
- package/dist/graphty-catalog.json +245 -12
- package/dist/graphty.bundle.js +37843 -36551
- package/dist/graphty.js +69 -65
- package/dist/index.d.ts +3 -0
- package/dist/logging.js +2 -2
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +42 -40
- package/dist/session.js +6 -6
- package/dist/src/Edge.d.ts +4 -4
- package/dist/src/Graph.d.ts +79 -7
- package/dist/src/acceleration/AccelerationController.d.ts +20 -3
- package/dist/src/acceleration/registry.d.ts +3 -0
- package/dist/src/acceleration/types.d.ts +85 -0
- package/dist/src/algorithms/Algorithm.d.ts +13 -0
- package/dist/src/algorithms/KCoreAlgorithm.d.ts +26 -0
- package/dist/src/algorithms/LinkPredictionAlgorithm.d.ts +41 -0
- package/dist/src/cameras/InputUtils.d.ts +67 -0
- package/dist/src/cameras/XRInputHandler.d.ts +0 -8
- 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/pluginRegistry.d.ts +62 -0
- package/dist/src/catalog/registry.d.ts +7 -0
- package/dist/src/catalog/types.d.ts +77 -6
- package/dist/src/config/EdgeStyle.d.ts +35 -0
- package/dist/src/config/index.d.ts +1 -1
- package/dist/src/data/DataSource.d.ts +1 -1
- package/dist/src/data/GEXFDataSource.d.ts +23 -0
- package/dist/src/errors/codes.d.ts +16 -1
- package/dist/src/events.d.ts +30 -0
- package/dist/src/graphty-element.d.ts +66 -26
- 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/meshes/CustomLineRenderer.d.ts +11 -9
- package/dist/src/meshes/EdgeMesh.d.ts +18 -9
- package/dist/src/meshes/FilledArrowRenderer.d.ts +61 -23
- 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/PatternedLineRenderer.d.ts +5 -37
- package/dist/src/meshes/PerSceneMaterials.d.ts +49 -0
- 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/runs/RunsApi.d.ts +1 -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/repaint.d.ts +2 -1
- package/dist/src/session/types.d.ts +6 -6
- package/dist/src/xr/XRSessionManager.d.ts +1 -1
- package/dist/webgpu.d.ts +8 -0
- package/dist/webgpu.js +2 -2
- package/package.json +6 -6
- package/dist/chunks/GraphtyError-BwcnblTH.js +0 -132
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const s = [
|
|
2
2
|
"degree",
|
|
3
3
|
"betweenness",
|
|
4
4
|
"closeness",
|
|
@@ -24,7 +24,7 @@ const o = [
|
|
|
24
24
|
"prim",
|
|
25
25
|
"bipartite-matching",
|
|
26
26
|
"link-prediction"
|
|
27
|
-
],
|
|
27
|
+
], t = ["all-paths", "clustering-coefficient"], a = [
|
|
28
28
|
"force",
|
|
29
29
|
"force-2d",
|
|
30
30
|
"circular",
|
|
@@ -37,7 +37,7 @@ const o = [
|
|
|
37
37
|
"layers",
|
|
38
38
|
"fixed",
|
|
39
39
|
"random"
|
|
40
|
-
],
|
|
40
|
+
], c = ["json", "csv", "graphml", "gexf", "gml", "dot", "pajek", "sif", "cx2"], l = [
|
|
41
41
|
"viridis",
|
|
42
42
|
"ylorbr",
|
|
43
43
|
"plasma",
|
|
@@ -56,7 +56,7 @@ const o = [
|
|
|
56
56
|
"blue-highlight",
|
|
57
57
|
"green-highlight",
|
|
58
58
|
"orange-highlight"
|
|
59
|
-
], g = ["fitToGraph", "topView", "sideView", "frontView", "isometric"],
|
|
59
|
+
], g = ["fitToGraph", "topView", "sideView", "frontView", "isometric"], p = ["console", "remote"], n = ["string", "number", "integer", "boolean", "time", "category", "mixed"], i = ["instant", "iterative", "heavy", "cubic", "unbounded"], r = [
|
|
60
60
|
"node-metric",
|
|
61
61
|
"edge-metric",
|
|
62
62
|
"community",
|
|
@@ -68,13 +68,13 @@ const o = [
|
|
|
68
68
|
"pair-list",
|
|
69
69
|
"temporal",
|
|
70
70
|
"fact"
|
|
71
|
-
],
|
|
71
|
+
], u = [
|
|
72
72
|
"graph.nodeCount",
|
|
73
73
|
"graph.edgeCount",
|
|
74
74
|
"graph.maxDegree",
|
|
75
75
|
"graph.maxCore",
|
|
76
76
|
"graph.componentCount"
|
|
77
|
-
],
|
|
77
|
+
], o = [
|
|
78
78
|
"number",
|
|
79
79
|
"integer",
|
|
80
80
|
"boolean",
|
|
@@ -89,35 +89,40 @@ const o = [
|
|
|
89
89
|
"unknown"
|
|
90
90
|
];
|
|
91
91
|
function d(e) {
|
|
92
|
-
return typeof e == "string" &&
|
|
92
|
+
return typeof e == "string" && o.includes(e);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
return
|
|
94
|
+
function f(e) {
|
|
95
|
+
return t.includes(e);
|
|
96
96
|
}
|
|
97
97
|
function h(e) {
|
|
98
98
|
return typeof e == "string" && i.includes(e);
|
|
99
99
|
}
|
|
100
|
-
function f(e) {
|
|
101
|
-
return typeof e == "string" && t.includes(e);
|
|
102
|
-
}
|
|
103
100
|
function m(e) {
|
|
101
|
+
return typeof e == "string" && r.includes(e);
|
|
102
|
+
}
|
|
103
|
+
function b(e) {
|
|
104
|
+
return typeof e == "string" && n.includes(e);
|
|
105
|
+
}
|
|
106
|
+
function O(e) {
|
|
104
107
|
return typeof e == "object" && e !== null && typeof e.from == "string";
|
|
105
108
|
}
|
|
106
109
|
export {
|
|
107
|
-
|
|
108
|
-
|
|
110
|
+
n as A,
|
|
111
|
+
i as C,
|
|
112
|
+
t as D,
|
|
109
113
|
g as K,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
a,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
o as O,
|
|
115
|
+
r as R,
|
|
116
|
+
c as a,
|
|
117
|
+
a as b,
|
|
118
|
+
p as c,
|
|
119
|
+
l as d,
|
|
120
|
+
m as e,
|
|
121
|
+
s as f,
|
|
122
|
+
u as g,
|
|
123
|
+
b as h,
|
|
120
124
|
d as i,
|
|
121
|
-
|
|
122
|
-
|
|
125
|
+
h as j,
|
|
126
|
+
O as k,
|
|
127
|
+
f as l
|
|
123
128
|
};
|
package/dist/commands.d.ts
CHANGED
|
@@ -17,5 +17,9 @@
|
|
|
17
17
|
* What the element can do today is published as data by
|
|
18
18
|
* `@graphty/graphty-element/catalog`, which an agent can read for the algorithms, layouts,
|
|
19
19
|
* formats, palettes and scales that exist, with every option each one accepts.
|
|
20
|
+
* @deprecated This entry point exports nothing and is kept only so an existing import keeps
|
|
21
|
+
* resolving. It will be removed at the next major release unless the command vocabulary ships
|
|
22
|
+
* here first (issue #337). Use `@graphty/graphty-element/catalog` for the element's vocabulary
|
|
23
|
+
* as data.
|
|
20
24
|
*/
|
|
21
25
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":"1.0.0","readme":"","modules":[{"kind":"javascript-module","path":"src/graphty-element.ts","declarations":[{"kind":"class","description":"Graphty creates a graph","name":"Graphty","members":[{"kind":"field","name":"session","type":{"text":"GraphSession"},"description":"The headless model this element draws.\n\nEverything about the graph that needs no screen is here: the data, the coordinates, the\nstatistics, the catalogue, the runs and their results, which elements a piece of work may\nlook at (`scope`), what is selected (`selection`) and what is visible (`visibility`). The\ncamera, the canvas and the scene stay on the element, because two synchronised views of one\ndataset disagree about those and agree about everything above.\n\nRead-only for now: a session built elsewhere cannot yet be attached to an element.","return":{"type":{"text":""}},"readonly":true},{"kind":"method","name":"run","return":{"type":{"text":""}},"parameters":[{"name":"algorithm","type":{"text":"AlgorithmKey"},"description":"Which algorithm to run, by its catalogue key such as \"betweenness\"."},{"name":"params","optional":true,"type":{"text":"Record<string, unknown>"},"description":"Its parameters, as the catalogue declares them."},{"name":"options","optional":true,"type":{"text":"StartOptions"},"description":"The scope, the seed, the id, the signal and the progress handler."}],"description":"Start an algorithm and get back something a caller can watch, stop and read.\n\nForwarded from the session, so the first graph needs no session: a page with a tag and\nthree lines of script can run an analysis, await the result and read its ranking without\nimporting a module or learning what a session is."},{"kind":"method","name":"select","return":{"type":{"text":""}},"parameters":[{"name":"target","type":{"text":"SelectionTarget"},"description":"What to select: ids, a pasted list, a neighbourhood, a scope, a run's top n."},{"name":"op","optional":true,"type":{"text":"SetOp"},"description":"What to do with it; replaces the selection when absent."}],"description":"Change what is selected.\n\nForwarded from the session, so the first graph needs no session: a page with a tag and two\nlines of script can select a list of ids, add to that selection, invert it or take the top\ntwenty of a finished run, without importing a module.\n\nOne selection per graph, shared by every surface reading it. The five operations are\n`\"replace\"` (the default, and what a click does), `\"add\"`, `\"remove\"`, `\"toggle\"` and\n`\"intersect\"`."},{"kind":"method","name":"asyncFirstUpdated","return":{"type":{"text":"Promise<void>"}},"description":"Performs async initialization tasks for the graph, including event forwarding and graph initialization."},{"kind":"field","name":"nodeData","type":{"text":"Record<string, unknown>[] | undefined"},"description":"Sets the node data array. Triggers addition of nodes to the graph.","return":{"type":{"text":""}},"attribute":"node-data"},{"kind":"field","name":"edgeData","type":{"text":"Record<string, unknown>[] | undefined"},"description":"Sets the edge data array. Triggers addition of edges to the graph.","return":{"type":{"text":""}},"attribute":"edge-data"},{"kind":"field","name":"dataSource","type":{"text":"string | undefined"},"description":"Sets the data source type. Initializes data loading when combined with dataSourceConfig.","return":{"type":{"text":""}},"attribute":"data-source"},{"kind":"field","name":"dataSourceConfig","type":{"text":"Record<string, unknown> | undefined"},"description":"Sets the data source configuration. Initializes data loading when combined with dataSource.","return":{"type":{"text":""}},"attribute":"data-source-config"},{"kind":"method","name":"clearData","return":{"type":{"text":"void"}},"description":"Removes every node and edge, and lets a later data source load.\n\nThe guard below is per LOAD, not per element lifetime. Latching it for the\nelement's whole life refused every dataset after the first: a second\n`dataSource` / `dataSourceConfig` assignment set both properties and started no\nload, so a host that loaded a second file saw the element report the new source\nwhile the old graph stayed on screen. Clearing the data is the statement that the\nprevious load is over, so it is where the guard resets.\n\nThe two properties are reset with it, and deliberately through the private fields\nrather than the setters: a setter would call `#tryInitializeDataSource` again, and\nleaving the old pair in place would let the next half-assignment load the NEW\nsource against the OLD config."},{"kind":"field","name":"nodeIdPath","type":{"text":"string | undefined"},"description":"Sets the JMESPath for node ID extraction. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"node-id-path"},{"kind":"field","name":"edgeSrcIdPath","type":{"text":"string | undefined"},"description":"Sets the JMESPath for edge source ID extraction. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"edge-src-id-path"},{"kind":"field","name":"edgeDstIdPath","type":{"text":"string | undefined"},"description":"Sets the JMESPath for edge destination ID extraction. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"edge-dst-id-path"},{"kind":"field","name":"edgeIdPath","type":{"text":"string | undefined"},"description":"Sets the JMESPath for edge identity. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"edge-id-path"},{"kind":"field","name":"repeatedEdges","type":{"text":"DuplicatePolicy | undefined"},"description":"Sets the repeat policy. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"repeated-edges"},{"kind":"field","name":"nodeLabelPath","type":{"text":"string | undefined"},"description":"Sets the JMESPath for a node's display name. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"node-label-path"},{"kind":"field","name":"edgeWeightPath","type":{"text":"string | undefined"},"description":"Sets the JMESPath for an edge's weight. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"edge-weight-path"},{"kind":"field","name":"positionScale","type":{"text":"number | undefined"},"description":"Sets the record-units-to-scene-units multiplier. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"position-scale"},{"kind":"field","name":"directed","type":{"text":"boolean | \"auto\" | undefined"},"description":"Sets whether the graph is read as directed. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"directed"},{"kind":"field","name":"layout","type":{"text":"string | undefined"},"description":"Sets the layout algorithm. Triggers layout recalculation with merged config.","return":{"type":{"text":""}},"attribute":"layout"},{"kind":"field","name":"layoutConfig","type":{"text":"Record<string, unknown> | undefined"},"description":"Sets layout-specific configuration. Updates active layout if one is set.","return":{"type":{"text":""}},"attribute":"layout-config"},{"kind":"field","name":"layoutBehavior","type":{"text":"GraphBehaviorConfig | undefined"},"description":"Sets how the element drives the layout.\n\nA value the schema refuses is reported and dropped rather than thrown, on the same terms\nas `background` and `acceleration`.","return":{"type":{"text":""}}},{"kind":"field","name":"selectionStyle","type":{"text":"GraphSelectionStyleInput | undefined"},"description":"Sets what a selected node looks like.","return":{"type":{"text":""}}},{"kind":"field","name":"algorithmsOnLoad","type":{"text":"readonly AlgorithmOnLoad[] | undefined"},"description":"Sets which algorithms run once data has finished loading.","return":{"type":{"text":""}}},{"kind":"field","name":"viewMode","type":{"text":"ViewMode | undefined"},"description":"Sets the view mode. Switches camera and rendering mode accordingly.","return":{"type":{"text":""}},"attribute":"view-mode"},{"kind":"field","name":"layout2d","type":{"text":"boolean | undefined"},"description":"Sets 2D mode (deprecated). Converts boolean to viewMode internally.","deprecated":"Use viewMode instead. layout2d: true is equivalent to viewMode: \"2d\"\nSpecifies that the layout should be rendered in two dimensions (as\nopposed to 3D)","return":{"type":{"text":""}},"attribute":"layout-2d"},{"kind":"field","name":"background","type":{"text":"GraphBackgroundConfig | undefined"},"description":"Sets the graph background. Applies it to the scene immediately.\n\nA value the schema refuses is REPORTED AND DROPPED rather than thrown, on the same terms\nas `acceleration`: this setter is reached from `attributeChangedCallback`, and a throw\nthere escapes as an unhandled rejection that reaches nobody, leaving the page with an\nelement that never rendered. A wrong colour in markup must not take the graph down.","return":{"type":{"text":""}},"attribute":"background"},{"kind":"field","name":"startingCameraDistance","type":{"text":"number | undefined"},"description":"Sets the starting camera distance.","return":{"type":{"text":""}},"attribute":"starting-camera-distance"},{"kind":"field","name":"runAlgorithmsOnLoad","type":{"text":"boolean | undefined"},"description":"Sets whether to run algorithms when a style template loads. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"run-algorithms-on-load"},{"kind":"field","name":"enableDetailedProfiling","type":{"text":"boolean | undefined"},"description":"Sets detailed profiling mode. Enables hierarchical timing and advanced stats collection.","return":{"type":{"text":""}},"attribute":"enable-detailed-profiling"},{"kind":"field","name":"xr","type":{"text":"PartialXRConfig | undefined"},"description":"Sets XR configuration. Updates VR/AR settings and UI options.","return":{"type":{"text":""}}},{"kind":"method","name":"captureScreenshot","return":{"type":{"text":""}},"parameters":[{"name":"options","optional":true,"type":{"text":"ScreenshotOptions"},"description":"Screenshot options (format, resolution, destinations, etc.)"}],"description":"Capture a screenshot of the current graph visualization."},{"kind":"method","name":"canCaptureScreenshot","return":{"type":{"text":""}},"parameters":[{"name":"options","optional":true,"type":{"text":"ScreenshotOptions"},"description":"Screenshot options to validate"}],"description":"Phase 6: Capability Check API\nCheck if screenshot can be captured with given options.\nAvailable from Phase 6 onwards."},{"kind":"method","name":"captureAnimation","return":{"type":{"text":""}},"parameters":[{"name":"options","type":{"text":"import(\"./video/VideoCapture.js\").AnimationOptions"},"description":"Animation capture options"}],"description":"Phase 7: Video Capture API\nCapture an animation as a video (stationary or animated camera)\nAvailable from Phase 7 onwards."},{"kind":"method","name":"cancelAnimationCapture","return":{"type":{"text":""}},"description":"Phase 7: Cancel Animation Capture\nCancel an ongoing animation capture\nAvailable from Phase 7 onwards."},{"kind":"method","name":"isAnimationCapturing","return":{"type":{"text":""}},"description":"Phase 7: Check if animation capture is in progress\nAvailable from Phase 7 onwards."},{"kind":"method","name":"estimateAnimationCapture","return":{"type":{"text":""}},"parameters":[{"name":"options","type":{"text":"Pick<import(\"./video/VideoCapture.js\").AnimationOptions, \"duration\" | \"fps\" | \"width\" | \"height\">"},"description":"Animation options to estimate"}],"description":"Phase 7: Animation Capture Estimation\nEstimate performance and potential issues for animation capture\nAvailable from Phase 7 onwards."},{"kind":"method","name":"getViewMode","return":{"type":{"text":""}},"description":"Get the current view mode."},{"kind":"method","name":"setViewMode","return":{"type":{"text":""}},"parameters":[{"name":"mode","type":{"text":"ViewMode"},"description":"The view mode to set (\"2d\", \"3d\", \"ar\", or \"vr\")"}],"description":"Set the view mode.\nChanges the rendering dimension and camera system."},{"kind":"method","name":"isVRSupported","return":{"type":{"text":""}},"description":"Check if VR mode is supported on this device/browser.\nReturns true if WebXR is available and VR sessions are supported.\n\nUse this to conditionally show/hide VR controls or display\nappropriate messaging to users."},{"kind":"method","name":"isARSupported","return":{"type":{"text":""}},"description":"Check if AR mode is supported on this device/browser.\nReturns true if WebXR is available and AR sessions are supported.\n\nUse this to conditionally show/hide AR controls or display\nappropriate messaging to users."},{"kind":"method","name":"getCameraState","return":{"type":{"text":""}},"description":"Get current camera state (supports both 2D and 3D)"},{"kind":"method","name":"setCameraState","return":{"type":{"text":""}},"parameters":[{"name":"state","type":{"text":"import(\"./screenshot/types.js\").CameraState | { preset: string }"},"description":"Camera state to apply or preset name"},{"name":"options","optional":true,"type":{"text":"import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"Animation options"}],"description":"Set camera state (supports both 2D and 3D)"},{"kind":"method","name":"setCameraPosition","return":{"type":{"text":""}},"parameters":[{"name":"position","type":{"text":"{ x: number; y: number; z: number }"},"description":"Target position {x, y, z}"},{"name":"options","optional":true,"type":{"text":"import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"Animation options"},{"description":"X coordinate","name":"position.x"},{"description":"Y coordinate","name":"position.y"},{"description":"Z coordinate","name":"position.z"}],"description":"Set camera position (3D)"},{"kind":"method","name":"setCameraTarget","return":{"type":{"text":""}},"parameters":[{"name":"target","type":{"text":"{ x: number; y: number; z: number }"},"description":"Target point to look at {x, y, z}"},{"name":"options","optional":true,"type":{"text":"import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"Animation options"},{"description":"X coordinate","name":"target.x"},{"description":"Y coordinate","name":"target.y"},{"description":"Z coordinate","name":"target.z"}],"description":"Set camera target (3D)"},{"kind":"method","name":"setCameraZoom","return":{"type":{"text":""}},"parameters":[{"name":"zoom","type":{"text":"number"},"description":"Zoom level"},{"name":"options","optional":true,"type":{"text":"import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"Animation options"}],"description":"Set camera zoom (2D)"},{"kind":"method","name":"setCameraPan","return":{"type":{"text":""}},"parameters":[{"name":"pan","type":{"text":"{ x: number; y: number }"},"description":"Pan position {x, y}"},{"name":"options","optional":true,"type":{"text":"import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"Animation options"},{"description":"X offset","name":"pan.x"},{"description":"Y offset","name":"pan.y"}],"description":"Set camera pan (2D)"},{"kind":"method","name":"resetCamera","return":{"type":{"text":""}},"parameters":[{"name":"options","optional":true,"type":{"text":"import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"Animation options"}],"description":"Reset camera to default position"},{"kind":"method","name":"saveCameraPreset","return":{"type":{"text":"void"}},"parameters":[{"name":"name","type":{"text":"string"},"description":"Name for the preset"}],"description":"Save current camera state as a named preset.\nAvailable from Phase 5 onwards."},{"kind":"method","name":"loadCameraPreset","return":{"type":{"text":""}},"parameters":[{"name":"name","type":{"text":"string"},"description":"Name of the preset to load"},{"name":"options","optional":true,"type":{"text":"import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"Animation options"}],"description":"Load a camera preset (built-in or user-defined).\nAvailable from Phase 5 onwards."},{"kind":"method","name":"getCameraPresets","return":{"type":{"text":""}},"description":"Get all camera presets (built-in + user-defined).\nAvailable from Phase 5 onwards."},{"kind":"method","name":"exportCameraPresets","return":{"type":{"text":""}},"description":"Export user-defined presets as JSON\nAvailable from Phase 5 onwards"},{"kind":"method","name":"importCameraPresets","return":{"type":{"text":"void"}},"parameters":[{"name":"presets","type":{"text":"Record<string, import(\"./screenshot/types.js\").CameraState>"},"description":"Record of preset names to their state"}],"description":"Import user-defined presets from JSON\nAvailable from Phase 5 onwards"},{"kind":"field","name":"graph","type":{"text":"Graph"},"description":"Get the underlying Graph instance for debugging purposes.","return":{"type":{"text":""}},"readonly":true},{"kind":"method","name":"addNode","return":{"type":{"text":""}},"parameters":[{"name":"node","type":{"text":"import(\"./config\").AdHocData"},"description":"Node data object to add"},{"name":"idPath","optional":true,"type":{"text":"string"},"description":"Key to use for node ID (default: \"id\")"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").QueueableOptions"},"description":"Queue options for operation ordering"}],"description":"Add a single node to the graph."},{"kind":"method","name":"addNodes","return":{"type":{"text":""}},"parameters":[{"name":"nodes","type":{"text":"import(\"./config\").AdHocData[]"},"description":"Array of node data objects to add"},{"name":"idPath","optional":true,"type":{"text":"string"},"description":"Key to use for node IDs (default: \"id\")"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").QueueableOptions"},"description":"Queue options for operation ordering"}],"description":"Add multiple nodes to the graph."},{"kind":"method","name":"addEdge","return":{"type":{"text":""}},"parameters":[{"name":"edge","type":{"text":"import(\"./config\").AdHocData"},"description":"Edge data object to add"},{"name":"options","optional":true,"type":{"text":"import(\"./managers\").AddEdgesOptions & import(\"./utils/queue-migration\").QueueableOptions"},"description":"The endpoint expressions, the repeat policy, and queue ordering"}],"description":"Add a single edge to the graph."},{"kind":"method","name":"addEdges","return":{"type":{"text":""}},"parameters":[{"name":"edges","type":{"text":"import(\"./config\").AdHocData[]"},"description":"Array of edge data objects to add"},{"name":"options","optional":true,"type":{"text":"import(\"./managers\").AddEdgesOptions & import(\"./utils/queue-migration\").QueueableOptions"},"description":"The endpoint expressions, the repeat policy, and queue ordering"}],"description":"Add multiple edges to the graph."},{"kind":"method","name":"removeNodes","return":{"type":{"text":""}},"parameters":[{"name":"nodeIds","type":{"text":"(string | number)[]"},"description":"Array of node IDs to remove"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").QueueableOptions"},"description":"Queue options for operation ordering"}],"description":"Remove nodes from the graph."},{"kind":"method","name":"updateNodes","return":{"type":{"text":""}},"parameters":[{"name":"updates","type":{"text":"{ id: string | number; [key: string]: unknown }[]"},"description":"Array of update objects with id and properties to update"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").QueueableOptions"},"description":"Queue options for operation ordering"}],"description":"Update node data."},{"kind":"method","name":"addDataFromSource","return":{"type":{"text":""}},"parameters":[{"name":"type","type":{"text":"string"},"description":"Data source type (e.g., \"json\", \"csv\", \"graphml\")"},{"name":"opts","optional":true,"type":{"text":"object"},"description":"Data source configuration options"}],"description":"Add data from a data source."},{"kind":"method","name":"loadFromUrl","return":{"type":{"text":""}},"parameters":[{"name":"url","type":{"text":"string"},"description":"URL to fetch graph data from"},{"name":"options","optional":true,"type":{"text":"{\n format?: string;\n nodeIdPath?: string;\n edgeSource?: string;\n edgeTarget?: string;\n }"},"description":"Loading options"},{"description":"Data format (e.g., \"json\", \"csv\", \"graphml\")","name":"options.format"},{"description":"JMESPath for node ID field","name":"options.nodeIdPath"},{"description":"Where the node an edge starts at is named in the record. Left\nunset, the element reads `source`, then `src`, then `from`","name":"options.edgeSource"},{"description":"Where the node an edge ends at is named in the record","name":"options.edgeTarget"}],"description":"Load graph data from a URL."},{"kind":"method","name":"loadFromFile","return":{"type":{"text":""}},"parameters":[{"name":"file","type":{"text":"File"},"description":"File object from file input"},{"name":"options","optional":true,"type":{"text":"{\n format?: string;\n nodeIdPath?: string;\n edgeSource?: string;\n edgeTarget?: string;\n }"},"description":"Loading options"},{"description":"Data format (e.g., \"json\", \"csv\", \"graphml\")","name":"options.format"},{"description":"JMESPath for node ID field","name":"options.nodeIdPath"},{"description":"Where the node an edge starts at is named in the record. Left\nunset, the element reads `source`, then `src`, then `from`","name":"options.edgeSource"},{"description":"Where the node an edge ends at is named in the record","name":"options.edgeTarget"}],"description":"Load graph data from a File object."},{"kind":"method","name":"pin","return":{"type":{"text":"void"}},"parameters":[{"name":"ids","type":{"text":"(string | number) | readonly (string | number)[]"},"description":"one node id, or several"}],"description":"Pin nodes where they are, so no layout moves them again.\n\nA pin survives a layout change, a 2D/3D switch and a template apply, which is what makes it\nworth having a door for: `pinOnDrag` is on by default, so every node a reader has ever\ndragged is pinned, and until now the only way back out was through `element.graph`."},{"kind":"method","name":"unpin","return":{"type":{"text":"void"}},"parameters":[{"name":"ids","type":{"text":"(string | number) | readonly (string | number)[]"},"description":"one node id, or several"}],"description":"Release nodes a reader or a drag pinned, so the layout arranges them again."},{"kind":"method","name":"isPinned","return":{"type":{"text":""}},"parameters":[{"name":"id","type":{"text":"string | number"},"description":"the node id, in either spelling an integer id may be written in"}],"description":"Whether one node is pinned.\n\nOne lookup, for the question a node inspector actually asks. Reading\nGraphty.pinnedNodes to answer it walks every node in the graph, which on a large\none is a full pass per selection change."},{"kind":"field","name":"pinnedNodes","type":{"text":"ReadonlySet<string | number>"},"description":"Which nodes are pinned right now.\n\nIds as the graph holds them, which is the form its own data carried: a sample whose file\nspelled its ids as integers answers with numbers. Graphty.isPinned takes either\nspelling, so a consumer comparing against an id it has printed should ask that instead of\ntesting this set for membership.","return":{"type":{"text":""}},"readonly":true},{"kind":"method","name":"getNode","return":{"type":{"text":""}},"parameters":[{"name":"nodeId","type":{"text":"string | number"},"description":"The ID of the node to get"}],"description":"Get a node by its ID."},{"kind":"method","name":"getNodes","return":{"type":{"text":""}},"description":"Get all nodes in the graph."},{"kind":"method","name":"getNodeCount","return":{"type":{"text":""}},"description":"Get the number of nodes in the graph."},{"kind":"method","name":"getEdgeCount","return":{"type":{"text":""}},"description":"Get the number of edges in the graph."},{"kind":"method","name":"selectNode","return":{"type":{"text":""}},"parameters":[{"name":"nodeId","type":{"text":"string | number"},"description":"The ID of the node to select"}],"description":"Select a node by its ID, replacing whatever was selected before.\n\nSuperseded by Graphty.select, which takes the same five set operations over every\nway of naming elements. This is `select({ nodes: [nodeId] })` with a lookup in front of\nit, and it keeps working because it is what a click has always done."},{"kind":"method","name":"deselectNode","return":{"type":{"text":"void"}},"description":"Deselect the currently selected node.\n\nSuperseded by `session.selection.clear()`, which empties both sets. This clears the node\nhalf through the same model and keeps working."},{"kind":"method","name":"getSelectedNode","return":{"type":{"text":""}},"description":"Get the currently selected node.\n\nSuperseded by `session.selection.nodes`, which is the whole selection rather than the\nfirst node of it: this answers with one render object, and a selection now holds any\nnumber of nodes and edges."},{"kind":"method","name":"isNodeSelected","return":{"type":{"text":""}},"parameters":[{"name":"nodeId","type":{"text":"string | number"},"description":"The ID of the node to check"}],"description":"Check if a specific node is selected.\n\nAnswered from the selection masks, so it is true for EVERY selected node rather than only\nthe first one. Superseded by `session.selection.has`, which answers for an edge too."},{"kind":"method","name":"runAlgorithm","return":{"type":{"text":""}},"parameters":[{"name":"namespace","type":{"text":"string"},"description":"Algorithm namespace (e.g., \"graphty\")"},{"name":"type","type":{"text":"string"},"description":"Algorithm type (e.g., \"degree\", \"pagerank\")"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").RunAlgorithmOptions"},"description":"Algorithm options"}],"description":"Run a graph algorithm.","deprecated":"Since 2.0. Use `run()`, which returns a `Run`: the result is on the object the\ncall hands back, the work reports progress and can be cancelled, and\n`graphty-run-change` follows it from the DOM. This method still works and is expressed in\nterms of `run`. (An inline link cannot appear in this tag: the custom-elements-manifest\nbuild serialises a raw compiler node for one and fails on the cycle inside it.)"},{"kind":"method","name":"applySuggestedStyles","return":{"type":{"text":""}},"parameters":[{"name":"algorithmKey","type":{"text":"string | string[]"},"description":"A catalogue key such as \"degree\", a 1.10 address such as\n\"graphty:degree\", or an array of either."}],"description":"Paint what an algorithm's finished runs suggest be drawn from them.\n\nRarely needed: a run paints itself on its first completion, from the encoding its own\nresult shape derives. This is the verb for a run started with `{ style: false }`, or for\nputting a picture back after a reader cleared it. Applying twice replaces the layer bound\nto that run and channel rather than stacking a second one on it."},{"kind":"method","name":"getSuggestedStyles","return":{"type":{"text":""}},"parameters":[{"name":"algorithmKey","type":{"text":"string"},"description":"A catalogue key such as \"degree\", or a 1.10 address such as\n\"graphty:degree\"."}],"description":"What an algorithm's finished runs suggest be drawn from them, without painting any of it."},{"kind":"method","name":"setLayout","return":{"type":{"text":""}},"parameters":[{"name":"type","type":{"text":"string"},"description":"Layout algorithm name"},{"name":"opts","optional":true,"type":{"text":"object"},"description":"Layout-specific options"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").QueueableOptions"},"description":"Queue options"}],"description":"Set the layout algorithm."},{"kind":"method","name":"zoomToFit","return":{"type":{"text":"void"}},"description":"Zoom the camera to fit all nodes in view."},{"kind":"method","name":"waitForSettled","return":{"type":{"text":""}},"description":"Wait for every queued operation to finish.\n\nThe QUEUE only -- data loading, layout changes, algorithm runs. The layout may still be\nrunning and the camera may still be moving when this resolves. For a picture that will not\nchange again, wait for Graphty.waitForStableFrame."},{"kind":"method","name":"waitForStableFrame","return":{"type":{"text":""}},"parameters":[{"name":"options","optional":true,"type":{"text":"{ timeoutMs?: number }"},"description":"How the wait is bounded."},{"description":"How long to wait before giving up; 30 seconds by default.","name":"options.timeoutMs"}],"description":"Wait until the picture is final.\n\nResolves once every queued operation has run, the layout has converged, the camera has\nfinished framing what it arrived at, and a frame has been drawn showing that. This is what\na screenshot, a video frame or a visual regression snapshot needs: the `graph-settled`\nevent fires one update pass earlier, before the final framing has even been requested, so\na picture taken on that event is a picture of a camera still in motion.\n\nIt rejects, naming what was still moving, rather than handing back a moving picture."},{"kind":"field","name":"isFrameStable","type":{"text":"boolean"},"description":"Whether the picture on screen is the finished one.\n\nTrue only when the layout has converged, the camera has finished framing the graph, and a\nframe has been drawn in that state. The `graph-frame-stable` event announces the moment it\nbecomes true.","return":{"type":{"text":""}},"readonly":true},{"kind":"method","name":"batchOperations","return":{"type":{"text":""}},"parameters":[{"name":"fn","type":{"text":"() => Promise<void> | void"},"description":"Function containing batch operations"}],"description":"Execute multiple operations as a batch."},{"kind":"method","name":"on","return":{"type":{"text":"void"}},"parameters":[{"name":"type","type":{"text":"import(\"./events\").EventType"},"description":"Event type to listen for"},{"name":"callback","type":{"text":"import(\"./events\").EventCallbackType"},"description":"Callback function"}],"description":"Subscribe to graph events."},{"kind":"method","name":"addListener","return":{"type":{"text":"void"}},"parameters":[{"name":"type","type":{"text":"import(\"./events\").EventType"},"description":"Event type to listen for"},{"name":"callback","type":{"text":"import(\"./events\").EventCallbackType"},"description":"Callback function"}],"description":"Subscribe to graph events (alias for on)."},{"kind":"method","name":"listenerCount","return":{"type":{"text":""}},"description":"Get the total number of registered event listeners."},{"kind":"method","name":"is2D","return":{"type":{"text":""}},"description":"Check if the graph is in 2D mode."},{"kind":"method","name":"setXRConfig","return":{"type":{"text":"void"}},"parameters":[{"name":"config","type":{"text":"PartialXRConfig"},"description":"XR configuration"}],"description":"Set XR (VR/AR) configuration."},{"kind":"method","name":"getXRConfig","return":{"type":{"text":""}},"description":"Get the current XR configuration."},{"kind":"method","name":"exitXR","return":{"type":{"text":""}},"description":"Exit XR (VR/AR) mode."},{"kind":"method","name":"resolveCameraPreset","return":{"type":{"text":""}},"parameters":[{"name":"preset","type":{"text":"string"},"description":"The view's name, for example \"fitToGraph\" or \"topView\"."},{"name":"options","optional":true,"type":{"text":"{ nodes?: Iterable<string | number>; params?: Readonly<Record<string, unknown>> }"},"description":"What to frame and how to configure the view."},{"description":"The nodes to measure the box over. Absent frames the whole graph.","name":"options.nodes"},{"description":"The view's own options, filled in from its declared defaults.","name":"options.params"}],"description":"Work out where a named camera view would put the viewer, without moving anything.\n\nThe name may be one the element ships, one a third party registered with\n`registerCameraView`, or a snapshot saved with `saveCameraPreset`."},{"kind":"method","name":"applyCameraView","return":{"type":{"text":""}},"parameters":[{"name":"id","type":{"text":"string"},"description":"The view's name."},{"name":"options","optional":true,"type":{"text":"{\n scope?: Scope;\n params?: Readonly<Record<string, unknown>>;\n } & import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"The scope to frame, the view's own options, and how to get there."},{"description":"What to frame. Absent frames the whole graph.","name":"options.scope"},{"description":"The view's own options, filled in from its declared defaults.","name":"options.params"}],"description":"Put the viewer where a named camera view says they should stand.\n\nThe route that frames a SUBSET: the element measures the box over whatever the scope covers\nand hands the smaller box to the view, so a view frames a selection with no code of its own."},{"kind":"method","name":"setInputEnabled","return":{"type":{"text":"void"}},"parameters":[{"name":"enabled","type":{"text":"boolean"},"description":"Whether input should be enabled"}],"description":"Enable or disable user input."},{"kind":"method","name":"shutdown","return":{"type":{"text":"void"}},"description":"Shut down the graph and release resources."},{"kind":"method","name":"isRunning","return":{"type":{"text":""}},"description":"Check if the graph is running."},{"kind":"method","name":"setRunning","return":{"type":{"text":"void"}},"parameters":[{"name":"running","type":{"text":"boolean"},"description":"True to run the layout, false to pause it."}],"description":"Play or pause the layout.\n\n`setRunning(true)` on a layout that has already settled restarts it, so \"play\" is\nsomething the reader can see; `setRunning(false)` stops the per-frame stepping and nothing\nelse -- work already handed to an accelerator lands, the scene keeps rendering, and the\ncamera, picking and styling stay live. There is no event for this: `isRunning()` reports\nthe state and `graph-settled` reports the arrangement coming to rest.\n\nA pause is not a mode the element remembers: anything that (re)starts a layout -- loading\nmore nodes, an accelerator attaching, setting another layout, dropping a dragged node --\nruns it again, so pause it after those, not before."},{"kind":"method","name":"worldToScreen","return":{"type":{"text":""}},"parameters":[{"name":"worldPos","type":{"text":"{ x: number; y: number; z: number }"},"description":"Position in world space"},{"description":"X coordinate in world space","name":"worldPos.x"},{"description":"Y coordinate in world space","name":"worldPos.y"},{"description":"Z coordinate in world space","name":"worldPos.z"}],"description":"Convert world coordinates to screen coordinates."},{"kind":"method","name":"screenToWorld","return":{"type":{"text":""}},"parameters":[{"name":"screenPos","type":{"text":"{ x: number; y: number }"},"description":"Position in screen space"},{"description":"X pixel coordinate","name":"screenPos.x"},{"description":"Y pixel coordinate","name":"screenPos.y"}],"description":"Convert screen coordinates to world coordinates."},{"kind":"method","name":"setData","return":{"type":{"text":"void"}},"parameters":[{"name":"data","type":{"text":"{ nodes: Record<string, unknown>[]; edges: Record<string, unknown>[] }"},"description":"Object containing nodes and edges arrays"},{"description":"Array of node data objects","name":"data.nodes"},{"description":"Array of edge data objects","name":"data.edges"}],"description":"Set graph data (both nodes and edges) at once."},{"kind":"method","name":"getStyles","return":{"type":{"text":""}},"description":"Get the Styles object for direct style access."},{"kind":"method","name":"getDataManager","return":{"type":{"text":""}},"description":"Get the DataManager for advanced data operations."},{"kind":"method","name":"getLayoutManager","return":{"type":{"text":""}},"description":"Get the LayoutManager for advanced layout operations."},{"kind":"method","name":"getUpdateManager","return":{"type":{"text":""}},"description":"Get the UpdateManager for update scheduling."},{"kind":"method","name":"getStatsManager","return":{"type":{"text":""}},"description":"Get the StatsManager for performance statistics."},{"kind":"method","name":"getSelectionManager","return":{"type":{"text":""}},"description":"Get the SelectionManager for selection operations."},{"kind":"method","name":"getEventManager","return":{"type":{"text":""}},"description":"Get the EventManager for event operations."},{"kind":"method","name":"getScene","return":{"type":{"text":""}},"description":"Get the Babylon.js Scene for advanced rendering operations."},{"kind":"method","name":"getMeshCache","return":{"type":{"text":""}},"description":"Get the MeshCache for mesh management."},{"kind":"method","name":"setCameraMode","return":{"type":{"text":""}},"parameters":[{"name":"mode","type":{"text":"import(\"./cameras/CameraManager\").CameraKey"},"description":"Camera mode key"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").QueueableOptions"},"description":"Queue options"}],"description":"Activate the camera of the current view mode: `\"orbit\"` in 3D, `\"2d\"` in 2D."},{"kind":"method","name":"getCameraController","return":{"type":{"text":""}},"description":"Get the current camera controller."},{"kind":"method","name":"setRenderSettings","return":{"type":{"text":""}},"parameters":[{"name":"settings","type":{"text":"Record<string, unknown>"},"description":"Render settings object"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").QueueableOptions"},"description":"Queue options"}],"description":"Set render settings for advanced rendering control."},{"kind":"method","name":"getNodeMesh","return":{"type":{"text":""}},"parameters":[{"name":"nodeId","type":{"text":"string"},"description":"The ID of the node"}],"description":"Get a node's mesh by its ID."},{"kind":"method","name":"getXRSessionManager","return":{"type":{"text":""}},"description":"Get the XR session manager."},{"kind":"method","name":"enableAiControl","return":{"type":{"text":""}},"parameters":[{"name":"config","type":{"text":"import(\"./ai/AiManager\").AiManagerConfig"},"description":"AI manager configuration"}],"description":"Enable AI control for the graph."},{"kind":"method","name":"disableAiControl","return":{"type":{"text":"void"}},"description":"Disable AI control for the graph."},{"kind":"method","name":"aiCommand","return":{"type":{"text":""}},"parameters":[{"name":"message","type":{"text":"string"},"description":"The command message"}],"description":"Send a command to the AI assistant."},{"kind":"method","name":"getAiStatus","return":{"type":{"text":""}},"description":"Get the current AI status."},{"kind":"method","name":"onAiStatusChange","return":{"type":{"text":""}},"parameters":[{"name":"callback","type":{"text":"import(\"./ai/AiStatus\").StatusChangeCallback"},"description":"Callback function for status changes"}],"description":"Subscribe to AI status changes."},{"kind":"method","name":"cancelAiCommand","return":{"type":{"text":"void"}},"description":"Cancel the current AI command."},{"kind":"method","name":"getAiManager","return":{"type":{"text":""}},"description":"Get the AI manager."},{"kind":"method","name":"isAiEnabled","return":{"type":{"text":""}},"description":"Check if AI control is enabled."},{"kind":"method","name":"retryLastAiCommand","return":{"type":{"text":""}},"description":"Retry the last AI command that failed."},{"kind":"method","name":"getApiKeyManager","return":{"type":{"text":""}},"description":"Get the API key manager."},{"kind":"method","name":"createApiKeyManager","static":true,"return":{"type":{"text":""}},"description":"Create an API key manager for persistent key storage.\nThis is a static method - the manager is not tied to any specific graph instance."},{"kind":"method","name":"getVoiceAdapter","return":{"type":{"text":""}},"description":"Get the voice input adapter."},{"kind":"method","name":"startVoiceInput","return":{"type":{"text":""}},"parameters":[{"name":"options","optional":true,"type":{"text":"{\n continuous?: boolean;\n interimResults?: boolean;\n language?: string;\n onTranscript?: (text: string, isFinal: boolean) => void;\n onStart?: (started: boolean, error?: string) => void;\n }"},"description":"Voice input options"},{"description":"Whether to continue listening after results","name":"options.continuous"},{"description":"Whether to report interim (non-final) results","name":"options.interimResults"},{"description":"Language code (e.g., \"en-US\")","name":"options.language"},{"description":"Callback for transcript results","name":"options.onTranscript"},{"description":"Callback when voice input starts","name":"options.onStart"}],"description":"Start voice input for AI commands."},{"kind":"method","name":"stopVoiceInput","return":{"type":{"text":"void"}},"description":"Stop voice input."},{"kind":"method","name":"isVoiceActive","return":{"type":{"text":""}},"description":"Check if voice input is active."},{"kind":"field","name":"acceleration","type":{"text":"AccelerationPolicy"},"description":"Sets the acceleration policy and applies it immediately.\n\nAn unrecognised value is reported and then ignored, leaving the previous policy in\nforce. It is not thrown. Lit drives this setter from `attributeChangedCallback`, so a\nthrow here would abort attribute processing and leave the element unrendered -- a typo\nin markup would take the whole graph down. HTML has never behaved that way about an\nattribute value, and an embedded component must not be the first thing that does.\n\nThe report is deliberately loud, because the quiet failure is the dangerous one: a page\nthat meant `required` and wrote `requried` would otherwise run on the CPU and look\nhealthy.","return":{"type":{"text":""}},"attribute":"acceleration","reflects":true},{"kind":"field","name":"accelerationMinNodes","type":{"text":"number"},"description":"Sets the threshold and applies it immediately.\n\nA value that is not a whole number of 0 or more is reported and then ignored, leaving the\nprevious threshold in force, for the reason the `acceleration` setter states: Lit drives\nthis from `attributeChangedCallback`, and a throw there would leave the element unrendered.","return":{"type":{"text":""}},"parameters":[{"description":"The node count at or above which accelerated work uses the accelerator.","name":"value"}],"attribute":"acceleration-min-nodes","reflects":true}],"events":[{"name":"ai-command-cancelled","type":{"text":"CustomEvent<AiCommandCancelledEvent>"},"description":"Emitted when an AI command is cancelled"},{"name":"ai-command-complete","type":{"text":"CustomEvent<AiCommandCompleteEvent>"},"description":"Emitted when an AI command completes successfully"},{"name":"ai-command-error","type":{"text":"CustomEvent<AiCommandErrorEvent>"},"description":"Emitted when an AI command encounters an error"},{"name":"ai-command-start","type":{"text":"CustomEvent<AiCommandStartEvent>"},"description":"Emitted when an AI command starts processing"},{"name":"ai-status-change","type":{"text":"CustomEvent<AiStatusChangeEvent>"},"description":"Main event for UI binding - single source of truth for AI status"},{"name":"ai-stream-chunk","type":{"text":"CustomEvent<AiStreamChunkEvent>"},"description":"Emitted during streaming when text chunks arrive (throttled)"},{"name":"ai-stream-tool-call","type":{"text":"CustomEvent<AiStreamToolCallEvent>"},"description":"Emitted when the LLM makes a tool call"},{"name":"ai-stream-tool-result","type":{"text":"CustomEvent<AiStreamToolResultEvent>"},"description":"Emitted when a tool call completes"},{"name":"ai-voice-end","type":{"text":"CustomEvent<AiVoiceEndEvent>"},"description":"Emitted when voice input ends"},{"name":"ai-voice-start","type":{"text":"CustomEvent<AiVoiceStartEvent>"},"description":"Emitted when voice input starts"},{"name":"ai-voice-transcript","type":{"text":"CustomEvent<AiVoiceTranscriptEvent>"},"description":"Emitted when voice transcript is available"},{"name":"animation-cancelled","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"animation-progress","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"camera-state-changed","type":{"text":"CustomEvent<CameraStateChangedEvent>"}},{"name":"data-added","type":{"text":"CustomEvent<GraphDataAddedEvent>"}},{"name":"data-loaded","type":{"text":"CustomEvent<GraphDataLoadedEvent>"}},{"name":"data-loading-complete","type":{"text":"CustomEvent<DataLoadingCompleteEvent>"}},{"name":"data-loading-error","type":{"text":"CustomEvent<DataLoadingErrorEvent>"}},{"name":"data-loading-error-summary","type":{"text":"CustomEvent<DataLoadingErrorSummaryEvent>"}},{"name":"data-loading-progress","type":{"text":"CustomEvent<DataLoadingProgressEvent>"}},{"name":"edge-add-before","type":{"text":"CustomEvent<EdgeAddEvent>"}},{"name":"edge-update-after","type":{"text":"CustomEvent<EdgeGenericEvent>"}},{"name":"edge-update-before","type":{"text":"CustomEvent<EdgeGenericEvent>"}},{"name":"elements-removed","type":{"text":"CustomEvent<ElementsRemovedEvent>"},"description":"Emitted once per `removeNodes` call, naming everything that went."},{"name":"error","type":{"text":"CustomEvent<GraphErrorEvent>"}},{"name":"graph-frame-stable","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"graph-settled","type":{"text":"CustomEvent<GraphSettledEvent>"}},{"name":"graphty-capabilities-change","type":{"text":"CustomEvent"}},{"name":"graphty-run-change","type":{"text":"CustomEvent"}},{"name":"graphty-selection-change","type":{"text":"CustomEvent"}},{"name":"graphty-visibility-change","type":{"text":"CustomEvent"}},{"name":"layout-initialized","type":{"text":"CustomEvent<GraphLayoutInitializedEvent>"}},{"name":"lifecycle-disposed","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"lifecycle-initialized","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"manager-initialized","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"name","type":{"text":"CustomEvent"}},{"name":"node-add-before","type":{"text":"CustomEvent<NodeAddEvent>"}},{"name":"node-click","type":{"text":"CustomEvent<NodeClickEvent>"},"description":"Emitted when a node is clicked."},{"name":"node-drag-end","type":{"text":"CustomEvent<NodeDragEndEvent>"},"description":"Emitted when a node drag operation ends."},{"name":"node-drag-start","type":{"text":"CustomEvent<NodeDragStartEvent>"},"description":"Emitted when a node drag operation starts."},{"name":"node-hover","type":{"text":"CustomEvent<NodeHoverEvent>"},"description":"Emitted when the pointer enters a node (hover start)."},{"name":"node-update-after","type":{"text":"CustomEvent<NodeGenericEvent>"}},{"name":"node-update-before","type":{"text":"CustomEvent<NodeGenericEvent>"}},{"name":"operation-batch-complete","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"operation-complete","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"operation-obsoleted","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"operation-progress","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"operation-queue-active","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"operation-queue-idle","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"operation-start","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"render-initialized","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"screenshot-enhancing","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"screenshot-ready","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"selection-changed","type":{"text":"CustomEvent<SelectionChangedEvent>"}},{"name":"skybox-loaded","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"snapshot-dropped","type":{"text":"CustomEvent<GraphSnapshotDroppedEvent>"},"description":"Emitted by DataManager when the dataset is cleared: the store and every snapshot it froze are"},{"name":"snapshot-replaced","type":{"text":"CustomEvent<GraphSnapshotReplacedEvent>"}},{"name":"style-changed","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"zoom-to-fit-complete","type":{"text":"CustomEvent<GraphGenericEvent>"}}],"attributes":[{"name":"node-data","type":{"text":"Record<string, unknown>[] | undefined"},"description":"Sets the node data array. Triggers addition of nodes to the graph.","return":{"type":{"text":""}},"fieldName":"nodeData"},{"name":"edge-data","type":{"text":"Record<string, unknown>[] | undefined"},"description":"Sets the edge data array. Triggers addition of edges to the graph.","return":{"type":{"text":""}},"fieldName":"edgeData"},{"name":"data-source","type":{"text":"string | undefined"},"description":"Sets the data source type. Initializes data loading when combined with dataSourceConfig.","return":{"type":{"text":""}},"fieldName":"dataSource"},{"name":"data-source-config","type":{"text":"Record<string, unknown> | undefined"},"description":"Sets the data source configuration. Initializes data loading when combined with dataSource.","return":{"type":{"text":""}},"fieldName":"dataSourceConfig"},{"name":"node-id-path","type":{"text":"string | undefined"},"description":"Sets the JMESPath for node ID extraction. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"nodeIdPath"},{"name":"edge-src-id-path","type":{"text":"string | undefined"},"description":"Sets the JMESPath for edge source ID extraction. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"edgeSrcIdPath"},{"name":"edge-dst-id-path","type":{"text":"string | undefined"},"description":"Sets the JMESPath for edge destination ID extraction. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"edgeDstIdPath"},{"name":"edge-id-path","type":{"text":"string | undefined"},"description":"Sets the JMESPath for edge identity. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"edgeIdPath"},{"name":"repeated-edges","type":{"text":"DuplicatePolicy | undefined"},"description":"Sets the repeat policy. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"repeatedEdges"},{"name":"node-label-path","type":{"text":"string | undefined"},"description":"Sets the JMESPath for a node's display name. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"nodeLabelPath"},{"name":"edge-weight-path","type":{"text":"string | undefined"},"description":"Sets the JMESPath for an edge's weight. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"edgeWeightPath"},{"name":"position-scale","type":{"text":"number | undefined"},"description":"Sets the record-units-to-scene-units multiplier. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"positionScale"},{"name":"directed","type":{"text":"boolean | \"auto\" | undefined"},"description":"Sets whether the graph is read as directed. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"directed"},{"name":"layout","type":{"text":"string | undefined"},"description":"Sets the layout algorithm. Triggers layout recalculation with merged config.","return":{"type":{"text":""}},"fieldName":"layout"},{"name":"layout-config","type":{"text":"Record<string, unknown> | undefined"},"description":"Sets layout-specific configuration. Updates active layout if one is set.","return":{"type":{"text":""}},"fieldName":"layoutConfig"},{"name":"view-mode","type":{"text":"ViewMode | undefined"},"description":"Sets the view mode. Switches camera and rendering mode accordingly.","return":{"type":{"text":""}},"fieldName":"viewMode"},{"name":"layout-2d","type":{"text":"boolean | undefined"},"description":"Sets 2D mode (deprecated). Converts boolean to viewMode internally.","deprecated":"Use viewMode instead. layout2d: true is equivalent to viewMode: \"2d\"\nSpecifies that the layout should be rendered in two dimensions (as\nopposed to 3D)","return":{"type":{"text":""}},"fieldName":"layout2d"},{"name":"background","type":{"text":"GraphBackgroundConfig | undefined"},"description":"Sets the graph background. Applies it to the scene immediately.\n\nA value the schema refuses is REPORTED AND DROPPED rather than thrown, on the same terms\nas `acceleration`: this setter is reached from `attributeChangedCallback`, and a throw\nthere escapes as an unhandled rejection that reaches nobody, leaving the page with an\nelement that never rendered. A wrong colour in markup must not take the graph down.","return":{"type":{"text":""}},"fieldName":"background"},{"name":"starting-camera-distance","type":{"text":"number | undefined"},"description":"Sets the starting camera distance.","return":{"type":{"text":""}},"fieldName":"startingCameraDistance"},{"name":"run-algorithms-on-load","type":{"text":"boolean | undefined"},"description":"Sets whether to run algorithms when a style template loads. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"runAlgorithmsOnLoad"},{"name":"enable-detailed-profiling","type":{"text":"boolean | undefined"},"description":"Sets detailed profiling mode. Enables hierarchical timing and advanced stats collection.","return":{"type":{"text":""}},"fieldName":"enableDetailedProfiling"},{"name":"acceleration","type":{"text":"AccelerationPolicy"},"description":"Sets the acceleration policy and applies it immediately.\n\nAn unrecognised value is reported and then ignored, leaving the previous policy in\nforce. It is not thrown. Lit drives this setter from `attributeChangedCallback`, so a\nthrow here would abort attribute processing and leave the element unrendered -- a typo\nin markup would take the whole graph down. HTML has never behaved that way about an\nattribute value, and an embedded component must not be the first thing that does.\n\nThe report is deliberately loud, because the quiet failure is the dangerous one: a page\nthat meant `required` and wrote `requried` would otherwise run on the CPU and look\nhealthy.","return":{"type":{"text":""}},"fieldName":"acceleration"},{"name":"acceleration-min-nodes","type":{"text":"number"},"description":"Sets the threshold and applies it immediately.\n\nA value that is not a whole number of 0 or more is reported and then ignored, leaving the\nprevious threshold in force, for the reason the `acceleration` setter states: Lit drives\nthis from `attributeChangedCallback`, and a throw there would leave the element unrendered.","return":{"type":{"text":""}},"parameters":[{"description":"The node count at or above which accelerated work uses the accelerator.","name":"value"}],"fieldName":"accelerationMinNodes"}],"superclass":{"name":"LitElement","package":"lit"},"tagName":"graphty-element","customElement":true}],"exports":[{"kind":"js","name":"Graphty","declaration":{"name":"Graphty","module":"src/graphty-element.ts"}},{"kind":"custom-element-definition","name":"graphty-element","declaration":{"name":"Graphty","module":"src/graphty-element.ts"}}]}]}
|
|
1
|
+
{"schemaVersion":"1.0.0","readme":"","modules":[{"kind":"javascript-module","path":"src/graphty-element.ts","declarations":[{"kind":"class","description":"Graphty creates a graph","name":"Graphty","members":[{"kind":"field","name":"session","type":{"text":"GraphSession"},"description":"The headless model this element draws.\n\nEverything about the graph that needs no screen is here: the data, the coordinates, the\nstatistics, the catalogue, the runs and their results, which elements a piece of work may\nlook at (`scope`), what is selected (`selection`) and what is visible (`visibility`). The\ncamera, the canvas and the scene stay on the element, because two synchronised views of one\ndataset disagree about those and agree about everything above.\n\nRead-only for now: a session built elsewhere cannot yet be attached to an element.","return":{"type":{"text":""}},"readonly":true},{"kind":"method","name":"run","return":{"type":{"text":""}},"parameters":[{"name":"algorithm","type":{"text":"AlgorithmKey"},"description":"Which algorithm to run, by its catalogue key such as \"betweenness\"."},{"name":"params","optional":true,"type":{"text":"Record<string, unknown>"},"description":"Its parameters, as the catalogue declares them."},{"name":"options","optional":true,"type":{"text":"StartOptions"},"description":"The scope, the seed, the id, the signal and the progress handler."}],"description":"Start an algorithm and get back something a caller can watch, stop and read.\n\nForwarded from the session, so the first graph needs no session: a page with a tag and\nthree lines of script can run an analysis, await the result and read its ranking without\nimporting a module or learning what a session is."},{"kind":"method","name":"select","return":{"type":{"text":""}},"parameters":[{"name":"target","type":{"text":"SelectionTarget"},"description":"What to select: ids, a pasted list, a neighbourhood, a scope, a run's top n."},{"name":"op","optional":true,"type":{"text":"SetOp"},"description":"What to do with it; replaces the selection when absent."}],"description":"Change what is selected.\n\nForwarded from the session, so the first graph needs no session: a page with a tag and two\nlines of script can select a list of ids, add to that selection, invert it or take the top\ntwenty of a finished run, without importing a module.\n\nOne selection per graph, shared by every surface reading it. The five operations are\n`\"replace\"` (the default, and what a click does), `\"add\"`, `\"remove\"`, `\"toggle\"` and\n`\"intersect\"`."},{"kind":"method","name":"asyncFirstUpdated","return":{"type":{"text":"Promise<void>"}},"description":"Performs async initialization tasks for the graph, including event forwarding and graph initialization."},{"kind":"field","name":"nodeData","type":{"text":"Record<string, unknown>[] | undefined"},"description":"Sets the node data array. Replaces the graph's nodes with these.","return":{"type":{"text":""}},"attribute":"node-data"},{"kind":"field","name":"edgeData","type":{"text":"Record<string, unknown>[] | undefined"},"description":"Sets the edge data array. Triggers addition of edges to the graph.","return":{"type":{"text":""}},"attribute":"edge-data"},{"kind":"field","name":"dataSource","type":{"text":"string | undefined"},"description":"Sets the data source type. Starts a load when combined with dataSourceConfig; see\n`dataSourceConfig` for what a second assignment does.","return":{"type":{"text":""}},"attribute":"data-source"},{"kind":"field","name":"dataSourceConfig","type":{"text":"Record<string, unknown> | undefined"},"description":"Sets the data source configuration. Starts a load when combined with dataSource.\n\nEvery assignment of the pair starts a load, and assigning both halves in one task starts\none. Assigning the pair already loaded -- the same type and the same config object --\nstarts none, unless that load failed; pass a new object to load again. The first load adds\nto the graph; each later one REPLACES it, but only once the new source has parsed -- a\nmalformed or empty source leaves the graph as it was and reports `data-loading-error`.\nThe pair assigned LAST wins: a slower earlier load that finishes afterwards is dropped.\nEvery event about the load carries its `loadId`. A caller that wants to await the load\ncalls `loadFromUrl`, `loadFromFile` or `addDataFromSource` instead.","return":{"type":{"text":""}},"attribute":"data-source-config"},{"kind":"method","name":"clearData","return":{"type":{"text":"void"}},"description":"Removes every node and edge, and forgets the data-source pair. A load still in flight is\nabandoned: it rejects with `E_SUPERSEDED` and adds nothing.\n\nThe next pair assigned after it loads into an empty graph, as the first one did.\n\nThe two properties are reset with it, and deliberately through the private fields\nrather than the setters: a setter would call `#tryInitializeDataSource` again, and\nleaving the old pair in place would let the next half-assignment load the NEW\nsource against the OLD config."},{"kind":"field","name":"nodeIdPath","type":{"text":"string | undefined"},"description":"Sets the JMESPath for node ID extraction. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"node-id-path"},{"kind":"field","name":"edgeSrcIdPath","type":{"text":"string | undefined"},"description":"Sets the JMESPath for edge source ID extraction. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"edge-src-id-path"},{"kind":"field","name":"edgeDstIdPath","type":{"text":"string | undefined"},"description":"Sets the JMESPath for edge destination ID extraction. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"edge-dst-id-path"},{"kind":"field","name":"edgeIdPath","type":{"text":"string | undefined"},"description":"Sets the JMESPath for edge identity. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"edge-id-path"},{"kind":"field","name":"repeatedEdges","type":{"text":"DuplicatePolicy | undefined"},"description":"Sets the repeat policy. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"repeated-edges"},{"kind":"field","name":"nodeLabelPath","type":{"text":"string | undefined"},"description":"Sets the JMESPath for a node's display name. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"node-label-path"},{"kind":"field","name":"edgeWeightPath","type":{"text":"string | undefined"},"description":"Sets the JMESPath for an edge's weight. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"edge-weight-path"},{"kind":"field","name":"positionScale","type":{"text":"number | undefined"},"description":"Sets the record-units-to-scene-units multiplier. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"position-scale"},{"kind":"field","name":"directed","type":{"text":"boolean | \"auto\" | undefined"},"description":"Sets whether the graph is read as directed. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"directed"},{"kind":"field","name":"layout","type":{"text":"string | undefined"},"description":"Sets the layout algorithm. Triggers layout recalculation with merged config.","return":{"type":{"text":""}},"attribute":"layout"},{"kind":"field","name":"layoutConfig","type":{"text":"Record<string, unknown> | undefined"},"description":"Sets layout-specific configuration. Updates active layout if one is set.","return":{"type":{"text":""}},"attribute":"layout-config"},{"kind":"field","name":"layoutBehavior","type":{"text":"GraphBehaviorConfig | undefined"},"description":"Sets how the element drives the layout.\n\nA value the schema refuses is reported and dropped rather than thrown, on the same terms\nas `background` and `acceleration`.","return":{"type":{"text":""}}},{"kind":"field","name":"selectionStyle","type":{"text":"GraphSelectionStyleInput | undefined"},"description":"Sets what a selected node looks like.","return":{"type":{"text":""}}},{"kind":"field","name":"algorithmsOnLoad","type":{"text":"readonly AlgorithmOnLoad[] | undefined"},"description":"Sets which algorithms run once data has finished loading.","return":{"type":{"text":""}}},{"kind":"field","name":"viewMode","type":{"text":"ViewMode | undefined"},"description":"Sets the view mode. Switches camera and rendering mode accordingly.","return":{"type":{"text":""}},"attribute":"view-mode"},{"kind":"field","name":"layout2d","type":{"text":"boolean | undefined"},"description":"Sets 2D mode (deprecated). Converts boolean to viewMode internally.","deprecated":"Use viewMode instead. layout2d: true is equivalent to viewMode: \"2d\"\nSpecifies that the layout should be rendered in two dimensions (as\nopposed to 3D)","return":{"type":{"text":""}},"attribute":"layout-2d"},{"kind":"field","name":"background","type":{"text":"GraphBackgroundConfig | undefined"},"description":"Sets the graph background. Applies it to the scene immediately.\n\nA value the schema refuses is REPORTED AND DROPPED rather than thrown, on the same terms\nas `acceleration`: this setter is reached from `attributeChangedCallback`, and a throw\nthere escapes as an unhandled rejection that reaches nobody, leaving the page with an\nelement that never rendered. A wrong colour in markup must not take the graph down.","return":{"type":{"text":""}},"attribute":"background"},{"kind":"field","name":"startingCameraDistance","type":{"text":"number | undefined"},"description":"Sets the starting camera distance.","return":{"type":{"text":""}},"attribute":"starting-camera-distance"},{"kind":"field","name":"runAlgorithmsOnLoad","type":{"text":"boolean | undefined"},"description":"Sets whether to run algorithms when a style template loads. Updates graph configuration.","return":{"type":{"text":""}},"attribute":"run-algorithms-on-load"},{"kind":"field","name":"enableDetailedProfiling","type":{"text":"boolean | undefined"},"description":"Sets detailed profiling mode. Enables hierarchical timing and advanced stats collection.","return":{"type":{"text":""}},"attribute":"enable-detailed-profiling"},{"kind":"field","name":"xr","type":{"text":"PartialXRConfig | undefined"},"description":"Sets XR configuration. Updates VR/AR settings and UI options.","return":{"type":{"text":""}}},{"kind":"method","name":"captureScreenshot","return":{"type":{"text":""}},"parameters":[{"name":"options","optional":true,"type":{"text":"ScreenshotOptions"},"description":"Screenshot options (format, resolution, destinations, etc.)"}],"description":"Capture a screenshot of the current graph visualization."},{"kind":"method","name":"canCaptureScreenshot","return":{"type":{"text":""}},"parameters":[{"name":"options","optional":true,"type":{"text":"ScreenshotOptions"},"description":"Screenshot options to validate"}],"description":"Phase 6: Capability Check API\nCheck if screenshot can be captured with given options.\nAvailable from Phase 6 onwards."},{"kind":"method","name":"captureAnimation","return":{"type":{"text":""}},"parameters":[{"name":"options","type":{"text":"import(\"./video/VideoCapture.js\").AnimationOptions"},"description":"Animation capture options"}],"description":"Phase 7: Video Capture API\nCapture an animation as a video (stationary or animated camera)\nAvailable from Phase 7 onwards."},{"kind":"method","name":"cancelAnimationCapture","return":{"type":{"text":""}},"description":"Phase 7: Cancel Animation Capture\nCancel an ongoing animation capture\nAvailable from Phase 7 onwards."},{"kind":"method","name":"isAnimationCapturing","return":{"type":{"text":""}},"description":"Phase 7: Check if animation capture is in progress\nAvailable from Phase 7 onwards."},{"kind":"method","name":"estimateAnimationCapture","return":{"type":{"text":""}},"parameters":[{"name":"options","type":{"text":"Pick<import(\"./video/VideoCapture.js\").AnimationOptions, \"duration\" | \"fps\" | \"width\" | \"height\">"},"description":"Animation options to estimate"}],"description":"Phase 7: Animation Capture Estimation\nEstimate performance and potential issues for animation capture\nAvailable from Phase 7 onwards."},{"kind":"method","name":"getViewMode","return":{"type":{"text":""}},"description":"Get the current view mode."},{"kind":"method","name":"setViewMode","return":{"type":{"text":""}},"parameters":[{"name":"mode","type":{"text":"ViewMode"},"description":"The view mode to set (\"2d\", \"3d\", \"ar\", or \"vr\")"}],"description":"Set the view mode.\nChanges the rendering dimension and camera system."},{"kind":"method","name":"isVRSupported","return":{"type":{"text":""}},"description":"Check if VR mode is supported on this device/browser.\nReturns true if WebXR is available and VR sessions are supported.\n\nUse this to conditionally show/hide VR controls or display\nappropriate messaging to users."},{"kind":"method","name":"isARSupported","return":{"type":{"text":""}},"description":"Check if AR mode is supported on this device/browser.\nReturns true if WebXR is available and AR sessions are supported.\n\nUse this to conditionally show/hide AR controls or display\nappropriate messaging to users."},{"kind":"method","name":"getCameraState","return":{"type":{"text":""}},"description":"Get current camera state (supports both 2D and 3D)"},{"kind":"method","name":"setCameraState","return":{"type":{"text":""}},"parameters":[{"name":"state","type":{"text":"import(\"./screenshot/types.js\").CameraState | { preset: string }"},"description":"Camera state to apply or preset name"},{"name":"options","optional":true,"type":{"text":"import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"Animation options"}],"description":"Set camera state (supports both 2D and 3D)"},{"kind":"method","name":"setCameraPosition","return":{"type":{"text":""}},"parameters":[{"name":"position","type":{"text":"{ x: number; y: number; z: number }"},"description":"Target position {x, y, z}"},{"name":"options","optional":true,"type":{"text":"import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"Animation options"},{"description":"X coordinate","name":"position.x"},{"description":"Y coordinate","name":"position.y"},{"description":"Z coordinate","name":"position.z"}],"description":"Set camera position (3D)"},{"kind":"method","name":"setCameraTarget","return":{"type":{"text":""}},"parameters":[{"name":"target","type":{"text":"{ x: number; y: number; z: number }"},"description":"Target point to look at {x, y, z}"},{"name":"options","optional":true,"type":{"text":"import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"Animation options"},{"description":"X coordinate","name":"target.x"},{"description":"Y coordinate","name":"target.y"},{"description":"Z coordinate","name":"target.z"}],"description":"Set camera target (3D)"},{"kind":"method","name":"setCameraZoom","return":{"type":{"text":""}},"parameters":[{"name":"zoom","type":{"text":"number"},"description":"Zoom level"},{"name":"options","optional":true,"type":{"text":"import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"Animation options"}],"description":"Set camera zoom (2D)"},{"kind":"method","name":"setCameraPan","return":{"type":{"text":""}},"parameters":[{"name":"pan","type":{"text":"{ x: number; y: number }"},"description":"Pan position {x, y}"},{"name":"options","optional":true,"type":{"text":"import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"Animation options"},{"description":"X offset","name":"pan.x"},{"description":"Y offset","name":"pan.y"}],"description":"Set camera pan (2D)"},{"kind":"method","name":"resetCamera","return":{"type":{"text":""}},"parameters":[{"name":"options","optional":true,"type":{"text":"import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"Animation options"}],"description":"Reset camera to default position"},{"kind":"method","name":"saveCameraPreset","return":{"type":{"text":"void"}},"parameters":[{"name":"name","type":{"text":"string"},"description":"Name for the preset"}],"description":"Save current camera state as a named preset.\nAvailable from Phase 5 onwards."},{"kind":"method","name":"loadCameraPreset","return":{"type":{"text":""}},"parameters":[{"name":"name","type":{"text":"string"},"description":"Name of the preset to load"},{"name":"options","optional":true,"type":{"text":"import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"Animation options"}],"description":"Load a camera preset (built-in or user-defined).\nAvailable from Phase 5 onwards."},{"kind":"method","name":"getCameraPresets","return":{"type":{"text":""}},"description":"Get all camera presets (built-in + user-defined).\nAvailable from Phase 5 onwards."},{"kind":"method","name":"exportCameraPresets","return":{"type":{"text":""}},"description":"Export user-defined presets as JSON\nAvailable from Phase 5 onwards"},{"kind":"method","name":"importCameraPresets","return":{"type":{"text":"void"}},"parameters":[{"name":"presets","type":{"text":"Record<string, import(\"./screenshot/types.js\").CameraState>"},"description":"Record of preset names to their state"}],"description":"Import user-defined presets from JSON\nAvailable from Phase 5 onwards"},{"kind":"field","name":"graph","type":{"text":"Graph"},"description":"Get the underlying Graph instance for debugging purposes.","return":{"type":{"text":""}},"readonly":true},{"kind":"method","name":"addNode","return":{"type":{"text":""}},"parameters":[{"name":"node","type":{"text":"import(\"./config\").AdHocData"},"description":"Node data object to add"},{"name":"idPath","optional":true,"type":{"text":"string"},"description":"Key to use for node ID (default: \"id\")"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").QueueableOptions"},"description":"Queue options for operation ordering"}],"description":"Add a single node to the graph."},{"kind":"method","name":"addNodes","return":{"type":{"text":""}},"parameters":[{"name":"nodes","type":{"text":"import(\"./config\").AdHocData[]"},"description":"Array of node data objects to add"},{"name":"idPath","optional":true,"type":{"text":"string"},"description":"Key to use for node IDs (default: \"id\")"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").QueueableOptions"},"description":"Queue options for operation ordering"}],"description":"Add multiple nodes to the graph."},{"kind":"method","name":"addEdge","return":{"type":{"text":""}},"parameters":[{"name":"edge","type":{"text":"import(\"./config\").AdHocData"},"description":"Edge data object to add"},{"name":"options","optional":true,"type":{"text":"import(\"./managers\").AddEdgesOptions & import(\"./utils/queue-migration\").QueueableOptions"},"description":"The endpoint expressions, the repeat policy, and queue ordering"}],"description":"Add a single edge to the graph."},{"kind":"method","name":"addEdges","return":{"type":{"text":""}},"parameters":[{"name":"edges","type":{"text":"import(\"./config\").AdHocData[]"},"description":"Array of edge data objects to add"},{"name":"options","optional":true,"type":{"text":"import(\"./managers\").AddEdgesOptions & import(\"./utils/queue-migration\").QueueableOptions"},"description":"The endpoint expressions, the repeat policy, and queue ordering"}],"description":"Add multiple edges to the graph."},{"kind":"method","name":"removeNodes","return":{"type":{"text":""}},"parameters":[{"name":"nodeIds","type":{"text":"(string | number)[]"},"description":"Array of node IDs to remove"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").QueueableOptions"},"description":"Queue options for operation ordering"}],"description":"Remove nodes from the graph."},{"kind":"method","name":"updateNodes","return":{"type":{"text":""}},"parameters":[{"name":"updates","type":{"text":"{ id: string | number; [key: string]: unknown }[]"},"description":"Array of update objects with id and properties to update"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").QueueableOptions"},"description":"Queue options for operation ordering"}],"description":"Update node data."},{"kind":"method","name":"addDataFromSource","return":{"type":{"text":""}},"parameters":[{"name":"type","type":{"text":"string"},"description":"Data source type (e.g., \"json\", \"csv\", \"graphml\")"},{"name":"opts","optional":true,"type":{"text":"object"},"description":"Data source configuration options"},{"name":"options","optional":true,"type":{"text":"{ replace?: boolean }"},"description":"How to load"},{"description":"Replace the graph with this data, but only once it has all parsed:\na malformed or empty source rejects and leaves the current graph untouched","name":"options.replace"}],"description":"Add data from a data source.\n\nEvery load has an id: the promise resolves to it, and every load event about this load\n(`data-loading-progress`, `data-loading-complete`, `data-loading-error`, `data-loaded`)\ncarries it as `loadId`. A source with no nodes and no edges rejects with `E_EMPTY_LOAD`."},{"kind":"method","name":"loadFromUrl","return":{"type":{"text":""}},"parameters":[{"name":"url","type":{"text":"string"},"description":"URL to fetch graph data from"},{"name":"options","optional":true,"type":{"text":"{\n format?: string;\n nodeIdPath?: string;\n edgeSource?: string;\n edgeTarget?: string;\n replace?: boolean;\n }"},"description":"Loading options"},{"description":"Data format (e.g., \"json\", \"csv\", \"graphml\")","name":"options.format"},{"description":"JMESPath for node ID field","name":"options.nodeIdPath"},{"description":"Where the node an edge starts at is named in the record. Left\nunset, the element reads `source`, then `src`, then `from`","name":"options.edgeSource"},{"description":"Where the node an edge ends at is named in the record","name":"options.edgeTarget"},{"description":"Replace the graph with this data, but only once it has all parsed:\na malformed or empty file rejects and leaves the current graph untouched","name":"options.replace"}],"description":"Load graph data from a URL."},{"kind":"method","name":"loadFromFile","return":{"type":{"text":""}},"parameters":[{"name":"file","type":{"text":"File"},"description":"File object from file input"},{"name":"options","optional":true,"type":{"text":"{\n format?: string;\n nodeIdPath?: string;\n edgeSource?: string;\n edgeTarget?: string;\n replace?: boolean;\n }"},"description":"Loading options"},{"description":"Data format (e.g., \"json\", \"csv\", \"graphml\")","name":"options.format"},{"description":"JMESPath for node ID field","name":"options.nodeIdPath"},{"description":"Where the node an edge starts at is named in the record. Left\nunset, the element reads `source`, then `src`, then `from`","name":"options.edgeSource"},{"description":"Where the node an edge ends at is named in the record","name":"options.edgeTarget"},{"description":"Replace the graph with this data, but only once it has all parsed:\na malformed or empty file rejects and leaves the current graph untouched","name":"options.replace"}],"description":"Load graph data from a File object."},{"kind":"method","name":"pin","return":{"type":{"text":"void"}},"parameters":[{"name":"ids","type":{"text":"(string | number) | readonly (string | number)[]"},"description":"one node id, or several"}],"description":"Pin nodes where they are, so no layout moves them again.\n\nA pin survives a layout change, a 2D/3D switch and a template apply, which is what makes it\nworth having a door for: `pinOnDrag` is on by default, so every node a reader has ever\ndragged is pinned, and until now the only way back out was through `element.graph`."},{"kind":"method","name":"unpin","return":{"type":{"text":"void"}},"parameters":[{"name":"ids","type":{"text":"(string | number) | readonly (string | number)[]"},"description":"one node id, or several"}],"description":"Release nodes a reader or a drag pinned, so the layout arranges them again."},{"kind":"method","name":"isPinned","return":{"type":{"text":""}},"parameters":[{"name":"id","type":{"text":"string | number"},"description":"the node id, in either spelling an integer id may be written in"}],"description":"Whether one node is pinned.\n\nOne lookup, for the question a node inspector actually asks. Reading\nGraphty.pinnedNodes to answer it walks every node in the graph, which on a large\none is a full pass per selection change."},{"kind":"field","name":"pinnedNodes","type":{"text":"ReadonlySet<string | number>"},"description":"Which nodes are pinned right now.\n\nIds as the graph holds them, which is the form its own data carried: a sample whose file\nspelled its ids as integers answers with numbers. Graphty.isPinned takes either\nspelling, so a consumer comparing against an id it has printed should ask that instead of\ntesting this set for membership.","return":{"type":{"text":""}},"readonly":true},{"kind":"method","name":"getNode","return":{"type":{"text":""}},"parameters":[{"name":"nodeId","type":{"text":"string | number"},"description":"The ID of the node to get"}],"description":"Get a node by its ID."},{"kind":"method","name":"getNodes","return":{"type":{"text":""}},"description":"Get all nodes in the graph."},{"kind":"method","name":"getNodeCount","return":{"type":{"text":""}},"description":"Get the number of nodes in the graph."},{"kind":"method","name":"getEdgeCount","return":{"type":{"text":""}},"description":"Get the number of edges in the graph."},{"kind":"method","name":"selectNode","return":{"type":{"text":""}},"parameters":[{"name":"nodeId","type":{"text":"string | number"},"description":"The ID of the node to select"}],"description":"Select a node by its ID, replacing whatever was selected before.\n\nSuperseded by Graphty.select, which takes the same five set operations over every\nway of naming elements. This is `select({ nodes: [nodeId] })` with a lookup in front of\nit, and it keeps working because it is what a click has always done."},{"kind":"method","name":"deselectNode","return":{"type":{"text":"void"}},"description":"Deselect the currently selected node.\n\nSuperseded by `session.selection.clear()`, which empties both sets. This clears the node\nhalf through the same model and keeps working."},{"kind":"method","name":"getSelectedNode","return":{"type":{"text":""}},"description":"Get the currently selected node.\n\nSuperseded by `session.selection.nodes`, which is the whole selection rather than the\nfirst node of it: this answers with one render object, and a selection now holds any\nnumber of nodes and edges."},{"kind":"method","name":"isNodeSelected","return":{"type":{"text":""}},"parameters":[{"name":"nodeId","type":{"text":"string | number"},"description":"The ID of the node to check"}],"description":"Check if a specific node is selected.\n\nAnswered from the selection masks, so it is true for EVERY selected node rather than only\nthe first one. Superseded by `session.selection.has`, which answers for an edge too."},{"kind":"method","name":"runAlgorithm","return":{"type":{"text":""}},"parameters":[{"name":"namespace","type":{"text":"string"},"description":"Algorithm namespace (e.g., \"graphty\")"},{"name":"type","type":{"text":"string"},"description":"Algorithm type (e.g., \"degree\", \"pagerank\")"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").RunAlgorithmOptions"},"description":"Algorithm options"}],"description":"Run a graph algorithm.","deprecated":"Since 2.0. Use `run()`, which returns a `Run`: the result is on the object the\ncall hands back, the work reports progress and can be cancelled, and\n`graphty-run-change` follows it from the DOM. This method still works and is expressed in\nterms of `run`. (An inline link cannot appear in this tag: the custom-elements-manifest\nbuild serialises a raw compiler node for one and fails on the cycle inside it.)"},{"kind":"method","name":"applySuggestedStyles","return":{"type":{"text":""}},"parameters":[{"name":"algorithmKey","type":{"text":"string | string[]"},"description":"A catalogue key such as \"degree\", a 1.10 address such as\n\"graphty:degree\", or an array of either."}],"description":"Paint what an algorithm's finished runs suggest be drawn from them.\n\nRarely needed: a run paints itself on its first completion, from the encoding its own\nresult shape derives. This is the verb for a run started with `{ style: false }`, or for\nputting a picture back after a reader cleared it. Applying twice replaces the layer bound\nto that run and channel rather than stacking a second one on it.\n\nIt starts the style edits and returns at once. To wait for the picture -- for a\nscreenshot, an export or a test -- await `waitForStableFrame()` after the call: it\nsettles only once every suggested layer is added, stacked in the order named and painted."},{"kind":"method","name":"getSuggestedStyles","return":{"type":{"text":""}},"parameters":[{"name":"algorithmKey","type":{"text":"string"},"description":"A catalogue key such as \"degree\", or a 1.10 address such as\n\"graphty:degree\"."}],"description":"What an algorithm's finished runs suggest be drawn from them, without painting any of it."},{"kind":"method","name":"setLayout","return":{"type":{"text":""}},"parameters":[{"name":"type","type":{"text":"string"},"description":"Layout id or engine name"},{"name":"opts","optional":true,"type":{"text":"object"},"description":"Layout-specific options"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").QueueableOptions"},"description":"Queue options"}],"description":"Set the layout algorithm.\n\nTakes a layout id from `catalog.layouts()` (such as `\"force\"`), which runs that layout's\ndefault engine, or a registered engine name (such as `\"ngraph\"`)."},{"kind":"method","name":"zoomToFit","return":{"type":{"text":"void"}},"description":"Zoom the camera to fit all nodes in view."},{"kind":"method","name":"waitForSettled","return":{"type":{"text":""}},"description":"Wait for every queued operation to finish.\n\nThe QUEUE only -- data loading, layout changes, algorithm runs. The layout may still be\nrunning and the camera may still be moving when this resolves. For a picture that will not\nchange again, wait for Graphty.waitForStableFrame."},{"kind":"method","name":"waitForStableFrame","return":{"type":{"text":""}},"parameters":[{"name":"options","optional":true,"type":{"text":"{ timeoutMs?: number }"},"description":"How the wait is bounded."},{"description":"How long to wait before giving up; 30 seconds by default.","name":"options.timeoutMs"}],"description":"Wait until the picture is final.\n\nResolves once every queued operation has run, the layout has converged, the camera has\nfinished framing what it arrived at, and a frame has been drawn showing that. This is what\na screenshot, a video frame or a visual regression snapshot needs: the `graph-settled`\nevent fires one update pass earlier, before the final framing has even been requested, so\na picture taken on that event is a picture of a camera still in motion.\n\nIt rejects, naming what was still moving, rather than handing back a moving picture."},{"kind":"field","name":"isFrameStable","type":{"text":"boolean"},"description":"Whether the picture on screen is the finished one.\n\nTrue only when the layout has converged, the camera has finished framing the graph, and a\nframe has been drawn in that state. The `graph-frame-stable` event announces the moment it\nbecomes true.","return":{"type":{"text":""}},"readonly":true},{"kind":"method","name":"batchOperations","return":{"type":{"text":""}},"parameters":[{"name":"fn","type":{"text":"() => Promise<void> | void"},"description":"Function containing batch operations"}],"description":"Execute multiple operations as a batch."},{"kind":"method","name":"on","return":{"type":{"text":"void"}},"parameters":[{"name":"type","type":{"text":"import(\"./events\").EventType"},"description":"Event type to listen for"},{"name":"callback","type":{"text":"import(\"./events\").EventCallbackType"},"description":"Callback function"}],"description":"Subscribe to graph events."},{"kind":"method","name":"addListener","return":{"type":{"text":"void"}},"parameters":[{"name":"type","type":{"text":"import(\"./events\").EventType"},"description":"Event type to listen for"},{"name":"callback","type":{"text":"import(\"./events\").EventCallbackType"},"description":"Callback function"}],"description":"Subscribe to graph events (alias for on)."},{"kind":"method","name":"listenerCount","return":{"type":{"text":""}},"description":"Get the total number of registered event listeners."},{"kind":"method","name":"is2D","return":{"type":{"text":""}},"description":"Check if the graph is in 2D mode."},{"kind":"method","name":"setXRConfig","return":{"type":{"text":"void"}},"parameters":[{"name":"config","type":{"text":"PartialXRConfig"},"description":"XR configuration"}],"description":"Set XR (VR/AR) configuration."},{"kind":"method","name":"getXRConfig","return":{"type":{"text":""}},"description":"Get the current XR configuration."},{"kind":"method","name":"exitXR","return":{"type":{"text":""}},"description":"Exit XR (VR/AR) mode."},{"kind":"method","name":"resolveCameraPreset","return":{"type":{"text":""}},"parameters":[{"name":"preset","type":{"text":"string"},"description":"The view's name, for example \"fitToGraph\" or \"topView\"."},{"name":"options","optional":true,"type":{"text":"{ nodes?: Iterable<string | number>; params?: Readonly<Record<string, unknown>> }"},"description":"What to frame and how to configure the view."},{"description":"The nodes to measure the box over. Absent frames the whole graph.","name":"options.nodes"},{"description":"The view's own options, filled in from its declared defaults.","name":"options.params"}],"description":"Work out where a named camera view would put the viewer, without moving anything.\n\nThe name may be one the element ships, one a third party registered with\n`registerCameraView`, or a snapshot saved with `saveCameraPreset`."},{"kind":"method","name":"applyCameraView","return":{"type":{"text":""}},"parameters":[{"name":"id","type":{"text":"string"},"description":"The view's name."},{"name":"options","optional":true,"type":{"text":"{\n scope?: Scope;\n params?: Readonly<Record<string, unknown>>;\n } & import(\"./screenshot/types.js\").CameraAnimationOptions"},"description":"The scope to frame, the view's own options, and how to get there."},{"description":"What to frame. Absent frames the whole graph.","name":"options.scope"},{"description":"The view's own options, filled in from its declared defaults.","name":"options.params"}],"description":"Put the viewer where a named camera view says they should stand.\n\nThe route that frames a SUBSET: the element measures the box over whatever the scope covers\nand hands the smaller box to the view, so a view frames a selection with no code of its own."},{"kind":"method","name":"setInputEnabled","return":{"type":{"text":"void"}},"parameters":[{"name":"enabled","type":{"text":"boolean"},"description":"Whether input should be enabled"}],"description":"Enable or disable user input."},{"kind":"method","name":"shutdown","return":{"type":{"text":"void"}},"description":"Shut down the graph and release resources."},{"kind":"method","name":"isRunning","return":{"type":{"text":""}},"description":"Check if the graph is running."},{"kind":"method","name":"setRunning","return":{"type":{"text":"void"}},"parameters":[{"name":"running","type":{"text":"boolean"},"description":"True to run the layout, false to pause it."}],"description":"Play or pause the layout.\n\n`setRunning(true)` on a layout that has already settled restarts it, so \"play\" is\nsomething the reader can see; `setRunning(false)` stops the per-frame stepping and nothing\nelse -- work already handed to an accelerator lands, the scene keeps rendering, and the\ncamera, picking and styling stay live. There is no event for this: `isRunning()` reports\nthe state and `graph-settled` reports the arrangement coming to rest.\n\nA pause holds until `setRunning(true)`. Loading more nodes, a freeze, an accelerator\nattaching, setting another layout and dragging a node all still happen -- new nodes are\nplaced and a dragged node moves -- but none of them resumes the layout. To tell a paused,\nhalf-finished arrangement from a converged one, read `getLayoutManager().isPaused` and\n`isSettled`."},{"kind":"method","name":"worldToScreen","return":{"type":{"text":""}},"parameters":[{"name":"worldPos","type":{"text":"{ x: number; y: number; z: number }"},"description":"Position in world space"},{"description":"X coordinate in world space","name":"worldPos.x"},{"description":"Y coordinate in world space","name":"worldPos.y"},{"description":"Z coordinate in world space","name":"worldPos.z"}],"description":"Convert world coordinates to screen coordinates."},{"kind":"method","name":"screenToWorld","return":{"type":{"text":""}},"parameters":[{"name":"screenPos","type":{"text":"{ x: number; y: number }"},"description":"Position in screen space"},{"description":"X pixel coordinate","name":"screenPos.x"},{"description":"Y pixel coordinate","name":"screenPos.y"}],"description":"Convert screen coordinates to world coordinates."},{"kind":"method","name":"setData","return":{"type":{"text":"void"}},"parameters":[{"name":"data","type":{"text":"{ nodes: Record<string, unknown>[]; edges: Record<string, unknown>[] }"},"description":"Object containing nodes and edges arrays"},{"description":"Array of node data objects","name":"data.nodes"},{"description":"Array of edge data objects","name":"data.edges"}],"description":"Set graph data (both nodes and edges) at once."},{"kind":"method","name":"getStyles","return":{"type":{"text":""}},"description":"Get the Styles object for direct style access."},{"kind":"method","name":"getDataManager","return":{"type":{"text":""}},"description":"Get the DataManager for advanced data operations."},{"kind":"method","name":"getLayoutManager","return":{"type":{"text":""}},"description":"Get the LayoutManager for advanced layout operations."},{"kind":"method","name":"getUpdateManager","return":{"type":{"text":""}},"description":"Get the UpdateManager for update scheduling."},{"kind":"method","name":"getStatsManager","return":{"type":{"text":""}},"description":"Get the StatsManager for performance statistics."},{"kind":"method","name":"getSelectionManager","return":{"type":{"text":""}},"description":"Get the SelectionManager for selection operations."},{"kind":"method","name":"getEventManager","return":{"type":{"text":""}},"description":"Get the EventManager for event operations."},{"kind":"method","name":"getScene","return":{"type":{"text":""}},"description":"Get the Babylon.js Scene for advanced rendering operations."},{"kind":"method","name":"getMeshCache","return":{"type":{"text":""}},"description":"Get the MeshCache for mesh management."},{"kind":"method","name":"setCameraMode","return":{"type":{"text":""}},"parameters":[{"name":"mode","type":{"text":"import(\"./cameras/CameraManager\").CameraKey"},"description":"Camera mode key"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").QueueableOptions"},"description":"Queue options"}],"description":"Activate the camera of the current view mode: `\"orbit\"` in 3D, `\"2d\"` in 2D."},{"kind":"method","name":"getCameraController","return":{"type":{"text":""}},"description":"Get the current camera controller."},{"kind":"method","name":"setRenderSettings","return":{"type":{"text":""}},"parameters":[{"name":"settings","type":{"text":"Record<string, unknown>"},"description":"Render settings object"},{"name":"options","optional":true,"type":{"text":"import(\"./utils/queue-migration\").QueueableOptions"},"description":"Queue options"}],"description":"Set render settings for advanced rendering control."},{"kind":"method","name":"getNodeMesh","return":{"type":{"text":""}},"parameters":[{"name":"nodeId","type":{"text":"string"},"description":"The ID of the node"}],"description":"Get a node's mesh by its ID."},{"kind":"method","name":"getXRSessionManager","return":{"type":{"text":""}},"description":"Get the XR session manager."},{"kind":"method","name":"enableAiControl","return":{"type":{"text":""}},"parameters":[{"name":"config","type":{"text":"import(\"./ai/AiManager\").AiManagerConfig"},"description":"AI manager configuration"}],"description":"Enable AI control for the graph."},{"kind":"method","name":"disableAiControl","return":{"type":{"text":"void"}},"description":"Disable AI control for the graph."},{"kind":"method","name":"aiCommand","return":{"type":{"text":""}},"parameters":[{"name":"message","type":{"text":"string"},"description":"The command message"}],"description":"Send a command to the AI assistant."},{"kind":"method","name":"getAiStatus","return":{"type":{"text":""}},"description":"Get the current AI status."},{"kind":"method","name":"onAiStatusChange","return":{"type":{"text":""}},"parameters":[{"name":"callback","type":{"text":"import(\"./ai/AiStatus\").StatusChangeCallback"},"description":"Callback function for status changes"}],"description":"Subscribe to AI status changes."},{"kind":"method","name":"cancelAiCommand","return":{"type":{"text":"void"}},"description":"Cancel the current AI command."},{"kind":"method","name":"getAiManager","return":{"type":{"text":""}},"description":"Get the AI manager."},{"kind":"method","name":"isAiEnabled","return":{"type":{"text":""}},"description":"Check if AI control is enabled."},{"kind":"method","name":"retryLastAiCommand","return":{"type":{"text":""}},"description":"Retry the last AI command that failed."},{"kind":"method","name":"getApiKeyManager","return":{"type":{"text":""}},"description":"Get the API key manager."},{"kind":"method","name":"createApiKeyManager","static":true,"return":{"type":{"text":""}},"description":"Create an API key manager for persistent key storage.\nThis is a static method - the manager is not tied to any specific graph instance."},{"kind":"method","name":"getVoiceAdapter","return":{"type":{"text":""}},"description":"Get the voice input adapter."},{"kind":"method","name":"startVoiceInput","return":{"type":{"text":""}},"parameters":[{"name":"options","optional":true,"type":{"text":"{\n continuous?: boolean;\n interimResults?: boolean;\n language?: string;\n onTranscript?: (text: string, isFinal: boolean) => void;\n onStart?: (started: boolean, error?: string) => void;\n }"},"description":"Voice input options"},{"description":"Whether to continue listening after results","name":"options.continuous"},{"description":"Whether to report interim (non-final) results","name":"options.interimResults"},{"description":"Language code (e.g., \"en-US\")","name":"options.language"},{"description":"Callback for transcript results","name":"options.onTranscript"},{"description":"Callback when voice input starts","name":"options.onStart"}],"description":"Start voice input for AI commands."},{"kind":"method","name":"stopVoiceInput","return":{"type":{"text":"void"}},"description":"Stop voice input."},{"kind":"method","name":"isVoiceActive","return":{"type":{"text":""}},"description":"Check if voice input is active."},{"kind":"field","name":"acceleration","type":{"text":"AccelerationPolicy"},"description":"Sets the acceleration policy and applies it immediately.\n\nAn unrecognised value is reported and then ignored, leaving the previous policy in\nforce. It is not thrown. Lit drives this setter from `attributeChangedCallback`, so a\nthrow here would abort attribute processing and leave the element unrendered -- a typo\nin markup would take the whole graph down. HTML has never behaved that way about an\nattribute value, and an embedded component must not be the first thing that does.\n\nThe report is deliberately loud, because the quiet failure is the dangerous one: a page\nthat meant `required` and wrote `requried` would otherwise run on the CPU and look\nhealthy.","return":{"type":{"text":""}},"attribute":"acceleration","reflects":true},{"kind":"field","name":"accelerationMinNodes","type":{"text":"number"},"description":"Sets the threshold and applies it immediately.\n\nA value that is not a whole number of 0 or more is reported and then ignored, leaving the\nprevious threshold in force, for the reason the `acceleration` setter states: Lit drives\nthis from `attributeChangedCallback`, and a throw there would leave the element unrendered.","return":{"type":{"text":""}},"parameters":[{"description":"The node count at or above which accelerated work uses the accelerator.","name":"value"}],"attribute":"acceleration-min-nodes","reflects":true}],"events":[{"name":"ai-command-cancelled","type":{"text":"CustomEvent<AiCommandCancelledEvent>"},"description":"Emitted when an AI command is cancelled"},{"name":"ai-command-complete","type":{"text":"CustomEvent<AiCommandCompleteEvent>"},"description":"Emitted when an AI command completes successfully"},{"name":"ai-command-error","type":{"text":"CustomEvent<AiCommandErrorEvent>"},"description":"Emitted when an AI command encounters an error"},{"name":"ai-command-start","type":{"text":"CustomEvent<AiCommandStartEvent>"},"description":"Emitted when an AI command starts processing"},{"name":"ai-status-change","type":{"text":"CustomEvent<AiStatusChangeEvent>"},"description":"Main event for UI binding - single source of truth for AI status"},{"name":"ai-stream-chunk","type":{"text":"CustomEvent<AiStreamChunkEvent>"},"description":"Emitted during streaming when text chunks arrive (throttled)"},{"name":"ai-stream-tool-call","type":{"text":"CustomEvent<AiStreamToolCallEvent>"},"description":"Emitted when the LLM makes a tool call"},{"name":"ai-stream-tool-result","type":{"text":"CustomEvent<AiStreamToolResultEvent>"},"description":"Emitted when a tool call completes"},{"name":"ai-voice-end","type":{"text":"CustomEvent<AiVoiceEndEvent>"},"description":"Emitted when voice input ends"},{"name":"ai-voice-start","type":{"text":"CustomEvent<AiVoiceStartEvent>"},"description":"Emitted when voice input starts"},{"name":"ai-voice-transcript","type":{"text":"CustomEvent<AiVoiceTranscriptEvent>"},"description":"Emitted when voice transcript is available"},{"name":"animation-cancelled","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"animation-progress","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"camera-state-changed","type":{"text":"CustomEvent<CameraStateChangedEvent>"}},{"name":"data-added","type":{"text":"CustomEvent<GraphDataAddedEvent>"}},{"name":"data-loaded","type":{"text":"CustomEvent<GraphDataLoadedEvent>"}},{"name":"data-loading-complete","type":{"text":"CustomEvent<DataLoadingCompleteEvent>"}},{"name":"data-loading-error","type":{"text":"CustomEvent<DataLoadingErrorEvent>"}},{"name":"data-loading-error-summary","type":{"text":"CustomEvent<DataLoadingErrorSummaryEvent>"}},{"name":"data-loading-progress","type":{"text":"CustomEvent<DataLoadingProgressEvent>"}},{"name":"edge-add-before","type":{"text":"CustomEvent<EdgeAddEvent>"}},{"name":"edge-update-after","type":{"text":"CustomEvent<EdgeGenericEvent>"}},{"name":"edge-update-before","type":{"text":"CustomEvent<EdgeGenericEvent>"}},{"name":"elements-removed","type":{"text":"CustomEvent<ElementsRemovedEvent>"},"description":"Emitted once per `removeNodes` call, naming everything that went."},{"name":"error","type":{"text":"CustomEvent<GraphErrorEvent>"}},{"name":"graph-frame-stable","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"graph-settled","type":{"text":"CustomEvent<GraphSettledEvent>"}},{"name":"graphty-capabilities-change","type":{"text":"CustomEvent"}},{"name":"graphty-run-change","type":{"text":"CustomEvent"}},{"name":"graphty-selection-change","type":{"text":"CustomEvent"}},{"name":"graphty-visibility-change","type":{"text":"CustomEvent"}},{"name":"layout-initialized","type":{"text":"CustomEvent<GraphLayoutInitializedEvent>"}},{"name":"lifecycle-disposed","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"lifecycle-initialized","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"manager-initialized","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"name","type":{"text":"CustomEvent"}},{"name":"node-add-before","type":{"text":"CustomEvent<NodeAddEvent>"}},{"name":"node-click","type":{"text":"CustomEvent<NodeClickEvent>"},"description":"Emitted when a node is clicked."},{"name":"node-drag-end","type":{"text":"CustomEvent<NodeDragEndEvent>"},"description":"Emitted when a node drag operation ends."},{"name":"node-drag-start","type":{"text":"CustomEvent<NodeDragStartEvent>"},"description":"Emitted when a node drag operation starts."},{"name":"node-hover","type":{"text":"CustomEvent<NodeHoverEvent>"},"description":"Emitted when the pointer enters a node (hover start)."},{"name":"node-update-after","type":{"text":"CustomEvent<NodeGenericEvent>"}},{"name":"node-update-before","type":{"text":"CustomEvent<NodeGenericEvent>"}},{"name":"operation-batch-complete","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"operation-complete","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"operation-obsoleted","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"operation-progress","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"operation-queue-active","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"operation-queue-idle","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"operation-start","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"render-initialized","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"screenshot-enhancing","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"screenshot-ready","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"selection-changed","type":{"text":"CustomEvent<SelectionChangedEvent>"}},{"name":"skybox-loaded","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"snapshot-dropped","type":{"text":"CustomEvent<GraphSnapshotDroppedEvent>"},"description":"Emitted by DataManager when the dataset is cleared: the store and every snapshot it froze are"},{"name":"snapshot-replaced","type":{"text":"CustomEvent<GraphSnapshotReplacedEvent>"}},{"name":"style-changed","type":{"text":"CustomEvent<GraphGenericEvent>"}},{"name":"zoom-to-fit-complete","type":{"text":"CustomEvent<GraphGenericEvent>"}}],"attributes":[{"name":"node-data","type":{"text":"Record<string, unknown>[] | undefined"},"description":"Sets the node data array. Replaces the graph's nodes with these.","return":{"type":{"text":""}},"fieldName":"nodeData"},{"name":"edge-data","type":{"text":"Record<string, unknown>[] | undefined"},"description":"Sets the edge data array. Triggers addition of edges to the graph.","return":{"type":{"text":""}},"fieldName":"edgeData"},{"name":"data-source","type":{"text":"string | undefined"},"description":"Sets the data source type. Starts a load when combined with dataSourceConfig; see\n`dataSourceConfig` for what a second assignment does.","return":{"type":{"text":""}},"fieldName":"dataSource"},{"name":"data-source-config","type":{"text":"Record<string, unknown> | undefined"},"description":"Sets the data source configuration. Starts a load when combined with dataSource.\n\nEvery assignment of the pair starts a load, and assigning both halves in one task starts\none. Assigning the pair already loaded -- the same type and the same config object --\nstarts none, unless that load failed; pass a new object to load again. The first load adds\nto the graph; each later one REPLACES it, but only once the new source has parsed -- a\nmalformed or empty source leaves the graph as it was and reports `data-loading-error`.\nThe pair assigned LAST wins: a slower earlier load that finishes afterwards is dropped.\nEvery event about the load carries its `loadId`. A caller that wants to await the load\ncalls `loadFromUrl`, `loadFromFile` or `addDataFromSource` instead.","return":{"type":{"text":""}},"fieldName":"dataSourceConfig"},{"name":"node-id-path","type":{"text":"string | undefined"},"description":"Sets the JMESPath for node ID extraction. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"nodeIdPath"},{"name":"edge-src-id-path","type":{"text":"string | undefined"},"description":"Sets the JMESPath for edge source ID extraction. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"edgeSrcIdPath"},{"name":"edge-dst-id-path","type":{"text":"string | undefined"},"description":"Sets the JMESPath for edge destination ID extraction. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"edgeDstIdPath"},{"name":"edge-id-path","type":{"text":"string | undefined"},"description":"Sets the JMESPath for edge identity. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"edgeIdPath"},{"name":"repeated-edges","type":{"text":"DuplicatePolicy | undefined"},"description":"Sets the repeat policy. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"repeatedEdges"},{"name":"node-label-path","type":{"text":"string | undefined"},"description":"Sets the JMESPath for a node's display name. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"nodeLabelPath"},{"name":"edge-weight-path","type":{"text":"string | undefined"},"description":"Sets the JMESPath for an edge's weight. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"edgeWeightPath"},{"name":"position-scale","type":{"text":"number | undefined"},"description":"Sets the record-units-to-scene-units multiplier. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"positionScale"},{"name":"directed","type":{"text":"boolean | \"auto\" | undefined"},"description":"Sets whether the graph is read as directed. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"directed"},{"name":"layout","type":{"text":"string | undefined"},"description":"Sets the layout algorithm. Triggers layout recalculation with merged config.","return":{"type":{"text":""}},"fieldName":"layout"},{"name":"layout-config","type":{"text":"Record<string, unknown> | undefined"},"description":"Sets layout-specific configuration. Updates active layout if one is set.","return":{"type":{"text":""}},"fieldName":"layoutConfig"},{"name":"view-mode","type":{"text":"ViewMode | undefined"},"description":"Sets the view mode. Switches camera and rendering mode accordingly.","return":{"type":{"text":""}},"fieldName":"viewMode"},{"name":"layout-2d","type":{"text":"boolean | undefined"},"description":"Sets 2D mode (deprecated). Converts boolean to viewMode internally.","deprecated":"Use viewMode instead. layout2d: true is equivalent to viewMode: \"2d\"\nSpecifies that the layout should be rendered in two dimensions (as\nopposed to 3D)","return":{"type":{"text":""}},"fieldName":"layout2d"},{"name":"background","type":{"text":"GraphBackgroundConfig | undefined"},"description":"Sets the graph background. Applies it to the scene immediately.\n\nA value the schema refuses is REPORTED AND DROPPED rather than thrown, on the same terms\nas `acceleration`: this setter is reached from `attributeChangedCallback`, and a throw\nthere escapes as an unhandled rejection that reaches nobody, leaving the page with an\nelement that never rendered. A wrong colour in markup must not take the graph down.","return":{"type":{"text":""}},"fieldName":"background"},{"name":"starting-camera-distance","type":{"text":"number | undefined"},"description":"Sets the starting camera distance.","return":{"type":{"text":""}},"fieldName":"startingCameraDistance"},{"name":"run-algorithms-on-load","type":{"text":"boolean | undefined"},"description":"Sets whether to run algorithms when a style template loads. Updates graph configuration.","return":{"type":{"text":""}},"fieldName":"runAlgorithmsOnLoad"},{"name":"enable-detailed-profiling","type":{"text":"boolean | undefined"},"description":"Sets detailed profiling mode. Enables hierarchical timing and advanced stats collection.","return":{"type":{"text":""}},"fieldName":"enableDetailedProfiling"},{"name":"acceleration","type":{"text":"AccelerationPolicy"},"description":"Sets the acceleration policy and applies it immediately.\n\nAn unrecognised value is reported and then ignored, leaving the previous policy in\nforce. It is not thrown. Lit drives this setter from `attributeChangedCallback`, so a\nthrow here would abort attribute processing and leave the element unrendered -- a typo\nin markup would take the whole graph down. HTML has never behaved that way about an\nattribute value, and an embedded component must not be the first thing that does.\n\nThe report is deliberately loud, because the quiet failure is the dangerous one: a page\nthat meant `required` and wrote `requried` would otherwise run on the CPU and look\nhealthy.","return":{"type":{"text":""}},"fieldName":"acceleration"},{"name":"acceleration-min-nodes","type":{"text":"number"},"description":"Sets the threshold and applies it immediately.\n\nA value that is not a whole number of 0 or more is reported and then ignored, leaving the\nprevious threshold in force, for the reason the `acceleration` setter states: Lit drives\nthis from `attributeChangedCallback`, and a throw there would leave the element unrendered.","return":{"type":{"text":""}},"parameters":[{"description":"The node count at or above which accelerated work uses the accelerator.","name":"value"}],"fieldName":"accelerationMinNodes"}],"superclass":{"name":"LitElement","package":"lit"},"tagName":"graphty-element","customElement":true},{"kind":"variable","name":"type"},{"kind":"variable","name":"config"}],"exports":[{"kind":"js","name":"Graphty","declaration":{"name":"Graphty","module":"src/graphty-element.ts"}},{"kind":"custom-element-definition","name":"graphty-element","declaration":{"name":"Graphty","module":"src/graphty-element.ts"}}]}]}
|
package/dist/extend.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as s, r as a, a as t, b as o } from "./chunks/GraphtyLogger-
|
|
2
|
-
import { A as c, D as g, a as d, L as l, O as p, P as m, c as n, b as S, d as E, e as O, f as F, g as A, h as D, m as _, i as L, n as T, o as R, r as N, j as f, k as C, l as h, s as I, v as P } from "./chunks/optionsFromZod-
|
|
3
|
-
import { K as u, a as x, b as K, c as k, d as G, O as v, i as W } from "./chunks/types-
|
|
4
|
-
import { L as M, S as U, a as V, c as Y, b as j, d as w, r as H, e as Z, f as q, g as z } from "./chunks/paletteRegistry-
|
|
5
|
-
import { d as J, a as Q } from "./chunks/detect-
|
|
6
|
-
import { D as $, E as ee } from "./chunks/DataSource-
|
|
7
|
-
import { A as se, a as ae, r as te } from "./chunks/registry-
|
|
8
|
-
import { G as ie, i as ce } from "./chunks/
|
|
1
|
+
import { c as s, r as a, a as t, b as o } from "./chunks/GraphtyLogger-kbOx2zq3.js";
|
|
2
|
+
import { A as c, D as g, a as d, L as l, O as p, P as m, c as n, b as S, d as E, e as O, f as F, g as A, h as D, m as _, i as L, n as T, o as R, r as N, j as f, k as C, l as h, s as I, v as P } from "./chunks/optionsFromZod-DHLLiX_8.js";
|
|
3
|
+
import { K as u, a as x, b as K, c as k, d as G, O as v, i as W } from "./chunks/types-C_c53VgR.js";
|
|
4
|
+
import { L as M, S as U, a as V, c as Y, b as j, d as w, r as H, e as Z, f as q, g as z } from "./chunks/paletteRegistry-jg9uS7wo.js";
|
|
5
|
+
import { d as J, a as Q } from "./chunks/detect-tuYQLJbT.js";
|
|
6
|
+
import { D as $, E as ee } from "./chunks/DataSource-xL3Yn0Pa.js";
|
|
7
|
+
import { A as se, a as ae, r as te } from "./chunks/registry-DQeq4B2K.js";
|
|
8
|
+
import { G as ie, i as ce } from "./chunks/pluginRegistry-MaTIDh6l.js";
|
|
9
9
|
export {
|
|
10
10
|
se as AcceleratorRegistry,
|
|
11
11
|
c as Algorithm,
|