@8wave/ai-elements 0.121.0-beta.39 → 0.121.0-beta.40
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 +67 -15
- package/dist/_chunks/{Agent-C3m0UmlL.js → Agent-BuPgJIt4.js} +203 -202
- package/dist/_chunks/Agent-BuPgJIt4.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown--PCkA4Fg.js → PkStreamingMarkdown-D2aqCD0I.js} +953 -927
- package/dist/_chunks/PkStreamingMarkdown-D2aqCD0I.js.map +1 -0
- package/dist/_chunks/{PkToolEditSpreadsheet-DAMWWIVt.js → PkToolEditSpreadsheet-83ZdmGeA.js} +2 -2
- package/dist/_chunks/{PkToolEditSpreadsheet-DAMWWIVt.js.map → PkToolEditSpreadsheet-83ZdmGeA.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-BgsvQb7Q.js → PkToolRequestGeolocation-1cOmCG8P.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-BgsvQb7Q.js.map → PkToolRequestGeolocation-1cOmCG8P.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-DtuZw7yk.js → PkToolRequestOAuthConnection-CCu3FCyo.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-DtuZw7yk.js.map → PkToolRequestOAuthConnection-CCu3FCyo.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-B163OvqY.js → PkToolShowArtifact-CiYkZkpe.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-B163OvqY.js.map → PkToolShowArtifact-CiYkZkpe.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-C_ptr7Xs.js → PkToolShowContactForm-D7TEzrYe.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-C_ptr7Xs.js.map → PkToolShowContactForm-D7TEzrYe.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-fburTpQm.js → PkToolShowForm-CSh4Q6sl.js} +5 -5
- package/dist/_chunks/{PkToolShowForm-fburTpQm.js.map → PkToolShowForm-CSh4Q6sl.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-ChauJukk.js → PkToolShowImageGallery-CQEaEfYE.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-ChauJukk.js.map → PkToolShowImageGallery-CQEaEfYE.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-B_XZezYw.js → PkToolShowProductList-BCmULLct.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-B_XZezYw.js.map → PkToolShowProductList-BCmULLct.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-CS4nEuL0.js → PkToolShowSources-R9KWsfTQ.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-CS4nEuL0.js.map → PkToolShowSources-R9KWsfTQ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-BIe56XdA.js → PkToolShowSuggestedReply-DYZz9aV2.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-BIe56XdA.js.map → PkToolShowSuggestedReply-DYZz9aV2.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-DzU1XJqv.js → PkToolShowVideo-C_9SZtZM.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-DzU1XJqv.js.map → PkToolShowVideo-C_9SZtZM.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-BlKe8Arf.js → PkToolShowWebPages-DwRYfle9.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-BlKe8Arf.js.map → PkToolShowWebPages-DwRYfle9.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-ChSkpiw6.js → chatImagePolicy-CQYTWTkP.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-ChSkpiw6.js.map → chatImagePolicy-CQYTWTkP.js.map} +1 -1
- package/dist/_chunks/{markdown-D3iMlF6T.js → markdown-Br9ROCBT.js} +2 -2
- package/dist/_chunks/{markdown-D3iMlF6T.js.map → markdown-Br9ROCBT.js.map} +1 -1
- package/dist/ai-elements.es.js +4378 -3756
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Agent-3IHYHv05.js → Agent-DZb775Ak.js} +193 -192
- package/dist-vue/_chunks/Agent-DZb775Ak.js.map +1 -0
- package/dist-vue/_chunks/{Document-B0A_y6N5.js → Document-E72l_VU6.js} +2 -2
- package/dist-vue/_chunks/{Document-B0A_y6N5.js.map → Document-E72l_VU6.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbot-Bu76hH4F.js → PkChatbot-DIqduIwr.js} +9 -9
- package/dist-vue/_chunks/{PkChatbot-Bu76hH4F.js.map → PkChatbot-DIqduIwr.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-ilPJoYjk.js → PkChatbotEmptyState-Dh7ETVnf.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-ilPJoYjk.js.map → PkChatbotEmptyState-Dh7ETVnf.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-CY0YRGkG.js → PkChatbotInput-BJHtmPR-.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-CY0YRGkG.js.map → PkChatbotInput-BJHtmPR-.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotMessages-DMSActW1.js +968 -0
- package/dist-vue/_chunks/PkChatbotMessages-DMSActW1.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepPayload-CiEcIlzW.js → PkChatbotStepPayload-CXdsUMrw.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-CiEcIlzW.js.map → PkChatbotStepPayload-CXdsUMrw.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-VqLkuWi7.js → PkChatbotStepToolDetail-DbpXR7jh.js} +16 -16
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-VqLkuWi7.js.map → PkChatbotStepToolDetail-DbpXR7jh.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-QFFZ0DjH.js +189 -0
- package/dist-vue/_chunks/PkChatbotSteps-QFFZ0DjH.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-t-XkwFbe.js → PkChatbotViewChat-BI_PtT72.js} +300 -298
- package/dist-vue/_chunks/PkChatbotViewChat-BI_PtT72.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-CgRMohUQ.js → PkChatbotViewConversations-Bg4jSO9a.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewConversations-CgRMohUQ.js.map → PkChatbotViewConversations-Bg4jSO9a.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-DkeysDGW.js → PkChatbotViewFiles-Cwm-JQMF.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-DkeysDGW.js.map → PkChatbotViewFiles-Cwm-JQMF.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-kgqu10ED.js → PkChatbotViewProfile-C_GElIM3.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-kgqu10ED.js.map → PkChatbotViewProfile-C_GElIM3.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-CDlpb5w0.js → PkStreamingMarkdown-DwDs-cGP.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-CDlpb5w0.js.map → PkStreamingMarkdown-DwDs-cGP.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-D0EPgCmp.js → PkToolEditSpreadsheet-B61LtERY.js} +2 -2
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-D0EPgCmp.js.map → PkToolEditSpreadsheet-B61LtERY.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-DZnJd1od.js → PkToolRequestGeolocation-DC8hSH0j.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-DZnJd1od.js.map → PkToolRequestGeolocation-DC8hSH0j.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C8MGtBlh.js → PkToolRequestOAuthConnection-BH_-drvw.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C8MGtBlh.js.map → PkToolRequestOAuthConnection-BH_-drvw.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-CtXB1-vJ.js → PkToolShowArtifact-CjVN96wJ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-CtXB1-vJ.js.map → PkToolShowArtifact-CjVN96wJ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-DlZdfcNw.js → PkToolShowContactForm-CmBLigw8.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-DlZdfcNw.js.map → PkToolShowContactForm-CmBLigw8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-BUUjmUpE.js → PkToolShowDiagram-dKUU5_6F.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-BUUjmUpE.js.map → PkToolShowDiagram-dKUU5_6F.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-DxiiMSCC.js → PkToolShowForm-B6ESvq-5.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-DxiiMSCC.js.map → PkToolShowForm-B6ESvq-5.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-D01aM-9U.js → PkToolShowImageGallery-Daq0IwTH.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-D01aM-9U.js.map → PkToolShowImageGallery-Daq0IwTH.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-BRMF3WJf.js → PkToolShowProductList-Bc3Gzyxy.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-BRMF3WJf.js.map → PkToolShowProductList-Bc3Gzyxy.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-C0_MwX7m.js → PkToolShowSources-BDvRbenn.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-C0_MwX7m.js.map → PkToolShowSources-BDvRbenn.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BcjKYwbk.js → PkToolShowSuggestedReply-Cd6VkzvJ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BcjKYwbk.js.map → PkToolShowSuggestedReply-Cd6VkzvJ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-CjjoQH7j.js → PkToolShowVideo-Bo1gsD97.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-CjjoQH7j.js.map → PkToolShowVideo-Bo1gsD97.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-B5reGh4g.js → PkToolShowWebPages-DI3sZiqh.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-B5reGh4g.js.map → PkToolShowWebPages-DI3sZiqh.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-DcLpptlt.js → createChatbotApiClient-DUz4dwzY.js} +12 -12
- package/dist-vue/_chunks/{createChatbotApiClient-DcLpptlt.js.map → createChatbotApiClient-DUz4dwzY.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore-BliRphuB.js → useChatbotStore-D7LcpA-6.js} +481 -455
- package/dist-vue/_chunks/useChatbotStore-D7LcpA-6.js.map +1 -0
- package/dist-vue/_chunks/{utils-C7-KrzRE.js → utils-EPX3V3VI.js} +112 -86
- package/dist-vue/_chunks/utils-EPX3V3VI.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +2 -0
- package/dist-vue/apps/web-component/src/components/FloatingChatWidget.ce.d.ts +2 -0
- package/dist-vue/apps/web-component/src/composables/usePageTools.d.ts +1 -0
- package/dist-vue/apps/web-component/src/lib.d.ts +10 -0
- package/dist-vue/apps/web-component/src/pageTools/actions.d.ts +2 -0
- package/dist-vue/apps/web-component/src/pageTools/announcements.d.ts +9 -0
- package/dist-vue/apps/web-component/src/pageTools/index.d.ts +12 -1
- package/dist-vue/apps/web-component/src/pageTools/navigation.d.ts +40 -8
- package/dist-vue/apps/web-component/src/pageTools/snapshot.d.ts +60 -0
- package/dist-vue/composables.js +34 -8
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +145 -125
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +28 -2
- package/dist-vue/packages/components/src/PkEditorPrompt.d.ts +6 -0
- package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +4 -0
- package/dist-vue/packages/components/src/chat/PkHostCallConfirmCard.d.ts +7 -1
- package/dist-vue/packages/components/src/chat/PkHostCallConfirmDialog.d.ts +4 -0
- package/dist-vue/packages/components/src/chat/PkPageControlBar.d.ts +5 -1
- package/dist-vue/packages/components/src/chat/utils.d.ts +11 -1
- package/dist-vue/packages/composable/src/chatbot/hostTools.d.ts +37 -8
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +8 -2
- package/dist-vue/packages/models/src/schema/PageAccess.d.ts +9 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-C3m0UmlL.js.map +0 -1
- package/dist/_chunks/PkStreamingMarkdown--PCkA4Fg.js.map +0 -1
- package/dist-vue/_chunks/Agent-3IHYHv05.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-BfKqJ8n_.js +0 -954
- package/dist-vue/_chunks/PkChatbotMessages-BfKqJ8n_.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotSteps-CoDtEaL7.js +0 -189
- package/dist-vue/_chunks/PkChatbotSteps-CoDtEaL7.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-t-XkwFbe.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-BliRphuB.js.map +0 -1
- package/dist-vue/_chunks/utils-C7-KrzRE.js.map +0 -1
package/README.md
CHANGED
|
@@ -312,6 +312,7 @@ Methods and properties live on the element once it is defined (see
|
|
|
312
312
|
| `setContext(context: Record<string, unknown>): void` | both | Replaces the external context sent with every following message. See [External context](#external-context-setcontext). |
|
|
313
313
|
| `registerTool(tool: HostTool): void` | both | Registers a tool your page runs. A name registered again replaces the old tool. See [Host tools](#host-tools-registertool). |
|
|
314
314
|
| `unregisterTool(name: string): void` | both | Removes a registered tool. |
|
|
315
|
+
| `registerPages(pages: { path: string; title?: string }[]): void` | both | The pages of your site the agent may open without asking, with what each holds; `<id>` or `:id` in a path stands for any one segment. Each call replaces the list (200 pages at most, paths starting with `/`). See [Navigation](#navigation). |
|
|
315
316
|
| `signIn(token: string): Promise<void>` | both | Signs in with an external JWT, as the `external-token` attribute does. |
|
|
316
317
|
| `signOut(): Promise<void>` | both | Signs out and withdraws the active external token, so the widget does not sign in with it again. It then waits when `await-external-token` is set, or signs in anonymously. No effect with `use-host-session`. |
|
|
317
318
|
| `isWorking` | both | `boolean`, read only: the agent is answering or running a tool. False while the user has a confirmation to answer. See [Working state](#working-state). |
|
|
@@ -947,6 +948,17 @@ as a line with its role, its accessible name, its state and a reference the acti
|
|
|
947
948
|
(`current`, `active`, `is-active`, `selected`, `is-selected`, `router-link-exact-active`) reads
|
|
948
949
|
as `current` too. A checkbox or radio that hides its own input behind a styled label is read
|
|
949
950
|
when the label is visible.
|
|
951
|
+
- A list box your page builds itself (`role="combobox"` on an element that is not an input nor a
|
|
952
|
+
select) reads with the choice it shows, as the user sees it on the closed box:
|
|
953
|
+
`combobox "Role" value="User"`. Its value is empty while it shows a placeholder, which the
|
|
954
|
+
widget tells from the options of the list it controls (`aria-controls`), none `aria-selected`.
|
|
955
|
+
- While your page has a modal `<dialog>` open (`showModal()`), a snapshot of the page reads that
|
|
956
|
+
dialog only, and says so: the rest of the page is inert for the user until it closes.
|
|
957
|
+
- A field says the language of its text (`lang it`) when it, or a container of it below `<html>`,
|
|
958
|
+
has a `lang` attribute, or when it sits in a `tabpanel` whose tab names a language. A tab, menu
|
|
959
|
+
item or button whose name is a language ("Italiano", "English", "DE") says it too. Mark the
|
|
960
|
+
fields of a text kept in several languages with `lang`, and the agent writes each text in its
|
|
961
|
+
own version.
|
|
950
962
|
|
|
951
963
|
Semantic HTML (real buttons and links, labelled fields, headings) is what makes a page readable
|
|
952
964
|
and usable by the agent.
|
|
@@ -967,23 +979,31 @@ Other sensitive fields must be marked by your site, or listed in **Excluded area
|
|
|
967
979
|
|
|
968
980
|
At **Page control**, a card in the chat asks the user before:
|
|
969
981
|
|
|
970
|
-
- a click on a submit button, or Enter in a field that submits its form
|
|
982
|
+
- a click on a submit button, or Enter in a field that submits its form. The card lists the
|
|
983
|
+
filled fields of the form with their values (8 at most), leaving out the ones the agent never
|
|
984
|
+
reads. When a value changes while the card waits, the submit does not run and the agent reads
|
|
985
|
+
the form again;
|
|
971
986
|
- a click on a link to another site;
|
|
972
987
|
- the answer to your site's own confirmation dialog: a button in an `alertdialog`, or in a modal
|
|
973
988
|
dialog with no field. The card shows the dialog's text ("The page asks: “Delete this agent?”
|
|
974
989
|
The agent wants to answer “Proceed”"), so the user answers your question;
|
|
975
990
|
- a click on, or a write into, an element inside `data-agent-confirm`. Use it on actions that
|
|
976
991
|
neither submit a form nor ask through a dialog, such as a delete through an API call;
|
|
992
|
+
- `page_navigate` to an address of your site that no link of the page shows (a closed menu
|
|
993
|
+
counts) and that you did not declare with `registerPages`. On a no the agent gets the addresses
|
|
994
|
+
it may open instead;
|
|
977
995
|
- every action, links of your own site included, when **Confirm every action** is on.
|
|
978
996
|
|
|
979
997
|
A link to another page of your site does not ask: moving around your app is how the agent gets
|
|
980
998
|
anywhere.
|
|
981
999
|
|
|
982
1000
|
When your page has a modal `<dialog>` open (`showModal()`), the rest of the page is inert,
|
|
983
|
-
the chat included. The card then opens in a modal dialog of the widget, above yours,
|
|
984
|
-
once answered. While the agent acts with your dialog open,
|
|
985
|
-
inside your dialog, as an `agent-studio-stop` element with its
|
|
986
|
-
the dialog closes or the action ends.
|
|
1001
|
+
the chat included. The card then opens in a modal dialog of the widget, above yours, right over
|
|
1002
|
+
the card the chat shows, and closes once answered. While the agent acts with your dialog open,
|
|
1003
|
+
the **Stop** of the bar is added inside your dialog, as an `agent-studio-stop` element with its
|
|
1004
|
+
own shadow root, and removed when the dialog closes or the action ends. It sits where the bar is
|
|
1005
|
+
when your dialog starts lower down, else just above or below your dialog, and over its top edge
|
|
1006
|
+
only when there is no room outside.
|
|
987
1007
|
|
|
988
1008
|
### How actions are performed
|
|
989
1009
|
|
|
@@ -992,15 +1012,40 @@ the dialog closes or the action ends.
|
|
|
992
1012
|
label, a checkbox takes `true` or `false`, a `contenteditable` element takes text.
|
|
993
1013
|
- A click dispatches the pointer and mouse events, then `click()`. It grants no user activation:
|
|
994
1014
|
clipboard, popups and fullscreen stay out of reach.
|
|
1015
|
+
- `page_fill` writes one field, or up to 20 in one call (`fields`), in order: it stops at the
|
|
1016
|
+
first it cannot write and says which it wrote. The widget declares that it runs `fields`, and
|
|
1017
|
+
the model is offered it only then: a page still on an older bundle (a tab open across a
|
|
1018
|
+
deploy, a cached script) gets one field a call.
|
|
1019
|
+
- The result of an action tells the agent what it did, so it does not read the page again for
|
|
1020
|
+
that: what your page announced meanwhile, word for word (a `role=status` or `role=alert` region,
|
|
1021
|
+
`aria-live`, `output`, the message of a field that turned `aria-invalid`, in the open shadow
|
|
1022
|
+
roots of your components too), the fields a form
|
|
1023
|
+
refused, and the part of the page around the element, the part it controls (`aria-controls`),
|
|
1024
|
+
the modal dialog it opened, whole, or the page it led to. After a submit your page has not
|
|
1025
|
+
answered yet, the widget waits up to 2 seconds for it to announce the outcome: a save that goes
|
|
1026
|
+
to your server is announced when its answer comes back.
|
|
995
1027
|
- The element is scrolled into view and outlined while the agent acts. Disabled controls
|
|
996
1028
|
(directly or through a disabled fieldset) and read-only fields refuse the action, and an
|
|
997
1029
|
element whose role or accessible name changed since the last snapshot asks the model to read
|
|
998
1030
|
the page again.
|
|
1031
|
+
- While your page has a modal `<dialog>` open (in an open shadow root too), an action on an
|
|
1032
|
+
element outside the dialog on top is refused, without a card: the user could not reach that
|
|
1033
|
+
element either, nor one of a dialog under it. A click from a script would get
|
|
1034
|
+
past the inert page, and a tab switched behind an open editor dialog can hide that dialog while
|
|
1035
|
+
it stays open, leaving the whole page inert. A popover of your dialog counts as inside it only
|
|
1036
|
+
when it sits in the dialog's DOM: the browser makes one placed elsewhere inert too, even in the
|
|
1037
|
+
top layer. A read of a region by its reference is not affected.
|
|
999
1038
|
|
|
1000
1039
|
### Navigation
|
|
1001
1040
|
|
|
1002
|
-
|
|
1003
|
-
|
|
1041
|
+
An action runs at once. A navigation that would load another document in the tab (a submit
|
|
1042
|
+
your page does not handle itself, a plain link, a `location.assign` of your code) is held from
|
|
1043
|
+
the action until the answer carrying its result has reached the backend, then made as your page
|
|
1044
|
+
asked for it: same address, same method, same data, without running your `submit` handlers a
|
|
1045
|
+
second time. A navigation within the document (your router) and a download are not held. The
|
|
1046
|
+
widget uses the Navigation API for this; in a browser without it, a click or a submit that may
|
|
1047
|
+
load another page runs only after the answer has reached the backend, as before. The
|
|
1048
|
+
conversation goes on on the new page when:
|
|
1004
1049
|
|
|
1005
1050
|
- the new page loads the widget for the same agent, on the same origin, in the same tab;
|
|
1006
1051
|
- it does so within 60 seconds of the click.
|
|
@@ -1018,20 +1063,27 @@ completes (a download) lets the calls run after 10 s.
|
|
|
1018
1063
|
|
|
1019
1064
|
`page_navigate` opens an address of the same origin only. A link of the page to that address is
|
|
1020
1065
|
clicked, so your router takes it; without one, the widget pushes a history entry and dispatches
|
|
1021
|
-
`popstate`, which Vue Router, React Router and most client-side routers follow without a reload
|
|
1022
|
-
When the page does not change within a second, the address
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1066
|
+
`popstate`, which Vue Router, React Router and most client-side routers follow without a reload,
|
|
1067
|
+
and the result shows the new page. When the page does not change within a second, the address
|
|
1068
|
+
loads as typed in the address bar. An address no link shows and `registerPages` does not list
|
|
1069
|
+
asks the user first; a hash that is a route (`#/admin`, `#!/admin`) is part of the address, a
|
|
1070
|
+
plain fragment (`#installation`) is not. When your router answers that address by loading
|
|
1071
|
+
another document (a redirect from its `popstate` handler), the load is held as a click's would be.
|
|
1072
|
+
|
|
1073
|
+
A click that changes the address, or after which the element is gone or hidden (the dialog it
|
|
1074
|
+
was in closed), answers with the page as it is now instead of the region the element was in.
|
|
1075
|
+
When the dialog closed and your page announced nothing, the result adds that the dialog may
|
|
1076
|
+
only have written into a form of the page, which its own save button sends.
|
|
1028
1077
|
|
|
1029
1078
|
### What the user sees and controls
|
|
1030
1079
|
|
|
1031
1080
|
- A notice above the input says what the agent can do on the page. **Notice to the user**
|
|
1032
1081
|
replaces the text of each level, per language (500 characters). Once closed, it stays closed
|
|
1033
1082
|
in that browser until the level goes up.
|
|
1034
|
-
- While the agent acts, a bar at the top of the page names the action and
|
|
1083
|
+
- While the agent acts, a bar at the top of the page names the action and what it acts on
|
|
1084
|
+
("Clicking “Create”…") and offers **Stop**. It comes down into place and goes back up when the
|
|
1085
|
+
agent stops acting, without motion when the user asked for reduced motion. The steps of the
|
|
1086
|
+
chat name their element too while the page is open.
|
|
1035
1087
|
- The chat menu offers **Turn off page access**, for this agent in this tab, and **Turn page
|
|
1036
1088
|
access back on**.
|
|
1037
1089
|
|