@orangecheck/app-design 1.0.0 → 1.1.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 +21 -5
- package/dist/chrome.d.mts +31 -42
- package/dist/chrome.d.ts +31 -42
- package/dist/chrome.js +500 -23
- package/dist/chrome.js.map +1 -1
- package/dist/chrome.mjs +495 -25
- package/dist/chrome.mjs.map +1 -1
- package/dist/code.d.mts +52 -0
- package/dist/code.d.ts +52 -0
- package/dist/code.js +534 -0
- package/dist/code.js.map +1 -0
- package/dist/code.mjs +522 -0
- package/dist/code.mjs.map +1 -0
- package/dist/components.d.mts +61 -117
- package/dist/components.d.ts +61 -117
- package/dist/components.js +2170 -105
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +2142 -109
- package/dist/components.mjs.map +1 -1
- package/dist/docs-DhnstueM.d.ts +219 -0
- package/dist/docs-DiR6s43s.d.mts +219 -0
- package/dist/format.d.mts +12 -0
- package/dist/format.d.ts +12 -0
- package/dist/format.js +65 -0
- package/dist/format.js.map +1 -0
- package/dist/format.mjs +58 -0
- package/dist/format.mjs.map +1 -0
- package/dist/hero-Dn37il-9.d.mts +31 -0
- package/dist/hero-Dn37il-9.d.ts +31 -0
- package/dist/index.d.mts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +2668 -131
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2614 -134
- package/dist/index.mjs.map +1 -1
- package/dist/mdx.d.mts +58 -0
- package/dist/mdx.d.ts +58 -0
- package/dist/mdx.js +1712 -0
- package/dist/mdx.js.map +1 -0
- package/dist/mdx.mjs +1685 -0
- package/dist/mdx.mjs.map +1 -0
- package/dist/primitives.d.mts +22 -5
- package/dist/primitives.d.ts +22 -5
- package/dist/primitives.js +51 -5
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +51 -7
- package/dist/primitives.mjs.map +1 -1
- package/dist/session.d.mts +18 -0
- package/dist/session.d.ts +18 -0
- package/dist/session.js +432 -0
- package/dist/session.js.map +1 -0
- package/dist/session.mjs +401 -0
- package/dist/session.mjs.map +1 -0
- package/dist/styles/code.css +97 -0
- package/dist/styles/theme.css +2 -0
- package/dist/styles/tokens.css +40 -0
- package/dist/styles.css +1 -0
- package/dist/tool-shell-B1C7ahKE.d.ts +81 -0
- package/dist/tool-shell-BDx_N5ai.d.mts +81 -0
- package/dist/tools-BggNN5DV.d.ts +131 -0
- package/dist/tools-DFIxIj5p.d.mts +131 -0
- package/package.json +31 -2
package/dist/styles/theme.css
CHANGED
|
@@ -177,6 +177,8 @@
|
|
|
177
177
|
@layer base {
|
|
178
178
|
[data-oc-app='ochk'] {
|
|
179
179
|
font-family: var(--oc-font-sans);
|
|
180
|
+
/* Inter's contextual alternates turn "5x7" into "5×7", which rewrites addresses in prose. */
|
|
181
|
+
font-variant-ligatures: no-contextual;
|
|
180
182
|
font-optical-sizing: auto;
|
|
181
183
|
-webkit-font-smoothing: antialiased;
|
|
182
184
|
-moz-osx-font-smoothing: grayscale;
|
package/dist/styles/tokens.css
CHANGED
|
@@ -87,6 +87,23 @@
|
|
|
87
87
|
/* Code is a dark well in both modes, darker than any card in dark. */
|
|
88
88
|
--oca-code-surface: #161616;
|
|
89
89
|
--oca-code-line: #2a2a2a;
|
|
90
|
+
/* Syntax, from the deck's code card: rose keywords and tags, salmon
|
|
91
|
+
strings, peach numbers and constants, blue functions and keys, teal
|
|
92
|
+
types. Every one clears 4.5:1 on the well and on every marked line. */
|
|
93
|
+
--oca-code-keyword: #e3a8c2;
|
|
94
|
+
--oca-code-string: #e99a8f;
|
|
95
|
+
--oca-code-number: #fcb781;
|
|
96
|
+
--oca-code-function: #9db4ec;
|
|
97
|
+
--oca-code-type: #8fd0c2;
|
|
98
|
+
--oca-code-property: #9db4ec;
|
|
99
|
+
--oca-code-comment: #909397;
|
|
100
|
+
--oca-code-punctuation: #d5d8dc;
|
|
101
|
+
--oca-code-added: #86d39b;
|
|
102
|
+
--oca-code-removed: #f19a9a;
|
|
103
|
+
/* Marked lines: a highlighted line, an added one, a removed one. */
|
|
104
|
+
--oca-code-mark: #232323;
|
|
105
|
+
--oca-code-added-line: #1a2c20;
|
|
106
|
+
--oca-code-removed-line: #2f1c1c;
|
|
90
107
|
/* The hairline between bands; only dark needs one. */
|
|
91
108
|
--oca-band-line: transparent;
|
|
92
109
|
--oca-skeleton: #e8e8e8;
|
|
@@ -109,6 +126,26 @@
|
|
|
109
126
|
/* Sentence-case labels carry no trailing arrow (auth-client ≥ 2.29). */
|
|
110
127
|
--oc-signin-arrow: none;
|
|
111
128
|
|
|
129
|
+
/* The wallet picker and sign button (@orangecheck/wallet-adapter's
|
|
130
|
+
OcWalletPicker and OcWalletButton) in this design, read the same way:
|
|
131
|
+
each variable's fallback there is today's family look. */
|
|
132
|
+
--oc-wallet-font: var(--oc-font-sans);
|
|
133
|
+
--oc-wallet-case: none;
|
|
134
|
+
--oc-wallet-tracking: 0;
|
|
135
|
+
--oc-wallet-scale: 1.25;
|
|
136
|
+
--oc-wallet-strong: 500;
|
|
137
|
+
--oc-wallet-radius: 0.875rem;
|
|
138
|
+
--oc-wallet-button-radius: 9999px;
|
|
139
|
+
--oc-wallet-min-height: 2.25rem;
|
|
140
|
+
--oc-wallet-surface: var(--card);
|
|
141
|
+
--oc-wallet-ready: var(--success);
|
|
142
|
+
/* A pasted signature's field: 16px, or iOS zooms into it (an inline size
|
|
143
|
+
outranks the package's phone rule). */
|
|
144
|
+
--oc-wallet-field-size: 1rem;
|
|
145
|
+
/* The glyphs the family look writes as decoration: "§ " before a heading,
|
|
146
|
+
"// " before a note, "← " before Back. */
|
|
147
|
+
--oc-wallet-mark: none;
|
|
148
|
+
|
|
112
149
|
/* The deck has no shadows. Overlays get one, so a dialog still separates. */
|
|
113
150
|
--oc-shadow-2xs: none;
|
|
114
151
|
--oc-shadow-xs: none;
|
|
@@ -168,6 +205,9 @@
|
|
|
168
205
|
--oca-icon-ring: #333333;
|
|
169
206
|
--oca-code-surface: #0e0e0e;
|
|
170
207
|
--oca-code-line: #2a2a2a;
|
|
208
|
+
--oca-code-mark: #1b1b1b;
|
|
209
|
+
--oca-code-added-line: #132519;
|
|
210
|
+
--oca-code-removed-line: #271414;
|
|
171
211
|
--oca-band-line: #262626;
|
|
172
212
|
--oca-skeleton: #222222;
|
|
173
213
|
|
package/dist/styles.css
CHANGED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { i as ToolItem } from './tools-BggNN5DV.js';
|
|
4
|
+
import { j as ProtocolSlug } from './index-C6hDqOOS.js';
|
|
5
|
+
|
|
6
|
+
interface ShellNavItem {
|
|
7
|
+
href: string;
|
|
8
|
+
label: string;
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
active?: boolean;
|
|
11
|
+
badge?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
interface ShellNavGroup {
|
|
14
|
+
label?: string;
|
|
15
|
+
items: ShellNavItem[];
|
|
16
|
+
}
|
|
17
|
+
interface ShellSection {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
href: string;
|
|
22
|
+
groups: ShellNavGroup[];
|
|
23
|
+
}
|
|
24
|
+
declare function AppShell({ nav, sections, activeSection, page: pageOverride, persistent, home, account, banner, footer, children, className, }: {
|
|
25
|
+
nav?: ShellNavGroup[];
|
|
26
|
+
sections?: ShellSection[];
|
|
27
|
+
activeSection?: string;
|
|
28
|
+
page?: string;
|
|
29
|
+
persistent?: ShellNavGroup[];
|
|
30
|
+
home?: string;
|
|
31
|
+
account?: ReactNode;
|
|
32
|
+
banner?: ReactNode;
|
|
33
|
+
footer?: ReactNode;
|
|
34
|
+
children: ReactNode;
|
|
35
|
+
className?: string;
|
|
36
|
+
}): react.JSX.Element;
|
|
37
|
+
interface AccountMenuItem {
|
|
38
|
+
label: string;
|
|
39
|
+
href?: string;
|
|
40
|
+
onSelect?: () => void;
|
|
41
|
+
icon?: ReactNode;
|
|
42
|
+
destructive?: boolean;
|
|
43
|
+
}
|
|
44
|
+
declare function AccountMenu({ name, detail, items, nameFrom, }: {
|
|
45
|
+
name: string;
|
|
46
|
+
detail?: string;
|
|
47
|
+
items: (AccountMenuItem | 'separator')[];
|
|
48
|
+
nameFrom?: 'sm' | 'lg';
|
|
49
|
+
}): react.JSX.Element;
|
|
50
|
+
declare function ThemeToggle({ className }: {
|
|
51
|
+
className?: string;
|
|
52
|
+
}): react.JSX.Element;
|
|
53
|
+
|
|
54
|
+
type SessionState = 'checking' | 'in' | 'out' | 'unknown';
|
|
55
|
+
declare const OCHK_APP_ACCOUNT = "https://ochk.app/me/account";
|
|
56
|
+
declare function SessionAccountView({ state, name, detail, items, signInHref, signInLabel, accountHref, onSignOut, nameFrom, }: {
|
|
57
|
+
state: SessionState;
|
|
58
|
+
name?: string;
|
|
59
|
+
detail?: string;
|
|
60
|
+
items?: (AccountMenuItem | 'separator')[];
|
|
61
|
+
signInHref: string;
|
|
62
|
+
signInLabel?: string;
|
|
63
|
+
accountHref?: string;
|
|
64
|
+
onSignOut?: () => void;
|
|
65
|
+
nameFrom?: 'sm' | 'lg';
|
|
66
|
+
}): react.JSX.Element;
|
|
67
|
+
interface ToolShellProps {
|
|
68
|
+
protocol: ProtocolSlug;
|
|
69
|
+
tools: readonly ToolItem[];
|
|
70
|
+
home?: string;
|
|
71
|
+
account?: ReactNode;
|
|
72
|
+
rail?: boolean;
|
|
73
|
+
railFooter?: ReactNode;
|
|
74
|
+
variant?: 'tool' | 'app';
|
|
75
|
+
banner?: ReactNode;
|
|
76
|
+
footer?: ReactNode | false;
|
|
77
|
+
children: ReactNode;
|
|
78
|
+
}
|
|
79
|
+
declare function ToolShell({ protocol, tools, home, account, rail, railFooter, variant, banner, footer, children, }: ToolShellProps): react.JSX.Element;
|
|
80
|
+
|
|
81
|
+
export { AccountMenu as A, OCHK_APP_ACCOUNT as O, SessionAccountView as S, ThemeToggle as T, type AccountMenuItem as a, AppShell as b, type SessionState as c, type ShellNavGroup as d, type ShellNavItem as e, type ShellSection as f, ToolShell as g, type ToolShellProps as h };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { i as ToolItem } from './tools-DFIxIj5p.mjs';
|
|
4
|
+
import { j as ProtocolSlug } from './index-C6hDqOOS.mjs';
|
|
5
|
+
|
|
6
|
+
interface ShellNavItem {
|
|
7
|
+
href: string;
|
|
8
|
+
label: string;
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
active?: boolean;
|
|
11
|
+
badge?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
interface ShellNavGroup {
|
|
14
|
+
label?: string;
|
|
15
|
+
items: ShellNavItem[];
|
|
16
|
+
}
|
|
17
|
+
interface ShellSection {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
href: string;
|
|
22
|
+
groups: ShellNavGroup[];
|
|
23
|
+
}
|
|
24
|
+
declare function AppShell({ nav, sections, activeSection, page: pageOverride, persistent, home, account, banner, footer, children, className, }: {
|
|
25
|
+
nav?: ShellNavGroup[];
|
|
26
|
+
sections?: ShellSection[];
|
|
27
|
+
activeSection?: string;
|
|
28
|
+
page?: string;
|
|
29
|
+
persistent?: ShellNavGroup[];
|
|
30
|
+
home?: string;
|
|
31
|
+
account?: ReactNode;
|
|
32
|
+
banner?: ReactNode;
|
|
33
|
+
footer?: ReactNode;
|
|
34
|
+
children: ReactNode;
|
|
35
|
+
className?: string;
|
|
36
|
+
}): react.JSX.Element;
|
|
37
|
+
interface AccountMenuItem {
|
|
38
|
+
label: string;
|
|
39
|
+
href?: string;
|
|
40
|
+
onSelect?: () => void;
|
|
41
|
+
icon?: ReactNode;
|
|
42
|
+
destructive?: boolean;
|
|
43
|
+
}
|
|
44
|
+
declare function AccountMenu({ name, detail, items, nameFrom, }: {
|
|
45
|
+
name: string;
|
|
46
|
+
detail?: string;
|
|
47
|
+
items: (AccountMenuItem | 'separator')[];
|
|
48
|
+
nameFrom?: 'sm' | 'lg';
|
|
49
|
+
}): react.JSX.Element;
|
|
50
|
+
declare function ThemeToggle({ className }: {
|
|
51
|
+
className?: string;
|
|
52
|
+
}): react.JSX.Element;
|
|
53
|
+
|
|
54
|
+
type SessionState = 'checking' | 'in' | 'out' | 'unknown';
|
|
55
|
+
declare const OCHK_APP_ACCOUNT = "https://ochk.app/me/account";
|
|
56
|
+
declare function SessionAccountView({ state, name, detail, items, signInHref, signInLabel, accountHref, onSignOut, nameFrom, }: {
|
|
57
|
+
state: SessionState;
|
|
58
|
+
name?: string;
|
|
59
|
+
detail?: string;
|
|
60
|
+
items?: (AccountMenuItem | 'separator')[];
|
|
61
|
+
signInHref: string;
|
|
62
|
+
signInLabel?: string;
|
|
63
|
+
accountHref?: string;
|
|
64
|
+
onSignOut?: () => void;
|
|
65
|
+
nameFrom?: 'sm' | 'lg';
|
|
66
|
+
}): react.JSX.Element;
|
|
67
|
+
interface ToolShellProps {
|
|
68
|
+
protocol: ProtocolSlug;
|
|
69
|
+
tools: readonly ToolItem[];
|
|
70
|
+
home?: string;
|
|
71
|
+
account?: ReactNode;
|
|
72
|
+
rail?: boolean;
|
|
73
|
+
railFooter?: ReactNode;
|
|
74
|
+
variant?: 'tool' | 'app';
|
|
75
|
+
banner?: ReactNode;
|
|
76
|
+
footer?: ReactNode | false;
|
|
77
|
+
children: ReactNode;
|
|
78
|
+
}
|
|
79
|
+
declare function ToolShell({ protocol, tools, home, account, rail, railFooter, variant, banner, footer, children, }: ToolShellProps): react.JSX.Element;
|
|
80
|
+
|
|
81
|
+
export { AccountMenu as A, OCHK_APP_ACCOUNT as O, SessionAccountView as S, ThemeToggle as T, type AccountMenuItem as a, AppShell as b, type SessionState as c, type ShellNavGroup as d, type ShellNavItem as e, type ShellSection as f, ToolShell as g, type ToolShellProps as h };
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { Network } from './format.js';
|
|
4
|
+
|
|
5
|
+
declare function ArtifactView({ content, title, filename, mime, defaultView, maxLines, className, }: {
|
|
6
|
+
content: string;
|
|
7
|
+
title?: ReactNode;
|
|
8
|
+
filename?: string;
|
|
9
|
+
mime?: string;
|
|
10
|
+
defaultView?: 'formatted' | 'raw';
|
|
11
|
+
maxLines?: number;
|
|
12
|
+
className?: string;
|
|
13
|
+
}): react.JSX.Element;
|
|
14
|
+
interface ChosenFile {
|
|
15
|
+
name: string;
|
|
16
|
+
size: number;
|
|
17
|
+
type?: string;
|
|
18
|
+
}
|
|
19
|
+
declare function DropZone({ onFile, onText, accept, title, hint, privacy, file, progress, progressLabel, onClear, error, disabled, className, }: {
|
|
20
|
+
onFile: (file: File) => void;
|
|
21
|
+
onText?: (text: string) => void;
|
|
22
|
+
accept?: string;
|
|
23
|
+
title?: ReactNode;
|
|
24
|
+
hint?: ReactNode;
|
|
25
|
+
privacy?: ReactNode;
|
|
26
|
+
file?: ChosenFile | null;
|
|
27
|
+
progress?: number | null;
|
|
28
|
+
progressLabel?: ReactNode;
|
|
29
|
+
onClear?: () => void;
|
|
30
|
+
error?: ReactNode;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
className?: string;
|
|
33
|
+
}): react.JSX.Element;
|
|
34
|
+
type SectionStatus = 'done' | 'current' | 'upcoming' | 'blocked';
|
|
35
|
+
declare function FormSection({ n, title, hint, status, action, as: Heading, id, children, className, }: {
|
|
36
|
+
n?: number;
|
|
37
|
+
title: ReactNode;
|
|
38
|
+
hint?: ReactNode;
|
|
39
|
+
status?: SectionStatus;
|
|
40
|
+
action?: ReactNode;
|
|
41
|
+
as?: 'h2' | 'h3';
|
|
42
|
+
id?: string;
|
|
43
|
+
children?: ReactNode;
|
|
44
|
+
className?: string;
|
|
45
|
+
}): react.JSX.Element;
|
|
46
|
+
type StateTone = 'good' | 'attention' | 'bad' | 'neutral' | 'quiet';
|
|
47
|
+
declare function StateBadge({ tone, children, title, className, }: {
|
|
48
|
+
tone?: StateTone;
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
title?: string;
|
|
51
|
+
className?: string;
|
|
52
|
+
}): react.JSX.Element;
|
|
53
|
+
interface StateDef {
|
|
54
|
+
label: string;
|
|
55
|
+
tone: StateTone;
|
|
56
|
+
hint?: string;
|
|
57
|
+
}
|
|
58
|
+
declare function createStateBadge<S extends string>(states: Record<S, StateDef>): ({ state, className }: {
|
|
59
|
+
state: S;
|
|
60
|
+
className?: string;
|
|
61
|
+
}) => react.JSX.Element;
|
|
62
|
+
declare function BlockHeight({ height, label, link, network, className, }: {
|
|
63
|
+
height: number;
|
|
64
|
+
label?: boolean;
|
|
65
|
+
link?: boolean;
|
|
66
|
+
network?: Network;
|
|
67
|
+
className?: string;
|
|
68
|
+
}): react.JSX.Element;
|
|
69
|
+
type AnchorState = 'anchored' | 'pending' | 'unverified' | 'none' | 'fail';
|
|
70
|
+
declare function AnchorStatus({ state, blockHeight, blockTime, submittedAt, calendar, message, network, variant, className, }: {
|
|
71
|
+
state: AnchorState;
|
|
72
|
+
blockHeight?: number;
|
|
73
|
+
blockTime?: number | Date | string;
|
|
74
|
+
submittedAt?: number | Date | string;
|
|
75
|
+
calendar?: string;
|
|
76
|
+
message?: ReactNode;
|
|
77
|
+
network?: Network;
|
|
78
|
+
variant?: 'detail' | 'badge';
|
|
79
|
+
className?: string;
|
|
80
|
+
}): react.JSX.Element;
|
|
81
|
+
declare function BlockCountdown({ target, tip, from, reached, minutesPerBlock, network, className, }: {
|
|
82
|
+
target: number;
|
|
83
|
+
tip?: number | null;
|
|
84
|
+
from?: number;
|
|
85
|
+
reached?: string;
|
|
86
|
+
minutesPerBlock?: number;
|
|
87
|
+
network?: Network;
|
|
88
|
+
className?: string;
|
|
89
|
+
}): react.JSX.Element;
|
|
90
|
+
declare function Meter({ value, max, ghost, label, figure, tone, size, className, }: {
|
|
91
|
+
value: number;
|
|
92
|
+
max: number;
|
|
93
|
+
ghost?: number;
|
|
94
|
+
label: ReactNode;
|
|
95
|
+
figure?: ReactNode;
|
|
96
|
+
tone?: 'ink' | 'brand';
|
|
97
|
+
size?: 'md' | 'sm';
|
|
98
|
+
className?: string;
|
|
99
|
+
}): react.JSX.Element;
|
|
100
|
+
interface FilterOption<T extends string> {
|
|
101
|
+
value: T;
|
|
102
|
+
label: ReactNode;
|
|
103
|
+
count?: number;
|
|
104
|
+
}
|
|
105
|
+
declare function FilterChips<T extends string>({ options, value, onChange, label, className, }: {
|
|
106
|
+
options: FilterOption<T>[];
|
|
107
|
+
label: string;
|
|
108
|
+
className?: string;
|
|
109
|
+
} & ({
|
|
110
|
+
multiple?: false;
|
|
111
|
+
value: NoInfer<T>;
|
|
112
|
+
onChange: (v: NoInfer<T>) => void;
|
|
113
|
+
} | {
|
|
114
|
+
multiple: true;
|
|
115
|
+
value: NoInfer<T>[];
|
|
116
|
+
onChange: (v: NoInfer<T>[]) => void;
|
|
117
|
+
})): react.JSX.Element;
|
|
118
|
+
interface ToolItem {
|
|
119
|
+
href: string;
|
|
120
|
+
label: string;
|
|
121
|
+
icon?: ReactNode;
|
|
122
|
+
description?: ReactNode;
|
|
123
|
+
active?: boolean;
|
|
124
|
+
}
|
|
125
|
+
declare function ToolGrid({ tools, as: Heading, className, }: {
|
|
126
|
+
tools: readonly ToolItem[];
|
|
127
|
+
as?: 'h2' | 'h3';
|
|
128
|
+
className?: string;
|
|
129
|
+
}): react.JSX.Element;
|
|
130
|
+
|
|
131
|
+
export { type AnchorState as A, BlockCountdown as B, type ChosenFile as C, DropZone as D, FilterChips as F, Meter as M, type SectionStatus as S, ToolGrid as T, AnchorStatus as a, ArtifactView as b, BlockHeight as c, type FilterOption as d, FormSection as e, StateBadge as f, type StateDef as g, type StateTone as h, type ToolItem as i, createStateBadge as j };
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { Network } from './format.mjs';
|
|
4
|
+
|
|
5
|
+
declare function ArtifactView({ content, title, filename, mime, defaultView, maxLines, className, }: {
|
|
6
|
+
content: string;
|
|
7
|
+
title?: ReactNode;
|
|
8
|
+
filename?: string;
|
|
9
|
+
mime?: string;
|
|
10
|
+
defaultView?: 'formatted' | 'raw';
|
|
11
|
+
maxLines?: number;
|
|
12
|
+
className?: string;
|
|
13
|
+
}): react.JSX.Element;
|
|
14
|
+
interface ChosenFile {
|
|
15
|
+
name: string;
|
|
16
|
+
size: number;
|
|
17
|
+
type?: string;
|
|
18
|
+
}
|
|
19
|
+
declare function DropZone({ onFile, onText, accept, title, hint, privacy, file, progress, progressLabel, onClear, error, disabled, className, }: {
|
|
20
|
+
onFile: (file: File) => void;
|
|
21
|
+
onText?: (text: string) => void;
|
|
22
|
+
accept?: string;
|
|
23
|
+
title?: ReactNode;
|
|
24
|
+
hint?: ReactNode;
|
|
25
|
+
privacy?: ReactNode;
|
|
26
|
+
file?: ChosenFile | null;
|
|
27
|
+
progress?: number | null;
|
|
28
|
+
progressLabel?: ReactNode;
|
|
29
|
+
onClear?: () => void;
|
|
30
|
+
error?: ReactNode;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
className?: string;
|
|
33
|
+
}): react.JSX.Element;
|
|
34
|
+
type SectionStatus = 'done' | 'current' | 'upcoming' | 'blocked';
|
|
35
|
+
declare function FormSection({ n, title, hint, status, action, as: Heading, id, children, className, }: {
|
|
36
|
+
n?: number;
|
|
37
|
+
title: ReactNode;
|
|
38
|
+
hint?: ReactNode;
|
|
39
|
+
status?: SectionStatus;
|
|
40
|
+
action?: ReactNode;
|
|
41
|
+
as?: 'h2' | 'h3';
|
|
42
|
+
id?: string;
|
|
43
|
+
children?: ReactNode;
|
|
44
|
+
className?: string;
|
|
45
|
+
}): react.JSX.Element;
|
|
46
|
+
type StateTone = 'good' | 'attention' | 'bad' | 'neutral' | 'quiet';
|
|
47
|
+
declare function StateBadge({ tone, children, title, className, }: {
|
|
48
|
+
tone?: StateTone;
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
title?: string;
|
|
51
|
+
className?: string;
|
|
52
|
+
}): react.JSX.Element;
|
|
53
|
+
interface StateDef {
|
|
54
|
+
label: string;
|
|
55
|
+
tone: StateTone;
|
|
56
|
+
hint?: string;
|
|
57
|
+
}
|
|
58
|
+
declare function createStateBadge<S extends string>(states: Record<S, StateDef>): ({ state, className }: {
|
|
59
|
+
state: S;
|
|
60
|
+
className?: string;
|
|
61
|
+
}) => react.JSX.Element;
|
|
62
|
+
declare function BlockHeight({ height, label, link, network, className, }: {
|
|
63
|
+
height: number;
|
|
64
|
+
label?: boolean;
|
|
65
|
+
link?: boolean;
|
|
66
|
+
network?: Network;
|
|
67
|
+
className?: string;
|
|
68
|
+
}): react.JSX.Element;
|
|
69
|
+
type AnchorState = 'anchored' | 'pending' | 'unverified' | 'none' | 'fail';
|
|
70
|
+
declare function AnchorStatus({ state, blockHeight, blockTime, submittedAt, calendar, message, network, variant, className, }: {
|
|
71
|
+
state: AnchorState;
|
|
72
|
+
blockHeight?: number;
|
|
73
|
+
blockTime?: number | Date | string;
|
|
74
|
+
submittedAt?: number | Date | string;
|
|
75
|
+
calendar?: string;
|
|
76
|
+
message?: ReactNode;
|
|
77
|
+
network?: Network;
|
|
78
|
+
variant?: 'detail' | 'badge';
|
|
79
|
+
className?: string;
|
|
80
|
+
}): react.JSX.Element;
|
|
81
|
+
declare function BlockCountdown({ target, tip, from, reached, minutesPerBlock, network, className, }: {
|
|
82
|
+
target: number;
|
|
83
|
+
tip?: number | null;
|
|
84
|
+
from?: number;
|
|
85
|
+
reached?: string;
|
|
86
|
+
minutesPerBlock?: number;
|
|
87
|
+
network?: Network;
|
|
88
|
+
className?: string;
|
|
89
|
+
}): react.JSX.Element;
|
|
90
|
+
declare function Meter({ value, max, ghost, label, figure, tone, size, className, }: {
|
|
91
|
+
value: number;
|
|
92
|
+
max: number;
|
|
93
|
+
ghost?: number;
|
|
94
|
+
label: ReactNode;
|
|
95
|
+
figure?: ReactNode;
|
|
96
|
+
tone?: 'ink' | 'brand';
|
|
97
|
+
size?: 'md' | 'sm';
|
|
98
|
+
className?: string;
|
|
99
|
+
}): react.JSX.Element;
|
|
100
|
+
interface FilterOption<T extends string> {
|
|
101
|
+
value: T;
|
|
102
|
+
label: ReactNode;
|
|
103
|
+
count?: number;
|
|
104
|
+
}
|
|
105
|
+
declare function FilterChips<T extends string>({ options, value, onChange, label, className, }: {
|
|
106
|
+
options: FilterOption<T>[];
|
|
107
|
+
label: string;
|
|
108
|
+
className?: string;
|
|
109
|
+
} & ({
|
|
110
|
+
multiple?: false;
|
|
111
|
+
value: NoInfer<T>;
|
|
112
|
+
onChange: (v: NoInfer<T>) => void;
|
|
113
|
+
} | {
|
|
114
|
+
multiple: true;
|
|
115
|
+
value: NoInfer<T>[];
|
|
116
|
+
onChange: (v: NoInfer<T>[]) => void;
|
|
117
|
+
})): react.JSX.Element;
|
|
118
|
+
interface ToolItem {
|
|
119
|
+
href: string;
|
|
120
|
+
label: string;
|
|
121
|
+
icon?: ReactNode;
|
|
122
|
+
description?: ReactNode;
|
|
123
|
+
active?: boolean;
|
|
124
|
+
}
|
|
125
|
+
declare function ToolGrid({ tools, as: Heading, className, }: {
|
|
126
|
+
tools: readonly ToolItem[];
|
|
127
|
+
as?: 'h2' | 'h3';
|
|
128
|
+
className?: string;
|
|
129
|
+
}): react.JSX.Element;
|
|
130
|
+
|
|
131
|
+
export { type AnchorState as A, BlockCountdown as B, type ChosenFile as C, DropZone as D, FilterChips as F, Meter as M, type SectionStatus as S, ToolGrid as T, AnchorStatus as a, ArtifactView as b, BlockHeight as c, type FilterOption as d, FormSection as e, StateBadge as f, type StateDef as g, type StateTone as h, type ToolItem as i, createStateBadge as j };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orangecheck/app-design",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "The ochk.app design system: tokens, type, the isometric check, halftone photography, primitives and app chrome. Its own system, scoped under data-oc-app=\"ochk\" so it never reaches the .ochk.io family sites.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"orangecheck",
|
|
@@ -60,6 +60,26 @@
|
|
|
60
60
|
"import": "./dist/family.mjs",
|
|
61
61
|
"require": "./dist/family.js"
|
|
62
62
|
},
|
|
63
|
+
"./code": {
|
|
64
|
+
"types": "./dist/code.d.ts",
|
|
65
|
+
"import": "./dist/code.mjs",
|
|
66
|
+
"require": "./dist/code.js"
|
|
67
|
+
},
|
|
68
|
+
"./format": {
|
|
69
|
+
"types": "./dist/format.d.ts",
|
|
70
|
+
"import": "./dist/format.mjs",
|
|
71
|
+
"require": "./dist/format.js"
|
|
72
|
+
},
|
|
73
|
+
"./mdx": {
|
|
74
|
+
"types": "./dist/mdx.d.ts",
|
|
75
|
+
"import": "./dist/mdx.mjs",
|
|
76
|
+
"require": "./dist/mdx.js"
|
|
77
|
+
},
|
|
78
|
+
"./session": {
|
|
79
|
+
"types": "./dist/session.d.ts",
|
|
80
|
+
"import": "./dist/session.mjs",
|
|
81
|
+
"require": "./dist/session.js"
|
|
82
|
+
},
|
|
63
83
|
"./styles.css": "./dist/styles.css",
|
|
64
84
|
"./styles/*": "./dist/styles/*"
|
|
65
85
|
},
|
|
@@ -71,7 +91,7 @@
|
|
|
71
91
|
"scripts": {
|
|
72
92
|
"build": "tsup && yarn copy:css",
|
|
73
93
|
"copy:css": "rm -rf dist/styles && mkdir -p dist/styles && cp src/styles.css dist/styles.css && cp -R src/styles/. dist/styles/",
|
|
74
|
-
"test": "node scripts/check-contrast.mjs && node scripts/check-isolation.mjs && node scripts/check-shell.mjs && node scripts/check-mirror.mjs",
|
|
94
|
+
"test": "node scripts/check-contrast.mjs && node scripts/check-isolation.mjs && node scripts/check-shell.mjs && node scripts/check-mirror.mjs && node scripts/check-code.mjs && node scripts/check-entries.mjs && node scripts/check-render.mjs",
|
|
75
95
|
"dev": "tsup --watch",
|
|
76
96
|
"type-check": "tsc --noEmit",
|
|
77
97
|
"clean": "rm -rf dist"
|
|
@@ -99,17 +119,26 @@
|
|
|
99
119
|
"tailwind-merge": "^3.3.1"
|
|
100
120
|
},
|
|
101
121
|
"peerDependencies": {
|
|
122
|
+
"@orangecheck/auth-client": "^2.32.0",
|
|
102
123
|
"lucide-react": ">=0.400.0",
|
|
103
124
|
"next": "^15.0.0 || ^16.0.0",
|
|
104
125
|
"next-themes": "^0.4.0",
|
|
105
126
|
"react": "^18.0.0 || ^19.0.0",
|
|
106
127
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
107
128
|
},
|
|
129
|
+
"peerDependenciesMeta": {
|
|
130
|
+
"@orangecheck/auth-client": {
|
|
131
|
+
"optional": true
|
|
132
|
+
}
|
|
133
|
+
},
|
|
108
134
|
"devDependencies": {
|
|
135
|
+
"@orangecheck/auth-client": "^2.32.3",
|
|
136
|
+
"@orangecheck/auth-core": "^2.5.0",
|
|
109
137
|
"@types/qrcode": "^1.5.5",
|
|
110
138
|
"@types/react": "^19.0.0",
|
|
111
139
|
"@types/react-dom": "^19.0.0",
|
|
112
140
|
"lucide-react": "^0.544.0",
|
|
141
|
+
"mermaid": "^11.14.0",
|
|
113
142
|
"next": "^16.3.8",
|
|
114
143
|
"next-themes": "^0.4.6",
|
|
115
144
|
"react": "19.1.0",
|