@still-void/ui 1.1.1 → 2.0.1
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/CHANGELOG.md +18 -0
- package/README.md +77 -29
- package/dist/react/client/index.cjs +492 -3
- package/dist/react/client/index.cjs.map +1 -1
- package/dist/react/client/index.d.cts +141 -7
- package/dist/react/client/index.d.ts +141 -7
- package/dist/react/client/index.js +434 -3
- package/dist/react/client/index.js.map +1 -1
- package/dist/react/index.cjs +467 -2
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +401 -23
- package/dist/react/index.d.ts +401 -23
- package/dist/react/index.js +387 -1
- package/dist/react/index.js.map +1 -1
- package/package.json +19 -24
- package/dist/article-Dl8rGW5l.d.cts +0 -177
- package/dist/article-Dl8rGW5l.d.ts +0 -177
- package/dist/index.cjs +0 -639
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -248
- package/dist/index.d.ts +0 -248
- package/dist/index.js +0 -551
- package/dist/index.js.map +0 -1
package/dist/react/index.js
CHANGED
|
@@ -154,8 +154,52 @@ var accents = {
|
|
|
154
154
|
mint: "oklch(0.78 0.10 160)",
|
|
155
155
|
amber: "oklch(0.78 0.12 75)"
|
|
156
156
|
};
|
|
157
|
+
var accentsInk = {
|
|
158
|
+
dark: {
|
|
159
|
+
cyan: "oklch(0.78 0.12 210)",
|
|
160
|
+
violet: "oklch(0.72 0.14 295)",
|
|
161
|
+
mint: "oklch(0.78 0.10 160)",
|
|
162
|
+
amber: "oklch(0.78 0.12 75)"
|
|
163
|
+
},
|
|
164
|
+
light: {
|
|
165
|
+
cyan: "oklch(0.525 0.09 210)",
|
|
166
|
+
violet: "oklch(0.545 0.14 295)",
|
|
167
|
+
mint: "oklch(0.52 0.1 160)",
|
|
168
|
+
amber: "oklch(0.535 0.11 75)"
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
var semantic = {
|
|
172
|
+
dark: {
|
|
173
|
+
danger: "oklch(0.68 0.19 25)",
|
|
174
|
+
success: "oklch(0.75 0.15 150)",
|
|
175
|
+
info: "oklch(0.78 0.12 210)",
|
|
176
|
+
warning: "oklch(0.78 0.12 75)"
|
|
177
|
+
},
|
|
178
|
+
light: {
|
|
179
|
+
danger: "oklch(0.68 0.19 25)",
|
|
180
|
+
success: "oklch(0.75 0.15 150)",
|
|
181
|
+
info: "oklch(0.78 0.12 210)",
|
|
182
|
+
warning: "oklch(0.78 0.12 75)"
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
var semanticInk = {
|
|
186
|
+
dark: {
|
|
187
|
+
danger: "oklch(0.68 0.19 25)",
|
|
188
|
+
success: "oklch(0.75 0.15 150)",
|
|
189
|
+
info: "oklch(0.78 0.12 210)",
|
|
190
|
+
warning: "oklch(0.78 0.12 75)"
|
|
191
|
+
},
|
|
192
|
+
light: {
|
|
193
|
+
danger: "oklch(0.555 0.19 25)",
|
|
194
|
+
success: "oklch(0.515 0.14 150)",
|
|
195
|
+
info: "oklch(0.525 0.09 210)",
|
|
196
|
+
warning: "oklch(0.535 0.11 75)"
|
|
197
|
+
}
|
|
198
|
+
};
|
|
157
199
|
var themeModes = Object.keys(colors);
|
|
158
200
|
var accentNames = Object.keys(accents);
|
|
201
|
+
var DEFAULT_MODE = "dark";
|
|
202
|
+
var DEFAULT_ACCENT = "cyan";
|
|
159
203
|
|
|
160
204
|
// src/tokens/categories.ts
|
|
161
205
|
var defaultCategoryColors = {
|
|
@@ -292,6 +336,23 @@ var calloutLabels = {
|
|
|
292
336
|
warn: "Warn",
|
|
293
337
|
aha: "Aha!"
|
|
294
338
|
};
|
|
339
|
+
function tableOfContents() {
|
|
340
|
+
return "sv-toc";
|
|
341
|
+
}
|
|
342
|
+
function tocLink(options = {}) {
|
|
343
|
+
return cx(
|
|
344
|
+
"sv-toc__link",
|
|
345
|
+
options.active && "sv-toc__link--active",
|
|
346
|
+
options.depth === 3 && "sv-toc__link--depth-3"
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
function readingProgress() {
|
|
350
|
+
return "sv-reading-progress";
|
|
351
|
+
}
|
|
352
|
+
var readingProgressClasses = {
|
|
353
|
+
bar: "sv-reading-progress__bar"
|
|
354
|
+
};
|
|
355
|
+
var READING_PROGRESS_VAR = "--sv-reading-progress";
|
|
295
356
|
function articleHeader() {
|
|
296
357
|
return "sv-article-header";
|
|
297
358
|
}
|
|
@@ -376,25 +437,350 @@ function ThemeScript({ storageKey = DEFAULT_STORAGE_KEY, nonce } = {}) {
|
|
|
376
437
|
const script = `(function(){try{var s=JSON.parse(localStorage.getItem(${key})||"null");if(!s)return;var m=${modes},a=${accents2},r=document.documentElement;if(m.indexOf(s.mode)!==-1)r.setAttribute("data-theme",s.mode);if(a.indexOf(s.accent)!==-1)r.setAttribute("data-accent",s.accent);}catch(e){}})();`;
|
|
377
438
|
return /* @__PURE__ */ jsx4("script", { nonce, dangerouslySetInnerHTML: { __html: script } });
|
|
378
439
|
}
|
|
440
|
+
|
|
441
|
+
// src/components/ui/button.tsx
|
|
442
|
+
import * as React from "react";
|
|
443
|
+
|
|
444
|
+
// src/lib/utils.ts
|
|
445
|
+
import { clsx } from "clsx";
|
|
446
|
+
import { twMerge } from "tailwind-merge";
|
|
447
|
+
function cn(...inputs) {
|
|
448
|
+
return twMerge(clsx(inputs));
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// src/components/ui/button.tsx
|
|
452
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
453
|
+
var Button = React.forwardRef(
|
|
454
|
+
({ className, variant = "default", size = "default", ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
455
|
+
"button",
|
|
456
|
+
{
|
|
457
|
+
className: cn(
|
|
458
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
459
|
+
variant === "default" && "bg-sv-surface text-sv-text hover:bg-sv-surface-2",
|
|
460
|
+
variant === "destructive" && "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
461
|
+
variant === "outline" && "border border-sv-border bg-background hover:bg-sv-surface hover:text-accent",
|
|
462
|
+
variant === "secondary" && "bg-sv-surface-2 text-sv-text hover:bg-sv-surface",
|
|
463
|
+
variant === "ghost" && "hover:bg-sv-surface hover:text-sv-text",
|
|
464
|
+
variant === "link" && "text-accent underline-offset-4 hover:underline",
|
|
465
|
+
size === "default" && "h-10 px-4 py-2",
|
|
466
|
+
size === "sm" && "h-9 rounded-md px-3 text-sm",
|
|
467
|
+
size === "lg" && "h-11 rounded-md px-8",
|
|
468
|
+
size === "icon" && "h-10 w-10",
|
|
469
|
+
className
|
|
470
|
+
),
|
|
471
|
+
ref,
|
|
472
|
+
...props
|
|
473
|
+
}
|
|
474
|
+
)
|
|
475
|
+
);
|
|
476
|
+
Button.displayName = "Button";
|
|
477
|
+
|
|
478
|
+
// src/components/ui/card.tsx
|
|
479
|
+
import * as React2 from "react";
|
|
480
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
481
|
+
var Card = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
482
|
+
"div",
|
|
483
|
+
{
|
|
484
|
+
ref,
|
|
485
|
+
className: cn(
|
|
486
|
+
"rounded-lg border border-sv-border bg-sv-surface text-sv-text",
|
|
487
|
+
className
|
|
488
|
+
),
|
|
489
|
+
...props
|
|
490
|
+
}
|
|
491
|
+
));
|
|
492
|
+
Card.displayName = "Card";
|
|
493
|
+
var CardHeader = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
494
|
+
"div",
|
|
495
|
+
{
|
|
496
|
+
ref,
|
|
497
|
+
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
498
|
+
...props
|
|
499
|
+
}
|
|
500
|
+
));
|
|
501
|
+
CardHeader.displayName = "CardHeader";
|
|
502
|
+
var CardTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
503
|
+
"h2",
|
|
504
|
+
{
|
|
505
|
+
ref,
|
|
506
|
+
className: cn(
|
|
507
|
+
"text-2xl font-semibold leading-none tracking-tight",
|
|
508
|
+
className
|
|
509
|
+
),
|
|
510
|
+
...props
|
|
511
|
+
}
|
|
512
|
+
));
|
|
513
|
+
CardTitle.displayName = "CardTitle";
|
|
514
|
+
var CardDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
515
|
+
"p",
|
|
516
|
+
{
|
|
517
|
+
ref,
|
|
518
|
+
className: cn("text-sm text-sv-text-2", className),
|
|
519
|
+
...props
|
|
520
|
+
}
|
|
521
|
+
));
|
|
522
|
+
CardDescription.displayName = "CardDescription";
|
|
523
|
+
var CardContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
524
|
+
CardContent.displayName = "CardContent";
|
|
525
|
+
var CardFooter = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
526
|
+
"div",
|
|
527
|
+
{
|
|
528
|
+
ref,
|
|
529
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
530
|
+
...props
|
|
531
|
+
}
|
|
532
|
+
));
|
|
533
|
+
CardFooter.displayName = "CardFooter";
|
|
534
|
+
|
|
535
|
+
// src/components/ui/alert.tsx
|
|
536
|
+
import * as React3 from "react";
|
|
537
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
538
|
+
var Alert = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
539
|
+
"div",
|
|
540
|
+
{
|
|
541
|
+
ref,
|
|
542
|
+
className: cn(
|
|
543
|
+
"relative w-full rounded-lg border border-sv-border bg-sv-surface p-4 text-sv-text [&>svg~*]:pl-7 [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-sv-text",
|
|
544
|
+
className
|
|
545
|
+
),
|
|
546
|
+
role: "alert",
|
|
547
|
+
...props
|
|
548
|
+
}
|
|
549
|
+
));
|
|
550
|
+
Alert.displayName = "Alert";
|
|
551
|
+
var AlertTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
552
|
+
"h5",
|
|
553
|
+
{
|
|
554
|
+
ref,
|
|
555
|
+
className: cn("mb-1 font-medium leading-tight tracking-tight", className),
|
|
556
|
+
...props
|
|
557
|
+
}
|
|
558
|
+
));
|
|
559
|
+
AlertTitle.displayName = "AlertTitle";
|
|
560
|
+
var AlertDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
561
|
+
"div",
|
|
562
|
+
{
|
|
563
|
+
ref,
|
|
564
|
+
className: cn("text-sm text-sv-text-2 [&_p]:leading-relaxed", className),
|
|
565
|
+
...props
|
|
566
|
+
}
|
|
567
|
+
));
|
|
568
|
+
AlertDescription.displayName = "AlertDescription";
|
|
569
|
+
|
|
570
|
+
// src/components/ui/badge.tsx
|
|
571
|
+
import "react";
|
|
572
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
573
|
+
function Badge({ className, variant = "default", ...props }) {
|
|
574
|
+
return /* @__PURE__ */ jsx8(
|
|
575
|
+
"div",
|
|
576
|
+
{
|
|
577
|
+
className: cn(
|
|
578
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
579
|
+
variant === "default" && "border-transparent bg-sv-signal-cyan text-sv-bg",
|
|
580
|
+
variant === "secondary" && "border-transparent bg-sv-surface-2 text-sv-text hover:bg-sv-surface",
|
|
581
|
+
variant === "destructive" && "border-transparent bg-red-500 text-white hover:bg-red-600",
|
|
582
|
+
variant === "outline" && "text-sv-text border-sv-border",
|
|
583
|
+
className
|
|
584
|
+
),
|
|
585
|
+
...props
|
|
586
|
+
}
|
|
587
|
+
);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
// src/components/ui/input.tsx
|
|
591
|
+
import * as React5 from "react";
|
|
592
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
593
|
+
var Input = React5.forwardRef(
|
|
594
|
+
({ className, type, ...props }, ref) => /* @__PURE__ */ jsx9(
|
|
595
|
+
"input",
|
|
596
|
+
{
|
|
597
|
+
type,
|
|
598
|
+
className: cn(
|
|
599
|
+
"flex h-10 w-full rounded-md border border-sv-border bg-sv-surface px-3 py-2 text-sm text-sv-text placeholder:text-sv-text-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
600
|
+
className
|
|
601
|
+
),
|
|
602
|
+
ref,
|
|
603
|
+
...props
|
|
604
|
+
}
|
|
605
|
+
)
|
|
606
|
+
);
|
|
607
|
+
Input.displayName = "Input";
|
|
608
|
+
|
|
609
|
+
// src/tokens/typography.ts
|
|
610
|
+
var fontFamilies = {
|
|
611
|
+
display: "'Sora', ui-sans-serif, system-ui, sans-serif",
|
|
612
|
+
body: "'Manrope', ui-sans-serif, system-ui, sans-serif",
|
|
613
|
+
mono: "'JetBrains Mono', ui-monospace, 'SF Mono', monospace"
|
|
614
|
+
};
|
|
615
|
+
var fontWeights = {
|
|
616
|
+
regular: 400,
|
|
617
|
+
medium: 500,
|
|
618
|
+
semibold: 600,
|
|
619
|
+
bold: 700
|
|
620
|
+
};
|
|
621
|
+
var fontSizes = {
|
|
622
|
+
xs: "0.75rem",
|
|
623
|
+
// 12px — meta, pills
|
|
624
|
+
sm: "0.8125rem",
|
|
625
|
+
// 13px — captions, code
|
|
626
|
+
base: "0.9375rem",
|
|
627
|
+
// 15px — body
|
|
628
|
+
md: "1rem",
|
|
629
|
+
// 16px — lead paragraphs
|
|
630
|
+
lg: "1.125rem",
|
|
631
|
+
// 18px — article lead
|
|
632
|
+
xl: "1.375rem",
|
|
633
|
+
// 22px — card titles, h3
|
|
634
|
+
"2xl": "1.75rem",
|
|
635
|
+
// 28px — h2
|
|
636
|
+
"3xl": "2.25rem",
|
|
637
|
+
// 36px — article title
|
|
638
|
+
"4xl": "2.75rem"
|
|
639
|
+
// 44px — hero display
|
|
640
|
+
};
|
|
641
|
+
var lineHeights = {
|
|
642
|
+
tight: 1.15,
|
|
643
|
+
snug: 1.3,
|
|
644
|
+
normal: 1.5,
|
|
645
|
+
relaxed: 1.7
|
|
646
|
+
};
|
|
647
|
+
var letterSpacings = {
|
|
648
|
+
display: "-0.02em",
|
|
649
|
+
normal: "0",
|
|
650
|
+
wide: "0.08em"
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
// src/tokens/spacing.ts
|
|
654
|
+
var spacing = {
|
|
655
|
+
1: "4px",
|
|
656
|
+
2: "8px",
|
|
657
|
+
3: "12px",
|
|
658
|
+
4: "16px",
|
|
659
|
+
5: "20px",
|
|
660
|
+
6: "24px",
|
|
661
|
+
8: "32px",
|
|
662
|
+
10: "40px",
|
|
663
|
+
12: "48px",
|
|
664
|
+
14: "56px",
|
|
665
|
+
16: "64px",
|
|
666
|
+
18: "72px"
|
|
667
|
+
};
|
|
668
|
+
var radii = {
|
|
669
|
+
sm: "6px",
|
|
670
|
+
md: "8px",
|
|
671
|
+
lg: "12px",
|
|
672
|
+
xl: "16px",
|
|
673
|
+
full: "9999px"
|
|
674
|
+
};
|
|
675
|
+
|
|
676
|
+
// src/tokens/motion.ts
|
|
677
|
+
var easings = {
|
|
678
|
+
hover: "cubic-bezier(.3,.7,.4,1)",
|
|
679
|
+
linear: "linear"
|
|
680
|
+
};
|
|
681
|
+
var durations = {
|
|
682
|
+
fast: "120ms",
|
|
683
|
+
base: "200ms",
|
|
684
|
+
slow: "320ms"
|
|
685
|
+
};
|
|
686
|
+
|
|
687
|
+
// src/tokens/zIndex.ts
|
|
688
|
+
var zIndex = {
|
|
689
|
+
dropdown: 10,
|
|
690
|
+
sticky: 20,
|
|
691
|
+
backdrop: 30,
|
|
692
|
+
modal: 40,
|
|
693
|
+
toast: 50,
|
|
694
|
+
tooltip: 60
|
|
695
|
+
};
|
|
379
696
|
export {
|
|
697
|
+
Alert,
|
|
698
|
+
AlertDescription,
|
|
699
|
+
AlertTitle,
|
|
380
700
|
ArticleHeader,
|
|
701
|
+
Badge,
|
|
702
|
+
Button,
|
|
381
703
|
Callout,
|
|
704
|
+
Card,
|
|
705
|
+
CardContent,
|
|
706
|
+
CardDescription,
|
|
707
|
+
CardFooter,
|
|
708
|
+
CardHeader,
|
|
382
709
|
CardSkeleton,
|
|
710
|
+
CardTitle,
|
|
383
711
|
CategoryPill,
|
|
384
712
|
CodeBlock,
|
|
713
|
+
DEFAULT_ACCENT,
|
|
714
|
+
DEFAULT_MODE,
|
|
385
715
|
FeaturedPostCard,
|
|
386
716
|
Footer,
|
|
387
717
|
Header,
|
|
388
718
|
Hero,
|
|
719
|
+
Input,
|
|
389
720
|
Layout,
|
|
390
721
|
Lead,
|
|
391
722
|
Logo,
|
|
392
723
|
PostCard,
|
|
393
724
|
PostGrid,
|
|
394
725
|
Prose,
|
|
726
|
+
READING_PROGRESS_VAR,
|
|
395
727
|
Sidebar,
|
|
396
728
|
SidebarSection,
|
|
397
729
|
Skeleton,
|
|
398
|
-
ThemeScript
|
|
730
|
+
ThemeScript,
|
|
731
|
+
accentNames,
|
|
732
|
+
accents,
|
|
733
|
+
accentsInk,
|
|
734
|
+
articleHeader,
|
|
735
|
+
articleHeaderClasses,
|
|
736
|
+
callout,
|
|
737
|
+
calloutClasses,
|
|
738
|
+
calloutLabels,
|
|
739
|
+
cardSkeleton,
|
|
740
|
+
categoryPill,
|
|
741
|
+
categoryPillClasses,
|
|
742
|
+
codeBlock,
|
|
743
|
+
codeBlockClasses,
|
|
744
|
+
colors,
|
|
745
|
+
cx,
|
|
746
|
+
defaultCategoryColors,
|
|
747
|
+
durations,
|
|
748
|
+
easings,
|
|
749
|
+
featuredPostCard,
|
|
750
|
+
featuredPostCardClasses,
|
|
751
|
+
fontFamilies,
|
|
752
|
+
fontSizes,
|
|
753
|
+
fontWeights,
|
|
754
|
+
footer,
|
|
755
|
+
footerClasses,
|
|
756
|
+
header,
|
|
757
|
+
headerClasses,
|
|
758
|
+
hero,
|
|
759
|
+
heroClasses,
|
|
760
|
+
layout,
|
|
761
|
+
letterSpacings,
|
|
762
|
+
lineHeights,
|
|
763
|
+
logo,
|
|
764
|
+
logoClasses,
|
|
765
|
+
postCard,
|
|
766
|
+
postCardClasses,
|
|
767
|
+
postGrid,
|
|
768
|
+
prose,
|
|
769
|
+
proseClasses,
|
|
770
|
+
radii,
|
|
771
|
+
readingProgress,
|
|
772
|
+
readingProgressClasses,
|
|
773
|
+
resolveAccentColor,
|
|
774
|
+
resolveCategoryColor,
|
|
775
|
+
semantic,
|
|
776
|
+
semanticInk,
|
|
777
|
+
sidebar,
|
|
778
|
+
sidebarClasses,
|
|
779
|
+
skeletonLine,
|
|
780
|
+
spacing,
|
|
781
|
+
tableOfContents,
|
|
782
|
+
themeModes,
|
|
783
|
+
tocLink,
|
|
784
|
+
zIndex
|
|
399
785
|
};
|
|
400
786
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/recipes/cx.ts","../../src/recipes/shell.ts","../../src/react/components/Shell.tsx","../../src/recipes/content.ts","../../src/tokens/colors.ts","../../src/tokens/categories.ts","../../src/react/components/Content.tsx","../../src/recipes/article.ts","../../src/react/components/Article.tsx","../../src/behaviors/themeManager.ts","../../src/react/components/ThemeScript.tsx"],"sourcesContent":["/** Minimal class-name joiner. Falsy values are dropped. */\nexport function cx(...parts: Array<string | false | null | undefined>): string {\n return parts.filter(Boolean).join(' ');\n}\n","import { cx } from './cx';\n\n/**\n * Shell recipes: Header, Logo, Footer.\n * Recipes are pure functions returning class strings — no DOM, no framework.\n * Safe in Next.js Server Components; usable via [class] in Angular, :class in Vue.\n */\n\nexport interface HeaderOptions {\n /** Frosted glass background (sticky headers). */\n glass?: boolean;\n}\n\nexport function header(options: HeaderOptions = {}): string {\n return cx('sv-header', options.glass !== false && 'sv-glass');\n}\n\nexport const headerClasses = {\n nav: 'sv-header__nav',\n link: 'sv-header__link',\n linkActive: cx('sv-header__link', 'sv-header__link--active'),\n actions: 'sv-header__actions',\n} as const;\n\nexport function logo(): string {\n return 'sv-logo';\n}\n\nexport const logoClasses = {\n dot: 'sv-logo__dot',\n} as const;\n\nexport function footer(): string {\n return 'sv-footer';\n}\n\nexport const footerClasses = {\n links: 'sv-footer__links',\n link: 'sv-footer__link',\n} as const;\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport { cx } from '../../recipes/cx';\nimport { footer, footerClasses, header, headerClasses, logo, logoClasses } from '../../recipes/shell';\nimport type { NavItem } from '../../types';\n\n/*\n * Shell components are Server Component safe: no hooks, no browser APIs.\n * Interactivity (theme toggle) is composed in via the `actions` slot —\n * pass <ThemeToggle /> from '@still-void/ui/react/client'.\n */\n\nexport interface LogoProps extends ComponentPropsWithoutRef<'a'> {\n label: string;\n href?: string;\n}\n\nexport function Logo({ label, href = '/', className, ...rest }: LogoProps) {\n return (\n <a href={href} className={cx(logo(), className)} {...rest}>\n <span className={logoClasses.dot} aria-hidden=\"true\" />\n {label}\n </a>\n );\n}\n\nexport interface HeaderProps extends ComponentPropsWithoutRef<'header'> {\n /** Usually a <Logo />. */\n logo?: ReactNode;\n items?: NavItem[];\n /** Right-side slot — theme toggle, search, etc. */\n actions?: ReactNode;\n /** Frosted glass background (default true). */\n glass?: boolean;\n}\n\nexport function Header({ logo: logoSlot, items = [], actions, glass, className, ...rest }: HeaderProps) {\n return (\n <header className={cx(header({ glass }), className)} {...rest}>\n {logoSlot}\n {items.length > 0 && (\n <nav className={headerClasses.nav}>\n {items.map((item) => (\n <a\n key={item.href}\n href={item.href}\n className={item.active ? headerClasses.linkActive : headerClasses.link}\n aria-current={item.active ? 'page' : undefined}\n >\n {item.label}\n </a>\n ))}\n </nav>\n )}\n {actions && <div className={headerClasses.actions}>{actions}</div>}\n </header>\n );\n}\n\nexport interface FooterProps extends ComponentPropsWithoutRef<'footer'> {\n author?: string;\n links?: NavItem[];\n children?: ReactNode;\n}\n\nexport function Footer({ author, links = [], children, className, ...rest }: FooterProps) {\n return (\n <footer className={cx(footer(), className)} {...rest}>\n {author && <span>{author}</span>}\n {links.length > 0 && (\n <div className={footerClasses.links}>\n {links.map((link) => (\n <a key={link.href} href={link.href} className={footerClasses.link}>\n {link.label}\n </a>\n ))}\n </div>\n )}\n {children}\n </footer>\n );\n}\n","import { cx } from './cx';\n\n/**\n * Content recipes: CategoryPill, PostCard, FeaturedPostCard, PostGrid,\n * Sidebar, Hero, Skeleton. Pure functions — Server Component safe.\n */\n\nexport interface CategoryPillOptions {\n interactive?: boolean;\n active?: boolean;\n}\n\nexport function categoryPill(options: CategoryPillOptions = {}): string {\n return cx(\n 'sv-pill',\n options.interactive && 'sv-pill--interactive',\n options.active && 'sv-pill--active',\n );\n}\n\nexport const categoryPillClasses = {\n dot: 'sv-pill__dot',\n} as const;\n\nexport interface PostCardOptions {\n dense?: boolean;\n hover?: boolean;\n}\n\nexport function postCard(options: PostCardOptions = {}): string {\n return cx(\n 'sv-post-card',\n options.dense && 'sv-post-card--dense',\n options.hover !== false && 'sv-card-hover',\n );\n}\n\nexport const postCardClasses = {\n meta: 'sv-post-card__meta',\n title: 'sv-post-card__title',\n excerpt: 'sv-post-card__excerpt',\n} as const;\n\nexport function featuredPostCard(): string {\n return cx('sv-featured-card', 'sv-gradient-border', 'sv-card-hover');\n}\n\nexport const featuredPostCardClasses = {\n body: 'sv-featured-card__body',\n title: 'sv-featured-card__title',\n visual: 'sv-featured-card__visual',\n} as const;\n\nexport function postGrid(): string {\n return 'sv-post-grid';\n}\n\nexport interface LayoutOptions {\n withSidebar?: boolean;\n}\n\nexport function layout(options: LayoutOptions = {}): string {\n return cx('sv-layout', options.withSidebar && 'sv-layout--with-sidebar');\n}\n\nexport function sidebar(): string {\n return 'sv-sidebar';\n}\n\nexport const sidebarClasses = {\n sectionTitle: 'sv-sidebar__section-title',\n} as const;\n\nexport function hero(): string {\n return 'sv-hero';\n}\n\nexport const heroClasses = {\n eyebrow: 'sv-hero__eyebrow',\n title: 'sv-hero__title',\n description: 'sv-hero__description',\n} as const;\n\nexport interface SkeletonOptions {\n small?: boolean;\n}\n\nexport function skeletonLine(options: SkeletonOptions = {}): string {\n return cx('sv-skeleton', 'sv-skeleton-line', options.small && 'sv-skeleton-line--sm');\n}\n\nexport function cardSkeleton(): string {\n return 'sv-card-skeleton';\n}\n","/**\n * Still Void color tokens.\n * Values ported literally from the Still Void spec (blog.kalleopinheiro.dev).\n * Do not round or \"approximate\" — fidelity rule.\n */\nexport const colors = {\n dark: {\n bg: '#0A0A0C',\n bgElev: '#111114',\n surface: '#16161B',\n surface2: '#1C1C22',\n border: 'rgba(255,255,255,0.08)',\n borderStrong: 'rgba(255,255,255,0.14)',\n text: '#EDEDF0',\n text2: '#8B8B96',\n // Corrected from #5A5A66 (~2.6:1 on surface) to meet WCAG AA 4.5:1 — text3 is used for\n // real copy (metadata, TOC links), not decoration, so it must be readable, not just muted.\n text3: '#83838F',\n },\n light: {\n bg: '#F7F7F5',\n bgElev: '#FFFFFF',\n surface: '#FFFFFF',\n surface2: '#F2F2EF',\n border: 'rgba(0,0,0,0.08)',\n borderStrong: 'rgba(0,0,0,0.14)',\n text: '#16161B',\n text2: '#5A5A66',\n // Corrected from #8B8B96 (~3.1:1 on white) to meet WCAG AA 4.5:1, same reasoning as dark.\n // A further step from #6F6F78 to #6D6D76: the first fix cleared white/paper (≥4.7:1) but\n // was only ~4.44:1 against surface2 (#F2F2EF), the darkest of the light surfaces — still a\n // failure. Verified against bg/bgElev/surface/surface2 together, not just one background.\n text3: '#6D6D76',\n },\n} as const;\n\nexport const accents = {\n cyan: 'oklch(0.78 0.12 210)',\n violet: 'oklch(0.72 0.14 295)',\n mint: 'oklch(0.78 0.10 160)',\n amber: 'oklch(0.78 0.12 75)',\n} as const;\n\n/**\n * Text/UI-safe accent variants (\"ink\"). `accents` above is tuned for surface use\n * (dots, gradient border, progress bar) and fails WCAG AA as text on light\n * backgrounds (e.g. cyan is ~1.8:1 on white). These preserve the dark-mode\n * values (already ≥6.9:1) and darken each hue for light mode to clear 4.5:1\n * against both light surfaces. Used anywhere the accent colors text: prose\n * links, active TOC state, callout labels, hero eyebrow, copy-success, focus ring.\n */\nexport const accentsInk = {\n dark: {\n cyan: 'oklch(0.78 0.12 210)',\n violet: 'oklch(0.72 0.14 295)',\n mint: 'oklch(0.78 0.10 160)',\n amber: 'oklch(0.78 0.12 75)',\n },\n light: {\n cyan: 'oklch(0.525 0.09 210)',\n violet: 'oklch(0.545 0.14 295)',\n mint: 'oklch(0.52 0.1 160)',\n amber: 'oklch(0.535 0.11 75)',\n },\n} as const;\n\n/**\n * Semantic state colors — independent of the switchable `accent`, so a\n * consumer picking `data-accent=\"amber\"` never collides a warning with the\n * site accent. Fixed per meaning in both surface and text/UI (\"ink\") forms,\n * same split as `accents`/`accentsInk`.\n */\nexport const semantic = {\n dark: {\n danger: 'oklch(0.68 0.19 25)',\n success: 'oklch(0.75 0.15 150)',\n info: 'oklch(0.78 0.12 210)',\n warning: 'oklch(0.78 0.12 75)',\n },\n light: {\n danger: 'oklch(0.68 0.19 25)',\n success: 'oklch(0.75 0.15 150)',\n info: 'oklch(0.78 0.12 210)',\n warning: 'oklch(0.78 0.12 75)',\n },\n} as const;\n\nexport const semanticInk = {\n dark: {\n danger: 'oklch(0.68 0.19 25)',\n success: 'oklch(0.75 0.15 150)',\n info: 'oklch(0.78 0.12 210)',\n warning: 'oklch(0.78 0.12 75)',\n },\n light: {\n danger: 'oklch(0.555 0.19 25)',\n success: 'oklch(0.515 0.14 150)',\n info: 'oklch(0.525 0.09 210)',\n warning: 'oklch(0.535 0.11 75)',\n },\n} as const;\n\nexport type ThemeMode = keyof typeof colors;\nexport type AccentName = keyof typeof accents;\nexport type ColorScheme = (typeof colors)[ThemeMode];\nexport type SemanticName = keyof (typeof semantic)['dark'];\n\nexport const themeModes = Object.keys(colors) as ThemeMode[];\nexport const accentNames = Object.keys(accents) as AccentName[];\n\nexport const DEFAULT_MODE: ThemeMode = 'dark';\nexport const DEFAULT_ACCENT: AccentName = 'cyan';\n","import { accents, type AccentName } from './colors';\n\n/**\n * Blog categories from the prototype. Categories render as a colored dot + label\n * (never an emoji). The pill also accepts any CSS color for whitelabel use.\n */\nexport type CategoryName = 'ia' | 'prompt' | 'dev' | 'arch' | 'ts';\n\nexport const defaultCategoryColors: Record<CategoryName, AccentName> = {\n ia: 'violet',\n prompt: 'amber',\n dev: 'mint',\n arch: 'cyan',\n ts: 'cyan',\n};\n\nconst hasOwn = <T extends object>(obj: T, key: string): key is Extract<keyof T, string> =>\n Object.prototype.hasOwnProperty.call(obj, key);\n\n/** Resolve an accent name or raw CSS color to a CSS color value. */\nexport function resolveAccentColor(color: AccentName | (string & {})): string {\n return hasOwn(accents, color) ? accents[color] : color;\n}\n\n/** Resolve a category name, accent name, or raw CSS color to a CSS color value. */\nexport function resolveCategoryColor(\n color: CategoryName | AccentName | (string & {}),\n): string {\n if (hasOwn(defaultCategoryColors, color)) {\n return accents[defaultCategoryColors[color]];\n }\n return resolveAccentColor(color);\n}\n","import type { ComponentPropsWithoutRef, CSSProperties, ReactNode } from 'react';\nimport { cx } from '../../recipes/cx';\nimport {\n cardSkeleton,\n categoryPill,\n categoryPillClasses,\n featuredPostCard,\n featuredPostCardClasses,\n hero,\n heroClasses,\n layout,\n postCard,\n postCardClasses,\n postGrid,\n sidebar,\n sidebarClasses,\n skeletonLine,\n} from '../../recipes/content';\nimport { resolveCategoryColor } from '../../tokens/categories';\nimport type { PostSummary } from '../../types';\n\n/* All components in this file are Server Component safe. */\n\ninterface CategoryPillBaseProps {\n label: string;\n /** Accent name ('cyan'), category name ('ia'), or any CSS color. */\n color?: string;\n active?: boolean;\n}\n\nexport type CategoryPillProps =\n | (CategoryPillBaseProps & { interactive: true } & Omit<\n ComponentPropsWithoutRef<'button'>,\n 'color'\n >)\n | (CategoryPillBaseProps & { interactive?: false } & Omit<\n ComponentPropsWithoutRef<'span'>,\n 'color'\n >);\n\n/**\n * Categories render as a colored dot + label. When `interactive`, this is a\n * real <button> (toggle semantics via `aria-pressed`) — a `<span>` with a\n * pointer cursor is not operable by keyboard or assistive tech.\n */\nexport function CategoryPill({ label, color, active, interactive, className, style, ...rest }: CategoryPillProps) {\n const pillStyle: CSSProperties | undefined = color\n ? ({ ...style, '--sv-pill-color': resolveCategoryColor(color) } as CSSProperties)\n : style;\n const content = (\n <>\n <span className={categoryPillClasses.dot} aria-hidden=\"true\" />\n {label}\n </>\n );\n\n if (interactive) {\n return (\n <button\n type=\"button\"\n aria-pressed={active ?? false}\n className={cx(categoryPill({ active, interactive }), className)}\n style={pillStyle}\n {...(rest as ComponentPropsWithoutRef<'button'>)}\n >\n {content}\n </button>\n );\n }\n\n return (\n <span\n className={cx(categoryPill({ active, interactive }), className)}\n style={pillStyle}\n {...(rest as ComponentPropsWithoutRef<'span'>)}\n >\n {content}\n </span>\n );\n}\n\nfunction PostMeta({ post }: { post: PostSummary }) {\n if (!post.category && !post.date && post.readMinutes === undefined) return null;\n return (\n <div className={postCardClasses.meta}>\n {post.category && <CategoryPill label={post.category.label} color={post.category.color} />}\n {post.date && <span>{post.date}</span>}\n {post.readMinutes !== undefined && <span>{post.readMinutes} min</span>}\n </div>\n );\n}\n\nexport interface PostCardProps extends ComponentPropsWithoutRef<'article'> {\n post: PostSummary;\n dense?: boolean;\n}\n\nexport function PostCard({ post, dense, className, children, ...rest }: PostCardProps) {\n return (\n <article className={cx(postCard({ dense }), className)} {...rest}>\n <PostMeta post={post} />\n <h3 className={postCardClasses.title}>\n <a href={post.href}>{post.title}</a>\n </h3>\n {!dense && post.excerpt && <p className={postCardClasses.excerpt}>{post.excerpt}</p>}\n {children}\n </article>\n );\n}\n\nexport interface FeaturedPostCardProps extends ComponentPropsWithoutRef<'article'> {\n post: PostSummary;\n /** Custom visual slot (illustration, image). */\n visual?: ReactNode;\n}\n\nexport function FeaturedPostCard({ post, visual, className, children, ...rest }: FeaturedPostCardProps) {\n return (\n <article className={cx(featuredPostCard(), className)} {...rest}>\n <div className={featuredPostCardClasses.body}>\n <PostMeta post={post} />\n <h2 className={featuredPostCardClasses.title}>\n <a href={post.href}>{post.title}</a>\n </h2>\n {post.excerpt && <p className={postCardClasses.excerpt}>{post.excerpt}</p>}\n {children}\n </div>\n {visual && <div className={featuredPostCardClasses.visual}>{visual}</div>}\n </article>\n );\n}\n\nexport interface PostGridProps extends ComponentPropsWithoutRef<'div'> {}\n\nexport function PostGrid({ className, ...rest }: PostGridProps) {\n return <div className={cx(postGrid(), className)} {...rest} />;\n}\n\nexport interface LayoutProps extends ComponentPropsWithoutRef<'div'> {\n withSidebar?: boolean;\n}\n\nexport function Layout({ withSidebar, className, ...rest }: LayoutProps) {\n return <div className={cx(layout({ withSidebar }), className)} {...rest} />;\n}\n\nexport interface SidebarProps extends ComponentPropsWithoutRef<'aside'> {}\n\nexport function Sidebar({ className, ...rest }: SidebarProps) {\n return <aside className={cx(sidebar(), className)} {...rest} />;\n}\n\nexport interface SidebarSectionProps extends ComponentPropsWithoutRef<'section'> {\n title: string;\n}\n\nexport function SidebarSection({ title, children, ...rest }: SidebarSectionProps) {\n return (\n <section {...rest}>\n <h4 className={sidebarClasses.sectionTitle}>{title}</h4>\n {children}\n </section>\n );\n}\n\nexport interface HeroProps extends ComponentPropsWithoutRef<'section'> {\n eyebrow?: string;\n title: string;\n description?: string;\n}\n\nexport function Hero({ eyebrow, title, description, className, children, ...rest }: HeroProps) {\n return (\n <section className={cx(hero(), className)} {...rest}>\n {eyebrow && <span className={heroClasses.eyebrow}>{eyebrow}</span>}\n <h1 className={heroClasses.title}>{title}</h1>\n {description && <p className={heroClasses.description}>{description}</p>}\n {children}\n </section>\n );\n}\n\nexport interface SkeletonProps extends ComponentPropsWithoutRef<'div'> {\n small?: boolean;\n}\n\nexport function Skeleton({ small, className, ...rest }: SkeletonProps) {\n return <div className={cx(skeletonLine({ small }), className)} aria-hidden=\"true\" {...rest} />;\n}\n\nexport function CardSkeleton({ className, ...rest }: ComponentPropsWithoutRef<'div'>) {\n return (\n <div className={cx(cardSkeleton(), className)} aria-hidden=\"true\" {...rest}>\n <Skeleton small />\n <Skeleton />\n <Skeleton />\n </div>\n );\n}\n","import { cx } from './cx';\n\n/**\n * Article recipes: CodeBlock, Callout, TableOfContents, ReadingProgress,\n * ArticleHeader, Prose. Pure functions — Server Component safe.\n */\n\nexport function codeBlock(): string {\n return 'sv-code-block';\n}\n\nexport const codeBlockClasses = {\n header: 'sv-code-block__header',\n pre: 'sv-code-block__pre',\n copy: 'sv-code-block__copy',\n copyCopied: cx('sv-code-block__copy', 'sv-code-block__copy--copied'),\n} as const;\n\nexport type CalloutKind = 'note' | 'warn' | 'aha';\n\nexport function callout(kind: CalloutKind): string {\n return cx('sv-callout', `sv-callout--${kind}`);\n}\n\nexport const calloutClasses = {\n label: 'sv-callout__label',\n} as const;\n\nexport const calloutLabels: Record<CalloutKind, string> = {\n note: 'Note',\n warn: 'Warn',\n aha: 'Aha!',\n};\n\nexport function tableOfContents(): string {\n return 'sv-toc';\n}\n\nexport interface TocLinkOptions {\n active?: boolean;\n /** Heading depth, 2 (h2) or 3 (h3). Depth 3 indents. */\n depth?: 2 | 3;\n}\n\nexport function tocLink(options: TocLinkOptions = {}): string {\n return cx(\n 'sv-toc__link',\n options.active && 'sv-toc__link--active',\n options.depth === 3 && 'sv-toc__link--depth-3',\n );\n}\n\nexport function readingProgress(): string {\n return 'sv-reading-progress';\n}\n\nexport const readingProgressClasses = {\n bar: 'sv-reading-progress__bar',\n} as const;\n\n/** CSS var read by `.sv-reading-progress__bar` (0 → 1). */\nexport const READING_PROGRESS_VAR = '--sv-reading-progress';\n\nexport function articleHeader(): string {\n return 'sv-article-header';\n}\n\nexport const articleHeaderClasses = {\n title: 'sv-article-header__title',\n meta: 'sv-article-header__meta',\n author: 'sv-article-header__author',\n} as const;\n\nexport function prose(): string {\n return 'sv-prose';\n}\n\nexport const proseClasses = {\n lead: 'sv-prose__lead',\n} as const;\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport { cx } from '../../recipes/cx';\nimport {\n articleHeader,\n articleHeaderClasses,\n callout,\n calloutClasses,\n calloutLabels,\n codeBlock,\n codeBlockClasses,\n prose,\n proseClasses,\n type CalloutKind,\n} from '../../recipes/article';\n\n/*\n * Article components are Server Component safe.\n * Interactive pieces (copy button, scroll spy) live in the client entry\n * and are composed in via slots.\n */\n\nexport interface CodeBlockProps extends ComponentPropsWithoutRef<'figure'> {\n /** Raw source shown when `rendered` is absent. */\n code: string;\n language?: string;\n filename?: string;\n /**\n * Pre-highlighted markup (e.g. Shiki output rendered on the server).\n * The prototype's regex tokenizer was demo-only and is intentionally\n * not part of the library.\n */\n rendered?: ReactNode;\n /** Header slot — pass <CopyButton code={code} /> from the client entry. */\n actions?: ReactNode;\n}\n\nexport function CodeBlock({\n code,\n language,\n filename,\n rendered,\n actions,\n className,\n ...rest\n}: CodeBlockProps) {\n return (\n <figure className={cx(codeBlock(), className)} {...rest}>\n <figcaption className={codeBlockClasses.header}>\n <span>{filename ?? language ?? 'code'}</span>\n {actions}\n </figcaption>\n <pre className={codeBlockClasses.pre}>\n {rendered ?? <code>{code}</code>}\n </pre>\n </figure>\n );\n}\n\nexport interface CalloutProps extends ComponentPropsWithoutRef<'aside'> {\n kind: CalloutKind;\n /** Override the default kind label. */\n label?: string;\n}\n\nexport function Callout({ kind, label, className, children, ...rest }: CalloutProps) {\n return (\n <aside className={cx(callout(kind), className)} {...rest}>\n <span className={calloutClasses.label}>{label ?? calloutLabels[kind]}</span>\n <div>{children}</div>\n </aside>\n );\n}\n\nexport interface ArticleHeaderProps extends ComponentPropsWithoutRef<'header'> {\n title: string;\n author?: string;\n date?: string;\n readMinutes?: number;\n /** Slot above the title — usually a <CategoryPill />. */\n eyebrow?: ReactNode;\n}\n\nexport function ArticleHeader({\n title,\n author,\n date,\n readMinutes,\n eyebrow,\n className,\n ...rest\n}: ArticleHeaderProps) {\n return (\n <header className={cx(articleHeader(), className)} {...rest}>\n {eyebrow}\n <h1 className={articleHeaderClasses.title}>{title}</h1>\n {(author || date || readMinutes !== undefined) && (\n <div className={articleHeaderClasses.meta}>\n {author && <span className={articleHeaderClasses.author}>{author}</span>}\n {date && <span>{date}</span>}\n {readMinutes !== undefined && <span>{readMinutes} min</span>}\n </div>\n )}\n </header>\n );\n}\n\nexport interface ProseProps extends ComponentPropsWithoutRef<'div'> {}\n\n/** Typography wrapper for article/MDX content. */\nexport function Prose({ className, ...rest }: ProseProps) {\n return <div className={cx(prose(), className)} {...rest} />;\n}\n\nexport interface LeadProps extends ComponentPropsWithoutRef<'p'> {}\n\n/** Lead paragraph inside <Prose>. */\nexport function Lead({ className, ...rest }: LeadProps) {\n return <p className={cx(proseClasses.lead, className)} {...rest} />;\n}\n","import {\n DEFAULT_ACCENT,\n DEFAULT_MODE,\n accentNames,\n themeModes,\n type AccentName,\n type ThemeMode,\n} from '../tokens/colors';\n\nexport interface ThemeState {\n mode: ThemeMode;\n accent: AccentName;\n}\n\nexport interface ThemeManagerOptions {\n /** Element receiving data-theme / data-accent. Defaults to <html>. */\n root?: HTMLElement;\n defaultMode?: ThemeMode;\n defaultAccent?: AccentName;\n /** localStorage key. Pass null to disable persistence. */\n storageKey?: string | null;\n}\n\nexport interface ThemeManager {\n getState: () => ThemeState;\n setMode: (mode: ThemeMode) => void;\n setAccent: (accent: AccentName) => void;\n toggleMode: () => void;\n subscribe: (listener: (state: ThemeState) => void) => () => void;\n destroy: () => void;\n}\n\nexport const DEFAULT_STORAGE_KEY = 'still-void-theme';\n\nfunction isMode(value: unknown): value is ThemeMode {\n return themeModes.includes(value as ThemeMode);\n}\n\nfunction isAccent(value: unknown): value is AccentName {\n return accentNames.includes(value as AccentName);\n}\n\nfunction readStorage(key: string): Partial<ThemeState> {\n try {\n const raw = window.localStorage.getItem(key);\n if (!raw) return {};\n const parsed: unknown = JSON.parse(raw);\n if (typeof parsed !== 'object' || parsed === null) return {};\n const { mode, accent } = parsed as Record<string, unknown>;\n return {\n ...(isMode(mode) ? { mode } : {}),\n ...(isAccent(accent) ? { accent } : {}),\n };\n } catch {\n return {};\n }\n}\n\n/**\n * Framework-agnostic theme controller. Applies `data-theme` and `data-accent`\n * attributes; theme.css does the rest via CSS vars. If the server already\n * rendered the attributes (RSC/SSR), those win over defaults, so there is\n * no flash of wrong theme.\n */\nexport function createThemeManager(options: ThemeManagerOptions = {}): ThemeManager {\n const root = options.root ?? document.documentElement;\n const storageKey = options.storageKey === null ? null : (options.storageKey ?? DEFAULT_STORAGE_KEY);\n\n const ssrMode = root.getAttribute('data-theme');\n const ssrAccent = root.getAttribute('data-accent');\n const stored = storageKey ? readStorage(storageKey) : {};\n\n let state: ThemeState = {\n mode: stored.mode ?? (isMode(ssrMode) ? ssrMode : (options.defaultMode ?? DEFAULT_MODE)),\n accent:\n stored.accent ?? (isAccent(ssrAccent) ? ssrAccent : (options.defaultAccent ?? DEFAULT_ACCENT)),\n };\n\n const listeners = new Set<(state: ThemeState) => void>();\n\n function apply(): void {\n root.setAttribute('data-theme', state.mode);\n root.setAttribute('data-accent', state.accent);\n if (storageKey) {\n try {\n window.localStorage.setItem(storageKey, JSON.stringify(state));\n } catch {\n // storage unavailable (private mode, quota) — theme still applies\n }\n }\n for (const listener of listeners) listener(state);\n }\n\n apply();\n\n return {\n getState: () => state,\n setMode(mode) {\n state = { ...state, mode };\n apply();\n },\n setAccent(accent) {\n state = { ...state, accent };\n apply();\n },\n toggleMode() {\n state = { ...state, mode: state.mode === 'dark' ? 'light' : 'dark' };\n apply();\n },\n subscribe(listener) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n destroy() {\n listeners.clear();\n },\n };\n}\n","import { DEFAULT_STORAGE_KEY } from '../../behaviors/themeManager';\nimport { accentNames, themeModes } from '../../tokens/colors';\n\nexport interface ThemeScriptProps {\n /** Must match the `storageKey` passed to `<ThemeProvider>` (or `createThemeManager`). */\n storageKey?: string;\n /** CSP nonce forwarded to the inline `<script>`. */\n nonce?: string;\n}\n\n/**\n * Render once, as early as possible in `<head>` or right after `<html>` opens\n * (before the rest of the document): a blocking inline script that applies a\n * stored theme preference to `<html>` before first paint.\n *\n * Without this, the first paint uses whatever `data-theme`/`data-accent` the\n * server rendered — `<ThemeProvider>` only reconciles localStorage on mount,\n * so a returning visitor who chose light mode sees a dark flash until\n * hydration. This component is server-safe (no hooks, no browser APIs at\n * render time) and can be composed inside `<html>` from a Server Component.\n */\n/**\n * `JSON.stringify` doesn't escape `<`, so a value containing `</script>`\n * (e.g. a `storageKey` derived from user input) would close the real\n * `<script>` tag early and let whatever follows run as raw HTML — a classic\n * JSON-in-script-tag XSS. `<` is a valid JS string escape the parser\n * decodes back to `<` at runtime, so this is purely a serialization-time\n * fix with no effect on the parsed value.\n */\nfunction toScriptLiteral(value: unknown): string {\n return JSON.stringify(value).replace(/</g, '\\\\u003c');\n}\n\nexport function ThemeScript({ storageKey = DEFAULT_STORAGE_KEY, nonce }: ThemeScriptProps = {}) {\n const modes = toScriptLiteral(themeModes);\n const accents = toScriptLiteral(accentNames);\n const key = toScriptLiteral(storageKey);\n\n const script = `(function(){try{var s=JSON.parse(localStorage.getItem(${key})||\"null\");if(!s)return;var m=${modes},a=${accents},r=document.documentElement;if(m.indexOf(s.mode)!==-1)r.setAttribute(\"data-theme\",s.mode);if(a.indexOf(s.accent)!==-1)r.setAttribute(\"data-accent\",s.accent);}catch(e){}})();`;\n\n // eslint-disable-next-line react/no-danger\n return <script nonce={nonce} dangerouslySetInnerHTML={{ __html: script }} />;\n}\n"],"mappings":";AACO,SAAS,MAAM,OAAyD;AAC7E,SAAO,MAAM,OAAO,OAAO,EAAE,KAAK,GAAG;AACvC;;;ACUO,SAAS,OAAO,UAAyB,CAAC,GAAW;AAC1D,SAAO,GAAG,aA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KAChD,UAAU,QAAQ,gBAAgB,WAClC,gBAAAC,MAAC,SAAI,WAAW,qBAAqB,MAClC;AAAA,gBAAU,gBAAAD,KAAC,UAAK,WAAW,qBAAqB,QAAS,kBAAO;AAAA,MAChE,QAAQ,gBAAAA,KAAC,UAAM,gBAAK;AAAA,MACpB,gBAAgB,UAAa,gBAAAC,MAAC,UAAM;AAAA;AAAA,QAAY;AAAA,SAAI;AAAA,OACvD;AAAA,KAEJ;AAEJ;AAKO,SAAS,MAAM,EAAE,WAAW,GAAG,KAAK,GAAe;AACxD,SAAO,gBAAAD,KAAC,SAAI,WAAW,GAAG,MAAM,GAAG,SAAS,GAAI,GAAG,MAAM;AAC3D;AAKO,SAAS,KAAK,EAAE,WAAW,GAAG,KAAK,GAAc;AACtD,SAAO,gBAAAA,KAAC,OAAE,WAAW,GAAG,aAAa,MAAM,SAAS,GAAI,GAAG,MAAM;AACnE;;;ACtFO,IAAM,sBAAsB;;;ACS1B,gBAAAE,YAAA;AAZT,SAAS,gBAAgB,OAAwB;AAC/C,SAAO,KAAK,UAAU,KAAK,EAAE,QAAQ,MAAM,SAAS;AACtD;AAEO,SAAS,YAAY,EAAE,aAAa,qBAAqB,MAAM,IAAsB,CAAC,GAAG;AAC9F,QAAM,QAAQ,gBAAgB,UAAU;AACxC,QAAMC,WAAU,gBAAgB,WAAW;AAC3C,QAAM,MAAM,gBAAgB,UAAU;AAEtC,QAAM,SAAS,yDAAyD,GAAG,iCAAiC,KAAK,MAAMA,QAAO;AAG9H,SAAO,gBAAAD,KAAC,YAAO,OAAc,yBAAyB,EAAE,QAAQ,OAAO,GAAG;AAC5E;","names":["jsx","jsxs","jsx","jsxs","jsx","accents"]}
|
|
1
|
+
{"version":3,"sources":["../../src/recipes/cx.ts","../../src/recipes/shell.ts","../../src/react/components/Shell.tsx","../../src/recipes/content.ts","../../src/tokens/colors.ts","../../src/tokens/categories.ts","../../src/react/components/Content.tsx","../../src/recipes/article.ts","../../src/react/components/Article.tsx","../../src/behaviors/themeManager.ts","../../src/react/components/ThemeScript.tsx","../../src/components/ui/button.tsx","../../src/lib/utils.ts","../../src/components/ui/card.tsx","../../src/components/ui/alert.tsx","../../src/components/ui/badge.tsx","../../src/components/ui/input.tsx","../../src/tokens/typography.ts","../../src/tokens/spacing.ts","../../src/tokens/motion.ts","../../src/tokens/zIndex.ts"],"sourcesContent":["/** Minimal class-name joiner. Falsy values are dropped. */\nexport function cx(...parts: Array<string | false | null | undefined>): string {\n return parts.filter(Boolean).join(' ');\n}\n","import { cx } from './cx';\n\n/**\n * Shell recipes: Header, Logo, Footer.\n * Recipes are pure functions returning class strings — no DOM, no framework.\n * Safe in Next.js Server Components; usable via [class] in Angular, :class in Vue.\n */\n\nexport interface HeaderOptions {\n /** Frosted glass background (sticky headers). */\n glass?: boolean;\n}\n\nexport function header(options: HeaderOptions = {}): string {\n return cx('sv-header', options.glass !== false && 'sv-glass');\n}\n\nexport const headerClasses = {\n nav: 'sv-header__nav',\n link: 'sv-header__link',\n linkActive: cx('sv-header__link', 'sv-header__link--active'),\n actions: 'sv-header__actions',\n} as const;\n\nexport function logo(): string {\n return 'sv-logo';\n}\n\nexport const logoClasses = {\n dot: 'sv-logo__dot',\n} as const;\n\nexport function footer(): string {\n return 'sv-footer';\n}\n\nexport const footerClasses = {\n links: 'sv-footer__links',\n link: 'sv-footer__link',\n} as const;\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport { cx } from '../../recipes/cx';\nimport { footer, footerClasses, header, headerClasses, logo, logoClasses } from '../../recipes/shell';\nimport type { NavItem } from '../../types';\n\n/*\n * Shell components are Server Component safe: no hooks, no browser APIs.\n * Interactivity (theme toggle) is composed in via the `actions` slot —\n * pass <ThemeToggle /> from '@still-void/ui/react/client'.\n */\n\nexport interface LogoProps extends ComponentPropsWithoutRef<'a'> {\n label: string;\n href?: string;\n}\n\nexport function Logo({ label, href = '/', className, ...rest }: LogoProps) {\n return (\n <a href={href} className={cx(logo(), className)} {...rest}>\n <span className={logoClasses.dot} aria-hidden=\"true\" />\n {label}\n </a>\n );\n}\n\nexport interface HeaderProps extends ComponentPropsWithoutRef<'header'> {\n /** Usually a <Logo />. */\n logo?: ReactNode;\n items?: NavItem[];\n /** Right-side slot — theme toggle, search, etc. */\n actions?: ReactNode;\n /** Frosted glass background (default true). */\n glass?: boolean;\n}\n\nexport function Header({ logo: logoSlot, items = [], actions, glass, className, ...rest }: HeaderProps) {\n return (\n <header className={cx(header({ glass }), className)} {...rest}>\n {logoSlot}\n {items.length > 0 && (\n <nav className={headerClasses.nav}>\n {items.map((item) => (\n <a\n key={item.href}\n href={item.href}\n className={item.active ? headerClasses.linkActive : headerClasses.link}\n aria-current={item.active ? 'page' : undefined}\n >\n {item.label}\n </a>\n ))}\n </nav>\n )}\n {actions && <div className={headerClasses.actions}>{actions}</div>}\n </header>\n );\n}\n\nexport interface FooterProps extends ComponentPropsWithoutRef<'footer'> {\n author?: string;\n links?: NavItem[];\n children?: ReactNode;\n}\n\nexport function Footer({ author, links = [], children, className, ...rest }: FooterProps) {\n return (\n <footer className={cx(footer(), className)} {...rest}>\n {author && <span>{author}</span>}\n {links.length > 0 && (\n <div className={footerClasses.links}>\n {links.map((link) => (\n <a key={link.href} href={link.href} className={footerClasses.link}>\n {link.label}\n </a>\n ))}\n </div>\n )}\n {children}\n </footer>\n );\n}\n","import { cx } from './cx';\n\n/**\n * Content recipes: CategoryPill, PostCard, FeaturedPostCard, PostGrid,\n * Sidebar, Hero, Skeleton. Pure functions — Server Component safe.\n */\n\nexport interface CategoryPillOptions {\n interactive?: boolean;\n active?: boolean;\n}\n\nexport function categoryPill(options: CategoryPillOptions = {}): string {\n return cx(\n 'sv-pill',\n options.interactive && 'sv-pill--interactive',\n options.active && 'sv-pill--active',\n );\n}\n\nexport const categoryPillClasses = {\n dot: 'sv-pill__dot',\n} as const;\n\nexport interface PostCardOptions {\n dense?: boolean;\n hover?: boolean;\n}\n\nexport function postCard(options: PostCardOptions = {}): string {\n return cx(\n 'sv-post-card',\n options.dense && 'sv-post-card--dense',\n options.hover !== false && 'sv-card-hover',\n );\n}\n\nexport const postCardClasses = {\n meta: 'sv-post-card__meta',\n title: 'sv-post-card__title',\n excerpt: 'sv-post-card__excerpt',\n} as const;\n\nexport function featuredPostCard(): string {\n return cx('sv-featured-card', 'sv-gradient-border', 'sv-card-hover');\n}\n\nexport const featuredPostCardClasses = {\n body: 'sv-featured-card__body',\n title: 'sv-featured-card__title',\n visual: 'sv-featured-card__visual',\n} as const;\n\nexport function postGrid(): string {\n return 'sv-post-grid';\n}\n\nexport interface LayoutOptions {\n withSidebar?: boolean;\n}\n\nexport function layout(options: LayoutOptions = {}): string {\n return cx('sv-layout', options.withSidebar && 'sv-layout--with-sidebar');\n}\n\nexport function sidebar(): string {\n return 'sv-sidebar';\n}\n\nexport const sidebarClasses = {\n sectionTitle: 'sv-sidebar__section-title',\n} as const;\n\nexport function hero(): string {\n return 'sv-hero';\n}\n\nexport const heroClasses = {\n eyebrow: 'sv-hero__eyebrow',\n title: 'sv-hero__title',\n description: 'sv-hero__description',\n} as const;\n\nexport interface SkeletonOptions {\n small?: boolean;\n}\n\nexport function skeletonLine(options: SkeletonOptions = {}): string {\n return cx('sv-skeleton', 'sv-skeleton-line', options.small && 'sv-skeleton-line--sm');\n}\n\nexport function cardSkeleton(): string {\n return 'sv-card-skeleton';\n}\n","/**\n * Still Void color tokens.\n * Values ported literally from the Still Void spec (blog.kalleopinheiro.dev).\n * Do not round or \"approximate\" — fidelity rule.\n */\nexport const colors = {\n dark: {\n bg: '#0A0A0C',\n bgElev: '#111114',\n surface: '#16161B',\n surface2: '#1C1C22',\n border: 'rgba(255,255,255,0.08)',\n borderStrong: 'rgba(255,255,255,0.14)',\n text: '#EDEDF0',\n text2: '#8B8B96',\n // Corrected from #5A5A66 (~2.6:1 on surface) to meet WCAG AA 4.5:1 — text3 is used for\n // real copy (metadata, TOC links), not decoration, so it must be readable, not just muted.\n text3: '#83838F',\n },\n light: {\n bg: '#F7F7F5',\n bgElev: '#FFFFFF',\n surface: '#FFFFFF',\n surface2: '#F2F2EF',\n border: 'rgba(0,0,0,0.08)',\n borderStrong: 'rgba(0,0,0,0.14)',\n text: '#16161B',\n text2: '#5A5A66',\n // Corrected from #8B8B96 (~3.1:1 on white) to meet WCAG AA 4.5:1, same reasoning as dark.\n // A further step from #6F6F78 to #6D6D76: the first fix cleared white/paper (≥4.7:1) but\n // was only ~4.44:1 against surface2 (#F2F2EF), the darkest of the light surfaces — still a\n // failure. Verified against bg/bgElev/surface/surface2 together, not just one background.\n text3: '#6D6D76',\n },\n} as const;\n\nexport const accents = {\n cyan: 'oklch(0.78 0.12 210)',\n violet: 'oklch(0.72 0.14 295)',\n mint: 'oklch(0.78 0.10 160)',\n amber: 'oklch(0.78 0.12 75)',\n} as const;\n\n/**\n * Text/UI-safe accent variants (\"ink\"). `accents` above is tuned for surface use\n * (dots, gradient border, progress bar) and fails WCAG AA as text on light\n * backgrounds (e.g. cyan is ~1.8:1 on white). These preserve the dark-mode\n * values (already ≥6.9:1) and darken each hue for light mode to clear 4.5:1\n * against both light surfaces. Used anywhere the accent colors text: prose\n * links, active TOC state, callout labels, hero eyebrow, copy-success, focus ring.\n */\nexport const accentsInk = {\n dark: {\n cyan: 'oklch(0.78 0.12 210)',\n violet: 'oklch(0.72 0.14 295)',\n mint: 'oklch(0.78 0.10 160)',\n amber: 'oklch(0.78 0.12 75)',\n },\n light: {\n cyan: 'oklch(0.525 0.09 210)',\n violet: 'oklch(0.545 0.14 295)',\n mint: 'oklch(0.52 0.1 160)',\n amber: 'oklch(0.535 0.11 75)',\n },\n} as const;\n\n/**\n * Semantic state colors — independent of the switchable `accent`, so a\n * consumer picking `data-accent=\"amber\"` never collides a warning with the\n * site accent. Fixed per meaning in both surface and text/UI (\"ink\") forms,\n * same split as `accents`/`accentsInk`.\n */\nexport const semantic = {\n dark: {\n danger: 'oklch(0.68 0.19 25)',\n success: 'oklch(0.75 0.15 150)',\n info: 'oklch(0.78 0.12 210)',\n warning: 'oklch(0.78 0.12 75)',\n },\n light: {\n danger: 'oklch(0.68 0.19 25)',\n success: 'oklch(0.75 0.15 150)',\n info: 'oklch(0.78 0.12 210)',\n warning: 'oklch(0.78 0.12 75)',\n },\n} as const;\n\nexport const semanticInk = {\n dark: {\n danger: 'oklch(0.68 0.19 25)',\n success: 'oklch(0.75 0.15 150)',\n info: 'oklch(0.78 0.12 210)',\n warning: 'oklch(0.78 0.12 75)',\n },\n light: {\n danger: 'oklch(0.555 0.19 25)',\n success: 'oklch(0.515 0.14 150)',\n info: 'oklch(0.525 0.09 210)',\n warning: 'oklch(0.535 0.11 75)',\n },\n} as const;\n\nexport type ThemeMode = keyof typeof colors;\nexport type AccentName = keyof typeof accents;\nexport type ColorScheme = (typeof colors)[ThemeMode];\nexport type SemanticName = keyof (typeof semantic)['dark'];\n\nexport const themeModes = Object.keys(colors) as ThemeMode[];\nexport const accentNames = Object.keys(accents) as AccentName[];\n\nexport const DEFAULT_MODE: ThemeMode = 'dark';\nexport const DEFAULT_ACCENT: AccentName = 'cyan';\n","import { accents, type AccentName } from './colors';\n\n/**\n * Blog categories from the prototype. Categories render as a colored dot + label\n * (never an emoji). The pill also accepts any CSS color for whitelabel use.\n */\nexport type CategoryName = 'ia' | 'prompt' | 'dev' | 'arch' | 'ts';\n\nexport const defaultCategoryColors: Record<CategoryName, AccentName> = {\n ia: 'violet',\n prompt: 'amber',\n dev: 'mint',\n arch: 'cyan',\n ts: 'cyan',\n};\n\nconst hasOwn = <T extends object>(obj: T, key: string): key is Extract<keyof T, string> =>\n Object.prototype.hasOwnProperty.call(obj, key);\n\n/** Resolve an accent name or raw CSS color to a CSS color value. */\nexport function resolveAccentColor(color: AccentName | (string & {})): string {\n return hasOwn(accents, color) ? accents[color] : color;\n}\n\n/** Resolve a category name, accent name, or raw CSS color to a CSS color value. */\nexport function resolveCategoryColor(\n color: CategoryName | AccentName | (string & {}),\n): string {\n if (hasOwn(defaultCategoryColors, color)) {\n return accents[defaultCategoryColors[color]];\n }\n return resolveAccentColor(color);\n}\n","import type { ComponentPropsWithoutRef, CSSProperties, ReactNode } from 'react';\nimport { cx } from '../../recipes/cx';\nimport {\n cardSkeleton,\n categoryPill,\n categoryPillClasses,\n featuredPostCard,\n featuredPostCardClasses,\n hero,\n heroClasses,\n layout,\n postCard,\n postCardClasses,\n postGrid,\n sidebar,\n sidebarClasses,\n skeletonLine,\n} from '../../recipes/content';\nimport { resolveCategoryColor } from '../../tokens/categories';\nimport type { PostSummary } from '../../types';\n\n/* All components in this file are Server Component safe. */\n\ninterface CategoryPillBaseProps {\n label: string;\n /** Accent name ('cyan'), category name ('ia'), or any CSS color. */\n color?: string;\n active?: boolean;\n}\n\nexport type CategoryPillProps =\n | (CategoryPillBaseProps & { interactive: true } & Omit<\n ComponentPropsWithoutRef<'button'>,\n 'color'\n >)\n | (CategoryPillBaseProps & { interactive?: false } & Omit<\n ComponentPropsWithoutRef<'span'>,\n 'color'\n >);\n\n/**\n * Categories render as a colored dot + label. When `interactive`, this is a\n * real <button> (toggle semantics via `aria-pressed`) — a `<span>` with a\n * pointer cursor is not operable by keyboard or assistive tech.\n */\nexport function CategoryPill({ label, color, active, interactive, className, style, ...rest }: CategoryPillProps) {\n const pillStyle: CSSProperties | undefined = color\n ? ({ ...style, '--sv-pill-color': resolveCategoryColor(color) } as CSSProperties)\n : style;\n const content = (\n <>\n <span className={categoryPillClasses.dot} aria-hidden=\"true\" />\n {label}\n </>\n );\n\n if (interactive) {\n return (\n <button\n type=\"button\"\n aria-pressed={active ?? false}\n className={cx(categoryPill({ active, interactive }), className)}\n style={pillStyle}\n {...(rest as ComponentPropsWithoutRef<'button'>)}\n >\n {content}\n </button>\n );\n }\n\n return (\n <span\n className={cx(categoryPill({ active, interactive }), className)}\n style={pillStyle}\n {...(rest as ComponentPropsWithoutRef<'span'>)}\n >\n {content}\n </span>\n );\n}\n\nfunction PostMeta({ post }: { post: PostSummary }) {\n if (!post.category && !post.date && post.readMinutes === undefined) return null;\n return (\n <div className={postCardClasses.meta}>\n {post.category && <CategoryPill label={post.category.label} color={post.category.color} />}\n {post.date && <span>{post.date}</span>}\n {post.readMinutes !== undefined && <span>{post.readMinutes} min</span>}\n </div>\n );\n}\n\nexport interface PostCardProps extends ComponentPropsWithoutRef<'article'> {\n post: PostSummary;\n dense?: boolean;\n}\n\nexport function PostCard({ post, dense, className, children, ...rest }: PostCardProps) {\n return (\n <article className={cx(postCard({ dense }), className)} {...rest}>\n <PostMeta post={post} />\n <h3 className={postCardClasses.title}>\n <a href={post.href}>{post.title}</a>\n </h3>\n {!dense && post.excerpt && <p className={postCardClasses.excerpt}>{post.excerpt}</p>}\n {children}\n </article>\n );\n}\n\nexport interface FeaturedPostCardProps extends ComponentPropsWithoutRef<'article'> {\n post: PostSummary;\n /** Custom visual slot (illustration, image). */\n visual?: ReactNode;\n}\n\nexport function FeaturedPostCard({ post, visual, className, children, ...rest }: FeaturedPostCardProps) {\n return (\n <article className={cx(featuredPostCard(), className)} {...rest}>\n <div className={featuredPostCardClasses.body}>\n <PostMeta post={post} />\n <h2 className={featuredPostCardClasses.title}>\n <a href={post.href}>{post.title}</a>\n </h2>\n {post.excerpt && <p className={postCardClasses.excerpt}>{post.excerpt}</p>}\n {children}\n </div>\n {visual && <div className={featuredPostCardClasses.visual}>{visual}</div>}\n </article>\n );\n}\n\nexport interface PostGridProps extends ComponentPropsWithoutRef<'div'> {}\n\nexport function PostGrid({ className, ...rest }: PostGridProps) {\n return <div className={cx(postGrid(), className)} {...rest} />;\n}\n\nexport interface LayoutProps extends ComponentPropsWithoutRef<'div'> {\n withSidebar?: boolean;\n}\n\nexport function Layout({ withSidebar, className, ...rest }: LayoutProps) {\n return <div className={cx(layout({ withSidebar }), className)} {...rest} />;\n}\n\nexport interface SidebarProps extends ComponentPropsWithoutRef<'aside'> {}\n\nexport function Sidebar({ className, ...rest }: SidebarProps) {\n return <aside className={cx(sidebar(), className)} {...rest} />;\n}\n\nexport interface SidebarSectionProps extends ComponentPropsWithoutRef<'section'> {\n title: string;\n}\n\nexport function SidebarSection({ title, children, ...rest }: SidebarSectionProps) {\n return (\n <section {...rest}>\n <h4 className={sidebarClasses.sectionTitle}>{title}</h4>\n {children}\n </section>\n );\n}\n\nexport interface HeroProps extends ComponentPropsWithoutRef<'section'> {\n eyebrow?: string;\n title: string;\n description?: string;\n}\n\nexport function Hero({ eyebrow, title, description, className, children, ...rest }: HeroProps) {\n return (\n <section className={cx(hero(), className)} {...rest}>\n {eyebrow && <span className={heroClasses.eyebrow}>{eyebrow}</span>}\n <h1 className={heroClasses.title}>{title}</h1>\n {description && <p className={heroClasses.description}>{description}</p>}\n {children}\n </section>\n );\n}\n\nexport interface SkeletonProps extends ComponentPropsWithoutRef<'div'> {\n small?: boolean;\n}\n\nexport function Skeleton({ small, className, ...rest }: SkeletonProps) {\n return <div className={cx(skeletonLine({ small }), className)} aria-hidden=\"true\" {...rest} />;\n}\n\nexport function CardSkeleton({ className, ...rest }: ComponentPropsWithoutRef<'div'>) {\n return (\n <div className={cx(cardSkeleton(), className)} aria-hidden=\"true\" {...rest}>\n <Skeleton small />\n <Skeleton />\n <Skeleton />\n </div>\n );\n}\n","import { cx } from './cx';\n\n/**\n * Article recipes: CodeBlock, Callout, TableOfContents, ReadingProgress,\n * ArticleHeader, Prose. Pure functions — Server Component safe.\n */\n\nexport function codeBlock(): string {\n return 'sv-code-block';\n}\n\nexport const codeBlockClasses = {\n header: 'sv-code-block__header',\n pre: 'sv-code-block__pre',\n copy: 'sv-code-block__copy',\n copyCopied: cx('sv-code-block__copy', 'sv-code-block__copy--copied'),\n} as const;\n\nexport type CalloutKind = 'note' | 'warn' | 'aha';\n\nexport function callout(kind: CalloutKind): string {\n return cx('sv-callout', `sv-callout--${kind}`);\n}\n\nexport const calloutClasses = {\n label: 'sv-callout__label',\n} as const;\n\nexport const calloutLabels: Record<CalloutKind, string> = {\n note: 'Note',\n warn: 'Warn',\n aha: 'Aha!',\n};\n\nexport function tableOfContents(): string {\n return 'sv-toc';\n}\n\nexport interface TocLinkOptions {\n active?: boolean;\n /** Heading depth, 2 (h2) or 3 (h3). Depth 3 indents. */\n depth?: 2 | 3;\n}\n\nexport function tocLink(options: TocLinkOptions = {}): string {\n return cx(\n 'sv-toc__link',\n options.active && 'sv-toc__link--active',\n options.depth === 3 && 'sv-toc__link--depth-3',\n );\n}\n\nexport function readingProgress(): string {\n return 'sv-reading-progress';\n}\n\nexport const readingProgressClasses = {\n bar: 'sv-reading-progress__bar',\n} as const;\n\n/** CSS var read by `.sv-reading-progress__bar` (0 → 1). */\nexport const READING_PROGRESS_VAR = '--sv-reading-progress';\n\nexport function articleHeader(): string {\n return 'sv-article-header';\n}\n\nexport const articleHeaderClasses = {\n title: 'sv-article-header__title',\n meta: 'sv-article-header__meta',\n author: 'sv-article-header__author',\n} as const;\n\nexport function prose(): string {\n return 'sv-prose';\n}\n\nexport const proseClasses = {\n lead: 'sv-prose__lead',\n} as const;\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport { cx } from '../../recipes/cx';\nimport {\n articleHeader,\n articleHeaderClasses,\n callout,\n calloutClasses,\n calloutLabels,\n codeBlock,\n codeBlockClasses,\n prose,\n proseClasses,\n type CalloutKind,\n} from '../../recipes/article';\n\n/*\n * Article components are Server Component safe.\n * Interactive pieces (copy button, scroll spy) live in the client entry\n * and are composed in via slots.\n */\n\nexport interface CodeBlockProps extends ComponentPropsWithoutRef<'figure'> {\n /** Raw source shown when `rendered` is absent. */\n code: string;\n language?: string;\n filename?: string;\n /**\n * Pre-highlighted markup (e.g. Shiki output rendered on the server).\n * The prototype's regex tokenizer was demo-only and is intentionally\n * not part of the library.\n */\n rendered?: ReactNode;\n /** Header slot — pass <CopyButton code={code} /> from the client entry. */\n actions?: ReactNode;\n}\n\nexport function CodeBlock({\n code,\n language,\n filename,\n rendered,\n actions,\n className,\n ...rest\n}: CodeBlockProps) {\n return (\n <figure className={cx(codeBlock(), className)} {...rest}>\n <figcaption className={codeBlockClasses.header}>\n <span>{filename ?? language ?? 'code'}</span>\n {actions}\n </figcaption>\n <pre className={codeBlockClasses.pre}>\n {rendered ?? <code>{code}</code>}\n </pre>\n </figure>\n );\n}\n\nexport interface CalloutProps extends ComponentPropsWithoutRef<'aside'> {\n kind: CalloutKind;\n /** Override the default kind label. */\n label?: string;\n}\n\nexport function Callout({ kind, label, className, children, ...rest }: CalloutProps) {\n return (\n <aside className={cx(callout(kind), className)} {...rest}>\n <span className={calloutClasses.label}>{label ?? calloutLabels[kind]}</span>\n <div>{children}</div>\n </aside>\n );\n}\n\nexport interface ArticleHeaderProps extends ComponentPropsWithoutRef<'header'> {\n title: string;\n author?: string;\n date?: string;\n readMinutes?: number;\n /** Slot above the title — usually a <CategoryPill />. */\n eyebrow?: ReactNode;\n}\n\nexport function ArticleHeader({\n title,\n author,\n date,\n readMinutes,\n eyebrow,\n className,\n ...rest\n}: ArticleHeaderProps) {\n return (\n <header className={cx(articleHeader(), className)} {...rest}>\n {eyebrow}\n <h1 className={articleHeaderClasses.title}>{title}</h1>\n {(author || date || readMinutes !== undefined) && (\n <div className={articleHeaderClasses.meta}>\n {author && <span className={articleHeaderClasses.author}>{author}</span>}\n {date && <span>{date}</span>}\n {readMinutes !== undefined && <span>{readMinutes} min</span>}\n </div>\n )}\n </header>\n );\n}\n\nexport interface ProseProps extends ComponentPropsWithoutRef<'div'> {}\n\n/** Typography wrapper for article/MDX content. */\nexport function Prose({ className, ...rest }: ProseProps) {\n return <div className={cx(prose(), className)} {...rest} />;\n}\n\nexport interface LeadProps extends ComponentPropsWithoutRef<'p'> {}\n\n/** Lead paragraph inside <Prose>. */\nexport function Lead({ className, ...rest }: LeadProps) {\n return <p className={cx(proseClasses.lead, className)} {...rest} />;\n}\n","import {\n DEFAULT_ACCENT,\n DEFAULT_MODE,\n accentNames,\n themeModes,\n type AccentName,\n type ThemeMode,\n} from '../tokens/colors';\n\nexport interface ThemeState {\n mode: ThemeMode;\n accent: AccentName;\n}\n\nexport interface ThemeManagerOptions {\n /** Element receiving data-theme / data-accent. Defaults to <html>. */\n root?: HTMLElement;\n defaultMode?: ThemeMode;\n defaultAccent?: AccentName;\n /** localStorage key. Pass null to disable persistence. */\n storageKey?: string | null;\n}\n\nexport interface ThemeManager {\n getState: () => ThemeState;\n setMode: (mode: ThemeMode) => void;\n setAccent: (accent: AccentName) => void;\n toggleMode: () => void;\n subscribe: (listener: (state: ThemeState) => void) => () => void;\n destroy: () => void;\n}\n\nexport const DEFAULT_STORAGE_KEY = 'still-void-theme';\n\nfunction isMode(value: unknown): value is ThemeMode {\n return themeModes.includes(value as ThemeMode);\n}\n\nfunction isAccent(value: unknown): value is AccentName {\n return accentNames.includes(value as AccentName);\n}\n\nfunction readStorage(key: string): Partial<ThemeState> {\n try {\n const raw = window.localStorage.getItem(key);\n if (!raw) return {};\n const parsed: unknown = JSON.parse(raw);\n if (typeof parsed !== 'object' || parsed === null) return {};\n const { mode, accent } = parsed as Record<string, unknown>;\n return {\n ...(isMode(mode) ? { mode } : {}),\n ...(isAccent(accent) ? { accent } : {}),\n };\n } catch {\n return {};\n }\n}\n\n/**\n * Framework-agnostic theme controller. Applies `data-theme` and `data-accent`\n * attributes; theme.css does the rest via CSS vars. If the server already\n * rendered the attributes (RSC/SSR), those win over defaults, so there is\n * no flash of wrong theme.\n */\nexport function createThemeManager(options: ThemeManagerOptions = {}): ThemeManager {\n const root = options.root ?? document.documentElement;\n const storageKey = options.storageKey === null ? null : (options.storageKey ?? DEFAULT_STORAGE_KEY);\n\n const ssrMode = root.getAttribute('data-theme');\n const ssrAccent = root.getAttribute('data-accent');\n const stored = storageKey ? readStorage(storageKey) : {};\n\n let state: ThemeState = {\n mode: stored.mode ?? (isMode(ssrMode) ? ssrMode : (options.defaultMode ?? DEFAULT_MODE)),\n accent:\n stored.accent ?? (isAccent(ssrAccent) ? ssrAccent : (options.defaultAccent ?? DEFAULT_ACCENT)),\n };\n\n const listeners = new Set<(state: ThemeState) => void>();\n\n function apply(): void {\n root.setAttribute('data-theme', state.mode);\n root.setAttribute('data-accent', state.accent);\n if (storageKey) {\n try {\n window.localStorage.setItem(storageKey, JSON.stringify(state));\n } catch {\n // storage unavailable (private mode, quota) — theme still applies\n }\n }\n for (const listener of listeners) listener(state);\n }\n\n apply();\n\n return {\n getState: () => state,\n setMode(mode) {\n state = { ...state, mode };\n apply();\n },\n setAccent(accent) {\n state = { ...state, accent };\n apply();\n },\n toggleMode() {\n state = { ...state, mode: state.mode === 'dark' ? 'light' : 'dark' };\n apply();\n },\n subscribe(listener) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n destroy() {\n listeners.clear();\n },\n };\n}\n","import { DEFAULT_STORAGE_KEY } from '../../behaviors/themeManager';\nimport { accentNames, themeModes } from '../../tokens/colors';\n\nexport interface ThemeScriptProps {\n /** Must match the `storageKey` passed to `<ThemeProvider>` (or `createThemeManager`). */\n storageKey?: string;\n /** CSP nonce forwarded to the inline `<script>`. */\n nonce?: string;\n}\n\n/**\n * Render once, as early as possible in `<head>` or right after `<html>` opens\n * (before the rest of the document): a blocking inline script that applies a\n * stored theme preference to `<html>` before first paint.\n *\n * Without this, the first paint uses whatever `data-theme`/`data-accent` the\n * server rendered — `<ThemeProvider>` only reconciles localStorage on mount,\n * so a returning visitor who chose light mode sees a dark flash until\n * hydration. This component is server-safe (no hooks, no browser APIs at\n * render time) and can be composed inside `<html>` from a Server Component.\n */\n/**\n * `JSON.stringify` doesn't escape `<`, so a value containing `</script>`\n * (e.g. a `storageKey` derived from user input) would close the real\n * `<script>` tag early and let whatever follows run as raw HTML — a classic\n * JSON-in-script-tag XSS. `<` is a valid JS string escape the parser\n * decodes back to `<` at runtime, so this is purely a serialization-time\n * fix with no effect on the parsed value.\n */\nfunction toScriptLiteral(value: unknown): string {\n return JSON.stringify(value).replace(/</g, '\\\\u003c');\n}\n\nexport function ThemeScript({ storageKey = DEFAULT_STORAGE_KEY, nonce }: ThemeScriptProps = {}) {\n const modes = toScriptLiteral(themeModes);\n const accents = toScriptLiteral(accentNames);\n const key = toScriptLiteral(storageKey);\n\n const script = `(function(){try{var s=JSON.parse(localStorage.getItem(${key})||\"null\");if(!s)return;var m=${modes},a=${accents},r=document.documentElement;if(m.indexOf(s.mode)!==-1)r.setAttribute(\"data-theme\",s.mode);if(a.indexOf(s.accent)!==-1)r.setAttribute(\"data-accent\",s.accent);}catch(e){}})();`;\n\n // eslint-disable-next-line react/no-danger\n return <script nonce={nonce} dangerouslySetInnerHTML={{ __html: script }} />;\n}\n","import * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: \"default\" | \"destructive\" | \"outline\" | \"secondary\" | \"ghost\" | \"link\"\n size?: \"default\" | \"sm\" | \"lg\" | \"icon\"\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant = \"default\", size = \"default\", ...props }, ref) => (\n <button\n className={cn(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n variant === \"default\" &&\n \"bg-sv-surface text-sv-text hover:bg-sv-surface-2\",\n variant === \"destructive\" &&\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n variant === \"outline\" &&\n \"border border-sv-border bg-background hover:bg-sv-surface hover:text-accent\",\n variant === \"secondary\" &&\n \"bg-sv-surface-2 text-sv-text hover:bg-sv-surface\",\n variant === \"ghost\" && \"hover:bg-sv-surface hover:text-sv-text\",\n variant === \"link\" && \"text-accent underline-offset-4 hover:underline\",\n size === \"default\" && \"h-10 px-4 py-2\",\n size === \"sm\" && \"h-9 rounded-md px-3 text-sm\",\n size === \"lg\" && \"h-11 rounded-md px-8\",\n size === \"icon\" && \"h-10 w-10\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n)\nButton.displayName = \"Button\"\n\nexport { Button }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"rounded-lg border border-sv-border bg-sv-surface text-sv-text\",\n className\n )}\n {...props}\n />\n))\nCard.displayName = \"Card\"\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n {...props}\n />\n))\nCardHeader.displayName = \"CardHeader\"\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h2\n ref={ref}\n className={cn(\n \"text-2xl font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nCardTitle.displayName = \"CardTitle\"\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"text-sm text-sv-text-2\", className)}\n {...props}\n />\n))\nCardDescription.displayName = \"CardDescription\"\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n))\nCardContent.displayName = \"CardContent\"\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex items-center p-6 pt-0\", className)}\n {...props}\n />\n))\nCardFooter.displayName = \"CardFooter\"\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\n","import * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"relative w-full rounded-lg border border-sv-border bg-sv-surface p-4 text-sv-text [&>svg~*]:pl-7 [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-sv-text\",\n className\n )}\n role=\"alert\"\n {...props}\n />\n))\nAlert.displayName = \"Alert\"\n\nconst AlertTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h5\n ref={ref}\n className={cn(\"mb-1 font-medium leading-tight tracking-tight\", className)}\n {...props}\n />\n))\nAlertTitle.displayName = \"AlertTitle\"\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"text-sm text-sv-text-2 [&_p]:leading-relaxed\", className)}\n {...props}\n />\n))\nAlertDescription.displayName = \"AlertDescription\"\n\nexport { Alert, AlertTitle, AlertDescription }\n","import * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement> {\n variant?: \"default\" | \"secondary\" | \"destructive\" | \"outline\"\n}\n\nfunction Badge({ className, variant = \"default\", ...props }: BadgeProps) {\n return (\n <div\n className={cn(\n \"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n variant === \"default\" &&\n \"border-transparent bg-sv-signal-cyan text-sv-bg\",\n variant === \"secondary\" &&\n \"border-transparent bg-sv-surface-2 text-sv-text hover:bg-sv-surface\",\n variant === \"destructive\" &&\n \"border-transparent bg-red-500 text-white hover:bg-red-600\",\n variant === \"outline\" && \"text-sv-text border-sv-border\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Badge }\n","import * as React from \"react\"\nimport { cn } from \"../../lib/utils\"\n\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => (\n <input\n type={type}\n className={cn(\n \"flex h-10 w-full rounded-md border border-sv-border bg-sv-surface px-3 py-2 text-sm text-sv-text placeholder:text-sv-text-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n","/**\n * Still Void typography tokens.\n * Families are fixed by the spec: Sora (display), Manrope (body), JetBrains Mono (code).\n * System fallbacks are loading fallbacks only — the final family must be the correct one.\n */\nexport const fontFamilies = {\n display: \"'Sora', ui-sans-serif, system-ui, sans-serif\",\n body: \"'Manrope', ui-sans-serif, system-ui, sans-serif\",\n mono: \"'JetBrains Mono', ui-monospace, 'SF Mono', monospace\",\n} as const;\n\nexport const fontWeights = {\n regular: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n} as const;\n\nexport const fontSizes = {\n xs: '0.75rem', // 12px — meta, pills\n sm: '0.8125rem', // 13px — captions, code\n base: '0.9375rem', // 15px — body\n md: '1rem', // 16px — lead paragraphs\n lg: '1.125rem', // 18px — article lead\n xl: '1.375rem', // 22px — card titles, h3\n '2xl': '1.75rem', // 28px — h2\n '3xl': '2.25rem', // 36px — article title\n '4xl': '2.75rem', // 44px — hero display\n} as const;\n\nexport const lineHeights = {\n tight: 1.15,\n snug: 1.3,\n normal: 1.5,\n relaxed: 1.7,\n} as const;\n\nexport const letterSpacings = {\n display: '-0.02em',\n normal: '0',\n wide: '0.08em',\n} as const;\n\nexport type FontFamily = keyof typeof fontFamilies;\nexport type FontSize = keyof typeof fontSizes;\nexport type FontWeight = keyof typeof fontWeights;\n","/**\n * Still Void spacing scale (4→72px) and radii (6/8/12/16/full).\n */\nexport const spacing = {\n 1: '4px',\n 2: '8px',\n 3: '12px',\n 4: '16px',\n 5: '20px',\n 6: '24px',\n 8: '32px',\n 10: '40px',\n 12: '48px',\n 14: '56px',\n 16: '64px',\n 18: '72px',\n} as const;\n\nexport const radii = {\n sm: '6px',\n md: '8px',\n lg: '12px',\n xl: '16px',\n full: '9999px',\n} as const;\n\nexport type SpacingStep = keyof typeof spacing;\nexport type Radius = keyof typeof radii;\n","/**\n * Still Void motion tokens.\n * Hover transitions use the signature easing; the reading progress bar is linear.\n */\nexport const easings = {\n hover: 'cubic-bezier(.3,.7,.4,1)',\n linear: 'linear',\n} as const;\n\nexport const durations = {\n fast: '120ms',\n base: '200ms',\n slow: '320ms',\n} as const;\n\nexport type Easing = keyof typeof easings;\nexport type Duration = keyof typeof durations;\n","/**\n * Still Void z-index scale. Named steps instead of arbitrary numbers so new\n * layered components (dropdown, modal, toast, tooltip) stack predictably\n * against the existing sticky header and reading progress bar.\n */\nexport const zIndex = {\n dropdown: 10,\n sticky: 20,\n backdrop: 30,\n modal: 40,\n toast: 50,\n tooltip: 60,\n} as const;\n\nexport type ZIndexStep = keyof typeof zIndex;\n"],"mappings":";AACO,SAAS,MAAM,OAAyD;AAC7E,SAAO,MAAM,OAAO,OAAO,EAAE,KAAK,GAAG;AACvC;;;ACUO,SAAS,OAAO,UAAyB,CAAC,GAAW;AAC1D,SAAO,GAAG,aAAa,QAAQ,UAAU,SAAS,UAAU;AAC9D;AAEO,IAAM,gBAAgB;AAAA,EAC3B,KAAK;AAAA,EACL,MAAM;AAAA,EACN,YAAY,GAAG,mBAAmB,yBAAyB;AAAA,EAC3D,SAAS;AACX;AAEO,SAAS,OAAe;AAC7B,SAAO;AACT;AAEO,IAAM,cAAc;AAAA,EACzB,KAAK;AACP;AAEO,SAAS,SAAiB;AAC/B,SAAO;AACT;AAEO,IAAM,gBAAgB;AAAA,EAC3B,O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