@squadico/chatbot 1.4.0 → 1.5.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.
Files changed (41) hide show
  1. package/README.md +5 -4
  2. package/dist/{answer-CDGrP8YE.js → answer-BDuY6oLY.js} +242 -231
  3. package/dist/answer-BDuY6oLY.js.map +1 -0
  4. package/dist/answer-Bi8GWLyA.cjs +8 -0
  5. package/dist/answer-Bi8GWLyA.cjs.map +1 -0
  6. package/dist/chatbot.global.js +11 -11
  7. package/dist/chatbot.global.js.map +1 -1
  8. package/dist/components/ChatbotWidget.d.ts.map +1 -1
  9. package/dist/element.d.ts.map +1 -1
  10. package/dist/{extras-lsCe4xgN.cjs → extras-BAqWS9pU.cjs} +2 -2
  11. package/dist/{extras-lsCe4xgN.cjs.map → extras-BAqWS9pU.cjs.map} +1 -1
  12. package/dist/{extras-ClIRRLqo.js → extras-BSCTuiit.js} +2 -2
  13. package/dist/{extras-ClIRRLqo.js.map → extras-BSCTuiit.js.map} +1 -1
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.js +2 -2
  16. package/dist/lib/conversation.d.ts +5 -1
  17. package/dist/lib/conversation.d.ts.map +1 -1
  18. package/dist/lib/useChat.d.ts +6 -0
  19. package/dist/lib/useChat.d.ts.map +1 -1
  20. package/dist/react.cjs +1 -1
  21. package/dist/react.cjs.map +1 -1
  22. package/dist/react.d.ts.map +1 -1
  23. package/dist/react.js +2 -2
  24. package/dist/react.js.map +1 -1
  25. package/dist/{src-BjqOavOO.js → src-B7GLD1Xs.js} +489 -452
  26. package/dist/src-B7GLD1Xs.js.map +1 -0
  27. package/dist/src-DuYhMbNf.cjs +7 -0
  28. package/dist/src-DuYhMbNf.cjs.map +1 -0
  29. package/dist/types.d.ts +5 -0
  30. package/dist/types.d.ts.map +1 -1
  31. package/dist/widgets/extras-loader.d.ts +1 -1
  32. package/dist/widgets/inline.d.ts.map +1 -1
  33. package/dist/widgets.cjs +1 -1
  34. package/dist/widgets.js +2 -2
  35. package/package.json +1 -1
  36. package/dist/answer-CDGrP8YE.js.map +0 -1
  37. package/dist/answer-DRaV2dVt.cjs +0 -8
  38. package/dist/answer-DRaV2dVt.cjs.map +0 -1
  39. package/dist/src-BjqOavOO.js.map +0 -1
  40. package/dist/src-DS8P9HdZ.cjs +0 -7
  41. package/dist/src-DS8P9HdZ.cjs.map +0 -1
package/README.md CHANGED
@@ -158,6 +158,7 @@ All optional. An attribute is a string; object or function values are set as
158
158
  | `open` | absent | Presence = open at mount, for a first visit — a panel the user opened or closed themselves wins |
159
159
  | `persist-open` | `true` | The panel stays open (or closed) across a refresh or a page change, for the lifetime of the tab. `persist-open="false"` → the state starts from `open` on every mount |
160
160
  | `show-context` | `true` | Since 1.3.0. Shows the page context as chips under the header. `show-context="false"` hides them — the context is still sent with every message |
161
+ | `scope` | absent | Since 1.5.0. Partitions remembered conversations the way the host does (an organization, a workspace). A conversation is only resumed under the scope it was opened with; changing it opens a new one |
161
162
  | `locale` | browser languages, then `en` | Interface language and date locale, in BCP-47. When absent, `navigator.languages` is read in the user's order of preference. Three languages ship — `en`, `fr`, `es`; anything else falls back to English. The region is only read by `Intl`: `fr-CA` = French copy, Canadian dates |
162
163
 
163
164
  ### Icon of the floating button
@@ -311,7 +312,7 @@ and [unpkg](https://unpkg.com) as soon as a version is published — there is
311
312
  nothing else to deploy. Add the script, then the tag, anywhere in the page:
312
313
 
313
314
  ```html
314
- <script src="https://cdn.jsdelivr.net/npm/@squadico/chatbot@1.4.0/dist/chatbot.global.js"></script>
315
+ <script src="https://cdn.jsdelivr.net/npm/@squadico/chatbot@1.5.1/dist/chatbot.global.js"></script>
315
316
  <squadico-chatbot
316
317
  embed-key="sq_pub_paste_yours_here"
317
318
  context='{"workspaceId":"WS-1"}'
@@ -319,7 +320,7 @@ nothing else to deploy. Add the script, then the tag, anywhere in the page:
319
320
  ```
320
321
 
321
322
  unpkg works the same way:
322
- `https://unpkg.com/@squadico/chatbot@1.4.0/dist/chatbot.global.js`.
323
+ `https://unpkg.com/@squadico/chatbot@1.5.1/dist/chatbot.global.js`.
323
324
 
324
325
  The form an agent may ask the visitor to fill in, the charts it draws and the
325
326
  Yes / No card of a tool call waiting on the visitor's approval live
@@ -327,14 +328,14 @@ in a second file, `chatbot-widgets.global.js`, published next to
327
328
  `chatbot.global.js` in `dist/`. The chat loads it on its own, from the same
328
329
  folder as its own script, the first time an answer holds a form, a chart or an approval — so it is never fetched by a conversation that does
329
330
  not need it. A self-hosted copy must therefore keep both files side by side.
330
- The short CDN URL (`https://cdn.jsdelivr.net/npm/@squadico/chatbot@1.4.0`,
331
+ The short CDN URL (`https://cdn.jsdelivr.net/npm/@squadico/chatbot@1.5.1`,
331
332
  served through the package's `jsdelivr` / `unpkg` fields) works too: a script URL
332
333
  that does not end in `.js` is taken as the package root, and the extras file is
333
334
  fetched from its `dist/` folder. The injected script carries the main script's
334
335
  `nonce`, so a CSP built on nonces covers it. Until the file arrives — or if it
335
336
  cannot — a form shows its field labels and a chart its filename, as plain text.
336
337
 
337
- **Pin the version.** `@1.4.0` never changes, so a release cannot alter a
338
+ **Pin the version.** `@1.5.1` never changes, so a release cannot alter a
338
339
  customer page. Leaving it out (`@squadico/chatbot/dist/…`) serves the latest
339
340
  version, cached by jsDelivr for up to 12 hours; a range such as `@1` follows the
340
341
  newest `1.x.y`. Prefer a pinned version in production.