@runtypelabs/persona 4.9.0 → 4.10.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/README.md +13 -1
- package/dist/codegen.cjs +1 -1
- package/dist/codegen.js +1 -1
- package/dist/index.cjs +68 -68
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.global.js +46 -46
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +58 -58
- package/dist/index.js.map +1 -1
- package/dist/launcher.global.js +2 -2
- package/dist/launcher.global.js.map +1 -1
- package/dist/theme-editor-preview.cjs +61 -61
- package/dist/theme-editor-preview.d.cts +12 -1
- package/dist/theme-editor-preview.d.ts +12 -1
- package/dist/theme-editor-preview.js +47 -47
- package/dist/widget.css +1 -1
- package/package.json +1 -1
- package/src/components/artifact-pane.test.ts +47 -0
- package/src/components/artifact-pane.ts +25 -2
- package/src/index-core.ts +1 -0
- package/src/runtime/init-update-reset.test.ts +81 -0
- package/src/runtime/init.test.ts +62 -0
- package/src/runtime/init.ts +7 -14
- package/src/styles/widget.css +14 -0
- package/src/types.ts +17 -0
- package/src/ui.artifact-pane-gating.test.ts +11 -1
- package/src/ui.attachments-drop.test.ts +90 -0
- package/src/ui.header-update-stability.test.ts +149 -0
- package/src/ui.launcher-update-merge.test.ts +83 -0
- package/src/ui.send-button-stream-update.test.ts +69 -0
- package/src/ui.ts +78 -33
- package/src/utils/config-merge.test.ts +131 -0
- package/src/utils/config-merge.ts +61 -0
- package/src/utils/theme.test.ts +26 -0
- package/src/utils/theme.ts +6 -3
|
@@ -6660,6 +6660,17 @@ type AgentWidgetConfig = {
|
|
|
6660
6660
|
*/
|
|
6661
6661
|
loadingIndicator?: AgentWidgetLoadingIndicatorConfig;
|
|
6662
6662
|
};
|
|
6663
|
+
/**
|
|
6664
|
+
* Patch-aware deep-partial of {@link AgentWidgetConfig} accepted by `update()`.
|
|
6665
|
+
* Function types and arrays are preserved whole (not mapped over); plain-object
|
|
6666
|
+
* leaves recurse so a partial patch merges into the live config. See the merge
|
|
6667
|
+
* policy in utils/config-merge.ts (some plain-object fields still replace
|
|
6668
|
+
* wholesale at runtime; that is not encoded at the type level).
|
|
6669
|
+
*/
|
|
6670
|
+
type AgentWidgetConfigPatch = ConfigPatch<AgentWidgetConfig>;
|
|
6671
|
+
type ConfigPatch<T> = T extends (...args: never[]) => unknown ? T : T extends readonly unknown[] ? T : T extends object ? {
|
|
6672
|
+
[K in keyof T]?: ConfigPatch<T[K]>;
|
|
6673
|
+
} : T;
|
|
6663
6674
|
type AgentWidgetMessageRole = "user" | "assistant" | "system";
|
|
6664
6675
|
type AgentWidgetReasoning = {
|
|
6665
6676
|
id: string;
|
|
@@ -7135,7 +7146,7 @@ type NPSFeedbackOptions = {
|
|
|
7135
7146
|
};
|
|
7136
7147
|
|
|
7137
7148
|
type Controller = {
|
|
7138
|
-
update: (config:
|
|
7149
|
+
update: (config: AgentWidgetConfigPatch) => void;
|
|
7139
7150
|
destroy: () => void;
|
|
7140
7151
|
open: () => void;
|
|
7141
7152
|
close: () => void;
|
|
@@ -6660,6 +6660,17 @@ type AgentWidgetConfig = {
|
|
|
6660
6660
|
*/
|
|
6661
6661
|
loadingIndicator?: AgentWidgetLoadingIndicatorConfig;
|
|
6662
6662
|
};
|
|
6663
|
+
/**
|
|
6664
|
+
* Patch-aware deep-partial of {@link AgentWidgetConfig} accepted by `update()`.
|
|
6665
|
+
* Function types and arrays are preserved whole (not mapped over); plain-object
|
|
6666
|
+
* leaves recurse so a partial patch merges into the live config. See the merge
|
|
6667
|
+
* policy in utils/config-merge.ts (some plain-object fields still replace
|
|
6668
|
+
* wholesale at runtime; that is not encoded at the type level).
|
|
6669
|
+
*/
|
|
6670
|
+
type AgentWidgetConfigPatch = ConfigPatch<AgentWidgetConfig>;
|
|
6671
|
+
type ConfigPatch<T> = T extends (...args: never[]) => unknown ? T : T extends readonly unknown[] ? T : T extends object ? {
|
|
6672
|
+
[K in keyof T]?: ConfigPatch<T[K]>;
|
|
6673
|
+
} : T;
|
|
6663
6674
|
type AgentWidgetMessageRole = "user" | "assistant" | "system";
|
|
6664
6675
|
type AgentWidgetReasoning = {
|
|
6665
6676
|
id: string;
|
|
@@ -7135,7 +7146,7 @@ type NPSFeedbackOptions = {
|
|
|
7135
7146
|
};
|
|
7136
7147
|
|
|
7137
7148
|
type Controller = {
|
|
7138
|
-
update: (config:
|
|
7149
|
+
update: (config: AgentWidgetConfigPatch) => void;
|
|
7139
7150
|
destroy: () => void;
|
|
7140
7151
|
open: () => void;
|
|
7141
7152
|
close: () => void;
|