@almadar/ui 5.116.1 → 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 +97 -20
- package/dist/avl/index.js +97 -20
- package/dist/components/index.cjs +97 -20
- package/dist/components/index.d.cts +20 -2
- package/dist/components/index.d.ts +20 -2
- package/dist/components/index.js +97 -20
- package/dist/providers/index.cjs +97 -20
- package/dist/providers/index.js +97 -20
- package/dist/runtime/index.cjs +97 -20
- package/dist/runtime/index.js +97 -20
- 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,
|
|
@@ -37311,6 +37329,7 @@ var init_GraphCanvas = __esm({
|
|
|
37311
37329
|
offsetRef.current = offset;
|
|
37312
37330
|
const [hoveredNode, setHoveredNode] = React90.useState(null);
|
|
37313
37331
|
const nodesRef = React90.useRef([]);
|
|
37332
|
+
const laidOutRef = React90.useRef(false);
|
|
37314
37333
|
const [, forceUpdate] = React90.useState(0);
|
|
37315
37334
|
const [logicalW, setLogicalW] = React90.useState(800);
|
|
37316
37335
|
React90.useEffect(() => {
|
|
@@ -37399,13 +37418,19 @@ var init_GraphCanvas = __esm({
|
|
|
37399
37418
|
x = gapX * (idx % cols + 1);
|
|
37400
37419
|
y = gapY * (Math.floor(idx / cols) + 1);
|
|
37401
37420
|
} else {
|
|
37402
|
-
|
|
37403
|
-
|
|
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;
|
|
37404
37424
|
}
|
|
37405
37425
|
}
|
|
37406
37426
|
return { ...n, x, y, vx: 0, vy: 0, fx: 0, fy: 0 };
|
|
37407
37427
|
});
|
|
37408
37428
|
nodesRef.current = simNodes;
|
|
37429
|
+
const prevIds = /* @__PURE__ */ new Set([...prevPos.keys()]);
|
|
37430
|
+
const newIdList = simNodes.map((n) => n.id);
|
|
37431
|
+
const kept = newIdList.filter((id) => prevIds.has(id)).length;
|
|
37432
|
+
const overlap = prevIds.size === 0 ? 0 : kept / Math.max(prevIds.size, newIdList.length);
|
|
37433
|
+
const fullRelayout = !laidOutRef.current || overlap < 0.5;
|
|
37409
37434
|
if (layout === "force") {
|
|
37410
37435
|
const maxIterations = 300;
|
|
37411
37436
|
const tick = () => {
|
|
@@ -37430,22 +37455,43 @@ var init_GraphCanvas = __esm({
|
|
|
37430
37455
|
nodes[j].fy += fy;
|
|
37431
37456
|
}
|
|
37432
37457
|
}
|
|
37433
|
-
|
|
37434
|
-
|
|
37435
|
-
const
|
|
37436
|
-
|
|
37437
|
-
|
|
37438
|
-
|
|
37439
|
-
|
|
37440
|
-
|
|
37441
|
-
|
|
37442
|
-
|
|
37443
|
-
|
|
37444
|
-
|
|
37445
|
-
|
|
37446
|
-
|
|
37447
|
-
|
|
37448
|
-
|
|
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
|
+
}
|
|
37449
37495
|
}
|
|
37450
37496
|
const centroids = /* @__PURE__ */ new Map();
|
|
37451
37497
|
for (const node of nodes) {
|
|
@@ -37512,7 +37558,38 @@ var init_GraphCanvas = __esm({
|
|
|
37512
37558
|
}
|
|
37513
37559
|
}
|
|
37514
37560
|
};
|
|
37515
|
-
|
|
37561
|
+
if (fullRelayout) {
|
|
37562
|
+
for (let i = 0; i < maxIterations; i++) tick();
|
|
37563
|
+
laidOutRef.current = true;
|
|
37564
|
+
} else {
|
|
37565
|
+
const centroids = /* @__PURE__ */ new Map();
|
|
37566
|
+
for (const node of simNodes) {
|
|
37567
|
+
if (!prevPos.has(node.id)) continue;
|
|
37568
|
+
const g = node.group ?? "__none__";
|
|
37569
|
+
let c = centroids.get(g);
|
|
37570
|
+
if (!c) {
|
|
37571
|
+
c = { x: 0, y: 0, n: 0 };
|
|
37572
|
+
centroids.set(g, c);
|
|
37573
|
+
}
|
|
37574
|
+
c.x += node.x;
|
|
37575
|
+
c.y += node.y;
|
|
37576
|
+
c.n += 1;
|
|
37577
|
+
}
|
|
37578
|
+
const ringCount = /* @__PURE__ */ new Map();
|
|
37579
|
+
for (const node of simNodes) {
|
|
37580
|
+
if (prevPos.has(node.id)) continue;
|
|
37581
|
+
const g = node.group ?? "__none__";
|
|
37582
|
+
const c = centroids.get(g);
|
|
37583
|
+
const cx = c && c.n > 0 ? c.x / c.n : w / 2;
|
|
37584
|
+
const cy = c && c.n > 0 ? c.y / c.n : h / 2;
|
|
37585
|
+
const k = ringCount.get(g) ?? 0;
|
|
37586
|
+
ringCount.set(g, k + 1);
|
|
37587
|
+
const angle = k * 2.399963;
|
|
37588
|
+
const r2 = 22 + k * 8;
|
|
37589
|
+
node.x = Math.max(30, Math.min(w - 30, cx + r2 * Math.cos(angle)));
|
|
37590
|
+
node.y = Math.max(30, Math.min(h - 30, cy + r2 * Math.sin(angle)));
|
|
37591
|
+
}
|
|
37592
|
+
}
|
|
37516
37593
|
forceUpdate((n) => n + 1);
|
|
37517
37594
|
} else {
|
|
37518
37595
|
forceUpdate((n) => n + 1);
|
|
@@ -37520,7 +37597,7 @@ var init_GraphCanvas = __esm({
|
|
|
37520
37597
|
return () => {
|
|
37521
37598
|
cancelAnimationFrame(animRef.current);
|
|
37522
37599
|
};
|
|
37523
|
-
}, [propNodes, propEdges, layout, repulsion, linkDistance, nodeSpacing, showLabels
|
|
37600
|
+
}, [propNodes, propEdges, propSimilarity, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
37524
37601
|
React90.useEffect(() => {
|
|
37525
37602
|
const canvas = canvasRef.current;
|
|
37526
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,
|
|
@@ -37265,6 +37283,7 @@ var init_GraphCanvas = __esm({
|
|
|
37265
37283
|
offsetRef.current = offset;
|
|
37266
37284
|
const [hoveredNode, setHoveredNode] = useState(null);
|
|
37267
37285
|
const nodesRef = useRef([]);
|
|
37286
|
+
const laidOutRef = useRef(false);
|
|
37268
37287
|
const [, forceUpdate] = useState(0);
|
|
37269
37288
|
const [logicalW, setLogicalW] = useState(800);
|
|
37270
37289
|
useEffect(() => {
|
|
@@ -37353,13 +37372,19 @@ var init_GraphCanvas = __esm({
|
|
|
37353
37372
|
x = gapX * (idx % cols + 1);
|
|
37354
37373
|
y = gapY * (Math.floor(idx / cols) + 1);
|
|
37355
37374
|
} else {
|
|
37356
|
-
|
|
37357
|
-
|
|
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;
|
|
37358
37378
|
}
|
|
37359
37379
|
}
|
|
37360
37380
|
return { ...n, x, y, vx: 0, vy: 0, fx: 0, fy: 0 };
|
|
37361
37381
|
});
|
|
37362
37382
|
nodesRef.current = simNodes;
|
|
37383
|
+
const prevIds = /* @__PURE__ */ new Set([...prevPos.keys()]);
|
|
37384
|
+
const newIdList = simNodes.map((n) => n.id);
|
|
37385
|
+
const kept = newIdList.filter((id) => prevIds.has(id)).length;
|
|
37386
|
+
const overlap = prevIds.size === 0 ? 0 : kept / Math.max(prevIds.size, newIdList.length);
|
|
37387
|
+
const fullRelayout = !laidOutRef.current || overlap < 0.5;
|
|
37363
37388
|
if (layout === "force") {
|
|
37364
37389
|
const maxIterations = 300;
|
|
37365
37390
|
const tick = () => {
|
|
@@ -37384,22 +37409,43 @@ var init_GraphCanvas = __esm({
|
|
|
37384
37409
|
nodes[j].fy += fy;
|
|
37385
37410
|
}
|
|
37386
37411
|
}
|
|
37387
|
-
|
|
37388
|
-
|
|
37389
|
-
const
|
|
37390
|
-
|
|
37391
|
-
|
|
37392
|
-
|
|
37393
|
-
|
|
37394
|
-
|
|
37395
|
-
|
|
37396
|
-
|
|
37397
|
-
|
|
37398
|
-
|
|
37399
|
-
|
|
37400
|
-
|
|
37401
|
-
|
|
37402
|
-
|
|
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
|
+
}
|
|
37403
37449
|
}
|
|
37404
37450
|
const centroids = /* @__PURE__ */ new Map();
|
|
37405
37451
|
for (const node of nodes) {
|
|
@@ -37466,7 +37512,38 @@ var init_GraphCanvas = __esm({
|
|
|
37466
37512
|
}
|
|
37467
37513
|
}
|
|
37468
37514
|
};
|
|
37469
|
-
|
|
37515
|
+
if (fullRelayout) {
|
|
37516
|
+
for (let i = 0; i < maxIterations; i++) tick();
|
|
37517
|
+
laidOutRef.current = true;
|
|
37518
|
+
} else {
|
|
37519
|
+
const centroids = /* @__PURE__ */ new Map();
|
|
37520
|
+
for (const node of simNodes) {
|
|
37521
|
+
if (!prevPos.has(node.id)) continue;
|
|
37522
|
+
const g = node.group ?? "__none__";
|
|
37523
|
+
let c = centroids.get(g);
|
|
37524
|
+
if (!c) {
|
|
37525
|
+
c = { x: 0, y: 0, n: 0 };
|
|
37526
|
+
centroids.set(g, c);
|
|
37527
|
+
}
|
|
37528
|
+
c.x += node.x;
|
|
37529
|
+
c.y += node.y;
|
|
37530
|
+
c.n += 1;
|
|
37531
|
+
}
|
|
37532
|
+
const ringCount = /* @__PURE__ */ new Map();
|
|
37533
|
+
for (const node of simNodes) {
|
|
37534
|
+
if (prevPos.has(node.id)) continue;
|
|
37535
|
+
const g = node.group ?? "__none__";
|
|
37536
|
+
const c = centroids.get(g);
|
|
37537
|
+
const cx = c && c.n > 0 ? c.x / c.n : w / 2;
|
|
37538
|
+
const cy = c && c.n > 0 ? c.y / c.n : h / 2;
|
|
37539
|
+
const k = ringCount.get(g) ?? 0;
|
|
37540
|
+
ringCount.set(g, k + 1);
|
|
37541
|
+
const angle = k * 2.399963;
|
|
37542
|
+
const r2 = 22 + k * 8;
|
|
37543
|
+
node.x = Math.max(30, Math.min(w - 30, cx + r2 * Math.cos(angle)));
|
|
37544
|
+
node.y = Math.max(30, Math.min(h - 30, cy + r2 * Math.sin(angle)));
|
|
37545
|
+
}
|
|
37546
|
+
}
|
|
37470
37547
|
forceUpdate((n) => n + 1);
|
|
37471
37548
|
} else {
|
|
37472
37549
|
forceUpdate((n) => n + 1);
|
|
@@ -37474,7 +37551,7 @@ var init_GraphCanvas = __esm({
|
|
|
37474
37551
|
return () => {
|
|
37475
37552
|
cancelAnimationFrame(animRef.current);
|
|
37476
37553
|
};
|
|
37477
|
-
}, [propNodes, propEdges, layout, repulsion, linkDistance, nodeSpacing, showLabels
|
|
37554
|
+
}, [propNodes, propEdges, propSimilarity, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
37478
37555
|
useEffect(() => {
|
|
37479
37556
|
const canvas = canvasRef.current;
|
|
37480
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,
|
|
@@ -36700,6 +36718,7 @@ var init_GraphCanvas = __esm({
|
|
|
36700
36718
|
offsetRef.current = offset;
|
|
36701
36719
|
const [hoveredNode, setHoveredNode] = React73.useState(null);
|
|
36702
36720
|
const nodesRef = React73.useRef([]);
|
|
36721
|
+
const laidOutRef = React73.useRef(false);
|
|
36703
36722
|
const [, forceUpdate] = React73.useState(0);
|
|
36704
36723
|
const [logicalW, setLogicalW] = React73.useState(800);
|
|
36705
36724
|
React73.useEffect(() => {
|
|
@@ -36788,13 +36807,19 @@ var init_GraphCanvas = __esm({
|
|
|
36788
36807
|
x = gapX * (idx % cols + 1);
|
|
36789
36808
|
y = gapY * (Math.floor(idx / cols) + 1);
|
|
36790
36809
|
} else {
|
|
36791
|
-
|
|
36792
|
-
|
|
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;
|
|
36793
36813
|
}
|
|
36794
36814
|
}
|
|
36795
36815
|
return { ...n, x, y, vx: 0, vy: 0, fx: 0, fy: 0 };
|
|
36796
36816
|
});
|
|
36797
36817
|
nodesRef.current = simNodes;
|
|
36818
|
+
const prevIds = /* @__PURE__ */ new Set([...prevPos.keys()]);
|
|
36819
|
+
const newIdList = simNodes.map((n) => n.id);
|
|
36820
|
+
const kept = newIdList.filter((id) => prevIds.has(id)).length;
|
|
36821
|
+
const overlap = prevIds.size === 0 ? 0 : kept / Math.max(prevIds.size, newIdList.length);
|
|
36822
|
+
const fullRelayout = !laidOutRef.current || overlap < 0.5;
|
|
36798
36823
|
if (layout === "force") {
|
|
36799
36824
|
const maxIterations = 300;
|
|
36800
36825
|
const tick = () => {
|
|
@@ -36819,22 +36844,43 @@ var init_GraphCanvas = __esm({
|
|
|
36819
36844
|
nodes[j].fy += fy;
|
|
36820
36845
|
}
|
|
36821
36846
|
}
|
|
36822
|
-
|
|
36823
|
-
|
|
36824
|
-
const
|
|
36825
|
-
|
|
36826
|
-
|
|
36827
|
-
|
|
36828
|
-
|
|
36829
|
-
|
|
36830
|
-
|
|
36831
|
-
|
|
36832
|
-
|
|
36833
|
-
|
|
36834
|
-
|
|
36835
|
-
|
|
36836
|
-
|
|
36837
|
-
|
|
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
|
+
}
|
|
36838
36884
|
}
|
|
36839
36885
|
const centroids = /* @__PURE__ */ new Map();
|
|
36840
36886
|
for (const node of nodes) {
|
|
@@ -36901,7 +36947,38 @@ var init_GraphCanvas = __esm({
|
|
|
36901
36947
|
}
|
|
36902
36948
|
}
|
|
36903
36949
|
};
|
|
36904
|
-
|
|
36950
|
+
if (fullRelayout) {
|
|
36951
|
+
for (let i = 0; i < maxIterations; i++) tick();
|
|
36952
|
+
laidOutRef.current = true;
|
|
36953
|
+
} else {
|
|
36954
|
+
const centroids = /* @__PURE__ */ new Map();
|
|
36955
|
+
for (const node of simNodes) {
|
|
36956
|
+
if (!prevPos.has(node.id)) continue;
|
|
36957
|
+
const g = node.group ?? "__none__";
|
|
36958
|
+
let c = centroids.get(g);
|
|
36959
|
+
if (!c) {
|
|
36960
|
+
c = { x: 0, y: 0, n: 0 };
|
|
36961
|
+
centroids.set(g, c);
|
|
36962
|
+
}
|
|
36963
|
+
c.x += node.x;
|
|
36964
|
+
c.y += node.y;
|
|
36965
|
+
c.n += 1;
|
|
36966
|
+
}
|
|
36967
|
+
const ringCount = /* @__PURE__ */ new Map();
|
|
36968
|
+
for (const node of simNodes) {
|
|
36969
|
+
if (prevPos.has(node.id)) continue;
|
|
36970
|
+
const g = node.group ?? "__none__";
|
|
36971
|
+
const c = centroids.get(g);
|
|
36972
|
+
const cx = c && c.n > 0 ? c.x / c.n : w / 2;
|
|
36973
|
+
const cy = c && c.n > 0 ? c.y / c.n : h / 2;
|
|
36974
|
+
const k = ringCount.get(g) ?? 0;
|
|
36975
|
+
ringCount.set(g, k + 1);
|
|
36976
|
+
const angle = k * 2.399963;
|
|
36977
|
+
const r = 22 + k * 8;
|
|
36978
|
+
node.x = Math.max(30, Math.min(w - 30, cx + r * Math.cos(angle)));
|
|
36979
|
+
node.y = Math.max(30, Math.min(h - 30, cy + r * Math.sin(angle)));
|
|
36980
|
+
}
|
|
36981
|
+
}
|
|
36905
36982
|
forceUpdate((n) => n + 1);
|
|
36906
36983
|
} else {
|
|
36907
36984
|
forceUpdate((n) => n + 1);
|
|
@@ -36909,7 +36986,7 @@ var init_GraphCanvas = __esm({
|
|
|
36909
36986
|
return () => {
|
|
36910
36987
|
cancelAnimationFrame(animRef.current);
|
|
36911
36988
|
};
|
|
36912
|
-
}, [propNodes, propEdges, layout, repulsion, linkDistance, nodeSpacing, showLabels
|
|
36989
|
+
}, [propNodes, propEdges, propSimilarity, layout, repulsion, linkDistance, nodeSpacing, showLabels]);
|
|
36913
36990
|
React73.useEffect(() => {
|
|
36914
36991
|
const canvas = canvasRef.current;
|
|
36915
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 };
|