@inklu/docs 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.
Files changed (56) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/components.json +25 -0
  3. package/dist/index.d.mts +271 -0
  4. package/dist/index.d.ts +271 -0
  5. package/dist/index.js +2455 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.mjs +2368 -0
  8. package/dist/index.mjs.map +1 -0
  9. package/dist/shiki.d.mts +10 -0
  10. package/dist/shiki.d.ts +10 -0
  11. package/dist/shiki.js +47 -0
  12. package/dist/shiki.js.map +1 -0
  13. package/dist/shiki.mjs +22 -0
  14. package/dist/shiki.mjs.map +1 -0
  15. package/dist/styles.css +2556 -0
  16. package/package.json +55 -0
  17. package/src/components/content/changelog-content.tsx +119 -0
  18. package/src/components/content/code-block.tsx +111 -0
  19. package/src/components/content/docs-content.tsx +113 -0
  20. package/src/components/layout/docs-layout.tsx +192 -0
  21. package/src/components/layout/site-header.tsx +152 -0
  22. package/src/components/layout/site-layout.tsx +28 -0
  23. package/src/components/layout/site-provider.tsx +23 -0
  24. package/src/components/layout/site-template.tsx +20 -0
  25. package/src/components/layout/theme-provider.tsx +10 -0
  26. package/src/components/layout/theme-switcher.tsx +42 -0
  27. package/src/components/motion-primitives/morph-icon.tsx +97 -0
  28. package/src/components/motion-primitives/progressive-blur.tsx +64 -0
  29. package/src/components/motion-primitives/sliding-number.tsx +131 -0
  30. package/src/components/motion-primitives/text-effect.tsx +290 -0
  31. package/src/components/motion-primitives/text-morph.tsx +77 -0
  32. package/src/components/motion-primitives/text-scramble.tsx +87 -0
  33. package/src/components/shared/command-block.tsx +193 -0
  34. package/src/components/shared/scroll-fade.tsx +22 -0
  35. package/src/components/ui/badge.tsx +50 -0
  36. package/src/components/ui/brand-logo.tsx +68 -0
  37. package/src/components/ui/button-group.tsx +87 -0
  38. package/src/components/ui/button.tsx +104 -0
  39. package/src/components/ui/card.tsx +97 -0
  40. package/src/components/ui/direction.tsx +6 -0
  41. package/src/components/ui/hover-card.tsx +51 -0
  42. package/src/components/ui/item.tsx +201 -0
  43. package/src/components/ui/separator.tsx +25 -0
  44. package/src/components/ui/toast.tsx +322 -0
  45. package/src/components/ui/tooltip.tsx +66 -0
  46. package/src/hooks/use-copy-to-clipboard.ts +54 -0
  47. package/src/index.ts +30 -0
  48. package/src/lib/constants.ts +63 -0
  49. package/src/lib/motions.ts +21 -0
  50. package/src/lib/utils/audio.ts +56 -0
  51. package/src/lib/utils.ts +14 -0
  52. package/src/shiki.ts +25 -0
  53. package/src/styles.css +112 -0
  54. package/src/typeset.css +513 -0
  55. package/tsconfig.json +15 -0
  56. package/tsup.config.ts +11 -0
package/src/styles.css ADDED
@@ -0,0 +1,112 @@
1
+ @import "tailwindcss";
2
+ @import "./typeset.css";
3
+
4
+ /* Only basic required styles and shadcn definitions */
5
+ @custom-variant dark (&:is(.dark *));
6
+
7
+ @theme inline {
8
+ --color-background: var(--background);
9
+ --color-foreground: var(--foreground);
10
+ --font-sans: var(--font-geist);
11
+ --font-mono: var(--font-geist-mono);
12
+ --font-heading: var(--font-geist);
13
+ --color-primary-foreground: var(--primary-foreground);
14
+ --color-primary: var(--primary);
15
+ --color-muted-foreground: var(--muted-foreground);
16
+ --color-muted: var(--muted);
17
+ --color-accent-foreground: var(--accent-foreground);
18
+ --color-accent: var(--accent);
19
+ --color-card-foreground: var(--card-foreground);
20
+ --color-card: var(--card);
21
+ --color-popover-foreground: var(--popover-foreground);
22
+ --color-popover: var(--popover);
23
+ --color-code-foreground: var(--code-foreground);
24
+ --color-code: var(--code);
25
+ --color-border: var(--border);
26
+ --color-input: var(--input);
27
+ --color-ring: var(--ring);
28
+ --radius-sm: calc(var(--radius) * 0.6);
29
+ --radius-md: calc(var(--radius) * 0.8);
30
+ --radius-lg: var(--radius);
31
+ }
32
+
33
+ :root {
34
+ --background: oklch(0.99 0.002 240);
35
+ --foreground: oklch(0.145 0 0);
36
+ --card: oklch(0.967 0.001 286.375);
37
+ --card-foreground: oklch(0.145 0 0);
38
+ --popover: oklch(0.99 0.002 240);
39
+ --popover-foreground: oklch(0.145 0 0);
40
+ --code: oklch(0.967 0.001 286.375);
41
+ --code-foreground: oklch(0.145 0 0);
42
+ --primary: var(--foreground);
43
+ --primary-foreground: var(--background);
44
+ --secondary: oklch(0.967 0.001 286.375);
45
+ --secondary-foreground: oklch(0.21 0.006 285.885);
46
+ --muted: oklch(0.97 0 0);
47
+ --muted-foreground: oklch(0.556 0 0);
48
+ --accent: oklch(0.97 0 0);
49
+ --accent-foreground: oklch(0.205 0 0);
50
+ --destructive: oklch(0.577 0.245 27.325);
51
+ --border: oklch(0.922 0 0);
52
+ --input: oklch(0.922 0 0);
53
+ --ring: oklch(0.708 0 0);
54
+ --radius: 0.625rem;
55
+
56
+ --layout-max-width: 1200px;
57
+ --layout-content-width: 48em;
58
+ --layout-padding: 1.5rem;
59
+
60
+ --z-scroll-fade: 5;
61
+ --z-header: 10;
62
+ --z-toast: 50;
63
+ }
64
+
65
+ .dark {
66
+ --background: oklch(0.145 0.003 285);
67
+ --foreground: oklch(0.96 0.003 285);
68
+ --card: oklch(0.175 0.003 285);
69
+ --card-foreground: var(--foreground);
70
+ --popover: oklch(0.145 0.003 285);
71
+ --popover-foreground: var(--foreground);
72
+ --code: oklch(0.175 0.003 285);
73
+ --code-foreground: var(--foreground);
74
+ --primary: var(--foreground);
75
+ --primary-foreground: var(--background);
76
+ --secondary: oklch(0.205 0.003 285);
77
+ --secondary-foreground: var(--foreground);
78
+ --muted: oklch(0.185 0.003 285);
79
+ --muted-foreground: oklch(0.69 0.003 285);
80
+ --accent: oklch(0.225 0.003 285);
81
+ --accent-foreground: var(--foreground);
82
+ --destructive: oklch(0.62 0.22 28);
83
+ --destructive-foreground: white;
84
+ --border: oklch(0.285 0.003 285);
85
+ --input: var(--border);
86
+ --ring: color-mix(in srgb, var(--primary) 45%, transparent);
87
+
88
+ --layout-max-width: 1200px;
89
+ --layout-content-width: 48em;
90
+ --layout-padding: 1.5rem;
91
+
92
+ --z-scroll-fade: 5;
93
+ --z-header: 10;
94
+ --z-toast: 50;
95
+ }
96
+
97
+ @layer base {
98
+ * {
99
+ @apply border-border outline-ring/50;
100
+ }
101
+ body {
102
+ @apply bg-background text-foreground;
103
+ }
104
+ /* Shiki dual-theme support need !important to overwrite conficts */
105
+ .dark .shiki,
106
+ .dark .shiki span {
107
+ color: var(--shiki-dark);
108
+ font-style: var(--shiki-dark-font-style);
109
+ font-weight: var(--shiki-dark-font-weight);
110
+ text-decoration: var(--shiki-dark-text-decoration);
111
+ }
112
+ }
@@ -0,0 +1,513 @@
1
+ /*
2
+ * shadcn/typeset
3
+ * https://ui.shadcn.com/docs/typeset.
4
+ */
5
+
6
+ @layer components {
7
+ .typeset {
8
+ --typeset-font-body: inherit;
9
+ --typeset-font-heading: var(--font-heading);
10
+ --typeset-font-mono: var(--font-mono);
11
+ --typeset-size: 1em;
12
+ --typeset-leading: 1.8;
13
+ --typeset-flow: 1.5em;
14
+ --typeset-body: color-mix(in oklab, currentColor 82%, transparent);
15
+ }
16
+
17
+ .typeset-docs {
18
+ --typeset-font-body: var(--font-geist);
19
+ --typeset-font-heading: var(--font-geist);
20
+ --typeset-font-mono: var(--font-geist-mono);
21
+ --typeset-size: 14px;
22
+ --typeset-leading: 1.6;
23
+ --typeset-flow: 1.75em;
24
+ }
25
+
26
+ .dark .typeset {
27
+ --typeset-leading: 1.85;
28
+ }
29
+ .dark .typeset-docs {
30
+ --typeset-leading: 1.6;
31
+ }
32
+ }
33
+
34
+ @layer components {
35
+ .typeset {
36
+ font-family: var(--typeset-font-body);
37
+ font-size: calc(var(--typeset-size) * 1.125);
38
+ line-height: var(--typeset-leading);
39
+ color: var(--color-foreground, currentColor);
40
+ overflow-wrap: break-word;
41
+ margin-trim: block-start;
42
+
43
+ @media (min-width: 48rem), print {
44
+ font-size: var(--typeset-size);
45
+ }
46
+
47
+ --typeset-muted: var(
48
+ --color-muted-foreground,
49
+ color-mix(in oklab, currentColor 60%, transparent)
50
+ );
51
+ --typeset-rule: var(
52
+ --color-border,
53
+ color-mix(in oklab, currentColor 20%, transparent)
54
+ );
55
+ }
56
+
57
+ .typeset
58
+ *:not(
59
+ :where(
60
+ .not-typeset,
61
+ [data-not-typeset],
62
+ .not-typeset *,
63
+ [data-not-typeset] *
64
+ )
65
+ ) {
66
+ /* Paragraphs. */
67
+ &:where(p) {
68
+ margin-block-start: var(--typeset-flow);
69
+ margin-block-end: 0;
70
+ color: var(--typeset-body);
71
+ }
72
+
73
+ /* Headings. */
74
+ &:where(h1, h2, h3, h4, h5, h6) {
75
+ color: var(--color-foreground, currentColor);
76
+ font-family: var(--typeset-font-heading);
77
+ font-weight: 600;
78
+ margin-block-end: 0;
79
+ }
80
+ &:where(h1) {
81
+ font-size: 1.45em;
82
+ line-height: 1.3;
83
+ margin-block-start: var(--typeset-flow);
84
+ }
85
+ &:where(h2) {
86
+ font-size: 1.25em;
87
+ line-height: 1.4;
88
+ margin-block-start: calc(var(--typeset-flow) * 1.4);
89
+ }
90
+ &:where(h3) {
91
+ font-size: 1.125em;
92
+ line-height: 1.45;
93
+ margin-block-start: var(--typeset-flow);
94
+ }
95
+ &:where(h4) {
96
+ font-size: 1em;
97
+ line-height: 1.5;
98
+ margin-block-start: var(--typeset-flow);
99
+ }
100
+ &:where(h5) {
101
+ font-size: 0.875em;
102
+ line-height: 1.5;
103
+ font-weight: 500;
104
+ color: var(--typeset-muted);
105
+ margin-block-start: calc(var(--typeset-flow) / 0.875);
106
+ }
107
+ &:where(h6) {
108
+ font-size: 0.8125em;
109
+ line-height: 1.5;
110
+ font-weight: 500;
111
+ letter-spacing: 0.08em;
112
+ text-transform: uppercase;
113
+ color: var(--typeset-muted);
114
+ margin-block-start: calc(var(--typeset-flow) / 0.8125);
115
+ }
116
+ /* Anchors. */
117
+ &:where([id]) {
118
+ scroll-margin-block-start: var(--typeset-flow);
119
+ }
120
+
121
+ /* Headings own the space below them. */
122
+ &:where(h1 + *, h2 + *, h3 + *, h4 + *, h5 + *, h6 + *) {
123
+ margin-block-start: 1em;
124
+ }
125
+ &:where(:is(h1, h2, h3, h4) :is(code)) {
126
+ font-size: 0.9em;
127
+ }
128
+
129
+ /* Links. */
130
+ &:where(a) {
131
+ color: inherit;
132
+ font-weight: 500;
133
+ text-decoration-line: underline;
134
+ text-decoration-color: color-mix(in oklab, currentColor 30%, transparent);
135
+ }
136
+ &:where(a:hover) {
137
+ text-decoration-color: currentColor;
138
+ }
139
+ &:where(a:focus-visible) {
140
+ outline: 2px solid var(--color-ring, currentColor);
141
+ outline-offset: 2px;
142
+ border-radius: 0.125em;
143
+ }
144
+ &:where(:is(h1, h2, h3, h4, h5, h6) :is(a)) {
145
+ font-weight: inherit;
146
+ }
147
+
148
+ /* Inline semantics. */
149
+ &:where(strong, b) {
150
+ font-weight: 600;
151
+ }
152
+ &:where(:is(h1, h2, h3, h4) :is(strong, b)) {
153
+ font-weight: 600;
154
+ }
155
+ &:where(mark) {
156
+ background-color: color-mix(
157
+ in oklab,
158
+ oklch(0.86 0.17 95) 40%,
159
+ transparent
160
+ );
161
+ color: inherit;
162
+ padding: 0.05em 0.15em;
163
+ border-radius: 0.2em;
164
+ }
165
+ &:where(abbr[title]) {
166
+ text-decoration-line: underline;
167
+ text-decoration-style: dotted;
168
+ text-underline-offset: 0.2em;
169
+ cursor: help;
170
+ }
171
+ &:where(del, s) {
172
+ color: var(--typeset-muted);
173
+ text-decoration-line: line-through;
174
+ }
175
+ &:where(sup, sub) {
176
+ font-size: 0.75em;
177
+ line-height: 0;
178
+ position: relative;
179
+ vertical-align: baseline;
180
+ }
181
+ &:where(sup) {
182
+ top: -0.5em;
183
+ }
184
+ &:where(sub) {
185
+ bottom: -0.25em;
186
+ }
187
+ &:where(sup a) {
188
+ text-decoration-line: none;
189
+ font-weight: 500;
190
+ }
191
+
192
+ /* Lists. */
193
+ &:where(ul) {
194
+ list-style-type: disc;
195
+ }
196
+ &:where(ol) {
197
+ list-style-type: decimal;
198
+ }
199
+ &:where(ul ul) {
200
+ list-style-type: circle;
201
+ }
202
+ &:where(ul ul ul) {
203
+ list-style-type: square;
204
+ }
205
+ &:where(ol[type="a" i]) {
206
+ list-style-type: lower-alpha;
207
+ }
208
+ &:where(ol[type="i" i]) {
209
+ list-style-type: lower-roman;
210
+ }
211
+ &:where(ol[type="A" s]) {
212
+ list-style-type: upper-alpha;
213
+ }
214
+ &:where(ol[type="I" s]) {
215
+ list-style-type: upper-roman;
216
+ }
217
+ &:where(ul, ol) {
218
+ margin-block-start: var(--typeset-flow);
219
+ margin-block-end: 0;
220
+ padding-inline-start: 1.5em;
221
+ }
222
+ &:where(li) {
223
+ margin-block-start: 0.5em;
224
+ padding-inline-start: 0.4em;
225
+ color: var(--typeset-body);
226
+ }
227
+ &:where(li > p, li > ul, li > ol) {
228
+ margin-block-start: 0.5em;
229
+ }
230
+ &:where(ul > li)::marker {
231
+ color: var(--typeset-muted);
232
+ }
233
+ &:where(ol > li)::marker {
234
+ color: var(--typeset-muted);
235
+ }
236
+
237
+ /* GFM task lists. */
238
+ &:where(ul.contains-task-list) {
239
+ list-style-type: none;
240
+ padding-inline-start: 0.25em;
241
+ }
242
+ &:where(li.task-list-item > input[type="checkbox"]) {
243
+ margin-inline-end: 0.5em;
244
+ vertical-align: -0.1em;
245
+ accent-color: var(--color-primary, currentColor);
246
+ }
247
+
248
+ /* Disclosures. */
249
+ &:where(details) {
250
+ margin-block-start: var(--typeset-flow);
251
+ margin-block-end: 0;
252
+ }
253
+ &:where(summary) {
254
+ cursor: pointer;
255
+ font-weight: 500;
256
+ }
257
+ &:where(summary)::marker {
258
+ color: var(--typeset-muted);
259
+ }
260
+
261
+ /* Keyboard keys. */
262
+ &:where(kbd) {
263
+ font-family: inherit;
264
+ font-size: 0.85em;
265
+ font-weight: 500;
266
+ border: 1px solid var(--typeset-rule);
267
+ border-block-end-width: 2px;
268
+ border-radius: min(calc(var(--radius, 0.5em) * 0.6), 0.35em);
269
+ padding: 0.0625em 0.35em;
270
+ }
271
+
272
+ /* Definition lists. */
273
+ &:where(dl) {
274
+ margin-block-start: var(--typeset-flow);
275
+ margin-block-end: 0;
276
+ }
277
+ &:where(dt) {
278
+ font-weight: 500;
279
+ margin-block-start: 1em;
280
+ }
281
+ &:where(dt + dt) {
282
+ margin-block-start: 0.25em;
283
+ }
284
+ &:where(dd) {
285
+ margin-block-start: 0.25em;
286
+ margin-inline-start: 0;
287
+ padding-inline-start: 1em;
288
+ color: var(--typeset-muted);
289
+ }
290
+
291
+ /* Inline code. */
292
+ &:where(:not(pre) > code) {
293
+ background-color: var(
294
+ --color-muted,
295
+ color-mix(in oklab, currentColor 8%, transparent)
296
+ );
297
+ font-family: var(--typeset-font-mono);
298
+ font-size: 0.85em;
299
+ border-radius: min(calc(var(--radius, 0.5em) * 0.6), 0.35em);
300
+ padding: 0.125em 0.3em;
301
+ }
302
+
303
+ /* Code blocks. */
304
+ &:where(pre) {
305
+ background-color: var(
306
+ --color-muted,
307
+ color-mix(in oklab, currentColor 8%, transparent)
308
+ );
309
+ font-family: var(--typeset-font-mono);
310
+ font-size: 0.875em;
311
+ line-height: 1.5;
312
+ tab-size: 2;
313
+ direction: ltr;
314
+ border-radius: var(--radius, 0.5em);
315
+ padding: 0.75em 1em;
316
+ overflow-x: auto;
317
+ margin-block-start: calc(var(--typeset-flow) / 0.875);
318
+ margin-block-end: 0;
319
+ }
320
+ &:where(pre code) {
321
+ background-color: transparent;
322
+ font-family: inherit;
323
+ font-size: inherit;
324
+ padding: 0;
325
+ border-radius: 0;
326
+ }
327
+
328
+ /* Blockquote. */
329
+ &:where(blockquote) {
330
+ border-inline-start: 2px solid var(--typeset-rule);
331
+ padding-inline-start: 1em;
332
+ margin-block-start: var(--typeset-flow);
333
+ margin-block-end: 0;
334
+ margin-inline: 0;
335
+ }
336
+
337
+ /* Dividers. */
338
+ &:where(hr) {
339
+ border: 0;
340
+ border-block-start: 1px solid var(--typeset-rule);
341
+ margin-block-start: calc(var(--typeset-flow) * 2.4);
342
+ margin-block-end: 0;
343
+ }
344
+ &:where(hr + h1, hr + h2, hr + h3, hr + h4) {
345
+ margin-block-start: var(--typeset-flow);
346
+ }
347
+
348
+ /* GFM footnotes. */
349
+ &:where(.footnotes, [data-footnotes]) {
350
+ margin-block-start: calc(var(--typeset-flow) * 2);
351
+ border-block-start: 1px solid var(--typeset-rule);
352
+ padding-block-start: var(--typeset-flow);
353
+ font-size: 0.875em;
354
+ color: var(--typeset-muted);
355
+ }
356
+
357
+ /* Math. */
358
+ &:where(math[display="block"]) {
359
+ margin-block-start: var(--typeset-flow);
360
+ margin-block-end: 0;
361
+ overflow-x: auto;
362
+ overflow-y: hidden;
363
+ padding-block: 0.25em;
364
+ }
365
+
366
+ /* Media. */
367
+ &:where(img, video) {
368
+ border-radius: var(--radius, 0.5em);
369
+ max-width: 100%;
370
+ height: auto;
371
+ margin-block-start: var(--typeset-flow);
372
+ margin-block-end: 0;
373
+ }
374
+ &:where(p img) {
375
+ margin-block-start: 0;
376
+ }
377
+ &:where(figure) {
378
+ margin-block-start: var(--typeset-flow);
379
+ margin-block-end: 0;
380
+ margin-inline: 0;
381
+ }
382
+ &:where(figcaption, caption) {
383
+ color: var(--typeset-muted);
384
+ font-size: 0.875em;
385
+ text-align: center;
386
+ margin-block-start: calc(0.75em / 0.875);
387
+ }
388
+ &:where(caption) {
389
+ caption-side: bottom;
390
+ }
391
+
392
+ /* Tables. Separators sit on cells, not tr:last-child: append-safe.
393
+ Bare tables stay real tables (keep their semantics) and wrap to fit. */
394
+ &:where(table) {
395
+ max-width: 100%;
396
+ font-size: 1em;
397
+ line-height: 1.5;
398
+ font-variant-numeric: tabular-nums;
399
+ border-collapse: separate;
400
+ border-spacing: 0;
401
+ border-block-end: 1px solid var(--typeset-rule);
402
+ margin-block-start: var(--typeset-flow);
403
+ margin-block-end: 0;
404
+ }
405
+
406
+ /* Horizontal scroll for any wide block. Wrap it and the wrapper owns the
407
+ flow margin. Tables shrink to fit, so widen the table to make it scroll
408
+ instead of compress. */
409
+ &:where(.typeset-scroll) {
410
+ overflow-x: auto;
411
+ margin-block-start: var(--typeset-flow);
412
+ }
413
+ &:where(.typeset-scroll > *) {
414
+ margin-block-start: 0;
415
+ }
416
+ &:where(.typeset-scroll table) {
417
+ width: max-content;
418
+ max-width: none;
419
+ }
420
+ &:where(thead th) {
421
+ font-weight: 500;
422
+ text-align: start;
423
+ white-space: nowrap;
424
+ padding: 0.65em 1em;
425
+ }
426
+ &:where(:is(tbody, tfoot) :is(td, th)) {
427
+ padding: 0.75em 1em;
428
+ text-align: start;
429
+ vertical-align: top;
430
+ border-block-start: 1px solid var(--typeset-rule);
431
+ }
432
+ &:where(td) {
433
+ color: var(--typeset-body);
434
+ }
435
+ &:where(tbody th, tfoot th) {
436
+ font-weight: 500;
437
+ }
438
+ &:where(th:first-child, td:first-child) {
439
+ padding-inline-start: 0;
440
+ }
441
+ &:where(th[align="center"], td[align="center"]) {
442
+ text-align: center;
443
+ }
444
+ &:where(th[align="right"], td[align="right"]) {
445
+ text-align: end;
446
+ }
447
+
448
+ /* Blocks inside list items keep the list's tighter rhythm. */
449
+ &:where(li > blockquote, li > table, li > figure) {
450
+ margin-block-start: 0.5em;
451
+ }
452
+ &:where(li > pre) {
453
+ margin-block-start: calc(0.5em / 0.875);
454
+ }
455
+
456
+ @media print {
457
+ &:where(pre, table, blockquote, figure) {
458
+ break-inside: avoid;
459
+ }
460
+ &:where(h1, h2, h3, h4) {
461
+ break-after: avoid;
462
+ }
463
+ }
464
+
465
+ /* Forced colors strips the code background, so give it a border. */
466
+ @media (forced-colors: active) {
467
+ /* biome-ignore lint/style/noDescendingSpecificity: needed for forced-colors override */
468
+ &:where(:not(pre) > code) {
469
+ border: 1px solid;
470
+ }
471
+ }
472
+ }
473
+
474
+ /* First child adds no space above. Last so it wins ties. */
475
+ .typeset
476
+ > :where(:first-child):not(
477
+ :where(
478
+ .not-typeset,
479
+ [data-not-typeset],
480
+ .not-typeset *,
481
+ [data-not-typeset] *
482
+ )
483
+ ),
484
+ .typeset
485
+ > :where(:first-child)
486
+ > :where(:first-child):not(
487
+ :where(
488
+ .not-typeset,
489
+ [data-not-typeset],
490
+ .not-typeset *,
491
+ [data-not-typeset] *
492
+ )
493
+ ),
494
+ .typeset
495
+ :where(
496
+ li > :first-child,
497
+ blockquote > :first-child,
498
+ td > :first-child,
499
+ th > :first-child,
500
+ dd > :first-child,
501
+ figure > :first-child,
502
+ figure > picture > img
503
+ ):not(
504
+ :where(
505
+ .not-typeset,
506
+ [data-not-typeset],
507
+ .not-typeset *,
508
+ [data-not-typeset] *
509
+ )
510
+ ) {
511
+ margin-block-start: 0;
512
+ }
513
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "lib": ["DOM", "DOM.Iterable", "ESNext"],
6
+ "declaration": true,
7
+ "moduleResolution": "bundler",
8
+ "strict": true,
9
+ "jsx": "react-jsx",
10
+ "paths": {
11
+ "@/*": ["./src/*"]
12
+ }
13
+ },
14
+ "include": ["src/**/*"]
15
+ }
package/tsup.config.ts ADDED
@@ -0,0 +1,11 @@
1
+ import { defineConfig } from "tsup";
2
+
3
+ export default defineConfig((_options) => ({
4
+ entry: ["src/index.ts", "src/shiki.ts"],
5
+ format: ["cjs", "esm"],
6
+ dts: true,
7
+ splitting: false,
8
+ sourcemap: true,
9
+ clean: false,
10
+ external: ["react", "react-dom", "next"],
11
+ }));