@graphty/graphty-element 2.6.2 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.js +3 -3
- package/dist/catalog.js +53 -54
- package/dist/chunks/{AiManager-4iQpsJW1.js → AiManager-Bhh0rR_p.js} +706 -655
- package/dist/chunks/GraphSession-DPoTaT3b.js +21175 -0
- package/dist/chunks/{GraphtyLogger-B_O67a6c.js → GraphtyLogger-BtcBJQPL.js} +1 -1
- package/dist/chunks/{VoiceInputAdapter-Cc6mHXTI.js → VoiceInputAdapter-CdLsJ_nG.js} +1 -1
- package/dist/chunks/{XRPivotCameraController-BLa89LXn.js → XRPivotCameraController-CiLJ9Gz6.js} +2 -2
- package/dist/chunks/algorithms-qij74zEN.js +6811 -0
- package/dist/chunks/{capability-check-Am2zliFj.js → capability-check-BbgTejS3.js} +1 -1
- package/dist/chunks/definePalette-BYt2Llxs.js +1333 -0
- package/dist/chunks/fields-5uVC1Pll.js +4999 -0
- package/dist/chunks/{format-detection-BHwrAVzW.js → format-detection-FKaDMshR.js} +1 -1
- package/dist/chunks/{index-BkBLbvui.js → index-Cc_6D9hV.js} +6034 -7127
- package/dist/chunks/interpolation-Dk206AhZ.js +105 -0
- package/dist/chunks/paletteRegistry-De3CGdst.js +357 -0
- package/dist/chunks/parse-SVp77JbE.js +669 -0
- package/dist/chunks/{pluginRegistry-Bs8bEkz9.js → pluginRegistry-Ddfl6Mv2.js} +27 -24
- package/dist/chunks/{registry-BdGvyZou.js → registry-CgMqldp4.js} +1 -1
- package/dist/chunks/{DataSource-BL2UzPff.js → sources-BbAJCDIH.js} +279 -108
- package/dist/commands.d.ts +128 -19
- package/dist/commands.js +49 -1
- package/dist/custom-elements.json +1 -1
- package/dist/extend.d.ts +10 -2
- package/dist/extend.js +64 -57
- package/dist/graphty-catalog.json +6 -3
- package/dist/graphty.bundle.js +267177 -240648
- package/dist/graphty.js +84 -78
- package/dist/index.d.ts +4 -0
- package/dist/logging.js +2 -2
- package/dist/schema.js +70 -71
- package/dist/session.d.ts +5 -6
- package/dist/session.js +40 -86
- package/dist/src/Edge.d.ts +31 -67
- package/dist/src/Graph.d.ts +335 -77
- package/dist/src/Node.d.ts +36 -3
- package/dist/src/NodeBehavior.d.ts +28 -0
- package/dist/src/Styles.d.ts +15 -4
- package/dist/src/acceleration/AccelerationController.d.ts +8 -0
- package/dist/src/acceleration/narrow.d.ts +9 -1
- package/dist/src/acceleration/types.d.ts +10 -0
- package/dist/src/ai/AiController.d.ts +12 -0
- package/dist/src/ai/AiManager.d.ts +7 -0
- package/dist/src/ai/commands/AlgorithmCommands.d.ts +1 -1
- package/dist/src/ai/commands/LayoutCommands.d.ts +1 -1
- package/dist/src/ai/commands/StyleCommands.d.ts +1 -1
- package/dist/src/ai/commands/types.d.ts +20 -1
- package/dist/src/algorithms/Algorithm.d.ts +21 -4
- package/dist/src/algorithms/BFSAlgorithm.d.ts +0 -9
- package/dist/src/algorithms/BellmanFordAlgorithm.d.ts +0 -14
- package/dist/src/algorithms/DFSAlgorithm.d.ts +1 -1
- package/dist/src/algorithms/FloydWarshallAlgorithm.d.ts +5 -0
- package/dist/src/algorithms/GirvanNewmanAlgorithm.d.ts +5 -0
- package/dist/src/algorithms/LeidenAlgorithm.d.ts +5 -0
- package/dist/src/algorithms/PageRankAlgorithm.d.ts +1 -1
- package/dist/src/algorithms/StronglyConnectedComponentsAlgorithm.d.ts +1 -1
- package/dist/src/algorithms/metrics/fields.d.ts +23 -1
- package/dist/src/algorithms/utils/graphUtils.d.ts +13 -1
- package/dist/src/catalog/paletteRegistry.d.ts +4 -4
- package/dist/src/catalog/registry.d.ts +3 -2
- package/dist/src/catalog/types.d.ts +18 -1
- package/dist/src/config/GraphStyle.d.ts +1 -1
- package/dist/src/config/StyleTemplate.d.ts +2 -2
- package/dist/src/config/xr-config-schema.d.ts +4 -4
- package/dist/src/data/CSVDataSource.d.ts +77 -22
- package/dist/src/data/ErrorAggregator.d.ts +5 -0
- package/dist/src/data/GEXFDataSource.d.ts +12 -61
- package/dist/src/data/GraphMLDataSource.d.ts +3 -44
- package/dist/src/data/GraphStore.d.ts +322 -15
- package/dist/src/data/JsonDataSource.d.ts +43 -1
- package/dist/src/data/graph-io-import.d.ts +89 -0
- package/dist/src/data/graph-io-records.d.ts +64 -0
- package/dist/src/data/lane.d.ts +23 -0
- package/dist/src/data/positions.d.ts +13 -0
- package/dist/src/data/seedPosition.d.ts +16 -0
- package/dist/src/errors/GraphtyError.d.ts +3 -1
- package/dist/src/errors/codes.d.ts +23 -0
- package/dist/src/events.d.ts +12 -0
- package/dist/src/graphty-element.d.ts +149 -54
- package/dist/src/input/types.d.ts +2 -0
- package/dist/src/layout/D3GraphLayoutEngine.d.ts +17 -3
- package/dist/src/layout/FixedLayoutEngine.d.ts +20 -4
- package/dist/src/layout/KamadaKawaiLayoutEngine.d.ts +6 -0
- package/dist/src/layout/LayoutEngine.d.ts +214 -116
- package/dist/src/layout/NGraphLayoutEngine.d.ts +10 -3
- package/dist/src/layout/SimulationLayoutEngine.d.ts +8 -3
- package/dist/src/managers/AlgorithmManager.d.ts +24 -5
- package/dist/src/managers/DataManager.d.ts +258 -181
- package/dist/src/managers/EventManager.d.ts +5 -2
- package/dist/src/managers/GraphContext.d.ts +7 -0
- package/dist/src/managers/InputManager.d.ts +11 -0
- package/dist/src/managers/LayoutManager.d.ts +129 -50
- package/dist/src/managers/RenderManager.d.ts +14 -1
- package/dist/src/managers/UpdateManager.d.ts +20 -0
- package/dist/src/screenshot/ScreenshotCapture.d.ts +1 -1
- package/dist/src/session/GraphSession.d.ts +83 -6
- package/dist/src/session/commands/algo.d.ts +169 -0
- package/dist/src/session/commands/config.d.ts +45 -0
- package/dist/src/session/commands/data.d.ts +178 -0
- package/dist/src/session/commands/doors.d.ts +93 -0
- package/dist/src/session/commands/index.d.ts +20 -0
- package/dist/src/session/commands/layout.d.ts +104 -0
- package/dist/src/session/commands/positions.d.ts +30 -0
- package/dist/src/session/commands/sets.d.ts +113 -0
- package/dist/src/session/commands/style.d.ts +92 -0
- package/dist/src/session/commands/view.d.ts +57 -0
- package/dist/src/session/commands/visibility.d.ts +41 -0
- package/dist/src/session/data.d.ts +131 -4
- package/dist/src/session/index.d.ts +1 -1
- package/dist/src/session/planning.d.ts +25 -8
- package/dist/src/session/project/Dispatcher.d.ts +905 -0
- package/dist/src/session/project/History.d.ts +382 -0
- package/dist/src/session/project/arrangement.d.ts +247 -0
- package/dist/src/session/project/derive.d.ts +132 -0
- package/dist/src/session/project/digest.d.ts +33 -0
- package/dist/src/session/project/draft.d.ts +194 -0
- package/dist/src/session/project/graphOps.d.ts +304 -0
- package/dist/src/session/project/ingest.d.ts +364 -0
- package/dist/src/session/project/state.d.ts +145 -0
- package/dist/src/session/project/strict.d.ts +68 -0
- package/dist/src/session/results/RunResult.d.ts +48 -0
- package/dist/src/session/results/statistics.d.ts +20 -0
- package/dist/src/session/runs/Run.d.ts +80 -4
- package/dist/src/session/runs/RunsApi.d.ts +23 -6
- package/dist/src/session/runs/types.d.ts +25 -6
- package/dist/src/session/scope/ElementMask.d.ts +14 -0
- package/dist/src/session/scope/ScopeApi.d.ts +3 -22
- package/dist/src/session/scope/spaces.d.ts +29 -0
- package/dist/src/session/sealed.d.ts +22 -0
- package/dist/src/session/selection/SelectionApi.d.ts +14 -4
- package/dist/src/session/sets/SetsApi.d.ts +13 -5
- package/dist/src/session/sets/store.d.ts +54 -53
- package/dist/src/session/sets/types.d.ts +5 -2
- package/dist/src/session/styles/Layer.d.ts +5 -0
- package/dist/src/session/styles/StylesApi.d.ts +68 -17
- package/dist/src/session/styles/autoApply.d.ts +64 -53
- package/dist/src/session/styles/index.d.ts +3 -3
- package/dist/src/session/styles/predicate.d.ts +7 -0
- package/dist/src/session/styles/repaint.d.ts +16 -1
- package/dist/src/session/styles/sources.d.ts +1 -1
- package/dist/src/session/types.d.ts +625 -54
- package/dist/src/session/visibility/VisibilityApi.d.ts +38 -18
- package/dist/src/session/visibility/filter.d.ts +10 -0
- package/dist/src/simple/defineAlgorithm.d.ts +28 -0
- package/dist/src/simple/defineLayout.d.ts +35 -0
- package/dist/src/simple/defineLogDestination.d.ts +31 -0
- package/dist/src/simple/definePalette.d.ts +26 -0
- package/dist/src/simple/definition.d.ts +106 -0
- package/dist/src/simple/options.d.ts +33 -0
- package/dist/src/simple/source.d.ts +49 -0
- package/dist/src/simple/types.d.ts +366 -0
- package/dist/src/simple/view.d.ts +107 -0
- package/dist/webgpu.js +2 -2
- package/package.json +10 -12
- package/dist/chunks/GraphSession-BhuHSXIo.js +0 -12819
- package/dist/chunks/GraphStyle-Cwr55SAE.js +0 -65
- package/dist/chunks/algorithms-BJ6DQMOe.js +0 -3777
- package/dist/chunks/detect-fyuVnlCT.js +0 -88
- package/dist/chunks/interpolation-DY-PNpqX.js +0 -43
- package/dist/chunks/optionsFromZod-CKMYSwTz.js +0 -3636
- package/dist/chunks/paletteRegistry-BCFSwJGK.js +0 -1196
- package/dist/chunks/parse-BMTqt4SS.js +0 -3658
- package/dist/src/data/csv-variant-detection.d.ts +0 -29
- package/dist/src/data/ingest.d.ts +0 -104
package/dist/graphty.js
CHANGED
|
@@ -1,85 +1,91 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import {
|
|
3
|
-
import { D as
|
|
4
|
-
import
|
|
5
|
-
import { r as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { a as
|
|
10
|
-
import { c as
|
|
1
|
+
import { A as r, a as E, b as o, D as O, E as t, d as S, G as R, e as L, I as _, L as C, N as i, O as A, R as n, S as N, f as g, g as I, h as T, U as d, i as f } from "./chunks/index-Cc_6D9hV.js";
|
|
2
|
+
import { ae as p, af as G, y as m, z as y, A as D, X as P, b as c, S as h, c as M, F as U, r as u } from "./chunks/fields-5uVC1Pll.js";
|
|
3
|
+
import { D as B, E as V } from "./chunks/sources-BbAJCDIH.js";
|
|
4
|
+
import "./chunks/GraphSession-DPoTaT3b.js";
|
|
5
|
+
import { r as H } from "./chunks/GraphtyLogger-BtcBJQPL.js";
|
|
6
|
+
import { r as Y } from "./chunks/paletteRegistry-De3CGdst.js";
|
|
7
|
+
import { d as k, a as w, b as K, e as X } from "./chunks/definePalette-BYt2Llxs.js";
|
|
8
|
+
import { g as z, b as Q, N as j, c as q, P as J, R as Z, S as $, d as aa, e as ea, f as sa } from "./chunks/NodeStyle-CtmA7dXi.js";
|
|
9
|
+
import { A as Ea, a as oa, G as Oa, i as ta, b as Sa } from "./chunks/pluginRegistry-Ddfl6Mv2.js";
|
|
10
|
+
import { B as La, a as _a, b as Ca, C as ia, G as Aa, c as na, I as Na, O as ga, d as Ia, e as Ta, f as da, P as fa, g as la, h as pa, R as Ga, T as ma, i as ya, V as Da, Y as Pa } from "./chunks/sequential-Zym81qm7.js";
|
|
11
|
+
import { a as ha, G as Ma, V as Ua, c as ua } from "./chunks/interpolation-Dk206AhZ.js";
|
|
12
|
+
import { c as Ba } from "./chunks/common-DWNKjpH_.js";
|
|
11
13
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
Ea as ACCELERATION_ERROR_CODES,
|
|
15
|
+
p as ACCELERATION_MIN_NODES_DEFAULT,
|
|
16
|
+
G as ACCELERATION_MIN_NODES_KEY,
|
|
17
|
+
m as ACCELERATION_POLICIES,
|
|
18
|
+
y as ACCELERATION_POLICY_DEFAULT,
|
|
19
|
+
D as Algorithm,
|
|
20
|
+
r as AlgorithmManager,
|
|
21
|
+
E as AnimationCancelledError,
|
|
22
|
+
La as BLUES_COLORS,
|
|
23
|
+
_a as BLUE_HIGHLIGHT,
|
|
24
|
+
Ca as BLUE_ORANGE_COLORS,
|
|
25
|
+
o as BUILTIN_PRESETS,
|
|
26
|
+
ia as CARBON_COLORS,
|
|
27
|
+
P as CPU_PRECISION,
|
|
28
|
+
ha as DEFAULT_VIEW_MODE,
|
|
27
29
|
O as DataManager,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
B as DataSource,
|
|
31
|
+
z as EDGE_CONSTANTS,
|
|
32
|
+
t as Edge,
|
|
33
|
+
Q as EdgeStyle,
|
|
34
|
+
V as ErrorAggregator,
|
|
33
35
|
S as EventManager,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
oa as GRAPHTY_ERROR_CODES,
|
|
37
|
+
Aa as GREENS_COLORS,
|
|
38
|
+
na as GREEN_SUCCESS,
|
|
37
39
|
R as Graph,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
Ma as GraphBackground,
|
|
41
|
+
L as Graphty,
|
|
42
|
+
Oa as GraphtyError,
|
|
43
|
+
Na as INFERNO_COLORS,
|
|
44
|
+
_ as InputManager,
|
|
45
|
+
c as LayoutEngine,
|
|
46
|
+
C as LayoutManager,
|
|
47
|
+
i as Node,
|
|
48
|
+
j as NodeShapes,
|
|
49
|
+
q as NodeStyle,
|
|
50
|
+
ga as OKABE_ITO_COLORS,
|
|
51
|
+
Ia as ORANGES_COLORS,
|
|
52
|
+
Ta as ORANGE_WARNING,
|
|
53
|
+
da as OTHER_GROUP_COLOR,
|
|
52
54
|
A as OperationQueueManager,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
55
|
+
fa as PASTEL_COLORS,
|
|
56
|
+
la as PLASMA_COLORS,
|
|
57
|
+
pa as PURPLE_GREEN_COLORS,
|
|
58
|
+
J as PolyhedronType,
|
|
59
|
+
Ga as RED_BLUE_COLORS,
|
|
60
|
+
n as RenderManager,
|
|
61
|
+
Z as RichTextStyle,
|
|
62
|
+
$ as SHAPE_CONSTANTS,
|
|
63
|
+
N as ScreenshotError,
|
|
64
|
+
g as ScreenshotErrorCode,
|
|
65
|
+
I as SelectionManager,
|
|
66
|
+
h as SimpleLayoutConfig,
|
|
67
|
+
M as SimpleLayoutEngine,
|
|
66
68
|
T as StatsManager,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
69
|
+
ma as TOL_MUTED_COLORS,
|
|
70
|
+
ya as TOL_VIBRANT_COLORS,
|
|
71
|
+
d as UpdateManager,
|
|
72
|
+
Ua as VIEW_MODE_VALUES,
|
|
73
|
+
Da as VIRIDIS_COLORS,
|
|
74
|
+
Pa as YLORBR_COLORS,
|
|
75
|
+
Ba as colorToHex,
|
|
76
|
+
aa as defaultEdgeStyle,
|
|
77
|
+
ea as defaultNodeStyle,
|
|
78
|
+
sa as defaultRichTextLabelStyle,
|
|
79
|
+
f as defaultXRConfig,
|
|
80
|
+
k as defineAlgorithm,
|
|
81
|
+
w as defineLayout,
|
|
82
|
+
K as defineLogDestination,
|
|
83
|
+
X as definePalette,
|
|
84
|
+
U as isAccelerationPolicy,
|
|
85
|
+
ta as isGraphtyError,
|
|
86
|
+
Sa as isGraphtyErrorCode,
|
|
87
|
+
ua as isViewMode,
|
|
88
|
+
u as registerCameraView,
|
|
89
|
+
H as registerLogSink,
|
|
90
|
+
Y as registerPalette
|
|
85
91
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -57,6 +57,10 @@ export { Algorithm } from "./src/algorithms/Algorithm";
|
|
|
57
57
|
export { registerCameraView } from "./src/catalog/cameraRegistry";
|
|
58
58
|
export { registerLogSink } from "./src/catalog/logSinkRegistry";
|
|
59
59
|
export { registerPalette } from "./src/catalog/paletteRegistry";
|
|
60
|
+
export { defineAlgorithm } from "./src/simple/defineAlgorithm";
|
|
61
|
+
export { defineLayout } from "./src/simple/defineLayout";
|
|
62
|
+
export { defineLogDestination } from "./src/simple/defineLogDestination";
|
|
63
|
+
export { definePalette } from "./src/simple/definePalette";
|
|
60
64
|
export type { CameraStateChangedEvent, DataLoadingCompleteEvent, DataLoadingErrorEvent, DataLoadingErrorSummaryEvent, DataLoadingProgressEvent, EdgeAddEvent, EdgeEvent, EdgeEventType, EdgeGenericEvent, EventCallbackType, EventType, GraphDataAddedEvent, GraphDataClearedEvent, GraphDataLoadedEvent, GraphErrorEvent, GraphEvent, GraphEventType, GraphGenericEvent, GraphLayoutInitializedEvent, GraphSettledEvent, NodeAddEvent, NodeClickEvent, NodeDragEndEvent, NodeDragStartEvent, NodeEvent, NodeEventDetail, NodeEventType, NodeGenericEvent, NodeHoverEvent, StyleChangedEvent, } from "./src/events";
|
|
61
65
|
export type { Manager, ManagerConfig, ManagerContext, QueueableManager } from "./src/managers/index";
|
|
62
66
|
export { AlgorithmManager, DataManager, EventManager, InputManager, LayoutManager, OperationQueueManager, RenderManager, SelectionManager, StatsManager, UpdateManager, } from "./src/managers/index";
|
package/dist/logging.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as c, p } from "./chunks/GraphtyLogger-
|
|
2
|
-
import { G, e as C, f as M, g as w, h as N, i as V, j as I, k as P, m as U, n as T, o as x } from "./chunks/GraphtyLogger-
|
|
1
|
+
import { d as c, p } from "./chunks/GraphtyLogger-BtcBJQPL.js";
|
|
2
|
+
import { G, e as C, f as M, g as w, h as N, i as V, j as I, k as P, m as U, n as T, o as x } from "./chunks/GraphtyLogger-BtcBJQPL.js";
|
|
3
3
|
const g = "graphty-element-logging-config";
|
|
4
4
|
function O(t) {
|
|
5
5
|
try {
|
package/dist/schema.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { R as N, e as
|
|
2
|
-
import { M as
|
|
3
|
-
import { B as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { c as Lt } from "./chunks/common-DWNKjpH_.js";
|
|
1
|
+
import { R as N, e as A } from "./chunks/types-DFchv4Ny.js";
|
|
2
|
+
import { D as x, a as y, G as M, b as D, M as U, V as m, h as B, i as P, c as H } from "./chunks/interpolation-Dk206AhZ.js";
|
|
3
|
+
import { B as w, a as $, b as F, C as W, G as Y, c as j, I as k, O as q, d as K, e as v, f as z, P as J, g as Q, h as X, R as Z, T as tt, i as nt, V as at, Y as st } from "./chunks/sequential-Zym81qm7.js";
|
|
4
|
+
import { E as ot, a as rt, b as ct, N as it, c as Ot, R as St, d as Rt, e as lt, f as ut } from "./chunks/NodeStyle-CtmA7dXi.js";
|
|
5
|
+
import { c as ft } from "./chunks/common-DWNKjpH_.js";
|
|
7
6
|
function l(t) {
|
|
8
7
|
const n = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
|
|
9
8
|
if (!n)
|
|
10
9
|
throw new Error(`Invalid hex color: ${t}`);
|
|
11
10
|
return [parseInt(n[1], 16), parseInt(n[2], 16), parseInt(n[3], 16)];
|
|
12
11
|
}
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
return
|
|
12
|
+
function f(t, n, o) {
|
|
13
|
+
const e = (a) => {
|
|
14
|
+
const s = Math.round(Math.max(0, Math.min(255, a))).toString(16);
|
|
15
|
+
return s.length === 1 ? `0${s}` : s;
|
|
17
16
|
};
|
|
18
|
-
return `#${
|
|
17
|
+
return `#${e(t)}${e(n)}${e(o)}`;
|
|
19
18
|
}
|
|
20
19
|
function S(t) {
|
|
21
20
|
const n = t / 255;
|
|
@@ -25,28 +24,28 @@ function R(t) {
|
|
|
25
24
|
return t <= 31308e-7 ? t * 12.92 * 255 : (1.055 * Math.pow(t, 1 / 2.4) - 0.055) * 255;
|
|
26
25
|
}
|
|
27
26
|
function L(t) {
|
|
28
|
-
const [n, o,
|
|
29
|
-
return
|
|
27
|
+
const [n, o, e] = l(t), a = S(n), s = S(o), r = S(e), O = 0.567 * a + 0.433 * s + 0 * r, c = 0.558 * a + 0.442 * s + 0 * r, i = 0 * a + 0.242 * s + 0.758 * r;
|
|
28
|
+
return f(R(O), R(c), R(i));
|
|
30
29
|
}
|
|
31
30
|
function _(t) {
|
|
32
|
-
const [n, o,
|
|
33
|
-
return
|
|
31
|
+
const [n, o, e] = l(t), a = S(n), s = S(o), r = S(e), O = 0.625 * a + 0.375 * s + 0 * r, c = 0.7 * a + 0.3 * s + 0 * r, i = 0 * a + 0.3 * s + 0.7 * r;
|
|
32
|
+
return f(R(O), R(c), R(i));
|
|
34
33
|
}
|
|
35
34
|
function p(t) {
|
|
36
|
-
const [n, o,
|
|
37
|
-
return
|
|
35
|
+
const [n, o, e] = l(t), a = S(n), s = S(o), r = S(e), O = 0.95 * a + 0.05 * s + 0 * r, c = 0 * a + 0.433 * s + 0.567 * r, i = 0 * a + 0.475 * s + 0.525 * r;
|
|
36
|
+
return f(R(O), R(c), R(i));
|
|
38
37
|
}
|
|
39
38
|
function g(t) {
|
|
40
|
-
const [n, o,
|
|
41
|
-
return
|
|
39
|
+
const [n, o, e] = l(t), a = 0.2126 * n + 0.7152 * o + 0.0722 * e;
|
|
40
|
+
return f(a, a, a);
|
|
42
41
|
}
|
|
43
|
-
function
|
|
44
|
-
const [o,
|
|
42
|
+
function E(t, n) {
|
|
43
|
+
const [o, e, a] = l(t), [s, r, O] = l(n), c = o - s, i = e - r, u = a - O;
|
|
45
44
|
return Math.sqrt(c * c + i * i + u * u) / 2.55;
|
|
46
45
|
}
|
|
47
46
|
function C(t, n, o = 10) {
|
|
48
|
-
const
|
|
49
|
-
return
|
|
47
|
+
const e = g(t), a = g(n);
|
|
48
|
+
return E(e, a) > o;
|
|
50
49
|
}
|
|
51
50
|
function b(t, n = 10) {
|
|
52
51
|
const o = {
|
|
@@ -55,61 +54,61 @@ function b(t, n = 10) {
|
|
|
55
54
|
tritanopia: !0,
|
|
56
55
|
grayscale: !0
|
|
57
56
|
};
|
|
58
|
-
for (let
|
|
59
|
-
for (let a =
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
const i = _(
|
|
63
|
-
|
|
64
|
-
const T = p(
|
|
65
|
-
|
|
57
|
+
for (let e = 0; e < t.length; e++)
|
|
58
|
+
for (let a = e + 1; a < t.length; a++) {
|
|
59
|
+
const s = t[e], r = t[a], O = L(s), c = L(r);
|
|
60
|
+
E(O, c) < n && (o.protanopia = !1);
|
|
61
|
+
const i = _(s), u = _(r);
|
|
62
|
+
E(i, u) < n && (o.deuteranopia = !1);
|
|
63
|
+
const T = p(s), d = p(r);
|
|
64
|
+
E(T, d) < n && (o.tritanopia = !1), C(s, r, n) || (o.grayscale = !1);
|
|
66
65
|
}
|
|
67
66
|
return o;
|
|
68
67
|
}
|
|
69
68
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
69
|
+
w as BLUES_COLORS,
|
|
70
|
+
$ as BLUE_HIGHLIGHT,
|
|
71
|
+
F as BLUE_ORANGE_COLORS,
|
|
72
|
+
W as CARBON_COLORS,
|
|
73
|
+
x as DEFAULT_SELECTION_STYLE,
|
|
74
|
+
y as DEFAULT_VIEW_MODE,
|
|
75
|
+
ot as EdgeArrowTypes,
|
|
76
|
+
rt as EdgeLineTypes,
|
|
77
|
+
ct as EdgeStyle,
|
|
78
|
+
Y as GREENS_COLORS,
|
|
79
|
+
j as GREEN_SUCCESS,
|
|
80
|
+
M as GraphBackground,
|
|
81
|
+
D as GraphSelectionStyleOpts,
|
|
82
|
+
k as INFERNO_COLORS,
|
|
83
|
+
U as MISSING_DATA_COLOR,
|
|
84
|
+
it as NodeShapes,
|
|
85
|
+
Ot as NodeStyle,
|
|
86
|
+
q as OKABE_ITO_COLORS,
|
|
87
|
+
K as ORANGES_COLORS,
|
|
88
|
+
v as ORANGE_WARNING,
|
|
89
|
+
z as OTHER_GROUP_COLOR,
|
|
90
|
+
J as PASTEL_COLORS,
|
|
91
|
+
Q as PLASMA_COLORS,
|
|
92
|
+
X as PURPLE_GREEN_COLORS,
|
|
93
|
+
Z as RED_BLUE_COLORS,
|
|
95
94
|
N as RESULT_SHAPES,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
St as RichTextStyle,
|
|
96
|
+
tt as TOL_MUTED_COLORS,
|
|
97
|
+
nt as TOL_VIBRANT_COLORS,
|
|
98
|
+
m as VIEW_MODE_VALUES,
|
|
99
|
+
at as VIRIDIS_COLORS,
|
|
100
|
+
st as YLORBR_COLORS,
|
|
102
101
|
C as areDistinguishableInGrayscale,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
102
|
+
E as colorDifference,
|
|
103
|
+
ft as colorToHex,
|
|
104
|
+
Rt as defaultEdgeStyle,
|
|
105
|
+
lt as defaultNodeStyle,
|
|
106
|
+
ut as defaultRichTextLabelStyle,
|
|
107
|
+
B as hexToRgb,
|
|
108
|
+
P as interpolatePalette,
|
|
110
109
|
b as isPaletteSafe,
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
A as isResultShape,
|
|
111
|
+
H as isViewMode,
|
|
113
112
|
_ as simulateDeuteranopia,
|
|
114
113
|
L as simulateProtanopia,
|
|
115
114
|
p as simulateTritanopia,
|
package/dist/session.d.ts
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
*/
|
|
57
57
|
import type { RuleTree, SelectionDirection } from "./src/catalog/types";
|
|
58
58
|
import type { SelectionOp } from "./src/session/selection";
|
|
59
|
-
export type { ComponentStatistics, CreateGraphSessionOptions, EdgeRecord, GraphSession, GraphStatistics, NodeRecord, SessionAttributes, SessionCatalogApi, SessionConfig, SessionDataApi, SessionDataConfig, SessionEventMap, SessionGraphStore,
|
|
59
|
+
export type { CommandOutcome, CommandOutcomeMap, ComponentStatistics, CreateGraphSessionOptions, DataSourceDescriptor, DataSourceInput, EdgeRecord, EdgeRecordInput, GraphSession, GraphStatistics, HistoryCause, HistoryOutcome, HistoryStep, HistoryStepId, ImportOptions, NodeRecord, NodeRecordInput, PendingId, PendingStep, PositionEntry, ProjectConfig, ProjectConfigPatch, ProjectSlice, RowUpdate, SessionAttributes, SessionCatalogApi, SessionConfig, SessionDataApi, SessionDataConfig, SessionEventMap, SessionGraphStore, SessionHistory, SessionLayout, SessionPositions, SessionRunsOptions, SessionStatus, SessionViews, StyleProblem, TransactionOptions, TransactionScope, } from "./src/session";
|
|
60
60
|
export { createGraphSession } from "./src/session";
|
|
61
61
|
/**
|
|
62
62
|
* What the element has to say about a load, once the load is over: which record keys named the
|
|
@@ -70,12 +70,11 @@ export { createGraphSession } from "./src/session";
|
|
|
70
70
|
export type { EndpointSpelling } from "./src/data/endpoints";
|
|
71
71
|
export type { ImportReport, RepeatedEdgeCounts } from "./src/data/report";
|
|
72
72
|
/**
|
|
73
|
-
* The
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* a second array built beside it would be lent to nothing.
|
|
73
|
+
* The read half of `session.positions` and of `session.data.store.positions`, so that a consumer
|
|
74
|
+
* holding one can name it. Nodes are placed and pinned through `session.positions.set`, `pin` and
|
|
75
|
+
* `unpin`, which are undoable steps.
|
|
77
76
|
*/
|
|
78
|
-
export type {
|
|
77
|
+
export type { ReadonlyElementPositions } from "./src/session";
|
|
79
78
|
export type { LayoutRecommendation, LayoutRecommendationOptions } from "./src/session";
|
|
80
79
|
export { recommendLayout } from "./src/session";
|
|
81
80
|
export type { BatchResult, BatchStep, Caveats, EngineVersions, Precision, Progress, QueueEntry, QueuePolicy, ResolvedScope, Run, RunChange, RunDirection, RunExecutionContext, RunExecutor, RunOptions, RunOutcome, RunPhase, RunProgressReport, RunQueue, RunRecord, RunRemoval, RunsApi, RunScopeRecord, RunSpec, RunStatus, RunStyle, StaleNote, StartOptions, WeightMeaning, } from "./src/session/runs";
|
package/dist/session.js
CHANGED
|
@@ -1,88 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { D as h } from "./chunks/GraphSession-BhuHSXIo.js";
|
|
7
|
-
import { a as z, b as M, c as k, d as H, Q as Y, R as j, e as q, f as Q, S as X, T as B, g as J, i as K, h as V, j as W, k as Z } from "./chunks/GraphSession-BhuHSXIo.js";
|
|
8
|
-
const u = [
|
|
9
|
-
{
|
|
10
|
-
id: "fixed",
|
|
11
|
-
fires: ({ statistics: e, placedNodes: a }) => e.nodeCount > 0 && a >= e.nodeCount,
|
|
12
|
-
reason: "Every node already carries a coordinate, so this keeps the arrangement the data arrived with instead of computing a new one over the top of it."
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
id: "random",
|
|
16
|
-
fires: ({ statistics: e, largeGraphThreshold: a }) => e.nodeCount > a,
|
|
17
|
-
reason: "This graph is large enough that settling a force simulation would hold the frame for a long time, so it is scattered from a seed instead: instant, and the same every time."
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
id: "circular",
|
|
21
|
-
fires: ({ statistics: e }) => e.nodeCount > 0 && e.edgeCount === 0,
|
|
22
|
-
reason: "Nothing is connected, so a force layout has no pull to work with and would push every node equally far from every other. A ring puts them in a readable order instead."
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
id: "force",
|
|
26
|
-
fires: () => !0,
|
|
27
|
-
reason: "Connected nodes are pulled together and unconnected ones pushed apart, which is the arrangement that shows this graph's structure without being told anything about it."
|
|
28
|
-
}
|
|
29
|
-
];
|
|
30
|
-
function n(e, a) {
|
|
31
|
-
return e.structuralInputs.length > 0 ? !1 : e.sizeRating === "any" || a <= e.sizeRating;
|
|
32
|
-
}
|
|
33
|
-
function T(e, a = {}) {
|
|
34
|
-
const i = {
|
|
35
|
-
statistics: e,
|
|
36
|
-
placedNodes: a.placedNodes ?? 0,
|
|
37
|
-
largeGraphThreshold: a.largeGraphThreshold ?? h.largeGraphThreshold
|
|
38
|
-
};
|
|
39
|
-
for (const r of u) {
|
|
40
|
-
if (!r.fires(i))
|
|
41
|
-
continue;
|
|
42
|
-
const o = s.find((d) => d.id === r.id);
|
|
43
|
-
if (o !== void 0 && n(o, e.nodeCount))
|
|
44
|
-
return Object.freeze({ layout: o, reason: r.reason });
|
|
45
|
-
}
|
|
46
|
-
const t = s.find((r) => n(r, e.nodeCount));
|
|
47
|
-
return t === void 0 ? void 0 : Object.freeze({
|
|
48
|
-
layout: t,
|
|
49
|
-
reason: "The first arrangement this element can place a graph of this size with."
|
|
50
|
-
});
|
|
51
|
-
}
|
|
1
|
+
import { p as E, a as S } from "./chunks/parse-SVp77JbE.js";
|
|
2
|
+
import { R as _, e as r } from "./chunks/types-DFchv4Ny.js";
|
|
3
|
+
import { A as R, a as e, G as o, i as t, b as C } from "./chunks/pluginRegistry-Ddfl6Mv2.js";
|
|
4
|
+
import { y as O, z as i, R as U, B as I, C as P, E as p, F as N, G as D, H as n } from "./chunks/fields-5uVC1Pll.js";
|
|
5
|
+
import { D as u, a as h, b as f, c as F, d as G, Q as c, R as d, e as l, f as y, S as M, T as x, g as H, i as g, h as b, j as Q, k as Y, r as j } from "./chunks/GraphSession-DPoTaT3b.js";
|
|
52
6
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
7
|
+
R as ACCELERATION_ERROR_CODES,
|
|
8
|
+
O as ACCELERATION_POLICIES,
|
|
9
|
+
i as ACCELERATION_POLICY_DEFAULT,
|
|
10
|
+
u as DEFAULT_COST_GATE_LIMITS,
|
|
11
|
+
h as DEFAULT_EXACT_COMPUTATION_CAP_SECONDS,
|
|
12
|
+
f as DEFAULT_LIMITS,
|
|
13
|
+
F as DEFAULT_SCOPE_SAMPLE,
|
|
14
|
+
G as DEFAULT_SELECTION_CAP,
|
|
15
|
+
e as GRAPHTY_ERROR_CODES,
|
|
16
|
+
o as GraphtyError,
|
|
17
|
+
c as QUEUE_POLICIES,
|
|
18
|
+
U as RESULT_FIELD_NAMES,
|
|
19
|
+
I as RESULT_ROOT,
|
|
20
|
+
_ as RESULT_SHAPES,
|
|
21
|
+
P as RESULT_SHAPE_CONTRACTS,
|
|
22
|
+
d as RUN_ID_PATTERN,
|
|
23
|
+
l as RUN_PHASES,
|
|
24
|
+
y as RUN_STATUSES,
|
|
25
|
+
M as SET_OPS,
|
|
26
|
+
x as TERMINAL_RUN_STATUSES,
|
|
27
|
+
H as createGraphSession,
|
|
28
|
+
p as defaultReading,
|
|
29
|
+
N as isAccelerationPolicy,
|
|
30
|
+
g as isAlgorithmRunCommand,
|
|
31
|
+
t as isGraphtyError,
|
|
32
|
+
C as isGraphtyErrorCode,
|
|
33
|
+
r as isResultShape,
|
|
34
|
+
b as isRunId,
|
|
35
|
+
Q as isRunStatus,
|
|
36
|
+
Y as isTerminalRunStatus,
|
|
37
|
+
E as parseScope,
|
|
38
|
+
S as parseSetDefinition,
|
|
39
|
+
D as quotePath,
|
|
40
|
+
j as recommendLayout,
|
|
41
|
+
n as resultPath
|
|
88
42
|
};
|