code-kg 0.1.5 → 0.1.6

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/dist/server/ui.js CHANGED
@@ -600,25 +600,27 @@ function renderUiHtml() {
600
600
  };
601
601
 
602
602
  const NODE_COLORS = {
603
- file: '#3af7ff',
604
- function: '#ff2de1',
605
- class: '#b8ff39',
606
- interface: '#ffb84d',
607
- variable: '#9f8cff',
608
- route: '#10f8a5',
609
- directory: '#6ea8ff',
610
- entrypoint: '#ff6d6d'
603
+ file: '#9cff3f',
604
+ function: '#bf84ff',
605
+ class: '#b66fff',
606
+ interface: '#c889ff',
607
+ variable: '#ab7aff',
608
+ route: '#73efff',
609
+ directory: '#8eff60',
610
+ entrypoint: '#ffe17a',
611
+ module: '#9cff3f'
611
612
  };
612
613
 
613
614
  const EDGE_COLORS = {
614
- IMPORTS: '#3af7ff',
615
- DEPENDS_ON: '#ff2de1',
616
- CALLS: '#b8ff39',
617
- REFERENCES: '#ffb84d',
618
- HANDLES_ROUTE: '#10f8a5',
619
- DEFINES: '#9f8cff',
620
- EXPORTS: '#8fd4ff',
621
- CONTAINS: '#4e6ea0'
615
+ IMPORTS: '#9cff3f',
616
+ DEPENDS_ON: '#8fe038',
617
+ CALLS: '#b66fff',
618
+ REFERENCES: '#c889ff',
619
+ HANDLES_ROUTE: '#73efff',
620
+ DEFINES: '#b176ff',
621
+ EXPORTS: '#8dd8ff',
622
+ CONTAINS: '#82cf34',
623
+ MODULE_DEPENDS_ON: '#9cff3f'
622
624
  };
623
625
 
624
626
  const els = {
@@ -654,7 +656,7 @@ function renderUiHtml() {
654
656
 
655
657
  function colorForEdge(type) {
656
658
  const key = String(type || '').toUpperCase();
657
- return EDGE_COLORS[key] || '#4f6e8a';
659
+ return EDGE_COLORS[key] || '#82cf34';
658
660
  }
659
661
 
660
662
  function isQualityMode(value) {
@@ -933,14 +935,14 @@ function renderUiHtml() {
933
935
  graph.d3VelocityDecay(usingWasmLayout ? 0.9 : mode === 'normal' ? 0.28 : mode === 'degraded' ? 0.4 : 0.58);
934
936
  }
935
937
  if (typeof graph.nodeResolution === 'function') {
936
- graph.nodeResolution(mode === 'normal' ? 8 : mode === 'degraded' ? 6 : 4);
938
+ graph.nodeResolution(mode === 'normal' ? 7 : mode === 'degraded' ? 5 : 4);
937
939
  }
938
940
  if (typeof graph.linkResolution === 'function') {
939
- graph.linkResolution(mode === 'normal' ? 6 : mode === 'degraded' ? 4 : 3);
941
+ graph.linkResolution(mode === 'normal' ? 4 : mode === 'degraded' ? 3 : 2);
940
942
  }
941
943
 
942
- graph.linkOpacity(mode === 'normal' ? 0.66 : mode === 'degraded' ? 0.56 : 0.48);
943
- graph.nodeRelSize(mode === 'normal' ? 3.2 : mode === 'degraded' ? 2.8 : 2.55);
944
+ graph.linkOpacity(mode === 'normal' ? 0.2 : mode === 'degraded' ? 0.16 : 0.13);
945
+ graph.nodeRelSize(mode === 'normal' ? 1.22 : mode === 'degraded' ? 1.02 : 0.88);
944
946
 
945
947
  if (typeof graph.d3Force === 'function') {
946
948
  const currentCharge = graph.d3Force('charge');
@@ -1045,7 +1047,7 @@ function renderUiHtml() {
1045
1047
  type,
1046
1048
  path,
1047
1049
  props: node.props || {},
1048
- baseVal: 2.6 + Math.min(14, d * 0.9),
1050
+ baseVal: 0.86 + Math.min(3.4, d * 0.12),
1049
1051
  __color: colorForNode(type),
1050
1052
  __searchText: (String(name) + ' ' + String(path) + ' ' + String(type)).toLowerCase(),
1051
1053
  __matched: false,
@@ -1074,9 +1076,9 @@ function renderUiHtml() {
1074
1076
  }
1075
1077
 
1076
1078
  const graph = window.ForceGraph3D()(els.graphCanvas)
1077
- .backgroundColor('#05060f')
1079
+ .backgroundColor('#01040f')
1078
1080
  .showNavInfo(false)
1079
- .nodeOpacity(0.95)
1081
+ .nodeOpacity(0.92)
1080
1082
  .nodeVisibility((node) => node.__renderVisible !== false)
1081
1083
  .nodeLabel((node) => {
1082
1084
  const name = String(node.name || node.id || 'node');
@@ -1086,10 +1088,10 @@ function renderUiHtml() {
1086
1088
  })
1087
1089
  .nodeColor((node) => {
1088
1090
  if (node.__selected) {
1089
- return '#ff2de1';
1091
+ return '#ff46d9';
1090
1092
  }
1091
1093
  if (node.__matched) {
1092
- return '#f6ff4d';
1094
+ return '#f3ff77';
1093
1095
  }
1094
1096
  return node.__color || '#d5f4ff';
1095
1097
  })
@@ -1099,23 +1101,23 @@ function renderUiHtml() {
1099
1101
  })
1100
1102
  .linkColor((link) => {
1101
1103
  if (link.__highlight) {
1102
- return '#f6ff4d';
1104
+ return '#f3ff77';
1103
1105
  }
1104
- return link.__color || '#5f7fa1';
1106
+ return link.__color || '#82cf34';
1105
1107
  })
1106
1108
  .linkWidth((link) => {
1107
- const base = state.perfMode === 'normal' ? 0.75 : state.perfMode === 'degraded' ? 0.46 : 0.34;
1108
- const highlight = state.perfMode === 'normal' ? 2.2 : state.perfMode === 'degraded' ? 1.35 : 1.05;
1109
+ const base = state.perfMode === 'normal' ? 0.22 : state.perfMode === 'degraded' ? 0.18 : 0.14;
1110
+ const highlight = state.perfMode === 'normal' ? 0.9 : state.perfMode === 'degraded' ? 0.66 : 0.54;
1109
1111
  return link.__highlight ? highlight : base;
1110
1112
  })
1111
1113
  .linkVisibility((link) => link.__renderVisible !== false)
1112
1114
  .linkDirectionalParticles((link) => {
1113
- return link.__highlight ? (state.perfMode === 'normal' ? 3 : 1) : 0;
1115
+ return link.__highlight ? (state.perfMode === 'normal' ? 2 : 1) : 0;
1114
1116
  })
1115
1117
  .linkDirectionalParticleWidth((link) => {
1116
- return link.__highlight ? (state.perfMode === 'normal' ? 2.2 : 1.25) : 0;
1118
+ return link.__highlight ? (state.perfMode === 'normal' ? 1.3 : 0.95) : 0;
1117
1119
  })
1118
- .linkDirectionalParticleColor(() => '#f6ff4d')
1120
+ .linkDirectionalParticleColor(() => '#f3ff77')
1119
1121
  .onNodeClick((node) => {
1120
1122
  if (!node || !node.id) {
1121
1123
  return;
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA2gC3D,CAAC;AACT,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-kg",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Local code knowledge graph CLI with interactive visualization and deterministic analysis APIs",
5
5
  "license": "MIT",
6
6
  "keywords": [