@chan.run/design 0.1.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.
- package/dist/index.d.mts +170 -0
- package/dist/index.mjs +2035 -0
- package/package.json +38 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,2035 @@
|
|
|
1
|
+
import { Badge, Box, Card, Center, Code, Flex, Grid, HStack, Heading, IconButton, Text, createSystem, defaultConfig, defineConfig, defineSlotRecipe, useSlotRecipe } from "@chakra-ui/react";
|
|
2
|
+
import { useTheme } from "next-themes";
|
|
3
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/ColorModeButton.tsx
|
|
6
|
+
function ColorModeButton(props) {
|
|
7
|
+
const { resolvedTheme, setTheme } = useTheme();
|
|
8
|
+
const [mounted, setMounted] = useState(false);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
setMounted(true);
|
|
11
|
+
}, []);
|
|
12
|
+
const isDark = resolvedTheme === "dark";
|
|
13
|
+
return /* @__PURE__ */ jsx(Flex, {
|
|
14
|
+
as: "button",
|
|
15
|
+
"aria-label": isDark ? "Switch to light mode" : "Switch to dark mode",
|
|
16
|
+
onClick: () => setTheme(isDark ? "light" : "dark"),
|
|
17
|
+
w: "34px",
|
|
18
|
+
h: "34px",
|
|
19
|
+
bg: "chan.bg.card",
|
|
20
|
+
border: "1px solid",
|
|
21
|
+
borderColor: "chan.border",
|
|
22
|
+
borderRadius: "8px",
|
|
23
|
+
align: "center",
|
|
24
|
+
justify: "center",
|
|
25
|
+
cursor: "pointer",
|
|
26
|
+
flexShrink: 0,
|
|
27
|
+
transition: "background 0.15s, border-color 0.15s",
|
|
28
|
+
_hover: { bg: "chan.bg.hover" },
|
|
29
|
+
position: "relative",
|
|
30
|
+
_before: {
|
|
31
|
+
content: "\"\"",
|
|
32
|
+
position: "absolute",
|
|
33
|
+
inset: "-5px"
|
|
34
|
+
},
|
|
35
|
+
...props,
|
|
36
|
+
children: renderIcon(mounted, isDark)
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function renderIcon(mounted, isDark) {
|
|
40
|
+
if (!mounted) return null;
|
|
41
|
+
if (isDark) return /* @__PURE__ */ jsx(MoonIcon, {});
|
|
42
|
+
return /* @__PURE__ */ jsx(SunIcon, {});
|
|
43
|
+
}
|
|
44
|
+
function SunIcon() {
|
|
45
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
46
|
+
width: "16",
|
|
47
|
+
height: "16",
|
|
48
|
+
viewBox: "0 0 24 24",
|
|
49
|
+
fill: "none",
|
|
50
|
+
stroke: "currentColor",
|
|
51
|
+
strokeWidth: "2",
|
|
52
|
+
strokeLinecap: "round",
|
|
53
|
+
strokeLinejoin: "round",
|
|
54
|
+
"aria-hidden": "true",
|
|
55
|
+
style: { color: "var(--chakra-colors-chan-text-dim)" },
|
|
56
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
57
|
+
cx: "12",
|
|
58
|
+
cy: "12",
|
|
59
|
+
r: "4"
|
|
60
|
+
}), /* @__PURE__ */ jsx("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41" })]
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function MoonIcon() {
|
|
64
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
65
|
+
width: "16",
|
|
66
|
+
height: "16",
|
|
67
|
+
viewBox: "0 0 24 24",
|
|
68
|
+
fill: "none",
|
|
69
|
+
stroke: "currentColor",
|
|
70
|
+
strokeWidth: "2",
|
|
71
|
+
strokeLinecap: "round",
|
|
72
|
+
strokeLinejoin: "round",
|
|
73
|
+
"aria-hidden": "true",
|
|
74
|
+
style: { color: "var(--chakra-colors-chan-text-dim)" },
|
|
75
|
+
children: /* @__PURE__ */ jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/components/Splash.tsx
|
|
80
|
+
function Splash({ open, children, orientation = "vertical", size = "md", holdMs = 0, revealMs = 1e3 }) {
|
|
81
|
+
const styles = useSlotRecipe({ key: "splash" })({
|
|
82
|
+
orientation,
|
|
83
|
+
size
|
|
84
|
+
});
|
|
85
|
+
const [phase, setPhase] = useState(open ? "visible" : "gone");
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
if (open) {
|
|
88
|
+
setPhase("visible");
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const splitTimer = setTimeout(() => setPhase("splitting"), holdMs);
|
|
92
|
+
const goneTimer = setTimeout(() => setPhase("gone"), holdMs + revealMs);
|
|
93
|
+
return () => {
|
|
94
|
+
clearTimeout(splitTimer);
|
|
95
|
+
clearTimeout(goneTimer);
|
|
96
|
+
};
|
|
97
|
+
}, [
|
|
98
|
+
open,
|
|
99
|
+
holdMs,
|
|
100
|
+
revealMs
|
|
101
|
+
]);
|
|
102
|
+
if (phase === "gone") return null;
|
|
103
|
+
const splitting = phase === "splitting";
|
|
104
|
+
const panelStartStyle = computePanelOffset({
|
|
105
|
+
orientation,
|
|
106
|
+
side: "start",
|
|
107
|
+
splitting
|
|
108
|
+
});
|
|
109
|
+
const panelEndStyle = computePanelOffset({
|
|
110
|
+
orientation,
|
|
111
|
+
side: "end",
|
|
112
|
+
splitting
|
|
113
|
+
});
|
|
114
|
+
const transitionDuration = `${revealMs}ms`;
|
|
115
|
+
let pointerEvents = "auto";
|
|
116
|
+
if (splitting) pointerEvents = "none";
|
|
117
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
118
|
+
css: styles.root,
|
|
119
|
+
style: { pointerEvents },
|
|
120
|
+
children: [/* @__PURE__ */ jsx(Box, {
|
|
121
|
+
css: styles.panelStart,
|
|
122
|
+
style: {
|
|
123
|
+
...panelStartStyle,
|
|
124
|
+
transitionDuration
|
|
125
|
+
},
|
|
126
|
+
children: /* @__PURE__ */ jsx(Box, {
|
|
127
|
+
css: styles.hub,
|
|
128
|
+
children
|
|
129
|
+
})
|
|
130
|
+
}), /* @__PURE__ */ jsx(Box, {
|
|
131
|
+
css: styles.panelEnd,
|
|
132
|
+
style: {
|
|
133
|
+
...panelEndStyle,
|
|
134
|
+
transitionDuration
|
|
135
|
+
}
|
|
136
|
+
})]
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
function computePanelOffset({ orientation, side, splitting }) {
|
|
140
|
+
if (!splitting) return {
|
|
141
|
+
top: 0,
|
|
142
|
+
left: 0,
|
|
143
|
+
bottom: 0,
|
|
144
|
+
right: 0
|
|
145
|
+
};
|
|
146
|
+
if (orientation === "vertical" && side === "start") return { top: "-100%" };
|
|
147
|
+
if (orientation === "vertical" && side === "end") return { bottom: "-100%" };
|
|
148
|
+
if (orientation === "horizontal" && side === "start") return { left: "-100%" };
|
|
149
|
+
return { right: "-100%" };
|
|
150
|
+
}
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/components/slides/DeckCard.tsx
|
|
153
|
+
function DeckCard({ slug, title, date, description, tags = [], slideCount, onClick }) {
|
|
154
|
+
return /* @__PURE__ */ jsxs(Card.Root, {
|
|
155
|
+
bg: "chan.bg.card",
|
|
156
|
+
borderWidth: "1px",
|
|
157
|
+
borderColor: "chan.border",
|
|
158
|
+
borderRadius: "sm",
|
|
159
|
+
cursor: onClick ? "pointer" : "default",
|
|
160
|
+
transition: "background 0.15s, border-color 0.15s",
|
|
161
|
+
_hover: onClick ? {
|
|
162
|
+
bg: "chan.bg.hover",
|
|
163
|
+
borderColor: "chan.orange.border"
|
|
164
|
+
} : {},
|
|
165
|
+
onClick: () => onClick?.(slug),
|
|
166
|
+
role: onClick ? "link" : void 0,
|
|
167
|
+
children: [/* @__PURE__ */ jsxs(Card.Body, {
|
|
168
|
+
gap: "3",
|
|
169
|
+
p: "5",
|
|
170
|
+
children: [
|
|
171
|
+
/* @__PURE__ */ jsx(Card.Title, {
|
|
172
|
+
fontFamily: "display",
|
|
173
|
+
fontWeight: 800,
|
|
174
|
+
fontSize: "18px",
|
|
175
|
+
letterSpacing: "0.02em",
|
|
176
|
+
color: "chan.text",
|
|
177
|
+
children: title
|
|
178
|
+
}),
|
|
179
|
+
/* @__PURE__ */ jsx(Card.Description, {
|
|
180
|
+
fontFamily: "body",
|
|
181
|
+
fontSize: "xs",
|
|
182
|
+
color: "chan.text.dim",
|
|
183
|
+
lineHeight: "1.6",
|
|
184
|
+
children: description
|
|
185
|
+
}),
|
|
186
|
+
tags.length > 0 && /* @__PURE__ */ jsx(HStack, {
|
|
187
|
+
gap: "2",
|
|
188
|
+
flexWrap: "wrap",
|
|
189
|
+
children: tags.map((tag) => /* @__PURE__ */ jsx(Badge, {
|
|
190
|
+
variant: "outline",
|
|
191
|
+
fontSize: "8px",
|
|
192
|
+
fontFamily: "body",
|
|
193
|
+
letterSpacing: "0.1em",
|
|
194
|
+
textTransform: "uppercase",
|
|
195
|
+
color: "chan.text.faint",
|
|
196
|
+
borderColor: "chan.border",
|
|
197
|
+
px: "2",
|
|
198
|
+
children: tag
|
|
199
|
+
}, tag))
|
|
200
|
+
})
|
|
201
|
+
]
|
|
202
|
+
}), /* @__PURE__ */ jsx(Card.Footer, {
|
|
203
|
+
borderTopWidth: "1px",
|
|
204
|
+
borderColor: "chan.border.soft",
|
|
205
|
+
px: "5",
|
|
206
|
+
py: "3",
|
|
207
|
+
children: /* @__PURE__ */ jsxs(Flex, {
|
|
208
|
+
w: "full",
|
|
209
|
+
justify: "space-between",
|
|
210
|
+
align: "center",
|
|
211
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
212
|
+
fontFamily: "body",
|
|
213
|
+
fontSize: "8px",
|
|
214
|
+
color: "chan.text.faint",
|
|
215
|
+
letterSpacing: "0.12em",
|
|
216
|
+
textTransform: "uppercase",
|
|
217
|
+
children: date
|
|
218
|
+
}), /* @__PURE__ */ jsxs(Text, {
|
|
219
|
+
fontFamily: "body",
|
|
220
|
+
fontSize: "8px",
|
|
221
|
+
color: "chan.text.faint",
|
|
222
|
+
letterSpacing: "0.12em",
|
|
223
|
+
children: [slideCount, /* @__PURE__ */ jsx(Box, {
|
|
224
|
+
as: "span",
|
|
225
|
+
ml: "1",
|
|
226
|
+
children: slideCount === 1 ? "SLIDE" : "SLIDES"
|
|
227
|
+
})]
|
|
228
|
+
})]
|
|
229
|
+
})
|
|
230
|
+
})]
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/components/slides/slide-elements.tsx
|
|
235
|
+
/** Pick safe HTML attributes for Chakra components */
|
|
236
|
+
function pick(props) {
|
|
237
|
+
const safe = {};
|
|
238
|
+
for (const [key, value] of Object.entries(props)) if (key === "children" || key === "id" || key === "className" || key.startsWith("aria-") || key.startsWith("data-")) safe[key] = value;
|
|
239
|
+
return safe;
|
|
240
|
+
}
|
|
241
|
+
function SlideH2(props) {
|
|
242
|
+
return /* @__PURE__ */ jsx(Heading, {
|
|
243
|
+
as: "h2",
|
|
244
|
+
fontFamily: "display",
|
|
245
|
+
fontWeight: 800,
|
|
246
|
+
fontSize: "28px",
|
|
247
|
+
letterSpacing: "0.02em",
|
|
248
|
+
color: "chan.text",
|
|
249
|
+
mb: "4",
|
|
250
|
+
lineHeight: "1.15",
|
|
251
|
+
...pick(props)
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
function SlideH3(props) {
|
|
255
|
+
return /* @__PURE__ */ jsx(Heading, {
|
|
256
|
+
as: "h3",
|
|
257
|
+
fontFamily: "display",
|
|
258
|
+
fontWeight: 700,
|
|
259
|
+
fontSize: "22px",
|
|
260
|
+
color: "chan.text",
|
|
261
|
+
mb: "3",
|
|
262
|
+
lineHeight: "1.2",
|
|
263
|
+
...pick(props)
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
function SlideP(props) {
|
|
267
|
+
return /* @__PURE__ */ jsx(Text, {
|
|
268
|
+
as: "p",
|
|
269
|
+
fontFamily: "body",
|
|
270
|
+
fontSize: "15px",
|
|
271
|
+
lineHeight: "1.7",
|
|
272
|
+
color: "chan.text.dim",
|
|
273
|
+
mb: "3",
|
|
274
|
+
...pick(props)
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
function SlideStrong(props) {
|
|
278
|
+
return /* @__PURE__ */ jsx(Text, {
|
|
279
|
+
as: "strong",
|
|
280
|
+
fontWeight: 500,
|
|
281
|
+
color: "chan.text",
|
|
282
|
+
...pick(props)
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
function SlideEm(props) {
|
|
286
|
+
return /* @__PURE__ */ jsx(Text, {
|
|
287
|
+
as: "em",
|
|
288
|
+
fontStyle: "italic",
|
|
289
|
+
...pick(props)
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
function SlideUl(props) {
|
|
293
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
294
|
+
as: "ul",
|
|
295
|
+
fontFamily: "body",
|
|
296
|
+
fontSize: "15px",
|
|
297
|
+
lineHeight: "1.8",
|
|
298
|
+
color: "chan.text.dim",
|
|
299
|
+
pl: "5",
|
|
300
|
+
mb: "3",
|
|
301
|
+
css: {
|
|
302
|
+
"& > li": { listStyleType: "disc" },
|
|
303
|
+
"& > li::marker": { color: "chan.orange" }
|
|
304
|
+
},
|
|
305
|
+
...pick(props)
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
function SlideOl(props) {
|
|
309
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
310
|
+
as: "ol",
|
|
311
|
+
fontFamily: "body",
|
|
312
|
+
fontSize: "15px",
|
|
313
|
+
lineHeight: "1.8",
|
|
314
|
+
color: "chan.text.dim",
|
|
315
|
+
pl: "5",
|
|
316
|
+
mb: "3",
|
|
317
|
+
css: {
|
|
318
|
+
"& > li": { listStyleType: "decimal" },
|
|
319
|
+
"& > li::marker": { color: "chan.orange" }
|
|
320
|
+
},
|
|
321
|
+
...pick(props)
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
function SlideLi(props) {
|
|
325
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
326
|
+
as: "li",
|
|
327
|
+
mb: "1",
|
|
328
|
+
pl: "1",
|
|
329
|
+
...pick(props)
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
function SlideBlockquote(props) {
|
|
333
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
334
|
+
as: "blockquote",
|
|
335
|
+
borderLeft: "3px solid",
|
|
336
|
+
borderColor: "chan.orange",
|
|
337
|
+
pl: "4",
|
|
338
|
+
py: "1",
|
|
339
|
+
mb: "3",
|
|
340
|
+
css: { "& > p": {
|
|
341
|
+
marginBottom: 0,
|
|
342
|
+
color: "chan.text.dim"
|
|
343
|
+
} },
|
|
344
|
+
...pick(props)
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
function SlideInlineCode(props) {
|
|
348
|
+
return /* @__PURE__ */ jsx(Code, {
|
|
349
|
+
fontFamily: "body",
|
|
350
|
+
fontSize: "0.85em",
|
|
351
|
+
px: "1.5",
|
|
352
|
+
py: "0.5",
|
|
353
|
+
bg: "chan.bg.code",
|
|
354
|
+
border: "1px solid",
|
|
355
|
+
borderColor: "chan.border",
|
|
356
|
+
borderRadius: "xs",
|
|
357
|
+
color: "chan.orange",
|
|
358
|
+
variant: "plain",
|
|
359
|
+
...pick(props)
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
function SlidePre(props) {
|
|
363
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
364
|
+
as: "pre",
|
|
365
|
+
bg: "chan.bg.code",
|
|
366
|
+
borderRadius: "xs",
|
|
367
|
+
border: "1px solid",
|
|
368
|
+
borderColor: "chan.border",
|
|
369
|
+
p: "4",
|
|
370
|
+
overflow: "auto",
|
|
371
|
+
mb: "3",
|
|
372
|
+
fontFamily: "body",
|
|
373
|
+
fontSize: "13px",
|
|
374
|
+
lineHeight: "1.6",
|
|
375
|
+
color: "chan.text.dim",
|
|
376
|
+
css: { "& code": {
|
|
377
|
+
background: "none",
|
|
378
|
+
padding: 0,
|
|
379
|
+
border: "none",
|
|
380
|
+
color: "inherit"
|
|
381
|
+
} },
|
|
382
|
+
...pick(props)
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
function SlideImg(props) {
|
|
386
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
387
|
+
as: "img",
|
|
388
|
+
maxW: "100%",
|
|
389
|
+
borderRadius: "xs",
|
|
390
|
+
border: "1px solid",
|
|
391
|
+
borderColor: "chan.border",
|
|
392
|
+
mb: "3",
|
|
393
|
+
...pick(props)
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
function SlideHr(props) {
|
|
397
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
398
|
+
as: "hr",
|
|
399
|
+
border: "none",
|
|
400
|
+
borderTop: "1px solid",
|
|
401
|
+
borderColor: "chan.border",
|
|
402
|
+
my: "6",
|
|
403
|
+
...pick(props)
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
function TitleH2(props) {
|
|
407
|
+
return /* @__PURE__ */ jsx(Heading, {
|
|
408
|
+
as: "h2",
|
|
409
|
+
fontFamily: "display",
|
|
410
|
+
fontWeight: 900,
|
|
411
|
+
fontSize: "48px",
|
|
412
|
+
letterSpacing: "0.04em",
|
|
413
|
+
textTransform: "uppercase",
|
|
414
|
+
color: "chan.text",
|
|
415
|
+
textAlign: "center",
|
|
416
|
+
lineHeight: "1.1",
|
|
417
|
+
mb: "3",
|
|
418
|
+
...pick(props)
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
function TitleP(props) {
|
|
422
|
+
return /* @__PURE__ */ jsx(Text, {
|
|
423
|
+
as: "p",
|
|
424
|
+
fontFamily: "body",
|
|
425
|
+
fontSize: "14px",
|
|
426
|
+
color: "chan.text.dim",
|
|
427
|
+
textAlign: "center",
|
|
428
|
+
letterSpacing: "0.06em",
|
|
429
|
+
...pick(props)
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
function SectionH2(props) {
|
|
433
|
+
return /* @__PURE__ */ jsx(Heading, {
|
|
434
|
+
as: "h2",
|
|
435
|
+
fontFamily: "display",
|
|
436
|
+
fontWeight: 800,
|
|
437
|
+
fontSize: "36px",
|
|
438
|
+
letterSpacing: "0.03em",
|
|
439
|
+
textTransform: "uppercase",
|
|
440
|
+
color: "chan.text",
|
|
441
|
+
textAlign: "center",
|
|
442
|
+
lineHeight: "1.2",
|
|
443
|
+
mb: "2",
|
|
444
|
+
...pick(props)
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
function SectionP(props) {
|
|
448
|
+
return /* @__PURE__ */ jsx(Text, {
|
|
449
|
+
as: "p",
|
|
450
|
+
fontFamily: "body",
|
|
451
|
+
fontSize: "14px",
|
|
452
|
+
color: "chan.text.faint",
|
|
453
|
+
textAlign: "center",
|
|
454
|
+
...pick(props)
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
function QuoteBlockquote(props) {
|
|
458
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
459
|
+
as: "blockquote",
|
|
460
|
+
position: "relative",
|
|
461
|
+
textAlign: "center",
|
|
462
|
+
css: { "& > p": {
|
|
463
|
+
marginBottom: 0,
|
|
464
|
+
fontFamily: "body",
|
|
465
|
+
fontSize: "20px",
|
|
466
|
+
lineHeight: 1.6,
|
|
467
|
+
color: "chan.text",
|
|
468
|
+
fontStyle: "italic"
|
|
469
|
+
} },
|
|
470
|
+
...pick(props)
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
function QuoteP(props) {
|
|
474
|
+
return /* @__PURE__ */ jsx(Text, {
|
|
475
|
+
as: "p",
|
|
476
|
+
fontFamily: "body",
|
|
477
|
+
fontSize: "20px",
|
|
478
|
+
lineHeight: "1.6",
|
|
479
|
+
color: "chan.text",
|
|
480
|
+
textAlign: "center",
|
|
481
|
+
fontStyle: "italic",
|
|
482
|
+
...pick(props)
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
//#endregion
|
|
486
|
+
//#region src/components/slides/SlideComponents.ts
|
|
487
|
+
const defaultComponents = {
|
|
488
|
+
h2: SlideH2,
|
|
489
|
+
h3: SlideH3,
|
|
490
|
+
p: SlideP,
|
|
491
|
+
strong: SlideStrong,
|
|
492
|
+
em: SlideEm,
|
|
493
|
+
ul: SlideUl,
|
|
494
|
+
ol: SlideOl,
|
|
495
|
+
li: SlideLi,
|
|
496
|
+
blockquote: SlideBlockquote,
|
|
497
|
+
code: SlideInlineCode,
|
|
498
|
+
pre: SlidePre,
|
|
499
|
+
img: SlideImg,
|
|
500
|
+
hr: SlideHr
|
|
501
|
+
};
|
|
502
|
+
const layoutOverrides = {
|
|
503
|
+
title: {
|
|
504
|
+
h2: TitleH2,
|
|
505
|
+
p: TitleP
|
|
506
|
+
},
|
|
507
|
+
section: {
|
|
508
|
+
h2: SectionH2,
|
|
509
|
+
p: SectionP
|
|
510
|
+
},
|
|
511
|
+
quote: {
|
|
512
|
+
blockquote: QuoteBlockquote,
|
|
513
|
+
p: QuoteP
|
|
514
|
+
}
|
|
515
|
+
};
|
|
516
|
+
/**
|
|
517
|
+
* Get a component mapping for rendering slide markdown content.
|
|
518
|
+
*
|
|
519
|
+
* Each layout has specific overrides for visual treatment:
|
|
520
|
+
* - `default` — standard content slide
|
|
521
|
+
* - `title` — large centered heading, uppercase
|
|
522
|
+
* - `section` — centered divider heading
|
|
523
|
+
* - `quote` — large italic centered text
|
|
524
|
+
* - `blank` — same as default (layout wrapper handles blank)
|
|
525
|
+
*/
|
|
526
|
+
function getSlideComponents(layout = "default") {
|
|
527
|
+
const overrides = layoutOverrides[layout] ?? {};
|
|
528
|
+
return {
|
|
529
|
+
...defaultComponents,
|
|
530
|
+
...overrides
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
//#endregion
|
|
534
|
+
//#region src/components/slides/SlideControls.tsx
|
|
535
|
+
function ChevronLeft() {
|
|
536
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
537
|
+
width: "18",
|
|
538
|
+
height: "18",
|
|
539
|
+
viewBox: "0 0 24 24",
|
|
540
|
+
fill: "none",
|
|
541
|
+
stroke: "currentColor",
|
|
542
|
+
strokeWidth: "2",
|
|
543
|
+
children: /* @__PURE__ */ jsx("polyline", { points: "15 18 9 12 15 6" })
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
function ChevronRight() {
|
|
547
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
548
|
+
width: "18",
|
|
549
|
+
height: "18",
|
|
550
|
+
viewBox: "0 0 24 24",
|
|
551
|
+
fill: "none",
|
|
552
|
+
stroke: "currentColor",
|
|
553
|
+
strokeWidth: "2",
|
|
554
|
+
children: /* @__PURE__ */ jsx("polyline", { points: "9 6 15 12 9 18" })
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
function ExpandIcon() {
|
|
558
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
559
|
+
width: "16",
|
|
560
|
+
height: "16",
|
|
561
|
+
viewBox: "0 0 24 24",
|
|
562
|
+
fill: "none",
|
|
563
|
+
stroke: "currentColor",
|
|
564
|
+
strokeWidth: "2",
|
|
565
|
+
children: [
|
|
566
|
+
/* @__PURE__ */ jsx("polyline", { points: "15 3 21 3 21 9" }),
|
|
567
|
+
/* @__PURE__ */ jsx("polyline", { points: "9 21 3 21 3 15" }),
|
|
568
|
+
/* @__PURE__ */ jsx("line", {
|
|
569
|
+
x1: "21",
|
|
570
|
+
y1: "3",
|
|
571
|
+
x2: "14",
|
|
572
|
+
y2: "10"
|
|
573
|
+
}),
|
|
574
|
+
/* @__PURE__ */ jsx("line", {
|
|
575
|
+
x1: "3",
|
|
576
|
+
y1: "21",
|
|
577
|
+
x2: "10",
|
|
578
|
+
y2: "14"
|
|
579
|
+
})
|
|
580
|
+
]
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
function SlideControls({ currentSlide, totalSlides, onSlideChange, onTogglePresent, isPresenting }) {
|
|
584
|
+
const isFirst = currentSlide === 0;
|
|
585
|
+
const isLast = currentSlide === totalSlides - 1;
|
|
586
|
+
return /* @__PURE__ */ jsxs(Flex, {
|
|
587
|
+
align: "center",
|
|
588
|
+
justify: "center",
|
|
589
|
+
gap: "4",
|
|
590
|
+
py: "3",
|
|
591
|
+
children: [
|
|
592
|
+
/* @__PURE__ */ jsx(IconButton, {
|
|
593
|
+
"aria-label": "Previous slide",
|
|
594
|
+
variant: "ghost",
|
|
595
|
+
size: "sm",
|
|
596
|
+
disabled: isFirst,
|
|
597
|
+
onClick: () => onSlideChange(currentSlide - 1),
|
|
598
|
+
color: isFirst ? "chan.text.faint" : "chan.text.dim",
|
|
599
|
+
_hover: isFirst ? {} : {
|
|
600
|
+
bg: "chan.bg.hover",
|
|
601
|
+
color: "chan.text"
|
|
602
|
+
},
|
|
603
|
+
minW: "touchTarget",
|
|
604
|
+
minH: "touchTarget",
|
|
605
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, {})
|
|
606
|
+
}),
|
|
607
|
+
/* @__PURE__ */ jsxs(Text, {
|
|
608
|
+
fontFamily: "body",
|
|
609
|
+
fontSize: "xs",
|
|
610
|
+
color: "chan.text.faint",
|
|
611
|
+
letterSpacing: "0.1em",
|
|
612
|
+
minW: "60px",
|
|
613
|
+
textAlign: "center",
|
|
614
|
+
children: [
|
|
615
|
+
currentSlide + 1,
|
|
616
|
+
/* @__PURE__ */ jsx(Box, {
|
|
617
|
+
as: "span",
|
|
618
|
+
mx: "1",
|
|
619
|
+
color: "chan.border",
|
|
620
|
+
children: "/"
|
|
621
|
+
}),
|
|
622
|
+
totalSlides
|
|
623
|
+
]
|
|
624
|
+
}),
|
|
625
|
+
/* @__PURE__ */ jsx(IconButton, {
|
|
626
|
+
"aria-label": "Next slide",
|
|
627
|
+
variant: "ghost",
|
|
628
|
+
size: "sm",
|
|
629
|
+
disabled: isLast,
|
|
630
|
+
onClick: () => onSlideChange(currentSlide + 1),
|
|
631
|
+
color: isLast ? "chan.text.faint" : "chan.text.dim",
|
|
632
|
+
_hover: isLast ? {} : {
|
|
633
|
+
bg: "chan.bg.hover",
|
|
634
|
+
color: "chan.text"
|
|
635
|
+
},
|
|
636
|
+
minW: "touchTarget",
|
|
637
|
+
minH: "touchTarget",
|
|
638
|
+
children: /* @__PURE__ */ jsx(ChevronRight, {})
|
|
639
|
+
}),
|
|
640
|
+
onTogglePresent && /* @__PURE__ */ jsx(IconButton, {
|
|
641
|
+
"aria-label": isPresenting ? "Exit presentation" : "Present fullscreen",
|
|
642
|
+
variant: "ghost",
|
|
643
|
+
size: "sm",
|
|
644
|
+
onClick: onTogglePresent,
|
|
645
|
+
color: "chan.text.faint",
|
|
646
|
+
_hover: {
|
|
647
|
+
bg: "chan.bg.hover",
|
|
648
|
+
color: "chan.text"
|
|
649
|
+
},
|
|
650
|
+
minW: "touchTarget",
|
|
651
|
+
minH: "touchTarget",
|
|
652
|
+
ml: "2",
|
|
653
|
+
children: /* @__PURE__ */ jsx(ExpandIcon, {})
|
|
654
|
+
})
|
|
655
|
+
]
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
//#endregion
|
|
659
|
+
//#region src/components/slides/SlideLayout.tsx
|
|
660
|
+
const sharedCss = {
|
|
661
|
+
"& pre, & pre.shiki, & pre[class*='shiki']": {
|
|
662
|
+
whiteSpace: "pre-wrap !important",
|
|
663
|
+
wordBreak: "break-word",
|
|
664
|
+
fontSize: "0.75em",
|
|
665
|
+
lineHeight: 1.6,
|
|
666
|
+
overflow: "auto",
|
|
667
|
+
maxHeight: "55%",
|
|
668
|
+
padding: "0.8em",
|
|
669
|
+
borderRadius: "6px",
|
|
670
|
+
background: "var(--chakra-colors-chan\\.bg\\.code) !important"
|
|
671
|
+
},
|
|
672
|
+
"& pre code, & pre.shiki code": {
|
|
673
|
+
whiteSpace: "pre-wrap !important",
|
|
674
|
+
wordBreak: "break-word",
|
|
675
|
+
display: "block"
|
|
676
|
+
},
|
|
677
|
+
"& pre .line": { display: "block" },
|
|
678
|
+
"& pre span[style]": {
|
|
679
|
+
color: "var(--shiki-dark) !important",
|
|
680
|
+
fontWeight: "var(--shiki-dark-font-weight) !important"
|
|
681
|
+
}
|
|
682
|
+
};
|
|
683
|
+
function DefaultLayout({ children }) {
|
|
684
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
685
|
+
w: "full",
|
|
686
|
+
h: "full",
|
|
687
|
+
p: "8",
|
|
688
|
+
overflow: "auto",
|
|
689
|
+
css: sharedCss,
|
|
690
|
+
children
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
function TitleLayout({ children }) {
|
|
694
|
+
return /* @__PURE__ */ jsx(Center, {
|
|
695
|
+
w: "full",
|
|
696
|
+
h: "full",
|
|
697
|
+
flexDirection: "column",
|
|
698
|
+
css: sharedCss,
|
|
699
|
+
children
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
function SectionLayout({ children }) {
|
|
703
|
+
return /* @__PURE__ */ jsx(Center, {
|
|
704
|
+
w: "full",
|
|
705
|
+
h: "full",
|
|
706
|
+
flexDirection: "column",
|
|
707
|
+
css: sharedCss,
|
|
708
|
+
children
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
function QuoteLayout({ children }) {
|
|
712
|
+
return /* @__PURE__ */ jsx(Center, {
|
|
713
|
+
w: "full",
|
|
714
|
+
h: "full",
|
|
715
|
+
px: "10",
|
|
716
|
+
css: sharedCss,
|
|
717
|
+
children: /* @__PURE__ */ jsx(Flex, {
|
|
718
|
+
direction: "column",
|
|
719
|
+
align: "center",
|
|
720
|
+
maxW: "640px",
|
|
721
|
+
children
|
|
722
|
+
})
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
function BlankLayout({ children }) {
|
|
726
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
727
|
+
w: "full",
|
|
728
|
+
h: "full",
|
|
729
|
+
css: sharedCss,
|
|
730
|
+
children
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
const layouts = {
|
|
734
|
+
default: DefaultLayout,
|
|
735
|
+
title: TitleLayout,
|
|
736
|
+
section: SectionLayout,
|
|
737
|
+
quote: QuoteLayout,
|
|
738
|
+
blank: BlankLayout
|
|
739
|
+
};
|
|
740
|
+
const CANVAS_W = 960;
|
|
741
|
+
const CANVAS_H = 600;
|
|
742
|
+
function useSlideScale(containerRef) {
|
|
743
|
+
const [scale, setScale] = useState(1);
|
|
744
|
+
const recalc = useCallback(() => {
|
|
745
|
+
const el = containerRef.current;
|
|
746
|
+
if (!el) return;
|
|
747
|
+
const scaleX = el.clientWidth / CANVAS_W;
|
|
748
|
+
const scaleY = el.clientHeight / CANVAS_H;
|
|
749
|
+
setScale(Math.min(scaleX, scaleY));
|
|
750
|
+
}, [containerRef]);
|
|
751
|
+
useEffect(() => {
|
|
752
|
+
const el = containerRef.current;
|
|
753
|
+
if (!el) return;
|
|
754
|
+
recalc();
|
|
755
|
+
const observer = new ResizeObserver(recalc);
|
|
756
|
+
observer.observe(el);
|
|
757
|
+
return () => observer.disconnect();
|
|
758
|
+
}, [containerRef, recalc]);
|
|
759
|
+
return scale;
|
|
760
|
+
}
|
|
761
|
+
function SlideLayoutComponent({ layout, children }) {
|
|
762
|
+
const LayoutComponent = layouts[layout] ?? layouts.default;
|
|
763
|
+
const containerRef = useRef(null);
|
|
764
|
+
const scale = useSlideScale(containerRef);
|
|
765
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
766
|
+
ref: containerRef,
|
|
767
|
+
w: "full",
|
|
768
|
+
h: "full",
|
|
769
|
+
bg: "chan.bg.card",
|
|
770
|
+
borderRadius: "sm",
|
|
771
|
+
overflow: "hidden",
|
|
772
|
+
position: "relative",
|
|
773
|
+
display: "flex",
|
|
774
|
+
alignItems: "center",
|
|
775
|
+
justifyContent: "center",
|
|
776
|
+
children: /* @__PURE__ */ jsx(Box, {
|
|
777
|
+
w: `${CANVAS_W}px`,
|
|
778
|
+
h: `${CANVAS_H}px`,
|
|
779
|
+
flexShrink: 0,
|
|
780
|
+
style: {
|
|
781
|
+
transform: `scale(${scale})`,
|
|
782
|
+
transformOrigin: "center center"
|
|
783
|
+
},
|
|
784
|
+
children: /* @__PURE__ */ jsx(LayoutComponent, { children })
|
|
785
|
+
})
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
//#endregion
|
|
789
|
+
//#region src/components/slides/SlideViewer.tsx
|
|
790
|
+
function SlideViewer({ slides, currentSlide, onSlideChange, isPresenting = false, onTogglePresent }) {
|
|
791
|
+
const slide = slides[currentSlide];
|
|
792
|
+
if (!slide) return null;
|
|
793
|
+
return /* @__PURE__ */ jsxs(Flex, {
|
|
794
|
+
direction: "column",
|
|
795
|
+
w: "full",
|
|
796
|
+
h: "full",
|
|
797
|
+
bg: "chan.bg",
|
|
798
|
+
children: [/* @__PURE__ */ jsx(Box, {
|
|
799
|
+
flex: "1",
|
|
800
|
+
display: "flex",
|
|
801
|
+
alignItems: "center",
|
|
802
|
+
justifyContent: "center",
|
|
803
|
+
p: isPresenting ? "0" : "4",
|
|
804
|
+
children: /* @__PURE__ */ jsx(Box, {
|
|
805
|
+
w: "full",
|
|
806
|
+
maxW: isPresenting ? "100%" : "960px",
|
|
807
|
+
aspectRatio: isPresenting ? void 0 : "16 / 10",
|
|
808
|
+
h: isPresenting ? "full" : void 0,
|
|
809
|
+
children: /* @__PURE__ */ jsx(SlideLayoutComponent, {
|
|
810
|
+
layout: slide.layout,
|
|
811
|
+
children: slide.children
|
|
812
|
+
})
|
|
813
|
+
})
|
|
814
|
+
}), !isPresenting && /* @__PURE__ */ jsx(SlideControls, {
|
|
815
|
+
currentSlide,
|
|
816
|
+
totalSlides: slides.length,
|
|
817
|
+
onSlideChange,
|
|
818
|
+
onTogglePresent,
|
|
819
|
+
isPresenting
|
|
820
|
+
})]
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
//#endregion
|
|
824
|
+
//#region src/components/Wordmark.tsx
|
|
825
|
+
function Wordmark({ fontSize = "20px", color = "chan.text", pulseDot, ...rest }) {
|
|
826
|
+
const dotProps = pulseDot ? {
|
|
827
|
+
animation: "chan-pulse",
|
|
828
|
+
display: "inline-block"
|
|
829
|
+
} : {};
|
|
830
|
+
return /* @__PURE__ */ jsxs(Text, {
|
|
831
|
+
textStyle: "chan.wordmark",
|
|
832
|
+
fontSize,
|
|
833
|
+
color,
|
|
834
|
+
...rest,
|
|
835
|
+
children: [
|
|
836
|
+
"CHAN",
|
|
837
|
+
/* @__PURE__ */ jsx(Box, {
|
|
838
|
+
as: "span",
|
|
839
|
+
color: "chan.orange",
|
|
840
|
+
...dotProps,
|
|
841
|
+
children: "."
|
|
842
|
+
}),
|
|
843
|
+
"RUN"
|
|
844
|
+
]
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
//#endregion
|
|
848
|
+
//#region src/components/Topbar.tsx
|
|
849
|
+
function HamburgerButton({ onClick }) {
|
|
850
|
+
return /* @__PURE__ */ jsxs(Flex, {
|
|
851
|
+
as: "button",
|
|
852
|
+
"aria-label": "Open menu",
|
|
853
|
+
onClick,
|
|
854
|
+
w: "34px",
|
|
855
|
+
h: "34px",
|
|
856
|
+
bg: "chan.bg.card",
|
|
857
|
+
border: "1px solid",
|
|
858
|
+
borderColor: "chan.border",
|
|
859
|
+
borderRadius: "8px",
|
|
860
|
+
direction: "column",
|
|
861
|
+
align: "center",
|
|
862
|
+
justify: "center",
|
|
863
|
+
gap: "4px",
|
|
864
|
+
cursor: "pointer",
|
|
865
|
+
flexShrink: 0,
|
|
866
|
+
transition: "background 0.15s, border-color 0.15s",
|
|
867
|
+
_hover: {
|
|
868
|
+
bg: "chan.bg.hover",
|
|
869
|
+
borderColor: "chan.border"
|
|
870
|
+
},
|
|
871
|
+
position: "relative",
|
|
872
|
+
_before: {
|
|
873
|
+
content: "\"\"",
|
|
874
|
+
position: "absolute",
|
|
875
|
+
inset: "-5px"
|
|
876
|
+
},
|
|
877
|
+
children: [
|
|
878
|
+
/* @__PURE__ */ jsx(Box, {
|
|
879
|
+
w: "14px",
|
|
880
|
+
h: "1.5px",
|
|
881
|
+
bg: "chan.text.dim",
|
|
882
|
+
borderRadius: "full"
|
|
883
|
+
}),
|
|
884
|
+
/* @__PURE__ */ jsx(Box, {
|
|
885
|
+
w: "14px",
|
|
886
|
+
h: "1.5px",
|
|
887
|
+
bg: "chan.text.dim",
|
|
888
|
+
borderRadius: "full"
|
|
889
|
+
}),
|
|
890
|
+
/* @__PURE__ */ jsx(Box, {
|
|
891
|
+
w: "14px",
|
|
892
|
+
h: "1.5px",
|
|
893
|
+
bg: "chan.text.dim",
|
|
894
|
+
borderRadius: "full"
|
|
895
|
+
})
|
|
896
|
+
]
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
function Topbar({ onMenuOpen }) {
|
|
900
|
+
return /* @__PURE__ */ jsxs(Flex, {
|
|
901
|
+
as: "header",
|
|
902
|
+
display: {
|
|
903
|
+
base: "flex",
|
|
904
|
+
md: "none"
|
|
905
|
+
},
|
|
906
|
+
position: "fixed",
|
|
907
|
+
top: 0,
|
|
908
|
+
left: 0,
|
|
909
|
+
right: 0,
|
|
910
|
+
h: "topbar",
|
|
911
|
+
bg: "chan.bg.soft",
|
|
912
|
+
borderBottom: "1px solid",
|
|
913
|
+
borderColor: "chan.border",
|
|
914
|
+
align: "center",
|
|
915
|
+
justify: "space-between",
|
|
916
|
+
px: "18px",
|
|
917
|
+
zIndex: 80,
|
|
918
|
+
children: [/* @__PURE__ */ jsx(Wordmark, {}), /* @__PURE__ */ jsxs(Flex, {
|
|
919
|
+
align: "center",
|
|
920
|
+
gap: "8px",
|
|
921
|
+
children: [/* @__PURE__ */ jsx(ColorModeButton, {}), onMenuOpen && /* @__PURE__ */ jsx(HamburgerButton, { onClick: onMenuOpen })]
|
|
922
|
+
})]
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
//#endregion
|
|
926
|
+
//#region src/TokenShowcase.tsx
|
|
927
|
+
function Swatch({ name, token, hex }) {
|
|
928
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
929
|
+
borderRadius: "sm",
|
|
930
|
+
border: "1px solid",
|
|
931
|
+
borderColor: "chan.border",
|
|
932
|
+
overflow: "hidden",
|
|
933
|
+
children: [/* @__PURE__ */ jsx(Box, {
|
|
934
|
+
h: "44px",
|
|
935
|
+
bg: hex
|
|
936
|
+
}), /* @__PURE__ */ jsxs(Box, {
|
|
937
|
+
p: "8px 10px",
|
|
938
|
+
bg: "chan.bg.card",
|
|
939
|
+
children: [
|
|
940
|
+
/* @__PURE__ */ jsx(Text, {
|
|
941
|
+
fontSize: "9px",
|
|
942
|
+
letterSpacing: "0.04em",
|
|
943
|
+
color: "chan.text",
|
|
944
|
+
children: name
|
|
945
|
+
}),
|
|
946
|
+
/* @__PURE__ */ jsx(Text, {
|
|
947
|
+
fontSize: "8px",
|
|
948
|
+
letterSpacing: "0.06em",
|
|
949
|
+
color: "chan.text.faint",
|
|
950
|
+
mt: "1px",
|
|
951
|
+
children: hex
|
|
952
|
+
}),
|
|
953
|
+
/* @__PURE__ */ jsx(Text, {
|
|
954
|
+
fontSize: "7.5px",
|
|
955
|
+
letterSpacing: "0.06em",
|
|
956
|
+
color: "chan.orange",
|
|
957
|
+
mt: "2px",
|
|
958
|
+
children: token
|
|
959
|
+
})
|
|
960
|
+
]
|
|
961
|
+
})]
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
function SectionTitle({ id, title }) {
|
|
965
|
+
return /* @__PURE__ */ jsxs(Flex, {
|
|
966
|
+
align: "center",
|
|
967
|
+
gap: "14px",
|
|
968
|
+
mb: "24px",
|
|
969
|
+
pb: "12px",
|
|
970
|
+
borderBottom: "1px solid",
|
|
971
|
+
borderColor: "chan.border",
|
|
972
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
973
|
+
fontSize: "8px",
|
|
974
|
+
letterSpacing: "0.22em",
|
|
975
|
+
textTransform: "uppercase",
|
|
976
|
+
color: "chan.orange",
|
|
977
|
+
children: id
|
|
978
|
+
}), /* @__PURE__ */ jsx(Heading, {
|
|
979
|
+
fontFamily: "display",
|
|
980
|
+
fontWeight: "700",
|
|
981
|
+
fontSize: "28px",
|
|
982
|
+
letterSpacing: "0.04em",
|
|
983
|
+
textTransform: "uppercase",
|
|
984
|
+
color: "chan.text",
|
|
985
|
+
children: title
|
|
986
|
+
})]
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
function SubHead({ children }) {
|
|
990
|
+
return /* @__PURE__ */ jsx(Text, {
|
|
991
|
+
fontSize: "8px",
|
|
992
|
+
letterSpacing: "0.2em",
|
|
993
|
+
textTransform: "uppercase",
|
|
994
|
+
color: "chan.orange",
|
|
995
|
+
mb: "14px",
|
|
996
|
+
mt: "32px",
|
|
997
|
+
children
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
function TypeRow({ label, children }) {
|
|
1001
|
+
return /* @__PURE__ */ jsxs(Flex, {
|
|
1002
|
+
align: "baseline",
|
|
1003
|
+
gap: "20px",
|
|
1004
|
+
p: "18px 20px",
|
|
1005
|
+
borderBottom: "1px solid",
|
|
1006
|
+
borderColor: "chan.border.soft",
|
|
1007
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
1008
|
+
fontSize: "8px",
|
|
1009
|
+
letterSpacing: "0.12em",
|
|
1010
|
+
textTransform: "uppercase",
|
|
1011
|
+
color: "chan.text.faint",
|
|
1012
|
+
minW: "72px",
|
|
1013
|
+
flexShrink: 0,
|
|
1014
|
+
pt: "3px",
|
|
1015
|
+
children: label
|
|
1016
|
+
}), /* @__PURE__ */ jsx(Box, {
|
|
1017
|
+
flex: "1",
|
|
1018
|
+
lineHeight: "1.1",
|
|
1019
|
+
children
|
|
1020
|
+
})]
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
function SpaceRow({ token, px, use }) {
|
|
1024
|
+
return /* @__PURE__ */ jsxs(Flex, {
|
|
1025
|
+
align: "center",
|
|
1026
|
+
gap: "12px",
|
|
1027
|
+
bg: "chan.bg.card",
|
|
1028
|
+
border: "1px solid",
|
|
1029
|
+
borderColor: "chan.border",
|
|
1030
|
+
borderRadius: "xs",
|
|
1031
|
+
p: "10px 16px",
|
|
1032
|
+
children: [
|
|
1033
|
+
/* @__PURE__ */ jsx(Text, {
|
|
1034
|
+
fontSize: "9px",
|
|
1035
|
+
letterSpacing: "0.1em",
|
|
1036
|
+
color: "chan.orange",
|
|
1037
|
+
minW: "80px",
|
|
1038
|
+
children: token
|
|
1039
|
+
}),
|
|
1040
|
+
/* @__PURE__ */ jsx(Text, {
|
|
1041
|
+
fontSize: "9px",
|
|
1042
|
+
letterSpacing: "0.08em",
|
|
1043
|
+
color: "chan.text.dim",
|
|
1044
|
+
minW: "36px",
|
|
1045
|
+
children: px
|
|
1046
|
+
}),
|
|
1047
|
+
/* @__PURE__ */ jsx(Box, {
|
|
1048
|
+
flex: "1",
|
|
1049
|
+
h: "8px",
|
|
1050
|
+
bg: "chan.bg",
|
|
1051
|
+
borderRadius: "2px",
|
|
1052
|
+
overflow: "hidden",
|
|
1053
|
+
children: /* @__PURE__ */ jsx(Box, {
|
|
1054
|
+
h: "100%",
|
|
1055
|
+
bg: "chan.orange.bg",
|
|
1056
|
+
borderRight: "2px solid",
|
|
1057
|
+
borderColor: "chan.orange",
|
|
1058
|
+
w: `${Math.min(parseInt(px, 10) / 72 * 100, 100)}%`
|
|
1059
|
+
})
|
|
1060
|
+
}),
|
|
1061
|
+
/* @__PURE__ */ jsx(Text, {
|
|
1062
|
+
fontSize: "8px",
|
|
1063
|
+
letterSpacing: "0.06em",
|
|
1064
|
+
color: "chan.text.faint",
|
|
1065
|
+
minW: "160px",
|
|
1066
|
+
textAlign: "right",
|
|
1067
|
+
children: use
|
|
1068
|
+
})
|
|
1069
|
+
]
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1072
|
+
function RadiusDemo({ label, value }) {
|
|
1073
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
1074
|
+
textAlign: "center",
|
|
1075
|
+
children: [
|
|
1076
|
+
/* @__PURE__ */ jsx(Box, {
|
|
1077
|
+
w: "80px",
|
|
1078
|
+
h: "80px",
|
|
1079
|
+
border: "1px solid",
|
|
1080
|
+
borderColor: "chan.border",
|
|
1081
|
+
bg: "chan.bg.card",
|
|
1082
|
+
borderRadius: value,
|
|
1083
|
+
mx: "auto",
|
|
1084
|
+
mb: "8px"
|
|
1085
|
+
}),
|
|
1086
|
+
/* @__PURE__ */ jsx(Text, {
|
|
1087
|
+
fontSize: "9px",
|
|
1088
|
+
color: "chan.orange",
|
|
1089
|
+
letterSpacing: "0.1em",
|
|
1090
|
+
children: label
|
|
1091
|
+
}),
|
|
1092
|
+
/* @__PURE__ */ jsx(Text, {
|
|
1093
|
+
fontSize: "8px",
|
|
1094
|
+
color: "chan.text.faint",
|
|
1095
|
+
mt: "2px",
|
|
1096
|
+
children: value
|
|
1097
|
+
})
|
|
1098
|
+
]
|
|
1099
|
+
});
|
|
1100
|
+
}
|
|
1101
|
+
function BadgeDemo({ label, bg, color, borderColor }) {
|
|
1102
|
+
return /* @__PURE__ */ jsx(Text, {
|
|
1103
|
+
as: "span",
|
|
1104
|
+
display: "inline-block",
|
|
1105
|
+
fontSize: "7.5px",
|
|
1106
|
+
letterSpacing: "0.14em",
|
|
1107
|
+
textTransform: "uppercase",
|
|
1108
|
+
p: "3px 8px",
|
|
1109
|
+
borderRadius: "3px",
|
|
1110
|
+
bg,
|
|
1111
|
+
color,
|
|
1112
|
+
border: "1px solid",
|
|
1113
|
+
borderColor,
|
|
1114
|
+
children: label
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
function ButtonDemo({ label, bg, color, borderColor }) {
|
|
1118
|
+
return /* @__PURE__ */ jsx(Text, {
|
|
1119
|
+
as: "button",
|
|
1120
|
+
display: "inline-flex",
|
|
1121
|
+
alignItems: "center",
|
|
1122
|
+
p: "9px 16px",
|
|
1123
|
+
borderRadius: "xs",
|
|
1124
|
+
fontFamily: "body",
|
|
1125
|
+
fontSize: "10px",
|
|
1126
|
+
letterSpacing: "0.1em",
|
|
1127
|
+
textTransform: "uppercase",
|
|
1128
|
+
fontWeight: "500",
|
|
1129
|
+
cursor: "pointer",
|
|
1130
|
+
bg,
|
|
1131
|
+
color,
|
|
1132
|
+
border: borderColor ? "1px solid" : "none",
|
|
1133
|
+
borderColor,
|
|
1134
|
+
children: label
|
|
1135
|
+
});
|
|
1136
|
+
}
|
|
1137
|
+
function TokenShowcase() {
|
|
1138
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
1139
|
+
maxW: "860px",
|
|
1140
|
+
mx: "auto",
|
|
1141
|
+
p: "64px 40px 120px",
|
|
1142
|
+
fontFamily: "body",
|
|
1143
|
+
children: [
|
|
1144
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
1145
|
+
pb: "64px",
|
|
1146
|
+
borderBottom: "1px solid",
|
|
1147
|
+
borderColor: "chan.border",
|
|
1148
|
+
mb: "64px",
|
|
1149
|
+
children: [
|
|
1150
|
+
/* @__PURE__ */ jsx(Text, {
|
|
1151
|
+
fontSize: "9px",
|
|
1152
|
+
letterSpacing: "0.2em",
|
|
1153
|
+
textTransform: "uppercase",
|
|
1154
|
+
color: "chan.text.faint",
|
|
1155
|
+
mb: "48px",
|
|
1156
|
+
children: "chan.run / design tokens"
|
|
1157
|
+
}),
|
|
1158
|
+
/* @__PURE__ */ jsxs(Heading, {
|
|
1159
|
+
fontFamily: "display",
|
|
1160
|
+
fontWeight: "900",
|
|
1161
|
+
fontSize: "clamp(48px, 8vw, 72px)",
|
|
1162
|
+
lineHeight: "0.88",
|
|
1163
|
+
letterSpacing: "-0.01em",
|
|
1164
|
+
textTransform: "uppercase",
|
|
1165
|
+
mb: "24px",
|
|
1166
|
+
color: "chan.text",
|
|
1167
|
+
children: [
|
|
1168
|
+
"TOKEN",
|
|
1169
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
1170
|
+
/* @__PURE__ */ jsx(Text, {
|
|
1171
|
+
as: "span",
|
|
1172
|
+
color: "chan.orange",
|
|
1173
|
+
children: "SHOWCASE"
|
|
1174
|
+
})
|
|
1175
|
+
]
|
|
1176
|
+
}),
|
|
1177
|
+
/* @__PURE__ */ jsx(Text, {
|
|
1178
|
+
fontSize: "12px",
|
|
1179
|
+
lineHeight: "1.9",
|
|
1180
|
+
color: "chan.text.dim",
|
|
1181
|
+
maxW: "520px",
|
|
1182
|
+
children: "Visual reference for all design tokens defined in the @chan.run/design package. Every color, font, spacing, and radius value rendered for verification."
|
|
1183
|
+
})
|
|
1184
|
+
]
|
|
1185
|
+
}),
|
|
1186
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
1187
|
+
mb: "72px",
|
|
1188
|
+
children: [
|
|
1189
|
+
/* @__PURE__ */ jsx(SectionTitle, {
|
|
1190
|
+
id: "01",
|
|
1191
|
+
title: "Color Tokens"
|
|
1192
|
+
}),
|
|
1193
|
+
/* @__PURE__ */ jsx(SubHead, { children: "Backgrounds" }),
|
|
1194
|
+
/* @__PURE__ */ jsxs(Grid, {
|
|
1195
|
+
templateColumns: "repeat(auto-fill, minmax(110px, 1fr))",
|
|
1196
|
+
gap: "8px",
|
|
1197
|
+
mb: "24px",
|
|
1198
|
+
children: [
|
|
1199
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1200
|
+
name: "Base",
|
|
1201
|
+
token: "chan.bg",
|
|
1202
|
+
hex: "#0a0a08"
|
|
1203
|
+
}),
|
|
1204
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1205
|
+
name: "Canvas",
|
|
1206
|
+
token: "chan.bg.soft",
|
|
1207
|
+
hex: "#111110"
|
|
1208
|
+
}),
|
|
1209
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1210
|
+
name: "Card",
|
|
1211
|
+
token: "chan.bg.card",
|
|
1212
|
+
hex: "#161614"
|
|
1213
|
+
}),
|
|
1214
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1215
|
+
name: "Hover",
|
|
1216
|
+
token: "chan.bg.hover",
|
|
1217
|
+
hex: "#1d1d1a"
|
|
1218
|
+
}),
|
|
1219
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1220
|
+
name: "Sidebar",
|
|
1221
|
+
token: "chan.bg.sidebar",
|
|
1222
|
+
hex: "#0f0f0d"
|
|
1223
|
+
})
|
|
1224
|
+
]
|
|
1225
|
+
}),
|
|
1226
|
+
/* @__PURE__ */ jsx(SubHead, { children: "Brand Orange" }),
|
|
1227
|
+
/* @__PURE__ */ jsxs(Grid, {
|
|
1228
|
+
templateColumns: "repeat(auto-fill, minmax(110px, 1fr))",
|
|
1229
|
+
gap: "8px",
|
|
1230
|
+
mb: "24px",
|
|
1231
|
+
children: [
|
|
1232
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1233
|
+
name: "Orange",
|
|
1234
|
+
token: "chan.orange",
|
|
1235
|
+
hex: "#ff4d00"
|
|
1236
|
+
}),
|
|
1237
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1238
|
+
name: "Dim",
|
|
1239
|
+
token: "chan.orange.dim",
|
|
1240
|
+
hex: "#cc3d00"
|
|
1241
|
+
}),
|
|
1242
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1243
|
+
name: "Glow",
|
|
1244
|
+
token: "chan.orange.glow",
|
|
1245
|
+
hex: "#ff6a2a"
|
|
1246
|
+
}),
|
|
1247
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1248
|
+
name: "Bg tint",
|
|
1249
|
+
token: "chan.orange.bg",
|
|
1250
|
+
hex: "rgba(255,77,0,0.08)"
|
|
1251
|
+
}),
|
|
1252
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1253
|
+
name: "Border",
|
|
1254
|
+
token: "chan.orange.border",
|
|
1255
|
+
hex: "rgba(255,77,0,0.20)"
|
|
1256
|
+
})
|
|
1257
|
+
]
|
|
1258
|
+
}),
|
|
1259
|
+
/* @__PURE__ */ jsx(SubHead, { children: "Text" }),
|
|
1260
|
+
/* @__PURE__ */ jsxs(Grid, {
|
|
1261
|
+
templateColumns: "repeat(auto-fill, minmax(110px, 1fr))",
|
|
1262
|
+
gap: "8px",
|
|
1263
|
+
mb: "24px",
|
|
1264
|
+
children: [
|
|
1265
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1266
|
+
name: "Primary",
|
|
1267
|
+
token: "chan.text",
|
|
1268
|
+
hex: "#f0ece4"
|
|
1269
|
+
}),
|
|
1270
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1271
|
+
name: "Dim",
|
|
1272
|
+
token: "chan.text.dim",
|
|
1273
|
+
hex: "#7a7870"
|
|
1274
|
+
}),
|
|
1275
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1276
|
+
name: "Faint",
|
|
1277
|
+
token: "chan.text.faint",
|
|
1278
|
+
hex: "#3a3a36"
|
|
1279
|
+
})
|
|
1280
|
+
]
|
|
1281
|
+
}),
|
|
1282
|
+
/* @__PURE__ */ jsx(SubHead, { children: "Borders" }),
|
|
1283
|
+
/* @__PURE__ */ jsxs(Grid, {
|
|
1284
|
+
templateColumns: "repeat(auto-fill, minmax(110px, 1fr))",
|
|
1285
|
+
gap: "8px",
|
|
1286
|
+
mb: "24px",
|
|
1287
|
+
children: [
|
|
1288
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1289
|
+
name: "Default",
|
|
1290
|
+
token: "chan.border",
|
|
1291
|
+
hex: "#242420"
|
|
1292
|
+
}),
|
|
1293
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1294
|
+
name: "Soft",
|
|
1295
|
+
token: "chan.border.soft",
|
|
1296
|
+
hex: "#1a1a18"
|
|
1297
|
+
}),
|
|
1298
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1299
|
+
name: "Sidebar",
|
|
1300
|
+
token: "chan.border.sidebar",
|
|
1301
|
+
hex: "#1e1e1c"
|
|
1302
|
+
})
|
|
1303
|
+
]
|
|
1304
|
+
}),
|
|
1305
|
+
/* @__PURE__ */ jsx(SubHead, { children: "Semantic" }),
|
|
1306
|
+
/* @__PURE__ */ jsxs(Grid, {
|
|
1307
|
+
templateColumns: "repeat(auto-fill, minmax(110px, 1fr))",
|
|
1308
|
+
gap: "8px",
|
|
1309
|
+
mb: "24px",
|
|
1310
|
+
children: [
|
|
1311
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1312
|
+
name: "Green",
|
|
1313
|
+
token: "chan.green",
|
|
1314
|
+
hex: "#3a8c5c"
|
|
1315
|
+
}),
|
|
1316
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1317
|
+
name: "Yellow",
|
|
1318
|
+
token: "chan.yellow",
|
|
1319
|
+
hex: "#a88000"
|
|
1320
|
+
}),
|
|
1321
|
+
/* @__PURE__ */ jsx(Swatch, {
|
|
1322
|
+
name: "Danger",
|
|
1323
|
+
token: "chan.danger",
|
|
1324
|
+
hex: "#d06060"
|
|
1325
|
+
})
|
|
1326
|
+
]
|
|
1327
|
+
})
|
|
1328
|
+
]
|
|
1329
|
+
}),
|
|
1330
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
1331
|
+
mb: "72px",
|
|
1332
|
+
children: [
|
|
1333
|
+
/* @__PURE__ */ jsx(SectionTitle, {
|
|
1334
|
+
id: "02",
|
|
1335
|
+
title: "Typography"
|
|
1336
|
+
}),
|
|
1337
|
+
/* @__PURE__ */ jsx(SubHead, { children: "Barlow Condensed — Display" }),
|
|
1338
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
1339
|
+
bg: "chan.bg.card",
|
|
1340
|
+
border: "1px solid",
|
|
1341
|
+
borderColor: "chan.border",
|
|
1342
|
+
borderRadius: "sm",
|
|
1343
|
+
overflow: "hidden",
|
|
1344
|
+
mb: "8px",
|
|
1345
|
+
children: [
|
|
1346
|
+
/* @__PURE__ */ jsx(TypeRow, {
|
|
1347
|
+
label: "Hero / 900",
|
|
1348
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
1349
|
+
fontFamily: "display",
|
|
1350
|
+
fontWeight: "900",
|
|
1351
|
+
fontSize: "clamp(40px, 7vw, 72px)",
|
|
1352
|
+
textTransform: "uppercase",
|
|
1353
|
+
color: "chan.text",
|
|
1354
|
+
children: "TOOLS THAT RUN"
|
|
1355
|
+
})
|
|
1356
|
+
}),
|
|
1357
|
+
/* @__PURE__ */ jsx(TypeRow, {
|
|
1358
|
+
label: "Title / 800",
|
|
1359
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
1360
|
+
fontFamily: "display",
|
|
1361
|
+
fontWeight: "800",
|
|
1362
|
+
fontSize: "clamp(32px, 5vw, 48px)",
|
|
1363
|
+
textTransform: "uppercase",
|
|
1364
|
+
color: "chan.text",
|
|
1365
|
+
children: "ONE PLACE FOR EVERY TOOL"
|
|
1366
|
+
})
|
|
1367
|
+
}),
|
|
1368
|
+
/* @__PURE__ */ jsx(TypeRow, {
|
|
1369
|
+
label: "Section / 700",
|
|
1370
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
1371
|
+
fontFamily: "display",
|
|
1372
|
+
fontWeight: "700",
|
|
1373
|
+
fontSize: "28px",
|
|
1374
|
+
textTransform: "uppercase",
|
|
1375
|
+
color: "chan.text",
|
|
1376
|
+
children: "Products · Open Source · About"
|
|
1377
|
+
})
|
|
1378
|
+
}),
|
|
1379
|
+
/* @__PURE__ */ jsx(TypeRow, {
|
|
1380
|
+
label: "Card / 700",
|
|
1381
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
1382
|
+
fontFamily: "display",
|
|
1383
|
+
fontWeight: "700",
|
|
1384
|
+
fontSize: "21px",
|
|
1385
|
+
textTransform: "uppercase",
|
|
1386
|
+
color: "chan.text",
|
|
1387
|
+
children: "RESTUNNEL"
|
|
1388
|
+
})
|
|
1389
|
+
}),
|
|
1390
|
+
/* @__PURE__ */ jsx(TypeRow, {
|
|
1391
|
+
label: "Small / 700",
|
|
1392
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
1393
|
+
fontFamily: "display",
|
|
1394
|
+
fontWeight: "700",
|
|
1395
|
+
fontSize: "17px",
|
|
1396
|
+
textTransform: "uppercase",
|
|
1397
|
+
color: "chan.text",
|
|
1398
|
+
children: "MISE-MSVC"
|
|
1399
|
+
})
|
|
1400
|
+
})
|
|
1401
|
+
]
|
|
1402
|
+
}),
|
|
1403
|
+
/* @__PURE__ */ jsx(SubHead, { children: "IBM Plex Mono — Body" }),
|
|
1404
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
1405
|
+
bg: "chan.bg.card",
|
|
1406
|
+
border: "1px solid",
|
|
1407
|
+
borderColor: "chan.border",
|
|
1408
|
+
borderRadius: "sm",
|
|
1409
|
+
overflow: "hidden",
|
|
1410
|
+
mb: "8px",
|
|
1411
|
+
children: [
|
|
1412
|
+
/* @__PURE__ */ jsx(TypeRow, {
|
|
1413
|
+
label: "Body / 400",
|
|
1414
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
1415
|
+
fontFamily: "body",
|
|
1416
|
+
fontWeight: "400",
|
|
1417
|
+
fontSize: "13px",
|
|
1418
|
+
color: "chan.text.dim",
|
|
1419
|
+
children: "We build tools that work, document them, and ship them. No noise. No vaporware."
|
|
1420
|
+
})
|
|
1421
|
+
}),
|
|
1422
|
+
/* @__PURE__ */ jsx(TypeRow, {
|
|
1423
|
+
label: "Small / 400",
|
|
1424
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
1425
|
+
fontFamily: "body",
|
|
1426
|
+
fontWeight: "400",
|
|
1427
|
+
fontSize: "11px",
|
|
1428
|
+
color: "chan.text.dim",
|
|
1429
|
+
children: "Route datacenter traffic through personal devices using Noise Protocol encryption."
|
|
1430
|
+
})
|
|
1431
|
+
}),
|
|
1432
|
+
/* @__PURE__ */ jsx(TypeRow, {
|
|
1433
|
+
label: "Meta / 400",
|
|
1434
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
1435
|
+
fontFamily: "body",
|
|
1436
|
+
fontWeight: "400",
|
|
1437
|
+
fontSize: "10px",
|
|
1438
|
+
color: "chan.text.dim",
|
|
1439
|
+
children: "Hub-and-spoke · SOCKS5 / HTTP proxy output · Residential IP"
|
|
1440
|
+
})
|
|
1441
|
+
}),
|
|
1442
|
+
/* @__PURE__ */ jsx(TypeRow, {
|
|
1443
|
+
label: "Label / 500",
|
|
1444
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
1445
|
+
fontFamily: "body",
|
|
1446
|
+
fontWeight: "500",
|
|
1447
|
+
fontSize: "9px",
|
|
1448
|
+
letterSpacing: "0.15em",
|
|
1449
|
+
textTransform: "uppercase",
|
|
1450
|
+
color: "chan.text.faint",
|
|
1451
|
+
children: "PRODUCT STUDIO · CHIANG MAI · 18°N 98°E"
|
|
1452
|
+
})
|
|
1453
|
+
}),
|
|
1454
|
+
/* @__PURE__ */ jsx(TypeRow, {
|
|
1455
|
+
label: "Light / 300",
|
|
1456
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
1457
|
+
fontFamily: "body",
|
|
1458
|
+
fontWeight: "300",
|
|
1459
|
+
fontSize: "12px",
|
|
1460
|
+
color: "chan.text.dim",
|
|
1461
|
+
children: "Secondary content and supporting metadata."
|
|
1462
|
+
})
|
|
1463
|
+
})
|
|
1464
|
+
]
|
|
1465
|
+
})
|
|
1466
|
+
]
|
|
1467
|
+
}),
|
|
1468
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
1469
|
+
mb: "72px",
|
|
1470
|
+
children: [
|
|
1471
|
+
/* @__PURE__ */ jsx(SectionTitle, {
|
|
1472
|
+
id: "03",
|
|
1473
|
+
title: "Spacing & Layout"
|
|
1474
|
+
}),
|
|
1475
|
+
/* @__PURE__ */ jsx(SubHead, { children: "Spacing Scale (8px grid)" }),
|
|
1476
|
+
/* @__PURE__ */ jsxs(Flex, {
|
|
1477
|
+
direction: "column",
|
|
1478
|
+
gap: "6px",
|
|
1479
|
+
mb: "24px",
|
|
1480
|
+
children: [
|
|
1481
|
+
/* @__PURE__ */ jsx(SpaceRow, {
|
|
1482
|
+
token: "--space-1",
|
|
1483
|
+
px: "4px",
|
|
1484
|
+
use: "Icon gap, tight inline spacing"
|
|
1485
|
+
}),
|
|
1486
|
+
/* @__PURE__ */ jsx(SpaceRow, {
|
|
1487
|
+
token: "--space-2",
|
|
1488
|
+
px: "8px",
|
|
1489
|
+
use: "Badge padding, small gaps"
|
|
1490
|
+
}),
|
|
1491
|
+
/* @__PURE__ */ jsx(SpaceRow, {
|
|
1492
|
+
token: "--space-3",
|
|
1493
|
+
px: "12px",
|
|
1494
|
+
use: "Button padding, nav item gap"
|
|
1495
|
+
}),
|
|
1496
|
+
/* @__PURE__ */ jsx(SpaceRow, {
|
|
1497
|
+
token: "--space-4",
|
|
1498
|
+
px: "16px",
|
|
1499
|
+
use: "Card padding (sm), grid gap"
|
|
1500
|
+
}),
|
|
1501
|
+
/* @__PURE__ */ jsx(SpaceRow, {
|
|
1502
|
+
token: "--space-5",
|
|
1503
|
+
px: "24px",
|
|
1504
|
+
use: "Card padding, sidebar padding"
|
|
1505
|
+
}),
|
|
1506
|
+
/* @__PURE__ */ jsx(SpaceRow, {
|
|
1507
|
+
token: "--space-6",
|
|
1508
|
+
px: "32px",
|
|
1509
|
+
use: "Section element spacing"
|
|
1510
|
+
}),
|
|
1511
|
+
/* @__PURE__ */ jsx(SpaceRow, {
|
|
1512
|
+
token: "--space-7",
|
|
1513
|
+
px: "48px",
|
|
1514
|
+
use: "Section header margin"
|
|
1515
|
+
}),
|
|
1516
|
+
/* @__PURE__ */ jsx(SpaceRow, {
|
|
1517
|
+
token: "--space-8",
|
|
1518
|
+
px: "56px",
|
|
1519
|
+
use: "Section horizontal padding"
|
|
1520
|
+
}),
|
|
1521
|
+
/* @__PURE__ */ jsx(SpaceRow, {
|
|
1522
|
+
token: "--space-9",
|
|
1523
|
+
px: "64px",
|
|
1524
|
+
use: "Hero padding top"
|
|
1525
|
+
}),
|
|
1526
|
+
/* @__PURE__ */ jsx(SpaceRow, {
|
|
1527
|
+
token: "--space-10",
|
|
1528
|
+
px: "72px",
|
|
1529
|
+
use: "Between major chapters"
|
|
1530
|
+
})
|
|
1531
|
+
]
|
|
1532
|
+
}),
|
|
1533
|
+
/* @__PURE__ */ jsx(SubHead, { children: "Border Radius" }),
|
|
1534
|
+
/* @__PURE__ */ jsxs(Flex, {
|
|
1535
|
+
gap: "32px",
|
|
1536
|
+
mb: "24px",
|
|
1537
|
+
children: [
|
|
1538
|
+
/* @__PURE__ */ jsx(RadiusDemo, {
|
|
1539
|
+
label: "--radius-xs",
|
|
1540
|
+
value: "5px"
|
|
1541
|
+
}),
|
|
1542
|
+
/* @__PURE__ */ jsx(RadiusDemo, {
|
|
1543
|
+
label: "--radius-sm",
|
|
1544
|
+
value: "10px"
|
|
1545
|
+
}),
|
|
1546
|
+
/* @__PURE__ */ jsx(RadiusDemo, {
|
|
1547
|
+
label: "--radius-md",
|
|
1548
|
+
value: "18px"
|
|
1549
|
+
})
|
|
1550
|
+
]
|
|
1551
|
+
}),
|
|
1552
|
+
/* @__PURE__ */ jsx(SubHead, { children: "Layout Sizes" }),
|
|
1553
|
+
/* @__PURE__ */ jsx(Box, {
|
|
1554
|
+
bg: "chan.bg.card",
|
|
1555
|
+
border: "1px solid",
|
|
1556
|
+
borderColor: "chan.border",
|
|
1557
|
+
borderRadius: "sm",
|
|
1558
|
+
overflow: "hidden",
|
|
1559
|
+
children: [
|
|
1560
|
+
["Sidebar width", "256px"],
|
|
1561
|
+
["Mobile topbar", "52px"],
|
|
1562
|
+
["Mobile bottom nav", "58px"],
|
|
1563
|
+
["Touch target min", "44px"]
|
|
1564
|
+
].map(([label, value]) => /* @__PURE__ */ jsxs(Flex, {
|
|
1565
|
+
p: "10px 16px",
|
|
1566
|
+
borderBottom: "1px solid",
|
|
1567
|
+
borderColor: "chan.border.soft",
|
|
1568
|
+
justify: "space-between",
|
|
1569
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
1570
|
+
fontSize: "10px",
|
|
1571
|
+
color: "chan.text.dim",
|
|
1572
|
+
children: label
|
|
1573
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
1574
|
+
fontSize: "10px",
|
|
1575
|
+
color: "chan.orange",
|
|
1576
|
+
letterSpacing: "0.06em",
|
|
1577
|
+
children: value
|
|
1578
|
+
})]
|
|
1579
|
+
}, label))
|
|
1580
|
+
})
|
|
1581
|
+
]
|
|
1582
|
+
}),
|
|
1583
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
1584
|
+
mb: "72px",
|
|
1585
|
+
children: [
|
|
1586
|
+
/* @__PURE__ */ jsx(SectionTitle, {
|
|
1587
|
+
id: "04",
|
|
1588
|
+
title: "Components"
|
|
1589
|
+
}),
|
|
1590
|
+
/* @__PURE__ */ jsx(SubHead, { children: "Badges" }),
|
|
1591
|
+
/* @__PURE__ */ jsxs(Flex, {
|
|
1592
|
+
gap: "8px",
|
|
1593
|
+
mb: "24px",
|
|
1594
|
+
flexWrap: "wrap",
|
|
1595
|
+
children: [
|
|
1596
|
+
/* @__PURE__ */ jsx(BadgeDemo, {
|
|
1597
|
+
label: "Active",
|
|
1598
|
+
bg: "chan.orange.bg",
|
|
1599
|
+
color: "chan.orange",
|
|
1600
|
+
borderColor: "chan.orange.border"
|
|
1601
|
+
}),
|
|
1602
|
+
/* @__PURE__ */ jsx(BadgeDemo, {
|
|
1603
|
+
label: "In Dev",
|
|
1604
|
+
bg: "chan.yellow.bg",
|
|
1605
|
+
color: "chan.yellow",
|
|
1606
|
+
borderColor: "chan.yellow.border"
|
|
1607
|
+
}),
|
|
1608
|
+
/* @__PURE__ */ jsx(BadgeDemo, {
|
|
1609
|
+
label: "Planned",
|
|
1610
|
+
bg: "chan.bg.hover.subtle",
|
|
1611
|
+
color: "chan.text.faint",
|
|
1612
|
+
borderColor: "chan.border"
|
|
1613
|
+
}),
|
|
1614
|
+
/* @__PURE__ */ jsx(BadgeDemo, {
|
|
1615
|
+
label: "Stable",
|
|
1616
|
+
bg: "chan.green.bg",
|
|
1617
|
+
color: "chan.green",
|
|
1618
|
+
borderColor: "chan.green.border"
|
|
1619
|
+
})
|
|
1620
|
+
]
|
|
1621
|
+
}),
|
|
1622
|
+
/* @__PURE__ */ jsx(SubHead, { children: "Buttons" }),
|
|
1623
|
+
/* @__PURE__ */ jsxs(Flex, {
|
|
1624
|
+
gap: "8px",
|
|
1625
|
+
mb: "24px",
|
|
1626
|
+
flexWrap: "wrap",
|
|
1627
|
+
children: [
|
|
1628
|
+
/* @__PURE__ */ jsx(ButtonDemo, {
|
|
1629
|
+
label: "Primary",
|
|
1630
|
+
bg: "chan.orange",
|
|
1631
|
+
color: "chan.bg"
|
|
1632
|
+
}),
|
|
1633
|
+
/* @__PURE__ */ jsx(ButtonDemo, {
|
|
1634
|
+
label: "Secondary",
|
|
1635
|
+
bg: "transparent",
|
|
1636
|
+
color: "chan.text",
|
|
1637
|
+
borderColor: "chan.border"
|
|
1638
|
+
}),
|
|
1639
|
+
/* @__PURE__ */ jsx(ButtonDemo, {
|
|
1640
|
+
label: "Ghost",
|
|
1641
|
+
bg: "transparent",
|
|
1642
|
+
color: "chan.orange",
|
|
1643
|
+
borderColor: "chan.orange.border"
|
|
1644
|
+
}),
|
|
1645
|
+
/* @__PURE__ */ jsx(ButtonDemo, {
|
|
1646
|
+
label: "Danger",
|
|
1647
|
+
bg: "chan.danger.bg",
|
|
1648
|
+
color: "chan.danger",
|
|
1649
|
+
borderColor: "chan.danger.border"
|
|
1650
|
+
})
|
|
1651
|
+
]
|
|
1652
|
+
}),
|
|
1653
|
+
/* @__PURE__ */ jsx(SubHead, { children: "Status Indicators" }),
|
|
1654
|
+
/* @__PURE__ */ jsx(Flex, {
|
|
1655
|
+
gap: "8px",
|
|
1656
|
+
mb: "24px",
|
|
1657
|
+
flexWrap: "wrap",
|
|
1658
|
+
children: [
|
|
1659
|
+
{
|
|
1660
|
+
label: "Live",
|
|
1661
|
+
color: "chan.orange",
|
|
1662
|
+
bg: "chan.orange.bg",
|
|
1663
|
+
border: "chan.orange.border"
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
label: "Operational",
|
|
1667
|
+
color: "chan.green",
|
|
1668
|
+
bg: "chan.green.bg",
|
|
1669
|
+
border: "chan.green.border"
|
|
1670
|
+
},
|
|
1671
|
+
{
|
|
1672
|
+
label: "Degraded",
|
|
1673
|
+
color: "chan.yellow",
|
|
1674
|
+
bg: "chan.yellow.bg",
|
|
1675
|
+
border: "chan.yellow.border"
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
label: "Offline",
|
|
1679
|
+
color: "chan.text.faint",
|
|
1680
|
+
bg: "chan.bg.hover.subtle",
|
|
1681
|
+
border: "chan.border"
|
|
1682
|
+
}
|
|
1683
|
+
].map((s) => /* @__PURE__ */ jsxs(Flex, {
|
|
1684
|
+
align: "center",
|
|
1685
|
+
gap: "7px",
|
|
1686
|
+
p: "5px 12px",
|
|
1687
|
+
borderRadius: "3px",
|
|
1688
|
+
fontSize: "9px",
|
|
1689
|
+
letterSpacing: "0.12em",
|
|
1690
|
+
textTransform: "uppercase",
|
|
1691
|
+
border: "1px solid",
|
|
1692
|
+
borderColor: s.border,
|
|
1693
|
+
bg: s.bg,
|
|
1694
|
+
color: s.color,
|
|
1695
|
+
children: [/* @__PURE__ */ jsx(Box, {
|
|
1696
|
+
w: "5px",
|
|
1697
|
+
h: "5px",
|
|
1698
|
+
borderRadius: "full",
|
|
1699
|
+
bg: s.color
|
|
1700
|
+
}), s.label]
|
|
1701
|
+
}, s.label))
|
|
1702
|
+
})
|
|
1703
|
+
]
|
|
1704
|
+
}),
|
|
1705
|
+
/* @__PURE__ */ jsxs(Flex, {
|
|
1706
|
+
pt: "40px",
|
|
1707
|
+
borderTop: "1px solid",
|
|
1708
|
+
borderColor: "chan.border",
|
|
1709
|
+
justify: "space-between",
|
|
1710
|
+
align: "center",
|
|
1711
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
1712
|
+
fontSize: "9px",
|
|
1713
|
+
letterSpacing: "0.12em",
|
|
1714
|
+
color: "chan.text.faint",
|
|
1715
|
+
children: "@chan.run/design token showcase"
|
|
1716
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
1717
|
+
fontSize: "9px",
|
|
1718
|
+
letterSpacing: "0.12em",
|
|
1719
|
+
color: "chan.orange",
|
|
1720
|
+
children: "chan.run"
|
|
1721
|
+
})]
|
|
1722
|
+
})
|
|
1723
|
+
]
|
|
1724
|
+
});
|
|
1725
|
+
}
|
|
1726
|
+
const system = createSystem(defaultConfig, defineConfig({
|
|
1727
|
+
globalCss: { body: {
|
|
1728
|
+
bg: "{colors.chan.bg}",
|
|
1729
|
+
color: "{colors.chan.text}",
|
|
1730
|
+
fontFamily: "{fonts.body}"
|
|
1731
|
+
} },
|
|
1732
|
+
theme: {
|
|
1733
|
+
tokens: {
|
|
1734
|
+
colors: {
|
|
1735
|
+
"chan.palette.dark.bg": { value: "#0a0a08" },
|
|
1736
|
+
"chan.palette.dark.bg.soft": { value: "#111110" },
|
|
1737
|
+
"chan.palette.dark.bg.card": { value: "#161614" },
|
|
1738
|
+
"chan.palette.dark.bg.code": { value: "#131311" },
|
|
1739
|
+
"chan.palette.dark.bg.hover": { value: "#1d1d1a" },
|
|
1740
|
+
"chan.palette.dark.bg.sidebar": { value: "#0f0f0d" },
|
|
1741
|
+
"chan.palette.dark.border": { value: "#242420" },
|
|
1742
|
+
"chan.palette.dark.border.soft": { value: "#1a1a18" },
|
|
1743
|
+
"chan.palette.dark.border.sidebar": { value: "#1e1e1c" },
|
|
1744
|
+
"chan.palette.dark.text": { value: "#f0ece4" },
|
|
1745
|
+
"chan.palette.dark.text.dim": { value: "color-mix(in srgb, #f0ece4 50%, transparent)" },
|
|
1746
|
+
"chan.palette.dark.text.faint": { value: "color-mix(in srgb, #f0ece4 30%, transparent)" },
|
|
1747
|
+
"chan.palette.dark.bg.hover.subtle": { value: "rgba(255, 255, 255, 0.03)" },
|
|
1748
|
+
"chan.palette.light.bg": { value: "#fafaf7" },
|
|
1749
|
+
"chan.palette.light.bg.soft": { value: "#f3f1ec" },
|
|
1750
|
+
"chan.palette.light.bg.card": { value: "#ebe8e1" },
|
|
1751
|
+
"chan.palette.light.bg.code": { value: "#efece4" },
|
|
1752
|
+
"chan.palette.light.bg.hover": { value: "#e2ded5" },
|
|
1753
|
+
"chan.palette.light.bg.sidebar": { value: "#f5f3ed" },
|
|
1754
|
+
"chan.palette.light.border": { value: "#d5d1c6" },
|
|
1755
|
+
"chan.palette.light.border.soft": { value: "#e2ded4" },
|
|
1756
|
+
"chan.palette.light.border.sidebar": { value: "#dcd8cd" },
|
|
1757
|
+
"chan.palette.light.text": { value: "#1a1a16" },
|
|
1758
|
+
"chan.palette.light.text.dim": { value: "color-mix(in srgb, #1a1a16 60%, transparent)" },
|
|
1759
|
+
"chan.palette.light.text.faint": { value: "color-mix(in srgb, #1a1a16 40%, transparent)" },
|
|
1760
|
+
"chan.palette.light.bg.hover.subtle": { value: "rgba(0, 0, 0, 0.04)" },
|
|
1761
|
+
"chan.orange": { value: "#ff4d00" },
|
|
1762
|
+
"chan.orange.dim": { value: "#cc3d00" },
|
|
1763
|
+
"chan.orange.glow": { value: "#ff6a2a" },
|
|
1764
|
+
"chan.orange.bg": { value: "rgba(255, 77, 0, 0.08)" },
|
|
1765
|
+
"chan.orange.border": { value: "rgba(255, 77, 0, 0.20)" },
|
|
1766
|
+
"chan.green": { value: "#3a8c5c" },
|
|
1767
|
+
"chan.green.bg": { value: "rgba(58, 140, 92, 0.08)" },
|
|
1768
|
+
"chan.green.border": { value: "rgba(58, 140, 92, 0.20)" },
|
|
1769
|
+
"chan.yellow": { value: "#a88000" },
|
|
1770
|
+
"chan.yellow.bg": { value: "rgba(200, 160, 0, 0.07)" },
|
|
1771
|
+
"chan.yellow.border": { value: "rgba(200, 160, 0, 0.15)" },
|
|
1772
|
+
"chan.danger": { value: "#d06060" },
|
|
1773
|
+
"chan.danger.bg": { value: "rgba(180, 40, 40, 0.12)" },
|
|
1774
|
+
"chan.danger.border": { value: "rgba(180, 40, 40, 0.20)" },
|
|
1775
|
+
"chan.orange.glow.bg": { value: "rgba(255, 77, 0, 0.06)" }
|
|
1776
|
+
},
|
|
1777
|
+
fonts: {
|
|
1778
|
+
display: { value: "'Barlow Condensed', sans-serif" },
|
|
1779
|
+
body: { value: "'IBM Plex Mono', monospace" }
|
|
1780
|
+
},
|
|
1781
|
+
radii: {
|
|
1782
|
+
xs: { value: "5px" },
|
|
1783
|
+
sm: { value: "10px" },
|
|
1784
|
+
md: { value: "18px" }
|
|
1785
|
+
},
|
|
1786
|
+
spacing: {
|
|
1787
|
+
1: { value: "4px" },
|
|
1788
|
+
2: { value: "8px" },
|
|
1789
|
+
3: { value: "12px" },
|
|
1790
|
+
4: { value: "16px" },
|
|
1791
|
+
5: { value: "24px" },
|
|
1792
|
+
6: { value: "32px" },
|
|
1793
|
+
7: { value: "48px" },
|
|
1794
|
+
8: { value: "56px" },
|
|
1795
|
+
9: { value: "64px" },
|
|
1796
|
+
10: { value: "72px" }
|
|
1797
|
+
},
|
|
1798
|
+
sizes: {
|
|
1799
|
+
sidebar: { value: "256px" },
|
|
1800
|
+
topbar: { value: "52px" },
|
|
1801
|
+
bottomNav: { value: "58px" },
|
|
1802
|
+
touchTarget: { value: "44px" },
|
|
1803
|
+
docsContent: { value: "768px" },
|
|
1804
|
+
docsLayout: { value: "1080px" },
|
|
1805
|
+
toc: { value: "200px" }
|
|
1806
|
+
},
|
|
1807
|
+
easings: { cinematic: { value: "cubic-bezier(0.16, 1, 0.3, 1)" } },
|
|
1808
|
+
animations: { "chan-pulse": { value: "chan-pulse 2.5s ease-in-out infinite" } }
|
|
1809
|
+
},
|
|
1810
|
+
keyframes: {
|
|
1811
|
+
"chan-pulse": {
|
|
1812
|
+
"0%, 100%": { opacity: .35 },
|
|
1813
|
+
"50%": { opacity: 1 }
|
|
1814
|
+
},
|
|
1815
|
+
"line-draw": { to: { width: "65%" } },
|
|
1816
|
+
"border-sweep": {
|
|
1817
|
+
"0%": {
|
|
1818
|
+
opacity: 0,
|
|
1819
|
+
backgroundPositionX: "0%"
|
|
1820
|
+
},
|
|
1821
|
+
"15%": { opacity: 1 },
|
|
1822
|
+
"100%": {
|
|
1823
|
+
opacity: 1,
|
|
1824
|
+
backgroundPositionX: "50%"
|
|
1825
|
+
}
|
|
1826
|
+
},
|
|
1827
|
+
"clip-up": { to: {
|
|
1828
|
+
opacity: 1,
|
|
1829
|
+
transform: "translateY(0)"
|
|
1830
|
+
} },
|
|
1831
|
+
"fade-up": { to: {
|
|
1832
|
+
opacity: 1,
|
|
1833
|
+
transform: "translateY(0)"
|
|
1834
|
+
} }
|
|
1835
|
+
},
|
|
1836
|
+
textStyles: {
|
|
1837
|
+
"chan.wordmark": { value: {
|
|
1838
|
+
fontFamily: "{fonts.display}",
|
|
1839
|
+
fontWeight: 800,
|
|
1840
|
+
letterSpacing: "0.05em",
|
|
1841
|
+
textTransform: "uppercase",
|
|
1842
|
+
lineHeight: 1
|
|
1843
|
+
} },
|
|
1844
|
+
"chan.label": { value: {
|
|
1845
|
+
fontFamily: "{fonts.body}",
|
|
1846
|
+
fontSize: "8px",
|
|
1847
|
+
letterSpacing: "0.12em",
|
|
1848
|
+
textTransform: "uppercase"
|
|
1849
|
+
} },
|
|
1850
|
+
"chan.nav": { value: {
|
|
1851
|
+
fontFamily: "{fonts.body}",
|
|
1852
|
+
fontSize: "10.5px",
|
|
1853
|
+
letterSpacing: "0.07em",
|
|
1854
|
+
textTransform: "uppercase",
|
|
1855
|
+
fontWeight: 500
|
|
1856
|
+
} },
|
|
1857
|
+
"chan.navGroup": { value: {
|
|
1858
|
+
fontFamily: "{fonts.body}",
|
|
1859
|
+
fontSize: "7.5px",
|
|
1860
|
+
letterSpacing: "0.22em",
|
|
1861
|
+
textTransform: "uppercase"
|
|
1862
|
+
} }
|
|
1863
|
+
},
|
|
1864
|
+
slotRecipes: { splash: defineSlotRecipe({
|
|
1865
|
+
className: "chan-splash",
|
|
1866
|
+
slots: [
|
|
1867
|
+
"root",
|
|
1868
|
+
"panelStart",
|
|
1869
|
+
"panelEnd",
|
|
1870
|
+
"hub"
|
|
1871
|
+
],
|
|
1872
|
+
base: {
|
|
1873
|
+
root: {
|
|
1874
|
+
position: "fixed",
|
|
1875
|
+
inset: 0,
|
|
1876
|
+
display: "flex",
|
|
1877
|
+
zIndex: 1e4
|
|
1878
|
+
},
|
|
1879
|
+
panelStart: {
|
|
1880
|
+
flex: 1,
|
|
1881
|
+
position: "relative",
|
|
1882
|
+
bg: "chan.bg.soft",
|
|
1883
|
+
transitionProperty: "top, left",
|
|
1884
|
+
transitionTimingFunction: "ease-in-out"
|
|
1885
|
+
},
|
|
1886
|
+
panelEnd: {
|
|
1887
|
+
flex: 1,
|
|
1888
|
+
position: "relative",
|
|
1889
|
+
bg: "chan.bg.soft",
|
|
1890
|
+
transitionProperty: "bottom, right",
|
|
1891
|
+
transitionTimingFunction: "ease-in-out"
|
|
1892
|
+
},
|
|
1893
|
+
hub: {
|
|
1894
|
+
position: "absolute",
|
|
1895
|
+
bg: "chan.bg.card",
|
|
1896
|
+
border: "1px solid",
|
|
1897
|
+
borderColor: "chan.border",
|
|
1898
|
+
borderRadius: "md",
|
|
1899
|
+
display: "flex",
|
|
1900
|
+
alignItems: "center",
|
|
1901
|
+
justifyContent: "center",
|
|
1902
|
+
zIndex: 1,
|
|
1903
|
+
width: "var(--splash-hub-w)"
|
|
1904
|
+
}
|
|
1905
|
+
},
|
|
1906
|
+
variants: {
|
|
1907
|
+
orientation: {
|
|
1908
|
+
vertical: {
|
|
1909
|
+
root: { flexDirection: "column" },
|
|
1910
|
+
panelStart: {
|
|
1911
|
+
borderBottom: "2px solid",
|
|
1912
|
+
borderColor: "chan.border"
|
|
1913
|
+
},
|
|
1914
|
+
panelEnd: {
|
|
1915
|
+
borderTop: "2px solid",
|
|
1916
|
+
borderColor: "chan.border"
|
|
1917
|
+
},
|
|
1918
|
+
hub: {
|
|
1919
|
+
bottom: 0,
|
|
1920
|
+
left: "50%",
|
|
1921
|
+
transform: "translate(-50%, 50%)"
|
|
1922
|
+
}
|
|
1923
|
+
},
|
|
1924
|
+
horizontal: {
|
|
1925
|
+
root: { flexDirection: "row" },
|
|
1926
|
+
panelStart: {
|
|
1927
|
+
borderRight: "2px solid",
|
|
1928
|
+
borderColor: "chan.border"
|
|
1929
|
+
},
|
|
1930
|
+
panelEnd: {
|
|
1931
|
+
borderLeft: "2px solid",
|
|
1932
|
+
borderColor: "chan.border"
|
|
1933
|
+
},
|
|
1934
|
+
hub: {
|
|
1935
|
+
right: 0,
|
|
1936
|
+
top: "50%",
|
|
1937
|
+
transform: "translate(50%, -50%)"
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
},
|
|
1941
|
+
size: {
|
|
1942
|
+
sm: { hub: {
|
|
1943
|
+
"--splash-hub-w": "180px",
|
|
1944
|
+
px: 4,
|
|
1945
|
+
py: 3
|
|
1946
|
+
} },
|
|
1947
|
+
md: { hub: {
|
|
1948
|
+
"--splash-hub-w": "240px",
|
|
1949
|
+
px: 5,
|
|
1950
|
+
py: 4
|
|
1951
|
+
} },
|
|
1952
|
+
lg: { hub: {
|
|
1953
|
+
"--splash-hub-w": "320px",
|
|
1954
|
+
px: 6,
|
|
1955
|
+
py: 5
|
|
1956
|
+
} }
|
|
1957
|
+
}
|
|
1958
|
+
},
|
|
1959
|
+
defaultVariants: {
|
|
1960
|
+
orientation: "vertical",
|
|
1961
|
+
size: "md"
|
|
1962
|
+
}
|
|
1963
|
+
}) },
|
|
1964
|
+
semanticTokens: { colors: {
|
|
1965
|
+
"chan.bg": { value: {
|
|
1966
|
+
_light: "{colors.chan.palette.light.bg}",
|
|
1967
|
+
_dark: "{colors.chan.palette.dark.bg}"
|
|
1968
|
+
} },
|
|
1969
|
+
"chan.bg.soft": { value: {
|
|
1970
|
+
_light: "{colors.chan.palette.light.bg.soft}",
|
|
1971
|
+
_dark: "{colors.chan.palette.dark.bg.soft}"
|
|
1972
|
+
} },
|
|
1973
|
+
"chan.bg.card": { value: {
|
|
1974
|
+
_light: "{colors.chan.palette.light.bg.card}",
|
|
1975
|
+
_dark: "{colors.chan.palette.dark.bg.card}"
|
|
1976
|
+
} },
|
|
1977
|
+
"chan.bg.code": { value: {
|
|
1978
|
+
_light: "{colors.chan.palette.light.bg.code}",
|
|
1979
|
+
_dark: "{colors.chan.palette.dark.bg.code}"
|
|
1980
|
+
} },
|
|
1981
|
+
"chan.bg.hover": { value: {
|
|
1982
|
+
_light: "{colors.chan.palette.light.bg.hover}",
|
|
1983
|
+
_dark: "{colors.chan.palette.dark.bg.hover}"
|
|
1984
|
+
} },
|
|
1985
|
+
"chan.bg.sidebar": { value: {
|
|
1986
|
+
_light: "{colors.chan.palette.light.bg.sidebar}",
|
|
1987
|
+
_dark: "{colors.chan.palette.dark.bg.sidebar}"
|
|
1988
|
+
} },
|
|
1989
|
+
"chan.bg.hover.subtle": { value: {
|
|
1990
|
+
_light: "{colors.chan.palette.light.bg.hover.subtle}",
|
|
1991
|
+
_dark: "{colors.chan.palette.dark.bg.hover.subtle}"
|
|
1992
|
+
} },
|
|
1993
|
+
"chan.border": { value: {
|
|
1994
|
+
_light: "{colors.chan.palette.light.border}",
|
|
1995
|
+
_dark: "{colors.chan.palette.dark.border}"
|
|
1996
|
+
} },
|
|
1997
|
+
"chan.border.soft": { value: {
|
|
1998
|
+
_light: "{colors.chan.palette.light.border.soft}",
|
|
1999
|
+
_dark: "{colors.chan.palette.dark.border.soft}"
|
|
2000
|
+
} },
|
|
2001
|
+
"chan.border.sidebar": { value: {
|
|
2002
|
+
_light: "{colors.chan.palette.light.border.sidebar}",
|
|
2003
|
+
_dark: "{colors.chan.palette.dark.border.sidebar}"
|
|
2004
|
+
} },
|
|
2005
|
+
"chan.text": { value: {
|
|
2006
|
+
_light: "{colors.chan.palette.light.text}",
|
|
2007
|
+
_dark: "{colors.chan.palette.dark.text}"
|
|
2008
|
+
} },
|
|
2009
|
+
"chan.text.dim": { value: {
|
|
2010
|
+
_light: "{colors.chan.palette.light.text.dim}",
|
|
2011
|
+
_dark: "{colors.chan.palette.dark.text.dim}"
|
|
2012
|
+
} },
|
|
2013
|
+
"chan.text.faint": { value: {
|
|
2014
|
+
_light: "{colors.chan.palette.light.text.faint}",
|
|
2015
|
+
_dark: "{colors.chan.palette.dark.text.faint}"
|
|
2016
|
+
} },
|
|
2017
|
+
bg: {
|
|
2018
|
+
DEFAULT: { value: "{colors.chan.bg}" },
|
|
2019
|
+
subtle: { value: "{colors.chan.bg.soft}" },
|
|
2020
|
+
muted: { value: "{colors.chan.bg.card}" }
|
|
2021
|
+
},
|
|
2022
|
+
fg: {
|
|
2023
|
+
DEFAULT: { value: "{colors.chan.text}" },
|
|
2024
|
+
muted: { value: "{colors.chan.text.dim}" },
|
|
2025
|
+
subtle: { value: "{colors.chan.text.faint}" }
|
|
2026
|
+
},
|
|
2027
|
+
border: {
|
|
2028
|
+
DEFAULT: { value: "{colors.chan.border}" },
|
|
2029
|
+
muted: { value: "{colors.chan.border.soft}" }
|
|
2030
|
+
}
|
|
2031
|
+
} }
|
|
2032
|
+
}
|
|
2033
|
+
}));
|
|
2034
|
+
//#endregion
|
|
2035
|
+
export { ColorModeButton, DeckCard, SlideControls, SlideLayoutComponent as SlideLayout, SlideViewer, Splash, TokenShowcase, Topbar, Wordmark, getSlideComponents, system };
|