@orangecheck/app-design 1.5.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -13,7 +13,7 @@ import * as LabelPrimitive from '@radix-ui/react-label';
13
13
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
14
14
  import * as SelectPrimitive from '@radix-ui/react-select';
15
15
  import * as SwitchPrimitive from '@radix-ui/react-switch';
16
- import { ChevronDown, Check, X, Search, ArrowUpRight, ArrowRight, Copy, ChevronLeft, ChevronRight, Lock, CornerDownLeft, Download, FileText, Upload, Menu, Sun, Moon, SunMoon, PanelLeft, CircleUser, LogOut, ArrowLeft, CircleDashed, CircleMinus, CircleSlash, Clock, CircleX, CircleCheck, Ellipsis } from 'lucide-react';
16
+ import { ChevronDown, Check, X, Search, ArrowUpRight, ArrowRight, Copy, ChevronLeft, ChevronRight, Lock, Info, CornerDownLeft, Download, FileText, Upload, Menu, Sun, Moon, SunMoon, PanelLeft, CircleUser, LogOut, ArrowLeft, Maximize2, CircleDashed, CircleMinus, CircleSlash, Clock, CircleX, CircleCheck, Ellipsis } from 'lucide-react';
17
17
  import * as DialogPrimitive from '@radix-ui/react-dialog';
18
18
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
19
19
  import * as PopoverPrimitive from '@radix-ui/react-popover';
@@ -23,36 +23,174 @@ import QRCode from 'qrcode';
23
23
  import Link6 from 'next/link';
24
24
  import { useRouter } from 'next/compat/router';
25
25
 
26
+ // src/tokens/palette.ts
27
+ var lightPalette = {
28
+ accent: "#f4f4f4",
29
+ accentDisplay: "#f55819",
30
+ accentForeground: "#0a0a0a",
31
+ accentInk: "#c73f09",
32
+ background: "#fafafa",
33
+ border: "#ececec",
34
+ brand: "#f66d36",
35
+ brandForeground: "#0a0a0a",
36
+ card: "#ffffff",
37
+ cardForeground: "#0a0a0a",
38
+ chart1: "#ea580b",
39
+ chart2: "#2563eb",
40
+ chart3: "#9d2b77",
41
+ chart4: "#92400e",
42
+ chartDown: "#c2262e",
43
+ chartGrid: "#ececec",
44
+ chartNeutral: "#8a8f96",
45
+ chartUp: "#15803d",
46
+ codeAdded: "#86d39b",
47
+ codeAddedLine: "#1a2c20",
48
+ codeComment: "#909397",
49
+ codeFunction: "#9db4ec",
50
+ codeKeyword: "#e3a8c2",
51
+ codeLine: "#2a2a2a",
52
+ codeLink: "#9db4ec",
53
+ codeMark: "#232323",
54
+ codeNumber: "#fcb781",
55
+ codePackage: "#e99a8f",
56
+ codeProperty: "#9db4ec",
57
+ codePunctuation: "#d5d8dc",
58
+ codeRemoved: "#f19a9a",
59
+ codeRemovedLine: "#2f1c1c",
60
+ codeString: "#e99a8f",
61
+ codeSurface: "#161616",
62
+ codeTag: "#e3a8c2",
63
+ codeType: "#8fd0c2",
64
+ destructive: "#c2262e",
65
+ destructiveForeground: "#ffffff",
66
+ foreground: "#0a0a0a",
67
+ hairlineStrong: "#dadada",
68
+ info: "#1d4ed8",
69
+ infoForeground: "#ffffff",
70
+ ink: "#0a0a0a",
71
+ inkCard: "#1e1e1e",
72
+ inkEyebrow: "#f0835a",
73
+ inkForeground: "#ffffff",
74
+ inkLine: "#2a2a2a",
75
+ inkMuted: "#d5d8dc",
76
+ inkSubtle: "#909397",
77
+ inkTitle: "#fcb781",
78
+ input: "#8f8f8f",
79
+ muted: "#f2f2f2",
80
+ mutedForeground: "#54585e",
81
+ ocWalletReady: "#15803d",
82
+ ocWalletSurface: "#ffffff",
83
+ orange: "#f66d36",
84
+ orangeDeep: "#ea580b",
85
+ orangeLight: "#fb933c",
86
+ outline: "#f2cfc3",
87
+ peach: "#fed8ab",
88
+ popover: "#ffffff",
89
+ popoverForeground: "#0a0a0a",
90
+ primary: "#0a0a0a",
91
+ primaryForeground: "#ffffff",
92
+ ring: "#ea580b",
93
+ secondary: "#ffffff",
94
+ secondaryForeground: "#0a0a0a",
95
+ skeleton: "#e8e8e8",
96
+ sphereFrom: "#ff6f33",
97
+ sphereTo: "#ffd9c4",
98
+ subtleForeground: "#686c72",
99
+ success: "#15803d",
100
+ successForeground: "#ffffff",
101
+ tableHead: "#ededed",
102
+ warning: "#a15c07",
103
+ warningForeground: "#ffffff"
104
+ };
105
+ var darkPalette = {
106
+ accent: "#1e1e1e",
107
+ accentDisplay: "#f66d36",
108
+ accentForeground: "#fafafa",
109
+ accentInk: "#f0835a",
110
+ background: "#0a0a0a",
111
+ bandLine: "#262626",
112
+ border: "#2a2a2a",
113
+ brand: "#f66d36",
114
+ brandForeground: "#0a0a0a",
115
+ card: "#161616",
116
+ cardForeground: "#fafafa",
117
+ chart1: "#f66d36",
118
+ chart2: "#3b82f6",
119
+ chart3: "#f9a8d4",
120
+ chart4: "#fde047",
121
+ chartDown: "#f87171",
122
+ chartGrid: "#2a2a2a",
123
+ chartNeutral: "#62676e",
124
+ chartUp: "#4ade80",
125
+ codeAdded: "#86d39b",
126
+ codeAddedLine: "#132519",
127
+ codeComment: "#909397",
128
+ codeFunction: "#9db4ec",
129
+ codeKeyword: "#e3a8c2",
130
+ codeLine: "#2a2a2a",
131
+ codeLink: "#9db4ec",
132
+ codeMark: "#1b1b1b",
133
+ codeNumber: "#fcb781",
134
+ codePackage: "#e99a8f",
135
+ codeProperty: "#9db4ec",
136
+ codePunctuation: "#d5d8dc",
137
+ codeRemoved: "#f19a9a",
138
+ codeRemovedLine: "#271414",
139
+ codeString: "#e99a8f",
140
+ codeSurface: "#0e0e0e",
141
+ codeTag: "#e3a8c2",
142
+ codeType: "#8fd0c2",
143
+ destructive: "#f87171",
144
+ destructiveForeground: "#0a0a0a",
145
+ foreground: "#fafafa",
146
+ hairlineStrong: "#333333",
147
+ iconRing: "#333333",
148
+ iconTile: "#1e1e1e",
149
+ info: "#93c5fd",
150
+ infoForeground: "#0a0a0a",
151
+ ink: "#171717",
152
+ inkCard: "#1e1e1e",
153
+ inkEyebrow: "#f0835a",
154
+ inkForeground: "#ffffff",
155
+ inkLine: "#2a2a2a",
156
+ inkMuted: "#d5d8dc",
157
+ inkSubtle: "#909397",
158
+ inkTitle: "#fcb781",
159
+ input: "#6a6a6a",
160
+ muted: "#1e1e1e",
161
+ mutedForeground: "#a3a6aa",
162
+ ocWalletReady: "#4ade80",
163
+ ocWalletSurface: "#161616",
164
+ orange: "#f66d36",
165
+ orangeDeep: "#ea580b",
166
+ orangeLight: "#fb933c",
167
+ outline: "#3a2a24",
168
+ peach: "#fed8ab",
169
+ popover: "#1a1a1a",
170
+ popoverForeground: "#fafafa",
171
+ primary: "#fafafa",
172
+ primaryForeground: "#0a0a0a",
173
+ ring: "#f66d36",
174
+ secondary: "#1c1c1c",
175
+ secondaryForeground: "#fafafa",
176
+ skeleton: "#222222",
177
+ sphereFrom: "#ff6f33",
178
+ sphereTo: "#ffd9c4",
179
+ subtleForeground: "#8b8e93",
180
+ success: "#4ade80",
181
+ successForeground: "#0a0a0a",
182
+ tableHead: "#1e1e1e",
183
+ warning: "#fbbf24",
184
+ warningForeground: "#0a0a0a"
185
+ };
186
+
26
187
  // src/tokens/index.ts
27
188
  var APP_ATTRIBUTE = "data-oc-app";
28
189
  var APP_ID = "ochk";
29
190
  var appColors = {
30
- light: {
31
- background: "#FAFAFA",
32
- foreground: "#0A0A0A",
33
- card: "#FFFFFF",
34
- muted: "#F2F2F2",
35
- mutedForeground: "#54585E",
36
- subtleForeground: "#686C72",
37
- border: "#ECECEC",
38
- hairlineStrong: "#DADADA",
39
- accentDisplay: "#F55819",
40
- accentInk: "#C73F09",
41
- ring: "#EA580B"
42
- },
43
- dark: {
44
- background: "#0A0A0A",
45
- foreground: "#FAFAFA",
46
- card: "#161616",
47
- muted: "#1E1E1E",
48
- mutedForeground: "#A3A6AA",
49
- subtleForeground: "#8B8E93",
50
- border: "#2A2A2A",
51
- hairlineStrong: "#333333",
52
- accentDisplay: "#F66D36",
53
- accentInk: "#F0835A",
54
- ring: "#F66D36"
55
- },
191
+ /** Every colour token, generated from tokens.css (palette.ts): the chart series, code, ink and status colours too. */
192
+ light: lightPalette,
193
+ dark: darkPalette,
56
194
  brand: {
57
195
  orange: "#F66D36",
58
196
  orangeLight: "#FB933C",
@@ -2028,7 +2166,7 @@ var JS_TAG = /<\/?(?=[A-Za-z])/y;
2028
2166
  var JS_TAG_NAME = /[A-Za-z][\w$.:-]*/y;
2029
2167
  var JS_PUNCT = /=>|\.\.\.|[{}()[\];,.<>=+\-*/%!?:&|^~#]/y;
2030
2168
  var JSX_BEFORE = /* @__PURE__ */ new Set(["(", ",", "=", "?", ":", "{", "[", ";", ">", "&&", "||", "=>", "return"]);
2031
- function scanJs(src, emit2, jsx51) {
2169
+ function scanJs(src, emit2, jsx52) {
2032
2170
  let i = 0;
2033
2171
  let prev = "";
2034
2172
  let tagDepth = 0;
@@ -2054,7 +2192,7 @@ function scanJs(src, emit2, jsx51) {
2054
2192
  sig('"');
2055
2193
  continue;
2056
2194
  }
2057
- if (jsx51 && tagDepth === 0 && (m = at(JS_TAG, src, i)) && (prev === "" || JSX_BEFORE.has(prev))) {
2195
+ if (jsx52 && tagDepth === 0 && (m = at(JS_TAG, src, i)) && (prev === "" || JSX_BEFORE.has(prev))) {
2058
2196
  const name = at(JS_TAG_NAME, src, i + m.length);
2059
2197
  if (name) {
2060
2198
  emit2(m);
@@ -2066,7 +2204,7 @@ function scanJs(src, emit2, jsx51) {
2066
2204
  continue;
2067
2205
  }
2068
2206
  }
2069
- if (jsx51 && tagDepth > 0 && braceInTag === 0) {
2207
+ if (jsx52 && tagDepth > 0 && braceInTag === 0) {
2070
2208
  if (src.startsWith("/>", i) || src[i] === ">") {
2071
2209
  const close = src[i] === ">" ? ">" : "/>";
2072
2210
  emit2(close);
@@ -2086,7 +2224,7 @@ function scanJs(src, emit2, jsx51) {
2086
2224
  continue;
2087
2225
  }
2088
2226
  if (src[i] === "{") braceInTag = 1;
2089
- } else if (jsx51 && tagDepth > 0 && braceInTag > 0) {
2227
+ } else if (jsx52 && tagDepth > 0 && braceInTag > 0) {
2090
2228
  if (src[i] === "{") braceInTag++;
2091
2229
  else if (src[i] === "}") braceInTag--;
2092
2230
  }
@@ -2504,7 +2642,22 @@ function PageHeader({
2504
2642
  ] });
2505
2643
  }
2506
2644
  var InStatGrid = createContext(false);
2507
- function StatCard({ label, value, hint, size, className }) {
2645
+ function Delta({ value, suffix = "", good = "up", label }) {
2646
+ const dir = value > 0 ? "up" : value < 0 ? "down" : "flat";
2647
+ const tone = dir === "flat" ? "text-muted-foreground" : dir === good ? "text-success" : "text-destructive";
2648
+ const sign = value > 0 ? "+" : value < 0 ? "\u2212" : "";
2649
+ return /* @__PURE__ */ jsxs("span", { className: cn("inline-flex items-baseline gap-1 text-[0.8125rem] font-normal tracking-normal oca-tabular", tone), children: [
2650
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: dir === "up" ? "\u2191" : dir === "down" ? "\u2193" : "\xB7" }),
2651
+ sign,
2652
+ Math.abs(value).toLocaleString("en-US", { maximumFractionDigits: 2 }),
2653
+ suffix,
2654
+ label ? /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
2655
+ " ",
2656
+ label
2657
+ ] }) : null
2658
+ ] });
2659
+ }
2660
+ function StatCard({ label, value, hint, size, delta, className }) {
2508
2661
  const inGrid = useContext(InStatGrid);
2509
2662
  const density = useDensity();
2510
2663
  const sm = (size ?? (density === "compact" ? "sm" : "md")) === "sm";
@@ -2522,15 +2675,19 @@ function StatCard({ label, value, hint, size, className }) {
2522
2675
  ),
2523
2676
  children: [
2524
2677
  /* @__PURE__ */ jsx("span", { className: cn("leading-snug text-muted-foreground", sm ? "text-[0.8125rem]" : "text-[0.875rem]"), children: label }),
2525
- /* @__PURE__ */ jsx(
2678
+ /* @__PURE__ */ jsxs(
2526
2679
  "span",
2527
2680
  {
2528
2681
  className: cn(
2529
2682
  "break-words oca-tabular leading-tight tracking-[-0.02em]",
2530
2683
  sm ? "text-[1.25rem]" : "text-[1.5rem] md:text-[1.75rem]",
2531
- inGrid && "self-end"
2684
+ inGrid && "self-end",
2685
+ delta && "flex flex-wrap items-baseline gap-x-2"
2532
2686
  ),
2533
- children: value
2687
+ children: [
2688
+ value,
2689
+ delta ? /* @__PURE__ */ jsx(Delta, { ...delta }) : null
2690
+ ]
2534
2691
  }
2535
2692
  ),
2536
2693
  hint ? /* @__PURE__ */ jsx("span", { className: "text-[0.8125rem] leading-snug text-muted-foreground", children: hint }) : inGrid ? /* @__PURE__ */ jsx("span", { "aria-hidden": true }) : null
@@ -2619,6 +2776,13 @@ function StatGrid({ columns, empty, isEmpty, className, children, ...props }) {
2619
2776
  }
2620
2777
  ) });
2621
2778
  }
2779
+ var TONE_TEXT = {
2780
+ good: "text-success",
2781
+ caution: "text-warning",
2782
+ bad: "text-destructive",
2783
+ brand: "text-oca-accent-ink",
2784
+ muted: "text-muted-foreground"
2785
+ };
2622
2786
  function KeyValueList({
2623
2787
  items,
2624
2788
  dense,
@@ -2637,15 +2801,19 @@ function KeyValueList({
2637
2801
  ),
2638
2802
  children: [
2639
2803
  /* @__PURE__ */ jsx("dt", { className: cn("shrink-0 text-muted-foreground", tight ? "text-[0.8125rem] @md:w-36" : "text-[0.875rem] @md:w-48"), children: it.label }),
2640
- /* @__PURE__ */ jsx(
2804
+ /* @__PURE__ */ jsxs(
2641
2805
  "dd",
2642
2806
  {
2643
2807
  className: cn(
2644
2808
  "min-w-0 break-words",
2645
2809
  tight ? "text-[0.875rem]" : "text-[0.9375rem]",
2646
- it.mono && (tight ? "font-mono text-[0.8125rem]" : "font-mono text-[0.875rem]")
2810
+ it.mono && (tight ? "font-mono text-[0.8125rem]" : "font-mono text-[0.875rem]"),
2811
+ it.tone && !it.note && TONE_TEXT[it.tone]
2647
2812
  ),
2648
- children: it.value
2813
+ children: [
2814
+ it.value,
2815
+ it.note ? /* @__PURE__ */ jsx("span", { className: cn("ml-2 font-sans text-[0.8125rem]", TONE_TEXT[it.tone ?? "muted"]), children: it.note }) : null
2816
+ ]
2649
2817
  }
2650
2818
  )
2651
2819
  ]
@@ -3926,6 +4094,185 @@ function LockedPreview({
3926
4094
  ] })
3927
4095
  ] });
3928
4096
  }
4097
+ function chartColor(series) {
4098
+ if (typeof series === "string") return `var(--oca-chart-${series})`;
4099
+ const n = series >= 1 && series <= 4 && Number.isInteger(series) ? series : (series % 4 + 4) % 4 + 1;
4100
+ return `var(--oca-chart-${n})`;
4101
+ }
4102
+ function ChartFrame({
4103
+ legend,
4104
+ caption,
4105
+ children,
4106
+ className
4107
+ }) {
4108
+ return /* @__PURE__ */ jsxs("figure", { className: cn("oca-chart flex min-w-0 flex-col gap-3", className), children: [
4109
+ legend && legend.length > 0 ? /* @__PURE__ */ jsx("ul", { className: "oca-chart-legend", "aria-label": "Legend", children: legend.map((l, i) => {
4110
+ const c = typeof l.color === "number" || ["neutral", "up", "down"].includes(String(l.color)) ? chartColor(l.color) : String(l.color);
4111
+ return /* @__PURE__ */ jsxs("li", { children: [
4112
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, "data-swatch": l.dashed ? "dashed" : "", style: { "--swatch": c } }),
4113
+ l.label
4114
+ ] }, i);
4115
+ }) }) : null,
4116
+ /* @__PURE__ */ jsx("div", { className: "relative min-w-0", children }),
4117
+ caption ? /* @__PURE__ */ jsx("figcaption", { className: "text-[0.8125rem] leading-snug text-muted-foreground", children: caption }) : null
4118
+ ] });
4119
+ }
4120
+ function Sparkline({
4121
+ values,
4122
+ label,
4123
+ tone = "ink",
4124
+ area = false,
4125
+ width = 96,
4126
+ height = 24,
4127
+ className
4128
+ }) {
4129
+ const gradient = useId().replace(/[^a-zA-Z0-9]/g, "");
4130
+ const pts = values.filter((v) => Number.isFinite(v));
4131
+ const lo = Math.min(...pts);
4132
+ const hi = Math.max(...pts);
4133
+ const span = hi - lo || 1;
4134
+ const pad3 = 1.5;
4135
+ const x = (i) => pts.length < 2 ? width / 2 : i / (pts.length - 1) * width;
4136
+ const y = (v) => pad3 + (1 - (v - lo) / span) * (height - pad3 * 2);
4137
+ const line = pts.map((v, i) => `${i === 0 ? "M" : "L"}${x(i).toFixed(2)},${y(v).toFixed(2)}`).join(" ");
4138
+ const color = tone === "ink" ? "var(--foreground)" : tone === "muted" ? "var(--muted-foreground)" : tone === "trend" ? chartColor(pts.length > 1 && pts[pts.length - 1] < pts[0] ? "down" : "up") : chartColor(tone);
4139
+ return /* @__PURE__ */ jsx(
4140
+ "svg",
4141
+ {
4142
+ role: "img",
4143
+ "aria-label": label,
4144
+ viewBox: `0 0 ${width} ${height}`,
4145
+ preserveAspectRatio: "none",
4146
+ width,
4147
+ height,
4148
+ className: cn("block overflow-visible", className),
4149
+ style: { color },
4150
+ children: pts.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
4151
+ area ? /* @__PURE__ */ jsxs(Fragment, { children: [
4152
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: gradient, x1: "0", y1: "0", x2: "0", y2: "1", children: [
4153
+ /* @__PURE__ */ jsx("stop", { offset: "0", stopColor: "currentColor", stopOpacity: 0.22 }),
4154
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "currentColor", stopOpacity: 0 })
4155
+ ] }) }),
4156
+ /* @__PURE__ */ jsx("path", { d: `${line} L${x(pts.length - 1).toFixed(2)},${height} L${x(0).toFixed(2)},${height} Z`, fill: `url(#${gradient})` })
4157
+ ] }) : null,
4158
+ /* @__PURE__ */ jsx("path", { d: line, fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinejoin: "round", strokeLinecap: "round", vectorEffect: "non-scaling-stroke" })
4159
+ ] }) : null
4160
+ }
4161
+ );
4162
+ }
4163
+ function SourceNote({ source, href, detail, updated, variant = "popover", className }) {
4164
+ const name = href ? /* @__PURE__ */ jsxs("a", { href, className: "text-foreground underline decoration-foreground/35 underline-offset-4 hover:decoration-foreground", rel: "noreferrer", target: "_blank", children: [
4165
+ source,
4166
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: " (opens in a new tab)" })
4167
+ ] }) : /* @__PURE__ */ jsx("span", { className: "text-foreground", children: source });
4168
+ if (variant === "line") {
4169
+ return /* @__PURE__ */ jsxs("p", { className: cn("text-[0.75rem] leading-snug text-muted-foreground", className), children: [
4170
+ "Source: ",
4171
+ name,
4172
+ updated ? /* @__PURE__ */ jsxs(Fragment, { children: [
4173
+ " \xB7 ",
4174
+ updated
4175
+ ] }) : null
4176
+ ] });
4177
+ }
4178
+ return /* @__PURE__ */ jsxs(Popover, { children: [
4179
+ /* @__PURE__ */ jsxs(
4180
+ PopoverTrigger,
4181
+ {
4182
+ className: cn(
4183
+ "inline-flex h-7 items-center gap-1 rounded-full px-2 text-[0.75rem] text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
4184
+ className
4185
+ ),
4186
+ children: [
4187
+ /* @__PURE__ */ jsx(Info, { "aria-hidden": true, className: "size-3.5" }),
4188
+ "Source"
4189
+ ]
4190
+ }
4191
+ ),
4192
+ /* @__PURE__ */ jsxs(PopoverContent, { align: "start", className: "flex w-[min(calc(100vw-2rem),20rem)] flex-col gap-2 p-4 text-[0.875rem]", children: [
4193
+ /* @__PURE__ */ jsx("p", { className: "text-[0.75rem] text-muted-foreground", children: "Where this number comes from" }),
4194
+ /* @__PURE__ */ jsx("p", { className: "font-medium", children: name }),
4195
+ detail ? /* @__PURE__ */ jsx("div", { className: "text-[0.8125rem] leading-snug text-muted-foreground [&_code]:font-mono", children: detail }) : null,
4196
+ updated ? /* @__PURE__ */ jsx("p", { className: "text-[0.8125rem] text-muted-foreground", children: updated }) : null
4197
+ ] })
4198
+ ] });
4199
+ }
4200
+ function Panel({
4201
+ title,
4202
+ description,
4203
+ actions,
4204
+ source,
4205
+ expandable = false,
4206
+ children,
4207
+ className
4208
+ }) {
4209
+ const [open, setOpen] = useState(false);
4210
+ const body = (expanded) => typeof children === "function" ? children(expanded) : children;
4211
+ const head = (expanded) => /* @__PURE__ */ jsxs("header", { className: "flex flex-wrap items-start justify-between gap-x-4 gap-y-2", children: [
4212
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [
4213
+ expanded ? /* @__PURE__ */ jsx(DialogTitle, { className: "text-[1.0625rem] font-medium leading-snug", children: title }) : /* @__PURE__ */ jsx("h3", { className: "text-[1rem] font-medium leading-snug", children: title }),
4214
+ description ? expanded ? /* @__PURE__ */ jsx(DialogDescription, { className: "text-[0.875rem] leading-snug text-muted-foreground", children: description }) : /* @__PURE__ */ jsx("p", { className: "text-[0.875rem] leading-snug text-muted-foreground", children: description }) : null
4215
+ ] }),
4216
+ /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [
4217
+ actions,
4218
+ expandable && !expanded ? /* @__PURE__ */ jsx(
4219
+ "button",
4220
+ {
4221
+ type: "button",
4222
+ onClick: () => setOpen(true),
4223
+ "aria-label": "Open full screen",
4224
+ className: "inline-flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
4225
+ children: /* @__PURE__ */ jsx(Maximize2, { "aria-hidden": true, className: "size-4" })
4226
+ }
4227
+ ) : null
4228
+ ] })
4229
+ ] });
4230
+ return /* @__PURE__ */ jsxs("section", { className: cn("flex min-w-0 flex-col gap-4 rounded-[1.25rem] border border-border bg-card p-5 md:p-6", className), children: [
4231
+ head(false),
4232
+ /* @__PURE__ */ jsx("div", { className: "min-w-0", children: body(false) }),
4233
+ source ? /* @__PURE__ */ jsx("div", { className: "-mb-1 border-t border-border pt-3", children: source }) : null,
4234
+ expandable ? /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs(
4235
+ DialogContent,
4236
+ {
4237
+ ...description ? {} : { "aria-describedby": void 0 },
4238
+ className: "flex h-[min(92dvh,56rem)] w-[min(96vw,80rem)] max-w-none flex-col gap-4 overflow-y-auto",
4239
+ children: [
4240
+ head(true),
4241
+ /* @__PURE__ */ jsx("div", { className: "min-h-0 min-w-0 flex-1", children: open ? body(true) : null }),
4242
+ source ? /* @__PURE__ */ jsx("div", { className: "border-t border-border pt-3", children: source }) : null
4243
+ ]
4244
+ }
4245
+ ) }) : null
4246
+ ] });
4247
+ }
4248
+ function HudCard({
4249
+ eyebrow,
4250
+ live = false,
4251
+ title,
4252
+ children,
4253
+ footer,
4254
+ className
4255
+ }) {
4256
+ return /* @__PURE__ */ jsxs(
4257
+ "div",
4258
+ {
4259
+ "data-oca-hud": "",
4260
+ className: cn(
4261
+ "flex w-60 max-w-[calc(100vw-2rem)] flex-col gap-2 rounded-xl border border-border bg-background/85 p-3 text-[0.8125rem] shadow-sm backdrop-blur-md",
4262
+ className
4263
+ ),
4264
+ children: [
4265
+ eyebrow ? /* @__PURE__ */ jsxs("p", { className: "flex items-center gap-1.5 text-[0.75rem] text-muted-foreground", children: [
4266
+ live ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "size-1.5 rounded-full bg-oca-orange-deep motion-safe:animate-pulse" }) : null,
4267
+ eyebrow
4268
+ ] }) : null,
4269
+ title ? /* @__PURE__ */ jsx("p", { className: "text-[1.125rem] font-medium leading-tight oca-tabular", children: title }) : null,
4270
+ children,
4271
+ footer ? /* @__PURE__ */ jsx("div", { className: "border-t border-border pt-2", children: footer }) : null
4272
+ ]
4273
+ }
4274
+ );
4275
+ }
3929
4276
  function SectionHeading({
3930
4277
  eyebrow,
3931
4278
  title,
@@ -4990,7 +5337,7 @@ function SignMessage({
4990
5337
  return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-5", className), children: [
4991
5338
  lead ? /* @__PURE__ */ jsx("p", { className: "text-[0.9375rem] leading-relaxed", children: lead }) : null,
4992
5339
  wallets ? /* @__PURE__ */ jsxs(Fragment, { children: [
4993
- /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: wallets }),
5340
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2 [--oc-wallet-heading:none]", children: wallets }),
4994
5341
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 text-[0.8125rem] text-muted-foreground", children: [
4995
5342
  /* @__PURE__ */ jsx("span", { className: "h-px flex-1 bg-border" }),
4996
5343
  "or sign it in any wallet",
@@ -7212,6 +7559,6 @@ function createMdxComponents({ mermaid } = {}) {
7212
7559
  }
7213
7560
  var mdxComponents = createMdxComponents();
7214
7561
 
7215
- export { APP_ATTRIBUTE, APP_ID, Accent, Accordion, AccordionItem, AccountMenu, ActivityList, AnchorStatus, ApiTable, AppCard, AppGrid, AppIcon, AppShell, ArtifactView, Badge, BlockCountdown, BlockHeight, Breadcrumbs, BrowserFrame, Button, CODE_LANGS, Callout, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardNumeral, CardTitle, Checkbox, Closing, CodeBlock, CodeTabs, CommandDialog, ComparisonTable, Container, CopyButton, CountdownRing, Crowd, DOCS_HEADER_NAV, DOCS_HREF, DataTable, DensityProvider, Diagram, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHost, DialogTitle, DialogTrigger, Display, DocHeader, DocLayout, DocsHeading, DocsNav, DocsPager, DocsShell, DropZone, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EmptyLine, EmptyState, EndpointList, ErrorBoundary, ErrorPage, Eyebrow, FAMILY, FAMILY_GROUPS, FactBlock, FactRows, FamilyMenu, Faq, Field, FilterChips, FloatChip, Footnote, FormSection, HalftoneCanvas, HalftoneSphere, HashChip, Input, InstallTabs, IsoCheck, Kbd, KeyValueList, LEGAL_LINKS, Label, Lead, LegalDocument, LinkCard, LoadingBlock, LockedPreview, Lockup, MARK_FACES, Mark, MdxTable, Meter, Monogram, Notice, OCHK_APP_ACCOUNT, OCHK_IO, OCHK_IO_FOOTER, OCHK_IO_NAV, OchkIoFooter, OnThisPage, PROTOCOLS, PROTOCOL_ORDER, PackageCard, PageHeader, PageHero, Pagination, PhoneFrame, PlanCard, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProgressSteps, ProofStrip, Prose, ProtocolGrid, ProtocolHero, ProtocolNav, QrCode, RadioGroup, RadioGroupItem, Reveal, SELF_HOSTED_LEGAL_LINKS, SPHERE_GRADIENT, Sats, SatsFigure, ScrollFade, ScrollStory, SearchButton, SearchDialog, Section, SectionHeading, SectionIntro, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator, SessionAccountView, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, ShellContext, SignInFrame, SignMessage, SiteBanner, SiteFooter, SiteHeader, Skeleton, SkipLink, SpecCard, Spinner, SplitBar, StatCard, StatGrid, StateBadge, StatusBadge, StatusDot, StatusPill, Step, StepGrid, Steps, Switch, TOKEN_CLASS, Tabs, TabsContent, TabsList, TabsTrigger, TextLink, Textarea, ThemeToggle, Ticker, Toaster, ToolGrid, ToolShell, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruthTable, UsdApprox, VerifyBox, VerifyReport, appColors, appFonts, badgeVariants, blocksToDuration, buttonVariants, cardVariants, cn, confirm, createMdxComponents, createStateBadge, escapeHtml, explorerUrl, familyByGroup, familySite, formatBlockHeight, formatBytes, formatUtc, grammarOf, highlight, highlightToHtml, languageName, linesToHtml, mdxComponents, monogramGround, monogramLetter, parseCodeMeta, parseLineRanges, portraitTone, prompt, protocolSite, readDiff, rehypeCode, satsText, sectionVariants, shortenMiddle, statusWord, useActiveHeading, useCopy, useDensity, useHeadings, useInView, useShellPlace, useSignInHref, useTimedOut };
7562
+ export { APP_ATTRIBUTE, APP_ID, Accent, Accordion, AccordionItem, AccountMenu, ActivityList, AnchorStatus, ApiTable, AppCard, AppGrid, AppIcon, AppShell, ArtifactView, Badge, BlockCountdown, BlockHeight, Breadcrumbs, BrowserFrame, Button, CODE_LANGS, Callout, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardNumeral, CardTitle, ChartFrame, Checkbox, Closing, CodeBlock, CodeTabs, CommandDialog, ComparisonTable, Container, CopyButton, CountdownRing, Crowd, DOCS_HEADER_NAV, DOCS_HREF, DataTable, DensityProvider, Diagram, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHost, DialogTitle, DialogTrigger, Display, DocHeader, DocLayout, DocsHeading, DocsNav, DocsPager, DocsShell, DropZone, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EmptyLine, EmptyState, EndpointList, ErrorBoundary, ErrorPage, Eyebrow, FAMILY, FAMILY_GROUPS, FactBlock, FactRows, FamilyMenu, Faq, Field, FilterChips, FloatChip, Footnote, FormSection, HalftoneCanvas, HalftoneSphere, HashChip, HudCard, Input, InstallTabs, IsoCheck, Kbd, KeyValueList, LEGAL_LINKS, Label, Lead, LegalDocument, LinkCard, LoadingBlock, LockedPreview, Lockup, MARK_FACES, Mark, MdxTable, Meter, Monogram, Notice, OCHK_APP_ACCOUNT, OCHK_IO, OCHK_IO_FOOTER, OCHK_IO_NAV, OchkIoFooter, OnThisPage, PROTOCOLS, PROTOCOL_ORDER, PackageCard, PageHeader, PageHero, Pagination, Panel, PhoneFrame, PlanCard, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProgressSteps, ProofStrip, Prose, ProtocolGrid, ProtocolHero, ProtocolNav, QrCode, RadioGroup, RadioGroupItem, Reveal, SELF_HOSTED_LEGAL_LINKS, SPHERE_GRADIENT, Sats, SatsFigure, ScrollFade, ScrollStory, SearchButton, SearchDialog, Section, SectionHeading, SectionIntro, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator, SessionAccountView, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, ShellContext, SignInFrame, SignMessage, SiteBanner, SiteFooter, SiteHeader, Skeleton, SkipLink, SourceNote, Sparkline, SpecCard, Spinner, SplitBar, StatCard, StatGrid, StateBadge, StatusBadge, StatusDot, StatusPill, Step, StepGrid, Steps, Switch, TOKEN_CLASS, Tabs, TabsContent, TabsList, TabsTrigger, TextLink, Textarea, ThemeToggle, Ticker, Toaster, ToolGrid, ToolShell, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruthTable, UsdApprox, VerifyBox, VerifyReport, appColors, appFonts, badgeVariants, blocksToDuration, buttonVariants, cardVariants, chartColor, cn, confirm, createMdxComponents, createStateBadge, darkPalette, escapeHtml, explorerUrl, familyByGroup, familySite, formatBlockHeight, formatBytes, formatUtc, grammarOf, highlight, highlightToHtml, languageName, lightPalette, linesToHtml, mdxComponents, monogramGround, monogramLetter, parseCodeMeta, parseLineRanges, portraitTone, prompt, protocolSite, readDiff, rehypeCode, satsText, sectionVariants, shortenMiddle, statusWord, useActiveHeading, useCopy, useDensity, useHeadings, useInView, useShellPlace, useSignInHref, useTimedOut };
7216
7563
  //# sourceMappingURL=index.mjs.map
7217
7564
  //# sourceMappingURL=index.mjs.map