@andespindola/brainlink 0.1.0-beta.111 → 0.1.0-beta.112

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.
@@ -13,8 +13,8 @@ const macroGalaxyZoomThreshold = 0.012
13
13
  const macroGalaxyEnterHysteresis = 0.86
14
14
  const macroGalaxyExitHysteresis = 1.24
15
15
  const galaxyDiscoveryEnabled = false
16
- const massiveAutoFitMacroScale = 0.006
17
- const defaultMacroScale = 0.006
16
+ const massiveAutoFitMacroScale = 0.013
17
+ const defaultMacroScale = 0.013
18
18
  const clusterCellPixelSize = 64
19
19
  const minNodePixelRadius = 2.3
20
20
  const viewportPaddingPx = 280
@@ -42,18 +42,18 @@ const ecosystemDepthOrbitalMaxOffset = 160
42
42
  const ecosystemDepthMinScale = 0.24
43
43
  const ecosystemDepthOpacityFloor = 0.2
44
44
  const graphDepthNear = 40
45
- const graphDepthFar = 560
46
- const graphDepthPerspective = 760
47
- const graphDepthYaw = 0.2
48
- const graphDepthPitch = 0.12
49
- const graphDepthRadialGain = 0.08
50
- const graphDepthMinScale = 0.58
51
- const graphDepthOpacityFloor = 0.42
52
- const graphDepthEdgeOpacityFloor = 0.24
53
- const graphDepthProjectionNodeThreshold = 120
54
- const graphDepthProjectionNodeCap = 980
55
- const graphDepthProjectionMinScale = 0.08
56
- const graphDepthProjectionMaxScale = 0.95
45
+ const graphDepthFar = 1180
46
+ const graphDepthPerspective = 520
47
+ const graphDepthYaw = 0.34
48
+ const graphDepthPitch = 0.24
49
+ const graphDepthRadialGain = 0.18
50
+ const graphDepthMinScale = 0.42
51
+ const graphDepthOpacityFloor = 0.28
52
+ const graphDepthEdgeOpacityFloor = 0.16
53
+ const graphDepthProjectionNodeThreshold = 40
54
+ const graphDepthProjectionNodeCap = 1200
55
+ const graphDepthProjectionMinScale = 0.045
56
+ const graphDepthProjectionMaxScale = 1.45
57
57
  const zoomRecoveryGuardMs = 4200
58
58
  const zoomCapTargetViewportShare = 0.72
59
59
  const meshEdgeScaleThreshold = 0.09
@@ -2462,8 +2462,8 @@ const currentZoomMax = () => {
2462
2462
  }
2463
2463
 
2464
2464
  const zoomFloorByNodeCount = (nodeCount) => {
2465
- if (nodeCount > massiveGraphNodeThreshold) return 0.0042
2466
- if (nodeCount > largeGraphNodeThreshold) return 0.0021
2465
+ if (nodeCount > massiveGraphNodeThreshold) return 0.0085
2466
+ if (nodeCount > largeGraphNodeThreshold) return 0.0032
2467
2467
  if (nodeCount > ecosystemActivationNodeThreshold) return 0.001
2468
2468
  return zoomRange.min
2469
2469
  }
@@ -2515,8 +2515,8 @@ const fitScaleBiasByNodeCount = nodeCount => {
2515
2515
  if (nodeCount <= 180) return 1
2516
2516
  if (nodeCount <= 600) return 0.94
2517
2517
  if (nodeCount <= 2000) return 0.82
2518
- if (nodeCount <= 6000) return 0.68
2519
- return 0.56
2518
+ if (nodeCount <= 6000) return 0.74
2519
+ return 0.72
2520
2520
  }
2521
2521
 
2522
2522
  const autoFitScaleRangeByNodeCount = nodeCount => {
@@ -2526,8 +2526,8 @@ const autoFitScaleRangeByNodeCount = nodeCount => {
2526
2526
  if (nodeCount <= 180) return { min: 0.18, max: 0.92 }
2527
2527
  if (nodeCount <= 600) return { min: 0.12, max: 0.72 }
2528
2528
  if (nodeCount <= 2000) return { min: 0.08, max: 0.52 }
2529
- if (nodeCount <= 6000) return { min: 0.06, max: 0.32 }
2530
- return { min: 0.0012, max: 0.24 }
2529
+ if (nodeCount <= 6000) return { min: 0.08, max: 0.38 }
2530
+ return { min: 0.0085, max: 0.36 }
2531
2531
  }
2532
2532
 
2533
2533
  const macroFaceToFaceScale = (nodeCount, hubDistance) => {
@@ -2537,7 +2537,7 @@ const macroFaceToFaceScale = (nodeCount, hubDistance) => {
2537
2537
 
2538
2538
  const rect = canvas.getBoundingClientRect()
2539
2539
  const viewportReference = Math.max(320, Math.min(rect.width, rect.height))
2540
- const share = nodeCount > massiveGraphNodeThreshold ? 0.082 : 0.068
2540
+ const share = nodeCount > massiveGraphNodeThreshold ? 0.14 : 0.12
2541
2541
  const targetPx = Math.max(24, viewportReference * share)
2542
2542
  return targetPx / hubDistance
2543
2543
  }
@@ -2576,7 +2576,7 @@ const macroEcosystemFaceScale = (nodeCount) => {
2576
2576
 
2577
2577
  const rect = canvas.getBoundingClientRect()
2578
2578
  const viewportReference = Math.max(320, Math.min(rect.width, rect.height))
2579
- const targetShare = nodeCount > massiveGraphNodeThreshold ? 0.114 : 0.096
2579
+ const targetShare = nodeCount > massiveGraphNodeThreshold ? 0.2 : 0.16
2580
2580
  const targetPx = Math.max(30, viewportReference * targetShare)
2581
2581
  return targetPx / nearestDistance
2582
2582
  }
@@ -3786,8 +3786,13 @@ const wheelZoomFactor = event => {
3786
3786
  state.transform.scale <= massiveEcosystemClusterScaleThreshold
3787
3787
  const sensitivityMultiplier = isMassiveEcosystemZoom ? 0.48 : 1
3788
3788
  const capMultiplier = isMassiveEcosystemZoom ? 0.34 : 1
3789
- const sensitivity = wheelZoomExponent * (isModifierZoom ? wheelZoomModifierBoost : 1) * sensitivityMultiplier
3790
- const exponentCap = wheelZoomExponentCap * capMultiplier
3789
+ const isZoomOut = normalizedDelta > 0
3790
+ const currentScale = state.transform.scale
3791
+ const zoomOutDamping = isZoomOut
3792
+ ? (currentScale <= 0.03 ? 0.38 : currentScale <= 0.08 ? 0.52 : 0.68)
3793
+ : 1
3794
+ const sensitivity = wheelZoomExponent * (isModifierZoom ? wheelZoomModifierBoost : 1) * sensitivityMultiplier * zoomOutDamping
3795
+ const exponentCap = wheelZoomExponentCap * capMultiplier * (isZoomOut ? 0.74 : 1)
3791
3796
  const exponent = Math.max(
3792
3797
  -exponentCap,
3793
3798
  Math.min(exponentCap, -normalizedDelta * sensitivity)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andespindola/brainlink",
3
- "version": "0.1.0-beta.111",
3
+ "version": "0.1.0-beta.112",
4
4
  "description": "Local-first knowledge memory for agents with Markdown, backlinks, indexing and context retrieval.",
5
5
  "type": "module",
6
6
  "license": "MIT",