ts-knowledge-graph 0.1.4 → 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.
Files changed (136) hide show
  1. package/README.md +26 -8
  2. package/contribs/{web_visualisation → webview}/README.md +7 -7
  3. package/contribs/webview/web/css/style.css +310 -0
  4. package/contribs/{web_visualisation → webview}/web/index.html +40 -5
  5. package/contribs/{web_visualisation → webview}/web/js/app.js +378 -39
  6. package/contribs/{web_visualisation/web/data → webview/web/js_autogenerated}/kind_descriptions.js +2 -1
  7. package/contribs/{web_visualisation → webview}/web/types/app_globals.d.ts +11 -3
  8. package/dist/cli.d.ts.map +1 -1
  9. package/dist/cli.js +6 -2
  10. package/dist/cli.js.map +1 -1
  11. package/dist/cluster/cluster_weights.d.ts +20 -0
  12. package/dist/cluster/cluster_weights.d.ts.map +1 -0
  13. package/dist/cluster/cluster_weights.js +32 -0
  14. package/dist/cluster/cluster_weights.js.map +1 -0
  15. package/dist/cluster/community_detector.d.ts +61 -0
  16. package/dist/cluster/community_detector.d.ts.map +1 -0
  17. package/dist/cluster/community_detector.js +120 -0
  18. package/dist/cluster/community_detector.js.map +1 -0
  19. package/dist/cluster/community_labeler.d.ts +84 -0
  20. package/dist/cluster/community_labeler.d.ts.map +1 -0
  21. package/dist/cluster/community_labeler.js +194 -0
  22. package/dist/cluster/community_labeler.js.map +1 -0
  23. package/dist/cluster/graph_clusterer.d.ts +47 -0
  24. package/dist/cluster/graph_clusterer.d.ts.map +1 -0
  25. package/dist/cluster/graph_clusterer.js +126 -0
  26. package/dist/cluster/graph_clusterer.js.map +1 -0
  27. package/dist/commands/benchmark_command.d.ts.map +1 -1
  28. package/dist/commands/benchmark_command.js +13 -10
  29. package/dist/commands/benchmark_command.js.map +1 -1
  30. package/dist/commands/blast_radius_command.d.ts.map +1 -1
  31. package/dist/commands/blast_radius_command.js +6 -5
  32. package/dist/commands/blast_radius_command.js.map +1 -1
  33. package/dist/commands/cluster_command.d.ts +7 -0
  34. package/dist/commands/cluster_command.d.ts.map +1 -0
  35. package/dist/commands/cluster_command.js +55 -0
  36. package/dist/commands/cluster_command.js.map +1 -0
  37. package/dist/commands/command_helpers.d.ts +9 -4
  38. package/dist/commands/command_helpers.d.ts.map +1 -1
  39. package/dist/commands/command_helpers.js +13 -8
  40. package/dist/commands/command_helpers.js.map +1 -1
  41. package/dist/commands/cost_command.d.ts.map +1 -1
  42. package/dist/commands/cost_command.js +25 -8
  43. package/dist/commands/cost_command.js.map +1 -1
  44. package/dist/commands/enrich_command.d.ts.map +1 -1
  45. package/dist/commands/enrich_command.js +7 -5
  46. package/dist/commands/enrich_command.js.map +1 -1
  47. package/dist/commands/extract_command.d.ts.map +1 -1
  48. package/dist/commands/extract_command.js +12 -6
  49. package/dist/commands/extract_command.js.map +1 -1
  50. package/dist/commands/hotspots_command.d.ts.map +1 -1
  51. package/dist/commands/hotspots_command.js +6 -5
  52. package/dist/commands/hotspots_command.js.map +1 -1
  53. package/dist/commands/install_command.d.ts +15 -5
  54. package/dist/commands/install_command.d.ts.map +1 -1
  55. package/dist/commands/install_command.js +61 -23
  56. package/dist/commands/install_command.js.map +1 -1
  57. package/dist/commands/load_command.d.ts.map +1 -1
  58. package/dist/commands/load_command.js +18 -13
  59. package/dist/commands/load_command.js.map +1 -1
  60. package/dist/commands/neighbors_command.d.ts.map +1 -1
  61. package/dist/commands/neighbors_command.js +6 -5
  62. package/dist/commands/neighbors_command.js.map +1 -1
  63. package/dist/commands/references_command.d.ts.map +1 -1
  64. package/dist/commands/references_command.js +6 -5
  65. package/dist/commands/references_command.js.map +1 -1
  66. package/dist/commands/report_command.d.ts +16 -0
  67. package/dist/commands/report_command.d.ts.map +1 -0
  68. package/dist/commands/report_command.js +115 -0
  69. package/dist/commands/report_command.js.map +1 -0
  70. package/dist/commands/webview_command.d.ts +36 -0
  71. package/dist/commands/webview_command.d.ts.map +1 -0
  72. package/dist/commands/webview_command.js +186 -0
  73. package/dist/commands/webview_command.js.map +1 -0
  74. package/dist/enrich/cpu_profile.d.ts +33 -0
  75. package/dist/enrich/cpu_profile.d.ts.map +1 -1
  76. package/dist/enrich/cpu_profile.js +88 -0
  77. package/dist/enrich/cpu_profile.js.map +1 -1
  78. package/dist/enrich/runtime_enricher.d.ts +8 -0
  79. package/dist/enrich/runtime_enricher.d.ts.map +1 -1
  80. package/dist/enrich/runtime_enricher.js +18 -0
  81. package/dist/enrich/runtime_enricher.js.map +1 -1
  82. package/dist/enrich/runtime_join.d.ts +25 -1
  83. package/dist/enrich/runtime_join.d.ts.map +1 -1
  84. package/dist/enrich/runtime_join.js +43 -0
  85. package/dist/enrich/runtime_join.js.map +1 -1
  86. package/dist/extract/git_source.d.ts +23 -0
  87. package/dist/extract/git_source.d.ts.map +1 -0
  88. package/dist/extract/git_source.js +75 -0
  89. package/dist/extract/git_source.js.map +1 -0
  90. package/dist/query/graph_query.d.ts +36 -1
  91. package/dist/query/graph_query.d.ts.map +1 -1
  92. package/dist/query/graph_query.js +69 -6
  93. package/dist/query/graph_query.js.map +1 -1
  94. package/dist/report/graph_report.d.ts +51 -0
  95. package/dist/report/graph_report.d.ts.map +1 -0
  96. package/dist/report/graph_report.js +312 -0
  97. package/dist/report/graph_report.js.map +1 -0
  98. package/dist/report/pdf_renderer.d.ts +22 -0
  99. package/dist/report/pdf_renderer.d.ts.map +1 -0
  100. package/dist/report/pdf_renderer.js +54 -0
  101. package/dist/report/pdf_renderer.js.map +1 -0
  102. package/dist/report/report_data.d.ts +128 -0
  103. package/dist/report/report_data.d.ts.map +1 -0
  104. package/dist/report/report_data.js +191 -0
  105. package/dist/report/report_data.js.map +1 -0
  106. package/dist/schema/edge.d.ts +5 -5
  107. package/dist/schema/edge.d.ts.map +1 -1
  108. package/dist/schema/edge.js +3 -0
  109. package/dist/schema/edge.js.map +1 -1
  110. package/dist/schema/source_manifest.d.ts +30 -0
  111. package/dist/schema/source_manifest.d.ts.map +1 -0
  112. package/dist/schema/source_manifest.js +21 -0
  113. package/dist/schema/source_manifest.js.map +1 -0
  114. package/dist/store/jsonl_reader.d.ts +4 -0
  115. package/dist/store/jsonl_reader.d.ts.map +1 -1
  116. package/dist/store/jsonl_reader.js +13 -1
  117. package/dist/store/jsonl_reader.js.map +1 -1
  118. package/dist/store/jsonl_store.d.ts +2 -1
  119. package/dist/store/jsonl_store.d.ts.map +1 -1
  120. package/dist/store/jsonl_store.js +4 -1
  121. package/dist/store/jsonl_store.js.map +1 -1
  122. package/dist/store/kuzu_store.d.ts +13 -0
  123. package/dist/store/kuzu_store.d.ts.map +1 -1
  124. package/dist/store/kuzu_store.js +29 -0
  125. package/dist/store/kuzu_store.js.map +1 -1
  126. package/dist/store/output_folder.d.ts +43 -0
  127. package/dist/store/output_folder.d.ts.map +1 -0
  128. package/dist/store/output_folder.js +61 -0
  129. package/dist/store/output_folder.js.map +1 -0
  130. package/dotclaude_folder/commands/code-graph-interview.md +123 -0
  131. package/dotclaude_folder/commands/code-graph-optimize.md +65 -0
  132. package/dotclaude_folder/skills/code-graph-query/SKILL.md +4 -4
  133. package/package.json +72 -62
  134. package/contribs/web_visualisation/web/css/style.css +0 -219
  135. package/contribs/web_visualisation/web/tsconfig.json +0 -18
  136. /package/contribs/{web_visualisation/web/data → webview/web/js_autogenerated}/.gitignore +0 -0
@@ -1,219 +0,0 @@
1
- * { box-sizing: border-box; }
2
-
3
- html, body {
4
- margin: 0;
5
- height: 100%;
6
- font: 13px/1.45 -apple-system, 'Segoe UI', Roboto, sans-serif;
7
- background: #0f172a;
8
- color: #cbd5e1;
9
- }
10
-
11
- body { display: flex; }
12
-
13
- #sidebar {
14
- width: 300px;
15
- flex: none;
16
- height: 100%;
17
- overflow-y: auto;
18
- padding: 14px;
19
- background: #111c33;
20
- border-right: 1px solid #1e293b;
21
- }
22
-
23
- #sidebar h1 { font-size: 15px; margin: 0 0 4px; color: #f1f5f9; }
24
- #sidebar h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #64748b; margin: 16px 0 6px; }
25
- #sidebar section { margin-top: 8px; }
26
-
27
- #sidebar .foldable {
28
- display: flex;
29
- align-items: center;
30
- gap: 7px;
31
- line-height: 1;
32
- cursor: pointer;
33
- user-select: none;
34
- }
35
- #sidebar .foldable:hover { color: #94a3b8; }
36
- #sidebar .foldable::before {
37
- content: '';
38
- flex: none;
39
- width: 0;
40
- height: 0;
41
- border-left: 5px solid currentColor;
42
- border-top: 4px solid transparent;
43
- border-bottom: 4px solid transparent;
44
- transition: transform .12s ease;
45
- }
46
- #sidebar .foldable:not(.collapsed)::before { transform: rotate(90deg); }
47
- #sidebar .foldable.collapsed ~ * { display: none; }
48
-
49
- #status { font-size: 11px; color: #64748b; margin-bottom: 10px; }
50
-
51
- #search {
52
- width: 100%;
53
- padding: 6px 8px;
54
- border: 1px solid #334155;
55
- border-radius: 6px;
56
- background: #0f172a;
57
- color: #e2e8f0;
58
- }
59
- #search:focus { outline: none; border-color: #4f8cff; }
60
-
61
- #search-results { margin-top: 4px; }
62
- #search-results .hit {
63
- padding: 3px 6px;
64
- border-radius: 4px;
65
- cursor: pointer;
66
- font-size: 12px;
67
- white-space: nowrap;
68
- overflow: hidden;
69
- text-overflow: ellipsis;
70
- }
71
- #search-results .hit:hover { background: #1e293b; }
72
- #search-results .hit .loc { color: #64748b; font-size: 10px; }
73
-
74
- .legend label {
75
- display: flex;
76
- align-items: center;
77
- gap: 6px;
78
- padding: 1px 0;
79
- cursor: pointer;
80
- user-select: none;
81
- }
82
- .legend .swatch {
83
- width: 10px;
84
- height: 10px;
85
- border-radius: 3px;
86
- flex: none;
87
- }
88
- .legend .count { margin-left: auto; color: #64748b; font-size: 11px; }
89
- .legend .help-badge {
90
- flex: none;
91
- width: 13px;
92
- height: 13px;
93
- border-radius: 50%;
94
- border: 1px solid #475569;
95
- color: #94a3b8;
96
- font-size: 9px;
97
- font-weight: 600;
98
- line-height: 11px;
99
- text-align: center;
100
- user-select: none;
101
- }
102
- .legend .help-badge:hover,
103
- .legend .help-badge:focus {
104
- background: #334155;
105
- color: #e2e8f0;
106
- border-color: #64748b;
107
- outline: none;
108
- }
109
- .legend label.master {
110
- margin-bottom: 4px;
111
- padding-bottom: 4px;
112
- border-bottom: 1px solid #1e293b;
113
- color: #94a3b8;
114
- }
115
- .legend .swatch.spacer { background: transparent; }
116
-
117
- .kind-tooltip {
118
- position: fixed;
119
- z-index: 1000;
120
- max-width: 260px;
121
- padding: 6px 9px;
122
- border-radius: 6px;
123
- background: #0b1424;
124
- border: 1px solid #334155;
125
- color: #e2e8f0;
126
- font-size: 11px;
127
- line-height: 1.4;
128
- box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
129
- pointer-events: none;
130
- }
131
- .kind-tooltip[hidden] { display: none; }
132
-
133
- .row { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
134
-
135
- select, button {
136
- background: #1e293b;
137
- color: #e2e8f0;
138
- border: 1px solid #334155;
139
- border-radius: 6px;
140
- padding: 4px 8px;
141
- font: inherit;
142
- cursor: pointer;
143
- }
144
- button:hover { background: #334155; }
145
- select { flex: 1; }
146
-
147
- #details-body { font-size: 12px; }
148
- #details-body .id { color: #64748b; font-size: 10px; word-break: break-all; }
149
- #details-body .kind-tag {
150
- display: inline-block;
151
- padding: 1px 6px;
152
- border-radius: 4px;
153
- font-size: 10px;
154
- color: #0f172a;
155
- font-weight: 600;
156
- }
157
- #details-body h3 { font-size: 11px; color: #64748b; margin: 10px 0 3px; }
158
- #details-body .edge-row { padding: 1px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
159
- #details-body .edge-kind { color: #64748b; font-size: 10px; }
160
- #details-body .edge-count { color: #f59e0b; font-size: 10px; font-variant-numeric: tabular-nums; }
161
- #details-body a { color: #7db2ff; cursor: pointer; text-decoration: none; }
162
- #details-body a:hover { text-decoration: underline; }
163
- #details-body a.file-link { text-decoration: underline; word-break: break-all; }
164
- #details-body a.file-link::after { content: '↗'; margin-left: 3px; font-size: 9px; opacity: 0.7; }
165
-
166
- #runtime.empty .heat-legend,
167
- #runtime.empty .heat-note,
168
- #runtime.empty .hotspots-title,
169
- #runtime.empty #hotspots,
170
- #runtime.empty label.row { display: none; }
171
-
172
- #coverage { font-size: 11px; color: #94a3b8; margin: 2px 0 6px; }
173
-
174
- #runtime label.row { font-size: 12px; }
175
-
176
- .heat-legend { display: flex; align-items: center; gap: 6px; margin: 8px 0 4px; }
177
- .heat-bar { flex: 1; height: 10px; border-radius: 3px; background: linear-gradient(90deg, #64748b, #fde047, #dc2626); }
178
- .heat-legend .heat-min, .heat-legend .heat-max { font-size: 10px; color: #64748b; }
179
-
180
- .heat-note { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #64748b; }
181
- .heat-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
182
- .heat-swatch.unmeasured { background: #243044; border: 1px dashed #475569; }
183
-
184
- .hotspots-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #64748b; margin: 12px 0 4px; }
185
- #hotspots .hotspot {
186
- display: flex;
187
- align-items: center;
188
- gap: 6px;
189
- padding: 2px 4px;
190
- border-radius: 4px;
191
- cursor: pointer;
192
- font-size: 12px;
193
- }
194
- #hotspots .hotspot:hover { background: #1e293b; }
195
- .hotspot-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
196
- .hotspot-ms { margin-left: auto; flex: none; color: #f59e0b; font-size: 11px; font-variant-numeric: tabular-nums; }
197
-
198
- #details-body .runtime-block { margin-top: 8px; }
199
- #details-body .runtime-block .metric { display: flex; justify-content: space-between; gap: 8px; padding: 1px 0; }
200
- #details-body .runtime-block .metric span { color: #64748b; }
201
-
202
- #cy { flex: 1; height: 100%; }
203
-
204
- #dropzone {
205
- position: fixed;
206
- inset: 0;
207
- display: flex;
208
- align-items: center;
209
- justify-content: center;
210
- font-size: 18px;
211
- color: #e2e8f0;
212
- background: rgba(15, 23, 42, .85);
213
- border: 3px dashed #4f8cff;
214
- pointer-events: none;
215
- opacity: 0;
216
- transition: opacity .15s;
217
- }
218
- #dropzone.active { opacity: 1; }
219
- #dropzone code { color: #7db2ff; }
@@ -1,18 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "ESNext",
5
- "moduleResolution": "Bundler",
6
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
- "strict": true,
8
- "allowJs": true,
9
- "checkJs": true,
10
- "noEmit": true,
11
- "noUnusedLocals": true,
12
- "noUnusedParameters": true,
13
- "forceConsistentCasingInFileNames": true,
14
- "skipLibCheck": true,
15
- "types": []
16
- },
17
- "include": ["js/app.js", "types/**/*.d.ts"]
18
- }