@mgamil/mapx 0.2.4
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/LICENSE +194 -0
- package/README.md +488 -0
- package/VERSION +1 -0
- package/dist/agents/generator.d.ts +74 -0
- package/dist/agents/generator.js +375 -0
- package/dist/agents/templates.d.ts +29 -0
- package/dist/agents/templates.js +459 -0
- package/dist/cli.d.ts +16 -0
- package/dist/cli.js +1835 -0
- package/dist/core/cluster-engine.d.ts +32 -0
- package/dist/core/cluster-engine.js +314 -0
- package/dist/core/config.d.ts +29 -0
- package/dist/core/config.js +178 -0
- package/dist/core/context-builder.d.ts +61 -0
- package/dist/core/context-builder.js +252 -0
- package/dist/core/flow-tracer.d.ts +63 -0
- package/dist/core/flow-tracer.js +366 -0
- package/dist/core/git-tracker.d.ts +20 -0
- package/dist/core/git-tracker.js +159 -0
- package/dist/core/graph.d.ts +42 -0
- package/dist/core/graph.js +186 -0
- package/dist/core/metrics.d.ts +24 -0
- package/dist/core/metrics.js +87 -0
- package/dist/core/scanner.d.ts +53 -0
- package/dist/core/scanner.js +949 -0
- package/dist/core/store-bun.d.ts +13 -0
- package/dist/core/store-bun.js +34 -0
- package/dist/core/store-interface.d.ts +15 -0
- package/dist/core/store-interface.js +7 -0
- package/dist/core/store-node.d.ts +13 -0
- package/dist/core/store-node.js +35 -0
- package/dist/core/store.d.ts +132 -0
- package/dist/core/store.js +614 -0
- package/dist/core/workspace-manager.d.ts +9 -0
- package/dist/core/workspace-manager.js +64 -0
- package/dist/exporters/dot-exporter.d.ts +16 -0
- package/dist/exporters/dot-exporter.js +179 -0
- package/dist/exporters/graph-exporter.d.ts +14 -0
- package/dist/exporters/graph-exporter.js +85 -0
- package/dist/exporters/index.d.ts +9 -0
- package/dist/exporters/index.js +12 -0
- package/dist/exporters/llm-exporter.d.ts +18 -0
- package/dist/exporters/llm-exporter.js +224 -0
- package/dist/exporters/svg-exporter.d.ts +19 -0
- package/dist/exporters/svg-exporter.js +319 -0
- package/dist/exporters/toon-exporter.d.ts +16 -0
- package/dist/exporters/toon-exporter.js +246 -0
- package/dist/frameworks/detectors/aspnet.d.ts +11 -0
- package/dist/frameworks/detectors/aspnet.js +52 -0
- package/dist/frameworks/detectors/django.d.ts +14 -0
- package/dist/frameworks/detectors/django.js +135 -0
- package/dist/frameworks/detectors/drupal.d.ts +13 -0
- package/dist/frameworks/detectors/drupal.js +94 -0
- package/dist/frameworks/detectors/express.d.ts +12 -0
- package/dist/frameworks/detectors/express.js +234 -0
- package/dist/frameworks/detectors/fastapi.d.ts +12 -0
- package/dist/frameworks/detectors/fastapi.js +203 -0
- package/dist/frameworks/detectors/flask.d.ts +12 -0
- package/dist/frameworks/detectors/flask.js +244 -0
- package/dist/frameworks/detectors/go.d.ts +11 -0
- package/dist/frameworks/detectors/go.js +75 -0
- package/dist/frameworks/detectors/laravel.d.ts +11 -0
- package/dist/frameworks/detectors/laravel.js +462 -0
- package/dist/frameworks/detectors/nestjs.d.ts +12 -0
- package/dist/frameworks/detectors/nestjs.js +155 -0
- package/dist/frameworks/detectors/nextjs.d.ts +11 -0
- package/dist/frameworks/detectors/nextjs.js +118 -0
- package/dist/frameworks/detectors/rails.d.ts +12 -0
- package/dist/frameworks/detectors/rails.js +76 -0
- package/dist/frameworks/detectors/react-router.d.ts +11 -0
- package/dist/frameworks/detectors/react-router.js +115 -0
- package/dist/frameworks/detectors/rust.d.ts +11 -0
- package/dist/frameworks/detectors/rust.js +59 -0
- package/dist/frameworks/detectors/spring.d.ts +11 -0
- package/dist/frameworks/detectors/spring.js +56 -0
- package/dist/frameworks/detectors/sveltekit.d.ts +11 -0
- package/dist/frameworks/detectors/sveltekit.js +154 -0
- package/dist/frameworks/detectors/symfony.d.ts +13 -0
- package/dist/frameworks/detectors/symfony.js +175 -0
- package/dist/frameworks/detectors/tanstack-router.d.ts +12 -0
- package/dist/frameworks/detectors/tanstack-router.js +80 -0
- package/dist/frameworks/detectors/vapor.d.ts +11 -0
- package/dist/frameworks/detectors/vapor.js +52 -0
- package/dist/frameworks/detectors/vue-router.d.ts +12 -0
- package/dist/frameworks/detectors/vue-router.js +237 -0
- package/dist/frameworks/detectors/wordpress.d.ts +13 -0
- package/dist/frameworks/detectors/wordpress.js +141 -0
- package/dist/frameworks/detectors/yii.d.ts +11 -0
- package/dist/frameworks/detectors/yii.js +131 -0
- package/dist/frameworks/framework-registry.d.ts +13 -0
- package/dist/frameworks/framework-registry.js +77 -0
- package/dist/frameworks/route-registry.d.ts +26 -0
- package/dist/frameworks/route-registry.js +102 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +30 -0
- package/dist/languages/index.d.ts +2 -0
- package/dist/languages/index.js +7 -0
- package/dist/languages/installer.d.ts +13 -0
- package/dist/languages/installer.js +103 -0
- package/dist/languages/registry.d.ts +19 -0
- package/dist/languages/registry.js +427 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +20 -0
- package/dist/mcp.d.ts +11 -0
- package/dist/mcp.js +1699 -0
- package/dist/parsers/common-methods.d.ts +3 -0
- package/dist/parsers/common-methods.js +33 -0
- package/dist/parsers/fallback-parser.d.ts +10 -0
- package/dist/parsers/fallback-parser.js +18 -0
- package/dist/parsers/generic-wasm-parser.d.ts +23 -0
- package/dist/parsers/generic-wasm-parser.js +168 -0
- package/dist/parsers/ignored-symbols.d.ts +26 -0
- package/dist/parsers/ignored-symbols.js +77 -0
- package/dist/parsers/index.d.ts +9 -0
- package/dist/parsers/index.js +13 -0
- package/dist/parsers/languages/javascript.d.ts +11 -0
- package/dist/parsers/languages/javascript.js +28 -0
- package/dist/parsers/languages/php.d.ts +15 -0
- package/dist/parsers/languages/php.js +648 -0
- package/dist/parsers/languages/typescript.d.ts +10 -0
- package/dist/parsers/languages/typescript.js +9 -0
- package/dist/parsers/languages/vue.d.ts +13 -0
- package/dist/parsers/languages/vue.js +63 -0
- package/dist/parsers/parse-worker.d.ts +2 -0
- package/dist/parsers/parse-worker.js +185 -0
- package/dist/parsers/parser-interface.d.ts +9 -0
- package/dist/parsers/parser-interface.js +0 -0
- package/dist/parsers/parser-registry.d.ts +8 -0
- package/dist/parsers/parser-registry.js +52 -0
- package/dist/parsers/wasm-parser.d.ts +16 -0
- package/dist/parsers/wasm-parser.js +110 -0
- package/dist/types.d.ts +172 -0
- package/dist/types.js +0 -0
- package/dist/ui/index.html +270 -0
- package/dist/ui/main.js +581 -0
- package/dist/ui/main.js.map +7 -0
- package/dist/ui/styles.css +573 -0
- package/dist/ui-events.d.ts +36 -0
- package/dist/ui-events.js +61 -0
- package/dist/ui-server.d.ts +12 -0
- package/dist/ui-server.js +504 -0
- package/package.json +179 -0
- package/queries/bash/references.scm +22 -0
- package/queries/bash/symbols.scm +15 -0
- package/queries/c/references.scm +14 -0
- package/queries/c/symbols.scm +30 -0
- package/queries/c-sharp/references.scm +26 -0
- package/queries/c-sharp/symbols.scm +57 -0
- package/queries/cpp/references.scm +21 -0
- package/queries/cpp/symbols.scm +44 -0
- package/queries/dart/references.scm +33 -0
- package/queries/dart/symbols.scm +38 -0
- package/queries/elixir/references.scm +45 -0
- package/queries/elixir/symbols.scm +41 -0
- package/queries/go/references.scm +22 -0
- package/queries/go/symbols.scm +53 -0
- package/queries/java/references.scm +32 -0
- package/queries/java/symbols.scm +41 -0
- package/queries/javascript/references.scm +14 -0
- package/queries/javascript/symbols.scm +23 -0
- package/queries/kotlin/references.scm +31 -0
- package/queries/kotlin/symbols.scm +24 -0
- package/queries/lua/references.scm +19 -0
- package/queries/lua/symbols.scm +29 -0
- package/queries/pascal/references.scm +29 -0
- package/queries/pascal/symbols.scm +45 -0
- package/queries/php/references.scm +109 -0
- package/queries/php/symbols.scm +33 -0
- package/queries/python/references.scm +50 -0
- package/queries/python/symbols.scm +21 -0
- package/queries/ruby/references.scm +48 -0
- package/queries/ruby/symbols.scm +24 -0
- package/queries/rust/references.scm +31 -0
- package/queries/rust/symbols.scm +35 -0
- package/queries/scala/references.scm +30 -0
- package/queries/scala/symbols.scm +35 -0
- package/queries/svelte/references.scm +20 -0
- package/queries/svelte/symbols.scm +30 -0
- package/queries/swift/references.scm +22 -0
- package/queries/swift/symbols.scm +37 -0
- package/queries/typescript/references.scm +25 -0
- package/queries/typescript/symbols.scm +35 -0
- package/queries/vue/references.scm +20 -0
- package/queries/vue/symbols.scm +28 -0
- package/queries/zig/references.scm +20 -0
- package/queries/zig/symbols.scm +22 -0
- package/wasm/tree-sitter-c.wasm +0 -0
- package/wasm/tree-sitter-c_sharp.wasm +0 -0
- package/wasm/tree-sitter-cpp.wasm +0 -0
- package/wasm/tree-sitter-dart.wasm +0 -0
- package/wasm/tree-sitter-go.wasm +0 -0
- package/wasm/tree-sitter-java.wasm +0 -0
- package/wasm/tree-sitter-javascript.wasm +0 -0
- package/wasm/tree-sitter-kotlin.wasm +0 -0
- package/wasm/tree-sitter-php.wasm +0 -0
- package/wasm/tree-sitter-python.wasm +0 -0
- package/wasm/tree-sitter-ruby.wasm +0 -0
- package/wasm/tree-sitter-rust.wasm +0 -0
- package/wasm/tree-sitter-scala.wasm +0 -0
- package/wasm/tree-sitter-swift.wasm +0 -0
- package/wasm/tree-sitter-tsx.wasm +0 -0
- package/wasm/tree-sitter-typescript.wasm +0 -0
- package/wasm/tree-sitter-vue.wasm +0 -0
|
@@ -0,0 +1,573 @@
|
|
|
1
|
+
/* Reset & Core Design System */
|
|
2
|
+
:root {
|
|
3
|
+
/* One Dark Pro Color Palette Variables */
|
|
4
|
+
--bg-main: #14161a;
|
|
5
|
+
--bg-sidebar: #1b1d23;
|
|
6
|
+
--bg-panel: #1b1d23;
|
|
7
|
+
--bg-card: #21252b;
|
|
8
|
+
--bg-input: #1b1d23;
|
|
9
|
+
--border-color: rgba(62, 68, 82, 0.6);
|
|
10
|
+
--border-hover: rgba(75, 82, 99, 0.8);
|
|
11
|
+
|
|
12
|
+
--text-main: #abb2bf;
|
|
13
|
+
--text-muted: #5c6370;
|
|
14
|
+
--text-bright: #e06c75;
|
|
15
|
+
--text-white: #ffffff;
|
|
16
|
+
|
|
17
|
+
/* One Dark Pro Syntax Highlight Colors */
|
|
18
|
+
--syntax-blue: #61afef;
|
|
19
|
+
--syntax-purple: #c678dd;
|
|
20
|
+
--syntax-green: #98c379;
|
|
21
|
+
--syntax-red: #e06c75;
|
|
22
|
+
--syntax-orange: #d19a66;
|
|
23
|
+
--syntax-yellow: #e5c07b;
|
|
24
|
+
--syntax-cyan: #56b6c2;
|
|
25
|
+
|
|
26
|
+
--accent-color: var(--syntax-blue);
|
|
27
|
+
--accent-gradient: linear-gradient(135deg, #61afef 0%, #c678dd 100%);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
* {
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
margin: 0;
|
|
33
|
+
padding: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
body {
|
|
37
|
+
font-family: 'Outfit', sans-serif;
|
|
38
|
+
background-color: var(--bg-main);
|
|
39
|
+
color: var(--text-main);
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
height: 100vh;
|
|
42
|
+
display: flex;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* App Layout */
|
|
46
|
+
.app-layout {
|
|
47
|
+
display: grid;
|
|
48
|
+
grid-template-columns: 300px 1fr;
|
|
49
|
+
width: 100%;
|
|
50
|
+
height: 100%;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Sidebar styling */
|
|
54
|
+
.sidebar {
|
|
55
|
+
background: var(--bg-sidebar);
|
|
56
|
+
border-right: 1px solid var(--border-color);
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
padding: 24px 18px;
|
|
60
|
+
justify-content: space-between;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.sidebar-header {
|
|
64
|
+
margin-bottom: 30px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.logo {
|
|
68
|
+
font-size: 22px;
|
|
69
|
+
font-weight: 700;
|
|
70
|
+
color: var(--text-white);
|
|
71
|
+
letter-spacing: -0.5px;
|
|
72
|
+
margin-bottom: 8px;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
/* gap: 8px; */
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.logo-accent {
|
|
79
|
+
background: var(--accent-gradient);
|
|
80
|
+
-webkit-background-clip: text;
|
|
81
|
+
-webkit-text-fill-color: transparent;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.status-indicator {
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
gap: 8px;
|
|
88
|
+
font-size: 13px;
|
|
89
|
+
color: var(--text-muted);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.indicator-dot {
|
|
93
|
+
width: 8px;
|
|
94
|
+
height: 8px;
|
|
95
|
+
border-radius: 50%;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.indicator-dot.online {
|
|
99
|
+
background-color: var(--syntax-green);
|
|
100
|
+
box-shadow: 0 0 8px var(--syntax-green);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.nav-menu {
|
|
104
|
+
display: flex;
|
|
105
|
+
flex-direction: column;
|
|
106
|
+
gap: 6px;
|
|
107
|
+
flex-grow: 1;
|
|
108
|
+
margin-top: 15px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.nav-item {
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
gap: 12px;
|
|
115
|
+
background: transparent;
|
|
116
|
+
border: none;
|
|
117
|
+
color: var(--text-main);
|
|
118
|
+
padding: 10px 14px;
|
|
119
|
+
font-size: 14px;
|
|
120
|
+
font-weight: 500;
|
|
121
|
+
text-align: left;
|
|
122
|
+
border-radius: 6px;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
transition: all 0.2s ease;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.nav-svg-icon {
|
|
128
|
+
width: 18px;
|
|
129
|
+
height: 18px;
|
|
130
|
+
stroke: var(--text-main);
|
|
131
|
+
stroke-width: 1.8;
|
|
132
|
+
transition: stroke 0.2s ease, transform 0.2s ease;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.nav-item:hover {
|
|
136
|
+
color: var(--text-white);
|
|
137
|
+
background: rgba(255, 255, 255, 0.04);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.nav-item:hover .nav-svg-icon {
|
|
141
|
+
stroke: var(--text-white);
|
|
142
|
+
transform: translateX(2px);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.nav-item.active {
|
|
146
|
+
color: var(--text-white);
|
|
147
|
+
background: rgba(255, 255, 255, 0.07);
|
|
148
|
+
font-weight: 600;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Tab-specific icon colors on hover / active */
|
|
152
|
+
.nav-item[data-tab="graph"].active .nav-svg-icon,
|
|
153
|
+
.nav-item[data-tab="graph"]:hover .nav-svg-icon {
|
|
154
|
+
stroke: var(--syntax-blue);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.nav-item[data-tab="symbols"].active .nav-svg-icon,
|
|
158
|
+
.nav-item[data-tab="symbols"]:hover .nav-svg-icon {
|
|
159
|
+
stroke: var(--syntax-yellow);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.nav-item[data-tab="routes"].active .nav-svg-icon,
|
|
163
|
+
.nav-item[data-tab="routes"]:hover .nav-svg-icon {
|
|
164
|
+
stroke: var(--syntax-green);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.nav-item[data-tab="metrics"].active .nav-svg-icon,
|
|
168
|
+
.nav-item[data-tab="metrics"]:hover .nav-svg-icon {
|
|
169
|
+
stroke: var(--syntax-purple);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.nav-item[data-tab="context"].active .nav-svg-icon,
|
|
173
|
+
.nav-item[data-tab="context"]:hover .nav-svg-icon {
|
|
174
|
+
stroke: var(--syntax-orange);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.nav-item[data-tab="tool-log"].active .nav-svg-icon,
|
|
178
|
+
.nav-item[data-tab="tool-log"]:hover .nav-svg-icon {
|
|
179
|
+
stroke: var(--syntax-cyan);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.sidebar-footer {
|
|
183
|
+
border-top: 1px solid var(--border-color);
|
|
184
|
+
padding-top: 15px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.stats-mini {
|
|
188
|
+
font-size: 13px;
|
|
189
|
+
color: var(--text-muted);
|
|
190
|
+
display: flex;
|
|
191
|
+
flex-direction: column;
|
|
192
|
+
gap: 4px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.stats-mini strong {
|
|
196
|
+
color: var(--text-main);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* Main Content styling */
|
|
200
|
+
.main-content {
|
|
201
|
+
background-color: var(--bg-main);
|
|
202
|
+
height: 100%;
|
|
203
|
+
overflow-y: auto;
|
|
204
|
+
position: relative;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.tab-pane {
|
|
208
|
+
display: none;
|
|
209
|
+
padding: 30px;
|
|
210
|
+
height: 100%;
|
|
211
|
+
animation: fadeIn 0.3s ease;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.tab-pane.active {
|
|
215
|
+
display: flex;
|
|
216
|
+
flex-direction: column;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@keyframes fadeIn {
|
|
220
|
+
from { opacity: 0; transform: translateY(4px); }
|
|
221
|
+
to { opacity: 1; transform: translateY(0); }
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* Common UI Elements */
|
|
225
|
+
.panel-header {
|
|
226
|
+
margin-bottom: 24px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.panel-header h2 {
|
|
230
|
+
font-size: 24px;
|
|
231
|
+
font-weight: 600;
|
|
232
|
+
margin-bottom: 4px;
|
|
233
|
+
color: var(--text-white);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.subtitle {
|
|
237
|
+
color: var(--text-muted);
|
|
238
|
+
font-size: 14px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.form-control {
|
|
242
|
+
background: var(--bg-input);
|
|
243
|
+
border: 1px solid var(--border-color);
|
|
244
|
+
border-radius: 6px;
|
|
245
|
+
color: var(--text-white);
|
|
246
|
+
padding: 10px 14px;
|
|
247
|
+
font-size: 14px;
|
|
248
|
+
width: 100%;
|
|
249
|
+
transition: border-color 0.2s ease;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.form-control:focus {
|
|
253
|
+
outline: none;
|
|
254
|
+
border-color: var(--syntax-blue);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.btn {
|
|
258
|
+
background: var(--syntax-blue);
|
|
259
|
+
border: none;
|
|
260
|
+
color: var(--bg-main);
|
|
261
|
+
border-radius: 6px;
|
|
262
|
+
padding: 10px 18px;
|
|
263
|
+
font-size: 14px;
|
|
264
|
+
font-weight: 600;
|
|
265
|
+
cursor: pointer;
|
|
266
|
+
transition: all 0.2s ease;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.btn:hover {
|
|
270
|
+
filter: brightness(1.15);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.btn-secondary {
|
|
274
|
+
background: rgba(255, 255, 255, 0.06);
|
|
275
|
+
color: var(--text-main);
|
|
276
|
+
border: 1px solid var(--border-color);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.btn-secondary:hover {
|
|
280
|
+
background: rgba(255, 255, 255, 0.1);
|
|
281
|
+
color: var(--text-white);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/* Graph Explorer Layout */
|
|
285
|
+
.graph-container {
|
|
286
|
+
display: grid;
|
|
287
|
+
grid-template-columns: 1fr 340px;
|
|
288
|
+
gap: 20px;
|
|
289
|
+
height: 100%;
|
|
290
|
+
flex-grow: 1;
|
|
291
|
+
position: relative;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
#cy {
|
|
295
|
+
background-color: var(--bg-main);
|
|
296
|
+
border-radius: 12px;
|
|
297
|
+
border: 1px solid var(--border-color);
|
|
298
|
+
height: 100%;
|
|
299
|
+
position: relative;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.graph-toolbar {
|
|
303
|
+
position: absolute;
|
|
304
|
+
top: 15px;
|
|
305
|
+
left: 15px;
|
|
306
|
+
z-index: 10;
|
|
307
|
+
display: flex;
|
|
308
|
+
gap: 8px;
|
|
309
|
+
background: rgba(33, 37, 43, 0.9);
|
|
310
|
+
padding: 8px;
|
|
311
|
+
border-radius: 8px;
|
|
312
|
+
border: 1px solid var(--border-color);
|
|
313
|
+
backdrop-filter: blur(10px);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.form-select {
|
|
317
|
+
background: var(--bg-input);
|
|
318
|
+
border: 1px solid var(--border-color);
|
|
319
|
+
border-radius: 6px;
|
|
320
|
+
color: var(--text-white);
|
|
321
|
+
padding: 6px 12px;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.details-panel {
|
|
325
|
+
background: var(--bg-panel);
|
|
326
|
+
border: 1px solid var(--border-color);
|
|
327
|
+
border-radius: 12px;
|
|
328
|
+
padding: 20px;
|
|
329
|
+
display: flex;
|
|
330
|
+
flex-direction: column;
|
|
331
|
+
overflow-y: auto;
|
|
332
|
+
backdrop-filter: blur(12px);
|
|
333
|
+
color: var(--text-main);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.details-panel h3 {
|
|
337
|
+
font-size: 16px;
|
|
338
|
+
font-weight: 600;
|
|
339
|
+
margin-bottom: 15px;
|
|
340
|
+
border-bottom: 1px solid var(--border-color);
|
|
341
|
+
padding-bottom: 10px;
|
|
342
|
+
color: var(--text-white);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.details-panel strong {
|
|
346
|
+
color: var(--text-white);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.details-placeholder {
|
|
350
|
+
color: var(--text-muted);
|
|
351
|
+
font-size: 14px;
|
|
352
|
+
text-align: center;
|
|
353
|
+
margin-top: 40px;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/* Split views for details/explorer */
|
|
357
|
+
.split-view {
|
|
358
|
+
display: grid;
|
|
359
|
+
grid-template-columns: 1fr 1fr;
|
|
360
|
+
gap: 20px;
|
|
361
|
+
flex-grow: 1;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.split-left {
|
|
365
|
+
overflow-y: auto;
|
|
366
|
+
border-right: 1px solid var(--border-color);
|
|
367
|
+
padding-right: 20px;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.split-right {
|
|
371
|
+
overflow-y: auto;
|
|
372
|
+
padding-left: 20px;
|
|
373
|
+
background: rgba(33, 37, 43, 0.4);
|
|
374
|
+
border: 1px solid var(--border-color);
|
|
375
|
+
border-radius: 8px;
|
|
376
|
+
padding: 20px;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/* Data Tables */
|
|
380
|
+
.data-table {
|
|
381
|
+
width: 100%;
|
|
382
|
+
border-collapse: collapse;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.data-table th, .data-table td {
|
|
386
|
+
padding: 12px;
|
|
387
|
+
text-align: left;
|
|
388
|
+
border-bottom: 1px solid var(--border-color);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.data-table th {
|
|
392
|
+
color: var(--text-muted);
|
|
393
|
+
font-weight: 600;
|
|
394
|
+
font-size: 14px;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.data-table td {
|
|
398
|
+
font-size: 14px;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.data-table tr:hover {
|
|
402
|
+
background: rgba(255, 255, 255, 0.03);
|
|
403
|
+
cursor: pointer;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/* Sub tabs */
|
|
407
|
+
.tabs-sub {
|
|
408
|
+
display: flex;
|
|
409
|
+
gap: 12px;
|
|
410
|
+
border-bottom: 1px solid var(--border-color);
|
|
411
|
+
margin-bottom: 20px;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.tab-sub-btn {
|
|
415
|
+
background: transparent;
|
|
416
|
+
border: none;
|
|
417
|
+
color: var(--text-muted);
|
|
418
|
+
padding: 10px 16px;
|
|
419
|
+
font-size: 14px;
|
|
420
|
+
cursor: pointer;
|
|
421
|
+
transition: color 0.2s ease;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.tab-sub-btn:hover {
|
|
425
|
+
color: var(--text-main);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.tab-sub-btn.active {
|
|
429
|
+
color: var(--text-white);
|
|
430
|
+
border-bottom: 2px solid var(--syntax-blue);
|
|
431
|
+
font-weight: 500;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.subtab-pane {
|
|
435
|
+
display: none;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.subtab-pane.active {
|
|
439
|
+
display: block;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/* Grid Metrics */
|
|
443
|
+
.grid-metrics {
|
|
444
|
+
display: grid;
|
|
445
|
+
grid-template-columns: 1fr 1fr;
|
|
446
|
+
gap: 20px;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.metric-card {
|
|
450
|
+
background: var(--bg-card);
|
|
451
|
+
border: 1px solid var(--border-color);
|
|
452
|
+
border-radius: 12px;
|
|
453
|
+
padding: 20px;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.metric-card h3 {
|
|
457
|
+
font-size: 16px;
|
|
458
|
+
margin-bottom: 15px;
|
|
459
|
+
color: var(--text-muted);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.metric-card ol {
|
|
463
|
+
padding-left: 20px;
|
|
464
|
+
color: var(--text-main);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.metric-card ol li {
|
|
468
|
+
margin-bottom: 8px;
|
|
469
|
+
font-size: 14px;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/* Console Log for Tool Intercepts */
|
|
473
|
+
.log-console {
|
|
474
|
+
background: var(--bg-input);
|
|
475
|
+
border-radius: 8px;
|
|
476
|
+
border: 1px solid var(--border-color);
|
|
477
|
+
font-family: 'JetBrains Mono', monospace;
|
|
478
|
+
font-size: 13px;
|
|
479
|
+
padding: 15px;
|
|
480
|
+
flex-grow: 1;
|
|
481
|
+
overflow-y: auto;
|
|
482
|
+
max-height: 500px;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.log-entry {
|
|
486
|
+
margin-bottom: 12px;
|
|
487
|
+
line-height: 1.5;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.log-time {
|
|
491
|
+
color: var(--text-muted);
|
|
492
|
+
margin-right: 8px;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.log-name {
|
|
496
|
+
color: var(--syntax-blue);
|
|
497
|
+
font-weight: 500;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.log-input {
|
|
501
|
+
color: var(--syntax-green);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.log-result {
|
|
505
|
+
color: var(--text-main);
|
|
506
|
+
padding-left: 15px;
|
|
507
|
+
border-left: 2px solid var(--border-color);
|
|
508
|
+
margin-top: 4px;
|
|
509
|
+
white-space: pre-wrap;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.log-duration {
|
|
513
|
+
color: var(--syntax-orange);
|
|
514
|
+
font-size: 11px;
|
|
515
|
+
margin-left: 6px;
|
|
516
|
+
opacity: 0.8;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.log-status {
|
|
520
|
+
margin-right: 4px;
|
|
521
|
+
font-size: 12px;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.context-input-group {
|
|
525
|
+
display: flex;
|
|
526
|
+
flex-direction: column;
|
|
527
|
+
gap: 12px;
|
|
528
|
+
margin-bottom: 24px;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.context-results-container {
|
|
532
|
+
background: var(--bg-card);
|
|
533
|
+
border: 1px solid var(--border-color);
|
|
534
|
+
border-radius: 8px;
|
|
535
|
+
padding: 20px;
|
|
536
|
+
min-height: 200px;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/* Sticky Symbol Explorer Right Panel */
|
|
540
|
+
#tab-symbols .split-right {
|
|
541
|
+
position: sticky;
|
|
542
|
+
top: 30px;
|
|
543
|
+
max-height: calc(100vh - 180px);
|
|
544
|
+
align-self: start;
|
|
545
|
+
display: flex;
|
|
546
|
+
flex-direction: column;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
/* Neat looking scrollbars for code */
|
|
550
|
+
.neat-scrollbar::-webkit-scrollbar {
|
|
551
|
+
width: 6px;
|
|
552
|
+
height: 6px;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.neat-scrollbar::-webkit-scrollbar-track {
|
|
556
|
+
background: rgba(0, 0, 0, 0.15);
|
|
557
|
+
border-radius: 3px;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.neat-scrollbar::-webkit-scrollbar-thumb {
|
|
561
|
+
background: rgba(255, 255, 255, 0.15);
|
|
562
|
+
border-radius: 3px;
|
|
563
|
+
transition: background 0.2s ease;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.neat-scrollbar::-webkit-scrollbar-thumb:hover {
|
|
567
|
+
background: rgba(255, 255, 255, 0.3);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.neat-scrollbar {
|
|
571
|
+
scrollbar-width: thin;
|
|
572
|
+
scrollbar-color: rgba(255, 255, 255, 0.15) rgba(0, 0, 0, 0.15);
|
|
573
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { EventEmitter } from 'node:events';
|
|
2
|
+
|
|
3
|
+
interface ToolCallEvent {
|
|
4
|
+
tool: string;
|
|
5
|
+
input: any;
|
|
6
|
+
timestamp: string;
|
|
7
|
+
durationMs?: number;
|
|
8
|
+
success?: boolean;
|
|
9
|
+
error?: string;
|
|
10
|
+
}
|
|
11
|
+
interface ScanProgressEvent {
|
|
12
|
+
current: number;
|
|
13
|
+
total: number;
|
|
14
|
+
file: string;
|
|
15
|
+
}
|
|
16
|
+
interface ScanCompleteEvent {
|
|
17
|
+
filesCount: number;
|
|
18
|
+
durationMs: number;
|
|
19
|
+
}
|
|
20
|
+
declare function getToolCallsLogPath(mapxDir: string): string;
|
|
21
|
+
declare class UiEventBus extends EventEmitter {
|
|
22
|
+
private static instance;
|
|
23
|
+
private mapxDir;
|
|
24
|
+
static getInstance(): UiEventBus;
|
|
25
|
+
/**
|
|
26
|
+
* Set the .mapx directory so tool calls can be persisted to disk.
|
|
27
|
+
* Must be called once after the project directory is known.
|
|
28
|
+
*/
|
|
29
|
+
setMapxDir(dir: string): void;
|
|
30
|
+
emitToolCall(event: ToolCallEvent): void;
|
|
31
|
+
emitScanProgress(event: ScanProgressEvent): void;
|
|
32
|
+
emitScanComplete(event: ScanCompleteEvent): void;
|
|
33
|
+
private trimLogIfNeeded;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { type ScanCompleteEvent, type ScanProgressEvent, type ToolCallEvent, UiEventBus, getToolCallsLogPath };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { EventEmitter } from "node:events";
|
|
2
|
+
import { appendFileSync, existsSync, mkdirSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
const TOOL_CALLS_LOG = "tool-calls.jsonl";
|
|
5
|
+
const MAX_LOG_LINES = 500;
|
|
6
|
+
function getToolCallsLogPath(mapxDir) {
|
|
7
|
+
return join(mapxDir, TOOL_CALLS_LOG);
|
|
8
|
+
}
|
|
9
|
+
class UiEventBus extends EventEmitter {
|
|
10
|
+
static instance = null;
|
|
11
|
+
mapxDir = null;
|
|
12
|
+
static getInstance() {
|
|
13
|
+
if (!UiEventBus.instance) {
|
|
14
|
+
UiEventBus.instance = new UiEventBus();
|
|
15
|
+
}
|
|
16
|
+
return UiEventBus.instance;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Set the .mapx directory so tool calls can be persisted to disk.
|
|
20
|
+
* Must be called once after the project directory is known.
|
|
21
|
+
*/
|
|
22
|
+
setMapxDir(dir) {
|
|
23
|
+
this.mapxDir = join(dir, ".mapx");
|
|
24
|
+
if (!existsSync(this.mapxDir)) {
|
|
25
|
+
mkdirSync(this.mapxDir, { recursive: true });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
emitToolCall(event) {
|
|
29
|
+
this.emit("tool-call", event);
|
|
30
|
+
if (this.mapxDir) {
|
|
31
|
+
try {
|
|
32
|
+
const logPath = getToolCallsLogPath(this.mapxDir);
|
|
33
|
+
appendFileSync(logPath, JSON.stringify(event) + "\n", "utf-8");
|
|
34
|
+
this.trimLogIfNeeded(logPath);
|
|
35
|
+
} catch {
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
emitScanProgress(event) {
|
|
40
|
+
this.emit("scan-progress", event);
|
|
41
|
+
}
|
|
42
|
+
emitScanComplete(event) {
|
|
43
|
+
this.emit("scan-complete", event);
|
|
44
|
+
}
|
|
45
|
+
trimLogIfNeeded(logPath) {
|
|
46
|
+
try {
|
|
47
|
+
const { readFileSync, writeFileSync } = require("node:fs");
|
|
48
|
+
const content = readFileSync(logPath, "utf-8");
|
|
49
|
+
const lines = content.split("\n").filter(Boolean);
|
|
50
|
+
if (lines.length > MAX_LOG_LINES) {
|
|
51
|
+
const trimmed = lines.slice(-MAX_LOG_LINES);
|
|
52
|
+
writeFileSync(logPath, trimmed.join("\n") + "\n", "utf-8");
|
|
53
|
+
}
|
|
54
|
+
} catch {
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
UiEventBus,
|
|
60
|
+
getToolCallsLogPath
|
|
61
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as http from 'http';
|
|
2
|
+
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
3
|
+
|
|
4
|
+
interface ServerOpts {
|
|
5
|
+
port: number;
|
|
6
|
+
host: string;
|
|
7
|
+
token?: string;
|
|
8
|
+
dir: string;
|
|
9
|
+
}
|
|
10
|
+
declare function startUiServer(opts: ServerOpts): http.Server<typeof IncomingMessage, typeof ServerResponse>;
|
|
11
|
+
|
|
12
|
+
export { startUiServer };
|