@orangecheck/app-design 1.6.2 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/chrome.d.mts +11 -6
- package/dist/chrome.d.ts +11 -6
- package/dist/chrome.js +158 -129
- package/dist/chrome.js.map +1 -1
- package/dist/chrome.mjs +156 -130
- package/dist/chrome.mjs.map +1 -1
- package/dist/components.d.mts +75 -8
- package/dist/components.d.ts +75 -8
- package/dist/components.js +255 -12
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +251 -14
- package/dist/components.mjs.map +1 -1
- package/dist/{docs-CFE5mU_6.d.mts → docs-B9G1BNXI.d.mts} +2 -2
- package/dist/{docs-ByUx4t-D.d.ts → docs-BWWnm5Jv.d.ts} +2 -2
- package/dist/family.d.mts +1 -1
- package/dist/family.d.ts +1 -1
- package/dist/family.js +7 -1
- package/dist/family.js.map +1 -1
- package/dist/family.mjs +5 -2
- package/dist/family.mjs.map +1 -1
- package/dist/{index-DmfyPYe5.d.mts → index-Bkl49Vgy.d.mts} +4 -1
- package/dist/{index-DmfyPYe5.d.ts → index-Bkl49Vgy.d.ts} +4 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +338 -66
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +327 -67
- package/dist/index.mjs.map +1 -1
- package/dist/mdx.d.mts +3 -3
- package/dist/mdx.d.ts +3 -3
- package/dist/mdx.js +15 -3
- package/dist/mdx.js.map +1 -1
- package/dist/mdx.mjs +15 -3
- package/dist/mdx.mjs.map +1 -1
- package/dist/primitives.d.mts +2 -2
- package/dist/primitives.d.ts +2 -2
- package/dist/primitives.js +2 -1
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +2 -1
- package/dist/primitives.mjs.map +1 -1
- package/dist/session.d.mts +4 -4
- package/dist/session.d.ts +4 -4
- package/dist/session.js +124 -2
- package/dist/session.js.map +1 -1
- package/dist/session.mjs +124 -2
- package/dist/session.mjs.map +1 -1
- package/dist/{status-badge-BJ9Sdsx8.d.mts → status-badge-BBbCO6ZA.d.mts} +1 -1
- package/dist/{status-badge-Bt8x3RhO.d.ts → status-badge-CHHxtFkP.d.ts} +1 -1
- package/dist/styles/swagger.css +24 -1
- package/dist/styles/tokens.css +11 -0
- package/dist/{tool-shell-CQZNRUgH.d.mts → tool-shell-Cg51cRHJ.d.ts} +14 -4
- package/dist/{tool-shell-CRmceGrV.d.ts → tool-shell-Dxw5o2rH.d.mts} +14 -4
- package/dist/{tools-Bg1gi2HO.d.mts → tools-CKO8IseL.d.mts} +2 -2
- package/dist/{tools-Bw7RhO92.d.ts → tools-CzjFPng4.d.ts} +2 -2
- package/package.json +2 -2
package/dist/components.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { extendTailwindMerge } from 'tailwind-merge';
|
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
7
|
-
import { X, ChevronDown, Check, Search, Copy, Lock, Info, ArrowUpRight, ArrowRight, ChevronRight, CornerDownLeft, Download, FileText, Upload, ArrowLeft, Maximize2, CircleDashed, CircleMinus, CircleSlash, Clock, CircleX, CircleCheck } from 'lucide-react';
|
|
7
|
+
import { X, ChevronDown, Check, Search, Copy, Lock, Info, ArrowUpRight, ArrowRight, ChevronRight, UserRound, CornerDownLeft, Download, FileText, Upload, ArrowLeft, Maximize2, CircleDashed, CircleMinus, CircleSlash, Clock, CircleX, CircleCheck } from 'lucide-react';
|
|
8
8
|
import { Slot } from '@radix-ui/react-slot';
|
|
9
9
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
10
10
|
import 'next-themes';
|
|
@@ -535,7 +535,7 @@ var JS_TAG = /<\/?(?=[A-Za-z])/y;
|
|
|
535
535
|
var JS_TAG_NAME = /[A-Za-z][\w$.:-]*/y;
|
|
536
536
|
var JS_PUNCT = /=>|\.\.\.|[{}()[\];,.<>=+\-*/%!?:&|^~#]/y;
|
|
537
537
|
var JSX_BEFORE = /* @__PURE__ */ new Set(["(", ",", "=", "?", ":", "{", "[", ";", ">", "&&", "||", "=>", "return"]);
|
|
538
|
-
function scanJs(src, emit,
|
|
538
|
+
function scanJs(src, emit, jsx40) {
|
|
539
539
|
let i = 0;
|
|
540
540
|
let prev = "";
|
|
541
541
|
let tagDepth = 0;
|
|
@@ -561,7 +561,7 @@ function scanJs(src, emit, jsx38) {
|
|
|
561
561
|
sig('"');
|
|
562
562
|
continue;
|
|
563
563
|
}
|
|
564
|
-
if (
|
|
564
|
+
if (jsx40 && tagDepth === 0 && (m = at(JS_TAG, src, i)) && (prev === "" || JSX_BEFORE.has(prev))) {
|
|
565
565
|
const name = at(JS_TAG_NAME, src, i + m.length);
|
|
566
566
|
if (name) {
|
|
567
567
|
emit(m);
|
|
@@ -573,7 +573,7 @@ function scanJs(src, emit, jsx38) {
|
|
|
573
573
|
continue;
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
if (
|
|
576
|
+
if (jsx40 && tagDepth > 0 && braceInTag === 0) {
|
|
577
577
|
if (src.startsWith("/>", i) || src[i] === ">") {
|
|
578
578
|
const close = src[i] === ">" ? ">" : "/>";
|
|
579
579
|
emit(close);
|
|
@@ -593,7 +593,7 @@ function scanJs(src, emit, jsx38) {
|
|
|
593
593
|
continue;
|
|
594
594
|
}
|
|
595
595
|
if (src[i] === "{") braceInTag = 1;
|
|
596
|
-
} else if (
|
|
596
|
+
} else if (jsx40 && tagDepth > 0 && braceInTag > 0) {
|
|
597
597
|
if (src[i] === "{") braceInTag++;
|
|
598
598
|
else if (src[i] === "}") braceInTag--;
|
|
599
599
|
}
|
|
@@ -1478,6 +1478,7 @@ function Notice({
|
|
|
1478
1478
|
title,
|
|
1479
1479
|
children,
|
|
1480
1480
|
action,
|
|
1481
|
+
icon,
|
|
1481
1482
|
role,
|
|
1482
1483
|
className
|
|
1483
1484
|
}) {
|
|
@@ -1494,7 +1495,17 @@ function Notice({
|
|
|
1494
1495
|
),
|
|
1495
1496
|
children: [
|
|
1496
1497
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 gap-3", children: [
|
|
1497
|
-
|
|
1498
|
+
icon ? /* @__PURE__ */ jsx(
|
|
1499
|
+
"span",
|
|
1500
|
+
{
|
|
1501
|
+
"aria-hidden": true,
|
|
1502
|
+
className: cn(
|
|
1503
|
+
"mt-0.5 shrink-0 [&_svg]:size-[1.125rem]",
|
|
1504
|
+
kind === "brand" ? "text-oca-accent-ink" : kind === "danger" ? "text-destructive" : "text-muted-foreground"
|
|
1505
|
+
),
|
|
1506
|
+
children: icon
|
|
1507
|
+
}
|
|
1508
|
+
) : kind !== "neutral" ? /* @__PURE__ */ jsx(
|
|
1498
1509
|
"span",
|
|
1499
1510
|
{
|
|
1500
1511
|
"aria-hidden": true,
|
|
@@ -1789,7 +1800,7 @@ function Well({
|
|
|
1789
1800
|
] });
|
|
1790
1801
|
}
|
|
1791
1802
|
var FRAME = "overflow-hidden rounded-[1.25rem] border border-[var(--oca-code-line)] bg-[var(--oca-code-surface)]";
|
|
1792
|
-
var COPY_ON_INK = "text-oca-ink-subtle hover:bg-white/10 hover:text-white";
|
|
1803
|
+
var COPY_ON_INK = "text-oca-ink-subtle hover:bg-white/10 hover:text-white max-md:size-11";
|
|
1793
1804
|
function CodeBlock({
|
|
1794
1805
|
code,
|
|
1795
1806
|
html,
|
|
@@ -2217,6 +2228,9 @@ var GROUNDS = [
|
|
|
2217
2228
|
}
|
|
2218
2229
|
];
|
|
2219
2230
|
var SIZES = {
|
|
2231
|
+
// A list row's avatar, a facepile.
|
|
2232
|
+
"2xs": "size-7 rounded-[0.55rem] text-[0.75rem]",
|
|
2233
|
+
xs: "size-8 rounded-[0.6rem] text-[0.875rem]",
|
|
2220
2234
|
sm: "size-9 rounded-[0.7rem] text-[0.9375rem]",
|
|
2221
2235
|
md: "size-11 rounded-[0.85rem] text-[1.125rem]",
|
|
2222
2236
|
lg: "size-14 rounded-[1.05rem] text-[1.5rem]"
|
|
@@ -2342,6 +2356,7 @@ function MarkOutline({ className }) {
|
|
|
2342
2356
|
// src/family/index.ts
|
|
2343
2357
|
var OCHK_IO = "https://ochk.io";
|
|
2344
2358
|
var DOCS_HREF = `${OCHK_IO}/docs`;
|
|
2359
|
+
var OCHK_APP = "https://ochk.app";
|
|
2345
2360
|
function protocol(slug, verb, line, kinds) {
|
|
2346
2361
|
return {
|
|
2347
2362
|
slug,
|
|
@@ -2378,7 +2393,7 @@ var FAMILY = [
|
|
|
2378
2393
|
{
|
|
2379
2394
|
slug: "me",
|
|
2380
2395
|
label: "ochk.app",
|
|
2381
|
-
href:
|
|
2396
|
+
href: OCHK_APP,
|
|
2382
2397
|
group: "orangecheck",
|
|
2383
2398
|
line: "One account, with Bitcoin behind it.",
|
|
2384
2399
|
status: "testing"
|
|
@@ -2461,6 +2476,10 @@ function protocolSite(slug) {
|
|
|
2461
2476
|
{ href: `${OCHK_IO}/trust`, label: "Trust" },
|
|
2462
2477
|
{ href: `${OCHK_IO}/about`, label: "About" }
|
|
2463
2478
|
];
|
|
2479
|
+
var InColumnContext = sharedContext("in-column", false);
|
|
2480
|
+
function useInColumn() {
|
|
2481
|
+
return useContext(InColumnContext);
|
|
2482
|
+
}
|
|
2464
2483
|
var SiteHomeContext = sharedContext("site-home", void 0);
|
|
2465
2484
|
function useSiteHome() {
|
|
2466
2485
|
return useContext(SiteHomeContext);
|
|
@@ -2488,10 +2507,11 @@ function ErrorPage({
|
|
|
2488
2507
|
className
|
|
2489
2508
|
}) {
|
|
2490
2509
|
const shellHome = useSiteHome();
|
|
2510
|
+
const inColumn = useInColumn();
|
|
2491
2511
|
const homeHref = home ?? (protocol2 ? protocolSite(protocol2).pageHref : shellHome ?? OCHK_IO);
|
|
2492
2512
|
const words = WORDS[code] ?? (code >= 500 ? WORDS[500] : WORDS[404]);
|
|
2493
2513
|
const server = code >= 500;
|
|
2494
|
-
return /* @__PURE__ */ jsx(Section, { space: "none", className: cn("flex min-h-[min(40rem,72dvh)] items-center py-16 md:py-24", className), children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-center gap-12 md:grid-cols-12", children: [
|
|
2514
|
+
return /* @__PURE__ */ jsx(Section, { space: "none", contained: !inColumn, className: cn("flex min-h-[min(40rem,72dvh)] items-center py-16 md:py-24", className), children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-center gap-12 md:grid-cols-12", children: [
|
|
2495
2515
|
/* @__PURE__ */ jsxs("div", { className: "flex max-w-[40rem] flex-col items-start gap-6 md:col-span-7", children: [
|
|
2496
2516
|
/* @__PURE__ */ jsxs("p", { className: "oca-eyebrow oca-enter", children: [
|
|
2497
2517
|
/* @__PURE__ */ jsx("span", { className: "oca-tabular", children: code }),
|
|
@@ -2761,7 +2781,8 @@ forwardRef(function DropdownMenuItem2({ className, destructive, ...props }, ref)
|
|
|
2761
2781
|
{
|
|
2762
2782
|
ref,
|
|
2763
2783
|
className: cn(
|
|
2764
|
-
|
|
2784
|
+
// A thumb's 44px on a phone.
|
|
2785
|
+
"flex h-10 cursor-default select-none items-center gap-2.5 rounded-xl px-3 text-[0.9375rem] outline-none max-md:h-11",
|
|
2765
2786
|
"data-[highlighted]:bg-accent data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:text-muted-foreground",
|
|
2766
2787
|
destructive && "text-destructive [&_svg]:text-destructive",
|
|
2767
2788
|
className
|
|
@@ -4380,6 +4401,220 @@ function SignMessage({
|
|
|
4380
4401
|
)
|
|
4381
4402
|
] });
|
|
4382
4403
|
}
|
|
4404
|
+
function SectionTitle({
|
|
4405
|
+
title,
|
|
4406
|
+
meta,
|
|
4407
|
+
description,
|
|
4408
|
+
action,
|
|
4409
|
+
as: Tag = "h2",
|
|
4410
|
+
size = "md",
|
|
4411
|
+
tone = "default",
|
|
4412
|
+
id,
|
|
4413
|
+
className
|
|
4414
|
+
}) {
|
|
4415
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-wrap items-end justify-between gap-x-4 gap-y-3", className), children: [
|
|
4416
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 max-w-[40rem] flex-[1_1_16rem] flex-col gap-1", children: [
|
|
4417
|
+
/* @__PURE__ */ jsxs(
|
|
4418
|
+
Tag,
|
|
4419
|
+
{
|
|
4420
|
+
id,
|
|
4421
|
+
className: cn(
|
|
4422
|
+
"flex scroll-mt-24 flex-wrap items-baseline gap-x-3",
|
|
4423
|
+
size === "sm" ? "oca-title-sm" : "oca-title",
|
|
4424
|
+
tone === "danger" && "text-destructive"
|
|
4425
|
+
),
|
|
4426
|
+
children: [
|
|
4427
|
+
title,
|
|
4428
|
+
meta ? /* @__PURE__ */ jsx("span", { className: "oca-tabular text-[0.875rem] font-normal tracking-normal text-muted-foreground", children: meta }) : null
|
|
4429
|
+
]
|
|
4430
|
+
}
|
|
4431
|
+
),
|
|
4432
|
+
description ? /* @__PURE__ */ jsx("p", { className: "text-[0.9375rem] leading-relaxed text-muted-foreground", children: description }) : null
|
|
4433
|
+
] }),
|
|
4434
|
+
action ? /* @__PURE__ */ jsx("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: action }) : null
|
|
4435
|
+
] });
|
|
4436
|
+
}
|
|
4437
|
+
function ListCard({
|
|
4438
|
+
as: Tag = "ul",
|
|
4439
|
+
className,
|
|
4440
|
+
...props
|
|
4441
|
+
}) {
|
|
4442
|
+
return /* @__PURE__ */ jsx(Tag, { className: cn("divide-y divide-border overflow-clip rounded-[1.25rem] border border-border bg-card", className), ...props });
|
|
4443
|
+
}
|
|
4444
|
+
var ROW_LOOK = {
|
|
4445
|
+
// In a ListCard: full width, the card's hairlines between rows.
|
|
4446
|
+
card: { box: "px-5", hover: "hover:bg-accent/60", current: "bg-accent" },
|
|
4447
|
+
// In a pane's list (threads, contacts): rounded, lifted when current.
|
|
4448
|
+
pane: { box: "rounded-xl px-3", hover: "hover:bg-accent", current: "bg-card shadow-sm ring-1 ring-border" }
|
|
4449
|
+
};
|
|
4450
|
+
function ListRow({
|
|
4451
|
+
title,
|
|
4452
|
+
meta,
|
|
4453
|
+
description,
|
|
4454
|
+
leading,
|
|
4455
|
+
trailing,
|
|
4456
|
+
actions,
|
|
4457
|
+
revealActions = "always",
|
|
4458
|
+
href,
|
|
4459
|
+
onSelect,
|
|
4460
|
+
current = false,
|
|
4461
|
+
unread = false,
|
|
4462
|
+
variant = "card",
|
|
4463
|
+
as: Tag = "li",
|
|
4464
|
+
className
|
|
4465
|
+
}) {
|
|
4466
|
+
const tight = useDensity() === "compact";
|
|
4467
|
+
const look = ROW_LOOK[variant];
|
|
4468
|
+
const interactive = href !== void 0 || onSelect !== void 0;
|
|
4469
|
+
const cls = cn(
|
|
4470
|
+
"flex min-h-11 w-full min-w-0 items-center gap-3 text-left outline-none transition-colors",
|
|
4471
|
+
"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
|
|
4472
|
+
look.box,
|
|
4473
|
+
variant === "pane" ? "py-2" : tight ? "py-3" : "py-4",
|
|
4474
|
+
interactive && !current && look.hover,
|
|
4475
|
+
current && look.current,
|
|
4476
|
+
actions && "pr-14"
|
|
4477
|
+
);
|
|
4478
|
+
const body = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4479
|
+
leading ? /* @__PURE__ */ jsx("span", { className: "flex shrink-0", children: leading }) : null,
|
|
4480
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
4481
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-baseline justify-between gap-3", children: [
|
|
4482
|
+
/* @__PURE__ */ jsx("span", { className: cn("truncate text-[0.9375rem] text-foreground", unread ? "font-semibold" : "font-medium"), children: title }),
|
|
4483
|
+
meta ? /* @__PURE__ */ jsx("span", { className: "oca-tabular shrink-0 text-[0.8125rem] text-muted-foreground", children: meta }) : null
|
|
4484
|
+
] }),
|
|
4485
|
+
description ? /* @__PURE__ */ jsx("span", { className: cn("truncate text-[0.875rem]", unread ? "text-foreground" : "text-muted-foreground"), children: description }) : null
|
|
4486
|
+
] }),
|
|
4487
|
+
trailing ? /* @__PURE__ */ jsx("span", { className: "flex shrink-0 items-center gap-2", children: trailing }) : null
|
|
4488
|
+
] });
|
|
4489
|
+
const aria = current ? { "aria-current": "true" } : {};
|
|
4490
|
+
return /* @__PURE__ */ jsxs(Tag, { className: cn("group/row relative", className), children: [
|
|
4491
|
+
href !== void 0 ? href.startsWith("/") ? /* @__PURE__ */ jsx(Link, { href, className: cls, ...aria, children: body }) : /* @__PURE__ */ jsx("a", { href, className: cls, ...aria, children: body }) : onSelect ? /* @__PURE__ */ jsx("button", { type: "button", onClick: onSelect, className: cls, ...aria, children: body }) : /* @__PURE__ */ jsx("div", { className: cls, children: body }),
|
|
4492
|
+
actions ? /* @__PURE__ */ jsx(
|
|
4493
|
+
"div",
|
|
4494
|
+
{
|
|
4495
|
+
className: cn(
|
|
4496
|
+
"absolute right-2 top-1/2 flex -translate-y-1/2 items-center",
|
|
4497
|
+
revealActions === "hover" && "transition-opacity md:opacity-0 md:focus-within:opacity-100 md:group-hover/row:opacity-100 md:has-[[data-state=open]]:opacity-100"
|
|
4498
|
+
),
|
|
4499
|
+
children: actions
|
|
4500
|
+
}
|
|
4501
|
+
) : null
|
|
4502
|
+
] });
|
|
4503
|
+
}
|
|
4504
|
+
var ChoiceSize = createContext("md");
|
|
4505
|
+
var COLUMNS = { 1: "", 2: "sm:grid-cols-2", 3: "sm:grid-cols-2 lg:grid-cols-3" };
|
|
4506
|
+
function ChoiceGroup({
|
|
4507
|
+
value,
|
|
4508
|
+
onValueChange,
|
|
4509
|
+
label,
|
|
4510
|
+
columns = 1,
|
|
4511
|
+
size = "md",
|
|
4512
|
+
disabled,
|
|
4513
|
+
className,
|
|
4514
|
+
children
|
|
4515
|
+
}) {
|
|
4516
|
+
return /* @__PURE__ */ jsx(ChoiceSize.Provider, { value: size, children: /* @__PURE__ */ jsx(
|
|
4517
|
+
RadioGroupPrimitive.Root,
|
|
4518
|
+
{
|
|
4519
|
+
value: value ?? "",
|
|
4520
|
+
onValueChange: (v) => onValueChange(v),
|
|
4521
|
+
"aria-label": label,
|
|
4522
|
+
disabled,
|
|
4523
|
+
className: cn("grid", size === "sm" ? "gap-1.5" : "gap-3", COLUMNS[columns], className),
|
|
4524
|
+
children
|
|
4525
|
+
}
|
|
4526
|
+
) });
|
|
4527
|
+
}
|
|
4528
|
+
function ChoiceCard({
|
|
4529
|
+
value,
|
|
4530
|
+
title,
|
|
4531
|
+
description,
|
|
4532
|
+
icon,
|
|
4533
|
+
disabled,
|
|
4534
|
+
className
|
|
4535
|
+
}) {
|
|
4536
|
+
const sm = useContext(ChoiceSize) === "sm";
|
|
4537
|
+
return /* @__PURE__ */ jsxs(
|
|
4538
|
+
RadioGroupPrimitive.Item,
|
|
4539
|
+
{
|
|
4540
|
+
value,
|
|
4541
|
+
disabled,
|
|
4542
|
+
className: cn(
|
|
4543
|
+
"group flex w-full min-w-0 items-start gap-3 border text-left outline-none transition-colors",
|
|
4544
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
4545
|
+
"border-border bg-card data-[state=checked]:border-foreground data-[state=checked]:bg-accent data-[state=unchecked]:hover:border-oca-hairline-strong",
|
|
4546
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
4547
|
+
sm ? "min-h-11 rounded-xl px-3.5 py-2.5" : "rounded-[1.25rem] p-5",
|
|
4548
|
+
className
|
|
4549
|
+
),
|
|
4550
|
+
children: [
|
|
4551
|
+
icon ? /* @__PURE__ */ jsx(
|
|
4552
|
+
"span",
|
|
4553
|
+
{
|
|
4554
|
+
"aria-hidden": true,
|
|
4555
|
+
className: cn(
|
|
4556
|
+
"shrink-0 text-muted-foreground group-data-[state=checked]:text-oca-accent-ink [&_svg]:size-full",
|
|
4557
|
+
sm ? "mt-0.5 size-4" : "size-6"
|
|
4558
|
+
),
|
|
4559
|
+
children: icon
|
|
4560
|
+
}
|
|
4561
|
+
) : null,
|
|
4562
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
4563
|
+
/* @__PURE__ */ jsx("span", { className: sm ? "text-[0.9375rem] font-medium" : "oca-title-sm", children: title }),
|
|
4564
|
+
description ? /* @__PURE__ */ jsx("span", { className: "text-[0.875rem] leading-relaxed text-muted-foreground", children: description }) : null
|
|
4565
|
+
] })
|
|
4566
|
+
]
|
|
4567
|
+
}
|
|
4568
|
+
);
|
|
4569
|
+
}
|
|
4570
|
+
var SIZES2 = {
|
|
4571
|
+
"2xs": "size-7 text-[0.6875rem] [&_svg]:size-3.5",
|
|
4572
|
+
xs: "size-8 text-[0.75rem] [&_svg]:size-4",
|
|
4573
|
+
sm: "size-9 text-[0.8125rem] [&_svg]:size-4",
|
|
4574
|
+
md: "size-11 text-[0.9375rem] [&_svg]:size-5",
|
|
4575
|
+
lg: "size-14 text-[1.1875rem] [&_svg]:size-6"
|
|
4576
|
+
};
|
|
4577
|
+
function personInitials(name) {
|
|
4578
|
+
return name.trim().split(/\s+/).slice(0, 2).map((w) => w.match(/[\p{L}\p{N}]/u)?.[0] ?? "").join("").toLocaleUpperCase();
|
|
4579
|
+
}
|
|
4580
|
+
function avatarHue(seed) {
|
|
4581
|
+
let h = 2166136261;
|
|
4582
|
+
for (let i = 0; i < seed.length; i++) {
|
|
4583
|
+
h ^= seed.charCodeAt(i);
|
|
4584
|
+
h = Math.imul(h, 16777619);
|
|
4585
|
+
}
|
|
4586
|
+
return (h >>> 0) % 360;
|
|
4587
|
+
}
|
|
4588
|
+
function Avatar({
|
|
4589
|
+
seed,
|
|
4590
|
+
name,
|
|
4591
|
+
src,
|
|
4592
|
+
size = "sm",
|
|
4593
|
+
className
|
|
4594
|
+
}) {
|
|
4595
|
+
const [failed, setFailed] = useState(null);
|
|
4596
|
+
const box = cn("inline-flex shrink-0 select-none items-center justify-center overflow-hidden rounded-full", SIZES2[size], className);
|
|
4597
|
+
if (src && failed !== src) {
|
|
4598
|
+
return (
|
|
4599
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
4600
|
+
/* @__PURE__ */ jsx("img", { src, alt: "", "aria-hidden": true, className: cn(box, "object-cover"), onError: () => setFailed(src) })
|
|
4601
|
+
);
|
|
4602
|
+
}
|
|
4603
|
+
const initials = name ? personInitials(name) : "";
|
|
4604
|
+
return /* @__PURE__ */ jsx(
|
|
4605
|
+
"span",
|
|
4606
|
+
{
|
|
4607
|
+
"aria-hidden": true,
|
|
4608
|
+
className: cn(box, "font-medium leading-none"),
|
|
4609
|
+
style: {
|
|
4610
|
+
"--oca-avatar-h": avatarHue(seed),
|
|
4611
|
+
backgroundColor: "hsl(var(--oca-avatar-h) 60% var(--oca-avatar-bg-l))",
|
|
4612
|
+
color: "hsl(var(--oca-avatar-h) 45% var(--oca-avatar-fg-l))"
|
|
4613
|
+
},
|
|
4614
|
+
children: initials || /* @__PURE__ */ jsx(UserRound, {})
|
|
4615
|
+
}
|
|
4616
|
+
);
|
|
4617
|
+
}
|
|
4383
4618
|
function useMacKeys() {
|
|
4384
4619
|
const [mac, setMac] = useState(true);
|
|
4385
4620
|
useEffect(() => {
|
|
@@ -4655,7 +4890,7 @@ function download(content, filename, mime) {
|
|
|
4655
4890
|
a.remove();
|
|
4656
4891
|
setTimeout(() => URL.revokeObjectURL(url), 0);
|
|
4657
4892
|
}
|
|
4658
|
-
var BAR_BUTTON = "inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-[0.75rem] text-oca-ink-subtle transition-colors hover:bg-white/10 hover:text-white";
|
|
4893
|
+
var BAR_BUTTON = "inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-[0.75rem] text-oca-ink-subtle transition-colors hover:bg-white/10 hover:text-white max-md:h-11 max-md:min-w-11 max-md:justify-center max-md:px-3";
|
|
4659
4894
|
function ArtifactView({
|
|
4660
4895
|
content,
|
|
4661
4896
|
title,
|
|
@@ -4685,7 +4920,8 @@ function ArtifactView({
|
|
|
4685
4920
|
"aria-pressed": view === v,
|
|
4686
4921
|
onClick: () => setView(v),
|
|
4687
4922
|
className: cn(
|
|
4688
|
-
|
|
4923
|
+
// The pill stays 28px; its target reaches the bar's 44.
|
|
4924
|
+
"relative h-7 rounded-full px-2.5 text-[0.75rem] transition-colors before:absolute before:inset-x-0 before:top-1/2 before:h-11 before:-translate-y-1/2",
|
|
4689
4925
|
view === v ? "bg-white/[0.12] text-white" : "text-oca-ink-subtle hover:text-white"
|
|
4690
4926
|
),
|
|
4691
4927
|
children: v === "formatted" ? "Formatted" : "Raw"
|
|
@@ -5155,7 +5391,8 @@ function FilterChips({
|
|
|
5155
5391
|
onClick: () => press(o.value),
|
|
5156
5392
|
className: cn(
|
|
5157
5393
|
"inline-flex shrink-0 items-center gap-1.5 rounded-full border px-3.5 text-[0.875rem] transition-colors",
|
|
5158
|
-
|
|
5394
|
+
// A thumb's 44px on a phone.
|
|
5395
|
+
tight ? "h-11 md:h-8" : "h-11 md:h-9",
|
|
5159
5396
|
on ? "border-foreground bg-foreground text-background" : "border-border bg-card text-muted-foreground hover:border-oca-hairline-strong hover:text-foreground"
|
|
5160
5397
|
),
|
|
5161
5398
|
children: [
|
|
@@ -5221,6 +5458,6 @@ function ToolGrid({
|
|
|
5221
5458
|
);
|
|
5222
5459
|
}
|
|
5223
5460
|
|
|
5224
|
-
export { Accent, ActivityList, AnchorStatus, ApiTable, AppCard, AppGrid, ArtifactView, BlockCountdown, BlockHeight, Breadcrumbs, BrowserFrame, Callout, CardGrid, ChartFrame, Closing, CodeBlock, CodeTabs, CommandDialog, ComparisonTable, Container, CopyButton, CountdownRing, DataTable, Diagram, Display, DocHeader, DocLayout, DocsHeading, DocsPager, DropZone, EmptyLine, EmptyState, EndpointList, ErrorBoundary, ErrorPage, Eyebrow, FactBlock, FactRows, Faq, FilterChips, FloatChip, Footnote, FormSection, HashChip, HudCard, InstallTabs, KeyValueList, Lead, LegalDocument, LinkCard, LoadingBlock, LockedPreview, MdxTable, Meter, Monogram, Notice, OnThisPage, PackageCard, PageHeader, PageHero, Panel, PhoneFrame, PlanCard, ProgressSteps, ProofStrip, Prose, ProtocolGrid, ProtocolHero, ProtocolNav, Reveal, Sats, SatsFigure, ScrollStory, SearchButton, SearchDialog, Section, SectionHeading, SectionIntro, SignMessage, SourceNote, Sparkline, SpecCard, SplitBar, StatCard, StatGrid, StateBadge, Step, StepGrid, Steps, TextLink, Ticker, ToolGrid, TruthTable, UsdApprox, VerifyBox, VerifyReport, chartColor, createStateBadge, languageName, monogramGround, monogramLetter, satsText, sectionVariants, useActiveHeading, useCopy, useHeadings, useInView };
|
|
5461
|
+
export { Accent, ActivityList, AnchorStatus, ApiTable, AppCard, AppGrid, ArtifactView, Avatar, BlockCountdown, BlockHeight, Breadcrumbs, BrowserFrame, Callout, CardGrid, ChartFrame, ChoiceCard, ChoiceGroup, Closing, CodeBlock, CodeTabs, CommandDialog, ComparisonTable, Container, CopyButton, CountdownRing, DataTable, Diagram, Display, DocHeader, DocLayout, DocsHeading, DocsPager, DropZone, EmptyLine, EmptyState, EndpointList, ErrorBoundary, ErrorPage, Eyebrow, FactBlock, FactRows, Faq, FilterChips, FloatChip, Footnote, FormSection, HashChip, HudCard, InstallTabs, KeyValueList, Lead, LegalDocument, LinkCard, ListCard, ListRow, LoadingBlock, LockedPreview, MdxTable, Meter, Monogram, Notice, OnThisPage, PackageCard, PageHeader, PageHero, Panel, PhoneFrame, PlanCard, ProgressSteps, ProofStrip, Prose, ProtocolGrid, ProtocolHero, ProtocolNav, Reveal, Sats, SatsFigure, ScrollStory, SearchButton, SearchDialog, Section, SectionHeading, SectionIntro, SectionTitle, SignMessage, SourceNote, Sparkline, SpecCard, SplitBar, StatCard, StatGrid, StateBadge, Step, StepGrid, Steps, TextLink, Ticker, ToolGrid, TruthTable, UsdApprox, VerifyBox, VerifyReport, chartColor, createStateBadge, languageName, monogramGround, monogramLetter, satsText, sectionVariants, useActiveHeading, useCopy, useHeadings, useInView };
|
|
5225
5462
|
//# sourceMappingURL=components.mjs.map
|
|
5226
5463
|
//# sourceMappingURL=components.mjs.map
|