@helpai/elements 0.29.0 → 0.30.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/elements-web-component.esm.js +24 -24
- package/elements-web-component.esm.js.map +4 -4
- package/elements.cjs.js +24 -24
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +24 -24
- package/elements.esm.js.map +3 -3
- package/elements.js +24 -24
- package/elements.js.map +3 -3
- package/index.d.ts +13 -5
- package/index.mjs +59 -10
- package/package.json +1 -1
- package/schema.d.ts +49 -49
- package/web-component.mjs +222 -13
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, H as HandshakeResponse, L as Link, S as ServerConfig, b as SiteConfig, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, H as HandshakeResponse, L as Link, S as ServerConfig, b as SiteConfig, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial } from './deployment-E-Jyc0nF.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1120,13 +1120,21 @@ interface ResolvedOptions {
|
|
|
1120
1120
|
accept: string;
|
|
1121
1121
|
};
|
|
1122
1122
|
/**
|
|
1123
|
-
* Active locale used to compute {@link ResolvedOptions.strings}
|
|
1124
|
-
*
|
|
1123
|
+
* Active locale used to compute {@link ResolvedOptions.strings} and carried
|
|
1124
|
+
* on every request envelope. Concrete (`"auto"` already resolved to a
|
|
1125
|
+
* BCP-47 tag) and clamped into {@link ResolvedOptions.availableLocales}.
|
|
1125
1126
|
*/
|
|
1126
1127
|
locale: string;
|
|
1127
1128
|
/**
|
|
1128
|
-
*
|
|
1129
|
-
*
|
|
1129
|
+
* Deployment fallback locale — concrete. The clamp target when the
|
|
1130
|
+
* detected / persisted / picked locale isn't in `availableLocales`.
|
|
1131
|
+
* Server-authoritative (`config.i18n.defaultLocale` wins over `init`).
|
|
1132
|
+
*/
|
|
1133
|
+
defaultLocale: string;
|
|
1134
|
+
/**
|
|
1135
|
+
* Locales offered in the language switcher — the deployment's supported
|
|
1136
|
+
* set, server-authoritative (`config.i18n.availableLocales` wins over
|
|
1137
|
+
* `init`). Single-entry hides the language action.
|
|
1130
1138
|
*/
|
|
1131
1139
|
availableLocales: string[];
|
|
1132
1140
|
startMinimized: boolean;
|
package/index.mjs
CHANGED
|
@@ -524,8 +524,9 @@ function resolveOptions(rawOpts) {
|
|
|
524
524
|
const header = opts.header ?? {};
|
|
525
525
|
const { themeMode, themeOverrides } = parseTheme(opts.theme);
|
|
526
526
|
const mode = presentation.mode ?? "floating";
|
|
527
|
-
const
|
|
528
|
-
const availableLocales = i18n.availableLocales ?? [locale];
|
|
527
|
+
const defaultLocale = resolveDefaultLocale(i18n.defaultLocale);
|
|
528
|
+
const availableLocales = i18n.availableLocales ?? [i18n.locale ?? defaultLocale];
|
|
529
|
+
const locale = clampLocale(i18n.locale ?? defaultLocale, availableLocales, defaultLocale);
|
|
529
530
|
const baseUrl = (opts.baseUrl ?? BRAND.defaultBaseUrl).replace(/\/$/, "");
|
|
530
531
|
const agentApiBaseUrl = (opts.agentApiBaseUrl ?? `${baseUrl}/api/agent`).replace(/\/$/, "");
|
|
531
532
|
const dataApiBaseUrl = (opts.dataApiBaseUrl ?? `${baseUrl}/api/data`).replace(/\/$/, "");
|
|
@@ -567,6 +568,7 @@ function resolveOptions(rawOpts) {
|
|
|
567
568
|
maxCount: opts.composer?.attachments?.maxCount ?? DEFAULT_ATTACHMENTS.maxCount
|
|
568
569
|
},
|
|
569
570
|
locale,
|
|
571
|
+
defaultLocale,
|
|
570
572
|
availableLocales,
|
|
571
573
|
startMinimized: behavior.startMinimized ?? true,
|
|
572
574
|
actions: resolveActions(mode, header.actions),
|
|
@@ -597,6 +599,11 @@ function resolveDefaultLocale(input) {
|
|
|
597
599
|
if (input && input !== "auto") return input;
|
|
598
600
|
return typeof navigator !== "undefined" && navigator.language ? navigator.language : "en";
|
|
599
601
|
}
|
|
602
|
+
function clampLocale(desired, availableLocales, defaultLocale) {
|
|
603
|
+
if (availableLocales.length <= 1 || availableLocales.includes(desired)) return desired;
|
|
604
|
+
if (availableLocales.includes(defaultLocale)) return defaultLocale;
|
|
605
|
+
return availableLocales[0] ?? desired;
|
|
606
|
+
}
|
|
600
607
|
function resolveActions(mode, overrides) {
|
|
601
608
|
return overrides ?? DEFAULT_ACTIONS_BY_MODE[mode];
|
|
602
609
|
}
|
|
@@ -745,13 +752,14 @@ function resolveLauncher(overrides) {
|
|
|
745
752
|
|
|
746
753
|
// src/core/config/overrides.ts
|
|
747
754
|
function applyOptionOverrides(options, activeLocale, activeThemeMode, activeTextSize) {
|
|
748
|
-
|
|
755
|
+
const locale = clampLocale(activeLocale, options.availableLocales, options.defaultLocale);
|
|
756
|
+
if (locale === options.locale && activeThemeMode === options.themeMode && activeTextSize === options.textSize) {
|
|
749
757
|
return options;
|
|
750
758
|
}
|
|
751
759
|
const next = { ...options };
|
|
752
|
-
if (
|
|
753
|
-
next.locale =
|
|
754
|
-
next.strings = resolveStrings(
|
|
760
|
+
if (locale !== options.locale) {
|
|
761
|
+
next.locale = locale;
|
|
762
|
+
next.strings = resolveStrings(locale, options.stringsOverride);
|
|
755
763
|
}
|
|
756
764
|
if (activeThemeMode !== options.themeMode) next.themeMode = activeThemeMode;
|
|
757
765
|
if (activeTextSize !== options.textSize) next.textSize = activeTextSize;
|
|
@@ -797,6 +805,8 @@ function mergeServerConfig(user, server) {
|
|
|
797
805
|
serverI18n ?? {},
|
|
798
806
|
userI18n
|
|
799
807
|
);
|
|
808
|
+
if (serverI18n?.availableLocales !== void 0) merged.availableLocales = serverI18n.availableLocales;
|
|
809
|
+
if (serverI18n?.defaultLocale !== void 0) merged.defaultLocale = serverI18n.defaultLocale;
|
|
800
810
|
const userStrings = userI18n?.strings;
|
|
801
811
|
const serverStrings = serverI18n?.strings;
|
|
802
812
|
if (userStrings || serverStrings) {
|
|
@@ -1422,6 +1432,12 @@ var AgentTransport = class {
|
|
|
1422
1432
|
// always sees the visitor's latest context as they navigate.
|
|
1423
1433
|
__publicField(this, "userContext");
|
|
1424
1434
|
__publicField(this, "pageContext");
|
|
1435
|
+
// Active BCP-47 locale, carried as the envelope's `locale` on EVERY request
|
|
1436
|
+
// so the backend can localize replies AND the data module can return
|
|
1437
|
+
// localized content + forms. Refreshed via `setLocale` whenever the visitor
|
|
1438
|
+
// switches (no re-handshake needed). Resolved + clamped to the deployment's
|
|
1439
|
+
// availableLocales by `resolveOptions` before it reaches here.
|
|
1440
|
+
__publicField(this, "locale");
|
|
1425
1441
|
// ---- Data API (content / forms — module-help-ai-data-api) --------------
|
|
1426
1442
|
//
|
|
1427
1443
|
// The DATA surfaces live on `dataApiBaseUrl` (default `${baseUrl}/api/data`)
|
|
@@ -1447,6 +1463,15 @@ var AgentTransport = class {
|
|
|
1447
1463
|
this.userContext = userContext;
|
|
1448
1464
|
this.pageContext = pageContext;
|
|
1449
1465
|
}
|
|
1466
|
+
/**
|
|
1467
|
+
* Update the active locale carried on every subsequent request. Call on
|
|
1468
|
+
* mount (before the first handshake) and whenever the user picks a new
|
|
1469
|
+
* locale — the next content / forms / message request reflects it with no
|
|
1470
|
+
* extra round-trip.
|
|
1471
|
+
*/
|
|
1472
|
+
setLocale(locale) {
|
|
1473
|
+
this.locale = locale;
|
|
1474
|
+
}
|
|
1450
1475
|
/**
|
|
1451
1476
|
* Seed the visitor + conversation identity from persistence BEFORE the first
|
|
1452
1477
|
* `handshake` resolves. A mount-time `resumeStream()` runs in parallel
|
|
@@ -1463,6 +1488,7 @@ var AgentTransport = class {
|
|
|
1463
1488
|
const out = {};
|
|
1464
1489
|
if (this.visitorId) out.visitorId = this.visitorId;
|
|
1465
1490
|
if (this.conversationId) out.conversationId = this.conversationId;
|
|
1491
|
+
if (this.locale) out.locale = this.locale;
|
|
1466
1492
|
const context = encodeContext(this.userContext, this.pageContext);
|
|
1467
1493
|
if (context) out[CONTEXT_PARAM] = context;
|
|
1468
1494
|
return out;
|
|
@@ -6225,7 +6251,7 @@ function ContentView({ id, title, transport, strings, onBack, actions }) {
|
|
|
6225
6251
|
return /* @__PURE__ */ jsxs28("article", { class: `${p29}-content`, "data-testid": TID.contentView, children: [
|
|
6226
6252
|
item.image ? /* @__PURE__ */ jsx33("img", { class: `${p29}-content-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
|
|
6227
6253
|
item.description ? /* @__PURE__ */ jsx33("p", { class: `${p29}-content-subtitle`, children: item.description }) : null,
|
|
6228
|
-
item.tags
|
|
6254
|
+
item.tags?.length ? /* @__PURE__ */ jsx33("span", { class: `${p29}-news-tags`, children: item.tags.map((t) => /* @__PURE__ */ jsx33("span", { class: `${p29}-news-tag`, children: t }, t)) }) : null,
|
|
6229
6255
|
/* @__PURE__ */ jsx33(StaticMarkdown, { text: item.content ?? "" })
|
|
6230
6256
|
] });
|
|
6231
6257
|
}
|
|
@@ -6670,7 +6696,10 @@ function App({ options, hostElement, bus }) {
|
|
|
6670
6696
|
visitorId,
|
|
6671
6697
|
conversationId,
|
|
6672
6698
|
userPrefs: persistence.loadUserPrefs(),
|
|
6673
|
-
locale
|
|
6699
|
+
// The visitor's ACTIVE locale (persisted pick, else auto-detected) —
|
|
6700
|
+
// not the config baseline — so the handshake learns what the visitor
|
|
6701
|
+
// wants. The response's availableLocales then clamps it for the rest.
|
|
6702
|
+
locale: activeLocale
|
|
6674
6703
|
});
|
|
6675
6704
|
} catch (err) {
|
|
6676
6705
|
if (isStale()) return;
|
|
@@ -6732,7 +6761,18 @@ function App({ options, hostElement, bus }) {
|
|
|
6732
6761
|
setConversationReady(true);
|
|
6733
6762
|
}
|
|
6734
6763
|
},
|
|
6735
|
-
[
|
|
6764
|
+
[
|
|
6765
|
+
transport,
|
|
6766
|
+
visitorId,
|
|
6767
|
+
persistence,
|
|
6768
|
+
options,
|
|
6769
|
+
bus,
|
|
6770
|
+
conversationIdSig,
|
|
6771
|
+
feedback,
|
|
6772
|
+
playWelcome,
|
|
6773
|
+
loadThread,
|
|
6774
|
+
activeLocale
|
|
6775
|
+
]
|
|
6736
6776
|
);
|
|
6737
6777
|
const userSig = JSON.stringify(options.userContext ?? null);
|
|
6738
6778
|
const pageSig = JSON.stringify(options.pageContext ?? null);
|
|
@@ -6741,6 +6781,13 @@ function App({ options, hostElement, bus }) {
|
|
|
6741
6781
|
const merged = Object.keys(formContext).length ? { ...formContext, ...options.userContext } : options.userContext;
|
|
6742
6782
|
transport.setContext(merged, toWirePageContext(options.pageContext));
|
|
6743
6783
|
}, [transport, userSig, pageSig, formCtxSig]);
|
|
6784
|
+
const effectiveLocale = clampLocale(activeLocale, options.availableLocales, options.defaultLocale);
|
|
6785
|
+
useEffect17(() => {
|
|
6786
|
+
transport.setLocale(effectiveLocale);
|
|
6787
|
+
}, [transport, effectiveLocale]);
|
|
6788
|
+
useEffect17(() => {
|
|
6789
|
+
if (effectiveLocale !== activeLocale) setActiveLocale(effectiveLocale);
|
|
6790
|
+
}, [effectiveLocale, activeLocale]);
|
|
6744
6791
|
const runResume = useCallback6(
|
|
6745
6792
|
async (handle) => {
|
|
6746
6793
|
let bubble = null;
|
|
@@ -7606,7 +7653,9 @@ function createTracker(bus, deps) {
|
|
|
7606
7653
|
if (url.length > MAX_URL_LENGTH) return;
|
|
7607
7654
|
const img = new Image(1, 1);
|
|
7608
7655
|
inflight.add(img);
|
|
7609
|
-
|
|
7656
|
+
const settle = () => inflight.delete(img);
|
|
7657
|
+
img.addEventListener("load", settle, { once: true });
|
|
7658
|
+
img.addEventListener("error", settle, { once: true });
|
|
7610
7659
|
img.src = url;
|
|
7611
7660
|
};
|
|
7612
7661
|
const offs = Object.keys(TRACKED).map(
|
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, H as HandshakeResponse, L as Link, P as PAGE_AREA_SUGGESTIONS, f as PageContext, S as ServerConfig, b as SiteConfig, U as UserContext, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial, g as assetSchema, h as blocksConfigSchema, i as connectionConfigPartialSchema, j as connectionConfigSchema, k as cssColorSchema, l as cssLengthSchema, m as endpointsSchema, n as handshakeResponseSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, u as userContextSchema, t as uuid7Schema, w as widgetConfigPartialSchema, v as widgetConfigSchema, x as widgetSettingsPartialSchema, y as widgetSettingsSchema } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, H as HandshakeResponse, L as Link, P as PAGE_AREA_SUGGESTIONS, f as PageContext, S as ServerConfig, b as SiteConfig, U as UserContext, W as WidgetConfig, c as WidgetConfigPartial, d as WidgetSettings, e as WidgetSettingsPartial, g as assetSchema, h as blocksConfigSchema, i as connectionConfigPartialSchema, j as connectionConfigSchema, k as cssColorSchema, l as cssLengthSchema, m as endpointsSchema, n as handshakeResponseSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, u as userContextSchema, t as uuid7Schema, w as widgetConfigPartialSchema, v as widgetConfigSchema, x as widgetSettingsPartialSchema, y as widgetSettingsSchema } from './deployment-E-Jyc0nF.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>;
|
|
@@ -544,16 +544,16 @@ type FooterOptions = z.infer<typeof footerSchema>;
|
|
|
544
544
|
|
|
545
545
|
declare const fieldTypeSchema: z.ZodEnum<{
|
|
546
546
|
number: "number";
|
|
547
|
-
select: "select";
|
|
548
|
-
textarea: "textarea";
|
|
549
|
-
time: "time";
|
|
550
547
|
text: "text";
|
|
551
|
-
checkbox: "checkbox";
|
|
552
|
-
radio: "radio";
|
|
553
548
|
url: "url";
|
|
554
549
|
email: "email";
|
|
555
550
|
tel: "tel";
|
|
556
551
|
date: "date";
|
|
552
|
+
time: "time";
|
|
553
|
+
textarea: "textarea";
|
|
554
|
+
select: "select";
|
|
555
|
+
radio: "radio";
|
|
556
|
+
checkbox: "checkbox";
|
|
557
557
|
multiselect: "multiselect";
|
|
558
558
|
}>;
|
|
559
559
|
type FieldType = z.infer<typeof fieldTypeSchema>;
|
|
@@ -578,16 +578,16 @@ declare const formFieldSchema: z.ZodObject<{
|
|
|
578
578
|
label: z.ZodString;
|
|
579
579
|
type: z.ZodEnum<{
|
|
580
580
|
number: "number";
|
|
581
|
-
select: "select";
|
|
582
|
-
textarea: "textarea";
|
|
583
|
-
time: "time";
|
|
584
581
|
text: "text";
|
|
585
|
-
checkbox: "checkbox";
|
|
586
|
-
radio: "radio";
|
|
587
582
|
url: "url";
|
|
588
583
|
email: "email";
|
|
589
584
|
tel: "tel";
|
|
590
585
|
date: "date";
|
|
586
|
+
time: "time";
|
|
587
|
+
textarea: "textarea";
|
|
588
|
+
select: "select";
|
|
589
|
+
radio: "radio";
|
|
590
|
+
checkbox: "checkbox";
|
|
591
591
|
multiselect: "multiselect";
|
|
592
592
|
}>;
|
|
593
593
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
@@ -638,16 +638,16 @@ declare const formDefSchema: z.ZodObject<{
|
|
|
638
638
|
label: z.ZodString;
|
|
639
639
|
type: z.ZodEnum<{
|
|
640
640
|
number: "number";
|
|
641
|
-
select: "select";
|
|
642
|
-
textarea: "textarea";
|
|
643
|
-
time: "time";
|
|
644
641
|
text: "text";
|
|
645
|
-
checkbox: "checkbox";
|
|
646
|
-
radio: "radio";
|
|
647
642
|
url: "url";
|
|
648
643
|
email: "email";
|
|
649
644
|
tel: "tel";
|
|
650
645
|
date: "date";
|
|
646
|
+
time: "time";
|
|
647
|
+
textarea: "textarea";
|
|
648
|
+
select: "select";
|
|
649
|
+
radio: "radio";
|
|
650
|
+
checkbox: "checkbox";
|
|
651
651
|
multiselect: "multiselect";
|
|
652
652
|
}>;
|
|
653
653
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
@@ -698,16 +698,16 @@ declare const formsSchema: z.ZodArray<z.ZodObject<{
|
|
|
698
698
|
label: z.ZodString;
|
|
699
699
|
type: z.ZodEnum<{
|
|
700
700
|
number: "number";
|
|
701
|
-
select: "select";
|
|
702
|
-
textarea: "textarea";
|
|
703
|
-
time: "time";
|
|
704
701
|
text: "text";
|
|
705
|
-
checkbox: "checkbox";
|
|
706
|
-
radio: "radio";
|
|
707
702
|
url: "url";
|
|
708
703
|
email: "email";
|
|
709
704
|
tel: "tel";
|
|
710
705
|
date: "date";
|
|
706
|
+
time: "time";
|
|
707
|
+
textarea: "textarea";
|
|
708
|
+
select: "select";
|
|
709
|
+
radio: "radio";
|
|
710
|
+
checkbox: "checkbox";
|
|
711
711
|
multiselect: "multiselect";
|
|
712
712
|
}>;
|
|
713
713
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
@@ -781,18 +781,18 @@ type I18nOptions = z.infer<typeof i18nSchema>;
|
|
|
781
781
|
*/
|
|
782
782
|
|
|
783
783
|
declare const moduleLayoutSchema: z.ZodEnum<{
|
|
784
|
-
home: "home";
|
|
785
784
|
chat: "chat";
|
|
786
785
|
help: "help";
|
|
786
|
+
home: "home";
|
|
787
787
|
news: "news";
|
|
788
788
|
}>;
|
|
789
789
|
type ModuleLayout = z.infer<typeof moduleLayoutSchema>;
|
|
790
790
|
declare const moduleSchema: z.ZodObject<{
|
|
791
791
|
label: z.ZodString;
|
|
792
792
|
layout: z.ZodEnum<{
|
|
793
|
-
home: "home";
|
|
794
793
|
chat: "chat";
|
|
795
794
|
help: "help";
|
|
795
|
+
home: "home";
|
|
796
796
|
news: "news";
|
|
797
797
|
}>;
|
|
798
798
|
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -818,9 +818,9 @@ type ModuleOptions = z.infer<typeof moduleSchema>;
|
|
|
818
818
|
declare const modulesSchema: z.ZodArray<z.ZodObject<{
|
|
819
819
|
label: z.ZodString;
|
|
820
820
|
layout: z.ZodEnum<{
|
|
821
|
-
home: "home";
|
|
822
821
|
chat: "chat";
|
|
823
822
|
help: "help";
|
|
823
|
+
home: "home";
|
|
824
824
|
news: "news";
|
|
825
825
|
}>;
|
|
826
826
|
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|