@smoothstream/vue 0.1.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/LICENSE +21 -0
- package/README.md +33 -0
- package/dist/base.css +349 -0
- package/dist/index.d.ts +112 -0
- package/dist/index.js +706 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +617 -0
- package/package.json +54 -0
package/dist/styles.css
ADDED
|
@@ -0,0 +1,617 @@
|
|
|
1
|
+
@property --smoothstream-h1-margin-block-start {
|
|
2
|
+
syntax: "<length>";
|
|
3
|
+
inherits: true;
|
|
4
|
+
initial-value: 0px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@property --smoothstream-h1-margin-block-end {
|
|
8
|
+
syntax: "<length>";
|
|
9
|
+
inherits: true;
|
|
10
|
+
initial-value: 0px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@property --smoothstream-h2-margin-block-start {
|
|
14
|
+
syntax: "<length>";
|
|
15
|
+
inherits: true;
|
|
16
|
+
initial-value: 0px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@property --smoothstream-h2-margin-block-end {
|
|
20
|
+
syntax: "<length>";
|
|
21
|
+
inherits: true;
|
|
22
|
+
initial-value: 0px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@property --smoothstream-h3-margin-block-start {
|
|
26
|
+
syntax: "<length>";
|
|
27
|
+
inherits: true;
|
|
28
|
+
initial-value: 0px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@property --smoothstream-h3-margin-block-end {
|
|
32
|
+
syntax: "<length>";
|
|
33
|
+
inherits: true;
|
|
34
|
+
initial-value: 0px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@property --smoothstream-h4-margin-block-start {
|
|
38
|
+
syntax: "<length>";
|
|
39
|
+
inherits: true;
|
|
40
|
+
initial-value: 0px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@property --smoothstream-h4-margin-block-end {
|
|
44
|
+
syntax: "<length>";
|
|
45
|
+
inherits: true;
|
|
46
|
+
initial-value: 0px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@property --smoothstream-h5-margin-block-start {
|
|
50
|
+
syntax: "<length>";
|
|
51
|
+
inherits: true;
|
|
52
|
+
initial-value: 0px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@property --smoothstream-h5-margin-block-end {
|
|
56
|
+
syntax: "<length>";
|
|
57
|
+
inherits: true;
|
|
58
|
+
initial-value: 0px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@property --smoothstream-h6-margin-block-start {
|
|
62
|
+
syntax: "<length>";
|
|
63
|
+
inherits: true;
|
|
64
|
+
initial-value: 0px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@property --smoothstream-h6-margin-block-end {
|
|
68
|
+
syntax: "<length>";
|
|
69
|
+
inherits: true;
|
|
70
|
+
initial-value: 0px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:where([data-smoothstream-theme="default"]) {
|
|
74
|
+
--smoothstream-foreground: currentColor;
|
|
75
|
+
--smoothstream-body-color: var(--smoothstream-foreground);
|
|
76
|
+
--smoothstream-heading-color: var(--smoothstream-foreground);
|
|
77
|
+
--smoothstream-link-color: var(--smoothstream-foreground);
|
|
78
|
+
--smoothstream-strong-color: var(--smoothstream-foreground);
|
|
79
|
+
--smoothstream-muted-color: color-mix(
|
|
80
|
+
in srgb,
|
|
81
|
+
var(--smoothstream-foreground) 61%,
|
|
82
|
+
transparent
|
|
83
|
+
);
|
|
84
|
+
--smoothstream-counter-color: var(--smoothstream-body-color);
|
|
85
|
+
--smoothstream-bullet-color: var(--smoothstream-body-color);
|
|
86
|
+
--smoothstream-task-size: 1rem;
|
|
87
|
+
--smoothstream-task-offset: -1px;
|
|
88
|
+
--smoothstream-task-border-color: color-mix(
|
|
89
|
+
in srgb,
|
|
90
|
+
var(--smoothstream-foreground) 24%,
|
|
91
|
+
transparent
|
|
92
|
+
);
|
|
93
|
+
--smoothstream-task-border-radius: 0.25rem;
|
|
94
|
+
--smoothstream-task-checked-background: var(--smoothstream-foreground);
|
|
95
|
+
--smoothstream-task-check-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.75 8.25 6.5 11 12.25 5.25' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
96
|
+
--smoothstream-border-color: color-mix(
|
|
97
|
+
in srgb,
|
|
98
|
+
var(--smoothstream-foreground) 8%,
|
|
99
|
+
transparent
|
|
100
|
+
);
|
|
101
|
+
--smoothstream-quote-border-color: var(--smoothstream-border-color);
|
|
102
|
+
--smoothstream-inline-code-color: color-mix(
|
|
103
|
+
in srgb,
|
|
104
|
+
var(--smoothstream-foreground) 84%,
|
|
105
|
+
transparent
|
|
106
|
+
);
|
|
107
|
+
--smoothstream-inline-code-background: color-mix(
|
|
108
|
+
in srgb,
|
|
109
|
+
var(--smoothstream-foreground) 7%,
|
|
110
|
+
transparent
|
|
111
|
+
);
|
|
112
|
+
--smoothstream-inline-code-font-size: 0.875em;
|
|
113
|
+
--smoothstream-code-default-color: var(--smoothstream-inline-code-color);
|
|
114
|
+
--smoothstream-code-default-background: color-mix(
|
|
115
|
+
in srgb,
|
|
116
|
+
var(--smoothstream-foreground) 3%,
|
|
117
|
+
transparent
|
|
118
|
+
);
|
|
119
|
+
--smoothstream-code-padding-inline: 1rem;
|
|
120
|
+
--smoothstream-code-margin-block: 0.75em;
|
|
121
|
+
--smoothstream-p-margin-block-start: 0;
|
|
122
|
+
--smoothstream-p-margin-block-end: 1em;
|
|
123
|
+
--smoothstream-ul-margin-block-start: 0.5em;
|
|
124
|
+
--smoothstream-ul-margin-block-end: 1em;
|
|
125
|
+
--smoothstream-ol-margin-block-start: 0.5em;
|
|
126
|
+
--smoothstream-ol-margin-block-end: 1em;
|
|
127
|
+
--smoothstream-ul-li-margin-block: 0.25em;
|
|
128
|
+
--smoothstream-ol-li-margin-block: 0.25em;
|
|
129
|
+
--smoothstream-li-ul-margin-block: 0.25em;
|
|
130
|
+
--smoothstream-li-ol-margin-block: 0.25em;
|
|
131
|
+
--smoothstream-blockquote-margin-block: 1em;
|
|
132
|
+
--smoothstream-hr-margin-block: 1.75em;
|
|
133
|
+
--smoothstream-h1-margin-block-start: 1.5em;
|
|
134
|
+
--smoothstream-h1-margin-block-end: 0.5em;
|
|
135
|
+
--smoothstream-h2-margin-block-start: 1.5em;
|
|
136
|
+
--smoothstream-h2-margin-block-end: 0.25em;
|
|
137
|
+
--smoothstream-h3-margin-block-start: 1.25em;
|
|
138
|
+
--smoothstream-h3-margin-block-end: 0.25em;
|
|
139
|
+
--smoothstream-h4-margin-block-start: 1em;
|
|
140
|
+
--smoothstream-h4-margin-block-end: 0.25em;
|
|
141
|
+
--smoothstream-h5-margin-block-start: 1em;
|
|
142
|
+
--smoothstream-h5-margin-block-end: 0.25em;
|
|
143
|
+
--smoothstream-h6-margin-block-start: 1em;
|
|
144
|
+
--smoothstream-h6-margin-block-end: 0.25em;
|
|
145
|
+
--smoothstream-code-font-size: var(--smoothstream-inline-code-font-size);
|
|
146
|
+
--smoothstream-font-mono:
|
|
147
|
+
ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
|
|
148
|
+
monospace;
|
|
149
|
+
--smoothstream-table-border-color: var(--smoothstream-border-color);
|
|
150
|
+
--smoothstream-table-border-width: 1px;
|
|
151
|
+
--smoothstream-table-border-style: solid;
|
|
152
|
+
--smoothstream-table-border-radius: 0.75rem;
|
|
153
|
+
--smoothstream-table-margin-block: 0.75em;
|
|
154
|
+
--smoothstream-image-margin-block: 1.5em;
|
|
155
|
+
--smoothstream-table-header-background: color-mix(
|
|
156
|
+
in srgb,
|
|
157
|
+
var(--smoothstream-foreground) 3%,
|
|
158
|
+
transparent
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
color: var(--smoothstream-body-color);
|
|
162
|
+
font-size: inherit;
|
|
163
|
+
line-height: 1.625;
|
|
164
|
+
overflow-wrap: break-word;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
:where([data-smoothstream-theme="default"] p) {
|
|
168
|
+
margin-block-start: var(--smoothstream-p-margin-block-start);
|
|
169
|
+
margin-block-end: var(--smoothstream-p-margin-block-end);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
:where([data-smoothstream-theme="default"] h1),
|
|
173
|
+
:where([data-smoothstream-theme="default"] h2),
|
|
174
|
+
:where([data-smoothstream-theme="default"] h3),
|
|
175
|
+
:where([data-smoothstream-theme="default"] h4),
|
|
176
|
+
:where([data-smoothstream-theme="default"] h5),
|
|
177
|
+
:where([data-smoothstream-theme="default"] h6) {
|
|
178
|
+
color: var(--smoothstream-heading-color);
|
|
179
|
+
font-weight: 600;
|
|
180
|
+
line-height: 1.25;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
:where([data-smoothstream-theme="default"] h1) {
|
|
184
|
+
margin-block-start: var(--smoothstream-h1-margin-block-start);
|
|
185
|
+
margin-block-end: var(--smoothstream-h1-margin-block-end);
|
|
186
|
+
font-size: 1.5em;
|
|
187
|
+
letter-spacing: -0.025em;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:where([data-smoothstream-theme="default"] h2) {
|
|
191
|
+
margin-block-start: var(--smoothstream-h2-margin-block-start);
|
|
192
|
+
margin-block-end: var(--smoothstream-h2-margin-block-end);
|
|
193
|
+
font-size: 1.25em;
|
|
194
|
+
letter-spacing: -0.015em;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:where([data-smoothstream-theme="default"] h3) {
|
|
198
|
+
margin-block-start: var(--smoothstream-h3-margin-block-start);
|
|
199
|
+
margin-block-end: var(--smoothstream-h3-margin-block-end);
|
|
200
|
+
font-size: 1.125em;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
:where([data-smoothstream-theme="default"] h4) {
|
|
204
|
+
margin-block-start: var(--smoothstream-h4-margin-block-start);
|
|
205
|
+
margin-block-end: var(--smoothstream-h4-margin-block-end);
|
|
206
|
+
font-size: 1em;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
:where([data-smoothstream-theme="default"] h5) {
|
|
210
|
+
margin-block-start: var(--smoothstream-h5-margin-block-start);
|
|
211
|
+
margin-block-end: var(--smoothstream-h5-margin-block-end);
|
|
212
|
+
font-size: 1em;
|
|
213
|
+
font-weight: 600;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
:where([data-smoothstream-theme="default"] h6) {
|
|
217
|
+
margin-block-start: var(--smoothstream-h6-margin-block-start);
|
|
218
|
+
margin-block-end: var(--smoothstream-h6-margin-block-end);
|
|
219
|
+
font-size: 1em;
|
|
220
|
+
font-weight: 400;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
:where([data-smoothstream-theme="default"] a) {
|
|
224
|
+
color: var(--smoothstream-link-color);
|
|
225
|
+
font-weight: 500;
|
|
226
|
+
text-decoration: underline;
|
|
227
|
+
text-decoration-skip-ink: auto;
|
|
228
|
+
text-decoration-style: dotted;
|
|
229
|
+
text-underline-position: from-font;
|
|
230
|
+
text-decoration-thickness: 1px;
|
|
231
|
+
text-underline-offset: 2px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
:where([data-smoothstream-theme="default"] strong) {
|
|
235
|
+
color: var(--smoothstream-strong-color);
|
|
236
|
+
font-weight: 650;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
:where([data-smoothstream-theme="default"] ul),
|
|
240
|
+
:where([data-smoothstream-theme="default"] ol) {
|
|
241
|
+
padding-inline-start: 1.625em;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
:where([data-smoothstream-theme="default"] ul) {
|
|
245
|
+
margin-block-start: var(--smoothstream-ul-margin-block-start);
|
|
246
|
+
margin-block-end: var(--smoothstream-ul-margin-block-end);
|
|
247
|
+
list-style-type: disc;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
:where([data-smoothstream-theme="default"] ol) {
|
|
251
|
+
margin-block-start: var(--smoothstream-ol-margin-block-start);
|
|
252
|
+
margin-block-end: var(--smoothstream-ol-margin-block-end);
|
|
253
|
+
list-style-type: decimal;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
:where([data-smoothstream-theme="default"] li) {
|
|
257
|
+
padding-inline-start: 0.375em;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
:where([data-smoothstream-theme="default"] ul > li) {
|
|
261
|
+
margin-block: var(--smoothstream-ul-li-margin-block);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
:where([data-smoothstream-theme="default"] ol > li) {
|
|
265
|
+
margin-block: var(--smoothstream-ol-li-margin-block);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
:where([data-smoothstream-theme="default"] :is(ul, ol) > li > :first-child) {
|
|
269
|
+
margin-block: 0;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
:where([data-smoothstream-theme="default"] :is(ul, ol) > li > p + p) {
|
|
273
|
+
margin-block-start: 1em;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
:where([data-smoothstream-theme="default"] ol > li)::marker {
|
|
277
|
+
color: var(--smoothstream-counter-color);
|
|
278
|
+
font-weight: 700;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
:where([data-smoothstream-theme="default"] ul > li)::marker {
|
|
282
|
+
color: var(--smoothstream-bullet-color);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
:where([data-smoothstream-theme="default"] li > ul) {
|
|
286
|
+
margin-block: var(--smoothstream-li-ul-margin-block);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
:where([data-smoothstream-theme="default"] li > ol) {
|
|
290
|
+
margin-block: var(--smoothstream-li-ol-margin-block);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
:where([data-smoothstream-theme="default"] .task-list-item) {
|
|
294
|
+
display: block;
|
|
295
|
+
padding-inline-start: 0;
|
|
296
|
+
list-style: none;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
:where(
|
|
300
|
+
[data-smoothstream-theme="default"] .task-list-item input[type="checkbox"]
|
|
301
|
+
) {
|
|
302
|
+
box-sizing: border-box;
|
|
303
|
+
display: inline-block;
|
|
304
|
+
width: var(--smoothstream-task-size);
|
|
305
|
+
height: var(--smoothstream-task-size);
|
|
306
|
+
padding: 0;
|
|
307
|
+
margin-block: 0;
|
|
308
|
+
margin-inline: -1.25rem 0.5rem;
|
|
309
|
+
border: 1px solid var(--smoothstream-task-border-color);
|
|
310
|
+
border-radius: var(--smoothstream-task-border-radius);
|
|
311
|
+
-webkit-appearance: none;
|
|
312
|
+
appearance: none;
|
|
313
|
+
background-color: transparent;
|
|
314
|
+
background-origin: border-box;
|
|
315
|
+
color: inherit;
|
|
316
|
+
vertical-align: middle;
|
|
317
|
+
transform: translateY(var(--smoothstream-task-offset));
|
|
318
|
+
opacity: 1;
|
|
319
|
+
print-color-adjust: exact;
|
|
320
|
+
user-select: none;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
:where(
|
|
324
|
+
[data-smoothstream-theme="default"]
|
|
325
|
+
.task-list-item
|
|
326
|
+
input[type="checkbox"]:checked
|
|
327
|
+
) {
|
|
328
|
+
border-color: var(--smoothstream-task-checked-background);
|
|
329
|
+
background-color: var(--smoothstream-task-checked-background);
|
|
330
|
+
background-image: var(--smoothstream-task-check-image);
|
|
331
|
+
background-position: 50%;
|
|
332
|
+
background-repeat: no-repeat;
|
|
333
|
+
background-size: 100% 100%;
|
|
334
|
+
background-blend-mode: difference;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/* Safari's native list-marker gutter is wider relative to the task control. */
|
|
338
|
+
@supports (font: -apple-system-body) and (-webkit-appearance: none) {
|
|
339
|
+
:where(
|
|
340
|
+
[data-smoothstream-theme="default"] .task-list-item input[type="checkbox"]
|
|
341
|
+
) {
|
|
342
|
+
margin-inline: -1.5rem 0.5rem;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
@media (forced-colors: active) {
|
|
347
|
+
:where(
|
|
348
|
+
[data-smoothstream-theme="default"] .task-list-item input[type="checkbox"]
|
|
349
|
+
) {
|
|
350
|
+
border: 0;
|
|
351
|
+
-webkit-appearance: auto;
|
|
352
|
+
appearance: auto;
|
|
353
|
+
background: none;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
:where([data-smoothstream-theme="default"] blockquote) {
|
|
358
|
+
margin-block: var(--smoothstream-blockquote-margin-block);
|
|
359
|
+
margin-inline: 0;
|
|
360
|
+
padding-inline-start: 1em;
|
|
361
|
+
border-inline-start: 0.25rem solid var(--smoothstream-quote-border-color);
|
|
362
|
+
color: var(--smoothstream-heading-color);
|
|
363
|
+
font-style: italic;
|
|
364
|
+
font-weight: 500;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
:where([data-smoothstream-theme="default"] blockquote p:first-child) {
|
|
368
|
+
margin-block-start: 0;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
:where([data-smoothstream-theme="default"] blockquote p:last-child) {
|
|
372
|
+
margin-block-end: 0;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
:where([data-smoothstream-theme="default"] hr) {
|
|
376
|
+
margin-block: var(--smoothstream-hr-margin-block);
|
|
377
|
+
border: 0;
|
|
378
|
+
border-block-start: 1px solid var(--smoothstream-border-color);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
:where([data-smoothstream-theme="default"] code) {
|
|
382
|
+
font-family: var(--smoothstream-font-mono);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
:where([data-smoothstream-theme="default"] code:not(pre code)) {
|
|
386
|
+
padding: 0.15em 0.3em;
|
|
387
|
+
border-radius: 0.3em;
|
|
388
|
+
background: var(--smoothstream-inline-code-background);
|
|
389
|
+
color: var(--smoothstream-inline-code-color);
|
|
390
|
+
font-size: var(--smoothstream-inline-code-font-size);
|
|
391
|
+
font-weight: 500;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/* Supporting blocks own their transition from an introductory paragraph. */
|
|
395
|
+
:where(
|
|
396
|
+
[data-smoothstream-theme="default"]
|
|
397
|
+
p:has(+ :is(pre, ul, ol, blockquote, [data-smoothstream-table-shell]))
|
|
398
|
+
) {
|
|
399
|
+
margin-block-end: 0;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/* Lists and quotes also yield their trailing gap when code follows. */
|
|
403
|
+
:where([data-smoothstream-theme="default"] :is(ul, ol, blockquote):has(+ pre)) {
|
|
404
|
+
margin-block-end: 0;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
:where([data-smoothstream-theme="default"] pre + :is(p, ul, ol, blockquote)) {
|
|
408
|
+
margin-block-start: 0;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
:where([data-smoothstream-theme="default"] pre) {
|
|
412
|
+
margin-block: var(--smoothstream-code-margin-block);
|
|
413
|
+
padding: 0.9em 1.15em;
|
|
414
|
+
overflow-x: auto;
|
|
415
|
+
border-radius: 0.75rem;
|
|
416
|
+
background-color: var(
|
|
417
|
+
--smoothstream-code-background,
|
|
418
|
+
var(
|
|
419
|
+
--smoothstream-shiki-background,
|
|
420
|
+
var(--smoothstream-code-default-background)
|
|
421
|
+
)
|
|
422
|
+
);
|
|
423
|
+
color: var(
|
|
424
|
+
--smoothstream-code-color,
|
|
425
|
+
var(--smoothstream-shiki-color, var(--smoothstream-code-default-color))
|
|
426
|
+
);
|
|
427
|
+
scrollbar-color: var(
|
|
428
|
+
--smoothstream-code-scrollbar-color,
|
|
429
|
+
color-mix(in srgb, currentColor 24%, transparent)
|
|
430
|
+
)
|
|
431
|
+
transparent;
|
|
432
|
+
scrollbar-width: thin;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
:where([data-smoothstream-theme="default"] pre)::-webkit-scrollbar {
|
|
436
|
+
height: 8px;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
:where([data-smoothstream-theme="default"] pre)::-webkit-scrollbar-track {
|
|
440
|
+
background: transparent;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
:where([data-smoothstream-theme="default"] pre)::-webkit-scrollbar-thumb {
|
|
444
|
+
border: 2px solid transparent;
|
|
445
|
+
border-radius: 999px;
|
|
446
|
+
background-color: var(
|
|
447
|
+
--smoothstream-code-scrollbar-color,
|
|
448
|
+
color-mix(in srgb, currentColor 24%, transparent)
|
|
449
|
+
);
|
|
450
|
+
background-clip: padding-box;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
:where([data-smoothstream-theme="default"] pre)::-webkit-scrollbar-thumb:hover {
|
|
454
|
+
background-color: var(
|
|
455
|
+
--smoothstream-code-scrollbar-hover-color,
|
|
456
|
+
color-mix(in srgb, currentColor 40%, transparent)
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
:where([data-smoothstream-theme="default"] pre code) {
|
|
461
|
+
padding: 0;
|
|
462
|
+
border: 0;
|
|
463
|
+
background: transparent;
|
|
464
|
+
color: inherit;
|
|
465
|
+
font-size: var(--smoothstream-code-font-size);
|
|
466
|
+
font-weight: inherit;
|
|
467
|
+
line-height: 1.7;
|
|
468
|
+
tab-size: 2;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
:where([data-smoothstream-theme="default"] [data-smoothstream-code-block]) {
|
|
472
|
+
border: 1px solid
|
|
473
|
+
var(
|
|
474
|
+
--smoothstream-code-border-color,
|
|
475
|
+
color-mix(in srgb, currentColor 6%, transparent)
|
|
476
|
+
);
|
|
477
|
+
padding: 0;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
:where([data-smoothstream-theme="default"] [data-smoothstream-code-toolbar]) {
|
|
481
|
+
min-height: var(--smoothstream-code-copy-button-size, max(1.75rem, 1.75em));
|
|
482
|
+
padding: 0.55rem var(--smoothstream-code-padding-inline) 0;
|
|
483
|
+
line-height: 1.5;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
:where([data-smoothstream-theme="default"] [data-smoothstream-code-copy]) {
|
|
487
|
+
/* Pull the larger hit target so its icon lines up with the inline inset. */
|
|
488
|
+
margin-inline-end: calc(
|
|
489
|
+
(
|
|
490
|
+
var(--smoothstream-code-copy-icon-size, max(14px, 1em)) -
|
|
491
|
+
var(--smoothstream-code-copy-button-size, max(1.75rem, 1.75em))
|
|
492
|
+
) /
|
|
493
|
+
2
|
|
494
|
+
);
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
:where([data-smoothstream-theme="default"] [data-smoothstream-code-language]) {
|
|
498
|
+
opacity: 0.65;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
:where([data-smoothstream-theme="default"] [data-smoothstream-code-icon-swap]) {
|
|
502
|
+
inline-size: var(--smoothstream-code-copy-icon-size, max(14px, 1em));
|
|
503
|
+
block-size: var(--smoothstream-code-copy-icon-size, max(14px, 1em));
|
|
504
|
+
transition: opacity var(--smoothstream-icon-swap-duration, 250ms) ease-in-out;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
:where(
|
|
508
|
+
[data-smoothstream-theme="default"]
|
|
509
|
+
[data-smoothstream-code-icon-swap][data-state="copy"]
|
|
510
|
+
) {
|
|
511
|
+
opacity: 0.65;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
:where(
|
|
515
|
+
[data-smoothstream-theme="default"]
|
|
516
|
+
[data-smoothstream-code-icon-swap][data-state="check"]
|
|
517
|
+
) {
|
|
518
|
+
opacity: 1;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
:where(
|
|
522
|
+
[data-smoothstream-theme="default"]
|
|
523
|
+
[data-smoothstream-code-copy]:hover
|
|
524
|
+
[data-smoothstream-code-icon-swap][data-state="copy"]
|
|
525
|
+
),
|
|
526
|
+
:where(
|
|
527
|
+
[data-smoothstream-theme="default"]
|
|
528
|
+
[data-smoothstream-code-copy]:focus-visible
|
|
529
|
+
[data-smoothstream-code-icon-swap][data-state="copy"]
|
|
530
|
+
) {
|
|
531
|
+
opacity: 1;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
:where(
|
|
535
|
+
[data-smoothstream-theme="default"] [data-smoothstream-code-block] > code
|
|
536
|
+
) {
|
|
537
|
+
padding: 0.55em var(--smoothstream-code-padding-inline) 0.9em;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
:where([data-smoothstream-theme="default"] [data-smoothstream-table-shell]) {
|
|
541
|
+
margin-block: var(--smoothstream-table-margin-block);
|
|
542
|
+
border: var(--smoothstream-table-border-width)
|
|
543
|
+
var(--smoothstream-table-border-style)
|
|
544
|
+
var(--smoothstream-table-border-color);
|
|
545
|
+
border-radius: var(--smoothstream-table-border-radius);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
:where([data-smoothstream-theme="default"] table) {
|
|
549
|
+
border-collapse: separate;
|
|
550
|
+
border-spacing: 0;
|
|
551
|
+
font-size: 0.875em;
|
|
552
|
+
line-height: 1.4;
|
|
553
|
+
text-align: start;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
:where([data-smoothstream-theme="default"] th) {
|
|
557
|
+
padding: 0.5rem 0.625rem;
|
|
558
|
+
background: var(--smoothstream-table-header-background);
|
|
559
|
+
color: var(--smoothstream-heading-color);
|
|
560
|
+
font-weight: 600;
|
|
561
|
+
text-align: start;
|
|
562
|
+
vertical-align: bottom;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
:where([data-smoothstream-theme="default"] td) {
|
|
566
|
+
padding: 0.5rem 0.625rem;
|
|
567
|
+
vertical-align: top;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
:where([data-smoothstream-theme="default"] tbody tr:not(:first-child) td) {
|
|
571
|
+
border-block-start: 1px solid var(--smoothstream-table-border-color);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
:where([data-smoothstream-theme="default"] th:first-child) {
|
|
575
|
+
border-start-start-radius: max(
|
|
576
|
+
0px,
|
|
577
|
+
calc(
|
|
578
|
+
var(--smoothstream-table-border-radius) -
|
|
579
|
+
var(--smoothstream-table-border-width)
|
|
580
|
+
)
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
:where([data-smoothstream-theme="default"] th:last-child) {
|
|
585
|
+
border-start-end-radius: max(
|
|
586
|
+
0px,
|
|
587
|
+
calc(
|
|
588
|
+
var(--smoothstream-table-border-radius) -
|
|
589
|
+
var(--smoothstream-table-border-width)
|
|
590
|
+
)
|
|
591
|
+
);
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
:where([data-smoothstream-theme="default"] img) {
|
|
595
|
+
max-width: 100%;
|
|
596
|
+
height: auto;
|
|
597
|
+
vertical-align: middle;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
/*
|
|
601
|
+
* Standalone status is explicit because element-count selectors such as
|
|
602
|
+
* :only-child treat reveal spans and compacted text nodes differently.
|
|
603
|
+
*/
|
|
604
|
+
:where(
|
|
605
|
+
[data-smoothstream-theme="default"] img[data-smoothstream-image-standalone]
|
|
606
|
+
) {
|
|
607
|
+
display: block;
|
|
608
|
+
margin-block: var(--smoothstream-image-margin-block);
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
:where([data-smoothstream-theme="default"] > :first-child) {
|
|
612
|
+
margin-block-start: 0;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
:where([data-smoothstream-theme="default"] > :last-child) {
|
|
616
|
+
margin-block-end: 0;
|
|
617
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@smoothstream/vue",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Deterministic, paced Markdown reveal for Vue 3",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"vue",
|
|
8
|
+
"markdown",
|
|
9
|
+
"streaming",
|
|
10
|
+
"llm"
|
|
11
|
+
],
|
|
12
|
+
"type": "module",
|
|
13
|
+
"sideEffects": [
|
|
14
|
+
"./dist/index.js",
|
|
15
|
+
"**/*.css"
|
|
16
|
+
],
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./styles.css": "./dist/styles.css"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsup && node scripts/verify-vue-boundary.mjs",
|
|
29
|
+
"prepack": "npm run build"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=20"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"vue": "^3.5.0"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@smoothstream/core": "^0.1.2",
|
|
42
|
+
"@smoothstream/styles": "^0.1.0",
|
|
43
|
+
"property-information": "^7.2.0"
|
|
44
|
+
},
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "git+https://github.com/stefan-joseph/smoothstream.git",
|
|
48
|
+
"directory": "packages/vue"
|
|
49
|
+
},
|
|
50
|
+
"homepage": "https://github.com/stefan-joseph/smoothstream/tree/main/packages/vue",
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/stefan-joseph/smoothstream/issues"
|
|
53
|
+
}
|
|
54
|
+
}
|