@dogsbay/render-html 0.0.0-stage → 0.2.0-beta.116

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.
@@ -0,0 +1,239 @@
1
+ /* Generated by packages/render-html/scripts/sync-sources.mjs from @dogsbay/format-astro (themeCss("default")). Do not edit. */
2
+ @custom-variant dark (&:where(.dark, .dark *));
3
+
4
+ @theme inline {
5
+ --color-background: var(--background);
6
+ --color-foreground: var(--foreground);
7
+ --color-card: var(--card);
8
+ --color-card-foreground: var(--card-foreground);
9
+ --color-popover: var(--popover);
10
+ --color-popover-foreground: var(--popover-foreground);
11
+ --color-primary: var(--primary);
12
+ --color-primary-foreground: var(--primary-foreground);
13
+ --color-secondary: var(--secondary);
14
+ --color-secondary-foreground: var(--secondary-foreground);
15
+ --color-muted: var(--muted);
16
+ --color-muted-foreground: var(--muted-foreground);
17
+ --color-accent: var(--accent);
18
+ --color-accent-foreground: var(--accent-foreground);
19
+ --color-destructive: var(--destructive);
20
+ --color-destructive-foreground: var(--destructive-foreground);
21
+ --color-border: var(--border);
22
+ --color-input: var(--input);
23
+ --color-ring: var(--ring);
24
+ --radius-sm: calc(var(--radius) - 4px);
25
+ --radius-md: calc(var(--radius) - 2px);
26
+ --radius-lg: var(--radius);
27
+ --radius-xl: calc(var(--radius) + 4px);
28
+
29
+ /* Sidebar */
30
+ --color-sidebar: var(--sidebar);
31
+ --color-sidebar-foreground: var(--sidebar-foreground);
32
+ --color-sidebar-primary: var(--sidebar-primary);
33
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
34
+ --color-sidebar-accent: var(--sidebar-accent);
35
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
36
+ --color-sidebar-border: var(--sidebar-border);
37
+ --color-sidebar-ring: var(--sidebar-ring);
38
+
39
+ /* Admonition colors */
40
+ --color-note: var(--note);
41
+ --color-note-foreground: var(--note-foreground);
42
+ --color-abstract: var(--abstract);
43
+ --color-info: var(--info);
44
+ --color-tip: var(--tip);
45
+ --color-success: var(--success);
46
+ --color-question: var(--question);
47
+ --color-warning: var(--warning);
48
+ --color-failure: var(--failure);
49
+ --color-danger: var(--danger);
50
+ --color-bug: var(--bug);
51
+ --color-example: var(--example);
52
+ --color-quote: var(--quote);
53
+
54
+ /* Code */
55
+ --color-code-bg: var(--code-background);
56
+ --color-code-fg: var(--code-foreground);
57
+
58
+ /* API reference — HTTP method, type, status, role colors */
59
+ --color-api-get: var(--api-get);
60
+ --color-api-post: var(--api-post);
61
+ --color-api-put: var(--api-put);
62
+ --color-api-patch: var(--api-patch);
63
+ --color-api-delete: var(--api-delete);
64
+ --color-api-head: var(--api-head);
65
+ --color-api-required: var(--api-required);
66
+ --color-api-deprecated: var(--api-deprecated);
67
+ --color-api-type-string: var(--api-type-string);
68
+ --color-api-type-number: var(--api-type-number);
69
+ --color-api-type-boolean: var(--api-type-boolean);
70
+ --color-api-type-object: var(--api-type-object);
71
+ --color-api-type-array: var(--api-type-array);
72
+ --color-api-status-2xx: var(--api-status-2xx);
73
+ --color-api-status-3xx: var(--api-status-3xx);
74
+ --color-api-status-4xx: var(--api-status-4xx);
75
+ --color-api-status-5xx: var(--api-status-5xx);
76
+
77
+ /* Fonts */
78
+ --font-sans: var(--font-sans);
79
+ --font-mono: var(--font-code);
80
+ --font-family-code: var(--font-code);
81
+ }
82
+
83
+ :root {
84
+ --background: oklch(1 0 0);
85
+ --foreground: oklch(0.145 0.014 285.823);
86
+ --card: oklch(1 0 0);
87
+ --card-foreground: oklch(0.145 0.014 285.823);
88
+ --popover: oklch(1 0 0);
89
+ --popover-foreground: oklch(0.145 0.014 285.823);
90
+ --primary: oklch(0.205 0.014 285.823);
91
+ --primary-foreground: oklch(0.985 0 0);
92
+ --secondary: oklch(0.965 0.001 286.375);
93
+ --secondary-foreground: oklch(0.205 0.014 285.823);
94
+ --muted: oklch(0.965 0.001 286.375);
95
+ --muted-foreground: oklch(0.45 0.014 285.938);
96
+ --accent: oklch(0.965 0.001 286.375);
97
+ --accent-foreground: oklch(0.205 0.014 285.823);
98
+ --destructive: oklch(0.45 0.245 27.325);
99
+ --destructive-foreground: oklch(0.985 0 0);
100
+ --border: oklch(0.922 0.004 286.32);
101
+ --input: oklch(0.922 0.004 286.32);
102
+ --ring: oklch(0.708 0.014 285.823);
103
+ --radius: 0.625rem;
104
+ --note: oklch(0.637 0.174 259.126);
105
+ --note-foreground: var(--foreground);
106
+ --abstract: oklch(0.691 0.148 221.723);
107
+ --info: oklch(0.722 0.128 207.084);
108
+ --tip: oklch(0.731 0.112 178.627);
109
+ --success: oklch(0.754 0.175 149.577);
110
+ --question: oklch(0.809 0.19 126.526);
111
+ --warning: oklch(0.74 0.175 62.778);
112
+ --failure: oklch(0.614 0.194 21.602);
113
+ --danger: oklch(0.577 0.245 16.439);
114
+ --bug: oklch(0.548 0.258 349.761);
115
+ --example: oklch(0.534 0.222 286.033);
116
+ --quote: oklch(0.65 0 0);
117
+ --sidebar: oklch(0.985 0 0);
118
+ --sidebar-foreground: oklch(0.145 0.014 285.823);
119
+ --sidebar-primary: oklch(0.205 0.014 285.823);
120
+ --sidebar-primary-foreground: oklch(0.985 0 0);
121
+ --sidebar-accent: oklch(0.965 0.001 286.375);
122
+ --sidebar-accent-foreground: oklch(0.205 0.014 285.823);
123
+ --sidebar-border: oklch(0.922 0.004 286.32);
124
+ --sidebar-ring: oklch(0.708 0.014 285.823);
125
+ --code-background: oklch(0.965 0.004 264);
126
+ --code-foreground: oklch(0.3 0.014 253.833);
127
+
128
+ /* API reference — always-dark code panel */
129
+ --api-panel-bg: oklch(0.145 0.014 253.833);
130
+ --api-panel-fg: oklch(0.926 0.013 253.833);
131
+
132
+ /* API semantic colors — HTTP methods, types, status codes */
133
+ /* Light mode: darkened for WCAG AA on the 20%/10% tints. See .dark. */
134
+ --api-get: oklch(0.435 0.095 162);
135
+ --api-post: oklch(0.45 0.174 259);
136
+ --api-put: oklch(0.455 0.105 63);
137
+ --api-patch: oklch(0.455 0.13 45);
138
+ --api-delete: oklch(0.45 0.179 22);
139
+ --api-head: oklch(0.47 0.222 286);
140
+ --api-required: oklch(0.45 0.179 22);
141
+ --api-deprecated: oklch(0.455 0.105 63);
142
+ --api-type-string: oklch(0.435 0.095 162);
143
+ --api-type-number: oklch(0.45 0.174 259);
144
+ --api-type-boolean: oklch(0.455 0.105 63);
145
+ --api-type-object: oklch(0.47 0.222 286);
146
+ --api-type-array: oklch(0.455 0.13 45);
147
+ --api-status-2xx: oklch(0.435 0.095 162);
148
+ --api-status-3xx: oklch(0.45 0.174 259);
149
+ --api-status-4xx: oklch(0.455 0.105 63);
150
+ --api-status-5xx: oklch(0.45 0.179 22);
151
+
152
+ --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
153
+ --font-heading: var(--font-sans);
154
+ --font-code: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
155
+ }
156
+
157
+ .dark {
158
+ --background: oklch(0.145 0.014 285.823);
159
+ --foreground: oklch(0.985 0 0);
160
+ --card: oklch(0.145 0.014 285.823);
161
+ --card-foreground: oklch(0.985 0 0);
162
+ --popover: oklch(0.145 0.014 285.823);
163
+ --popover-foreground: oklch(0.985 0 0);
164
+ --primary: oklch(0.985 0 0);
165
+ --primary-foreground: oklch(0.205 0.014 285.823);
166
+ --secondary: oklch(0.269 0.007 286.033);
167
+ --secondary-foreground: oklch(0.985 0 0);
168
+ --muted: oklch(0.269 0.007 286.033);
169
+ --muted-foreground: oklch(0.708 0.014 285.823);
170
+ --accent: oklch(0.269 0.007 286.033);
171
+ --accent-foreground: oklch(0.985 0 0);
172
+ --destructive: oklch(0.704 0.191 22.216);
173
+ --destructive-foreground: oklch(0.145 0.014 285.823);
174
+ --border: oklch(0.269 0.007 286.033);
175
+ --input: oklch(0.269 0.007 286.033);
176
+ --ring: oklch(0.439 0.01 286.375);
177
+ --note-foreground: var(--foreground);
178
+ --sidebar: oklch(0.205 0.014 285.823);
179
+ --sidebar-foreground: oklch(0.985 0 0);
180
+ --sidebar-primary: oklch(0.488 0.243 264.376);
181
+ --sidebar-primary-foreground: oklch(0.985 0 0);
182
+ --sidebar-accent: oklch(0.269 0.007 286.033);
183
+ --sidebar-accent-foreground: oklch(0.985 0 0);
184
+ --sidebar-border: oklch(0.269 0.007 286.033);
185
+ --sidebar-ring: oklch(0.439 0.01 286.375);
186
+ --code-background: oklch(0.18 0.014 253.833);
187
+ --code-foreground: oklch(0.926 0.013 253.833);
188
+
189
+ /* API semantic colors — lightened for dark mode (AA on 20%/10% tints). */
190
+ --api-get: oklch(0.720 0.135 162);
191
+ --api-post: oklch(0.755 0.174 259);
192
+ --api-put: oklch(0.745 0.15 63);
193
+ --api-patch: oklch(0.725 0.18 45);
194
+ --api-delete: oklch(0.805 0.194 22);
195
+ --api-head: oklch(0.740 0.182 286);
196
+ --api-required: oklch(0.805 0.194 22);
197
+ --api-deprecated: oklch(0.745 0.15 63);
198
+ --api-type-string: oklch(0.690 0.135 162);
199
+ --api-type-number: oklch(0.725 0.174 259);
200
+ --api-type-boolean: oklch(0.720 0.15 63);
201
+ --api-type-object: oklch(0.740 0.182 286);
202
+ --api-type-array: oklch(0.725 0.18 45);
203
+ --api-status-2xx: oklch(0.720 0.135 162);
204
+ --api-status-3xx: oklch(0.755 0.174 259);
205
+ --api-status-4xx: oklch(0.770 0.15 63);
206
+ --api-status-5xx: oklch(0.805 0.194 22);
207
+ }
208
+
209
+ @layer base {
210
+ * { @apply border-border outline-ring/50; }
211
+ body { @apply bg-background text-foreground font-sans; }
212
+ }
213
+
214
+ /* Shiki dual-theme: light by default, dark when .dark class is active */
215
+ .shiki,
216
+ .shiki span,
217
+ .astro-code,
218
+ .astro-code span {
219
+ color: var(--shiki-light) !important;
220
+ }
221
+ .shiki,
222
+ .astro-code {
223
+ background-color: var(--shiki-light-bg) !important;
224
+ }
225
+ .dark .shiki,
226
+ .dark .shiki span,
227
+ .dark .astro-code,
228
+ .dark .astro-code span {
229
+ color: var(--shiki-dark) !important;
230
+ }
231
+ .dark .shiki,
232
+ .dark .astro-code {
233
+ background-color: var(--shiki-dark-bg) !important;
234
+ }
235
+ /* Fix comment color contrast for WCAG AA */
236
+ .shiki span[style*="--shiki-light:#6E7781"],
237
+ .astro-code span[style*="--shiki-light:#6E7781"] {
238
+ --shiki-light: #576069 !important;
239
+ }
@@ -0,0 +1,243 @@
1
+ /* Generated by packages/render-html/scripts/sync-sources.mjs from @dogsbay/format-astro (themeCss("mintlify")). Do not edit. */
2
+ @custom-variant dark (&:where(.dark, .dark *));
3
+
4
+ @theme inline {
5
+ --color-background: var(--background);
6
+ --color-foreground: var(--foreground);
7
+ --color-card: var(--card);
8
+ --color-card-foreground: var(--card-foreground);
9
+ --color-popover: var(--popover);
10
+ --color-popover-foreground: var(--popover-foreground);
11
+ --color-primary: var(--primary);
12
+ --color-primary-foreground: var(--primary-foreground);
13
+ --color-secondary: var(--secondary);
14
+ --color-secondary-foreground: var(--secondary-foreground);
15
+ --color-muted: var(--muted);
16
+ --color-muted-foreground: var(--muted-foreground);
17
+ --color-accent: var(--accent);
18
+ --color-accent-foreground: var(--accent-foreground);
19
+ --color-destructive: var(--destructive);
20
+ --color-destructive-foreground: var(--destructive-foreground);
21
+ --color-border: var(--border);
22
+ --color-input: var(--input);
23
+ --color-ring: var(--ring);
24
+ --radius-sm: calc(var(--radius) - 4px);
25
+ --radius-md: calc(var(--radius) - 2px);
26
+ --radius-lg: var(--radius);
27
+ --radius-xl: calc(var(--radius) + 4px);
28
+
29
+ /* Sidebar */
30
+ --color-sidebar: var(--sidebar);
31
+ --color-sidebar-foreground: var(--sidebar-foreground);
32
+ --color-sidebar-primary: var(--sidebar-primary);
33
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
34
+ --color-sidebar-accent: var(--sidebar-accent);
35
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
36
+ --color-sidebar-border: var(--sidebar-border);
37
+ --color-sidebar-ring: var(--sidebar-ring);
38
+
39
+ /* Admonition colors */
40
+ --color-note: var(--note);
41
+ --color-note-foreground: var(--note-foreground);
42
+ --color-abstract: var(--abstract);
43
+ --color-info: var(--info);
44
+ --color-tip: var(--tip);
45
+ --color-success: var(--success);
46
+ --color-question: var(--question);
47
+ --color-warning: var(--warning);
48
+ --color-failure: var(--failure);
49
+ --color-danger: var(--danger);
50
+ --color-bug: var(--bug);
51
+ --color-example: var(--example);
52
+ --color-quote: var(--quote);
53
+
54
+ /* Code */
55
+ --color-code-bg: var(--code-background);
56
+ --color-code-fg: var(--code-foreground);
57
+
58
+ /* API reference — HTTP method, type, status, role colors */
59
+ --color-api-get: var(--api-get);
60
+ --color-api-post: var(--api-post);
61
+ --color-api-put: var(--api-put);
62
+ --color-api-patch: var(--api-patch);
63
+ --color-api-delete: var(--api-delete);
64
+ --color-api-head: var(--api-head);
65
+ --color-api-required: var(--api-required);
66
+ --color-api-deprecated: var(--api-deprecated);
67
+ --color-api-type-string: var(--api-type-string);
68
+ --color-api-type-number: var(--api-type-number);
69
+ --color-api-type-boolean: var(--api-type-boolean);
70
+ --color-api-type-object: var(--api-type-object);
71
+ --color-api-type-array: var(--api-type-array);
72
+ --color-api-status-2xx: var(--api-status-2xx);
73
+ --color-api-status-3xx: var(--api-status-3xx);
74
+ --color-api-status-4xx: var(--api-status-4xx);
75
+ --color-api-status-5xx: var(--api-status-5xx);
76
+
77
+ /* Fonts */
78
+ --font-sans: var(--font-sans);
79
+ --font-mono: var(--font-code);
80
+ --font-family-code: var(--font-code);
81
+ }
82
+
83
+ :root {
84
+ --background: oklch(0.993 0.005 95);
85
+ --foreground: oklch(0.15 0.01 260);
86
+ --card: oklch(0.993 0.005 95);
87
+ --card-foreground: oklch(0.15 0.01 260);
88
+ --popover: oklch(0.993 0.005 95);
89
+ --popover-foreground: oklch(0.15 0.01 260);
90
+ --primary: oklch(0.15 0.01 260);
91
+ --primary-foreground: oklch(0.985 0 0);
92
+ --secondary: oklch(0.97 0.002 260);
93
+ --secondary-foreground: oklch(0.15 0.01 260);
94
+ --muted: oklch(0.97 0.002 260);
95
+ --muted-foreground: oklch(0.45 0.01 260);
96
+ --accent: oklch(0.97 0.002 260);
97
+ --accent-foreground: oklch(0.15 0.01 260);
98
+ --destructive: oklch(0.55 0.22 25);
99
+ --destructive-foreground: oklch(0.985 0 0);
100
+ --border: oklch(0.91 0.004 260);
101
+ --input: oklch(0.91 0.004 260);
102
+ --ring: oklch(0.7 0.01 260);
103
+ --radius: 1rem;
104
+ /* Callout colors — soft pastel backgrounds matching Mintlify */
105
+ --note: oklch(0.62 0.18 260);
106
+ --note-foreground: var(--foreground);
107
+ --abstract: oklch(0.65 0.14 220);
108
+ --info: oklch(0.65 0.14 230);
109
+ --tip: oklch(0.65 0.16 155);
110
+ --success: oklch(0.65 0.16 155);
111
+ --question: oklch(0.7 0.15 270);
112
+ --warning: oklch(0.7 0.15 75);
113
+ --failure: oklch(0.6 0.2 25);
114
+ --danger: oklch(0.55 0.22 25);
115
+ --bug: oklch(0.55 0.22 350);
116
+ --example: oklch(0.55 0.2 285);
117
+ --quote: oklch(0.55 0 0);
118
+ /* Sidebar */
119
+ --sidebar: oklch(0.993 0.005 95);
120
+ --sidebar-foreground: oklch(0.15 0.01 260);
121
+ --sidebar-primary: oklch(0.15 0.01 260);
122
+ --sidebar-primary-foreground: oklch(0.985 0 0);
123
+ --sidebar-accent: oklch(0.97 0.002 260);
124
+ --sidebar-accent-foreground: oklch(0.15 0.01 260);
125
+ --sidebar-border: oklch(0.93 0.004 260);
126
+ --sidebar-ring: oklch(0.7 0.01 260);
127
+ /* Code — light gray background, matching Mintlify's inline code */
128
+ --code-background: oklch(0.96 0.003 260);
129
+ --code-foreground: oklch(0.25 0.01 260);
130
+
131
+ /* API reference — always-dark code panel */
132
+ --api-panel-bg: oklch(0.145 0.014 253.833);
133
+ --api-panel-fg: oklch(0.926 0.013 253.833);
134
+
135
+ /* API semantic colors — HTTP methods, types, status codes */
136
+ /* Light mode: darkened for WCAG AA on the 20%/10% tints. See .dark. */
137
+ --api-get: oklch(0.435 0.095 162);
138
+ --api-post: oklch(0.45 0.174 259);
139
+ --api-put: oklch(0.455 0.105 63);
140
+ --api-patch: oklch(0.455 0.13 45);
141
+ --api-delete: oklch(0.45 0.179 22);
142
+ --api-head: oklch(0.47 0.222 286);
143
+ --api-required: oklch(0.45 0.179 22);
144
+ --api-deprecated: oklch(0.455 0.105 63);
145
+ --api-type-string: oklch(0.435 0.095 162);
146
+ --api-type-number: oklch(0.45 0.174 259);
147
+ --api-type-boolean: oklch(0.455 0.105 63);
148
+ --api-type-object: oklch(0.47 0.222 286);
149
+ --api-type-array: oklch(0.455 0.13 45);
150
+ --api-status-2xx: oklch(0.435 0.095 162);
151
+ --api-status-3xx: oklch(0.45 0.174 259);
152
+ --api-status-4xx: oklch(0.455 0.105 63);
153
+ --api-status-5xx: oklch(0.45 0.179 22);
154
+
155
+ /* Fonts — system sans for body, JetBrains Mono for code */
156
+ --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
157
+ --font-heading: var(--font-sans);
158
+ --font-code: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
159
+ }
160
+
161
+ .dark {
162
+ --background: oklch(0.16 0.01 260);
163
+ --foreground: oklch(0.93 0.005 260);
164
+ --card: oklch(0.18 0.01 260);
165
+ --card-foreground: oklch(0.93 0.005 260);
166
+ --popover: oklch(0.18 0.01 260);
167
+ --popover-foreground: oklch(0.93 0.005 260);
168
+ --primary: oklch(0.93 0.005 260);
169
+ --primary-foreground: oklch(0.16 0.01 260);
170
+ --secondary: oklch(0.22 0.008 260);
171
+ --secondary-foreground: oklch(0.93 0.005 260);
172
+ --muted: oklch(0.22 0.008 260);
173
+ --muted-foreground: oklch(0.65 0.01 260);
174
+ --accent: oklch(0.22 0.008 260);
175
+ --accent-foreground: oklch(0.93 0.005 260);
176
+ --destructive: oklch(0.65 0.2 25);
177
+ --destructive-foreground: oklch(0.16 0.01 260);
178
+ --border: oklch(0.28 0.008 260);
179
+ --input: oklch(0.28 0.008 260);
180
+ --ring: oklch(0.45 0.01 260);
181
+ --note-foreground: var(--foreground);
182
+ --sidebar: oklch(0.16 0.01 260);
183
+ --sidebar-foreground: oklch(0.93 0.005 260);
184
+ --sidebar-primary: oklch(0.55 0.2 260);
185
+ --sidebar-primary-foreground: oklch(0.93 0.005 260);
186
+ --sidebar-accent: oklch(0.22 0.008 260);
187
+ --sidebar-accent-foreground: oklch(0.93 0.005 260);
188
+ --sidebar-border: oklch(0.28 0.008 260);
189
+ --sidebar-ring: oklch(0.45 0.01 260);
190
+ --code-background: oklch(0.2 0.01 260);
191
+ --code-foreground: oklch(0.9 0.01 260);
192
+
193
+ /* API semantic colors — lightened for dark mode (AA on 20%/10% tints). */
194
+ --api-get: oklch(0.720 0.135 162);
195
+ --api-post: oklch(0.755 0.174 259);
196
+ --api-put: oklch(0.745 0.15 63);
197
+ --api-patch: oklch(0.725 0.18 45);
198
+ --api-delete: oklch(0.805 0.194 22);
199
+ --api-head: oklch(0.740 0.182 286);
200
+ --api-required: oklch(0.805 0.194 22);
201
+ --api-deprecated: oklch(0.745 0.15 63);
202
+ --api-type-string: oklch(0.690 0.135 162);
203
+ --api-type-number: oklch(0.725 0.174 259);
204
+ --api-type-boolean: oklch(0.720 0.15 63);
205
+ --api-type-object: oklch(0.740 0.182 286);
206
+ --api-type-array: oklch(0.725 0.18 45);
207
+ --api-status-2xx: oklch(0.720 0.135 162);
208
+ --api-status-3xx: oklch(0.755 0.174 259);
209
+ --api-status-4xx: oklch(0.770 0.15 63);
210
+ --api-status-5xx: oklch(0.805 0.194 22);
211
+ }
212
+
213
+ @layer base {
214
+ * { @apply border-border outline-ring/50; }
215
+ body { @apply bg-background text-foreground font-sans; }
216
+ }
217
+
218
+ /* Shiki dual-theme: light by default, dark when .dark class is active */
219
+ .shiki,
220
+ .shiki span,
221
+ .astro-code,
222
+ .astro-code span {
223
+ color: var(--shiki-light) !important;
224
+ }
225
+ .shiki,
226
+ .astro-code {
227
+ background-color: var(--shiki-light-bg) !important;
228
+ }
229
+ .dark .shiki,
230
+ .dark .shiki span,
231
+ .dark .astro-code,
232
+ .dark .astro-code span {
233
+ color: var(--shiki-dark) !important;
234
+ }
235
+ .dark .shiki,
236
+ .dark .astro-code {
237
+ background-color: var(--shiki-dark-bg) !important;
238
+ }
239
+ /* Fix comment color contrast for WCAG AA */
240
+ .shiki span[style*="--shiki-light:#6E7781"],
241
+ .astro-code span[style*="--shiki-light:#6E7781"] {
242
+ --shiki-light: #576069 !important;
243
+ }
@@ -0,0 +1,6 @@
1
+ /** Shared variant metadata for Alert and CollapsibleAlert */
2
+ export type AlertVariant = "default" | "destructive" | "note" | "abstract" | "info" | "tip" | "success" | "question" | "warning" | "failure" | "danger" | "bug" | "example" | "quote";
3
+ export declare const contentVariants: Set<AlertVariant>;
4
+ /** Default icon SVGs per content variant (MkDocs Material icon set) */
5
+ export declare const icons: Partial<Record<AlertVariant, string>>;
6
+ export declare const chevronSvg = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"6 9 12 15 18 9\"/></svg>";
@@ -0,0 +1,22 @@
1
+ // Generated by packages/render-html/scripts/sync-sources.mjs from @dogsbay/ui/src/alert/variants.ts. Do not edit.
2
+ /** Shared variant metadata for Alert and CollapsibleAlert */
3
+ export const contentVariants = new Set([
4
+ "note", "abstract", "info", "tip", "success", "question",
5
+ "warning", "failure", "danger", "bug", "example", "quote",
6
+ ]);
7
+ /** Default icon SVGs per content variant (MkDocs Material icon set) */
8
+ export const icons = {
9
+ note: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m3.1 5.07c.14 0 .28.05.4.16l1.27 1.27c.23.22.23.57 0 .78l-1 1-2.05-2.05 1-1c.1-.11.24-.16.38-.16m-1.97 1.74 2.06 2.06-6.06 6.06H7.07v-2.06z"/></svg>',
10
+ abstract: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M17 9H7V7h10m0 6H7v-2h10m-3 6H7v-2h7M12 3a1 1 0 0 1 1 1 1 1 0 0 1-1 1 1 1 0 0 1-1-1 1 1 0 0 1 1-1m7 0h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2"/></svg>',
11
+ info: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2"/></svg>',
12
+ tip: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M17.66 11.2c-.23-.3-.51-.56-.77-.82-.67-.6-1.43-1.03-2.07-1.66C13.33 7.26 13 4.85 13.95 3c-.95.23-1.78.75-2.49 1.32-2.59 2.08-3.61 5.75-2.39 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.23.1-.47.04-.66-.12a.6.6 0 0 1-.14-.17c-1.13-1.43-1.31-3.48-.55-5.12C5.78 10 4.87 12.3 5 14.47c.06.5.12 1 .29 1.5.14.6.41 1.2.71 1.73 1.08 1.73 2.95 2.97 4.96 3.22 2.14.27 4.43-.12 6.07-1.6 1.83-1.66 2.47-4.32 1.53-6.6l-.13-.26c-.21-.46-.77-1.26-.77-1.26m-3.16 6.3c-.28.24-.74.5-1.1.6-1.12.4-2.24-.16-2.9-.82 1.19-.28 1.9-1.16 2.11-2.05.17-.8-.15-1.46-.28-2.23-.12-.74-.1-1.37.17-2.06.19.38.39.76.63 1.06.77 1 1.98 1.44 2.24 2.8.04.14.06.28.06.43.03.82-.33 1.72-.93 2.27"/></svg>',
13
+ success: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M21 7 9 19l-5.5-5.5 1.41-1.41L9 16.17 19.59 5.59z"/></svg>',
14
+ question: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m15.07 11.25-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 0 0-2-2 2 2 0 0 0-2 2H8a4 4 0 0 1 4-4 4 4 0 0 1 4 4 3.2 3.2 0 0 1-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10c0-5.53-4.5-10-10-10"/></svg>',
15
+ warning: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M13 14h-2V9h2m0 9h-2v-2h2M1 21h22L12 2z"/></svg>',
16
+ failure: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',
17
+ danger: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m11.5 20 4.86-9.73H13V4l-5 9.73h3.5zM12 2c2.75 0 5.1 1 7.05 2.95S22 9.25 22 12s-1 5.1-2.95 7.05S14.75 22 12 22s-5.1-1-7.05-2.95S2 14.75 2 12s1-5.1 2.95-7.05S9.25 2 12 2"/></svg>',
18
+ bug: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m11 13h2v1h-2zm10-8v6c0 5.5-3.8 10.7-9 12-5.2-1.3-9-6.5-9-12V5l9-4zm-4 5h-2.2c-.2-.6-.6-1.1-1.1-1.5l1.2-1.2-.7-.7L12.8 8H12c-.2 0-.5 0-.7.1L9.9 6.6l-.8.8 1.2 1.2c-.5.3-.9.8-1.1 1.4H7v1h2v1H7v1h2v1H7v1h2.2c.4 1.2 1.5 2 2.8 2s2.4-.8 2.8-2H17v-1h-2v-1h2v-1h-2v-1h2zm-6 2h2v-1h-2z"/></svg>',
19
+ example: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M7 2v2h1v14a4 4 0 0 0 4 4 4 4 0 0 0 4-4V4h1V2zm4 14c-.6 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.4 1-1 1m2-4c-.6 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.4 1-1 1m1-5h-4V4h4z"/></svg>',
20
+ quote: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3z"/></svg>',
21
+ };
22
+ export const chevronSvg = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Badge classes, shared by Badge.astro, ContentRenderer and @dogsbay/render-html
3
+ * (which copies this file with scripts/sync-sources.mjs), so a badge
4
+ * looks the same however a page is produced.
5
+ */
6
+ export declare const BADGE_BASE = "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors";
7
+ export declare const BADGE_VARIANTS: {
8
+ readonly default: "border-transparent bg-primary text-primary-foreground";
9
+ readonly secondary: "border-transparent bg-secondary text-secondary-foreground";
10
+ readonly destructive: "border-transparent bg-destructive text-destructive-foreground";
11
+ readonly outline: "text-foreground";
12
+ readonly info: "border-transparent bg-info/15 text-[color:color-mix(in_oklab,var(--info)_60%,var(--foreground))]";
13
+ readonly success: "border-transparent bg-success/15 text-[color:color-mix(in_oklab,var(--success)_60%,var(--foreground))]";
14
+ readonly warning: "border-transparent bg-warning/15 text-[color:color-mix(in_oklab,var(--warning)_60%,var(--foreground))]";
15
+ readonly danger: "border-transparent bg-danger/15 text-[color:color-mix(in_oklab,var(--danger)_60%,var(--foreground))]";
16
+ };
17
+ export type BadgeVariant = keyof typeof BADGE_VARIANTS;
18
+ /** The class list for a variant; an unknown variant gets the base classes only. */
19
+ export declare function badgeClass(variant: string | undefined): string;
@@ -0,0 +1,33 @@
1
+ // Generated by packages/render-html/scripts/sync-sources.mjs from @dogsbay/ui/src/badge/variants.ts. Do not edit.
2
+ /**
3
+ * Badge classes, shared by Badge.astro, ContentRenderer and @dogsbay/render-html
4
+ * (which copies this file with scripts/sync-sources.mjs), so a badge
5
+ * looks the same however a page is produced.
6
+ */
7
+ export const BADGE_BASE = "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors";
8
+ export const BADGE_VARIANTS = {
9
+ default: "border-transparent bg-primary text-primary-foreground",
10
+ secondary: "border-transparent bg-secondary text-secondary-foreground",
11
+ destructive: "border-transparent bg-destructive text-destructive-foreground",
12
+ outline: "text-foreground",
13
+ // Status colours, from the callout palette (`:badge[Beta]{variant="warning"}`).
14
+ // The TEXT is the accent mixed 60% toward --foreground; the tint keeps the
15
+ // accent at full strength. The accent used raw measured 1.85-2.6:1 in light
16
+ // mode (danger 3.3-3.9:1 in dark too), from painted pixels. --foreground is
17
+ // near-black in light and near-white in dark, so one rule serves both themes
18
+ // (worst case 4.95:1); a fixed dark colour would fail dark mode. The same
19
+ // rule as the in-cell admonitions in format-astro's theme-css.ts.
20
+ // The `color:` hint is required: tailwind-merge 2.x (Badge.astro's tv())
21
+ // reads a bare text-[... 60% ...] as a FONT SIZE and drops text-xs.
22
+ // Checked per preset by @dogsbay/render-html tests/contrast.test.ts, and
23
+ // through tv() by ui tests/badge.test.ts.
24
+ info: "border-transparent bg-info/15 text-[color:color-mix(in_oklab,var(--info)_60%,var(--foreground))]",
25
+ success: "border-transparent bg-success/15 text-[color:color-mix(in_oklab,var(--success)_60%,var(--foreground))]",
26
+ warning: "border-transparent bg-warning/15 text-[color:color-mix(in_oklab,var(--warning)_60%,var(--foreground))]",
27
+ danger: "border-transparent bg-danger/15 text-[color:color-mix(in_oklab,var(--danger)_60%,var(--foreground))]",
28
+ };
29
+ /** The class list for a variant; an unknown variant gets the base classes only. */
30
+ export function badgeClass(variant) {
31
+ const v = BADGE_VARIANTS[(variant ?? "default")];
32
+ return v ? `${BADGE_BASE} ${v}` : BADGE_BASE;
33
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * `[!code …]` annotation hygiene.
3
+ *
4
+ * Shiki's notation transformers consume these markers — but only the
5
+ * ones they can SEE: a marker is recognized when the grammar tokenizes
6
+ * its comment AND the marker ends the line. Anything else reaches the
7
+ * reader as literal text in the code block. Two real cases from the
8
+ * better-auth corpus:
9
+ *
10
+ * - `package-install` (and every unknown language) falls back to
11
+ * `plaintext`, which has no comment tokens at all;
12
+ * - upstream authors mid-line markers — `// [!code highlight] // check
13
+ * if the user is allowed` — where the marker is not the last thing
14
+ * on the line.
15
+ *
16
+ * These helpers strip exactly what Shiki cannot process, and strip
17
+ * everything from copy text (a marker pasted into an editor is always
18
+ * wrong).
19
+ */
20
+ /**
21
+ * Remove the markers Shiki cannot process, leaving the ones it can for
22
+ * the notation transformers to consume.
23
+ *
24
+ * @param code the block's source
25
+ * @param isPlainGrammar true when highlighting falls back to plaintext
26
+ */
27
+ export declare function stripUnprocessableMarkers(code: string, isPlainGrammar: boolean): string;
28
+ /** Strip EVERY annotation form — markers must never reach the clipboard. */
29
+ export declare function stripMarkersForCopy(code: string): string;
@@ -0,0 +1,66 @@
1
+ // Generated by packages/render-html/scripts/sync-sources.mjs from @dogsbay/ui/src/code-rich/markers.ts. Do not edit.
2
+ /**
3
+ * `[!code …]` annotation hygiene.
4
+ *
5
+ * Shiki's notation transformers consume these markers — but only the
6
+ * ones they can SEE: a marker is recognized when the grammar tokenizes
7
+ * its comment AND the marker ends the line. Anything else reaches the
8
+ * reader as literal text in the code block. Two real cases from the
9
+ * better-auth corpus:
10
+ *
11
+ * - `package-install` (and every unknown language) falls back to
12
+ * `plaintext`, which has no comment tokens at all;
13
+ * - upstream authors mid-line markers — `// [!code highlight] // check
14
+ * if the user is allowed` — where the marker is not the last thing
15
+ * on the line.
16
+ *
17
+ * These helpers strip exactly what Shiki cannot process, and strip
18
+ * everything from copy text (a marker pasted into an editor is always
19
+ * wrong).
20
+ */
21
+ /** A `[!code …]` annotation carrying its own comment leader. */
22
+ const MARKER = /[ \t]*(?:\/\/|#|--|<!--|\/\*|;)[ \t]*\[!code[^\]]*\](?:[ \t]*(?:-->|\*\/))?/g;
23
+ /**
24
+ * A bare annotation — upstream also appends one INSIDE an existing
25
+ * comment (`// e.g. "us-east-1" [!code highlight]`), with no leader of
26
+ * its own.
27
+ */
28
+ const BARE_MARKER = /[ \t]*\[!code[^\]]*\]/g;
29
+ /**
30
+ * Remove the markers Shiki cannot process, leaving the ones it can for
31
+ * the notation transformers to consume.
32
+ *
33
+ * @param code the block's source
34
+ * @param isPlainGrammar true when highlighting falls back to plaintext
35
+ */
36
+ export function stripUnprocessableMarkers(code, isPlainGrammar) {
37
+ // Every marker has "[!code"; without one there is nothing to strip, and MARKER's leading [ \t]* is quadratic on a long run of spaces.
38
+ if (!code.includes("[!code"))
39
+ return code;
40
+ return code
41
+ .split("\n")
42
+ .map((line) => {
43
+ // No grammar → no comment tokens → Shiki sees nothing to strip.
44
+ if (isPlainGrammar)
45
+ return line.replace(MARKER, "").replace(BARE_MARKER, "");
46
+ let out = "";
47
+ let last = 0;
48
+ for (const m of line.matchAll(MARKER)) {
49
+ const end = m.index + m[0].length;
50
+ if (line.slice(end).trim() === "")
51
+ break; // ends the line — Shiki handles it
52
+ out += line.slice(last, m.index);
53
+ last = end;
54
+ }
55
+ return out + line.slice(last);
56
+ })
57
+ .join("\n");
58
+ }
59
+ /** Strip EVERY annotation form — markers must never reach the clipboard. */
60
+ export function stripMarkersForCopy(code) {
61
+ return code
62
+ .replace(MARKER, "")
63
+ .replace(BARE_MARKER, "")
64
+ .replace(/\s*\/\/\s*![a-z]+.*$/gm, "")
65
+ .trim();
66
+ }