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