@shadow-js/ui 0.0.0-stage → 1.0.1
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 +30 -0
- package/LICENSE +21 -0
- package/README.md +598 -2
- package/dist/cli.mjs +2281 -0
- package/dist/dev/cli/schema.d.ts +71 -0
- package/dist/dev/index.d.ts +6 -0
- package/dist/dev/index.js +5 -0
- package/dist/dev/locales/ar.d.ts +139 -0
- package/dist/dev/locales/ar.js +127 -0
- package/dist/dev/locales/ar.js.map +1 -0
- package/dist/dev/locales/en.d.ts +139 -0
- package/dist/dev/locales/en.js +127 -0
- package/dist/dev/locales/en.js.map +1 -0
- package/dist/dev/registry/utils/utils.d.ts +27 -0
- package/dist/dev/registry/utils/utils.js +26 -0
- package/dist/dev/registry/utils/utils.js.map +1 -0
- package/dist/dev/theme/theme-logic.d.ts +185 -0
- package/dist/dev/theme/theme-logic.js +183 -0
- package/dist/dev/theme/theme-logic.js.map +1 -0
- package/dist/dev/theme/theme-provider.d.ts +88 -0
- package/dist/dev/theme/theme-provider.js +149 -0
- package/dist/dev/theme/theme-provider.js.map +1 -0
- package/dist/prod/index.js +1 -0
- package/dist/prod/locales/ar.js +2 -0
- package/dist/prod/locales/ar.js.map +1 -0
- package/dist/prod/locales/en.js +2 -0
- package/dist/prod/locales/en.js.map +1 -0
- package/dist/prod/registry/utils/utils.js +2 -0
- package/dist/prod/registry/utils/utils.js.map +1 -0
- package/dist/prod/theme/theme-logic.js +2 -0
- package/dist/prod/theme/theme-logic.js.map +1 -0
- package/dist/prod/theme/theme-provider.js +2 -0
- package/dist/prod/theme/theme-provider.js.map +1 -0
- package/package.json +102 -4
- package/registry/accordion/accordion.tsx +210 -0
- package/registry/accordion/item.json +4 -0
- package/registry/alert/alert.tsx +200 -0
- package/registry/alert/item.json +4 -0
- package/registry/alert-dialog/alert-dialog.tsx +530 -0
- package/registry/alert-dialog/item.json +4 -0
- package/registry/aspect-ratio/aspect-ratio.tsx +71 -0
- package/registry/aspect-ratio/item.json +4 -0
- package/registry/attachment/attachment.tsx +459 -0
- package/registry/attachment/item.json +4 -0
- package/registry/avatar/avatar.tsx +385 -0
- package/registry/avatar/item.json +4 -0
- package/registry/badge/badge.tsx +108 -0
- package/registry/badge/item.json +4 -0
- package/registry/breadcrumb/breadcrumb.tsx +354 -0
- package/registry/breadcrumb/item.json +4 -0
- package/registry/bubble/bubble.tsx +260 -0
- package/registry/bubble/item.json +4 -0
- package/registry/button/button.tsx +125 -0
- package/registry/button/item.json +4 -0
- package/registry/button-group/button-group.tsx +189 -0
- package/registry/button-group/item.json +4 -0
- package/registry/calendar/calendar.tsx +348 -0
- package/registry/calendar/item.json +4 -0
- package/registry/card/card.tsx +311 -0
- package/registry/card/item.json +4 -0
- package/registry/carousel/carousel.tsx +851 -0
- package/registry/carousel/item.json +4 -0
- package/registry/chart/chart.tsx +1956 -0
- package/registry/chart/item.json +4 -0
- package/registry/chart-scale/chart-scale.ts +670 -0
- package/registry/chart-scale/item.json +5 -0
- package/registry/checkbox/checkbox.tsx +79 -0
- package/registry/checkbox/item.json +4 -0
- package/registry/code-block/code-block.tsx +470 -0
- package/registry/code-block/item.json +4 -0
- package/registry/collapsible/collapsible.tsx +117 -0
- package/registry/collapsible/item.json +4 -0
- package/registry/combobox/combobox.tsx +977 -0
- package/registry/combobox/item.json +4 -0
- package/registry/command/command.tsx +757 -0
- package/registry/command/item.json +4 -0
- package/registry/context-menu/context-menu.tsx +697 -0
- package/registry/context-menu/item.json +4 -0
- package/registry/data-table/data-table.tsx +437 -0
- package/registry/data-table/item.json +4 -0
- package/registry/date-picker/date-picker.tsx +349 -0
- package/registry/date-picker/item.json +4 -0
- package/registry/dialog/dialog.tsx +412 -0
- package/registry/dialog/item.json +4 -0
- package/registry/direction/direction.tsx +88 -0
- package/registry/direction/item.json +4 -0
- package/registry/drawer/drawer.tsx +787 -0
- package/registry/drawer/item.json +4 -0
- package/registry/dropdown-menu/dropdown-menu.tsx +692 -0
- package/registry/dropdown-menu/item.json +4 -0
- package/registry/empty/empty.tsx +240 -0
- package/registry/empty/item.json +4 -0
- package/registry/field/field.tsx +624 -0
- package/registry/field/item.json +4 -0
- package/registry/form/form.tsx +1112 -0
- package/registry/form/item.json +4 -0
- package/registry/hover-card/hover-card.tsx +144 -0
- package/registry/hover-card/item.json +4 -0
- package/registry/icons/icons.tsx +1691 -0
- package/registry/icons/item.json +4 -0
- package/registry/input/input.tsx +43 -0
- package/registry/input/item.json +4 -0
- package/registry/input-group/input-group.tsx +315 -0
- package/registry/input-group/item.json +4 -0
- package/registry/input-otp/input-otp.tsx +329 -0
- package/registry/input-otp/item.json +4 -0
- package/registry/item/item.json +4 -0
- package/registry/item/item.tsx +439 -0
- package/registry/kbd/item.json +4 -0
- package/registry/kbd/kbd.tsx +65 -0
- package/registry/label/item.json +4 -0
- package/registry/label/label.tsx +60 -0
- package/registry/marker/item.json +4 -0
- package/registry/marker/marker.tsx +175 -0
- package/registry/menubar/item.json +4 -0
- package/registry/menubar/menubar.tsx +694 -0
- package/registry/message/item.json +4 -0
- package/registry/message/message.tsx +280 -0
- package/registry/message-scroller/item.json +4 -0
- package/registry/message-scroller/message-scroller.tsx +262 -0
- package/registry/native-select/item.json +4 -0
- package/registry/native-select/native-select.tsx +113 -0
- package/registry/navigation-menu/item.json +4 -0
- package/registry/navigation-menu/navigation-menu.tsx +362 -0
- package/registry/pagination/item.json +4 -0
- package/registry/pagination/pagination.tsx +460 -0
- package/registry/password-input/item.json +5 -0
- package/registry/password-input/password-input.tsx +494 -0
- package/registry/popover/item.json +4 -0
- package/registry/popover/popover.tsx +284 -0
- package/registry/progress/item.json +4 -0
- package/registry/progress/progress.tsx +190 -0
- package/registry/questionnaire/item.json +4 -0
- package/registry/questionnaire/questionnaire.tsx +569 -0
- package/registry/radio-group/item.json +4 -0
- package/registry/radio-group/radio-group.tsx +101 -0
- package/registry/resizable/item.json +4 -0
- package/registry/resizable/resizable.tsx +455 -0
- package/registry/scroll-area/item.json +4 -0
- package/registry/scroll-area/scroll-area.tsx +149 -0
- package/registry/select/item.json +4 -0
- package/registry/select/select.tsx +571 -0
- package/registry/separator/item.json +4 -0
- package/registry/separator/separator.tsx +52 -0
- package/registry/sheet/item.json +4 -0
- package/registry/sheet/sheet.tsx +476 -0
- package/registry/sidebar/item.json +4 -0
- package/registry/sidebar/sidebar.tsx +1870 -0
- package/registry/skeleton/item.json +4 -0
- package/registry/skeleton/skeleton.tsx +47 -0
- package/registry/slider/item.json +4 -0
- package/registry/slider/slider.tsx +149 -0
- package/registry/spinner/item.json +4 -0
- package/registry/spinner/spinner.tsx +51 -0
- package/registry/switch/item.json +4 -0
- package/registry/switch/switch.tsx +93 -0
- package/registry/table/item.json +4 -0
- package/registry/table/table.tsx +373 -0
- package/registry/tabs/item.json +4 -0
- package/registry/tabs/tabs.tsx +209 -0
- package/registry/textarea/item.json +4 -0
- package/registry/textarea/textarea.tsx +51 -0
- package/registry/toast/item.json +4 -0
- package/registry/toast/toast.tsx +949 -0
- package/registry/toggle/item.json +4 -0
- package/registry/toggle/toggle.tsx +110 -0
- package/registry/toggle-group/item.json +4 -0
- package/registry/toggle-group/toggle-group.tsx +189 -0
- package/registry/tooltip/item.json +4 -0
- package/registry/tooltip/tooltip.tsx +169 -0
- package/registry/trace/item.json +4 -0
- package/registry/trace/trace.tsx +356 -0
- package/registry/ui-strings/item.json +5 -0
- package/registry/ui-strings/ui-strings.tsx +454 -0
- package/registry/use-highlighted-code/item.json +5 -0
- package/registry/use-highlighted-code/use-highlighted-code.tsx +145 -0
- package/registry/use-mobile/item.json +5 -0
- package/registry/use-mobile/use-mobile.ts +46 -0
- package/registry/utils/item.json +5 -0
- package/registry/utils/utils.ts +38 -0
- package/registry.json +3274 -0
- package/styles/animations.css +321 -0
- package/styles/theme-core.css +55 -0
- package/styles/theme.css +12 -0
- package/styles/themes/gray.css +69 -0
- package/styles/themes/neutral.css +69 -0
- package/styles/themes/slate.css +69 -0
- package/styles/themes/stone.css +69 -0
- package/styles/themes/zinc.css +69 -0
- package/styles/typeset.css +251 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* zinc base color. Generated by scripts/build-themes.mjs. */
|
|
2
|
+
:root {
|
|
3
|
+
--radius: 0.625rem;
|
|
4
|
+
--background: oklch(1 0 0);
|
|
5
|
+
--foreground: oklch(0.141 0.005 285.823);
|
|
6
|
+
--card: oklch(1 0 0);
|
|
7
|
+
--card-foreground: oklch(0.141 0.005 285.823);
|
|
8
|
+
--popover: oklch(1 0 0);
|
|
9
|
+
--popover-foreground: oklch(0.141 0.005 285.823);
|
|
10
|
+
--primary: oklch(0.21 0.006 285.885);
|
|
11
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
12
|
+
--secondary: oklch(0.967 0.001 286.375);
|
|
13
|
+
--secondary-foreground: oklch(0.21 0.006 285.885);
|
|
14
|
+
--muted: oklch(0.967 0.001 286.375);
|
|
15
|
+
--muted-foreground: oklch(0.442 0.017 285.786);
|
|
16
|
+
--accent: oklch(0.967 0.001 286.375);
|
|
17
|
+
--accent-foreground: oklch(0.21 0.006 285.885);
|
|
18
|
+
--destructive: oklch(0.546 0.22 27.325);
|
|
19
|
+
--border: oklch(0.92 0.004 286.32);
|
|
20
|
+
--input: oklch(0.92 0.004 286.32);
|
|
21
|
+
--ring: oklch(0.705 0.015 286.067);
|
|
22
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
23
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
24
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
25
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
26
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
27
|
+
--sidebar: oklch(0.985 0 0);
|
|
28
|
+
--sidebar-foreground: oklch(0.141 0.005 285.823);
|
|
29
|
+
--sidebar-primary: oklch(0.21 0.006 285.885);
|
|
30
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
31
|
+
--sidebar-accent: oklch(0.967 0.001 286.375);
|
|
32
|
+
--sidebar-accent-foreground: oklch(0.21 0.006 285.885);
|
|
33
|
+
--sidebar-border: oklch(0.92 0.004 286.32);
|
|
34
|
+
--sidebar-ring: oklch(0.705 0.015 286.067);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dark {
|
|
38
|
+
--background: oklch(0.141 0.005 285.823);
|
|
39
|
+
--foreground: oklch(0.985 0 0);
|
|
40
|
+
--card: oklch(0.21 0.006 285.885);
|
|
41
|
+
--card-foreground: oklch(0.985 0 0);
|
|
42
|
+
--popover: oklch(0.21 0.006 285.885);
|
|
43
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
44
|
+
--primary: oklch(0.92 0.004 286.32);
|
|
45
|
+
--primary-foreground: oklch(0.21 0.006 285.885);
|
|
46
|
+
--secondary: oklch(0.274 0.006 286.033);
|
|
47
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
48
|
+
--muted: oklch(0.274 0.006 286.033);
|
|
49
|
+
--muted-foreground: oklch(0.705 0.015 286.067);
|
|
50
|
+
--accent: oklch(0.274 0.006 286.033);
|
|
51
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
52
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
53
|
+
--border: oklch(1 0 0 / 10%);
|
|
54
|
+
--input: oklch(1 0 0 / 15%);
|
|
55
|
+
--ring: oklch(0.552 0.016 285.938);
|
|
56
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
57
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
58
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
59
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
60
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
61
|
+
--sidebar: oklch(0.21 0.006 285.885);
|
|
62
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
63
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
64
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
65
|
+
--sidebar-accent: oklch(0.274 0.006 286.033);
|
|
66
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
67
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
68
|
+
--sidebar-ring: oklch(0.552 0.016 285.938);
|
|
69
|
+
}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @shadow-js/ui typeset: one stylesheet for rendered text (a blog post, the docs, a streaming chat reply). Put the class `typeset`
|
|
3
|
+
* on the container and a preset class beside it (`typeset-docs`, `typeset-chat`); everything inside is styled, with no class on any child.
|
|
4
|
+
*
|
|
5
|
+
* @import "tailwindcss";
|
|
6
|
+
* @import "@shadow-js/ui/theme.css";
|
|
7
|
+
* @import "@shadow-js/ui/typeset.css";
|
|
8
|
+
*
|
|
9
|
+
* <article class="typeset typeset-docs">...</article>
|
|
10
|
+
*
|
|
11
|
+
* Three variables set the whole rhythm: `--typeset-size` (the base font size), `--typeset-leading` (the line height) and `--typeset-flow`
|
|
12
|
+
* (the space between blocks). Heading sizes, list indents and gaps are multiples of them, so one change rescales the text. A preset is a small class that
|
|
13
|
+
* sets the three; define your own for another place in the app.
|
|
14
|
+
*
|
|
15
|
+
* Colors, fonts and radius come from the theme tokens, so dark mode and the base color follow without a line here.
|
|
16
|
+
*
|
|
17
|
+
* Specificity is zero: every selector is wrapped in `:where()` and lives in the `components` layer, so a Tailwind utility or plain CSS wins without
|
|
18
|
+
* `!important`. Keep a component out with the class `not-typeset` or the attribute `data-not-typeset`; the exclusion covers its descendants.
|
|
19
|
+
*
|
|
20
|
+
* Streaming-safe: nothing here looks ahead. Space comes only from `margin-block-start` and never depends on a later sibling
|
|
21
|
+
* (no `:last-child`, `:has()` or `~`), so adding a block at the end of the container never restyles the blocks above it.
|
|
22
|
+
*
|
|
23
|
+
* Wide tables: wrap the table in an element with the class `typeset-scroll` so it scrolls sideways instead of squeezing.
|
|
24
|
+
* Right to left: only logical properties are used, so the text, lists and quotes flip with the page.
|
|
25
|
+
*/
|
|
26
|
+
@layer components {
|
|
27
|
+
:where(.typeset) {
|
|
28
|
+
--typeset-size: 1rem;
|
|
29
|
+
--typeset-leading: 1.7;
|
|
30
|
+
--typeset-flow: 1.25em;
|
|
31
|
+
font-size: var(--typeset-size);
|
|
32
|
+
line-height: var(--typeset-leading);
|
|
33
|
+
color: var(--foreground);
|
|
34
|
+
overflow-wrap: break-word;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where(.typeset-docs) {
|
|
38
|
+
--typeset-size: 1rem;
|
|
39
|
+
--typeset-leading: 1.75;
|
|
40
|
+
--typeset-flow: 1.25em;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where(.typeset-chat) {
|
|
44
|
+
--typeset-size: 0.9375rem;
|
|
45
|
+
--typeset-leading: 1.55;
|
|
46
|
+
--typeset-flow: 0.75em;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Space: only above a block, and not above the first one. */
|
|
50
|
+
:where(
|
|
51
|
+
.typeset
|
|
52
|
+
:is(p, ul, ol, dl, blockquote, pre, table, figure, hr, details, .typeset-scroll):not(
|
|
53
|
+
:where(.not-typeset, .not-typeset *, [data-not-typeset], [data-not-typeset] *)
|
|
54
|
+
):not(:first-child)
|
|
55
|
+
) {
|
|
56
|
+
margin-block-start: var(--typeset-flow);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:where(
|
|
60
|
+
.typeset
|
|
61
|
+
:is(h1, h2, h3, h4, h5, h6):not(
|
|
62
|
+
:where(.not-typeset, .not-typeset *, [data-not-typeset], [data-not-typeset] *)
|
|
63
|
+
)
|
|
64
|
+
) {
|
|
65
|
+
font-weight: 650;
|
|
66
|
+
letter-spacing: -0.015em;
|
|
67
|
+
text-wrap: balance;
|
|
68
|
+
scroll-margin-block-start: 5rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:where(
|
|
72
|
+
.typeset
|
|
73
|
+
:is(h1, h2, h3, h4, h5, h6):not(
|
|
74
|
+
:where(.not-typeset, .not-typeset *, [data-not-typeset], [data-not-typeset] *)
|
|
75
|
+
):not(:first-child)
|
|
76
|
+
) {
|
|
77
|
+
margin-block-start: calc(var(--typeset-flow) * 1.6);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:where(.typeset h1:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
81
|
+
font-size: 2.25em;
|
|
82
|
+
line-height: 1.15;
|
|
83
|
+
font-weight: 750;
|
|
84
|
+
letter-spacing: -0.025em;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:where(.typeset h2:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
88
|
+
font-size: 1.5em;
|
|
89
|
+
line-height: 1.25;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:where(.typeset h3:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
93
|
+
font-size: 1.25em;
|
|
94
|
+
line-height: 1.35;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:where(.typeset :is(h4, h5, h6):not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
98
|
+
font-size: 1em;
|
|
99
|
+
line-height: 1.5;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* A heading is followed by its text closely. */
|
|
103
|
+
:where(
|
|
104
|
+
.typeset
|
|
105
|
+
:is(h1, h2, h3, h4, h5, h6):not(:where(.not-typeset *, [data-not-typeset *]))
|
|
106
|
+
+ :is(p, ul, ol, pre, table, blockquote)
|
|
107
|
+
) {
|
|
108
|
+
margin-block-start: calc(var(--typeset-flow) * 0.6);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
:where(.typeset :is(ul, ol):not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
112
|
+
padding-inline-start: 1.5em;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
:where(.typeset ul:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
116
|
+
list-style: disc;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
:where(.typeset ol:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
120
|
+
list-style: decimal;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:where(.typeset li:not(:where(.not-typeset *, [data-not-typeset *]))::marker) {
|
|
124
|
+
color: var(--muted-foreground);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:where(.typeset li:not(:where(.not-typeset *, [data-not-typeset *])) + li) {
|
|
128
|
+
margin-block-start: 0.4em;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* A list inside a list item sits close to the item's own text. */
|
|
132
|
+
:where(.typeset li:not(:where(.not-typeset *, [data-not-typeset *])) > :is(ul, ol)) {
|
|
133
|
+
margin-block-start: 0.4em;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:where(.typeset a:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
137
|
+
color: var(--foreground);
|
|
138
|
+
font-weight: 500;
|
|
139
|
+
text-decoration-line: underline;
|
|
140
|
+
text-decoration-color: color-mix(in oklab, currentColor 35%, transparent);
|
|
141
|
+
text-underline-offset: 0.2em;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:where(.typeset a:not(:where(.not-typeset *, [data-not-typeset *])):hover) {
|
|
145
|
+
text-decoration-color: currentColor;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
:where(.typeset strong:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
149
|
+
font-weight: 650;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
:where(.typeset blockquote:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
153
|
+
border-inline-start: 3px solid var(--border);
|
|
154
|
+
padding-inline-start: 1em;
|
|
155
|
+
color: var(--muted-foreground);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:where(.typeset :not(pre) > code:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
159
|
+
font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, Consolas, monospace);
|
|
160
|
+
font-size: 0.875em;
|
|
161
|
+
padding: 0.15em 0.4em;
|
|
162
|
+
border-radius: calc(var(--radius) - 4px);
|
|
163
|
+
background-color: var(--muted);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:where(.typeset pre:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
167
|
+
font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, Consolas, monospace);
|
|
168
|
+
font-size: 0.875em;
|
|
169
|
+
line-height: 1.65;
|
|
170
|
+
padding: 0.9em 1.1em;
|
|
171
|
+
border: 1px solid var(--border);
|
|
172
|
+
border-radius: var(--radius);
|
|
173
|
+
background-color: var(--muted);
|
|
174
|
+
overflow-x: auto;
|
|
175
|
+
direction: ltr;
|
|
176
|
+
text-align: start;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
:where(.typeset pre:not(:where(.not-typeset *, [data-not-typeset *])) code) {
|
|
180
|
+
font: inherit;
|
|
181
|
+
padding: 0;
|
|
182
|
+
background: none;
|
|
183
|
+
border-radius: 0;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
:where(.typeset kbd:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
187
|
+
font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, Consolas, monospace);
|
|
188
|
+
font-size: 0.8em;
|
|
189
|
+
padding: 0.1em 0.45em;
|
|
190
|
+
border: 1px solid var(--border);
|
|
191
|
+
border-block-end-width: 2px;
|
|
192
|
+
border-radius: calc(var(--radius) - 4px);
|
|
193
|
+
background-color: var(--muted);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
:where(.typeset hr:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
197
|
+
border: 0;
|
|
198
|
+
border-block-start: 1px solid var(--border);
|
|
199
|
+
margin-block: calc(var(--typeset-flow) * 1.6) 0;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
:where(.typeset :is(img, video, svg):not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
203
|
+
max-inline-size: 100%;
|
|
204
|
+
block-size: auto;
|
|
205
|
+
border-radius: var(--radius);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
:where(.typeset figcaption:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
209
|
+
margin-block-start: 0.6em;
|
|
210
|
+
font-size: 0.875em;
|
|
211
|
+
color: var(--muted-foreground);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
:where(.typeset table:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
215
|
+
inline-size: 100%;
|
|
216
|
+
border-collapse: collapse;
|
|
217
|
+
font-size: 0.9375em;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
:where(.typeset :is(th, td):not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
221
|
+
padding: 0.5em 0.75em;
|
|
222
|
+
text-align: start;
|
|
223
|
+
border-block-end: 1px solid var(--border);
|
|
224
|
+
vertical-align: top;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
:where(.typeset th:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
228
|
+
font-weight: 600;
|
|
229
|
+
color: var(--foreground);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
:where(.typeset .typeset-scroll) {
|
|
233
|
+
overflow-x: auto;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
:where(.typeset .typeset-scroll > table) {
|
|
237
|
+
min-inline-size: max-content;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
:where(.typeset :is(mark):not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
241
|
+
background-color: color-mix(in oklab, var(--primary) 18%, transparent);
|
|
242
|
+
color: inherit;
|
|
243
|
+
border-radius: 0.2em;
|
|
244
|
+
padding-inline: 0.15em;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
:where(.typeset small:not(:where(.not-typeset *, [data-not-typeset *]))) {
|
|
248
|
+
font-size: 0.875em;
|
|
249
|
+
color: var(--muted-foreground);
|
|
250
|
+
}
|
|
251
|
+
}
|