@andespindola/brainlink 0.1.0-beta.68 → 0.1.0-beta.69

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.
@@ -17,7 +17,7 @@ const worldCoordinateLimit = 5_000_000
17
17
  const transformCoordinateLimit = 20_000_000
18
18
  const hoverHitTestIntervalMs = 64
19
19
  const overviewClusterMaxCount = 1400
20
- const zoomRecoveryGuardMs = 1500
20
+ const zoomRecoveryGuardMs = 4200
21
21
  const zoomCapTargetViewportShare = 0.72
22
22
  const meshEdgeScaleThreshold = 0.09
23
23
  const meshEdgeMinBudget = 140
@@ -1934,9 +1934,10 @@ const render = now => {
1934
1934
  tick(delta)
1935
1935
  const hasVisibleNodeOnScreen = state.renderNodes.some((node) => isNodeVisibleOnScreen(node, width, height))
1936
1936
  const manualZoomGuardActive = now - state.lastManualZoomAt < zoomRecoveryGuardMs
1937
- if (!hasVisibleNodeOnScreen && state.renderNodes.length > 0 && !manualZoomGuardActive) {
1937
+ const allowViewportAutoRecovery = state.nodes.length <= massiveGraphNodeThreshold
1938
+ if (allowViewportAutoRecovery && !hasVisibleNodeOnScreen && state.renderNodes.length > 0 && !manualZoomGuardActive) {
1938
1939
  state.offscreenFrameCount += 1
1939
- if (state.offscreenFrameCount >= 6 && !state.recoveringViewport) {
1940
+ if (state.offscreenFrameCount >= 22 && !state.recoveringViewport) {
1940
1941
  state.recoveringViewport = true
1941
1942
  fitView({ useFiltered: true })
1942
1943
  state.offscreenFrameCount = 0
@@ -2137,9 +2138,7 @@ const selectNodeById = id => {
2137
2138
  }
2138
2139
 
2139
2140
  const zoomAtPoint = (screenX, screenY, factor, source = 'generic') => {
2140
- if (source === 'wheel') {
2141
- state.lastManualZoomAt = performance.now()
2142
- }
2141
+ state.lastManualZoomAt = performance.now()
2143
2142
  const nextScale = clampScale(state.transform.scale * factor)
2144
2143
  if (nextScale === state.transform.scale) {
2145
2144
  return
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andespindola/brainlink",
3
- "version": "0.1.0-beta.68",
3
+ "version": "0.1.0-beta.69",
4
4
  "description": "Local-first knowledge memory for agents with Markdown, backlinks, indexing and context retrieval.",
5
5
  "type": "module",
6
6
  "license": "MIT",