@helpai/elements 0.20.0 → 0.21.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/configurator.mjs +145 -158
- package/elements-web-component.esm.js +27 -27
- package/elements-web-component.esm.js.map +4 -4
- package/elements.cjs.js +27 -27
- package/elements.cjs.js.map +4 -4
- package/elements.esm.js +27 -27
- package/elements.esm.js.map +4 -4
- package/elements.js +27 -27
- package/elements.js.map +4 -4
- package/index.d.ts +1 -18
- package/index.mjs +4 -77
- package/package.json +1 -1
- package/schema.d.ts +50 -71
- package/schema.json +0 -72
- package/schema.mjs +147 -163
- package/style.css +1 -1
- package/web-component.mjs +4 -77
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, L as Link, S as ServerConfig, b as SiteConfig, c as StartConversationResponse, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, L as Link, S as ServerConfig, b as SiteConfig, c as StartConversationResponse, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial } from './deployment-CA9yYj8Y.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -331,20 +331,6 @@ type ThemePreference = "auto" | "light" | "dark";
|
|
|
331
331
|
* whole.
|
|
332
332
|
*/
|
|
333
333
|
type ResponseMode = "streaming" | "buffered";
|
|
334
|
-
/**
|
|
335
|
-
* How welcome messages (pushed by the server via `connect`) render.
|
|
336
|
-
*
|
|
337
|
-
* - `'typewriter'` (default) — each message types in character by character.
|
|
338
|
-
* - `'instant'` — messages appear whole the moment they arrive.
|
|
339
|
-
*/
|
|
340
|
-
type WelcomeAnimation = "typewriter" | "instant";
|
|
341
|
-
/** Welcome-message rendering options. */
|
|
342
|
-
interface WelcomeOptions {
|
|
343
|
-
/** Render style for welcome messages. Default: `'typewriter'`. */
|
|
344
|
-
animation?: WelcomeAnimation;
|
|
345
|
-
/** Typewriter speed in characters per second. Default: `60`. */
|
|
346
|
-
speed?: number;
|
|
347
|
-
}
|
|
348
334
|
/**
|
|
349
335
|
* Identifiers for every header action the widget can render.
|
|
350
336
|
*
|
|
@@ -1054,7 +1040,6 @@ interface ChatWidgetOptions {
|
|
|
1054
1040
|
launcher?: LauncherOptions;
|
|
1055
1041
|
header?: HeaderOptions;
|
|
1056
1042
|
composer?: ComposerOptions;
|
|
1057
|
-
welcome?: WelcomeOptions;
|
|
1058
1043
|
feedback?: FeedbackOptions;
|
|
1059
1044
|
i18n?: I18nOptions;
|
|
1060
1045
|
footer?: FooterOptions;
|
|
@@ -1107,7 +1092,6 @@ interface ResolvedOptions {
|
|
|
1107
1092
|
* when the resolved URL is empty).
|
|
1108
1093
|
*/
|
|
1109
1094
|
popOutUrl: string;
|
|
1110
|
-
welcome: Required<WelcomeOptions>;
|
|
1111
1095
|
features: Required<Omit<FeatureFlags, "tools">> & {
|
|
1112
1096
|
tools?: Array<string | ToolRef>;
|
|
1113
1097
|
};
|
|
@@ -1185,7 +1169,6 @@ interface ServerConfig {
|
|
|
1185
1169
|
launcher?: LauncherOptions;
|
|
1186
1170
|
header?: HeaderOptions;
|
|
1187
1171
|
composer?: ComposerOptions;
|
|
1188
|
-
welcome?: WelcomeOptions;
|
|
1189
1172
|
feedback?: FeedbackOptions;
|
|
1190
1173
|
i18n?: I18nOptions;
|
|
1191
1174
|
footer?: FooterOptions;
|
package/index.mjs
CHANGED
|
@@ -462,7 +462,6 @@ var DEFAULT_ATTACHMENTS = {
|
|
|
462
462
|
maxCount: 10,
|
|
463
463
|
accept: "*/*"
|
|
464
464
|
};
|
|
465
|
-
var DEFAULT_WELCOME = { animation: "instant", speed: 60 };
|
|
466
465
|
var DEFAULT_FEATURES = {
|
|
467
466
|
files: true,
|
|
468
467
|
voice: "local",
|
|
@@ -532,7 +531,6 @@ function resolveOptions(rawOpts) {
|
|
|
532
531
|
showReasoning: behavior.showReasoning ?? false,
|
|
533
532
|
showToolCalls: behavior.showToolCalls ?? false,
|
|
534
533
|
popOutUrl: behavior.popOutUrl ?? BRAND.standaloneUrl,
|
|
535
|
-
welcome: { ...DEFAULT_WELCOME, ...opts.welcome },
|
|
536
534
|
features: {
|
|
537
535
|
files: opts.features?.files ?? DEFAULT_FEATURES.files,
|
|
538
536
|
voice: opts.features?.voice ?? DEFAULT_FEATURES.voice,
|
|
@@ -734,7 +732,6 @@ var SECTION_KEYS = [
|
|
|
734
732
|
"launcher",
|
|
735
733
|
"header",
|
|
736
734
|
"composer",
|
|
737
|
-
"welcome",
|
|
738
735
|
"feedback",
|
|
739
736
|
"i18n",
|
|
740
737
|
"footer",
|
|
@@ -925,7 +922,7 @@ function bindHostCommands(host, handlers) {
|
|
|
925
922
|
}
|
|
926
923
|
|
|
927
924
|
// src/styles/tokens.css
|
|
928
|
-
var tokens_default = ':host{--__P__-accent-user: __BRAND_ACCENT__;--__P__-accent: var(--__P__-accent-user);--__P__-accent-text: __BRAND_ACCENT_TEXT__;--__P__-radius: __BRAND_RADIUS__;--__P__-radius-sm: 8px;--__P__-radius-md: 10px;--__P__-radius-lg: 16px;--__P__-font: __BRAND_FONT__;--__P__-font-display: var(--__P__-font);--__P__-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;--__P__-bg: oklch(1 0 0);--__P__-bg-elevated: oklch(.9789 .0029 278.3);--__P__-surface: var(--__P__-bg-elevated);--__P__-muted: var(--__P__-fg-muted);--__P__-hover: oklch(.1686 .011 278.3 / .06);--__P__-fg: oklch(.1686 .011 278.3);--__P__-fg-muted: oklch(.4932 .0301 278.3);--__P__-border: oklch(.9312 .0084 278.3);--__P__-border-strong: oklch(.8757 .0131 278.3);--__P__-bubble-user: var(--__P__-accent);--__P__-bubble-user-text: var(--__P__-accent-text);--__P__-bubble-assistant: oklch(.9638 .0058 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-on-accent: var(--__P__-accent-text);--__P__-success: oklch(.6456 .1654 151.53);--__P__-warning: oklch(.7135 .1494 74.05);--__P__-danger: oklch(.5966 .1818 24.51);--__P__-danger-text: oklch(.5054 .1905 27.52);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .1);--__P__-neutral: oklch(.7137 .0192 278.3);--__P__-focus: var(--__P__-accent);--__P__-shadow-panel: 0 8px 24px -8px rgba(13, 15, 20, .18), 0 24px 64px -24px rgba(13, 15, 20, .24);--__P__-shadow-card: 0 1px 2px rgba(13, 15, 20, .06), 0 4px 12px -6px rgba(13, 15, 20, .12);--__P__-backdrop: oklch(.1686 .011 278.3 / .55);--__P__-shadow-fab: 0 6px 16px -4px color-mix(in oklch, var(--__P__-accent) 45%, transparent), 0 12px 32px -12px rgba(13, 15, 20, .25);--__P__-z-fab: 2147483600;--__P__-z-panel: 2147483601;--__P__-panel-w: 380px;--__P__-panel-h: 600px;--__P__-fab-size: 56px;--__P__-space-1: 4px;--__P__-space-2: 8px;--__P__-space-3: 12px;--__P__-space-4: 16px;--__P__-space-5: 20px;--__P__-space-6: 24px;--__P__-space-8: 32px;--__P__-text-scale: 1;--__P__-text-xs: calc(12px * var(--__P__-text-scale));--__P__-text-sm: calc(13px * var(--__P__-text-scale));--__P__-text-base: calc(15px * var(--__P__-text-scale));--__P__-text-md: calc(16px * var(--__P__-text-scale));--__P__-text-lg: calc(18px * var(--__P__-text-scale));--__P__-text-xl: calc(22px * var(--__P__-text-scale));--__P__-text-2xl: calc(30px * var(--__P__-text-scale))}:host([data-text-size="small"]){--__P__-text-scale: .9}:host([data-text-size="large"]){--__P__-text-scale: 1.15}:host{--__P__-ease: cubic-bezier(.2, .7, .2, 1);--__P__-ease-out: cubic-bezier(.2, .7, .2, 1);--__P__-ease-in: cubic-bezier(.4, 0, 1, 1);--__P__-ease-in-out: cubic-bezier(.65, 0, .35, 1);--__P__-dur-quick: .12s;--__P__-dur-base: .22s;--__P__-dur-slow: .32s;font-family:var(--__P__-font);color:var(--__P__-fg);color-scheme:light;--__P__-color-scheme: light}:host([data-theme="dark"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-danger-text: oklch(.8077 .1035 19.57);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .18);--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);--__P__-shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px -6px rgba(0, 0, 0, .5);--__P__-backdrop: rgba(0, 0, 0, .65);color-scheme:dark;--__P__-color-scheme: dark}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);color-scheme:dark;--__P__-color-scheme: dark}}@supports (color: oklch(from red l c h)){:host{--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.3, l, .62) c h);--__P__-accent-text: oklch(from var(--__P__-accent) clamp(0, (l / .623 - 1) * -infinity, 1) 0 h)}:host([data-theme="dark"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h)}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h)}}}@media(prefers-reduced-motion:reduce){:host{--__P__-dur-quick: 1ms;--__P__-dur-base: 1ms;--__P__-dur-slow: 1ms}}\n';
|
|
925
|
+
var tokens_default = ':host{--__P__-accent-user: __BRAND_ACCENT__;--__P__-accent: var(--__P__-accent-user);--__P__-accent-text-user: __BRAND_ACCENT_TEXT__;--__P__-accent-text: var(--__P__-accent-text-user);--__P__-radius: __BRAND_RADIUS__;--__P__-radius-sm: 8px;--__P__-radius-md: 10px;--__P__-radius-lg: 16px;--__P__-font: __BRAND_FONT__;--__P__-font-display: var(--__P__-font);--__P__-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;--__P__-bg: oklch(1 0 0);--__P__-bg-elevated: oklch(.9789 .0029 278.3);--__P__-surface: var(--__P__-bg-elevated);--__P__-muted: var(--__P__-fg-muted);--__P__-hover: oklch(.1686 .011 278.3 / .06);--__P__-fg: oklch(.1686 .011 278.3);--__P__-fg-muted: oklch(.4932 .0301 278.3);--__P__-border: oklch(.9312 .0084 278.3);--__P__-border-strong: oklch(.8757 .0131 278.3);--__P__-bubble-user: var(--__P__-accent);--__P__-bubble-user-text: var(--__P__-accent-text);--__P__-bubble-assistant: oklch(.9638 .0058 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-on-accent: var(--__P__-accent-text);--__P__-success: oklch(.6456 .1654 151.53);--__P__-warning: oklch(.7135 .1494 74.05);--__P__-danger: oklch(.5966 .1818 24.51);--__P__-danger-text: oklch(.5054 .1905 27.52);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .1);--__P__-neutral: oklch(.7137 .0192 278.3);--__P__-focus: var(--__P__-accent);--__P__-shadow-panel: 0 8px 24px -8px rgba(13, 15, 20, .18), 0 24px 64px -24px rgba(13, 15, 20, .24);--__P__-shadow-card: 0 1px 2px rgba(13, 15, 20, .06), 0 4px 12px -6px rgba(13, 15, 20, .12);--__P__-backdrop: oklch(.1686 .011 278.3 / .55);--__P__-shadow-fab: 0 6px 16px -4px color-mix(in oklch, var(--__P__-accent) 45%, transparent), 0 12px 32px -12px rgba(13, 15, 20, .25);--__P__-z-fab: 2147483600;--__P__-z-panel: 2147483601;--__P__-panel-w: 380px;--__P__-panel-h: 600px;--__P__-fab-size: 56px;--__P__-space-1: 4px;--__P__-space-2: 8px;--__P__-space-3: 12px;--__P__-space-4: 16px;--__P__-space-5: 20px;--__P__-space-6: 24px;--__P__-space-8: 32px;--__P__-text-scale: 1;--__P__-text-xs: calc(12px * var(--__P__-text-scale));--__P__-text-sm: calc(13px * var(--__P__-text-scale));--__P__-text-base: calc(15px * var(--__P__-text-scale));--__P__-text-md: calc(16px * var(--__P__-text-scale));--__P__-text-lg: calc(18px * var(--__P__-text-scale));--__P__-text-xl: calc(22px * var(--__P__-text-scale));--__P__-text-2xl: calc(30px * var(--__P__-text-scale))}:host([data-text-size="small"]){--__P__-text-scale: .9}:host([data-text-size="large"]){--__P__-text-scale: 1.15}:host{--__P__-ease: cubic-bezier(.2, .7, .2, 1);--__P__-ease-out: cubic-bezier(.2, .7, .2, 1);--__P__-ease-in: cubic-bezier(.4, 0, 1, 1);--__P__-ease-in-out: cubic-bezier(.65, 0, .35, 1);--__P__-dur-quick: .12s;--__P__-dur-base: .22s;--__P__-dur-slow: .32s;font-family:var(--__P__-font);color:var(--__P__-fg);color-scheme:light;--__P__-color-scheme: light}:host([data-theme="dark"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-danger-text: oklch(.8077 .1035 19.57);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .18);--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);--__P__-shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px -6px rgba(0, 0, 0, .5);--__P__-backdrop: rgba(0, 0, 0, .65);color-scheme:dark;--__P__-color-scheme: dark}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);color-scheme:dark;--__P__-color-scheme: dark}}@supports (color: oklch(from red l c h)){:host{--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.3, l, .62) c h);--__P__-accent-text: oklch(from var(--__P__-accent) clamp(0, (l / .623 - 1) * -infinity, 1) 0 h)}:host([data-theme="dark"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h)}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h)}}}@media(prefers-reduced-motion:reduce){:host{--__P__-dur-quick: 1ms;--__P__-dur-base: 1ms;--__P__-dur-slow: 1ms}}\n';
|
|
929
926
|
|
|
930
927
|
// src/styles/reset.css
|
|
931
928
|
var reset_default = '*,*:before,*:after{box-sizing:border-box;margin:0;padding:0;border:0}button{font:inherit;color:inherit;background:none;cursor:pointer;-webkit-appearance:none;appearance:none;line-height:1}button:focus-visible,[tabindex]:focus-visible,textarea:focus-visible,input:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}textarea,input{font:inherit;color:inherit;background:none;border:0;outline:0;resize:none}a{color:var(--__P__-accent);text-decoration:underline;text-underline-offset:2px}img,svg{display:block;max-width:100%}ul,ol{list-style:none}.__P__-app{display:block;width:100%;height:100%;font-family:var(--__P__-font);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"cv11","ss01","ss03"}.__P__-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n';
|
|
@@ -1021,7 +1018,7 @@ function attachAdoptedSheet(shadow, doc) {
|
|
|
1021
1018
|
function applyThemeOverrides(host, overrides) {
|
|
1022
1019
|
const p33 = BRAND.cssPrefix;
|
|
1023
1020
|
if (overrides.accent) host.style.setProperty(`--${p33}-accent-user`, overrides.accent);
|
|
1024
|
-
if (overrides.accentText) host.style.setProperty(`--${p33}-accent-text`, overrides.accentText);
|
|
1021
|
+
if (overrides.accentText) host.style.setProperty(`--${p33}-accent-text-user`, overrides.accentText);
|
|
1025
1022
|
if (overrides.radius) host.style.setProperty(`--${p33}-radius`, overrides.radius);
|
|
1026
1023
|
if (overrides.fontFamily) host.style.setProperty(`--${p33}-font`, overrides.fontFamily);
|
|
1027
1024
|
}
|
|
@@ -1860,15 +1857,6 @@ function makeAssistantMessage() {
|
|
|
1860
1857
|
partsSig: signal([])
|
|
1861
1858
|
};
|
|
1862
1859
|
}
|
|
1863
|
-
function makeTypewriterMessage(m) {
|
|
1864
|
-
return {
|
|
1865
|
-
id: m.id,
|
|
1866
|
-
role: m.role,
|
|
1867
|
-
createdAt: Date.now(),
|
|
1868
|
-
status: "streaming",
|
|
1869
|
-
partsSig: signal([{ kind: "text", id: `${m.id}-t0`, textSig: signal(""), doneSig: signal(false) }])
|
|
1870
|
-
};
|
|
1871
|
-
}
|
|
1872
1860
|
function makeInstantWelcomeMessage(m) {
|
|
1873
1861
|
return toReactive({
|
|
1874
1862
|
id: m.id,
|
|
@@ -6254,55 +6242,6 @@ function ModulesEmpty({ strings, onClose }) {
|
|
|
6254
6242
|
);
|
|
6255
6243
|
}
|
|
6256
6244
|
|
|
6257
|
-
// src/ui/welcome-animator.ts
|
|
6258
|
-
async function animateWelcomeSequence(reactives, payloads, charsPerSecond, abort) {
|
|
6259
|
-
for (let i = 0; i < reactives.length; i++) {
|
|
6260
|
-
if (abort.aborted) return;
|
|
6261
|
-
const msg = reactives[i];
|
|
6262
|
-
const payload = payloads[i];
|
|
6263
|
-
if (!msg || !payload) continue;
|
|
6264
|
-
await animateTypewriter(msg, payload.text, charsPerSecond, abort);
|
|
6265
|
-
}
|
|
6266
|
-
}
|
|
6267
|
-
function animateTypewriter(msg, text, charsPerSecond, abort) {
|
|
6268
|
-
return new Promise((resolve) => {
|
|
6269
|
-
const part = msg.partsSig.value[0];
|
|
6270
|
-
if (!part || part.kind !== "text") {
|
|
6271
|
-
resolve();
|
|
6272
|
-
return;
|
|
6273
|
-
}
|
|
6274
|
-
const finish = () => {
|
|
6275
|
-
part.textSig.value = text;
|
|
6276
|
-
part.doneSig.value = true;
|
|
6277
|
-
msg.status = "complete";
|
|
6278
|
-
msg.partsSig.value = [...msg.partsSig.value];
|
|
6279
|
-
resolve();
|
|
6280
|
-
};
|
|
6281
|
-
if (typeof requestAnimationFrame === "undefined") {
|
|
6282
|
-
finish();
|
|
6283
|
-
return;
|
|
6284
|
-
}
|
|
6285
|
-
const totalMs = text.length / Math.max(1, charsPerSecond) * 1e3;
|
|
6286
|
-
const start = performance.now();
|
|
6287
|
-
const tick = (now) => {
|
|
6288
|
-
if (abort.aborted) return finish();
|
|
6289
|
-
const progress = totalMs === 0 ? 1 : Math.min(1, (now - start) / totalMs);
|
|
6290
|
-
part.textSig.value = text.slice(0, Math.floor(progress * text.length));
|
|
6291
|
-
if (progress >= 1) return finish();
|
|
6292
|
-
rafId = requestAnimationFrame(tick);
|
|
6293
|
-
};
|
|
6294
|
-
let rafId = requestAnimationFrame(tick);
|
|
6295
|
-
abort.addEventListener(
|
|
6296
|
-
"abort",
|
|
6297
|
-
() => {
|
|
6298
|
-
cancelAnimationFrame(rafId);
|
|
6299
|
-
finish();
|
|
6300
|
-
},
|
|
6301
|
-
{ once: true }
|
|
6302
|
-
);
|
|
6303
|
-
});
|
|
6304
|
-
}
|
|
6305
|
-
|
|
6306
6245
|
// src/ui/use-launcher-callout.ts
|
|
6307
6246
|
import { useCallback as useCallback5, useEffect as useEffect16, useState as useState12 } from "preact/hooks";
|
|
6308
6247
|
function useLauncherCallout({ callout, persistence }) {
|
|
@@ -6381,7 +6320,6 @@ function App({ options, hostElement, bus }) {
|
|
|
6381
6320
|
const [agent, setAgent] = useState13(null);
|
|
6382
6321
|
const [suggestions, setSuggestions] = useState13([]);
|
|
6383
6322
|
const [activeCancel, setActiveCancel] = useState13(null);
|
|
6384
|
-
const welcomeAbortRef = useRef9(null);
|
|
6385
6323
|
const [parsedSite, setParsedSite] = useState13(void 0);
|
|
6386
6324
|
const [parsedBlocks, setParsedBlocks] = useState13(void 0);
|
|
6387
6325
|
const [sidebarCollapsed, setSidebarCollapsed] = useState13(() => persistence.loadSidebarCollapsed() ?? false);
|
|
@@ -6465,19 +6403,9 @@ function App({ options, hostElement, bus }) {
|
|
|
6465
6403
|
const playWelcome = useCallback6(
|
|
6466
6404
|
(welcomeMessages) => {
|
|
6467
6405
|
if (!welcomeMessages || welcomeMessages.length === 0) return;
|
|
6468
|
-
|
|
6469
|
-
if (animation === "instant") {
|
|
6470
|
-
messagesSig.value = welcomeMessages.map(makeInstantWelcomeMessage);
|
|
6471
|
-
return;
|
|
6472
|
-
}
|
|
6473
|
-
welcomeAbortRef.current?.abort();
|
|
6474
|
-
const ctrl = new AbortController();
|
|
6475
|
-
welcomeAbortRef.current = ctrl;
|
|
6476
|
-
const reactives = welcomeMessages.map(makeTypewriterMessage);
|
|
6477
|
-
messagesSig.value = reactives;
|
|
6478
|
-
void animateWelcomeSequence(reactives, welcomeMessages, speed, ctrl.signal);
|
|
6406
|
+
messagesSig.value = welcomeMessages.map(makeInstantWelcomeMessage);
|
|
6479
6407
|
},
|
|
6480
|
-
[messagesSig
|
|
6408
|
+
[messagesSig]
|
|
6481
6409
|
);
|
|
6482
6410
|
const connectGenRef = useRef9(0);
|
|
6483
6411
|
const runStartConversation = useCallback6(
|
|
@@ -6916,7 +6844,6 @@ function App({ options, hostElement, bus }) {
|
|
|
6916
6844
|
log16.info("clear \u2192 new conversation", { wasStreaming: streaming });
|
|
6917
6845
|
bus.emit("clear", void 0);
|
|
6918
6846
|
if (streaming) activeCancel?.();
|
|
6919
|
-
welcomeAbortRef.current?.abort();
|
|
6920
6847
|
messagesSig.value = [];
|
|
6921
6848
|
conversationIdSig.value = void 0;
|
|
6922
6849
|
persistence.clearConversation();
|
package/package.json
CHANGED
package/schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, L as Link, P as PAGE_AREA_SUGGESTIONS, g as PageContext, S as ServerConfig, b as SiteConfig, c as StartConversationResponse, U as UserContext, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial, h as assetSchema, i as blocksConfigSchema, j as connectionConfigPartialSchema, k as connectionConfigSchema, l as cssColorSchema, m as cssLengthSchema, n as endpointsSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, t as startConversationResponseSchema, u as userContextSchema, v as uuid7Schema, w as widgetConfigPartialSchema, x as widgetConfigSchema, y as widgetSettingsPartialSchema, z as widgetSettingsSchema } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, L as Link, P as PAGE_AREA_SUGGESTIONS, g as PageContext, S as ServerConfig, b as SiteConfig, c as StartConversationResponse, U as UserContext, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial, h as assetSchema, i as blocksConfigSchema, j as connectionConfigPartialSchema, k as connectionConfigSchema, l as cssColorSchema, m as cssLengthSchema, n as endpointsSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, t as startConversationResponseSchema, u as userContextSchema, v as uuid7Schema, w as widgetConfigPartialSchema, x as widgetConfigSchema, y as widgetSettingsPartialSchema, z as widgetSettingsSchema } from './deployment-CA9yYj8Y.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -56,9 +56,9 @@ declare const presentationSchema: z.ZodObject<{
|
|
|
56
56
|
inset: z.ZodOptional<z.ZodString>;
|
|
57
57
|
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
58
58
|
fullscreen: "fullscreen";
|
|
59
|
+
normal: "normal";
|
|
59
60
|
expanded: "expanded";
|
|
60
61
|
auto: "auto";
|
|
61
|
-
normal: "normal";
|
|
62
62
|
}>>;
|
|
63
63
|
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
64
64
|
}, z.core.$loose>>;
|
|
@@ -148,9 +148,9 @@ declare const launcherSizeSchema: z.ZodEnum<{
|
|
|
148
148
|
}>;
|
|
149
149
|
type LauncherSize = z.infer<typeof launcherSizeSchema>;
|
|
150
150
|
declare const calloutShapeSchema: z.ZodEnum<{
|
|
151
|
-
callout: "callout";
|
|
152
151
|
pill: "pill";
|
|
153
152
|
bubble: "bubble";
|
|
153
|
+
callout: "callout";
|
|
154
154
|
}>;
|
|
155
155
|
type CalloutShape = z.infer<typeof calloutShapeSchema>;
|
|
156
156
|
declare const calloutPositionSchema: z.ZodEnum<{
|
|
@@ -162,9 +162,9 @@ type CalloutPosition = z.infer<typeof calloutPositionSchema>;
|
|
|
162
162
|
declare const launcherCalloutSchema: z.ZodObject<{
|
|
163
163
|
text: z.ZodDefault<z.ZodString>;
|
|
164
164
|
shape: z.ZodDefault<z.ZodEnum<{
|
|
165
|
-
callout: "callout";
|
|
166
165
|
pill: "pill";
|
|
167
166
|
bubble: "bubble";
|
|
167
|
+
callout: "callout";
|
|
168
168
|
}>>;
|
|
169
169
|
position: z.ZodDefault<z.ZodEnum<{
|
|
170
170
|
auto: "auto";
|
|
@@ -195,9 +195,9 @@ declare const launcherOptionsSchema: z.ZodObject<{
|
|
|
195
195
|
callout: z.ZodOptional<z.ZodObject<{
|
|
196
196
|
text: z.ZodDefault<z.ZodString>;
|
|
197
197
|
shape: z.ZodDefault<z.ZodEnum<{
|
|
198
|
-
callout: "callout";
|
|
199
198
|
pill: "pill";
|
|
200
199
|
bubble: "bubble";
|
|
200
|
+
callout: "callout";
|
|
201
201
|
}>>;
|
|
202
202
|
position: z.ZodDefault<z.ZodEnum<{
|
|
203
203
|
auto: "auto";
|
|
@@ -240,9 +240,9 @@ type LauncherOptions = z.infer<typeof launcherOptionsSchema>;
|
|
|
240
240
|
|
|
241
241
|
declare const initialSizeSchema: z.ZodEnum<{
|
|
242
242
|
fullscreen: "fullscreen";
|
|
243
|
+
normal: "normal";
|
|
243
244
|
expanded: "expanded";
|
|
244
245
|
auto: "auto";
|
|
245
|
-
normal: "normal";
|
|
246
246
|
}>;
|
|
247
247
|
declare const resizeOptionsSchema: z.ZodObject<{
|
|
248
248
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -269,9 +269,9 @@ declare const sizeOptionsSchema: z.ZodObject<{
|
|
|
269
269
|
inset: z.ZodOptional<z.ZodString>;
|
|
270
270
|
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
271
271
|
fullscreen: "fullscreen";
|
|
272
|
+
normal: "normal";
|
|
272
273
|
expanded: "expanded";
|
|
273
274
|
auto: "auto";
|
|
274
|
-
normal: "normal";
|
|
275
275
|
}>>;
|
|
276
276
|
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
277
277
|
}, z.core.$loose>;
|
|
@@ -323,43 +323,43 @@ type FeatureFlags = z.infer<typeof featureFlagsSchema>;
|
|
|
323
323
|
*/
|
|
324
324
|
|
|
325
325
|
declare const actionNameSchema: z.ZodEnum<{
|
|
326
|
-
close: "close";
|
|
327
326
|
expand: "expand";
|
|
328
327
|
fullscreen: "fullscreen";
|
|
329
328
|
popOut: "popOut";
|
|
330
|
-
|
|
331
|
-
theme: "theme";
|
|
329
|
+
close: "close";
|
|
332
330
|
language: "language";
|
|
331
|
+
theme: "theme";
|
|
333
332
|
textSize: "textSize";
|
|
334
333
|
history: "history";
|
|
334
|
+
clear: "clear";
|
|
335
335
|
sound: "sound";
|
|
336
336
|
}>;
|
|
337
337
|
type ActionName = z.infer<typeof actionNameSchema>;
|
|
338
338
|
declare const headerActionsSchema: z.ZodArray<z.ZodEnum<{
|
|
339
|
-
close: "close";
|
|
340
339
|
expand: "expand";
|
|
341
340
|
fullscreen: "fullscreen";
|
|
342
341
|
popOut: "popOut";
|
|
343
|
-
|
|
344
|
-
theme: "theme";
|
|
342
|
+
close: "close";
|
|
345
343
|
language: "language";
|
|
344
|
+
theme: "theme";
|
|
346
345
|
textSize: "textSize";
|
|
347
346
|
history: "history";
|
|
347
|
+
clear: "clear";
|
|
348
348
|
sound: "sound";
|
|
349
349
|
}>>;
|
|
350
350
|
type HeaderActions = z.infer<typeof headerActionsSchema>;
|
|
351
351
|
/** Section wrapper — `actions` list wrapped under `header` in the dashboard form. */
|
|
352
352
|
declare const headerSchema: z.ZodObject<{
|
|
353
353
|
actions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
354
|
-
close: "close";
|
|
355
354
|
expand: "expand";
|
|
356
355
|
fullscreen: "fullscreen";
|
|
357
356
|
popOut: "popOut";
|
|
358
|
-
|
|
359
|
-
theme: "theme";
|
|
357
|
+
close: "close";
|
|
360
358
|
language: "language";
|
|
359
|
+
theme: "theme";
|
|
361
360
|
textSize: "textSize";
|
|
362
361
|
history: "history";
|
|
362
|
+
clear: "clear";
|
|
363
363
|
sound: "sound";
|
|
364
364
|
}>>>;
|
|
365
365
|
}, z.core.$loose>;
|
|
@@ -375,33 +375,33 @@ type HeaderOptions = z.infer<typeof headerSchema>;
|
|
|
375
375
|
*/
|
|
376
376
|
|
|
377
377
|
declare const feedbackEventSchema: z.ZodEnum<{
|
|
378
|
-
voiceStart: "voiceStart";
|
|
379
|
-
voiceStop: "voiceStop";
|
|
380
378
|
error: "error";
|
|
381
379
|
messageReceived: "messageReceived";
|
|
382
380
|
messageSent: "messageSent";
|
|
381
|
+
voiceStart: "voiceStart";
|
|
382
|
+
voiceStop: "voiceStop";
|
|
383
383
|
}>;
|
|
384
384
|
type FeedbackEvent = z.infer<typeof feedbackEventSchema>;
|
|
385
385
|
declare const soundOptionsSchema: z.ZodObject<{
|
|
386
386
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
387
387
|
volume: z.ZodDefault<z.ZodNumber>;
|
|
388
388
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
389
|
-
voiceStart: "voiceStart";
|
|
390
|
-
voiceStop: "voiceStop";
|
|
391
389
|
error: "error";
|
|
392
390
|
messageReceived: "messageReceived";
|
|
393
391
|
messageSent: "messageSent";
|
|
392
|
+
voiceStart: "voiceStart";
|
|
393
|
+
voiceStop: "voiceStop";
|
|
394
394
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
395
395
|
}, z.core.$loose>;
|
|
396
396
|
type SoundOptions = z.infer<typeof soundOptionsSchema>;
|
|
397
397
|
declare const hapticsOptionsSchema: z.ZodObject<{
|
|
398
398
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
399
399
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
400
|
-
voiceStart: "voiceStart";
|
|
401
|
-
voiceStop: "voiceStop";
|
|
402
400
|
error: "error";
|
|
403
401
|
messageReceived: "messageReceived";
|
|
404
402
|
messageSent: "messageSent";
|
|
403
|
+
voiceStart: "voiceStart";
|
|
404
|
+
voiceStop: "voiceStop";
|
|
405
405
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
406
406
|
}, z.core.$loose>;
|
|
407
407
|
type HapticsOptions = z.infer<typeof hapticsOptionsSchema>;
|
|
@@ -410,21 +410,21 @@ declare const feedbackSchema: z.ZodObject<{
|
|
|
410
410
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
411
411
|
volume: z.ZodDefault<z.ZodNumber>;
|
|
412
412
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
413
|
-
voiceStart: "voiceStart";
|
|
414
|
-
voiceStop: "voiceStop";
|
|
415
413
|
error: "error";
|
|
416
414
|
messageReceived: "messageReceived";
|
|
417
415
|
messageSent: "messageSent";
|
|
416
|
+
voiceStart: "voiceStart";
|
|
417
|
+
voiceStop: "voiceStop";
|
|
418
418
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
419
419
|
}, z.core.$loose>>;
|
|
420
420
|
haptics: z.ZodOptional<z.ZodObject<{
|
|
421
421
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
422
422
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
423
|
-
voiceStart: "voiceStart";
|
|
424
|
-
voiceStop: "voiceStop";
|
|
425
423
|
error: "error";
|
|
426
424
|
messageReceived: "messageReceived";
|
|
427
425
|
messageSent: "messageSent";
|
|
426
|
+
voiceStart: "voiceStart";
|
|
427
|
+
voiceStop: "voiceStop";
|
|
428
428
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
429
429
|
}, z.core.$loose>>;
|
|
430
430
|
}, z.core.$loose>;
|
|
@@ -504,27 +504,6 @@ declare const composerOptionsSchema: z.ZodObject<{
|
|
|
504
504
|
}, z.core.$loose>;
|
|
505
505
|
type ComposerOptions = z.infer<typeof composerOptionsSchema>;
|
|
506
506
|
|
|
507
|
-
/**
|
|
508
|
-
* Welcome section — how the agent's greeting messages render when
|
|
509
|
-
* the chat opens. Content (the actual message text + suggestions)
|
|
510
|
-
* comes from the server's start-conversation response; this schema only
|
|
511
|
-
* governs the visual presentation (animation style + speed).
|
|
512
|
-
*/
|
|
513
|
-
|
|
514
|
-
declare const welcomeAnimationSchema: z.ZodEnum<{
|
|
515
|
-
typewriter: "typewriter";
|
|
516
|
-
instant: "instant";
|
|
517
|
-
}>;
|
|
518
|
-
type WelcomeAnimation = z.infer<typeof welcomeAnimationSchema>;
|
|
519
|
-
declare const welcomeOptionsSchema: z.ZodObject<{
|
|
520
|
-
animation: z.ZodDefault<z.ZodEnum<{
|
|
521
|
-
typewriter: "typewriter";
|
|
522
|
-
instant: "instant";
|
|
523
|
-
}>>;
|
|
524
|
-
speed: z.ZodDefault<z.ZodNumber>;
|
|
525
|
-
}, z.core.$loose>;
|
|
526
|
-
type WelcomeOptions = z.infer<typeof welcomeOptionsSchema>;
|
|
527
|
-
|
|
528
507
|
/**
|
|
529
508
|
* Footer section schemas — the area below the composer.
|
|
530
509
|
*
|
|
@@ -565,16 +544,16 @@ type FooterOptions = z.infer<typeof footerSchema>;
|
|
|
565
544
|
|
|
566
545
|
declare const fieldTypeSchema: z.ZodEnum<{
|
|
567
546
|
number: "number";
|
|
568
|
-
select: "select";
|
|
569
|
-
textarea: "textarea";
|
|
570
|
-
time: "time";
|
|
571
547
|
text: "text";
|
|
572
|
-
checkbox: "checkbox";
|
|
573
|
-
radio: "radio";
|
|
574
548
|
url: "url";
|
|
575
549
|
email: "email";
|
|
576
550
|
tel: "tel";
|
|
577
551
|
date: "date";
|
|
552
|
+
time: "time";
|
|
553
|
+
textarea: "textarea";
|
|
554
|
+
select: "select";
|
|
555
|
+
radio: "radio";
|
|
556
|
+
checkbox: "checkbox";
|
|
578
557
|
multiselect: "multiselect";
|
|
579
558
|
}>;
|
|
580
559
|
type FieldType = z.infer<typeof fieldTypeSchema>;
|
|
@@ -599,16 +578,16 @@ declare const formFieldSchema: z.ZodObject<{
|
|
|
599
578
|
label: z.ZodString;
|
|
600
579
|
type: z.ZodEnum<{
|
|
601
580
|
number: "number";
|
|
602
|
-
select: "select";
|
|
603
|
-
textarea: "textarea";
|
|
604
|
-
time: "time";
|
|
605
581
|
text: "text";
|
|
606
|
-
checkbox: "checkbox";
|
|
607
|
-
radio: "radio";
|
|
608
582
|
url: "url";
|
|
609
583
|
email: "email";
|
|
610
584
|
tel: "tel";
|
|
611
585
|
date: "date";
|
|
586
|
+
time: "time";
|
|
587
|
+
textarea: "textarea";
|
|
588
|
+
select: "select";
|
|
589
|
+
radio: "radio";
|
|
590
|
+
checkbox: "checkbox";
|
|
612
591
|
multiselect: "multiselect";
|
|
613
592
|
}>;
|
|
614
593
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
@@ -659,16 +638,16 @@ declare const formDefSchema: z.ZodObject<{
|
|
|
659
638
|
label: z.ZodString;
|
|
660
639
|
type: z.ZodEnum<{
|
|
661
640
|
number: "number";
|
|
662
|
-
select: "select";
|
|
663
|
-
textarea: "textarea";
|
|
664
|
-
time: "time";
|
|
665
641
|
text: "text";
|
|
666
|
-
checkbox: "checkbox";
|
|
667
|
-
radio: "radio";
|
|
668
642
|
url: "url";
|
|
669
643
|
email: "email";
|
|
670
644
|
tel: "tel";
|
|
671
645
|
date: "date";
|
|
646
|
+
time: "time";
|
|
647
|
+
textarea: "textarea";
|
|
648
|
+
select: "select";
|
|
649
|
+
radio: "radio";
|
|
650
|
+
checkbox: "checkbox";
|
|
672
651
|
multiselect: "multiselect";
|
|
673
652
|
}>;
|
|
674
653
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
@@ -717,16 +696,16 @@ declare const formsSchema: z.ZodArray<z.ZodObject<{
|
|
|
717
696
|
label: z.ZodString;
|
|
718
697
|
type: z.ZodEnum<{
|
|
719
698
|
number: "number";
|
|
720
|
-
select: "select";
|
|
721
|
-
textarea: "textarea";
|
|
722
|
-
time: "time";
|
|
723
699
|
text: "text";
|
|
724
|
-
checkbox: "checkbox";
|
|
725
|
-
radio: "radio";
|
|
726
700
|
url: "url";
|
|
727
701
|
email: "email";
|
|
728
702
|
tel: "tel";
|
|
729
703
|
date: "date";
|
|
704
|
+
time: "time";
|
|
705
|
+
textarea: "textarea";
|
|
706
|
+
select: "select";
|
|
707
|
+
radio: "radio";
|
|
708
|
+
checkbox: "checkbox";
|
|
730
709
|
multiselect: "multiselect";
|
|
731
710
|
}>;
|
|
732
711
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
@@ -798,18 +777,18 @@ type I18nOptions = z.infer<typeof i18nSchema>;
|
|
|
798
777
|
*/
|
|
799
778
|
|
|
800
779
|
declare const moduleLayoutSchema: z.ZodEnum<{
|
|
801
|
-
home: "home";
|
|
802
780
|
chat: "chat";
|
|
803
781
|
help: "help";
|
|
782
|
+
home: "home";
|
|
804
783
|
news: "news";
|
|
805
784
|
}>;
|
|
806
785
|
type ModuleLayout = z.infer<typeof moduleLayoutSchema>;
|
|
807
786
|
declare const moduleSchema: z.ZodObject<{
|
|
808
787
|
label: z.ZodString;
|
|
809
788
|
layout: z.ZodEnum<{
|
|
810
|
-
home: "home";
|
|
811
789
|
chat: "chat";
|
|
812
790
|
help: "help";
|
|
791
|
+
home: "home";
|
|
813
792
|
news: "news";
|
|
814
793
|
}>;
|
|
815
794
|
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -835,9 +814,9 @@ type ModuleOptions = z.infer<typeof moduleSchema>;
|
|
|
835
814
|
declare const modulesSchema: z.ZodArray<z.ZodObject<{
|
|
836
815
|
label: z.ZodString;
|
|
837
816
|
layout: z.ZodEnum<{
|
|
838
|
-
home: "home";
|
|
839
817
|
chat: "chat";
|
|
840
818
|
help: "help";
|
|
819
|
+
home: "home";
|
|
841
820
|
news: "news";
|
|
842
821
|
}>;
|
|
843
822
|
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -902,4 +881,4 @@ declare const ALL_MODES: readonly Mode[];
|
|
|
902
881
|
*/
|
|
903
882
|
declare function emitJsonSchema(): unknown;
|
|
904
883
|
|
|
905
|
-
export { ALL_MODES, type ActionName, type AttachmentLimits, type Behavior, type CalloutPosition, type CalloutShape, type ComposerOptions, type FeatureFlags, type FeedbackEvent, type FeedbackOptions, type FieldOption, type FieldType, type FieldValidation, type FooterOptions, type FormCondition, type FormDef, type FormField, type Forms, type HapticsOptions, type HeaderActions, type HeaderOptions, type I18nOptions, type LauncherCallout, type LauncherOptions, type LauncherSize, type LauncherVariant, type Mode, type ModuleLayout, type ModuleOptions, type ModulesOptions, type Position, type PoweredBy, type Presentation, type ResizeOptions, type ResponseMode, type SendButtonOptions, type SizeOptions, type SoundOptions, type StringsOverride, type ThemeOverrides, type ThemePreference, type VoiceMode,
|
|
884
|
+
export { ALL_MODES, type ActionName, type AttachmentLimits, type Behavior, type CalloutPosition, type CalloutShape, type ComposerOptions, type FeatureFlags, type FeedbackEvent, type FeedbackOptions, type FieldOption, type FieldType, type FieldValidation, type FooterOptions, type FormCondition, type FormDef, type FormField, type Forms, type HapticsOptions, type HeaderActions, type HeaderOptions, type I18nOptions, type LauncherCallout, type LauncherOptions, type LauncherSize, type LauncherVariant, type Mode, type ModuleLayout, type ModuleOptions, type ModulesOptions, type Position, type PoweredBy, type Presentation, type ResizeOptions, type ResponseMode, type SendButtonOptions, type SizeOptions, type SoundOptions, type StringsOverride, type ThemeOverrides, type ThemePreference, type VoiceMode, actionNameSchema, attachmentLimitsSchema, behaviorSchema, calloutPositionSchema, calloutShapeSchema, composerOptionsSchema, emitJsonSchema, featureFlagsSchema, feedbackEventSchema, feedbackSchema, fieldOptionSchema, fieldTypeSchema, fieldValidationSchema, footerSchema, formConditionSchema, formDefSchema, formFieldSchema, formTriggerSchema, formsSchema, hapticsOptionsSchema, headerActionsSchema, headerSchema, i18nSchema, initialSizeSchema, launcherCalloutSchema, launcherOptionsSchema, launcherSizeSchema, launcherVariantSchema, modeSchema, moduleLayoutSchema, moduleSchema, modulesSchema, positionSchema, poweredBySchema, presentationSchema, resizeOptionsSchema, responseModeSchema, sendButtonIconSchema, sendButtonOptionsSchema, sendButtonShapeSchema, sendButtonVariantSchema, sizeOptionsSchema, soundOptionsSchema, stringsOverrideSchema, themeFieldSchema, themeOverridesSchema, themePreferenceSchema, toolRefSchema, voiceModeSchema, widgetSettingsSchemaForMode };
|
package/schema.json
CHANGED
|
@@ -907,42 +907,6 @@
|
|
|
907
907
|
}
|
|
908
908
|
]
|
|
909
909
|
},
|
|
910
|
-
"welcome": {
|
|
911
|
-
"type": "object",
|
|
912
|
-
"properties": {
|
|
913
|
-
"animation": {
|
|
914
|
-
"default": "instant",
|
|
915
|
-
"description": "How welcome messages render — `typewriter` types each message in character-by-character; `instant` shows them whole.",
|
|
916
|
-
"type": "string",
|
|
917
|
-
"enum": [
|
|
918
|
-
"typewriter",
|
|
919
|
-
"instant"
|
|
920
|
-
]
|
|
921
|
-
},
|
|
922
|
-
"speed": {
|
|
923
|
-
"default": 60,
|
|
924
|
-
"description": "Typewriter speed in characters per second. Only meaningful when `animation = typewriter`.",
|
|
925
|
-
"type": "integer",
|
|
926
|
-
"minimum": 1,
|
|
927
|
-
"maximum": 2000
|
|
928
|
-
}
|
|
929
|
-
},
|
|
930
|
-
"required": [
|
|
931
|
-
"animation",
|
|
932
|
-
"speed"
|
|
933
|
-
],
|
|
934
|
-
"additionalProperties": {},
|
|
935
|
-
"description": "How welcome messages render — instant by default; opt into a typewriter effect with adjustable cps speed.",
|
|
936
|
-
"examples": [
|
|
937
|
-
{
|
|
938
|
-
"animation": "instant"
|
|
939
|
-
},
|
|
940
|
-
{
|
|
941
|
-
"animation": "typewriter",
|
|
942
|
-
"speed": 60
|
|
943
|
-
}
|
|
944
|
-
]
|
|
945
|
-
},
|
|
946
910
|
"feedback": {
|
|
947
911
|
"type": "object",
|
|
948
912
|
"properties": {
|
|
@@ -2661,42 +2625,6 @@
|
|
|
2661
2625
|
}
|
|
2662
2626
|
]
|
|
2663
2627
|
},
|
|
2664
|
-
"welcome": {
|
|
2665
|
-
"type": "object",
|
|
2666
|
-
"properties": {
|
|
2667
|
-
"animation": {
|
|
2668
|
-
"default": "instant",
|
|
2669
|
-
"description": "How welcome messages render — `typewriter` types each message in character-by-character; `instant` shows them whole.",
|
|
2670
|
-
"type": "string",
|
|
2671
|
-
"enum": [
|
|
2672
|
-
"typewriter",
|
|
2673
|
-
"instant"
|
|
2674
|
-
]
|
|
2675
|
-
},
|
|
2676
|
-
"speed": {
|
|
2677
|
-
"default": 60,
|
|
2678
|
-
"description": "Typewriter speed in characters per second. Only meaningful when `animation = typewriter`.",
|
|
2679
|
-
"type": "integer",
|
|
2680
|
-
"minimum": 1,
|
|
2681
|
-
"maximum": 2000
|
|
2682
|
-
}
|
|
2683
|
-
},
|
|
2684
|
-
"required": [
|
|
2685
|
-
"animation",
|
|
2686
|
-
"speed"
|
|
2687
|
-
],
|
|
2688
|
-
"additionalProperties": {},
|
|
2689
|
-
"description": "How welcome messages render — instant by default; opt into a typewriter effect with adjustable cps speed.",
|
|
2690
|
-
"examples": [
|
|
2691
|
-
{
|
|
2692
|
-
"animation": "instant"
|
|
2693
|
-
},
|
|
2694
|
-
{
|
|
2695
|
-
"animation": "typewriter",
|
|
2696
|
-
"speed": 60
|
|
2697
|
-
}
|
|
2698
|
-
]
|
|
2699
|
-
},
|
|
2700
2628
|
"feedback": {
|
|
2701
2629
|
"type": "object",
|
|
2702
2630
|
"properties": {
|