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