ma-agents 3.15.0 → 3.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5697,10 +5697,14 @@ var DESIGN_SYSTEM_CSS = `/* Knowledge Atlas \u2014 design system (Story 29.3) */
|
|
|
5697
5697
|
top: 0;
|
|
5698
5698
|
}
|
|
5699
5699
|
|
|
5700
|
-
/*
|
|
5701
|
-
|
|
5700
|
+
/* Scroll behaviour: use auto (instant) so that landing on a page via a
|
|
5701
|
+
#anchor \u2014 e.g. clicking a graph node or an entity link into a long reading
|
|
5702
|
+
view \u2014 reliably jumps to the target. A global smooth scroll-behavior
|
|
5703
|
+
made the browser's on-load hash navigation unreliable on long documents (it
|
|
5704
|
+
could stay at the top \u2014 the "click goes to the start of the document" bug).
|
|
5705
|
+
In-page TOC/backlink clicks still jump correctly, just without the animation. */
|
|
5702
5706
|
html {
|
|
5703
|
-
scroll-behavior:
|
|
5707
|
+
scroll-behavior: auto;
|
|
5704
5708
|
}
|
|
5705
5709
|
|
|
5706
5710
|
body {
|
|
@@ -13096,6 +13100,20 @@ function buildAppScript() {
|
|
|
13096
13100
|
return;
|
|
13097
13101
|
}
|
|
13098
13102
|
|
|
13103
|
+
// Layout forces (fixes the overlapping-blob): stronger charge repulsion + a
|
|
13104
|
+
// larger link distance push nodes apart; a gentler velocity decay lets a
|
|
13105
|
+
// dragged node's neighbourhood follow it and settle rather than everything
|
|
13106
|
+
// snapping. The vendored force-graph exposes charge/link via d3Force but no
|
|
13107
|
+
// collide, so spacing comes from charge+distance. All best-effort.
|
|
13108
|
+
try {
|
|
13109
|
+
var _charge = graph.d3Force && graph.d3Force('charge');
|
|
13110
|
+
if (_charge && _charge.strength) _charge.strength(-160);
|
|
13111
|
+
var _link = graph.d3Force && graph.d3Force('link');
|
|
13112
|
+
if (_link && _link.distance) _link.distance(48);
|
|
13113
|
+
if (graph.d3VelocityDecay) graph.d3VelocityDecay(0.3);
|
|
13114
|
+
if (graph.warmupTicks) graph.warmupTicks(80); // pre-spread before first paint
|
|
13115
|
+
} catch (_e) { /* forces best-effort; graph still renders without them */ }
|
|
13116
|
+
|
|
13099
13117
|
// FR222: distinct shape per entity type (previously color+size only \u2014 the
|
|
13100
13118
|
// canvas never read NODE_STYLES' shape/data-shape, so every node was a
|
|
13101
13119
|
// circle regardless of kind). Traces the path for the node's shape
|
|
@@ -13161,7 +13179,7 @@ function buildAppScript() {
|
|
|
13161
13179
|
// FR222: paint the node as its per-kind shape (circle/square/diamond/
|
|
13162
13180
|
// triangle) instead of force-graph's default circle-only rendering.
|
|
13163
13181
|
.nodeCanvasObject(function(n, ctx) {
|
|
13164
|
-
var size = n.size || 6;
|
|
13182
|
+
var size = (n.size || 6) * 0.5; // smaller nodes (were visually oversized/overlapping)
|
|
13165
13183
|
ctx.fillStyle = n.color || '#888';
|
|
13166
13184
|
traceNodeShapePath(ctx, n.shape, n.x, n.y, size);
|
|
13167
13185
|
ctx.fill();
|
|
@@ -13171,7 +13189,7 @@ function buildAppScript() {
|
|
|
13171
13189
|
// custom shape drawn above (non-circle nodes would get unreliable
|
|
13172
13190
|
// hover/click hit-boxes).
|
|
13173
13191
|
.nodePointerAreaPaint(function(n, color, ctx) {
|
|
13174
|
-
var size = (n.size || 6) + 2; //
|
|
13192
|
+
var size = (n.size || 6) * 0.5 + 2; // match the smaller draw size, +2 to stay easy to hit
|
|
13175
13193
|
ctx.fillStyle = color;
|
|
13176
13194
|
traceNodeShapePath(ctx, n.shape, n.x, n.y, size);
|
|
13177
13195
|
ctx.fill();
|
|
@@ -13200,6 +13218,16 @@ function buildAppScript() {
|
|
|
13200
13218
|
var href = page + (n.anchor ? '#' + n.anchor : '');
|
|
13201
13219
|
window.location.href = href;
|
|
13202
13220
|
})
|
|
13221
|
+
// Drag-to-pin (fixes the spring-back): keep the node exactly where it was
|
|
13222
|
+
// dropped (fx/fy). Because the simulation stays warm, its linked neighbours
|
|
13223
|
+
// follow the drag and nodes farther along the graph move progressively less.
|
|
13224
|
+
// Right-click a node to release its pin back into the layout.
|
|
13225
|
+
.onNodeDrag(function(n) { n.fx = n.x; n.fy = n.y; })
|
|
13226
|
+
.onNodeDragEnd(function(n) { n.fx = n.x; n.fy = n.y; })
|
|
13227
|
+
.onNodeRightClick(function(n) {
|
|
13228
|
+
n.fx = undefined; n.fy = undefined;
|
|
13229
|
+
if (graph.d3ReheatSimulation) graph.d3ReheatSimulation();
|
|
13230
|
+
})
|
|
13203
13231
|
.onNodeHover(function(n) {
|
|
13204
13232
|
// Distinct cursor hint: pointer only over nodes that actually
|
|
13205
13233
|
// navigate somewhere (have a resolved page); default cursor otherwise
|
|
@@ -108,10 +108,14 @@ export const DESIGN_SYSTEM_CSS: string = `\
|
|
|
108
108
|
top: 0;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
/*
|
|
112
|
-
|
|
111
|
+
/* Scroll behaviour: use auto (instant) so that landing on a page via a
|
|
112
|
+
#anchor — e.g. clicking a graph node or an entity link into a long reading
|
|
113
|
+
view — reliably jumps to the target. A global smooth scroll-behavior
|
|
114
|
+
made the browser's on-load hash navigation unreliable on long documents (it
|
|
115
|
+
could stay at the top — the "click goes to the start of the document" bug).
|
|
116
|
+
In-page TOC/backlink clicks still jump correctly, just without the animation. */
|
|
113
117
|
html {
|
|
114
|
-
scroll-behavior:
|
|
118
|
+
scroll-behavior: auto;
|
|
115
119
|
}
|
|
116
120
|
|
|
117
121
|
body {
|
|
@@ -687,6 +687,20 @@ function buildAppScript(): string {
|
|
|
687
687
|
return;
|
|
688
688
|
}
|
|
689
689
|
|
|
690
|
+
// Layout forces (fixes the overlapping-blob): stronger charge repulsion + a
|
|
691
|
+
// larger link distance push nodes apart; a gentler velocity decay lets a
|
|
692
|
+
// dragged node's neighbourhood follow it and settle rather than everything
|
|
693
|
+
// snapping. The vendored force-graph exposes charge/link via d3Force but no
|
|
694
|
+
// collide, so spacing comes from charge+distance. All best-effort.
|
|
695
|
+
try {
|
|
696
|
+
var _charge = graph.d3Force && graph.d3Force('charge');
|
|
697
|
+
if (_charge && _charge.strength) _charge.strength(-160);
|
|
698
|
+
var _link = graph.d3Force && graph.d3Force('link');
|
|
699
|
+
if (_link && _link.distance) _link.distance(48);
|
|
700
|
+
if (graph.d3VelocityDecay) graph.d3VelocityDecay(0.3);
|
|
701
|
+
if (graph.warmupTicks) graph.warmupTicks(80); // pre-spread before first paint
|
|
702
|
+
} catch (_e) { /* forces best-effort; graph still renders without them */ }
|
|
703
|
+
|
|
690
704
|
// FR222: distinct shape per entity type (previously color+size only — the
|
|
691
705
|
// canvas never read NODE_STYLES' shape/data-shape, so every node was a
|
|
692
706
|
// circle regardless of kind). Traces the path for the node's shape
|
|
@@ -752,7 +766,7 @@ function buildAppScript(): string {
|
|
|
752
766
|
// FR222: paint the node as its per-kind shape (circle/square/diamond/
|
|
753
767
|
// triangle) instead of force-graph's default circle-only rendering.
|
|
754
768
|
.nodeCanvasObject(function(n, ctx) {
|
|
755
|
-
var size = n.size || 6;
|
|
769
|
+
var size = (n.size || 6) * 0.5; // smaller nodes (were visually oversized/overlapping)
|
|
756
770
|
ctx.fillStyle = n.color || '#888';
|
|
757
771
|
traceNodeShapePath(ctx, n.shape, n.x, n.y, size);
|
|
758
772
|
ctx.fill();
|
|
@@ -762,7 +776,7 @@ function buildAppScript(): string {
|
|
|
762
776
|
// custom shape drawn above (non-circle nodes would get unreliable
|
|
763
777
|
// hover/click hit-boxes).
|
|
764
778
|
.nodePointerAreaPaint(function(n, color, ctx) {
|
|
765
|
-
var size = (n.size || 6) + 2; //
|
|
779
|
+
var size = (n.size || 6) * 0.5 + 2; // match the smaller draw size, +2 to stay easy to hit
|
|
766
780
|
ctx.fillStyle = color;
|
|
767
781
|
traceNodeShapePath(ctx, n.shape, n.x, n.y, size);
|
|
768
782
|
ctx.fill();
|
|
@@ -791,6 +805,16 @@ function buildAppScript(): string {
|
|
|
791
805
|
var href = page + (n.anchor ? '#' + n.anchor : '');
|
|
792
806
|
window.location.href = href;
|
|
793
807
|
})
|
|
808
|
+
// Drag-to-pin (fixes the spring-back): keep the node exactly where it was
|
|
809
|
+
// dropped (fx/fy). Because the simulation stays warm, its linked neighbours
|
|
810
|
+
// follow the drag and nodes farther along the graph move progressively less.
|
|
811
|
+
// Right-click a node to release its pin back into the layout.
|
|
812
|
+
.onNodeDrag(function(n) { n.fx = n.x; n.fy = n.y; })
|
|
813
|
+
.onNodeDragEnd(function(n) { n.fx = n.x; n.fy = n.y; })
|
|
814
|
+
.onNodeRightClick(function(n) {
|
|
815
|
+
n.fx = undefined; n.fy = undefined;
|
|
816
|
+
if (graph.d3ReheatSimulation) graph.d3ReheatSimulation();
|
|
817
|
+
})
|
|
794
818
|
.onNodeHover(function(n) {
|
|
795
819
|
// Distinct cursor hint: pointer only over nodes that actually
|
|
796
820
|
// navigate somewhere (have a resolved page); default cursor otherwise
|