vantage-md 0.5.4 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/styles.css CHANGED
@@ -1,262 +1,16 @@
1
- /* src/styles/line-anchor.css */
2
- .line-anchor-highlight {
3
- background: rgb(59 130 246 / 0.08);
4
- border-left: 3px solid rgb(59 130 246 / 0.5);
5
- padding-left: 12px;
6
- border-radius: 4px;
7
- cursor: pointer;
8
- transition: background 0.2s;
9
- scroll-margin-top: 32px;
10
- }
11
- .line-anchor-highlight:hover {
12
- background: rgb(59 130 246 / 0.12);
13
- }
14
- .dark .line-anchor-highlight {
15
- background: rgb(59 130 246 / 0.1);
16
- border-left-color: rgb(96 165 250 / 0.5);
17
- }
18
- .dark .line-anchor-highlight:hover {
19
- background: rgb(59 130 246 / 0.16);
20
- }
1
+ /* vantage-md styles
2
+ *
3
+ * Import this file to get the line-anchor highlight styles, the theme layer for
4
+ * the `data-vantage-*` directive attributes, and the chrome chips
5
+ * (`FrontmatterDisplay`'s document status chip).
6
+ * Usage: import "vantage-md/styles";
7
+ *
8
+ * Both halves of the directive wiring are load-bearing. Without this re-export
9
+ * the published package and the package's own <MarkdownViewer> ship no
10
+ * directive CSS, while the app — which imports the same file by relative
11
+ * source path — looks perfect: a D5 break with no symptom where anyone would
12
+ * see it.
13
+ */
21
14
 
22
- /* src/styles/directives.css */
23
- :root {
24
- --vantage-tone-note-accent: #2563eb;
25
- --vantage-tone-note-wash: rgb(37 99 235 / 0.06);
26
- --vantage-tone-note-chip: rgb(37 99 235 / 0.12);
27
- --vantage-tone-note-ink: #1d4ed8;
28
- --vantage-tone-tip-accent: #15803d;
29
- --vantage-tone-tip-wash: rgb(22 163 74 / 0.06);
30
- --vantage-tone-tip-chip: rgb(22 163 74 / 0.12);
31
- --vantage-tone-tip-ink: #15803d;
32
- --vantage-tone-important-accent: #7c3aed;
33
- --vantage-tone-important-wash: rgb(124 58 237 / 0.06);
34
- --vantage-tone-important-chip: rgb(124 58 237 / 0.12);
35
- --vantage-tone-important-ink: #6d28d9;
36
- --vantage-tone-warning-accent: #b45309;
37
- --vantage-tone-warning-wash: rgb(245 158 11 / 0.07);
38
- --vantage-tone-warning-chip: rgb(245 158 11 / 0.14);
39
- --vantage-tone-warning-ink: #b45309;
40
- --vantage-tone-caution-accent: #dc2626;
41
- --vantage-tone-caution-wash: rgb(220 38 38 / 0.06);
42
- --vantage-tone-caution-chip: rgb(220 38 38 / 0.12);
43
- --vantage-tone-caution-ink: #b91c1c;
44
- --vantage-tone-muted-accent: #94a3b8;
45
- --vantage-tone-muted-wash: rgb(100 116 139 / 0.06);
46
- --vantage-tone-muted-chip: rgb(100 116 139 / 0.12);
47
- --vantage-tone-muted-ink: #475569;
48
- --vantage-tone-rule-width: 3px;
49
- --vantage-tone-rule-offset: 0.75rem;
50
- --vantage-tone-run-bleed: 2.5rem;
51
- }
52
- .dark {
53
- --vantage-tone-note-accent: #60a5fa;
54
- --vantage-tone-note-wash: rgb(96 165 250 / 0.1);
55
- --vantage-tone-note-chip: rgb(59 130 246 / 0.22);
56
- --vantage-tone-note-ink: #93c5fd;
57
- --vantage-tone-tip-accent: #4ade80;
58
- --vantage-tone-tip-wash: rgb(74 222 128 / 0.1);
59
- --vantage-tone-tip-chip: rgb(34 197 94 / 0.22);
60
- --vantage-tone-tip-ink: #86efac;
61
- --vantage-tone-important-accent: #a78bfa;
62
- --vantage-tone-important-wash: rgb(167 139 250 / 0.1);
63
- --vantage-tone-important-chip: rgb(139 92 246 / 0.22);
64
- --vantage-tone-important-ink: #c4b5fd;
65
- --vantage-tone-warning-accent: #fbbf24;
66
- --vantage-tone-warning-wash: rgb(245 158 11 / 0.1);
67
- --vantage-tone-warning-chip: rgb(245 158 11 / 0.18);
68
- --vantage-tone-warning-ink: #fcd34d;
69
- --vantage-tone-caution-accent: #f87171;
70
- --vantage-tone-caution-wash: rgb(248 113 113 / 0.1);
71
- --vantage-tone-caution-chip: rgb(239 68 68 / 0.2);
72
- --vantage-tone-caution-ink: #fca5a5;
73
- --vantage-tone-muted-accent: #64748b;
74
- --vantage-tone-muted-wash: rgb(148 163 184 / 0.08);
75
- --vantage-tone-muted-chip: rgb(148 163 184 / 0.22);
76
- --vantage-tone-muted-ink: #cbd5e1;
77
- }
78
- [data-vantage-tone=note] {
79
- --vantage-tone-accent: var(--vantage-tone-note-accent);
80
- --vantage-tone-wash: var(--vantage-tone-note-wash);
81
- --vantage-tone-chip: var(--vantage-tone-note-chip);
82
- --vantage-tone-ink: var(--vantage-tone-note-ink);
83
- }
84
- [data-vantage-tone=tip] {
85
- --vantage-tone-accent: var(--vantage-tone-tip-accent);
86
- --vantage-tone-wash: var(--vantage-tone-tip-wash);
87
- --vantage-tone-chip: var(--vantage-tone-tip-chip);
88
- --vantage-tone-ink: var(--vantage-tone-tip-ink);
89
- }
90
- [data-vantage-tone=important] {
91
- --vantage-tone-accent: var(--vantage-tone-important-accent);
92
- --vantage-tone-wash: var(--vantage-tone-important-wash);
93
- --vantage-tone-chip: var(--vantage-tone-important-chip);
94
- --vantage-tone-ink: var(--vantage-tone-important-ink);
95
- }
96
- [data-vantage-tone=warning] {
97
- --vantage-tone-accent: var(--vantage-tone-warning-accent);
98
- --vantage-tone-wash: var(--vantage-tone-warning-wash);
99
- --vantage-tone-chip: var(--vantage-tone-warning-chip);
100
- --vantage-tone-ink: var(--vantage-tone-warning-ink);
101
- }
102
- [data-vantage-tone=caution] {
103
- --vantage-tone-accent: var(--vantage-tone-caution-accent);
104
- --vantage-tone-wash: var(--vantage-tone-caution-wash);
105
- --vantage-tone-chip: var(--vantage-tone-caution-chip);
106
- --vantage-tone-ink: var(--vantage-tone-caution-ink);
107
- }
108
- [data-vantage-tone=muted] {
109
- --vantage-tone-accent: var(--vantage-tone-muted-accent);
110
- --vantage-tone-wash: var(--vantage-tone-muted-wash);
111
- --vantage-tone-chip: var(--vantage-tone-muted-chip);
112
- --vantage-tone-ink: var(--vantage-tone-muted-ink);
113
- }
114
- [data-vantage-tone] {
115
- position: relative;
116
- }
117
- [data-vantage-tone]::before {
118
- content: "";
119
- position: absolute;
120
- top: 0;
121
- bottom: 0;
122
- left: calc(var(--vantage-tone-heading-gutter, 0em) - var(--vantage-tone-rule-offset));
123
- width: var(--vantage-tone-rule-width);
124
- border-radius: var(--vantage-tone-rule-width);
125
- background-color: var(--vantage-tone-accent);
126
- pointer-events: none;
127
- }
128
- [data-vantage-tone]:is([data-vantage-run=middle], [data-vantage-run=end])::before {
129
- top: calc(-1 * var(--vantage-tone-run-bleed));
130
- }
131
- [data-vantage-tone]:is(pre, hr) {
132
- overflow: visible;
133
- }
134
- pre[data-vantage-tone] > code {
135
- display: block;
136
- overflow-x: auto;
137
- }
138
- hr[data-vantage-tone]:is([data-vantage-run=middle], [data-vantage-run=end])::before {
139
- top: -3.5em;
140
- }
141
- hr[data-vantage-tone]:is([data-vantage-run=start], [data-vantage-run=middle])::before {
142
- bottom: -3.5em;
143
- }
144
- [data-vantage-tone]:where([data-vantage-run=only]) {
145
- background-color: var(--vantage-tone-wash);
146
- border-radius: 4px;
147
- }
148
- [data-vantage-emphasis=strong] {
149
- --vantage-tone-rule-width: 4px;
150
- }
151
- [data-vantage-emphasis=strong]:not(:is(h1, h2, h3, h4, h5, h6, pre, table)) {
152
- font-weight: 500;
153
- }
154
- [data-vantage-emphasis=quiet] {
155
- --vantage-tone-rule-width: 2px;
156
- opacity: 0.72;
157
- }
158
- .vantage-chip,
159
- [data-vantage-badge]::after {
160
- display: inline-block;
161
- padding: 1px 8px;
162
- border-radius: 4px;
163
- font-family: inherit;
164
- font-size: var(--vantage-chip-size, 11px);
165
- font-weight: 600;
166
- line-height: 1.6;
167
- letter-spacing: 0.05em;
168
- text-transform: uppercase;
169
- white-space: nowrap;
170
- vertical-align: 0.12em;
171
- color: var(--vantage-chip-ink, var(--vantage-tone-muted-ink));
172
- background-color: var(--vantage-chip-wash, var(--vantage-tone-muted-chip));
173
- }
174
- [data-vantage-badge]::after {
175
- content: attr(data-vantage-badge);
176
- margin-left: 0.5em;
177
- font-weight: 600;
178
- --vantage-chip-size: clamp(10px, 0.5em, 12px);
179
- }
180
- [data-vantage-badge=wip]::after,
181
- .vantage-chip--note {
182
- --vantage-chip-ink: var(--vantage-tone-note-ink);
183
- --vantage-chip-wash: var(--vantage-tone-note-chip);
184
- }
185
- [data-vantage-badge=done]::after,
186
- .vantage-chip--tip {
187
- --vantage-chip-ink: var(--vantage-tone-tip-ink);
188
- --vantage-chip-wash: var(--vantage-tone-tip-chip);
189
- }
190
- [data-vantage-badge=stale]::after,
191
- .vantage-chip--warning {
192
- --vantage-chip-ink: var(--vantage-tone-warning-ink);
193
- --vantage-chip-wash: var(--vantage-tone-warning-chip);
194
- }
195
- [data-vantage-badge=blocked]::after,
196
- .vantage-chip--caution {
197
- --vantage-chip-ink: var(--vantage-tone-caution-ink);
198
- --vantage-chip-wash: var(--vantage-tone-caution-chip);
199
- }
200
- [data-vantage-badge=draft]::after,
201
- .vantage-chip--muted {
202
- --vantage-chip-ink: var(--vantage-tone-muted-ink);
203
- --vantage-chip-wash: var(--vantage-tone-muted-chip);
204
- }
205
- .vantage-chip--important {
206
- --vantage-chip-ink: var(--vantage-tone-important-ink);
207
- --vantage-chip-wash: var(--vantage-tone-important-chip);
208
- }
209
- .vantage-chrome {
210
- display: flex;
211
- align-items: center;
212
- gap: 0.5rem;
213
- margin-bottom: 0.75rem;
214
- }
215
- @media not print {
216
- [data-vantage-collapse-ready] [data-vantage-collapsed=true][data-vantage-collapse-armed] {
217
- display: none;
218
- }
219
- }
220
- .vantage-collapse-caret {
221
- display: inline-block;
222
- width: 1em;
223
- margin: 0 0.15em 0 0;
224
- padding: 0;
225
- border: 0;
226
- background-color: transparent;
227
- color: var(--vantage-tone-muted-accent);
228
- font-size: 0.7em;
229
- line-height: 1;
230
- vertical-align: 0.15em;
231
- cursor: pointer;
232
- transition: transform 0.15s;
233
- }
234
- .vantage-collapse-caret::before {
235
- content: "\25be";
236
- }
237
- [data-vantage-collapse-toggle] .vantage-collapse-caret[aria-expanded=false] {
238
- transform: rotate(-90deg);
239
- }
240
- @media print {
241
- [data-vantage-tone]::before {
242
- background-color: #57606a;
243
- }
244
- [data-vantage-tone]:where([data-vantage-run=only]) {
245
- background-color: transparent;
246
- }
247
- [data-vantage-emphasis=quiet] {
248
- opacity: 1;
249
- }
250
- .vantage-chip,
251
- [data-vantage-badge]::after {
252
- padding: 0 6px;
253
- border: 1px solid #57606a;
254
- background-color: transparent;
255
- color: #1a1a1a;
256
- }
257
- .vantage-collapse-caret {
258
- display: none;
259
- }
260
- }
261
-
262
- /* src/styles/index.css */
15
+ @import "./line-anchor.css";
16
+ @import "./directives.css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vantage-md",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "description": "Markdown rendering pipeline with GitHub-style line anchors, mermaid diagrams, KaTeX math, and syntax highlighting",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -34,8 +34,8 @@
34
34
  "dist"
35
35
  ],
36
36
  "scripts": {
37
- "build": "tsup",
38
- "dev": "tsup --watch",
37
+ "build": "tsdown",
38
+ "dev": "tsdown --watch",
39
39
  "typecheck": "tsc --noEmit",
40
40
  "prepublishOnly": "npm run build",
41
41
  "lint": "eslint . --max-warnings 0",
@@ -76,7 +76,7 @@
76
76
  }
77
77
  },
78
78
  "dependencies": {
79
- "katex": "^0.18.0",
79
+ "katex": "^0.18.4",
80
80
  "rehype-highlight": "^7.0.2",
81
81
  "rehype-katex": "^7.0.1",
82
82
  "rehype-raw": "^7.0.0",
@@ -93,7 +93,7 @@
93
93
  "yaml": "^2.8.2"
94
94
  },
95
95
  "optionalDependencies": {
96
- "mermaid": "^11.16.0"
96
+ "mermaid": "^11.17.2"
97
97
  },
98
98
  "devDependencies": {
99
99
  "@eslint/js": "^10.0.1",
@@ -102,12 +102,12 @@
102
102
  "@types/react-dom": "^19.2.3",
103
103
  "eslint": "^10.7.0",
104
104
  "eslint-plugin-react-hooks": "^7.1.1",
105
- "globals": "^16.5.0",
105
+ "globals": "^17.11.0",
106
106
  "prettier": "^3.8.1",
107
107
  "react": "^19.2.0",
108
108
  "react-dom": "^19.2.0",
109
109
  "react-markdown": "^10.1.0",
110
- "tsup": "^8.0.0",
110
+ "tsdown": "^0.22.14",
111
111
  "typescript": "~6.0.3",
112
112
  "typescript-eslint": "^8.63.0"
113
113
  }