@runtypelabs/persona 3.6.0 → 3.7.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 +44 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.global.js +67 -67
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +44 -44
- package/dist/index.js.map +1 -1
- package/dist/theme-editor.cjs +514 -227
- package/dist/theme-editor.d.cts +32 -1
- package/dist/theme-editor.d.ts +32 -1
- package/dist/theme-editor.js +513 -227
- package/dist/theme-reference.cjs +1 -1
- package/dist/theme-reference.d.cts +19 -0
- package/dist/theme-reference.d.ts +19 -0
- package/dist/theme-reference.js +1 -1
- package/dist/widget.css +40 -0
- package/package.json +1 -1
- package/src/components/demo-carousel.ts +1 -1
- package/src/components/event-stream-view.test.ts +142 -0
- package/src/components/event-stream-view.ts +67 -28
- package/src/defaults.ts +15 -0
- package/src/scroll-to-bottom-defaults.test.ts +13 -0
- package/src/styles/widget.css +40 -0
- package/src/theme-editor/index.ts +1 -0
- package/src/theme-editor/role-mappings.ts +12 -0
- package/src/theme-editor/sections.test.ts +43 -0
- package/src/theme-editor/sections.ts +42 -0
- package/src/theme-reference.ts +8 -0
- package/src/types/theme.ts +10 -0
- package/src/types.ts +22 -0
- package/src/ui.scroll.test.ts +554 -0
- package/src/ui.ts +178 -83
- package/src/utils/auto-follow.test.ts +110 -0
- package/src/utils/auto-follow.ts +112 -0
- package/src/utils/theme.test.ts +34 -0
- package/src/utils/tokens.ts +49 -0
package/dist/index.d.cts
CHANGED
|
@@ -528,6 +528,13 @@ interface LabelButtonTokens {
|
|
|
528
528
|
fontSize?: string;
|
|
529
529
|
gap?: string;
|
|
530
530
|
}
|
|
531
|
+
/** Scroll-to-bottom pill chrome shared by transcript + event stream. */
|
|
532
|
+
interface ScrollToBottomTokens extends ComponentTokenSet {
|
|
533
|
+
size?: string;
|
|
534
|
+
gap?: string;
|
|
535
|
+
fontSize?: string;
|
|
536
|
+
iconSize?: string;
|
|
537
|
+
}
|
|
531
538
|
/** Toggle group chrome (used by createToggleGroup). */
|
|
532
539
|
interface ToggleGroupTokens {
|
|
533
540
|
/** Gap between toggle buttons. Default: 0 (connected). */
|
|
@@ -554,6 +561,8 @@ interface ComponentTokens {
|
|
|
554
561
|
iconButton?: IconButtonTokens;
|
|
555
562
|
/** Label button styling tokens. */
|
|
556
563
|
labelButton?: LabelButtonTokens;
|
|
564
|
+
/** Scroll-to-bottom indicator styling tokens. */
|
|
565
|
+
scrollToBottom?: ScrollToBottomTokens;
|
|
557
566
|
/** Toggle group styling tokens. */
|
|
558
567
|
toggleGroup?: ToggleGroupTokens;
|
|
559
568
|
/** Artifact toolbar, tab strip, and pane chrome. */
|
|
@@ -1114,10 +1123,31 @@ type AgentWidgetArtifactsFeature = {
|
|
|
1114
1123
|
defaultRenderer: () => HTMLElement;
|
|
1115
1124
|
}) => HTMLElement | null;
|
|
1116
1125
|
};
|
|
1126
|
+
type AgentWidgetScrollToBottomFeature = {
|
|
1127
|
+
/**
|
|
1128
|
+
* When true, Persona shows a scroll-to-bottom affordance when the user breaks
|
|
1129
|
+
* away from the latest transcript or event stream content.
|
|
1130
|
+
* @default true
|
|
1131
|
+
*/
|
|
1132
|
+
enabled?: boolean;
|
|
1133
|
+
/**
|
|
1134
|
+
* Lucide icon name used for the affordance.
|
|
1135
|
+
* @default "arrow-down"
|
|
1136
|
+
*/
|
|
1137
|
+
iconName?: string;
|
|
1138
|
+
/**
|
|
1139
|
+
* Optional label text shown next to the icon. Set to an empty string for an
|
|
1140
|
+
* icon-only affordance.
|
|
1141
|
+
* @default ""
|
|
1142
|
+
*/
|
|
1143
|
+
label?: string;
|
|
1144
|
+
};
|
|
1117
1145
|
type AgentWidgetFeatureFlags = {
|
|
1118
1146
|
showReasoning?: boolean;
|
|
1119
1147
|
showToolCalls?: boolean;
|
|
1120
1148
|
showEventStreamToggle?: boolean;
|
|
1149
|
+
/** Shared transcript + event stream scroll-to-bottom affordance. */
|
|
1150
|
+
scrollToBottom?: AgentWidgetScrollToBottomFeature;
|
|
1121
1151
|
/** Configuration for the Event Stream inspector view */
|
|
1122
1152
|
eventStream?: EventStreamConfig;
|
|
1123
1153
|
/** Optional artifact sidebar (split pane / mobile drawer) */
|
package/dist/index.d.ts
CHANGED
|
@@ -528,6 +528,13 @@ interface LabelButtonTokens {
|
|
|
528
528
|
fontSize?: string;
|
|
529
529
|
gap?: string;
|
|
530
530
|
}
|
|
531
|
+
/** Scroll-to-bottom pill chrome shared by transcript + event stream. */
|
|
532
|
+
interface ScrollToBottomTokens extends ComponentTokenSet {
|
|
533
|
+
size?: string;
|
|
534
|
+
gap?: string;
|
|
535
|
+
fontSize?: string;
|
|
536
|
+
iconSize?: string;
|
|
537
|
+
}
|
|
531
538
|
/** Toggle group chrome (used by createToggleGroup). */
|
|
532
539
|
interface ToggleGroupTokens {
|
|
533
540
|
/** Gap between toggle buttons. Default: 0 (connected). */
|
|
@@ -554,6 +561,8 @@ interface ComponentTokens {
|
|
|
554
561
|
iconButton?: IconButtonTokens;
|
|
555
562
|
/** Label button styling tokens. */
|
|
556
563
|
labelButton?: LabelButtonTokens;
|
|
564
|
+
/** Scroll-to-bottom indicator styling tokens. */
|
|
565
|
+
scrollToBottom?: ScrollToBottomTokens;
|
|
557
566
|
/** Toggle group styling tokens. */
|
|
558
567
|
toggleGroup?: ToggleGroupTokens;
|
|
559
568
|
/** Artifact toolbar, tab strip, and pane chrome. */
|
|
@@ -1114,10 +1123,31 @@ type AgentWidgetArtifactsFeature = {
|
|
|
1114
1123
|
defaultRenderer: () => HTMLElement;
|
|
1115
1124
|
}) => HTMLElement | null;
|
|
1116
1125
|
};
|
|
1126
|
+
type AgentWidgetScrollToBottomFeature = {
|
|
1127
|
+
/**
|
|
1128
|
+
* When true, Persona shows a scroll-to-bottom affordance when the user breaks
|
|
1129
|
+
* away from the latest transcript or event stream content.
|
|
1130
|
+
* @default true
|
|
1131
|
+
*/
|
|
1132
|
+
enabled?: boolean;
|
|
1133
|
+
/**
|
|
1134
|
+
* Lucide icon name used for the affordance.
|
|
1135
|
+
* @default "arrow-down"
|
|
1136
|
+
*/
|
|
1137
|
+
iconName?: string;
|
|
1138
|
+
/**
|
|
1139
|
+
* Optional label text shown next to the icon. Set to an empty string for an
|
|
1140
|
+
* icon-only affordance.
|
|
1141
|
+
* @default ""
|
|
1142
|
+
*/
|
|
1143
|
+
label?: string;
|
|
1144
|
+
};
|
|
1117
1145
|
type AgentWidgetFeatureFlags = {
|
|
1118
1146
|
showReasoning?: boolean;
|
|
1119
1147
|
showToolCalls?: boolean;
|
|
1120
1148
|
showEventStreamToggle?: boolean;
|
|
1149
|
+
/** Shared transcript + event stream scroll-to-bottom affordance. */
|
|
1150
|
+
scrollToBottom?: AgentWidgetScrollToBottomFeature;
|
|
1121
1151
|
/** Configuration for the Event Stream inspector view */
|
|
1122
1152
|
eventStream?: EventStreamConfig;
|
|
1123
1153
|
/** Optional artifact sidebar (split pane / mobile drawer) */
|