@almadar/ui 5.117.0 → 5.118.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +59 -19
- package/dist/avl/index.js +59 -19
- package/dist/components/index.cjs +59 -19
- package/dist/components/index.d.cts +20 -2
- package/dist/components/index.d.ts +20 -2
- package/dist/components/index.js +59 -19
- package/dist/providers/index.cjs +59 -19
- package/dist/providers/index.js +59 -19
- package/dist/runtime/index.cjs +59 -19
- package/dist/runtime/index.js +59 -19
- package/package.json +1 -1
package/dist/avl/index.cjs
CHANGED
|
@@ -37249,6 +37249,23 @@ function getGroupColor(group, groups) {
|
|
|
37249
37249
|
const idx = groups.indexOf(group);
|
|
37250
37250
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
37251
37251
|
}
|
|
37252
|
+
function hashSeed(str) {
|
|
37253
|
+
let h = 1779033703 ^ str.length;
|
|
37254
|
+
for (let i = 0; i < str.length; i++) {
|
|
37255
|
+
h = Math.imul(h ^ str.charCodeAt(i), 3432918353);
|
|
37256
|
+
h = h << 13 | h >>> 19;
|
|
37257
|
+
}
|
|
37258
|
+
return (h ^= h >>> 16) >>> 0;
|
|
37259
|
+
}
|
|
37260
|
+
function mulberry32(a) {
|
|
37261
|
+
return function() {
|
|
37262
|
+
a |= 0;
|
|
37263
|
+
a = a + 1831565813 | 0;
|
|
37264
|
+
let t = Math.imul(a ^ a >>> 15, 1 | a);
|
|
37265
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
37266
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
37267
|
+
};
|
|
37268
|
+
}
|
|
37252
37269
|
function resolveColor3(color, el) {
|
|
37253
37270
|
const m = /^var\((--[^,)]+)(?:,\s*([^)]+))?\)$/.exec(color.trim());
|
|
37254
37271
|
if (!m) return color;
|
|
@@ -37280,6 +37297,7 @@ var init_GraphCanvas = __esm({
|
|
|
37280
37297
|
title,
|
|
37281
37298
|
nodes: propNodes = [],
|
|
37282
37299
|
edges: propEdges = [],
|
|
37300
|
+
similarity: propSimilarity = [],
|
|
37283
37301
|
height = 400,
|
|
37284
37302
|
showLabels = true,
|
|
37285
37303
|
interactive = true,
|
|
@@ -37400,8 +37418,9 @@ var init_GraphCanvas = __esm({
|
|
|
37400
37418
|
x = gapX * (idx % cols + 1);
|
|
37401
37419
|
y = gapY * (Math.floor(idx / cols) + 1);
|
|
37402
37420
|
} else {
|
|
37403
|
-
|
|
37404
|
-
|
|
37421
|
+
const rand = mulberry32(hashSeed(n.id));
|
|
37422
|
+
x = w * 0.2 + rand() * w * 0.6;
|
|
37423
|
+
y = h * 0.2 + rand() * h * 0.6;
|
|
37405
37424
|
}
|
|
37406
37425
|
}
|
|
37407
37426
|
return { ...n, x, y, vx: 0, vy: 0, fx: 0, fy: 0 };
|
|
@@ -37436,22 +37455,43 @@ var init_GraphCanvas = __esm({
|
|
|
37436
37455
|
nodes[j].fy += fy;
|
|
37437
37456
|
}
|
|
37438
37457
|
}
|
|
37439
|
-
|
|
37440
|
-
|
|
37441
|
-
const
|
|
37442
|
-
|
|
37443
|
-
|
|
37444
|
-
|
|
37445
|
-
|
|
37446
|
-
|
|
37447
|
-
|
|
37448
|
-
|
|
37449
|
-
|
|
37450
|
-
|
|
37451
|
-
|
|
37452
|
-
|
|
37453
|
-
|
|
37454
|
-
|
|
37458
|
+
const nodeById = new Map(nodes.map((n) => [n.id, n]));
|
|
37459
|
+
if (propSimilarity.length > 0) {
|
|
37460
|
+
for (const pair of propSimilarity) {
|
|
37461
|
+
const source = nodeById.get(pair.source);
|
|
37462
|
+
const target = nodeById.get(pair.target);
|
|
37463
|
+
if (!source || !target) continue;
|
|
37464
|
+
const dx = target.x - source.x;
|
|
37465
|
+
const dy = target.y - source.y;
|
|
37466
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
37467
|
+
const w2 = Math.min(1, Math.max(0, pair.weight));
|
|
37468
|
+
const linkTarget = linkDistance * (1 - w2);
|
|
37469
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
37470
|
+
const fx = dx / dist * force;
|
|
37471
|
+
const fy = dy / dist * force;
|
|
37472
|
+
source.fx += fx;
|
|
37473
|
+
source.fy += fy;
|
|
37474
|
+
target.fx -= fx;
|
|
37475
|
+
target.fy -= fy;
|
|
37476
|
+
}
|
|
37477
|
+
} else {
|
|
37478
|
+
for (const edge of propEdges) {
|
|
37479
|
+
const source = nodeById.get(edge.source);
|
|
37480
|
+
const target = nodeById.get(edge.target);
|
|
37481
|
+
if (!source || !target) continue;
|
|
37482
|
+
const dx = target.x - source.x;
|
|
37483
|
+
const dy = target.y - source.y;
|
|
37484
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
37485
|
+
const w2 = Math.min(1, Math.max(0, edge.weight ?? 1));
|
|
37486
|
+
const linkTarget = linkDistance * (0.5 + (1 - w2) * 1.5);
|
|
37487
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
37488
|
+
const fx = dx / dist * force;
|
|
37489
|
+
const fy = dy / dist * force;
|
|
37490
|
+
source.fx += fx;
|
|
37491
|
+
source.fy += fy;
|
|
37492
|
+
target.fx -= fx;
|
|
37493
|
+
target.fy -= fy;
|
|
37494
|
+
}
|
|
37455
37495
|
}
|
|
37456
37496
|
const centroids = /* @__PURE__ */ new Map();
|
|
37457
37497
|
for (const node of nodes) {
|
|
@@ -37557,7 +37597,7 @@ var init_GraphCanvas = __esm({
|
|
|
37557
37597
|
return () => {
|
|
37558
37598
|
cancelAnimationFrame(animRef.current);
|
|
37559
37599
|
};
|
|
37560
|
-
}, [propNodes, propEdges, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
37600
|
+
}, [propNodes, propEdges, propSimilarity, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
37561
37601
|
React90.useEffect(() => {
|
|
37562
37602
|
const canvas = canvasRef.current;
|
|
37563
37603
|
if (!canvas) return;
|
package/dist/avl/index.js
CHANGED
|
@@ -37203,6 +37203,23 @@ function getGroupColor(group, groups) {
|
|
|
37203
37203
|
const idx = groups.indexOf(group);
|
|
37204
37204
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
37205
37205
|
}
|
|
37206
|
+
function hashSeed(str) {
|
|
37207
|
+
let h = 1779033703 ^ str.length;
|
|
37208
|
+
for (let i = 0; i < str.length; i++) {
|
|
37209
|
+
h = Math.imul(h ^ str.charCodeAt(i), 3432918353);
|
|
37210
|
+
h = h << 13 | h >>> 19;
|
|
37211
|
+
}
|
|
37212
|
+
return (h ^= h >>> 16) >>> 0;
|
|
37213
|
+
}
|
|
37214
|
+
function mulberry32(a) {
|
|
37215
|
+
return function() {
|
|
37216
|
+
a |= 0;
|
|
37217
|
+
a = a + 1831565813 | 0;
|
|
37218
|
+
let t = Math.imul(a ^ a >>> 15, 1 | a);
|
|
37219
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
37220
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
37221
|
+
};
|
|
37222
|
+
}
|
|
37206
37223
|
function resolveColor3(color, el) {
|
|
37207
37224
|
const m = /^var\((--[^,)]+)(?:,\s*([^)]+))?\)$/.exec(color.trim());
|
|
37208
37225
|
if (!m) return color;
|
|
@@ -37234,6 +37251,7 @@ var init_GraphCanvas = __esm({
|
|
|
37234
37251
|
title,
|
|
37235
37252
|
nodes: propNodes = [],
|
|
37236
37253
|
edges: propEdges = [],
|
|
37254
|
+
similarity: propSimilarity = [],
|
|
37237
37255
|
height = 400,
|
|
37238
37256
|
showLabels = true,
|
|
37239
37257
|
interactive = true,
|
|
@@ -37354,8 +37372,9 @@ var init_GraphCanvas = __esm({
|
|
|
37354
37372
|
x = gapX * (idx % cols + 1);
|
|
37355
37373
|
y = gapY * (Math.floor(idx / cols) + 1);
|
|
37356
37374
|
} else {
|
|
37357
|
-
|
|
37358
|
-
|
|
37375
|
+
const rand = mulberry32(hashSeed(n.id));
|
|
37376
|
+
x = w * 0.2 + rand() * w * 0.6;
|
|
37377
|
+
y = h * 0.2 + rand() * h * 0.6;
|
|
37359
37378
|
}
|
|
37360
37379
|
}
|
|
37361
37380
|
return { ...n, x, y, vx: 0, vy: 0, fx: 0, fy: 0 };
|
|
@@ -37390,22 +37409,43 @@ var init_GraphCanvas = __esm({
|
|
|
37390
37409
|
nodes[j].fy += fy;
|
|
37391
37410
|
}
|
|
37392
37411
|
}
|
|
37393
|
-
|
|
37394
|
-
|
|
37395
|
-
const
|
|
37396
|
-
|
|
37397
|
-
|
|
37398
|
-
|
|
37399
|
-
|
|
37400
|
-
|
|
37401
|
-
|
|
37402
|
-
|
|
37403
|
-
|
|
37404
|
-
|
|
37405
|
-
|
|
37406
|
-
|
|
37407
|
-
|
|
37408
|
-
|
|
37412
|
+
const nodeById = new Map(nodes.map((n) => [n.id, n]));
|
|
37413
|
+
if (propSimilarity.length > 0) {
|
|
37414
|
+
for (const pair of propSimilarity) {
|
|
37415
|
+
const source = nodeById.get(pair.source);
|
|
37416
|
+
const target = nodeById.get(pair.target);
|
|
37417
|
+
if (!source || !target) continue;
|
|
37418
|
+
const dx = target.x - source.x;
|
|
37419
|
+
const dy = target.y - source.y;
|
|
37420
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
37421
|
+
const w2 = Math.min(1, Math.max(0, pair.weight));
|
|
37422
|
+
const linkTarget = linkDistance * (1 - w2);
|
|
37423
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
37424
|
+
const fx = dx / dist * force;
|
|
37425
|
+
const fy = dy / dist * force;
|
|
37426
|
+
source.fx += fx;
|
|
37427
|
+
source.fy += fy;
|
|
37428
|
+
target.fx -= fx;
|
|
37429
|
+
target.fy -= fy;
|
|
37430
|
+
}
|
|
37431
|
+
} else {
|
|
37432
|
+
for (const edge of propEdges) {
|
|
37433
|
+
const source = nodeById.get(edge.source);
|
|
37434
|
+
const target = nodeById.get(edge.target);
|
|
37435
|
+
if (!source || !target) continue;
|
|
37436
|
+
const dx = target.x - source.x;
|
|
37437
|
+
const dy = target.y - source.y;
|
|
37438
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
37439
|
+
const w2 = Math.min(1, Math.max(0, edge.weight ?? 1));
|
|
37440
|
+
const linkTarget = linkDistance * (0.5 + (1 - w2) * 1.5);
|
|
37441
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
37442
|
+
const fx = dx / dist * force;
|
|
37443
|
+
const fy = dy / dist * force;
|
|
37444
|
+
source.fx += fx;
|
|
37445
|
+
source.fy += fy;
|
|
37446
|
+
target.fx -= fx;
|
|
37447
|
+
target.fy -= fy;
|
|
37448
|
+
}
|
|
37409
37449
|
}
|
|
37410
37450
|
const centroids = /* @__PURE__ */ new Map();
|
|
37411
37451
|
for (const node of nodes) {
|
|
@@ -37511,7 +37551,7 @@ var init_GraphCanvas = __esm({
|
|
|
37511
37551
|
return () => {
|
|
37512
37552
|
cancelAnimationFrame(animRef.current);
|
|
37513
37553
|
};
|
|
37514
|
-
}, [propNodes, propEdges, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
37554
|
+
}, [propNodes, propEdges, propSimilarity, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
37515
37555
|
useEffect(() => {
|
|
37516
37556
|
const canvas = canvasRef.current;
|
|
37517
37557
|
if (!canvas) return;
|
|
@@ -36638,6 +36638,23 @@ function getGroupColor(group, groups) {
|
|
|
36638
36638
|
const idx = groups.indexOf(group);
|
|
36639
36639
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
36640
36640
|
}
|
|
36641
|
+
function hashSeed(str2) {
|
|
36642
|
+
let h = 1779033703 ^ str2.length;
|
|
36643
|
+
for (let i = 0; i < str2.length; i++) {
|
|
36644
|
+
h = Math.imul(h ^ str2.charCodeAt(i), 3432918353);
|
|
36645
|
+
h = h << 13 | h >>> 19;
|
|
36646
|
+
}
|
|
36647
|
+
return (h ^= h >>> 16) >>> 0;
|
|
36648
|
+
}
|
|
36649
|
+
function mulberry32(a) {
|
|
36650
|
+
return function() {
|
|
36651
|
+
a |= 0;
|
|
36652
|
+
a = a + 1831565813 | 0;
|
|
36653
|
+
let t = Math.imul(a ^ a >>> 15, 1 | a);
|
|
36654
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
36655
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
36656
|
+
};
|
|
36657
|
+
}
|
|
36641
36658
|
function resolveColor3(color, el) {
|
|
36642
36659
|
const m = /^var\((--[^,)]+)(?:,\s*([^)]+))?\)$/.exec(color.trim());
|
|
36643
36660
|
if (!m) return color;
|
|
@@ -36669,6 +36686,7 @@ var init_GraphCanvas = __esm({
|
|
|
36669
36686
|
title,
|
|
36670
36687
|
nodes: propNodes = [],
|
|
36671
36688
|
edges: propEdges = [],
|
|
36689
|
+
similarity: propSimilarity = [],
|
|
36672
36690
|
height = 400,
|
|
36673
36691
|
showLabels = true,
|
|
36674
36692
|
interactive = true,
|
|
@@ -36789,8 +36807,9 @@ var init_GraphCanvas = __esm({
|
|
|
36789
36807
|
x = gapX * (idx % cols + 1);
|
|
36790
36808
|
y = gapY * (Math.floor(idx / cols) + 1);
|
|
36791
36809
|
} else {
|
|
36792
|
-
|
|
36793
|
-
|
|
36810
|
+
const rand = mulberry32(hashSeed(n.id));
|
|
36811
|
+
x = w * 0.2 + rand() * w * 0.6;
|
|
36812
|
+
y = h * 0.2 + rand() * h * 0.6;
|
|
36794
36813
|
}
|
|
36795
36814
|
}
|
|
36796
36815
|
return { ...n, x, y, vx: 0, vy: 0, fx: 0, fy: 0 };
|
|
@@ -36825,22 +36844,43 @@ var init_GraphCanvas = __esm({
|
|
|
36825
36844
|
nodes[j].fy += fy;
|
|
36826
36845
|
}
|
|
36827
36846
|
}
|
|
36828
|
-
|
|
36829
|
-
|
|
36830
|
-
const
|
|
36831
|
-
|
|
36832
|
-
|
|
36833
|
-
|
|
36834
|
-
|
|
36835
|
-
|
|
36836
|
-
|
|
36837
|
-
|
|
36838
|
-
|
|
36839
|
-
|
|
36840
|
-
|
|
36841
|
-
|
|
36842
|
-
|
|
36843
|
-
|
|
36847
|
+
const nodeById = new Map(nodes.map((n) => [n.id, n]));
|
|
36848
|
+
if (propSimilarity.length > 0) {
|
|
36849
|
+
for (const pair of propSimilarity) {
|
|
36850
|
+
const source = nodeById.get(pair.source);
|
|
36851
|
+
const target = nodeById.get(pair.target);
|
|
36852
|
+
if (!source || !target) continue;
|
|
36853
|
+
const dx = target.x - source.x;
|
|
36854
|
+
const dy = target.y - source.y;
|
|
36855
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
36856
|
+
const w2 = Math.min(1, Math.max(0, pair.weight));
|
|
36857
|
+
const linkTarget = linkDistance * (1 - w2);
|
|
36858
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
36859
|
+
const fx = dx / dist * force;
|
|
36860
|
+
const fy = dy / dist * force;
|
|
36861
|
+
source.fx += fx;
|
|
36862
|
+
source.fy += fy;
|
|
36863
|
+
target.fx -= fx;
|
|
36864
|
+
target.fy -= fy;
|
|
36865
|
+
}
|
|
36866
|
+
} else {
|
|
36867
|
+
for (const edge of propEdges) {
|
|
36868
|
+
const source = nodeById.get(edge.source);
|
|
36869
|
+
const target = nodeById.get(edge.target);
|
|
36870
|
+
if (!source || !target) continue;
|
|
36871
|
+
const dx = target.x - source.x;
|
|
36872
|
+
const dy = target.y - source.y;
|
|
36873
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
36874
|
+
const w2 = Math.min(1, Math.max(0, edge.weight ?? 1));
|
|
36875
|
+
const linkTarget = linkDistance * (0.5 + (1 - w2) * 1.5);
|
|
36876
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
36877
|
+
const fx = dx / dist * force;
|
|
36878
|
+
const fy = dy / dist * force;
|
|
36879
|
+
source.fx += fx;
|
|
36880
|
+
source.fy += fy;
|
|
36881
|
+
target.fx -= fx;
|
|
36882
|
+
target.fy -= fy;
|
|
36883
|
+
}
|
|
36844
36884
|
}
|
|
36845
36885
|
const centroids = /* @__PURE__ */ new Map();
|
|
36846
36886
|
for (const node of nodes) {
|
|
@@ -36946,7 +36986,7 @@ var init_GraphCanvas = __esm({
|
|
|
36946
36986
|
return () => {
|
|
36947
36987
|
cancelAnimationFrame(animRef.current);
|
|
36948
36988
|
};
|
|
36949
|
-
}, [propNodes, propEdges, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
36989
|
+
}, [propNodes, propEdges, propSimilarity, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
36950
36990
|
React73.useEffect(() => {
|
|
36951
36991
|
const canvas = canvasRef.current;
|
|
36952
36992
|
if (!canvas) return;
|
|
@@ -8831,6 +8831,18 @@ interface GraphEdge {
|
|
|
8831
8831
|
weight?: number;
|
|
8832
8832
|
color?: string;
|
|
8833
8833
|
}
|
|
8834
|
+
/**
|
|
8835
|
+
* All-pairs similarity (cosine 0–1) used ONLY for layout: ideal pair distance
|
|
8836
|
+
* is derived from similarity (higher ⇒ closer). Never drawn — `edges` remain
|
|
8837
|
+
* the only rendered links. When provided it supersedes edge-weight attraction;
|
|
8838
|
+
* when omitted, edges drive layout as before.
|
|
8839
|
+
*/
|
|
8840
|
+
interface GraphSimilarity {
|
|
8841
|
+
source: string;
|
|
8842
|
+
target: string;
|
|
8843
|
+
/** Cosine similarity in [0,1]; higher ⇒ closer. */
|
|
8844
|
+
weight: number;
|
|
8845
|
+
}
|
|
8834
8846
|
interface GraphAction {
|
|
8835
8847
|
label: string;
|
|
8836
8848
|
event?: string;
|
|
@@ -8842,8 +8854,14 @@ interface GraphCanvasProps {
|
|
|
8842
8854
|
title?: string;
|
|
8843
8855
|
/** Graph nodes */
|
|
8844
8856
|
nodes?: readonly GraphNode[];
|
|
8845
|
-
/** Graph edges */
|
|
8857
|
+
/** Graph edges (the only rendered links) */
|
|
8846
8858
|
edges?: readonly GraphEdge[];
|
|
8859
|
+
/**
|
|
8860
|
+
* All-pairs similarity (cosine 0–1) used ONLY for layout: ideal pair
|
|
8861
|
+
* distance = linkDistance × (1 − cosine). Never drawn. When provided it
|
|
8862
|
+
* supersedes edge-weight attraction; when omitted, edges drive layout.
|
|
8863
|
+
*/
|
|
8864
|
+
similarity?: readonly GraphSimilarity[];
|
|
8847
8865
|
/** Canvas height */
|
|
8848
8866
|
height?: number;
|
|
8849
8867
|
/** Show node labels */
|
|
@@ -11226,4 +11244,4 @@ interface AboutPageTemplateProps extends TemplateProps<AboutPageEntity> {
|
|
|
11226
11244
|
}
|
|
11227
11245
|
declare const AboutPageTemplate: React__default.FC<AboutPageTemplateProps>;
|
|
11228
11246
|
|
|
11229
|
-
export { ALL_PRESETS, AR_BOOK_FIELDS, type AboutPageEntity, AboutPageTemplate, type AboutPageTemplateProps, Accordion, type AccordionItem, type AccordionProps, Card as ActionCard, type CardProps as ActionCardProps, ActionPalette, type ActionPaletteProps, ActionTile, type ActionTileProps, ActivationBlock, type ActivationBlockProps, Alert, type AlertProps, type AlertVariant, type AlgorithmBar, AlgorithmCanvas, type AlgorithmCanvasProps, type AlgorithmCell, type AlgorithmPointer, AnimatedCounter, type AnimatedCounterProps, AnimatedGraphic, type AnimatedGraphicProps, AnimatedReveal, type AnimatedRevealProps, ArticleSection, type ArticleSectionProps, Aside, type AsideProps, AssetPicker, type AssetPickerProps, AtlasImage, type AtlasImageAsset, type AtlasImageProps, AtlasPanel, type AtlasPanelProps, AuthLayout, type AuthLayoutProps, Avatar, type AvatarProps, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, type BadgeVariant, BehaviorView, type BehaviorViewProps, BiologyCanvas, type BiologyCanvasProps, type BiologyEdge, type BiologyNode, type BlockType, type BloomLevel, BloomQuizBlock, type BloomQuizBlockProps, BookChapterView, type BookChapterViewProps, BookCoverPage, type BookCoverPageProps, type BookFieldMap, BookNavBar, type BookNavBarProps, BookTableOfContents, type BookTableOfContentsProps, BookViewer, type BookViewerProps, Box, type BoxBg, type BoxMargin, type BoxPadding, type BoxProps, type BoxRounded, type BoxShadow, BranchingLogicBuilder, type BranchingLogicBuilderProps, type BranchingQuestion, type BranchingRule, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, CTABanner, type CTABannerBackground, type CTABannerProps, CalendarGrid, type CalendarGridProps, type CameraMode, CameraState, Canvas, Canvas2D, type Canvas2DProps, type CanvasItemShape, type CanvasItemStatus, type CanvasMode, type CanvasProps, Card$1 as Card, type CardAction, CardBody, CardContent, CardFooter, CardGrid, type CardGridGap, type CardGridProps, CardHeader, type CardProps$1 as CardProps, CardTitle, Carousel, type CarouselProps, CaseStudyCard, type CaseStudyCardProps, CaseStudyOrganism, type CaseStudyOrganismProps, Center, type CenterProps, Chart, type ChartDataPoint, ChartLegend, type ChartLegendItem, type ChartLegendProps, type ChartProps, type ChartSeries, type ChartType, ChatBar, type ChatBarProps, type ChatBarStatus, Checkbox, type CheckboxProps, type ChemistryArrow, type ChemistryAtom, type ChemistryBond, ChemistryCanvas, type ChemistryCanvasProps, ChoiceButton, type ChoiceButtonProps, Coachmark, type CoachmarkAnchor, type CoachmarkPlacement, type CoachmarkProps, CodeBlock, type CodeBlockProps, type CodeLanguage, CodeRunnerPanel, type CodeRunnerPanelProps, type CodeSimulationOutput, type CodeViewerAction, type CodeViewerFile, type CodeViewerMode, CollapsibleSection, type CollapsibleSectionProps, type Column, CommunityLinks, type CommunityLinksProps, type ConditionalContext, ConditionalWrapper, type ConditionalWrapperProps, ConfettiEffect, type ConfettiEffectProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogVariant, ConnectionBlock, type ConnectionBlockProps, Container, type ContainerProps, ContentRenderer, type ContentRendererProps, ContentSection, type ContentSectionBackground, type ContentSectionPadding, type ContentSectionProps, ControlButton, type ControlButtonProps, ControlGrid, type ControlGridButton, type ControlGridKind, type ControlGridProps, type CounterSize, CounterTemplate, type CounterTemplateProps, type CounterVariant, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DIAMOND_TOP_Y, type DPadDirection, DashboardGrid, type DashboardGridCell, type DashboardGridProps, DashboardLayout, type DashboardLayoutProps, DataGrid, type DataGridField, type DataGridItemAction, type DataGridProps, DataList, type DataListField, type DataListItemAction, type DataListProps, DataTable, type DataTableProps, DateRangePicker, type DateRangePickerPreset, type DateRangePickerProps, DateRangeSelector, type DateRangeSelectorOption, type DateRangeSelectorProps, DayCell, type DayCellProps, type DetailField, DetailPanel, type DetailPanelProps, type DetailSection, Dialog, type DialogProps, DialogueBubble, type DialogueBubbleProps, type DiffLine$1 as DiffLine, type DiffLineType, type DiffRevision, type DisplayStateProps, Divider, type DividerOrientation, type DividerProps, DocBreadcrumb, type DocBreadcrumbItem, type DocBreadcrumbProps, DocPagination, type DocPaginationLink, type DocPaginationProps, DocSearch, type DocSearchProps, type DocSearchResult, DocSidebar, type DocSidebarItem, type DocSidebarProps, DocTOC, type DocTOCItem, type DocTOCProps, type DocumentType, DocumentViewer, type DocumentViewerProps, StateMachineView as DomStateMachineVisualizer, type DotSize, type DotState, Drawer, type DrawerPosition, type DrawerProps, type DrawerSize, DrawerSlot, type DrawerSlotProps, ELEMENT_SELECTED_EVENT, EdgeDecoration, type EdgeDecorationProps, type EdgeSide, type EdgeVariant, EditorCheckbox, type EditorCheckboxProps, type EditorMode, EditorSelect, type EditorSelectProps, EditorSlider, type EditorSliderProps, EditorTextInput, type EditorTextInputProps, EditorToolbar, type EditorToolbarProps, EmptyState, type EmptyStateProps, EntityDisplayEvents, ErrorBoundary, type ErrorBoundaryProps, ErrorState, type ErrorStateProps, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FacingDirection, FeatureCard, type FeatureCardProps, type FeatureDetailPageEntity, FeatureDetailPageTemplate, type FeatureDetailPageTemplateProps, type FeatureDetailSection, FeatureGrid, FeatureGridOrganism, type FeatureGridOrganismProps, type FeatureGridProps, FileTree, type FileTreeNode, type FileTreeProps, type FilterDefinition, FilterGroup, type FilterGroupProps, type FilterPayload, FilterPill, type FilterPillProps, type FilterPillSize, type FilterPillVariant, Flex, type FlexProps, FlipCard, type FlipCardProps, FlipContainer, type FlipContainerProps, type FloatingAction, FloatingActionButton, type FloatingActionButtonProps, type FooterLinkColumn, type FooterLinkItem, Form, FormActions, type FormActionsProps, FormField, type FormFieldProps, FormLayout, type FormLayoutProps, type FormProps, FormSection$1 as FormSection, FormSectionHeader, type FormSectionHeaderProps, type FormSectionProps, GameAudioToggle, type GameAudioToggleProps, GameHud, type GameHudElement, type GameHudProps, type GameHudStat, GameIcon, type GameIconProps, GameMenu, type GameMenuProps, GameShell, type GameShellProps, GenericAppTemplate, type GenericAppTemplateProps, GeometricPattern, type GeometricPatternProps, GradientDivider, type GradientDividerProps, GraphCanvas, type GraphCanvasProps, type GraphEdge, type GraphNode, GraphView, type GraphViewEdge, type GraphViewNode, type GraphViewProps, type GraphicAnimation, Grid, GridPicker, type GridPickerCellSize, type GridPickerProps, type GridProps, HStack, type HStackProps, Header, type HeaderProps, HealthBar, type HealthBarProps, HeroOrganism, type HeroOrganismProps, HeroSection, type HeroSectionProps, type HighlightType, IDENTITY_BOOK_FIELDS, Icon, type IconAnimation, type IconInput, IconPicker, type IconPickerProps, type IconProps, type IconSize, ImageSource, InfiniteScrollSentinel, type InfiniteScrollSentinelProps, Input, InputGroup, type InputGroupProps, type InputProps, InstallBox, type InstallBoxProps, IsometricUnit, JazariStateMachine, type JazariStateMachineProps, JsonTreeEditor, type JsonTreeEditorProps, Label, type LabelProps, type LandingPageEntity, LandingPageTemplate, type LandingPageTemplateProps, type LawReference, LawReferenceTooltip, type LawReferenceTooltipProps, LearningCanvas, type LearningCanvasProps, type LearningPhysicsBody, type LearningPhysicsConstraint, type LearningPoint, type LearningShape, type LearningShapeType, type LessonSegment, type LessonUserProgress, Lightbox, type LightboxImage, type LightboxProps, type LikertOption, LikertScale, type LikertScaleProps, LineChart, type LineChartProps, LinkAction, List, type ListItem, type ListProps, LoadingState, type LoadingStateProps, type MapMarkerData, type MapRouteData, type MapRouteWaypoint, MapView, type MapViewProps, MarkdownContent, type MarkdownContentProps, MarketingFooter, type MarketingFooterProps, MarketingStatCard, type MarketingStatCardProps, MasterDetail, MasterDetailLayout, type MasterDetailLayoutProps, type MasterDetailProps, MathCanvas, type MathCanvasProps, type MathCurve, type MathPoint, type MathVector, type MatrixColumn, MatrixQuestion, type MatrixQuestionProps, type MatrixRow, MediaGallery, type MediaGalleryProps, type MediaItem, Menu, type MenuItem, type MenuOption, type MenuProps, Meter, type MeterAction, type MeterProps, type MeterThreshold, type MeterVariant, type MixedSegment, Modal, type ModalProps, type ModalSize, ModalSlot, type ModalSlotProps, ModuleCard, type ModuleCardProps, type NavItem, Navigation, type NavigationItem, type NavigationProps, NodeSlotEditor, type NodeSlotEditorProps, NotifyListener, NumberStepper, type NumberStepperProps, type NumberStepperSize, OnboardingSpotlight, type OnboardingSpotlightProps, type OptionConstraint, OptionConstraintGroup, type OptionConstraintGroupProps, type OptionConstraintOption, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, type OrbitalVisualizationProps, Overlay, type OverlayProps, type PageBreadcrumb, PageHeader, type PageHeaderProps, type PaginatePayload, Pagination, type PaginationProps, PatternTile, type PatternTileProps, type PatternVariant, PhysicsCanvas, type PhysicsCanvasProps, type PickerItem, type Platform, Point, Popover, type PopoverProps, PositionedCanvas, type PositionedCanvasProps, PricingCard, type PricingCardProps, PricingGrid, type PricingGridProps, PricingOrganism, type PricingOrganismProps, type PricingPageEntity, PricingPageTemplate, type PricingPageTemplateProps, ProgressBar, type ProgressBarColor, type ProgressBarProps, type ProgressBarVariant, ProgressDots, type ProgressDotsProps, type Projection, PropertyInspector, type PropertyInspectorProps, PullQuote, type PullQuoteProps, PullToRefresh, type PullToRefreshProps, type QrScanResult, QrScanner, type QrScannerProps, QuizBlock, type QuizBlockProps, Radio, type RadioProps, RangeSlider, type RangeSliderProps, type RangeSliderSize, ReflectionBlock, type ReflectionBlockProps, type RelationOption, RelationSelect, type RelationSelectProps, RepeatableFormSection, type RepeatableFormSectionProps, type RepeatableItem, ReplyTree, type ReplyTreeProps, ResolvedFrame, type RevealAnimation, type RevealTrigger, type RichBlock, RichBlockEditor, type RichBlockEditorProps, type RowAction, type RuleDefinition, type RuleOption, RuntimeDebugger, type RuntimeDebuggerProps, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, type ScaledDiagramProps, ScoreDisplay, type ScoreDisplayProps, SearchInput, type SearchInputProps, type SearchPayload, Section, SectionHeader, type SectionHeaderProps, type SectionProps, SegmentRenderer, type SegmentRendererProps, Select, type SelectOption, type SelectOptionGroup, type SelectPayload, type SelectProps, SequenceBar, type SequenceBarProps, ServiceCatalog, type ServiceCatalogItem, type ServiceCatalogProps, ShowcaseCard, type ShowcaseCardProps, ShowcaseOrganism, type ShowcaseOrganismProps, SidePanel, type SidePanelProps, type SidePlayer, Sidebar, type SidebarItem, type SidebarProps, SignaturePad, type SignaturePadProps, SimpleGrid, type SimpleGridProps, Skeleton, type SkeletonProps, type SkeletonVariant, SlotContent, SlotContentRenderer, type SlotItemData, SocialProof, type SocialProofItem, type SocialProofProps, type SortPayload, SortableList, type SortableListProps, Spacer, type SpacerProps, type SpacerSize, Sparkline, type SparklineColor, type SparklineProps, Spinner, type SpinnerProps, Split, SplitPane, type SplitPaneProps, type SplitProps, SplitSection, type SplitSectionProps, type SpotlightStep, SpriteFrameDims, SpriteSheetUrls, Stack, type StackAlign, type StackDirection, type StackGap, type StackJustify, type StackProps, StarRating, type StarRatingPrecision, type StarRatingProps, type StarRatingSize, StatBadge, type StatBadgeProps, StatCard, type StatCardProps, type StatCardSize, StatDisplay, type StatDisplayProps, StateGraph, type StateGraphProps, type StateGraphTransition, StateJsonView, type StateJsonViewProps, StateMachineView, type StateMachineViewProps, StateNode, type StateNodeProps, StatsGrid, type StatsGridProps, StatsOrganism, type StatsOrganismProps, StatusBar, type StatusBarProps, StatusDot, type StatusDotProps, type StatusDotSize, type StatusDotStatus, StepFlow, StepFlowOrganism, type StepFlowOrganismProps, type StepFlowProps, type StepItemProps, SubagentTracePanel, type SubagentTracePanelProps, SvgBranch, type SvgBranchProps, SvgConnection, type SvgConnectionProps, SvgFlow, type SvgFlowProps, SvgGrid, type SvgGridProps, SvgLobe, type SvgLobeProps, SvgMesh, type SvgMeshProps, SvgMorph, type SvgMorphProps, SvgNode, type SvgNodeProps, SvgPulse, type SvgPulseProps, SvgRing, type SvgRingProps, SvgShield, type SvgShieldProps, SvgStack, type SvgStackProps, type SwipeAction, SwipeableRow, type SwipeableRowProps, Switch, type SwitchProps, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, type TabDefinition, type TabItem, TabbedContainer, type TabbedContainerProps, TableView, type TableViewColumn, type TableViewProps, Tabs, type TabsProps, TagCloud, type TagCloudItem, type TagCloudProps, TagInput, type TagInputProps, TeamCard, type TeamCardProps, TeamOrganism, type TeamOrganismProps, type TeamUnitTraits, type TemplateProps, TerrainPalette, type TerrainPaletteProps, TextHighlight, type TextHighlightProps, Textarea, type TextareaProps, ThemeToggle, type ThemeToggleProps, type TileCoord, type TileLayout, TimeSlotCell, type TimeSlotCellProps, Timeline, type TimelineItem, type TimelineItemStatus, type TimelineProps, TimerDisplay, type TimerDisplayProps, Toast, type ToastProps, ToastSlot, type ToastSlotProps, type ToastVariant, Tooltip, type TooltipProps, type TraceDisclosureLevel, TraitFrame, type TraitFrameProps, TraitSlot, type TraitSlotProps, type TraitStateMachineDefinition, TraitStateViewer, type TraitStateViewerProps, type TraitTransition, TransitionArrow, type TransitionArrowProps, type TransitionBundle, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type TrendIndicatorSize, TypewriterText, type TypewriterTextProps, Typography, type TypographyProps, type TypographyVariant, UISlotComponent, UISlotRenderer, type UISlotRendererProps, UiError, UnitAnimationState, UploadDropZone, type UploadDropZoneProps, VStack, type VStackProps, type Vec2, VersionDiff, type DiffLine as VersionDiffLine, type VersionDiffProps, ViolationAlert, type ViolationAlertProps, type ViolationRecord, VoteStack, type VoteStackProps, WizardContainer, type WizardContainerProps, WizardNavigation, type WizardNavigationProps, WizardProgress, type WizardProgressProps, type WizardProgressStep, type WizardStep, boardEntity, bool, createUnitAnimationState, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, screenToIso, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, useAnchorRect, useAtlasSliceDataUrl, useCamera, useImageCache, useUnitSpriteAtlas, vec2 };
|
|
11247
|
+
export { ALL_PRESETS, AR_BOOK_FIELDS, type AboutPageEntity, AboutPageTemplate, type AboutPageTemplateProps, Accordion, type AccordionItem, type AccordionProps, Card as ActionCard, type CardProps as ActionCardProps, ActionPalette, type ActionPaletteProps, ActionTile, type ActionTileProps, ActivationBlock, type ActivationBlockProps, Alert, type AlertProps, type AlertVariant, type AlgorithmBar, AlgorithmCanvas, type AlgorithmCanvasProps, type AlgorithmCell, type AlgorithmPointer, AnimatedCounter, type AnimatedCounterProps, AnimatedGraphic, type AnimatedGraphicProps, AnimatedReveal, type AnimatedRevealProps, ArticleSection, type ArticleSectionProps, Aside, type AsideProps, AssetPicker, type AssetPickerProps, AtlasImage, type AtlasImageAsset, type AtlasImageProps, AtlasPanel, type AtlasPanelProps, AuthLayout, type AuthLayoutProps, Avatar, type AvatarProps, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, type BadgeVariant, BehaviorView, type BehaviorViewProps, BiologyCanvas, type BiologyCanvasProps, type BiologyEdge, type BiologyNode, type BlockType, type BloomLevel, BloomQuizBlock, type BloomQuizBlockProps, BookChapterView, type BookChapterViewProps, BookCoverPage, type BookCoverPageProps, type BookFieldMap, BookNavBar, type BookNavBarProps, BookTableOfContents, type BookTableOfContentsProps, BookViewer, type BookViewerProps, Box, type BoxBg, type BoxMargin, type BoxPadding, type BoxProps, type BoxRounded, type BoxShadow, BranchingLogicBuilder, type BranchingLogicBuilderProps, type BranchingQuestion, type BranchingRule, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, CTABanner, type CTABannerBackground, type CTABannerProps, CalendarGrid, type CalendarGridProps, type CameraMode, CameraState, Canvas, Canvas2D, type Canvas2DProps, type CanvasItemShape, type CanvasItemStatus, type CanvasMode, type CanvasProps, Card$1 as Card, type CardAction, CardBody, CardContent, CardFooter, CardGrid, type CardGridGap, type CardGridProps, CardHeader, type CardProps$1 as CardProps, CardTitle, Carousel, type CarouselProps, CaseStudyCard, type CaseStudyCardProps, CaseStudyOrganism, type CaseStudyOrganismProps, Center, type CenterProps, Chart, type ChartDataPoint, ChartLegend, type ChartLegendItem, type ChartLegendProps, type ChartProps, type ChartSeries, type ChartType, ChatBar, type ChatBarProps, type ChatBarStatus, Checkbox, type CheckboxProps, type ChemistryArrow, type ChemistryAtom, type ChemistryBond, ChemistryCanvas, type ChemistryCanvasProps, ChoiceButton, type ChoiceButtonProps, Coachmark, type CoachmarkAnchor, type CoachmarkPlacement, type CoachmarkProps, CodeBlock, type CodeBlockProps, type CodeLanguage, CodeRunnerPanel, type CodeRunnerPanelProps, type CodeSimulationOutput, type CodeViewerAction, type CodeViewerFile, type CodeViewerMode, CollapsibleSection, type CollapsibleSectionProps, type Column, CommunityLinks, type CommunityLinksProps, type ConditionalContext, ConditionalWrapper, type ConditionalWrapperProps, ConfettiEffect, type ConfettiEffectProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogVariant, ConnectionBlock, type ConnectionBlockProps, Container, type ContainerProps, ContentRenderer, type ContentRendererProps, ContentSection, type ContentSectionBackground, type ContentSectionPadding, type ContentSectionProps, ControlButton, type ControlButtonProps, ControlGrid, type ControlGridButton, type ControlGridKind, type ControlGridProps, type CounterSize, CounterTemplate, type CounterTemplateProps, type CounterVariant, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DIAMOND_TOP_Y, type DPadDirection, DashboardGrid, type DashboardGridCell, type DashboardGridProps, DashboardLayout, type DashboardLayoutProps, DataGrid, type DataGridField, type DataGridItemAction, type DataGridProps, DataList, type DataListField, type DataListItemAction, type DataListProps, DataTable, type DataTableProps, DateRangePicker, type DateRangePickerPreset, type DateRangePickerProps, DateRangeSelector, type DateRangeSelectorOption, type DateRangeSelectorProps, DayCell, type DayCellProps, type DetailField, DetailPanel, type DetailPanelProps, type DetailSection, Dialog, type DialogProps, DialogueBubble, type DialogueBubbleProps, type DiffLine$1 as DiffLine, type DiffLineType, type DiffRevision, type DisplayStateProps, Divider, type DividerOrientation, type DividerProps, DocBreadcrumb, type DocBreadcrumbItem, type DocBreadcrumbProps, DocPagination, type DocPaginationLink, type DocPaginationProps, DocSearch, type DocSearchProps, type DocSearchResult, DocSidebar, type DocSidebarItem, type DocSidebarProps, DocTOC, type DocTOCItem, type DocTOCProps, type DocumentType, DocumentViewer, type DocumentViewerProps, StateMachineView as DomStateMachineVisualizer, type DotSize, type DotState, Drawer, type DrawerPosition, type DrawerProps, type DrawerSize, DrawerSlot, type DrawerSlotProps, ELEMENT_SELECTED_EVENT, EdgeDecoration, type EdgeDecorationProps, type EdgeSide, type EdgeVariant, EditorCheckbox, type EditorCheckboxProps, type EditorMode, EditorSelect, type EditorSelectProps, EditorSlider, type EditorSliderProps, EditorTextInput, type EditorTextInputProps, EditorToolbar, type EditorToolbarProps, EmptyState, type EmptyStateProps, EntityDisplayEvents, ErrorBoundary, type ErrorBoundaryProps, ErrorState, type ErrorStateProps, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FacingDirection, FeatureCard, type FeatureCardProps, type FeatureDetailPageEntity, FeatureDetailPageTemplate, type FeatureDetailPageTemplateProps, type FeatureDetailSection, FeatureGrid, FeatureGridOrganism, type FeatureGridOrganismProps, type FeatureGridProps, FileTree, type FileTreeNode, type FileTreeProps, type FilterDefinition, FilterGroup, type FilterGroupProps, type FilterPayload, FilterPill, type FilterPillProps, type FilterPillSize, type FilterPillVariant, Flex, type FlexProps, FlipCard, type FlipCardProps, FlipContainer, type FlipContainerProps, type FloatingAction, FloatingActionButton, type FloatingActionButtonProps, type FooterLinkColumn, type FooterLinkItem, Form, FormActions, type FormActionsProps, FormField, type FormFieldProps, FormLayout, type FormLayoutProps, type FormProps, FormSection$1 as FormSection, FormSectionHeader, type FormSectionHeaderProps, type FormSectionProps, GameAudioToggle, type GameAudioToggleProps, GameHud, type GameHudElement, type GameHudProps, type GameHudStat, GameIcon, type GameIconProps, GameMenu, type GameMenuProps, GameShell, type GameShellProps, GenericAppTemplate, type GenericAppTemplateProps, GeometricPattern, type GeometricPatternProps, GradientDivider, type GradientDividerProps, GraphCanvas, type GraphCanvasProps, type GraphEdge, type GraphNode, type GraphSimilarity, GraphView, type GraphViewEdge, type GraphViewNode, type GraphViewProps, type GraphicAnimation, Grid, GridPicker, type GridPickerCellSize, type GridPickerProps, type GridProps, HStack, type HStackProps, Header, type HeaderProps, HealthBar, type HealthBarProps, HeroOrganism, type HeroOrganismProps, HeroSection, type HeroSectionProps, type HighlightType, IDENTITY_BOOK_FIELDS, Icon, type IconAnimation, type IconInput, IconPicker, type IconPickerProps, type IconProps, type IconSize, ImageSource, InfiniteScrollSentinel, type InfiniteScrollSentinelProps, Input, InputGroup, type InputGroupProps, type InputProps, InstallBox, type InstallBoxProps, IsometricUnit, JazariStateMachine, type JazariStateMachineProps, JsonTreeEditor, type JsonTreeEditorProps, Label, type LabelProps, type LandingPageEntity, LandingPageTemplate, type LandingPageTemplateProps, type LawReference, LawReferenceTooltip, type LawReferenceTooltipProps, LearningCanvas, type LearningCanvasProps, type LearningPhysicsBody, type LearningPhysicsConstraint, type LearningPoint, type LearningShape, type LearningShapeType, type LessonSegment, type LessonUserProgress, Lightbox, type LightboxImage, type LightboxProps, type LikertOption, LikertScale, type LikertScaleProps, LineChart, type LineChartProps, LinkAction, List, type ListItem, type ListProps, LoadingState, type LoadingStateProps, type MapMarkerData, type MapRouteData, type MapRouteWaypoint, MapView, type MapViewProps, MarkdownContent, type MarkdownContentProps, MarketingFooter, type MarketingFooterProps, MarketingStatCard, type MarketingStatCardProps, MasterDetail, MasterDetailLayout, type MasterDetailLayoutProps, type MasterDetailProps, MathCanvas, type MathCanvasProps, type MathCurve, type MathPoint, type MathVector, type MatrixColumn, MatrixQuestion, type MatrixQuestionProps, type MatrixRow, MediaGallery, type MediaGalleryProps, type MediaItem, Menu, type MenuItem, type MenuOption, type MenuProps, Meter, type MeterAction, type MeterProps, type MeterThreshold, type MeterVariant, type MixedSegment, Modal, type ModalProps, type ModalSize, ModalSlot, type ModalSlotProps, ModuleCard, type ModuleCardProps, type NavItem, Navigation, type NavigationItem, type NavigationProps, NodeSlotEditor, type NodeSlotEditorProps, NotifyListener, NumberStepper, type NumberStepperProps, type NumberStepperSize, OnboardingSpotlight, type OnboardingSpotlightProps, type OptionConstraint, OptionConstraintGroup, type OptionConstraintGroupProps, type OptionConstraintOption, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, type OrbitalVisualizationProps, Overlay, type OverlayProps, type PageBreadcrumb, PageHeader, type PageHeaderProps, type PaginatePayload, Pagination, type PaginationProps, PatternTile, type PatternTileProps, type PatternVariant, PhysicsCanvas, type PhysicsCanvasProps, type PickerItem, type Platform, Point, Popover, type PopoverProps, PositionedCanvas, type PositionedCanvasProps, PricingCard, type PricingCardProps, PricingGrid, type PricingGridProps, PricingOrganism, type PricingOrganismProps, type PricingPageEntity, PricingPageTemplate, type PricingPageTemplateProps, ProgressBar, type ProgressBarColor, type ProgressBarProps, type ProgressBarVariant, ProgressDots, type ProgressDotsProps, type Projection, PropertyInspector, type PropertyInspectorProps, PullQuote, type PullQuoteProps, PullToRefresh, type PullToRefreshProps, type QrScanResult, QrScanner, type QrScannerProps, QuizBlock, type QuizBlockProps, Radio, type RadioProps, RangeSlider, type RangeSliderProps, type RangeSliderSize, ReflectionBlock, type ReflectionBlockProps, type RelationOption, RelationSelect, type RelationSelectProps, RepeatableFormSection, type RepeatableFormSectionProps, type RepeatableItem, ReplyTree, type ReplyTreeProps, ResolvedFrame, type RevealAnimation, type RevealTrigger, type RichBlock, RichBlockEditor, type RichBlockEditorProps, type RowAction, type RuleDefinition, type RuleOption, RuntimeDebugger, type RuntimeDebuggerProps, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, type ScaledDiagramProps, ScoreDisplay, type ScoreDisplayProps, SearchInput, type SearchInputProps, type SearchPayload, Section, SectionHeader, type SectionHeaderProps, type SectionProps, SegmentRenderer, type SegmentRendererProps, Select, type SelectOption, type SelectOptionGroup, type SelectPayload, type SelectProps, SequenceBar, type SequenceBarProps, ServiceCatalog, type ServiceCatalogItem, type ServiceCatalogProps, ShowcaseCard, type ShowcaseCardProps, ShowcaseOrganism, type ShowcaseOrganismProps, SidePanel, type SidePanelProps, type SidePlayer, Sidebar, type SidebarItem, type SidebarProps, SignaturePad, type SignaturePadProps, SimpleGrid, type SimpleGridProps, Skeleton, type SkeletonProps, type SkeletonVariant, SlotContent, SlotContentRenderer, type SlotItemData, SocialProof, type SocialProofItem, type SocialProofProps, type SortPayload, SortableList, type SortableListProps, Spacer, type SpacerProps, type SpacerSize, Sparkline, type SparklineColor, type SparklineProps, Spinner, type SpinnerProps, Split, SplitPane, type SplitPaneProps, type SplitProps, SplitSection, type SplitSectionProps, type SpotlightStep, SpriteFrameDims, SpriteSheetUrls, Stack, type StackAlign, type StackDirection, type StackGap, type StackJustify, type StackProps, StarRating, type StarRatingPrecision, type StarRatingProps, type StarRatingSize, StatBadge, type StatBadgeProps, StatCard, type StatCardProps, type StatCardSize, StatDisplay, type StatDisplayProps, StateGraph, type StateGraphProps, type StateGraphTransition, StateJsonView, type StateJsonViewProps, StateMachineView, type StateMachineViewProps, StateNode, type StateNodeProps, StatsGrid, type StatsGridProps, StatsOrganism, type StatsOrganismProps, StatusBar, type StatusBarProps, StatusDot, type StatusDotProps, type StatusDotSize, type StatusDotStatus, StepFlow, StepFlowOrganism, type StepFlowOrganismProps, type StepFlowProps, type StepItemProps, SubagentTracePanel, type SubagentTracePanelProps, SvgBranch, type SvgBranchProps, SvgConnection, type SvgConnectionProps, SvgFlow, type SvgFlowProps, SvgGrid, type SvgGridProps, SvgLobe, type SvgLobeProps, SvgMesh, type SvgMeshProps, SvgMorph, type SvgMorphProps, SvgNode, type SvgNodeProps, SvgPulse, type SvgPulseProps, SvgRing, type SvgRingProps, SvgShield, type SvgShieldProps, SvgStack, type SvgStackProps, type SwipeAction, SwipeableRow, type SwipeableRowProps, Switch, type SwitchProps, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, type TabDefinition, type TabItem, TabbedContainer, type TabbedContainerProps, TableView, type TableViewColumn, type TableViewProps, Tabs, type TabsProps, TagCloud, type TagCloudItem, type TagCloudProps, TagInput, type TagInputProps, TeamCard, type TeamCardProps, TeamOrganism, type TeamOrganismProps, type TeamUnitTraits, type TemplateProps, TerrainPalette, type TerrainPaletteProps, TextHighlight, type TextHighlightProps, Textarea, type TextareaProps, ThemeToggle, type ThemeToggleProps, type TileCoord, type TileLayout, TimeSlotCell, type TimeSlotCellProps, Timeline, type TimelineItem, type TimelineItemStatus, type TimelineProps, TimerDisplay, type TimerDisplayProps, Toast, type ToastProps, ToastSlot, type ToastSlotProps, type ToastVariant, Tooltip, type TooltipProps, type TraceDisclosureLevel, TraitFrame, type TraitFrameProps, TraitSlot, type TraitSlotProps, type TraitStateMachineDefinition, TraitStateViewer, type TraitStateViewerProps, type TraitTransition, TransitionArrow, type TransitionArrowProps, type TransitionBundle, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type TrendIndicatorSize, TypewriterText, type TypewriterTextProps, Typography, type TypographyProps, type TypographyVariant, UISlotComponent, UISlotRenderer, type UISlotRendererProps, UiError, UnitAnimationState, UploadDropZone, type UploadDropZoneProps, VStack, type VStackProps, type Vec2, VersionDiff, type DiffLine as VersionDiffLine, type VersionDiffProps, ViolationAlert, type ViolationAlertProps, type ViolationRecord, VoteStack, type VoteStackProps, WizardContainer, type WizardContainerProps, WizardNavigation, type WizardNavigationProps, WizardProgress, type WizardProgressProps, type WizardProgressStep, type WizardStep, boardEntity, bool, createUnitAnimationState, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, screenToIso, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, useAnchorRect, useAtlasSliceDataUrl, useCamera, useImageCache, useUnitSpriteAtlas, vec2 };
|
|
@@ -8831,6 +8831,18 @@ interface GraphEdge {
|
|
|
8831
8831
|
weight?: number;
|
|
8832
8832
|
color?: string;
|
|
8833
8833
|
}
|
|
8834
|
+
/**
|
|
8835
|
+
* All-pairs similarity (cosine 0–1) used ONLY for layout: ideal pair distance
|
|
8836
|
+
* is derived from similarity (higher ⇒ closer). Never drawn — `edges` remain
|
|
8837
|
+
* the only rendered links. When provided it supersedes edge-weight attraction;
|
|
8838
|
+
* when omitted, edges drive layout as before.
|
|
8839
|
+
*/
|
|
8840
|
+
interface GraphSimilarity {
|
|
8841
|
+
source: string;
|
|
8842
|
+
target: string;
|
|
8843
|
+
/** Cosine similarity in [0,1]; higher ⇒ closer. */
|
|
8844
|
+
weight: number;
|
|
8845
|
+
}
|
|
8834
8846
|
interface GraphAction {
|
|
8835
8847
|
label: string;
|
|
8836
8848
|
event?: string;
|
|
@@ -8842,8 +8854,14 @@ interface GraphCanvasProps {
|
|
|
8842
8854
|
title?: string;
|
|
8843
8855
|
/** Graph nodes */
|
|
8844
8856
|
nodes?: readonly GraphNode[];
|
|
8845
|
-
/** Graph edges */
|
|
8857
|
+
/** Graph edges (the only rendered links) */
|
|
8846
8858
|
edges?: readonly GraphEdge[];
|
|
8859
|
+
/**
|
|
8860
|
+
* All-pairs similarity (cosine 0–1) used ONLY for layout: ideal pair
|
|
8861
|
+
* distance = linkDistance × (1 − cosine). Never drawn. When provided it
|
|
8862
|
+
* supersedes edge-weight attraction; when omitted, edges drive layout.
|
|
8863
|
+
*/
|
|
8864
|
+
similarity?: readonly GraphSimilarity[];
|
|
8847
8865
|
/** Canvas height */
|
|
8848
8866
|
height?: number;
|
|
8849
8867
|
/** Show node labels */
|
|
@@ -11226,4 +11244,4 @@ interface AboutPageTemplateProps extends TemplateProps<AboutPageEntity> {
|
|
|
11226
11244
|
}
|
|
11227
11245
|
declare const AboutPageTemplate: React__default.FC<AboutPageTemplateProps>;
|
|
11228
11246
|
|
|
11229
|
-
export { ALL_PRESETS, AR_BOOK_FIELDS, type AboutPageEntity, AboutPageTemplate, type AboutPageTemplateProps, Accordion, type AccordionItem, type AccordionProps, Card as ActionCard, type CardProps as ActionCardProps, ActionPalette, type ActionPaletteProps, ActionTile, type ActionTileProps, ActivationBlock, type ActivationBlockProps, Alert, type AlertProps, type AlertVariant, type AlgorithmBar, AlgorithmCanvas, type AlgorithmCanvasProps, type AlgorithmCell, type AlgorithmPointer, AnimatedCounter, type AnimatedCounterProps, AnimatedGraphic, type AnimatedGraphicProps, AnimatedReveal, type AnimatedRevealProps, ArticleSection, type ArticleSectionProps, Aside, type AsideProps, AssetPicker, type AssetPickerProps, AtlasImage, type AtlasImageAsset, type AtlasImageProps, AtlasPanel, type AtlasPanelProps, AuthLayout, type AuthLayoutProps, Avatar, type AvatarProps, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, type BadgeVariant, BehaviorView, type BehaviorViewProps, BiologyCanvas, type BiologyCanvasProps, type BiologyEdge, type BiologyNode, type BlockType, type BloomLevel, BloomQuizBlock, type BloomQuizBlockProps, BookChapterView, type BookChapterViewProps, BookCoverPage, type BookCoverPageProps, type BookFieldMap, BookNavBar, type BookNavBarProps, BookTableOfContents, type BookTableOfContentsProps, BookViewer, type BookViewerProps, Box, type BoxBg, type BoxMargin, type BoxPadding, type BoxProps, type BoxRounded, type BoxShadow, BranchingLogicBuilder, type BranchingLogicBuilderProps, type BranchingQuestion, type BranchingRule, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, CTABanner, type CTABannerBackground, type CTABannerProps, CalendarGrid, type CalendarGridProps, type CameraMode, CameraState, Canvas, Canvas2D, type Canvas2DProps, type CanvasItemShape, type CanvasItemStatus, type CanvasMode, type CanvasProps, Card$1 as Card, type CardAction, CardBody, CardContent, CardFooter, CardGrid, type CardGridGap, type CardGridProps, CardHeader, type CardProps$1 as CardProps, CardTitle, Carousel, type CarouselProps, CaseStudyCard, type CaseStudyCardProps, CaseStudyOrganism, type CaseStudyOrganismProps, Center, type CenterProps, Chart, type ChartDataPoint, ChartLegend, type ChartLegendItem, type ChartLegendProps, type ChartProps, type ChartSeries, type ChartType, ChatBar, type ChatBarProps, type ChatBarStatus, Checkbox, type CheckboxProps, type ChemistryArrow, type ChemistryAtom, type ChemistryBond, ChemistryCanvas, type ChemistryCanvasProps, ChoiceButton, type ChoiceButtonProps, Coachmark, type CoachmarkAnchor, type CoachmarkPlacement, type CoachmarkProps, CodeBlock, type CodeBlockProps, type CodeLanguage, CodeRunnerPanel, type CodeRunnerPanelProps, type CodeSimulationOutput, type CodeViewerAction, type CodeViewerFile, type CodeViewerMode, CollapsibleSection, type CollapsibleSectionProps, type Column, CommunityLinks, type CommunityLinksProps, type ConditionalContext, ConditionalWrapper, type ConditionalWrapperProps, ConfettiEffect, type ConfettiEffectProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogVariant, ConnectionBlock, type ConnectionBlockProps, Container, type ContainerProps, ContentRenderer, type ContentRendererProps, ContentSection, type ContentSectionBackground, type ContentSectionPadding, type ContentSectionProps, ControlButton, type ControlButtonProps, ControlGrid, type ControlGridButton, type ControlGridKind, type ControlGridProps, type CounterSize, CounterTemplate, type CounterTemplateProps, type CounterVariant, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DIAMOND_TOP_Y, type DPadDirection, DashboardGrid, type DashboardGridCell, type DashboardGridProps, DashboardLayout, type DashboardLayoutProps, DataGrid, type DataGridField, type DataGridItemAction, type DataGridProps, DataList, type DataListField, type DataListItemAction, type DataListProps, DataTable, type DataTableProps, DateRangePicker, type DateRangePickerPreset, type DateRangePickerProps, DateRangeSelector, type DateRangeSelectorOption, type DateRangeSelectorProps, DayCell, type DayCellProps, type DetailField, DetailPanel, type DetailPanelProps, type DetailSection, Dialog, type DialogProps, DialogueBubble, type DialogueBubbleProps, type DiffLine$1 as DiffLine, type DiffLineType, type DiffRevision, type DisplayStateProps, Divider, type DividerOrientation, type DividerProps, DocBreadcrumb, type DocBreadcrumbItem, type DocBreadcrumbProps, DocPagination, type DocPaginationLink, type DocPaginationProps, DocSearch, type DocSearchProps, type DocSearchResult, DocSidebar, type DocSidebarItem, type DocSidebarProps, DocTOC, type DocTOCItem, type DocTOCProps, type DocumentType, DocumentViewer, type DocumentViewerProps, StateMachineView as DomStateMachineVisualizer, type DotSize, type DotState, Drawer, type DrawerPosition, type DrawerProps, type DrawerSize, DrawerSlot, type DrawerSlotProps, ELEMENT_SELECTED_EVENT, EdgeDecoration, type EdgeDecorationProps, type EdgeSide, type EdgeVariant, EditorCheckbox, type EditorCheckboxProps, type EditorMode, EditorSelect, type EditorSelectProps, EditorSlider, type EditorSliderProps, EditorTextInput, type EditorTextInputProps, EditorToolbar, type EditorToolbarProps, EmptyState, type EmptyStateProps, EntityDisplayEvents, ErrorBoundary, type ErrorBoundaryProps, ErrorState, type ErrorStateProps, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FacingDirection, FeatureCard, type FeatureCardProps, type FeatureDetailPageEntity, FeatureDetailPageTemplate, type FeatureDetailPageTemplateProps, type FeatureDetailSection, FeatureGrid, FeatureGridOrganism, type FeatureGridOrganismProps, type FeatureGridProps, FileTree, type FileTreeNode, type FileTreeProps, type FilterDefinition, FilterGroup, type FilterGroupProps, type FilterPayload, FilterPill, type FilterPillProps, type FilterPillSize, type FilterPillVariant, Flex, type FlexProps, FlipCard, type FlipCardProps, FlipContainer, type FlipContainerProps, type FloatingAction, FloatingActionButton, type FloatingActionButtonProps, type FooterLinkColumn, type FooterLinkItem, Form, FormActions, type FormActionsProps, FormField, type FormFieldProps, FormLayout, type FormLayoutProps, type FormProps, FormSection$1 as FormSection, FormSectionHeader, type FormSectionHeaderProps, type FormSectionProps, GameAudioToggle, type GameAudioToggleProps, GameHud, type GameHudElement, type GameHudProps, type GameHudStat, GameIcon, type GameIconProps, GameMenu, type GameMenuProps, GameShell, type GameShellProps, GenericAppTemplate, type GenericAppTemplateProps, GeometricPattern, type GeometricPatternProps, GradientDivider, type GradientDividerProps, GraphCanvas, type GraphCanvasProps, type GraphEdge, type GraphNode, GraphView, type GraphViewEdge, type GraphViewNode, type GraphViewProps, type GraphicAnimation, Grid, GridPicker, type GridPickerCellSize, type GridPickerProps, type GridProps, HStack, type HStackProps, Header, type HeaderProps, HealthBar, type HealthBarProps, HeroOrganism, type HeroOrganismProps, HeroSection, type HeroSectionProps, type HighlightType, IDENTITY_BOOK_FIELDS, Icon, type IconAnimation, type IconInput, IconPicker, type IconPickerProps, type IconProps, type IconSize, ImageSource, InfiniteScrollSentinel, type InfiniteScrollSentinelProps, Input, InputGroup, type InputGroupProps, type InputProps, InstallBox, type InstallBoxProps, IsometricUnit, JazariStateMachine, type JazariStateMachineProps, JsonTreeEditor, type JsonTreeEditorProps, Label, type LabelProps, type LandingPageEntity, LandingPageTemplate, type LandingPageTemplateProps, type LawReference, LawReferenceTooltip, type LawReferenceTooltipProps, LearningCanvas, type LearningCanvasProps, type LearningPhysicsBody, type LearningPhysicsConstraint, type LearningPoint, type LearningShape, type LearningShapeType, type LessonSegment, type LessonUserProgress, Lightbox, type LightboxImage, type LightboxProps, type LikertOption, LikertScale, type LikertScaleProps, LineChart, type LineChartProps, LinkAction, List, type ListItem, type ListProps, LoadingState, type LoadingStateProps, type MapMarkerData, type MapRouteData, type MapRouteWaypoint, MapView, type MapViewProps, MarkdownContent, type MarkdownContentProps, MarketingFooter, type MarketingFooterProps, MarketingStatCard, type MarketingStatCardProps, MasterDetail, MasterDetailLayout, type MasterDetailLayoutProps, type MasterDetailProps, MathCanvas, type MathCanvasProps, type MathCurve, type MathPoint, type MathVector, type MatrixColumn, MatrixQuestion, type MatrixQuestionProps, type MatrixRow, MediaGallery, type MediaGalleryProps, type MediaItem, Menu, type MenuItem, type MenuOption, type MenuProps, Meter, type MeterAction, type MeterProps, type MeterThreshold, type MeterVariant, type MixedSegment, Modal, type ModalProps, type ModalSize, ModalSlot, type ModalSlotProps, ModuleCard, type ModuleCardProps, type NavItem, Navigation, type NavigationItem, type NavigationProps, NodeSlotEditor, type NodeSlotEditorProps, NotifyListener, NumberStepper, type NumberStepperProps, type NumberStepperSize, OnboardingSpotlight, type OnboardingSpotlightProps, type OptionConstraint, OptionConstraintGroup, type OptionConstraintGroupProps, type OptionConstraintOption, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, type OrbitalVisualizationProps, Overlay, type OverlayProps, type PageBreadcrumb, PageHeader, type PageHeaderProps, type PaginatePayload, Pagination, type PaginationProps, PatternTile, type PatternTileProps, type PatternVariant, PhysicsCanvas, type PhysicsCanvasProps, type PickerItem, type Platform, Point, Popover, type PopoverProps, PositionedCanvas, type PositionedCanvasProps, PricingCard, type PricingCardProps, PricingGrid, type PricingGridProps, PricingOrganism, type PricingOrganismProps, type PricingPageEntity, PricingPageTemplate, type PricingPageTemplateProps, ProgressBar, type ProgressBarColor, type ProgressBarProps, type ProgressBarVariant, ProgressDots, type ProgressDotsProps, type Projection, PropertyInspector, type PropertyInspectorProps, PullQuote, type PullQuoteProps, PullToRefresh, type PullToRefreshProps, type QrScanResult, QrScanner, type QrScannerProps, QuizBlock, type QuizBlockProps, Radio, type RadioProps, RangeSlider, type RangeSliderProps, type RangeSliderSize, ReflectionBlock, type ReflectionBlockProps, type RelationOption, RelationSelect, type RelationSelectProps, RepeatableFormSection, type RepeatableFormSectionProps, type RepeatableItem, ReplyTree, type ReplyTreeProps, ResolvedFrame, type RevealAnimation, type RevealTrigger, type RichBlock, RichBlockEditor, type RichBlockEditorProps, type RowAction, type RuleDefinition, type RuleOption, RuntimeDebugger, type RuntimeDebuggerProps, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, type ScaledDiagramProps, ScoreDisplay, type ScoreDisplayProps, SearchInput, type SearchInputProps, type SearchPayload, Section, SectionHeader, type SectionHeaderProps, type SectionProps, SegmentRenderer, type SegmentRendererProps, Select, type SelectOption, type SelectOptionGroup, type SelectPayload, type SelectProps, SequenceBar, type SequenceBarProps, ServiceCatalog, type ServiceCatalogItem, type ServiceCatalogProps, ShowcaseCard, type ShowcaseCardProps, ShowcaseOrganism, type ShowcaseOrganismProps, SidePanel, type SidePanelProps, type SidePlayer, Sidebar, type SidebarItem, type SidebarProps, SignaturePad, type SignaturePadProps, SimpleGrid, type SimpleGridProps, Skeleton, type SkeletonProps, type SkeletonVariant, SlotContent, SlotContentRenderer, type SlotItemData, SocialProof, type SocialProofItem, type SocialProofProps, type SortPayload, SortableList, type SortableListProps, Spacer, type SpacerProps, type SpacerSize, Sparkline, type SparklineColor, type SparklineProps, Spinner, type SpinnerProps, Split, SplitPane, type SplitPaneProps, type SplitProps, SplitSection, type SplitSectionProps, type SpotlightStep, SpriteFrameDims, SpriteSheetUrls, Stack, type StackAlign, type StackDirection, type StackGap, type StackJustify, type StackProps, StarRating, type StarRatingPrecision, type StarRatingProps, type StarRatingSize, StatBadge, type StatBadgeProps, StatCard, type StatCardProps, type StatCardSize, StatDisplay, type StatDisplayProps, StateGraph, type StateGraphProps, type StateGraphTransition, StateJsonView, type StateJsonViewProps, StateMachineView, type StateMachineViewProps, StateNode, type StateNodeProps, StatsGrid, type StatsGridProps, StatsOrganism, type StatsOrganismProps, StatusBar, type StatusBarProps, StatusDot, type StatusDotProps, type StatusDotSize, type StatusDotStatus, StepFlow, StepFlowOrganism, type StepFlowOrganismProps, type StepFlowProps, type StepItemProps, SubagentTracePanel, type SubagentTracePanelProps, SvgBranch, type SvgBranchProps, SvgConnection, type SvgConnectionProps, SvgFlow, type SvgFlowProps, SvgGrid, type SvgGridProps, SvgLobe, type SvgLobeProps, SvgMesh, type SvgMeshProps, SvgMorph, type SvgMorphProps, SvgNode, type SvgNodeProps, SvgPulse, type SvgPulseProps, SvgRing, type SvgRingProps, SvgShield, type SvgShieldProps, SvgStack, type SvgStackProps, type SwipeAction, SwipeableRow, type SwipeableRowProps, Switch, type SwitchProps, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, type TabDefinition, type TabItem, TabbedContainer, type TabbedContainerProps, TableView, type TableViewColumn, type TableViewProps, Tabs, type TabsProps, TagCloud, type TagCloudItem, type TagCloudProps, TagInput, type TagInputProps, TeamCard, type TeamCardProps, TeamOrganism, type TeamOrganismProps, type TeamUnitTraits, type TemplateProps, TerrainPalette, type TerrainPaletteProps, TextHighlight, type TextHighlightProps, Textarea, type TextareaProps, ThemeToggle, type ThemeToggleProps, type TileCoord, type TileLayout, TimeSlotCell, type TimeSlotCellProps, Timeline, type TimelineItem, type TimelineItemStatus, type TimelineProps, TimerDisplay, type TimerDisplayProps, Toast, type ToastProps, ToastSlot, type ToastSlotProps, type ToastVariant, Tooltip, type TooltipProps, type TraceDisclosureLevel, TraitFrame, type TraitFrameProps, TraitSlot, type TraitSlotProps, type TraitStateMachineDefinition, TraitStateViewer, type TraitStateViewerProps, type TraitTransition, TransitionArrow, type TransitionArrowProps, type TransitionBundle, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type TrendIndicatorSize, TypewriterText, type TypewriterTextProps, Typography, type TypographyProps, type TypographyVariant, UISlotComponent, UISlotRenderer, type UISlotRendererProps, UiError, UnitAnimationState, UploadDropZone, type UploadDropZoneProps, VStack, type VStackProps, type Vec2, VersionDiff, type DiffLine as VersionDiffLine, type VersionDiffProps, ViolationAlert, type ViolationAlertProps, type ViolationRecord, VoteStack, type VoteStackProps, WizardContainer, type WizardContainerProps, WizardNavigation, type WizardNavigationProps, WizardProgress, type WizardProgressProps, type WizardProgressStep, type WizardStep, boardEntity, bool, createUnitAnimationState, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, screenToIso, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, useAnchorRect, useAtlasSliceDataUrl, useCamera, useImageCache, useUnitSpriteAtlas, vec2 };
|
|
11247
|
+
export { ALL_PRESETS, AR_BOOK_FIELDS, type AboutPageEntity, AboutPageTemplate, type AboutPageTemplateProps, Accordion, type AccordionItem, type AccordionProps, Card as ActionCard, type CardProps as ActionCardProps, ActionPalette, type ActionPaletteProps, ActionTile, type ActionTileProps, ActivationBlock, type ActivationBlockProps, Alert, type AlertProps, type AlertVariant, type AlgorithmBar, AlgorithmCanvas, type AlgorithmCanvasProps, type AlgorithmCell, type AlgorithmPointer, AnimatedCounter, type AnimatedCounterProps, AnimatedGraphic, type AnimatedGraphicProps, AnimatedReveal, type AnimatedRevealProps, ArticleSection, type ArticleSectionProps, Aside, type AsideProps, AssetPicker, type AssetPickerProps, AtlasImage, type AtlasImageAsset, type AtlasImageProps, AtlasPanel, type AtlasPanelProps, AuthLayout, type AuthLayoutProps, Avatar, type AvatarProps, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, type BadgeVariant, BehaviorView, type BehaviorViewProps, BiologyCanvas, type BiologyCanvasProps, type BiologyEdge, type BiologyNode, type BlockType, type BloomLevel, BloomQuizBlock, type BloomQuizBlockProps, BookChapterView, type BookChapterViewProps, BookCoverPage, type BookCoverPageProps, type BookFieldMap, BookNavBar, type BookNavBarProps, BookTableOfContents, type BookTableOfContentsProps, BookViewer, type BookViewerProps, Box, type BoxBg, type BoxMargin, type BoxPadding, type BoxProps, type BoxRounded, type BoxShadow, BranchingLogicBuilder, type BranchingLogicBuilderProps, type BranchingQuestion, type BranchingRule, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, CTABanner, type CTABannerBackground, type CTABannerProps, CalendarGrid, type CalendarGridProps, type CameraMode, CameraState, Canvas, Canvas2D, type Canvas2DProps, type CanvasItemShape, type CanvasItemStatus, type CanvasMode, type CanvasProps, Card$1 as Card, type CardAction, CardBody, CardContent, CardFooter, CardGrid, type CardGridGap, type CardGridProps, CardHeader, type CardProps$1 as CardProps, CardTitle, Carousel, type CarouselProps, CaseStudyCard, type CaseStudyCardProps, CaseStudyOrganism, type CaseStudyOrganismProps, Center, type CenterProps, Chart, type ChartDataPoint, ChartLegend, type ChartLegendItem, type ChartLegendProps, type ChartProps, type ChartSeries, type ChartType, ChatBar, type ChatBarProps, type ChatBarStatus, Checkbox, type CheckboxProps, type ChemistryArrow, type ChemistryAtom, type ChemistryBond, ChemistryCanvas, type ChemistryCanvasProps, ChoiceButton, type ChoiceButtonProps, Coachmark, type CoachmarkAnchor, type CoachmarkPlacement, type CoachmarkProps, CodeBlock, type CodeBlockProps, type CodeLanguage, CodeRunnerPanel, type CodeRunnerPanelProps, type CodeSimulationOutput, type CodeViewerAction, type CodeViewerFile, type CodeViewerMode, CollapsibleSection, type CollapsibleSectionProps, type Column, CommunityLinks, type CommunityLinksProps, type ConditionalContext, ConditionalWrapper, type ConditionalWrapperProps, ConfettiEffect, type ConfettiEffectProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogVariant, ConnectionBlock, type ConnectionBlockProps, Container, type ContainerProps, ContentRenderer, type ContentRendererProps, ContentSection, type ContentSectionBackground, type ContentSectionPadding, type ContentSectionProps, ControlButton, type ControlButtonProps, ControlGrid, type ControlGridButton, type ControlGridKind, type ControlGridProps, type CounterSize, CounterTemplate, type CounterTemplateProps, type CounterVariant, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DIAMOND_TOP_Y, type DPadDirection, DashboardGrid, type DashboardGridCell, type DashboardGridProps, DashboardLayout, type DashboardLayoutProps, DataGrid, type DataGridField, type DataGridItemAction, type DataGridProps, DataList, type DataListField, type DataListItemAction, type DataListProps, DataTable, type DataTableProps, DateRangePicker, type DateRangePickerPreset, type DateRangePickerProps, DateRangeSelector, type DateRangeSelectorOption, type DateRangeSelectorProps, DayCell, type DayCellProps, type DetailField, DetailPanel, type DetailPanelProps, type DetailSection, Dialog, type DialogProps, DialogueBubble, type DialogueBubbleProps, type DiffLine$1 as DiffLine, type DiffLineType, type DiffRevision, type DisplayStateProps, Divider, type DividerOrientation, type DividerProps, DocBreadcrumb, type DocBreadcrumbItem, type DocBreadcrumbProps, DocPagination, type DocPaginationLink, type DocPaginationProps, DocSearch, type DocSearchProps, type DocSearchResult, DocSidebar, type DocSidebarItem, type DocSidebarProps, DocTOC, type DocTOCItem, type DocTOCProps, type DocumentType, DocumentViewer, type DocumentViewerProps, StateMachineView as DomStateMachineVisualizer, type DotSize, type DotState, Drawer, type DrawerPosition, type DrawerProps, type DrawerSize, DrawerSlot, type DrawerSlotProps, ELEMENT_SELECTED_EVENT, EdgeDecoration, type EdgeDecorationProps, type EdgeSide, type EdgeVariant, EditorCheckbox, type EditorCheckboxProps, type EditorMode, EditorSelect, type EditorSelectProps, EditorSlider, type EditorSliderProps, EditorTextInput, type EditorTextInputProps, EditorToolbar, type EditorToolbarProps, EmptyState, type EmptyStateProps, EntityDisplayEvents, ErrorBoundary, type ErrorBoundaryProps, ErrorState, type ErrorStateProps, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FacingDirection, FeatureCard, type FeatureCardProps, type FeatureDetailPageEntity, FeatureDetailPageTemplate, type FeatureDetailPageTemplateProps, type FeatureDetailSection, FeatureGrid, FeatureGridOrganism, type FeatureGridOrganismProps, type FeatureGridProps, FileTree, type FileTreeNode, type FileTreeProps, type FilterDefinition, FilterGroup, type FilterGroupProps, type FilterPayload, FilterPill, type FilterPillProps, type FilterPillSize, type FilterPillVariant, Flex, type FlexProps, FlipCard, type FlipCardProps, FlipContainer, type FlipContainerProps, type FloatingAction, FloatingActionButton, type FloatingActionButtonProps, type FooterLinkColumn, type FooterLinkItem, Form, FormActions, type FormActionsProps, FormField, type FormFieldProps, FormLayout, type FormLayoutProps, type FormProps, FormSection$1 as FormSection, FormSectionHeader, type FormSectionHeaderProps, type FormSectionProps, GameAudioToggle, type GameAudioToggleProps, GameHud, type GameHudElement, type GameHudProps, type GameHudStat, GameIcon, type GameIconProps, GameMenu, type GameMenuProps, GameShell, type GameShellProps, GenericAppTemplate, type GenericAppTemplateProps, GeometricPattern, type GeometricPatternProps, GradientDivider, type GradientDividerProps, GraphCanvas, type GraphCanvasProps, type GraphEdge, type GraphNode, type GraphSimilarity, GraphView, type GraphViewEdge, type GraphViewNode, type GraphViewProps, type GraphicAnimation, Grid, GridPicker, type GridPickerCellSize, type GridPickerProps, type GridProps, HStack, type HStackProps, Header, type HeaderProps, HealthBar, type HealthBarProps, HeroOrganism, type HeroOrganismProps, HeroSection, type HeroSectionProps, type HighlightType, IDENTITY_BOOK_FIELDS, Icon, type IconAnimation, type IconInput, IconPicker, type IconPickerProps, type IconProps, type IconSize, ImageSource, InfiniteScrollSentinel, type InfiniteScrollSentinelProps, Input, InputGroup, type InputGroupProps, type InputProps, InstallBox, type InstallBoxProps, IsometricUnit, JazariStateMachine, type JazariStateMachineProps, JsonTreeEditor, type JsonTreeEditorProps, Label, type LabelProps, type LandingPageEntity, LandingPageTemplate, type LandingPageTemplateProps, type LawReference, LawReferenceTooltip, type LawReferenceTooltipProps, LearningCanvas, type LearningCanvasProps, type LearningPhysicsBody, type LearningPhysicsConstraint, type LearningPoint, type LearningShape, type LearningShapeType, type LessonSegment, type LessonUserProgress, Lightbox, type LightboxImage, type LightboxProps, type LikertOption, LikertScale, type LikertScaleProps, LineChart, type LineChartProps, LinkAction, List, type ListItem, type ListProps, LoadingState, type LoadingStateProps, type MapMarkerData, type MapRouteData, type MapRouteWaypoint, MapView, type MapViewProps, MarkdownContent, type MarkdownContentProps, MarketingFooter, type MarketingFooterProps, MarketingStatCard, type MarketingStatCardProps, MasterDetail, MasterDetailLayout, type MasterDetailLayoutProps, type MasterDetailProps, MathCanvas, type MathCanvasProps, type MathCurve, type MathPoint, type MathVector, type MatrixColumn, MatrixQuestion, type MatrixQuestionProps, type MatrixRow, MediaGallery, type MediaGalleryProps, type MediaItem, Menu, type MenuItem, type MenuOption, type MenuProps, Meter, type MeterAction, type MeterProps, type MeterThreshold, type MeterVariant, type MixedSegment, Modal, type ModalProps, type ModalSize, ModalSlot, type ModalSlotProps, ModuleCard, type ModuleCardProps, type NavItem, Navigation, type NavigationItem, type NavigationProps, NodeSlotEditor, type NodeSlotEditorProps, NotifyListener, NumberStepper, type NumberStepperProps, type NumberStepperSize, OnboardingSpotlight, type OnboardingSpotlightProps, type OptionConstraint, OptionConstraintGroup, type OptionConstraintGroupProps, type OptionConstraintOption, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, type OrbitalVisualizationProps, Overlay, type OverlayProps, type PageBreadcrumb, PageHeader, type PageHeaderProps, type PaginatePayload, Pagination, type PaginationProps, PatternTile, type PatternTileProps, type PatternVariant, PhysicsCanvas, type PhysicsCanvasProps, type PickerItem, type Platform, Point, Popover, type PopoverProps, PositionedCanvas, type PositionedCanvasProps, PricingCard, type PricingCardProps, PricingGrid, type PricingGridProps, PricingOrganism, type PricingOrganismProps, type PricingPageEntity, PricingPageTemplate, type PricingPageTemplateProps, ProgressBar, type ProgressBarColor, type ProgressBarProps, type ProgressBarVariant, ProgressDots, type ProgressDotsProps, type Projection, PropertyInspector, type PropertyInspectorProps, PullQuote, type PullQuoteProps, PullToRefresh, type PullToRefreshProps, type QrScanResult, QrScanner, type QrScannerProps, QuizBlock, type QuizBlockProps, Radio, type RadioProps, RangeSlider, type RangeSliderProps, type RangeSliderSize, ReflectionBlock, type ReflectionBlockProps, type RelationOption, RelationSelect, type RelationSelectProps, RepeatableFormSection, type RepeatableFormSectionProps, type RepeatableItem, ReplyTree, type ReplyTreeProps, ResolvedFrame, type RevealAnimation, type RevealTrigger, type RichBlock, RichBlockEditor, type RichBlockEditorProps, type RowAction, type RuleDefinition, type RuleOption, RuntimeDebugger, type RuntimeDebuggerProps, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, type ScaledDiagramProps, ScoreDisplay, type ScoreDisplayProps, SearchInput, type SearchInputProps, type SearchPayload, Section, SectionHeader, type SectionHeaderProps, type SectionProps, SegmentRenderer, type SegmentRendererProps, Select, type SelectOption, type SelectOptionGroup, type SelectPayload, type SelectProps, SequenceBar, type SequenceBarProps, ServiceCatalog, type ServiceCatalogItem, type ServiceCatalogProps, ShowcaseCard, type ShowcaseCardProps, ShowcaseOrganism, type ShowcaseOrganismProps, SidePanel, type SidePanelProps, type SidePlayer, Sidebar, type SidebarItem, type SidebarProps, SignaturePad, type SignaturePadProps, SimpleGrid, type SimpleGridProps, Skeleton, type SkeletonProps, type SkeletonVariant, SlotContent, SlotContentRenderer, type SlotItemData, SocialProof, type SocialProofItem, type SocialProofProps, type SortPayload, SortableList, type SortableListProps, Spacer, type SpacerProps, type SpacerSize, Sparkline, type SparklineColor, type SparklineProps, Spinner, type SpinnerProps, Split, SplitPane, type SplitPaneProps, type SplitProps, SplitSection, type SplitSectionProps, type SpotlightStep, SpriteFrameDims, SpriteSheetUrls, Stack, type StackAlign, type StackDirection, type StackGap, type StackJustify, type StackProps, StarRating, type StarRatingPrecision, type StarRatingProps, type StarRatingSize, StatBadge, type StatBadgeProps, StatCard, type StatCardProps, type StatCardSize, StatDisplay, type StatDisplayProps, StateGraph, type StateGraphProps, type StateGraphTransition, StateJsonView, type StateJsonViewProps, StateMachineView, type StateMachineViewProps, StateNode, type StateNodeProps, StatsGrid, type StatsGridProps, StatsOrganism, type StatsOrganismProps, StatusBar, type StatusBarProps, StatusDot, type StatusDotProps, type StatusDotSize, type StatusDotStatus, StepFlow, StepFlowOrganism, type StepFlowOrganismProps, type StepFlowProps, type StepItemProps, SubagentTracePanel, type SubagentTracePanelProps, SvgBranch, type SvgBranchProps, SvgConnection, type SvgConnectionProps, SvgFlow, type SvgFlowProps, SvgGrid, type SvgGridProps, SvgLobe, type SvgLobeProps, SvgMesh, type SvgMeshProps, SvgMorph, type SvgMorphProps, SvgNode, type SvgNodeProps, SvgPulse, type SvgPulseProps, SvgRing, type SvgRingProps, SvgShield, type SvgShieldProps, SvgStack, type SvgStackProps, type SwipeAction, SwipeableRow, type SwipeableRowProps, Switch, type SwitchProps, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, type TabDefinition, type TabItem, TabbedContainer, type TabbedContainerProps, TableView, type TableViewColumn, type TableViewProps, Tabs, type TabsProps, TagCloud, type TagCloudItem, type TagCloudProps, TagInput, type TagInputProps, TeamCard, type TeamCardProps, TeamOrganism, type TeamOrganismProps, type TeamUnitTraits, type TemplateProps, TerrainPalette, type TerrainPaletteProps, TextHighlight, type TextHighlightProps, Textarea, type TextareaProps, ThemeToggle, type ThemeToggleProps, type TileCoord, type TileLayout, TimeSlotCell, type TimeSlotCellProps, Timeline, type TimelineItem, type TimelineItemStatus, type TimelineProps, TimerDisplay, type TimerDisplayProps, Toast, type ToastProps, ToastSlot, type ToastSlotProps, type ToastVariant, Tooltip, type TooltipProps, type TraceDisclosureLevel, TraitFrame, type TraitFrameProps, TraitSlot, type TraitSlotProps, type TraitStateMachineDefinition, TraitStateViewer, type TraitStateViewerProps, type TraitTransition, TransitionArrow, type TransitionArrowProps, type TransitionBundle, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type TrendIndicatorSize, TypewriterText, type TypewriterTextProps, Typography, type TypographyProps, type TypographyVariant, UISlotComponent, UISlotRenderer, type UISlotRendererProps, UiError, UnitAnimationState, UploadDropZone, type UploadDropZoneProps, VStack, type VStackProps, type Vec2, VersionDiff, type DiffLine as VersionDiffLine, type VersionDiffProps, ViolationAlert, type ViolationAlertProps, type ViolationRecord, VoteStack, type VoteStackProps, WizardContainer, type WizardContainerProps, WizardNavigation, type WizardNavigationProps, WizardProgress, type WizardProgressProps, type WizardProgressStep, type WizardStep, boardEntity, bool, createUnitAnimationState, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, screenToIso, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, useAnchorRect, useAtlasSliceDataUrl, useCamera, useImageCache, useUnitSpriteAtlas, vec2 };
|
package/dist/components/index.js
CHANGED
|
@@ -36593,6 +36593,23 @@ function getGroupColor(group, groups) {
|
|
|
36593
36593
|
const idx = groups.indexOf(group);
|
|
36594
36594
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
36595
36595
|
}
|
|
36596
|
+
function hashSeed(str2) {
|
|
36597
|
+
let h = 1779033703 ^ str2.length;
|
|
36598
|
+
for (let i = 0; i < str2.length; i++) {
|
|
36599
|
+
h = Math.imul(h ^ str2.charCodeAt(i), 3432918353);
|
|
36600
|
+
h = h << 13 | h >>> 19;
|
|
36601
|
+
}
|
|
36602
|
+
return (h ^= h >>> 16) >>> 0;
|
|
36603
|
+
}
|
|
36604
|
+
function mulberry32(a) {
|
|
36605
|
+
return function() {
|
|
36606
|
+
a |= 0;
|
|
36607
|
+
a = a + 1831565813 | 0;
|
|
36608
|
+
let t = Math.imul(a ^ a >>> 15, 1 | a);
|
|
36609
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
36610
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
36611
|
+
};
|
|
36612
|
+
}
|
|
36596
36613
|
function resolveColor3(color, el) {
|
|
36597
36614
|
const m = /^var\((--[^,)]+)(?:,\s*([^)]+))?\)$/.exec(color.trim());
|
|
36598
36615
|
if (!m) return color;
|
|
@@ -36624,6 +36641,7 @@ var init_GraphCanvas = __esm({
|
|
|
36624
36641
|
title,
|
|
36625
36642
|
nodes: propNodes = [],
|
|
36626
36643
|
edges: propEdges = [],
|
|
36644
|
+
similarity: propSimilarity = [],
|
|
36627
36645
|
height = 400,
|
|
36628
36646
|
showLabels = true,
|
|
36629
36647
|
interactive = true,
|
|
@@ -36744,8 +36762,9 @@ var init_GraphCanvas = __esm({
|
|
|
36744
36762
|
x = gapX * (idx % cols + 1);
|
|
36745
36763
|
y = gapY * (Math.floor(idx / cols) + 1);
|
|
36746
36764
|
} else {
|
|
36747
|
-
|
|
36748
|
-
|
|
36765
|
+
const rand = mulberry32(hashSeed(n.id));
|
|
36766
|
+
x = w * 0.2 + rand() * w * 0.6;
|
|
36767
|
+
y = h * 0.2 + rand() * h * 0.6;
|
|
36749
36768
|
}
|
|
36750
36769
|
}
|
|
36751
36770
|
return { ...n, x, y, vx: 0, vy: 0, fx: 0, fy: 0 };
|
|
@@ -36780,22 +36799,43 @@ var init_GraphCanvas = __esm({
|
|
|
36780
36799
|
nodes[j].fy += fy;
|
|
36781
36800
|
}
|
|
36782
36801
|
}
|
|
36783
|
-
|
|
36784
|
-
|
|
36785
|
-
const
|
|
36786
|
-
|
|
36787
|
-
|
|
36788
|
-
|
|
36789
|
-
|
|
36790
|
-
|
|
36791
|
-
|
|
36792
|
-
|
|
36793
|
-
|
|
36794
|
-
|
|
36795
|
-
|
|
36796
|
-
|
|
36797
|
-
|
|
36798
|
-
|
|
36802
|
+
const nodeById = new Map(nodes.map((n) => [n.id, n]));
|
|
36803
|
+
if (propSimilarity.length > 0) {
|
|
36804
|
+
for (const pair of propSimilarity) {
|
|
36805
|
+
const source = nodeById.get(pair.source);
|
|
36806
|
+
const target = nodeById.get(pair.target);
|
|
36807
|
+
if (!source || !target) continue;
|
|
36808
|
+
const dx = target.x - source.x;
|
|
36809
|
+
const dy = target.y - source.y;
|
|
36810
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
36811
|
+
const w2 = Math.min(1, Math.max(0, pair.weight));
|
|
36812
|
+
const linkTarget = linkDistance * (1 - w2);
|
|
36813
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
36814
|
+
const fx = dx / dist * force;
|
|
36815
|
+
const fy = dy / dist * force;
|
|
36816
|
+
source.fx += fx;
|
|
36817
|
+
source.fy += fy;
|
|
36818
|
+
target.fx -= fx;
|
|
36819
|
+
target.fy -= fy;
|
|
36820
|
+
}
|
|
36821
|
+
} else {
|
|
36822
|
+
for (const edge of propEdges) {
|
|
36823
|
+
const source = nodeById.get(edge.source);
|
|
36824
|
+
const target = nodeById.get(edge.target);
|
|
36825
|
+
if (!source || !target) continue;
|
|
36826
|
+
const dx = target.x - source.x;
|
|
36827
|
+
const dy = target.y - source.y;
|
|
36828
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
36829
|
+
const w2 = Math.min(1, Math.max(0, edge.weight ?? 1));
|
|
36830
|
+
const linkTarget = linkDistance * (0.5 + (1 - w2) * 1.5);
|
|
36831
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
36832
|
+
const fx = dx / dist * force;
|
|
36833
|
+
const fy = dy / dist * force;
|
|
36834
|
+
source.fx += fx;
|
|
36835
|
+
source.fy += fy;
|
|
36836
|
+
target.fx -= fx;
|
|
36837
|
+
target.fy -= fy;
|
|
36838
|
+
}
|
|
36799
36839
|
}
|
|
36800
36840
|
const centroids = /* @__PURE__ */ new Map();
|
|
36801
36841
|
for (const node of nodes) {
|
|
@@ -36901,7 +36941,7 @@ var init_GraphCanvas = __esm({
|
|
|
36901
36941
|
return () => {
|
|
36902
36942
|
cancelAnimationFrame(animRef.current);
|
|
36903
36943
|
};
|
|
36904
|
-
}, [propNodes, propEdges, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
36944
|
+
}, [propNodes, propEdges, propSimilarity, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
36905
36945
|
useEffect(() => {
|
|
36906
36946
|
const canvas = canvasRef.current;
|
|
36907
36947
|
if (!canvas) return;
|
package/dist/providers/index.cjs
CHANGED
|
@@ -35379,6 +35379,23 @@ function getGroupColor(group, groups) {
|
|
|
35379
35379
|
const idx = groups.indexOf(group);
|
|
35380
35380
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
35381
35381
|
}
|
|
35382
|
+
function hashSeed(str) {
|
|
35383
|
+
let h = 1779033703 ^ str.length;
|
|
35384
|
+
for (let i = 0; i < str.length; i++) {
|
|
35385
|
+
h = Math.imul(h ^ str.charCodeAt(i), 3432918353);
|
|
35386
|
+
h = h << 13 | h >>> 19;
|
|
35387
|
+
}
|
|
35388
|
+
return (h ^= h >>> 16) >>> 0;
|
|
35389
|
+
}
|
|
35390
|
+
function mulberry32(a) {
|
|
35391
|
+
return function() {
|
|
35392
|
+
a |= 0;
|
|
35393
|
+
a = a + 1831565813 | 0;
|
|
35394
|
+
let t = Math.imul(a ^ a >>> 15, 1 | a);
|
|
35395
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
35396
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
35397
|
+
};
|
|
35398
|
+
}
|
|
35382
35399
|
function resolveColor3(color, el) {
|
|
35383
35400
|
const m = /^var\((--[^,)]+)(?:,\s*([^)]+))?\)$/.exec(color.trim());
|
|
35384
35401
|
if (!m) return color;
|
|
@@ -35410,6 +35427,7 @@ var init_GraphCanvas = __esm({
|
|
|
35410
35427
|
title,
|
|
35411
35428
|
nodes: propNodes = [],
|
|
35412
35429
|
edges: propEdges = [],
|
|
35430
|
+
similarity: propSimilarity = [],
|
|
35413
35431
|
height = 400,
|
|
35414
35432
|
showLabels = true,
|
|
35415
35433
|
interactive = true,
|
|
@@ -35530,8 +35548,9 @@ var init_GraphCanvas = __esm({
|
|
|
35530
35548
|
x = gapX * (idx % cols + 1);
|
|
35531
35549
|
y = gapY * (Math.floor(idx / cols) + 1);
|
|
35532
35550
|
} else {
|
|
35533
|
-
|
|
35534
|
-
|
|
35551
|
+
const rand = mulberry32(hashSeed(n.id));
|
|
35552
|
+
x = w * 0.2 + rand() * w * 0.6;
|
|
35553
|
+
y = h * 0.2 + rand() * h * 0.6;
|
|
35535
35554
|
}
|
|
35536
35555
|
}
|
|
35537
35556
|
return { ...n, x, y, vx: 0, vy: 0, fx: 0, fy: 0 };
|
|
@@ -35566,22 +35585,43 @@ var init_GraphCanvas = __esm({
|
|
|
35566
35585
|
nodes[j].fy += fy;
|
|
35567
35586
|
}
|
|
35568
35587
|
}
|
|
35569
|
-
|
|
35570
|
-
|
|
35571
|
-
const
|
|
35572
|
-
|
|
35573
|
-
|
|
35574
|
-
|
|
35575
|
-
|
|
35576
|
-
|
|
35577
|
-
|
|
35578
|
-
|
|
35579
|
-
|
|
35580
|
-
|
|
35581
|
-
|
|
35582
|
-
|
|
35583
|
-
|
|
35584
|
-
|
|
35588
|
+
const nodeById = new Map(nodes.map((n) => [n.id, n]));
|
|
35589
|
+
if (propSimilarity.length > 0) {
|
|
35590
|
+
for (const pair of propSimilarity) {
|
|
35591
|
+
const source = nodeById.get(pair.source);
|
|
35592
|
+
const target = nodeById.get(pair.target);
|
|
35593
|
+
if (!source || !target) continue;
|
|
35594
|
+
const dx = target.x - source.x;
|
|
35595
|
+
const dy = target.y - source.y;
|
|
35596
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
35597
|
+
const w2 = Math.min(1, Math.max(0, pair.weight));
|
|
35598
|
+
const linkTarget = linkDistance * (1 - w2);
|
|
35599
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
35600
|
+
const fx = dx / dist * force;
|
|
35601
|
+
const fy = dy / dist * force;
|
|
35602
|
+
source.fx += fx;
|
|
35603
|
+
source.fy += fy;
|
|
35604
|
+
target.fx -= fx;
|
|
35605
|
+
target.fy -= fy;
|
|
35606
|
+
}
|
|
35607
|
+
} else {
|
|
35608
|
+
for (const edge of propEdges) {
|
|
35609
|
+
const source = nodeById.get(edge.source);
|
|
35610
|
+
const target = nodeById.get(edge.target);
|
|
35611
|
+
if (!source || !target) continue;
|
|
35612
|
+
const dx = target.x - source.x;
|
|
35613
|
+
const dy = target.y - source.y;
|
|
35614
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
35615
|
+
const w2 = Math.min(1, Math.max(0, edge.weight ?? 1));
|
|
35616
|
+
const linkTarget = linkDistance * (0.5 + (1 - w2) * 1.5);
|
|
35617
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
35618
|
+
const fx = dx / dist * force;
|
|
35619
|
+
const fy = dy / dist * force;
|
|
35620
|
+
source.fx += fx;
|
|
35621
|
+
source.fy += fy;
|
|
35622
|
+
target.fx -= fx;
|
|
35623
|
+
target.fy -= fy;
|
|
35624
|
+
}
|
|
35585
35625
|
}
|
|
35586
35626
|
const centroids = /* @__PURE__ */ new Map();
|
|
35587
35627
|
for (const node of nodes) {
|
|
@@ -35687,7 +35727,7 @@ var init_GraphCanvas = __esm({
|
|
|
35687
35727
|
return () => {
|
|
35688
35728
|
cancelAnimationFrame(animRef.current);
|
|
35689
35729
|
};
|
|
35690
|
-
}, [propNodes, propEdges, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
35730
|
+
}, [propNodes, propEdges, propSimilarity, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
35691
35731
|
React83.useEffect(() => {
|
|
35692
35732
|
const canvas = canvasRef.current;
|
|
35693
35733
|
if (!canvas) return;
|
package/dist/providers/index.js
CHANGED
|
@@ -35334,6 +35334,23 @@ function getGroupColor(group, groups) {
|
|
|
35334
35334
|
const idx = groups.indexOf(group);
|
|
35335
35335
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
35336
35336
|
}
|
|
35337
|
+
function hashSeed(str) {
|
|
35338
|
+
let h = 1779033703 ^ str.length;
|
|
35339
|
+
for (let i = 0; i < str.length; i++) {
|
|
35340
|
+
h = Math.imul(h ^ str.charCodeAt(i), 3432918353);
|
|
35341
|
+
h = h << 13 | h >>> 19;
|
|
35342
|
+
}
|
|
35343
|
+
return (h ^= h >>> 16) >>> 0;
|
|
35344
|
+
}
|
|
35345
|
+
function mulberry32(a) {
|
|
35346
|
+
return function() {
|
|
35347
|
+
a |= 0;
|
|
35348
|
+
a = a + 1831565813 | 0;
|
|
35349
|
+
let t = Math.imul(a ^ a >>> 15, 1 | a);
|
|
35350
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
35351
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
35352
|
+
};
|
|
35353
|
+
}
|
|
35337
35354
|
function resolveColor3(color, el) {
|
|
35338
35355
|
const m = /^var\((--[^,)]+)(?:,\s*([^)]+))?\)$/.exec(color.trim());
|
|
35339
35356
|
if (!m) return color;
|
|
@@ -35365,6 +35382,7 @@ var init_GraphCanvas = __esm({
|
|
|
35365
35382
|
title,
|
|
35366
35383
|
nodes: propNodes = [],
|
|
35367
35384
|
edges: propEdges = [],
|
|
35385
|
+
similarity: propSimilarity = [],
|
|
35368
35386
|
height = 400,
|
|
35369
35387
|
showLabels = true,
|
|
35370
35388
|
interactive = true,
|
|
@@ -35485,8 +35503,9 @@ var init_GraphCanvas = __esm({
|
|
|
35485
35503
|
x = gapX * (idx % cols + 1);
|
|
35486
35504
|
y = gapY * (Math.floor(idx / cols) + 1);
|
|
35487
35505
|
} else {
|
|
35488
|
-
|
|
35489
|
-
|
|
35506
|
+
const rand = mulberry32(hashSeed(n.id));
|
|
35507
|
+
x = w * 0.2 + rand() * w * 0.6;
|
|
35508
|
+
y = h * 0.2 + rand() * h * 0.6;
|
|
35490
35509
|
}
|
|
35491
35510
|
}
|
|
35492
35511
|
return { ...n, x, y, vx: 0, vy: 0, fx: 0, fy: 0 };
|
|
@@ -35521,22 +35540,43 @@ var init_GraphCanvas = __esm({
|
|
|
35521
35540
|
nodes[j].fy += fy;
|
|
35522
35541
|
}
|
|
35523
35542
|
}
|
|
35524
|
-
|
|
35525
|
-
|
|
35526
|
-
const
|
|
35527
|
-
|
|
35528
|
-
|
|
35529
|
-
|
|
35530
|
-
|
|
35531
|
-
|
|
35532
|
-
|
|
35533
|
-
|
|
35534
|
-
|
|
35535
|
-
|
|
35536
|
-
|
|
35537
|
-
|
|
35538
|
-
|
|
35539
|
-
|
|
35543
|
+
const nodeById = new Map(nodes.map((n) => [n.id, n]));
|
|
35544
|
+
if (propSimilarity.length > 0) {
|
|
35545
|
+
for (const pair of propSimilarity) {
|
|
35546
|
+
const source = nodeById.get(pair.source);
|
|
35547
|
+
const target = nodeById.get(pair.target);
|
|
35548
|
+
if (!source || !target) continue;
|
|
35549
|
+
const dx = target.x - source.x;
|
|
35550
|
+
const dy = target.y - source.y;
|
|
35551
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
35552
|
+
const w2 = Math.min(1, Math.max(0, pair.weight));
|
|
35553
|
+
const linkTarget = linkDistance * (1 - w2);
|
|
35554
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
35555
|
+
const fx = dx / dist * force;
|
|
35556
|
+
const fy = dy / dist * force;
|
|
35557
|
+
source.fx += fx;
|
|
35558
|
+
source.fy += fy;
|
|
35559
|
+
target.fx -= fx;
|
|
35560
|
+
target.fy -= fy;
|
|
35561
|
+
}
|
|
35562
|
+
} else {
|
|
35563
|
+
for (const edge of propEdges) {
|
|
35564
|
+
const source = nodeById.get(edge.source);
|
|
35565
|
+
const target = nodeById.get(edge.target);
|
|
35566
|
+
if (!source || !target) continue;
|
|
35567
|
+
const dx = target.x - source.x;
|
|
35568
|
+
const dy = target.y - source.y;
|
|
35569
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
35570
|
+
const w2 = Math.min(1, Math.max(0, edge.weight ?? 1));
|
|
35571
|
+
const linkTarget = linkDistance * (0.5 + (1 - w2) * 1.5);
|
|
35572
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
35573
|
+
const fx = dx / dist * force;
|
|
35574
|
+
const fy = dy / dist * force;
|
|
35575
|
+
source.fx += fx;
|
|
35576
|
+
source.fy += fy;
|
|
35577
|
+
target.fx -= fx;
|
|
35578
|
+
target.fy -= fy;
|
|
35579
|
+
}
|
|
35540
35580
|
}
|
|
35541
35581
|
const centroids = /* @__PURE__ */ new Map();
|
|
35542
35582
|
for (const node of nodes) {
|
|
@@ -35642,7 +35682,7 @@ var init_GraphCanvas = __esm({
|
|
|
35642
35682
|
return () => {
|
|
35643
35683
|
cancelAnimationFrame(animRef.current);
|
|
35644
35684
|
};
|
|
35645
|
-
}, [propNodes, propEdges, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
35685
|
+
}, [propNodes, propEdges, propSimilarity, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
35646
35686
|
useEffect(() => {
|
|
35647
35687
|
const canvas = canvasRef.current;
|
|
35648
35688
|
if (!canvas) return;
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -34744,6 +34744,23 @@ function getGroupColor(group, groups) {
|
|
|
34744
34744
|
const idx = groups.indexOf(group);
|
|
34745
34745
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
34746
34746
|
}
|
|
34747
|
+
function hashSeed(str) {
|
|
34748
|
+
let h = 1779033703 ^ str.length;
|
|
34749
|
+
for (let i = 0; i < str.length; i++) {
|
|
34750
|
+
h = Math.imul(h ^ str.charCodeAt(i), 3432918353);
|
|
34751
|
+
h = h << 13 | h >>> 19;
|
|
34752
|
+
}
|
|
34753
|
+
return (h ^= h >>> 16) >>> 0;
|
|
34754
|
+
}
|
|
34755
|
+
function mulberry32(a) {
|
|
34756
|
+
return function() {
|
|
34757
|
+
a |= 0;
|
|
34758
|
+
a = a + 1831565813 | 0;
|
|
34759
|
+
let t = Math.imul(a ^ a >>> 15, 1 | a);
|
|
34760
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
34761
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
34762
|
+
};
|
|
34763
|
+
}
|
|
34747
34764
|
function resolveColor3(color, el) {
|
|
34748
34765
|
const m = /^var\((--[^,)]+)(?:,\s*([^)]+))?\)$/.exec(color.trim());
|
|
34749
34766
|
if (!m) return color;
|
|
@@ -34775,6 +34792,7 @@ var init_GraphCanvas = __esm({
|
|
|
34775
34792
|
title,
|
|
34776
34793
|
nodes: propNodes = [],
|
|
34777
34794
|
edges: propEdges = [],
|
|
34795
|
+
similarity: propSimilarity = [],
|
|
34778
34796
|
height = 400,
|
|
34779
34797
|
showLabels = true,
|
|
34780
34798
|
interactive = true,
|
|
@@ -34895,8 +34913,9 @@ var init_GraphCanvas = __esm({
|
|
|
34895
34913
|
x = gapX * (idx % cols + 1);
|
|
34896
34914
|
y = gapY * (Math.floor(idx / cols) + 1);
|
|
34897
34915
|
} else {
|
|
34898
|
-
|
|
34899
|
-
|
|
34916
|
+
const rand = mulberry32(hashSeed(n.id));
|
|
34917
|
+
x = w * 0.2 + rand() * w * 0.6;
|
|
34918
|
+
y = h * 0.2 + rand() * h * 0.6;
|
|
34900
34919
|
}
|
|
34901
34920
|
}
|
|
34902
34921
|
return { ...n, x, y, vx: 0, vy: 0, fx: 0, fy: 0 };
|
|
@@ -34931,22 +34950,43 @@ var init_GraphCanvas = __esm({
|
|
|
34931
34950
|
nodes[j].fy += fy;
|
|
34932
34951
|
}
|
|
34933
34952
|
}
|
|
34934
|
-
|
|
34935
|
-
|
|
34936
|
-
const
|
|
34937
|
-
|
|
34938
|
-
|
|
34939
|
-
|
|
34940
|
-
|
|
34941
|
-
|
|
34942
|
-
|
|
34943
|
-
|
|
34944
|
-
|
|
34945
|
-
|
|
34946
|
-
|
|
34947
|
-
|
|
34948
|
-
|
|
34949
|
-
|
|
34953
|
+
const nodeById = new Map(nodes.map((n) => [n.id, n]));
|
|
34954
|
+
if (propSimilarity.length > 0) {
|
|
34955
|
+
for (const pair of propSimilarity) {
|
|
34956
|
+
const source = nodeById.get(pair.source);
|
|
34957
|
+
const target = nodeById.get(pair.target);
|
|
34958
|
+
if (!source || !target) continue;
|
|
34959
|
+
const dx = target.x - source.x;
|
|
34960
|
+
const dy = target.y - source.y;
|
|
34961
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
34962
|
+
const w2 = Math.min(1, Math.max(0, pair.weight));
|
|
34963
|
+
const linkTarget = linkDistance * (1 - w2);
|
|
34964
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
34965
|
+
const fx = dx / dist * force;
|
|
34966
|
+
const fy = dy / dist * force;
|
|
34967
|
+
source.fx += fx;
|
|
34968
|
+
source.fy += fy;
|
|
34969
|
+
target.fx -= fx;
|
|
34970
|
+
target.fy -= fy;
|
|
34971
|
+
}
|
|
34972
|
+
} else {
|
|
34973
|
+
for (const edge of propEdges) {
|
|
34974
|
+
const source = nodeById.get(edge.source);
|
|
34975
|
+
const target = nodeById.get(edge.target);
|
|
34976
|
+
if (!source || !target) continue;
|
|
34977
|
+
const dx = target.x - source.x;
|
|
34978
|
+
const dy = target.y - source.y;
|
|
34979
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
34980
|
+
const w2 = Math.min(1, Math.max(0, edge.weight ?? 1));
|
|
34981
|
+
const linkTarget = linkDistance * (0.5 + (1 - w2) * 1.5);
|
|
34982
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
34983
|
+
const fx = dx / dist * force;
|
|
34984
|
+
const fy = dy / dist * force;
|
|
34985
|
+
source.fx += fx;
|
|
34986
|
+
source.fy += fy;
|
|
34987
|
+
target.fx -= fx;
|
|
34988
|
+
target.fy -= fy;
|
|
34989
|
+
}
|
|
34950
34990
|
}
|
|
34951
34991
|
const centroids = /* @__PURE__ */ new Map();
|
|
34952
34992
|
for (const node of nodes) {
|
|
@@ -35052,7 +35092,7 @@ var init_GraphCanvas = __esm({
|
|
|
35052
35092
|
return () => {
|
|
35053
35093
|
cancelAnimationFrame(animRef.current);
|
|
35054
35094
|
};
|
|
35055
|
-
}, [propNodes, propEdges, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
35095
|
+
}, [propNodes, propEdges, propSimilarity, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
35056
35096
|
React81.useEffect(() => {
|
|
35057
35097
|
const canvas = canvasRef.current;
|
|
35058
35098
|
if (!canvas) return;
|
package/dist/runtime/index.js
CHANGED
|
@@ -34700,6 +34700,23 @@ function getGroupColor(group, groups) {
|
|
|
34700
34700
|
const idx = groups.indexOf(group);
|
|
34701
34701
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
34702
34702
|
}
|
|
34703
|
+
function hashSeed(str) {
|
|
34704
|
+
let h = 1779033703 ^ str.length;
|
|
34705
|
+
for (let i = 0; i < str.length; i++) {
|
|
34706
|
+
h = Math.imul(h ^ str.charCodeAt(i), 3432918353);
|
|
34707
|
+
h = h << 13 | h >>> 19;
|
|
34708
|
+
}
|
|
34709
|
+
return (h ^= h >>> 16) >>> 0;
|
|
34710
|
+
}
|
|
34711
|
+
function mulberry32(a) {
|
|
34712
|
+
return function() {
|
|
34713
|
+
a |= 0;
|
|
34714
|
+
a = a + 1831565813 | 0;
|
|
34715
|
+
let t = Math.imul(a ^ a >>> 15, 1 | a);
|
|
34716
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
34717
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
34718
|
+
};
|
|
34719
|
+
}
|
|
34703
34720
|
function resolveColor3(color, el) {
|
|
34704
34721
|
const m = /^var\((--[^,)]+)(?:,\s*([^)]+))?\)$/.exec(color.trim());
|
|
34705
34722
|
if (!m) return color;
|
|
@@ -34731,6 +34748,7 @@ var init_GraphCanvas = __esm({
|
|
|
34731
34748
|
title,
|
|
34732
34749
|
nodes: propNodes = [],
|
|
34733
34750
|
edges: propEdges = [],
|
|
34751
|
+
similarity: propSimilarity = [],
|
|
34734
34752
|
height = 400,
|
|
34735
34753
|
showLabels = true,
|
|
34736
34754
|
interactive = true,
|
|
@@ -34851,8 +34869,9 @@ var init_GraphCanvas = __esm({
|
|
|
34851
34869
|
x = gapX * (idx % cols + 1);
|
|
34852
34870
|
y = gapY * (Math.floor(idx / cols) + 1);
|
|
34853
34871
|
} else {
|
|
34854
|
-
|
|
34855
|
-
|
|
34872
|
+
const rand = mulberry32(hashSeed(n.id));
|
|
34873
|
+
x = w * 0.2 + rand() * w * 0.6;
|
|
34874
|
+
y = h * 0.2 + rand() * h * 0.6;
|
|
34856
34875
|
}
|
|
34857
34876
|
}
|
|
34858
34877
|
return { ...n, x, y, vx: 0, vy: 0, fx: 0, fy: 0 };
|
|
@@ -34887,22 +34906,43 @@ var init_GraphCanvas = __esm({
|
|
|
34887
34906
|
nodes[j].fy += fy;
|
|
34888
34907
|
}
|
|
34889
34908
|
}
|
|
34890
|
-
|
|
34891
|
-
|
|
34892
|
-
const
|
|
34893
|
-
|
|
34894
|
-
|
|
34895
|
-
|
|
34896
|
-
|
|
34897
|
-
|
|
34898
|
-
|
|
34899
|
-
|
|
34900
|
-
|
|
34901
|
-
|
|
34902
|
-
|
|
34903
|
-
|
|
34904
|
-
|
|
34905
|
-
|
|
34909
|
+
const nodeById = new Map(nodes.map((n) => [n.id, n]));
|
|
34910
|
+
if (propSimilarity.length > 0) {
|
|
34911
|
+
for (const pair of propSimilarity) {
|
|
34912
|
+
const source = nodeById.get(pair.source);
|
|
34913
|
+
const target = nodeById.get(pair.target);
|
|
34914
|
+
if (!source || !target) continue;
|
|
34915
|
+
const dx = target.x - source.x;
|
|
34916
|
+
const dy = target.y - source.y;
|
|
34917
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
34918
|
+
const w2 = Math.min(1, Math.max(0, pair.weight));
|
|
34919
|
+
const linkTarget = linkDistance * (1 - w2);
|
|
34920
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
34921
|
+
const fx = dx / dist * force;
|
|
34922
|
+
const fy = dy / dist * force;
|
|
34923
|
+
source.fx += fx;
|
|
34924
|
+
source.fy += fy;
|
|
34925
|
+
target.fx -= fx;
|
|
34926
|
+
target.fy -= fy;
|
|
34927
|
+
}
|
|
34928
|
+
} else {
|
|
34929
|
+
for (const edge of propEdges) {
|
|
34930
|
+
const source = nodeById.get(edge.source);
|
|
34931
|
+
const target = nodeById.get(edge.target);
|
|
34932
|
+
if (!source || !target) continue;
|
|
34933
|
+
const dx = target.x - source.x;
|
|
34934
|
+
const dy = target.y - source.y;
|
|
34935
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
34936
|
+
const w2 = Math.min(1, Math.max(0, edge.weight ?? 1));
|
|
34937
|
+
const linkTarget = linkDistance * (0.5 + (1 - w2) * 1.5);
|
|
34938
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
34939
|
+
const fx = dx / dist * force;
|
|
34940
|
+
const fy = dy / dist * force;
|
|
34941
|
+
source.fx += fx;
|
|
34942
|
+
source.fy += fy;
|
|
34943
|
+
target.fx -= fx;
|
|
34944
|
+
target.fy -= fy;
|
|
34945
|
+
}
|
|
34906
34946
|
}
|
|
34907
34947
|
const centroids = /* @__PURE__ */ new Map();
|
|
34908
34948
|
for (const node of nodes) {
|
|
@@ -35008,7 +35048,7 @@ var init_GraphCanvas = __esm({
|
|
|
35008
35048
|
return () => {
|
|
35009
35049
|
cancelAnimationFrame(animRef.current);
|
|
35010
35050
|
};
|
|
35011
|
-
}, [propNodes, propEdges, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
35051
|
+
}, [propNodes, propEdges, propSimilarity, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
35012
35052
|
useEffect(() => {
|
|
35013
35053
|
const canvas = canvasRef.current;
|
|
35014
35054
|
if (!canvas) return;
|