@aiden-voice/widget 0.10.2 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -127,34 +127,34 @@ throws synchronously, at call time, if you pass both or neither.
127
127
 
128
128
  ## Configuration reference
129
129
 
130
- | Option | Description | Default |
131
- | --- | --- | --- |
132
- | `publishableKey` | Public key used to mint a session server-side. Mutually exclusive with `sessionToken`. | none (required unless `sessionToken` is set) |
133
- | `sessionToken` | A pre-minted session JWT from your own backend. Mutually exclusive with `publishableKey`. | none (required unless `publishableKey` is set) |
134
- | `getSessionToken` | `sessionToken` mode only: a function returning a fresh session token (or a promise of one) from your backend, called when the current one has run out or is refused. Without it an expired session ends the chat until the page is reloaded. Ignored, with a warning, with `publishableKey` or when not a function. | none |
135
- | `language` | Language of the widget's own text, as a BCP 47 tag (`'fr'`, `'pt-BR'`, `'zh-CN'`). Without it the widget follows the page's `<html lang>`, then English. See [Language](#language). | the page's language, else `'en'` |
136
- | `messages` | Replaces individual built-in strings in the active language, e.g. `{ newConversation: 'Start over' }`. See [Language](#language). | none |
137
- | `contentLanguage` | The language of the conversation's content (replies, the visitor's messages, and your `greeting`, `notice`, `title`, `subtitle`, `name` and image text), as a BCP 47 tag, so screen readers read it with the right voice. Separate from `language`, which only sets the widget's own text; `language` counts only for a page with no `<html lang>`. See [Language](#language). | the page's `<html lang>`, else `language`, else unknown |
138
- | `position` | Launcher/panel corner: `'bottom-right'` or `'bottom-left'`. | `'bottom-right'` |
139
- | `color` | Primary accent color (any valid CSS color). Overrides the color configured in whoo-aiden; omit it to use that one. | whoo-aiden's, else `'#4f46e5'` |
140
- | `inkColor` | Body text color (chat title and replies). Darkened automatically if needed to stay readable. Overrides the color configured in whoo-aiden; omit it to use that one. | whoo-aiden's, else `'#111111'` |
141
- | `accentColor` | Link color in replies. Darkened automatically if needed to stay readable. Overrides the color configured in whoo-aiden; omit it to use that one. | whoo-aiden's, else `'#0000ee'` |
142
- | `name` | Agent name for the panel header and the dialog's screen-reader label ("Chat with {name}"). Overrides the name configured in whoo-aiden; omit it to use that one. | whoo-aiden's, else `'Aiden'` |
143
- | `title` | Full panel title, used for the header heading and the dialog's screen-reader label. Replaces the whole "Chat with {name}" string (e.g. `'Ask our concierge'`), with surrounding whitespace trimmed; the agent's messages are still labelled with its name. A blank value is ignored. | `'Chat with {name}'` |
144
- | `subtitle` | A second, smaller line under the panel title (e.g. your property's name). Not part of the dialog's screen-reader name, which stays the title. Blank values are ignored. | none |
145
- | `greeting` | Welcome text shown in the panel before the first message. | none |
146
- | `greetingStyle` | How `greeting` is shown: `'bubble'`, as the agent's first message, or `'centered'`, as plain text centered under `emptyStateImageUrl`, the two together in the middle of the empty panel. Either way it goes away once the visitor writes. | `'bubble'` |
147
- | `notice` | A notice, such as a disclaimer or terms of use, pinned at the top of the conversation (or under the message field, with `noticePlacement`). Unlike `greeting` it stays after the visitor writes, and comes back after "New conversation". Screen readers read it with the panel's title when the panel opens, until the visitor sends a first message. Supports `**bold**`, `_italic_`, `[links](https://...)` and `- ` lists; raw HTML shows as text. Blank values are ignored. See [Notice](#notice). | none |
148
- | `requireNoticeAgreement` | Ask the visitor to agree to `notice` before chatting: an "I agree" button (the `agreeToNotice` message) replaces the message field until they do. Remembered for the tab session, and asked again if the notice text changes. Ignored, with a console warning, without a `notice`. See [Notice](#notice). | `false` |
149
- | `noticePlacement` | Where `notice` is shown: `'top'`, above the conversation, or `'footer'`, as small print under the message field. See [Notice](#notice). | `'top'` |
150
- | `launcherIconUrl` | Image shown on the launcher bubble instead of the default chat icon. `https:` or `data:image/` only. Until it loads, and permanently if it fails, the default icon shows. Alias of `theme.launcher.iconUrl`. | none (default icon) |
151
- | `theme` | Colors, font and launcher icons. See [Theming](#theming). | defaults |
152
- | `layout` | Launcher position and size, and panel size. See [Layout](#layout). | defaults |
153
- | `emptyStateImageUrl` | Image (e.g. a brand lockup) shown above the greeting while the conversation is empty. `https:` or `data:image/` only. Removed if it fails to load. | none |
154
- | `emptyStateImageAlt` | Alt text for `emptyStateImageUrl`. Set it when the image carries meaning (e.g. your brand name); omit it for a purely decorative image. | none (decorative) |
155
- | `showFeedback` | Show thumbs up/down controls under each reply so visitors can rate answers (a thumbs-down opens an optional correction form). | `false` (hidden) |
156
- | `zIndex` | Stacking level of the launcher and panel over your page. The default sits above carousels, sticky headers and most overlays, while leaving room above it for a cookie or consent modal. Lower it if one of your own layers should cover the chat (see the accessibility note below). While the panel fills the screen (a viewport 400px wide or less, or 420px tall or less), it is a modal dialog in the browser's top layer: it sits above your page's layers whatever `zIndex` says, and the rest of the page, including page-level accessibility toolbars, can't be reached until it closes. A modal dialog your own page opens afterwards sits above it. An invalid value logs a warning and uses the default. | `2147483000` |
157
- | `apiBaseUrl` | Override the whoo-aiden API host the widget talks to. | `'https://api.aidenvoice.com'` |
130
+ | Option | Description | Default |
131
+ | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
132
+ | `publishableKey` | Public key used to mint a session server-side. Mutually exclusive with `sessionToken`. | none (required unless `sessionToken` is set) |
133
+ | `sessionToken` | A pre-minted session JWT from your own backend. Mutually exclusive with `publishableKey`. | none (required unless `publishableKey` is set) |
134
+ | `getSessionToken` | `sessionToken` mode only: a function returning a fresh session token (or a promise of one) from your backend, called when the current one has run out or is refused. Without it an expired session ends the chat until the page is reloaded. Ignored, with a warning, with `publishableKey` or when not a function. | none |
135
+ | `language` | Language of the widget's own text, as a BCP 47 tag (`'fr'`, `'pt-BR'`, `'zh-CN'`). Without it the widget follows the page's `<html lang>`, then English. See [Language](#language). | the page's language, else `'en'` |
136
+ | `messages` | Replaces individual built-in strings in the active language, e.g. `{ newConversation: 'Start over' }`. See [Language](#language). | none |
137
+ | `contentLanguage` | The language of the conversation's content (replies, the visitor's messages, and your `greeting`, `notice`, `title`, `subtitle`, `name` and image text), as a BCP 47 tag, so screen readers read it with the right voice. Separate from `language`, which only sets the widget's own text; `language` counts only for a page with no `<html lang>`. See [Language](#language). | the page's `<html lang>`, else `language`, else unknown |
138
+ | `position` | Launcher/panel corner: `'bottom-right'` or `'bottom-left'`. | `'bottom-right'` |
139
+ | `color` | Primary accent color (any valid CSS color). Overrides the color configured in whoo-aiden; omit it to use that one. | whoo-aiden's, else `'#4f46e5'` |
140
+ | `inkColor` | Body text color (chat title and replies). Darkened automatically if needed to stay readable. Overrides the color configured in whoo-aiden; omit it to use that one. | whoo-aiden's, else `'#111111'` |
141
+ | `accentColor` | Link color in replies. Darkened automatically if needed to stay readable. Overrides the color configured in whoo-aiden; omit it to use that one. | whoo-aiden's, else `'#0000ee'` |
142
+ | `name` | Agent name for the panel header and the dialog's screen-reader label ("Chat with {name}"). Overrides the name configured in whoo-aiden; omit it to use that one. | whoo-aiden's, else `'Aiden'` |
143
+ | `title` | Full panel title, used for the header heading and the dialog's screen-reader label. Replaces the whole "Chat with {name}" string (e.g. `'Ask our concierge'`), with surrounding whitespace trimmed; the agent's messages are still labelled with its name. A blank value is ignored. | `'Chat with {name}'` |
144
+ | `subtitle` | A second, smaller line under the panel title (e.g. your property's name). Not part of the dialog's screen-reader name, which stays the title. Blank values are ignored. | none |
145
+ | `greeting` | Welcome text shown in the panel before the first message. | none |
146
+ | `greetingStyle` | How `greeting` is shown: `'bubble'`, as the agent's first message, or `'centered'`, as plain text centered under `emptyStateImageUrl`, the two together in the middle of the empty panel. Either way it goes away once the visitor writes. | `'bubble'` |
147
+ | `notice` | A notice, such as a disclaimer or terms of use, pinned at the top of the conversation (or under the message field, with `noticePlacement`). Unlike `greeting` it stays after the visitor writes, and comes back after "New conversation". Screen readers read it with the panel's title when the panel opens, until the visitor sends a first message. Supports `**bold**`, `_italic_`, `[links](https://...)` and `- ` lists; raw HTML shows as text. Blank values are ignored. See [Notice](#notice). | none |
148
+ | `requireNoticeAgreement` | Ask the visitor to agree to `notice` before chatting: an "I agree" button (the `agreeToNotice` message) replaces the message field until they do. Remembered for the tab session, and asked again if the notice text changes. Ignored, with a console warning, without a `notice`. See [Notice](#notice). | `false` |
149
+ | `noticePlacement` | Where `notice` is shown: `'top'`, above the conversation, or `'footer'`, as small print under the message field. See [Notice](#notice). | `'top'` |
150
+ | `launcherIconUrl` | Image shown on the launcher bubble instead of the default chat icon. `https:` or `data:image/` only. Until it loads, and permanently if it fails, the default icon shows. Alias of `theme.launcher.iconUrl`. | none (default icon) |
151
+ | `theme` | Colors, font and launcher icons. See [Theming](#theming). | defaults |
152
+ | `layout` | Launcher position and size, and panel size. See [Layout](#layout). | defaults |
153
+ | `emptyStateImageUrl` | Image (e.g. a brand lockup) shown above the greeting while the conversation is empty. `https:` or `data:image/` only. Removed if it fails to load. | none |
154
+ | `emptyStateImageAlt` | Alt text for `emptyStateImageUrl`. Set it when the image carries meaning (e.g. your brand name); omit it for a purely decorative image. | none (decorative) |
155
+ | `showFeedback` | Show thumbs up/down controls under each reply so visitors can rate answers (a thumbs-down opens an optional correction form). | `false` (hidden) |
156
+ | `zIndex` | Stacking level of the launcher and panel over your page. The default sits above carousels, sticky headers and most overlays, while leaving room above it for a cookie or consent modal. Lower it if one of your own layers should cover the chat (see the accessibility note below). While the panel fills the screen (a viewport 400px wide or less, or 420px tall or less), it is a modal dialog in the browser's top layer: it sits above your page's layers whatever `zIndex` says, and the rest of the page, including page-level accessibility toolbars, can't be reached until it closes. A modal dialog your own page opens afterwards sits above it. An invalid value logs a warning and uses the default. | `2147483000` |
157
+ | `apiBaseUrl` | Override the whoo-aiden API host the widget talks to. | `'https://api.aidenvoice.com'` |
158
158
 
159
159
  ### When something else already owns the corner
160
160
 
@@ -169,7 +169,7 @@ Use `notice` for text every visitor must be shown before chatting, such as a dis
169
169
  init({
170
170
  publishableKey: 'pk_...',
171
171
  notice:
172
- "**Welcome to Ask Aiden, our Guest Assistant!**\n\nAll information provided is for informational purposes only. By selecting \"I agree\", you accept our [Website Terms of Use](https://example.com/terms).",
172
+ '**Welcome to Ask Aiden, our Guest Assistant!**\n\nAll information provided is for informational purposes only. By selecting "I agree", you accept our [Website Terms of Use](https://example.com/terms).',
173
173
  requireNoticeAgreement: true,
174
174
  })
175
175
  ```
@@ -205,38 +205,42 @@ window.whooAidenWidget.init({
205
205
  })
206
206
  ```
207
207
 
208
- | Key | English | Where |
209
- |---|---|---|
210
- | `openChat` | Open chat | launcher name, closed |
211
- | `closeChat` | Close chat | launcher name while open, header ✕ |
212
- | `chatWith` | Chat with {name} | panel title and dialog name (unless `title` is set) |
213
- | `newConversation` | New conversation | header button |
214
- | `conversation` | Conversation | message list region name |
215
- | `you` | You | screen-reader speaker label on the visitor's messages |
216
- | `message` | Message | message box label |
217
- | `messagePlaceholder` | Type a message… | message box placeholder (a hint; `message` stays its label) |
218
- | `send` | Send | composer button |
219
- | `messageSent` | Message sent. {name} is preparing a response. | screen-reader announcement when a message is sent; `{name}` is the agent's name |
220
- | `lookingItUp` | Looking that up for you… | slow-reply notice |
221
- | `goodResponse` | Good response | thumbs-up name |
222
- | `badResponse` | Bad response | thumbs-down name |
223
- | `additionalFeedback` | Additional feedback | feedback text field label |
224
- | `feedbackPlaceholder` | What was wrong? (optional) | feedback text field placeholder |
225
- | `feedbackCategory` | Feedback category | feedback select label |
226
- | `selectReason` | Select a reason (optional) | feedback select first option |
227
- | `categoryFactual` | Factual error | feedback option |
228
- | `categoryIncomplete` | Incomplete | feedback option |
229
- | `categoryTone` | Off tone | feedback option |
230
- | `categoryOther` | Other | feedback option |
231
- | `submit` | Submit | feedback form button |
232
- | `cancel` | Cancel | feedback form button |
233
- | `feedbackThanks` | Thanks for the feedback | feedback status |
234
- | `feedbackFailed` | Couldn't send feedback | feedback status |
235
- | `conversationCleared` | New conversation started. Previous messages were cleared. | screen-reader announcement after New conversation |
236
- | `genericError` | Something went wrong, please try again. | error alert |
237
- | `sessionExpired` | This chat session has expired. Reload the page to continue. | error alert |
238
- | `opensInNewTab` | (opens in new tab) | screen readers only, after each link in a reply: every link in a reply opens in a new tab |
239
- | `agreeToNotice` | I agree | button the visitor presses to agree to the `notice`, with `requireNoticeAgreement` |
208
+ | Key | English | Where |
209
+ | ---------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
210
+ | `openChat` | Open chat | launcher name, closed |
211
+ | `closeChat` | Close chat | launcher name while open, header ✕ |
212
+ | `chatWith` | Chat with {name} | panel title and dialog name (unless `title` is set) |
213
+ | `newConversation` | New conversation | header button |
214
+ | `conversation` | Conversation | message list region name |
215
+ | `you` | You | screen-reader speaker label on the visitor's messages |
216
+ | `message` | Message | message box label |
217
+ | `messagePlaceholder` | Type a message… | message box placeholder (a hint; `message` stays its label) |
218
+ | `send` | Send | composer button |
219
+ | `messageSent` | Message sent. {name} is preparing a response. | screen-reader announcement when a message is sent; `{name}` is the agent's name |
220
+ | `lookingItUp` | Looking that up for you… | slow-reply notice |
221
+ | `goodResponse` | Good response | thumbs-up name |
222
+ | `badResponse` | Bad response | thumbs-down name |
223
+ | `additionalFeedback` | Additional feedback | feedback text field label |
224
+ | `feedbackPlaceholder` | What was wrong? (optional) | feedback text field placeholder |
225
+ | `feedbackCategory` | Feedback category | feedback select label |
226
+ | `selectReason` | Select a reason (optional) | feedback select first option |
227
+ | `categoryFactual` | Factual error | feedback option |
228
+ | `categoryIncomplete` | Incomplete | feedback option |
229
+ | `categoryTone` | Off tone | feedback option |
230
+ | `categoryOther` | Other | feedback option |
231
+ | `submit` | Submit | feedback form button |
232
+ | `cancel` | Cancel | feedback form button |
233
+ | `feedbackThanks` | Thanks for the feedback | feedback status |
234
+ | `feedbackFailed` | Couldn't send feedback | feedback status |
235
+ | `conversationCleared` | New conversation started. Previous messages were cleared. | screen-reader announcement after New conversation |
236
+ | `genericError` | Something went wrong, please try again. | error alert |
237
+ | `sessionExpired` | This chat session has expired. Reload the page to continue. | error alert |
238
+ | `tooManyMessages` | You're sending messages too quickly. Please wait a moment and try again. | error alert when messages arrive faster than the service allows |
239
+ | `assistantUnavailable` | The assistant is unavailable right now. Please try again later. | error alert when the agent's daily message budget is spent |
240
+ | `waitForReply` | Please wait for the current reply to finish. | error alert when a message is sent while a reply is still streaming |
241
+ | `messageLimitReached` | This conversation has reached its message limit. Please try again later. | error alert when the conversation is still at its message limit after the widget started a new session |
242
+ | `opensInNewTab` | (opens in new tab) | screen readers only, after each link in a reply: every link in a reply opens in a new tab |
243
+ | `agreeToNotice` | I agree | button the visitor presses to agree to the `notice`, with `requireNoticeAgreement` |
240
244
 
241
245
  **About the translations:** they were machine-drafted and cross-checked by independent AI agents (back-translation, critique, and rendering checks), not reviewed by native speakers. [docs/translation-verification.md](docs/translation-verification.md) records every check. If any wording reads wrong, override it with `messages`, and please tell us.
242
246
 
@@ -271,23 +275,23 @@ init({
271
275
 
272
276
  **Colors.** An override is used exactly as you give it: the widget does not darken it or fix its contrast, and only logs a `console.warn` when the contrast looks too low. You own the result for every role you override. An unusable value (a typo, `currentColor`, a CSS variable) is ignored with a warning and the calculated color is used instead. A role you don't set keeps the widget's calculated color. `theme.colors.primary`, `.ink` and `.link` beat `color`, `inkColor` and `accentColor`, which beat the agent's colors configured in whoo-aiden.
273
277
 
274
- | Role | What it colors | Default |
275
- | --- | --- | --- |
276
- | `primary` | Launcher, your visitor's bubbles, Send and Submit buttons | `#4f46e5` |
277
- | `onPrimary` | Text and icons on `primary` | black or white, whichever reads best |
278
- | `primaryText` | `primary` used as text on the panel (header controls) | `primary`, darkened until readable |
279
- | `ink` | Header title and replies | `#111111` |
280
- | `link` | Links in replies | `#0000ee` |
281
- | `text` | Form-control and feedback-button text | `#111111` |
282
- | `panel` | Panel background | `#ffffff` |
283
- | `border` | Dividers | `#e5e5e5` |
284
- | `headerHover` | Header control hover fill | `#f3f4f6` |
285
- | `assistantBubble` | Reply bubble background | `#f0f0f0` |
286
- | `muted` | Secondary text on replies and on the panel (`subtitle`, the footer notice, the message box placeholder) | `#4b5563` |
287
- | `typingDots` | "Waiting for a reply" dots | `#6b7280` |
288
- | `errorBackground`, `errorText` | Error banner | `#fee2e2`, `#991b1b` |
289
- | `inputBorder` | Input and form borders | `#6b7280` |
290
- | `focusRing` | Dark tone of the keyboard focus outline | `#111827` |
278
+ | Role | What it colors | Default |
279
+ | ------------------------------ | ------------------------------------------------------------------------------------------------------- | ------------------------------------ |
280
+ | `primary` | Launcher, your visitor's bubbles, Send and Submit buttons | `#4f46e5` |
281
+ | `onPrimary` | Text and icons on `primary` | black or white, whichever reads best |
282
+ | `primaryText` | `primary` used as text on the panel (header controls) | `primary`, darkened until readable |
283
+ | `ink` | Header title and replies | `#111111` |
284
+ | `link` | Links in replies | `#0000ee` |
285
+ | `text` | Form-control and feedback-button text | `#111111` |
286
+ | `panel` | Panel background | `#ffffff` |
287
+ | `border` | Dividers | `#e5e5e5` |
288
+ | `headerHover` | Header control hover fill | `#f3f4f6` |
289
+ | `assistantBubble` | Reply bubble background | `#f0f0f0` |
290
+ | `muted` | Secondary text on replies and on the panel (`subtitle`, the footer notice, the message box placeholder) | `#4b5563` |
291
+ | `typingDots` | "Waiting for a reply" dots | `#6b7280` |
292
+ | `errorBackground`, `errorText` | Error banner | `#fee2e2`, `#991b1b` |
293
+ | `inputBorder` | Input and form borders | `#6b7280` |
294
+ | `focusRing` | Dark tone of the keyboard focus outline | `#111827` |
291
295
 
292
296
  If you override a surface (`panel`, `assistantBubble`, ...), also override the roles drawn on it: the defaults are made for the default surfaces, and an override of one is never adjusted to fit another. The roles drawn on each surface are `panel`: `primaryText`, `ink`, `link`, `muted`, `text`, `focusRing`, `border`, `inputBorder`; `headerHover`: `primaryText`; `assistantBubble`: `ink`, `link`, `muted`, `typingDots`, `text`; `errorBackground`: `errorText`. (The example above leaves `inputBorder`, `typingDots` and the error colors at their defaults, which already read well on it.)
293
297
 
@@ -305,9 +309,9 @@ init({
305
309
  position: 'bottom-right',
306
310
  layout: {
307
311
  offset: { x: 24, y: 96 }, // distance from the chosen corner (default 20, 20)
308
- launcherSize: 64, // launcher diameter, 24-120 (default 56)
312
+ launcherSize: 64, // launcher diameter, 24-120 (default 56)
309
313
  panel: { width: 420, height: 640 }, // preferred panel size (default 360×480, minimum 280×320)
310
- cornerRadius: 20, // panel, message box, Send and "I agree", 0-32 (default 12 panel, 6 controls)
314
+ cornerRadius: 20, // panel, message box, Send and "I agree", 0-32 (default 12 panel, 6 controls)
311
315
  },
312
316
  })
313
317
  ```
@@ -350,7 +354,7 @@ const dark = resolveTheme({ overrides: { panel: '#0f172a', ink: '#f8fafc' } })
350
354
  // (`focusRing`) are flagged against the dark panel.
351
355
  ```
352
356
 
353
- An override is never adjusted (an opaque one is only normalized to `#rrggbb`). In particular a *translucent* override (`rgba(…, 0.5)`, `#rrggbbaa`) is kept as given, not flattened to its look over white the way `color` is, so a translucent `primary` or `panel` is see-through over the host page, and the host owns the result. `resolveTheme` never logs; read `contrastWarnings` instead.
357
+ An override is never adjusted (an opaque one is only normalized to `#rrggbb`). In particular a _translucent_ override (`rgba(…, 0.5)`, `#rrggbbaa`) is kept as given, not flattened to its look over white the way `color` is, so a translucent `primary` or `panel` is see-through over the host page, and the host owns the result. `resolveTheme` never logs; read `contrastWarnings` instead.
354
358
 
355
359
  It needs a DOM (a browser, or jsdom in tests).
356
360
 
@@ -651,13 +655,13 @@ the applicable Aiden terms of service. See `LICENSE.md` in the package.
651
655
  This repo uses [pnpm](https://pnpm.io) and [Biome](https://biomejs.dev)
652
656
  (not npm/yarn or eslint/prettier).
653
657
 
654
- | Command | Description |
655
- | --- | --- |
656
- | `pnpm build` | Build the ESM (npm) and IIFE (CDN) bundles into `dist/`, once. |
658
+ | Command | Description |
659
+ | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
660
+ | `pnpm build` | Build the ESM (npm) and IIFE (CDN) bundles into `dist/`, once. |
657
661
  | `pnpm build:watch` | Same, but rebuilds `dist/` automatically on every source change. Run this in the background whenever you're developing against a sibling `whoo-aiden-dashboard` checkout (its `file:` dependency on this repo resolves to `dist/`, not `src/`, so without this a dashboard rebuild/reload can silently keep serving stale widget code). |
658
- | `pnpm dev` | Run the Vite dev server. |
659
- | `pnpm lint` | Lint the repo with Biome. |
660
- | `pnpm format` | Format the repo with Biome. |
661
- | `pnpm typecheck` | Type-check with `tsc --noEmit`. |
662
- | `pnpm test` | Run the Vitest unit/component test suite. |
663
- | `pnpm e2e` | Run the Playwright end-to-end embed smoke test against the built IIFE bundle. |
662
+ | `pnpm dev` | Run the Vite dev server. |
663
+ | `pnpm lint` | Lint the repo with Biome. |
664
+ | `pnpm format` | Format the repo with Biome. |
665
+ | `pnpm typecheck` | Type-check with `tsc --noEmit`. |
666
+ | `pnpm test` | Run the Vitest unit/component test suite. |
667
+ | `pnpm e2e` | Run the Playwright end-to-end embed smoke test against the built IIFE bundle. |
@@ -1,6 +1,7 @@
1
1
  export declare class WidgetApiError extends Error {
2
2
  readonly status?: number;
3
- constructor(message: string, status?: number);
3
+ readonly code?: string;
4
+ constructor(message: string, status?: number, code?: string);
4
5
  }
5
6
  export interface Branding {
6
7
  primaryColor: string | null;
@@ -27,6 +27,10 @@ export interface WidgetMessages {
27
27
  conversationCleared: string;
28
28
  genericError: string;
29
29
  sessionExpired: string;
30
+ tooManyMessages: string;
31
+ assistantUnavailable: string;
32
+ waitForReply: string;
33
+ messageLimitReached: string;
30
34
  opensInNewTab: string;
31
35
  agreeToNotice: string;
32
36
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const WIDGET_VERSION = "0.10.2";
1
+ export declare const WIDGET_VERSION = "0.10.3";