void-plugin-hono-jsx 0.1.0-rc.1 → 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/CHANGELOG.md +24 -0
- package/README.md +29 -23
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/plugins/hono-islands.d.ts.map +1 -1
- package/dist/plugins/hono-islands.js +11 -3
- package/dist/plugins/hono-islands.js.map +1 -1
- package/dist/plugins/hono-markdown.d.ts +3 -1
- package/dist/plugins/hono-markdown.d.ts.map +1 -1
- package/dist/plugins/hono-markdown.js +13 -6
- package/dist/plugins/hono-markdown.js.map +1 -1
- package/dist/plugins/markdown-compiler.d.ts +65 -2
- package/dist/plugins/markdown-compiler.d.ts.map +1 -1
- package/dist/plugins/markdown-compiler.js +54 -40
- package/dist/plugins/markdown-compiler.js.map +1 -1
- package/dist/plugins/markdown-copy.d.ts +3 -0
- package/dist/plugins/markdown-copy.d.ts.map +1 -0
- package/dist/plugins/markdown-copy.js +31 -0
- package/dist/plugins/markdown-copy.js.map +1 -0
- package/dist/plugins/markdown-features.d.ts +12 -0
- package/dist/plugins/markdown-features.d.ts.map +1 -0
- package/dist/plugins/markdown-features.js +56 -0
- package/dist/plugins/markdown-features.js.map +1 -0
- package/dist/theme/code.css +202 -0
- package/dist/theme/containers.css +125 -0
- package/dist/theme/content.css +4 -0
- package/dist/theme/index.css +7 -0
- package/dist/theme/prose.css +294 -0
- package/dist/theme/reset.css +100 -0
- package/package.json +20 -2
- package/src/plugins/hono-islands.ts +11 -3
- package/src/plugins/hono-markdown.ts +15 -8
- package/src/plugins/markdown-compiler.ts +46 -30
- package/src/plugins/markdown-copy.ts +30 -0
- package/src/plugins/markdown-features.ts +57 -0
- package/src/theme/code.css +202 -0
- package/src/theme/containers.css +125 -0
- package/src/theme/content.css +4 -0
- package/src/theme/index.css +7 -0
- package/src/theme/prose.css +294 -0
- package/src/theme/reset.css +100 -0
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
/* Void Markdown — Prose Typography */
|
|
2
|
+
|
|
3
|
+
.void-md {
|
|
4
|
+
--vmd-font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
|
|
5
|
+
--vmd-font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
|
|
6
|
+
--vmd-text: #1a1a2e;
|
|
7
|
+
--vmd-text-muted: #64748b;
|
|
8
|
+
--vmd-link: #2563eb;
|
|
9
|
+
--vmd-link-hover: #1d4ed8;
|
|
10
|
+
--vmd-border: #e2e8f0;
|
|
11
|
+
--vmd-bg-soft: #f8fafc;
|
|
12
|
+
--vmd-line-height: 1.75;
|
|
13
|
+
|
|
14
|
+
font-family: var(--vmd-font-body);
|
|
15
|
+
color: var(--vmd-text);
|
|
16
|
+
line-height: var(--vmd-line-height);
|
|
17
|
+
word-wrap: break-word;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@media (prefers-color-scheme: dark) {
|
|
21
|
+
:root:not([data-theme='light']) .void-md {
|
|
22
|
+
--vmd-text: #e2e8f0;
|
|
23
|
+
--vmd-text-muted: #94a3b8;
|
|
24
|
+
--vmd-link: #60a5fa;
|
|
25
|
+
--vmd-link-hover: #93bbfd;
|
|
26
|
+
--vmd-border: #334155;
|
|
27
|
+
--vmd-bg-soft: #1e293b;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:root[data-theme='dark'] .void-md {
|
|
32
|
+
--vmd-text: #e2e8f0;
|
|
33
|
+
--vmd-text-muted: #94a3b8;
|
|
34
|
+
--vmd-link: #60a5fa;
|
|
35
|
+
--vmd-link-hover: #93bbfd;
|
|
36
|
+
--vmd-border: #334155;
|
|
37
|
+
--vmd-bg-soft: #1e293b;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Headings */
|
|
41
|
+
.void-md h1,
|
|
42
|
+
.void-md h2,
|
|
43
|
+
.void-md h3,
|
|
44
|
+
.void-md h4,
|
|
45
|
+
.void-md h5,
|
|
46
|
+
.void-md h6 {
|
|
47
|
+
font-weight: 600;
|
|
48
|
+
line-height: 1.3;
|
|
49
|
+
margin-top: 1.5em;
|
|
50
|
+
margin-bottom: 0.5em;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.void-md h1 {
|
|
54
|
+
font-size: 2em;
|
|
55
|
+
margin-top: 0;
|
|
56
|
+
}
|
|
57
|
+
.void-md h2 {
|
|
58
|
+
font-size: 1.5em;
|
|
59
|
+
padding-bottom: 0.3em;
|
|
60
|
+
border-bottom: 1px solid var(--vmd-border);
|
|
61
|
+
}
|
|
62
|
+
.void-md h3 {
|
|
63
|
+
font-size: 1.25em;
|
|
64
|
+
}
|
|
65
|
+
.void-md h4 {
|
|
66
|
+
font-size: 1em;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Paragraphs */
|
|
70
|
+
.void-md p {
|
|
71
|
+
margin-top: 0;
|
|
72
|
+
margin-bottom: 1em;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Links */
|
|
76
|
+
.void-md a {
|
|
77
|
+
color: var(--vmd-link);
|
|
78
|
+
text-decoration: none;
|
|
79
|
+
font-weight: 500;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.void-md a:hover {
|
|
83
|
+
color: var(--vmd-link-hover);
|
|
84
|
+
text-decoration: underline;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Lists */
|
|
88
|
+
.void-md ul,
|
|
89
|
+
.void-md ol {
|
|
90
|
+
padding-left: 1.5em;
|
|
91
|
+
margin-top: 0;
|
|
92
|
+
margin-bottom: 1em;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.void-md li {
|
|
96
|
+
margin-bottom: 0.25em;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.void-md li > p {
|
|
100
|
+
margin-bottom: 0.5em;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Blockquotes */
|
|
104
|
+
.void-md blockquote {
|
|
105
|
+
margin: 0 0 1em;
|
|
106
|
+
padding: 0.5em 1em;
|
|
107
|
+
border-left: 4px solid var(--vmd-border);
|
|
108
|
+
color: var(--vmd-text-muted);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.void-md blockquote > :last-child {
|
|
112
|
+
margin-bottom: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Tables */
|
|
116
|
+
.void-md table {
|
|
117
|
+
width: 100%;
|
|
118
|
+
border-collapse: collapse;
|
|
119
|
+
margin-bottom: 1em;
|
|
120
|
+
display: block;
|
|
121
|
+
overflow-x: auto;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.void-md th,
|
|
125
|
+
.void-md td {
|
|
126
|
+
padding: 0.5em 1em;
|
|
127
|
+
border: 1px solid var(--vmd-border);
|
|
128
|
+
text-align: left;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.void-md th {
|
|
132
|
+
font-weight: 600;
|
|
133
|
+
background: var(--vmd-bg-soft);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Inline code */
|
|
137
|
+
.void-md :not(pre) > code {
|
|
138
|
+
font-family: var(--vmd-font-mono);
|
|
139
|
+
font-size: 0.875em;
|
|
140
|
+
padding: 0.15em 0.4em;
|
|
141
|
+
border-radius: 4px;
|
|
142
|
+
background: var(--vmd-bg-soft);
|
|
143
|
+
border: 1px solid var(--vmd-border);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* Horizontal rule */
|
|
147
|
+
.void-md hr {
|
|
148
|
+
border: none;
|
|
149
|
+
border-top: 1px solid var(--vmd-border);
|
|
150
|
+
margin: 2em 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Images */
|
|
154
|
+
.void-md img {
|
|
155
|
+
max-width: 100%;
|
|
156
|
+
height: auto;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Strong / emphasis */
|
|
160
|
+
.void-md strong {
|
|
161
|
+
font-weight: 600;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Anchor links */
|
|
165
|
+
.void-md .header-anchor {
|
|
166
|
+
float: left;
|
|
167
|
+
margin-left: -0.87em;
|
|
168
|
+
padding-right: 0.23em;
|
|
169
|
+
font-weight: 500;
|
|
170
|
+
opacity: 0;
|
|
171
|
+
transition: opacity 0.15s;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.void-md h1:hover .header-anchor,
|
|
175
|
+
.void-md h2:hover .header-anchor,
|
|
176
|
+
.void-md h3:hover .header-anchor,
|
|
177
|
+
.void-md h4:hover .header-anchor,
|
|
178
|
+
.void-md h5:hover .header-anchor,
|
|
179
|
+
.void-md h6:hover .header-anchor {
|
|
180
|
+
opacity: 1;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* Task lists */
|
|
184
|
+
.void-md ul.contains-task-list {
|
|
185
|
+
list-style: none;
|
|
186
|
+
padding-left: 0;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.void-md .task-list-item {
|
|
190
|
+
display: flex;
|
|
191
|
+
align-items: baseline;
|
|
192
|
+
gap: 0.5em;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.void-md .task-list-item input[type='checkbox'] {
|
|
196
|
+
margin: 0;
|
|
197
|
+
flex-shrink: 0;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* Nested task lists */
|
|
201
|
+
.void-md .task-list-item ul.contains-task-list {
|
|
202
|
+
margin-top: 0.25em;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* Keyboard input */
|
|
206
|
+
.void-md kbd {
|
|
207
|
+
font-family: var(--vmd-font-mono);
|
|
208
|
+
font-size: 0.875em;
|
|
209
|
+
padding: 0.1em 0.4em;
|
|
210
|
+
border-radius: 4px;
|
|
211
|
+
border: 1px solid var(--vmd-border);
|
|
212
|
+
box-shadow: 0 1px 0 var(--vmd-border);
|
|
213
|
+
background: var(--vmd-bg-soft);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Highlighted text */
|
|
217
|
+
.void-md mark {
|
|
218
|
+
background: rgba(234, 179, 8, 0.3);
|
|
219
|
+
padding: 0.1em 0.2em;
|
|
220
|
+
border-radius: 2px;
|
|
221
|
+
color: inherit;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* Definition lists */
|
|
225
|
+
.void-md dl {
|
|
226
|
+
margin-bottom: 1em;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.void-md dt {
|
|
230
|
+
font-weight: 600;
|
|
231
|
+
margin-top: 0.5em;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.void-md dd {
|
|
235
|
+
margin-left: 1.5em;
|
|
236
|
+
margin-bottom: 0.5em;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* Abbreviations */
|
|
240
|
+
.void-md abbr[title] {
|
|
241
|
+
text-decoration: underline dotted;
|
|
242
|
+
cursor: help;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* Subscript / Superscript */
|
|
246
|
+
.void-md sub,
|
|
247
|
+
.void-md sup {
|
|
248
|
+
font-size: 0.75em;
|
|
249
|
+
line-height: 0;
|
|
250
|
+
position: relative;
|
|
251
|
+
vertical-align: baseline;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.void-md sup {
|
|
255
|
+
top: -0.5em;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.void-md sub {
|
|
259
|
+
bottom: -0.25em;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* Footnotes */
|
|
263
|
+
.void-md section.footnotes {
|
|
264
|
+
margin-top: 2em;
|
|
265
|
+
padding-top: 1em;
|
|
266
|
+
border-top: 1px solid var(--vmd-border);
|
|
267
|
+
font-size: 0.875em;
|
|
268
|
+
color: var(--vmd-text-muted);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.void-md .footnote-ref a {
|
|
272
|
+
font-size: 0.75em;
|
|
273
|
+
vertical-align: super;
|
|
274
|
+
line-height: 0;
|
|
275
|
+
margin-left: 0.1em;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.void-md .footnote-backref {
|
|
279
|
+
font-family: initial;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/* Table of contents */
|
|
283
|
+
.void-md .table-of-contents {
|
|
284
|
+
margin-bottom: 1em;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.void-md .table-of-contents ul {
|
|
288
|
+
list-style: none;
|
|
289
|
+
padding-left: 1em;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.void-md .table-of-contents > ul {
|
|
293
|
+
padding-left: 0;
|
|
294
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/* Void Markdown — Reset & Baseline
|
|
2
|
+
*
|
|
3
|
+
* Opinionated modern reset for markdown-driven sites.
|
|
4
|
+
* Imported by index.css — not intended for standalone use.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* Box sizing */
|
|
8
|
+
*,
|
|
9
|
+
*::before,
|
|
10
|
+
*::after {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* Remove default margins */
|
|
15
|
+
* {
|
|
16
|
+
margin: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Document */
|
|
20
|
+
html {
|
|
21
|
+
line-height: 1.5;
|
|
22
|
+
-webkit-text-size-adjust: 100%;
|
|
23
|
+
-moz-tab-size: 4;
|
|
24
|
+
tab-size: 4;
|
|
25
|
+
scroll-behavior: smooth;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Body */
|
|
29
|
+
body {
|
|
30
|
+
min-height: 100dvh;
|
|
31
|
+
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
32
|
+
-webkit-font-smoothing: antialiased;
|
|
33
|
+
-moz-osx-font-smoothing: grayscale;
|
|
34
|
+
text-rendering: optimizeLegibility;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Typography */
|
|
38
|
+
h1,
|
|
39
|
+
h2,
|
|
40
|
+
h3,
|
|
41
|
+
h4,
|
|
42
|
+
h5,
|
|
43
|
+
h6 {
|
|
44
|
+
overflow-wrap: break-word;
|
|
45
|
+
text-wrap: balance;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
p {
|
|
49
|
+
overflow-wrap: break-word;
|
|
50
|
+
text-wrap: pretty;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Media */
|
|
54
|
+
img,
|
|
55
|
+
picture,
|
|
56
|
+
video,
|
|
57
|
+
canvas,
|
|
58
|
+
svg {
|
|
59
|
+
display: block;
|
|
60
|
+
max-width: 100%;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
img,
|
|
64
|
+
video {
|
|
65
|
+
height: auto;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Forms */
|
|
69
|
+
input,
|
|
70
|
+
button,
|
|
71
|
+
textarea,
|
|
72
|
+
select {
|
|
73
|
+
font: inherit;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Monospace */
|
|
77
|
+
code,
|
|
78
|
+
kbd,
|
|
79
|
+
samp,
|
|
80
|
+
pre {
|
|
81
|
+
font-family:
|
|
82
|
+
ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
|
|
83
|
+
font-size: 1em;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Links */
|
|
87
|
+
a {
|
|
88
|
+
color: inherit;
|
|
89
|
+
text-decoration: inherit;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Tables */
|
|
93
|
+
table {
|
|
94
|
+
border-collapse: collapse;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Horizontal rule */
|
|
98
|
+
hr {
|
|
99
|
+
border: none;
|
|
100
|
+
}
|