@andespindola/brainlink 0.1.0-beta.77 → 0.1.0-beta.78
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/README.md +1 -0
- package/dist/domain/graph-layout.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -83,6 +83,7 @@ Legacy `.jsonl.gz` packs are upgraded to `.blpk` automatically on first search/c
|
|
|
83
83
|
- Realtime graph UI with agent selector and colored knowledge groups.
|
|
84
84
|
- Graph renderer optimized for large datasets with viewport-driven node culling and edge lookup by visible nodes.
|
|
85
85
|
- Large graph layout API automatically uses compact payload encoding with link-coverage-aware edge selection to reduce initial client load without hiding major relationships.
|
|
86
|
+
- Large-segment layout spacing now grows logarithmically to keep initial visual density consistent between medium and very large vaults (for example, ~1k vs ~50k notes).
|
|
86
87
|
- Zoomed-out graph LOD now clusters dense regions and progressively expands nodes as zoom increases.
|
|
87
88
|
- Graph reset starts in macro "galaxy" overview mode and progressively reveals nearby nodes as zoom increases, including smaller vaults.
|
|
88
89
|
- Graph filtering runs in a dedicated browser worker to keep the UI thread responsive during heavy datasets.
|
|
@@ -167,13 +167,17 @@ const groupNodesBySegment = (nodes, segments) => {
|
|
|
167
167
|
return new Map(groups);
|
|
168
168
|
};
|
|
169
169
|
const segmentAngle = (segment, index, count) => segmentAngles[segment] ?? (Math.PI * 2 * index) / Math.max(count, 1) - Math.PI / 2;
|
|
170
|
+
const petalSpreadForSegmentSize = (size) => {
|
|
171
|
+
const safeSize = Math.max(size, 1);
|
|
172
|
+
return 180 + Math.log2(safeSize + 1) * 6;
|
|
173
|
+
};
|
|
170
174
|
const createSegmentNodes = (segments, degrees, segmentCount) => ([segment, nodes], segmentIndex) => {
|
|
171
175
|
const sortedNodes = [...nodes].sort(byDegreeThenTitle(degrees));
|
|
172
176
|
const angle = segmentAngle(segment, segmentIndex, segmentCount);
|
|
173
177
|
const baseRadius = segmentCount === 1 ? 0 : 340 + Math.min(sortedNodes.length, 22) * 10;
|
|
174
178
|
const centerX = Math.cos(angle) * baseRadius;
|
|
175
179
|
const centerY = Math.sin(angle) * (baseRadius * 0.78);
|
|
176
|
-
const petalSpread =
|
|
180
|
+
const petalSpread = petalSpreadForSegmentSize(sortedNodes.length);
|
|
177
181
|
return sortedNodes.map((node, index) => {
|
|
178
182
|
const localAngle = index * 2.399963 + jitter(node.title, 0.42);
|
|
179
183
|
const localRadius = Math.sqrt(index + 1) * petalSpread;
|
package/package.json
CHANGED