@helpai/elements 0.7.5 → 0.8.1
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 +27 -27
- package/elements-web-component.esm.js.map +3 -3
- package/elements.cjs.js +27 -27
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +27 -27
- package/elements.esm.js.map +3 -3
- package/elements.js +27 -27
- package/elements.js.map +3 -3
- package/index.d.ts +1 -1
- package/index.mjs +134 -17
- package/package.json +1 -1
- package/schema.d.ts +35 -35
- package/web-component.mjs +134 -17
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 StartSessionResponse, 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 StartSessionResponse, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial } from './deployment-Clv1qhOa.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
package/index.mjs
CHANGED
|
@@ -1162,6 +1162,17 @@ var AgentTransport = class {
|
|
|
1162
1162
|
this.userContext = userContext;
|
|
1163
1163
|
this.pageContext = pageContext;
|
|
1164
1164
|
}
|
|
1165
|
+
/**
|
|
1166
|
+
* Seed the visitor + session identity from persistence BEFORE the first
|
|
1167
|
+
* `startSession` resolves. A mount-time `resumeStream()` runs in parallel
|
|
1168
|
+
* with `startSession`, so without this its envelope would carry no
|
|
1169
|
+
* `sessionId` and the resume GET couldn't identify the thread. `startSession`
|
|
1170
|
+
* later overwrites these with the server's authoritative ids (rebind-safe).
|
|
1171
|
+
*/
|
|
1172
|
+
primeIdentity(visitorId, sessionId) {
|
|
1173
|
+
if (visitorId) this.visitorId = visitorId;
|
|
1174
|
+
if (sessionId) this.sessionId = sessionId;
|
|
1175
|
+
}
|
|
1165
1176
|
/** Build the per-request envelope from the current transport state. */
|
|
1166
1177
|
envelope() {
|
|
1167
1178
|
const out = {};
|
|
@@ -1245,9 +1256,10 @@ var AgentTransport = class {
|
|
|
1245
1256
|
cursor: params.cursor
|
|
1246
1257
|
});
|
|
1247
1258
|
const res = await this.getJson(url.toString(), "listSessions");
|
|
1248
|
-
|
|
1259
|
+
const sessions = res.sessions ?? [];
|
|
1260
|
+
log4.debug("listSessions \u2190", { count: sessions.length, nextCursor: res.nextCursor });
|
|
1249
1261
|
return {
|
|
1250
|
-
sessions:
|
|
1262
|
+
sessions: sessions.map((session) => ({
|
|
1251
1263
|
sessionId: session.sessionId,
|
|
1252
1264
|
title: session.title,
|
|
1253
1265
|
lastMessageAt: session.lastMessageAt,
|
|
@@ -1263,16 +1275,17 @@ var AgentTransport = class {
|
|
|
1263
1275
|
url.searchParams.set("sessionId", sessionId);
|
|
1264
1276
|
log4.debug("loadSession \u2192", { sessionId, visitorId: this.visitorId });
|
|
1265
1277
|
const res = await this.getJson(url.toString(), "loadSession");
|
|
1278
|
+
const messages = res.messages ?? [];
|
|
1266
1279
|
log4.debug("loadSession \u2190", {
|
|
1267
1280
|
sessionId: res.sessionId,
|
|
1268
1281
|
canContinue: res.canContinue,
|
|
1269
|
-
messageCount:
|
|
1282
|
+
messageCount: messages.length,
|
|
1270
1283
|
hasSuggestions: !!res.suggestions
|
|
1271
1284
|
});
|
|
1272
1285
|
return {
|
|
1273
1286
|
sessionId: res.sessionId,
|
|
1274
|
-
canContinue: res.canContinue,
|
|
1275
|
-
messages
|
|
1287
|
+
canContinue: res.canContinue ?? true,
|
|
1288
|
+
messages,
|
|
1276
1289
|
agent: res.agent,
|
|
1277
1290
|
suggestions: res.suggestions
|
|
1278
1291
|
};
|
|
@@ -1306,8 +1319,9 @@ var AgentTransport = class {
|
|
|
1306
1319
|
}
|
|
1307
1320
|
log4.debug("listContent \u2192", query);
|
|
1308
1321
|
const res = await this.getJson(url.toString(), "listContent");
|
|
1309
|
-
|
|
1310
|
-
|
|
1322
|
+
const items = res.items ?? [];
|
|
1323
|
+
log4.debug("listContent \u2190", { count: items.length, total: res.pagination?.total });
|
|
1324
|
+
return { ...res, items };
|
|
1311
1325
|
}
|
|
1312
1326
|
async saveUserPrefs(userPrefs) {
|
|
1313
1327
|
log4.debug("saveUserPrefs \u2192", {
|
|
@@ -1340,12 +1354,62 @@ var AgentTransport = class {
|
|
|
1340
1354
|
const cancel = () => this.cancelStream(ctrl, body.sessionId);
|
|
1341
1355
|
return { iter, cancel };
|
|
1342
1356
|
}
|
|
1357
|
+
/**
|
|
1358
|
+
* Re-attach to an in-flight reply on a cold page load / refresh.
|
|
1359
|
+
*
|
|
1360
|
+
* UNCONDITIONAL by design — the caller runs this in parallel with
|
|
1361
|
+
* `startSession`, never gated on whether there are persisted messages. If
|
|
1362
|
+
* the user refreshed while the assistant was still streaming, the
|
|
1363
|
+
* `startSession` reply carries no messages (the turn isn't persisted until
|
|
1364
|
+
* it finishes) and THIS is the channel that resumes the live reply. When
|
|
1365
|
+
* nothing is in flight the server answers 204 and the handle yields nothing
|
|
1366
|
+
* (the common case — no bubble is created).
|
|
1367
|
+
*
|
|
1368
|
+
* `cancel` only detaches the client (aborts the local read); unlike
|
|
1369
|
+
* `sendMessage` it does NOT POST `/cancel-stream` — the reply may still be
|
|
1370
|
+
* generating for another tab or about to be persisted, and a page-load
|
|
1371
|
+
* resume must never tear that down.
|
|
1372
|
+
*/
|
|
1373
|
+
resumeStream() {
|
|
1374
|
+
const ctrl = new AbortController();
|
|
1375
|
+
const seenIds = /* @__PURE__ */ new Set();
|
|
1376
|
+
const iter = this.resumeStreamGen(ctrl, seenIds, true);
|
|
1377
|
+
return { iter, cancel: () => ctrl.abort() };
|
|
1378
|
+
}
|
|
1343
1379
|
// ---- Stream orchestration ---------------------------------------------
|
|
1344
1380
|
async *runStream(body, ctrl, seenIds) {
|
|
1345
1381
|
if (yield* this.drain(this.openMessageStream(body, ctrl.signal), seenIds, ctrl)) return;
|
|
1382
|
+
yield* this.resumeStreamGen(ctrl, seenIds, false);
|
|
1383
|
+
}
|
|
1384
|
+
/**
|
|
1385
|
+
* Re-attach to an in-flight reply via GET /stream-resume, yielding the
|
|
1386
|
+
* (deduped) continuation. Two callers:
|
|
1387
|
+
* - after a POST /stream-message drops mid-reply (`immediate=false` — back
|
|
1388
|
+
* off first, the reply may still be spinning up server-side);
|
|
1389
|
+
* - on a cold page load / refresh (`immediate=true` — hit it at once, in
|
|
1390
|
+
* parallel with start-session, so a reply that was streaming when the
|
|
1391
|
+
* user reloaded keeps flowing).
|
|
1392
|
+
*
|
|
1393
|
+
* The endpoint ALWAYS opens a 200 SSE stream (mirrors the AI SDK
|
|
1394
|
+
* resumable-stream lib): it replays the in-flight reply from the buffer, or —
|
|
1395
|
+
* when nothing is in flight (reply finished + the buffer was flushed, or
|
|
1396
|
+
* nothing ever started) — closes an EMPTY stream. So "nothing to resume" is
|
|
1397
|
+
* signalled by a segment that ends without a terminal chunk AND surfaced no
|
|
1398
|
+
* NEW events — not by a status code. We stop gracefully there; the completed
|
|
1399
|
+
* turn comes from the DB via start-session / list-messages.
|
|
1400
|
+
*
|
|
1401
|
+
* Returns (no throw) on a terminal chunk, an empty/no-new-events segment, or
|
|
1402
|
+
* a 204 / non-OK (a backend that signals "nothing" by status, or lacks the
|
|
1403
|
+
* endpoint). Retries only a segment that yielded new events but no finish — a
|
|
1404
|
+
* real mid-reply drop. Throws only if every attempt kept yielding new events
|
|
1405
|
+
* yet never finished: a genuinely stuck, incomplete reply.
|
|
1406
|
+
*/
|
|
1407
|
+
async *resumeStreamGen(ctrl, seenIds, immediate) {
|
|
1346
1408
|
for (let attempt = 1; attempt <= MAX_RESUME_ATTEMPTS && !ctrl.signal.aborted; attempt++) {
|
|
1347
|
-
|
|
1348
|
-
|
|
1409
|
+
if (!immediate || attempt > 1) {
|
|
1410
|
+
await sleep(RESUME_BACKOFF_MS * attempt, ctrl.signal);
|
|
1411
|
+
if (ctrl.signal.aborted) return;
|
|
1412
|
+
}
|
|
1349
1413
|
let res;
|
|
1350
1414
|
try {
|
|
1351
1415
|
res = await this.fetchImpl(this.resumeUrl(seenIds.size), {
|
|
@@ -1363,7 +1427,12 @@ var AgentTransport = class {
|
|
|
1363
1427
|
log4.debug("resume \u2192 no in-flight stream", { status: res.status });
|
|
1364
1428
|
return;
|
|
1365
1429
|
}
|
|
1430
|
+
const before = seenIds.size;
|
|
1366
1431
|
if (yield* this.drain(parseChatStream(res, ctrl.signal), seenIds, ctrl)) return;
|
|
1432
|
+
if (seenIds.size === before) {
|
|
1433
|
+
log4.debug("resume \u2192 stream closed with no new events; nothing to resume");
|
|
1434
|
+
return;
|
|
1435
|
+
}
|
|
1367
1436
|
}
|
|
1368
1437
|
if (ctrl.signal.aborted) return;
|
|
1369
1438
|
throw new StreamError("stream incomplete after resume attempts", "server");
|
|
@@ -3715,7 +3784,7 @@ function ConversationList({ transport, strings, visitorId, onSelect, onNewChat }
|
|
|
3715
3784
|
let cancelled = false;
|
|
3716
3785
|
transport.listSessions({ visitorId }).then((res) => {
|
|
3717
3786
|
if (cancelled) return;
|
|
3718
|
-
setChats(res.sessions);
|
|
3787
|
+
setChats(res.sessions ?? []);
|
|
3719
3788
|
setState("loaded");
|
|
3720
3789
|
}).catch((err) => {
|
|
3721
3790
|
if (cancelled) return;
|
|
@@ -4606,7 +4675,7 @@ function HelpRoot({ transport, strings, config, nav, panelProps }) {
|
|
|
4606
4675
|
setState("loading");
|
|
4607
4676
|
transport.listContent({ tags, sortBy: "order", limit: 100 }).then((res) => {
|
|
4608
4677
|
if (cancelled) return;
|
|
4609
|
-
setItems(res.items);
|
|
4678
|
+
setItems(res.items ?? []);
|
|
4610
4679
|
setState("loaded");
|
|
4611
4680
|
}).catch((err) => {
|
|
4612
4681
|
if (cancelled) return;
|
|
@@ -4680,7 +4749,7 @@ function HomeRoot(props2) {
|
|
|
4680
4749
|
useEffect12(() => {
|
|
4681
4750
|
if (!config.showRecentMessages) return;
|
|
4682
4751
|
let cancelled = false;
|
|
4683
|
-
transport.listSessions({ limit: 1 }).then((res) => !cancelled && setRecent(res.sessions[0] ?? null)).catch((err) => !cancelled && log13.warn("listSessions (home) failed", { err }));
|
|
4752
|
+
transport.listSessions({ limit: 1 }).then((res) => !cancelled && setRecent(res.sessions?.[0] ?? null)).catch((err) => !cancelled && log13.warn("listSessions (home) failed", { err }));
|
|
4684
4753
|
return () => {
|
|
4685
4754
|
cancelled = true;
|
|
4686
4755
|
};
|
|
@@ -4688,7 +4757,7 @@ function HomeRoot(props2) {
|
|
|
4688
4757
|
useEffect12(() => {
|
|
4689
4758
|
if (!config.contentTags?.length) return;
|
|
4690
4759
|
let cancelled = false;
|
|
4691
|
-
transport.listContent({ tags: config.contentTags, limit: 6 }).then((res) => !cancelled && setContent(res.items)).catch((err) => !cancelled && log13.warn("listContent (home) failed", { err }));
|
|
4760
|
+
transport.listContent({ tags: config.contentTags, limit: 6 }).then((res) => !cancelled && setContent(res.items ?? [])).catch((err) => !cancelled && log13.warn("listContent (home) failed", { err }));
|
|
4692
4761
|
return () => {
|
|
4693
4762
|
cancelled = true;
|
|
4694
4763
|
};
|
|
@@ -4784,7 +4853,7 @@ function NewsRoot({ transport, strings, config, nav, panelProps }) {
|
|
|
4784
4853
|
setState("loading");
|
|
4785
4854
|
transport.listContent({ tags, sortBy: "publishedAt", sortOrder: "desc" }).then((res) => {
|
|
4786
4855
|
if (cancelled) return;
|
|
4787
|
-
setItems(res.items);
|
|
4856
|
+
setItems(res.items ?? []);
|
|
4788
4857
|
setState("loaded");
|
|
4789
4858
|
}).catch((err) => {
|
|
4790
4859
|
if (cancelled) return;
|
|
@@ -5397,10 +5466,11 @@ function App({ options, hostElement, bus }) {
|
|
|
5397
5466
|
if (isResume) {
|
|
5398
5467
|
setLoadingMessages(true);
|
|
5399
5468
|
try {
|
|
5400
|
-
const chat = res.messages ? { sessionId: persistedChatId, canContinue: res.canContinue ?? true, messages: res.messages } : await transport.loadSession(persistedChatId);
|
|
5469
|
+
const chat = res.messages?.length ? { sessionId: persistedChatId, canContinue: res.canContinue ?? true, messages: res.messages } : await transport.loadSession(persistedChatId);
|
|
5401
5470
|
if (isStale()) return;
|
|
5402
|
-
|
|
5403
|
-
|
|
5471
|
+
const loaded = (chat.messages ?? []).map(fromWireMessage);
|
|
5472
|
+
if (loaded.length) messagesSig.value = loaded;
|
|
5473
|
+
setCanSend(chat.canContinue ?? true);
|
|
5404
5474
|
setSuggestions(chat.suggestions ?? []);
|
|
5405
5475
|
} catch (err) {
|
|
5406
5476
|
if (isStale()) return;
|
|
@@ -5427,10 +5497,57 @@ function App({ options, hostElement, bus }) {
|
|
|
5427
5497
|
useEffect17(() => {
|
|
5428
5498
|
transport.setContext(options.userContext, toWirePageContext(options.pageContext));
|
|
5429
5499
|
}, [transport, userSig, pageSig]);
|
|
5500
|
+
const runResume = useCallback8(
|
|
5501
|
+
async (handle) => {
|
|
5502
|
+
let bubble = null;
|
|
5503
|
+
try {
|
|
5504
|
+
for await (const evt of handle.iter) {
|
|
5505
|
+
if (!bubble) {
|
|
5506
|
+
bubble = makeAssistantMessage();
|
|
5507
|
+
reducer.attach(bubble);
|
|
5508
|
+
messagesSig.value = [...messagesSig.value, bubble];
|
|
5509
|
+
setStreaming(true);
|
|
5510
|
+
setActiveCancel(() => handle.cancel);
|
|
5511
|
+
log16.info("resumed in-flight reply on mount");
|
|
5512
|
+
}
|
|
5513
|
+
reducer.apply(evt.chunk);
|
|
5514
|
+
if (evt.chunk.type === "finish" && evt.chunk.canContinue === false) setCanSend(false);
|
|
5515
|
+
}
|
|
5516
|
+
if (bubble) {
|
|
5517
|
+
bubble.status = "complete";
|
|
5518
|
+
feedback.play("messageReceived");
|
|
5519
|
+
emitMessage(bus, options, "assistant", assistantText(bubble));
|
|
5520
|
+
}
|
|
5521
|
+
} catch (err) {
|
|
5522
|
+
if (bubble) {
|
|
5523
|
+
bubble.status = "error";
|
|
5524
|
+
bubble.errorText = errorMessageFor(err, options.strings);
|
|
5525
|
+
feedback.play("error");
|
|
5526
|
+
}
|
|
5527
|
+
log16.debug("mount resume ended without completing", { err });
|
|
5528
|
+
} finally {
|
|
5529
|
+
if (bubble) {
|
|
5530
|
+
reducer.detach();
|
|
5531
|
+
setStreaming(false);
|
|
5532
|
+
setActiveCancel(null);
|
|
5533
|
+
messagesSig.value = [...messagesSig.value];
|
|
5534
|
+
}
|
|
5535
|
+
}
|
|
5536
|
+
},
|
|
5537
|
+
[reducer, messagesSig, feedback, bus, options]
|
|
5538
|
+
);
|
|
5430
5539
|
useEffect17(() => {
|
|
5431
5540
|
void runStartSession({ newConversation: false });
|
|
5541
|
+
const persistedSession = sessionIdSig.value;
|
|
5542
|
+
let resume = null;
|
|
5543
|
+
if (persistedSession) {
|
|
5544
|
+
transport.primeIdentity(visitorId, persistedSession);
|
|
5545
|
+
resume = transport.resumeStream();
|
|
5546
|
+
void runResume(resume);
|
|
5547
|
+
}
|
|
5432
5548
|
return () => {
|
|
5433
5549
|
connectGenRef.current++;
|
|
5550
|
+
resume?.cancel();
|
|
5434
5551
|
};
|
|
5435
5552
|
}, []);
|
|
5436
5553
|
const lastUserSig = useRef8(userSig);
|
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 StartSessionResponse, 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 startSessionResponseSchema, 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 StartSessionResponse, 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 startSessionResponseSchema, u as userContextSchema, v as uuid7Schema, w as widgetConfigPartialSchema, x as widgetConfigSchema, y as widgetSettingsPartialSchema, z as widgetSettingsSchema } from './deployment-Clv1qhOa.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>;
|
|
@@ -321,38 +321,38 @@ type FeatureFlags = z.infer<typeof featureFlagsSchema>;
|
|
|
321
321
|
*/
|
|
322
322
|
|
|
323
323
|
declare const actionNameSchema: z.ZodEnum<{
|
|
324
|
-
close: "close";
|
|
325
324
|
expand: "expand";
|
|
326
325
|
fullscreen: "fullscreen";
|
|
327
326
|
popOut: "popOut";
|
|
328
|
-
|
|
329
|
-
theme: "theme";
|
|
327
|
+
close: "close";
|
|
330
328
|
language: "language";
|
|
329
|
+
theme: "theme";
|
|
331
330
|
history: "history";
|
|
331
|
+
clear: "clear";
|
|
332
332
|
sound: "sound";
|
|
333
333
|
}>;
|
|
334
334
|
type ActionName = z.infer<typeof actionNameSchema>;
|
|
335
335
|
declare const headerActionsSchema: z.ZodObject<{
|
|
336
336
|
main: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
337
|
-
close: "close";
|
|
338
337
|
expand: "expand";
|
|
339
338
|
fullscreen: "fullscreen";
|
|
340
339
|
popOut: "popOut";
|
|
341
|
-
|
|
342
|
-
theme: "theme";
|
|
340
|
+
close: "close";
|
|
343
341
|
language: "language";
|
|
342
|
+
theme: "theme";
|
|
344
343
|
history: "history";
|
|
344
|
+
clear: "clear";
|
|
345
345
|
sound: "sound";
|
|
346
346
|
}>>>;
|
|
347
347
|
overflow: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
348
|
-
close: "close";
|
|
349
348
|
expand: "expand";
|
|
350
349
|
fullscreen: "fullscreen";
|
|
351
350
|
popOut: "popOut";
|
|
352
|
-
|
|
353
|
-
theme: "theme";
|
|
351
|
+
close: "close";
|
|
354
352
|
language: "language";
|
|
353
|
+
theme: "theme";
|
|
355
354
|
history: "history";
|
|
355
|
+
clear: "clear";
|
|
356
356
|
sound: "sound";
|
|
357
357
|
}>>>;
|
|
358
358
|
}, z.core.$loose>;
|
|
@@ -361,25 +361,25 @@ type HeaderActions = z.infer<typeof headerActionsSchema>;
|
|
|
361
361
|
declare const headerSchema: z.ZodObject<{
|
|
362
362
|
actions: z.ZodOptional<z.ZodObject<{
|
|
363
363
|
main: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
364
|
-
close: "close";
|
|
365
364
|
expand: "expand";
|
|
366
365
|
fullscreen: "fullscreen";
|
|
367
366
|
popOut: "popOut";
|
|
368
|
-
|
|
369
|
-
theme: "theme";
|
|
367
|
+
close: "close";
|
|
370
368
|
language: "language";
|
|
369
|
+
theme: "theme";
|
|
371
370
|
history: "history";
|
|
371
|
+
clear: "clear";
|
|
372
372
|
sound: "sound";
|
|
373
373
|
}>>>;
|
|
374
374
|
overflow: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
375
|
-
close: "close";
|
|
376
375
|
expand: "expand";
|
|
377
376
|
fullscreen: "fullscreen";
|
|
378
377
|
popOut: "popOut";
|
|
379
|
-
|
|
380
|
-
theme: "theme";
|
|
378
|
+
close: "close";
|
|
381
379
|
language: "language";
|
|
380
|
+
theme: "theme";
|
|
382
381
|
history: "history";
|
|
382
|
+
clear: "clear";
|
|
383
383
|
sound: "sound";
|
|
384
384
|
}>>>;
|
|
385
385
|
}, z.core.$loose>>;
|
|
@@ -396,33 +396,33 @@ type HeaderOptions = z.infer<typeof headerSchema>;
|
|
|
396
396
|
*/
|
|
397
397
|
|
|
398
398
|
declare const feedbackEventSchema: z.ZodEnum<{
|
|
399
|
-
voiceStart: "voiceStart";
|
|
400
|
-
voiceStop: "voiceStop";
|
|
401
399
|
error: "error";
|
|
402
400
|
messageReceived: "messageReceived";
|
|
403
401
|
messageSent: "messageSent";
|
|
402
|
+
voiceStart: "voiceStart";
|
|
403
|
+
voiceStop: "voiceStop";
|
|
404
404
|
}>;
|
|
405
405
|
type FeedbackEvent = z.infer<typeof feedbackEventSchema>;
|
|
406
406
|
declare const soundOptionsSchema: z.ZodObject<{
|
|
407
407
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
408
408
|
volume: z.ZodDefault<z.ZodNumber>;
|
|
409
409
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
410
|
-
voiceStart: "voiceStart";
|
|
411
|
-
voiceStop: "voiceStop";
|
|
412
410
|
error: "error";
|
|
413
411
|
messageReceived: "messageReceived";
|
|
414
412
|
messageSent: "messageSent";
|
|
413
|
+
voiceStart: "voiceStart";
|
|
414
|
+
voiceStop: "voiceStop";
|
|
415
415
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
416
416
|
}, z.core.$loose>;
|
|
417
417
|
type SoundOptions = z.infer<typeof soundOptionsSchema>;
|
|
418
418
|
declare const hapticsOptionsSchema: z.ZodObject<{
|
|
419
419
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
420
420
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
421
|
-
voiceStart: "voiceStart";
|
|
422
|
-
voiceStop: "voiceStop";
|
|
423
421
|
error: "error";
|
|
424
422
|
messageReceived: "messageReceived";
|
|
425
423
|
messageSent: "messageSent";
|
|
424
|
+
voiceStart: "voiceStart";
|
|
425
|
+
voiceStop: "voiceStop";
|
|
426
426
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
427
427
|
}, z.core.$loose>;
|
|
428
428
|
type HapticsOptions = z.infer<typeof hapticsOptionsSchema>;
|
|
@@ -431,21 +431,21 @@ declare const feedbackSchema: z.ZodObject<{
|
|
|
431
431
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
432
432
|
volume: z.ZodDefault<z.ZodNumber>;
|
|
433
433
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
434
|
-
voiceStart: "voiceStart";
|
|
435
|
-
voiceStop: "voiceStop";
|
|
436
434
|
error: "error";
|
|
437
435
|
messageReceived: "messageReceived";
|
|
438
436
|
messageSent: "messageSent";
|
|
437
|
+
voiceStart: "voiceStart";
|
|
438
|
+
voiceStop: "voiceStop";
|
|
439
439
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
440
440
|
}, z.core.$loose>>;
|
|
441
441
|
haptics: z.ZodOptional<z.ZodObject<{
|
|
442
442
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
443
443
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
444
|
-
voiceStart: "voiceStart";
|
|
445
|
-
voiceStop: "voiceStop";
|
|
446
444
|
error: "error";
|
|
447
445
|
messageReceived: "messageReceived";
|
|
448
446
|
messageSent: "messageSent";
|
|
447
|
+
voiceStart: "voiceStart";
|
|
448
|
+
voiceStop: "voiceStop";
|
|
449
449
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
450
450
|
}, z.core.$loose>>;
|
|
451
451
|
}, z.core.$loose>;
|
|
@@ -607,18 +607,18 @@ type I18nOptions = z.infer<typeof i18nSchema>;
|
|
|
607
607
|
*/
|
|
608
608
|
|
|
609
609
|
declare const moduleLayoutSchema: z.ZodEnum<{
|
|
610
|
-
home: "home";
|
|
611
610
|
chat: "chat";
|
|
612
611
|
help: "help";
|
|
612
|
+
home: "home";
|
|
613
613
|
news: "news";
|
|
614
614
|
}>;
|
|
615
615
|
type ModuleLayout = z.infer<typeof moduleLayoutSchema>;
|
|
616
616
|
declare const moduleSchema: z.ZodObject<{
|
|
617
617
|
label: z.ZodString;
|
|
618
618
|
layout: z.ZodEnum<{
|
|
619
|
-
home: "home";
|
|
620
619
|
chat: "chat";
|
|
621
620
|
help: "help";
|
|
621
|
+
home: "home";
|
|
622
622
|
news: "news";
|
|
623
623
|
}>;
|
|
624
624
|
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -644,9 +644,9 @@ type ModuleOptions = z.infer<typeof moduleSchema>;
|
|
|
644
644
|
declare const modulesSchema: z.ZodArray<z.ZodObject<{
|
|
645
645
|
label: z.ZodString;
|
|
646
646
|
layout: z.ZodEnum<{
|
|
647
|
-
home: "home";
|
|
648
647
|
chat: "chat";
|
|
649
648
|
help: "help";
|
|
649
|
+
home: "home";
|
|
650
650
|
news: "news";
|
|
651
651
|
}>;
|
|
652
652
|
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|