@orangecheck/app-design 0.0.0-stage → 0.1.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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +39 -2
  3. package/dist/brand.d.mts +46 -0
  4. package/dist/brand.d.ts +46 -0
  5. package/dist/brand.js +144 -0
  6. package/dist/brand.js.map +1 -0
  7. package/dist/brand.mjs +136 -0
  8. package/dist/brand.mjs.map +1 -0
  9. package/dist/chrome.d.mts +64 -0
  10. package/dist/chrome.d.ts +64 -0
  11. package/dist/chrome.js +479 -0
  12. package/dist/chrome.js.map +1 -0
  13. package/dist/chrome.mjs +447 -0
  14. package/dist/chrome.mjs.map +1 -0
  15. package/dist/components.d.mts +474 -0
  16. package/dist/components.d.ts +474 -0
  17. package/dist/components.js +619 -0
  18. package/dist/components.js.map +1 -0
  19. package/dist/components.mjs +588 -0
  20. package/dist/components.mjs.map +1 -0
  21. package/dist/index.d.mts +21 -0
  22. package/dist/index.d.ts +21 -0
  23. package/dist/index.js +1597 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/index.mjs +1448 -0
  26. package/dist/index.mjs.map +1 -0
  27. package/dist/primitives.d.mts +140 -0
  28. package/dist/primitives.d.ts +140 -0
  29. package/dist/primitives.js +706 -0
  30. package/dist/primitives.js.map +1 -0
  31. package/dist/primitives.mjs +606 -0
  32. package/dist/primitives.mjs.map +1 -0
  33. package/dist/styles/fonts/inter-latin-ext.woff2 +0 -0
  34. package/dist/styles/fonts/inter-latin.woff2 +0 -0
  35. package/dist/styles/fonts/jetbrains-mono-latin-ext.woff2 +0 -0
  36. package/dist/styles/fonts/jetbrains-mono-latin.woff2 +0 -0
  37. package/dist/styles/fonts.css +74 -0
  38. package/dist/styles/motion.css +80 -0
  39. package/dist/styles/theme.css +227 -0
  40. package/dist/styles/tokens.css +152 -0
  41. package/dist/styles.css +14 -0
  42. package/dist/tokens.d.mts +42 -0
  43. package/dist/tokens.d.ts +42 -0
  44. package/dist/tokens.js +50 -0
  45. package/dist/tokens.js.map +1 -0
  46. package/dist/tokens.mjs +45 -0
  47. package/dist/tokens.mjs.map +1 -0
  48. package/package.json +114 -4
package/dist/index.mjs ADDED
@@ -0,0 +1,1448 @@
1
+ import { Slot } from '@radix-ui/react-slot';
2
+ import { cva } from 'class-variance-authority';
3
+ import { forwardRef, createContext, useContext, useId, isValidElement, cloneElement, createElement, useState, useRef, useEffect, useCallback } from 'react';
4
+ import { clsx } from 'clsx';
5
+ import { extendTailwindMerge } from 'tailwind-merge';
6
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
7
+ import { Toaster as Toaster$1 } from 'sonner';
8
+ export { toast } from 'sonner';
9
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
11
+ import * as LabelPrimitive from '@radix-ui/react-label';
12
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
13
+ import * as SelectPrimitive from '@radix-ui/react-select';
14
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
15
+ import { ChevronDown, Check, X, Copy, Menu, Sun, Moon, SunMoon } from 'lucide-react';
16
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
17
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
18
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
19
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
20
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
21
+ import Link2 from 'next/link';
22
+ import { useTheme } from 'next-themes';
23
+
24
+ // src/tokens/index.ts
25
+ var APP_ATTRIBUTE = "data-oc-app";
26
+ var APP_ID = "ochk";
27
+ var appColors = {
28
+ light: {
29
+ background: "#FAFAFA",
30
+ foreground: "#0A0A0A",
31
+ card: "#FFFFFF",
32
+ muted: "#F2F2F2",
33
+ mutedForeground: "#54585E",
34
+ subtleForeground: "#686C72",
35
+ border: "#ECECEC",
36
+ hairlineStrong: "#DADADA",
37
+ accentDisplay: "#F55819",
38
+ accentInk: "#C73F09"
39
+ },
40
+ dark: {
41
+ background: "#0A0A0A",
42
+ foreground: "#FAFAFA",
43
+ card: "#161616",
44
+ muted: "#1E1E1E",
45
+ mutedForeground: "#A3A6AA",
46
+ subtleForeground: "#8B8E93",
47
+ border: "#262626",
48
+ hairlineStrong: "#333333",
49
+ accentDisplay: "#F66D36",
50
+ accentInk: "#F0835A"
51
+ },
52
+ brand: {
53
+ orange: "#F66D36",
54
+ orangeLight: "#FB933C",
55
+ orangeDeep: "#EA580B",
56
+ peach: "#FED8AB",
57
+ ink: "#0A0A0A",
58
+ inkCard: "#1E1E1E"
59
+ }
60
+ };
61
+ var appFonts = {
62
+ sans: "'OCA Inter', 'OCA Inter Fallback', ui-sans-serif, system-ui, sans-serif",
63
+ mono: "'OCA JetBrains Mono', 'OCA JetBrains Mono Fallback', ui-monospace, monospace"
64
+ };
65
+ var merge = extendTailwindMerge({
66
+ extend: {
67
+ classGroups: {
68
+ "oca-type": [
69
+ "oca-display-1",
70
+ "oca-display-2",
71
+ "oca-display-3",
72
+ "oca-title",
73
+ "oca-title-sm",
74
+ "oca-eyebrow",
75
+ "oca-lead",
76
+ "oca-body",
77
+ "oca-numeral"
78
+ ]
79
+ }
80
+ }
81
+ });
82
+ function cn(...inputs) {
83
+ return merge(clsx(inputs));
84
+ }
85
+ function Spinner({ className, label }) {
86
+ return /* @__PURE__ */ jsxs(
87
+ "svg",
88
+ {
89
+ viewBox: "0 0 24 24",
90
+ fill: "none",
91
+ role: label ? "status" : void 0,
92
+ "aria-label": label,
93
+ "aria-hidden": label ? void 0 : true,
94
+ className: cn("size-4 animate-spin", className),
95
+ children: [
96
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeOpacity: "0.2", strokeWidth: "2.5" }),
97
+ /* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" })
98
+ ]
99
+ }
100
+ );
101
+ }
102
+ function Skeleton({ className, ...props }) {
103
+ return /* @__PURE__ */ jsx("div", { "data-ui": "skeleton", className: cn("animate-pulse rounded-lg bg-muted", className), ...props });
104
+ }
105
+ var Separator = forwardRef(function Separator2({ className, orientation = "horizontal", decorative = true, ...props }, ref) {
106
+ return /* @__PURE__ */ jsx(
107
+ SeparatorPrimitive.Root,
108
+ {
109
+ ref,
110
+ decorative,
111
+ orientation,
112
+ className: cn(
113
+ "shrink-0 bg-border",
114
+ orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
115
+ className
116
+ ),
117
+ ...props
118
+ }
119
+ );
120
+ });
121
+ function Kbd({ className, ...props }) {
122
+ return /* @__PURE__ */ jsx(
123
+ "kbd",
124
+ {
125
+ className: cn(
126
+ "inline-flex h-5 min-w-5 items-center justify-center rounded-md border border-border bg-card px-1.5 font-mono text-[11px] text-muted-foreground",
127
+ className
128
+ ),
129
+ ...props
130
+ }
131
+ );
132
+ }
133
+ function StatusDot({
134
+ tone = "neutral",
135
+ pulse = false,
136
+ className
137
+ }) {
138
+ const color = {
139
+ neutral: "bg-oca-subtle",
140
+ success: "bg-success",
141
+ warning: "bg-warning",
142
+ danger: "bg-destructive",
143
+ brand: "bg-brand"
144
+ }[tone];
145
+ return /* @__PURE__ */ jsx(
146
+ "span",
147
+ {
148
+ "aria-hidden": true,
149
+ className: cn("inline-block size-2 shrink-0 rounded-full", color, pulse && "oca-animate-pulse-dot", className)
150
+ }
151
+ );
152
+ }
153
+ function Toaster(props) {
154
+ return /* @__PURE__ */ jsx(
155
+ Toaster$1,
156
+ {
157
+ position: "bottom-right",
158
+ toastOptions: {
159
+ classNames: {
160
+ toast: "oca-toast rounded-2xl border border-border bg-popover text-popover-foreground shadow-lg font-sans",
161
+ title: "text-[0.9375rem] font-medium",
162
+ description: "text-sm text-muted-foreground",
163
+ actionButton: "rounded-full bg-primary text-primary-foreground",
164
+ cancelButton: "rounded-full bg-muted text-foreground"
165
+ }
166
+ },
167
+ ...props
168
+ }
169
+ );
170
+ }
171
+ var buttonVariants = cva(
172
+ [
173
+ "inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-full font-medium",
174
+ "transition-[background-color,border-color,color,box-shadow,transform] duration-150",
175
+ "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
176
+ "active:translate-y-px disabled:pointer-events-none disabled:opacity-45",
177
+ "[&_svg]:pointer-events-none [&_svg]:size-[1.1em] [&_svg]:shrink-0"
178
+ ],
179
+ {
180
+ variants: {
181
+ variant: {
182
+ primary: "bg-primary text-primary-foreground hover:bg-primary/85",
183
+ secondary: "border border-border bg-secondary text-secondary-foreground hover:border-oca-hairline-strong hover:bg-accent",
184
+ brand: "bg-brand text-brand-foreground hover:bg-oca-orange-deep",
185
+ ghost: "text-foreground hover:bg-accent",
186
+ danger: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
187
+ link: "h-auto rounded-none px-0 text-foreground underline decoration-border underline-offset-4 hover:decoration-foreground",
188
+ onInk: "bg-white text-oca-ink hover:bg-white/90",
189
+ onInkOutline: "border border-white/20 text-white hover:bg-white/10"
190
+ },
191
+ size: {
192
+ sm: "h-9 px-4 text-sm",
193
+ md: "h-11 px-5 text-[0.9375rem]",
194
+ lg: "h-14 px-7 text-[1.0625rem]",
195
+ icon: "size-10",
196
+ "icon-sm": "size-8"
197
+ }
198
+ },
199
+ compoundVariants: [{ variant: "link", className: "h-auto px-0" }],
200
+ defaultVariants: { variant: "primary", size: "md" }
201
+ }
202
+ );
203
+ var Button = forwardRef(function Button2({ className, variant, size, asChild = false, loading = false, disabled, children, type, ...props }, ref) {
204
+ const Comp = asChild ? Slot : "button";
205
+ return /* @__PURE__ */ jsx(
206
+ Comp,
207
+ {
208
+ ref,
209
+ "data-ui": "button",
210
+ className: cn(buttonVariants({ variant, size }), className),
211
+ disabled: asChild ? void 0 : disabled || loading,
212
+ "aria-busy": loading || void 0,
213
+ type: asChild ? void 0 : type ?? "button",
214
+ ...props,
215
+ children: asChild ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
216
+ loading ? /* @__PURE__ */ jsx(Spinner, { className: "size-[1.1em]" }) : null,
217
+ children
218
+ ] })
219
+ }
220
+ );
221
+ });
222
+ var badgeVariants = cva(
223
+ "inline-flex h-6 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full border px-2.5 text-[0.8125rem] font-medium leading-none",
224
+ {
225
+ variants: {
226
+ tone: {
227
+ neutral: "border-border bg-card text-foreground",
228
+ muted: "border-transparent bg-muted text-muted-foreground",
229
+ brand: "border-transparent bg-[color-mix(in_oklab,var(--oca-orange)_12%,var(--card))] text-oca-accent-ink",
230
+ success: "border-transparent bg-[color-mix(in_oklab,var(--success)_12%,var(--card))] text-success",
231
+ warning: "border-transparent bg-[color-mix(in_oklab,var(--warning)_14%,var(--card))] text-warning",
232
+ danger: "border-transparent bg-[color-mix(in_oklab,var(--destructive)_12%,var(--card))] text-destructive",
233
+ info: "border-transparent bg-[color-mix(in_oklab,var(--info)_12%,var(--card))] text-info",
234
+ ink: "border-transparent bg-oca-ink text-oca-ink-foreground",
235
+ onInk: "border-white/15 bg-white/5 text-white/90"
236
+ }
237
+ },
238
+ defaultVariants: { tone: "neutral" }
239
+ }
240
+ );
241
+ function Badge({ className, tone, ...props }) {
242
+ return /* @__PURE__ */ jsx("span", { "data-ui": "badge", className: cn(badgeVariants({ tone }), className), ...props });
243
+ }
244
+ var cardVariants = cva("relative rounded-[1.25rem] border", {
245
+ variants: {
246
+ tone: {
247
+ default: "border-border bg-card text-card-foreground",
248
+ sunken: "border-transparent bg-muted text-foreground",
249
+ ink: "border-oca-ink-line bg-oca-ink-card text-oca-ink-foreground",
250
+ outline: "border-border bg-transparent text-foreground"
251
+ },
252
+ padding: {
253
+ none: "",
254
+ sm: "p-5",
255
+ md: "p-6 md:p-8",
256
+ lg: "p-8 md:p-10"
257
+ },
258
+ interactive: {
259
+ true: "transition-colors hover:border-oca-hairline-strong focus-within:border-oca-hairline-strong",
260
+ false: ""
261
+ }
262
+ },
263
+ defaultVariants: { tone: "default", padding: "md", interactive: false }
264
+ });
265
+ var Card = forwardRef(function Card2({ className, tone, padding, interactive, ...props }, ref) {
266
+ return /* @__PURE__ */ jsx("div", { ref, "data-ui": "card", className: cn(cardVariants({ tone, padding, interactive }), className), ...props });
267
+ });
268
+ function CardHeader({ className, ...props }) {
269
+ return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-2", className), ...props });
270
+ }
271
+ function CardNumeral({ className, ...props }) {
272
+ return /* @__PURE__ */ jsx("span", { className: cn("oca-numeral block", className), ...props });
273
+ }
274
+ function CardTitle({ className, ...props }) {
275
+ return /* @__PURE__ */ jsx("h3", { className: cn("oca-title flex flex-wrap items-center gap-2.5", className), ...props });
276
+ }
277
+ function CardDescription({ className, ...props }) {
278
+ return /* @__PURE__ */ jsx("p", { className: cn("oca-body", className), ...props });
279
+ }
280
+ function CardContent({ className, ...props }) {
281
+ return /* @__PURE__ */ jsx("div", { className: cn("mt-5", className), ...props });
282
+ }
283
+ function CardFooter({ className, ...props }) {
284
+ return /* @__PURE__ */ jsx("div", { className: cn("mt-6 flex flex-wrap items-center gap-3", className), ...props });
285
+ }
286
+ var fieldBase = [
287
+ "w-full rounded-xl border border-input bg-card text-foreground placeholder:text-oca-subtle",
288
+ "text-base md:text-[0.9375rem] outline-none transition-[border-color,box-shadow]",
289
+ "focus:border-foreground/35 focus:ring-4 focus:ring-[color-mix(in_oklab,var(--oca-orange)_16%,transparent)]",
290
+ "disabled:cursor-not-allowed disabled:opacity-55",
291
+ "aria-[invalid=true]:border-destructive aria-[invalid=true]:focus:ring-[color-mix(in_oklab,var(--destructive)_14%,transparent)]"
292
+ ];
293
+ var Input = forwardRef(function Input2({ className, type = "text", ...props }, ref) {
294
+ return /* @__PURE__ */ jsx("input", { ref, type, "data-ui": "input", className: cn(fieldBase, "h-11 px-3.5", className), ...props });
295
+ });
296
+ var Textarea = forwardRef(
297
+ function Textarea2({ className, ...props }, ref) {
298
+ return /* @__PURE__ */ jsx(
299
+ "textarea",
300
+ {
301
+ ref,
302
+ "data-ui": "textarea",
303
+ className: cn(fieldBase, "min-h-28 px-3.5 py-3 leading-relaxed", className),
304
+ ...props
305
+ }
306
+ );
307
+ }
308
+ );
309
+ var Label = forwardRef(function Label2({ className, ...props }, ref) {
310
+ return /* @__PURE__ */ jsx(
311
+ LabelPrimitive.Root,
312
+ {
313
+ ref,
314
+ className: cn("text-sm font-medium leading-none text-foreground", className),
315
+ ...props
316
+ }
317
+ );
318
+ });
319
+ function Field({ label, hint, error, children, className, hideLabel }) {
320
+ const id = useId();
321
+ const hintId = hint ? `${id}-hint` : void 0;
322
+ const errorId = error ? `${id}-error` : void 0;
323
+ const describedBy = [hintId, errorId].filter(Boolean).join(" ") || void 0;
324
+ const control = isValidElement(children) ? cloneElement(children, {
325
+ id,
326
+ "aria-describedby": describedBy,
327
+ "aria-invalid": error ? true : void 0
328
+ }) : children;
329
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
330
+ /* @__PURE__ */ jsx(Label, { htmlFor: id, className: hideLabel ? "sr-only" : void 0, children: label }),
331
+ hint ? /* @__PURE__ */ jsx("p", { id: hintId, className: "text-[0.8125rem] leading-snug text-muted-foreground", children: hint }) : null,
332
+ control,
333
+ error ? /* @__PURE__ */ jsx("p", { id: errorId, role: "alert", className: "text-[0.8125rem] leading-snug text-destructive", children: error }) : null
334
+ ] });
335
+ }
336
+ var Select = SelectPrimitive.Root;
337
+ var SelectGroup = SelectPrimitive.Group;
338
+ var SelectValue = SelectPrimitive.Value;
339
+ var SelectTrigger = forwardRef(function SelectTrigger2({ className, children, ...props }, ref) {
340
+ return /* @__PURE__ */ jsxs(
341
+ SelectPrimitive.Trigger,
342
+ {
343
+ ref,
344
+ className: cn(fieldBase, "flex h-11 items-center justify-between gap-2 px-3.5 text-left", className),
345
+ ...props,
346
+ children: [
347
+ /* @__PURE__ */ jsx("span", { className: "truncate", children }),
348
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 shrink-0 text-muted-foreground" }) })
349
+ ]
350
+ }
351
+ );
352
+ });
353
+ var SelectContent = forwardRef(function SelectContent2({ className, children, position = "popper", ...props }, ref) {
354
+ return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(
355
+ SelectPrimitive.Content,
356
+ {
357
+ ref,
358
+ position,
359
+ sideOffset: 6,
360
+ className: cn(
361
+ "oca-animate-fade z-50 max-h-[min(24rem,var(--radix-select-content-available-height))] min-w-[var(--radix-select-trigger-width)] overflow-hidden rounded-xl border border-border bg-popover p-1 text-popover-foreground shadow-lg",
362
+ className
363
+ ),
364
+ ...props,
365
+ children: /* @__PURE__ */ jsx(SelectPrimitive.Viewport, { children })
366
+ }
367
+ ) });
368
+ });
369
+ var SelectItem = forwardRef(function SelectItem2({ className, children, ...props }, ref) {
370
+ return /* @__PURE__ */ jsxs(
371
+ SelectPrimitive.Item,
372
+ {
373
+ ref,
374
+ className: cn(
375
+ "relative flex h-10 cursor-default select-none items-center rounded-lg pl-3 pr-9 text-[0.9375rem] outline-none",
376
+ "data-[highlighted]:bg-accent data-[disabled]:opacity-50",
377
+ className
378
+ ),
379
+ ...props,
380
+ children: [
381
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children }),
382
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { className: "absolute right-3", children: /* @__PURE__ */ jsx(Check, { className: "size-4" }) })
383
+ ]
384
+ }
385
+ );
386
+ });
387
+ var Checkbox = forwardRef(function Checkbox2({ className, ...props }, ref) {
388
+ return /* @__PURE__ */ jsx(
389
+ CheckboxPrimitive.Root,
390
+ {
391
+ ref,
392
+ className: cn(
393
+ "peer inline-flex size-5 shrink-0 items-center justify-center rounded-[6px] border border-input bg-card",
394
+ "outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
395
+ "data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
396
+ "disabled:cursor-not-allowed disabled:opacity-50",
397
+ className
398
+ ),
399
+ ...props,
400
+ children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { children: /* @__PURE__ */ jsx(Check, { className: "size-3.5", strokeWidth: 3 }) })
401
+ }
402
+ );
403
+ });
404
+ var Switch = forwardRef(function Switch2({ className, ...props }, ref) {
405
+ return /* @__PURE__ */ jsx(
406
+ SwitchPrimitive.Root,
407
+ {
408
+ ref,
409
+ className: cn(
410
+ "peer inline-flex h-6 w-11 shrink-0 items-center rounded-full border border-transparent bg-input p-0.5",
411
+ "outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
412
+ "data-[state=checked]:bg-brand disabled:cursor-not-allowed disabled:opacity-50",
413
+ className
414
+ ),
415
+ ...props,
416
+ children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, { className: "pointer-events-none block size-5 rounded-full bg-white shadow-sm transition-transform data-[state=checked]:translate-x-5" })
417
+ }
418
+ );
419
+ });
420
+ var RadioGroup = forwardRef(function RadioGroup2({ className, ...props }, ref) {
421
+ return /* @__PURE__ */ jsx(RadioGroupPrimitive.Root, { ref, className: cn("grid gap-3", className), ...props });
422
+ });
423
+ var RadioGroupItem = forwardRef(function RadioGroupItem2({ className, ...props }, ref) {
424
+ return /* @__PURE__ */ jsx(
425
+ RadioGroupPrimitive.Item,
426
+ {
427
+ ref,
428
+ className: cn(
429
+ "inline-flex size-5 shrink-0 items-center justify-center rounded-full border border-input bg-card",
430
+ "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
431
+ "data-[state=checked]:border-primary disabled:cursor-not-allowed disabled:opacity-50",
432
+ className
433
+ ),
434
+ ...props,
435
+ children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "block size-2.5 rounded-full bg-primary" })
436
+ }
437
+ );
438
+ });
439
+ var Dialog = DialogPrimitive.Root;
440
+ var DialogTrigger = DialogPrimitive.Trigger;
441
+ var DialogClose = DialogPrimitive.Close;
442
+ var overlayClass = "oca-animate-fade fixed inset-0 z-50 bg-[rgb(10_10_10/0.38)] backdrop-blur-[2px] data-[state=closed]:opacity-0";
443
+ var DialogContent = forwardRef(function DialogContent2({ className, children, hideClose, ...props }, ref) {
444
+ return /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [
445
+ /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: overlayClass }),
446
+ /* @__PURE__ */ jsxs(
447
+ DialogPrimitive.Content,
448
+ {
449
+ ref,
450
+ className: cn(
451
+ "oca-animate-rise fixed left-1/2 top-1/2 z-50 w-[min(92vw,34rem)] -translate-x-1/2 -translate-y-1/2",
452
+ "max-h-[88vh] overflow-y-auto rounded-[1.5rem] border border-border bg-popover p-6 text-popover-foreground shadow-xl md:p-8",
453
+ "outline-none",
454
+ className
455
+ ),
456
+ ...props,
457
+ children: [
458
+ children,
459
+ hideClose ? null : /* @__PURE__ */ jsx(
460
+ DialogPrimitive.Close,
461
+ {
462
+ className: "absolute right-4 top-4 inline-flex size-9 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
463
+ "aria-label": "Close",
464
+ children: /* @__PURE__ */ jsx(X, { className: "size-4" })
465
+ }
466
+ )
467
+ ]
468
+ }
469
+ )
470
+ ] });
471
+ });
472
+ function DialogHeader({ className, ...props }) {
473
+ return /* @__PURE__ */ jsx("div", { className: cn("mb-5 flex flex-col gap-2 pr-8", className), ...props });
474
+ }
475
+ function DialogFooter({ className, ...props }) {
476
+ return /* @__PURE__ */ jsx("div", { className: cn("mt-7 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end", className), ...props });
477
+ }
478
+ var DialogTitle = forwardRef(function DialogTitle2({ className, ...props }, ref) {
479
+ return /* @__PURE__ */ jsx(
480
+ DialogPrimitive.Title,
481
+ {
482
+ ref,
483
+ className: cn("text-[1.5rem] font-normal leading-tight tracking-[-0.02em]", className),
484
+ ...props
485
+ }
486
+ );
487
+ });
488
+ var DialogDescription = forwardRef(function DialogDescription2({ className, ...props }, ref) {
489
+ return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ref, className: cn("oca-body", className), ...props });
490
+ });
491
+ var Sheet = DialogPrimitive.Root;
492
+ var SheetTrigger = DialogPrimitive.Trigger;
493
+ var SheetClose = DialogPrimitive.Close;
494
+ var SheetTitle = DialogTitle;
495
+ var SheetDescription = DialogDescription;
496
+ var sheetSide = {
497
+ right: "inset-y-0 right-0 h-full w-[min(88vw,24rem)] border-l",
498
+ left: "inset-y-0 left-0 h-full w-[min(88vw,24rem)] border-r",
499
+ bottom: "inset-x-0 bottom-0 max-h-[88vh] rounded-t-[1.5rem] border-t"
500
+ };
501
+ var SheetContent = forwardRef(function SheetContent2({ className, children, side = "right", ...props }, ref) {
502
+ return /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [
503
+ /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: overlayClass }),
504
+ /* @__PURE__ */ jsxs(
505
+ DialogPrimitive.Content,
506
+ {
507
+ ref,
508
+ className: cn(
509
+ "oca-animate-fade fixed z-50 flex flex-col gap-4 overflow-y-auto border-border bg-popover p-6 text-popover-foreground shadow-xl outline-none",
510
+ sheetSide[side],
511
+ className
512
+ ),
513
+ ...props,
514
+ children: [
515
+ children,
516
+ /* @__PURE__ */ jsx(
517
+ DialogPrimitive.Close,
518
+ {
519
+ className: "absolute right-4 top-4 inline-flex size-9 items-center justify-center rounded-full text-muted-foreground hover:bg-accent hover:text-foreground",
520
+ "aria-label": "Close",
521
+ children: /* @__PURE__ */ jsx(X, { className: "size-4" })
522
+ }
523
+ )
524
+ ]
525
+ }
526
+ )
527
+ ] });
528
+ });
529
+ var Popover = PopoverPrimitive.Root;
530
+ var PopoverTrigger = PopoverPrimitive.Trigger;
531
+ var PopoverAnchor = PopoverPrimitive.Anchor;
532
+ var PopoverContent = forwardRef(function PopoverContent2({ className, align = "center", sideOffset = 8, ...props }, ref) {
533
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
534
+ PopoverPrimitive.Content,
535
+ {
536
+ ref,
537
+ align,
538
+ sideOffset,
539
+ className: cn(
540
+ "oca-animate-fade z-50 w-72 rounded-2xl border border-border bg-popover p-4 text-popover-foreground shadow-lg outline-none",
541
+ className
542
+ ),
543
+ ...props
544
+ }
545
+ ) });
546
+ });
547
+ var TooltipProvider = TooltipPrimitive.Provider;
548
+ var Tooltip = TooltipPrimitive.Root;
549
+ var TooltipTrigger = TooltipPrimitive.Trigger;
550
+ var TooltipContent = forwardRef(function TooltipContent2({ className, sideOffset = 6, ...props }, ref) {
551
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
552
+ TooltipPrimitive.Content,
553
+ {
554
+ ref,
555
+ sideOffset,
556
+ className: cn(
557
+ "oca-animate-fade z-50 max-w-xs rounded-lg bg-oca-ink px-2.5 py-1.5 text-[0.8125rem] leading-snug text-oca-ink-foreground",
558
+ className
559
+ ),
560
+ ...props
561
+ }
562
+ ) });
563
+ });
564
+ var DropdownMenu = DropdownMenuPrimitive.Root;
565
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
566
+ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
567
+ var DropdownMenuContent = forwardRef(function DropdownMenuContent2({ className, sideOffset = 8, ...props }, ref) {
568
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
569
+ DropdownMenuPrimitive.Content,
570
+ {
571
+ ref,
572
+ sideOffset,
573
+ className: cn(
574
+ "oca-animate-fade z-50 min-w-56 overflow-hidden rounded-2xl border border-border bg-popover p-1.5 text-popover-foreground shadow-lg",
575
+ className
576
+ ),
577
+ ...props
578
+ }
579
+ ) });
580
+ });
581
+ var DropdownMenuItem = forwardRef(function DropdownMenuItem2({ className, destructive, ...props }, ref) {
582
+ return /* @__PURE__ */ jsx(
583
+ DropdownMenuPrimitive.Item,
584
+ {
585
+ ref,
586
+ className: cn(
587
+ "flex h-10 cursor-default select-none items-center gap-2.5 rounded-xl px-3 text-[0.9375rem] outline-none",
588
+ "data-[highlighted]:bg-accent data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:text-muted-foreground",
589
+ destructive && "text-destructive [&_svg]:text-destructive",
590
+ className
591
+ ),
592
+ ...props
593
+ }
594
+ );
595
+ });
596
+ var DropdownMenuLabel = forwardRef(function DropdownMenuLabel2({ className, ...props }, ref) {
597
+ return /* @__PURE__ */ jsx(
598
+ DropdownMenuPrimitive.Label,
599
+ {
600
+ ref,
601
+ className: cn("px-3 pb-1.5 pt-2 text-[0.8125rem] text-muted-foreground", className),
602
+ ...props
603
+ }
604
+ );
605
+ });
606
+ var DropdownMenuSeparator = forwardRef(function DropdownMenuSeparator2({ className, ...props }, ref) {
607
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, { ref, className: cn("my-1.5 h-px bg-border", className), ...props });
608
+ });
609
+ var LookContext = createContext("pill");
610
+ var Tabs = forwardRef(function Tabs2({ look = "pill", ...props }, ref) {
611
+ return /* @__PURE__ */ jsx(LookContext.Provider, { value: look, children: /* @__PURE__ */ jsx(TabsPrimitive.Root, { ref, ...props }) });
612
+ });
613
+ var TabsList = forwardRef(function TabsList2({ className, ...props }, ref) {
614
+ const look = useContext(LookContext);
615
+ return /* @__PURE__ */ jsx(
616
+ TabsPrimitive.List,
617
+ {
618
+ ref,
619
+ className: cn(
620
+ look === "pill" ? "inline-flex max-w-full items-center gap-1 overflow-x-auto rounded-full bg-muted p-1" : "flex max-w-full items-center gap-6 overflow-x-auto border-b border-border",
621
+ className
622
+ ),
623
+ ...props
624
+ }
625
+ );
626
+ });
627
+ var TabsTrigger = forwardRef(function TabsTrigger2({ className, ...props }, ref) {
628
+ const look = useContext(LookContext);
629
+ return /* @__PURE__ */ jsx(
630
+ TabsPrimitive.Trigger,
631
+ {
632
+ ref,
633
+ className: cn(
634
+ "inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap text-[0.9375rem] outline-none transition-colors",
635
+ "focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
636
+ look === "pill" ? "h-9 rounded-full px-4 text-muted-foreground hover:text-foreground data-[state=active]:bg-card data-[state=active]:text-foreground data-[state=active]:shadow-sm" : "-mb-px h-11 border-b-2 border-transparent text-muted-foreground hover:text-foreground data-[state=active]:border-foreground data-[state=active]:text-foreground",
637
+ className
638
+ ),
639
+ ...props
640
+ }
641
+ );
642
+ });
643
+ var TabsContent = forwardRef(function TabsContent2({ className, ...props }, ref) {
644
+ return /* @__PURE__ */ jsx(TabsPrimitive.Content, { ref, className: cn("mt-6 outline-none", className), ...props });
645
+ });
646
+ var TOP = "0,3 2,2 6,4 14,0 16,1 6,6";
647
+ var LEFT = "0,3 6,6 6,8 0,5";
648
+ var RIGHT = "6,6 16,1 16,3 6,8";
649
+ var MARK_FACES = { top: "#FED8AB", left: "#FB933C", right: "#EA580B" };
650
+ function Mark({ title, size, className, ...rest }) {
651
+ return /* @__PURE__ */ jsxs(
652
+ "svg",
653
+ {
654
+ viewBox: "0 0 16 8",
655
+ width: size,
656
+ height: size ? size / 2 : void 0,
657
+ role: title ? "img" : void 0,
658
+ "aria-hidden": title ? void 0 : true,
659
+ className: cn("shrink-0", className),
660
+ ...rest,
661
+ children: [
662
+ title ? /* @__PURE__ */ jsx("title", { children: title }) : null,
663
+ /* @__PURE__ */ jsx("polygon", { points: LEFT, fill: MARK_FACES.left }),
664
+ /* @__PURE__ */ jsx("polygon", { points: RIGHT, fill: MARK_FACES.right }),
665
+ /* @__PURE__ */ jsx("polygon", { points: TOP, fill: MARK_FACES.top })
666
+ ]
667
+ }
668
+ );
669
+ }
670
+ function AppIcon({ title, size = 32, className, ...rest }) {
671
+ return /* @__PURE__ */ jsxs(
672
+ "svg",
673
+ {
674
+ viewBox: "0 0 24 24",
675
+ width: size,
676
+ height: size,
677
+ role: title ? "img" : void 0,
678
+ "aria-hidden": title ? void 0 : true,
679
+ className: cn("shrink-0", className),
680
+ ...rest,
681
+ children: [
682
+ title ? /* @__PURE__ */ jsx("title", { children: title }) : null,
683
+ /* @__PURE__ */ jsx(
684
+ "rect",
685
+ {
686
+ width: "24",
687
+ height: "24",
688
+ rx: "6.25",
689
+ style: { fill: "var(--oca-icon-tile, #0A0A0A)", stroke: "var(--oca-icon-ring, transparent)" },
690
+ strokeWidth: "0.5"
691
+ }
692
+ ),
693
+ /* @__PURE__ */ jsxs("g", { transform: "translate(4.25 8.1) scale(0.97)", children: [
694
+ /* @__PURE__ */ jsx("polygon", { points: LEFT, fill: MARK_FACES.left }),
695
+ /* @__PURE__ */ jsx("polygon", { points: RIGHT, fill: MARK_FACES.right }),
696
+ /* @__PURE__ */ jsx("polygon", { points: TOP, fill: MARK_FACES.top })
697
+ ] })
698
+ ]
699
+ }
700
+ );
701
+ }
702
+ function Lockup({ name = "orangecheck", size = 28, className }) {
703
+ return /* @__PURE__ */ jsxs(
704
+ "span",
705
+ {
706
+ className: cn("inline-flex items-center font-medium tracking-[-0.01em]", className),
707
+ style: { gap: size * 0.32, fontSize: size * 0.56 },
708
+ children: [
709
+ /* @__PURE__ */ jsx(AppIcon, { size }),
710
+ /* @__PURE__ */ jsx("span", { children: name })
711
+ ]
712
+ }
713
+ );
714
+ }
715
+ var SPHERE_GRADIENT = "radial-gradient(circle at 50% 42%, #fff8f3 0%, #ffe2d3 22%, #ffb48d 45%, #ff8a55 68%, #ff6a2c 100%)";
716
+ function HalftoneSphere({ src, alt, stadium = false, float = false, className, style }) {
717
+ return /* @__PURE__ */ jsxs("div", { className: cn("relative aspect-square w-full", className), style, children: [
718
+ stadium ? (
719
+ // Measured from the deck's title slide: a rounded square, its corners
720
+ // 17% of the sphere, level with the sphere's foot, reaching left behind
721
+ // the headline. On phones a ring inside the gutter, since the offset
722
+ // would push the page sideways.
723
+ /* @__PURE__ */ jsx(
724
+ "div",
725
+ {
726
+ "aria-hidden": true,
727
+ className: "oca-stadium pointer-events-none absolute inset-[-6%] rounded-full md:[inset:-12%_14%_0%_-26%] md:rounded-[17%]"
728
+ }
729
+ )
730
+ ) : null,
731
+ /* @__PURE__ */ jsx(
732
+ "div",
733
+ {
734
+ className: cn("relative size-full overflow-hidden rounded-full", float && "oca-animate-float"),
735
+ style: { background: SPHERE_GRADIENT },
736
+ children: /* @__PURE__ */ jsx("img", { src, alt, className: "absolute inset-0 size-full select-none", draggable: false })
737
+ }
738
+ )
739
+ ] });
740
+ }
741
+ function IsoCheck({ size = 360, settle = false, shadow = true, title, className }) {
742
+ return /* @__PURE__ */ jsxs("div", { className: cn("relative inline-block", settle && "oca-animate-settle", className), style: { width: size }, children: [
743
+ /* @__PURE__ */ jsx(Mark, { size, title, className: "relative z-10 block" }),
744
+ shadow ? /* @__PURE__ */ jsx(
745
+ "div",
746
+ {
747
+ "aria-hidden": true,
748
+ className: "absolute left-[8%] right-[8%] rounded-[50%] opacity-60 blur-xl",
749
+ style: { height: size * 0.08, bottom: -size * 0.04, background: "rgb(234 88 11 / 0.18)" }
750
+ }
751
+ ) : null
752
+ ] });
753
+ }
754
+ function Eyebrow({ className, onInk, ...props }) {
755
+ return /* @__PURE__ */ jsx("p", { className: cn("oca-eyebrow", onInk && "text-oca-ink-eyebrow", className), ...props });
756
+ }
757
+ function Display({ level = 2, as, className, ...props }) {
758
+ const tag = as ?? `h${level}`;
759
+ return createElement(tag, { className: cn(`oca-display-${level}`, className), ...props });
760
+ }
761
+ function Accent({ children, className }) {
762
+ return /* @__PURE__ */ jsx("span", { className: cn("text-oca-accent-display", className), children });
763
+ }
764
+ function Lead({ className, ...props }) {
765
+ return /* @__PURE__ */ jsx("p", { className: cn("oca-lead max-w-[40rem]", className), ...props });
766
+ }
767
+ function Footnote({ className, ...props }) {
768
+ return /* @__PURE__ */ jsx("p", { className: cn("text-[0.9375rem] text-muted-foreground", className), ...props });
769
+ }
770
+ function Prose({ className, ...props }) {
771
+ return /* @__PURE__ */ jsx(
772
+ "div",
773
+ {
774
+ className: cn(
775
+ "max-w-[42rem] text-[1.0625rem] leading-[1.7] text-muted-foreground",
776
+ "[&_h2]:oca-display-3 [&_h2]:mb-4 [&_h2]:mt-14 [&_h2]:text-foreground",
777
+ "[&_h3]:oca-title [&_h3]:mb-3 [&_h3]:mt-10 [&_h3]:text-foreground",
778
+ "[&_p]:my-4 [&_strong]:font-medium [&_strong]:text-foreground",
779
+ "[&_a]:text-foreground [&_a]:underline [&_a]:decoration-border [&_a]:underline-offset-4 hover:[&_a]:decoration-foreground",
780
+ "[&_ul]:my-4 [&_ul]:list-disc [&_ul]:pl-5 [&_li]:my-1.5 [&_code]:text-foreground",
781
+ className
782
+ ),
783
+ ...props
784
+ }
785
+ );
786
+ }
787
+ var sectionVariants = cva("relative w-full overflow-x-clip", {
788
+ variants: {
789
+ tone: {
790
+ canvas: "bg-background text-foreground",
791
+ card: "bg-card text-card-foreground",
792
+ ink: "bg-oca-ink text-oca-ink-foreground",
793
+ brand: "bg-brand text-brand-foreground"
794
+ },
795
+ space: {
796
+ none: "",
797
+ sm: "py-12 md:py-16",
798
+ md: "oca-section",
799
+ lg: "py-24 md:py-40"
800
+ }
801
+ },
802
+ defaultVariants: { tone: "canvas", space: "md" }
803
+ });
804
+ function Section({ tone, space, contained = true, className, children, ...props }) {
805
+ return /* @__PURE__ */ jsx("section", { className: cn(sectionVariants({ tone, space }), className), ...props, children: contained ? /* @__PURE__ */ jsx("div", { className: "oca-container", children }) : children });
806
+ }
807
+ function Container({ className, ...props }) {
808
+ return /* @__PURE__ */ jsx("div", { className: cn("oca-container", className), ...props });
809
+ }
810
+ function SectionIntro({
811
+ className,
812
+ align = "start",
813
+ ...props
814
+ }) {
815
+ return /* @__PURE__ */ jsx(
816
+ "div",
817
+ {
818
+ className: cn(
819
+ "flex flex-col gap-4 md:gap-5",
820
+ align === "center" && "mx-auto items-center text-center",
821
+ className
822
+ ),
823
+ ...props
824
+ }
825
+ );
826
+ }
827
+ var pad = (n) => String(n + 1).padStart(2, "0");
828
+ function StepGrid({ items, look = "cards", className }) {
829
+ const cols = items.length >= 3 ? "md:grid-cols-3" : items.length === 2 ? "md:grid-cols-2" : "";
830
+ return /* @__PURE__ */ jsx("ol", { className: cn("grid gap-4 md:gap-5", cols, className), children: items.map(
831
+ (it, i) => look === "plain" ? /* @__PURE__ */ jsxs("li", { className: "flex flex-col gap-3 pr-4", children: [
832
+ /* @__PURE__ */ jsx(CardNumeral, { children: it.numeral ?? pad(i) }),
833
+ /* @__PURE__ */ jsxs(CardTitle, { className: "oca-title-sm", children: [
834
+ it.title,
835
+ it.badge ? /* @__PURE__ */ jsx(Badge, { children: it.badge }) : null
836
+ ] }),
837
+ /* @__PURE__ */ jsx("div", { className: "oca-body text-[0.9375rem]", children: it.body })
838
+ ] }, i) : look === "ink" ? /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(Card, { tone: "ink", padding: "md", className: "h-full", children: [
839
+ /* @__PURE__ */ jsxs(CardTitle, { className: "text-oca-ink-title", children: [
840
+ it.title,
841
+ it.badge ? /* @__PURE__ */ jsx(Badge, { tone: "onInk", children: it.badge }) : null
842
+ ] }),
843
+ /* @__PURE__ */ jsx("div", { className: "mt-3 text-[1rem] leading-relaxed text-oca-ink-muted", children: it.body })
844
+ ] }) }, i) : /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(Card, { padding: "md", className: "flex h-full flex-col gap-3", children: [
845
+ /* @__PURE__ */ jsx(CardNumeral, { children: it.numeral ?? pad(i) }),
846
+ /* @__PURE__ */ jsxs(CardTitle, { children: [
847
+ it.title,
848
+ it.badge ? /* @__PURE__ */ jsx(Badge, { children: it.badge }) : null
849
+ ] }),
850
+ /* @__PURE__ */ jsx("div", { className: "oca-body", children: it.body })
851
+ ] }) }, i)
852
+ ) });
853
+ }
854
+ var KIND = {
855
+ package: "text-oca-code-package",
856
+ tag: "text-oca-code-tag",
857
+ link: "text-oca-code-link"
858
+ };
859
+ function PackageCard({ items, className }) {
860
+ return /* @__PURE__ */ jsx(
861
+ "div",
862
+ {
863
+ className: cn(
864
+ "grid gap-x-10 gap-y-7 rounded-[1.25rem] border border-oca-ink-line bg-oca-ink-card p-6 text-oca-ink-foreground md:grid-cols-2 md:p-9",
865
+ className
866
+ ),
867
+ children: items.map((it, i) => {
868
+ const code = /* @__PURE__ */ jsx("span", { className: cn("text-[0.9375rem]", KIND[it.kind ?? "package"]), children: it.code });
869
+ return /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-1.5", children: [
870
+ /* @__PURE__ */ jsx("h3", { className: "text-[1.125rem] font-semibold tracking-[-0.01em] text-oca-ink-title", children: it.title }),
871
+ it.href ? /* @__PURE__ */ jsx("a", { href: it.href, className: "w-fit underline decoration-transparent underline-offset-4 hover:decoration-current", children: code }) : code,
872
+ it.note ? /* @__PURE__ */ jsxs("p", { className: "text-[0.9375rem] leading-relaxed text-oca-ink-subtle", children: [
873
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "// " }),
874
+ it.note
875
+ ] }) : null
876
+ ] }, i);
877
+ })
878
+ }
879
+ );
880
+ }
881
+ function CodeBlock({
882
+ code,
883
+ caption,
884
+ className
885
+ }) {
886
+ return /* @__PURE__ */ jsxs("figure", { className: cn("overflow-hidden rounded-[1.25rem] border border-oca-ink-line bg-oca-ink-card", className), children: [
887
+ caption ? /* @__PURE__ */ jsx("figcaption", { className: "border-b border-oca-ink-line px-5 py-3 text-[0.8125rem] text-oca-ink-subtle", children: caption }) : null,
888
+ /* @__PURE__ */ jsx("pre", { className: "overflow-x-auto p-5 font-mono text-[0.875rem] leading-relaxed text-oca-ink-muted", children: /* @__PURE__ */ jsx("code", { children: code }) })
889
+ ] });
890
+ }
891
+ var LABEL = {
892
+ yes: "Yes",
893
+ testing: "In testing",
894
+ "not-yet": "Not yet",
895
+ no: "No"
896
+ };
897
+ var TONE = {
898
+ yes: "text-oca-accent-ink",
899
+ testing: "text-foreground",
900
+ "not-yet": "text-muted-foreground",
901
+ no: "text-muted-foreground"
902
+ };
903
+ function TruthTable({
904
+ rows,
905
+ statusHeading = "Status",
906
+ whatHeading = "What",
907
+ className
908
+ }) {
909
+ return /* @__PURE__ */ jsx("div", { className: cn("overflow-hidden rounded-xl border border-oca-hairline-strong", className), children: /* @__PURE__ */ jsxs("table", { className: "w-full border-collapse text-left text-[0.9375rem] md:text-[1rem]", children: [
910
+ /* @__PURE__ */ jsx("thead", { className: "bg-oca-table-head", children: /* @__PURE__ */ jsxs("tr", { children: [
911
+ /* @__PURE__ */ jsx("th", { scope: "col", className: "w-[30%] border-b border-oca-hairline-strong px-4 py-3 font-semibold md:w-[22%]", children: statusHeading }),
912
+ /* @__PURE__ */ jsx("th", { scope: "col", className: "border-b border-l border-oca-hairline-strong px-4 py-3 font-semibold", children: whatHeading })
913
+ ] }) }),
914
+ /* @__PURE__ */ jsx("tbody", { className: "bg-card", children: rows.map((r, i) => /* @__PURE__ */ jsxs("tr", { className: "align-top", children: [
915
+ /* @__PURE__ */ jsx(
916
+ "td",
917
+ {
918
+ className: cn(
919
+ "border-t border-oca-hairline-strong px-4 py-3 font-medium",
920
+ i === 0 && "border-t-0",
921
+ TONE[r.status]
922
+ ),
923
+ children: LABEL[r.status]
924
+ }
925
+ ),
926
+ /* @__PURE__ */ jsx(
927
+ "td",
928
+ {
929
+ className: cn(
930
+ "border-l border-t border-oca-hairline-strong px-4 py-3 leading-relaxed",
931
+ i === 0 && "border-t-0"
932
+ ),
933
+ children: r.what
934
+ }
935
+ )
936
+ ] }, i)) })
937
+ ] }) });
938
+ }
939
+ var INT = new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 });
940
+ var COMPACT = new Intl.NumberFormat("en-US", { notation: "compact", maximumFractionDigits: 1 });
941
+ function satsText(value, opts = {}) {
942
+ if (value == null || !Number.isFinite(value)) return null;
943
+ const whole = Math.trunc(value);
944
+ const body = (opts.compact ? COMPACT : INT).format(Math.abs(whole));
945
+ const sign = whole < 0 ? "\u2212" : opts.signed && whole > 0 ? "+" : "";
946
+ const unit = opts.unit === "none" ? "" : whole === 1 || whole === -1 ? " sat" : " sats";
947
+ return `${sign}${body}${unit}`;
948
+ }
949
+ function Sats({ value, unit, compact, signed, unknown = "\u2014", className, ...props }) {
950
+ const text = satsText(value, { unit, compact, signed });
951
+ if (text === null) {
952
+ return /* @__PURE__ */ jsxs("span", { className: cn("oca-tabular text-muted-foreground", className), ...props, children: [
953
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: unknown }),
954
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "unknown" })
955
+ ] });
956
+ }
957
+ return /* @__PURE__ */ jsx("span", { className: cn("oca-tabular whitespace-nowrap", className), ...props, children: text });
958
+ }
959
+ function UsdApprox({
960
+ sats,
961
+ usdPerBtc,
962
+ className
963
+ }) {
964
+ if (sats == null || usdPerBtc == null || !Number.isFinite(sats) || !Number.isFinite(usdPerBtc)) return null;
965
+ const usd = sats / 1e8 * usdPerBtc;
966
+ const text = new Intl.NumberFormat("en-US", {
967
+ style: "currency",
968
+ currency: "USD",
969
+ maximumFractionDigits: usd < 1 ? 4 : 2
970
+ }).format(usd);
971
+ return /* @__PURE__ */ jsxs("span", { className: cn("oca-tabular text-muted-foreground", className), children: [
972
+ "\u2248 ",
973
+ text
974
+ ] });
975
+ }
976
+ function SatsFigure({
977
+ label,
978
+ value,
979
+ hint,
980
+ className
981
+ }) {
982
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1.5", className), children: [
983
+ /* @__PURE__ */ jsx("span", { className: "text-[0.9375rem] text-muted-foreground", children: label }),
984
+ /* @__PURE__ */ jsxs("span", { className: "oca-display-3 oca-tabular", children: [
985
+ /* @__PURE__ */ jsx(Sats, { value, unit: "none" }),
986
+ /* @__PURE__ */ jsx("span", { className: "ml-2 text-[0.5em] tracking-normal text-muted-foreground", children: "sats" })
987
+ ] }),
988
+ hint ? /* @__PURE__ */ jsx("span", { className: "text-[0.875rem] text-muted-foreground", children: hint }) : null
989
+ ] });
990
+ }
991
+ function PageHeader({
992
+ eyebrow,
993
+ title,
994
+ description,
995
+ actions,
996
+ className
997
+ }) {
998
+ return /* @__PURE__ */ jsxs("header", { className: cn("flex flex-col gap-5 md:flex-row md:items-end md:justify-between", className), children: [
999
+ /* @__PURE__ */ jsxs("div", { className: "flex max-w-[44rem] flex-col gap-3", children: [
1000
+ eyebrow ? /* @__PURE__ */ jsx("p", { className: "oca-eyebrow", children: eyebrow }) : null,
1001
+ /* @__PURE__ */ jsx("h1", { className: "oca-display-3", children: title }),
1002
+ description ? /* @__PURE__ */ jsx("p", { className: "oca-body text-[1.0625rem]", children: description }) : null
1003
+ ] }),
1004
+ actions ? /* @__PURE__ */ jsx("div", { className: "flex shrink-0 flex-wrap items-center gap-3", children: actions }) : null
1005
+ ] });
1006
+ }
1007
+ function StatCard({
1008
+ label,
1009
+ value,
1010
+ hint,
1011
+ className
1012
+ }) {
1013
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2 rounded-[1.25rem] border border-border bg-card p-5 md:p-6", className), children: [
1014
+ /* @__PURE__ */ jsx("span", { className: "text-[0.875rem] text-muted-foreground", children: label }),
1015
+ /* @__PURE__ */ jsx("span", { className: "oca-tabular text-[1.75rem] leading-tight tracking-[-0.02em]", children: value }),
1016
+ hint ? /* @__PURE__ */ jsx("span", { className: "text-[0.8125rem] leading-snug text-muted-foreground", children: hint }) : null
1017
+ ] });
1018
+ }
1019
+ function StatGrid({ className, ...props }) {
1020
+ return /* @__PURE__ */ jsx("div", { className: cn("grid grid-cols-2 gap-3 md:grid-cols-4 md:gap-4", className), ...props });
1021
+ }
1022
+ function KeyValueList({ items, className }) {
1023
+ return /* @__PURE__ */ jsx("dl", { className: cn("divide-y divide-border rounded-[1.25rem] border border-border bg-card", className), children: items.map((it, i) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 px-5 py-3.5 sm:flex-row sm:items-baseline sm:gap-6", children: [
1024
+ /* @__PURE__ */ jsx("dt", { className: "shrink-0 text-[0.875rem] text-muted-foreground sm:w-48", children: it.label }),
1025
+ /* @__PURE__ */ jsx("dd", { className: cn("min-w-0 break-words text-[0.9375rem]", it.mono && "font-mono text-[0.875rem]"), children: it.value })
1026
+ ] }, i)) });
1027
+ }
1028
+ function DataTable({
1029
+ columns,
1030
+ rows,
1031
+ rowKey,
1032
+ empty,
1033
+ caption,
1034
+ className
1035
+ }) {
1036
+ if (rows.length === 0 && empty) return /* @__PURE__ */ jsx(Fragment, { children: empty });
1037
+ return /* @__PURE__ */ jsx("div", { className: cn("overflow-x-auto rounded-[1.25rem] border border-border bg-card", className), children: /* @__PURE__ */ jsxs("table", { className: "w-full border-collapse text-left text-[0.9375rem]", children: [
1038
+ caption ? /* @__PURE__ */ jsx("caption", { className: "sr-only", children: caption }) : null,
1039
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: "border-b border-border", children: columns.map((c) => /* @__PURE__ */ jsx(
1040
+ "th",
1041
+ {
1042
+ scope: "col",
1043
+ className: cn(
1044
+ "whitespace-nowrap px-5 py-3 text-[0.8125rem] font-medium text-muted-foreground",
1045
+ c.align === "end" && "text-right",
1046
+ c.wide && "hidden md:table-cell"
1047
+ ),
1048
+ children: c.header
1049
+ },
1050
+ c.key
1051
+ )) }) }),
1052
+ /* @__PURE__ */ jsx("tbody", { className: "divide-y divide-border", children: rows.map((r, i) => /* @__PURE__ */ jsx("tr", { className: "transition-colors hover:bg-accent/60", children: columns.map((c) => /* @__PURE__ */ jsx(
1053
+ "td",
1054
+ {
1055
+ className: cn(
1056
+ "px-5 py-3.5 align-middle",
1057
+ c.align === "end" && "text-right",
1058
+ c.wide && "hidden md:table-cell"
1059
+ ),
1060
+ children: c.cell(r)
1061
+ },
1062
+ c.key
1063
+ )) }, rowKey(r, i))) })
1064
+ ] }) });
1065
+ }
1066
+ function EmptyState({
1067
+ title,
1068
+ children,
1069
+ action,
1070
+ className
1071
+ }) {
1072
+ return /* @__PURE__ */ jsxs(
1073
+ "div",
1074
+ {
1075
+ className: cn(
1076
+ "flex flex-col items-center gap-4 rounded-[1.25rem] border border-dashed border-oca-hairline-strong px-6 py-12 text-center",
1077
+ className
1078
+ ),
1079
+ children: [
1080
+ /* @__PURE__ */ jsx(Mark, { size: 56 }),
1081
+ /* @__PURE__ */ jsx("h3", { className: "oca-title-sm", children: title }),
1082
+ children ? /* @__PURE__ */ jsx("div", { className: "oca-body max-w-md text-[0.9375rem]", children }) : null,
1083
+ action ? /* @__PURE__ */ jsx("div", { className: "mt-1 flex flex-wrap justify-center gap-3", children: action }) : null
1084
+ ]
1085
+ }
1086
+ );
1087
+ }
1088
+ var NOTICE = {
1089
+ neutral: "border-border bg-card",
1090
+ info: "border-[color-mix(in_oklab,var(--info)_30%,var(--border))] bg-[color-mix(in_oklab,var(--info)_6%,var(--card))]",
1091
+ success: "border-[color-mix(in_oklab,var(--success)_30%,var(--border))] bg-[color-mix(in_oklab,var(--success)_6%,var(--card))]",
1092
+ warning: "border-[color-mix(in_oklab,var(--warning)_35%,var(--border))] bg-[color-mix(in_oklab,var(--warning)_7%,var(--card))]",
1093
+ danger: "border-[color-mix(in_oklab,var(--destructive)_32%,var(--border))] bg-[color-mix(in_oklab,var(--destructive)_6%,var(--card))]",
1094
+ brand: "border-[color-mix(in_oklab,var(--oca-orange)_35%,var(--border))] bg-[color-mix(in_oklab,var(--oca-orange)_7%,var(--card))]"
1095
+ };
1096
+ var NOTICE_TITLE = {
1097
+ neutral: "text-foreground",
1098
+ info: "text-info",
1099
+ success: "text-success",
1100
+ warning: "text-warning",
1101
+ danger: "text-destructive",
1102
+ brand: "text-oca-accent-ink"
1103
+ };
1104
+ function Notice({
1105
+ tone = "neutral",
1106
+ title,
1107
+ children,
1108
+ action,
1109
+ className
1110
+ }) {
1111
+ return /* @__PURE__ */ jsxs(
1112
+ "div",
1113
+ {
1114
+ role: tone === "danger" || tone === "warning" ? "alert" : "note",
1115
+ className: cn(
1116
+ "flex flex-col gap-3 rounded-2xl border px-5 py-4 sm:flex-row sm:items-start sm:justify-between",
1117
+ NOTICE[tone],
1118
+ className
1119
+ ),
1120
+ children: [
1121
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [
1122
+ title ? /* @__PURE__ */ jsx("p", { className: cn("text-[0.9375rem] font-medium", NOTICE_TITLE[tone]), children: title }) : null,
1123
+ children ? /* @__PURE__ */ jsx("div", { className: "text-[0.9375rem] leading-relaxed text-foreground/85", children }) : null
1124
+ ] }),
1125
+ action ? /* @__PURE__ */ jsx("div", { className: "shrink-0", children: action }) : null
1126
+ ]
1127
+ }
1128
+ );
1129
+ }
1130
+ function middle(v, head, tail) {
1131
+ return v.length <= head + tail + 1 ? v : `${v.slice(0, head)}\u2026${v.slice(-tail)}`;
1132
+ }
1133
+ function useCopy(timeoutMs = 1600) {
1134
+ const [copied, setCopied] = useState(false);
1135
+ const t = useRef(null);
1136
+ useEffect(() => () => {
1137
+ if (t.current) clearTimeout(t.current);
1138
+ }, []);
1139
+ const copy = useCallback(
1140
+ async (text) => {
1141
+ try {
1142
+ await navigator.clipboard.writeText(text);
1143
+ setCopied(true);
1144
+ if (t.current) clearTimeout(t.current);
1145
+ t.current = setTimeout(() => setCopied(false), timeoutMs);
1146
+ } catch {
1147
+ setCopied(false);
1148
+ }
1149
+ },
1150
+ [timeoutMs]
1151
+ );
1152
+ return { copied, copy };
1153
+ }
1154
+ function CopyButton({ value, label = "Copy", className }) {
1155
+ const { copied, copy } = useCopy();
1156
+ return /* @__PURE__ */ jsxs(
1157
+ "button",
1158
+ {
1159
+ type: "button",
1160
+ onClick: () => void copy(value),
1161
+ "aria-label": copied ? "Copied" : label,
1162
+ className: cn(
1163
+ "inline-flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
1164
+ className
1165
+ ),
1166
+ children: [
1167
+ copied ? /* @__PURE__ */ jsx(Check, { className: "size-4 text-success" }) : /* @__PURE__ */ jsx(Copy, { className: "size-4" }),
1168
+ /* @__PURE__ */ jsx("span", { "aria-live": "polite", className: "sr-only", children: copied ? "Copied" : "" })
1169
+ ]
1170
+ }
1171
+ );
1172
+ }
1173
+ function HashChip({
1174
+ value,
1175
+ head = 8,
1176
+ tail = 6,
1177
+ copy = true,
1178
+ href,
1179
+ className
1180
+ }) {
1181
+ const shown = middle(value, head, tail);
1182
+ const text = /* @__PURE__ */ jsx("span", { title: value, className: "font-mono text-[0.875rem]", children: shown });
1183
+ return /* @__PURE__ */ jsxs("span", { className: cn("inline-flex max-w-full items-center gap-1", className), children: [
1184
+ href ? /* @__PURE__ */ jsx("a", { href, className: "underline decoration-border underline-offset-4 hover:decoration-foreground", children: text }) : text,
1185
+ copy ? /* @__PURE__ */ jsx(CopyButton, { value, label: "Copy full value" }) : null
1186
+ ] });
1187
+ }
1188
+ function ProgressSteps({ steps, className }) {
1189
+ return /* @__PURE__ */ jsx("ol", { className: cn("flex flex-col gap-0", className), children: steps.map((s, i) => {
1190
+ const last = i === steps.length - 1;
1191
+ return /* @__PURE__ */ jsxs("li", { className: "relative flex gap-4 pb-6 last:pb-0", "aria-current": s.state === "current" ? "step" : void 0, children: [
1192
+ !last ? /* @__PURE__ */ jsx(
1193
+ "span",
1194
+ {
1195
+ "aria-hidden": true,
1196
+ className: cn(
1197
+ "absolute left-[11px] top-7 h-[calc(100%-1.5rem)] w-px",
1198
+ s.state === "done" ? "bg-foreground/30" : "bg-border"
1199
+ )
1200
+ }
1201
+ ) : null,
1202
+ /* @__PURE__ */ jsx(
1203
+ "span",
1204
+ {
1205
+ className: cn(
1206
+ "relative z-10 mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full border text-[0.75rem] oca-tabular",
1207
+ s.state === "done" && "border-primary bg-primary text-primary-foreground",
1208
+ s.state === "current" && "border-brand bg-card text-oca-accent-ink",
1209
+ s.state === "upcoming" && "border-border bg-card text-muted-foreground",
1210
+ s.state === "blocked" && "border-destructive bg-card text-destructive"
1211
+ ),
1212
+ children: s.state === "done" ? /* @__PURE__ */ jsx(Check, { className: "size-3.5", strokeWidth: 3 }) : String(i + 1).padStart(2, "0")
1213
+ }
1214
+ ),
1215
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [
1216
+ /* @__PURE__ */ jsx("span", { className: cn("text-[0.9375rem]", s.state === "upcoming" ? "text-muted-foreground" : "font-medium"), children: s.label }),
1217
+ s.hint ? /* @__PURE__ */ jsx("span", { className: "text-[0.875rem] leading-snug text-muted-foreground", children: s.hint }) : null
1218
+ ] })
1219
+ ] }, i);
1220
+ }) });
1221
+ }
1222
+ function ActivityList({ items, empty, className }) {
1223
+ if (items.length === 0 && empty) return /* @__PURE__ */ jsx(Fragment, { children: empty });
1224
+ return /* @__PURE__ */ jsx("ul", { className: cn("divide-y divide-border rounded-[1.25rem] border border-border bg-card", className), children: items.map((it) => {
1225
+ const body = /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4 px-5 py-4", children: [
1226
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
1227
+ /* @__PURE__ */ jsx("span", { className: "truncate text-[0.9375rem]", children: it.title }),
1228
+ it.meta ? /* @__PURE__ */ jsx("span", { className: "truncate text-[0.8125rem] text-muted-foreground", children: it.meta }) : null
1229
+ ] }),
1230
+ it.trailing ? /* @__PURE__ */ jsx("div", { className: "shrink-0 text-right", children: it.trailing }) : null
1231
+ ] });
1232
+ return /* @__PURE__ */ jsx("li", { children: it.href ? /* @__PURE__ */ jsx("a", { href: it.href, className: "block transition-colors hover:bg-accent/60", children: body }) : body }, it.id);
1233
+ }) });
1234
+ }
1235
+ function NavLink({ item, className, onNavigate }) {
1236
+ const cls = cn(
1237
+ "rounded-full px-3 py-2 text-[0.9375rem] transition-colors",
1238
+ item.active ? "text-foreground" : "text-muted-foreground hover:text-foreground",
1239
+ className
1240
+ );
1241
+ if (item.external) {
1242
+ return /* @__PURE__ */ jsx("a", { href: item.href, className: cls, rel: "noreferrer", onClick: onNavigate, children: item.label });
1243
+ }
1244
+ return /* @__PURE__ */ jsx(Link2, { href: item.href, className: cls, "aria-current": item.active ? "page" : void 0, onClick: onNavigate, children: item.label });
1245
+ }
1246
+ function SiteHeader({
1247
+ home = "/",
1248
+ brand,
1249
+ nav = [],
1250
+ actions,
1251
+ className
1252
+ }) {
1253
+ const [open, setOpen] = useState(false);
1254
+ return /* @__PURE__ */ jsx(
1255
+ "header",
1256
+ {
1257
+ className: cn(
1258
+ "sticky top-0 z-40 w-full border-b border-transparent bg-background/85 backdrop-blur-md supports-[backdrop-filter]:bg-background/70",
1259
+ className
1260
+ ),
1261
+ children: /* @__PURE__ */ jsxs("div", { className: "oca-container flex h-16 items-center justify-between gap-4 md:h-[4.5rem]", children: [
1262
+ /* @__PURE__ */ jsx(Link2, { href: home, className: "-ml-1 rounded-lg p-1", "aria-label": "Home", children: brand ?? /* @__PURE__ */ jsx(Lockup, { size: 28 }) }),
1263
+ nav.length > 0 ? /* @__PURE__ */ jsx("nav", { "aria-label": "Main", className: "hidden items-center gap-1 md:flex", children: nav.map((n) => /* @__PURE__ */ jsx(NavLink, { item: n }, n.href)) }) : null,
1264
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
1265
+ actions,
1266
+ nav.length > 0 ? /* @__PURE__ */ jsxs(Sheet, { open, onOpenChange: setOpen, children: [
1267
+ /* @__PURE__ */ jsx(
1268
+ SheetTrigger,
1269
+ {
1270
+ className: "inline-flex size-10 items-center justify-center rounded-full text-foreground hover:bg-accent md:hidden",
1271
+ "aria-label": "Open menu",
1272
+ children: /* @__PURE__ */ jsx(Menu, { className: "size-5" })
1273
+ }
1274
+ ),
1275
+ /* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "pt-16", children: [
1276
+ /* @__PURE__ */ jsx(SheetTitle, { className: "sr-only", children: "Menu" }),
1277
+ /* @__PURE__ */ jsx("nav", { "aria-label": "Main", className: "flex flex-col", children: nav.map((n) => /* @__PURE__ */ jsx(
1278
+ NavLink,
1279
+ {
1280
+ item: n,
1281
+ className: "rounded-xl px-3 py-3 text-[1.0625rem]",
1282
+ onNavigate: () => setOpen(false)
1283
+ },
1284
+ n.href
1285
+ )) })
1286
+ ] })
1287
+ ] }) : null
1288
+ ] })
1289
+ ] })
1290
+ }
1291
+ );
1292
+ }
1293
+ function SiteFooter({
1294
+ columns = [],
1295
+ fineprint,
1296
+ meta,
1297
+ className
1298
+ }) {
1299
+ return /* @__PURE__ */ jsxs("footer", { className: cn("border-t border-border bg-background", className), children: [
1300
+ /* @__PURE__ */ jsxs("div", { className: "oca-container grid gap-10 py-14 md:grid-cols-[1.3fr_repeat(3,1fr)] md:py-16", children: [
1301
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
1302
+ /* @__PURE__ */ jsx(Lockup, { size: 26 }),
1303
+ fineprint ? /* @__PURE__ */ jsx("p", { className: "max-w-xs text-[0.9375rem] leading-relaxed text-muted-foreground", children: fineprint }) : null
1304
+ ] }),
1305
+ columns.map((col) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
1306
+ /* @__PURE__ */ jsx("p", { className: "mb-2 text-[0.875rem] font-medium", children: col.heading }),
1307
+ col.links.map((l) => /* @__PURE__ */ jsx(
1308
+ NavLink,
1309
+ {
1310
+ item: l,
1311
+ className: "-mx-3 py-2.5 text-[0.9375rem] md:py-1.5"
1312
+ },
1313
+ l.href
1314
+ ))
1315
+ ] }, col.heading))
1316
+ ] }),
1317
+ meta ? /* @__PURE__ */ jsx("div", { className: "oca-container border-t border-border py-6 text-[0.875rem] text-muted-foreground", children: meta }) : null
1318
+ ] });
1319
+ }
1320
+ function SideNav({ groups, onNavigate }) {
1321
+ return /* @__PURE__ */ jsx("nav", { "aria-label": "Sections", className: "flex flex-col gap-6", children: groups.map((g, gi) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
1322
+ g.label ? /* @__PURE__ */ jsx("p", { className: "px-3 pb-1.5 text-[0.8125rem] text-muted-foreground", children: g.label }) : null,
1323
+ g.items.map((it) => /* @__PURE__ */ jsxs(
1324
+ Link2,
1325
+ {
1326
+ href: it.href,
1327
+ onClick: onNavigate,
1328
+ "aria-current": it.active ? "page" : void 0,
1329
+ className: cn(
1330
+ "flex h-10 items-center gap-3 rounded-xl px-3 text-[0.9375rem] transition-colors",
1331
+ "[&_svg]:size-[1.125rem] [&_svg]:shrink-0",
1332
+ it.active ? "bg-card text-foreground shadow-sm ring-1 ring-border [&_svg]:text-foreground" : "text-muted-foreground hover:bg-accent hover:text-foreground"
1333
+ ),
1334
+ children: [
1335
+ it.icon,
1336
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: it.label }),
1337
+ it.badge ? /* @__PURE__ */ jsx("span", { className: "shrink-0", children: it.badge }) : null
1338
+ ]
1339
+ },
1340
+ it.href
1341
+ ))
1342
+ ] }, g.label ?? gi)) });
1343
+ }
1344
+ function AppShell({
1345
+ nav,
1346
+ home = "/",
1347
+ account,
1348
+ banner,
1349
+ footer,
1350
+ children,
1351
+ className
1352
+ }) {
1353
+ const [open, setOpen] = useState(false);
1354
+ return /* @__PURE__ */ jsxs("div", { className: cn("min-h-dvh bg-background", className), children: [
1355
+ /* @__PURE__ */ jsxs("div", { className: "sticky top-0 z-40 flex h-14 items-center justify-between border-b border-border bg-background/85 px-4 backdrop-blur-md lg:hidden", children: [
1356
+ /* @__PURE__ */ jsxs(Sheet, { open, onOpenChange: setOpen, children: [
1357
+ /* @__PURE__ */ jsx(
1358
+ SheetTrigger,
1359
+ {
1360
+ className: "inline-flex size-10 items-center justify-center rounded-full hover:bg-accent",
1361
+ "aria-label": "Open navigation",
1362
+ children: /* @__PURE__ */ jsx(Menu, { className: "size-5" })
1363
+ }
1364
+ ),
1365
+ /* @__PURE__ */ jsxs(SheetContent, { side: "left", className: "p-4 pt-16", children: [
1366
+ /* @__PURE__ */ jsx(SheetTitle, { className: "sr-only", children: "Navigation" }),
1367
+ /* @__PURE__ */ jsx(SideNav, { groups: nav, onNavigate: () => setOpen(false) })
1368
+ ] })
1369
+ ] }),
1370
+ /* @__PURE__ */ jsx(Link2, { href: home, "aria-label": "Home", children: /* @__PURE__ */ jsx(AppIcon, { size: 28 }) }),
1371
+ /* @__PURE__ */ jsx("div", { className: "flex items-center", children: account })
1372
+ ] }),
1373
+ /* @__PURE__ */ jsxs("div", { className: "mx-auto flex w-full max-w-[90rem]", children: [
1374
+ /* @__PURE__ */ jsxs("aside", { className: "sticky top-0 hidden h-dvh w-64 shrink-0 flex-col gap-8 overflow-y-auto px-4 py-6 lg:flex", children: [
1375
+ /* @__PURE__ */ jsx(Link2, { href: home, className: "px-2", "aria-label": "Home", children: /* @__PURE__ */ jsx(Lockup, { size: 26 }) }),
1376
+ /* @__PURE__ */ jsx(SideNav, { groups: nav }),
1377
+ /* @__PURE__ */ jsx("div", { className: "mt-auto flex flex-col gap-3", children: footer })
1378
+ ] }),
1379
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [
1380
+ /* @__PURE__ */ jsx("div", { className: "hidden h-[4.5rem] items-center justify-end gap-3 px-8 lg:flex", children: account }),
1381
+ banner ? /* @__PURE__ */ jsx("div", { className: "px-4 pb-2 pt-4 md:px-8 lg:pt-0", children: banner }) : null,
1382
+ /* @__PURE__ */ jsx("main", { id: "main-content", className: "flex-1 px-4 pb-16 pt-6 md:px-8 lg:pt-2", children })
1383
+ ] })
1384
+ ] })
1385
+ ] });
1386
+ }
1387
+ function AccountMenu({
1388
+ name,
1389
+ detail,
1390
+ items
1391
+ }) {
1392
+ const initial = name.trim().charAt(0).toUpperCase() || "\xB7";
1393
+ return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
1394
+ /* @__PURE__ */ jsxs(
1395
+ DropdownMenuTrigger,
1396
+ {
1397
+ className: "inline-flex h-10 items-center gap-2.5 rounded-full border border-border bg-card pl-1 pr-3.5 text-[0.9375rem] outline-none transition-colors hover:border-oca-hairline-strong focus-visible:ring-2 focus-visible:ring-ring",
1398
+ "aria-label": `Account: ${name}`,
1399
+ children: [
1400
+ /* @__PURE__ */ jsx("span", { className: "flex size-8 items-center justify-center rounded-full bg-foreground text-[0.8125rem] font-medium text-background", children: initial }),
1401
+ /* @__PURE__ */ jsx("span", { className: "max-w-[10rem] truncate", children: name })
1402
+ ]
1403
+ }
1404
+ ),
1405
+ /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "w-64", children: [
1406
+ /* @__PURE__ */ jsxs(DropdownMenuLabel, { className: "flex flex-col gap-0.5", children: [
1407
+ /* @__PURE__ */ jsx("span", { className: "truncate text-[0.9375rem] font-medium text-foreground", children: name }),
1408
+ detail ? /* @__PURE__ */ jsx("span", { className: "truncate font-mono text-[0.75rem]", children: detail }) : null
1409
+ ] }),
1410
+ /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
1411
+ items.map(
1412
+ (it, i) => it === "separator" ? /* @__PURE__ */ jsx(DropdownMenuSeparator, {}, `sep-${i}`) : it.href ? /* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, destructive: it.destructive, children: /* @__PURE__ */ jsxs(Link2, { href: it.href, children: [
1413
+ it.icon,
1414
+ it.label
1415
+ ] }) }, it.label) : /* @__PURE__ */ jsxs(DropdownMenuItem, { onSelect: it.onSelect, destructive: it.destructive, children: [
1416
+ it.icon,
1417
+ it.label
1418
+ ] }, it.label)
1419
+ )
1420
+ ] })
1421
+ ] });
1422
+ }
1423
+ function ThemeToggle({ className }) {
1424
+ const { theme, setTheme } = useTheme();
1425
+ const [mounted, setMounted] = useState(false);
1426
+ useEffect(() => setMounted(true), []);
1427
+ const current = mounted ? theme ?? "system" : "system";
1428
+ const next = current === "light" ? "dark" : current === "dark" ? "system" : "light";
1429
+ const Icon2 = current === "light" ? Sun : current === "dark" ? Moon : SunMoon;
1430
+ return /* @__PURE__ */ jsx(
1431
+ "button",
1432
+ {
1433
+ type: "button",
1434
+ onClick: () => setTheme(next),
1435
+ "aria-label": `Theme: ${current}. Switch to ${next}`,
1436
+ title: `Theme: ${current}`,
1437
+ className: cn(
1438
+ "inline-flex size-10 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
1439
+ className
1440
+ ),
1441
+ children: /* @__PURE__ */ jsx(Icon2, { className: "size-[1.125rem]" })
1442
+ }
1443
+ );
1444
+ }
1445
+
1446
+ export { APP_ATTRIBUTE, APP_ID, Accent, AccountMenu, ActivityList, AppIcon, AppShell, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardNumeral, CardTitle, Checkbox, CodeBlock, Container, CopyButton, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Display, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, Eyebrow, Field, Footnote, HalftoneSphere, HashChip, Input, IsoCheck, Kbd, KeyValueList, Label, Lead, Lockup, MARK_FACES, Mark, Notice, PackageCard, PageHeader, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProgressSteps, Prose, RadioGroup, RadioGroupItem, SPHERE_GRADIENT, Sats, SatsFigure, Section, SectionIntro, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, SiteFooter, SiteHeader, Skeleton, Spinner, StatCard, StatGrid, StatusDot, StepGrid, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruthTable, UsdApprox, appColors, appFonts, badgeVariants, buttonVariants, cardVariants, cn, satsText, sectionVariants, useCopy };
1447
+ //# sourceMappingURL=index.mjs.map
1448
+ //# sourceMappingURL=index.mjs.map