truemap-cli 0.1.0 → 0.2.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 +29 -26
- package/bin/truemap.js +3 -0
- package/kit/fonts/OFL.txt +93 -0
- package/kit/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
- package/kit/fonts/ibm-plex-mono-latin-500-normal.woff2 +0 -0
- package/kit/fonts/ibm-plex-sans-latin-400-normal.woff2 +0 -0
- package/kit/fonts/ibm-plex-sans-latin-500-normal.woff2 +0 -0
- package/kit/fonts/ibm-plex-sans-latin-600-normal.woff2 +0 -0
- package/kit/truemap.css +246 -186
- package/package.json +1 -1
- package/skills/truemap/SKILL.md +4 -3
- package/src/cli.js +46 -15
- package/src/guide.md +53 -31
- package/src/outline.js +71 -0
- package/src/server.js +440 -394
- package/src/ui/sdk.js +387 -58
- package/src/ui/workspace.css +179 -128
- package/src/ui/workspace.html +49 -46
- package/src/ui/workspace.js +241 -104
package/kit/truemap.css
CHANGED
|
@@ -1,41 +1,59 @@
|
|
|
1
|
-
/* truemap page kit
|
|
2
|
-
To match
|
|
1
|
+
/* truemap page kit. truemap serves this file to every page in .truemap/ (assets/truemap.css).
|
|
2
|
+
To match a project's own look, put token overrides in .truemap/assets/theme.css – truemap appends it here. */
|
|
3
|
+
|
|
4
|
+
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/__truemap/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
|
|
5
|
+
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/__truemap/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
|
|
6
|
+
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/__truemap/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
|
|
7
|
+
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/__truemap/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
|
|
8
|
+
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/__truemap/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
|
|
3
9
|
|
|
4
10
|
:root {
|
|
5
|
-
--tm-paper: #
|
|
6
|
-
--tm-sheet: #ffffff;
|
|
7
|
-
--tm-wash: #
|
|
8
|
-
--tm-ink: #
|
|
9
|
-
--tm-
|
|
10
|
-
--tm-
|
|
11
|
-
--tm-
|
|
12
|
-
--tm-rule
|
|
13
|
-
--tm-
|
|
14
|
-
--tm-route
|
|
15
|
-
--tm-
|
|
16
|
-
--tm-
|
|
17
|
-
--tm-
|
|
18
|
-
--tm-
|
|
19
|
-
--tm-
|
|
20
|
-
--tm-
|
|
11
|
+
--tm-paper: #f6f7f4; /* page background */
|
|
12
|
+
--tm-sheet: #ffffff; /* boxes on the map */
|
|
13
|
+
--tm-wash: #eef0ec; /* quiet fills */
|
|
14
|
+
--tm-ink: #17202b; /* titles */
|
|
15
|
+
--tm-text: #2a3441; /* body text */
|
|
16
|
+
--tm-graphite: #5b6573; /* secondary text */
|
|
17
|
+
--tm-pencil: #8a939e; /* paths, hints */
|
|
18
|
+
--tm-rule: #dde1db;
|
|
19
|
+
--tm-rule-strong: #c2c8c1;
|
|
20
|
+
--tm-route: #2453c4; /* the one emphasis: the key path, links, decisions */
|
|
21
|
+
--tm-route-ink: #1b3f96;
|
|
22
|
+
--tm-route-wash: #e9eefb;
|
|
23
|
+
--tm-action: #2453c4; /* filled buttons */
|
|
24
|
+
--tm-changed: #a2690a;
|
|
25
|
+
--tm-changed-wash: #fbf2e0;
|
|
26
|
+
--tm-broken: #b03a2e;
|
|
27
|
+
--tm-broken-wash: #fbeae7;
|
|
28
|
+
--tm-fine: #2c7550;
|
|
29
|
+
--tm-fine-wash: #e5f1e9;
|
|
30
|
+
--tm-radius: 6px;
|
|
31
|
+
--tm-font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
|
|
32
|
+
--tm-code: "IBM Plex Mono", ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
|
|
21
33
|
color-scheme: light dark;
|
|
22
34
|
}
|
|
23
35
|
|
|
24
36
|
@media (prefers-color-scheme: dark) {
|
|
25
37
|
:root {
|
|
26
|
-
--tm-paper: #
|
|
27
|
-
--tm-sheet: #
|
|
28
|
-
--tm-wash: #
|
|
29
|
-
--tm-ink: #
|
|
30
|
-
--tm-
|
|
31
|
-
--tm-
|
|
32
|
-
--tm-
|
|
33
|
-
--tm-rule
|
|
34
|
-
--tm-
|
|
35
|
-
--tm-route
|
|
36
|
-
--tm-
|
|
37
|
-
--tm-
|
|
38
|
-
--tm-
|
|
38
|
+
--tm-paper: #121519;
|
|
39
|
+
--tm-sheet: #191d23;
|
|
40
|
+
--tm-wash: #1f242b;
|
|
41
|
+
--tm-ink: #edf0f3;
|
|
42
|
+
--tm-text: #d0d6dd;
|
|
43
|
+
--tm-graphite: #9ba4af;
|
|
44
|
+
--tm-pencil: #707a86;
|
|
45
|
+
--tm-rule: #2a3039;
|
|
46
|
+
--tm-rule-strong: #3d4651;
|
|
47
|
+
--tm-route: #7ea3ff;
|
|
48
|
+
--tm-route-ink: #a9c0ff;
|
|
49
|
+
--tm-route-wash: #1b2440;
|
|
50
|
+
--tm-action: #3a66d6;
|
|
51
|
+
--tm-changed: #d9a54a;
|
|
52
|
+
--tm-changed-wash: #2c2414;
|
|
53
|
+
--tm-broken: #ec8170;
|
|
54
|
+
--tm-broken-wash: #321b18;
|
|
55
|
+
--tm-fine: #73bd95;
|
|
56
|
+
--tm-fine-wash: #16271e;
|
|
39
57
|
}
|
|
40
58
|
}
|
|
41
59
|
|
|
@@ -44,187 +62,229 @@
|
|
|
44
62
|
html { -webkit-text-size-adjust: 100%; }
|
|
45
63
|
body {
|
|
46
64
|
margin: 0;
|
|
65
|
+
overflow-x: clip;
|
|
47
66
|
background: var(--tm-paper);
|
|
48
|
-
color: var(--tm-
|
|
49
|
-
font: 16px/1.
|
|
67
|
+
color: var(--tm-text);
|
|
68
|
+
font: 16px/1.62 var(--tm-font);
|
|
69
|
+
font-feature-settings: "kern", "liga";
|
|
50
70
|
-webkit-font-smoothing: antialiased;
|
|
51
71
|
text-rendering: optimizeLegibility;
|
|
52
72
|
}
|
|
53
73
|
img, svg, video, canvas { max-width: 100%; }
|
|
54
74
|
p, li, td, th, h1, h2, h3, h4, dd { overflow-wrap: anywhere; }
|
|
55
|
-
p { margin: 0 0 1em; max-width:
|
|
56
|
-
|
|
57
|
-
a
|
|
75
|
+
p { margin: 0 0 1em; max-width: 68ch; }
|
|
76
|
+
strong, b { color: var(--tm-ink); font-weight: 600; }
|
|
77
|
+
a { color: var(--tm-route); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in oklab, var(--tm-route) 40%, transparent); }
|
|
78
|
+
a:hover { text-decoration-color: var(--tm-route); }
|
|
58
79
|
:focus-visible { outline: 2px solid var(--tm-route); outline-offset: 2px; }
|
|
59
|
-
::selection { background: var(--tm-route-wash); }
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
.tm-
|
|
68
|
-
.tm-
|
|
69
|
-
.tm-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
.tm-
|
|
73
|
-
.tm-
|
|
74
|
-
.tm-
|
|
75
|
-
|
|
80
|
+
::selection { background: var(--tm-route-wash); color: var(--tm-ink); }
|
|
81
|
+
h1, h2, h3, h4 { color: var(--tm-ink); font-weight: 600; text-wrap: balance; }
|
|
82
|
+
ul, ol { padding-left: 1.3em; max-width: 68ch; }
|
|
83
|
+
li { margin: 0.2em 0; }
|
|
84
|
+
li::marker { color: var(--tm-pencil); }
|
|
85
|
+
hr { border: 0; border-top: 1px solid var(--tm-rule); margin: 40px 0; }
|
|
86
|
+
|
|
87
|
+
/* ---------- page ---------- */
|
|
88
|
+
.tm-page { max-width: 960px; margin: 0 auto; padding: 48px 48px 112px; }
|
|
89
|
+
.tm-header { margin-bottom: 8px; }
|
|
90
|
+
.tm-crumb, .tm-eyebrow { font-size: 13.5px; color: var(--tm-graphite); margin: 0 0 14px; }
|
|
91
|
+
.tm-crumb a { color: var(--tm-graphite); text-decoration-color: var(--tm-rule-strong); }
|
|
92
|
+
.tm-crumb a:hover { color: var(--tm-route); }
|
|
93
|
+
.tm-title { font-size: 36px; line-height: 1.15; letter-spacing: -0.018em; margin: 0 0 14px; max-width: 22ch; }
|
|
94
|
+
.tm-lede { font-size: 18.5px; line-height: 1.55; color: var(--tm-graphite); margin: 0; max-width: 60ch; }
|
|
95
|
+
.tm-lede strong { color: var(--tm-text); font-weight: 500; }
|
|
96
|
+
|
|
97
|
+
.tm-section { margin-top: 64px; }
|
|
98
|
+
.tm-section > h2, .tm-h2 { font-size: 22px; line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 8px; }
|
|
99
|
+
.tm-section > h2 + p { color: var(--tm-graphite); }
|
|
100
|
+
.tm-section h3 { font-size: 16.5px; line-height: 1.35; margin: 32px 0 8px; }
|
|
101
|
+
.tm-section > :last-child { margin-bottom: 0; }
|
|
76
102
|
.tm-muted { color: var(--tm-graphite); }
|
|
77
|
-
.tm-
|
|
78
|
-
.tm-small { font-size: 14px; }
|
|
79
|
-
.tm-stack > * + * { margin-top: 12px; }
|
|
80
|
-
|
|
81
|
-
/* ---------- layout ---------- */
|
|
82
|
-
.tm-grid { display: grid; gap: 20px 28px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
|
|
83
|
-
.tm-grid-2 { display: grid; gap: 20px 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
84
|
-
.tm-grid-3 { display: grid; gap: 20px 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
85
|
-
@media (max-width: 760px) { .tm-grid-2, .tm-grid-3 { grid-template-columns: minmax(0, 1fr); } }
|
|
86
|
-
.tm-grid > *, .tm-grid-2 > *, .tm-grid-3 > * { min-width: 0; }
|
|
87
|
-
|
|
88
|
-
/* A panel is for content that belongs together, not a wrapper for every paragraph. */
|
|
89
|
-
.tm-card { background: var(--tm-sheet); border: 1px solid var(--tm-rule); border-radius: var(--tm-radius); padding: 18px 20px; }
|
|
90
|
-
.tm-card > :last-child { margin-bottom: 0; }
|
|
91
|
-
.tm-card.is-key { border-color: var(--tm-route); }
|
|
103
|
+
.tm-small { font-size: 13.5px; }
|
|
92
104
|
|
|
93
|
-
/* ----------
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
.tm-
|
|
98
|
-
|
|
105
|
+
/* ---------- the map (blueprint) ---------- */
|
|
106
|
+
/* Rows are layers; boxes are real code. truemap draws the wires from data-to="id id". */
|
|
107
|
+
/* A map never wraps or stacks: when it is wider than the page it scrolls sideways, wires and all. */
|
|
108
|
+
/* The map may run wider than the text column, up to the right edge of the window. */
|
|
109
|
+
.tm-map, .tm-blueprint {
|
|
110
|
+
position: relative; margin: 20px 0 0; overflow-x: auto; overflow-y: hidden; padding: 10px 8px 14px 2px; scrollbar-width: thin;
|
|
111
|
+
width: 100%;
|
|
112
|
+
}
|
|
113
|
+
/* --tm-vw is the usable window width (without the scrollbar), set by truemap. */
|
|
114
|
+
html[style*="--tm-vw"] .tm-map, html[style*="--tm-vw"] .tm-blueprint { width: calc(var(--tm-vw) - max(48px, (var(--tm-vw) - 960px) / 2 + 48px) - 16px); min-width: 100%; }
|
|
115
|
+
.tm-map.tm-scrolls { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
|
|
116
|
+
.tm-layer { position: relative; display: grid; grid-template-columns: var(--tm-label-w, 112px) max-content; gap: 20px; align-items: start; width: max-content; min-width: 100%; }
|
|
117
|
+
.tm-layer + .tm-layer { margin-top: 44px; }
|
|
118
|
+
.tm-layer-label { font-size: 13px; color: var(--tm-pencil); padding-top: 12px; line-height: 1.35; }
|
|
119
|
+
.tm-layer-nodes { display: flex; flex-wrap: nowrap; gap: 18px 26px; }
|
|
120
|
+
.tm-layer-nodes > .tm-node { flex: 0 0 var(--tm-node-w, 216px); max-width: none; }
|
|
121
|
+
.tm-map > .tm-layer-nodes { margin-left: 132px; }
|
|
99
122
|
|
|
100
|
-
/* ---------- nodes: modules, services, steps ---------- */
|
|
101
123
|
.tm-node, .tm-step {
|
|
102
|
-
position: relative;
|
|
103
|
-
|
|
104
|
-
padding: 11px
|
|
105
|
-
background: var(--tm-sheet);
|
|
106
|
-
|
|
124
|
+
position: relative; z-index: 1;
|
|
125
|
+
display: flex; flex-direction: column; flex: 0 1 216px; min-width: 156px; max-width: 280px;
|
|
126
|
+
padding: 11px 26px 12px 14px;
|
|
127
|
+
background: var(--tm-sheet); color: var(--tm-text);
|
|
128
|
+
border: 1px solid var(--tm-rule-strong); border-radius: var(--tm-radius);
|
|
129
|
+
text-decoration: none; line-height: 1.4;
|
|
130
|
+
transition: border-color 120ms ease, box-shadow 120ms ease;
|
|
131
|
+
}
|
|
132
|
+
a.tm-node:hover, a.tm-step:hover { border-color: var(--tm-graphite); }
|
|
133
|
+
.tm-node-title, .tm-step > b, .tm-step > strong { font-size: 15px; font-weight: 600; color: var(--tm-ink); }
|
|
134
|
+
.tm-node-sub { font-family: var(--tm-code); font-size: 12px; color: var(--tm-pencil); margin-top: 2px; overflow-wrap: anywhere; }
|
|
135
|
+
.tm-node-desc { font-size: 13.5px; line-height: 1.45; color: var(--tm-graphite); margin-top: 7px; }
|
|
136
|
+
|
|
137
|
+
/* The survey mark: a box pinned to real code (data-src) carries a small triangle. */
|
|
138
|
+
.tm-node[data-src]::after, .tm-step[data-src]::after, .tm-card[data-src]::after {
|
|
139
|
+
content: ""; position: absolute; top: 11px; right: 11px; width: 8px; height: 7px;
|
|
140
|
+
background: var(--tm-pencil); clip-path: polygon(50% 0, 100% 100%, 0 100%);
|
|
107
141
|
}
|
|
108
|
-
.tm-node-
|
|
109
|
-
.tm-node-
|
|
110
|
-
.tm-node-
|
|
111
|
-
|
|
112
|
-
.tm-node.is-
|
|
142
|
+
.tm-node.is-key, .tm-step.is-key { border-color: var(--tm-route); box-shadow: inset 0 0 0 1px var(--tm-route); }
|
|
143
|
+
.tm-node.is-key .tm-node-title, .tm-step.is-key > b, .tm-step.is-key > strong { color: var(--tm-route-ink); }
|
|
144
|
+
.tm-node.is-key::after, .tm-step.is-key::after { background: var(--tm-route); }
|
|
145
|
+
.tm-node.is-ext, .tm-step.is-ext { background: transparent; border-style: dashed; }
|
|
146
|
+
.tm-node.is-ext .tm-node-title, .tm-step.is-ext > b { color: var(--tm-graphite); font-weight: 500; }
|
|
113
147
|
.tm-node.is-new, .tm-step.is-new { border-color: var(--tm-fine); }
|
|
114
148
|
.tm-node.is-risk, .tm-step.is-risk { border-color: var(--tm-changed); }
|
|
115
|
-
.tm-node.is-ext, .tm-step.is-ext { border-style: dashed; background: transparent; }
|
|
116
149
|
|
|
117
|
-
/*
|
|
118
|
-
.tm-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
150
|
+
/* Wires (drawn by truemap into svg.tm-wires) */
|
|
151
|
+
.tm-wires { position: absolute; top: 0; left: 0; max-width: none; pointer-events: none; overflow: visible; z-index: 0; }
|
|
152
|
+
.tm-wire { fill: none; stroke: var(--tm-rule-strong); stroke-width: 1.5; }
|
|
153
|
+
.tm-wire.is-key { stroke: var(--tm-route); stroke-width: 2; }
|
|
154
|
+
.tm-wire.is-ext { stroke-dasharray: 4 4; }
|
|
155
|
+
.tm-wire-head { fill: var(--tm-rule-strong); }
|
|
156
|
+
.tm-wire-head.is-key { fill: var(--tm-route); }
|
|
157
|
+
.tm-wire-label { font: 500 11.5px var(--tm-font); fill: var(--tm-graphite); paint-order: stroke; stroke: var(--tm-paper); stroke-width: 4px; stroke-linejoin: round; }
|
|
158
|
+
|
|
159
|
+
/* Legend under a map */
|
|
160
|
+
.tm-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 22px 0 0 132px; font-size: 13px; color: var(--tm-graphite); }
|
|
161
|
+
.tm-legend span { display: inline-flex; align-items: center; gap: 8px; }
|
|
162
|
+
.tm-legend i { display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--tm-route); }
|
|
163
|
+
.tm-legend i.is-wire { border-top: 1.5px solid var(--tm-rule-strong); }
|
|
164
|
+
.tm-legend i.is-ext { border-top: 1.5px dashed var(--tm-rule-strong); }
|
|
165
|
+
.tm-legend i.is-mark { width: 8px; height: 7px; border: 0; background: var(--tm-pencil); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
|
|
122
166
|
|
|
123
|
-
/* ----------
|
|
124
|
-
.tm-flow { display: flex;
|
|
125
|
-
.tm-flow > .tm-
|
|
126
|
-
.tm-flow >
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
content: ""; position: absolute; left: -9px; top: calc(50% - 4px);
|
|
130
|
-
border: 4px solid transparent; border-left: 6px solid var(--tm-graphite); border-right: 0;
|
|
167
|
+
/* ---------- flow: a real sequence ---------- */
|
|
168
|
+
.tm-flow { display: flex; align-items: stretch; gap: 30px; margin: 24px 0 8px; overflow-x: auto; padding: 2px 2px 6px; }
|
|
169
|
+
.tm-flow > .tm-step { flex: 1 1 0; min-width: 132px; max-width: none; }
|
|
170
|
+
.tm-flow > .tm-step + .tm-step::before {
|
|
171
|
+
content: ""; position: absolute; left: -26px; top: 50%; width: 21px; height: 0;
|
|
172
|
+
border-top: 1.5px solid var(--tm-rule-strong);
|
|
131
173
|
}
|
|
132
|
-
.tm-flow.
|
|
133
|
-
|
|
134
|
-
.tm-flow.is-vertical > * + * { margin: 24px 0 0; }
|
|
135
|
-
.tm-flow.is-vertical > * + *::before { left: 28px; top: -20px; width: 1px; height: 14px; }
|
|
136
|
-
.tm-flow.is-vertical > * + *::after { left: 24px; top: -9px; border: 4px solid transparent; border-top: 6px solid var(--tm-graphite); border-bottom: 0; }
|
|
137
|
-
@media (max-width: 640px) {
|
|
138
|
-
.tm-flow { flex-direction: column; }
|
|
139
|
-
.tm-flow > *, .tm-flow > .tm-node, .tm-flow > .tm-step { flex: none; }
|
|
140
|
-
.tm-flow > * + * { margin: 24px 0 0; }
|
|
141
|
-
.tm-flow > * + *::before { left: 28px; top: -20px; width: 1px; height: 14px; }
|
|
142
|
-
.tm-flow > * + *::after { left: 24px; top: -9px; border: 4px solid transparent; border-top: 6px solid var(--tm-graphite); border-bottom: 0; }
|
|
174
|
+
.tm-flow > .tm-step + .tm-step > :first-child::before {
|
|
175
|
+
content: ""; position: absolute; left: -8px; top: calc(50% - 4px); border: 4px solid transparent; border-left: 5px solid var(--tm-rule-strong); border-right: 0;
|
|
143
176
|
}
|
|
177
|
+
.tm-flow > .tm-step.is-key + .tm-step.is-key::before { border-top: 2px solid var(--tm-route); }
|
|
178
|
+
.tm-flow > .tm-step.is-key + .tm-step.is-key > :first-child::before { border-left-color: var(--tm-route); }
|
|
179
|
+
.tm-flow.is-vertical { flex-direction: column; gap: 26px; max-width: 420px; overflow: visible; }
|
|
180
|
+
.tm-flow.is-vertical > .tm-step { flex: none; }
|
|
181
|
+
.tm-flow.is-vertical > .tm-step + .tm-step::before { left: 50%; top: -22px; width: 0; height: 18px; border-top: 0; border-left: 1.5px solid var(--tm-rule-strong); }
|
|
182
|
+
.tm-flow.is-vertical > .tm-step + .tm-step > :first-child::before { left: calc(50% - 4px); top: -8px; border: 4px solid transparent; border-top: 5px solid var(--tm-rule-strong); border-bottom: 0; }
|
|
144
183
|
|
|
145
|
-
/* ----------
|
|
146
|
-
.tm-
|
|
147
|
-
.tm-
|
|
148
|
-
.tm-
|
|
149
|
-
.tm-
|
|
150
|
-
.tm-
|
|
151
|
-
.tm-
|
|
152
|
-
.tm-
|
|
153
|
-
|
|
154
|
-
.tm-
|
|
155
|
-
|
|
156
|
-
/* ---------- page index (on the blueprint) ---------- */
|
|
157
|
-
.tm-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); border-top: 1px solid var(--tm-rule); column-gap: 32px; }
|
|
158
|
-
.tm-link { display: block; padding: 14px 0; border-bottom: 1px solid var(--tm-rule); text-decoration: none; color: inherit; }
|
|
159
|
-
.tm-link strong { display: block; font-weight: 620; color: var(--tm-route); }
|
|
160
|
-
.tm-link:hover strong { text-decoration: underline; text-underline-offset: 3px; }
|
|
161
|
-
.tm-link span { display: block; margin-top: 2px; font-size: 14px; color: var(--tm-graphite); }
|
|
162
|
-
|
|
163
|
-
/* ---------- tags, code ---------- */
|
|
164
|
-
.tm-badge {
|
|
165
|
-
display: inline-block; padding: 0 6px; border-radius: 3px; vertical-align: 1px;
|
|
166
|
-
font-size: 12.5px; line-height: 20px; font-weight: 560; color: var(--tm-graphite); background: var(--tm-wash);
|
|
167
|
-
}
|
|
168
|
-
.tm-badge.is-accent { color: var(--tm-route); background: var(--tm-route-wash); }
|
|
169
|
-
.tm-badge.is-ok { color: var(--tm-fine); background: color-mix(in srgb, var(--tm-fine) 12%, transparent); }
|
|
170
|
-
.tm-badge.is-warn { color: var(--tm-changed); background: color-mix(in srgb, var(--tm-changed) 13%, transparent); }
|
|
171
|
-
.tm-badge.is-bad { color: var(--tm-broken); background: color-mix(in srgb, var(--tm-broken) 11%, transparent); }
|
|
172
|
-
.tm-path, code { font-family: var(--tm-code); font-size: .88em; padding: 1px 4px; border-radius: 3px; background: var(--tm-wash); overflow-wrap: anywhere; }
|
|
173
|
-
pre { margin: 14px 0; padding: 14px 16px; overflow: auto; border-radius: var(--tm-radius); font: 13.5px/1.6 var(--tm-code); background: var(--tm-wash); }
|
|
174
|
-
pre code { padding: 0; background: none; font-size: inherit; }
|
|
175
|
-
|
|
176
|
-
/* ---------- notes (risk, decision, fact) ---------- */
|
|
177
|
-
.tm-callout { margin: 16px 0; padding: 14px 16px; border-radius: var(--tm-radius); background: var(--tm-sheet); border: 1px solid var(--tm-rule); max-width: 76ch; }
|
|
178
|
-
.tm-callout > :first-child { margin-top: 0; } .tm-callout > :last-child { margin-bottom: 0; }
|
|
184
|
+
/* ---------- panels ---------- */
|
|
185
|
+
.tm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 20px 0; }
|
|
186
|
+
.tm-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
187
|
+
.tm-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
188
|
+
.tm-card { position: relative; background: var(--tm-sheet); border: 1px solid var(--tm-rule); border-radius: var(--tm-radius); padding: 18px 20px; min-width: 0; }
|
|
189
|
+
.tm-card > h3 { margin: 0 0 6px; font-size: 15.5px; }
|
|
190
|
+
.tm-card > p { color: var(--tm-graphite); font-size: 14.5px; }
|
|
191
|
+
.tm-card > :last-child { margin-bottom: 0; }
|
|
192
|
+
|
|
193
|
+
.tm-callout { margin: 22px 0; padding: 14px 18px; border-radius: var(--tm-radius); background: var(--tm-wash); color: var(--tm-text); max-width: 72ch; }
|
|
194
|
+
.tm-callout > :last-child { margin-bottom: 0; }
|
|
179
195
|
.tm-callout > b:first-child, .tm-callout > strong:first-child { color: var(--tm-ink); }
|
|
180
|
-
.tm-callout.is-accent {
|
|
181
|
-
.tm-callout.is-accent > b:first-child, .tm-callout.is-accent > strong:first-child { color: var(--tm-route); }
|
|
196
|
+
.tm-callout.is-accent { background: var(--tm-route-wash); }
|
|
197
|
+
.tm-callout.is-accent > b:first-child, .tm-callout.is-accent > strong:first-child { color: var(--tm-route-ink); }
|
|
198
|
+
.tm-callout.is-ok { background: var(--tm-fine-wash); }
|
|
182
199
|
.tm-callout.is-ok > b:first-child, .tm-callout.is-ok > strong:first-child { color: var(--tm-fine); }
|
|
183
|
-
.tm-callout.is-warn {
|
|
200
|
+
.tm-callout.is-warn { background: var(--tm-changed-wash); }
|
|
184
201
|
.tm-callout.is-warn > b:first-child, .tm-callout.is-warn > strong:first-child { color: var(--tm-changed); }
|
|
185
|
-
.tm-callout.is-bad {
|
|
202
|
+
.tm-callout.is-bad { background: var(--tm-broken-wash); }
|
|
186
203
|
.tm-callout.is-bad > b:first-child, .tm-callout.is-bad > strong:first-child { color: var(--tm-broken); }
|
|
187
204
|
|
|
188
|
-
/* ----------
|
|
189
|
-
.tm-
|
|
190
|
-
.tm-
|
|
191
|
-
.tm-
|
|
192
|
-
.tm-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
.tm-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
.tm-
|
|
199
|
-
.tm-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
.tm-
|
|
205
|
-
|
|
206
|
-
.tm-
|
|
207
|
-
.tm-
|
|
208
|
-
|
|
209
|
-
|
|
205
|
+
/* ---------- page links (on the blueprint) ---------- */
|
|
206
|
+
.tm-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 28px; margin: 18px 0; border-top: 1px solid var(--tm-rule); }
|
|
207
|
+
.tm-link { display: block; padding: 14px 0 15px; border-bottom: 1px solid var(--tm-rule); text-decoration: none; color: var(--tm-graphite); font-size: 14px; line-height: 1.45; }
|
|
208
|
+
.tm-link strong { display: block; font-size: 15.5px; color: var(--tm-ink); margin-bottom: 3px; }
|
|
209
|
+
.tm-link:hover strong { color: var(--tm-route); }
|
|
210
|
+
|
|
211
|
+
/* ---------- small things ---------- */
|
|
212
|
+
.tm-badge { display: inline-block; vertical-align: 0.1em; font: 500 11.5px/1.5 var(--tm-font); padding: 0 6px; border-radius: 4px; background: var(--tm-wash); color: var(--tm-graphite); white-space: nowrap; }
|
|
213
|
+
.tm-badge.is-accent { background: var(--tm-route-wash); color: var(--tm-route-ink); }
|
|
214
|
+
.tm-badge.is-ok { background: var(--tm-fine-wash); color: var(--tm-fine); }
|
|
215
|
+
.tm-badge.is-warn { background: var(--tm-changed-wash); color: var(--tm-changed); }
|
|
216
|
+
.tm-badge.is-bad { background: var(--tm-broken-wash); color: var(--tm-broken); }
|
|
217
|
+
|
|
218
|
+
code, kbd, samp { font-family: var(--tm-code); font-size: 0.88em; }
|
|
219
|
+
:not(pre) > code { background: var(--tm-wash); color: var(--tm-ink); padding: 1px 5px; border-radius: 4px; }
|
|
220
|
+
pre { font-family: var(--tm-code); font-size: 13px; line-height: 1.6; background: var(--tm-sheet); color: var(--tm-text); border: 1px solid var(--tm-rule); border-radius: var(--tm-radius); padding: 14px 16px; overflow-x: auto; margin: 18px 0; max-width: 100%; }
|
|
221
|
+
.tm-path { font-family: var(--tm-code); font-size: 12.5px; color: var(--tm-graphite); }
|
|
222
|
+
|
|
223
|
+
.tm-steps { list-style: none; counter-reset: tm-step; padding: 0; margin: 18px 0; max-width: 68ch; }
|
|
224
|
+
.tm-steps > li { counter-increment: tm-step; position: relative; padding: 0 0 14px 36px; margin: 0; }
|
|
225
|
+
.tm-steps > li::before {
|
|
226
|
+
content: counter(tm-step); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
|
|
227
|
+
border: 1px solid var(--tm-rule-strong); color: var(--tm-graphite); font: 500 12px/20px var(--tm-code); text-align: center; background: var(--tm-sheet);
|
|
210
228
|
}
|
|
229
|
+
.tm-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; border-left: 1px solid var(--tm-rule); }
|
|
230
|
+
|
|
231
|
+
.tm-table-wrap { overflow-x: auto; margin: 20px 0; }
|
|
232
|
+
.tm-table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
|
|
233
|
+
.tm-table th { text-align: left; font-weight: 500; font-size: 13px; color: var(--tm-graphite); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--tm-rule-strong); }
|
|
234
|
+
.tm-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--tm-rule); vertical-align: top; }
|
|
235
|
+
.tm-table tr:last-child td { border-bottom: 0; }
|
|
236
|
+
|
|
237
|
+
.tm-kv { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); gap: 8px 24px; margin: 18px 0; font-size: 14.5px; }
|
|
238
|
+
.tm-kv dt { color: var(--tm-graphite); }
|
|
239
|
+
.tm-kv dd { margin: 0; color: var(--tm-text); }
|
|
240
|
+
|
|
241
|
+
/* ---------- custom diagrams ---------- */
|
|
242
|
+
.tm-svg { display: block; width: 100%; height: auto; margin: 24px 0; font-family: var(--tm-font); }
|
|
243
|
+
.tm-svg .tm-box { fill: var(--tm-sheet); stroke: var(--tm-rule-strong); stroke-width: 1; }
|
|
244
|
+
.tm-svg .tm-box.is-key { stroke: var(--tm-route); stroke-width: 2; }
|
|
245
|
+
.tm-svg .tm-edge { fill: none; stroke: var(--tm-rule-strong); stroke-width: 1.5; }
|
|
246
|
+
.tm-svg .tm-edge.is-key { stroke: var(--tm-route); stroke-width: 2; }
|
|
247
|
+
.tm-svg .tm-label { fill: var(--tm-ink); font-size: 14px; font-weight: 600; }
|
|
248
|
+
.tm-svg .tm-sub { fill: var(--tm-pencil); font-size: 12px; font-family: var(--tm-code); }
|
|
249
|
+
|
|
250
|
+
/* ---------- decisions ---------- */
|
|
251
|
+
.tm-ask { margin: 28px 0; padding: 22px 24px 24px; background: var(--tm-sheet); border: 1px solid var(--tm-rule-strong); border-radius: calc(var(--tm-radius) + 2px); max-width: 720px; }
|
|
252
|
+
.tm-ask > h3 { margin: 0 0 6px; font-size: 18px; }
|
|
253
|
+
.tm-ask > p { color: var(--tm-graphite); font-size: 14.5px; }
|
|
254
|
+
.tm-options { display: grid; gap: 10px; margin: 16px 0; }
|
|
255
|
+
.tm-option { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 12px; padding: 13px 16px; border: 1px solid var(--tm-rule); border-radius: var(--tm-radius); cursor: pointer; background: var(--tm-sheet); transition: border-color 120ms ease, background-color 120ms ease; }
|
|
211
256
|
.tm-option:hover { border-color: var(--tm-rule-strong); }
|
|
257
|
+
.tm-option input { grid-row: 1 / span 2; margin: 3px 0 0; accent-color: var(--tm-route); width: 16px; height: 16px; }
|
|
258
|
+
.tm-option strong { font-size: 15px; }
|
|
259
|
+
.tm-option .tm-why { grid-column: 2; font-size: 13.5px; color: var(--tm-graphite); margin-top: 2px; }
|
|
212
260
|
.tm-option:has(input:checked) { border-color: var(--tm-route); background: var(--tm-route-wash); }
|
|
213
|
-
.tm-
|
|
214
|
-
.tm-
|
|
215
|
-
.tm-
|
|
216
|
-
.tm-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
261
|
+
.tm-ask textarea { width: 100%; min-height: 64px; resize: vertical; font: 14.5px/1.5 var(--tm-font); color: var(--tm-text); background: var(--tm-paper); border: 1px solid var(--tm-rule); border-radius: var(--tm-radius); padding: 10px 12px; }
|
|
262
|
+
.tm-ask textarea:focus { outline: none; border-color: var(--tm-route); }
|
|
263
|
+
.tm-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font: 500 14.5px/1 var(--tm-font); padding: 11px 18px; border-radius: var(--tm-radius); border: 1px solid var(--tm-action); background: var(--tm-action); color: #fff; cursor: pointer; }
|
|
264
|
+
.tm-btn:hover { filter: brightness(0.92); }
|
|
265
|
+
.tm-btn.is-quiet { background: transparent; color: var(--tm-route); }
|
|
266
|
+
[data-tm-sent] .tm-btn { background: var(--tm-wash); border-color: var(--tm-rule); color: var(--tm-graphite); cursor: default; }
|
|
267
|
+
[data-tm-sent] .tm-option { cursor: default; }
|
|
268
|
+
|
|
269
|
+
/* ---------- small screens ---------- */
|
|
270
|
+
@media (max-width: 720px) {
|
|
271
|
+
.tm-page { padding: 28px 18px 80px; }
|
|
272
|
+
.tm-title { font-size: 28px; }
|
|
273
|
+
.tm-lede { font-size: 17px; }
|
|
274
|
+
.tm-section { margin-top: 48px; }
|
|
275
|
+
.tm-map { --tm-label-w: 72px; --tm-node-w: 184px; }
|
|
276
|
+
html[style*="--tm-vw"] .tm-map, html[style*="--tm-vw"] .tm-blueprint { width: calc(var(--tm-vw) - 26px); }
|
|
277
|
+
.tm-layer { gap: 12px; }
|
|
278
|
+
.tm-legend { margin-left: 0; }
|
|
279
|
+
.tm-node { flex: 1 1 100%; max-width: none; }
|
|
280
|
+
.tm-grid-2, .tm-grid-3 { grid-template-columns: minmax(0, 1fr); }
|
|
281
|
+
.tm-flow:not(.is-vertical) { flex-direction: column; gap: 26px; overflow: visible; }
|
|
282
|
+
.tm-flow:not(.is-vertical) > .tm-step { flex: none; }
|
|
283
|
+
.tm-flow:not(.is-vertical) > .tm-step + .tm-step::before { left: 50%; top: -22px; width: 0; height: 18px; border-top: 0; border-left: 1.5px solid var(--tm-rule-strong); }
|
|
284
|
+
.tm-flow:not(.is-vertical) > .tm-step + .tm-step > :first-child::before { left: calc(50% - 4px); top: -8px; border: 4px solid transparent; border-top: 5px solid var(--tm-rule-strong); border-bottom: 0; }
|
|
223
285
|
}
|
|
224
|
-
.tm-btn:hover { background: color-mix(in srgb, var(--tm-ink) 86%, var(--tm-route)); }
|
|
225
|
-
.tm-btn.is-ghost { background: transparent; color: var(--tm-ink); border-color: var(--tm-rule-strong); }
|
|
226
|
-
.tm-ask[data-tm-sent] { border-color: var(--tm-fine); }
|
|
227
|
-
.tm-ask[data-tm-sent] .tm-btn { background: var(--tm-fine); border-color: var(--tm-fine); }
|
|
228
286
|
|
|
229
|
-
@media
|
|
230
|
-
|
|
287
|
+
@media print {
|
|
288
|
+
body { background: #fff; }
|
|
289
|
+
.tm-page { padding: 0; }
|
|
290
|
+
}
|
package/package.json
CHANGED
package/skills/truemap/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: truemap
|
|
3
|
-
description: Explain a codebase with living HTML
|
|
3
|
+
description: Explain a codebase with a living map in HTML that the user can comment on, ask about, and decide on. Use when explaining architecture, a module, a flow, or a data model; when comparing options or needing the user to decide; when asked "how does X work" or "show me the project"; and whenever a .truemap/ folder exists and you are about to explain something it may already cover. Not for one-line answers.
|
|
4
4
|
allowed-tools: Bash(npx -y truemap-cli:*), Bash(npx truemap-cli:*), Bash(truemap:*)
|
|
5
5
|
license: MIT
|
|
6
6
|
---
|
|
@@ -12,9 +12,10 @@ Pages live in `.truemap/` at the repo root (`index.html` is the project blueprin
|
|
|
12
12
|
Current instructions live in the CLI – this file stays short so it never goes stale:
|
|
13
13
|
|
|
14
14
|
- `npx -y truemap-cli --help` – commands and the chat loop
|
|
15
|
-
- `npx -y truemap-cli
|
|
15
|
+
- `npx -y truemap-cli outline` – a fast repo outline for the first blueprint
|
|
16
|
+
- `npx -y truemap-cli guide` – how to write pages: the map, `data-src` anchors, page kit, decision forms
|
|
16
17
|
|
|
17
|
-
Flow: look in `.truemap/` first
|
|
18
|
+
Flow: look in `.truemap/` first, update or write the page, run `npx -y truemap-cli <page>` (add `--annotate` when you want the user's review), then follow the `next_step` it prints.
|
|
18
19
|
Always also give the user a 1–3 line answer in the terminal.
|
|
19
20
|
|
|
20
21
|
## Request
|