semajsx 0.1.1 → 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 (103) hide show
  1. package/dist/{computed-BpjqvQu1.mjs → computed-BidG06Lt.mjs} +2 -2
  2. package/dist/{computed-BpjqvQu1.mjs.map → computed-BidG06Lt.mjs.map} +1 -1
  3. package/dist/{document-OGuk9jhK.mjs → document-BOJDaiBc.mjs} +19 -4
  4. package/dist/document-BOJDaiBc.mjs.map +1 -0
  5. package/dist/{document-DFsOtfef.mjs → document-CwHVG_PJ.mjs} +2 -2
  6. package/dist/dom/index.d.mts +68 -3
  7. package/dist/dom/index.d.mts.map +1 -1
  8. package/dist/dom/index.mjs +4 -4
  9. package/dist/dom/jsx-dev-runtime.d.mts +4 -4
  10. package/dist/dom/jsx-dev-runtime.mjs +1 -1
  11. package/dist/dom/jsx-runtime.d.mts +4 -4
  12. package/dist/dom/jsx-runtime.mjs +2 -2
  13. package/dist/{helpers-DrifjCXb.d.mts → helpers-CfRDJgcP.d.mts} +3 -3
  14. package/dist/{helpers-DrifjCXb.d.mts.map → helpers-CfRDJgcP.d.mts.map} +1 -1
  15. package/dist/{index-DS5X3Pvb.d.mts → index-B1pjI-Su.d.mts} +2 -2
  16. package/dist/{index-DS5X3Pvb.d.mts.map → index-B1pjI-Su.d.mts.map} +1 -1
  17. package/dist/index-Ch9GwToI.d.mts +81 -0
  18. package/dist/index-Ch9GwToI.d.mts.map +1 -0
  19. package/dist/index.d.mts +7 -7
  20. package/dist/index.mjs +5 -5
  21. package/dist/{island-marker-hZdmHMvx.d.mts → island-marker-BJIO07Vj.d.mts} +1 -1
  22. package/dist/island-marker-BJIO07Vj.d.mts.map +1 -0
  23. package/dist/{jsx-CGW4OyqA.d.mts → jsx-fNlLjLou.d.mts} +2 -2
  24. package/dist/{jsx-CGW4OyqA.d.mts.map → jsx-fNlLjLou.d.mts.map} +1 -1
  25. package/dist/{jsx-runtime-DU8DRISG.d.mts → jsx-runtime-BFuFPDzn.d.mts} +3 -3
  26. package/dist/{jsx-runtime-DU8DRISG.d.mts.map → jsx-runtime-BFuFPDzn.d.mts.map} +1 -1
  27. package/dist/jsx-runtime-D9ZNjMJ2.mjs.map +1 -1
  28. package/dist/{jsx-runtime-mBpL8czJ.d.mts → jsx-runtime-DZx2Yv-t.d.mts} +28 -6
  29. package/dist/{jsx-runtime-mBpL8czJ.d.mts.map → jsx-runtime-DZx2Yv-t.d.mts.map} +1 -1
  30. package/dist/lucide-CVtHepGM.mjs +126 -0
  31. package/dist/lucide-CVtHepGM.mjs.map +1 -0
  32. package/dist/{resource-B1IudM8_.d.mts → resource-BQI6AeJ0.d.mts} +23 -3
  33. package/dist/resource-BQI6AeJ0.d.mts.map +1 -0
  34. package/dist/{resource-BjsDAkbG.mjs → resource-DSlXDZZi.mjs} +2 -2
  35. package/dist/{resource-BjsDAkbG.mjs.map → resource-DSlXDZZi.mjs.map} +1 -1
  36. package/dist/signal/index.d.mts +2 -2
  37. package/dist/signal/index.mjs +3 -3
  38. package/dist/{signal-4PgGfydw.mjs → signal-BN8vHXDb.mjs} +1 -1
  39. package/dist/{signal-4PgGfydw.mjs.map → signal-BN8vHXDb.mjs.map} +1 -1
  40. package/dist/{signal-CLsaPA7c.d.mts → signal-BwxUlXKs.d.mts} +1 -1
  41. package/dist/{signal-CLsaPA7c.d.mts.map → signal-BwxUlXKs.d.mts.map} +1 -1
  42. package/dist/{src-CRi0xsNK.mjs → src-BqX3sryB.mjs} +68 -5
  43. package/dist/src-BqX3sryB.mjs.map +1 -0
  44. package/dist/{src-DEoBG1zB.mjs → src-DUpFNNM_.mjs} +4 -4
  45. package/dist/{src-DEoBG1zB.mjs.map → src-DUpFNNM_.mjs.map} +1 -1
  46. package/dist/{src-BlS3Hc-L.mjs → src-DW3tIczg.mjs} +75 -5
  47. package/dist/src-DW3tIczg.mjs.map +1 -0
  48. package/dist/{src-Jbt_w0hc.mjs → src-Ds9vl42d.mjs} +37 -35
  49. package/dist/src-Ds9vl42d.mjs.map +1 -0
  50. package/dist/{src-iC-NFwTy.mjs → src-DuSN6go_.mjs} +79 -22
  51. package/dist/src-DuSN6go_.mjs.map +1 -0
  52. package/dist/src-L88LbwEv.mjs +868 -0
  53. package/dist/src-L88LbwEv.mjs.map +1 -0
  54. package/dist/ssg/index.d.mts +4 -182
  55. package/dist/ssg/index.d.mts.map +1 -1
  56. package/dist/ssg/index.mjs +7 -756
  57. package/dist/ssg/index.mjs.map +1 -1
  58. package/dist/ssg/plugins/docs-theme.d.mts +218 -0
  59. package/dist/ssg/plugins/docs-theme.d.mts.map +1 -0
  60. package/dist/ssg/plugins/docs-theme.mjs +2252 -0
  61. package/dist/ssg/plugins/docs-theme.mjs.map +1 -0
  62. package/dist/ssg/plugins/lucide.d.mts +3 -0
  63. package/dist/ssg/plugins/lucide.mjs +7 -0
  64. package/dist/ssr/client.d.mts +3 -3
  65. package/dist/ssr/client.mjs +5 -5
  66. package/dist/ssr/index.d.mts +3 -3
  67. package/dist/ssr/index.d.mts.map +1 -1
  68. package/dist/ssr/index.mjs +6 -5
  69. package/dist/style/index.d.mts +2 -2
  70. package/dist/style/index.d.mts.map +1 -1
  71. package/dist/style/index.mjs +1 -1
  72. package/dist/style/react.d.mts +2 -2
  73. package/dist/style/react.mjs +2 -2
  74. package/dist/style/vue.d.mts +2 -2
  75. package/dist/style/vue.mjs +2 -2
  76. package/dist/terminal/index.d.mts +4 -4
  77. package/dist/terminal/index.mjs +2 -2
  78. package/dist/terminal/jsx-dev-runtime.d.mts +4 -4
  79. package/dist/terminal/jsx-dev-runtime.mjs +1 -1
  80. package/dist/terminal/jsx-runtime.d.mts +4 -4
  81. package/dist/terminal/jsx-runtime.mjs +1 -1
  82. package/dist/{types-DlNR9ZaJ.d.mts → types-BlaUrkq0.d.mts} +2 -2
  83. package/dist/{types-DlNR9ZaJ.d.mts.map → types-BlaUrkq0.d.mts.map} +1 -1
  84. package/dist/types-C9fiRu6l.d.mts +220 -0
  85. package/dist/types-C9fiRu6l.d.mts.map +1 -0
  86. package/dist/{types-Dgj6n-EE.d.mts → types-CZMcXQTW.d.mts} +9 -4
  87. package/dist/types-CZMcXQTW.d.mts.map +1 -0
  88. package/dist/{types-Bjx1Pp14.d.mts → types-D0jRO840.d.mts} +1 -1
  89. package/dist/{types-Bjx1Pp14.d.mts.map → types-D0jRO840.d.mts.map} +1 -1
  90. package/dist/{types-DEi0apQO.d.mts → types-DucvOZQ2.d.mts} +2 -2
  91. package/dist/{types-DEi0apQO.d.mts.map → types-DucvOZQ2.d.mts.map} +1 -1
  92. package/dist/{utils-BrGmTgfG.mjs → utils-DbTAs943.mjs} +1 -1
  93. package/dist/{utils-BrGmTgfG.mjs.map → utils-DbTAs943.mjs.map} +1 -1
  94. package/package.json +30 -2
  95. package/dist/document-OGuk9jhK.mjs.map +0 -1
  96. package/dist/island-marker-hZdmHMvx.d.mts.map +0 -1
  97. package/dist/jsx-runtime-D2B2BK8X.mjs +0 -4
  98. package/dist/resource-B1IudM8_.d.mts.map +0 -1
  99. package/dist/src-BlS3Hc-L.mjs.map +0 -1
  100. package/dist/src-CRi0xsNK.mjs.map +0 -1
  101. package/dist/src-Jbt_w0hc.mjs.map +0 -1
  102. package/dist/src-iC-NFwTy.mjs.map +0 -1
  103. package/dist/types-Dgj6n-EE.d.mts.map +0 -1
@@ -0,0 +1,2252 @@
1
+ import { d as defineCollection, v as __exportAll } from "../../src-L88LbwEv.mjs";
2
+ import { a as jsxs, i as jsx, v as Fragment } from "../../src-DW3tIczg.mjs";
3
+ import "../../src-BqX3sryB.mjs";
4
+ import { G as rules, K as classes, M as createTheme, N as defineTokens, U as isStyleToken, W as rule } from "../../src-Ds9vl42d.mjs";
5
+ import "../../jsx-runtime-D9ZNjMJ2.mjs";
6
+ import "../../src-DUpFNNM_.mjs";
7
+ import "../../jsx-runtime-BjCGsceN.mjs";
8
+ import "../../resource-DSlXDZZi.mjs";
9
+ import "../../src-DuSN6go_.mjs";
10
+ import "../../document-BOJDaiBc.mjs";
11
+ import { n as Icon, t as lucide } from "../../lucide-CVtHepGM.mjs";
12
+ import { dirname, join } from "path";
13
+ import { mkdir, writeFile } from "fs/promises";
14
+ import { z } from "zod";
15
+
16
+ //#region ../ssg/src/plugins/docs-theme/styles.ts
17
+ /**
18
+ * Apple-inspired theme CSS for the docs-theme plugin.
19
+ *
20
+ * All class names are prefixed with `dt-` to avoid collisions.
21
+ * Component styles (Card, Callout, Badge) come from @semajsx/ui via componentCSS.
22
+ * This file contains layout, navigation, hero, typography, animations, and responsive styles.
23
+ */
24
+ const THEME_CSS = `
25
+ /* ==============================================
26
+ * Keyframes
27
+ * ============================================== */
28
+
29
+ @keyframes dt-fade-in-up {
30
+ from { opacity: 0; transform: translateY(20px); }
31
+ to { opacity: 1; transform: translateY(0); }
32
+ }
33
+
34
+ @keyframes dt-fade-in-scale {
35
+ from { opacity: 0; transform: scale(0.96) translateY(8px); }
36
+ to { opacity: 1; transform: scale(1) translateY(0); }
37
+ }
38
+
39
+ /* ==============================================
40
+ * Global Reset & Base
41
+ * ============================================== */
42
+
43
+ * { margin: 0; padding: 0; box-sizing: border-box; }
44
+
45
+ html { scroll-behavior: smooth; }
46
+
47
+ body {
48
+ font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
49
+ Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
50
+ line-height: 1.6;
51
+ color: #1d1d1f;
52
+ background: #fbfbfd;
53
+ -webkit-font-smoothing: antialiased;
54
+ -moz-osx-font-smoothing: grayscale;
55
+ text-rendering: optimizeLegibility;
56
+ }
57
+
58
+ ::selection {
59
+ background: rgba(0, 113, 227, 0.2);
60
+ color: #1d1d1f;
61
+ }
62
+
63
+ /* ==============================================
64
+ * Frosted Glass Navigation
65
+ * ============================================== */
66
+
67
+ .dt-glass-nav {
68
+ position: sticky;
69
+ top: 0;
70
+ z-index: 50;
71
+ background: rgba(251, 251, 253, 0.8);
72
+ backdrop-filter: saturate(180%) blur(20px);
73
+ -webkit-backdrop-filter: saturate(180%) blur(20px);
74
+ border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
75
+ }
76
+
77
+ .dt-nav-inner {
78
+ max-width: 1200px;
79
+ margin: 0 auto;
80
+ display: flex;
81
+ justify-content: space-between;
82
+ align-items: center;
83
+ padding: 14px 2rem;
84
+ height: 52px;
85
+ }
86
+
87
+ .dt-nav-logo {
88
+ color: #1d1d1f;
89
+ font-size: 1.25rem;
90
+ font-weight: 600;
91
+ letter-spacing: -0.02em;
92
+ text-decoration: none;
93
+ }
94
+
95
+ .dt-nav-links {
96
+ display: flex;
97
+ list-style: none;
98
+ margin: 0;
99
+ gap: 2rem;
100
+ }
101
+
102
+ .dt-nav-link {
103
+ color: #1d1d1f;
104
+ text-decoration: none;
105
+ font-size: 0.875rem;
106
+ font-weight: 400;
107
+ letter-spacing: -0.005em;
108
+ transition: color 0.2s ease;
109
+ }
110
+
111
+ .dt-nav-link:hover {
112
+ color: #0071e3;
113
+ }
114
+
115
+ /* ==============================================
116
+ * Layout
117
+ * ============================================== */
118
+
119
+ .dt-root {
120
+ display: flex;
121
+ flex-direction: column;
122
+ min-height: 100vh;
123
+ background: #fbfbfd;
124
+ }
125
+
126
+ .dt-main {
127
+ flex: 1 1 0%;
128
+ width: 100%;
129
+ max-width: 1200px;
130
+ margin: 0 auto;
131
+ padding: 2rem 2rem 4rem;
132
+ }
133
+
134
+ /* ==============================================
135
+ * Footer
136
+ * ============================================== */
137
+
138
+ .dt-footer {
139
+ border-top: 0.5px solid rgba(0, 0, 0, 0.08);
140
+ background: #f5f5f7;
141
+ }
142
+
143
+ .dt-footer-inner {
144
+ max-width: 1200px;
145
+ margin: 0 auto;
146
+ padding: 2rem;
147
+ display: flex;
148
+ justify-content: space-between;
149
+ align-items: center;
150
+ flex-wrap: wrap;
151
+ gap: 1rem;
152
+ }
153
+
154
+ .dt-footer-links {
155
+ display: flex;
156
+ gap: 2rem;
157
+ align-items: center;
158
+ }
159
+
160
+ .dt-footer-link {
161
+ color: #6e6e73;
162
+ text-decoration: none;
163
+ font-size: 0.8125rem;
164
+ transition: color 0.2s;
165
+ }
166
+
167
+ .dt-footer-link:hover {
168
+ color: #0071e3;
169
+ }
170
+
171
+ .dt-footer-copy {
172
+ color: #86868b;
173
+ font-size: 0.8125rem;
174
+ margin: 0;
175
+ }
176
+
177
+ /* ==============================================
178
+ * Hero Section
179
+ * ============================================== */
180
+
181
+ .dt-hero-bg {
182
+ background: linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 40%, #fbfbfd 100%);
183
+ position: relative;
184
+ }
185
+
186
+ .dt-hero-bg::before {
187
+ content: "";
188
+ position: absolute;
189
+ top: 0;
190
+ left: 50%;
191
+ transform: translateX(-50%);
192
+ width: 100%;
193
+ height: 100%;
194
+ background: radial-gradient(
195
+ ellipse 60% 50% at 50% 40%,
196
+ rgba(0, 113, 227, 0.06) 0%,
197
+ rgba(251, 251, 253, 0) 70%
198
+ );
199
+ pointer-events: none;
200
+ }
201
+
202
+ .dt-hero-title {
203
+ font-size: clamp(3rem, 8vw, 5rem);
204
+ font-weight: 700;
205
+ line-height: 1.05;
206
+ letter-spacing: -0.03em;
207
+ background: linear-gradient(135deg, #1d1d1f 30%, #6e6e73 100%);
208
+ -webkit-background-clip: text;
209
+ -webkit-text-fill-color: transparent;
210
+ background-clip: text;
211
+ margin-bottom: 1.25rem;
212
+ }
213
+
214
+ .dt-hero-subtitle {
215
+ font-size: clamp(1.25rem, 2.5vw, 1.5rem);
216
+ font-weight: 400;
217
+ line-height: 1.5;
218
+ color: #6e6e73;
219
+ max-width: 40rem;
220
+ margin: 0 auto 2.5rem;
221
+ letter-spacing: -0.005em;
222
+ }
223
+
224
+ .dt-hero-cta {
225
+ display: flex;
226
+ gap: 1rem;
227
+ justify-content: center;
228
+ margin-top: 2rem;
229
+ }
230
+
231
+ /* ==============================================
232
+ * Section Typography
233
+ * ============================================== */
234
+
235
+ .dt-section-title {
236
+ font-size: clamp(2rem, 4vw, 2.75rem);
237
+ font-weight: 700;
238
+ letter-spacing: -0.02em;
239
+ line-height: 1.1;
240
+ color: #1d1d1f;
241
+ margin-bottom: 0.75rem;
242
+ }
243
+
244
+ .dt-section-subtitle {
245
+ font-size: clamp(1rem, 2vw, 1.25rem);
246
+ font-weight: 400;
247
+ line-height: 1.5;
248
+ color: #6e6e73;
249
+ max-width: 36rem;
250
+ margin: 0 auto 3rem;
251
+ }
252
+
253
+ /* ==============================================
254
+ * Buttons
255
+ * ============================================== */
256
+
257
+ .dt-primary-btn {
258
+ display: inline-flex;
259
+ align-items: center;
260
+ justify-content: center;
261
+ padding: 0.875rem 1.75rem;
262
+ background: #0071e3;
263
+ color: white;
264
+ border-radius: 980px;
265
+ font-size: 1.0625rem;
266
+ font-weight: 500;
267
+ text-decoration: none;
268
+ transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
269
+ border: none;
270
+ cursor: pointer;
271
+ letter-spacing: -0.005em;
272
+ }
273
+
274
+ .dt-primary-btn:hover {
275
+ background: #0077ed;
276
+ transform: scale(1.02);
277
+ box-shadow: 0 4px 16px rgba(0, 113, 227, 0.3);
278
+ }
279
+
280
+ .dt-secondary-btn {
281
+ display: inline-flex;
282
+ align-items: center;
283
+ justify-content: center;
284
+ padding: 0.875rem 1.75rem;
285
+ background: transparent;
286
+ color: #0071e3;
287
+ border: 1.5px solid #0071e3;
288
+ border-radius: 980px;
289
+ font-size: 1.0625rem;
290
+ font-weight: 500;
291
+ text-decoration: none;
292
+ transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
293
+ cursor: pointer;
294
+ letter-spacing: -0.005em;
295
+ }
296
+
297
+ .dt-secondary-btn:hover {
298
+ background: #0071e3;
299
+ color: white;
300
+ transform: scale(1.02);
301
+ }
302
+
303
+ /* ==============================================
304
+ * Animations
305
+ * ============================================== */
306
+
307
+ .dt-anim-slide-up {
308
+ animation: dt-fade-in-up 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) both;
309
+ }
310
+
311
+ .dt-anim-scale-in {
312
+ animation: dt-fade-in-scale 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) both;
313
+ }
314
+
315
+ .dt-fade-in {
316
+ animation: dt-fade-in-up 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) both;
317
+ }
318
+
319
+ .dt-stagger-1 { animation-delay: 0.1s; }
320
+ .dt-stagger-2 { animation-delay: 0.2s; }
321
+ .dt-stagger-3 { animation-delay: 0.35s; }
322
+ .dt-stagger-4 { animation-delay: 0.5s; }
323
+ .dt-stagger-5 { animation-delay: 0.65s; }
324
+
325
+ /* ==============================================
326
+ * Page Layout
327
+ * ============================================== */
328
+
329
+ .dt-page-container {
330
+ max-width: 720px;
331
+ }
332
+
333
+ .dt-page-title {
334
+ font-size: 2.25rem;
335
+ font-weight: 700;
336
+ color: #1d1d1f;
337
+ letter-spacing: -0.02em;
338
+ margin-bottom: 0.5rem;
339
+ }
340
+
341
+ .dt-page-desc {
342
+ font-size: 1.125rem;
343
+ color: #6e6e73;
344
+ line-height: 1.5;
345
+ }
346
+
347
+ .dt-category-heading {
348
+ font-size: 0.8125rem;
349
+ font-weight: 600;
350
+ color: #86868b;
351
+ text-transform: uppercase;
352
+ letter-spacing: 0.06em;
353
+ margin-bottom: 1rem;
354
+ }
355
+
356
+ .dt-card-title {
357
+ font-size: 1.0625rem;
358
+ font-weight: 600;
359
+ color: #1d1d1f;
360
+ letter-spacing: -0.01em;
361
+ margin-bottom: 0.25rem;
362
+ }
363
+
364
+ .dt-card-desc {
365
+ color: #6e6e73;
366
+ font-size: 0.875rem;
367
+ line-height: 1.5;
368
+ margin: 0;
369
+ }
370
+
371
+ .dt-content-desc {
372
+ font-size: 1.125rem;
373
+ color: #6e6e73;
374
+ line-height: 1.5;
375
+ padding-bottom: 1.5rem;
376
+ border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
377
+ }
378
+
379
+ /* ==============================================
380
+ * Content Typography
381
+ * ============================================== */
382
+
383
+ .dt-content {
384
+ line-height: 1.75;
385
+ color: #1d1d1f;
386
+ }
387
+
388
+ .dt-content h1 {
389
+ font-size: 1.875rem;
390
+ font-weight: 700;
391
+ margin-top: 3rem;
392
+ margin-bottom: 0.75rem;
393
+ color: #1d1d1f;
394
+ letter-spacing: -0.02em;
395
+ line-height: 1.2;
396
+ }
397
+
398
+ .dt-content h2 {
399
+ font-size: 1.5rem;
400
+ font-weight: 600;
401
+ margin-top: 2.5rem;
402
+ margin-bottom: 0.75rem;
403
+ color: #1d1d1f;
404
+ letter-spacing: -0.015em;
405
+ line-height: 1.25;
406
+ padding-top: 1.5rem;
407
+ border-top: 0.5px solid rgba(0, 0, 0, 0.06);
408
+ }
409
+
410
+ .dt-content h2:first-child,
411
+ .dt-content hr + h2 {
412
+ border-top: none;
413
+ padding-top: 0;
414
+ margin-top: 0;
415
+ }
416
+
417
+ .dt-content h3 {
418
+ font-size: 1.25rem;
419
+ font-weight: 600;
420
+ margin-top: 2rem;
421
+ margin-bottom: 0.5rem;
422
+ color: #1d1d1f;
423
+ letter-spacing: -0.01em;
424
+ line-height: 1.3;
425
+ }
426
+
427
+ .dt-content p {
428
+ margin-bottom: 1.25rem;
429
+ font-size: 1rem;
430
+ color: #1d1d1f;
431
+ }
432
+
433
+ .dt-content ul,
434
+ .dt-content ol {
435
+ margin-left: 1.5rem;
436
+ margin-bottom: 1.25rem;
437
+ }
438
+
439
+ .dt-content li {
440
+ margin-bottom: 0.375rem;
441
+ font-size: 1rem;
442
+ line-height: 1.65;
443
+ }
444
+
445
+ .dt-content code {
446
+ background: rgba(0, 0, 0, 0.04);
447
+ padding: 0.15rem 0.4rem;
448
+ border-radius: 5px;
449
+ font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
450
+ font-size: 0.875em;
451
+ color: #1d1d1f;
452
+ border: 0.5px solid rgba(0, 0, 0, 0.06);
453
+ }
454
+
455
+ .dt-content pre {
456
+ background: #1d1d1f;
457
+ color: #e5e5ea;
458
+ padding: 1.25rem 1.5rem;
459
+ border-radius: 12px;
460
+ overflow-x: auto;
461
+ margin-bottom: 1.25rem;
462
+ font-size: 0.875rem;
463
+ line-height: 1.65;
464
+ border: 0.5px solid rgba(0, 0, 0, 0.1);
465
+ }
466
+
467
+ .dt-content pre code {
468
+ background: none;
469
+ color: inherit;
470
+ padding: 0;
471
+ border: none;
472
+ font-size: inherit;
473
+ }
474
+
475
+ .dt-content a {
476
+ color: #0071e3;
477
+ text-decoration: none;
478
+ transition: color 0.2s ease;
479
+ }
480
+
481
+ .dt-content a:hover {
482
+ text-decoration: underline;
483
+ }
484
+
485
+ .dt-content strong {
486
+ font-weight: 600;
487
+ color: #1d1d1f;
488
+ }
489
+
490
+ .dt-content blockquote {
491
+ border-left: 3px solid rgba(0, 0, 0, 0.08);
492
+ padding: 0.75rem 1.25rem;
493
+ margin: 1.5rem 0;
494
+ color: #6e6e73;
495
+ background: rgba(0, 0, 0, 0.02);
496
+ border-radius: 0 10px 10px 0;
497
+ }
498
+
499
+ .dt-content hr {
500
+ border: none;
501
+ border-top: 0.5px solid rgba(0, 0, 0, 0.06);
502
+ margin: 2.5rem 0;
503
+ }
504
+
505
+ /* Tables */
506
+
507
+ .dt-content table {
508
+ width: 100%;
509
+ border-collapse: collapse;
510
+ margin: 1.5rem 0;
511
+ font-size: 0.9375rem;
512
+ line-height: 1.5;
513
+ border-radius: 10px;
514
+ overflow: hidden;
515
+ border: 0.5px solid rgba(0, 0, 0, 0.08);
516
+ }
517
+
518
+ .dt-content thead {
519
+ background: rgba(0, 0, 0, 0.03);
520
+ }
521
+
522
+ .dt-content th {
523
+ font-weight: 600;
524
+ color: #1d1d1f;
525
+ text-align: left;
526
+ padding: 0.75rem 1rem;
527
+ font-size: 0.8125rem;
528
+ text-transform: uppercase;
529
+ letter-spacing: 0.03em;
530
+ border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
531
+ }
532
+
533
+ .dt-content td {
534
+ padding: 0.75rem 1rem;
535
+ color: #1d1d1f;
536
+ border-bottom: 0.5px solid rgba(0, 0, 0, 0.04);
537
+ }
538
+
539
+ .dt-content tbody tr:last-child td {
540
+ border-bottom: none;
541
+ }
542
+
543
+ .dt-content tbody tr:hover {
544
+ background: rgba(0, 0, 0, 0.02);
545
+ }
546
+
547
+ /* ==============================================
548
+ * Code Blocks
549
+ * ============================================== */
550
+
551
+ .dt-code-block {
552
+ margin: 1.5rem 0;
553
+ border-radius: 12px;
554
+ overflow: hidden;
555
+ border: 0.5px solid rgba(0, 0, 0, 0.1);
556
+ }
557
+
558
+ .dt-code-header {
559
+ background: #161617;
560
+ padding: 0.5rem 1.25rem;
561
+ display: flex;
562
+ justify-content: space-between;
563
+ align-items: center;
564
+ }
565
+
566
+ .dt-code-lang {
567
+ color: #86868b;
568
+ font-size: 0.6875rem;
569
+ text-transform: uppercase;
570
+ font-weight: 600;
571
+ letter-spacing: 0.04em;
572
+ }
573
+
574
+ .dt-code-block pre {
575
+ margin: 0;
576
+ border-radius: 0;
577
+ border: none;
578
+ }
579
+
580
+ .dt-code-header + pre {
581
+ border-radius: 0;
582
+ }
583
+
584
+ /* Shiki integration */
585
+
586
+ .dt-content pre.shiki {
587
+ position: relative;
588
+ padding: 2.25rem 1.5rem 1.25rem;
589
+ }
590
+
591
+ .dt-content pre.shiki[data-language]::before {
592
+ content: attr(data-language);
593
+ position: absolute;
594
+ top: 0.625rem;
595
+ right: 1rem;
596
+ color: #636e7b;
597
+ font-size: 0.6875rem;
598
+ text-transform: uppercase;
599
+ font-weight: 600;
600
+ letter-spacing: 0.04em;
601
+ pointer-events: none;
602
+ user-select: none;
603
+ }
604
+
605
+ .dt-content pre.shiki code {
606
+ display: block;
607
+ }
608
+
609
+ .dt-content pre.shiki .line {
610
+ display: inline;
611
+ }
612
+
613
+ /* ==============================================
614
+ * 404 Page
615
+ * ============================================== */
616
+
617
+ .dt-not-found-title {
618
+ font-size: clamp(4rem, 12vw, 8rem);
619
+ font-weight: 700;
620
+ line-height: 1;
621
+ letter-spacing: -0.04em;
622
+ background: linear-gradient(135deg, #1d1d1f 30%, #6e6e73 100%);
623
+ -webkit-background-clip: text;
624
+ -webkit-text-fill-color: transparent;
625
+ background-clip: text;
626
+ margin-bottom: 1.25rem;
627
+ }
628
+
629
+ /* ==============================================
630
+ * Responsive
631
+ * ============================================== */
632
+
633
+ @media (max-width: 768px) {
634
+ .dt-nav-inner {
635
+ padding: 12px 1rem !important;
636
+ height: 48px !important;
637
+ }
638
+
639
+ .dt-nav-logo { font-size: 1.125rem !important; }
640
+ .dt-nav-links { gap: 1.25rem !important; }
641
+ .dt-nav-link { font-size: 0.8125rem; }
642
+
643
+ .dt-main {
644
+ padding: 1.25rem 1rem 2.5rem !important;
645
+ }
646
+
647
+ .dt-hero-section {
648
+ padding: 60px 16px 48px !important;
649
+ }
650
+
651
+ .dt-hero-cta {
652
+ flex-direction: column !important;
653
+ align-items: center !important;
654
+ gap: 0.75rem !important;
655
+ }
656
+
657
+ .dt-section-features {
658
+ padding: 48px 16px !important;
659
+ }
660
+
661
+ .dt-section-links {
662
+ padding: 0 16px 60px !important;
663
+ }
664
+
665
+ .dt-section-links-inner {
666
+ padding-top: 48px !important;
667
+ }
668
+
669
+ .dt-features-grid {
670
+ grid-template-columns: 1fr !important;
671
+ gap: 1rem !important;
672
+ }
673
+
674
+ .dt-links-grid {
675
+ grid-template-columns: 1fr !important;
676
+ }
677
+
678
+ .dt-page-title {
679
+ font-size: 1.75rem !important;
680
+ }
681
+
682
+ .dt-page-desc {
683
+ font-size: 1rem !important;
684
+ }
685
+
686
+ .dt-page-container {
687
+ max-width: 100%;
688
+ }
689
+
690
+ .dt-footer-inner {
691
+ flex-direction: column !important;
692
+ align-items: center !important;
693
+ text-align: center;
694
+ padding: 1.5rem 1rem !important;
695
+ }
696
+
697
+ .dt-footer-links {
698
+ justify-content: center !important;
699
+ gap: 1.5rem !important;
700
+ }
701
+
702
+ .dt-not-found-section {
703
+ padding: 60px 16px 48px !important;
704
+ }
705
+
706
+ .dt-not-found-cta {
707
+ flex-direction: column !important;
708
+ align-items: center !important;
709
+ gap: 0.75rem !important;
710
+ }
711
+
712
+ .dt-content { line-height: 1.7; }
713
+ .dt-content h1 { font-size: 1.5rem; margin-top: 2rem; }
714
+ .dt-content h2 { font-size: 1.25rem; margin-top: 2rem; padding-top: 1.25rem; }
715
+ .dt-content h3 { font-size: 1.125rem; margin-top: 1.5rem; }
716
+ .dt-content pre { padding: 1rem; font-size: 0.8125rem; border-radius: 10px; }
717
+ .dt-content ul, .dt-content ol { margin-left: 1.25rem; }
718
+
719
+ .dt-content table {
720
+ font-size: 0.8125rem;
721
+ display: block;
722
+ overflow-x: auto;
723
+ -webkit-overflow-scrolling: touch;
724
+ }
725
+
726
+ .dt-content th, .dt-content td { padding: 0.625rem 0.75rem; }
727
+
728
+ .dt-code-block { border-radius: 10px; }
729
+ .dt-code-header { padding: 0.375rem 1rem; }
730
+
731
+ }
732
+ `;
733
+
734
+ //#endregion
735
+ //#region ../ui/src/theme/tokens.ts
736
+ /**
737
+ * Default design tokens for @semajsx/ui
738
+ *
739
+ * These tokens define the visual language of the component library.
740
+ * All components reference these tokens via CSS custom properties,
741
+ * enabling runtime theme switching.
742
+ *
743
+ * @example
744
+ * ```ts
745
+ * import { tokens } from "@semajsx/ui/theme";
746
+ *
747
+ * // Use in custom styles
748
+ * const myRule = rule`${c.box} {
749
+ * color: ${tokens.colors.text};
750
+ * padding: ${tokens.space.md};
751
+ * }`;
752
+ * ```
753
+ */
754
+ const tokenDefinition = {
755
+ colors: {
756
+ primary: "#0071e3",
757
+ primaryHover: "#0077ed",
758
+ primaryActive: "#0068d6",
759
+ background: "#fbfbfd",
760
+ surface: "#f5f5f7",
761
+ border: "rgba(0, 0, 0, 0.08)",
762
+ text: "#1d1d1f",
763
+ textMuted: "#6e6e73",
764
+ textTertiary: "#86868b",
765
+ danger: "#ff453a",
766
+ dangerHover: "#ff6961",
767
+ success: "#34c759",
768
+ warning: "#ff9f0a",
769
+ info: "#007aff",
770
+ tip: "#af52de",
771
+ onPrimary: "#ffffff",
772
+ onDanger: "#ffffff"
773
+ },
774
+ space: {
775
+ xs: "0.25rem",
776
+ sm: "0.5rem",
777
+ md: "0.75rem",
778
+ lg: "1rem",
779
+ xl: "1.5rem",
780
+ xxl: "2rem"
781
+ },
782
+ radii: {
783
+ sm: "10px",
784
+ md: "12px",
785
+ lg: "16px",
786
+ xl: "20px",
787
+ pill: "980px"
788
+ },
789
+ fonts: {
790
+ base: "-apple-system, BlinkMacSystemFont, \"SF Pro Display\", \"SF Pro Text\", Inter, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
791
+ mono: "\"SF Mono\", \"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace"
792
+ },
793
+ fontSizes: {
794
+ xs: "0.8125rem",
795
+ sm: "0.875rem",
796
+ md: "1rem",
797
+ lg: "1.0625rem"
798
+ },
799
+ fontWeights: {
800
+ normal: "400",
801
+ medium: "500",
802
+ semibold: "600",
803
+ bold: "700"
804
+ },
805
+ lineHeights: {
806
+ tight: "1.25",
807
+ normal: "1.6"
808
+ },
809
+ shadows: {
810
+ sm: "0 1px 3px rgba(0, 0, 0, 0.03)",
811
+ md: "0 1px 4px rgba(0, 0, 0, 0.04)",
812
+ lg: "0 8px 28px rgba(0, 0, 0, 0.08)",
813
+ primaryGlow: "0 4px 16px rgba(0, 113, 227, 0.3)"
814
+ },
815
+ transitions: {
816
+ fast: "0.2s ease",
817
+ normal: "0.3s cubic-bezier(0.25, 0.1, 0.25, 1)"
818
+ }
819
+ };
820
+ const tokens = defineTokens(tokenDefinition);
821
+
822
+ //#endregion
823
+ //#region ../ui/src/components/callout/callout.style.ts
824
+ /**
825
+ * Callout component styles
826
+ *
827
+ * Five semantic variants: info, warning, success, error, tip
828
+ * Matching the docs site callout design.
829
+ */
830
+ var callout_style_exports = /* @__PURE__ */ __exportAll({
831
+ content: () => content,
832
+ icon: () => icon$2,
833
+ root: () => root$4,
834
+ title: () => title
835
+ });
836
+ const c$4 = classes([
837
+ "root",
838
+ "title",
839
+ "icon",
840
+ "content"
841
+ ]);
842
+ const root$4 = rule`${c$4.root} {
843
+ padding: 1.25rem 1.5rem;
844
+ margin: 1.5rem 0;
845
+ border-radius: 14px;
846
+ border: 0.5px solid rgba(0, 0, 0, 0.04);
847
+ font-family: ${tokens.fonts.base};
848
+ }`;
849
+ const title = rule`${c$4.title} {
850
+ font-weight: ${tokens.fontWeights.semibold};
851
+ font-size: 0.9375rem;
852
+ margin: 0 0 0.5rem;
853
+ display: flex;
854
+ align-items: center;
855
+ gap: ${tokens.space.sm};
856
+ letter-spacing: -0.005em;
857
+ }`;
858
+ const icon$2 = rule`${c$4.icon} {
859
+ width: 18px;
860
+ height: 18px;
861
+ display: inline-flex;
862
+ align-items: center;
863
+ justify-content: center;
864
+ flex-shrink: 0;
865
+ }`;
866
+ const content = rule`${c$4.content} {
867
+ color: ${tokens.colors.text};
868
+ font-size: 0.9375rem;
869
+ line-height: ${tokens.lineHeights.normal};
870
+ }`;
871
+
872
+ //#endregion
873
+ //#region ../ui/src/components/callout/callout.tsx
874
+ const SVG_ATTRS = {
875
+ xmlns: "http://www.w3.org/2000/svg",
876
+ width: "18",
877
+ height: "18",
878
+ viewBox: "0 0 24 24",
879
+ fill: "none",
880
+ stroke: "currentColor",
881
+ "stroke-width": "2",
882
+ "stroke-linecap": "round",
883
+ "stroke-linejoin": "round"
884
+ };
885
+ function InfoIcon() {
886
+ return /* @__PURE__ */ jsxs("svg", {
887
+ ...SVG_ATTRS,
888
+ children: [
889
+ /* @__PURE__ */ jsx("circle", {
890
+ cx: "12",
891
+ cy: "12",
892
+ r: "10"
893
+ }),
894
+ /* @__PURE__ */ jsx("path", { d: "M12 16v-4" }),
895
+ /* @__PURE__ */ jsx("path", { d: "M12 8h.01" })
896
+ ]
897
+ });
898
+ }
899
+ function WarningIcon() {
900
+ return /* @__PURE__ */ jsxs("svg", {
901
+ ...SVG_ATTRS,
902
+ children: [
903
+ /* @__PURE__ */ jsx("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
904
+ /* @__PURE__ */ jsx("path", { d: "M12 9v4" }),
905
+ /* @__PURE__ */ jsx("path", { d: "M12 17h.01" })
906
+ ]
907
+ });
908
+ }
909
+ function SuccessIcon() {
910
+ return /* @__PURE__ */ jsxs("svg", {
911
+ ...SVG_ATTRS,
912
+ children: [/* @__PURE__ */ jsx("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }), /* @__PURE__ */ jsx("path", { d: "m9 11 3 3L22 4" })]
913
+ });
914
+ }
915
+ function ErrorIcon() {
916
+ return /* @__PURE__ */ jsxs("svg", {
917
+ ...SVG_ATTRS,
918
+ children: [
919
+ /* @__PURE__ */ jsx("circle", {
920
+ cx: "12",
921
+ cy: "12",
922
+ r: "10"
923
+ }),
924
+ /* @__PURE__ */ jsx("path", { d: "m15 9-6 6" }),
925
+ /* @__PURE__ */ jsx("path", { d: "m9 9 6 6" })
926
+ ]
927
+ });
928
+ }
929
+ function TipIcon() {
930
+ return /* @__PURE__ */ jsxs("svg", {
931
+ ...SVG_ATTRS,
932
+ children: [
933
+ /* @__PURE__ */ jsx("path", { d: "M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5" }),
934
+ /* @__PURE__ */ jsx("path", { d: "M9 18h6" }),
935
+ /* @__PURE__ */ jsx("path", { d: "M10 22h4" })
936
+ ]
937
+ });
938
+ }
939
+ const calloutConfig = {
940
+ info: {
941
+ bg: "rgba(0, 122, 255, 0.06)",
942
+ accent: "#007aff",
943
+ icon: InfoIcon
944
+ },
945
+ warning: {
946
+ bg: "rgba(255, 159, 10, 0.08)",
947
+ accent: "#ff9f0a",
948
+ icon: WarningIcon
949
+ },
950
+ success: {
951
+ bg: "rgba(52, 199, 89, 0.08)",
952
+ accent: "#34c759",
953
+ icon: SuccessIcon
954
+ },
955
+ error: {
956
+ bg: "rgba(255, 69, 58, 0.08)",
957
+ accent: "#ff453a",
958
+ icon: ErrorIcon
959
+ },
960
+ tip: {
961
+ bg: "rgba(175, 82, 222, 0.06)",
962
+ accent: "#af52de",
963
+ icon: TipIcon
964
+ }
965
+ };
966
+ function Callout(props) {
967
+ const config = calloutConfig[props.type ?? "info"];
968
+ const IconComponent = config.icon;
969
+ return /* @__PURE__ */ jsxs("div", {
970
+ class: [root$4, props.class],
971
+ style: `background: ${config.bg}`,
972
+ role: "note",
973
+ children: [props.title && /* @__PURE__ */ jsxs("div", {
974
+ class: title,
975
+ style: `color: ${config.accent}`,
976
+ children: [/* @__PURE__ */ jsx("span", {
977
+ class: icon$2,
978
+ children: /* @__PURE__ */ jsx(IconComponent, {})
979
+ }), props.title]
980
+ }), /* @__PURE__ */ jsx("div", {
981
+ class: content,
982
+ children: props.children
983
+ })]
984
+ });
985
+ }
986
+
987
+ //#endregion
988
+ //#region ../ui/src/components/badge/badge.style.ts
989
+ /**
990
+ * Badge component styles
991
+ *
992
+ * Pill-shaped labels with semantic color variants.
993
+ */
994
+ var badge_style_exports = /* @__PURE__ */ __exportAll({ root: () => root$3 });
995
+ const c$3 = classes(["root"]);
996
+ const root$3 = rule`${c$3.root} {
997
+ display: inline-flex;
998
+ align-items: center;
999
+ font-size: 0.6875rem;
1000
+ font-weight: ${tokens.fontWeights.semibold};
1001
+ font-family: ${tokens.fonts.base};
1002
+ padding: 0.125rem 0.5rem;
1003
+ border-radius: ${tokens.radii.pill};
1004
+ letter-spacing: 0.02em;
1005
+ text-transform: uppercase;
1006
+ white-space: nowrap;
1007
+ line-height: 1.6;
1008
+ }`;
1009
+
1010
+ //#endregion
1011
+ //#region ../ui/src/components/badge/badge.tsx
1012
+ const badgeColors = {
1013
+ default: {
1014
+ bg: "rgba(0, 0, 0, 0.06)",
1015
+ fg: "#1d1d1f"
1016
+ },
1017
+ success: {
1018
+ bg: "rgba(52, 199, 89, 0.12)",
1019
+ fg: "#248a3d"
1020
+ },
1021
+ warning: {
1022
+ bg: "rgba(255, 159, 10, 0.12)",
1023
+ fg: "#b25000"
1024
+ },
1025
+ danger: {
1026
+ bg: "rgba(255, 69, 58, 0.12)",
1027
+ fg: "#d70015"
1028
+ },
1029
+ info: {
1030
+ bg: "rgba(0, 122, 255, 0.1)",
1031
+ fg: "#0055b3"
1032
+ },
1033
+ tip: {
1034
+ bg: "rgba(175, 82, 222, 0.1)",
1035
+ fg: "#8944ab"
1036
+ }
1037
+ };
1038
+ function Badge(props) {
1039
+ const config = badgeColors[props.color ?? "default"];
1040
+ return /* @__PURE__ */ jsx("span", {
1041
+ class: [root$3, props.class],
1042
+ style: `background: ${config.bg}; color: ${config.fg}`,
1043
+ children: props.children
1044
+ });
1045
+ }
1046
+
1047
+ //#endregion
1048
+ //#region ../ui/src/components/card/card.style.ts
1049
+ /**
1050
+ * Card component styles
1051
+ *
1052
+ * Two variants matching the docs site design:
1053
+ * - feature: Large card with icon, heading, description
1054
+ * - link: Smaller clickable card for navigation
1055
+ */
1056
+ var card_style_exports = /* @__PURE__ */ __exportAll({
1057
+ desc: () => desc,
1058
+ descLink: () => descLink,
1059
+ feature: () => feature,
1060
+ featureStates: () => featureStates,
1061
+ heading: () => heading,
1062
+ headingLink: () => headingLink,
1063
+ icon: () => icon$1,
1064
+ link: () => link,
1065
+ linkStates: () => linkStates,
1066
+ root: () => root$2
1067
+ });
1068
+ const c$2 = classes([
1069
+ "root",
1070
+ "feature",
1071
+ "link",
1072
+ "icon",
1073
+ "heading",
1074
+ "desc"
1075
+ ]);
1076
+ const root$2 = rule`${c$2.root} {
1077
+ background: white;
1078
+ border: 0.5px solid rgba(0, 0, 0, 0.06);
1079
+ font-family: ${tokens.fonts.base};
1080
+ transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
1081
+ }`;
1082
+ const feature = rule`${c$2.feature} {
1083
+ border-radius: ${tokens.radii.xl};
1084
+ padding: 2.5rem;
1085
+ box-shadow: ${tokens.shadows.md};
1086
+ }`;
1087
+ const featureStates = rule`${c$2.feature}:hover {
1088
+ transform: translateY(-4px) scale(1.01);
1089
+ box-shadow: ${tokens.shadows.lg};
1090
+ }`;
1091
+ const link = rule`${c$2.link} {
1092
+ display: block;
1093
+ border-radius: ${tokens.radii.lg};
1094
+ padding: 1.75rem;
1095
+ box-shadow: ${tokens.shadows.sm};
1096
+ text-decoration: none;
1097
+ cursor: pointer;
1098
+ }`;
1099
+ const linkStates = rules(rule`${c$2.link}:hover {
1100
+ border-color: rgba(0, 113, 227, 0.3);
1101
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
1102
+ transform: translateY(-2px);
1103
+ }`);
1104
+ const icon$1 = rule`${c$2.icon} {
1105
+ font-size: 2rem;
1106
+ width: 48px;
1107
+ height: 48px;
1108
+ display: flex;
1109
+ align-items: center;
1110
+ justify-content: center;
1111
+ background: ${tokens.colors.surface};
1112
+ border-radius: ${tokens.radii.md};
1113
+ margin-bottom: 1.25rem;
1114
+ }`;
1115
+ const heading = rule`${c$2.heading} {
1116
+ font-size: 1.375rem;
1117
+ font-weight: ${tokens.fontWeights.semibold};
1118
+ color: ${tokens.colors.text};
1119
+ margin: 0 0 0.5rem;
1120
+ letter-spacing: -0.01em;
1121
+ }`;
1122
+ const headingLink = rule`${c$2.link} ${c$2.heading} {
1123
+ font-size: ${tokens.fontSizes.lg};
1124
+ margin-bottom: 0.25rem;
1125
+ }`;
1126
+ const desc = rule`${c$2.desc} {
1127
+ color: ${tokens.colors.textMuted};
1128
+ line-height: ${tokens.lineHeights.normal};
1129
+ font-size: 0.9375rem;
1130
+ margin: 0;
1131
+ }`;
1132
+ const descLink = rule`${c$2.link} ${c$2.desc} {
1133
+ font-size: ${tokens.fontSizes.sm};
1134
+ line-height: 1.5;
1135
+ }`;
1136
+
1137
+ //#endregion
1138
+ //#region ../ui/src/components/card/card.tsx
1139
+ function Card(props) {
1140
+ const variant = props.variant ?? "feature";
1141
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
1142
+ props.icon && /* @__PURE__ */ jsx("div", {
1143
+ class: icon$1,
1144
+ children: props.icon
1145
+ }),
1146
+ props.heading && /* @__PURE__ */ jsx("h3", {
1147
+ class: [heading, variant === "link" && headingLink],
1148
+ children: props.heading
1149
+ }),
1150
+ props.description && /* @__PURE__ */ jsx("p", {
1151
+ class: [desc, variant === "link" && descLink],
1152
+ children: props.description
1153
+ }),
1154
+ props.children
1155
+ ] });
1156
+ if (variant === "link") return /* @__PURE__ */ jsx("a", {
1157
+ href: props.href,
1158
+ class: [
1159
+ root$2,
1160
+ link,
1161
+ linkStates,
1162
+ props.class
1163
+ ],
1164
+ style: props.style,
1165
+ children: content
1166
+ });
1167
+ return /* @__PURE__ */ jsx("div", {
1168
+ class: [
1169
+ root$2,
1170
+ feature,
1171
+ featureStates,
1172
+ props.class
1173
+ ],
1174
+ style: props.style,
1175
+ children: content
1176
+ });
1177
+ }
1178
+
1179
+ //#endregion
1180
+ //#region ../ui/src/theme/themes.ts
1181
+ /**
1182
+ * Built-in themes for @semajsx/ui
1183
+ *
1184
+ * Provides light (default) and dark themes. Custom themes can be
1185
+ * created using createTheme() from @semajsx/style.
1186
+ *
1187
+ * @example
1188
+ * ```tsx
1189
+ * import { lightTheme, darkTheme } from "@semajsx/ui/theme";
1190
+ * import { inject } from "@semajsx/style";
1191
+ *
1192
+ * // Apply default (light) theme to :root
1193
+ * inject(lightTheme);
1194
+ *
1195
+ * // Scope dark theme to an element
1196
+ * <div class={darkTheme}>
1197
+ * <Button>Dark button</Button>
1198
+ * </div>
1199
+ * ```
1200
+ */
1201
+ /**
1202
+ * Light theme - applies token defaults to :root
1203
+ */
1204
+ const lightTheme = createTheme(tokens);
1205
+ /**
1206
+ * Dark theme - scoped to a CSS class
1207
+ */
1208
+ const darkTheme = createTheme(tokens, {
1209
+ colors: {
1210
+ primary: "#2997ff",
1211
+ primaryHover: "#5ab4ff",
1212
+ primaryActive: "#0071e3",
1213
+ background: "#000000",
1214
+ surface: "#1c1c1e",
1215
+ border: "rgba(255, 255, 255, 0.12)",
1216
+ text: "#f5f5f7",
1217
+ textMuted: "#a1a1a6",
1218
+ textTertiary: "#6e6e73",
1219
+ danger: "#ff453a",
1220
+ dangerHover: "#ff6961",
1221
+ success: "#30d158",
1222
+ warning: "#ffd60a",
1223
+ info: "#0a84ff",
1224
+ tip: "#bf5af2",
1225
+ onPrimary: "#ffffff",
1226
+ onDanger: "#ffffff"
1227
+ },
1228
+ shadows: {
1229
+ sm: "0 1px 3px rgba(0, 0, 0, 0.2)",
1230
+ md: "0 1px 4px rgba(0, 0, 0, 0.3)",
1231
+ lg: "0 8px 28px rgba(0, 0, 0, 0.4)",
1232
+ primaryGlow: "0 4px 16px rgba(41, 151, 255, 0.3)"
1233
+ }
1234
+ });
1235
+
1236
+ //#endregion
1237
+ //#region ../ui/src/components/button/button.style.ts
1238
+ /**
1239
+ * Button component styles
1240
+ *
1241
+ * All styles reference theme tokens via CSS custom properties,
1242
+ * so they respond to theme changes automatically.
1243
+ */
1244
+ var button_style_exports = /* @__PURE__ */ __exportAll({
1245
+ danger: () => danger,
1246
+ dangerStates: () => dangerStates,
1247
+ ghost: () => ghost,
1248
+ ghostStates: () => ghostStates,
1249
+ icon: () => icon,
1250
+ lg: () => lg,
1251
+ md: () => md,
1252
+ outline: () => outline,
1253
+ outlineStates: () => outlineStates,
1254
+ root: () => root$1,
1255
+ rootStates: () => rootStates,
1256
+ sm: () => sm,
1257
+ solid: () => solid,
1258
+ solidStates: () => solidStates
1259
+ });
1260
+ const c$1 = classes([
1261
+ "root",
1262
+ "solid",
1263
+ "outline",
1264
+ "ghost",
1265
+ "sm",
1266
+ "md",
1267
+ "lg",
1268
+ "danger",
1269
+ "icon"
1270
+ ]);
1271
+ const root$1 = rule`${c$1.root} {
1272
+ display: inline-flex;
1273
+ align-items: center;
1274
+ justify-content: center;
1275
+ gap: ${tokens.space.sm};
1276
+ border: 1.5px solid transparent;
1277
+ border-radius: ${tokens.radii.pill};
1278
+ font-family: ${tokens.fonts.base};
1279
+ font-weight: ${tokens.fontWeights.medium};
1280
+ line-height: ${tokens.lineHeights.tight};
1281
+ letter-spacing: -0.005em;
1282
+ cursor: pointer;
1283
+ user-select: none;
1284
+ transition: all ${tokens.transitions.normal};
1285
+ }`;
1286
+ const rootStates = rules(rule`${c$1.root}:focus-visible {
1287
+ outline: 2px solid ${tokens.colors.primary};
1288
+ outline-offset: 2px;
1289
+ }`, rule`${c$1.root}:disabled {
1290
+ opacity: 0.5;
1291
+ cursor: not-allowed;
1292
+ pointer-events: none;
1293
+ }`);
1294
+ const solid = rule`${c$1.solid} {
1295
+ background: ${tokens.colors.primary};
1296
+ color: ${tokens.colors.onPrimary};
1297
+ border-color: ${tokens.colors.primary};
1298
+ }`;
1299
+ const solidStates = rules(rule`${c$1.solid}:hover:not(:disabled) {
1300
+ background: ${tokens.colors.primaryHover};
1301
+ border-color: ${tokens.colors.primaryHover};
1302
+ transform: scale(1.02);
1303
+ box-shadow: ${tokens.shadows.primaryGlow};
1304
+ }`, rule`${c$1.solid}:active:not(:disabled) {
1305
+ background: ${tokens.colors.primaryActive};
1306
+ border-color: ${tokens.colors.primaryActive};
1307
+ transform: scale(0.98);
1308
+ box-shadow: none;
1309
+ }`);
1310
+ const outline = rule`${c$1.outline} {
1311
+ background: transparent;
1312
+ color: ${tokens.colors.primary};
1313
+ border-color: ${tokens.colors.primary};
1314
+ }`;
1315
+ const outlineStates = rules(rule`${c$1.outline}:hover:not(:disabled) {
1316
+ background: ${tokens.colors.primary};
1317
+ color: ${tokens.colors.onPrimary};
1318
+ transform: scale(1.02);
1319
+ }`, rule`${c$1.outline}:active:not(:disabled) {
1320
+ background: ${tokens.colors.primaryActive};
1321
+ color: ${tokens.colors.onPrimary};
1322
+ transform: scale(0.98);
1323
+ }`);
1324
+ const ghost = rule`${c$1.ghost} {
1325
+ background: transparent;
1326
+ color: ${tokens.colors.text};
1327
+ border-color: transparent;
1328
+ }`;
1329
+ const ghostStates = rules(rule`${c$1.ghost}:hover:not(:disabled) {
1330
+ background: ${tokens.colors.surface};
1331
+ }`, rule`${c$1.ghost}:active:not(:disabled) {
1332
+ background: ${tokens.colors.border};
1333
+ }`);
1334
+ const danger = rule`${c$1.danger} {
1335
+ background: ${tokens.colors.danger};
1336
+ color: ${tokens.colors.onDanger};
1337
+ border-color: ${tokens.colors.danger};
1338
+ }`;
1339
+ const dangerStates = rules(rule`${c$1.danger}:hover:not(:disabled) {
1340
+ background: ${tokens.colors.dangerHover};
1341
+ border-color: ${tokens.colors.dangerHover};
1342
+ transform: scale(1.02);
1343
+ }`, rule`${c$1.danger}:focus-visible {
1344
+ outline-color: ${tokens.colors.danger};
1345
+ }`);
1346
+ const sm = rule`${c$1.sm} {
1347
+ padding: ${tokens.space.sm} ${tokens.space.lg};
1348
+ font-size: ${tokens.fontSizes.sm};
1349
+ }`;
1350
+ const md = rule`${c$1.md} {
1351
+ padding: ${tokens.space.md} ${tokens.space.xl};
1352
+ font-size: ${tokens.fontSizes.md};
1353
+ }`;
1354
+ const lg = rule`${c$1.lg} {
1355
+ padding: 0.875rem 1.75rem;
1356
+ font-size: ${tokens.fontSizes.lg};
1357
+ }`;
1358
+ const icon = rule`${c$1.icon} {
1359
+ display: inline-flex;
1360
+ flex-shrink: 0;
1361
+ }`;
1362
+
1363
+ //#endregion
1364
+ //#region ../ui/src/components/code-block/code-block.style.ts
1365
+ /**
1366
+ * CodeBlock component styles
1367
+ *
1368
+ * Dark-themed code display with optional language header.
1369
+ */
1370
+ var code_block_style_exports = /* @__PURE__ */ __exportAll({
1371
+ header: () => header,
1372
+ inline: () => inline,
1373
+ lang: () => lang,
1374
+ pre: () => pre,
1375
+ root: () => root
1376
+ });
1377
+ const c = classes([
1378
+ "root",
1379
+ "header",
1380
+ "lang",
1381
+ "pre",
1382
+ "inline"
1383
+ ]);
1384
+ const root = rule`${c.root} {
1385
+ margin: 1.5rem 0;
1386
+ border-radius: ${tokens.radii.md};
1387
+ overflow: hidden;
1388
+ border: 0.5px solid rgba(0, 0, 0, 0.1);
1389
+ font-family: ${tokens.fonts.mono};
1390
+ }`;
1391
+ const header = rule`${c.header} {
1392
+ background: #161617;
1393
+ padding: 0.5rem 1.25rem;
1394
+ display: flex;
1395
+ justify-content: space-between;
1396
+ align-items: center;
1397
+ }`;
1398
+ const lang = rule`${c.lang} {
1399
+ color: #86868b;
1400
+ font-size: 0.6875rem;
1401
+ text-transform: uppercase;
1402
+ font-weight: ${tokens.fontWeights.semibold};
1403
+ letter-spacing: 0.04em;
1404
+ font-family: ${tokens.fonts.mono};
1405
+ }`;
1406
+ const pre = rule`${c.pre} {
1407
+ background: #1d1d1f;
1408
+ color: #e5e5ea;
1409
+ padding: 1.25rem 1.5rem;
1410
+ overflow-x: auto;
1411
+ margin: 0;
1412
+ font-size: ${tokens.fontSizes.sm};
1413
+ line-height: 1.65;
1414
+ font-family: ${tokens.fonts.mono};
1415
+ }`;
1416
+ const inline = rule`${c.inline} {
1417
+ background: rgba(0, 0, 0, 0.04);
1418
+ padding: 0.15rem 0.4rem;
1419
+ border-radius: 5px;
1420
+ font-size: 0.875em;
1421
+ border: 0.5px solid rgba(0, 0, 0, 0.06);
1422
+ font-family: ${tokens.fonts.mono};
1423
+ }`;
1424
+
1425
+ //#endregion
1426
+ //#region ../ui/src/css.ts
1427
+ /**
1428
+ * Pre-collected CSS for SSG/SSR usage
1429
+ *
1430
+ * Since @semajsx/style's inject() requires a DOM, this module provides
1431
+ * all component CSS as a static string for server-side rendering.
1432
+ *
1433
+ * @example
1434
+ * ```tsx
1435
+ * import { componentCSS } from "@semajsx/ui/css";
1436
+ *
1437
+ * // Include in a <style> tag for SSG output
1438
+ * <style>{componentCSS}</style>
1439
+ * ```
1440
+ */
1441
+ function collectCSS(styles) {
1442
+ return Object.values(styles).filter((v) => isStyleToken(v)).map((t) => t.__cssTemplate).join("\n");
1443
+ }
1444
+ /** All @semajsx/ui component CSS (theme variables + component rules) */
1445
+ const componentCSS = [
1446
+ lightTheme.__cssTemplate,
1447
+ collectCSS(button_style_exports),
1448
+ collectCSS(card_style_exports),
1449
+ collectCSS(callout_style_exports),
1450
+ collectCSS(badge_style_exports),
1451
+ collectCSS(code_block_style_exports)
1452
+ ].join("\n");
1453
+
1454
+ //#endregion
1455
+ //#region ../ssg/src/plugins/docs-theme/components.tsx
1456
+ /** Concatenate class names, filtering falsy values */
1457
+ function cx(...args) {
1458
+ return args.filter(Boolean).join(" ");
1459
+ }
1460
+ function CodeBlock({ children, className, language }) {
1461
+ const lang = language || (className?.replace(/^language-/, "") ?? "text");
1462
+ return /* @__PURE__ */ jsxs("div", {
1463
+ class: "dt-code-block",
1464
+ children: [lang && lang !== "text" && /* @__PURE__ */ jsx("div", {
1465
+ class: "dt-code-header",
1466
+ children: /* @__PURE__ */ jsx("span", {
1467
+ class: "dt-code-lang",
1468
+ children: lang
1469
+ })
1470
+ }), /* @__PURE__ */ jsx("pre", {
1471
+ class: className,
1472
+ children: /* @__PURE__ */ jsx("code", { children })
1473
+ })]
1474
+ });
1475
+ }
1476
+ const DIFFICULTY_COLORS = {
1477
+ beginner: "success",
1478
+ intermediate: "warning",
1479
+ advanced: "danger"
1480
+ };
1481
+ const DIFFICULTY_LABELS = {
1482
+ beginner: "Beginner",
1483
+ intermediate: "Intermediate",
1484
+ advanced: "Advanced"
1485
+ };
1486
+ function createComponents(options) {
1487
+ function Document(props) {
1488
+ const { children, title, scripts, css } = props;
1489
+ const defaultTitle = options.title;
1490
+ const pageTitle = title ?? defaultTitle;
1491
+ const desc = options.description ?? "";
1492
+ return /* @__PURE__ */ jsxs("html", {
1493
+ lang: "en",
1494
+ children: [/* @__PURE__ */ jsxs("head", { children: [
1495
+ /* @__PURE__ */ jsx("meta", { charSet: "UTF-8" }),
1496
+ /* @__PURE__ */ jsx("meta", {
1497
+ name: "viewport",
1498
+ content: "width=device-width, initial-scale=1.0"
1499
+ }),
1500
+ desc && /* @__PURE__ */ jsx("meta", {
1501
+ name: "description",
1502
+ content: desc
1503
+ }),
1504
+ /* @__PURE__ */ jsx("meta", {
1505
+ name: "theme-color",
1506
+ content: "#fbfbfd"
1507
+ }),
1508
+ /* @__PURE__ */ jsx("meta", {
1509
+ name: "color-scheme",
1510
+ content: "light"
1511
+ }),
1512
+ /* @__PURE__ */ jsx("title", { children: pageTitle }),
1513
+ /* @__PURE__ */ jsx("link", {
1514
+ rel: "preconnect",
1515
+ href: "https://fonts.googleapis.com"
1516
+ }),
1517
+ /* @__PURE__ */ jsx("link", {
1518
+ rel: "preconnect",
1519
+ href: "https://fonts.gstatic.com",
1520
+ crossOrigin: ""
1521
+ }),
1522
+ /* @__PURE__ */ jsx("link", {
1523
+ href: "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap",
1524
+ rel: "stylesheet"
1525
+ }),
1526
+ css?.map((href) => /* @__PURE__ */ jsx("link", {
1527
+ rel: "stylesheet",
1528
+ href
1529
+ }, href))
1530
+ ] }), /* @__PURE__ */ jsxs("body", { children: [children, scripts] })]
1531
+ });
1532
+ }
1533
+ function Layout({ children }) {
1534
+ const footerLinks = options.footer?.links ?? options.nav.links;
1535
+ const copyrightName = options.footer?.copyright ?? options.title;
1536
+ return /* @__PURE__ */ jsxs("div", {
1537
+ class: "dt-root",
1538
+ children: [
1539
+ /* @__PURE__ */ jsx("style", { children: componentCSS }),
1540
+ /* @__PURE__ */ jsx("style", { children: THEME_CSS }),
1541
+ /* @__PURE__ */ jsx("nav", {
1542
+ class: "dt-glass-nav",
1543
+ children: /* @__PURE__ */ jsxs("div", {
1544
+ class: "dt-nav-inner",
1545
+ children: [/* @__PURE__ */ jsx("a", {
1546
+ href: "/",
1547
+ class: "dt-nav-logo",
1548
+ children: options.nav.logo
1549
+ }), /* @__PURE__ */ jsx("ul", {
1550
+ class: "dt-nav-links",
1551
+ children: options.nav.links.map((link) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("a", {
1552
+ href: link.href,
1553
+ class: "dt-nav-link",
1554
+ ...link.external ? {
1555
+ target: "_blank",
1556
+ rel: "noopener noreferrer"
1557
+ } : {},
1558
+ children: link.label
1559
+ }) }, link.href))
1560
+ })]
1561
+ })
1562
+ }),
1563
+ /* @__PURE__ */ jsx("main", {
1564
+ class: "dt-main",
1565
+ children
1566
+ }),
1567
+ /* @__PURE__ */ jsx("footer", {
1568
+ class: "dt-footer",
1569
+ children: /* @__PURE__ */ jsxs("div", {
1570
+ class: "dt-footer-inner",
1571
+ children: [/* @__PURE__ */ jsx("div", {
1572
+ class: "dt-footer-links",
1573
+ children: footerLinks.map((link) => /* @__PURE__ */ jsx("a", {
1574
+ href: link.href,
1575
+ class: "dt-footer-link",
1576
+ ...link.external ? {
1577
+ target: "_blank",
1578
+ rel: "noopener noreferrer"
1579
+ } : {},
1580
+ children: link.label
1581
+ }, link.href))
1582
+ }), /* @__PURE__ */ jsxs("p", {
1583
+ class: "dt-footer-copy",
1584
+ children: [`\u00A9 ${(/* @__PURE__ */ new Date()).getFullYear()} ${copyrightName}`, ". MIT License."]
1585
+ })]
1586
+ })
1587
+ })
1588
+ ]
1589
+ });
1590
+ }
1591
+ function HomePage() {
1592
+ return /* @__PURE__ */ jsxs(Layout, { children: [
1593
+ options.hero && /* @__PURE__ */ jsx("div", {
1594
+ class: cx("dt-hero-bg", "dt-hero-section"),
1595
+ style: "padding: 100px 24px 80px; position: relative;",
1596
+ children: /* @__PURE__ */ jsxs("div", {
1597
+ style: "max-width: 680px; margin: 0 auto; position: relative; z-index: 1; text-align: center;",
1598
+ children: [
1599
+ /* @__PURE__ */ jsx("h1", {
1600
+ class: cx("dt-hero-title", "dt-anim-slide-up"),
1601
+ children: options.hero.title
1602
+ }),
1603
+ /* @__PURE__ */ jsx("p", {
1604
+ class: cx("dt-hero-subtitle", "dt-anim-slide-up", "dt-stagger-1"),
1605
+ children: options.hero.subtitle
1606
+ }),
1607
+ options.hero.actions && options.hero.actions.length > 0 && /* @__PURE__ */ jsx("div", {
1608
+ class: cx("dt-hero-cta", "dt-anim-slide-up", "dt-stagger-2"),
1609
+ children: options.hero.actions.map((action) => /* @__PURE__ */ jsx("a", {
1610
+ href: action.href,
1611
+ class: action.primary ? "dt-primary-btn" : "dt-secondary-btn",
1612
+ children: action.label
1613
+ }, action.href))
1614
+ })
1615
+ ]
1616
+ })
1617
+ }),
1618
+ options.features && /* @__PURE__ */ jsxs("section", {
1619
+ class: "dt-section-features",
1620
+ style: "max-width: 1080px; margin: 0 auto; padding: 80px 24px;",
1621
+ children: [/* @__PURE__ */ jsxs("div", {
1622
+ style: "text-align: center; margin-bottom: 3.5rem;",
1623
+ children: [/* @__PURE__ */ jsx("h2", {
1624
+ class: cx("dt-section-title", "dt-anim-slide-up"),
1625
+ children: options.features.title
1626
+ }), /* @__PURE__ */ jsx("p", {
1627
+ class: cx("dt-section-subtitle", "dt-anim-slide-up", "dt-stagger-1"),
1628
+ children: options.features.subtitle
1629
+ })]
1630
+ }), /* @__PURE__ */ jsx("div", {
1631
+ class: "dt-features-grid",
1632
+ style: "display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem;",
1633
+ children: options.features.items.map((item, i) => /* @__PURE__ */ jsx(Card, {
1634
+ icon: /* @__PURE__ */ jsx(Icon, {
1635
+ name: item.icon,
1636
+ size: 24
1637
+ }),
1638
+ heading: item.title,
1639
+ description: item.description,
1640
+ class: cx("dt-anim-scale-in", `dt-stagger-${Math.min(i + 2, 5)}`)
1641
+ }, item.title))
1642
+ })]
1643
+ }),
1644
+ options.quickLinks && /* @__PURE__ */ jsx("section", {
1645
+ class: "dt-section-links",
1646
+ style: "max-width: 1080px; margin: 0 auto; padding: 0 24px 100px;",
1647
+ children: /* @__PURE__ */ jsxs("div", {
1648
+ class: "dt-section-links-inner",
1649
+ style: "border-top: 0.5px solid rgba(0, 0, 0, 0.06); padding-top: 80px; text-align: center;",
1650
+ children: [
1651
+ /* @__PURE__ */ jsx("h2", {
1652
+ class: cx("dt-section-title", "dt-anim-slide-up"),
1653
+ children: options.quickLinks.title
1654
+ }),
1655
+ /* @__PURE__ */ jsx("p", {
1656
+ class: cx("dt-section-subtitle", "dt-anim-slide-up", "dt-stagger-1"),
1657
+ children: options.quickLinks.subtitle
1658
+ }),
1659
+ /* @__PURE__ */ jsx("div", {
1660
+ class: "dt-links-grid",
1661
+ style: "display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; max-width: 720px; margin: 0 auto;",
1662
+ children: options.quickLinks.items.map((item, i) => /* @__PURE__ */ jsx(Card, {
1663
+ variant: "link",
1664
+ href: item.href,
1665
+ heading: item.title,
1666
+ description: item.description,
1667
+ class: cx("dt-anim-scale-in", `dt-stagger-${Math.min(i + 2, 5)}`),
1668
+ style: "text-align: left;"
1669
+ }, item.href))
1670
+ })
1671
+ ]
1672
+ })
1673
+ })
1674
+ ] });
1675
+ }
1676
+ function DocsIndex({ docs: docsList }) {
1677
+ const docsConf = options.docs;
1678
+ const heading = docsConf?.heading ?? "Documentation";
1679
+ const desc = docsConf?.description ?? "";
1680
+ const byCategory = docsList.reduce((acc, doc) => {
1681
+ const category = doc.data.category || "General";
1682
+ if (!acc[category]) acc[category] = [];
1683
+ acc[category].push(doc);
1684
+ return acc;
1685
+ }, {});
1686
+ Object.values(byCategory).forEach((items) => items.sort((a, b) => a.data.order - b.data.order));
1687
+ const basePath = docsConf?.basePath ?? "/docs";
1688
+ return /* @__PURE__ */ jsx(Layout, { children: /* @__PURE__ */ jsxs("div", {
1689
+ style: "max-width: 720px;",
1690
+ children: [/* @__PURE__ */ jsxs("div", {
1691
+ style: "margin-bottom: 3rem;",
1692
+ children: [/* @__PURE__ */ jsx("h1", {
1693
+ class: cx("dt-page-title", "dt-anim-slide-up"),
1694
+ children: heading
1695
+ }), desc && /* @__PURE__ */ jsx("p", {
1696
+ class: cx("dt-page-desc", "dt-anim-slide-up", "dt-stagger-1"),
1697
+ children: desc
1698
+ })]
1699
+ }), Object.entries(byCategory).map(([category, items]) => /* @__PURE__ */ jsxs("section", {
1700
+ class: "dt-fade-in",
1701
+ style: "margin-bottom: 2.5rem;",
1702
+ children: [/* @__PURE__ */ jsx("h2", {
1703
+ class: "dt-category-heading",
1704
+ children: category
1705
+ }), /* @__PURE__ */ jsx("div", {
1706
+ style: "display: flex; flex-direction: column; gap: 0.75rem;",
1707
+ children: items.map((doc, i) => /* @__PURE__ */ jsx(Card, {
1708
+ variant: "link",
1709
+ href: `${basePath}/${doc.slug}`,
1710
+ heading: doc.data.title,
1711
+ description: doc.data.description,
1712
+ class: cx("dt-anim-scale-in"),
1713
+ style: `animation-delay: ${.1 + i * .08}s;`
1714
+ }, doc.slug))
1715
+ })]
1716
+ }, category))]
1717
+ }) });
1718
+ }
1719
+ function DocPage({ doc, content }) {
1720
+ return /* @__PURE__ */ jsx(Layout, { children: /* @__PURE__ */ jsxs("article", {
1721
+ class: "dt-page-container",
1722
+ children: [/* @__PURE__ */ jsxs("div", {
1723
+ style: "margin-bottom: 2.5rem;",
1724
+ children: [/* @__PURE__ */ jsx("h1", {
1725
+ class: cx("dt-page-title", "dt-anim-slide-up"),
1726
+ children: doc.data.title
1727
+ }), doc.data.description && /* @__PURE__ */ jsx("p", {
1728
+ class: cx("dt-content-desc", "dt-anim-slide-up", "dt-stagger-1"),
1729
+ children: doc.data.description
1730
+ })]
1731
+ }), /* @__PURE__ */ jsx("div", {
1732
+ class: cx("dt-content", "dt-fade-in"),
1733
+ children: content
1734
+ })]
1735
+ }) });
1736
+ }
1737
+ function GuidesIndex({ guides: guidesList }) {
1738
+ const guidesConf = options.guides;
1739
+ const heading = guidesConf?.heading ?? "Guides";
1740
+ const desc = guidesConf?.description ?? "";
1741
+ const byDifficulty = guidesList.reduce((acc, guide) => {
1742
+ const difficulty = guide.data.difficulty || "beginner";
1743
+ if (!acc[difficulty]) acc[difficulty] = [];
1744
+ acc[difficulty].push(guide);
1745
+ return acc;
1746
+ }, {});
1747
+ Object.values(byDifficulty).forEach((items) => items.sort((a, b) => a.data.order - b.data.order));
1748
+ const basePath = guidesConf?.basePath ?? "/guides";
1749
+ return /* @__PURE__ */ jsx(Layout, { children: /* @__PURE__ */ jsxs("div", {
1750
+ style: "max-width: 720px;",
1751
+ children: [/* @__PURE__ */ jsxs("div", {
1752
+ style: "margin-bottom: 3rem;",
1753
+ children: [/* @__PURE__ */ jsx("h1", {
1754
+ class: cx("dt-page-title", "dt-anim-slide-up"),
1755
+ children: heading
1756
+ }), desc && /* @__PURE__ */ jsx("p", {
1757
+ class: cx("dt-page-desc", "dt-anim-slide-up", "dt-stagger-1"),
1758
+ children: desc
1759
+ })]
1760
+ }), Object.entries(byDifficulty).map(([difficulty, items]) => /* @__PURE__ */ jsxs("section", {
1761
+ class: "dt-fade-in",
1762
+ style: "margin-bottom: 2.5rem;",
1763
+ children: [/* @__PURE__ */ jsx("h2", {
1764
+ class: "dt-category-heading",
1765
+ children: DIFFICULTY_LABELS[difficulty] ?? difficulty
1766
+ }), /* @__PURE__ */ jsx("div", {
1767
+ style: "display: flex; flex-direction: column; gap: 0.75rem;",
1768
+ children: items.map((guide, i) => /* @__PURE__ */ jsxs(Card, {
1769
+ variant: "link",
1770
+ href: `${basePath}/${guide.slug}`,
1771
+ class: cx("dt-anim-scale-in"),
1772
+ style: `animation-delay: ${.1 + i * .08}s;`,
1773
+ children: [/* @__PURE__ */ jsxs("div", {
1774
+ style: "display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.375rem;",
1775
+ children: [/* @__PURE__ */ jsx("h3", {
1776
+ class: "dt-card-title",
1777
+ style: "margin: 0;",
1778
+ children: guide.data.title
1779
+ }), /* @__PURE__ */ jsx(Badge, {
1780
+ color: DIFFICULTY_COLORS[guide.data.difficulty] ?? "default",
1781
+ children: guide.data.difficulty
1782
+ })]
1783
+ }), guide.data.description && /* @__PURE__ */ jsx("p", {
1784
+ class: "dt-card-desc",
1785
+ children: guide.data.description
1786
+ })]
1787
+ }, guide.slug))
1788
+ })]
1789
+ }, difficulty))]
1790
+ }) });
1791
+ }
1792
+ function GuidePage({ guide, content }) {
1793
+ return /* @__PURE__ */ jsx(Layout, { children: /* @__PURE__ */ jsxs("article", {
1794
+ class: "dt-page-container",
1795
+ children: [/* @__PURE__ */ jsxs("div", {
1796
+ style: "margin-bottom: 2.5rem;",
1797
+ children: [
1798
+ /* @__PURE__ */ jsx("div", {
1799
+ class: "dt-fade-in",
1800
+ style: "margin-bottom: 1rem;",
1801
+ children: /* @__PURE__ */ jsx(Badge, {
1802
+ color: DIFFICULTY_COLORS[guide.data.difficulty] ?? "default",
1803
+ children: guide.data.difficulty
1804
+ })
1805
+ }),
1806
+ /* @__PURE__ */ jsx("h1", {
1807
+ class: cx("dt-page-title", "dt-anim-slide-up"),
1808
+ children: guide.data.title
1809
+ }),
1810
+ guide.data.description && /* @__PURE__ */ jsx("p", {
1811
+ class: cx("dt-content-desc", "dt-anim-slide-up", "dt-stagger-1"),
1812
+ children: guide.data.description
1813
+ })
1814
+ ]
1815
+ }), /* @__PURE__ */ jsx("div", {
1816
+ class: cx("dt-content", "dt-fade-in"),
1817
+ children: content
1818
+ })]
1819
+ }) });
1820
+ }
1821
+ function NotFound() {
1822
+ return /* @__PURE__ */ jsx(Layout, { children: /* @__PURE__ */ jsx("div", {
1823
+ class: cx("dt-hero-bg", "dt-not-found-section"),
1824
+ style: "padding: 100px 24px 80px; position: relative;",
1825
+ children: /* @__PURE__ */ jsxs("div", {
1826
+ style: "max-width: 680px; margin: 0 auto; position: relative; z-index: 1; text-align: center;",
1827
+ children: [
1828
+ /* @__PURE__ */ jsx("h1", {
1829
+ class: cx("dt-not-found-title", "dt-anim-slide-up"),
1830
+ children: "404"
1831
+ }),
1832
+ /* @__PURE__ */ jsx("p", {
1833
+ class: cx("dt-hero-subtitle", "dt-anim-slide-up", "dt-stagger-1"),
1834
+ style: "margin-bottom: 0.75rem;",
1835
+ children: "Page Not Found"
1836
+ }),
1837
+ /* @__PURE__ */ jsx("p", {
1838
+ class: cx("dt-anim-slide-up", "dt-stagger-2"),
1839
+ style: "color: #86868b; font-size: 1rem; margin-bottom: 2.5rem; max-width: 28rem; margin-left: auto; margin-right: auto; line-height: 1.6;",
1840
+ children: "The page you're looking for doesn't exist or has been moved."
1841
+ }),
1842
+ /* @__PURE__ */ jsxs("div", {
1843
+ class: cx("dt-hero-cta", "dt-anim-slide-up", "dt-stagger-3", "dt-not-found-cta"),
1844
+ children: [/* @__PURE__ */ jsx("a", {
1845
+ href: "/",
1846
+ class: "dt-primary-btn",
1847
+ children: "Go Back Home"
1848
+ }), /* @__PURE__ */ jsx("a", {
1849
+ href: options.docs?.basePath ?? "/docs",
1850
+ class: "dt-secondary-btn",
1851
+ children: "View Docs"
1852
+ })]
1853
+ })
1854
+ ]
1855
+ })
1856
+ }) });
1857
+ }
1858
+ return {
1859
+ Document,
1860
+ Layout,
1861
+ HomePage,
1862
+ DocsIndex,
1863
+ DocPage,
1864
+ GuidesIndex,
1865
+ GuidePage,
1866
+ NotFound,
1867
+ Callout,
1868
+ CodeBlock
1869
+ };
1870
+ }
1871
+
1872
+ //#endregion
1873
+ //#region ../ssg/src/plugins/llms/index.ts
1874
+ function normalizePath(path) {
1875
+ return path.startsWith("/") ? path : `/${path}`;
1876
+ }
1877
+ function resolveUrl(base, path) {
1878
+ if (!base) return path;
1879
+ return `${base.replace(/\/$/, "")}${path}`;
1880
+ }
1881
+ function getEntryTitle(entry) {
1882
+ return entry.data.title ?? entry.slug;
1883
+ }
1884
+ function getEntryDescription(entry) {
1885
+ return entry.data.description;
1886
+ }
1887
+ function formatLink(title, url, description) {
1888
+ return description ? `- [${title}](${url}): ${description}` : `- [${title}](${url})`;
1889
+ }
1890
+ /**
1891
+ * Generate llms.txt content following the llms.txt specification.
1892
+ *
1893
+ * Format:
1894
+ * - H1: site title (required)
1895
+ * - Blockquote: site description (optional)
1896
+ * - H2 sections: collection entries as markdown links
1897
+ * - ## Optional: additional links
1898
+ *
1899
+ * @see https://llmstxt.org/
1900
+ */
1901
+ function generateLlmsTxt(options, sectionEntries) {
1902
+ const lines = [];
1903
+ lines.push(`# ${options.title}`);
1904
+ lines.push("");
1905
+ if (options.description) {
1906
+ lines.push(`> ${options.description}`);
1907
+ lines.push("");
1908
+ }
1909
+ for (const section of options.sections ?? []) {
1910
+ const entries = sectionEntries.get(section.collection) ?? [];
1911
+ if (entries.length === 0) continue;
1912
+ const basePath = normalizePath(section.basePath);
1913
+ lines.push(`## ${section.title}`);
1914
+ lines.push("");
1915
+ for (const entry of entries) {
1916
+ const title = getEntryTitle(entry);
1917
+ const url = resolveUrl(options.url, `${basePath}/${entry.slug}`);
1918
+ const desc = getEntryDescription(entry);
1919
+ lines.push(formatLink(title, url, desc));
1920
+ }
1921
+ lines.push("");
1922
+ }
1923
+ if (options.links?.length) {
1924
+ lines.push("## Optional");
1925
+ lines.push("");
1926
+ for (const link of options.links) lines.push(formatLink(link.title, link.url, link.description));
1927
+ lines.push("");
1928
+ }
1929
+ return lines.join("\n");
1930
+ }
1931
+ /**
1932
+ * Generate llms-full.txt with complete content for each entry.
1933
+ * Includes the full markdown body of every collection entry.
1934
+ */
1935
+ function generateLlmsFullTxt(options, sectionEntries) {
1936
+ const lines = [];
1937
+ lines.push(`# ${options.title}`);
1938
+ lines.push("");
1939
+ if (options.description) {
1940
+ lines.push(`> ${options.description}`);
1941
+ lines.push("");
1942
+ }
1943
+ for (const section of options.sections ?? []) {
1944
+ const entries = sectionEntries.get(section.collection) ?? [];
1945
+ if (entries.length === 0) continue;
1946
+ const basePath = normalizePath(section.basePath);
1947
+ lines.push(`## ${section.title}`);
1948
+ lines.push("");
1949
+ for (const entry of entries) {
1950
+ const title = getEntryTitle(entry);
1951
+ const url = resolveUrl(options.url, `${basePath}/${entry.slug}`);
1952
+ const desc = getEntryDescription(entry);
1953
+ lines.push(`### ${title}`);
1954
+ if (desc) {
1955
+ lines.push("");
1956
+ lines.push(`> ${desc}`);
1957
+ }
1958
+ lines.push("");
1959
+ lines.push(`Source: ${url}`);
1960
+ lines.push("");
1961
+ lines.push(entry.body.trim());
1962
+ lines.push("");
1963
+ lines.push("---");
1964
+ lines.push("");
1965
+ }
1966
+ }
1967
+ return lines.join("\n");
1968
+ }
1969
+ function generateEntryMarkdown(entry) {
1970
+ const title = getEntryTitle(entry);
1971
+ const desc = getEntryDescription(entry);
1972
+ const lines = [];
1973
+ lines.push(`# ${title}`);
1974
+ if (desc) {
1975
+ lines.push("");
1976
+ lines.push(`> ${desc}`);
1977
+ }
1978
+ lines.push("");
1979
+ lines.push(entry.body.trim());
1980
+ lines.push("");
1981
+ return lines.join("\n");
1982
+ }
1983
+ /**
1984
+ * LLMs plugin for SSG.
1985
+ *
1986
+ * Generates `llms.txt`, `llms-full.txt`, and per-page `.md` files
1987
+ * following the llms.txt specification, making your site easily
1988
+ * consumable by LLMs and AI agents.
1989
+ *
1990
+ * @see https://llmstxt.org/
1991
+ *
1992
+ * @example
1993
+ * ```tsx
1994
+ * import { createSSG } from "@semajsx/ssg";
1995
+ * import { llms } from "@semajsx/ssg/plugins/llms";
1996
+ *
1997
+ * const ssg = createSSG({
1998
+ * outDir: "./dist",
1999
+ * plugins: [
2000
+ * llms({
2001
+ * title: "My Project",
2002
+ * description: "Documentation for My Project",
2003
+ * url: "https://docs.myproject.com",
2004
+ * sections: [
2005
+ * { title: "Documentation", collection: "docs", basePath: "/docs" },
2006
+ * ],
2007
+ * }),
2008
+ * ],
2009
+ * });
2010
+ * ```
2011
+ */
2012
+ function llms(options) {
2013
+ let outDir = "";
2014
+ return {
2015
+ name: "llms",
2016
+ enforce: "post",
2017
+ configResolved(config) {
2018
+ outDir = config.outDir ?? "./dist";
2019
+ },
2020
+ async buildEnd(_result, ssg) {
2021
+ const genLlmsTxt = options.llmsTxt !== false;
2022
+ const genLlmsFullTxt = options.llmsFullTxt !== false;
2023
+ const genMarkdownPages = options.markdownPages !== false;
2024
+ const sectionEntries = /* @__PURE__ */ new Map();
2025
+ for (const section of options.sections ?? []) try {
2026
+ const entries = await ssg.getCollection(section.collection);
2027
+ sectionEntries.set(section.collection, entries);
2028
+ } catch {
2029
+ sectionEntries.set(section.collection, []);
2030
+ }
2031
+ await mkdir(outDir, { recursive: true });
2032
+ if (genLlmsTxt) {
2033
+ const content = generateLlmsTxt(options, sectionEntries);
2034
+ await writeFile(join(outDir, "llms.txt"), content, "utf-8");
2035
+ }
2036
+ if (genLlmsFullTxt) {
2037
+ const content = generateLlmsFullTxt(options, sectionEntries);
2038
+ await writeFile(join(outDir, "llms-full.txt"), content, "utf-8");
2039
+ }
2040
+ if (genMarkdownPages) for (const section of options.sections ?? []) {
2041
+ const basePath = normalizePath(section.basePath);
2042
+ const entries = sectionEntries.get(section.collection) ?? [];
2043
+ for (const entry of entries) {
2044
+ const mdPath = `${basePath}/${entry.slug}.md`;
2045
+ const fullPath = join(outDir, mdPath.slice(1));
2046
+ const content = generateEntryMarkdown(entry);
2047
+ await mkdir(dirname(fullPath), { recursive: true });
2048
+ await writeFile(fullPath, content, "utf-8");
2049
+ }
2050
+ }
2051
+ }
2052
+ };
2053
+ }
2054
+
2055
+ //#endregion
2056
+ //#region ../ssg/src/plugins/docs-theme/index.ts
2057
+ const docsSchema = z.object({
2058
+ title: z.string(),
2059
+ description: z.string().optional(),
2060
+ order: z.number().default(999),
2061
+ category: z.string().optional()
2062
+ });
2063
+ const guidesSchema = z.object({
2064
+ title: z.string(),
2065
+ description: z.string().optional(),
2066
+ order: z.number().default(999),
2067
+ difficulty: z.enum([
2068
+ "beginner",
2069
+ "intermediate",
2070
+ "advanced"
2071
+ ]).default("beginner")
2072
+ });
2073
+ /**
2074
+ * Docs theme plugin for SSG.
2075
+ *
2076
+ * Provides an Apple-inspired documentation site with:
2077
+ * - Frosted glass navigation
2078
+ * - Home page with hero, features, and quick links
2079
+ * - Docs collection with category grouping
2080
+ * - Guides collection with difficulty levels
2081
+ * - MDX components (Callout, CodeBlock)
2082
+ * - Responsive design
2083
+ *
2084
+ * All text content, navigation links, and site metadata
2085
+ * are configured through options — nothing is hardcoded.
2086
+ *
2087
+ * @example
2088
+ * ```tsx
2089
+ * import { createSSG } from "@semajsx/ssg";
2090
+ * import { docsTheme } from "@semajsx/ssg/plugins/docs-theme";
2091
+ * import { fileSource } from "@semajsx/ssg";
2092
+ *
2093
+ * const ssg = createSSG({
2094
+ * outDir: "./dist",
2095
+ * plugins: [
2096
+ * docsTheme({
2097
+ * title: "My Docs",
2098
+ * nav: {
2099
+ * logo: "MyProject",
2100
+ * links: [
2101
+ * { label: "Docs", href: "/docs" },
2102
+ * { label: "GitHub", href: "https://github.com/...", external: true },
2103
+ * ],
2104
+ * },
2105
+ * hero: {
2106
+ * title: "MyProject",
2107
+ * subtitle: "A great project.",
2108
+ * actions: [{ label: "Get Started", href: "/docs/intro", primary: true }],
2109
+ * },
2110
+ * docs: { source: fileSource({ directory: "content/docs" }, rootDir) },
2111
+ * }),
2112
+ * ],
2113
+ * });
2114
+ * ```
2115
+ */
2116
+ function docsTheme(options) {
2117
+ const components = createComponents(options);
2118
+ const docsBasePath = options.docs?.basePath ?? "/docs";
2119
+ const guidesBasePath = options.guides?.basePath ?? "/guides";
2120
+ const plugins = [{
2121
+ name: "docs-theme",
2122
+ config() {
2123
+ const collections = [];
2124
+ const routes = [];
2125
+ if (options.docs) collections.push(defineCollection({
2126
+ name: "docs",
2127
+ source: options.docs.source,
2128
+ schema: docsSchema
2129
+ }));
2130
+ if (options.guides) collections.push(defineCollection({
2131
+ name: "guides",
2132
+ source: options.guides.source,
2133
+ schema: guidesSchema
2134
+ }));
2135
+ routes.push({
2136
+ path: "/",
2137
+ component: components.HomePage,
2138
+ props: { title: options.title }
2139
+ });
2140
+ if (options.docs) {
2141
+ routes.push({
2142
+ path: docsBasePath,
2143
+ component: components.DocsIndex,
2144
+ props: async (ssg) => ({
2145
+ title: options.docs?.heading ?? "Documentation",
2146
+ docs: await ssg.getCollection("docs")
2147
+ })
2148
+ });
2149
+ routes.push({
2150
+ path: `${docsBasePath}/:slug`,
2151
+ component: components.DocPage,
2152
+ getStaticPaths: async (ssg) => {
2153
+ const allDocs = await ssg.getCollection("docs");
2154
+ return Promise.all(allDocs.map(async (doc) => {
2155
+ const { Content } = await doc.render();
2156
+ return {
2157
+ params: { slug: doc.slug },
2158
+ props: {
2159
+ doc,
2160
+ content: Content(),
2161
+ title: `${doc.data.title} | ${options.title}`
2162
+ }
2163
+ };
2164
+ }));
2165
+ }
2166
+ });
2167
+ }
2168
+ if (options.guides) {
2169
+ routes.push({
2170
+ path: guidesBasePath,
2171
+ component: components.GuidesIndex,
2172
+ props: async (ssg) => ({
2173
+ title: options.guides?.heading ?? "Guides",
2174
+ guides: await ssg.getCollection("guides")
2175
+ })
2176
+ });
2177
+ routes.push({
2178
+ path: `${guidesBasePath}/:slug`,
2179
+ component: components.GuidePage,
2180
+ getStaticPaths: async (ssg) => {
2181
+ const allGuides = await ssg.getCollection("guides");
2182
+ return Promise.all(allGuides.map(async (guide) => {
2183
+ const { Content } = await guide.render();
2184
+ return {
2185
+ params: { slug: guide.slug },
2186
+ props: {
2187
+ guide,
2188
+ content: Content(),
2189
+ title: `${guide.data.title} | ${options.title}`
2190
+ }
2191
+ };
2192
+ }));
2193
+ }
2194
+ });
2195
+ }
2196
+ routes.push({
2197
+ path: "/404",
2198
+ component: components.NotFound,
2199
+ props: { title: `404 - Page Not Found | ${options.title}` }
2200
+ });
2201
+ const mdxComponents = {
2202
+ Callout,
2203
+ CodeBlock,
2204
+ ...options.mdx?.components
2205
+ };
2206
+ return {
2207
+ document: components.Document,
2208
+ collections,
2209
+ routes,
2210
+ mdx: {
2211
+ remarkPlugins: options.mdx?.remarkPlugins,
2212
+ rehypePlugins: options.mdx?.rehypePlugins,
2213
+ components: mdxComponents
2214
+ }
2215
+ };
2216
+ }
2217
+ }];
2218
+ if (options.lucide !== false) {
2219
+ const lucideOpts = typeof options.lucide === "object" ? options.lucide : {};
2220
+ plugins.push(lucide(lucideOpts));
2221
+ }
2222
+ const hasContent = options.docs || options.guides;
2223
+ if (options.llms !== false && hasContent) {
2224
+ const llmsOpts = typeof options.llms === "object" ? options.llms : {};
2225
+ const sections = [];
2226
+ if (options.docs) sections.push({
2227
+ title: options.docs.heading ?? "Documentation",
2228
+ collection: "docs",
2229
+ basePath: docsBasePath
2230
+ });
2231
+ if (options.guides) sections.push({
2232
+ title: options.guides.heading ?? "Guides",
2233
+ collection: "guides",
2234
+ basePath: guidesBasePath
2235
+ });
2236
+ plugins.push(llms({
2237
+ title: options.title,
2238
+ description: options.description,
2239
+ url: llmsOpts.url,
2240
+ sections,
2241
+ links: llmsOpts.links,
2242
+ llmsTxt: llmsOpts.llmsTxt,
2243
+ llmsFullTxt: llmsOpts.llmsFullTxt,
2244
+ markdownPages: llmsOpts.markdownPages
2245
+ }));
2246
+ }
2247
+ return plugins;
2248
+ }
2249
+
2250
+ //#endregion
2251
+ export { Callout, CodeBlock, docsTheme };
2252
+ //# sourceMappingURL=docs-theme.mjs.map