@orangecheck/app-design 1.6.1 → 1.7.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.
Files changed (56) hide show
  1. package/README.md +3 -3
  2. package/dist/chrome.d.mts +11 -6
  3. package/dist/chrome.d.ts +11 -6
  4. package/dist/chrome.js +156 -130
  5. package/dist/chrome.js.map +1 -1
  6. package/dist/chrome.mjs +155 -131
  7. package/dist/chrome.mjs.map +1 -1
  8. package/dist/components.d.mts +40 -5
  9. package/dist/components.d.ts +40 -5
  10. package/dist/components.js +135 -13
  11. package/dist/components.js.map +1 -1
  12. package/dist/components.mjs +132 -14
  13. package/dist/components.mjs.map +1 -1
  14. package/dist/{docs-CFE5mU_6.d.mts → docs-B9G1BNXI.d.mts} +2 -2
  15. package/dist/{docs-ByUx4t-D.d.ts → docs-BWWnm5Jv.d.ts} +2 -2
  16. package/dist/family.d.mts +1 -1
  17. package/dist/family.d.ts +1 -1
  18. package/dist/family.js +7 -1
  19. package/dist/family.js.map +1 -1
  20. package/dist/family.mjs +5 -2
  21. package/dist/family.mjs.map +1 -1
  22. package/dist/{index-DmfyPYe5.d.mts → index-Bkl49Vgy.d.mts} +4 -1
  23. package/dist/{index-DmfyPYe5.d.ts → index-Bkl49Vgy.d.ts} +4 -1
  24. package/dist/index.d.mts +7 -7
  25. package/dist/index.d.ts +7 -7
  26. package/dist/index.js +197 -48
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.mjs +189 -49
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/mdx.d.mts +3 -3
  31. package/dist/mdx.d.ts +3 -3
  32. package/dist/mdx.js +5 -3
  33. package/dist/mdx.js.map +1 -1
  34. package/dist/mdx.mjs +5 -3
  35. package/dist/mdx.mjs.map +1 -1
  36. package/dist/primitives.d.mts +2 -2
  37. package/dist/primitives.d.ts +2 -2
  38. package/dist/primitives.js +2 -1
  39. package/dist/primitives.js.map +1 -1
  40. package/dist/primitives.mjs +2 -1
  41. package/dist/primitives.mjs.map +1 -1
  42. package/dist/session.d.mts +4 -4
  43. package/dist/session.d.ts +4 -4
  44. package/dist/session.js +122 -1
  45. package/dist/session.js.map +1 -1
  46. package/dist/session.mjs +122 -1
  47. package/dist/session.mjs.map +1 -1
  48. package/dist/{status-badge-BJ9Sdsx8.d.mts → status-badge-BBbCO6ZA.d.mts} +1 -1
  49. package/dist/{status-badge-Bt8x3RhO.d.ts → status-badge-CHHxtFkP.d.ts} +1 -1
  50. package/dist/styles/swagger.css +24 -1
  51. package/dist/styles/tokens.css +5 -0
  52. package/dist/{tool-shell-CQZNRUgH.d.mts → tool-shell-CnZ3NUSi.d.ts} +10 -4
  53. package/dist/{tool-shell-CRmceGrV.d.ts → tool-shell-DQFEMLLe.d.mts} +10 -4
  54. package/dist/{tools-Bg1gi2HO.d.mts → tools-CKO8IseL.d.mts} +2 -2
  55. package/dist/{tools-Bw7RhO92.d.ts → tools-CzjFPng4.d.ts} +2 -2
  56. package/package.json +5 -2
@@ -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, jsx38) {
538
+ function scanJs(src, emit, jsx39) {
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 (jsx38 && tagDepth === 0 && (m = at(JS_TAG, src, i)) && (prev === "" || JSX_BEFORE.has(prev))) {
564
+ if (jsx39 && 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 (jsx38 && tagDepth > 0 && braceInTag === 0) {
576
+ if (jsx39 && 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 (jsx38 && tagDepth > 0 && braceInTag > 0) {
596
+ } else if (jsx39 && tagDepth > 0 && braceInTag > 0) {
597
597
  if (src[i] === "{") braceInTag++;
598
598
  else if (src[i] === "}") braceInTag--;
599
599
  }
@@ -942,7 +942,8 @@ function ScrollFade({ fade = "var(--card)", className, innerClassName, children,
942
942
  onScroll: measure,
943
943
  tabIndex: edges.left || edges.right ? 0 : void 0,
944
944
  className: cn(
945
- "overflow-x-auto overscroll-x-contain rounded-[inherit] outline-none focus-visible:ring-2 focus-visible:ring-ring",
945
+ // Positioned, so sr-only text deep in a wide row scrolls and clips with the row.
946
+ "relative overflow-x-auto overscroll-x-contain rounded-[inherit] outline-none focus-visible:ring-2 focus-visible:ring-ring",
946
947
  innerClassName
947
948
  ),
948
949
  children
@@ -1788,7 +1789,7 @@ function Well({
1788
1789
  ] });
1789
1790
  }
1790
1791
  var FRAME = "overflow-hidden rounded-[1.25rem] border border-[var(--oca-code-line)] bg-[var(--oca-code-surface)]";
1791
- var COPY_ON_INK = "text-oca-ink-subtle hover:bg-white/10 hover:text-white";
1792
+ var COPY_ON_INK = "text-oca-ink-subtle hover:bg-white/10 hover:text-white max-md:size-11";
1792
1793
  function CodeBlock({
1793
1794
  code,
1794
1795
  html,
@@ -2216,6 +2217,9 @@ var GROUNDS = [
2216
2217
  }
2217
2218
  ];
2218
2219
  var SIZES = {
2220
+ // A list row's avatar, a facepile.
2221
+ "2xs": "size-7 rounded-[0.55rem] text-[0.75rem]",
2222
+ xs: "size-8 rounded-[0.6rem] text-[0.875rem]",
2219
2223
  sm: "size-9 rounded-[0.7rem] text-[0.9375rem]",
2220
2224
  md: "size-11 rounded-[0.85rem] text-[1.125rem]",
2221
2225
  lg: "size-14 rounded-[1.05rem] text-[1.5rem]"
@@ -2341,6 +2345,7 @@ function MarkOutline({ className }) {
2341
2345
  // src/family/index.ts
2342
2346
  var OCHK_IO = "https://ochk.io";
2343
2347
  var DOCS_HREF = `${OCHK_IO}/docs`;
2348
+ var OCHK_APP = "https://ochk.app";
2344
2349
  function protocol(slug, verb, line, kinds) {
2345
2350
  return {
2346
2351
  slug,
@@ -2377,7 +2382,7 @@ var FAMILY = [
2377
2382
  {
2378
2383
  slug: "me",
2379
2384
  label: "ochk.app",
2380
- href: "https://ochk.app",
2385
+ href: OCHK_APP,
2381
2386
  group: "orangecheck",
2382
2387
  line: "One account, with Bitcoin behind it.",
2383
2388
  status: "testing"
@@ -2460,6 +2465,10 @@ function protocolSite(slug) {
2460
2465
  { href: `${OCHK_IO}/trust`, label: "Trust" },
2461
2466
  { href: `${OCHK_IO}/about`, label: "About" }
2462
2467
  ];
2468
+ var InColumnContext = sharedContext("in-column", false);
2469
+ function useInColumn() {
2470
+ return useContext(InColumnContext);
2471
+ }
2463
2472
  var SiteHomeContext = sharedContext("site-home", void 0);
2464
2473
  function useSiteHome() {
2465
2474
  return useContext(SiteHomeContext);
@@ -2487,10 +2496,11 @@ function ErrorPage({
2487
2496
  className
2488
2497
  }) {
2489
2498
  const shellHome = useSiteHome();
2499
+ const inColumn = useInColumn();
2490
2500
  const homeHref = home ?? (protocol2 ? protocolSite(protocol2).pageHref : shellHome ?? OCHK_IO);
2491
2501
  const words = WORDS[code] ?? (code >= 500 ? WORDS[500] : WORDS[404]);
2492
2502
  const server = code >= 500;
2493
- 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: [
2503
+ 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: [
2494
2504
  /* @__PURE__ */ jsxs("div", { className: "flex max-w-[40rem] flex-col items-start gap-6 md:col-span-7", children: [
2495
2505
  /* @__PURE__ */ jsxs("p", { className: "oca-eyebrow oca-enter", children: [
2496
2506
  /* @__PURE__ */ jsx("span", { className: "oca-tabular", children: code }),
@@ -2897,7 +2907,7 @@ function Panel({
2897
2907
  const [open, setOpen] = useState(false);
2898
2908
  const body = (expanded) => typeof children === "function" ? children(expanded) : children;
2899
2909
  const head = (expanded) => /* @__PURE__ */ jsxs("header", { className: "flex flex-wrap items-start justify-between gap-x-4 gap-y-2", children: [
2900
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [
2910
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-[min(100%,12rem)] flex-1 basis-0 flex-col gap-1", children: [
2901
2911
  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 }),
2902
2912
  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
2903
2913
  ] }),
@@ -2926,7 +2936,7 @@ function Panel({
2926
2936
  className: "flex h-[min(92dvh,56rem)] w-[min(96vw,80rem)] max-w-none flex-col gap-4 overflow-y-auto",
2927
2937
  children: [
2928
2938
  head(true),
2929
- /* @__PURE__ */ jsx("div", { className: "min-h-0 min-w-0 flex-1", children: open ? body(true) : null }),
2939
+ /* @__PURE__ */ jsx("div", { className: "min-h-0 min-w-0 flex-1 overflow-y-auto", children: open ? body(true) : null }),
2930
2940
  source ? /* @__PURE__ */ jsx("div", { className: "border-t border-border pt-3", children: source }) : null
2931
2941
  ]
2932
2942
  }
@@ -4379,6 +4389,112 @@ function SignMessage({
4379
4389
  )
4380
4390
  ] });
4381
4391
  }
4392
+ function SectionTitle({
4393
+ title,
4394
+ meta,
4395
+ description,
4396
+ action,
4397
+ as: Tag = "h2",
4398
+ size = "md",
4399
+ tone = "default",
4400
+ id,
4401
+ className
4402
+ }) {
4403
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-wrap items-end justify-between gap-x-4 gap-y-3", className), children: [
4404
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 max-w-[40rem] flex-[1_1_16rem] flex-col gap-1", children: [
4405
+ /* @__PURE__ */ jsxs(
4406
+ Tag,
4407
+ {
4408
+ id,
4409
+ className: cn(
4410
+ "flex scroll-mt-24 flex-wrap items-baseline gap-x-3",
4411
+ size === "sm" ? "oca-title-sm" : "oca-title",
4412
+ tone === "danger" && "text-destructive"
4413
+ ),
4414
+ children: [
4415
+ title,
4416
+ meta ? /* @__PURE__ */ jsx("span", { className: "oca-tabular text-[0.875rem] font-normal tracking-normal text-muted-foreground", children: meta }) : null
4417
+ ]
4418
+ }
4419
+ ),
4420
+ description ? /* @__PURE__ */ jsx("p", { className: "text-[0.9375rem] leading-relaxed text-muted-foreground", children: description }) : null
4421
+ ] }),
4422
+ action ? /* @__PURE__ */ jsx("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: action }) : null
4423
+ ] });
4424
+ }
4425
+ function ListCard({
4426
+ as: Tag = "ul",
4427
+ className,
4428
+ ...props
4429
+ }) {
4430
+ return /* @__PURE__ */ jsx(Tag, { className: cn("divide-y divide-border overflow-clip rounded-[1.25rem] border border-border bg-card", className), ...props });
4431
+ }
4432
+ var ChoiceSize = createContext("md");
4433
+ var COLUMNS = { 1: "", 2: "sm:grid-cols-2", 3: "sm:grid-cols-2 lg:grid-cols-3" };
4434
+ function ChoiceGroup({
4435
+ value,
4436
+ onValueChange,
4437
+ label,
4438
+ columns = 1,
4439
+ size = "md",
4440
+ disabled,
4441
+ className,
4442
+ children
4443
+ }) {
4444
+ return /* @__PURE__ */ jsx(ChoiceSize.Provider, { value: size, children: /* @__PURE__ */ jsx(
4445
+ RadioGroupPrimitive.Root,
4446
+ {
4447
+ value: value ?? "",
4448
+ onValueChange: (v) => onValueChange(v),
4449
+ "aria-label": label,
4450
+ disabled,
4451
+ className: cn("grid", size === "sm" ? "gap-1.5" : "gap-3", COLUMNS[columns], className),
4452
+ children
4453
+ }
4454
+ ) });
4455
+ }
4456
+ function ChoiceCard({
4457
+ value,
4458
+ title,
4459
+ description,
4460
+ icon,
4461
+ disabled,
4462
+ className
4463
+ }) {
4464
+ const sm = useContext(ChoiceSize) === "sm";
4465
+ return /* @__PURE__ */ jsxs(
4466
+ RadioGroupPrimitive.Item,
4467
+ {
4468
+ value,
4469
+ disabled,
4470
+ className: cn(
4471
+ "group flex w-full min-w-0 items-start gap-3 border text-left outline-none transition-colors",
4472
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
4473
+ "border-border bg-card data-[state=checked]:border-foreground data-[state=checked]:bg-accent data-[state=unchecked]:hover:border-oca-hairline-strong",
4474
+ "disabled:cursor-not-allowed disabled:opacity-50",
4475
+ sm ? "min-h-11 rounded-xl px-3.5 py-2.5" : "rounded-[1.25rem] p-5",
4476
+ className
4477
+ ),
4478
+ children: [
4479
+ icon ? /* @__PURE__ */ jsx(
4480
+ "span",
4481
+ {
4482
+ "aria-hidden": true,
4483
+ className: cn(
4484
+ "shrink-0 text-muted-foreground group-data-[state=checked]:text-oca-accent-ink [&_svg]:size-full",
4485
+ sm ? "mt-0.5 size-4" : "size-6"
4486
+ ),
4487
+ children: icon
4488
+ }
4489
+ ) : null,
4490
+ /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col gap-1", children: [
4491
+ /* @__PURE__ */ jsx("span", { className: sm ? "text-[0.9375rem] font-medium" : "oca-title-sm", children: title }),
4492
+ description ? /* @__PURE__ */ jsx("span", { className: "text-[0.875rem] leading-relaxed text-muted-foreground", children: description }) : null
4493
+ ] })
4494
+ ]
4495
+ }
4496
+ );
4497
+ }
4382
4498
  function useMacKeys() {
4383
4499
  const [mac, setMac] = useState(true);
4384
4500
  useEffect(() => {
@@ -4654,7 +4770,7 @@ function download(content, filename, mime) {
4654
4770
  a.remove();
4655
4771
  setTimeout(() => URL.revokeObjectURL(url), 0);
4656
4772
  }
4657
- 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";
4773
+ 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";
4658
4774
  function ArtifactView({
4659
4775
  content,
4660
4776
  title,
@@ -4684,7 +4800,8 @@ function ArtifactView({
4684
4800
  "aria-pressed": view === v,
4685
4801
  onClick: () => setView(v),
4686
4802
  className: cn(
4687
- "h-7 rounded-full px-2.5 text-[0.75rem] transition-colors",
4803
+ // The pill stays 28px; its target reaches the bar's 44.
4804
+ "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",
4688
4805
  view === v ? "bg-white/[0.12] text-white" : "text-oca-ink-subtle hover:text-white"
4689
4806
  ),
4690
4807
  children: v === "formatted" ? "Formatted" : "Raw"
@@ -5154,7 +5271,8 @@ function FilterChips({
5154
5271
  onClick: () => press(o.value),
5155
5272
  className: cn(
5156
5273
  "inline-flex shrink-0 items-center gap-1.5 rounded-full border px-3.5 text-[0.875rem] transition-colors",
5157
- tight ? "h-8" : "h-9",
5274
+ // A thumb's 44px on a phone.
5275
+ tight ? "h-11 md:h-8" : "h-11 md:h-9",
5158
5276
  on ? "border-foreground bg-foreground text-background" : "border-border bg-card text-muted-foreground hover:border-oca-hairline-strong hover:text-foreground"
5159
5277
  ),
5160
5278
  children: [
@@ -5220,6 +5338,6 @@ function ToolGrid({
5220
5338
  );
5221
5339
  }
5222
5340
 
5223
- 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 };
5341
+ export { Accent, ActivityList, AnchorStatus, ApiTable, AppCard, AppGrid, ArtifactView, 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, 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 };
5224
5342
  //# sourceMappingURL=components.mjs.map
5225
5343
  //# sourceMappingURL=components.mjs.map