@runtypelabs/persona 3.7.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +40 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -4
- package/dist/index.d.ts +43 -4
- package/dist/index.global.js +59 -59
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +40 -40
- package/dist/index.js.map +1 -1
- package/dist/theme-editor.cjs +198 -24
- package/dist/theme-editor.d.cts +43 -4
- package/dist/theme-editor.d.ts +43 -4
- package/dist/theme-editor.js +198 -24
- package/dist/theme-reference.cjs +1 -1
- package/dist/theme-reference.d.cts +34 -0
- package/dist/theme-reference.d.ts +34 -0
- package/dist/widget.css +4 -0
- package/package.json +1 -1
- package/src/components/artifact-card.ts +1 -1
- package/src/components/header-builder.ts +3 -0
- package/src/components/launcher.ts +7 -2
- package/src/components/panel.ts +3 -1
- package/src/runtime/host-layout.test.ts +1 -1
- package/src/runtime/host-layout.ts +2 -1
- package/src/styles/widget.css +4 -0
- package/src/types/theme.ts +35 -0
- package/src/types.ts +9 -4
- package/src/ui.overlay-z-index.test.ts +34 -2
- package/src/ui.ts +87 -8
- package/src/utils/constants.ts +13 -0
- package/src/utils/dropdown.ts +2 -1
- package/src/utils/overlay-host-stacking.test.ts +61 -0
- package/src/utils/overlay-host-stacking.ts +38 -0
- package/src/utils/scroll-lock.test.ts +64 -0
- package/src/utils/scroll-lock.ts +62 -0
- package/src/utils/tokens.ts +63 -0
package/dist/index.d.cts
CHANGED
|
@@ -381,6 +381,17 @@ interface MessageTokens {
|
|
|
381
381
|
/** Assistant bubble box-shadow (token ref or raw CSS, e.g. `none`). */
|
|
382
382
|
shadow?: string;
|
|
383
383
|
};
|
|
384
|
+
/** Border color between messages in the thread. */
|
|
385
|
+
border?: TokenReference<'color'>;
|
|
386
|
+
}
|
|
387
|
+
/** Collapsible widget chrome (tool bubbles, reasoning bubbles, approval bubbles). */
|
|
388
|
+
interface CollapsibleWidgetTokens {
|
|
389
|
+
/** Background for content areas. */
|
|
390
|
+
container?: TokenReference<'color'>;
|
|
391
|
+
/** Background for code blocks inside collapsible sections. */
|
|
392
|
+
surface?: TokenReference<'color'>;
|
|
393
|
+
/** Border color for collapsible sections. */
|
|
394
|
+
border?: TokenReference<'color'>;
|
|
384
395
|
}
|
|
385
396
|
interface MarkdownTokens {
|
|
386
397
|
inlineCode: {
|
|
@@ -409,6 +420,27 @@ interface MarkdownTokens {
|
|
|
409
420
|
fontWeight?: string;
|
|
410
421
|
};
|
|
411
422
|
};
|
|
423
|
+
/** Fenced code block styling. */
|
|
424
|
+
codeBlock?: {
|
|
425
|
+
background?: TokenReference<'color'>;
|
|
426
|
+
borderColor?: TokenReference<'color'>;
|
|
427
|
+
textColor?: TokenReference<'color'>;
|
|
428
|
+
};
|
|
429
|
+
/** Table styling. */
|
|
430
|
+
table?: {
|
|
431
|
+
headerBackground?: TokenReference<'color'>;
|
|
432
|
+
borderColor?: TokenReference<'color'>;
|
|
433
|
+
};
|
|
434
|
+
/** Horizontal rule styling. */
|
|
435
|
+
hr?: {
|
|
436
|
+
color?: TokenReference<'color'>;
|
|
437
|
+
};
|
|
438
|
+
/** Blockquote styling. */
|
|
439
|
+
blockquote?: {
|
|
440
|
+
borderColor?: TokenReference<'color'>;
|
|
441
|
+
background?: TokenReference<'color'>;
|
|
442
|
+
textColor?: TokenReference<'color'>;
|
|
443
|
+
};
|
|
412
444
|
}
|
|
413
445
|
interface VoiceTokens {
|
|
414
446
|
recording: {
|
|
@@ -571,6 +603,8 @@ interface ComponentTokens {
|
|
|
571
603
|
tab?: ArtifactTabTokens;
|
|
572
604
|
pane?: ArtifactPaneTokens;
|
|
573
605
|
};
|
|
606
|
+
/** Collapsible widget chrome (tool/reasoning/approval bubbles). */
|
|
607
|
+
collapsibleWidget?: CollapsibleWidgetTokens;
|
|
574
608
|
}
|
|
575
609
|
interface PaletteExtras {
|
|
576
610
|
transitions?: Record<string, string>;
|
|
@@ -1370,11 +1404,16 @@ type AgentWidgetLauncherConfig = {
|
|
|
1370
1404
|
*/
|
|
1371
1405
|
mobileBreakpoint?: number;
|
|
1372
1406
|
/**
|
|
1373
|
-
* CSS z-index applied to the widget wrapper
|
|
1374
|
-
* (floating panel, mobile fullscreen,
|
|
1375
|
-
*
|
|
1407
|
+
* CSS z-index applied to the widget wrapper and launcher button in all
|
|
1408
|
+
* positioned modes (floating panel, mobile fullscreen, sidebar, docked
|
|
1409
|
+
* mobile fullscreen). Increase this value if other elements on the host
|
|
1410
|
+
* page appear on top of the widget.
|
|
1411
|
+
*
|
|
1412
|
+
* In viewport-covering modes (sidebar, mobile fullscreen), the widget
|
|
1413
|
+
* also elevates the host element's stacking context and locks
|
|
1414
|
+
* document scroll to prevent background scrolling.
|
|
1376
1415
|
*
|
|
1377
|
-
* @default
|
|
1416
|
+
* @default 100000
|
|
1378
1417
|
*/
|
|
1379
1418
|
zIndex?: number;
|
|
1380
1419
|
callToActionIconText?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -381,6 +381,17 @@ interface MessageTokens {
|
|
|
381
381
|
/** Assistant bubble box-shadow (token ref or raw CSS, e.g. `none`). */
|
|
382
382
|
shadow?: string;
|
|
383
383
|
};
|
|
384
|
+
/** Border color between messages in the thread. */
|
|
385
|
+
border?: TokenReference<'color'>;
|
|
386
|
+
}
|
|
387
|
+
/** Collapsible widget chrome (tool bubbles, reasoning bubbles, approval bubbles). */
|
|
388
|
+
interface CollapsibleWidgetTokens {
|
|
389
|
+
/** Background for content areas. */
|
|
390
|
+
container?: TokenReference<'color'>;
|
|
391
|
+
/** Background for code blocks inside collapsible sections. */
|
|
392
|
+
surface?: TokenReference<'color'>;
|
|
393
|
+
/** Border color for collapsible sections. */
|
|
394
|
+
border?: TokenReference<'color'>;
|
|
384
395
|
}
|
|
385
396
|
interface MarkdownTokens {
|
|
386
397
|
inlineCode: {
|
|
@@ -409,6 +420,27 @@ interface MarkdownTokens {
|
|
|
409
420
|
fontWeight?: string;
|
|
410
421
|
};
|
|
411
422
|
};
|
|
423
|
+
/** Fenced code block styling. */
|
|
424
|
+
codeBlock?: {
|
|
425
|
+
background?: TokenReference<'color'>;
|
|
426
|
+
borderColor?: TokenReference<'color'>;
|
|
427
|
+
textColor?: TokenReference<'color'>;
|
|
428
|
+
};
|
|
429
|
+
/** Table styling. */
|
|
430
|
+
table?: {
|
|
431
|
+
headerBackground?: TokenReference<'color'>;
|
|
432
|
+
borderColor?: TokenReference<'color'>;
|
|
433
|
+
};
|
|
434
|
+
/** Horizontal rule styling. */
|
|
435
|
+
hr?: {
|
|
436
|
+
color?: TokenReference<'color'>;
|
|
437
|
+
};
|
|
438
|
+
/** Blockquote styling. */
|
|
439
|
+
blockquote?: {
|
|
440
|
+
borderColor?: TokenReference<'color'>;
|
|
441
|
+
background?: TokenReference<'color'>;
|
|
442
|
+
textColor?: TokenReference<'color'>;
|
|
443
|
+
};
|
|
412
444
|
}
|
|
413
445
|
interface VoiceTokens {
|
|
414
446
|
recording: {
|
|
@@ -571,6 +603,8 @@ interface ComponentTokens {
|
|
|
571
603
|
tab?: ArtifactTabTokens;
|
|
572
604
|
pane?: ArtifactPaneTokens;
|
|
573
605
|
};
|
|
606
|
+
/** Collapsible widget chrome (tool/reasoning/approval bubbles). */
|
|
607
|
+
collapsibleWidget?: CollapsibleWidgetTokens;
|
|
574
608
|
}
|
|
575
609
|
interface PaletteExtras {
|
|
576
610
|
transitions?: Record<string, string>;
|
|
@@ -1370,11 +1404,16 @@ type AgentWidgetLauncherConfig = {
|
|
|
1370
1404
|
*/
|
|
1371
1405
|
mobileBreakpoint?: number;
|
|
1372
1406
|
/**
|
|
1373
|
-
* CSS z-index applied to the widget wrapper
|
|
1374
|
-
* (floating panel, mobile fullscreen,
|
|
1375
|
-
*
|
|
1407
|
+
* CSS z-index applied to the widget wrapper and launcher button in all
|
|
1408
|
+
* positioned modes (floating panel, mobile fullscreen, sidebar, docked
|
|
1409
|
+
* mobile fullscreen). Increase this value if other elements on the host
|
|
1410
|
+
* page appear on top of the widget.
|
|
1411
|
+
*
|
|
1412
|
+
* In viewport-covering modes (sidebar, mobile fullscreen), the widget
|
|
1413
|
+
* also elevates the host element's stacking context and locks
|
|
1414
|
+
* document scroll to prevent background scrolling.
|
|
1376
1415
|
*
|
|
1377
|
-
* @default
|
|
1416
|
+
* @default 100000
|
|
1378
1417
|
*/
|
|
1379
1418
|
zIndex?: number;
|
|
1380
1419
|
callToActionIconText?: string;
|