@frontlit/page-builder 0.1.0-alpha.2 → 0.1.0-alpha.4
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/README.md +32 -0
- package/dist/blocks/index.d.ts +33 -21
- package/dist/blocks/index.js +3 -3
- package/dist/builder/index.d.ts +7 -8
- package/dist/builder/index.js +6 -5
- package/dist/{button-Bzt1GDO-.d.ts → button-OLKN3wPf.d.ts} +2 -2
- package/dist/{chunk-H4P5MFJI.js → chunk-36QHCIPM.js} +205 -251
- package/dist/chunk-36QHCIPM.js.map +1 -0
- package/dist/chunk-BBI7UHOA.js +56 -0
- package/dist/chunk-BBI7UHOA.js.map +1 -0
- package/dist/{chunk-KQKSLI3L.js → chunk-GIKTOAQS.js} +335 -122
- package/dist/chunk-GIKTOAQS.js.map +1 -0
- package/dist/chunk-HWOVSHIW.js +4 -0
- package/dist/{chunk-RUYOL7JZ.js.map → chunk-HWOVSHIW.js.map} +1 -1
- package/dist/{chunk-HDINUNI2.js → chunk-IU4KATI2.js} +69 -96
- package/dist/chunk-IU4KATI2.js.map +1 -0
- package/dist/{chunk-SGNRWWG3.js → chunk-J7Z4UW45.js} +530 -135
- package/dist/chunk-J7Z4UW45.js.map +1 -0
- package/dist/{chunk-UO7XGBGM.js → chunk-K4WCLHMS.js} +1182 -1033
- package/dist/chunk-K4WCLHMS.js.map +1 -0
- package/dist/components/index.d.ts +33 -8
- package/dist/components/index.js +42 -2
- package/dist/components/index.js.map +1 -1
- package/dist/data-slots.d.ts +3 -3
- package/dist/fonts/archivo/archivo-latin-variable.woff2 +0 -0
- package/dist/fonts/hanken-grotesk/hanken-grotesk-latin-variable.woff2 +0 -0
- package/dist/fonts/jetbrains-mono/jetbrains-mono-latin-variable.woff2 +0 -0
- package/dist/fonts/spline-sans-mono/spline-sans-mono-latin-variable.woff2 +0 -0
- package/dist/heading-DQCxQt38.d.ts +20 -0
- package/dist/image-Bk8kPXwP.d.ts +52 -0
- package/dist/index.d.ts +17 -10
- package/dist/index.js +7 -6
- package/dist/models/index.d.ts +5 -5
- package/dist/models/index.js +1 -1
- package/dist/{page-W3hQga4w.d.ts → page-B5Gmm-Ys.d.ts} +1 -1
- package/dist/primitives/index.d.ts +44 -9
- package/dist/primitives/index.js +1 -1
- package/dist/renderer/index.d.ts +12 -8
- package/dist/renderer/index.js +5 -4
- package/dist/{section-background-MsdE40Rk.d.ts → section-background-6V_LCi5e.d.ts} +1 -1
- package/dist/server/index.d.ts +103 -0
- package/dist/server/index.js +2649 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/islands/code-snippet.d.ts +17 -0
- package/dist/server/islands/code-snippet.js +72 -0
- package/dist/server/islands/code-snippet.js.map +1 -0
- package/dist/server/islands/email-form.d.ts +50 -0
- package/dist/server/islands/email-form.js +406 -0
- package/dist/server/islands/email-form.js.map +1 -0
- package/dist/server/islands/header-mobile-menu.d.ts +22 -0
- package/dist/server/islands/header-mobile-menu.js +422 -0
- package/dist/server/islands/header-mobile-menu.js.map +1 -0
- package/dist/server/islands/inline-embed.d.ts +28 -0
- package/dist/server/islands/inline-embed.js +84 -0
- package/dist/server/islands/inline-embed.js.map +1 -0
- package/dist/server/islands/marquee-track.d.ts +18 -0
- package/dist/server/islands/marquee-track.js +67 -0
- package/dist/server/islands/marquee-track.js.map +1 -0
- package/dist/server/islands/nav-link.d.ts +37 -0
- package/dist/server/islands/nav-link.js +67 -0
- package/dist/server/islands/nav-link.js.map +1 -0
- package/dist/server/islands/support-form.d.ts +17 -0
- package/dist/server/islands/support-form.js +469 -0
- package/dist/server/islands/support-form.js.map +1 -0
- package/dist/server/islands/theme-mode-switcher.d.ts +38 -0
- package/dist/server/islands/theme-mode-switcher.js +169 -0
- package/dist/server/islands/theme-mode-switcher.js.map +1 -0
- package/dist/server/islands/video-with-preview.d.ts +13 -0
- package/dist/server/islands/video-with-preview.js +269 -0
- package/dist/server/islands/video-with-preview.js.map +1 -0
- package/dist/server/primitives.d.ts +200 -0
- package/dist/server/primitives.js +888 -0
- package/dist/server/primitives.js.map +1 -0
- package/dist/server/schema.d.ts +11308 -0
- package/dist/server/schema.js +6179 -0
- package/dist/server/schema.js.map +1 -0
- package/dist/server/theme-CF3fIKvw.d.ts +9 -0
- package/dist/server/theme-style-5_AGy-4V.d.ts +183 -0
- package/dist/server/theme-style-BPaMwk88.d.ts +183 -0
- package/dist/server/theme.d.ts +28 -0
- package/dist/server/theme.js +1671 -0
- package/dist/server/theme.js.map +1 -0
- package/dist/server/widget-YH9BrOwY.d.ts +77 -0
- package/dist/styles.css +121 -15
- package/dist/{theme-style-Cbl7NM-T.d.ts → theme-style-BVd5tOsc.d.ts} +20 -0
- package/dist/theme.css +12 -0
- package/dist/{widget-B_RoG6se.d.ts → widget-CpE2HdgU.d.ts} +17 -14
- package/package.json +60 -12
- package/schema/page.v1.json +3855 -0
- package/schema/site.v1.json +3811 -0
- package/dist/alignment-dZDzN96G.d.ts +0 -5
- package/dist/chunk-H4P5MFJI.js.map +0 -1
- package/dist/chunk-HDINUNI2.js.map +0 -1
- package/dist/chunk-KQKSLI3L.js.map +0 -1
- package/dist/chunk-RUYOL7JZ.js +0 -4
- package/dist/chunk-SGNRWWG3.js.map +0 -1
- package/dist/chunk-UO7XGBGM.js.map +0 -1
- package/dist/image-DAWVx1zQ.d.ts +0 -31
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
type FontWeight = "font-thin" | "font-extralight" | "font-light" | "font-normal" | "font-medium" | "font-semibold" | "font-bold" | "font-extrabold" | "font-black";
|
|
2
|
+
type FontSize = "text-xs" | "text-sm" | "text-base" | "text-lg" | "text-xl" | "text-2xl" | "text-3xl" | "text-4xl" | "text-5xl" | "text-6xl" | "text-7xl" | "text-8xl" | "text-9xl";
|
|
3
|
+
type LineHeight = "leading-none" | "leading-tight" | "leading-snug" | "leading-normal" | "leading-relaxed" | "leading-loose";
|
|
4
|
+
type LetterSpacing = "tracking-tighter" | "tracking-tight" | "tracking-normal" | "tracking-wide" | "tracking-wider" | "tracking-widest";
|
|
5
|
+
type TextTransform = "uppercase" | "lowercase" | "capitalize" | "normal-case";
|
|
6
|
+
type TextDecoration = "underline" | "line-through" | "no-underline";
|
|
7
|
+
type TextOverflow = "truncate" | "text-ellipsis" | "text-clip";
|
|
8
|
+
type BorderRadius = "rounded-none" | "rounded-sm" | "rounded" | "rounded-md" | "rounded-lg" | "rounded-xl" | "rounded-2xl" | "rounded-3xl" | "rounded-full";
|
|
9
|
+
type Shadow = "shadow-2xs" | "shadow-xs" | "shadow-sm" | "shadow-md" | "shadow-lg" | "shadow-xl" | "shadow-2xl" | "shadow-none";
|
|
10
|
+
type Cursor = "cursor-not-allowed" | "cursor-default" | "cursor-pointer";
|
|
11
|
+
interface Typography {
|
|
12
|
+
fontFamily: string;
|
|
13
|
+
fontSize: FontSize;
|
|
14
|
+
fontWeight: FontWeight;
|
|
15
|
+
lineHeight?: LineHeight;
|
|
16
|
+
letterSpacing?: LetterSpacing;
|
|
17
|
+
textTransform?: TextTransform;
|
|
18
|
+
textDecoration?: TextDecoration;
|
|
19
|
+
textOverflow?: TextOverflow;
|
|
20
|
+
/**
|
|
21
|
+
* Fluid size in px: scales from `min` on a phone to `max` on a desktop
|
|
22
|
+
* and overrides `fontSize`. Honoured by the heading levels.
|
|
23
|
+
*/
|
|
24
|
+
fluid?: {
|
|
25
|
+
min: number;
|
|
26
|
+
max: number;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
interface Border {
|
|
30
|
+
width?: "border" | "border-0" | "border-2" | "border-4" | "border-8";
|
|
31
|
+
radius?: BorderRadius;
|
|
32
|
+
style?: "border-solid" | "border-dashed" | "border-dotted" | "border-double" | "border-hidden" | "border-none";
|
|
33
|
+
}
|
|
34
|
+
interface Padding {
|
|
35
|
+
x?: "px-0" | "px-1" | "px-2" | "px-3" | "px-4" | "px-5" | "px-6" | "px-8" | "px-10" | "px-12" | "px-16" | "px-20" | "px-24" | "px-32" | "px-40" | "px-48" | "px-56" | "px-64";
|
|
36
|
+
y?: "py-0" | "py-1" | "py-2" | "py-3" | "py-4" | "py-5" | "py-6" | "py-8" | "py-10" | "py-12" | "py-16" | "py-20" | "py-24" | "py-32" | "py-40" | "py-48" | "py-56" | "py-64";
|
|
37
|
+
}
|
|
38
|
+
type CustomStyle = string;
|
|
39
|
+
interface DisabledStyle {
|
|
40
|
+
color?: string;
|
|
41
|
+
background?: string;
|
|
42
|
+
border?: string;
|
|
43
|
+
opacity?: "opacity-50" | "opacity-75" | "opacity-100";
|
|
44
|
+
cursor?: Cursor;
|
|
45
|
+
}
|
|
46
|
+
interface MenuItemStyle {
|
|
47
|
+
padding?: Padding;
|
|
48
|
+
border?: Border;
|
|
49
|
+
custom?: CustomStyle;
|
|
50
|
+
}
|
|
51
|
+
interface MenuStyle {
|
|
52
|
+
padding?: Padding;
|
|
53
|
+
border?: Border;
|
|
54
|
+
shadow?: Shadow;
|
|
55
|
+
custom?: CustomStyle;
|
|
56
|
+
item?: MenuItemStyle;
|
|
57
|
+
}
|
|
58
|
+
interface SurfaceStyle {
|
|
59
|
+
padding?: Padding;
|
|
60
|
+
border?: Border;
|
|
61
|
+
shadow?: Shadow;
|
|
62
|
+
custom?: CustomStyle;
|
|
63
|
+
}
|
|
64
|
+
interface Colors {
|
|
65
|
+
background: string;
|
|
66
|
+
foreground: string;
|
|
67
|
+
card: string;
|
|
68
|
+
cardForeground: string;
|
|
69
|
+
popover: string;
|
|
70
|
+
popoverForeground: string;
|
|
71
|
+
primary: string;
|
|
72
|
+
primaryForeground: string;
|
|
73
|
+
secondary: string;
|
|
74
|
+
secondaryForeground: string;
|
|
75
|
+
muted: string;
|
|
76
|
+
mutedForeground: string;
|
|
77
|
+
accent: string;
|
|
78
|
+
accentForeground: string;
|
|
79
|
+
destructive: string;
|
|
80
|
+
border: string;
|
|
81
|
+
input: string;
|
|
82
|
+
ring: string;
|
|
83
|
+
chart1: string;
|
|
84
|
+
chart2: string;
|
|
85
|
+
chart3: string;
|
|
86
|
+
chart4: string;
|
|
87
|
+
chart5: string;
|
|
88
|
+
sidebar: string;
|
|
89
|
+
sidebarForeground: string;
|
|
90
|
+
sidebarPrimary: string;
|
|
91
|
+
sidebarPrimaryForeground: string;
|
|
92
|
+
sidebarAccent: string;
|
|
93
|
+
sidebarAccentForeground: string;
|
|
94
|
+
sidebarBorder: string;
|
|
95
|
+
sidebarRing: string;
|
|
96
|
+
shadow2xs: string;
|
|
97
|
+
shadowXs: string;
|
|
98
|
+
shadowSm: string;
|
|
99
|
+
shadowMd: string;
|
|
100
|
+
shadowLg: string;
|
|
101
|
+
shadowXl: string;
|
|
102
|
+
shadow2xl: string;
|
|
103
|
+
}
|
|
104
|
+
interface ThemeStyle {
|
|
105
|
+
colors: {
|
|
106
|
+
light: Colors;
|
|
107
|
+
dark: Colors;
|
|
108
|
+
};
|
|
109
|
+
typography: {
|
|
110
|
+
preheader: Typography;
|
|
111
|
+
/** Hero-sized headline. Optional for older themes; falls back to `header1`. */
|
|
112
|
+
display?: Typography;
|
|
113
|
+
header1: Typography;
|
|
114
|
+
header2: Typography;
|
|
115
|
+
header3: Typography;
|
|
116
|
+
header4: Typography;
|
|
117
|
+
subheader1: Typography;
|
|
118
|
+
subheader2: Typography;
|
|
119
|
+
text1: Typography;
|
|
120
|
+
text2: Typography;
|
|
121
|
+
link: Typography;
|
|
122
|
+
button: Typography;
|
|
123
|
+
input: Typography;
|
|
124
|
+
caption: Typography;
|
|
125
|
+
/** Code snippets. Optional; defaults to JetBrains Mono. */
|
|
126
|
+
code?: Typography;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* How words wrapped in *asterisks* in a block title stand out: in the
|
|
130
|
+
* primary colour ("color", the default) or on a primary-coloured marker
|
|
131
|
+
* ("marker") for themes whose primary is close to the text colour.
|
|
132
|
+
*/
|
|
133
|
+
highlight?: "color" | "marker";
|
|
134
|
+
interactives: {
|
|
135
|
+
button: {
|
|
136
|
+
padding?: Padding;
|
|
137
|
+
border?: Border;
|
|
138
|
+
shadow?: Shadow;
|
|
139
|
+
custom?: CustomStyle;
|
|
140
|
+
disabled?: DisabledStyle;
|
|
141
|
+
};
|
|
142
|
+
menu?: MenuStyle;
|
|
143
|
+
dialog?: SurfaceStyle;
|
|
144
|
+
popover?: SurfaceStyle;
|
|
145
|
+
tooltip?: SurfaceStyle;
|
|
146
|
+
link: {
|
|
147
|
+
padding?: Padding;
|
|
148
|
+
border?: Border;
|
|
149
|
+
textShadow?: string;
|
|
150
|
+
custom?: CustomStyle;
|
|
151
|
+
disabled?: DisabledStyle;
|
|
152
|
+
};
|
|
153
|
+
card: {
|
|
154
|
+
padding?: Padding;
|
|
155
|
+
border?: Border;
|
|
156
|
+
shadow?: Shadow;
|
|
157
|
+
custom?: CustomStyle;
|
|
158
|
+
};
|
|
159
|
+
input: {
|
|
160
|
+
borderRadius?: BorderRadius;
|
|
161
|
+
padding?: Padding;
|
|
162
|
+
border?: Border;
|
|
163
|
+
shadow?: Shadow;
|
|
164
|
+
custom?: CustomStyle;
|
|
165
|
+
disabled?: DisabledStyle;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
structure: {
|
|
169
|
+
page: {
|
|
170
|
+
width: "max-w-2xl" | "max-w-3xl" | "max-w-4xl" | "max-w-5xl" | "max-w-6xl";
|
|
171
|
+
};
|
|
172
|
+
section: {
|
|
173
|
+
/** Draw a 1px hairline between sections. */
|
|
174
|
+
dividers?: boolean;
|
|
175
|
+
padding: {
|
|
176
|
+
x: "px-0" | "px-4" | "px-6" | "px-8" | "px-10" | "px-12" | "px-16" | "px-20" | "px-24" | "px-32" | "px-40" | "px-48" | "px-56" | "px-64";
|
|
177
|
+
y: "py-0" | "py-4" | "py-6" | "py-8" | "py-10" | "py-12" | "py-16" | "py-20" | "py-24" | "py-32" | "py-40" | "py-48" | "py-56" | "py-64";
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export type { ThemeStyle as T };
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
type FontWeight = "font-thin" | "font-extralight" | "font-light" | "font-normal" | "font-medium" | "font-semibold" | "font-bold" | "font-extrabold" | "font-black";
|
|
2
|
+
type FontSize = "text-xs" | "text-sm" | "text-base" | "text-lg" | "text-xl" | "text-2xl" | "text-3xl" | "text-4xl" | "text-5xl" | "text-6xl" | "text-7xl" | "text-8xl" | "text-9xl";
|
|
3
|
+
type LineHeight = "leading-none" | "leading-tight" | "leading-snug" | "leading-normal" | "leading-relaxed" | "leading-loose";
|
|
4
|
+
type LetterSpacing = "tracking-tighter" | "tracking-tight" | "tracking-normal" | "tracking-wide" | "tracking-wider" | "tracking-widest";
|
|
5
|
+
type TextTransform = "uppercase" | "lowercase" | "capitalize" | "normal-case";
|
|
6
|
+
type TextDecoration = "underline" | "line-through" | "no-underline";
|
|
7
|
+
type TextOverflow = "truncate" | "text-ellipsis" | "text-clip";
|
|
8
|
+
type BorderRadius = "rounded-none" | "rounded-sm" | "rounded" | "rounded-md" | "rounded-lg" | "rounded-xl" | "rounded-2xl" | "rounded-3xl" | "rounded-full";
|
|
9
|
+
type Shadow = "shadow-2xs" | "shadow-xs" | "shadow-sm" | "shadow-md" | "shadow-lg" | "shadow-xl" | "shadow-2xl" | "shadow-none";
|
|
10
|
+
type Cursor = "cursor-not-allowed" | "cursor-default" | "cursor-pointer";
|
|
11
|
+
interface Typography {
|
|
12
|
+
fontFamily: string;
|
|
13
|
+
fontSize: FontSize;
|
|
14
|
+
fontWeight: FontWeight;
|
|
15
|
+
lineHeight?: LineHeight;
|
|
16
|
+
letterSpacing?: LetterSpacing;
|
|
17
|
+
textTransform?: TextTransform;
|
|
18
|
+
textDecoration?: TextDecoration;
|
|
19
|
+
textOverflow?: TextOverflow;
|
|
20
|
+
/**
|
|
21
|
+
* Fluid size in px: scales from `min` on a phone to `max` on a desktop
|
|
22
|
+
* and overrides `fontSize`. Honoured by the heading levels.
|
|
23
|
+
*/
|
|
24
|
+
fluid?: {
|
|
25
|
+
min: number;
|
|
26
|
+
max: number;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
interface Border {
|
|
30
|
+
width?: "border" | "border-0" | "border-2" | "border-4" | "border-8";
|
|
31
|
+
radius?: BorderRadius;
|
|
32
|
+
style?: "border-solid" | "border-dashed" | "border-dotted" | "border-double" | "border-hidden" | "border-none";
|
|
33
|
+
}
|
|
34
|
+
interface Padding {
|
|
35
|
+
x?: "px-0" | "px-1" | "px-2" | "px-3" | "px-4" | "px-5" | "px-6" | "px-8" | "px-10" | "px-12" | "px-16" | "px-20" | "px-24" | "px-32" | "px-40" | "px-48" | "px-56" | "px-64";
|
|
36
|
+
y?: "py-0" | "py-1" | "py-2" | "py-3" | "py-4" | "py-5" | "py-6" | "py-8" | "py-10" | "py-12" | "py-16" | "py-20" | "py-24" | "py-32" | "py-40" | "py-48" | "py-56" | "py-64";
|
|
37
|
+
}
|
|
38
|
+
type CustomStyle = string;
|
|
39
|
+
interface DisabledStyle {
|
|
40
|
+
color?: string;
|
|
41
|
+
background?: string;
|
|
42
|
+
border?: string;
|
|
43
|
+
opacity?: "opacity-50" | "opacity-75" | "opacity-100";
|
|
44
|
+
cursor?: Cursor;
|
|
45
|
+
}
|
|
46
|
+
interface MenuItemStyle {
|
|
47
|
+
padding?: Padding;
|
|
48
|
+
border?: Border;
|
|
49
|
+
custom?: CustomStyle;
|
|
50
|
+
}
|
|
51
|
+
interface MenuStyle {
|
|
52
|
+
padding?: Padding;
|
|
53
|
+
border?: Border;
|
|
54
|
+
shadow?: Shadow;
|
|
55
|
+
custom?: CustomStyle;
|
|
56
|
+
item?: MenuItemStyle;
|
|
57
|
+
}
|
|
58
|
+
interface SurfaceStyle {
|
|
59
|
+
padding?: Padding;
|
|
60
|
+
border?: Border;
|
|
61
|
+
shadow?: Shadow;
|
|
62
|
+
custom?: CustomStyle;
|
|
63
|
+
}
|
|
64
|
+
interface Colors {
|
|
65
|
+
background: string;
|
|
66
|
+
foreground: string;
|
|
67
|
+
card: string;
|
|
68
|
+
cardForeground: string;
|
|
69
|
+
popover: string;
|
|
70
|
+
popoverForeground: string;
|
|
71
|
+
primary: string;
|
|
72
|
+
primaryForeground: string;
|
|
73
|
+
secondary: string;
|
|
74
|
+
secondaryForeground: string;
|
|
75
|
+
muted: string;
|
|
76
|
+
mutedForeground: string;
|
|
77
|
+
accent: string;
|
|
78
|
+
accentForeground: string;
|
|
79
|
+
destructive: string;
|
|
80
|
+
border: string;
|
|
81
|
+
input: string;
|
|
82
|
+
ring: string;
|
|
83
|
+
chart1: string;
|
|
84
|
+
chart2: string;
|
|
85
|
+
chart3: string;
|
|
86
|
+
chart4: string;
|
|
87
|
+
chart5: string;
|
|
88
|
+
sidebar: string;
|
|
89
|
+
sidebarForeground: string;
|
|
90
|
+
sidebarPrimary: string;
|
|
91
|
+
sidebarPrimaryForeground: string;
|
|
92
|
+
sidebarAccent: string;
|
|
93
|
+
sidebarAccentForeground: string;
|
|
94
|
+
sidebarBorder: string;
|
|
95
|
+
sidebarRing: string;
|
|
96
|
+
shadow2xs: string;
|
|
97
|
+
shadowXs: string;
|
|
98
|
+
shadowSm: string;
|
|
99
|
+
shadowMd: string;
|
|
100
|
+
shadowLg: string;
|
|
101
|
+
shadowXl: string;
|
|
102
|
+
shadow2xl: string;
|
|
103
|
+
}
|
|
104
|
+
interface ThemeStyle {
|
|
105
|
+
colors: {
|
|
106
|
+
light: Colors;
|
|
107
|
+
dark: Colors;
|
|
108
|
+
};
|
|
109
|
+
typography: {
|
|
110
|
+
preheader: Typography;
|
|
111
|
+
/** Hero-sized headline. Optional for older themes; falls back to `header1`. */
|
|
112
|
+
display?: Typography;
|
|
113
|
+
header1: Typography;
|
|
114
|
+
header2: Typography;
|
|
115
|
+
header3: Typography;
|
|
116
|
+
header4: Typography;
|
|
117
|
+
subheader1: Typography;
|
|
118
|
+
subheader2: Typography;
|
|
119
|
+
text1: Typography;
|
|
120
|
+
text2: Typography;
|
|
121
|
+
link: Typography;
|
|
122
|
+
button: Typography;
|
|
123
|
+
input: Typography;
|
|
124
|
+
caption: Typography;
|
|
125
|
+
/** Code snippets. Optional; defaults to JetBrains Mono. */
|
|
126
|
+
code?: Typography;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* How words wrapped in *asterisks* in a block title stand out: in the
|
|
130
|
+
* primary colour ("color", the default) or on a primary-coloured marker
|
|
131
|
+
* ("marker") for themes whose primary is close to the text colour.
|
|
132
|
+
*/
|
|
133
|
+
highlight?: "color" | "marker";
|
|
134
|
+
interactives: {
|
|
135
|
+
button: {
|
|
136
|
+
padding?: Padding;
|
|
137
|
+
border?: Border;
|
|
138
|
+
shadow?: Shadow;
|
|
139
|
+
custom?: CustomStyle;
|
|
140
|
+
disabled?: DisabledStyle;
|
|
141
|
+
};
|
|
142
|
+
menu?: MenuStyle;
|
|
143
|
+
dialog?: SurfaceStyle;
|
|
144
|
+
popover?: SurfaceStyle;
|
|
145
|
+
tooltip?: SurfaceStyle;
|
|
146
|
+
link: {
|
|
147
|
+
padding?: Padding;
|
|
148
|
+
border?: Border;
|
|
149
|
+
textShadow?: string;
|
|
150
|
+
custom?: CustomStyle;
|
|
151
|
+
disabled?: DisabledStyle;
|
|
152
|
+
};
|
|
153
|
+
card: {
|
|
154
|
+
padding?: Padding;
|
|
155
|
+
border?: Border;
|
|
156
|
+
shadow?: Shadow;
|
|
157
|
+
custom?: CustomStyle;
|
|
158
|
+
};
|
|
159
|
+
input: {
|
|
160
|
+
borderRadius?: BorderRadius;
|
|
161
|
+
padding?: Padding;
|
|
162
|
+
border?: Border;
|
|
163
|
+
shadow?: Shadow;
|
|
164
|
+
custom?: CustomStyle;
|
|
165
|
+
disabled?: DisabledStyle;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
structure: {
|
|
169
|
+
page: {
|
|
170
|
+
width: "max-w-2xl" | "max-w-3xl" | "max-w-4xl" | "max-w-5xl" | "max-w-6xl";
|
|
171
|
+
};
|
|
172
|
+
section: {
|
|
173
|
+
/** Draw a 1px hairline between sections. */
|
|
174
|
+
dividers?: boolean;
|
|
175
|
+
padding: {
|
|
176
|
+
x: "px-0" | "px-4" | "px-6" | "px-8" | "px-10" | "px-12" | "px-16" | "px-20" | "px-24" | "px-32" | "px-40" | "px-48" | "px-56" | "px-64";
|
|
177
|
+
y: "py-0" | "py-4" | "py-6" | "py-8" | "py-10" | "py-12" | "py-16" | "py-20" | "py-24" | "py-32" | "py-40" | "py-48" | "py-56" | "py-64";
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export type { ThemeStyle as T, Typography as a };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { T as Theme } from './theme-CF3fIKvw.js';
|
|
2
|
+
import './theme-style-BPaMwk88.js';
|
|
3
|
+
|
|
4
|
+
declare const themes: Theme[];
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Generates full CSS color values for the custom properties every primitive
|
|
8
|
+
* reads. Full colors (rather than bare HSL channels) let the renderer coexist
|
|
9
|
+
* with Tailwind v4 hosts whose semantic utilities use `var(--primary)` while
|
|
10
|
+
* still accepting CourseLit-derived hex theme data.
|
|
11
|
+
*
|
|
12
|
+
* Callers rendering more than one theme in a document should pass a unique
|
|
13
|
+
* selector so one renderer cannot overwrite another renderer's variables.
|
|
14
|
+
*/
|
|
15
|
+
declare function generateThemeStyles(theme: Theme, selector?: string): string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Theme helpers that are safe to call from React Server Components and light
|
|
19
|
+
* enough to import from client components (the site's chat widget does).
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Picks the theme a site paints with: a custom `themeStyle` wins, then the
|
|
24
|
+
* stock theme named by `themeId`, then the default theme.
|
|
25
|
+
*/
|
|
26
|
+
declare function resolveTheme(themeId: string | null, themeStyle: Record<string, unknown> | null): Theme;
|
|
27
|
+
|
|
28
|
+
export { generateThemeStyles, resolveTheme, themes };
|