@pollinations/ui 0.1.0-alpha.1 → 0.1.0-alpha.10
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 +148 -36
- package/dist/Button-BGqClaBr.d.cts +29 -0
- package/dist/Button-BGqClaBr.d.ts +29 -0
- package/dist/Chip-v-ADv6cz.d.cts +18 -0
- package/dist/Chip-v-ADv6cz.d.ts +18 -0
- package/dist/Dialog-D3Nqt8cE.d.cts +66 -0
- package/dist/Dialog-D3Nqt8cE.d.ts +66 -0
- package/dist/app-user-menu/sdk.cjs +684 -243
- package/dist/app-user-menu/sdk.cjs.map +1 -1
- package/dist/app-user-menu/sdk.d.cts +18 -7
- package/dist/app-user-menu/sdk.d.ts +18 -7
- package/dist/app-user-menu/sdk.js +689 -241
- package/dist/app-user-menu/sdk.js.map +1 -1
- package/dist/app.css +19 -122
- package/dist/auth/index.cjs +1372 -86
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.cts +91 -6
- package/dist/auth/index.d.ts +91 -6
- package/dist/auth/index.js +1369 -85
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/sdk.cjs +250 -0
- package/dist/auth/sdk.cjs.map +1 -0
- package/dist/auth/sdk.d.cts +40 -0
- package/dist/auth/sdk.d.ts +40 -0
- package/dist/auth/sdk.js +219 -0
- package/dist/auth/sdk.js.map +1 -0
- package/dist/brand/badge-made-with.svg +1 -0
- package/dist/brand/lockup-horizontal-black.png +0 -0
- package/dist/brand/lockup-horizontal-black.svg +4 -0
- package/dist/brand/lockup-horizontal-white.png +0 -0
- package/dist/brand/lockup-horizontal-white.svg +4 -0
- package/dist/brand/lockup-horizontal.svg +4 -0
- package/dist/brand/lockup-stacked-black.png +0 -0
- package/dist/brand/lockup-stacked-black.svg +4 -0
- package/dist/brand/lockup-stacked-white.png +0 -0
- package/dist/brand/lockup-stacked-white.svg +4 -0
- package/dist/brand/lockup-stacked.svg +4 -0
- package/dist/brand/mark-black.png +0 -0
- package/dist/brand/mark-black.svg +1 -0
- package/dist/brand/mark-white.png +0 -0
- package/dist/brand/mark-white.svg +1 -0
- package/dist/brand/mark.svg +1 -0
- package/dist/brand/polli/polli-lockup-horizontal-black.png +0 -0
- package/dist/brand/polli/polli-lockup-horizontal-white.png +0 -0
- package/dist/brand/polli/polli-lockup-stacked-black.png +0 -0
- package/dist/brand/polli/polli-lockup-stacked-white.png +0 -0
- package/dist/brand/polli/polli.png +0 -0
- package/dist/brand/wordmark-black.png +0 -0
- package/dist/brand/wordmark-black.svg +1 -0
- package/dist/brand/wordmark-white.png +0 -0
- package/dist/brand/wordmark-white.svg +1 -0
- package/dist/brand/wordmark.svg +1 -0
- package/dist/fonts/geist-pixel-square.woff2 +0 -0
- package/dist/gen/index.cjs +459 -218
- package/dist/gen/index.cjs.map +1 -1
- package/dist/gen/index.d.cts +75 -19
- package/dist/gen/index.d.ts +75 -19
- package/dist/gen/index.js +453 -216
- package/dist/gen/index.js.map +1 -1
- package/dist/index.browser.min.js +2 -0
- package/dist/index.browser.min.js.map +1 -0
- package/dist/index.cjs +3907 -1626
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +682 -199
- package/dist/index.d.ts +682 -199
- package/dist/index.js +3671 -1457
- package/dist/index.js.map +1 -1
- package/dist/licenses/Geist-OFL.txt +93 -0
- package/dist/markdown.cjs +836 -0
- package/dist/markdown.cjs.map +1 -0
- package/dist/markdown.d.cts +16 -0
- package/dist/markdown.d.ts +16 -0
- package/dist/markdown.js +807 -0
- package/dist/markdown.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/theme.css +94 -0
- package/dist/types-CCy9JNu9.d.cts +6 -0
- package/dist/types-CCy9JNu9.d.ts +6 -0
- package/dist/wallet/index.cjs +295 -65
- package/dist/wallet/index.cjs.map +1 -1
- package/dist/wallet/index.d.cts +30 -7
- package/dist/wallet/index.d.ts +30 -7
- package/dist/wallet/index.js +294 -65
- package/dist/wallet/index.js.map +1 -1
- package/package.json +106 -89
- package/dist/Chip-CQCq34kS.d.cts +0 -20
- package/dist/Chip-Cj4xG7Te.d.ts +0 -20
- package/dist/assets/logo-wordmark.svg +0 -1
- package/dist/assets/logo.svg +0 -4
- package/dist/theme-jRPPBmld.d.cts +0 -20
- package/dist/theme-jRPPBmld.d.ts +0 -20
package/dist/index.d.cts
CHANGED
|
@@ -1,23 +1,85 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { FC, ComponentPropsWithoutRef, ReactNode, RefObject, ButtonHTMLAttributes, PropsWithChildren, CSSProperties, ElementType } from 'react';
|
|
3
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { ReactNode, CSSProperties, FC, ComponentPropsWithoutRef, RefObject, ButtonHTMLAttributes, PropsWithChildren, ComponentType, ElementType } from 'react';
|
|
4
|
+
import { S as ScrollAreaProps, D as DialogProps } from './Dialog-D3Nqt8cE.cjs';
|
|
5
|
+
export { a as Dialog, b as DialogBody, c as DialogBodyProps, d as DialogDescription, e as DialogFooter, f as DialogFooterProps, g as DialogHeader, h as DialogHeaderProps, i as DialogTitle, j as ScrollArea } from './Dialog-D3Nqt8cE.cjs';
|
|
6
|
+
import { B as ButtonProps, a as ButtonAppearance } from './Button-BGqClaBr.cjs';
|
|
7
|
+
export { b as Button } from './Button-BGqClaBr.cjs';
|
|
8
|
+
import { I as IconProps } from './types-CCy9JNu9.cjs';
|
|
9
|
+
export { C as Chip } from './Chip-v-ADv6cz.cjs';
|
|
8
10
|
export { Field } from '@ark-ui/react/field';
|
|
11
|
+
import '@ark-ui/react/dialog';
|
|
12
|
+
|
|
13
|
+
type DropdownProps = {
|
|
14
|
+
/** Trigger element; receives the current open state (e.g. to rotate a chevron). */
|
|
15
|
+
trigger: (open: boolean) => ReactNode;
|
|
16
|
+
/** Panel content. As a function, receives `close` to dismiss after a selection. */
|
|
17
|
+
children: ReactNode | ((close: () => void) => ReactNode);
|
|
18
|
+
/** Panel placement relative to the trigger. */
|
|
19
|
+
align?: "start" | "end";
|
|
20
|
+
side?: "top" | "bottom";
|
|
21
|
+
/** Controlled open state. Omit to let the Dropdown manage its own. */
|
|
22
|
+
open?: boolean;
|
|
23
|
+
/** Render inside the parent dialog so its focus and accessibility scope includes the menu. */
|
|
24
|
+
portalled?: boolean;
|
|
25
|
+
onOpenChange?: (open: boolean) => void;
|
|
26
|
+
/** Appended after the surface (widths, padding, max-height…). */
|
|
27
|
+
className?: string;
|
|
28
|
+
/** Theme variables for portaled content that cannot inherit from its trigger. */
|
|
29
|
+
panelStyle?: CSSProperties;
|
|
30
|
+
};
|
|
31
|
+
declare const Dropdown: FC<DropdownProps>;
|
|
32
|
+
|
|
33
|
+
type AccountIdentityProps = {
|
|
34
|
+
name: string;
|
|
35
|
+
avatarUrl?: string | null;
|
|
36
|
+
secondaryContent?: ReactNode;
|
|
37
|
+
/** Optional dashboard destination, owned by the caller. Opens in a new tab. */
|
|
38
|
+
dashboardHref?: string;
|
|
39
|
+
className?: string;
|
|
40
|
+
};
|
|
41
|
+
type AccountIdentityLinkProps = Pick<AccountIdentityProps, "name" | "avatarUrl" | "className"> & {
|
|
42
|
+
/** External profile the whole pill opens in a new tab. */
|
|
43
|
+
href: string;
|
|
44
|
+
};
|
|
45
|
+
declare function AccountIdentity({ name, avatarUrl, secondaryContent, dashboardHref, className, }: AccountIdentityProps): react_jsx_runtime.JSX.Element;
|
|
46
|
+
/** Someone else's identity as a one-line pill link, e.g. an app's developer. */
|
|
47
|
+
declare function AccountIdentityLink({ name, avatarUrl, href, className, }: AccountIdentityLinkProps): react_jsx_runtime.JSX.Element;
|
|
48
|
+
type AccountMenuProps = AccountIdentityProps & {
|
|
49
|
+
/** The caller owns navigation, permissions and sign-out behavior. */
|
|
50
|
+
children: DropdownProps["children"];
|
|
51
|
+
menuClassName?: string;
|
|
52
|
+
side?: "top" | "bottom";
|
|
53
|
+
menuLabel?: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* With `dashboardHref` the avatar is a link and the name/chevron open the
|
|
57
|
+
* menu; without one the whole pill is the trigger.
|
|
58
|
+
*/
|
|
59
|
+
declare function AccountMenu({ name, avatarUrl, dashboardHref, secondaryContent, children, className, menuClassName, side, menuLabel, }: AccountMenuProps): react_jsx_runtime.JSX.Element;
|
|
9
60
|
|
|
10
|
-
type AlertIntent = "info" | "
|
|
11
|
-
type AlertProps = ComponentPropsWithoutRef<"div"> & {
|
|
61
|
+
type AlertIntent = "info" | "advisory" | "warning" | "danger";
|
|
62
|
+
type AlertProps = Omit<ComponentPropsWithoutRef<"div">, "title"> & {
|
|
12
63
|
intent?: AlertIntent;
|
|
13
64
|
title?: ReactNode;
|
|
14
65
|
};
|
|
15
66
|
declare const Alert: FC<AlertProps>;
|
|
16
67
|
|
|
68
|
+
type AppBrandProps = {
|
|
69
|
+
appName: string;
|
|
70
|
+
href?: string;
|
|
71
|
+
size?: "md" | "sm";
|
|
72
|
+
className?: string;
|
|
73
|
+
};
|
|
74
|
+
/** Lotus mark + app name: the one brand every internal app shows. */
|
|
75
|
+
declare function AppBrand({ appName, href, size, className, }: AppBrandProps): react_jsx_runtime.JSX.Element;
|
|
76
|
+
|
|
17
77
|
type ScrollTargetRef = RefObject<HTMLElement | null>;
|
|
18
78
|
type AppHeaderProps = {
|
|
19
79
|
children?: ReactNode;
|
|
20
80
|
navLabel: string;
|
|
81
|
+
/** Shows the lotus + this name instead of the pollinations.ai wordmark. */
|
|
82
|
+
appName?: string;
|
|
21
83
|
autoHide?: boolean;
|
|
22
84
|
scrollTargetRef?: ScrollTargetRef;
|
|
23
85
|
brandHref?: string;
|
|
@@ -26,12 +88,77 @@ type AppHeaderProps = {
|
|
|
26
88
|
innerClassName?: string;
|
|
27
89
|
navClassName?: string;
|
|
28
90
|
};
|
|
29
|
-
declare function AppHeader({ children, navLabel, autoHide, scrollTargetRef, brandHref, brandLabel, className, innerClassName, navClassName, }: AppHeaderProps): react_jsx_runtime.JSX.Element;
|
|
91
|
+
declare function AppHeader({ children, navLabel, appName, autoHide, scrollTargetRef, brandHref, brandLabel, className, innerClassName, navClassName, }: AppHeaderProps): react_jsx_runtime.JSX.Element;
|
|
92
|
+
|
|
93
|
+
type CalloutProps = {
|
|
94
|
+
title: ReactNode;
|
|
95
|
+
body: ReactNode;
|
|
96
|
+
children: ReactNode;
|
|
97
|
+
tone?: "theme" | "dark";
|
|
98
|
+
className?: string;
|
|
99
|
+
};
|
|
100
|
+
/** Prominent closing panel with a title, supporting copy, and actions. */
|
|
101
|
+
declare function Callout({ title, body, children, tone, className, }: CalloutProps): react_jsx_runtime.JSX.Element;
|
|
102
|
+
|
|
103
|
+
type ChatConversationProps = Omit<ScrollAreaProps, "children" | "className"> & {
|
|
104
|
+
children: ReactNode;
|
|
105
|
+
className?: string;
|
|
106
|
+
viewportClassName?: string;
|
|
107
|
+
showScrollButton?: boolean;
|
|
108
|
+
onScrollToBottom?: () => void;
|
|
109
|
+
scrollButtonLabel?: string;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Scrollable chat transcript with an optional jump-to-latest control.
|
|
113
|
+
* Message data and streaming remain the consumer's responsibility.
|
|
114
|
+
*/
|
|
115
|
+
declare const ChatConversation: react.ForwardRefExoticComponent<Omit<ScrollAreaProps, "className" | "children"> & {
|
|
116
|
+
children: ReactNode;
|
|
117
|
+
className?: string;
|
|
118
|
+
viewportClassName?: string;
|
|
119
|
+
showScrollButton?: boolean;
|
|
120
|
+
onScrollToBottom?: () => void;
|
|
121
|
+
scrollButtonLabel?: string;
|
|
122
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
123
|
+
type ChatConversationContentProps = ComponentPropsWithoutRef<"div">;
|
|
124
|
+
declare function ChatConversationContent({ className, ...props }: ChatConversationContentProps): react_jsx_runtime.JSX.Element;
|
|
125
|
+
|
|
126
|
+
type ChatMessageRole = "user" | "assistant" | "system";
|
|
127
|
+
type ChatMessageProps = ComponentPropsWithoutRef<"article"> & {
|
|
128
|
+
from: ChatMessageRole;
|
|
129
|
+
};
|
|
130
|
+
/** Protocol-neutral message surface inspired by AI Elements' Message suite. */
|
|
131
|
+
declare function ChatMessage({ from, className, children, ...props }: ChatMessageProps): react_jsx_runtime.JSX.Element;
|
|
132
|
+
type ChatMessageHeaderProps = ComponentPropsWithoutRef<"header"> & {
|
|
133
|
+
from: ChatMessageRole;
|
|
134
|
+
label?: ReactNode;
|
|
135
|
+
icon?: ReactNode;
|
|
136
|
+
};
|
|
137
|
+
declare function ChatMessageHeader({ from, label, icon, className, ...props }: ChatMessageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
138
|
+
type ChatMessageContentProps = ComponentPropsWithoutRef<"div">;
|
|
139
|
+
declare function ChatMessageContent({ className, ...props }: ChatMessageContentProps): react_jsx_runtime.JSX.Element;
|
|
140
|
+
type ChatMessageActionsProps = ComponentPropsWithoutRef<"footer">;
|
|
141
|
+
declare function ChatMessageActions({ className, ...props }: ChatMessageActionsProps): react_jsx_runtime.JSX.Element;
|
|
142
|
+
|
|
143
|
+
type ChatPromptInputProps = ComponentPropsWithoutRef<"fieldset">;
|
|
144
|
+
/**
|
|
145
|
+
* Composable prompt shell. Put attachments or controls before the textarea and
|
|
146
|
+
* actions in ChatPromptInputFooter; submission stays owned by the parent form.
|
|
147
|
+
*/
|
|
148
|
+
declare function ChatPromptInput({ className, ...props }: ChatPromptInputProps): react_jsx_runtime.JSX.Element;
|
|
149
|
+
declare const ChatPromptTextarea: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & {
|
|
150
|
+
error?: boolean;
|
|
151
|
+
} & react.RefAttributes<HTMLTextAreaElement>>;
|
|
152
|
+
type ChatPromptInputFooterProps = ComponentPropsWithoutRef<"div"> & {
|
|
153
|
+
start?: ReactNode;
|
|
154
|
+
end?: ReactNode;
|
|
155
|
+
};
|
|
156
|
+
declare function ChatPromptInputFooter({ start, end, children, className, ...props }: ChatPromptInputFooterProps): react_jsx_runtime.JSX.Element;
|
|
30
157
|
|
|
31
158
|
type CodeBlockOwnProps = {
|
|
32
159
|
code: string;
|
|
33
|
-
theme?: ThemeName;
|
|
34
160
|
codeClassName?: string;
|
|
161
|
+
language?: string;
|
|
35
162
|
};
|
|
36
163
|
type CodeBlockProps = CodeBlockOwnProps & Omit<ComponentPropsWithoutRef<"div">, keyof CodeBlockOwnProps | "children">;
|
|
37
164
|
declare const CodeBlock: FC<CodeBlockProps>;
|
|
@@ -43,8 +170,11 @@ type CollapsibleProps = {
|
|
|
43
170
|
onToggle: () => void;
|
|
44
171
|
children: ReactNode;
|
|
45
172
|
disabled?: boolean;
|
|
46
|
-
/** Outer wrapper classes —
|
|
173
|
+
/** Outer wrapper classes — border, rounding, etc. Keep it bg-free if the
|
|
174
|
+
* expanded panel should stay transparent; put any fill on the trigger. */
|
|
47
175
|
wrapperClassName?: string;
|
|
176
|
+
/** Trigger/header base classes (e.g. a selected background). */
|
|
177
|
+
triggerClassName?: string;
|
|
48
178
|
/** Trigger hover classes. Defaults to `polli:hover:bg-theme-bg-active`. */
|
|
49
179
|
hoverClassName?: string;
|
|
50
180
|
/** Trigger focus classes. */
|
|
@@ -64,28 +194,158 @@ type CollapsibleProps = {
|
|
|
64
194
|
*/
|
|
65
195
|
declare const Collapsible: FC<CollapsibleProps>;
|
|
66
196
|
|
|
197
|
+
type ConfirmIntent = "danger" | "info" | "neutral" | "commit";
|
|
198
|
+
type ConfirmationDialogProps = {
|
|
199
|
+
open: boolean;
|
|
200
|
+
title: ReactNode;
|
|
201
|
+
/** Short explanation rendered as body text. */
|
|
202
|
+
description?: ReactNode;
|
|
203
|
+
/** Extra body content below the description (alerts, inputs). */
|
|
204
|
+
children?: ReactNode;
|
|
205
|
+
confirmLabel: ReactNode;
|
|
206
|
+
/** Confirm button recipe; also picks the default confirm icon. */
|
|
207
|
+
intent?: ConfirmIntent;
|
|
208
|
+
/** Override the confirm icon when the action is not a plain delete/confirm. */
|
|
209
|
+
confirmIcon?: ReactNode;
|
|
210
|
+
confirmDisabled?: boolean;
|
|
211
|
+
cancelDisabled?: boolean;
|
|
212
|
+
onConfirm: () => void;
|
|
213
|
+
onCancel: () => void;
|
|
214
|
+
size?: DialogProps["size"];
|
|
215
|
+
};
|
|
216
|
+
/** One floating Cancel + confirm action for every yes/no dialog. */
|
|
217
|
+
declare function ConfirmationDialog({ open, title, description, children, confirmLabel, intent, confirmIcon, confirmDisabled, cancelDisabled, onConfirm, onCancel, size, }: ConfirmationDialogProps): react_jsx_runtime.JSX.Element;
|
|
218
|
+
|
|
219
|
+
type ContentHeaderProps = {
|
|
220
|
+
eyebrow: ReactNode;
|
|
221
|
+
title: ReactNode;
|
|
222
|
+
subtitle?: ReactNode;
|
|
223
|
+
action?: ReactNode;
|
|
224
|
+
variant?: "page" | "section";
|
|
225
|
+
className?: string;
|
|
226
|
+
};
|
|
227
|
+
/** Shared page/section heading rhythm with an optional trailing action. */
|
|
228
|
+
declare function ContentHeader({ eyebrow, title, subtitle, action, variant, className, }: ContentHeaderProps): react_jsx_runtime.JSX.Element;
|
|
229
|
+
|
|
67
230
|
type CopyValue = string | (() => string | Promise<string>);
|
|
68
231
|
type CopyButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "className" | "onClick" | "type" | "value"> & {
|
|
69
232
|
value: CopyValue;
|
|
70
233
|
children: ReactNode | ((copied: boolean) => ReactNode);
|
|
71
234
|
copiedTimeoutMs?: number;
|
|
72
235
|
tooltip?: ReactNode;
|
|
236
|
+
tooltipAlign?: "start" | "center";
|
|
237
|
+
tooltipClampToViewport?: boolean;
|
|
238
|
+
tooltipMaxWidth?: number;
|
|
73
239
|
copiedTooltip?: ReactNode;
|
|
74
240
|
tooltipClassName?: string;
|
|
75
241
|
className?: string | ((copied: boolean) => string);
|
|
242
|
+
variant?: "plain" | "button";
|
|
243
|
+
/** Button intent, used with `variant="button"`. */
|
|
244
|
+
intent?: ButtonProps<"button">["intent"];
|
|
76
245
|
onCopied?: () => void;
|
|
77
246
|
onCopyError?: (error: unknown) => void;
|
|
78
247
|
};
|
|
79
|
-
declare function CopyButton({ value, children, copiedTimeoutMs, tooltip, copiedTooltip, tooltipClassName, className, onCopied, onCopyError, ...buttonProps }: CopyButtonProps): react_jsx_runtime.JSX.Element;
|
|
248
|
+
declare function CopyButton({ value, children, copiedTimeoutMs, tooltip, tooltipAlign, tooltipClampToViewport, tooltipMaxWidth, copiedTooltip, tooltipClassName, className, variant, intent, onCopied, onCopyError, ...buttonProps }: CopyButtonProps): react_jsx_runtime.JSX.Element;
|
|
80
249
|
|
|
81
|
-
type
|
|
82
|
-
|
|
83
|
-
|
|
250
|
+
type CopyFieldProps = Pick<CopyButtonProps, "value" | "onCopied" | "onCopyError" | "copiedTimeoutMs"> & {
|
|
251
|
+
/** Accessible name, e.g. "Copy secret key". */
|
|
252
|
+
label: string;
|
|
253
|
+
/** What to show; defaults to a string value or the label for lazy values. */
|
|
254
|
+
display?: ReactNode;
|
|
255
|
+
className?: string;
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* A value the user copies but never edits: looks like a field, behaves like a
|
|
259
|
+
* button. The whole surface copies on click; the end icon confirms.
|
|
260
|
+
*/
|
|
261
|
+
declare function CopyField({ value, label, display, className, ...copy }: CopyFieldProps): react_jsx_runtime.JSX.Element;
|
|
262
|
+
|
|
263
|
+
type InputProps = React.ComponentPropsWithoutRef<"input"> & {
|
|
264
|
+
error?: boolean;
|
|
265
|
+
hideNumberSteppers?: boolean;
|
|
266
|
+
};
|
|
267
|
+
declare const Input: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
268
|
+
error?: boolean;
|
|
269
|
+
hideNumberSteppers?: boolean;
|
|
270
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
271
|
+
|
|
272
|
+
type EditableComboboxProps = Omit<InputProps, "onChange" | "value"> & {
|
|
273
|
+
value: string;
|
|
274
|
+
options: string[];
|
|
275
|
+
onChange: (value: string) => void;
|
|
276
|
+
emptyMessage?: string;
|
|
277
|
+
align?: "start" | "end";
|
|
278
|
+
open?: boolean;
|
|
279
|
+
onOpenChange?: (open: boolean) => void;
|
|
280
|
+
/** Controlled filter inputs can keep incomplete selections open. */
|
|
281
|
+
closeOnSelect?: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* Content rendered inside the input shell before the text field. Enables
|
|
284
|
+
* the wrapped shell layout and replaces the standalone chevron trigger.
|
|
285
|
+
*/
|
|
286
|
+
startContent?: ReactNode;
|
|
287
|
+
/** Optional class for the suggestions panel. */
|
|
288
|
+
contentClassName?: string;
|
|
289
|
+
};
|
|
290
|
+
type EditableComboboxTokenProps = Omit<ComponentPropsWithoutRef<"button">, "children" | "type"> & {
|
|
291
|
+
label: string;
|
|
292
|
+
value: string;
|
|
293
|
+
highlighted?: boolean;
|
|
294
|
+
};
|
|
295
|
+
/** Interactive filter token intended for an EditableCombobox startContent slot. */
|
|
296
|
+
declare function EditableComboboxToken({ label, value, highlighted, className, ...buttonProps }: EditableComboboxTokenProps): react_jsx_runtime.JSX.Element;
|
|
297
|
+
declare function EditableCombobox({ value, options, onChange, emptyMessage, align, open, onOpenChange, closeOnSelect, startContent, contentClassName, className, disabled, name, placeholder, required, ...inputProps }: EditableComboboxProps): react_jsx_runtime.JSX.Element;
|
|
298
|
+
|
|
299
|
+
type EmptyStateProps = {
|
|
300
|
+
children: ReactNode;
|
|
301
|
+
};
|
|
302
|
+
/**
|
|
303
|
+
* Where content would be but isn't: nothing yet, nothing matching, or a feed
|
|
304
|
+
* that couldn't load. A dashed outline marks the empty slot; the note says
|
|
305
|
+
* why.
|
|
306
|
+
*/
|
|
307
|
+
declare function EmptyState({ children }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
308
|
+
|
|
309
|
+
type ExternalLinkButtonBaseProps = {
|
|
84
310
|
size?: "sm" | "md" | "lg";
|
|
311
|
+
appearance?: ButtonAppearance;
|
|
312
|
+
intent?: ButtonProps["intent"];
|
|
313
|
+
/** Set false for another Pollinations property that should behave as product navigation. */
|
|
314
|
+
external?: boolean;
|
|
315
|
+
showIcon?: boolean;
|
|
316
|
+
/** Leading icon, rendered before the label. */
|
|
317
|
+
icon?: ReactNode;
|
|
85
318
|
className?: string;
|
|
86
319
|
children: ReactNode;
|
|
87
320
|
};
|
|
88
|
-
|
|
321
|
+
type ExternalLinkButtonAnchorProps = ExternalLinkButtonBaseProps & {
|
|
322
|
+
href: string;
|
|
323
|
+
} & Omit<ComponentPropsWithoutRef<"a">, "children" | "className" | "href">;
|
|
324
|
+
type ExternalLinkButtonNativeButtonProps = ExternalLinkButtonBaseProps & Omit<ComponentPropsWithoutRef<"button">, "children" | "className">;
|
|
325
|
+
type ExternalLinkButtonProps = ExternalLinkButtonAnchorProps | ExternalLinkButtonNativeButtonProps;
|
|
326
|
+
/** Primary flow actions such as checkout or authorization. Use InlineLink for navigation. */
|
|
327
|
+
declare function ExternalLinkButton(props: ExternalLinkButtonProps): react_jsx_runtime.JSX.Element;
|
|
328
|
+
|
|
329
|
+
type FieldStackProps = {
|
|
330
|
+
/** Omit for a self-describing control; label the input itself. */
|
|
331
|
+
label?: ReactNode;
|
|
332
|
+
children: ReactNode;
|
|
333
|
+
helper?: ReactNode;
|
|
334
|
+
action?: ReactNode;
|
|
335
|
+
error?: ReactNode;
|
|
336
|
+
alignLabelRow?: boolean;
|
|
337
|
+
/**
|
|
338
|
+
* `inline` puts the label in a fixed column to the left of the control
|
|
339
|
+
* (6.5rem, 5.5rem on phones), for dense settings panels whose rows
|
|
340
|
+
* should line up.
|
|
341
|
+
*/
|
|
342
|
+
orientation?: "stacked" | "inline";
|
|
343
|
+
className?: string;
|
|
344
|
+
labelClassName?: string;
|
|
345
|
+
helperClassName?: string;
|
|
346
|
+
errorClassName?: string;
|
|
347
|
+
};
|
|
348
|
+
declare function FieldStack({ label, children, helper, action, error, alignLabelRow, orientation, className, labelClassName, helperClassName, errorClassName, }: FieldStackProps): react_jsx_runtime.JSX.Element;
|
|
89
349
|
|
|
90
350
|
type RejectReason = "type" | "size" | "count";
|
|
91
351
|
type RejectedFile = {
|
|
@@ -105,53 +365,62 @@ type FileUploadProps = {
|
|
|
105
365
|
previewIcon?: ReactNode;
|
|
106
366
|
/** Fully locks the field: no add, no remove, drops ignored. */
|
|
107
367
|
disabled?: boolean;
|
|
108
|
-
/** Optional cascade override; defaults to the inherited `[data-theme]`. */
|
|
109
|
-
theme?: ThemeName;
|
|
110
368
|
className?: string;
|
|
111
369
|
};
|
|
112
|
-
declare function FileUpload({ value, onChange, onReject, maxFiles, maxSizeBytes, accept, icon, label, previewIcon, disabled,
|
|
370
|
+
declare function FileUpload({ value, onChange, onReject, maxFiles, maxSizeBytes, accept, icon, label, previewIcon, disabled, className, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
113
371
|
|
|
114
372
|
type InfoTipProps = {
|
|
115
373
|
text?: ReactNode;
|
|
116
374
|
content?: ReactNode;
|
|
117
375
|
label?: string;
|
|
376
|
+
/** Also opens on tap, for help that matters on phones. */
|
|
377
|
+
tapEnabled?: boolean;
|
|
118
378
|
};
|
|
119
379
|
/**
|
|
120
380
|
* Small "i" badge that opens a tooltip on hover, click, or focus.
|
|
121
381
|
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* (`bg-theme-bg-pale` + `border-theme-border` + `text-theme-text-strong`,
|
|
125
|
-
* viewport-clamped). Cursor on the badge is `cursor-help`.
|
|
382
|
+
* Quiet neutral badge and shared, viewport-clamped tooltip popup.
|
|
383
|
+
* The help cursor indicates that more information is available.
|
|
126
384
|
*/
|
|
127
385
|
declare const InfoTip: FC<InfoTipProps>;
|
|
128
386
|
|
|
387
|
+
type KeyChipProps = {
|
|
388
|
+
/** The visible start of the key, e.g. "sk_0ysBCkH". */
|
|
389
|
+
prefix: string;
|
|
390
|
+
/** The full key, when known: the chip then copies it on click. */
|
|
391
|
+
value?: string | null;
|
|
392
|
+
/** Accessible name for the copy action. */
|
|
393
|
+
label?: string;
|
|
394
|
+
className?: string;
|
|
395
|
+
};
|
|
396
|
+
/**
|
|
397
|
+
* One badge for every key: prefix and ellipsis, nothing else. A secret key
|
|
398
|
+
* only ever shows its prefix; a key whose value is known copies on click and
|
|
399
|
+
* carries the clipboard icon.
|
|
400
|
+
*/
|
|
401
|
+
declare function KeyChip({ prefix, value, label, className, }: KeyChipProps): react_jsx_runtime.JSX.Element;
|
|
402
|
+
|
|
129
403
|
type BaseLinkCardProps = {
|
|
130
|
-
/** Override the cascade theme for this card's subtree. */
|
|
131
|
-
theme?: ThemeName;
|
|
132
404
|
external?: boolean;
|
|
133
405
|
showIcon?: boolean;
|
|
406
|
+
/** Card fill (a colour or token var); hover lifts it halfway to white. */
|
|
407
|
+
tint?: string;
|
|
134
408
|
className?: string;
|
|
135
409
|
surfaceClassName?: string;
|
|
136
410
|
};
|
|
137
411
|
type LinkCardProps<T extends React.ElementType = "a"> = PropsWithChildren<BaseLinkCardProps> & {
|
|
138
412
|
as?: T;
|
|
139
413
|
} & Omit<React.ComponentPropsWithoutRef<T>, keyof BaseLinkCardProps | "as">;
|
|
140
|
-
declare function LinkCard<T extends React.ElementType = "a">({ as,
|
|
141
|
-
|
|
142
|
-
type MarkdownProps = {
|
|
143
|
-
children: string;
|
|
144
|
-
className?: string;
|
|
145
|
-
};
|
|
146
|
-
/** Compact markdown for cards and snippets. Use Prose for document-style content. */
|
|
147
|
-
declare function Markdown({ children, className }: MarkdownProps): react_jsx_runtime.JSX.Element;
|
|
414
|
+
declare function LinkCard<T extends React.ElementType = "a">({ as, external, showIcon, tint, className, surfaceClassName, children, ...linkProps }: LinkCardProps<T>): react_jsx_runtime.JSX.Element;
|
|
148
415
|
|
|
149
416
|
type MediaPlaceholderProps = ComponentPropsWithoutRef<"div"> & {
|
|
150
|
-
theme?: ThemeName;
|
|
151
417
|
icon?: ReactNode;
|
|
152
418
|
label?: ReactNode;
|
|
153
419
|
detail?: ReactNode;
|
|
154
|
-
|
|
420
|
+
/** Work is running: the icon disc breathes (still under reduced motion). */
|
|
421
|
+
busy?: boolean;
|
|
422
|
+
/** Fill colour (a token var), e.g. a modality tint; replaces the dashed outline. */
|
|
423
|
+
tint?: string;
|
|
155
424
|
};
|
|
156
425
|
declare const MediaPlaceholder: FC<MediaPlaceholderProps>;
|
|
157
426
|
|
|
@@ -166,57 +435,66 @@ type MultiSelectProps = {
|
|
|
166
435
|
placeholder: string;
|
|
167
436
|
disabled?: boolean;
|
|
168
437
|
disabledText?: string;
|
|
438
|
+
disabledTooltip?: string;
|
|
169
439
|
align?: "start" | "end";
|
|
170
440
|
label?: string;
|
|
171
|
-
|
|
441
|
+
/** Accessible name when the visible label is supplied by the caller. */
|
|
442
|
+
ariaLabel?: string;
|
|
443
|
+
/** Fill the available width, allowing the trigger label to truncate. */
|
|
444
|
+
fullWidth?: boolean;
|
|
172
445
|
};
|
|
173
446
|
declare const MultiSelect: FC<MultiSelectProps>;
|
|
174
447
|
|
|
175
448
|
type BaseNavItemProps = {
|
|
176
|
-
/**
|
|
177
|
-
theme?: ThemeName;
|
|
178
|
-
/** Current/selected item — fills with the section color + sets `aria-current`. */
|
|
449
|
+
/** Current/selected item — fills with the accent + sets `aria-current`. */
|
|
179
450
|
active?: boolean;
|
|
451
|
+
/** Optional leading icon. */
|
|
452
|
+
icon?: ComponentType<{
|
|
453
|
+
className?: string;
|
|
454
|
+
}>;
|
|
180
455
|
className?: string;
|
|
181
456
|
};
|
|
182
457
|
type NavItemProps<T extends React.ElementType = "button"> = PropsWithChildren<BaseNavItemProps> & {
|
|
183
458
|
as?: T;
|
|
184
459
|
} & Omit<React.ComponentPropsWithoutRef<T>, keyof BaseNavItemProps | "as">;
|
|
185
460
|
/**
|
|
186
|
-
* Minimal nav item — a
|
|
187
|
-
* when
|
|
188
|
-
*
|
|
189
|
-
*
|
|
461
|
+
* Minimal nav item — a pill that's neutral when inactive and filled with the
|
|
462
|
+
* accent when active, with an optional leading icon. Polymorphic: `<NavItem>`
|
|
463
|
+
* (button) for in-page nav, `<NavItem as={Link} active={…}>` for routed nav.
|
|
464
|
+
* Shared by the enter dashboard rail and apps so both use one design.
|
|
190
465
|
*/
|
|
191
|
-
declare function NavItem<T extends React.ElementType = "button">({ as,
|
|
466
|
+
declare function NavItem<T extends React.ElementType = "button">({ as, active, icon: Icon, className, children, ...rest }: NavItemProps<T>): react_jsx_runtime.JSX.Element;
|
|
192
467
|
|
|
193
468
|
type PeriodGranularity = "day" | "week" | "month";
|
|
194
469
|
type PeriodSelection = {
|
|
195
470
|
granularity: PeriodGranularity;
|
|
196
471
|
period: string;
|
|
197
472
|
};
|
|
473
|
+
type PeriodWindow = {
|
|
474
|
+
start: Date;
|
|
475
|
+
end: Date;
|
|
476
|
+
};
|
|
477
|
+
declare function periodFromDate(granularity: PeriodGranularity, date?: Date): PeriodSelection;
|
|
198
478
|
declare function currentPeriod(): PeriodSelection;
|
|
479
|
+
declare function periodToWindow(selection: PeriodSelection): PeriodWindow;
|
|
199
480
|
declare function getPeriodBucketKeys(selection: PeriodSelection): string[];
|
|
200
481
|
declare function periodBucketKeyToDate(bucketKey: string, granularity: PeriodGranularity): Date;
|
|
482
|
+
declare function isPeriodSelectable(selection: PeriodSelection, minDate?: Date, maxDate?: Date): boolean;
|
|
201
483
|
|
|
202
484
|
type PeriodPickerProps = {
|
|
203
485
|
value: PeriodSelection;
|
|
204
486
|
onChange: (value: PeriodSelection) => void;
|
|
205
|
-
theme: ThemeName;
|
|
206
487
|
minDate?: Date;
|
|
207
488
|
maxDate?: Date;
|
|
489
|
+
/** Custom trigger for a calendar with a fixed granularity. */
|
|
490
|
+
trigger?: (open: boolean) => ReactNode;
|
|
491
|
+
/** Optional controls above the calendar grid. */
|
|
492
|
+
header?: ReactNode;
|
|
208
493
|
};
|
|
209
494
|
declare const PeriodPicker: FC<PeriodPickerProps>;
|
|
210
495
|
|
|
211
|
-
type ProseProps = {
|
|
212
|
-
children: string;
|
|
213
|
-
className?: string;
|
|
214
|
-
};
|
|
215
|
-
declare function Prose({ children, className }: ProseProps): react_jsx_runtime.JSX.Element;
|
|
216
|
-
|
|
217
496
|
type SectionProps = {
|
|
218
497
|
title: string;
|
|
219
|
-
theme: ThemeName;
|
|
220
498
|
id?: string;
|
|
221
499
|
framed?: boolean;
|
|
222
500
|
intro?: ReactNode;
|
|
@@ -229,17 +507,123 @@ type SectionProps = {
|
|
|
229
507
|
};
|
|
230
508
|
declare const Section: FC<SectionProps>;
|
|
231
509
|
|
|
510
|
+
declare function AppIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
511
|
+
declare function AccountIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
512
|
+
declare function ArrowRightIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
513
|
+
declare function BeakerIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
514
|
+
declare function BotIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
515
|
+
declare function BookIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
516
|
+
declare function BugIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
517
|
+
declare function CheckIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
518
|
+
declare function ClipboardIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
519
|
+
declare function ClockIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
520
|
+
declare function DiscordIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
521
|
+
declare function InstagramIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
522
|
+
declare function XSocialIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
523
|
+
declare function LinkedInIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
524
|
+
declare function DownloadIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
525
|
+
declare function ExpandIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
526
|
+
declare function PlayIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
527
|
+
declare function PauseIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
528
|
+
declare function CloudUploadIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
529
|
+
declare function ExternalLinkIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
530
|
+
declare function GenApiIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
531
|
+
declare function GitBranchIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
532
|
+
declare function GitPullRequestIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
533
|
+
declare function GraduationCapIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
534
|
+
declare function SparklesIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
535
|
+
declare function GitHubIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
536
|
+
declare function ImageIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
537
|
+
declare function CubeIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
538
|
+
declare function AudioIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
539
|
+
declare function LockIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
540
|
+
declare function LogInIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
541
|
+
declare function LogOutIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
542
|
+
declare function MailIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
543
|
+
declare function McpIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
544
|
+
declare function MenuIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
545
|
+
declare function NewspaperIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
546
|
+
declare function PlusIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
547
|
+
declare function TerminalIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
548
|
+
declare function ToolIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
549
|
+
declare function TargetIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
550
|
+
declare function TokensIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
551
|
+
declare function UsageIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
552
|
+
declare function WarningIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
553
|
+
declare function TrendUpIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
554
|
+
declare function EarningsIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
555
|
+
declare function WalletIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
556
|
+
/** A paper receipt: what a price includes. */
|
|
557
|
+
declare function ReceiptIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
558
|
+
declare function MoonIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
559
|
+
declare function SunIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
560
|
+
declare function XIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
561
|
+
declare function TrashIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
562
|
+
declare function ChatIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
563
|
+
declare function RobotIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
564
|
+
declare function EyeIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
565
|
+
declare function EyeOffIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
566
|
+
declare function VideoIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
567
|
+
declare function MicIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
568
|
+
declare function SpeakerIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
569
|
+
declare function MegaphoneIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
570
|
+
declare function ReasoningIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
571
|
+
declare function RocketIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
572
|
+
declare function SearchIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
573
|
+
declare function SignOutIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
574
|
+
declare function PowerIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
575
|
+
declare function SparkleIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
576
|
+
declare function StarIcon({ filled, ...props }: IconProps & {
|
|
577
|
+
filled?: boolean;
|
|
578
|
+
}): react_jsx_runtime.JSX.Element;
|
|
579
|
+
declare function CodeIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
580
|
+
declare function DatabaseIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
581
|
+
declare function CardIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
582
|
+
declare function SproutIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
583
|
+
declare function PencilIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
584
|
+
declare function KeyIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
585
|
+
declare function GlobeIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
586
|
+
declare function ArrowLeftIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
587
|
+
declare function RefreshIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
588
|
+
|
|
589
|
+
declare const networks: {
|
|
590
|
+
readonly discord: {
|
|
591
|
+
readonly Icon: typeof DiscordIcon;
|
|
592
|
+
readonly className: "polli:bg-social-discord polli:text-social-discord-text polli:hover:brightness-110";
|
|
593
|
+
};
|
|
594
|
+
readonly github: {
|
|
595
|
+
readonly Icon: typeof GitHubIcon;
|
|
596
|
+
readonly className: "polli:border polli:border-social-github-border polli:bg-social-github polli:text-social-github-text polli:hover:bg-social-github-hover";
|
|
597
|
+
};
|
|
598
|
+
};
|
|
599
|
+
type BaseSocialCountProps = {
|
|
600
|
+
network: keyof typeof networks;
|
|
601
|
+
/** Off when the network icon already sits next to the pill. */
|
|
602
|
+
showIcon?: boolean;
|
|
603
|
+
className?: string;
|
|
604
|
+
};
|
|
605
|
+
type SocialCountProps<T extends ElementType = "a"> = PropsWithChildren<BaseSocialCountProps> & {
|
|
606
|
+
as?: T;
|
|
607
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, keyof BaseSocialCountProps | "as">;
|
|
608
|
+
/**
|
|
609
|
+
* A live community count (Discord online, GitHub stars) in the network's own
|
|
610
|
+
* colours, at the colour-mode toggle's 28px height so the header has one
|
|
611
|
+
* small-pill size. A link by default; `as="span"` inside another link.
|
|
612
|
+
*/
|
|
613
|
+
declare function SocialCount<T extends ElementType = "a">({ as, network, showIcon, className, children, ...rest }: SocialCountProps<T>): react_jsx_runtime.JSX.Element;
|
|
614
|
+
|
|
232
615
|
/**
|
|
233
616
|
* - `stat` — large numeric value (default)
|
|
234
617
|
* - `fact` — small wrapping prose value (labeled fact tile)
|
|
618
|
+
* - `display` — a headline number in the heading face, value first with a
|
|
619
|
+
* quiet label under it (website stats such as live request counts)
|
|
235
620
|
*/
|
|
236
|
-
type StatCardVariant = "stat" | "fact";
|
|
621
|
+
type StatCardVariant = "stat" | "fact" | "display";
|
|
237
622
|
type StatCardProps = {
|
|
238
623
|
label: ReactNode;
|
|
239
624
|
value: ReactNode;
|
|
240
625
|
detail?: ReactNode;
|
|
241
626
|
variant?: StatCardVariant;
|
|
242
|
-
theme?: ThemeName;
|
|
243
627
|
className?: string;
|
|
244
628
|
labelClassName?: string;
|
|
245
629
|
valueClassName?: string;
|
|
@@ -247,6 +631,19 @@ type StatCardProps = {
|
|
|
247
631
|
};
|
|
248
632
|
declare const StatCard: FC<StatCardProps>;
|
|
249
633
|
|
|
634
|
+
type ToolCallStatus = "pending" | "running" | "approval-requested" | "approval-responded" | "complete" | "error" | "denied";
|
|
635
|
+
interface ToolCallDetailsProps {
|
|
636
|
+
name: string;
|
|
637
|
+
input?: unknown;
|
|
638
|
+
output?: unknown;
|
|
639
|
+
error?: unknown;
|
|
640
|
+
status?: ToolCallStatus;
|
|
641
|
+
defaultOpen?: boolean;
|
|
642
|
+
className?: string;
|
|
643
|
+
}
|
|
644
|
+
/** Framework-neutral disclosure for server- or client-executed tool calls. */
|
|
645
|
+
declare function ToolCallDetails({ name, input, output, error, status, defaultOpen, className, }: ToolCallDetailsProps): react_jsx_runtime.JSX.Element;
|
|
646
|
+
|
|
250
647
|
/** Class merge for apps consuming the unprefixed Tailwind bridge in app.css. */
|
|
251
648
|
declare function cn(...inputs: (string | undefined | null | false)[]): string;
|
|
252
649
|
|
|
@@ -256,30 +653,14 @@ declare function cn(...inputs: (string | undefined | null | false)[]): string;
|
|
|
256
653
|
*/
|
|
257
654
|
declare function useScrollLock(enabled?: boolean): void;
|
|
258
655
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
declare const sizes: {
|
|
262
|
-
readonly sm: "polli:px-2 polli:pt-0.5 polli:pb-1";
|
|
263
|
-
readonly md: "polli:px-4 polli:pt-1.5 polli:pb-2";
|
|
264
|
-
readonly lg: "polli:px-6 polli:py-3";
|
|
265
|
-
};
|
|
266
|
-
type BaseButtonProps = {
|
|
267
|
-
/** Override the cascade theme for this button's subtree. Ignored when `intent` is set. */
|
|
268
|
-
theme?: ThemeName;
|
|
269
|
-
/** Only `"danger"` for now. */
|
|
270
|
-
intent?: ButtonIntent;
|
|
271
|
-
size?: keyof typeof sizes;
|
|
656
|
+
type BrandMarkProps = {
|
|
657
|
+
variant?: "mark" | "lockup";
|
|
272
658
|
className?: string;
|
|
273
|
-
disabled?: boolean;
|
|
274
659
|
};
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
} & Omit<React.ComponentPropsWithoutRef<T>, keyof BaseButtonProps | "as">;
|
|
278
|
-
declare function Button<T extends React.ElementType = "button">({ as, children, theme, intent, size, className, disabled, ...buttonProps }: ButtonProps<T>): react_jsx_runtime.JSX.Element;
|
|
660
|
+
/** The lotus (or lotus + wordmark) painted in currentColor; size it with className. */
|
|
661
|
+
declare function BrandMark({ variant, className }: BrandMarkProps): react_jsx_runtime.JSX.Element;
|
|
279
662
|
|
|
280
|
-
type ButtonGroupProps = ComponentPropsWithoutRef<"div"
|
|
281
|
-
wrap?: boolean;
|
|
282
|
-
};
|
|
663
|
+
type ButtonGroupProps = ComponentPropsWithoutRef<"div">;
|
|
283
664
|
declare const ButtonGroup: FC<ButtonGroupProps>;
|
|
284
665
|
|
|
285
666
|
type ChevronIconProps = {
|
|
@@ -293,47 +674,55 @@ type ChevronIconProps = {
|
|
|
293
674
|
*/
|
|
294
675
|
declare const ChevronIcon: FC<ChevronIconProps>;
|
|
295
676
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
677
|
+
/**
|
|
678
|
+
* Light/dark colour mode. The chosen mode is reflected as `class="dark"` on
|
|
679
|
+
* <html>, which flips the design-system tokens (see styles/tokens.css: `.dark`
|
|
680
|
+
* + `.dark [data-theme]`). One shared module-level store backs every
|
|
681
|
+
* `useColorMode()` consumer, so duplicate toggles never desync and changes
|
|
682
|
+
* propagate across tabs.
|
|
683
|
+
*
|
|
684
|
+
* The chosen mode is persisted to localStorage (per-origin), which also powers
|
|
685
|
+
* the cross-tab `storage` sync below. Read priority: localStorage → system
|
|
686
|
+
* preference. Choosing the mode the system already uses clears the stored
|
|
687
|
+
* choice, so later visits follow the system again.
|
|
688
|
+
*
|
|
689
|
+
* Host apps should set the initial class pre-paint (a tiny inline script in the
|
|
690
|
+
* document head, reading the same key) to avoid a flash of light before React
|
|
691
|
+
* mounts; this store is the source of truth after hydration.
|
|
692
|
+
*
|
|
693
|
+
* Side-effect-free on import: the <html> sync and the cross-tab listener are
|
|
694
|
+
* attached lazily on first subscribe, so importing this module (e.g. via the
|
|
695
|
+
* package barrel) never mutates the DOM on its own.
|
|
696
|
+
*/
|
|
697
|
+
type ColorMode = "light" | "dark";
|
|
698
|
+
/**
|
|
699
|
+
* Set the color mode programmatically. Updates the shared store (so every
|
|
700
|
+
* `useColorMode()` consumer re-renders), flips the `.dark` class, and persists
|
|
701
|
+
* to localStorage, or clears it when the mode matches the system.
|
|
702
|
+
*/
|
|
703
|
+
declare function setColorMode(mode: ColorMode): void;
|
|
704
|
+
declare function useColorMode(): {
|
|
705
|
+
mode: ColorMode;
|
|
706
|
+
isDark: boolean;
|
|
707
|
+
toggle: () => void;
|
|
300
708
|
};
|
|
301
|
-
|
|
709
|
+
/**
|
|
710
|
+
* Sliding sun/moon switch: `Switch` as a two-way choice, so the track stays
|
|
711
|
+
* neutral and the thumb carries the active mode's icon. Self-contained —
|
|
712
|
+
* wires itself to `useColorMode`.
|
|
713
|
+
*/
|
|
714
|
+
declare const ColorModeToggle: FC;
|
|
715
|
+
|
|
716
|
+
type DrawerProps = {
|
|
302
717
|
open: boolean;
|
|
303
|
-
onOpenChange
|
|
304
|
-
|
|
305
|
-
triggerAsChild?: boolean;
|
|
306
|
-
triggerClassName?: string;
|
|
307
|
-
title?: ReactNode;
|
|
308
|
-
titleClassName?: string;
|
|
309
|
-
ariaLabel?: string;
|
|
310
|
-
labelledBy?: string;
|
|
311
|
-
theme?: ThemeName;
|
|
312
|
-
size?: keyof typeof sizeClasses;
|
|
313
|
-
showBackdrop?: boolean;
|
|
314
|
-
backdropClassName?: string;
|
|
315
|
-
positionerClassName?: string;
|
|
316
|
-
contentClassName?: string;
|
|
718
|
+
onOpenChange: (open: boolean) => void;
|
|
719
|
+
ariaLabel: string;
|
|
317
720
|
children: ReactNode;
|
|
721
|
+
side?: "left" | "right";
|
|
722
|
+
contentClassName?: string;
|
|
318
723
|
};
|
|
319
|
-
|
|
320
|
-
declare const
|
|
321
|
-
|
|
322
|
-
type DropdownProps = {
|
|
323
|
-
theme: ThemeName;
|
|
324
|
-
/** Trigger element; receives the current open state (e.g. to rotate a chevron). */
|
|
325
|
-
trigger: (open: boolean) => ReactNode;
|
|
326
|
-
/** Panel content. As a function, receives `close` to dismiss after a selection. */
|
|
327
|
-
children: ReactNode | ((close: () => void) => ReactNode);
|
|
328
|
-
/** Panel placement relative to the trigger. */
|
|
329
|
-
align?: "start" | "end";
|
|
330
|
-
/** Controlled open state. Omit to let the Dropdown manage its own. */
|
|
331
|
-
open?: boolean;
|
|
332
|
-
onOpenChange?: (open: boolean) => void;
|
|
333
|
-
/** Appended after the surface (widths, padding, max-height…). */
|
|
334
|
-
className?: string;
|
|
335
|
-
};
|
|
336
|
-
declare const Dropdown: FC<DropdownProps>;
|
|
724
|
+
/** Accessible side drawer for mobile navigation and compact tools. */
|
|
725
|
+
declare const Drawer: FC<DrawerProps>;
|
|
337
726
|
|
|
338
727
|
type BaseDropdownItemProps = {
|
|
339
728
|
className?: string;
|
|
@@ -343,82 +732,118 @@ type DropdownItemProps<T extends React.ElementType = "button"> = PropsWithChildr
|
|
|
343
732
|
} & Omit<React.ComponentPropsWithoutRef<T>, keyof BaseDropdownItemProps | "as">;
|
|
344
733
|
declare function DropdownItem<T extends React.ElementType = "button">({ as, className, children, ...rest }: DropdownItemProps<T>): react_jsx_runtime.JSX.Element;
|
|
345
734
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
735
|
+
declare const sizeClasses: {
|
|
736
|
+
readonly page: "polli:text-sm polli:tracking-widest polli:text-theme-text-soft";
|
|
737
|
+
readonly card: "polli:text-xs polli:tracking-wider polli:text-theme-text-soft";
|
|
738
|
+
readonly chrome: "polli:text-micro polli:tracking-widest polli:text-theme-text-muted";
|
|
739
|
+
};
|
|
740
|
+
type EyebrowOwnProps<T extends ElementType> = {
|
|
741
|
+
as?: T;
|
|
742
|
+
size?: keyof typeof sizeClasses;
|
|
743
|
+
className?: string;
|
|
744
|
+
children: ReactNode;
|
|
745
|
+
};
|
|
746
|
+
type EyebrowProps<T extends ElementType = "span"> = EyebrowOwnProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof EyebrowOwnProps<T>>;
|
|
747
|
+
/** Uppercase pixel label for page, card, and chrome metadata. */
|
|
748
|
+
declare function Eyebrow<T extends ElementType = "span">({ as, size, className, children, ...rest }: EyebrowProps<T>): react_jsx_runtime.JSX.Element;
|
|
749
|
+
|
|
750
|
+
/** `danger` (delete, red) and `info` (edit/links, blue). */
|
|
751
|
+
type IconButtonIntent = "danger" | "info";
|
|
752
|
+
type IconButtonVariant = "tile" | "ghost";
|
|
753
|
+
type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "className" | "title"> & {
|
|
349
754
|
intent?: IconButtonIntent;
|
|
755
|
+
variant?: IconButtonVariant;
|
|
756
|
+
pressed?: boolean;
|
|
350
757
|
title?: string;
|
|
351
|
-
|
|
758
|
+
tooltip?: ReactNode;
|
|
759
|
+
tooltipAlign?: "start" | "center";
|
|
760
|
+
tooltipClampToViewport?: boolean;
|
|
761
|
+
children: ReactNode;
|
|
762
|
+
className?: string;
|
|
763
|
+
size?: "sm" | "md";
|
|
764
|
+
/** Renders a link with the same look, e.g. a social icon. */
|
|
765
|
+
href?: string;
|
|
766
|
+
target?: string;
|
|
767
|
+
rel?: string;
|
|
768
|
+
};
|
|
769
|
+
declare const IconButton: react.ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "className" | "children" | "title"> & {
|
|
770
|
+
intent?: IconButtonIntent;
|
|
771
|
+
variant?: IconButtonVariant;
|
|
772
|
+
pressed?: boolean;
|
|
773
|
+
title?: string;
|
|
774
|
+
tooltip?: ReactNode;
|
|
775
|
+
tooltipAlign?: "start" | "center";
|
|
776
|
+
tooltipClampToViewport?: boolean;
|
|
352
777
|
children: ReactNode;
|
|
353
778
|
className?: string;
|
|
779
|
+
size?: "sm" | "md";
|
|
780
|
+
/** Renders a link with the same look, e.g. a social icon. */
|
|
781
|
+
href?: string;
|
|
782
|
+
target?: string;
|
|
783
|
+
rel?: string;
|
|
784
|
+
} & react.RefAttributes<HTMLButtonElement>>;
|
|
785
|
+
|
|
786
|
+
declare const toneClasses: {
|
|
787
|
+
readonly neutral: "polli:bg-theme-bg-subtle polli:text-theme-text-strong";
|
|
788
|
+
readonly paid: "polli-wallet-chip-paid";
|
|
789
|
+
readonly tier: "polli-wallet-chip-tier";
|
|
790
|
+
};
|
|
791
|
+
type IconTileProps = {
|
|
792
|
+
icon: ComponentType<IconProps>;
|
|
793
|
+
tone?: keyof typeof toneClasses;
|
|
354
794
|
};
|
|
355
|
-
|
|
795
|
+
/** A 44px rounded square holding one icon, leading a feature or info row. */
|
|
796
|
+
declare function IconTile({ icon: Icon, tone }: IconTileProps): react_jsx_runtime.JSX.Element;
|
|
356
797
|
|
|
357
798
|
type BaseInlineLinkProps = {
|
|
358
|
-
/** Override the cascade theme for this link's subtree. */
|
|
359
|
-
theme?: ThemeName;
|
|
360
799
|
/** Set explicitly for non-http external links, or false for custom routing components. */
|
|
361
800
|
external?: boolean;
|
|
362
801
|
showIcon?: boolean;
|
|
802
|
+
/** Inline text inherits its size; footers use 13px and standalone links 14px. */
|
|
803
|
+
size?: "inherit" | "footer" | "sm";
|
|
804
|
+
/** Accent for prominent links; quiet for secondary navigation. */
|
|
805
|
+
tone?: "accent" | "quiet";
|
|
363
806
|
className?: string;
|
|
364
807
|
};
|
|
365
808
|
type InlineLinkProps<T extends React.ElementType = "a"> = PropsWithChildren<BaseInlineLinkProps> & {
|
|
366
809
|
as?: T;
|
|
367
810
|
} & Omit<React.ComponentPropsWithoutRef<T>, keyof BaseInlineLinkProps | "as">;
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
};
|
|
374
|
-
declare const Input: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
375
|
-
error?: boolean;
|
|
376
|
-
hideNumberSteppers?: boolean;
|
|
377
|
-
} & react.RefAttributes<HTMLInputElement>>;
|
|
811
|
+
/** Shared text-link rule: surrounding font, selectable ink, persistent underline,
|
|
812
|
+
* visible keyboard focus, and an external arrow only when leaving the app.
|
|
813
|
+
* Navigation and button-shaped actions use their own primitives.
|
|
814
|
+
*/
|
|
815
|
+
declare function InlineLink<T extends React.ElementType = "a">({ as, external, showIcon, size, tone, className, children, ...linkProps }: InlineLinkProps<T>): react_jsx_runtime.JSX.Element;
|
|
378
816
|
|
|
379
|
-
/**
|
|
380
|
-
|
|
817
|
+
/**
|
|
818
|
+
* A small green "live" marker for numbers that update in real time. A slow
|
|
819
|
+
* 2.4s ping says "now" without pulling the eye; under reduced motion only
|
|
820
|
+
* the still dot remains. Decorative: the number's own text carries meaning.
|
|
821
|
+
*/
|
|
822
|
+
declare function LiveDot({ className }: {
|
|
823
|
+
className?: string;
|
|
824
|
+
}): react_jsx_runtime.JSX.Element;
|
|
381
825
|
|
|
382
|
-
|
|
383
|
-
declare function
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
declare function ClipboardIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
387
|
-
declare function ClockIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
388
|
-
declare function DiscordIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
389
|
-
declare function DownloadIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
390
|
-
declare function ExternalLinkIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
391
|
-
declare function GenApiIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
392
|
-
declare function GitHubIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
393
|
-
declare function ImageIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
394
|
-
declare function AudioIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
395
|
-
declare function LockIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
396
|
-
declare function MailIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
397
|
-
declare function McpIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
398
|
-
declare function MenuIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
399
|
-
declare function PlusIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
400
|
-
declare function TerminalIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
401
|
-
declare function TokensIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
402
|
-
declare function TrendUpIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
403
|
-
declare function WalletIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
404
|
-
declare function XIcon(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
826
|
+
/** Compact status for both initial loading and background updates. */
|
|
827
|
+
declare function LoadingStatus({ children }: {
|
|
828
|
+
children: ReactNode;
|
|
829
|
+
}): react_jsx_runtime.JSX.Element;
|
|
405
830
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
831
|
+
declare const shapeClasses: {
|
|
832
|
+
readonly card: "polli:rounded-card";
|
|
833
|
+
readonly text: "polli:rounded-md";
|
|
834
|
+
readonly media: "";
|
|
835
|
+
};
|
|
836
|
+
type SkeletonProps = {
|
|
837
|
+
shape?: keyof typeof shapeClasses;
|
|
838
|
+
/** Size only (height, width, aspect ratio); the shape sets the corners. */
|
|
412
839
|
className?: string;
|
|
413
840
|
};
|
|
414
|
-
type ScrollAreaProps = PropsWithChildren<ScrollAreaOwnProps & Omit<ComponentPropsWithoutRef<"div">, keyof ScrollAreaOwnProps>>;
|
|
415
841
|
/**
|
|
416
|
-
*
|
|
417
|
-
*
|
|
842
|
+
* A quiet pulsing block that holds the place of content still loading, at
|
|
843
|
+
* the size of what replaces it. Decorative: mark the loading region with
|
|
844
|
+
* aria-busy. Still under reduced motion.
|
|
418
845
|
*/
|
|
419
|
-
declare
|
|
420
|
-
children?: react.ReactNode | undefined;
|
|
421
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
846
|
+
declare function Skeleton({ shape, className }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
422
847
|
|
|
423
848
|
type SliderProps = Omit<React.ComponentPropsWithoutRef<"input">, "type"> & {
|
|
424
849
|
/** Fill percentage from 0-100. Falls back to value/min/max when omitted. */
|
|
@@ -429,65 +854,115 @@ declare const Slider: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHT
|
|
|
429
854
|
progress?: number;
|
|
430
855
|
} & react.RefAttributes<HTMLInputElement>>;
|
|
431
856
|
|
|
857
|
+
type StableLabelProps = {
|
|
858
|
+
text: string;
|
|
859
|
+
/** Every text this label can show; the widest sets its size. */
|
|
860
|
+
options: readonly string[];
|
|
861
|
+
/** `end` aligns to the end from sm up and to the start on phones. */
|
|
862
|
+
align?: "center" | "end";
|
|
863
|
+
/** Drawn before the text in every option, so it stays beside it. */
|
|
864
|
+
prefix?: ReactNode;
|
|
865
|
+
};
|
|
866
|
+
/**
|
|
867
|
+
* Text that changes without moving anything: every option is stacked in one
|
|
868
|
+
* grid cell, the unused ones invisible, so the widest sets the size.
|
|
869
|
+
*/
|
|
870
|
+
declare function StableLabel({ text, options, align, prefix, }: StableLabelProps): react_jsx_runtime.JSX.Element;
|
|
871
|
+
|
|
432
872
|
type SurfaceVariant = "panel" | "card" | "card-themed";
|
|
433
873
|
type SurfaceOwnProps = {
|
|
434
|
-
/** Override the cascade theme for this surface's subtree. */
|
|
435
|
-
theme?: ThemeName;
|
|
436
874
|
/**
|
|
437
|
-
*
|
|
438
|
-
* - `panel` —
|
|
439
|
-
* - `card` —
|
|
440
|
-
* - `card-themed` —
|
|
875
|
+
* Depth role — flat: each level is one tint step, never a shadow or border.
|
|
876
|
+
* - `panel` — Level 1 block: sections and page groups
|
|
877
|
+
* - `card` — Level 2 card inside a block (default)
|
|
878
|
+
* - `card-themed` — Level 2 card carrying the accent tint
|
|
441
879
|
*/
|
|
442
880
|
variant?: SurfaceVariant;
|
|
443
881
|
className?: string;
|
|
444
882
|
};
|
|
445
|
-
|
|
446
|
-
|
|
883
|
+
/**
|
|
884
|
+
* Polymorphic like Button, TabButton and LinkCard, so a card that is itself a
|
|
885
|
+
* link renders one element instead of an anchor wrapping a div. Defaults to
|
|
886
|
+
* <div>, so existing call sites are unchanged.
|
|
887
|
+
*/
|
|
888
|
+
type SurfaceProps<T extends ElementType = "div"> = SurfaceOwnProps & {
|
|
889
|
+
as?: T;
|
|
890
|
+
} & Omit<ComponentPropsWithoutRef<T>, keyof SurfaceOwnProps | "as" | "color">;
|
|
891
|
+
declare function Surface<T extends ElementType = "div">({ as, variant, className, children, ...rest }: SurfaceProps<T>): react_jsx_runtime.JSX.Element;
|
|
447
892
|
|
|
448
893
|
type SwitchStatus = "off" | "on" | "invalid";
|
|
894
|
+
type SwitchSize = "sm" | "md" | "lg";
|
|
449
895
|
type SwitchProps = {
|
|
450
896
|
checked: boolean;
|
|
451
897
|
onChange: (next: boolean) => void;
|
|
452
|
-
/**
|
|
898
|
+
/** Track colour. Defaults to `checked ? "on" : "off"`. */
|
|
453
899
|
status?: SwitchStatus;
|
|
454
900
|
/** Accessible label (aria-label). Not rendered visibly. */
|
|
455
901
|
ariaLabel?: string;
|
|
456
902
|
disabled?: boolean;
|
|
903
|
+
/** Same heights as `Button` sm / md / lg, so a switch lines up with one. */
|
|
904
|
+
size?: SwitchSize;
|
|
905
|
+
/**
|
|
906
|
+
* A two-way choice (light/dark) rather than on/off: the thumb carries the
|
|
907
|
+
* current side's icon, the other sits faint on the empty side, and the
|
|
908
|
+
* track looks the same in both positions.
|
|
909
|
+
*/
|
|
910
|
+
icons?: {
|
|
911
|
+
off: ReactNode;
|
|
912
|
+
on: ReactNode;
|
|
913
|
+
};
|
|
457
914
|
className?: string;
|
|
458
915
|
};
|
|
459
916
|
/**
|
|
460
|
-
* Binary toggle
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
* `checked` drives thumb position; `status` drives track colour. So
|
|
465
|
-
* `checked={true} status="invalid"` renders thumb-right with a red track.
|
|
917
|
+
* Binary toggle, in `Button`'s sizes: grey off, green on. `checked` moves the thumb;
|
|
918
|
+
* `status` colours it, so `checked status="invalid"` is thumb-right in red.
|
|
919
|
+
* With `icons` it is a two-way choice with a solid thumb on both sides.
|
|
466
920
|
*/
|
|
467
921
|
declare const Switch: FC<SwitchProps>;
|
|
468
922
|
|
|
469
|
-
type
|
|
470
|
-
|
|
471
|
-
|
|
923
|
+
type TabButtonOwnProps = {
|
|
924
|
+
/** `mixed`: a group toggle where only some of its items are selected. */
|
|
925
|
+
active: boolean | "mixed";
|
|
926
|
+
/** Omit when rendering as a link (`as`) and navigation carries the change. */
|
|
927
|
+
onClick?: () => void;
|
|
472
928
|
children: ReactNode;
|
|
473
|
-
/**
|
|
474
|
-
|
|
475
|
-
size?: "md" | "sm";
|
|
476
|
-
variant?: "
|
|
929
|
+
/** Leading icon, sized to the label like Button's. */
|
|
930
|
+
icon?: ReactNode;
|
|
931
|
+
size?: "lg" | "md" | "sm" | "xs";
|
|
932
|
+
variant?: "soft" | "ghost";
|
|
933
|
+
/**
|
|
934
|
+
* `amber` and `green` fill the selected pill with the wallet's pale paid
|
|
935
|
+
* and Quest Pollen chip colours, which read at the same strength together.
|
|
936
|
+
* `brand` is site navigation: bold labels, the brand accent for the
|
|
937
|
+
* current page and a lighter preview of it on hover.
|
|
938
|
+
*/
|
|
939
|
+
intent?: "neutral" | "amber" | "green" | "brand";
|
|
940
|
+
/** Muted secondary text after the label, e.g. a model's creator. */
|
|
941
|
+
detail?: ReactNode;
|
|
477
942
|
ariaLabel?: string;
|
|
478
943
|
disabled?: boolean;
|
|
479
944
|
className?: string;
|
|
480
945
|
};
|
|
481
|
-
|
|
946
|
+
/**
|
|
947
|
+
* Polymorphic like Button, so a tab that navigates can render a real anchor
|
|
948
|
+
* instead of a click handler — middle-click, right-click and crawlers all
|
|
949
|
+
* depend on that. Defaults to <button>, so existing call sites are unchanged.
|
|
950
|
+
*/
|
|
951
|
+
type TabButtonProps<T extends ElementType = "button"> = TabButtonOwnProps & {
|
|
952
|
+
as?: T;
|
|
953
|
+
} & Omit<ComponentPropsWithoutRef<T>, keyof TabButtonOwnProps | "as">;
|
|
954
|
+
declare function TabButton<T extends ElementType = "button">({ as, active, onClick, children, icon, size, variant, intent, detail, ariaLabel, disabled, className, ...rest }: TabButtonProps<T>): react_jsx_runtime.JSX.Element;
|
|
482
955
|
|
|
483
956
|
type Align = "left" | "center" | "right";
|
|
484
|
-
type RowIntent = "default" | "
|
|
957
|
+
type RowIntent = "default" | "warning" | "danger";
|
|
485
958
|
type SortDirection = "asc" | "desc";
|
|
486
959
|
type TableProps = ComponentPropsWithoutRef<"table">;
|
|
487
960
|
declare const Table: FC<TableProps>;
|
|
488
961
|
type TableHeadProps = ComponentPropsWithoutRef<"thead">;
|
|
489
962
|
declare const TableHead: FC<TableHeadProps>;
|
|
490
|
-
type TableBodyProps = ComponentPropsWithoutRef<"tbody"
|
|
963
|
+
type TableBodyProps = ComponentPropsWithoutRef<"tbody"> & {
|
|
964
|
+
divider?: "themed" | "neutral";
|
|
965
|
+
};
|
|
491
966
|
declare const TableBody: FC<TableBodyProps>;
|
|
492
967
|
type TableRowProps = ComponentPropsWithoutRef<"tr"> & {
|
|
493
968
|
intent?: RowIntent;
|
|
@@ -508,6 +983,16 @@ type TableCellProps = ComponentPropsWithoutRef<"td"> & {
|
|
|
508
983
|
};
|
|
509
984
|
declare const TableCell: FC<TableCellProps>;
|
|
510
985
|
|
|
986
|
+
type TableDisclosureButtonProps = {
|
|
987
|
+
children: ReactNode;
|
|
988
|
+
disabled?: boolean;
|
|
989
|
+
expanded: boolean;
|
|
990
|
+
onClick: () => void;
|
|
991
|
+
className?: string;
|
|
992
|
+
};
|
|
993
|
+
/** Compact disclosure trigger for expandable table rows. */
|
|
994
|
+
declare const TableDisclosureButton: FC<TableDisclosureButtonProps>;
|
|
995
|
+
|
|
511
996
|
type TextareaProps = React.ComponentPropsWithoutRef<"textarea"> & {
|
|
512
997
|
error?: boolean;
|
|
513
998
|
};
|
|
@@ -518,10 +1003,15 @@ declare const Textarea: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLP
|
|
|
518
1003
|
type TooltipProps = {
|
|
519
1004
|
children: ReactNode;
|
|
520
1005
|
content: ReactNode;
|
|
1006
|
+
align?: "start" | "center";
|
|
521
1007
|
ariaLabel?: string;
|
|
1008
|
+
clampToViewport?: boolean;
|
|
522
1009
|
className?: string;
|
|
1010
|
+
maxWidth?: number;
|
|
523
1011
|
onClick?: () => void;
|
|
1012
|
+
stopClickPropagation?: boolean;
|
|
524
1013
|
style?: CSSProperties;
|
|
1014
|
+
tapEnabled?: boolean;
|
|
525
1015
|
triggerAs?: "button" | "span";
|
|
526
1016
|
/**
|
|
527
1017
|
* When true, the inner cursor wrapper uses display:contents so the
|
|
@@ -536,13 +1026,6 @@ type HeadingSize = "display" | "title" | "section" | "subsection" | "card";
|
|
|
536
1026
|
type TextSize = "body" | "sm" | "xs" | "micro";
|
|
537
1027
|
type TextTone = "base" | "strong" | "soft" | "muted";
|
|
538
1028
|
type TextWeight = "normal" | "medium" | "semibold" | "bold";
|
|
539
|
-
declare function headingClassName(size: HeadingSize, className?: string): string;
|
|
540
|
-
declare function textClassName({ size, tone, weight, className, }: {
|
|
541
|
-
size: TextSize;
|
|
542
|
-
tone: TextTone;
|
|
543
|
-
weight: TextWeight;
|
|
544
|
-
className?: string;
|
|
545
|
-
}): string;
|
|
546
1029
|
type HeadingOwnProps<T extends ElementType> = PropsWithChildren<{
|
|
547
1030
|
as?: T;
|
|
548
1031
|
size?: HeadingSize;
|
|
@@ -560,4 +1043,4 @@ type TextOwnProps<T extends ElementType> = PropsWithChildren<{
|
|
|
560
1043
|
type TextProps<T extends ElementType = "p"> = TextOwnProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof TextOwnProps<T>>;
|
|
561
1044
|
declare function Text<T extends ElementType = "p">({ as, size, tone, weight, className, children, ...rest }: TextProps<T>): react_jsx_runtime.JSX.Element;
|
|
562
1045
|
|
|
563
|
-
export { Alert, type AlertProps, AppHeader, type AppHeaderProps, AppIcon, AudioIcon, BeakerIcon, BookIcon,
|
|
1046
|
+
export { AccountIcon, AccountIdentity, AccountIdentityLink, type AccountIdentityLinkProps, type AccountIdentityProps, AccountMenu, type AccountMenuProps, Alert, type AlertProps, AppBrand, type AppBrandProps, AppHeader, type AppHeaderProps, AppIcon, ArrowLeftIcon, ArrowRightIcon, AudioIcon, BeakerIcon, BookIcon, BotIcon, BrandMark, type BrandMarkProps, BugIcon, ButtonAppearance, ButtonGroup, type ButtonGroupProps, ButtonProps, Callout, type CalloutProps, CardIcon, ChatConversation, ChatConversationContent, type ChatConversationContentProps, type ChatConversationProps, ChatIcon, ChatMessage, ChatMessageActions, type ChatMessageActionsProps, ChatMessageContent, type ChatMessageContentProps, ChatMessageHeader, type ChatMessageHeaderProps, type ChatMessageProps, type ChatMessageRole, ChatPromptInput, ChatPromptInputFooter, type ChatPromptInputFooterProps, type ChatPromptInputProps, ChatPromptTextarea, CheckIcon, ChevronIcon, ClipboardIcon, ClockIcon, CloudUploadIcon, CodeBlock, type CodeBlockProps, CodeIcon, Collapsible, type CollapsibleProps, ColorModeToggle, ConfirmationDialog, type ConfirmationDialogProps, ContentHeader, type ContentHeaderProps, CopyButton, type CopyButtonProps, CopyField, type CopyFieldProps, CubeIcon, DatabaseIcon, DialogProps, DiscordIcon, DownloadIcon, Drawer, type DrawerProps, Dropdown, DropdownItem, type DropdownItemProps, type DropdownProps, EarningsIcon, EditableCombobox, type EditableComboboxProps, EditableComboboxToken, type EditableComboboxTokenProps, EmptyState, type EmptyStateProps, ExpandIcon, ExternalLinkButton, type ExternalLinkButtonProps, ExternalLinkIcon, EyeIcon, EyeOffIcon, Eyebrow, type EyebrowProps, FieldStack, type FieldStackProps, FileUpload, type FileUploadProps, GenApiIcon, GitBranchIcon, GitHubIcon, GitPullRequestIcon, GlobeIcon, GraduationCapIcon, Heading, type HeadingProps, IconButton, type IconButtonIntent, type IconButtonProps, type IconButtonVariant, IconProps, IconTile, type IconTileProps, ImageIcon, InfoTip, InlineLink, type InlineLinkProps, Input, type InputProps, InstagramIcon, KeyChip, type KeyChipProps, KeyIcon, LinkCard, type LinkCardProps, LinkedInIcon, LiveDot, LoadingStatus, LockIcon, LogInIcon, LogOutIcon, MailIcon, McpIcon, MediaPlaceholder, type MediaPlaceholderProps, MegaphoneIcon, MenuIcon, MicIcon, MoonIcon, MultiSelect, type MultiSelectProps, NavItem, type NavItemProps, NewspaperIcon, PauseIcon, PencilIcon, type PeriodGranularity, PeriodPicker, type PeriodPickerProps, type PeriodSelection, PlayIcon, PlusIcon, PowerIcon, ReasoningIcon, ReceiptIcon, RefreshIcon, RobotIcon, RocketIcon, ScrollAreaProps, SearchIcon, Section, type SectionProps, SignOutIcon, Skeleton, type SkeletonProps, Slider, type SliderProps, SocialCount, type SocialCountProps, SparkleIcon, SparklesIcon, SpeakerIcon, SproutIcon, StableLabel, type StableLabelProps, StarIcon, StatCard, type StatCardProps, SunIcon, Surface, type SurfaceProps, Switch, type SwitchProps, type SwitchSize, type SwitchStatus, TabButton, type TabButtonProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableDisclosureButton, type TableDisclosureButtonProps, TableHead, type TableHeadProps, TableHeaderCell, type TableHeaderCellProps, type TableProps, TableRow, type TableRowProps, TargetIcon, TerminalIcon, Text, type TextProps, Textarea, type TextareaProps, TokensIcon, ToolCallDetails, type ToolCallDetailsProps, type ToolCallStatus, ToolIcon, Tooltip, TrashIcon, TrendUpIcon, UsageIcon, VideoIcon, WalletIcon, WarningIcon, XIcon, XSocialIcon, cn, currentPeriod, getPeriodBucketKeys, isPeriodSelectable, periodBucketKeyToDate, periodFromDate, periodToWindow, setColorMode, useColorMode, useScrollLock };
|