@almadar/ui 5.121.1 → 5.121.3
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 +5 -3
- package/dist/avl/index.js +5 -3
- package/dist/components/index.cjs +5 -3
- package/dist/components/index.js +5 -3
- package/dist/providers/index.cjs +5 -3
- package/dist/providers/index.js +5 -3
- package/dist/runtime/index.cjs +5 -3
- package/dist/runtime/index.js +5 -3
- package/package.json +1 -1
package/dist/avl/index.cjs
CHANGED
|
@@ -37246,7 +37246,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
37246
37246
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
37247
37247
|
}
|
|
37248
37248
|
function getGroupColor(group, groups) {
|
|
37249
|
-
if (!group) return GROUP_COLORS2[0];
|
|
37249
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
37250
37250
|
const idx = groups.indexOf(group);
|
|
37251
37251
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
37252
37252
|
}
|
|
@@ -37279,7 +37279,7 @@ function resolveColor3(color, el) {
|
|
|
37279
37279
|
function truncateLabel(label) {
|
|
37280
37280
|
return label.length > MAX_LABEL_CHARS ? label.slice(0, MAX_LABEL_CHARS - 1) + "\u2026" : label;
|
|
37281
37281
|
}
|
|
37282
|
-
var GROUP_COLORS2, labelMeasureCtx, MAX_LABEL_CHARS, GraphCanvas;
|
|
37282
|
+
var GROUP_COLORS2, GROUP_GRAVITY, UNGROUPED_GRAVITY, labelMeasureCtx, MAX_LABEL_CHARS, GraphCanvas;
|
|
37283
37283
|
var init_GraphCanvas = __esm({
|
|
37284
37284
|
"components/core/molecules/GraphCanvas.tsx"() {
|
|
37285
37285
|
"use client";
|
|
@@ -37299,6 +37299,8 @@ var init_GraphCanvas = __esm({
|
|
|
37299
37299
|
"var(--color-info)",
|
|
37300
37300
|
"var(--color-accent)"
|
|
37301
37301
|
];
|
|
37302
|
+
GROUP_GRAVITY = 0.3;
|
|
37303
|
+
UNGROUPED_GRAVITY = 0.02;
|
|
37302
37304
|
labelMeasureCtx = null;
|
|
37303
37305
|
MAX_LABEL_CHARS = 22;
|
|
37304
37306
|
GraphCanvas = ({
|
|
@@ -37485,7 +37487,7 @@ var init_GraphCanvas = __esm({
|
|
|
37485
37487
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
37486
37488
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
37487
37489
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
37488
|
-
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster
|
|
37490
|
+
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).force("y", d3Force.forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).stop();
|
|
37489
37491
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
37490
37492
|
const pad = nodeSpacing / 2;
|
|
37491
37493
|
const rectsOf = (n) => {
|
package/dist/avl/index.js
CHANGED
|
@@ -37200,7 +37200,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
37200
37200
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
37201
37201
|
}
|
|
37202
37202
|
function getGroupColor(group, groups) {
|
|
37203
|
-
if (!group) return GROUP_COLORS2[0];
|
|
37203
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
37204
37204
|
const idx = groups.indexOf(group);
|
|
37205
37205
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
37206
37206
|
}
|
|
@@ -37233,7 +37233,7 @@ function resolveColor3(color, el) {
|
|
|
37233
37233
|
function truncateLabel(label) {
|
|
37234
37234
|
return label.length > MAX_LABEL_CHARS ? label.slice(0, MAX_LABEL_CHARS - 1) + "\u2026" : label;
|
|
37235
37235
|
}
|
|
37236
|
-
var GROUP_COLORS2, labelMeasureCtx, MAX_LABEL_CHARS, GraphCanvas;
|
|
37236
|
+
var GROUP_COLORS2, GROUP_GRAVITY, UNGROUPED_GRAVITY, labelMeasureCtx, MAX_LABEL_CHARS, GraphCanvas;
|
|
37237
37237
|
var init_GraphCanvas = __esm({
|
|
37238
37238
|
"components/core/molecules/GraphCanvas.tsx"() {
|
|
37239
37239
|
"use client";
|
|
@@ -37253,6 +37253,8 @@ var init_GraphCanvas = __esm({
|
|
|
37253
37253
|
"var(--color-info)",
|
|
37254
37254
|
"var(--color-accent)"
|
|
37255
37255
|
];
|
|
37256
|
+
GROUP_GRAVITY = 0.3;
|
|
37257
|
+
UNGROUPED_GRAVITY = 0.02;
|
|
37256
37258
|
labelMeasureCtx = null;
|
|
37257
37259
|
MAX_LABEL_CHARS = 22;
|
|
37258
37260
|
GraphCanvas = ({
|
|
@@ -37439,7 +37441,7 @@ var init_GraphCanvas = __esm({
|
|
|
37439
37441
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
37440
37442
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
37441
37443
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
37442
|
-
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster
|
|
37444
|
+
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).force("y", forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).stop();
|
|
37443
37445
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
37444
37446
|
const pad = nodeSpacing / 2;
|
|
37445
37447
|
const rectsOf = (n) => {
|
|
@@ -36635,7 +36635,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
36635
36635
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
36636
36636
|
}
|
|
36637
36637
|
function getGroupColor(group, groups) {
|
|
36638
|
-
if (!group) return GROUP_COLORS2[0];
|
|
36638
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
36639
36639
|
const idx = groups.indexOf(group);
|
|
36640
36640
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
36641
36641
|
}
|
|
@@ -36668,7 +36668,7 @@ function resolveColor3(color, el) {
|
|
|
36668
36668
|
function truncateLabel(label) {
|
|
36669
36669
|
return label.length > MAX_LABEL_CHARS ? label.slice(0, MAX_LABEL_CHARS - 1) + "\u2026" : label;
|
|
36670
36670
|
}
|
|
36671
|
-
var GROUP_COLORS2, labelMeasureCtx, MAX_LABEL_CHARS; exports.GraphCanvas = void 0;
|
|
36671
|
+
var GROUP_COLORS2, GROUP_GRAVITY, UNGROUPED_GRAVITY, labelMeasureCtx, MAX_LABEL_CHARS; exports.GraphCanvas = void 0;
|
|
36672
36672
|
var init_GraphCanvas = __esm({
|
|
36673
36673
|
"components/core/molecules/GraphCanvas.tsx"() {
|
|
36674
36674
|
"use client";
|
|
@@ -36688,6 +36688,8 @@ var init_GraphCanvas = __esm({
|
|
|
36688
36688
|
"var(--color-info)",
|
|
36689
36689
|
"var(--color-accent)"
|
|
36690
36690
|
];
|
|
36691
|
+
GROUP_GRAVITY = 0.3;
|
|
36692
|
+
UNGROUPED_GRAVITY = 0.02;
|
|
36691
36693
|
labelMeasureCtx = null;
|
|
36692
36694
|
MAX_LABEL_CHARS = 22;
|
|
36693
36695
|
exports.GraphCanvas = ({
|
|
@@ -36874,7 +36876,7 @@ var init_GraphCanvas = __esm({
|
|
|
36874
36876
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
36875
36877
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
36876
36878
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
36877
|
-
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster
|
|
36879
|
+
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).force("y", d3Force.forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).stop();
|
|
36878
36880
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
36879
36881
|
const pad = nodeSpacing / 2;
|
|
36880
36882
|
const rectsOf = (n) => {
|
package/dist/components/index.js
CHANGED
|
@@ -36590,7 +36590,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
36590
36590
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
36591
36591
|
}
|
|
36592
36592
|
function getGroupColor(group, groups) {
|
|
36593
|
-
if (!group) return GROUP_COLORS2[0];
|
|
36593
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
36594
36594
|
const idx = groups.indexOf(group);
|
|
36595
36595
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
36596
36596
|
}
|
|
@@ -36623,7 +36623,7 @@ function resolveColor3(color, el) {
|
|
|
36623
36623
|
function truncateLabel(label) {
|
|
36624
36624
|
return label.length > MAX_LABEL_CHARS ? label.slice(0, MAX_LABEL_CHARS - 1) + "\u2026" : label;
|
|
36625
36625
|
}
|
|
36626
|
-
var GROUP_COLORS2, labelMeasureCtx, MAX_LABEL_CHARS, GraphCanvas;
|
|
36626
|
+
var GROUP_COLORS2, GROUP_GRAVITY, UNGROUPED_GRAVITY, labelMeasureCtx, MAX_LABEL_CHARS, GraphCanvas;
|
|
36627
36627
|
var init_GraphCanvas = __esm({
|
|
36628
36628
|
"components/core/molecules/GraphCanvas.tsx"() {
|
|
36629
36629
|
"use client";
|
|
@@ -36643,6 +36643,8 @@ var init_GraphCanvas = __esm({
|
|
|
36643
36643
|
"var(--color-info)",
|
|
36644
36644
|
"var(--color-accent)"
|
|
36645
36645
|
];
|
|
36646
|
+
GROUP_GRAVITY = 0.3;
|
|
36647
|
+
UNGROUPED_GRAVITY = 0.02;
|
|
36646
36648
|
labelMeasureCtx = null;
|
|
36647
36649
|
MAX_LABEL_CHARS = 22;
|
|
36648
36650
|
GraphCanvas = ({
|
|
@@ -36829,7 +36831,7 @@ var init_GraphCanvas = __esm({
|
|
|
36829
36831
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
36830
36832
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
36831
36833
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
36832
|
-
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster
|
|
36834
|
+
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).force("y", forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).stop();
|
|
36833
36835
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
36834
36836
|
const pad = nodeSpacing / 2;
|
|
36835
36837
|
const rectsOf = (n) => {
|
package/dist/providers/index.cjs
CHANGED
|
@@ -35376,7 +35376,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
35376
35376
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
35377
35377
|
}
|
|
35378
35378
|
function getGroupColor(group, groups) {
|
|
35379
|
-
if (!group) return GROUP_COLORS2[0];
|
|
35379
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
35380
35380
|
const idx = groups.indexOf(group);
|
|
35381
35381
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
35382
35382
|
}
|
|
@@ -35409,7 +35409,7 @@ function resolveColor3(color, el) {
|
|
|
35409
35409
|
function truncateLabel(label) {
|
|
35410
35410
|
return label.length > MAX_LABEL_CHARS ? label.slice(0, MAX_LABEL_CHARS - 1) + "\u2026" : label;
|
|
35411
35411
|
}
|
|
35412
|
-
var GROUP_COLORS2, labelMeasureCtx, MAX_LABEL_CHARS, GraphCanvas;
|
|
35412
|
+
var GROUP_COLORS2, GROUP_GRAVITY, UNGROUPED_GRAVITY, labelMeasureCtx, MAX_LABEL_CHARS, GraphCanvas;
|
|
35413
35413
|
var init_GraphCanvas = __esm({
|
|
35414
35414
|
"components/core/molecules/GraphCanvas.tsx"() {
|
|
35415
35415
|
"use client";
|
|
@@ -35429,6 +35429,8 @@ var init_GraphCanvas = __esm({
|
|
|
35429
35429
|
"var(--color-info)",
|
|
35430
35430
|
"var(--color-accent)"
|
|
35431
35431
|
];
|
|
35432
|
+
GROUP_GRAVITY = 0.3;
|
|
35433
|
+
UNGROUPED_GRAVITY = 0.02;
|
|
35432
35434
|
labelMeasureCtx = null;
|
|
35433
35435
|
MAX_LABEL_CHARS = 22;
|
|
35434
35436
|
GraphCanvas = ({
|
|
@@ -35615,7 +35617,7 @@ var init_GraphCanvas = __esm({
|
|
|
35615
35617
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
35616
35618
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
35617
35619
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
35618
|
-
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster
|
|
35620
|
+
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).force("y", d3Force.forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).stop();
|
|
35619
35621
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
35620
35622
|
const pad = nodeSpacing / 2;
|
|
35621
35623
|
const rectsOf = (n) => {
|
package/dist/providers/index.js
CHANGED
|
@@ -35331,7 +35331,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
35331
35331
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
35332
35332
|
}
|
|
35333
35333
|
function getGroupColor(group, groups) {
|
|
35334
|
-
if (!group) return GROUP_COLORS2[0];
|
|
35334
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
35335
35335
|
const idx = groups.indexOf(group);
|
|
35336
35336
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
35337
35337
|
}
|
|
@@ -35364,7 +35364,7 @@ function resolveColor3(color, el) {
|
|
|
35364
35364
|
function truncateLabel(label) {
|
|
35365
35365
|
return label.length > MAX_LABEL_CHARS ? label.slice(0, MAX_LABEL_CHARS - 1) + "\u2026" : label;
|
|
35366
35366
|
}
|
|
35367
|
-
var GROUP_COLORS2, labelMeasureCtx, MAX_LABEL_CHARS, GraphCanvas;
|
|
35367
|
+
var GROUP_COLORS2, GROUP_GRAVITY, UNGROUPED_GRAVITY, labelMeasureCtx, MAX_LABEL_CHARS, GraphCanvas;
|
|
35368
35368
|
var init_GraphCanvas = __esm({
|
|
35369
35369
|
"components/core/molecules/GraphCanvas.tsx"() {
|
|
35370
35370
|
"use client";
|
|
@@ -35384,6 +35384,8 @@ var init_GraphCanvas = __esm({
|
|
|
35384
35384
|
"var(--color-info)",
|
|
35385
35385
|
"var(--color-accent)"
|
|
35386
35386
|
];
|
|
35387
|
+
GROUP_GRAVITY = 0.3;
|
|
35388
|
+
UNGROUPED_GRAVITY = 0.02;
|
|
35387
35389
|
labelMeasureCtx = null;
|
|
35388
35390
|
MAX_LABEL_CHARS = 22;
|
|
35389
35391
|
GraphCanvas = ({
|
|
@@ -35570,7 +35572,7 @@ var init_GraphCanvas = __esm({
|
|
|
35570
35572
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
35571
35573
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
35572
35574
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
35573
|
-
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster
|
|
35575
|
+
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).force("y", forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).stop();
|
|
35574
35576
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
35575
35577
|
const pad = nodeSpacing / 2;
|
|
35576
35578
|
const rectsOf = (n) => {
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -34741,7 +34741,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
34741
34741
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
34742
34742
|
}
|
|
34743
34743
|
function getGroupColor(group, groups) {
|
|
34744
|
-
if (!group) return GROUP_COLORS2[0];
|
|
34744
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
34745
34745
|
const idx = groups.indexOf(group);
|
|
34746
34746
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
34747
34747
|
}
|
|
@@ -34774,7 +34774,7 @@ function resolveColor3(color, el) {
|
|
|
34774
34774
|
function truncateLabel(label) {
|
|
34775
34775
|
return label.length > MAX_LABEL_CHARS ? label.slice(0, MAX_LABEL_CHARS - 1) + "\u2026" : label;
|
|
34776
34776
|
}
|
|
34777
|
-
var GROUP_COLORS2, labelMeasureCtx, MAX_LABEL_CHARS, GraphCanvas;
|
|
34777
|
+
var GROUP_COLORS2, GROUP_GRAVITY, UNGROUPED_GRAVITY, labelMeasureCtx, MAX_LABEL_CHARS, GraphCanvas;
|
|
34778
34778
|
var init_GraphCanvas = __esm({
|
|
34779
34779
|
"components/core/molecules/GraphCanvas.tsx"() {
|
|
34780
34780
|
"use client";
|
|
@@ -34794,6 +34794,8 @@ var init_GraphCanvas = __esm({
|
|
|
34794
34794
|
"var(--color-info)",
|
|
34795
34795
|
"var(--color-accent)"
|
|
34796
34796
|
];
|
|
34797
|
+
GROUP_GRAVITY = 0.3;
|
|
34798
|
+
UNGROUPED_GRAVITY = 0.02;
|
|
34797
34799
|
labelMeasureCtx = null;
|
|
34798
34800
|
MAX_LABEL_CHARS = 22;
|
|
34799
34801
|
GraphCanvas = ({
|
|
@@ -34980,7 +34982,7 @@ var init_GraphCanvas = __esm({
|
|
|
34980
34982
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
34981
34983
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
34982
34984
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
34983
|
-
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster
|
|
34985
|
+
const simulation = d3Force.forceSimulation(simNodes).force("edge", d3Force.forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", d3Force.forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", d3Force.forceManyBody().strength(-repulsion * 0.5)).force("collide", d3Force.forceCollide().radius(collideRadius).strength(0.9)).force("x", d3Force.forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).force("y", d3Force.forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).stop();
|
|
34984
34986
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
34985
34987
|
const pad = nodeSpacing / 2;
|
|
34986
34988
|
const rectsOf = (n) => {
|
package/dist/runtime/index.js
CHANGED
|
@@ -34697,7 +34697,7 @@ function measureLabelWidth(text, fontFamily = "system-ui") {
|
|
|
34697
34697
|
return labelMeasureCtx.measureText(text).width + 4;
|
|
34698
34698
|
}
|
|
34699
34699
|
function getGroupColor(group, groups) {
|
|
34700
|
-
if (!group) return GROUP_COLORS2[0];
|
|
34700
|
+
if (!group) return groups.length > 0 ? "var(--color-muted-foreground)" : GROUP_COLORS2[0];
|
|
34701
34701
|
const idx = groups.indexOf(group);
|
|
34702
34702
|
return GROUP_COLORS2[idx % GROUP_COLORS2.length];
|
|
34703
34703
|
}
|
|
@@ -34730,7 +34730,7 @@ function resolveColor3(color, el) {
|
|
|
34730
34730
|
function truncateLabel(label) {
|
|
34731
34731
|
return label.length > MAX_LABEL_CHARS ? label.slice(0, MAX_LABEL_CHARS - 1) + "\u2026" : label;
|
|
34732
34732
|
}
|
|
34733
|
-
var GROUP_COLORS2, labelMeasureCtx, MAX_LABEL_CHARS, GraphCanvas;
|
|
34733
|
+
var GROUP_COLORS2, GROUP_GRAVITY, UNGROUPED_GRAVITY, labelMeasureCtx, MAX_LABEL_CHARS, GraphCanvas;
|
|
34734
34734
|
var init_GraphCanvas = __esm({
|
|
34735
34735
|
"components/core/molecules/GraphCanvas.tsx"() {
|
|
34736
34736
|
"use client";
|
|
@@ -34750,6 +34750,8 @@ var init_GraphCanvas = __esm({
|
|
|
34750
34750
|
"var(--color-info)",
|
|
34751
34751
|
"var(--color-accent)"
|
|
34752
34752
|
];
|
|
34753
|
+
GROUP_GRAVITY = 0.3;
|
|
34754
|
+
UNGROUPED_GRAVITY = 0.02;
|
|
34753
34755
|
labelMeasureCtx = null;
|
|
34754
34756
|
MAX_LABEL_CHARS = 22;
|
|
34755
34757
|
GraphCanvas = ({
|
|
@@ -34936,7 +34938,7 @@ var init_GraphCanvas = __esm({
|
|
|
34936
34938
|
const edgeLinks = propEdges.filter((e) => present.has(e.source) && present.has(e.target)).map((e) => ({ source: e.source, target: e.target, weight: clamp01(e.weight ?? 1) }));
|
|
34937
34939
|
const simLinks = activeSimilarity.filter((p) => present.has(p.source) && present.has(p.target)).map((p) => ({ source: p.source, target: p.target, weight: clamp01(p.weight) }));
|
|
34938
34940
|
const collideRadius = (n) => Math.max(n.size || 8, (n.labelW ?? 0) / 2) + nodeSpacing / 2;
|
|
34939
|
-
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength(multiCluster
|
|
34941
|
+
const simulation = forceSimulation(simNodes).force("edge", forceLink(edgeLinks).id((d) => d.id).distance((l) => linkDistance * (0.35 + (1 - l.weight) * 0.3)).strength(0.9)).force("similarity", forceLink(simLinks).id((d) => d.id).distance((l) => linkDistance * (1.35 - 0.55 * l.weight)).strength(0.03)).force("charge", forceManyBody().strength(-repulsion * 0.5)).force("collide", forceCollide().radius(collideRadius).strength(0.9)).force("x", forceX((n) => groupTarget.get(n.group ?? "")?.x ?? w / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).force("y", forceY((n) => groupTarget.get(n.group ?? "")?.y ?? h / 2).strength((n) => multiCluster && n.group ? GROUP_GRAVITY : UNGROUPED_GRAVITY)).stop();
|
|
34940
34942
|
for (let i = 0; i < 300; i++) simulation.tick();
|
|
34941
34943
|
const pad = nodeSpacing / 2;
|
|
34942
34944
|
const rectsOf = (n) => {
|