Skip to content

Commit ded23e7

Browse files
committed
fix(tailwind): add 20 missing classes to STREAMDOWN_CLASSES; remove duplicate 'dist' in package.json files
Addresses VADE review comments: - STREAMDOWN_CLASSES was missing 20 Tailwind utility classes actively used in source: -mt-10, [&>p]:inline, [&_svg]:h-auto/w-auto, [counter-*:line_0/line], [li_&]:pl-6, before:content-[counter(line)], bg-[var(--sdm-bg,*)], bg-[var(--sdm-tbg)], border, dark:bg/text CSS-var variants, list-decimal/disc/inside, rounded, sticky, text-[var(--sdm-c,inherit)] - package.json: removed duplicate 'dist' entry from files array - tailwind.ts: sort exports (biome organizeImports)
1 parent 69ab509 commit ded23e7

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

packages/streamdown/lib/tailwind-classes.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,19 @@
77
* you need a custom prefix. See the README for details.
88
*/
99
export const STREAMDOWN_CLASSES: readonly string[] = [
10+
"-mt-10",
11+
"[&>p]:inline",
12+
"[&_svg]:h-auto",
13+
"[&_svg]:w-auto",
14+
"[counter-increment:line_0]",
15+
"[counter-reset:line]",
16+
"[li_&]:pl-6",
1017
"absolute",
1118
"animate-spin",
1219
"appearance-none",
1320
"backdrop-blur-sm",
1421
"before:[counter-increment:line]",
22+
"before:content-[counter(line)]",
1523
"before:font-mono",
1624
"before:inline-block",
1725
"before:mr-4",
@@ -20,6 +28,8 @@ export const STREAMDOWN_CLASSES: readonly string[] = [
2028
"before:text-muted-foreground/50",
2129
"before:text-right",
2230
"before:w-6",
31+
"bg-[var(--sdm-bg,inherit]",
32+
"bg-[var(--sdm-tbg)]",
2333
"bg-background",
2434
"bg-background/50",
2535
"bg-background/80",
@@ -35,6 +45,7 @@ export const STREAMDOWN_CLASSES: readonly string[] = [
3545
"bg-sidebar",
3646
"bg-sidebar/80",
3747
"block",
48+
"border",
3849
"border-b",
3950
"border-b-2",
4051
"border-border",
@@ -49,6 +60,9 @@ export const STREAMDOWN_CLASSES: readonly string[] = [
4960
"bottom-4",
5061
"break-all",
5162
"cursor-pointer",
63+
"dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]",
64+
"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]",
65+
"dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",
5266
"disabled:cursor-not-allowed",
5367
"disabled:opacity-50",
5468
"divide-border",
@@ -89,6 +103,9 @@ export const STREAMDOWN_CLASSES: readonly string[] = [
89103
"justify-end",
90104
"left-2",
91105
"left-4",
106+
"list-decimal",
107+
"list-disc",
108+
"list-inside",
92109
"lowercase",
93110
"max-h-32",
94111
"max-w-full",
@@ -129,6 +146,7 @@ export const STREAMDOWN_CLASSES: readonly string[] = [
129146
"right-0",
130147
"right-2",
131148
"right-4",
149+
"rounded",
132150
"rounded-full",
133151
"rounded-lg",
134152
"rounded-md",
@@ -141,12 +159,14 @@ export const STREAMDOWN_CLASSES: readonly string[] = [
141159
"space-x-2",
142160
"space-y-2",
143161
"space-y-4",
162+
"sticky",
144163
"supports-[backdrop-filter]:backdrop-blur",
145164
"supports-[backdrop-filter]:backdrop-blur-sm",
146165
"supports-[backdrop-filter]:bg-background/70",
147166
"supports-[backdrop-filter]:bg-sidebar/70",
148167
"text-2xl",
149168
"text-3xl",
169+
"text-[var(--sdm-c,inherit)]",
150170
"text-base",
151171
"text-left",
152172
"text-lg",

packages/streamdown/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"files": [
2020
"dist",
2121
"styles.css",
22-
"README.md",
23-
"dist"
22+
"README.md"
2423
],
2524
"homepage": "https://streamdown.ai",
2625
"repository": {

packages/streamdown/tailwind.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { STREAMDOWN_CLASSES, getSourceInline } from "./lib/tailwind-classes";
1+
export { getSourceInline, STREAMDOWN_CLASSES } from "./lib/tailwind-classes";

0 commit comments

Comments
 (0)