@8wave/ai-elements 0.121.0-beta.51 → 0.121.0-beta.53

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 (120) hide show
  1. package/README.md +30 -0
  2. package/dist/_chunks/{Agent-CtLgGLbV.js → Agent-BdoXh8b0.js} +252 -250
  3. package/dist/_chunks/Agent-BdoXh8b0.js.map +1 -0
  4. package/dist/_chunks/{PkStreamingMarkdown-BP7HK2u0.js → PkStreamingMarkdown-CR-xBRG2.js} +3 -3
  5. package/dist/_chunks/{PkStreamingMarkdown-BP7HK2u0.js.map → PkStreamingMarkdown-CR-xBRG2.js.map} +1 -1
  6. package/dist/_chunks/{PkToolEditedFile-VFnIlU4j.js → PkToolEditedFile-DAMPjKIn.js} +2 -2
  7. package/dist/_chunks/{PkToolEditedFile-VFnIlU4j.js.map → PkToolEditedFile-DAMPjKIn.js.map} +1 -1
  8. package/dist/_chunks/{PkToolRequestGeolocation-B51_MHPQ.js → PkToolRequestGeolocation-BantUie4.js} +2 -2
  9. package/dist/_chunks/{PkToolRequestGeolocation-B51_MHPQ.js.map → PkToolRequestGeolocation-BantUie4.js.map} +1 -1
  10. package/dist/_chunks/{PkToolRequestOAuthConnection-DfjwyGwk.js → PkToolRequestOAuthConnection-CB5ziPOE.js} +2 -2
  11. package/dist/_chunks/{PkToolRequestOAuthConnection-DfjwyGwk.js.map → PkToolRequestOAuthConnection-CB5ziPOE.js.map} +1 -1
  12. package/dist/_chunks/{PkToolShowArtifact-B8l3G0ae.js → PkToolShowArtifact-B1J7a3o0.js} +2 -2
  13. package/dist/_chunks/{PkToolShowArtifact-B8l3G0ae.js.map → PkToolShowArtifact-B1J7a3o0.js.map} +1 -1
  14. package/dist/_chunks/{PkToolShowContactForm-wNiHeOQM.js → PkToolShowContactForm-DcNMM-j0.js} +2 -2
  15. package/dist/_chunks/{PkToolShowContactForm-wNiHeOQM.js.map → PkToolShowContactForm-DcNMM-j0.js.map} +1 -1
  16. package/dist/_chunks/{PkToolShowForm-jA0SkiQC.js → PkToolShowForm-CRa9HLZo.js} +3 -3
  17. package/dist/_chunks/{PkToolShowForm-jA0SkiQC.js.map → PkToolShowForm-CRa9HLZo.js.map} +1 -1
  18. package/dist/_chunks/{PkToolShowImageGallery-B9PlDrmn.js → PkToolShowImageGallery-BisEror8.js} +2 -2
  19. package/dist/_chunks/{PkToolShowImageGallery-B9PlDrmn.js.map → PkToolShowImageGallery-BisEror8.js.map} +1 -1
  20. package/dist/_chunks/{PkToolShowProductList-DRHSe2e7.js → PkToolShowProductList-BmPdjUSS.js} +2 -2
  21. package/dist/_chunks/{PkToolShowProductList-DRHSe2e7.js.map → PkToolShowProductList-BmPdjUSS.js.map} +1 -1
  22. package/dist/_chunks/{PkToolShowSources-K-cNd52t.js → PkToolShowSources-LQ0DMKM1.js} +3 -3
  23. package/dist/_chunks/{PkToolShowSources-K-cNd52t.js.map → PkToolShowSources-LQ0DMKM1.js.map} +1 -1
  24. package/dist/_chunks/{PkToolShowSuggestedReply-BQHtnpb_.js → PkToolShowSuggestedReply-lzs6-CcI.js} +2 -2
  25. package/dist/_chunks/{PkToolShowSuggestedReply-BQHtnpb_.js.map → PkToolShowSuggestedReply-lzs6-CcI.js.map} +1 -1
  26. package/dist/_chunks/{PkToolShowVideo-B21JnsbY.js → PkToolShowVideo-BPYYn43O.js} +2 -2
  27. package/dist/_chunks/{PkToolShowVideo-B21JnsbY.js.map → PkToolShowVideo-BPYYn43O.js.map} +1 -1
  28. package/dist/_chunks/{PkToolShowWebPages-CW1Kdg6J.js → PkToolShowWebPages-CbE_bnHt.js} +2 -2
  29. package/dist/_chunks/{PkToolShowWebPages-CW1Kdg6J.js.map → PkToolShowWebPages-CbE_bnHt.js.map} +1 -1
  30. package/dist/_chunks/{chatImagePolicy-Bf-fhvf6.js → chatImagePolicy-CZeGEXvB.js} +2 -2
  31. package/dist/_chunks/{chatImagePolicy-Bf-fhvf6.js.map → chatImagePolicy-CZeGEXvB.js.map} +1 -1
  32. package/dist/_chunks/{markdown-B_eDHV3T.js → markdown-DtRRqlac.js} +2 -2
  33. package/dist/_chunks/{markdown-B_eDHV3T.js.map → markdown-DtRRqlac.js.map} +1 -1
  34. package/dist/ai-elements.es.js +1041 -840
  35. package/dist/ai-elements.es.js.map +1 -1
  36. package/dist-vue/PkChatbot.js +1 -1
  37. package/dist-vue/PkChatbotEmptyState.js +1 -1
  38. package/dist-vue/PkChatbotInput.js +1 -1
  39. package/dist-vue/PkChatbotMessages.js +1 -1
  40. package/dist-vue/PkChatbotStepPayload.js +1 -1
  41. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  42. package/dist-vue/PkChatbotSteps.js +1 -1
  43. package/dist-vue/PkChatbotViewChat.js +1 -1
  44. package/dist-vue/PkChatbotViewConversations.js +1 -1
  45. package/dist-vue/PkChatbotViewFiles.js +1 -1
  46. package/dist-vue/PkChatbotViewProfile.js +1 -1
  47. package/dist-vue/_chunks/{Agent-BlWzW8Mg.js → Agent-B-jQOrER.js} +133 -131
  48. package/dist-vue/_chunks/Agent-B-jQOrER.js.map +1 -0
  49. package/dist-vue/_chunks/{Document-vkNbPo_T.js → Document-DQtliJu6.js} +2 -2
  50. package/dist-vue/_chunks/{Document-vkNbPo_T.js.map → Document-DQtliJu6.js.map} +1 -1
  51. package/dist-vue/_chunks/{PkChatbot-DgKkkbCs.js → PkChatbot-DKBnpYB0.js} +8 -8
  52. package/dist-vue/_chunks/{PkChatbot-DgKkkbCs.js.map → PkChatbot-DKBnpYB0.js.map} +1 -1
  53. package/dist-vue/_chunks/{PkChatbotEmptyState-XWzSF0W0.js → PkChatbotEmptyState-CFCbJSjm.js} +2 -2
  54. package/dist-vue/_chunks/{PkChatbotEmptyState-XWzSF0W0.js.map → PkChatbotEmptyState-CFCbJSjm.js.map} +1 -1
  55. package/dist-vue/_chunks/{PkChatbotInput-a36iJO_a.js → PkChatbotInput-fte_uZHV.js} +2 -2
  56. package/dist-vue/_chunks/{PkChatbotInput-a36iJO_a.js.map → PkChatbotInput-fte_uZHV.js.map} +1 -1
  57. package/dist-vue/_chunks/{PkChatbotMessages-Ce7BtcBf.js → PkChatbotMessages-BVzOnfjU.js} +20 -18
  58. package/dist-vue/_chunks/PkChatbotMessages-BVzOnfjU.js.map +1 -0
  59. package/dist-vue/_chunks/{PkChatbotStepPayload-jbQd7cML.js → PkChatbotStepPayload-CgwZs9AM.js} +2 -2
  60. package/dist-vue/_chunks/{PkChatbotStepPayload-jbQd7cML.js.map → PkChatbotStepPayload-CgwZs9AM.js.map} +1 -1
  61. package/dist-vue/_chunks/{PkChatbotStepToolDetail-B1SJqhIt.js → PkChatbotStepToolDetail-BOylJhFM.js} +3 -3
  62. package/dist-vue/_chunks/{PkChatbotStepToolDetail-B1SJqhIt.js.map → PkChatbotStepToolDetail-BOylJhFM.js.map} +1 -1
  63. package/dist-vue/_chunks/{PkChatbotSteps-M7T71Lr9.js → PkChatbotSteps-Cmi5TBZM.js} +5 -5
  64. package/dist-vue/_chunks/{PkChatbotSteps-M7T71Lr9.js.map → PkChatbotSteps-Cmi5TBZM.js.map} +1 -1
  65. package/dist-vue/_chunks/{PkChatbotViewChat-58rvFSbr.js → PkChatbotViewChat-DuHSW8TF.js} +7 -7
  66. package/dist-vue/_chunks/{PkChatbotViewChat-58rvFSbr.js.map → PkChatbotViewChat-DuHSW8TF.js.map} +1 -1
  67. package/dist-vue/_chunks/{PkChatbotViewConversations-DP1zMA-B.js → PkChatbotViewConversations-Bf9oJIdi.js} +3 -3
  68. package/dist-vue/_chunks/{PkChatbotViewConversations-DP1zMA-B.js.map → PkChatbotViewConversations-Bf9oJIdi.js.map} +1 -1
  69. package/dist-vue/_chunks/{PkChatbotViewFiles-DCo-erhU.js → PkChatbotViewFiles-B6R1ixAl.js} +3 -3
  70. package/dist-vue/_chunks/{PkChatbotViewFiles-DCo-erhU.js.map → PkChatbotViewFiles-B6R1ixAl.js.map} +1 -1
  71. package/dist-vue/_chunks/{PkChatbotViewProfile-Da6iqXLn.js → PkChatbotViewProfile-x0oUCbeL.js} +2 -2
  72. package/dist-vue/_chunks/{PkChatbotViewProfile-Da6iqXLn.js.map → PkChatbotViewProfile-x0oUCbeL.js.map} +1 -1
  73. package/dist-vue/_chunks/{PkStreamingMarkdown-D00IssLd.js → PkStreamingMarkdown-BrBeaJes.js} +3 -3
  74. package/dist-vue/_chunks/{PkStreamingMarkdown-D00IssLd.js.map → PkStreamingMarkdown-BrBeaJes.js.map} +1 -1
  75. package/dist-vue/_chunks/{PkToolEditedFile-ppesvE8O.js → PkToolEditedFile-BKyMjgs0.js} +2 -2
  76. package/dist-vue/_chunks/{PkToolEditedFile-ppesvE8O.js.map → PkToolEditedFile-BKyMjgs0.js.map} +1 -1
  77. package/dist-vue/_chunks/{PkToolRequestGeolocation-CK_AAzwh.js → PkToolRequestGeolocation-CY-NC6Rc.js} +2 -2
  78. package/dist-vue/_chunks/{PkToolRequestGeolocation-CK_AAzwh.js.map → PkToolRequestGeolocation-CY-NC6Rc.js.map} +1 -1
  79. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CXfvULza.js → PkToolRequestOAuthConnection-RkbnKSde.js} +2 -2
  80. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CXfvULza.js.map → PkToolRequestOAuthConnection-RkbnKSde.js.map} +1 -1
  81. package/dist-vue/_chunks/{PkToolShowArtifact-BH8xgFcB.js → PkToolShowArtifact-BvvVHrP-.js} +2 -2
  82. package/dist-vue/_chunks/{PkToolShowArtifact-BH8xgFcB.js.map → PkToolShowArtifact-BvvVHrP-.js.map} +1 -1
  83. package/dist-vue/_chunks/{PkToolShowContactForm-CdDx1Jxl.js → PkToolShowContactForm-Dz_IiYr1.js} +2 -2
  84. package/dist-vue/_chunks/{PkToolShowContactForm-CdDx1Jxl.js.map → PkToolShowContactForm-Dz_IiYr1.js.map} +1 -1
  85. package/dist-vue/_chunks/{PkToolShowDiagram-D22AS39F.js → PkToolShowDiagram-DCSfCzrN.js} +2 -2
  86. package/dist-vue/_chunks/{PkToolShowDiagram-D22AS39F.js.map → PkToolShowDiagram-DCSfCzrN.js.map} +1 -1
  87. package/dist-vue/_chunks/{PkToolShowForm-gUfRbKJS.js → PkToolShowForm-qMBAEKxf.js} +4 -4
  88. package/dist-vue/_chunks/{PkToolShowForm-gUfRbKJS.js.map → PkToolShowForm-qMBAEKxf.js.map} +1 -1
  89. package/dist-vue/_chunks/{PkToolShowImageGallery-GEDLtNod.js → PkToolShowImageGallery-DWwUnIDq.js} +2 -2
  90. package/dist-vue/_chunks/{PkToolShowImageGallery-GEDLtNod.js.map → PkToolShowImageGallery-DWwUnIDq.js.map} +1 -1
  91. package/dist-vue/_chunks/{PkToolShowProductList-CERjht9c.js → PkToolShowProductList-DreWhhfK.js} +2 -2
  92. package/dist-vue/_chunks/{PkToolShowProductList-CERjht9c.js.map → PkToolShowProductList-DreWhhfK.js.map} +1 -1
  93. package/dist-vue/_chunks/{PkToolShowSources-B_4taLGg.js → PkToolShowSources-DR-uaXeX.js} +3 -3
  94. package/dist-vue/_chunks/{PkToolShowSources-B_4taLGg.js.map → PkToolShowSources-DR-uaXeX.js.map} +1 -1
  95. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DVYeAkEp.js → PkToolShowSuggestedReply-CThFJVUq.js} +2 -2
  96. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DVYeAkEp.js.map → PkToolShowSuggestedReply-CThFJVUq.js.map} +1 -1
  97. package/dist-vue/_chunks/{PkToolShowVideo-GZ8wviqU.js → PkToolShowVideo-Xogv8wVt.js} +2 -2
  98. package/dist-vue/_chunks/{PkToolShowVideo-GZ8wviqU.js.map → PkToolShowVideo-Xogv8wVt.js.map} +1 -1
  99. package/dist-vue/_chunks/{PkToolShowWebPages-DceCOjLQ.js → PkToolShowWebPages-BHTyFyDI.js} +2 -2
  100. package/dist-vue/_chunks/{PkToolShowWebPages-DceCOjLQ.js.map → PkToolShowWebPages-BHTyFyDI.js.map} +1 -1
  101. package/dist-vue/_chunks/{createChatbotApiClient-7i_D_crv.js → createChatbotApiClient-B3U31J_K.js} +2 -2
  102. package/dist-vue/_chunks/{createChatbotApiClient-7i_D_crv.js.map → createChatbotApiClient-B3U31J_K.js.map} +1 -1
  103. package/dist-vue/_chunks/{useChatbotStore-DhVxJwn6.js → useChatbotStore-D2L4m3iJ.js} +3 -3
  104. package/dist-vue/_chunks/{useChatbotStore-DhVxJwn6.js.map → useChatbotStore-D2L4m3iJ.js.map} +1 -1
  105. package/dist-vue/_chunks/{utils-BpnTWYko.js → utils-Df_SeBdX.js} +2 -2
  106. package/dist-vue/_chunks/{utils-BpnTWYko.js.map → utils-Df_SeBdX.js.map} +1 -1
  107. package/dist-vue/api.js +1 -1
  108. package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +7 -0
  109. package/dist-vue/apps/web-component/src/composables/usePageModal.d.ts +18 -0
  110. package/dist-vue/apps/web-component/src/lib.d.ts +3 -0
  111. package/dist-vue/composables.js +4 -4
  112. package/dist-vue/index.js +24 -24
  113. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +36 -0
  114. package/dist-vue/packages/models/src/schema/Agent.d.ts +55 -0
  115. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +12 -0
  116. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +12 -0
  117. package/package.json +1 -1
  118. package/dist/_chunks/Agent-CtLgGLbV.js.map +0 -1
  119. package/dist-vue/_chunks/Agent-BlWzW8Mg.js.map +0 -1
  120. package/dist-vue/_chunks/PkChatbotMessages-Ce7BtcBf.js.map +0 -1
package/README.md CHANGED
@@ -295,6 +295,7 @@ Same attributes as the floating widget except `floating-button-position`, plus:
295
295
  | `display-mode` | `'widget' \| 'fullscreen' \| 'panel'` | `'widget'` | `widget`: a contained chat with its header. `fullscreen`: the full-page layout of the app. `panel`: compact chrome for a docked side panel, where your page owns background, border and open/close. |
296
296
  | `forwarded-slots` | `string` | none | Comma-separated slot names forwarded to the inner chat (for example `"tool-showArtifact,subagent"`). |
297
297
  | `theme` | `'light' \| 'dark'` | none | The color scheme, over the agent's own setting too, where `system-theme` only applies to an agent set to automatic. For a page that switches theme around a `panel`, which shows the page's background through it. Reactive. |
298
+ | `follow-page-dialogs` | `boolean` | `false` | While your page has a modal `<dialog>` open, the chat moves into it and stays usable. See [Your modal dialogs](#your-modal-dialogs). Reactive. |
298
299
 
299
300
  ## JavaScript API
300
301
 
@@ -1003,6 +1004,8 @@ At **Page control**, a card in the chat asks the user before:
1003
1004
  A link to another page of your site does not ask: moving around your app is how the agent gets
1004
1005
  anywhere.
1005
1006
 
1007
+ ### Your modal dialogs
1008
+
1006
1009
  When your page has a modal `<dialog>` open (`showModal()`), the rest of the page is inert,
1007
1010
  the chat included. The card then opens in a modal dialog of the widget, above yours, right over
1008
1011
  the card the chat shows, and closes once answered. While the agent acts with your dialog open,
@@ -1011,6 +1014,33 @@ own shadow root, and removed when the dialog closes or the action ends. It sits
1011
1014
  when your dialog starts lower down, else just above or below your dialog, and over its top edge
1012
1015
  only when there is no room outside.
1013
1016
 
1017
+ With `follow-page-dialogs` on `<embedded-chat-widget>`, the chat stays usable instead: once
1018
+ your dialog has come in (its entrance transitions ended), the element moves into it, fixed where
1019
+ it was on screen, and a placeholder
1020
+ `<div data-agent-studio-placeholder>` with the element's classes and inline style keeps its place
1021
+ in your layout. The user reads and writes in the chat, answers the card there, and stops the
1022
+ agent from the bar. The element goes back when the dialog closes, fades out (an opacity animation
1023
+ or transition to 0) or leaves the page, and when its place goes out of sight. A dialog that
1024
+ covers the window, drawing its own backdrop, takes the element in its largest child that does
1025
+ not cover it too, taken for its panel: a page that closes the dialog on a click outside the
1026
+ panel then sees a click in the chat as inside it. The guess can miss: a panel that is not the
1027
+ largest child, or a dialog that closes on clicks elsewhere. Any other dialog takes the element
1028
+ as its last child. What to know:
1029
+
1030
+ - The element is moved with `moveBefore`, which keeps its state. In a browser without it the
1031
+ chat stays where it is, with the card and the Stop described above.
1032
+ - The chat leaves the dialog where it would not take clicks: a dialog that scales, clips or
1033
+ hides it, or puts something over it, checked when it goes in and on every change seen while
1034
+ it stays. The card and the Stop then work as above.
1035
+ - Esc in the chat does not close your dialog.
1036
+ - Do not insert elements before the widget element in its parent while a dialog is open: it is
1037
+ not there, and the insert fails. Removing the element, or the part of the page that holds
1038
+ it, works as usual: it is not put back. Moving it elsewhere keeps it there, out of that
1039
+ dialog until it closes.
1040
+ - Key and pointer events from the chat reach your dialog and its panel, retargeted to the
1041
+ element, as they reach the element's parents anywhere else.
1042
+ - Dialogs in your page's shadow roots are found within a second; the document's at once.
1043
+
1014
1044
  ### How actions are performed
1015
1045
 
1016
1046
  - A write sets the value through the element's native setter, then dispatches `input` and