@runtypelabs/persona 3.2.2 → 3.4.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/dist/index.cjs +281 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +53 -1
- package/dist/index.d.ts +53 -1
- package/dist/index.global.js +321 -80
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +277 -36
- package/dist/index.js.map +1 -1
- package/dist/theme-reference.cjs +1 -0
- package/dist/theme-reference.d.cts +899 -0
- package/dist/theme-reference.d.ts +899 -0
- package/dist/theme-reference.js +1 -0
- package/dist/widget.css +62 -0
- package/package.json +8 -2
- package/src/components/composer-builder.ts +20 -4
- package/src/components/demo-carousel.ts +699 -0
- package/src/components/header-builder.ts +1 -1
- package/src/index.ts +8 -0
- package/src/styles/widget.css +62 -0
- package/src/theme-reference.ts +371 -0
- package/src/types.ts +4 -0
- package/src/ui.ts +31 -14
|
@@ -0,0 +1,899 @@
|
|
|
1
|
+
type TokenType = 'color' | 'spacing' | 'typography' | 'shadow' | 'border' | 'radius';
|
|
2
|
+
type TokenReference<_T extends TokenType = TokenType> = string;
|
|
3
|
+
interface ColorShade {
|
|
4
|
+
50?: string;
|
|
5
|
+
100?: string;
|
|
6
|
+
200?: string;
|
|
7
|
+
300?: string;
|
|
8
|
+
400?: string;
|
|
9
|
+
500?: string;
|
|
10
|
+
600?: string;
|
|
11
|
+
700?: string;
|
|
12
|
+
800?: string;
|
|
13
|
+
900?: string;
|
|
14
|
+
950?: string;
|
|
15
|
+
[key: string]: string | undefined;
|
|
16
|
+
}
|
|
17
|
+
interface ColorPalette {
|
|
18
|
+
gray: ColorShade;
|
|
19
|
+
primary: ColorShade;
|
|
20
|
+
secondary: ColorShade;
|
|
21
|
+
accent: ColorShade;
|
|
22
|
+
success: ColorShade;
|
|
23
|
+
warning: ColorShade;
|
|
24
|
+
error: ColorShade;
|
|
25
|
+
[key: string]: ColorShade;
|
|
26
|
+
}
|
|
27
|
+
interface SpacingScale {
|
|
28
|
+
0: string;
|
|
29
|
+
1: string;
|
|
30
|
+
2: string;
|
|
31
|
+
3: string;
|
|
32
|
+
4: string;
|
|
33
|
+
5: string;
|
|
34
|
+
6: string;
|
|
35
|
+
8: string;
|
|
36
|
+
10: string;
|
|
37
|
+
12: string;
|
|
38
|
+
16: string;
|
|
39
|
+
20: string;
|
|
40
|
+
24: string;
|
|
41
|
+
32: string;
|
|
42
|
+
40: string;
|
|
43
|
+
48: string;
|
|
44
|
+
56: string;
|
|
45
|
+
64: string;
|
|
46
|
+
[key: string]: string;
|
|
47
|
+
}
|
|
48
|
+
interface ShadowScale {
|
|
49
|
+
none: string;
|
|
50
|
+
sm: string;
|
|
51
|
+
md: string;
|
|
52
|
+
lg: string;
|
|
53
|
+
xl: string;
|
|
54
|
+
'2xl': string;
|
|
55
|
+
[key: string]: string;
|
|
56
|
+
}
|
|
57
|
+
interface BorderScale {
|
|
58
|
+
none: string;
|
|
59
|
+
sm: string;
|
|
60
|
+
md: string;
|
|
61
|
+
lg: string;
|
|
62
|
+
[key: string]: string;
|
|
63
|
+
}
|
|
64
|
+
interface RadiusScale {
|
|
65
|
+
none: string;
|
|
66
|
+
sm: string;
|
|
67
|
+
md: string;
|
|
68
|
+
lg: string;
|
|
69
|
+
xl: string;
|
|
70
|
+
full: string;
|
|
71
|
+
[key: string]: string;
|
|
72
|
+
}
|
|
73
|
+
interface TypographyScale {
|
|
74
|
+
fontFamily: {
|
|
75
|
+
sans: string;
|
|
76
|
+
serif: string;
|
|
77
|
+
mono: string;
|
|
78
|
+
};
|
|
79
|
+
fontSize: {
|
|
80
|
+
xs: string;
|
|
81
|
+
sm: string;
|
|
82
|
+
base: string;
|
|
83
|
+
lg: string;
|
|
84
|
+
xl: string;
|
|
85
|
+
'2xl': string;
|
|
86
|
+
'3xl': string;
|
|
87
|
+
'4xl': string;
|
|
88
|
+
};
|
|
89
|
+
fontWeight: {
|
|
90
|
+
normal: string;
|
|
91
|
+
medium: string;
|
|
92
|
+
semibold: string;
|
|
93
|
+
bold: string;
|
|
94
|
+
};
|
|
95
|
+
lineHeight: {
|
|
96
|
+
tight: string;
|
|
97
|
+
normal: string;
|
|
98
|
+
relaxed: string;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
interface SemanticColors {
|
|
102
|
+
primary: TokenReference<'color'>;
|
|
103
|
+
secondary: TokenReference<'color'>;
|
|
104
|
+
accent: TokenReference<'color'>;
|
|
105
|
+
surface: TokenReference<'color'>;
|
|
106
|
+
background: TokenReference<'color'>;
|
|
107
|
+
container: TokenReference<'color'>;
|
|
108
|
+
text: TokenReference<'color'>;
|
|
109
|
+
textMuted: TokenReference<'color'>;
|
|
110
|
+
textInverse: TokenReference<'color'>;
|
|
111
|
+
border: TokenReference<'color'>;
|
|
112
|
+
divider: TokenReference<'color'>;
|
|
113
|
+
interactive: {
|
|
114
|
+
default: TokenReference<'color'>;
|
|
115
|
+
hover: TokenReference<'color'>;
|
|
116
|
+
focus: TokenReference<'color'>;
|
|
117
|
+
active: TokenReference<'color'>;
|
|
118
|
+
disabled: TokenReference<'color'>;
|
|
119
|
+
};
|
|
120
|
+
feedback: {
|
|
121
|
+
success: TokenReference<'color'>;
|
|
122
|
+
warning: TokenReference<'color'>;
|
|
123
|
+
error: TokenReference<'color'>;
|
|
124
|
+
info: TokenReference<'color'>;
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
interface SemanticSpacing {
|
|
128
|
+
xs: TokenReference<'spacing'>;
|
|
129
|
+
sm: TokenReference<'spacing'>;
|
|
130
|
+
md: TokenReference<'spacing'>;
|
|
131
|
+
lg: TokenReference<'spacing'>;
|
|
132
|
+
xl: TokenReference<'spacing'>;
|
|
133
|
+
'2xl': TokenReference<'spacing'>;
|
|
134
|
+
}
|
|
135
|
+
interface SemanticTypography {
|
|
136
|
+
fontFamily: TokenReference<'typography'>;
|
|
137
|
+
fontSize: TokenReference<'typography'>;
|
|
138
|
+
fontWeight: TokenReference<'typography'>;
|
|
139
|
+
lineHeight: TokenReference<'typography'>;
|
|
140
|
+
}
|
|
141
|
+
interface SemanticTokens {
|
|
142
|
+
colors: SemanticColors;
|
|
143
|
+
spacing: SemanticSpacing;
|
|
144
|
+
typography: SemanticTypography;
|
|
145
|
+
}
|
|
146
|
+
interface ComponentTokenSet {
|
|
147
|
+
background?: TokenReference<'color'>;
|
|
148
|
+
foreground?: TokenReference<'color'>;
|
|
149
|
+
border?: TokenReference<'color'>;
|
|
150
|
+
borderRadius?: TokenReference<'radius'>;
|
|
151
|
+
padding?: TokenReference<'spacing'>;
|
|
152
|
+
margin?: TokenReference<'spacing'>;
|
|
153
|
+
shadow?: TokenReference<'shadow'>;
|
|
154
|
+
opacity?: number;
|
|
155
|
+
}
|
|
156
|
+
interface ButtonTokens extends ComponentTokenSet {
|
|
157
|
+
primary: ComponentTokenSet;
|
|
158
|
+
secondary: ComponentTokenSet;
|
|
159
|
+
ghost: ComponentTokenSet;
|
|
160
|
+
}
|
|
161
|
+
interface InputTokens extends ComponentTokenSet {
|
|
162
|
+
background: TokenReference<'color'>;
|
|
163
|
+
placeholder: TokenReference<'color'>;
|
|
164
|
+
focus: {
|
|
165
|
+
border: TokenReference<'color'>;
|
|
166
|
+
ring: TokenReference<'color'>;
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
interface LauncherTokens extends ComponentTokenSet {
|
|
170
|
+
size: string;
|
|
171
|
+
iconSize: string;
|
|
172
|
+
shadow: TokenReference<'shadow'>;
|
|
173
|
+
}
|
|
174
|
+
interface PanelTokens extends ComponentTokenSet {
|
|
175
|
+
width: string;
|
|
176
|
+
maxWidth: string;
|
|
177
|
+
height: string;
|
|
178
|
+
maxHeight: string;
|
|
179
|
+
}
|
|
180
|
+
interface HeaderTokens extends ComponentTokenSet {
|
|
181
|
+
background: TokenReference<'color'>;
|
|
182
|
+
border: TokenReference<'color'>;
|
|
183
|
+
borderRadius: TokenReference<'radius'>;
|
|
184
|
+
/** Background of the rounded avatar tile next to the title (Lucide / emoji / image). */
|
|
185
|
+
iconBackground: TokenReference<'color'>;
|
|
186
|
+
/** Foreground (glyph stroke or emoji text) on the header avatar tile. */
|
|
187
|
+
iconForeground: TokenReference<'color'>;
|
|
188
|
+
/** Header title line (next to the icon, or minimal layout title). */
|
|
189
|
+
titleForeground: TokenReference<'color'>;
|
|
190
|
+
/** Header subtitle line under the title. */
|
|
191
|
+
subtitleForeground: TokenReference<'color'>;
|
|
192
|
+
/** Default color for clear / close icon buttons when launcher overrides are unset. */
|
|
193
|
+
actionIconForeground: TokenReference<'color'>;
|
|
194
|
+
/** Box-shadow on the header (e.g., a fade shadow to replace the default border). */
|
|
195
|
+
shadow?: string;
|
|
196
|
+
/** Override the header bottom border (e.g., `none`). */
|
|
197
|
+
borderBottom?: string;
|
|
198
|
+
}
|
|
199
|
+
interface MessageTokens {
|
|
200
|
+
user: {
|
|
201
|
+
background: TokenReference<'color'>;
|
|
202
|
+
text: TokenReference<'color'>;
|
|
203
|
+
borderRadius: TokenReference<'radius'>;
|
|
204
|
+
/** User bubble box-shadow (token ref or raw CSS, e.g. `none`). */
|
|
205
|
+
shadow?: string;
|
|
206
|
+
};
|
|
207
|
+
assistant: {
|
|
208
|
+
background: TokenReference<'color'>;
|
|
209
|
+
text: TokenReference<'color'>;
|
|
210
|
+
borderRadius: TokenReference<'radius'>;
|
|
211
|
+
/** Assistant bubble border color (CSS color). */
|
|
212
|
+
border?: TokenReference<'color'>;
|
|
213
|
+
/** Assistant bubble box-shadow (token ref or raw CSS, e.g. `none`). */
|
|
214
|
+
shadow?: string;
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
interface MarkdownTokens {
|
|
218
|
+
inlineCode: {
|
|
219
|
+
background: TokenReference<'color'>;
|
|
220
|
+
foreground: TokenReference<'color'>;
|
|
221
|
+
};
|
|
222
|
+
/** Foreground for `<a>` in rendered markdown (assistant bubbles + artifact pane). */
|
|
223
|
+
link?: {
|
|
224
|
+
foreground: TokenReference<'color'>;
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* Body font for rendered markdown blocks (artifact pane + markdown bubbles).
|
|
228
|
+
* Use a raw CSS `font-family` value, e.g. `Georgia, serif`.
|
|
229
|
+
*/
|
|
230
|
+
prose?: {
|
|
231
|
+
fontFamily?: string;
|
|
232
|
+
};
|
|
233
|
+
/** Optional heading scale overrides (raw CSS or resolvable token paths). */
|
|
234
|
+
heading?: {
|
|
235
|
+
h1?: {
|
|
236
|
+
fontSize?: string;
|
|
237
|
+
fontWeight?: string;
|
|
238
|
+
};
|
|
239
|
+
h2?: {
|
|
240
|
+
fontSize?: string;
|
|
241
|
+
fontWeight?: string;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
interface VoiceTokens {
|
|
246
|
+
recording: {
|
|
247
|
+
indicator: TokenReference<'color'>;
|
|
248
|
+
background: TokenReference<'color'>;
|
|
249
|
+
border: TokenReference<'color'>;
|
|
250
|
+
};
|
|
251
|
+
processing: {
|
|
252
|
+
icon: TokenReference<'color'>;
|
|
253
|
+
background: TokenReference<'color'>;
|
|
254
|
+
};
|
|
255
|
+
speaking: {
|
|
256
|
+
icon: TokenReference<'color'>;
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
interface ApprovalTokens {
|
|
260
|
+
requested: {
|
|
261
|
+
background: TokenReference<'color'>;
|
|
262
|
+
border: TokenReference<'color'>;
|
|
263
|
+
text: TokenReference<'color'>;
|
|
264
|
+
};
|
|
265
|
+
approve: ComponentTokenSet;
|
|
266
|
+
deny: ComponentTokenSet;
|
|
267
|
+
}
|
|
268
|
+
interface AttachmentTokens {
|
|
269
|
+
image: {
|
|
270
|
+
background: TokenReference<'color'>;
|
|
271
|
+
border: TokenReference<'color'>;
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
/** Tool-call row chrome (collapsible tool bubbles). */
|
|
275
|
+
interface ToolBubbleTokens {
|
|
276
|
+
/** Box-shadow for tool bubbles (token ref or raw CSS, e.g. `none`). */
|
|
277
|
+
shadow: string;
|
|
278
|
+
}
|
|
279
|
+
/** Reasoning / “thinking” row chrome. */
|
|
280
|
+
interface ReasoningBubbleTokens {
|
|
281
|
+
shadow: string;
|
|
282
|
+
}
|
|
283
|
+
/** Composer (message input) chrome. */
|
|
284
|
+
interface ComposerChromeTokens {
|
|
285
|
+
/** Box-shadow on the composer form (raw CSS, e.g. `none`). */
|
|
286
|
+
shadow: string;
|
|
287
|
+
}
|
|
288
|
+
/** Artifact toolbar chrome. */
|
|
289
|
+
interface ArtifactToolbarTokens {
|
|
290
|
+
iconHoverColor?: string;
|
|
291
|
+
iconHoverBackground?: string;
|
|
292
|
+
iconPadding?: string;
|
|
293
|
+
iconBorderRadius?: string;
|
|
294
|
+
iconBorder?: string;
|
|
295
|
+
toggleGroupGap?: string;
|
|
296
|
+
toggleBorderRadius?: string;
|
|
297
|
+
copyBackground?: string;
|
|
298
|
+
copyBorder?: string;
|
|
299
|
+
copyColor?: string;
|
|
300
|
+
copyBorderRadius?: string;
|
|
301
|
+
copyPadding?: string;
|
|
302
|
+
copyMenuBackground?: string;
|
|
303
|
+
copyMenuBorder?: string;
|
|
304
|
+
copyMenuShadow?: string;
|
|
305
|
+
copyMenuBorderRadius?: string;
|
|
306
|
+
copyMenuItemHoverBackground?: string;
|
|
307
|
+
/** Base background of icon buttons (defaults to --persona-surface). */
|
|
308
|
+
iconBackground?: string;
|
|
309
|
+
/** Border on the toolbar (e.g., `none` to remove the bottom border). */
|
|
310
|
+
toolbarBorder?: string;
|
|
311
|
+
}
|
|
312
|
+
/** Artifact tab strip chrome. */
|
|
313
|
+
interface ArtifactTabTokens {
|
|
314
|
+
background?: string;
|
|
315
|
+
activeBackground?: string;
|
|
316
|
+
activeBorder?: string;
|
|
317
|
+
borderRadius?: string;
|
|
318
|
+
textColor?: string;
|
|
319
|
+
/** Hover background for inactive tabs. */
|
|
320
|
+
hoverBackground?: string;
|
|
321
|
+
/** Tab list container background. */
|
|
322
|
+
listBackground?: string;
|
|
323
|
+
/** Tab list container border color. */
|
|
324
|
+
listBorderColor?: string;
|
|
325
|
+
/** Tab list container padding (CSS shorthand). */
|
|
326
|
+
listPadding?: string;
|
|
327
|
+
}
|
|
328
|
+
/** Artifact pane chrome. */
|
|
329
|
+
interface ArtifactPaneTokens {
|
|
330
|
+
/**
|
|
331
|
+
* Background for the artifact column (toolbar + content), resolved from the theme.
|
|
332
|
+
* Defaults to `semantic.colors.container` so the pane matches assistant message surfaces.
|
|
333
|
+
* `features.artifacts.layout.paneBackground` still wins when set (layout escape hatch).
|
|
334
|
+
*/
|
|
335
|
+
background?: string;
|
|
336
|
+
toolbarBackground?: string;
|
|
337
|
+
}
|
|
338
|
+
/** Icon button chrome (used by createIconButton). */
|
|
339
|
+
interface IconButtonTokens {
|
|
340
|
+
background?: string;
|
|
341
|
+
border?: string;
|
|
342
|
+
color?: string;
|
|
343
|
+
padding?: string;
|
|
344
|
+
borderRadius?: string;
|
|
345
|
+
hoverBackground?: string;
|
|
346
|
+
hoverColor?: string;
|
|
347
|
+
/** Background when aria-pressed="true". */
|
|
348
|
+
activeBackground?: string;
|
|
349
|
+
/** Border color when aria-pressed="true". */
|
|
350
|
+
activeBorder?: string;
|
|
351
|
+
}
|
|
352
|
+
/** Label button chrome (used by createLabelButton). */
|
|
353
|
+
interface LabelButtonTokens {
|
|
354
|
+
background?: string;
|
|
355
|
+
border?: string;
|
|
356
|
+
color?: string;
|
|
357
|
+
padding?: string;
|
|
358
|
+
borderRadius?: string;
|
|
359
|
+
hoverBackground?: string;
|
|
360
|
+
fontSize?: string;
|
|
361
|
+
gap?: string;
|
|
362
|
+
}
|
|
363
|
+
/** Toggle group chrome (used by createToggleGroup). */
|
|
364
|
+
interface ToggleGroupTokens {
|
|
365
|
+
/** Gap between toggle buttons. Default: 0 (connected). */
|
|
366
|
+
gap?: string;
|
|
367
|
+
/** Border radius for first/last buttons. */
|
|
368
|
+
borderRadius?: string;
|
|
369
|
+
}
|
|
370
|
+
interface ComponentTokens {
|
|
371
|
+
button: ButtonTokens;
|
|
372
|
+
input: InputTokens;
|
|
373
|
+
launcher: LauncherTokens;
|
|
374
|
+
panel: PanelTokens;
|
|
375
|
+
header: HeaderTokens;
|
|
376
|
+
message: MessageTokens;
|
|
377
|
+
/** Markdown surfaces (chat + artifact pane). */
|
|
378
|
+
markdown?: MarkdownTokens;
|
|
379
|
+
voice: VoiceTokens;
|
|
380
|
+
approval: ApprovalTokens;
|
|
381
|
+
attachment: AttachmentTokens;
|
|
382
|
+
toolBubble: ToolBubbleTokens;
|
|
383
|
+
reasoningBubble: ReasoningBubbleTokens;
|
|
384
|
+
composer: ComposerChromeTokens;
|
|
385
|
+
/** Icon button styling tokens. */
|
|
386
|
+
iconButton?: IconButtonTokens;
|
|
387
|
+
/** Label button styling tokens. */
|
|
388
|
+
labelButton?: LabelButtonTokens;
|
|
389
|
+
/** Toggle group styling tokens. */
|
|
390
|
+
toggleGroup?: ToggleGroupTokens;
|
|
391
|
+
/** Artifact toolbar, tab strip, and pane chrome. */
|
|
392
|
+
artifact?: {
|
|
393
|
+
toolbar?: ArtifactToolbarTokens;
|
|
394
|
+
tab?: ArtifactTabTokens;
|
|
395
|
+
pane?: ArtifactPaneTokens;
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
interface PaletteExtras {
|
|
399
|
+
transitions?: Record<string, string>;
|
|
400
|
+
easings?: Record<string, string>;
|
|
401
|
+
}
|
|
402
|
+
interface PersonaThemeBase {
|
|
403
|
+
palette: {
|
|
404
|
+
colors: ColorPalette;
|
|
405
|
+
spacing: SpacingScale;
|
|
406
|
+
typography: TypographyScale;
|
|
407
|
+
shadows: ShadowScale;
|
|
408
|
+
borders: BorderScale;
|
|
409
|
+
radius: RadiusScale;
|
|
410
|
+
} & PaletteExtras;
|
|
411
|
+
}
|
|
412
|
+
interface PersonaThemeSemantic {
|
|
413
|
+
semantic: SemanticTokens;
|
|
414
|
+
}
|
|
415
|
+
interface PersonaThemeComponents {
|
|
416
|
+
components: ComponentTokens;
|
|
417
|
+
}
|
|
418
|
+
type PersonaTheme = PersonaThemeBase & PersonaThemeSemantic & PersonaThemeComponents;
|
|
419
|
+
/** Recursive partial for `config.theme` / `config.darkTheme` overrides. */
|
|
420
|
+
type DeepPartial<T> = T extends object ? {
|
|
421
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
422
|
+
} : T;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Theme Reference — Structured documentation and examples for the Persona v2 theme system.
|
|
426
|
+
*
|
|
427
|
+
* Exported via the `@runtypelabs/persona/theme-reference` entry point so it stays
|
|
428
|
+
* out of the IIFE widget bundle. Intended for AI/MCP tool consumption.
|
|
429
|
+
*/
|
|
430
|
+
|
|
431
|
+
declare const THEME_TOKEN_DOCS: {
|
|
432
|
+
overview: string;
|
|
433
|
+
layers: {
|
|
434
|
+
palette: {
|
|
435
|
+
description: string;
|
|
436
|
+
colors: {
|
|
437
|
+
description: string;
|
|
438
|
+
scales: {
|
|
439
|
+
gray: string;
|
|
440
|
+
primary: string;
|
|
441
|
+
accent: string;
|
|
442
|
+
secondary: string;
|
|
443
|
+
success: string;
|
|
444
|
+
warning: string;
|
|
445
|
+
error: string;
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
radius: {
|
|
449
|
+
description: string;
|
|
450
|
+
defaults: {
|
|
451
|
+
none: string;
|
|
452
|
+
sm: string;
|
|
453
|
+
md: string;
|
|
454
|
+
lg: string;
|
|
455
|
+
xl: string;
|
|
456
|
+
'2xl': string;
|
|
457
|
+
full: string;
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
typography: {
|
|
461
|
+
fontFamily: string;
|
|
462
|
+
fontSize: string;
|
|
463
|
+
fontWeight: string;
|
|
464
|
+
lineHeight: string;
|
|
465
|
+
};
|
|
466
|
+
shadows: string;
|
|
467
|
+
borders: string;
|
|
468
|
+
spacing: string;
|
|
469
|
+
};
|
|
470
|
+
semantic: {
|
|
471
|
+
description: string;
|
|
472
|
+
colors: {
|
|
473
|
+
primary: string;
|
|
474
|
+
secondary: string;
|
|
475
|
+
accent: string;
|
|
476
|
+
surface: string;
|
|
477
|
+
background: string;
|
|
478
|
+
container: string;
|
|
479
|
+
text: string;
|
|
480
|
+
textMuted: string;
|
|
481
|
+
textInverse: string;
|
|
482
|
+
border: string;
|
|
483
|
+
divider: string;
|
|
484
|
+
interactive: {
|
|
485
|
+
default: string;
|
|
486
|
+
hover: string;
|
|
487
|
+
focus: string;
|
|
488
|
+
active: string;
|
|
489
|
+
disabled: string;
|
|
490
|
+
};
|
|
491
|
+
feedback: {
|
|
492
|
+
success: string;
|
|
493
|
+
warning: string;
|
|
494
|
+
error: string;
|
|
495
|
+
info: string;
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
spacing: string;
|
|
499
|
+
typography: string;
|
|
500
|
+
};
|
|
501
|
+
components: {
|
|
502
|
+
description: string;
|
|
503
|
+
button: {
|
|
504
|
+
description: string;
|
|
505
|
+
properties: string;
|
|
506
|
+
};
|
|
507
|
+
input: {
|
|
508
|
+
description: string;
|
|
509
|
+
properties: string;
|
|
510
|
+
};
|
|
511
|
+
launcher: {
|
|
512
|
+
description: string;
|
|
513
|
+
properties: string;
|
|
514
|
+
};
|
|
515
|
+
panel: {
|
|
516
|
+
description: string;
|
|
517
|
+
properties: string;
|
|
518
|
+
};
|
|
519
|
+
header: {
|
|
520
|
+
description: string;
|
|
521
|
+
properties: string;
|
|
522
|
+
};
|
|
523
|
+
message: {
|
|
524
|
+
description: string;
|
|
525
|
+
user: string;
|
|
526
|
+
assistant: string;
|
|
527
|
+
};
|
|
528
|
+
markdown: {
|
|
529
|
+
description: string;
|
|
530
|
+
properties: string;
|
|
531
|
+
};
|
|
532
|
+
voice: string;
|
|
533
|
+
approval: string;
|
|
534
|
+
attachment: string;
|
|
535
|
+
toolBubble: string;
|
|
536
|
+
reasoningBubble: string;
|
|
537
|
+
composer: string;
|
|
538
|
+
artifact: string;
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
colorScheme: string;
|
|
542
|
+
plugins: {
|
|
543
|
+
description: string;
|
|
544
|
+
available: {
|
|
545
|
+
brandPlugin: string;
|
|
546
|
+
accessibilityPlugin: string;
|
|
547
|
+
highContrastPlugin: string;
|
|
548
|
+
reducedMotionPlugin: string;
|
|
549
|
+
animationsPlugin: string;
|
|
550
|
+
};
|
|
551
|
+
usage: string;
|
|
552
|
+
};
|
|
553
|
+
widgetConfig: {
|
|
554
|
+
description: string;
|
|
555
|
+
launcher: {
|
|
556
|
+
description: string;
|
|
557
|
+
properties: {
|
|
558
|
+
enabled: string;
|
|
559
|
+
title: string;
|
|
560
|
+
subtitle: string;
|
|
561
|
+
position: string;
|
|
562
|
+
width: string;
|
|
563
|
+
fullHeight: string;
|
|
564
|
+
mountMode: string;
|
|
565
|
+
agentIconText: string;
|
|
566
|
+
border: string;
|
|
567
|
+
shadow: string;
|
|
568
|
+
collapsedMaxWidth: string;
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
sendButton: {
|
|
572
|
+
description: string;
|
|
573
|
+
properties: string;
|
|
574
|
+
};
|
|
575
|
+
closeButton: {
|
|
576
|
+
description: string;
|
|
577
|
+
properties: string;
|
|
578
|
+
};
|
|
579
|
+
clearChat: {
|
|
580
|
+
description: string;
|
|
581
|
+
properties: string;
|
|
582
|
+
};
|
|
583
|
+
toolCall: {
|
|
584
|
+
description: string;
|
|
585
|
+
properties: string;
|
|
586
|
+
};
|
|
587
|
+
copy: {
|
|
588
|
+
description: string;
|
|
589
|
+
properties: string;
|
|
590
|
+
};
|
|
591
|
+
voiceRecognition: {
|
|
592
|
+
description: string;
|
|
593
|
+
properties: string;
|
|
594
|
+
};
|
|
595
|
+
suggestionChips: string;
|
|
596
|
+
layout: {
|
|
597
|
+
description: string;
|
|
598
|
+
header: string;
|
|
599
|
+
messages: string;
|
|
600
|
+
};
|
|
601
|
+
features: {
|
|
602
|
+
description: string;
|
|
603
|
+
properties: string;
|
|
604
|
+
};
|
|
605
|
+
};
|
|
606
|
+
};
|
|
607
|
+
interface ThemeExample {
|
|
608
|
+
description: string;
|
|
609
|
+
colorScheme?: 'light' | 'dark' | 'auto';
|
|
610
|
+
theme: DeepPartial<PersonaTheme>;
|
|
611
|
+
}
|
|
612
|
+
declare const THEME_EXAMPLES: Record<string, ThemeExample>;
|
|
613
|
+
/**
|
|
614
|
+
* Complete theme reference payload for AI / MCP tool consumption.
|
|
615
|
+
*
|
|
616
|
+
* Returns token system docs, the default color palette and radius scale,
|
|
617
|
+
* example themes, and a list of SDK-bundled presets.
|
|
618
|
+
*/
|
|
619
|
+
declare function getThemeReference(): {
|
|
620
|
+
tokenDocs: {
|
|
621
|
+
overview: string;
|
|
622
|
+
layers: {
|
|
623
|
+
palette: {
|
|
624
|
+
description: string;
|
|
625
|
+
colors: {
|
|
626
|
+
description: string;
|
|
627
|
+
scales: {
|
|
628
|
+
gray: string;
|
|
629
|
+
primary: string;
|
|
630
|
+
accent: string;
|
|
631
|
+
secondary: string;
|
|
632
|
+
success: string;
|
|
633
|
+
warning: string;
|
|
634
|
+
error: string;
|
|
635
|
+
};
|
|
636
|
+
};
|
|
637
|
+
radius: {
|
|
638
|
+
description: string;
|
|
639
|
+
defaults: {
|
|
640
|
+
none: string;
|
|
641
|
+
sm: string;
|
|
642
|
+
md: string;
|
|
643
|
+
lg: string;
|
|
644
|
+
xl: string;
|
|
645
|
+
'2xl': string;
|
|
646
|
+
full: string;
|
|
647
|
+
};
|
|
648
|
+
};
|
|
649
|
+
typography: {
|
|
650
|
+
fontFamily: string;
|
|
651
|
+
fontSize: string;
|
|
652
|
+
fontWeight: string;
|
|
653
|
+
lineHeight: string;
|
|
654
|
+
};
|
|
655
|
+
shadows: string;
|
|
656
|
+
borders: string;
|
|
657
|
+
spacing: string;
|
|
658
|
+
};
|
|
659
|
+
semantic: {
|
|
660
|
+
description: string;
|
|
661
|
+
colors: {
|
|
662
|
+
primary: string;
|
|
663
|
+
secondary: string;
|
|
664
|
+
accent: string;
|
|
665
|
+
surface: string;
|
|
666
|
+
background: string;
|
|
667
|
+
container: string;
|
|
668
|
+
text: string;
|
|
669
|
+
textMuted: string;
|
|
670
|
+
textInverse: string;
|
|
671
|
+
border: string;
|
|
672
|
+
divider: string;
|
|
673
|
+
interactive: {
|
|
674
|
+
default: string;
|
|
675
|
+
hover: string;
|
|
676
|
+
focus: string;
|
|
677
|
+
active: string;
|
|
678
|
+
disabled: string;
|
|
679
|
+
};
|
|
680
|
+
feedback: {
|
|
681
|
+
success: string;
|
|
682
|
+
warning: string;
|
|
683
|
+
error: string;
|
|
684
|
+
info: string;
|
|
685
|
+
};
|
|
686
|
+
};
|
|
687
|
+
spacing: string;
|
|
688
|
+
typography: string;
|
|
689
|
+
};
|
|
690
|
+
components: {
|
|
691
|
+
description: string;
|
|
692
|
+
button: {
|
|
693
|
+
description: string;
|
|
694
|
+
properties: string;
|
|
695
|
+
};
|
|
696
|
+
input: {
|
|
697
|
+
description: string;
|
|
698
|
+
properties: string;
|
|
699
|
+
};
|
|
700
|
+
launcher: {
|
|
701
|
+
description: string;
|
|
702
|
+
properties: string;
|
|
703
|
+
};
|
|
704
|
+
panel: {
|
|
705
|
+
description: string;
|
|
706
|
+
properties: string;
|
|
707
|
+
};
|
|
708
|
+
header: {
|
|
709
|
+
description: string;
|
|
710
|
+
properties: string;
|
|
711
|
+
};
|
|
712
|
+
message: {
|
|
713
|
+
description: string;
|
|
714
|
+
user: string;
|
|
715
|
+
assistant: string;
|
|
716
|
+
};
|
|
717
|
+
markdown: {
|
|
718
|
+
description: string;
|
|
719
|
+
properties: string;
|
|
720
|
+
};
|
|
721
|
+
voice: string;
|
|
722
|
+
approval: string;
|
|
723
|
+
attachment: string;
|
|
724
|
+
toolBubble: string;
|
|
725
|
+
reasoningBubble: string;
|
|
726
|
+
composer: string;
|
|
727
|
+
artifact: string;
|
|
728
|
+
};
|
|
729
|
+
};
|
|
730
|
+
colorScheme: string;
|
|
731
|
+
plugins: {
|
|
732
|
+
description: string;
|
|
733
|
+
available: {
|
|
734
|
+
brandPlugin: string;
|
|
735
|
+
accessibilityPlugin: string;
|
|
736
|
+
highContrastPlugin: string;
|
|
737
|
+
reducedMotionPlugin: string;
|
|
738
|
+
animationsPlugin: string;
|
|
739
|
+
};
|
|
740
|
+
usage: string;
|
|
741
|
+
};
|
|
742
|
+
widgetConfig: {
|
|
743
|
+
description: string;
|
|
744
|
+
launcher: {
|
|
745
|
+
description: string;
|
|
746
|
+
properties: {
|
|
747
|
+
enabled: string;
|
|
748
|
+
title: string;
|
|
749
|
+
subtitle: string;
|
|
750
|
+
position: string;
|
|
751
|
+
width: string;
|
|
752
|
+
fullHeight: string;
|
|
753
|
+
mountMode: string;
|
|
754
|
+
agentIconText: string;
|
|
755
|
+
border: string;
|
|
756
|
+
shadow: string;
|
|
757
|
+
collapsedMaxWidth: string;
|
|
758
|
+
};
|
|
759
|
+
};
|
|
760
|
+
sendButton: {
|
|
761
|
+
description: string;
|
|
762
|
+
properties: string;
|
|
763
|
+
};
|
|
764
|
+
closeButton: {
|
|
765
|
+
description: string;
|
|
766
|
+
properties: string;
|
|
767
|
+
};
|
|
768
|
+
clearChat: {
|
|
769
|
+
description: string;
|
|
770
|
+
properties: string;
|
|
771
|
+
};
|
|
772
|
+
toolCall: {
|
|
773
|
+
description: string;
|
|
774
|
+
properties: string;
|
|
775
|
+
};
|
|
776
|
+
copy: {
|
|
777
|
+
description: string;
|
|
778
|
+
properties: string;
|
|
779
|
+
};
|
|
780
|
+
voiceRecognition: {
|
|
781
|
+
description: string;
|
|
782
|
+
properties: string;
|
|
783
|
+
};
|
|
784
|
+
suggestionChips: string;
|
|
785
|
+
layout: {
|
|
786
|
+
description: string;
|
|
787
|
+
header: string;
|
|
788
|
+
messages: string;
|
|
789
|
+
};
|
|
790
|
+
features: {
|
|
791
|
+
description: string;
|
|
792
|
+
properties: string;
|
|
793
|
+
};
|
|
794
|
+
};
|
|
795
|
+
};
|
|
796
|
+
defaultColorPalette: {
|
|
797
|
+
primary: {
|
|
798
|
+
50: string;
|
|
799
|
+
100: string;
|
|
800
|
+
200: string;
|
|
801
|
+
300: string;
|
|
802
|
+
400: string;
|
|
803
|
+
500: string;
|
|
804
|
+
600: string;
|
|
805
|
+
700: string;
|
|
806
|
+
800: string;
|
|
807
|
+
900: string;
|
|
808
|
+
950: string;
|
|
809
|
+
};
|
|
810
|
+
secondary: {
|
|
811
|
+
50: string;
|
|
812
|
+
100: string;
|
|
813
|
+
200: string;
|
|
814
|
+
300: string;
|
|
815
|
+
400: string;
|
|
816
|
+
500: string;
|
|
817
|
+
600: string;
|
|
818
|
+
700: string;
|
|
819
|
+
800: string;
|
|
820
|
+
900: string;
|
|
821
|
+
950: string;
|
|
822
|
+
};
|
|
823
|
+
accent: {
|
|
824
|
+
50: string;
|
|
825
|
+
100: string;
|
|
826
|
+
200: string;
|
|
827
|
+
300: string;
|
|
828
|
+
400: string;
|
|
829
|
+
500: string;
|
|
830
|
+
600: string;
|
|
831
|
+
700: string;
|
|
832
|
+
800: string;
|
|
833
|
+
900: string;
|
|
834
|
+
950: string;
|
|
835
|
+
};
|
|
836
|
+
gray: {
|
|
837
|
+
50: string;
|
|
838
|
+
100: string;
|
|
839
|
+
200: string;
|
|
840
|
+
300: string;
|
|
841
|
+
400: string;
|
|
842
|
+
500: string;
|
|
843
|
+
600: string;
|
|
844
|
+
700: string;
|
|
845
|
+
800: string;
|
|
846
|
+
900: string;
|
|
847
|
+
950: string;
|
|
848
|
+
};
|
|
849
|
+
success: {
|
|
850
|
+
50: string;
|
|
851
|
+
100: string;
|
|
852
|
+
200: string;
|
|
853
|
+
300: string;
|
|
854
|
+
400: string;
|
|
855
|
+
500: string;
|
|
856
|
+
600: string;
|
|
857
|
+
700: string;
|
|
858
|
+
800: string;
|
|
859
|
+
900: string;
|
|
860
|
+
};
|
|
861
|
+
warning: {
|
|
862
|
+
50: string;
|
|
863
|
+
100: string;
|
|
864
|
+
200: string;
|
|
865
|
+
300: string;
|
|
866
|
+
400: string;
|
|
867
|
+
500: string;
|
|
868
|
+
600: string;
|
|
869
|
+
700: string;
|
|
870
|
+
800: string;
|
|
871
|
+
900: string;
|
|
872
|
+
};
|
|
873
|
+
error: {
|
|
874
|
+
50: string;
|
|
875
|
+
100: string;
|
|
876
|
+
200: string;
|
|
877
|
+
300: string;
|
|
878
|
+
400: string;
|
|
879
|
+
500: string;
|
|
880
|
+
600: string;
|
|
881
|
+
700: string;
|
|
882
|
+
800: string;
|
|
883
|
+
900: string;
|
|
884
|
+
};
|
|
885
|
+
};
|
|
886
|
+
defaultRadius: {
|
|
887
|
+
none: string;
|
|
888
|
+
sm: string;
|
|
889
|
+
md: string;
|
|
890
|
+
lg: string;
|
|
891
|
+
xl: string;
|
|
892
|
+
'2xl': string;
|
|
893
|
+
full: string;
|
|
894
|
+
};
|
|
895
|
+
examples: Record<string, ThemeExample>;
|
|
896
|
+
sdkPresets: string[];
|
|
897
|
+
};
|
|
898
|
+
|
|
899
|
+
export { THEME_EXAMPLES, THEME_TOKEN_DOCS, type ThemeExample, getThemeReference };
|