@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.d.mts
CHANGED
|
@@ -3,11 +3,11 @@ import { ReactNode, HTMLAttributes, ElementType, CSSProperties, Component, Error
|
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
export { D as DocHeader, a as DocLayout, P as PageHero, b as PageHeroProps, T as TocItem, u as useActiveHeading } from './hero-Dn37il-9.mjs';
|
|
6
|
-
export { A as ApiRow, a as ApiTable, b as AppCard, c as AppCardProps, d as AppGrid, B as Breadcrumbs, C as Callout, e as CardGrid, f as CodeBlock, g as CodeBlockProps, h as CodeTab, i as CodeTabs, j as ComparisonColumn, k as ComparisonRow, l as ComparisonTable, m as Crumb, D as Diagram, n as DocsHeading, o as DocsPager, I as InstallTabs, L as LinkCard, M as MdxTable, p as MermaidLike, q as MermaidLoader, O as OnThisPage, P as PagerLink, r as ProtocolGrid, s as ProtocolHero, t as ProtocolNav, S as SpecCard, u as SpecCardProps, v as SpecFileKind, w as Step, x as Steps, V as VerifyBox, y as languageName, z as useHeadings } from './docs-
|
|
6
|
+
export { A as ApiRow, a as ApiTable, b as AppCard, c as AppCardProps, d as AppGrid, B as Breadcrumbs, C as Callout, e as CardGrid, f as CodeBlock, g as CodeBlockProps, h as CodeTab, i as CodeTabs, j as ComparisonColumn, k as ComparisonRow, l as ComparisonTable, m as Crumb, D as Diagram, n as DocsHeading, o as DocsPager, I as InstallTabs, L as LinkCard, M as MdxTable, p as MermaidLike, q as MermaidLoader, O as OnThisPage, P as PagerLink, r as ProtocolGrid, s as ProtocolHero, t as ProtocolNav, S as SpecCard, u as SpecCardProps, v as SpecFileKind, w as Step, x as Steps, V as VerifyBox, y as languageName, z as useHeadings } from './docs-B9G1BNXI.mjs';
|
|
7
7
|
import { ExplorerKind, Network } from './format.mjs';
|
|
8
|
-
import {
|
|
9
|
-
import { S as Statement } from './status-badge-
|
|
10
|
-
export { A as AnchorState, a as AnchorStatus, b as ArtifactView, B as BlockCountdown, c as BlockHeight, C as ChosenFile, D as DropZone, F as FilterChips, d as FilterOption, e as FormSection, M as Meter, S as SectionStatus, f as StateBadge, g as StateDef, h as StateTone, T as ToolGrid, i as ToolItem, j as createStateBadge } from './tools-
|
|
8
|
+
import { k as ProtocolSlug } from './index-Bkl49Vgy.mjs';
|
|
9
|
+
import { S as Statement } from './status-badge-BBbCO6ZA.mjs';
|
|
10
|
+
export { A as AnchorState, a as AnchorStatus, b as ArtifactView, B as BlockCountdown, c as BlockHeight, C as ChosenFile, D as DropZone, F as FilterChips, d as FilterOption, e as FormSection, M as Meter, S as SectionStatus, f as StateBadge, g as StateDef, h as StateTone, T as ToolGrid, i as ToolItem, j as createStateBadge } from './tools-CKO8IseL.mjs';
|
|
11
11
|
|
|
12
12
|
declare function Eyebrow({ className, onInk, ...props }: HTMLAttributes<HTMLParagraphElement> & {
|
|
13
13
|
onInk?: boolean;
|
|
@@ -469,9 +469,10 @@ declare function EmptyState({ title, children, action, icon, className, }: {
|
|
|
469
469
|
className?: string;
|
|
470
470
|
}): react.JSX.Element;
|
|
471
471
|
type NoticeTone = 'neutral' | 'brand' | 'danger' | 'info' | 'success' | 'warning';
|
|
472
|
-
declare function Notice({ tone, title, children, action, role, className, }: {
|
|
472
|
+
declare function Notice({ tone, title, children, action, icon, role, className, }: {
|
|
473
473
|
tone?: NoticeTone;
|
|
474
474
|
title?: ReactNode;
|
|
475
|
+
icon?: ReactNode;
|
|
475
476
|
children?: ReactNode;
|
|
476
477
|
action?: ReactNode;
|
|
477
478
|
role?: 'alert' | 'status' | 'note';
|
|
@@ -573,7 +574,9 @@ declare function FloatChip({ icon, title, detail, delay, className, style, }: {
|
|
|
573
574
|
style?: CSSProperties;
|
|
574
575
|
}): react.JSX.Element;
|
|
575
576
|
|
|
576
|
-
declare const SIZES: {
|
|
577
|
+
declare const SIZES$1: {
|
|
578
|
+
readonly '2xs': "size-7 rounded-[0.55rem] text-[0.75rem]";
|
|
579
|
+
readonly xs: "size-8 rounded-[0.6rem] text-[0.875rem]";
|
|
577
580
|
readonly sm: "size-9 rounded-[0.7rem] text-[0.9375rem]";
|
|
578
581
|
readonly md: "size-11 rounded-[0.85rem] text-[1.125rem]";
|
|
579
582
|
readonly lg: "size-14 rounded-[1.05rem] text-[1.5rem]";
|
|
@@ -583,7 +586,7 @@ declare function monogramGround(seed: string): number;
|
|
|
583
586
|
declare function Monogram({ name, seed, size, className, style, }: {
|
|
584
587
|
name: string;
|
|
585
588
|
seed?: string;
|
|
586
|
-
size?: keyof typeof SIZES;
|
|
589
|
+
size?: keyof typeof SIZES$1;
|
|
587
590
|
className?: string;
|
|
588
591
|
style?: CSSProperties;
|
|
589
592
|
}): react.JSX.Element;
|
|
@@ -843,6 +846,70 @@ declare function TextLink({ href: written, children, external, className, }: {
|
|
|
843
846
|
className?: string;
|
|
844
847
|
}): react.JSX.Element;
|
|
845
848
|
|
|
849
|
+
declare function SectionTitle({ title, meta, description, action, as: Tag, size, tone, id, className, }: {
|
|
850
|
+
title: ReactNode;
|
|
851
|
+
meta?: ReactNode;
|
|
852
|
+
description?: ReactNode;
|
|
853
|
+
action?: ReactNode;
|
|
854
|
+
as?: 'h2' | 'h3';
|
|
855
|
+
size?: 'md' | 'sm';
|
|
856
|
+
tone?: 'default' | 'danger';
|
|
857
|
+
id?: string;
|
|
858
|
+
className?: string;
|
|
859
|
+
}): react.JSX.Element;
|
|
860
|
+
declare function ListCard({ as: Tag, className, ...props }: HTMLAttributes<HTMLElement> & {
|
|
861
|
+
as?: 'ul' | 'ol' | 'div';
|
|
862
|
+
}): react.JSX.Element;
|
|
863
|
+
declare function ListRow({ title, meta, description, leading, trailing, actions, revealActions, href, onSelect, current, unread, variant, as: Tag, className, }: {
|
|
864
|
+
title: ReactNode;
|
|
865
|
+
meta?: ReactNode;
|
|
866
|
+
description?: ReactNode;
|
|
867
|
+
leading?: ReactNode;
|
|
868
|
+
trailing?: ReactNode;
|
|
869
|
+
actions?: ReactNode;
|
|
870
|
+
revealActions?: 'always' | 'hover';
|
|
871
|
+
href?: string;
|
|
872
|
+
onSelect?: () => void;
|
|
873
|
+
current?: boolean;
|
|
874
|
+
unread?: boolean;
|
|
875
|
+
variant?: 'card' | 'pane';
|
|
876
|
+
as?: 'li' | 'div';
|
|
877
|
+
className?: string;
|
|
878
|
+
}): react.JSX.Element;
|
|
879
|
+
declare function ChoiceGroup<T extends string>({ value, onValueChange, label, columns, size, disabled, className, children, }: {
|
|
880
|
+
value: T | undefined;
|
|
881
|
+
onValueChange: (value: T) => void;
|
|
882
|
+
label: string;
|
|
883
|
+
columns?: 1 | 2 | 3;
|
|
884
|
+
size?: 'md' | 'sm';
|
|
885
|
+
disabled?: boolean;
|
|
886
|
+
className?: string;
|
|
887
|
+
children: ReactNode;
|
|
888
|
+
}): react.JSX.Element;
|
|
889
|
+
declare function ChoiceCard({ value, title, description, icon, disabled, className, }: {
|
|
890
|
+
value: string;
|
|
891
|
+
title: ReactNode;
|
|
892
|
+
description?: ReactNode;
|
|
893
|
+
icon?: ReactNode;
|
|
894
|
+
disabled?: boolean;
|
|
895
|
+
className?: string;
|
|
896
|
+
}): react.JSX.Element;
|
|
897
|
+
|
|
898
|
+
declare const SIZES: {
|
|
899
|
+
readonly '2xs': "size-7 text-[0.6875rem] [&_svg]:size-3.5";
|
|
900
|
+
readonly xs: "size-8 text-[0.75rem] [&_svg]:size-4";
|
|
901
|
+
readonly sm: "size-9 text-[0.8125rem] [&_svg]:size-4";
|
|
902
|
+
readonly md: "size-11 text-[0.9375rem] [&_svg]:size-5";
|
|
903
|
+
readonly lg: "size-14 text-[1.1875rem] [&_svg]:size-6";
|
|
904
|
+
};
|
|
905
|
+
declare function Avatar({ seed, name, src, size, className, }: {
|
|
906
|
+
seed: string;
|
|
907
|
+
name?: string | null;
|
|
908
|
+
src?: string | null;
|
|
909
|
+
size?: keyof typeof SIZES;
|
|
910
|
+
className?: string;
|
|
911
|
+
}): react.JSX.Element;
|
|
912
|
+
|
|
846
913
|
interface SearchResult {
|
|
847
914
|
id: string;
|
|
848
915
|
href?: string;
|
|
@@ -882,4 +949,4 @@ interface SearchDialogProps {
|
|
|
882
949
|
declare function SearchDialog({ onQuery, open: openProp, onOpenChange, onSelect, button, hotkey, label, placeholder, idle, defaultQuery, debounceMs, browse, className, }: SearchDialogProps): react.JSX.Element;
|
|
883
950
|
declare function CommandDialog({ label, placeholder, ...props }: Omit<SearchDialogProps, 'browse' | 'button'>): react.JSX.Element;
|
|
884
951
|
|
|
885
|
-
export { Accent, type ActivityItem, ActivityList, BrowserFrame, ChartFrame, type ChartTone, type CheckState, Closing, type Column, CommandDialog, Container, CopyButton, type CopyButtonProps, CountdownRing, DataTable, Display, type DisplayProps, EmptyLine, EmptyState, type Endpoint, EndpointList, ErrorBoundary, ErrorPage, Eyebrow, FactBlock, type FactRow, FactRows, Faq, FloatChip, Footnote, HashChip, HudCard, type KeyValueItem, KeyValueList, Lead, type LegalBlock, LegalDocument, type LegalSource, type LegendItem, LoadingBlock, LockedPreview, Monogram, Notice, PackageCard, type PackageItem, PageHeader, Panel, PhoneFrame, PlanCard, type ProgressStep, ProgressSteps, ProofStrip, Prose, Reveal, Sats, SatsFigure, type SatsProps, type SatsTextOptions, ScrollStory, SearchButton, SearchDialog, type SearchDialogProps, type SearchGroup, type SearchQuery, type SearchResult, Section, SectionHeading, SectionIntro, type SectionProps, SignMessage, SourceNote, type SourceNoteProps, Sparkline, SplitBar, type SplitSegment, StatCard, type StatCardProps, StatGrid, type StatGridProps, StepGrid, type StepGridProps, type StepItem, type StepState, TextLink, Ticker, type TruthRow, type TruthStatus, TruthTable, UsdApprox, type ValueTone, type VerifyCheck, VerifyReport, chartColor, monogramGround, monogramLetter, satsText, sectionVariants, useCopy, useInView };
|
|
952
|
+
export { Accent, type ActivityItem, ActivityList, Avatar, BrowserFrame, ChartFrame, type ChartTone, type CheckState, ChoiceCard, ChoiceGroup, Closing, type Column, CommandDialog, Container, CopyButton, type CopyButtonProps, CountdownRing, DataTable, Display, type DisplayProps, EmptyLine, EmptyState, type Endpoint, EndpointList, ErrorBoundary, ErrorPage, Eyebrow, FactBlock, type FactRow, FactRows, Faq, FloatChip, Footnote, HashChip, HudCard, type KeyValueItem, KeyValueList, Lead, type LegalBlock, LegalDocument, type LegalSource, type LegendItem, ListCard, ListRow, LoadingBlock, LockedPreview, Monogram, Notice, PackageCard, type PackageItem, PageHeader, Panel, PhoneFrame, PlanCard, type ProgressStep, ProgressSteps, ProofStrip, Prose, Reveal, Sats, SatsFigure, type SatsProps, type SatsTextOptions, ScrollStory, SearchButton, SearchDialog, type SearchDialogProps, type SearchGroup, type SearchQuery, type SearchResult, Section, SectionHeading, SectionIntro, type SectionProps, SectionTitle, SignMessage, SourceNote, type SourceNoteProps, Sparkline, SplitBar, type SplitSegment, StatCard, type StatCardProps, StatGrid, type StatGridProps, StepGrid, type StepGridProps, type StepItem, type StepState, TextLink, Ticker, type TruthRow, type TruthStatus, TruthTable, UsdApprox, type ValueTone, type VerifyCheck, VerifyReport, chartColor, monogramGround, monogramLetter, satsText, sectionVariants, useCopy, useInView };
|
package/dist/components.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { ReactNode, HTMLAttributes, ElementType, CSSProperties, Component, Error
|
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
export { D as DocHeader, a as DocLayout, P as PageHero, b as PageHeroProps, T as TocItem, u as useActiveHeading } from './hero-Dn37il-9.js';
|
|
6
|
-
export { A as ApiRow, a as ApiTable, b as AppCard, c as AppCardProps, d as AppGrid, B as Breadcrumbs, C as Callout, e as CardGrid, f as CodeBlock, g as CodeBlockProps, h as CodeTab, i as CodeTabs, j as ComparisonColumn, k as ComparisonRow, l as ComparisonTable, m as Crumb, D as Diagram, n as DocsHeading, o as DocsPager, I as InstallTabs, L as LinkCard, M as MdxTable, p as MermaidLike, q as MermaidLoader, O as OnThisPage, P as PagerLink, r as ProtocolGrid, s as ProtocolHero, t as ProtocolNav, S as SpecCard, u as SpecCardProps, v as SpecFileKind, w as Step, x as Steps, V as VerifyBox, y as languageName, z as useHeadings } from './docs-
|
|
6
|
+
export { A as ApiRow, a as ApiTable, b as AppCard, c as AppCardProps, d as AppGrid, B as Breadcrumbs, C as Callout, e as CardGrid, f as CodeBlock, g as CodeBlockProps, h as CodeTab, i as CodeTabs, j as ComparisonColumn, k as ComparisonRow, l as ComparisonTable, m as Crumb, D as Diagram, n as DocsHeading, o as DocsPager, I as InstallTabs, L as LinkCard, M as MdxTable, p as MermaidLike, q as MermaidLoader, O as OnThisPage, P as PagerLink, r as ProtocolGrid, s as ProtocolHero, t as ProtocolNav, S as SpecCard, u as SpecCardProps, v as SpecFileKind, w as Step, x as Steps, V as VerifyBox, y as languageName, z as useHeadings } from './docs-BWWnm5Jv.js';
|
|
7
7
|
import { ExplorerKind, Network } from './format.js';
|
|
8
|
-
import {
|
|
9
|
-
import { S as Statement } from './status-badge-
|
|
10
|
-
export { A as AnchorState, a as AnchorStatus, b as ArtifactView, B as BlockCountdown, c as BlockHeight, C as ChosenFile, D as DropZone, F as FilterChips, d as FilterOption, e as FormSection, M as Meter, S as SectionStatus, f as StateBadge, g as StateDef, h as StateTone, T as ToolGrid, i as ToolItem, j as createStateBadge } from './tools-
|
|
8
|
+
import { k as ProtocolSlug } from './index-Bkl49Vgy.js';
|
|
9
|
+
import { S as Statement } from './status-badge-CHHxtFkP.js';
|
|
10
|
+
export { A as AnchorState, a as AnchorStatus, b as ArtifactView, B as BlockCountdown, c as BlockHeight, C as ChosenFile, D as DropZone, F as FilterChips, d as FilterOption, e as FormSection, M as Meter, S as SectionStatus, f as StateBadge, g as StateDef, h as StateTone, T as ToolGrid, i as ToolItem, j as createStateBadge } from './tools-CzjFPng4.js';
|
|
11
11
|
|
|
12
12
|
declare function Eyebrow({ className, onInk, ...props }: HTMLAttributes<HTMLParagraphElement> & {
|
|
13
13
|
onInk?: boolean;
|
|
@@ -469,9 +469,10 @@ declare function EmptyState({ title, children, action, icon, className, }: {
|
|
|
469
469
|
className?: string;
|
|
470
470
|
}): react.JSX.Element;
|
|
471
471
|
type NoticeTone = 'neutral' | 'brand' | 'danger' | 'info' | 'success' | 'warning';
|
|
472
|
-
declare function Notice({ tone, title, children, action, role, className, }: {
|
|
472
|
+
declare function Notice({ tone, title, children, action, icon, role, className, }: {
|
|
473
473
|
tone?: NoticeTone;
|
|
474
474
|
title?: ReactNode;
|
|
475
|
+
icon?: ReactNode;
|
|
475
476
|
children?: ReactNode;
|
|
476
477
|
action?: ReactNode;
|
|
477
478
|
role?: 'alert' | 'status' | 'note';
|
|
@@ -573,7 +574,9 @@ declare function FloatChip({ icon, title, detail, delay, className, style, }: {
|
|
|
573
574
|
style?: CSSProperties;
|
|
574
575
|
}): react.JSX.Element;
|
|
575
576
|
|
|
576
|
-
declare const SIZES: {
|
|
577
|
+
declare const SIZES$1: {
|
|
578
|
+
readonly '2xs': "size-7 rounded-[0.55rem] text-[0.75rem]";
|
|
579
|
+
readonly xs: "size-8 rounded-[0.6rem] text-[0.875rem]";
|
|
577
580
|
readonly sm: "size-9 rounded-[0.7rem] text-[0.9375rem]";
|
|
578
581
|
readonly md: "size-11 rounded-[0.85rem] text-[1.125rem]";
|
|
579
582
|
readonly lg: "size-14 rounded-[1.05rem] text-[1.5rem]";
|
|
@@ -583,7 +586,7 @@ declare function monogramGround(seed: string): number;
|
|
|
583
586
|
declare function Monogram({ name, seed, size, className, style, }: {
|
|
584
587
|
name: string;
|
|
585
588
|
seed?: string;
|
|
586
|
-
size?: keyof typeof SIZES;
|
|
589
|
+
size?: keyof typeof SIZES$1;
|
|
587
590
|
className?: string;
|
|
588
591
|
style?: CSSProperties;
|
|
589
592
|
}): react.JSX.Element;
|
|
@@ -843,6 +846,70 @@ declare function TextLink({ href: written, children, external, className, }: {
|
|
|
843
846
|
className?: string;
|
|
844
847
|
}): react.JSX.Element;
|
|
845
848
|
|
|
849
|
+
declare function SectionTitle({ title, meta, description, action, as: Tag, size, tone, id, className, }: {
|
|
850
|
+
title: ReactNode;
|
|
851
|
+
meta?: ReactNode;
|
|
852
|
+
description?: ReactNode;
|
|
853
|
+
action?: ReactNode;
|
|
854
|
+
as?: 'h2' | 'h3';
|
|
855
|
+
size?: 'md' | 'sm';
|
|
856
|
+
tone?: 'default' | 'danger';
|
|
857
|
+
id?: string;
|
|
858
|
+
className?: string;
|
|
859
|
+
}): react.JSX.Element;
|
|
860
|
+
declare function ListCard({ as: Tag, className, ...props }: HTMLAttributes<HTMLElement> & {
|
|
861
|
+
as?: 'ul' | 'ol' | 'div';
|
|
862
|
+
}): react.JSX.Element;
|
|
863
|
+
declare function ListRow({ title, meta, description, leading, trailing, actions, revealActions, href, onSelect, current, unread, variant, as: Tag, className, }: {
|
|
864
|
+
title: ReactNode;
|
|
865
|
+
meta?: ReactNode;
|
|
866
|
+
description?: ReactNode;
|
|
867
|
+
leading?: ReactNode;
|
|
868
|
+
trailing?: ReactNode;
|
|
869
|
+
actions?: ReactNode;
|
|
870
|
+
revealActions?: 'always' | 'hover';
|
|
871
|
+
href?: string;
|
|
872
|
+
onSelect?: () => void;
|
|
873
|
+
current?: boolean;
|
|
874
|
+
unread?: boolean;
|
|
875
|
+
variant?: 'card' | 'pane';
|
|
876
|
+
as?: 'li' | 'div';
|
|
877
|
+
className?: string;
|
|
878
|
+
}): react.JSX.Element;
|
|
879
|
+
declare function ChoiceGroup<T extends string>({ value, onValueChange, label, columns, size, disabled, className, children, }: {
|
|
880
|
+
value: T | undefined;
|
|
881
|
+
onValueChange: (value: T) => void;
|
|
882
|
+
label: string;
|
|
883
|
+
columns?: 1 | 2 | 3;
|
|
884
|
+
size?: 'md' | 'sm';
|
|
885
|
+
disabled?: boolean;
|
|
886
|
+
className?: string;
|
|
887
|
+
children: ReactNode;
|
|
888
|
+
}): react.JSX.Element;
|
|
889
|
+
declare function ChoiceCard({ value, title, description, icon, disabled, className, }: {
|
|
890
|
+
value: string;
|
|
891
|
+
title: ReactNode;
|
|
892
|
+
description?: ReactNode;
|
|
893
|
+
icon?: ReactNode;
|
|
894
|
+
disabled?: boolean;
|
|
895
|
+
className?: string;
|
|
896
|
+
}): react.JSX.Element;
|
|
897
|
+
|
|
898
|
+
declare const SIZES: {
|
|
899
|
+
readonly '2xs': "size-7 text-[0.6875rem] [&_svg]:size-3.5";
|
|
900
|
+
readonly xs: "size-8 text-[0.75rem] [&_svg]:size-4";
|
|
901
|
+
readonly sm: "size-9 text-[0.8125rem] [&_svg]:size-4";
|
|
902
|
+
readonly md: "size-11 text-[0.9375rem] [&_svg]:size-5";
|
|
903
|
+
readonly lg: "size-14 text-[1.1875rem] [&_svg]:size-6";
|
|
904
|
+
};
|
|
905
|
+
declare function Avatar({ seed, name, src, size, className, }: {
|
|
906
|
+
seed: string;
|
|
907
|
+
name?: string | null;
|
|
908
|
+
src?: string | null;
|
|
909
|
+
size?: keyof typeof SIZES;
|
|
910
|
+
className?: string;
|
|
911
|
+
}): react.JSX.Element;
|
|
912
|
+
|
|
846
913
|
interface SearchResult {
|
|
847
914
|
id: string;
|
|
848
915
|
href?: string;
|
|
@@ -882,4 +949,4 @@ interface SearchDialogProps {
|
|
|
882
949
|
declare function SearchDialog({ onQuery, open: openProp, onOpenChange, onSelect, button, hotkey, label, placeholder, idle, defaultQuery, debounceMs, browse, className, }: SearchDialogProps): react.JSX.Element;
|
|
883
950
|
declare function CommandDialog({ label, placeholder, ...props }: Omit<SearchDialogProps, 'browse' | 'button'>): react.JSX.Element;
|
|
884
951
|
|
|
885
|
-
export { Accent, type ActivityItem, ActivityList, BrowserFrame, ChartFrame, type ChartTone, type CheckState, Closing, type Column, CommandDialog, Container, CopyButton, type CopyButtonProps, CountdownRing, DataTable, Display, type DisplayProps, EmptyLine, EmptyState, type Endpoint, EndpointList, ErrorBoundary, ErrorPage, Eyebrow, FactBlock, type FactRow, FactRows, Faq, FloatChip, Footnote, HashChip, HudCard, type KeyValueItem, KeyValueList, Lead, type LegalBlock, LegalDocument, type LegalSource, type LegendItem, LoadingBlock, LockedPreview, Monogram, Notice, PackageCard, type PackageItem, PageHeader, Panel, PhoneFrame, PlanCard, type ProgressStep, ProgressSteps, ProofStrip, Prose, Reveal, Sats, SatsFigure, type SatsProps, type SatsTextOptions, ScrollStory, SearchButton, SearchDialog, type SearchDialogProps, type SearchGroup, type SearchQuery, type SearchResult, Section, SectionHeading, SectionIntro, type SectionProps, SignMessage, SourceNote, type SourceNoteProps, Sparkline, SplitBar, type SplitSegment, StatCard, type StatCardProps, StatGrid, type StatGridProps, StepGrid, type StepGridProps, type StepItem, type StepState, TextLink, Ticker, type TruthRow, type TruthStatus, TruthTable, UsdApprox, type ValueTone, type VerifyCheck, VerifyReport, chartColor, monogramGround, monogramLetter, satsText, sectionVariants, useCopy, useInView };
|
|
952
|
+
export { Accent, type ActivityItem, ActivityList, Avatar, BrowserFrame, ChartFrame, type ChartTone, type CheckState, ChoiceCard, ChoiceGroup, Closing, type Column, CommandDialog, Container, CopyButton, type CopyButtonProps, CountdownRing, DataTable, Display, type DisplayProps, EmptyLine, EmptyState, type Endpoint, EndpointList, ErrorBoundary, ErrorPage, Eyebrow, FactBlock, type FactRow, FactRows, Faq, FloatChip, Footnote, HashChip, HudCard, type KeyValueItem, KeyValueList, Lead, type LegalBlock, LegalDocument, type LegalSource, type LegendItem, ListCard, ListRow, LoadingBlock, LockedPreview, Monogram, Notice, PackageCard, type PackageItem, PageHeader, Panel, PhoneFrame, PlanCard, type ProgressStep, ProgressSteps, ProofStrip, Prose, Reveal, Sats, SatsFigure, type SatsProps, type SatsTextOptions, ScrollStory, SearchButton, SearchDialog, type SearchDialogProps, type SearchGroup, type SearchQuery, type SearchResult, Section, SectionHeading, SectionIntro, type SectionProps, SectionTitle, SignMessage, SourceNote, type SourceNoteProps, Sparkline, SplitBar, type SplitSegment, StatCard, type StatCardProps, StatGrid, type StatGridProps, StepGrid, type StepGridProps, type StepItem, type StepState, TextLink, Ticker, type TruthRow, type TruthStatus, TruthTable, UsdApprox, type ValueTone, type VerifyCheck, VerifyReport, chartColor, monogramGround, monogramLetter, satsText, sectionVariants, useCopy, useInView };
|
package/dist/components.js
CHANGED
|
@@ -570,7 +570,7 @@ var JS_TAG = /<\/?(?=[A-Za-z])/y;
|
|
|
570
570
|
var JS_TAG_NAME = /[A-Za-z][\w$.:-]*/y;
|
|
571
571
|
var JS_PUNCT = /=>|\.\.\.|[{}()[\];,.<>=+\-*/%!?:&|^~#]/y;
|
|
572
572
|
var JSX_BEFORE = /* @__PURE__ */ new Set(["(", ",", "=", "?", ":", "{", "[", ";", ">", "&&", "||", "=>", "return"]);
|
|
573
|
-
function scanJs(src, emit,
|
|
573
|
+
function scanJs(src, emit, jsx40) {
|
|
574
574
|
let i = 0;
|
|
575
575
|
let prev = "";
|
|
576
576
|
let tagDepth = 0;
|
|
@@ -596,7 +596,7 @@ function scanJs(src, emit, jsx38) {
|
|
|
596
596
|
sig('"');
|
|
597
597
|
continue;
|
|
598
598
|
}
|
|
599
|
-
if (
|
|
599
|
+
if (jsx40 && tagDepth === 0 && (m = at(JS_TAG, src, i)) && (prev === "" || JSX_BEFORE.has(prev))) {
|
|
600
600
|
const name = at(JS_TAG_NAME, src, i + m.length);
|
|
601
601
|
if (name) {
|
|
602
602
|
emit(m);
|
|
@@ -608,7 +608,7 @@ function scanJs(src, emit, jsx38) {
|
|
|
608
608
|
continue;
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
|
-
if (
|
|
611
|
+
if (jsx40 && tagDepth > 0 && braceInTag === 0) {
|
|
612
612
|
if (src.startsWith("/>", i) || src[i] === ">") {
|
|
613
613
|
const close = src[i] === ">" ? ">" : "/>";
|
|
614
614
|
emit(close);
|
|
@@ -628,7 +628,7 @@ function scanJs(src, emit, jsx38) {
|
|
|
628
628
|
continue;
|
|
629
629
|
}
|
|
630
630
|
if (src[i] === "{") braceInTag = 1;
|
|
631
|
-
} else if (
|
|
631
|
+
} else if (jsx40 && tagDepth > 0 && braceInTag > 0) {
|
|
632
632
|
if (src[i] === "{") braceInTag++;
|
|
633
633
|
else if (src[i] === "}") braceInTag--;
|
|
634
634
|
}
|
|
@@ -1513,6 +1513,7 @@ function Notice({
|
|
|
1513
1513
|
title,
|
|
1514
1514
|
children,
|
|
1515
1515
|
action,
|
|
1516
|
+
icon,
|
|
1516
1517
|
role,
|
|
1517
1518
|
className
|
|
1518
1519
|
}) {
|
|
@@ -1529,7 +1530,17 @@ function Notice({
|
|
|
1529
1530
|
),
|
|
1530
1531
|
children: [
|
|
1531
1532
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 gap-3", children: [
|
|
1532
|
-
|
|
1533
|
+
icon ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1534
|
+
"span",
|
|
1535
|
+
{
|
|
1536
|
+
"aria-hidden": true,
|
|
1537
|
+
className: cn(
|
|
1538
|
+
"mt-0.5 shrink-0 [&_svg]:size-[1.125rem]",
|
|
1539
|
+
kind === "brand" ? "text-oca-accent-ink" : kind === "danger" ? "text-destructive" : "text-muted-foreground"
|
|
1540
|
+
),
|
|
1541
|
+
children: icon
|
|
1542
|
+
}
|
|
1543
|
+
) : kind !== "neutral" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1533
1544
|
"span",
|
|
1534
1545
|
{
|
|
1535
1546
|
"aria-hidden": true,
|
|
@@ -1824,7 +1835,7 @@ function Well({
|
|
|
1824
1835
|
] });
|
|
1825
1836
|
}
|
|
1826
1837
|
var FRAME = "overflow-hidden rounded-[1.25rem] border border-[var(--oca-code-line)] bg-[var(--oca-code-surface)]";
|
|
1827
|
-
var COPY_ON_INK = "text-oca-ink-subtle hover:bg-white/10 hover:text-white";
|
|
1838
|
+
var COPY_ON_INK = "text-oca-ink-subtle hover:bg-white/10 hover:text-white max-md:size-11";
|
|
1828
1839
|
function CodeBlock({
|
|
1829
1840
|
code,
|
|
1830
1841
|
html,
|
|
@@ -2252,6 +2263,9 @@ var GROUNDS = [
|
|
|
2252
2263
|
}
|
|
2253
2264
|
];
|
|
2254
2265
|
var SIZES = {
|
|
2266
|
+
// A list row's avatar, a facepile.
|
|
2267
|
+
"2xs": "size-7 rounded-[0.55rem] text-[0.75rem]",
|
|
2268
|
+
xs: "size-8 rounded-[0.6rem] text-[0.875rem]",
|
|
2255
2269
|
sm: "size-9 rounded-[0.7rem] text-[0.9375rem]",
|
|
2256
2270
|
md: "size-11 rounded-[0.85rem] text-[1.125rem]",
|
|
2257
2271
|
lg: "size-14 rounded-[1.05rem] text-[1.5rem]"
|
|
@@ -2377,6 +2391,7 @@ function MarkOutline({ className }) {
|
|
|
2377
2391
|
// src/family/index.ts
|
|
2378
2392
|
var OCHK_IO = "https://ochk.io";
|
|
2379
2393
|
var DOCS_HREF = `${OCHK_IO}/docs`;
|
|
2394
|
+
var OCHK_APP = "https://ochk.app";
|
|
2380
2395
|
function protocol(slug, verb, line, kinds) {
|
|
2381
2396
|
return {
|
|
2382
2397
|
slug,
|
|
@@ -2413,7 +2428,7 @@ var FAMILY = [
|
|
|
2413
2428
|
{
|
|
2414
2429
|
slug: "me",
|
|
2415
2430
|
label: "ochk.app",
|
|
2416
|
-
href:
|
|
2431
|
+
href: OCHK_APP,
|
|
2417
2432
|
group: "orangecheck",
|
|
2418
2433
|
line: "One account, with Bitcoin behind it.",
|
|
2419
2434
|
status: "testing"
|
|
@@ -2496,6 +2511,10 @@ function protocolSite(slug) {
|
|
|
2496
2511
|
{ href: `${OCHK_IO}/trust`, label: "Trust" },
|
|
2497
2512
|
{ href: `${OCHK_IO}/about`, label: "About" }
|
|
2498
2513
|
];
|
|
2514
|
+
var InColumnContext = sharedContext("in-column", false);
|
|
2515
|
+
function useInColumn() {
|
|
2516
|
+
return react.useContext(InColumnContext);
|
|
2517
|
+
}
|
|
2499
2518
|
var SiteHomeContext = sharedContext("site-home", void 0);
|
|
2500
2519
|
function useSiteHome() {
|
|
2501
2520
|
return react.useContext(SiteHomeContext);
|
|
@@ -2523,10 +2542,11 @@ function ErrorPage({
|
|
|
2523
2542
|
className
|
|
2524
2543
|
}) {
|
|
2525
2544
|
const shellHome = useSiteHome();
|
|
2545
|
+
const inColumn = useInColumn();
|
|
2526
2546
|
const homeHref = home ?? (protocol2 ? protocolSite(protocol2).pageHref : shellHome ?? OCHK_IO);
|
|
2527
2547
|
const words = WORDS[code] ?? (code >= 500 ? WORDS[500] : WORDS[404]);
|
|
2528
2548
|
const server = code >= 500;
|
|
2529
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Section, { space: "none", className: cn("flex min-h-[min(40rem,72dvh)] items-center py-16 md:py-24", className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 items-center gap-12 md:grid-cols-12", children: [
|
|
2549
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Section, { space: "none", contained: !inColumn, className: cn("flex min-h-[min(40rem,72dvh)] items-center py-16 md:py-24", className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 items-center gap-12 md:grid-cols-12", children: [
|
|
2530
2550
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex max-w-[40rem] flex-col items-start gap-6 md:col-span-7", children: [
|
|
2531
2551
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "oca-eyebrow oca-enter", children: [
|
|
2532
2552
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "oca-tabular", children: code }),
|
|
@@ -2796,7 +2816,8 @@ react.forwardRef(function DropdownMenuItem2({ className, destructive, ...props }
|
|
|
2796
2816
|
{
|
|
2797
2817
|
ref,
|
|
2798
2818
|
className: cn(
|
|
2799
|
-
|
|
2819
|
+
// A thumb's 44px on a phone.
|
|
2820
|
+
"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",
|
|
2800
2821
|
"data-[highlighted]:bg-accent data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:text-muted-foreground",
|
|
2801
2822
|
destructive && "text-destructive [&_svg]:text-destructive",
|
|
2802
2823
|
className
|
|
@@ -4415,6 +4436,220 @@ function SignMessage({
|
|
|
4415
4436
|
)
|
|
4416
4437
|
] });
|
|
4417
4438
|
}
|
|
4439
|
+
function SectionTitle({
|
|
4440
|
+
title,
|
|
4441
|
+
meta,
|
|
4442
|
+
description,
|
|
4443
|
+
action,
|
|
4444
|
+
as: Tag = "h2",
|
|
4445
|
+
size = "md",
|
|
4446
|
+
tone = "default",
|
|
4447
|
+
id,
|
|
4448
|
+
className
|
|
4449
|
+
}) {
|
|
4450
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-wrap items-end justify-between gap-x-4 gap-y-3", className), children: [
|
|
4451
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 max-w-[40rem] flex-[1_1_16rem] flex-col gap-1", children: [
|
|
4452
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4453
|
+
Tag,
|
|
4454
|
+
{
|
|
4455
|
+
id,
|
|
4456
|
+
className: cn(
|
|
4457
|
+
"flex scroll-mt-24 flex-wrap items-baseline gap-x-3",
|
|
4458
|
+
size === "sm" ? "oca-title-sm" : "oca-title",
|
|
4459
|
+
tone === "danger" && "text-destructive"
|
|
4460
|
+
),
|
|
4461
|
+
children: [
|
|
4462
|
+
title,
|
|
4463
|
+
meta ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oca-tabular text-[0.875rem] font-normal tracking-normal text-muted-foreground", children: meta }) : null
|
|
4464
|
+
]
|
|
4465
|
+
}
|
|
4466
|
+
),
|
|
4467
|
+
description ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[0.9375rem] leading-relaxed text-muted-foreground", children: description }) : null
|
|
4468
|
+
] }),
|
|
4469
|
+
action ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: action }) : null
|
|
4470
|
+
] });
|
|
4471
|
+
}
|
|
4472
|
+
function ListCard({
|
|
4473
|
+
as: Tag = "ul",
|
|
4474
|
+
className,
|
|
4475
|
+
...props
|
|
4476
|
+
}) {
|
|
4477
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Tag, { className: cn("divide-y divide-border overflow-clip rounded-[1.25rem] border border-border bg-card", className), ...props });
|
|
4478
|
+
}
|
|
4479
|
+
var ROW_LOOK = {
|
|
4480
|
+
// In a ListCard: full width, the card's hairlines between rows.
|
|
4481
|
+
card: { box: "px-5", hover: "hover:bg-accent/60", current: "bg-accent" },
|
|
4482
|
+
// In a pane's list (threads, contacts): rounded, lifted when current.
|
|
4483
|
+
pane: { box: "rounded-xl px-3", hover: "hover:bg-accent", current: "bg-card shadow-sm ring-1 ring-border" }
|
|
4484
|
+
};
|
|
4485
|
+
function ListRow({
|
|
4486
|
+
title,
|
|
4487
|
+
meta,
|
|
4488
|
+
description,
|
|
4489
|
+
leading,
|
|
4490
|
+
trailing,
|
|
4491
|
+
actions,
|
|
4492
|
+
revealActions = "always",
|
|
4493
|
+
href,
|
|
4494
|
+
onSelect,
|
|
4495
|
+
current = false,
|
|
4496
|
+
unread = false,
|
|
4497
|
+
variant = "card",
|
|
4498
|
+
as: Tag = "li",
|
|
4499
|
+
className
|
|
4500
|
+
}) {
|
|
4501
|
+
const tight = useDensity() === "compact";
|
|
4502
|
+
const look = ROW_LOOK[variant];
|
|
4503
|
+
const interactive = href !== void 0 || onSelect !== void 0;
|
|
4504
|
+
const cls = cn(
|
|
4505
|
+
"flex min-h-11 w-full min-w-0 items-center gap-3 text-left outline-none transition-colors",
|
|
4506
|
+
"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
|
|
4507
|
+
look.box,
|
|
4508
|
+
variant === "pane" ? "py-2" : tight ? "py-3" : "py-4",
|
|
4509
|
+
interactive && !current && look.hover,
|
|
4510
|
+
current && look.current,
|
|
4511
|
+
actions && "pr-14"
|
|
4512
|
+
);
|
|
4513
|
+
const body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4514
|
+
leading ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0", children: leading }) : null,
|
|
4515
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
4516
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-baseline justify-between gap-3", children: [
|
|
4517
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("truncate text-[0.9375rem] text-foreground", unread ? "font-semibold" : "font-medium"), children: title }),
|
|
4518
|
+
meta ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oca-tabular shrink-0 text-[0.8125rem] text-muted-foreground", children: meta }) : null
|
|
4519
|
+
] }),
|
|
4520
|
+
description ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("truncate text-[0.875rem]", unread ? "text-foreground" : "text-muted-foreground"), children: description }) : null
|
|
4521
|
+
] }),
|
|
4522
|
+
trailing ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 items-center gap-2", children: trailing }) : null
|
|
4523
|
+
] });
|
|
4524
|
+
const aria = current ? { "aria-current": "true" } : {};
|
|
4525
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Tag, { className: cn("group/row relative", className), children: [
|
|
4526
|
+
href !== void 0 ? href.startsWith("/") ? /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href, className: cls, ...aria, children: body }) : /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: cls, ...aria, children: body }) : onSelect ? /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: onSelect, className: cls, ...aria, children: body }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls, children: body }),
|
|
4527
|
+
actions ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4528
|
+
"div",
|
|
4529
|
+
{
|
|
4530
|
+
className: cn(
|
|
4531
|
+
"absolute right-2 top-1/2 flex -translate-y-1/2 items-center",
|
|
4532
|
+
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"
|
|
4533
|
+
),
|
|
4534
|
+
children: actions
|
|
4535
|
+
}
|
|
4536
|
+
) : null
|
|
4537
|
+
] });
|
|
4538
|
+
}
|
|
4539
|
+
var ChoiceSize = react.createContext("md");
|
|
4540
|
+
var COLUMNS = { 1: "", 2: "sm:grid-cols-2", 3: "sm:grid-cols-2 lg:grid-cols-3" };
|
|
4541
|
+
function ChoiceGroup({
|
|
4542
|
+
value,
|
|
4543
|
+
onValueChange,
|
|
4544
|
+
label,
|
|
4545
|
+
columns = 1,
|
|
4546
|
+
size = "md",
|
|
4547
|
+
disabled,
|
|
4548
|
+
className,
|
|
4549
|
+
children
|
|
4550
|
+
}) {
|
|
4551
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ChoiceSize.Provider, { value: size, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4552
|
+
RadioGroupPrimitive__namespace.Root,
|
|
4553
|
+
{
|
|
4554
|
+
value: value ?? "",
|
|
4555
|
+
onValueChange: (v) => onValueChange(v),
|
|
4556
|
+
"aria-label": label,
|
|
4557
|
+
disabled,
|
|
4558
|
+
className: cn("grid", size === "sm" ? "gap-1.5" : "gap-3", COLUMNS[columns], className),
|
|
4559
|
+
children
|
|
4560
|
+
}
|
|
4561
|
+
) });
|
|
4562
|
+
}
|
|
4563
|
+
function ChoiceCard({
|
|
4564
|
+
value,
|
|
4565
|
+
title,
|
|
4566
|
+
description,
|
|
4567
|
+
icon,
|
|
4568
|
+
disabled,
|
|
4569
|
+
className
|
|
4570
|
+
}) {
|
|
4571
|
+
const sm = react.useContext(ChoiceSize) === "sm";
|
|
4572
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4573
|
+
RadioGroupPrimitive__namespace.Item,
|
|
4574
|
+
{
|
|
4575
|
+
value,
|
|
4576
|
+
disabled,
|
|
4577
|
+
className: cn(
|
|
4578
|
+
"group flex w-full min-w-0 items-start gap-3 border text-left outline-none transition-colors",
|
|
4579
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
4580
|
+
"border-border bg-card data-[state=checked]:border-foreground data-[state=checked]:bg-accent data-[state=unchecked]:hover:border-oca-hairline-strong",
|
|
4581
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
4582
|
+
sm ? "min-h-11 rounded-xl px-3.5 py-2.5" : "rounded-[1.25rem] p-5",
|
|
4583
|
+
className
|
|
4584
|
+
),
|
|
4585
|
+
children: [
|
|
4586
|
+
icon ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4587
|
+
"span",
|
|
4588
|
+
{
|
|
4589
|
+
"aria-hidden": true,
|
|
4590
|
+
className: cn(
|
|
4591
|
+
"shrink-0 text-muted-foreground group-data-[state=checked]:text-oca-accent-ink [&_svg]:size-full",
|
|
4592
|
+
sm ? "mt-0.5 size-4" : "size-6"
|
|
4593
|
+
),
|
|
4594
|
+
children: icon
|
|
4595
|
+
}
|
|
4596
|
+
) : null,
|
|
4597
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
4598
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: sm ? "text-[0.9375rem] font-medium" : "oca-title-sm", children: title }),
|
|
4599
|
+
description ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.875rem] leading-relaxed text-muted-foreground", children: description }) : null
|
|
4600
|
+
] })
|
|
4601
|
+
]
|
|
4602
|
+
}
|
|
4603
|
+
);
|
|
4604
|
+
}
|
|
4605
|
+
var SIZES2 = {
|
|
4606
|
+
"2xs": "size-7 text-[0.6875rem] [&_svg]:size-3.5",
|
|
4607
|
+
xs: "size-8 text-[0.75rem] [&_svg]:size-4",
|
|
4608
|
+
sm: "size-9 text-[0.8125rem] [&_svg]:size-4",
|
|
4609
|
+
md: "size-11 text-[0.9375rem] [&_svg]:size-5",
|
|
4610
|
+
lg: "size-14 text-[1.1875rem] [&_svg]:size-6"
|
|
4611
|
+
};
|
|
4612
|
+
function personInitials(name) {
|
|
4613
|
+
return name.trim().split(/\s+/).slice(0, 2).map((w) => w.match(/[\p{L}\p{N}]/u)?.[0] ?? "").join("").toLocaleUpperCase();
|
|
4614
|
+
}
|
|
4615
|
+
function avatarHue(seed) {
|
|
4616
|
+
let h = 2166136261;
|
|
4617
|
+
for (let i = 0; i < seed.length; i++) {
|
|
4618
|
+
h ^= seed.charCodeAt(i);
|
|
4619
|
+
h = Math.imul(h, 16777619);
|
|
4620
|
+
}
|
|
4621
|
+
return (h >>> 0) % 360;
|
|
4622
|
+
}
|
|
4623
|
+
function Avatar({
|
|
4624
|
+
seed,
|
|
4625
|
+
name,
|
|
4626
|
+
src,
|
|
4627
|
+
size = "sm",
|
|
4628
|
+
className
|
|
4629
|
+
}) {
|
|
4630
|
+
const [failed, setFailed] = react.useState(null);
|
|
4631
|
+
const box = cn("inline-flex shrink-0 select-none items-center justify-center overflow-hidden rounded-full", SIZES2[size], className);
|
|
4632
|
+
if (src && failed !== src) {
|
|
4633
|
+
return (
|
|
4634
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
4635
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src, alt: "", "aria-hidden": true, className: cn(box, "object-cover"), onError: () => setFailed(src) })
|
|
4636
|
+
);
|
|
4637
|
+
}
|
|
4638
|
+
const initials = name ? personInitials(name) : "";
|
|
4639
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4640
|
+
"span",
|
|
4641
|
+
{
|
|
4642
|
+
"aria-hidden": true,
|
|
4643
|
+
className: cn(box, "font-medium leading-none"),
|
|
4644
|
+
style: {
|
|
4645
|
+
"--oca-avatar-h": avatarHue(seed),
|
|
4646
|
+
backgroundColor: "hsl(var(--oca-avatar-h) 60% var(--oca-avatar-bg-l))",
|
|
4647
|
+
color: "hsl(var(--oca-avatar-h) 45% var(--oca-avatar-fg-l))"
|
|
4648
|
+
},
|
|
4649
|
+
children: initials || /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserRound, {})
|
|
4650
|
+
}
|
|
4651
|
+
);
|
|
4652
|
+
}
|
|
4418
4653
|
function useMacKeys() {
|
|
4419
4654
|
const [mac, setMac] = react.useState(true);
|
|
4420
4655
|
react.useEffect(() => {
|
|
@@ -4690,7 +4925,7 @@ function download(content, filename, mime) {
|
|
|
4690
4925
|
a.remove();
|
|
4691
4926
|
setTimeout(() => URL.revokeObjectURL(url), 0);
|
|
4692
4927
|
}
|
|
4693
|
-
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";
|
|
4928
|
+
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";
|
|
4694
4929
|
function ArtifactView({
|
|
4695
4930
|
content,
|
|
4696
4931
|
title,
|
|
@@ -4720,7 +4955,8 @@ function ArtifactView({
|
|
|
4720
4955
|
"aria-pressed": view === v,
|
|
4721
4956
|
onClick: () => setView(v),
|
|
4722
4957
|
className: cn(
|
|
4723
|
-
|
|
4958
|
+
// The pill stays 28px; its target reaches the bar's 44.
|
|
4959
|
+
"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",
|
|
4724
4960
|
view === v ? "bg-white/[0.12] text-white" : "text-oca-ink-subtle hover:text-white"
|
|
4725
4961
|
),
|
|
4726
4962
|
children: v === "formatted" ? "Formatted" : "Raw"
|
|
@@ -5190,7 +5426,8 @@ function FilterChips({
|
|
|
5190
5426
|
onClick: () => press(o.value),
|
|
5191
5427
|
className: cn(
|
|
5192
5428
|
"inline-flex shrink-0 items-center gap-1.5 rounded-full border px-3.5 text-[0.875rem] transition-colors",
|
|
5193
|
-
|
|
5429
|
+
// A thumb's 44px on a phone.
|
|
5430
|
+
tight ? "h-11 md:h-8" : "h-11 md:h-9",
|
|
5194
5431
|
on ? "border-foreground bg-foreground text-background" : "border-border bg-card text-muted-foreground hover:border-oca-hairline-strong hover:text-foreground"
|
|
5195
5432
|
),
|
|
5196
5433
|
children: [
|
|
@@ -5263,6 +5500,7 @@ exports.ApiTable = ApiTable;
|
|
|
5263
5500
|
exports.AppCard = AppCard;
|
|
5264
5501
|
exports.AppGrid = AppGrid;
|
|
5265
5502
|
exports.ArtifactView = ArtifactView;
|
|
5503
|
+
exports.Avatar = Avatar;
|
|
5266
5504
|
exports.BlockCountdown = BlockCountdown;
|
|
5267
5505
|
exports.BlockHeight = BlockHeight;
|
|
5268
5506
|
exports.Breadcrumbs = Breadcrumbs;
|
|
@@ -5270,6 +5508,8 @@ exports.BrowserFrame = BrowserFrame;
|
|
|
5270
5508
|
exports.Callout = Callout;
|
|
5271
5509
|
exports.CardGrid = CardGrid;
|
|
5272
5510
|
exports.ChartFrame = ChartFrame;
|
|
5511
|
+
exports.ChoiceCard = ChoiceCard;
|
|
5512
|
+
exports.ChoiceGroup = ChoiceGroup;
|
|
5273
5513
|
exports.Closing = Closing;
|
|
5274
5514
|
exports.CodeBlock = CodeBlock;
|
|
5275
5515
|
exports.CodeTabs = CodeTabs;
|
|
@@ -5306,6 +5546,8 @@ exports.KeyValueList = KeyValueList;
|
|
|
5306
5546
|
exports.Lead = Lead;
|
|
5307
5547
|
exports.LegalDocument = LegalDocument;
|
|
5308
5548
|
exports.LinkCard = LinkCard;
|
|
5549
|
+
exports.ListCard = ListCard;
|
|
5550
|
+
exports.ListRow = ListRow;
|
|
5309
5551
|
exports.LoadingBlock = LoadingBlock;
|
|
5310
5552
|
exports.LockedPreview = LockedPreview;
|
|
5311
5553
|
exports.MdxTable = MdxTable;
|
|
@@ -5334,6 +5576,7 @@ exports.SearchDialog = SearchDialog;
|
|
|
5334
5576
|
exports.Section = Section;
|
|
5335
5577
|
exports.SectionHeading = SectionHeading;
|
|
5336
5578
|
exports.SectionIntro = SectionIntro;
|
|
5579
|
+
exports.SectionTitle = SectionTitle;
|
|
5337
5580
|
exports.SignMessage = SignMessage;
|
|
5338
5581
|
exports.SourceNote = SourceNote;
|
|
5339
5582
|
exports.Sparkline = Sparkline;
|