open-chat-studio-widget 0.5.3 → 0.7.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.
Files changed (45) hide show
  1. package/README.md +27 -24
  2. package/dist/cjs/{index-D8A4RBzq.js → index-CvB341El.js} +3 -3
  3. package/dist/cjs/{index-D8A4RBzq.js.map → index-CvB341El.js.map} +1 -1
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/open-chat-studio-widget.cjs.entry.js +387 -139
  6. package/dist/cjs/open-chat-studio-widget.cjs.entry.js.map +1 -1
  7. package/dist/cjs/open-chat-studio-widget.cjs.js +2 -2
  8. package/dist/cjs/open-chat-studio-widget.entry.cjs.js.map +1 -1
  9. package/dist/collection/components/ocs-chat/icons.js +2 -2
  10. package/dist/collection/components/ocs-chat/icons.js.map +1 -1
  11. package/dist/collection/components/ocs-chat/ocs-chat.css +29 -34
  12. package/dist/collection/components/ocs-chat/ocs-chat.js +329 -76
  13. package/dist/collection/components/ocs-chat/ocs-chat.js.map +1 -1
  14. package/dist/collection/services/chat-session-service.js +4 -0
  15. package/dist/collection/services/chat-session-service.js.map +1 -1
  16. package/dist/collection/services/file-attachment-manager.js +4 -6
  17. package/dist/collection/services/file-attachment-manager.js.map +1 -1
  18. package/dist/collection/utils/cookies.js.map +1 -1
  19. package/dist/collection/utils/markdown.js +43 -17
  20. package/dist/collection/utils/markdown.js.map +1 -1
  21. package/dist/collection/utils/translations.js +1 -3
  22. package/dist/collection/utils/translations.js.map +1 -1
  23. package/dist/collection/utils/utils.js +2 -2
  24. package/dist/collection/utils/utils.js.map +1 -1
  25. package/dist/components/open-chat-studio-widget.js +394 -138
  26. package/dist/components/open-chat-studio-widget.js.map +1 -1
  27. package/dist/esm/{index-C53whb-B.js → index-C2QZK0Ui.js} +3 -3
  28. package/dist/esm/{index-C53whb-B.js.map → index-C2QZK0Ui.js.map} +1 -1
  29. package/dist/esm/loader.js +3 -3
  30. package/dist/esm/open-chat-studio-widget.entry.js +387 -139
  31. package/dist/esm/open-chat-studio-widget.entry.js.map +1 -1
  32. package/dist/esm/open-chat-studio-widget.js +3 -3
  33. package/dist/open-chat-studio-widget/open-chat-studio-widget.entry.esm.js.map +1 -1
  34. package/dist/open-chat-studio-widget/open-chat-studio-widget.esm.js +1 -1
  35. package/dist/open-chat-studio-widget/{p-C53whb-B.js → p-C2QZK0Ui.js} +2 -2
  36. package/dist/open-chat-studio-widget/{p-C53whb-B.js.map → p-C2QZK0Ui.js.map} +1 -1
  37. package/dist/open-chat-studio-widget/p-e87d4e31.entry.js +4 -0
  38. package/dist/open-chat-studio-widget/p-e87d4e31.entry.js.map +1 -0
  39. package/dist/types/components/ocs-chat/ocs-chat.d.ts +41 -1
  40. package/dist/types/components.d.ts +31 -2
  41. package/dist/types/services/chat-session-service.d.ts +1 -0
  42. package/dist/types/utils/markdown.d.ts +8 -0
  43. package/package.json +7 -2
  44. package/dist/open-chat-studio-widget/p-b9556259.entry.js +0 -4
  45. package/dist/open-chat-studio-widget/p-b9556259.entry.js.map +0 -1
package/README.md CHANGED
@@ -9,29 +9,32 @@ For more information, see the [Open Chat Studio documentation](https://docs.open
9
9
 
10
10
  ## Properties
11
11
 
12
- | Property | Attribute | Description | Type | Default |
13
- | ---------------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ---------------------------------- |
14
- | `allowAttachments` | `allow-attachments` | Allow the user to attach files to their messages. | `boolean` | `false` |
15
- | `allowFullScreen` | `allow-full-screen` | Allow the user to make the chat window full screen. | `boolean` | `true` |
16
- | `apiBaseUrl` | `api-base-url` | The base URL for the API. | `string` | `"https://www.openchatstudio.com"` |
17
- | `buttonShape` | `button-shape` | The shape of the chat button. 'round' makes it circular, 'square' keeps it rectangular. | `"round" \| "square"` | `'square'` |
18
- | `buttonText` | `button-text` | The text to display on the button. | `string` | `undefined` |
19
- | `chatbotId` _(required)_ | `chatbot-id` | The ID of the chatbot to connect to. | `string` | `undefined` |
20
- | `embedKey` | `embed-key` | Authentication key for embedded channels | `string` | `undefined` |
21
- | `headerText` | `header-text` | The text to place in the header. | `""` | `undefined` |
22
- | `iconUrl` | `icon-url` | URL of the icon to display on the button. If not provided, uses the default OCS logo. | `string` | `undefined` |
23
- | `language` | `language` | The language code for the widget UI (e.g., 'en', 'es', 'fr'). Defaults to en | `string` | `undefined` |
24
- | `newChatConfirmationMessage` | `new-chat-confirmation-message` | The message to display in the new chat confirmation dialog. | `string` | `undefined` |
25
- | `persistentSession` | `persistent-session` | Whether to persist session data to local storage to allow resuming previous conversations after page reload. | `boolean` | `true` |
26
- | `persistentSessionExpire` | `persistent-session-expire` | Minutes since the most recent message after which the session data in local storage will expire. Set this to `0` to never expire. | `number` | `60 * 24` |
27
- | `position` | `position` | The initial position of the chat widget on the screen. | `"center" \| "left" \| "right"` | `'right'` |
28
- | `starterQuestions` | `starter-questions` | Array of starter questions that users can click to send (JSON array of strings) | `string` | `undefined` |
29
- | `translationsUrl` | `translations-url` | | `string` | `undefined` |
30
- | `typingIndicatorText` | `typing-indicator-text` | The text to display while the assistant is typing/preparing a response. | `string` | `undefined` |
31
- | `userId` | `user-id` | Used to associate chat sessions with a specific user across multiple visits/sessions | `string` | `undefined` |
32
- | `userName` | `user-name` | Display name for the user. | `string` | `undefined` |
33
- | `visible` | `visible` | Whether the chat widget is visible on load. | `boolean` | `false` |
34
- | `welcomeMessages` | `welcome-messages` | Welcome messages to display above starter questions (JSON array of strings) | `string` | `undefined` |
12
+ | Property | Attribute | Description | Type | Default |
13
+ | ---------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- | ---------------------------------- |
14
+ | `allowAttachments` | `allow-attachments` | Allow the user to attach files to their messages. | `boolean` | `false` |
15
+ | `allowFullScreen` | `allow-full-screen` | Allow the user to make the chat window full screen. | `boolean` | `true` |
16
+ | `apiBaseUrl` | `api-base-url` | The base URL for the API. | `string` | `'https://www.openchatstudio.com'` |
17
+ | `buttonShape` | `button-shape` | The shape of the chat button. 'round' makes it circular, 'square' keeps it rectangular. | `"round" \| "square"` | `'square'` |
18
+ | `buttonText` | `button-text` | The text to display on the button. | `string` | `undefined` |
19
+ | `chatbotId` _(required)_ | `chatbot-id` | The ID of the chatbot to connect to. | `string` | `undefined` |
20
+ | `embedKey` | `embed-key` | Authentication key for embedded channels | `string` | `undefined` |
21
+ | `headerText` | `header-text` | The text to place in the header. | `""` | `undefined` |
22
+ | `iconUrl` | `icon-url` | URL of the icon to display on the button. If not provided, uses the default OCS logo. | `string` | `undefined` |
23
+ | `language` | `language` | The language code for the widget UI (e.g., 'en', 'es', 'fr'). Defaults to en | `string` | `undefined` |
24
+ | `mode` | `mode` | The operating mode of the widget. - 'standard': Default floating window with launcher button. - 'kiosk': Fills parent container, always visible, no header or launcher button. The parent element must establish a containing block (e.g. `position: relative`). | `"kiosk" \| "standard"` | `'standard'` |
25
+ | `newChatConfirmationMessage` | `new-chat-confirmation-message` | The message to display in the new chat confirmation dialog. | `string` | `undefined` |
26
+ | `pageContext` | `page-context` | Optional context object to send with each message. This provides page-specific context to the bot. | `{ [x: string]: any; }` | `undefined` |
27
+ | `persistentSession` | `persistent-session` | Whether to persist session data to local storage to allow resuming previous conversations after page reload. | `boolean` | `true` |
28
+ | `persistentSessionExpire` | `persistent-session-expire` | Minutes since the most recent message after which the session data in local storage will expire. Set this to `0` to never expire. | `number` | `60 * 24` |
29
+ | `position` | `position` | The initial position of the chat widget on the screen. | `"center" \| "left" \| "right"` | `'right'` |
30
+ | `showButton` | `show-button` | Whether to show the launcher button. Set to false to hide the button and open the chat window programmatically via the `visible` property. | `boolean` | `true` |
31
+ | `starterQuestions` | `starter-questions` | Array of starter questions that users can click to send (JSON array of strings) | `string` | `undefined` |
32
+ | `translationsUrl` | `translations-url` | | `string` | `undefined` |
33
+ | `typingIndicatorText` | `typing-indicator-text` | The text to display while the assistant is typing/preparing a response. | `string` | `undefined` |
34
+ | `userId` | `user-id` | Used to associate chat sessions with a specific user across multiple visits/sessions | `string` | `undefined` |
35
+ | `userName` | `user-name` | Display name for the user. | `string` | `undefined` |
36
+ | `visible` | `visible` | Whether the chat widget is visible on load. | `boolean` | `false` |
37
+ | `welcomeMessages` | `welcome-messages` | Welcome messages to display above starter questions (JSON array of strings) | `string` | `undefined` |
35
38
 
36
39
 
37
40
  ## CSS Custom Properties
@@ -113,7 +116,7 @@ For more information, see the [Open Chat Studio documentation](https://docs.open
113
116
  | `--scrollbar-thumb-color` | Scrollbar thumb color (#d1d5db) |
114
117
  | `--scrollbar-thumb-hover-color` | Scrollbar thumb hover color (#9ca3af) |
115
118
  | `--scrollbar-track-color` | Scrollbar track color (#f3f4f6) |
116
- | `--selected-file-bg-color` | Selected file item background color (--message-system-bg-color) |
119
+ | `--selected-file-bg-color` | Selected file item background color (--button-background-color-hover) |
117
120
  | `--selected-file-font-size` | Selected file item font size (--chat-window-font-size-sm) |
118
121
  | `--selected-file-icon-size` | Selected file item icon size (1.25em) |
119
122
  | `--selected-file-name-color` | Selected file name color (--message-assistant-text-color) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  const NAMESPACE = 'open-chat-studio-widget';
4
4
  const BUILD = /* open-chat-studio-widget */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true};
5
- const Env = /* open-chat-studio-widget */ {"version":"0.5.3"};
5
+ const Env = /* open-chat-studio-widget */ {"version":"0.7.0"};
6
6
 
7
7
  /*
8
8
  Stencil Client Platform v4.36.3 | MIT Licensed | https://stenciljs.com
@@ -1488,6 +1488,6 @@ exports.h = h;
1488
1488
  exports.promiseResolve = promiseResolve;
1489
1489
  exports.registerInstance = registerInstance;
1490
1490
  exports.setNonce = setNonce;
1491
- //# sourceMappingURL=index-D8A4RBzq.js.map
1491
+ //# sourceMappingURL=index-CvB341El.js.map
1492
1492
 
1493
- //# sourceMappingURL=index-D8A4RBzq.js.map
1493
+ //# sourceMappingURL=index-CvB341El.js.map