toon-memory 4.3.1 → 4.3.3
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 +17 -11
- package/dist/cli/capture.js +3 -0
- package/dist/cli/setup.js +335 -141
- package/mcp/server.js +558 -131
- package/package.json +2 -2
- package/skills/toon-memory.md +3 -0
- package/src/cli/agents.ts +67 -0
- package/src/cli/commands.ts +59 -18
- package/src/cli/config-writer.ts +75 -10
- package/src/cli/constants.ts +7 -4
- package/src/cli/hooks.ts +1 -1
- package/src/cli/types.ts +2 -2
- package/src/lib/evidence.ts +118 -0
- package/src/lib/graph.ts +12 -2
- package/src/lib/quality.ts +13 -3
- package/src/mcp/archive.ts +16 -6
- package/src/mcp/config.ts +10 -0
- package/src/mcp/consolidation.ts +65 -0
- package/src/mcp/tools.ts +164 -7
- package/src/mcp/vault.ts +176 -0
- package/src/viewer/html.ts +126 -80
- package/src/viewer/index.ts +27 -27
- package/src/viewer/logo-isologo.svg +16 -0
- package/src/viewer/logo.svg +49 -0
- package/src/viewer/types.ts +5 -5
package/src/viewer/html.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFileSync } from "fs"
|
|
2
2
|
import { resolve, dirname } from "path"
|
|
3
3
|
import { fileURLToPath } from "url"
|
|
4
|
-
import { ViewerData
|
|
4
|
+
import { ViewerData } from "./types"
|
|
5
5
|
|
|
6
6
|
const d3Src = (() => {
|
|
7
7
|
try {
|
|
@@ -17,6 +17,25 @@ const d3Src = (() => {
|
|
|
17
17
|
}
|
|
18
18
|
})()
|
|
19
19
|
|
|
20
|
+
function readViewerAsset(name: string): string {
|
|
21
|
+
const dir = dirname(fileURLToPath(import.meta.url))
|
|
22
|
+
const candidates = [
|
|
23
|
+
resolve(dir, `../src/viewer/${name}`),
|
|
24
|
+
resolve(dir, `../../src/viewer/${name}`),
|
|
25
|
+
resolve(dir, name),
|
|
26
|
+
]
|
|
27
|
+
for (const p of candidates) {
|
|
28
|
+
try {
|
|
29
|
+
return readFileSync(p, "utf-8")
|
|
30
|
+
} catch {
|
|
31
|
+
/* try next candidate */
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return ""
|
|
35
|
+
}
|
|
36
|
+
const logoSrc = readViewerAsset("logo.svg")
|
|
37
|
+
const isologoSrc = readViewerAsset("logo-isologo.svg")
|
|
38
|
+
|
|
20
39
|
export function generateHtml(viewerData: ViewerData): string {
|
|
21
40
|
const jsonData = JSON.stringify(viewerData)
|
|
22
41
|
const d3Tag = d3Src
|
|
@@ -34,123 +53,133 @@ ${d3Tag}
|
|
|
34
53
|
<style>
|
|
35
54
|
*{box-sizing:border-box;margin:0;padding:0}
|
|
36
55
|
:root{
|
|
37
|
-
--bg
|
|
38
|
-
--text
|
|
39
|
-
--
|
|
40
|
-
--
|
|
56
|
+
--bg:oklch(8% 0.02 270);--bg2:oklch(12% 0.02 270);--bg3:oklch(15% 0.02 270);--border:oklch(21% 0.02 270);
|
|
57
|
+
--text:oklch(91% 0.01 270);--muted:oklch(56% 0.02 270);
|
|
58
|
+
--brand:oklch(55% 0.25 280);--brand-light:oklch(68% 0.22 280);--brand2:oklch(59% 0.25 300);--lavender:oklch(65% 0.25 310);--pink:oklch(65% 0.26 340);
|
|
59
|
+
--green:oklch(78% 0.2 155);--red:oklch(65% 0.24 25);--amber:oklch(85% 0.18 85);
|
|
60
|
+
--brand-wash:oklch(55% 0.25 280 / 0.12);--brand-wash-soft:oklch(55% 0.25 280 / 0.06);
|
|
61
|
+
--gradient:linear-gradient(135deg,var(--brand),var(--brand2),var(--lavender));
|
|
62
|
+
--ease-out:cubic-bezier(0.16,1,0.3,1);
|
|
63
|
+
--font-body:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;--font-mono:'JetBrains Mono','Fira Code','Consolas',monospace
|
|
41
64
|
}
|
|
42
|
-
html,body{height:100%;font-family:
|
|
65
|
+
html,body{height:100%;font-family:var(--font-body);background:var(--bg);color:var(--text);overflow:hidden}
|
|
43
66
|
.app{display:grid;grid-template-rows:auto 1fr;height:100%}
|
|
44
|
-
header{display:flex;align-items:center;justify-content:space-between;padding:0.
|
|
45
|
-
|
|
46
|
-
|
|
67
|
+
header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:0.65rem 1.25rem;border-bottom:1px solid var(--border);background:oklch(8% 0.02 270 / 0.85);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
|
|
68
|
+
.brand{display:flex;align-items:center;gap:0.6rem}
|
|
69
|
+
.brand-logo{display:flex;line-height:0}
|
|
70
|
+
.brand-logo svg{width:26px;height:26px}
|
|
71
|
+
.brand-word{display:flex;line-height:0}
|
|
72
|
+
.brand-word svg{height:20px;width:auto}
|
|
73
|
+
header .meta{display:flex;gap:0.6rem;font-size:0.78rem;color:var(--muted);align-items:center}
|
|
47
74
|
header .meta span{display:flex;align-items:center;gap:0.3rem}
|
|
48
75
|
.main{display:grid;grid-template-columns:var(--sidebar-w,320px) 1fr;overflow:hidden;position:relative}
|
|
49
|
-
.sidebar{display:flex;flex-direction:column;border-right:1px solid var(--border);overflow:hidden}
|
|
76
|
+
.sidebar{display:flex;flex-direction:column;border-right:1px solid var(--border);overflow:hidden;background:oklch(10% 0.02 270 / 0.5)}
|
|
50
77
|
.sidebar-resizer{width:4px;cursor:col-resize;background:transparent;position:absolute;left:var(--sidebar-w,320px);top:0;bottom:0;z-index:5;transition:background 0.15s}
|
|
51
78
|
.sidebar-resizer:hover,.sidebar-resizer:active{background:var(--brand)}
|
|
52
|
-
.sidebar-header{padding:0.75rem 1rem;border-bottom:1px solid var(--border);background:
|
|
79
|
+
.sidebar-header{padding:0.75rem 1rem;border-bottom:1px solid var(--border);background:oklch(8% 0.02 270 / 0.85);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
|
|
53
80
|
.sidebar-header h2{font-size:0.85rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:var(--muted);margin-bottom:0.5rem}
|
|
54
|
-
.search-box{width:100%;padding:0.5rem 0.75rem;border:1px solid var(--border);border-radius:8px;background:var(--bg3);color:var(--text);font-size:0.85rem;outline:none}
|
|
55
|
-
.search-box:focus{border-color:var(--brand)}
|
|
81
|
+
.search-box{width:100%;padding:0.5rem 0.75rem;border:1px solid var(--border);border-radius:8px;background:var(--bg3);color:var(--text);font-size:0.85rem;outline:none;transition:border-color 0.15s,box-shadow 0.15s}
|
|
82
|
+
.search-box:focus{border-color:var(--brand);box-shadow:0 0 0 3px oklch(55% 0.25 280 / 0.12)}
|
|
56
83
|
.filter-row{display:flex;gap:0.4rem;margin-top:0.5rem;flex-wrap:wrap}
|
|
57
84
|
.filter-btn{padding:0.2rem 0.5rem;border:1px solid var(--border);border-radius:6px;background:transparent;color:var(--muted);font-size:0.7rem;cursor:pointer;transition:all 0.15s}
|
|
58
|
-
.filter-btn:hover,.filter-btn.active{border-color:var(--brand);color:var(--brand);background:
|
|
85
|
+
.filter-btn:hover,.filter-btn.active{border-color:var(--brand);color:var(--brand);background:var(--brand-wash)}
|
|
59
86
|
.entries-list{flex:1;overflow-y:auto;padding:0.5rem}
|
|
60
|
-
.entry-item{padding:0.6rem 0.75rem;border:1px solid var(--border);border-radius:
|
|
61
|
-
.entry-item
|
|
62
|
-
.entry-item
|
|
87
|
+
.entry-item{position:relative;overflow:hidden;padding:0.6rem 0.75rem;border:1px solid var(--border);border-radius:12px;margin-bottom:0.4rem;cursor:pointer;transition:all 0.15s;background:var(--bg2)}
|
|
88
|
+
.entry-item::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:var(--gradient);opacity:0;transform:scaleX(0.5);transition:opacity 0.35s var(--ease-out),transform 0.5s var(--ease-out);border-radius:3px 3px 0 0}
|
|
89
|
+
.entry-item:hover{transform:translateY(-2px);border-color:oklch(28% 0.02 270);box-shadow:0 10px 30px -12px oklch(0% 0 0 / 0.7)}
|
|
90
|
+
.entry-item:hover::before{opacity:1;transform:scaleX(1)}
|
|
91
|
+
.entry-item.selected{border-color:var(--brand);background:var(--brand-wash)}
|
|
92
|
+
.entry-item.selected::before{opacity:1;transform:scaleX(1)}
|
|
63
93
|
.entry-cat{font-size:0.65rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;margin-bottom:0.2rem}
|
|
64
|
-
.entry-cat.decision{color:var(--brand)}
|
|
65
|
-
.entry-cat.bug{color:var(--red)}
|
|
66
|
-
.entry-cat.pattern{color:var(--green)}
|
|
67
|
-
.entry-cat.knowledge{color:var(--cyan)}
|
|
68
|
-
.entry-cat.architecture{color:var(--amber)}
|
|
94
|
+
.entry-cat.decision{color:var(--brand)}.entry-cat.bug{color:var(--red)}.entry-cat.pattern{color:var(--green)}.entry-cat.knowledge{color:var(--lavender)}.entry-cat.architecture{color:var(--amber)}
|
|
69
95
|
.entry-key{font-size:0.85rem;font-weight:600;margin-bottom:0.15rem}
|
|
70
96
|
.entry-preview{font-size:0.75rem;color:var(--muted);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
|
|
71
97
|
.entry-tags{display:flex;gap:0.25rem;margin-top:0.3rem;flex-wrap:wrap}
|
|
72
|
-
.entry-tag{font-size:0.6rem;padding:0.
|
|
98
|
+
.entry-tag{font-size:0.6rem;padding:0.15em 0.4rem;border-radius:4px;background:oklch(55% 0.25 280 / 0.12);color:var(--brand-light);font-family:var(--font-mono)}
|
|
73
99
|
.viewer-area{display:flex;flex-direction:column;overflow:hidden}
|
|
74
|
-
.tabs{display:flex;border-bottom:1px solid var(--border);background:
|
|
75
|
-
.tab{padding:0.
|
|
100
|
+
.tabs{display:flex;border-bottom:1px solid var(--border);background:oklch(8% 0.02 270 / 0.85);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);padding:0 1rem}
|
|
101
|
+
.tab{position:relative;padding:0.65rem 1rem;font-size:0.7rem;font-weight:600;letter-spacing:0.08em;text-transform:uppercase;color:var(--muted);cursor:pointer;transition:color 0.15s}
|
|
76
102
|
.tab:hover{color:var(--text)}
|
|
77
|
-
.tab.active{color:var(--
|
|
103
|
+
.tab.active{color:var(--text)}
|
|
104
|
+
.tab.active::after{content:'';position:absolute;left:0.6rem;right:0.6rem;bottom:0;height:2px;border-radius:2px;background:var(--gradient)}
|
|
78
105
|
.tab-content{flex:1;overflow:hidden;position:relative}
|
|
79
106
|
.tab-panel{display:none;width:100%;height:100%;overflow:auto}
|
|
80
107
|
.tab-panel.active{display:block}
|
|
81
108
|
.graph-container{width:100%;height:100%;min-height:300px;background:var(--bg);position:relative}
|
|
82
|
-
.graph-container::before{content:'';position:absolute;inset:0;background
|
|
109
|
+
.graph-container::before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse 60% 50% at 50% 0%,oklch(55% 0.25 280 / 0.07) 0%,transparent 70%);pointer-events:none;z-index:0}
|
|
83
110
|
.graph-container svg{width:100%;height:100%;position:relative;z-index:1}
|
|
84
|
-
.node-circle{cursor:pointer;transition:r 0.2s ease,opacity 0.2s ease,filter 0.2s ease,stroke 0.2s ease}
|
|
111
|
+
.node-circle{cursor:pointer;transition:r 0.2s var(--ease-out),opacity 0.2s var(--ease-out),filter 0.2s var(--ease-out),stroke 0.2s var(--ease-out)}
|
|
85
112
|
.node-circle:hover{filter:brightness(1.3) drop-shadow(0 0 6px color-mix(in srgb,currentColor 60%,transparent))}
|
|
86
113
|
.node-circle.glow{filter:drop-shadow(0 0 12px var(--brand)) brightness(1.5)}
|
|
87
114
|
.node-circle.selected{stroke:var(--brand);stroke-width:3;filter:drop-shadow(0 0 14px var(--brand)) brightness(1.3)}
|
|
88
|
-
.node-label{font-size:9px;font-family:
|
|
89
|
-
.link{stroke:var(--border);stroke-opacity:0.4;transition:all 0.2s ease;cursor:pointer}
|
|
115
|
+
.node-label{font-size:9px;font-family:var(--font-mono);fill:var(--text);pointer-events:none;text-anchor:middle;transition:opacity 0.2s var(--ease-out);font-weight:500;letter-spacing:0.02em}
|
|
116
|
+
.link{stroke:var(--border);stroke-opacity:0.4;transition:all 0.2s var(--ease-out);cursor:pointer}
|
|
90
117
|
.link:hover{stroke-opacity:0.9;stroke-width:3}
|
|
91
118
|
.link.highlighted{stroke:var(--brand);stroke-opacity:0.9;stroke-width:2.5}
|
|
92
119
|
.link.faded{stroke-opacity:0.04}
|
|
93
120
|
.node-ring{fill:none;stroke-width:2;opacity:0;transition:opacity 0.3s ease,r 0.3s ease}
|
|
94
121
|
.node-ring.visible{opacity:0.6}
|
|
95
122
|
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;padding:1.5rem}
|
|
96
|
-
.stat-card{background:var(--bg2);border:1px solid var(--border);border-radius:
|
|
123
|
+
.stat-card{position:relative;overflow:hidden;background:var(--bg2);border:1px solid var(--border);border-radius:14px;padding:1.25rem;transition:transform 0.3s var(--ease-out),box-shadow 0.3s var(--ease-out),border-color 0.3s}
|
|
124
|
+
.stat-card::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:var(--gradient);opacity:0;transform:scaleX(0.5);transition:opacity 0.35s var(--ease-out),transform 0.5s var(--ease-out)}
|
|
125
|
+
.stat-card:hover{transform:translateY(-4px);box-shadow:0 18px 40px -16px oklch(0% 0 0 / 0.7),0 0 0 1px oklch(55% 0.25 280 / 0.06)}
|
|
126
|
+
.stat-card:hover::before{opacity:1;transform:scaleX(1)}
|
|
97
127
|
.stat-card h3{font-size:0.8rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:var(--muted);margin-bottom:0.75rem}
|
|
98
|
-
.stat-big{font-size:2rem;font-weight:800;background:
|
|
128
|
+
.stat-big{font-size:2rem;font-weight:800;background:var(--gradient);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;color:transparent}
|
|
99
129
|
.bar-chart{display:flex;flex-direction:column;gap:0.4rem}
|
|
100
130
|
.bar-row{display:flex;align-items:center;gap:0.5rem}
|
|
101
131
|
.bar-label{font-size:0.75rem;color:var(--muted);width:80px;text-align:right;flex-shrink:0}
|
|
102
132
|
.bar-track{flex:1;height:20px;background:var(--bg3);border-radius:4px;overflow:hidden}
|
|
103
|
-
.bar-fill{height:100%;border-radius:4px;transition:width 0.
|
|
133
|
+
.bar-fill{height:100%;border-radius:4px;width:0;transition:width 0.7s var(--ease-out)}
|
|
104
134
|
.bar-value{font-size:0.7rem;color:var(--muted);width:30px}
|
|
105
135
|
.tag-cloud{display:flex;flex-wrap:wrap;gap:0.4rem}
|
|
106
|
-
.tag-pill{padding:0.25rem 0.6rem;border-radius:
|
|
136
|
+
.tag-pill{padding:0.25rem 0.6rem;border-radius:9999px;font-size:0.75rem;font-family:var(--font-mono);border:1px solid var(--border);color:var(--muted);transition:all 0.15s}
|
|
107
137
|
.tag-pill:hover{border-color:var(--brand);color:var(--brand)}
|
|
108
138
|
.detail-panel{padding:1.5rem;max-width:700px}
|
|
109
|
-
.detail-panel h2{font-size:1.2rem;font-weight:
|
|
139
|
+
.detail-panel h2{font-size:1.2rem;font-weight:800;margin-bottom:0.5rem;background:var(--gradient);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;color:transparent}
|
|
110
140
|
.detail-panel .detail-cat{font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;margin-bottom:1rem}
|
|
111
141
|
.detail-field{margin-bottom:1rem}
|
|
112
142
|
.detail-field label{display:block;font-size:0.75rem;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:0.05em;margin-bottom:0.3rem}
|
|
113
143
|
.detail-field .value{font-size:0.9rem;line-height:1.6}
|
|
114
|
-
.detail-field .value.mono{font-family:
|
|
144
|
+
.detail-field .value.mono{font-family:var(--font-mono);background:var(--bg3);padding:0.5rem;border-radius:8px;display:block;overflow-x:auto;white-space:pre-wrap}
|
|
115
145
|
.detail-links{display:flex;gap:0.4rem;flex-wrap:wrap}
|
|
116
|
-
.detail-link{padding:0.2rem 0.5rem;border:1px solid var(--border);border-radius:
|
|
117
|
-
.detail-link:hover{border-color:var(--brand);background:
|
|
146
|
+
.detail-link{padding:0.2rem 0.5rem;border:1px solid var(--border);border-radius:9999px;font-size:0.75rem;font-family:var(--font-mono);color:var(--brand-light);background:oklch(55% 0.25 280 / 0.08);cursor:pointer;transition:all 0.15s}
|
|
147
|
+
.detail-link:hover{border-color:var(--brand);background:var(--brand-wash)}
|
|
118
148
|
.empty-detail{display:flex;align-items:center;justify-content:center;height:100%;color:var(--muted);font-size:0.9rem}
|
|
119
|
-
.graph-legend{position:absolute;bottom:3.5rem;left:0.5rem;background:
|
|
149
|
+
.graph-legend{position:absolute;bottom:3.5rem;left:0.5rem;background:oklch(11% 0.02 270 / 0.9);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--border);border-radius:12px;padding:0.75rem;font-size:0.7rem;z-index:10}
|
|
120
150
|
.legend-item{display:flex;align-items:center;gap:0.4rem;margin-bottom:0.25rem}
|
|
121
151
|
.legend-dot{width:10px;height:10px;border-radius:50%}
|
|
122
152
|
.graph-controls{position:absolute;top:1rem;right:1rem;display:flex;gap:0.4rem;z-index:10}
|
|
123
|
-
.graph-btn{width:32px;height:32px;border:1px solid var(--border);border-radius:
|
|
124
|
-
.graph-btn:hover{border-color:var(--brand);color:var(--brand)}
|
|
125
|
-
.tooltip{position:fixed;pointer-events:none;background:
|
|
153
|
+
.graph-btn{width:32px;height:32px;border:1px solid var(--border);border-radius:8px;background:var(--bg2);color:var(--text);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:1rem;transition:all 0.15s}
|
|
154
|
+
.graph-btn:hover{border-color:var(--brand);color:var(--brand);background:var(--brand-wash)}
|
|
155
|
+
.tooltip{position:fixed;pointer-events:none;background:oklch(12% 0.02 270 / 0.92);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--border);border-radius:12px;padding:0.75rem 1rem;font-size:0.75rem;max-width:320px;z-index:1000;box-shadow:0 8px 32px rgba(0,0,0,0.5)}
|
|
126
156
|
.tooltip .tt-cat{font-size:0.6rem;font-weight:600;text-transform:uppercase;margin-bottom:0.2rem}
|
|
127
157
|
.tooltip .tt-key{font-weight:600;margin-bottom:0.2rem}
|
|
128
158
|
.tooltip .tt-content{color:var(--muted);line-height:1.4;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
|
|
129
159
|
.tooltip .tt-score{margin-top:0.3rem;font-size:0.65rem;color:var(--brand)}
|
|
130
160
|
.tooltip .tt-edge{font-size:0.65rem;color:var(--muted);margin-top:0.3rem;padding-top:0.3rem;border-top:1px solid var(--border)}
|
|
131
161
|
.timeline-container{padding:1.5rem;overflow-y:auto;height:100%}
|
|
132
|
-
.timeline-header{font-size:1rem;font-weight:
|
|
162
|
+
.timeline-header{font-size:1rem;font-weight:800;margin-bottom:1rem;background:var(--gradient);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;color:transparent}
|
|
133
163
|
.timeline-track{position:relative;padding-left:2rem}
|
|
134
164
|
.timeline-line{position:absolute;left:0.5rem;top:0;bottom:0;width:2px;background:var(--border)}
|
|
135
|
-
.timeline-entry{position:relative;margin-bottom:1rem;padding:0.6rem 0.8rem;border:1px solid var(--border);border-radius:
|
|
136
|
-
.timeline-entry:hover{border-color:var(--brand)}
|
|
165
|
+
.timeline-entry{position:relative;margin-bottom:1rem;padding:0.6rem 0.8rem;border:1px solid var(--border);border-radius:12px;background:var(--bg2);transition:all 0.15s;cursor:pointer}
|
|
166
|
+
.timeline-entry:hover{border-color:var(--brand);transform:translateY(-2px)}
|
|
137
167
|
.timeline-entry::before{content:'';position:absolute;left:-1.75rem;top:0.8rem;width:10px;height:10px;border-radius:50%;border:2px solid var(--border);background:var(--bg)}
|
|
138
168
|
.timeline-entry .tl-date{font-size:0.65rem;color:var(--muted);margin-bottom:0.2rem}
|
|
139
169
|
.timeline-entry .tl-cat{font-size:0.6rem;font-weight:600;text-transform:uppercase}
|
|
140
170
|
.timeline-entry .tl-key{font-size:0.85rem;font-weight:600}
|
|
141
171
|
.timeline-entry .tl-content{font-size:0.75rem;color:var(--muted);margin-top:0.2rem}
|
|
142
|
-
.export-btn{padding:0.3rem 0.6rem;border:1px solid var(--border);border-radius:
|
|
172
|
+
.export-btn{padding:0.3rem 0.6rem;border:1px solid var(--border);border-radius:9999px;background:var(--bg2);color:var(--text);font-size:0.7rem;cursor:pointer;transition:all 0.15s}
|
|
143
173
|
.export-btn:hover{border-color:var(--brand);color:var(--brand)}
|
|
144
174
|
.export-bar{display:flex;gap:0.4rem}
|
|
145
|
-
.theme-toggle{background:
|
|
146
|
-
.theme-toggle:hover{border-color:var(--brand);color:var(--brand)}
|
|
147
|
-
.reload-btn{
|
|
148
|
-
.reload-btn:hover{border-color:var(--brand);color:var(--brand)}
|
|
175
|
+
.theme-toggle,.reload-btn{background:oklch(12% 0.02 270 / 0.5);border:1px solid var(--border);border-radius:9999px;padding:0.35rem 0.7rem;color:var(--text);cursor:pointer;font-size:0.8rem;line-height:1;transition:all 0.15s}
|
|
176
|
+
.theme-toggle:hover,.reload-btn:hover{border-color:var(--brand);color:var(--brand)}
|
|
177
|
+
.reload-btn{color:var(--muted);font-size:0.9rem}
|
|
149
178
|
.minimap{width:150px;height:100px;background:var(--bg2);border:1px solid var(--border);border-radius:8px;overflow:hidden;box-shadow:0 4px 16px rgba(0,0,0,0.3);cursor:pointer}
|
|
150
179
|
.minimap svg{width:100%;height:100%;display:block}
|
|
151
|
-
.minimap-viewport{fill:
|
|
180
|
+
.minimap-viewport{fill:oklch(55% 0.25 280 / 0.15);stroke:oklch(55% 0.25 280);stroke-width:1.5}
|
|
152
181
|
.graph-right{position:absolute;bottom:1rem;right:1rem;z-index:10;display:flex;flex-direction:column;align-items:flex-end;gap:0.4rem}
|
|
153
|
-
.physics-panel{position:absolute;top:2.8rem;left:0.5rem;background:
|
|
182
|
+
.physics-panel{position:absolute;top:2.8rem;left:0.5rem;background:oklch(11% 0.02 270 / 0.9);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--border);border-radius:12px;padding:0.75rem;font-size:0.7rem;z-index:10;min-width:180px}
|
|
154
183
|
.physics-panel h4{font-size:0.7rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:var(--muted);margin-bottom:0.5rem}
|
|
155
184
|
.graph-toolbar{position:absolute;top:1rem;left:0.5rem;display:flex;gap:0.4rem;z-index:11}
|
|
156
185
|
.physics-row{display:flex;align-items:center;gap:0.5rem;margin-bottom:0.4rem}
|
|
@@ -160,17 +189,22 @@ header .meta span{display:flex;align-items:center;gap:0.3rem}
|
|
|
160
189
|
.physics-row .physics-val{font-size:0.6rem;color:var(--muted);width:30px;text-align:right}
|
|
161
190
|
.node-circle.search-match{filter:drop-shadow(0 0 10px var(--brand)) brightness(1.4);animation:searchPulse 1.5s ease-in-out infinite}
|
|
162
191
|
@keyframes searchPulse{0%,100%{filter:drop-shadow(0 0 8px var(--brand)) brightness(1.2)}50%{filter:drop-shadow(0 0 18px var(--brand)) brightness(1.7)}}
|
|
163
|
-
.path-btn.active{background:var(--
|
|
164
|
-
.path-info{position:absolute;bottom:0.5rem;left:0.5rem;background:
|
|
192
|
+
.path-btn.active{background:var(--gradient);color:#fff;border-color:transparent;box-shadow:0 2px 14px -2px oklch(55% 0.25 280 / 0.5)}
|
|
193
|
+
.path-info{position:absolute;bottom:0.5rem;left:0.5rem;background:oklch(11% 0.02 270 / 0.9);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--border);border-radius:12px;padding:0.4rem 0.7rem;font-size:0.7rem;z-index:10;display:none;max-width:500px;word-break:break-all}
|
|
165
194
|
.node-circle.path-start{stroke:var(--green);stroke-width:3;filter:drop-shadow(0 0 12px var(--green))}
|
|
166
195
|
.node-circle.path-end{stroke:var(--red);stroke-width:3;filter:drop-shadow(0 0 12px var(--red))}
|
|
167
196
|
.node-circle.path-node{stroke:var(--brand);stroke-width:2.5;animation:pathNodePulse 1.2s ease-in-out infinite}
|
|
168
197
|
@keyframes pathNodePulse{0%,100%{filter:drop-shadow(0 0 6px var(--brand))}50%{filter:drop-shadow(0 0 14px var(--brand))}}
|
|
169
198
|
.link.path-edge{stroke:var(--brand);stroke-opacity:0.9;stroke-width:3}
|
|
170
|
-
|
|
171
|
-
.
|
|
172
|
-
.
|
|
173
|
-
.
|
|
199
|
+
@keyframes riseIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
|
|
200
|
+
.app{animation:riseIn 0.6s var(--ease-out) both}
|
|
201
|
+
.reveal{opacity:0;transform:translateY(14px);animation:riseIn 0.6s var(--ease-out) forwards}
|
|
202
|
+
@media(prefers-reduced-motion:reduce){.app,.reveal{animation:none}.reveal{opacity:1;transform:none}.bar-fill{transition:none}.entry-item,.stat-card,.timeline-entry{transition:none}}
|
|
203
|
+
.light{--bg:oklch(96% 0.005 270);--bg2:oklch(100% 0 0);--bg3:oklch(93% 0.005 270);--border:oklch(88% 0.01 270);--text:oklch(22% 0.02 270);--muted:oklch(45% 0.01 260);--brand:oklch(50% 0.22 280);--brand-light:oklch(45% 0.22 280)}
|
|
204
|
+
.light header,.light .sidebar-header,.light .tabs{background:rgba(255,255,255,0.85)}
|
|
205
|
+
.light .tooltip{background:rgba(255,255,255,0.95);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-color:var(--border);box-shadow:0 8px 32px rgba(0,0,0,0.1)}
|
|
206
|
+
.light .timeline-entry{background:var(--bg2)}
|
|
207
|
+
.light .graph-btn,.light .export-btn,.light .theme-toggle,.light .reload-btn{background:var(--bg2)}
|
|
174
208
|
.light .minimap{box-shadow:0 4px 16px rgba(0,0,0,0.08)}
|
|
175
209
|
@media(max-width:768px){.main{grid-template-columns:1fr}.sidebar{display:none}}
|
|
176
210
|
</style>
|
|
@@ -178,7 +212,10 @@ header .meta span{display:flex;align-items:center;gap:0.3rem}
|
|
|
178
212
|
<body>
|
|
179
213
|
<div class="app">
|
|
180
214
|
<header>
|
|
181
|
-
<
|
|
215
|
+
<div class="brand">
|
|
216
|
+
<span class="brand-logo">${logoSrc}</span>
|
|
217
|
+
<span class="brand-word">${isologoSrc}</span>
|
|
218
|
+
</div>
|
|
182
219
|
<div class="meta">
|
|
183
220
|
<span id="totalCount"></span>
|
|
184
221
|
<span id="edgeCount"></span>
|
|
@@ -252,10 +289,7 @@ header .meta span{display:flex;align-items:center;gap:0.3rem}
|
|
|
252
289
|
<script>
|
|
253
290
|
const DATA = ${jsonData};
|
|
254
291
|
|
|
255
|
-
const COLORS = {
|
|
256
|
-
decision: '#a78bfa', bug: '#ef4444', pattern: '#22c55e',
|
|
257
|
-
knowledge: '#06b6d4', architecture: '#f59e0b'
|
|
258
|
-
};
|
|
292
|
+
const COLORS = { decision: 'oklch(55% 0.25 280)', bug: 'oklch(65% 0.24 25)', pattern: 'oklch(78% 0.2 155)', knowledge: 'oklch(65% 0.25 310)', architecture: 'oklch(85% 0.18 85)' };
|
|
259
293
|
|
|
260
294
|
let selectedEntry = null;
|
|
261
295
|
let activeFilter = null;
|
|
@@ -354,6 +388,7 @@ document.getElementById('search').addEventListener('input', (e) => {
|
|
|
354
388
|
});
|
|
355
389
|
|
|
356
390
|
// --- Entries List ---
|
|
391
|
+
let firstEntriesRender = true;
|
|
357
392
|
function renderEntries() {
|
|
358
393
|
const q = searchQuery;
|
|
359
394
|
const list = document.getElementById('entriesList');
|
|
@@ -361,9 +396,10 @@ function renderEntries() {
|
|
|
361
396
|
DATA.nodes
|
|
362
397
|
.filter(e => !activeFilter || e.category === activeFilter)
|
|
363
398
|
.filter(e => !q || e.id.toLowerCase().includes(q) || e.content.toLowerCase().includes(q) || e.tags.some(t => t.toLowerCase().includes(q)))
|
|
364
|
-
.forEach(e => {
|
|
399
|
+
.forEach((e, i) => {
|
|
365
400
|
const div = document.createElement('div');
|
|
366
|
-
div.className = 'entry-item' + (selectedEntry && selectedEntry.id === e.id ? ' selected' : '');
|
|
401
|
+
div.className = 'entry-item' + (selectedEntry && selectedEntry.id === e.id ? ' selected' : '') + (firstEntriesRender ? ' reveal' : '');
|
|
402
|
+
if (firstEntriesRender) div.style.animationDelay = Math.min(i * 0.03, 0.6) + 's';
|
|
367
403
|
div.innerHTML =
|
|
368
404
|
'<div class="entry-cat ' + e.category + '">' + e.category + '</div>' +
|
|
369
405
|
'<div class="entry-key">' + escHtml(e.id) + '</div>' +
|
|
@@ -372,6 +408,7 @@ function renderEntries() {
|
|
|
372
408
|
div.onclick = () => selectEntry(e);
|
|
373
409
|
list.appendChild(div);
|
|
374
410
|
});
|
|
411
|
+
firstEntriesRender = false;
|
|
375
412
|
}
|
|
376
413
|
|
|
377
414
|
function escHtml(s) { return s.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); }
|
|
@@ -420,22 +457,29 @@ function renderStats() {
|
|
|
420
457
|
const maxTag = Math.max(...topTags.map(t => t[1]));
|
|
421
458
|
const avgQuality = DATA.nodes.reduce((s, n) => s + (n.quality || 0), 0) / DATA.nodes.length;
|
|
422
459
|
const maxAccess = Math.max(...DATA.nodes.map(n => n.accessCount || 0));
|
|
460
|
+
const card = (i, inner) => '<div class="stat-card reveal" style="animation-delay:' + (i * 0.07) + 's">' + inner + '</div>';
|
|
423
461
|
|
|
424
462
|
grid.innerHTML =
|
|
425
|
-
'<
|
|
426
|
-
'<
|
|
427
|
-
'<
|
|
428
|
-
'<
|
|
429
|
-
'<
|
|
463
|
+
card(0, '<h3>Total Entries</h3><div class="stat-big">' + DATA.totalEntries + '</div>') +
|
|
464
|
+
card(1, '<h3>Graph Edges</h3><div class="stat-big">' + DATA.edges.length + '</div>') +
|
|
465
|
+
card(2, '<h3>Avg Quality</h3><div class="stat-big">' + avgQuality.toFixed(2) + '</div>') +
|
|
466
|
+
card(3, '<h3>Max Access</h3><div class="stat-big">' + maxAccess + '</div>') +
|
|
467
|
+
card(4, '<h3>Categories</h3><div class="bar-chart">' +
|
|
430
468
|
catEntries.map(([cat, count]) =>
|
|
431
|
-
'<div class="bar-row"><span class="bar-label">' + cat + '</span><div class="bar-track"><div class="bar-fill"
|
|
469
|
+
'<div class="bar-row"><span class="bar-label">' + cat + '</span><div class="bar-track"><div class="bar-fill" data-w="' + (count/maxCat*100) + '" style="background:' + (COLORS[cat] || 'var(--brand)') + '"></div></div><span class="bar-value">' + count + '</span></div>'
|
|
432
470
|
).join('') +
|
|
433
|
-
'</div
|
|
434
|
-
'<
|
|
471
|
+
'</div>') +
|
|
472
|
+
card(5, '<h3>Top Tags</h3><div class="tag-cloud">' +
|
|
435
473
|
topTags.map(([tag, count]) =>
|
|
436
474
|
'<span class="tag-pill">' + escHtml(tag) + ' <small>(' + count + ')</small></span>'
|
|
437
475
|
).join('') +
|
|
438
|
-
'</div
|
|
476
|
+
'</div>');
|
|
477
|
+
|
|
478
|
+
requestAnimationFrame(() => {
|
|
479
|
+
grid.querySelectorAll('.bar-fill').forEach(b => {
|
|
480
|
+
b.style.width = b.getAttribute('data-w') + '%';
|
|
481
|
+
});
|
|
482
|
+
});
|
|
439
483
|
}
|
|
440
484
|
|
|
441
485
|
function renderTimeline() {
|
|
@@ -449,14 +493,16 @@ function renderTimeline() {
|
|
|
449
493
|
});
|
|
450
494
|
|
|
451
495
|
let html = '<div class="timeline-header">Timeline (' + DATA.totalEntries + ' entries)</div><div class="timeline-track"><div class="timeline-line"></div>';
|
|
496
|
+
let idx = 0;
|
|
452
497
|
for (const [date, entries] of Object.entries(grouped)) {
|
|
453
498
|
for (const e of entries) {
|
|
454
|
-
html += '<div class="timeline-entry
|
|
499
|
+
html += '<div class="timeline-entry reveal" style="border-left:3px solid ' + (COLORS[e.category] || 'var(--border)') + ';animation-delay:' + Math.min(idx * 0.02, 0.6) + 's" onclick="selectEntryById(\\'' + e.id + '\\')">' +
|
|
455
500
|
'<div class="tl-date">' + escHtml(date) + '</div>' +
|
|
456
501
|
'<div class="tl-cat" style="color:' + (COLORS[e.category] || 'var(--muted)') + '">' + e.category + '</div>' +
|
|
457
502
|
'<div class="tl-key">' + escHtml(e.id) + '</div>' +
|
|
458
503
|
'<div class="tl-content">' + escHtml(e.content.substring(0, 100)) + '</div>' +
|
|
459
504
|
'</div>';
|
|
505
|
+
idx++;
|
|
460
506
|
}
|
|
461
507
|
}
|
|
462
508
|
html += '</div>';
|
|
@@ -524,8 +570,8 @@ const graph = (function() {
|
|
|
524
570
|
const node = g.append('g').selectAll('circle').data(DATA.nodes).join('circle')
|
|
525
571
|
.attr('class', 'node-circle')
|
|
526
572
|
.attr('r', d => nodeRadius(d))
|
|
527
|
-
.attr('fill', d => COLORS[d.category] || '
|
|
528
|
-
.attr('stroke', d => { const c = COLORS[d.category] || '
|
|
573
|
+
.attr('fill', d => COLORS[d.category] || 'oklch(56% 0.02 270)')
|
|
574
|
+
.attr('stroke', d => { const c = COLORS[d.category] || 'oklch(56% 0.02 270)'; return c; })
|
|
529
575
|
.attr('stroke-width', 1.5)
|
|
530
576
|
.attr('stroke-opacity', 0.6)
|
|
531
577
|
.call(d3.drag()
|
|
@@ -713,7 +759,7 @@ const graph = (function() {
|
|
|
713
759
|
const minimapG = minimapSvg.append('g');
|
|
714
760
|
minimapG.append('g').attr('class', 'minimap-links');
|
|
715
761
|
minimapG.append('g').attr('class', 'minimap-nodes');
|
|
716
|
-
const minimapViewport = minimapSvg.append('rect').attr('class', 'minimap-viewport').attr('fill', '
|
|
762
|
+
const minimapViewport = minimapSvg.append('rect').attr('class', 'minimap-viewport').attr('fill', 'oklch(55% 0.25 280 / 0.15)').attr('stroke', 'oklch(55% 0.25 280)').attr('stroke-width', 1.5).attr('rx', 3);
|
|
717
763
|
|
|
718
764
|
function getGraphBounds() {
|
|
719
765
|
const allX = DATA.nodes.map(n => n.x || 0);
|
|
@@ -730,11 +776,11 @@ const graph = (function() {
|
|
|
730
776
|
.attr('y1', d => (d.source.y || 0) * minimapScale)
|
|
731
777
|
.attr('x2', d => (d.target.x || 0) * minimapScale)
|
|
732
778
|
.attr('y2', d => (d.target.y || 0) * minimapScale)
|
|
733
|
-
.attr('stroke', '
|
|
779
|
+
.attr('stroke', 'oklch(21% 0.02 270)').attr('stroke-width', 0.5).attr('stroke-opacity', 0.3);
|
|
734
780
|
|
|
735
781
|
minimapG.select('.minimap-nodes').selectAll('circle').data(DATA.nodes).join('circle')
|
|
736
782
|
.attr('cx', d => (d.x || 0) * minimapScale).attr('cy', d => (d.y || 0) * minimapScale)
|
|
737
|
-
.attr('r', 1.8).attr('fill', d => COLORS[d.category] || '
|
|
783
|
+
.attr('r', 1.8).attr('fill', d => COLORS[d.category] || 'oklch(56% 0.02 270)').attr('stroke', 'none');
|
|
738
784
|
|
|
739
785
|
const t = currentTransform;
|
|
740
786
|
const containerW = container.clientWidth;
|
package/src/viewer/index.ts
CHANGED
|
@@ -33,39 +33,39 @@ const MAX_PORT_ATTEMPTS = 20
|
|
|
33
33
|
|
|
34
34
|
export function viewer(portArg?: string): void {
|
|
35
35
|
const startPort = resolvePort(portArg)
|
|
36
|
-
let port = startPort
|
|
37
36
|
let currentHtml = generateHtml(buildViewerData())
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
function serveOn(port: number, attempt: number): void {
|
|
39
|
+
const server = createServer((_req: IncomingMessage, res: ServerResponse) => {
|
|
40
|
+
res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" })
|
|
41
|
+
res.end(currentHtml)
|
|
42
|
+
})
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
})
|
|
44
|
+
server.on("error", (err: NodeJS.ErrnoException) => {
|
|
45
|
+
if (err.code === "EADDRINUSE" && attempt < MAX_PORT_ATTEMPTS) {
|
|
46
|
+
console.log(`Port ${port} in use, trying ${port + 1}...`)
|
|
47
|
+
serveOn(port + 1, attempt + 1)
|
|
48
|
+
} else if (err.code === "EADDRINUSE") {
|
|
49
|
+
console.error(`Port ${port} already in use. Try: toon-memory viewer --port ${port + 1} (or PORT=${port + 1} toon-memory viewer)`)
|
|
50
|
+
process.exit(1)
|
|
51
|
+
} else {
|
|
52
|
+
console.error(`Server error: ${err.message}`)
|
|
53
|
+
process.exit(1)
|
|
54
|
+
}
|
|
55
|
+
})
|
|
57
56
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
server.listen(port, "127.0.0.1", () => {
|
|
58
|
+
const url = `http://127.0.0.1:${port}`
|
|
59
|
+
const data = buildViewerData()
|
|
60
|
+
console.log(`\ntoon-memory viewer`)
|
|
61
|
+
console.log(` Entries: ${data.totalEntries} | Edges: ${data.edges.length}`)
|
|
62
|
+
console.log(` Serving at: ${url}`)
|
|
63
|
+
console.log(` Press 'r' in terminal to reload | Ctrl+C to stop\n`)
|
|
64
|
+
openBrowser(url)
|
|
65
|
+
})
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
serveOn(startPort, 1)
|
|
69
69
|
|
|
70
70
|
if (process.stdin.isTTY) {
|
|
71
71
|
process.stdin.setRawMode?.(true)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 52" role="img" aria-label="toon-memory">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="toon-grad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4
|
+
<stop offset="0%" stop-color="#6366f1"/>
|
|
5
|
+
<stop offset="50%" stop-color="#8b5cf6"/>
|
|
6
|
+
<stop offset="100%" stop-color="#a855f7"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
</defs>
|
|
9
|
+
<g fill="url(#toon-grad)">
|
|
10
|
+
<polygon points="6,0 12,0 12,34 6,40 0,40 0,6"/><polygon points="-4,22 2,16 24,16 24,22 18,28 -4,28"/>
|
|
11
|
+
<path fill-rule="evenodd" d="M32,12 54,12 54,34 48,40 26,40 26,18 Z M34,20 46,20 46,32 34,32 Z"/>
|
|
12
|
+
<path fill-rule="evenodd" d="M64,12 86,12 86,34 80,40 58,40 58,18 Z M66,20 78,20 78,32 66,32 Z"/>
|
|
13
|
+
<polygon points="96,12 102,12 102,34 96,40 90,40 90,18"/><polygon points="90,18 96,12 122,12 122,18 116,24 90,24"/><polygon points="116,12 122,12 122,34 116,40 110,40 110,18"/>
|
|
14
|
+
</g>
|
|
15
|
+
<text x="130" y="40" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="34" font-weight="700" letter-spacing="1" fill="oklch(56% 0.02 270)">memory</text>
|
|
16
|
+
</svg>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" width="200" height="200">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4
|
+
<stop offset="0%" stop-color="#6366f1"/>
|
|
5
|
+
<stop offset="50%" stop-color="#8b5cf6"/>
|
|
6
|
+
<stop offset="100%" stop-color="#a855f7"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
<style>
|
|
9
|
+
.node-outer { fill: url(#grad); stroke: #1e1b4b; stroke-width: 2.5; }
|
|
10
|
+
.node-center { fill: url(#grad); stroke: #1e1b4b; stroke-width: 3; }
|
|
11
|
+
.node-core { fill: #fff; }
|
|
12
|
+
.edge { stroke: url(#grad); stroke-width: 3.5; stroke-linecap: round; fill: none; }
|
|
13
|
+
.spoke { stroke: url(#grad); stroke-width: 2.5; stroke-linecap: round; fill: none; opacity: 0.35; }
|
|
14
|
+
.frame { fill: none; stroke: url(#grad); stroke-width: 1.5; opacity: 0.12; }
|
|
15
|
+
.logo-group {
|
|
16
|
+
transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
17
|
+
transform-origin: 100px 100px;
|
|
18
|
+
}
|
|
19
|
+
svg:hover .logo-group { transform: scale(1.05); }
|
|
20
|
+
</style>
|
|
21
|
+
</defs>
|
|
22
|
+
<g class="logo-group">
|
|
23
|
+
<polygon class="frame" points="100,10 183,55 183,145 100,190 17,145 17,55"/>
|
|
24
|
+
|
|
25
|
+
<line class="spoke" x1="100" y1="100" x2="100" y2="30"/>
|
|
26
|
+
<line class="spoke" x1="100" y1="100" x2="160.6" y2="65"/>
|
|
27
|
+
<line class="spoke" x1="100" y1="100" x2="160.6" y2="135"/>
|
|
28
|
+
<line class="spoke" x1="100" y1="100" x2="100" y2="170"/>
|
|
29
|
+
<line class="spoke" x1="100" y1="100" x2="39.4" y2="135"/>
|
|
30
|
+
<line class="spoke" x1="100" y1="100" x2="39.4" y2="65"/>
|
|
31
|
+
|
|
32
|
+
<line class="edge" x1="100" y1="30" x2="160.6" y2="65"/>
|
|
33
|
+
<line class="edge" x1="160.6" y1="65" x2="160.6" y2="135"/>
|
|
34
|
+
<line class="edge" x1="160.6" y1="135" x2="100" y2="170"/>
|
|
35
|
+
<line class="edge" x1="100" y1="170" x2="39.4" y2="135"/>
|
|
36
|
+
<line class="edge" x1="39.4" y1="135" x2="39.4" y2="65"/>
|
|
37
|
+
<line class="edge" x1="39.4" y1="65" x2="100" y2="30"/>
|
|
38
|
+
|
|
39
|
+
<circle class="node-outer" cx="100" cy="30" r="11"/>
|
|
40
|
+
<circle class="node-outer" cx="160.6" cy="65" r="11"/>
|
|
41
|
+
<circle class="node-outer" cx="160.6" cy="135" r="11"/>
|
|
42
|
+
<circle class="node-outer" cx="100" cy="170" r="11"/>
|
|
43
|
+
<circle class="node-outer" cx="39.4" cy="135" r="11"/>
|
|
44
|
+
<circle class="node-outer" cx="39.4" cy="65" r="11"/>
|
|
45
|
+
|
|
46
|
+
<circle class="node-center" cx="100" cy="100" r="17"/>
|
|
47
|
+
<circle class="node-core" cx="100" cy="100" r="5.5"/>
|
|
48
|
+
</g>
|
|
49
|
+
</svg>
|
package/src/viewer/types.ts
CHANGED
|
@@ -21,9 +21,9 @@ export interface ViewerData {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export const COLORS: Record<string, string> = {
|
|
24
|
-
decision: "
|
|
25
|
-
bug: "
|
|
26
|
-
pattern: "
|
|
27
|
-
knowledge: "
|
|
28
|
-
architecture: "
|
|
24
|
+
decision: "oklch(55% 0.25 280)",
|
|
25
|
+
bug: "oklch(65% 0.24 25)",
|
|
26
|
+
pattern: "oklch(78% 0.2 155)",
|
|
27
|
+
knowledge: "oklch(65% 0.25 310)",
|
|
28
|
+
architecture: "oklch(85% 0.18 85)",
|
|
29
29
|
}
|