@helpai/elements 0.40.0 → 0.41.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/configurator.mjs +3 -8
- package/elements-web-component.esm.js +29 -29
- 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 +26 -26
- package/elements.js.map +3 -3
- package/index.d.ts +4 -28
- package/index.mjs +53 -54
- package/package.json +1 -1
- package/schema.d.ts +27 -31
- package/schema.json +0 -22
- package/schema.mjs +3 -8
- package/style.css +1 -1
- package/web-component.mjs +53 -52
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-CB6xjMr0.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -40,7 +40,7 @@ interface ClientStorage {
|
|
|
40
40
|
* populated {@link Strings} map. UI components then read `strings.send` as a
|
|
41
41
|
* normal property access — no per-render lookup, no per-render allocation.
|
|
42
42
|
*/
|
|
43
|
-
type StringKey = "launcherOpen" | "launcherLabel" | "panelTitle" | "composerPlaceholder" | "send" | "stop" | "attach" | "micStart" | "micStop" | "micUnsupported" | "expand" | "collapse" | "fullscreen" | "exitFullscreen" | "resizeHandle" | "scrollToBottom" | "
|
|
43
|
+
type StringKey = "launcherOpen" | "launcherLabel" | "panelTitle" | "composerPlaceholder" | "send" | "stop" | "attach" | "micStart" | "micStop" | "micUnsupported" | "expand" | "collapse" | "fullscreen" | "exitFullscreen" | "resizeHandle" | "scrollToBottom" | "close" | "moreActions" | "soundOn" | "soundOff" | "language" | "theme" | "themeAuto" | "themeLight" | "themeDark" | "textSize" | "textSizeSmall" | "textSizeNormal" | "textSizeLarge" | "history" | "historyTitle" | "historyEmpty" | "historyLoading" | "historyBack" | "historyContinue" | "conversationLoading" | "conversationClosed" | "startNewConversation" | "dateToday" | "dateYesterday" | "dateLastWeek" | "dateOlder" | "newConversation" | "dropZone" | "attachmentTooLarge" | "attachmentTooMany" | "attachmentMimeRejected" | "errorRetry" | "errorGeneric" | "errorRateLimited" | "loading" | "thinking" | "thoughts" | "usedTool" | "collapseSidebar" | "expandSidebar" | "formSubmit" | "formSkip" | "formSubmitted" | "formSkipped" | "formFillOut" | "formRequired" | "formInvalidEmail" | "formInvalidTel" | "formInvalidUrl" | "formInvalidNumber" | "formTooShort" | "formTooLong" | "formNumberTooSmall" | "formNumberTooLarge" | "formPatternMismatch" | "formChooseAtLeast" | "formChooseAtMost" | "formOther" | "formOtherPlaceholder" | "inputRequired" | "inputSubmit" | "inputSkip" | "inputSubmitted" | "approvalRequired" | "approve" | "reject" | "approved" | "rejected" | "approvalReason" | "stepNoLongerActive" | "tabHome" | "tabConversations" | "tabHelp" | "tabNews" | "modulesEmpty" | "moduleBack" | "contentLoading" | "homeGreeting" | "homeGreetingNamed" | "homeGreetingLead" | "homeSearchPlaceholder" | "homeContentTitle" | "homeStatus" | "helpTitle" | "helpSearchPlaceholder" | "helpEmpty" | "helpLoading" | "helpSearchEmpty" | "newsTitle" | "newsEmpty" | "newsLoading" | "newsBack" | "newsPublishedAt";
|
|
44
44
|
/** A partial map for one locale — what overrides look like on the wire. */
|
|
45
45
|
type LocaleStrings = Partial<Record<StringKey, string>>;
|
|
46
46
|
/**
|
|
@@ -270,14 +270,13 @@ type ResponseMode = "streaming" | "buffered";
|
|
|
270
270
|
* - `clear` — Start a new conversation (compose icon).
|
|
271
271
|
* - `expand` — Toggle `normal` ↔ `expanded` (1.5× panel).
|
|
272
272
|
* - `fullscreen` — Toggle `normal` ↔ `fullscreen` (viewport fill).
|
|
273
|
-
* - `popOut` — Open the conversation in a new browser tab.
|
|
274
273
|
* - `sound` — Toggle notification sounds + haptics on/off (switch-style).
|
|
275
274
|
* - `language` — Switch the UI locale at runtime.
|
|
276
275
|
* - `theme` — Cycle `auto` / `light` / `dark`.
|
|
277
276
|
* - `textSize` — Cycle `normal` / `large` / `small`.
|
|
278
277
|
* - `close` — Close the floating panel.
|
|
279
278
|
*/
|
|
280
|
-
type ActionName = "clear" | "expand" | "fullscreen" | "
|
|
279
|
+
type ActionName = "clear" | "expand" | "fullscreen" | "sound" | "history" | "language" | "theme" | "textSize" | "close";
|
|
281
280
|
/**
|
|
282
281
|
* The header's enabled actions. Unlisted actions are hidden; order is
|
|
283
282
|
* irrelevant. Per-mode defaults (`DEFAULT_ACTIONS_BY_MODE`) pick a sensible
|
|
@@ -842,12 +841,6 @@ interface BehaviorOptions {
|
|
|
842
841
|
showReasoning?: boolean;
|
|
843
842
|
/** Show tool/function-call chips in the transcript. Default `false`. */
|
|
844
843
|
showToolCalls?: boolean;
|
|
845
|
-
/**
|
|
846
|
-
* Override the URL the `popOut` action opens (carries
|
|
847
|
-
* `?conversation=<id>&widgetId=<id>`). Falls back to the brand's
|
|
848
|
-
* `BRAND.standaloneUrl` baked at build time. Server-pushable.
|
|
849
|
-
*/
|
|
850
|
-
popOutUrl?: string;
|
|
851
844
|
}
|
|
852
845
|
/**
|
|
853
846
|
* Section: panel header actions — the enabled set (`history`/`close` buttons +
|
|
@@ -1160,12 +1153,6 @@ interface ResolvedOptions {
|
|
|
1160
1153
|
showReasoning: boolean;
|
|
1161
1154
|
/** Show tool-call chips in the transcript. Default `false`. */
|
|
1162
1155
|
showToolCalls: boolean;
|
|
1163
|
-
/**
|
|
1164
|
-
* Resolved popOut target — `behavior.popOutUrl` if set, else
|
|
1165
|
-
* `BRAND.standaloneUrl`, else `""` (the popOut action is hidden
|
|
1166
|
-
* when the resolved URL is empty).
|
|
1167
|
-
*/
|
|
1168
|
-
popOutUrl: string;
|
|
1169
1156
|
features: Required<Omit<FeatureFlags, "tools">> & {
|
|
1170
1157
|
tools?: Array<string | ToolRef>;
|
|
1171
1158
|
};
|
|
@@ -1338,8 +1325,6 @@ interface EventMap {
|
|
|
1338
1325
|
expand: boolean;
|
|
1339
1326
|
/** Fullscreen mode toggled. Payload is the new state. */
|
|
1340
1327
|
fullscreen: boolean;
|
|
1341
|
-
/** Widget was popped out into a standalone tab. */
|
|
1342
|
-
popOut: void;
|
|
1343
1328
|
/** End-user dragged the resize grip — payload is the resolved size. */
|
|
1344
1329
|
resize: {
|
|
1345
1330
|
width: number;
|
|
@@ -1591,14 +1576,6 @@ interface ChatWidgetInstance {
|
|
|
1591
1576
|
destroy: () => void;
|
|
1592
1577
|
/** Toggle fullscreen mode. In `standalone` mode this is a no-op. */
|
|
1593
1578
|
expand: () => void;
|
|
1594
|
-
/**
|
|
1595
|
-
* Open the widget in a new browser tab at `behavior.popOutUrl`
|
|
1596
|
-
* (mount option / handshake-pushable), or the brand's
|
|
1597
|
-
* `BRAND.standaloneUrl` build-time default. Carries the active
|
|
1598
|
-
* `chat` + `widgetId` as query params. No-ops when the resolved
|
|
1599
|
-
* URL is empty.
|
|
1600
|
-
*/
|
|
1601
|
-
popOut: () => void;
|
|
1602
1579
|
/**
|
|
1603
1580
|
* Surface a configured form by id (a form with a `manual` trigger). Lets the
|
|
1604
1581
|
* host open, say, an appointment or feedback form from its own button. No-op
|
|
@@ -1608,7 +1585,7 @@ interface ChatWidgetInstance {
|
|
|
1608
1585
|
/**
|
|
1609
1586
|
* Subscribe to a lifecycle event. Returns an `off` function. See
|
|
1610
1587
|
* {@link EventMap} for the full set + payload shapes — currently
|
|
1611
|
-
* `open | close | message | error | expand | fullscreen |
|
|
1588
|
+
* `open | close | message | error | expand | fullscreen |
|
|
1612
1589
|
* handshake | localeChange`.
|
|
1613
1590
|
*/
|
|
1614
1591
|
on: <E extends EventName>(name: E, fn: (payload: EventMap[E]) => void) => () => void;
|
|
@@ -1742,7 +1719,6 @@ declare const brand: {
|
|
|
1742
1719
|
readonly tagName: string;
|
|
1743
1720
|
readonly cssPrefix: string;
|
|
1744
1721
|
readonly defaultBaseUrl: string;
|
|
1745
|
-
readonly standaloneUrl: string;
|
|
1746
1722
|
readonly displayName: string;
|
|
1747
1723
|
readonly domain: string;
|
|
1748
1724
|
readonly siteUrl: string;
|