@runtypelabs/persona 3.5.2 → 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 +46 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.global.js +70 -70
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +46 -46
- package/dist/index.js.map +1 -1
- package/dist/theme-editor.cjs +18015 -0
- package/dist/theme-editor.d.cts +3888 -0
- package/dist/theme-editor.d.ts +3888 -0
- package/dist/theme-editor.js +17909 -0
- package/dist/theme-reference.cjs +1 -1
- package/dist/theme-reference.d.cts +33 -0
- package/dist/theme-reference.d.ts +33 -0
- package/dist/theme-reference.js +1 -1
- package/dist/widget.css +69 -25
- package/package.json +9 -7
- package/src/components/artifact-card.ts +1 -1
- package/src/components/composer-builder.ts +16 -29
- package/src/components/demo-carousel.ts +5 -5
- package/src/components/event-stream-view.test.ts +142 -0
- package/src/components/event-stream-view.ts +68 -29
- package/src/components/header-builder.ts +2 -2
- package/src/components/launcher.ts +9 -0
- package/src/components/message-bubble.ts +9 -3
- package/src/components/suggestions.ts +1 -1
- package/src/defaults.ts +24 -9
- package/src/scroll-to-bottom-defaults.test.ts +13 -0
- package/src/styles/widget.css +69 -25
- package/src/theme-editor/color-utils.ts +252 -0
- package/src/theme-editor/index.ts +131 -0
- package/src/theme-editor/presets.ts +144 -0
- package/src/theme-editor/preview-utils.ts +265 -0
- package/src/theme-editor/preview.ts +445 -0
- package/src/theme-editor/role-mappings.ts +343 -0
- package/src/theme-editor/sections.test.ts +43 -0
- package/src/theme-editor/sections.ts +994 -0
- package/src/theme-editor/state.ts +298 -0
- package/src/theme-editor/types.ts +177 -0
- package/src/theme-editor.ts +2 -0
- package/src/theme-reference.ts +8 -0
- package/src/types/theme.ts +11 -0
- package/src/types.ts +22 -0
- package/src/ui.scroll.test.ts +554 -0
- package/src/ui.ts +223 -133
- package/src/utils/auto-follow.test.ts +110 -0
- package/src/utils/auto-follow.ts +112 -0
- package/src/utils/plugins.ts +1 -1
- package/src/utils/theme.test.ts +44 -8
- package/src/utils/theme.ts +11 -11
- package/src/utils/tokens.ts +137 -41
- package/widget.css +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -189,6 +189,7 @@ interface ColorPalette {
|
|
|
189
189
|
success: ColorShade;
|
|
190
190
|
warning: ColorShade;
|
|
191
191
|
error: ColorShade;
|
|
192
|
+
info: ColorShade;
|
|
192
193
|
[key: string]: ColorShade;
|
|
193
194
|
}
|
|
194
195
|
interface SpacingScale {
|
|
@@ -527,6 +528,13 @@ interface LabelButtonTokens {
|
|
|
527
528
|
fontSize?: string;
|
|
528
529
|
gap?: string;
|
|
529
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
|
+
}
|
|
530
538
|
/** Toggle group chrome (used by createToggleGroup). */
|
|
531
539
|
interface ToggleGroupTokens {
|
|
532
540
|
/** Gap between toggle buttons. Default: 0 (connected). */
|
|
@@ -553,6 +561,8 @@ interface ComponentTokens {
|
|
|
553
561
|
iconButton?: IconButtonTokens;
|
|
554
562
|
/** Label button styling tokens. */
|
|
555
563
|
labelButton?: LabelButtonTokens;
|
|
564
|
+
/** Scroll-to-bottom indicator styling tokens. */
|
|
565
|
+
scrollToBottom?: ScrollToBottomTokens;
|
|
556
566
|
/** Toggle group styling tokens. */
|
|
557
567
|
toggleGroup?: ToggleGroupTokens;
|
|
558
568
|
/** Artifact toolbar, tab strip, and pane chrome. */
|
|
@@ -1113,10 +1123,31 @@ type AgentWidgetArtifactsFeature = {
|
|
|
1113
1123
|
defaultRenderer: () => HTMLElement;
|
|
1114
1124
|
}) => HTMLElement | null;
|
|
1115
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
|
+
};
|
|
1116
1145
|
type AgentWidgetFeatureFlags = {
|
|
1117
1146
|
showReasoning?: boolean;
|
|
1118
1147
|
showToolCalls?: boolean;
|
|
1119
1148
|
showEventStreamToggle?: boolean;
|
|
1149
|
+
/** Shared transcript + event stream scroll-to-bottom affordance. */
|
|
1150
|
+
scrollToBottom?: AgentWidgetScrollToBottomFeature;
|
|
1120
1151
|
/** Configuration for the Event Stream inspector view */
|
|
1121
1152
|
eventStream?: EventStreamConfig;
|
|
1122
1153
|
/** Optional artifact sidebar (split pane / mobile drawer) */
|
|
@@ -5035,6 +5066,19 @@ declare const DEFAULT_PALETTE: {
|
|
|
5035
5066
|
800: string;
|
|
5036
5067
|
900: string;
|
|
5037
5068
|
};
|
|
5069
|
+
info: {
|
|
5070
|
+
50: string;
|
|
5071
|
+
100: string;
|
|
5072
|
+
200: string;
|
|
5073
|
+
300: string;
|
|
5074
|
+
400: string;
|
|
5075
|
+
500: string;
|
|
5076
|
+
600: string;
|
|
5077
|
+
700: string;
|
|
5078
|
+
800: string;
|
|
5079
|
+
900: string;
|
|
5080
|
+
950: string;
|
|
5081
|
+
};
|
|
5038
5082
|
};
|
|
5039
5083
|
spacing: {
|
|
5040
5084
|
0: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -189,6 +189,7 @@ interface ColorPalette {
|
|
|
189
189
|
success: ColorShade;
|
|
190
190
|
warning: ColorShade;
|
|
191
191
|
error: ColorShade;
|
|
192
|
+
info: ColorShade;
|
|
192
193
|
[key: string]: ColorShade;
|
|
193
194
|
}
|
|
194
195
|
interface SpacingScale {
|
|
@@ -527,6 +528,13 @@ interface LabelButtonTokens {
|
|
|
527
528
|
fontSize?: string;
|
|
528
529
|
gap?: string;
|
|
529
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
|
+
}
|
|
530
538
|
/** Toggle group chrome (used by createToggleGroup). */
|
|
531
539
|
interface ToggleGroupTokens {
|
|
532
540
|
/** Gap between toggle buttons. Default: 0 (connected). */
|
|
@@ -553,6 +561,8 @@ interface ComponentTokens {
|
|
|
553
561
|
iconButton?: IconButtonTokens;
|
|
554
562
|
/** Label button styling tokens. */
|
|
555
563
|
labelButton?: LabelButtonTokens;
|
|
564
|
+
/** Scroll-to-bottom indicator styling tokens. */
|
|
565
|
+
scrollToBottom?: ScrollToBottomTokens;
|
|
556
566
|
/** Toggle group styling tokens. */
|
|
557
567
|
toggleGroup?: ToggleGroupTokens;
|
|
558
568
|
/** Artifact toolbar, tab strip, and pane chrome. */
|
|
@@ -1113,10 +1123,31 @@ type AgentWidgetArtifactsFeature = {
|
|
|
1113
1123
|
defaultRenderer: () => HTMLElement;
|
|
1114
1124
|
}) => HTMLElement | null;
|
|
1115
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
|
+
};
|
|
1116
1145
|
type AgentWidgetFeatureFlags = {
|
|
1117
1146
|
showReasoning?: boolean;
|
|
1118
1147
|
showToolCalls?: boolean;
|
|
1119
1148
|
showEventStreamToggle?: boolean;
|
|
1149
|
+
/** Shared transcript + event stream scroll-to-bottom affordance. */
|
|
1150
|
+
scrollToBottom?: AgentWidgetScrollToBottomFeature;
|
|
1120
1151
|
/** Configuration for the Event Stream inspector view */
|
|
1121
1152
|
eventStream?: EventStreamConfig;
|
|
1122
1153
|
/** Optional artifact sidebar (split pane / mobile drawer) */
|
|
@@ -5035,6 +5066,19 @@ declare const DEFAULT_PALETTE: {
|
|
|
5035
5066
|
800: string;
|
|
5036
5067
|
900: string;
|
|
5037
5068
|
};
|
|
5069
|
+
info: {
|
|
5070
|
+
50: string;
|
|
5071
|
+
100: string;
|
|
5072
|
+
200: string;
|
|
5073
|
+
300: string;
|
|
5074
|
+
400: string;
|
|
5075
|
+
500: string;
|
|
5076
|
+
600: string;
|
|
5077
|
+
700: string;
|
|
5078
|
+
800: string;
|
|
5079
|
+
900: string;
|
|
5080
|
+
950: string;
|
|
5081
|
+
};
|
|
5038
5082
|
};
|
|
5039
5083
|
spacing: {
|
|
5040
5084
|
0: string;
|