@abstractframework/monitor-active-memory 0.1.0
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/README.md +76 -0
- package/dist/KgActiveMemoryExplorer.d.ts +33 -0
- package/dist/KgActiveMemoryExplorer.d.ts.map +1 -0
- package/dist/KgActiveMemoryExplorer.js +1398 -0
- package/dist/graph.d.ts +74 -0
- package/dist/graph.d.ts.map +1 -0
- package/dist/graph.js +523 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/types.d.ts +50 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/package.json +58 -0
- package/src/styles.css +378 -0
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@abstractframework/monitor-active-memory",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shared KG + Active Memory explorer UI components for AbstractFramework clients (AbstractFlow, AbstractObserver, AbstractCode).",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"author": "Laurent-Philippe Albou",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"abstractframework",
|
|
10
|
+
"knowledge-graph",
|
|
11
|
+
"active-memory",
|
|
12
|
+
"react",
|
|
13
|
+
"reactflow"
|
|
14
|
+
],
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/lpalbou/AbstractUIC.git",
|
|
18
|
+
"directory": "monitor-active-memory"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/lpalbou/AbstractUIC#readme",
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"import": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./styles.css": "./src/styles.css"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist",
|
|
35
|
+
"src/styles.css",
|
|
36
|
+
"README.md"
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsc",
|
|
40
|
+
"prepublishOnly": "npm run build"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"react": "^18.0.0",
|
|
44
|
+
"react-dom": "^18.0.0",
|
|
45
|
+
"reactflow": "^11.0.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/react": "^18.2.48",
|
|
49
|
+
"@types/react-dom": "^18.2.18",
|
|
50
|
+
"typescript": "^5.3.3"
|
|
51
|
+
},
|
|
52
|
+
"sideEffects": [
|
|
53
|
+
"*.css"
|
|
54
|
+
],
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=18.0.0"
|
|
57
|
+
}
|
|
58
|
+
}
|
package/src/styles.css
ADDED
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
.amx-root {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
min-height: 520px;
|
|
6
|
+
gap: 12px;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.amx-left {
|
|
11
|
+
flex: 1 1 auto;
|
|
12
|
+
min-width: 420px;
|
|
13
|
+
min-height: 0;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: 10px;
|
|
17
|
+
position: relative;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.amx-toolbar {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
gap: 10px;
|
|
24
|
+
padding: 10px;
|
|
25
|
+
border: 1px solid var(--ui-border-1, rgba(255, 255, 255, 0.08));
|
|
26
|
+
border-radius: 10px;
|
|
27
|
+
background: var(--ui-surface-2, rgba(255, 255, 255, 0.02));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.amx-toolbar-grid {
|
|
31
|
+
display: grid;
|
|
32
|
+
grid-template-columns: 1fr 1fr;
|
|
33
|
+
gap: 10px;
|
|
34
|
+
min-width: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.amx-toolbar-grid label {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
gap: 6px;
|
|
41
|
+
font-size: var(--font-size-sm, 12px);
|
|
42
|
+
opacity: 0.9;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.amx-toolbar-grid input,
|
|
46
|
+
.amx-toolbar-grid select {
|
|
47
|
+
padding: 8px 10px;
|
|
48
|
+
border-radius: 8px;
|
|
49
|
+
border: 1px solid var(--ui-border-1, rgba(255, 255, 255, 0.10));
|
|
50
|
+
background: var(--ui-surface-3, rgba(0, 0, 0, 0.2));
|
|
51
|
+
color: inherit;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.amx-details summary {
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
user-select: none;
|
|
57
|
+
font-size: var(--font-size-sm, 12px);
|
|
58
|
+
opacity: 0.9;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.amx-details {
|
|
62
|
+
border: 1px solid var(--ui-border-1, rgba(255, 255, 255, 0.08));
|
|
63
|
+
border-radius: 10px;
|
|
64
|
+
padding: 8px 10px;
|
|
65
|
+
background: var(--ui-surface-1, rgba(0, 0, 0, 0.12));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.amx-details[open] summary {
|
|
69
|
+
margin-bottom: 10px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.amx-actions {
|
|
73
|
+
display: flex;
|
|
74
|
+
gap: 8px;
|
|
75
|
+
align-items: center;
|
|
76
|
+
flex-wrap: wrap;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.amx-btn {
|
|
80
|
+
padding: 8px 10px;
|
|
81
|
+
border-radius: 8px;
|
|
82
|
+
border: 1px solid var(--ui-overlay-border, rgba(255, 255, 255, 0.12));
|
|
83
|
+
background: var(--ui-overlay-bg, rgba(255, 255, 255, 0.05));
|
|
84
|
+
color: inherit;
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.amx-btn:hover:not(:disabled) {
|
|
89
|
+
background: var(--ui-overlay-bg-hover, rgba(255, 255, 255, 0.07));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.amx-btn:disabled {
|
|
93
|
+
opacity: 0.6;
|
|
94
|
+
cursor: not-allowed;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.amx-graph {
|
|
98
|
+
flex: 1 1 auto;
|
|
99
|
+
min-height: 420px;
|
|
100
|
+
border: 1px solid var(--ui-border-1, rgba(255, 255, 255, 0.08));
|
|
101
|
+
border-radius: 10px;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.amx-right {
|
|
106
|
+
flex: 0 0 380px;
|
|
107
|
+
width: 380px;
|
|
108
|
+
max-width: 380px;
|
|
109
|
+
min-width: 0;
|
|
110
|
+
min-height: 0;
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
gap: 10px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.amx-panel {
|
|
117
|
+
border: 1px solid var(--ui-border-1, rgba(255, 255, 255, 0.08));
|
|
118
|
+
border-radius: 10px;
|
|
119
|
+
padding: 10px;
|
|
120
|
+
background: var(--ui-surface-2, rgba(255, 255, 255, 0.02));
|
|
121
|
+
min-width: 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.amx-controls {
|
|
125
|
+
position: absolute;
|
|
126
|
+
top: 12px;
|
|
127
|
+
left: 12px;
|
|
128
|
+
z-index: 5;
|
|
129
|
+
width: min(560px, calc(100% - 24px));
|
|
130
|
+
max-height: calc(100% - 24px);
|
|
131
|
+
overflow: auto;
|
|
132
|
+
background: var(--ui-code-block-bg, rgba(12, 18, 34, 0.86));
|
|
133
|
+
border-color: var(--ui-border-1, rgba(255, 255, 255, 0.10));
|
|
134
|
+
backdrop-filter: blur(10px);
|
|
135
|
+
box-shadow: var(--ui-shadow-1, 0 18px 48px rgba(0, 0, 0, 0.45));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.amx-controls:not([open]) {
|
|
139
|
+
width: fit-content;
|
|
140
|
+
max-width: calc(100% - 24px);
|
|
141
|
+
overflow: hidden;
|
|
142
|
+
background: var(--ui-surface-3, rgba(12, 18, 34, 0.70));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.amx-controls summary {
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
user-select: none;
|
|
148
|
+
display: flex;
|
|
149
|
+
align-items: baseline;
|
|
150
|
+
justify-content: space-between;
|
|
151
|
+
gap: 10px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.amx-controls-title {
|
|
155
|
+
font-size: var(--font-size-md, 13px);
|
|
156
|
+
font-weight: 700;
|
|
157
|
+
opacity: 0.95;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.amx-panel h3 {
|
|
161
|
+
margin: 0 0 8px 0;
|
|
162
|
+
font-size: var(--font-size-md, 13px);
|
|
163
|
+
opacity: 0.9;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.amx-small {
|
|
167
|
+
font-size: var(--font-size-sm, 12px);
|
|
168
|
+
opacity: 0.85;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.amx-list {
|
|
172
|
+
max-height: 240px;
|
|
173
|
+
overflow: auto;
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-direction: column;
|
|
176
|
+
gap: 6px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.amx-item {
|
|
180
|
+
padding: 8px;
|
|
181
|
+
border-radius: 8px;
|
|
182
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
183
|
+
background: rgba(0, 0, 0, 0.18);
|
|
184
|
+
font-size: var(--font-size-sm, 12px);
|
|
185
|
+
line-height: 1.3;
|
|
186
|
+
overflow-wrap: anywhere;
|
|
187
|
+
word-break: break-word;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.amx-triple-card {
|
|
191
|
+
display: flex;
|
|
192
|
+
flex-direction: column;
|
|
193
|
+
gap: 6px;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.amx-triple-row {
|
|
197
|
+
display: flex;
|
|
198
|
+
align-items: center;
|
|
199
|
+
gap: 6px;
|
|
200
|
+
min-width: 0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.amx-term {
|
|
204
|
+
appearance: none;
|
|
205
|
+
border: 1px solid rgba(255, 255, 255, 0.14);
|
|
206
|
+
background: rgba(0, 0, 0, 0.16);
|
|
207
|
+
color: inherit;
|
|
208
|
+
padding: 4px 10px;
|
|
209
|
+
border-radius: 999px;
|
|
210
|
+
font-size: var(--font-size-xs, 11px);
|
|
211
|
+
line-height: 1.2;
|
|
212
|
+
max-width: 220px;
|
|
213
|
+
overflow: hidden;
|
|
214
|
+
text-overflow: ellipsis;
|
|
215
|
+
white-space: nowrap;
|
|
216
|
+
cursor: pointer;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.amx-term:hover {
|
|
220
|
+
filter: brightness(1.08);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.amx-predicate {
|
|
224
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
|
|
225
|
+
font-size: var(--font-size-xs, 11px);
|
|
226
|
+
opacity: 0.9;
|
|
227
|
+
padding: 4px 8px;
|
|
228
|
+
border-radius: 10px;
|
|
229
|
+
border: 1px solid rgba(255, 255, 255, 0.10);
|
|
230
|
+
background: rgba(0, 0, 0, 0.14);
|
|
231
|
+
white-space: nowrap;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.amx-arrow {
|
|
235
|
+
opacity: 0.6;
|
|
236
|
+
font-size: var(--font-size-sm, 12px);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.amx-triple-meta {
|
|
240
|
+
display: flex;
|
|
241
|
+
gap: 8px;
|
|
242
|
+
flex-wrap: wrap;
|
|
243
|
+
align-items: baseline;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.amx-triple-actions {
|
|
247
|
+
display: flex;
|
|
248
|
+
gap: 8px;
|
|
249
|
+
align-items: center;
|
|
250
|
+
flex-wrap: wrap;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.amx-item .amx-mono {
|
|
254
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
|
|
255
|
+
font-size: var(--font-size-xs, 11px);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.amx-active-memory {
|
|
259
|
+
max-height: 320px;
|
|
260
|
+
overflow: auto;
|
|
261
|
+
white-space: pre-wrap;
|
|
262
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
|
|
263
|
+
font-size: var(--font-size-xs, 11px);
|
|
264
|
+
line-height: 1.35;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.amx-hl {
|
|
268
|
+
background: rgba(255, 204, 0, 0.25);
|
|
269
|
+
border-radius: 3px;
|
|
270
|
+
padding: 0 2px;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.amx-legend {
|
|
274
|
+
display: flex;
|
|
275
|
+
gap: 6px;
|
|
276
|
+
flex-wrap: wrap;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.amx-legend-item {
|
|
280
|
+
display: inline-flex;
|
|
281
|
+
align-items: center;
|
|
282
|
+
padding: 4px 8px;
|
|
283
|
+
border-radius: 999px;
|
|
284
|
+
border: 1px solid var(--ui-border-2, rgba(255, 255, 255, 0.18));
|
|
285
|
+
background: var(--ui-surface-1, rgba(0, 0, 0, 0.18));
|
|
286
|
+
font-size: var(--font-size-sm, 12px);
|
|
287
|
+
opacity: 0.9;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.amx-graph .react-flow__controls {
|
|
291
|
+
background: var(--ui-code-block-bg, rgba(12, 18, 34, 0.78));
|
|
292
|
+
border: 1px solid var(--ui-border-1, rgba(255, 255, 255, 0.12));
|
|
293
|
+
border-radius: 10px;
|
|
294
|
+
box-shadow: var(--ui-shadow-1, 0 14px 38px rgba(0, 0, 0, 0.45));
|
|
295
|
+
overflow: hidden;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.amx-graph .react-flow__controls button {
|
|
299
|
+
background: transparent;
|
|
300
|
+
border: none;
|
|
301
|
+
border-bottom: 1px solid var(--ui-border-1, rgba(255, 255, 255, 0.10));
|
|
302
|
+
color: var(--text-secondary, rgba(255, 255, 255, 0.86));
|
|
303
|
+
width: 36px;
|
|
304
|
+
height: 36px;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.amx-graph .react-flow__controls button:hover {
|
|
308
|
+
background: var(--accent-subtle, rgba(233, 69, 96, 0.20));
|
|
309
|
+
color: var(--text-primary, rgba(255, 255, 255, 0.96));
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.amx-graph .react-flow__controls button:last-child {
|
|
313
|
+
border-bottom: none;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.amx-graph .react-flow__controls button svg {
|
|
317
|
+
fill: currentColor;
|
|
318
|
+
stroke: currentColor;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.amx-minimap-toggle {
|
|
322
|
+
display: inline-flex;
|
|
323
|
+
align-items: center;
|
|
324
|
+
justify-content: center;
|
|
325
|
+
padding: 4px 8px;
|
|
326
|
+
border-radius: 999px;
|
|
327
|
+
border: 1px solid var(--ui-border-2, rgba(255, 255, 255, 0.18));
|
|
328
|
+
background: var(--ui-surface-1, rgba(0, 0, 0, 0.18));
|
|
329
|
+
color: var(--text-secondary, rgba(255, 255, 255, 0.86));
|
|
330
|
+
font-size: var(--font-size-xs, 11px);
|
|
331
|
+
font-family: var(--font-mono, ui-monospace, monospace);
|
|
332
|
+
cursor: pointer;
|
|
333
|
+
opacity: 0.9;
|
|
334
|
+
white-space: nowrap;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.amx-minimap-toggle:hover {
|
|
338
|
+
opacity: 1;
|
|
339
|
+
background: var(--ui-overlay-bg-hover, rgba(255, 255, 255, 0.08));
|
|
340
|
+
color: var(--text-primary, rgba(255, 255, 255, 0.96));
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.amx-panel-toggles {
|
|
344
|
+
display: flex;
|
|
345
|
+
flex-direction: column;
|
|
346
|
+
gap: 6px;
|
|
347
|
+
align-items: flex-end;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.amx-graph .react-flow__minimap {
|
|
351
|
+
border-radius: 10px;
|
|
352
|
+
overflow: hidden;
|
|
353
|
+
box-shadow: var(--ui-shadow-1, 0 14px 38px rgba(0, 0, 0, 0.45));
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
@media (max-width: 1080px) {
|
|
357
|
+
.amx-root {
|
|
358
|
+
flex-direction: column;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.amx-left {
|
|
362
|
+
min-width: 0;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.amx-right {
|
|
366
|
+
flex: 0 0 auto;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.amx-graph {
|
|
370
|
+
min-height: 360px;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
@media (max-width: 720px) {
|
|
375
|
+
.amx-toolbar-grid {
|
|
376
|
+
grid-template-columns: 1fr;
|
|
377
|
+
}
|
|
378
|
+
}
|