knosky 0.6.1 → 0.6.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knosky",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Turn any repo or docs folder into an explorable city, plus a local MCP that grounds your AI in your own source with citations. Local-first, free, $0 tokens.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -643,7 +643,7 @@
643
643
  const x=cl.wx,y=cl.wy;
644
644
  if(!inView(x,y))return;
645
645
  if(focusK&&cl.d!==focusK)return;
646
- const R=28,FONT_C="'Plus Jakarta Sans',system-ui,sans-serif";
646
+ const R=28/cam.zoom,FONT_C="'Plus Jakarta Sans',system-ui,sans-serif";
647
647
  // outer glow
648
648
  ctx.save();
649
649
  ctx.globalAlpha=0.22;
@@ -655,10 +655,10 @@
655
655
  ctx.lineWidth=2;ctx.strokeStyle="rgba(255,255,255,.45)";ctx.stroke();
656
656
  // count label
657
657
  const label=cl.count>=1000?(Math.round(cl.count/100)/10)+'k':String(cl.count);
658
- ctx.fillStyle="#0a0a12";ctx.textAlign="center";ctx.textBaseline="middle";ctx.font="700 13px "+FONT_C;
658
+ ctx.fillStyle="#0a0a12";ctx.textAlign="center";ctx.textBaseline="middle";ctx.font="700 "+(13/cam.zoom)+"px "+FONT_C;
659
659
  ctx.fillText(label,x,y);
660
660
  // district name beneath
661
- ctx.globalAlpha=0.75;ctx.fillStyle=cl.color;ctx.font="600 10px "+FONT_C;
661
+ ctx.globalAlpha=0.75;ctx.fillStyle=cl.color;ctx.font="600 "+(10/cam.zoom)+"px "+FONT_C;
662
662
  ctx.fillText(cl.label,x,y+R+12);
663
663
  ctx.restore();}
664
664
 
@@ -694,7 +694,7 @@
694
694
  if(_lod===LOD_DOT){
695
695
  if(dim)continue;
696
696
  ctx.fillStyle=DCFG[n.d]?DCFG[n.d].color:'#7c83a3';
697
- ctx.beginPath();ctx.arc(wc.x,wc.y,4,0,7);ctx.fill();
697
+ ctx.beginPath();ctx.arc(wc.x,wc.y,4/cam.zoom,0,7);ctx.fill();
698
698
  continue;}
699
699
  drawBuilding(n,false,dim);}
700
700
  if(selectedId){drawConnections(selectedId);const sn=byId[selectedId];if(sn&&!filteredHidden.has(sn.id))drawBuilding(sn,true,false);}