vantage-md 0.1.7 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/styles.css CHANGED
@@ -19,4 +19,244 @@
19
19
  background: rgb(59 130 246 / 0.16);
20
20
  }
21
21
 
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
+
22
262
  /* src/styles/index.css */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vantage-md",
3
- "version": "0.1.7",
3
+ "version": "0.5.4",
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",
@@ -37,7 +37,10 @@
37
37
  "build": "tsup",
38
38
  "dev": "tsup --watch",
39
39
  "typecheck": "tsc --noEmit",
40
- "prepublishOnly": "npm run build"
40
+ "prepublishOnly": "npm run build",
41
+ "lint": "eslint . --max-warnings 0",
42
+ "format": "prettier --write 'src/**/*.{ts,tsx}' '*.{ts,js,json}'",
43
+ "format:check": "prettier --check 'src/**/*.{ts,tsx}' '*.{ts,js,json}'"
41
44
  },
42
45
  "keywords": [
43
46
  "markdown",
@@ -50,7 +53,7 @@
50
53
  "syntax-highlighting",
51
54
  "gfm"
52
55
  ],
53
- "license": "MIT",
56
+ "license": "Apache-2.0",
54
57
  "repository": {
55
58
  "type": "git",
56
59
  "url": "https://github.com/mschulkind-oss/vantage",
@@ -73,7 +76,7 @@
73
76
  }
74
77
  },
75
78
  "dependencies": {
76
- "katex": "^0.16.33",
79
+ "katex": "^0.18.0",
77
80
  "rehype-highlight": "^7.0.2",
78
81
  "rehype-katex": "^7.0.1",
79
82
  "rehype-raw": "^7.0.0",
@@ -84,21 +87,28 @@
84
87
  "remark-math": "^6.0.0",
85
88
  "remark-parse": "^11.0.0",
86
89
  "remark-rehype": "^11.0.0",
87
- "smol-toml": "^1.6.1",
90
+ "smol-toml": "^1.7.0",
88
91
  "unified": "^11.0.0",
92
+ "unist-util-visit": "^5.1.0",
89
93
  "yaml": "^2.8.2"
90
94
  },
91
95
  "optionalDependencies": {
92
- "mermaid": "^11.12.2"
96
+ "mermaid": "^11.16.0"
93
97
  },
94
98
  "devDependencies": {
95
- "@types/hast": "^3.0.0",
99
+ "@eslint/js": "^10.0.1",
100
+ "@types/hast": "^3.0.5",
96
101
  "@types/react": "^19.2.5",
97
102
  "@types/react-dom": "^19.2.3",
103
+ "eslint": "^10.7.0",
104
+ "eslint-plugin-react-hooks": "^7.1.1",
105
+ "globals": "^16.5.0",
106
+ "prettier": "^3.8.1",
98
107
  "react": "^19.2.0",
99
108
  "react-dom": "^19.2.0",
100
109
  "react-markdown": "^10.1.0",
101
110
  "tsup": "^8.0.0",
102
- "typescript": "~5.9.3"
111
+ "typescript": "~6.0.3",
112
+ "typescript-eslint": "^8.63.0"
103
113
  }
104
114
  }