knosky 0.6.0 → 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.
|
|
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
|
|
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
|
|
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);}
|
|
@@ -774,7 +774,7 @@
|
|
|
774
774
|
document.getElementById('q').addEventListener('input',e=>applySearch(e.target.value.trim()));
|
|
775
775
|
let looping=false;
|
|
776
776
|
function boot(){if(!NODES.length){document.getElementById('boot').textContent="Waiting for city data…";document.getElementById('boot').style.display='';return;}
|
|
777
|
-
document.getElementById('boot').style.display='none';buildChips();buildNav();applySearch(document.getElementById('q').value.trim());fitAll();cam.x=cam.tx;cam.y=cam.ty;cam.zoom=cam.tz;
|
|
777
|
+
document.getElementById('boot').style.display='none';buildClustersNow();buildChips();buildNav();applySearch(document.getElementById('q').value.trim());fitAll();cam.x=cam.tx;cam.y=cam.ty;cam.zoom=cam.tz;
|
|
778
778
|
if(!looping){looping=true;T0=performance.now();loop();}}
|
|
779
779
|
|
|
780
780
|
// ---------- data ingest: receive the authenticated payload over postMessage,
|