microboard-temp 0.13.21 → 0.13.22
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/cjs/browser.js +21 -1
- package/dist/cjs/index.js +21 -1
- package/dist/cjs/node.js +21 -1
- package/dist/esm/browser.js +21 -1
- package/dist/esm/index.js +21 -1
- package/dist/esm/node.js +21 -1
- package/dist/types/Board.d.ts +4 -0
- package/dist/types/ForceGraph/ForceGraphEngine.d.ts +4 -0
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -54644,6 +54644,20 @@ class ForceGraphEngine {
|
|
|
54644
54644
|
isNodeInActiveGraph(nodeId) {
|
|
54645
54645
|
return !!this.findComponentId(nodeId);
|
|
54646
54646
|
}
|
|
54647
|
+
getComponentTargetGap(nodeId) {
|
|
54648
|
+
const compId = this.findComponentId(nodeId);
|
|
54649
|
+
return compId ? this.activeComponents.get(compId)?.targetGap : undefined;
|
|
54650
|
+
}
|
|
54651
|
+
setComponentTargetGap(nodeId, gap) {
|
|
54652
|
+
const compId = this.findComponentId(nodeId);
|
|
54653
|
+
if (!compId)
|
|
54654
|
+
return;
|
|
54655
|
+
const comp = this.activeComponents.get(compId);
|
|
54656
|
+
if (!comp)
|
|
54657
|
+
return;
|
|
54658
|
+
comp.targetGap = gap;
|
|
54659
|
+
this.wake();
|
|
54660
|
+
}
|
|
54647
54661
|
hasActiveComponents() {
|
|
54648
54662
|
return this.activeComponents.size > 0;
|
|
54649
54663
|
}
|
|
@@ -54717,7 +54731,7 @@ class ForceGraphEngine {
|
|
|
54717
54731
|
count++;
|
|
54718
54732
|
}
|
|
54719
54733
|
const avgMaxDim = count > 0 ? totalMaxDim / count : 100;
|
|
54720
|
-
return avgMaxDim *
|
|
54734
|
+
return avgMaxDim * 1.5;
|
|
54721
54735
|
}
|
|
54722
54736
|
getActiveNodeIds() {
|
|
54723
54737
|
const all6 = new Set;
|
|
@@ -55959,6 +55973,12 @@ class Board {
|
|
|
55959
55973
|
isNodeInForceGraph(nodeId) {
|
|
55960
55974
|
return this.forceGraph?.isNodeInActiveGraph(nodeId) ?? false;
|
|
55961
55975
|
}
|
|
55976
|
+
getForceGraphGap(nodeId) {
|
|
55977
|
+
return this.forceGraph?.getComponentTargetGap(nodeId);
|
|
55978
|
+
}
|
|
55979
|
+
setForceGraphGap(nodeId, gap) {
|
|
55980
|
+
this.forceGraph?.setComponentTargetGap(nodeId, gap);
|
|
55981
|
+
}
|
|
55962
55982
|
wakeForceGraph() {
|
|
55963
55983
|
this.forceGraph?.wake();
|
|
55964
55984
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -54644,6 +54644,20 @@ class ForceGraphEngine {
|
|
|
54644
54644
|
isNodeInActiveGraph(nodeId) {
|
|
54645
54645
|
return !!this.findComponentId(nodeId);
|
|
54646
54646
|
}
|
|
54647
|
+
getComponentTargetGap(nodeId) {
|
|
54648
|
+
const compId = this.findComponentId(nodeId);
|
|
54649
|
+
return compId ? this.activeComponents.get(compId)?.targetGap : undefined;
|
|
54650
|
+
}
|
|
54651
|
+
setComponentTargetGap(nodeId, gap) {
|
|
54652
|
+
const compId = this.findComponentId(nodeId);
|
|
54653
|
+
if (!compId)
|
|
54654
|
+
return;
|
|
54655
|
+
const comp = this.activeComponents.get(compId);
|
|
54656
|
+
if (!comp)
|
|
54657
|
+
return;
|
|
54658
|
+
comp.targetGap = gap;
|
|
54659
|
+
this.wake();
|
|
54660
|
+
}
|
|
54647
54661
|
hasActiveComponents() {
|
|
54648
54662
|
return this.activeComponents.size > 0;
|
|
54649
54663
|
}
|
|
@@ -54717,7 +54731,7 @@ class ForceGraphEngine {
|
|
|
54717
54731
|
count++;
|
|
54718
54732
|
}
|
|
54719
54733
|
const avgMaxDim = count > 0 ? totalMaxDim / count : 100;
|
|
54720
|
-
return avgMaxDim *
|
|
54734
|
+
return avgMaxDim * 1.5;
|
|
54721
54735
|
}
|
|
54722
54736
|
getActiveNodeIds() {
|
|
54723
54737
|
const all6 = new Set;
|
|
@@ -55959,6 +55973,12 @@ class Board {
|
|
|
55959
55973
|
isNodeInForceGraph(nodeId) {
|
|
55960
55974
|
return this.forceGraph?.isNodeInActiveGraph(nodeId) ?? false;
|
|
55961
55975
|
}
|
|
55976
|
+
getForceGraphGap(nodeId) {
|
|
55977
|
+
return this.forceGraph?.getComponentTargetGap(nodeId);
|
|
55978
|
+
}
|
|
55979
|
+
setForceGraphGap(nodeId, gap) {
|
|
55980
|
+
this.forceGraph?.setComponentTargetGap(nodeId, gap);
|
|
55981
|
+
}
|
|
55962
55982
|
wakeForceGraph() {
|
|
55963
55983
|
this.forceGraph?.wake();
|
|
55964
55984
|
}
|
package/dist/cjs/node.js
CHANGED
|
@@ -57117,6 +57117,20 @@ class ForceGraphEngine {
|
|
|
57117
57117
|
isNodeInActiveGraph(nodeId) {
|
|
57118
57118
|
return !!this.findComponentId(nodeId);
|
|
57119
57119
|
}
|
|
57120
|
+
getComponentTargetGap(nodeId) {
|
|
57121
|
+
const compId = this.findComponentId(nodeId);
|
|
57122
|
+
return compId ? this.activeComponents.get(compId)?.targetGap : undefined;
|
|
57123
|
+
}
|
|
57124
|
+
setComponentTargetGap(nodeId, gap) {
|
|
57125
|
+
const compId = this.findComponentId(nodeId);
|
|
57126
|
+
if (!compId)
|
|
57127
|
+
return;
|
|
57128
|
+
const comp = this.activeComponents.get(compId);
|
|
57129
|
+
if (!comp)
|
|
57130
|
+
return;
|
|
57131
|
+
comp.targetGap = gap;
|
|
57132
|
+
this.wake();
|
|
57133
|
+
}
|
|
57120
57134
|
hasActiveComponents() {
|
|
57121
57135
|
return this.activeComponents.size > 0;
|
|
57122
57136
|
}
|
|
@@ -57190,7 +57204,7 @@ class ForceGraphEngine {
|
|
|
57190
57204
|
count++;
|
|
57191
57205
|
}
|
|
57192
57206
|
const avgMaxDim = count > 0 ? totalMaxDim / count : 100;
|
|
57193
|
-
return avgMaxDim *
|
|
57207
|
+
return avgMaxDim * 1.5;
|
|
57194
57208
|
}
|
|
57195
57209
|
getActiveNodeIds() {
|
|
57196
57210
|
const all6 = new Set;
|
|
@@ -58432,6 +58446,12 @@ class Board {
|
|
|
58432
58446
|
isNodeInForceGraph(nodeId) {
|
|
58433
58447
|
return this.forceGraph?.isNodeInActiveGraph(nodeId) ?? false;
|
|
58434
58448
|
}
|
|
58449
|
+
getForceGraphGap(nodeId) {
|
|
58450
|
+
return this.forceGraph?.getComponentTargetGap(nodeId);
|
|
58451
|
+
}
|
|
58452
|
+
setForceGraphGap(nodeId, gap) {
|
|
58453
|
+
this.forceGraph?.setComponentTargetGap(nodeId, gap);
|
|
58454
|
+
}
|
|
58435
58455
|
wakeForceGraph() {
|
|
58436
58456
|
this.forceGraph?.wake();
|
|
58437
58457
|
}
|
package/dist/esm/browser.js
CHANGED
|
@@ -54473,6 +54473,20 @@ class ForceGraphEngine {
|
|
|
54473
54473
|
isNodeInActiveGraph(nodeId) {
|
|
54474
54474
|
return !!this.findComponentId(nodeId);
|
|
54475
54475
|
}
|
|
54476
|
+
getComponentTargetGap(nodeId) {
|
|
54477
|
+
const compId = this.findComponentId(nodeId);
|
|
54478
|
+
return compId ? this.activeComponents.get(compId)?.targetGap : undefined;
|
|
54479
|
+
}
|
|
54480
|
+
setComponentTargetGap(nodeId, gap) {
|
|
54481
|
+
const compId = this.findComponentId(nodeId);
|
|
54482
|
+
if (!compId)
|
|
54483
|
+
return;
|
|
54484
|
+
const comp = this.activeComponents.get(compId);
|
|
54485
|
+
if (!comp)
|
|
54486
|
+
return;
|
|
54487
|
+
comp.targetGap = gap;
|
|
54488
|
+
this.wake();
|
|
54489
|
+
}
|
|
54476
54490
|
hasActiveComponents() {
|
|
54477
54491
|
return this.activeComponents.size > 0;
|
|
54478
54492
|
}
|
|
@@ -54546,7 +54560,7 @@ class ForceGraphEngine {
|
|
|
54546
54560
|
count++;
|
|
54547
54561
|
}
|
|
54548
54562
|
const avgMaxDim = count > 0 ? totalMaxDim / count : 100;
|
|
54549
|
-
return avgMaxDim *
|
|
54563
|
+
return avgMaxDim * 1.5;
|
|
54550
54564
|
}
|
|
54551
54565
|
getActiveNodeIds() {
|
|
54552
54566
|
const all6 = new Set;
|
|
@@ -55788,6 +55802,12 @@ class Board {
|
|
|
55788
55802
|
isNodeInForceGraph(nodeId) {
|
|
55789
55803
|
return this.forceGraph?.isNodeInActiveGraph(nodeId) ?? false;
|
|
55790
55804
|
}
|
|
55805
|
+
getForceGraphGap(nodeId) {
|
|
55806
|
+
return this.forceGraph?.getComponentTargetGap(nodeId);
|
|
55807
|
+
}
|
|
55808
|
+
setForceGraphGap(nodeId, gap) {
|
|
55809
|
+
this.forceGraph?.setComponentTargetGap(nodeId, gap);
|
|
55810
|
+
}
|
|
55791
55811
|
wakeForceGraph() {
|
|
55792
55812
|
this.forceGraph?.wake();
|
|
55793
55813
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -54466,6 +54466,20 @@ class ForceGraphEngine {
|
|
|
54466
54466
|
isNodeInActiveGraph(nodeId) {
|
|
54467
54467
|
return !!this.findComponentId(nodeId);
|
|
54468
54468
|
}
|
|
54469
|
+
getComponentTargetGap(nodeId) {
|
|
54470
|
+
const compId = this.findComponentId(nodeId);
|
|
54471
|
+
return compId ? this.activeComponents.get(compId)?.targetGap : undefined;
|
|
54472
|
+
}
|
|
54473
|
+
setComponentTargetGap(nodeId, gap) {
|
|
54474
|
+
const compId = this.findComponentId(nodeId);
|
|
54475
|
+
if (!compId)
|
|
54476
|
+
return;
|
|
54477
|
+
const comp = this.activeComponents.get(compId);
|
|
54478
|
+
if (!comp)
|
|
54479
|
+
return;
|
|
54480
|
+
comp.targetGap = gap;
|
|
54481
|
+
this.wake();
|
|
54482
|
+
}
|
|
54469
54483
|
hasActiveComponents() {
|
|
54470
54484
|
return this.activeComponents.size > 0;
|
|
54471
54485
|
}
|
|
@@ -54539,7 +54553,7 @@ class ForceGraphEngine {
|
|
|
54539
54553
|
count++;
|
|
54540
54554
|
}
|
|
54541
54555
|
const avgMaxDim = count > 0 ? totalMaxDim / count : 100;
|
|
54542
|
-
return avgMaxDim *
|
|
54556
|
+
return avgMaxDim * 1.5;
|
|
54543
54557
|
}
|
|
54544
54558
|
getActiveNodeIds() {
|
|
54545
54559
|
const all6 = new Set;
|
|
@@ -55781,6 +55795,12 @@ class Board {
|
|
|
55781
55795
|
isNodeInForceGraph(nodeId) {
|
|
55782
55796
|
return this.forceGraph?.isNodeInActiveGraph(nodeId) ?? false;
|
|
55783
55797
|
}
|
|
55798
|
+
getForceGraphGap(nodeId) {
|
|
55799
|
+
return this.forceGraph?.getComponentTargetGap(nodeId);
|
|
55800
|
+
}
|
|
55801
|
+
setForceGraphGap(nodeId, gap) {
|
|
55802
|
+
this.forceGraph?.setComponentTargetGap(nodeId, gap);
|
|
55803
|
+
}
|
|
55784
55804
|
wakeForceGraph() {
|
|
55785
55805
|
this.forceGraph?.wake();
|
|
55786
55806
|
}
|
package/dist/esm/node.js
CHANGED
|
@@ -56934,6 +56934,20 @@ class ForceGraphEngine {
|
|
|
56934
56934
|
isNodeInActiveGraph(nodeId) {
|
|
56935
56935
|
return !!this.findComponentId(nodeId);
|
|
56936
56936
|
}
|
|
56937
|
+
getComponentTargetGap(nodeId) {
|
|
56938
|
+
const compId = this.findComponentId(nodeId);
|
|
56939
|
+
return compId ? this.activeComponents.get(compId)?.targetGap : undefined;
|
|
56940
|
+
}
|
|
56941
|
+
setComponentTargetGap(nodeId, gap) {
|
|
56942
|
+
const compId = this.findComponentId(nodeId);
|
|
56943
|
+
if (!compId)
|
|
56944
|
+
return;
|
|
56945
|
+
const comp = this.activeComponents.get(compId);
|
|
56946
|
+
if (!comp)
|
|
56947
|
+
return;
|
|
56948
|
+
comp.targetGap = gap;
|
|
56949
|
+
this.wake();
|
|
56950
|
+
}
|
|
56937
56951
|
hasActiveComponents() {
|
|
56938
56952
|
return this.activeComponents.size > 0;
|
|
56939
56953
|
}
|
|
@@ -57007,7 +57021,7 @@ class ForceGraphEngine {
|
|
|
57007
57021
|
count++;
|
|
57008
57022
|
}
|
|
57009
57023
|
const avgMaxDim = count > 0 ? totalMaxDim / count : 100;
|
|
57010
|
-
return avgMaxDim *
|
|
57024
|
+
return avgMaxDim * 1.5;
|
|
57011
57025
|
}
|
|
57012
57026
|
getActiveNodeIds() {
|
|
57013
57027
|
const all6 = new Set;
|
|
@@ -58249,6 +58263,12 @@ class Board {
|
|
|
58249
58263
|
isNodeInForceGraph(nodeId) {
|
|
58250
58264
|
return this.forceGraph?.isNodeInActiveGraph(nodeId) ?? false;
|
|
58251
58265
|
}
|
|
58266
|
+
getForceGraphGap(nodeId) {
|
|
58267
|
+
return this.forceGraph?.getComponentTargetGap(nodeId);
|
|
58268
|
+
}
|
|
58269
|
+
setForceGraphGap(nodeId, gap) {
|
|
58270
|
+
this.forceGraph?.setComponentTargetGap(nodeId, gap);
|
|
58271
|
+
}
|
|
58252
58272
|
wakeForceGraph() {
|
|
58253
58273
|
this.forceGraph?.wake();
|
|
58254
58274
|
}
|
package/dist/types/Board.d.ts
CHANGED
|
@@ -146,6 +146,10 @@ export declare class Board {
|
|
|
146
146
|
disableForceGraph(nodeId: string): void;
|
|
147
147
|
/** Returns true if `nodeId` is currently in an active force-directed component. */
|
|
148
148
|
isNodeInForceGraph(nodeId: string): boolean;
|
|
149
|
+
/** Get the connector target gap (px) for the component containing `nodeId`. */
|
|
150
|
+
getForceGraphGap(nodeId: string): number | undefined;
|
|
151
|
+
/** Set the connector target gap (px) for the component containing `nodeId`. */
|
|
152
|
+
setForceGraphGap(nodeId: string, gap: number): void;
|
|
149
153
|
/** Call after dragging a node to re-wake the physics engine if it was sleeping. */
|
|
150
154
|
wakeForceGraph(): void;
|
|
151
155
|
}
|
|
@@ -25,6 +25,10 @@ export declare class ForceGraphEngine {
|
|
|
25
25
|
*/
|
|
26
26
|
disableForGraph(nodeId: string): void;
|
|
27
27
|
isNodeInActiveGraph(nodeId: string): boolean;
|
|
28
|
+
/** Get the current target gap for the component containing `nodeId`. Returns undefined if not active. */
|
|
29
|
+
getComponentTargetGap(nodeId: string): number | undefined;
|
|
30
|
+
/** Update the target gap (connector length) for the component containing `nodeId` and re-wake. */
|
|
31
|
+
setComponentTargetGap(nodeId: string, gap: number): void;
|
|
28
32
|
hasActiveComponents(): boolean;
|
|
29
33
|
/** Re-wake physics after a node is manually dragged. */
|
|
30
34
|
wake(): void;
|