@8wave/ai-elements 0.123.0-beta.11 → 0.123.0-beta.12

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 (139) hide show
  1. package/README.md +30 -3
  2. package/dist/_chunks/{Agent-C0JtGK2t.js → Agent-CsSvagZw.js} +13 -2
  3. package/dist/_chunks/Agent-CsSvagZw.js.map +1 -0
  4. package/dist/_chunks/{PkStreamingMarkdown-DGdyf4_3.js → PkStreamingMarkdown-ReRKQNAO.js} +3 -3
  5. package/dist/_chunks/{PkStreamingMarkdown-DGdyf4_3.js.map → PkStreamingMarkdown-ReRKQNAO.js.map} +1 -1
  6. package/dist/_chunks/{PkToolChatFile-NrOBCzk2.js → PkToolChatFile-QJi6bOuS.js} +2 -2
  7. package/dist/_chunks/{PkToolChatFile-NrOBCzk2.js.map → PkToolChatFile-QJi6bOuS.js.map} +1 -1
  8. package/dist/_chunks/{PkToolRequestGeolocation-BIfpxvX5.js → PkToolRequestGeolocation-CUjRsNs9.js} +2 -2
  9. package/dist/_chunks/{PkToolRequestGeolocation-BIfpxvX5.js.map → PkToolRequestGeolocation-CUjRsNs9.js.map} +1 -1
  10. package/dist/_chunks/{PkToolRequestOAuthConnection-CJgoiSgi.js → PkToolRequestOAuthConnection-CbxVIAPg.js} +2 -2
  11. package/dist/_chunks/{PkToolRequestOAuthConnection-CJgoiSgi.js.map → PkToolRequestOAuthConnection-CbxVIAPg.js.map} +1 -1
  12. package/dist/_chunks/{PkToolShowArtifact-DmZEQMSm.js → PkToolShowArtifact-D0HZ_qWx.js} +2 -2
  13. package/dist/_chunks/{PkToolShowArtifact-DmZEQMSm.js.map → PkToolShowArtifact-D0HZ_qWx.js.map} +1 -1
  14. package/dist/_chunks/{PkToolShowContactForm-BaX3d5Yq.js → PkToolShowContactForm-DkJB0EO1.js} +2 -2
  15. package/dist/_chunks/{PkToolShowContactForm-BaX3d5Yq.js.map → PkToolShowContactForm-DkJB0EO1.js.map} +1 -1
  16. package/dist/_chunks/{PkToolShowForm-BKyZnpPB.js → PkToolShowForm-zAprG0yl.js} +3 -3
  17. package/dist/_chunks/{PkToolShowForm-BKyZnpPB.js.map → PkToolShowForm-zAprG0yl.js.map} +1 -1
  18. package/dist/_chunks/{PkToolShowImageGallery-GBaXxucK.js → PkToolShowImageGallery-o62SZ6tq.js} +2 -2
  19. package/dist/_chunks/{PkToolShowImageGallery-GBaXxucK.js.map → PkToolShowImageGallery-o62SZ6tq.js.map} +1 -1
  20. package/dist/_chunks/{PkToolShowProductList-DBVtBJXU.js → PkToolShowProductList-CWLxVreB.js} +2 -2
  21. package/dist/_chunks/{PkToolShowProductList-DBVtBJXU.js.map → PkToolShowProductList-CWLxVreB.js.map} +1 -1
  22. package/dist/_chunks/{PkToolShowSources-Ciuizdl3.js → PkToolShowSources-dJEqZn6T.js} +3 -3
  23. package/dist/_chunks/{PkToolShowSources-Ciuizdl3.js.map → PkToolShowSources-dJEqZn6T.js.map} +1 -1
  24. package/dist/_chunks/{PkToolShowSuggestedReply-Dbti20SV.js → PkToolShowSuggestedReply-BHAltyxH.js} +2 -2
  25. package/dist/_chunks/{PkToolShowSuggestedReply-Dbti20SV.js.map → PkToolShowSuggestedReply-BHAltyxH.js.map} +1 -1
  26. package/dist/_chunks/{PkToolShowVideo-DKDR3zmI.js → PkToolShowVideo-DtJ0nEJk.js} +2 -2
  27. package/dist/_chunks/{PkToolShowVideo-DKDR3zmI.js.map → PkToolShowVideo-DtJ0nEJk.js.map} +1 -1
  28. package/dist/_chunks/{PkToolShowWebPages-CuJ12tdE.js → PkToolShowWebPages-D-tG9JH8.js} +2 -2
  29. package/dist/_chunks/{PkToolShowWebPages-CuJ12tdE.js.map → PkToolShowWebPages-D-tG9JH8.js.map} +1 -1
  30. package/dist/_chunks/{chatImagePolicy-D3zIP7-i.js → chatImagePolicy-Dhxqcirq.js} +2 -2
  31. package/dist/_chunks/{chatImagePolicy-D3zIP7-i.js.map → chatImagePolicy-Dhxqcirq.js.map} +1 -1
  32. package/dist/_chunks/{markdown-BxOlM5SY.js → markdown-CUaXq5OY.js} +2 -2
  33. package/dist/_chunks/{markdown-BxOlM5SY.js.map → markdown-CUaXq5OY.js.map} +1 -1
  34. package/dist/ai-elements.es.js +2720 -2269
  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-Dsi_xGvV.js → Agent-D3US-D1x.js} +13 -2
  48. package/dist-vue/_chunks/Agent-D3US-D1x.js.map +1 -0
  49. package/dist-vue/_chunks/{Document-B5R1PJnc.js → Document-D5FVOcP9.js} +2 -2
  50. package/dist-vue/_chunks/{Document-B5R1PJnc.js.map → Document-D5FVOcP9.js.map} +1 -1
  51. package/dist-vue/_chunks/{PkChatbot-CBpViucq.js → PkChatbot-DxPT26Vn.js} +8 -8
  52. package/dist-vue/_chunks/{PkChatbot-CBpViucq.js.map → PkChatbot-DxPT26Vn.js.map} +1 -1
  53. package/dist-vue/_chunks/{PkChatbotEmptyState-DKrmLdVU.js → PkChatbotEmptyState-3VeE3lFA.js} +2 -2
  54. package/dist-vue/_chunks/{PkChatbotEmptyState-DKrmLdVU.js.map → PkChatbotEmptyState-3VeE3lFA.js.map} +1 -1
  55. package/dist-vue/_chunks/{PkChatbotInput-C1i14Ur_.js → PkChatbotInput-SWQVz3m7.js} +212 -175
  56. package/dist-vue/_chunks/PkChatbotInput-SWQVz3m7.js.map +1 -0
  57. package/dist-vue/_chunks/{PkChatbotMessages-Ce8h0QNX.js → PkChatbotMessages-DFimKbCj.js} +122 -114
  58. package/dist-vue/_chunks/PkChatbotMessages-DFimKbCj.js.map +1 -0
  59. package/dist-vue/_chunks/{PkChatbotStepPayload-Dp_akrQu.js → PkChatbotStepPayload-Di0FNaTC.js} +2 -2
  60. package/dist-vue/_chunks/{PkChatbotStepPayload-Dp_akrQu.js.map → PkChatbotStepPayload-Di0FNaTC.js.map} +1 -1
  61. package/dist-vue/_chunks/{PkChatbotStepToolDetail-CKxl4_lQ.js → PkChatbotStepToolDetail-Bne48uS8.js} +3 -3
  62. package/dist-vue/_chunks/{PkChatbotStepToolDetail-CKxl4_lQ.js.map → PkChatbotStepToolDetail-Bne48uS8.js.map} +1 -1
  63. package/dist-vue/_chunks/{PkChatbotSteps-ChaHkHjG.js → PkChatbotSteps-Cr9nwMQj.js} +5 -5
  64. package/dist-vue/_chunks/{PkChatbotSteps-ChaHkHjG.js.map → PkChatbotSteps-Cr9nwMQj.js.map} +1 -1
  65. package/dist-vue/_chunks/{PkChatbotViewChat-Bjw6x7VD.js → PkChatbotViewChat-CQy-k_dp.js} +417 -404
  66. package/dist-vue/_chunks/PkChatbotViewChat-CQy-k_dp.js.map +1 -0
  67. package/dist-vue/_chunks/{PkChatbotViewConversations-D-UK4paq.js → PkChatbotViewConversations-Bng-dyqd.js} +3 -3
  68. package/dist-vue/_chunks/{PkChatbotViewConversations-D-UK4paq.js.map → PkChatbotViewConversations-Bng-dyqd.js.map} +1 -1
  69. package/dist-vue/_chunks/{PkChatbotViewFiles-57kQRbZm.js → PkChatbotViewFiles-Ccti1JAS.js} +3 -3
  70. package/dist-vue/_chunks/{PkChatbotViewFiles-57kQRbZm.js.map → PkChatbotViewFiles-Ccti1JAS.js.map} +1 -1
  71. package/dist-vue/_chunks/{PkChatbotViewProfile-BZTify2Q.js → PkChatbotViewProfile-ChEItAHZ.js} +2 -2
  72. package/dist-vue/_chunks/{PkChatbotViewProfile-BZTify2Q.js.map → PkChatbotViewProfile-ChEItAHZ.js.map} +1 -1
  73. package/dist-vue/_chunks/{PkStreamingMarkdown-4Ez-DDFq.js → PkStreamingMarkdown-92GXUXrG.js} +3 -3
  74. package/dist-vue/_chunks/{PkStreamingMarkdown-4Ez-DDFq.js.map → PkStreamingMarkdown-92GXUXrG.js.map} +1 -1
  75. package/dist-vue/_chunks/{PkToolChatFile-DaivFIhK.js → PkToolChatFile-Ca45de6q.js} +2 -2
  76. package/dist-vue/_chunks/{PkToolChatFile-DaivFIhK.js.map → PkToolChatFile-Ca45de6q.js.map} +1 -1
  77. package/dist-vue/_chunks/{PkToolRequestGeolocation-B__wk6m3.js → PkToolRequestGeolocation-gEDbmudT.js} +2 -2
  78. package/dist-vue/_chunks/{PkToolRequestGeolocation-B__wk6m3.js.map → PkToolRequestGeolocation-gEDbmudT.js.map} +1 -1
  79. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BAttadSC.js → PkToolRequestOAuthConnection-Dy0GXNwC.js} +2 -2
  80. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BAttadSC.js.map → PkToolRequestOAuthConnection-Dy0GXNwC.js.map} +1 -1
  81. package/dist-vue/_chunks/{PkToolShowArtifact-CncSr7Z8.js → PkToolShowArtifact-B-BUIMju.js} +2 -2
  82. package/dist-vue/_chunks/{PkToolShowArtifact-CncSr7Z8.js.map → PkToolShowArtifact-B-BUIMju.js.map} +1 -1
  83. package/dist-vue/_chunks/{PkToolShowContactForm-Bi5N1fFe.js → PkToolShowContactForm-NRfvmPLV.js} +2 -2
  84. package/dist-vue/_chunks/{PkToolShowContactForm-Bi5N1fFe.js.map → PkToolShowContactForm-NRfvmPLV.js.map} +1 -1
  85. package/dist-vue/_chunks/{PkToolShowDiagram-D8NF9lZu.js → PkToolShowDiagram-VTi8vwcN.js} +2 -2
  86. package/dist-vue/_chunks/{PkToolShowDiagram-D8NF9lZu.js.map → PkToolShowDiagram-VTi8vwcN.js.map} +1 -1
  87. package/dist-vue/_chunks/{PkToolShowForm-Dmyn6cMU.js → PkToolShowForm-C4JnalBU.js} +4 -4
  88. package/dist-vue/_chunks/{PkToolShowForm-Dmyn6cMU.js.map → PkToolShowForm-C4JnalBU.js.map} +1 -1
  89. package/dist-vue/_chunks/{PkToolShowImageGallery-XZiRk6FK.js → PkToolShowImageGallery-ORfqyhhh.js} +2 -2
  90. package/dist-vue/_chunks/{PkToolShowImageGallery-XZiRk6FK.js.map → PkToolShowImageGallery-ORfqyhhh.js.map} +1 -1
  91. package/dist-vue/_chunks/{PkToolShowProductList-DzvPUdbo.js → PkToolShowProductList-C9kbfutK.js} +2 -2
  92. package/dist-vue/_chunks/{PkToolShowProductList-DzvPUdbo.js.map → PkToolShowProductList-C9kbfutK.js.map} +1 -1
  93. package/dist-vue/_chunks/{PkToolShowSources-NOSBkQCi.js → PkToolShowSources-BVfcp1iE.js} +3 -3
  94. package/dist-vue/_chunks/{PkToolShowSources-NOSBkQCi.js.map → PkToolShowSources-BVfcp1iE.js.map} +1 -1
  95. package/dist-vue/_chunks/{PkToolShowSuggestedReply-C7dUB3dz.js → PkToolShowSuggestedReply-Bb7Inxa4.js} +2 -2
  96. package/dist-vue/_chunks/{PkToolShowSuggestedReply-C7dUB3dz.js.map → PkToolShowSuggestedReply-Bb7Inxa4.js.map} +1 -1
  97. package/dist-vue/_chunks/{PkToolShowVideo-sSZyISJH.js → PkToolShowVideo-CUNITpHh.js} +2 -2
  98. package/dist-vue/_chunks/{PkToolShowVideo-sSZyISJH.js.map → PkToolShowVideo-CUNITpHh.js.map} +1 -1
  99. package/dist-vue/_chunks/{PkToolShowWebPages-B1c4X_cH.js → PkToolShowWebPages-C-yl2smm.js} +2 -2
  100. package/dist-vue/_chunks/{PkToolShowWebPages-B1c4X_cH.js.map → PkToolShowWebPages-C-yl2smm.js.map} +1 -1
  101. package/dist-vue/_chunks/{createChatbotApiClient-BmBo5IQR.js → createChatbotApiClient-CuqGJGHD.js} +2 -2
  102. package/dist-vue/_chunks/createChatbotApiClient-CuqGJGHD.js.map +1 -0
  103. package/dist-vue/_chunks/{useChatbotStore-D7ZMA7Tr.js → useChatbotStore-C1lW6qXE.js} +1143 -1134
  104. package/dist-vue/_chunks/useChatbotStore-C1lW6qXE.js.map +1 -0
  105. package/dist-vue/_chunks/{utils-CKsn0vxx.js → utils-CoLdYTZq.js} +2 -2
  106. package/dist-vue/_chunks/{utils-CKsn0vxx.js.map → utils-CoLdYTZq.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 +4 -4
  109. package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +2 -0
  110. package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +3 -3
  111. package/dist-vue/apps/web-component/src/composables/usePagePointer.d.ts +50 -0
  112. package/dist-vue/apps/web-component/src/composables/usePageTools.d.ts +21 -0
  113. package/dist-vue/apps/web-component/src/pageTools/index.d.ts +8 -1
  114. package/dist-vue/apps/web-component/src/pageTools/pointing.d.ts +41 -0
  115. package/dist-vue/apps/web-component/src/pageTools/snapshot.d.ts +2 -0
  116. package/dist-vue/composables.js +24 -8
  117. package/dist-vue/composables.js.map +1 -1
  118. package/dist-vue/index.js +47 -30
  119. package/dist-vue/index.js.map +1 -1
  120. package/dist-vue/locales.js +20 -0
  121. package/dist-vue/packages/components/src/chat/PkAgentPageAccessSettings.d.ts +2 -0
  122. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +2 -0
  123. package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +16 -3
  124. package/dist-vue/packages/components/src/chat/PkPagePointer.d.ts +41 -0
  125. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +150 -6
  126. package/dist-vue/packages/models/src/schema/Agent.d.ts +7 -0
  127. package/dist-vue/packages/models/src/schema/Chat.d.ts +8 -0
  128. package/dist-vue/packages/models/src/schema/PageAccess.d.ts +29 -1
  129. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +2 -0
  130. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +2 -0
  131. package/dist-vue/style.css +1 -1
  132. package/package.json +1 -1
  133. package/dist/_chunks/Agent-C0JtGK2t.js.map +0 -1
  134. package/dist-vue/_chunks/Agent-Dsi_xGvV.js.map +0 -1
  135. package/dist-vue/_chunks/PkChatbotInput-C1i14Ur_.js.map +0 -1
  136. package/dist-vue/_chunks/PkChatbotMessages-Ce8h0QNX.js.map +0 -1
  137. package/dist-vue/_chunks/PkChatbotViewChat-Bjw6x7VD.js.map +0 -1
  138. package/dist-vue/_chunks/createChatbotApiClient-BmBo5IQR.js.map +0 -1
  139. package/dist-vue/_chunks/useChatbotStore-D7ZMA7Tr.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { s as e } from "./Media-DylqhvaF.js";
2
2
  import { t } from "./VvButtonLocalized-C-vx25u4.js";
3
- import { t as n } from "./PkStreamingMarkdown-4Ez-DDFq.js";
3
+ import { t as n } from "./PkStreamingMarkdown-92GXUXrG.js";
4
4
  import { t as r } from "./PkChatbotFilePreview-DVl_1zYD.js";
5
5
  import { VvDropdown as i, VvDropdownAction as a, VvIcon as o } from "@volverjs/ui-vue/components";
6
6
  import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, mergeModels as g, mergeProps as _, nextTick as v, normalizeClass as y, normalizeProps as ee, onBeforeUnmount as b, onMounted as x, openBlock as S, ref as C, renderList as te, renderSlot as ne, toDisplayString as w, unref as T, useId as re, useModel as E, useTemplateRef as D, watch as O, withCtx as k, withKeys as ie, withModifiers as ae } from "vue";
@@ -111,18 +111,21 @@ var P = N, F = ["type"], I = {
111
111
  class: "pk-chatbot-input__notice-text"
112
112
  }, ue = {
113
113
  key: 0,
114
+ class: "pk-chatbot-input__pointer"
115
+ }, de = { class: "pk-chatbot-input__pointer-label" }, fe = {
116
+ key: 1,
114
117
  class: "pk-chatbot-input__attachments"
115
- }, de = { class: "pk-chatbot-input__fieldset" }, fe = [
118
+ }, pe = { class: "pk-chatbot-input__fieldset" }, me = [
116
119
  "title",
117
120
  "disabled",
118
121
  "onClick"
119
- ], pe = ["accept"], me = ["accept"], he = { class: "pk-chatbot-input__content" }, ge = [
122
+ ], he = ["accept"], ge = ["accept"], _e = { class: "pk-chatbot-input__content" }, ve = [
120
123
  "value",
121
124
  "aria-label",
122
125
  "aria-describedby",
123
126
  "aria-invalid",
124
127
  "placeholder"
125
- ], _e = ["id"], ve = { class: "opacity-60" }, R = /* @__PURE__ */ h({
128
+ ], ye = ["id"], be = { class: "opacity-60" }, R = /* @__PURE__ */ h({
126
129
  __name: "PkChatbotInput",
127
130
  props: /*@__PURE__*/ g({
128
131
  placeholder: {},
@@ -135,7 +138,10 @@ var P = N, F = ["type"], I = {
135
138
  attachmentNotice: {},
136
139
  voiceEnabled: { type: Boolean },
137
140
  queueEnabled: { type: Boolean },
138
- answerNotices: {}
141
+ answerNotices: {},
142
+ pointerAvailable: { type: Boolean },
143
+ pointing: { type: Boolean },
144
+ pointer: {}
139
145
  }, {
140
146
  modelValue: { default: void 0 },
141
147
  modelModifiers: {},
@@ -150,43 +156,45 @@ var P = N, F = ["type"], I = {
150
156
  "dismiss-page-notice",
151
157
  "open-answer-notice",
152
158
  "dismiss-answer-notice",
153
- "voice-start"
159
+ "voice-start",
160
+ "point",
161
+ "remove-pointer"
154
162
  ], ["update:modelValue", "update:pendingAttachments"]),
155
163
  setup(h, { expose: g, emit: A }) {
156
164
  let j = E(h, "modelValue"), M = E(h, "pendingAttachments"), N = A, F = h, I = D("textareaEl"), R = D("fileInputEl"), z = D("cameraInputEl"), B = D("formEl"), V = C(j.value ?? ""), H = null, U = () => {
157
165
  H !== null && (clearTimeout(H), H = null);
158
- }, ye = () => {
166
+ }, xe = () => {
159
167
  U(), j.value = V.value;
160
- }, be = () => {
168
+ }, Se = () => {
161
169
  U(), H = setTimeout(() => {
162
170
  j.value = V.value, H = null;
163
171
  }, 300);
164
- }, xe = () => {
165
- V.value = I.value?.value ?? "", be();
172
+ }, Ce = () => {
173
+ V.value = I.value?.value ?? "", Se();
166
174
  };
167
175
  O(j, (e) => {
168
176
  e !== V.value && (V.value = e ?? "", v(() => {
169
177
  I.value && P.update(I.value);
170
178
  }));
171
179
  });
172
- let W = c(() => F.status === "streaming"), G = c(() => F.status === "submitted"), K = c(() => W.value || G.value), q = re(), J = c(() => V.value.length), Y = c(() => F.maxMessageLength !== void 0 && J.value > F.maxMessageLength), Se = c(() => M.value.some((e) => e.state === "uploading")), X = c(() => K.value && !F.queueEnabled || Se.value || Y.value ? !1 : V.value.trim().length > 0), Z = c(() => K.value && X.value), Ce = "capture" in document.createElement("input"), we = c(() => {
180
+ let W = c(() => F.status === "streaming"), G = c(() => F.status === "submitted"), K = c(() => W.value || G.value), q = re(), J = c(() => V.value.length), Y = c(() => F.maxMessageLength !== void 0 && J.value > F.maxMessageLength), we = c(() => M.value.some((e) => e.state === "uploading")), X = c(() => K.value && !F.queueEnabled || we.value || Y.value ? !1 : V.value.trim().length > 0), Z = c(() => K.value && X.value), Te = "capture" in document.createElement("input"), Ee = c(() => {
173
181
  let t = F.fileUpload?.allowedMimeTypes ?? [];
174
182
  return [...t, ...e(t)].join(",");
175
- }), Q = c(() => (F.fileUpload?.allowedMimeTypes ?? []).filter((e) => e.startsWith("image/")).join(",")), $ = c(() => Ce && Q.value.length > 0), Te = () => {
183
+ }), De = c(() => (F.fileUpload?.allowedMimeTypes ?? []).filter((e) => e.startsWith("image/")).join(",")), Q = c(() => Te && De.value.length > 0), $ = () => {
176
184
  R.value?.click();
177
- }, Ee = () => {
185
+ }, Oe = () => {
178
186
  z.value?.click();
179
- }, De = (e) => {
187
+ }, ke = (e) => {
180
188
  for (let t of e) N("file-select", t);
181
- }, Oe = (e) => {
189
+ }, Ae = (e) => {
182
190
  let t = e.target;
183
- De(Array.from(t.files ?? [])), t.value = "";
184
- }, ke = (e) => {
191
+ ke(Array.from(t.files ?? [])), t.value = "";
192
+ }, je = (e) => {
185
193
  let t = M.value.find((t) => t.id === e);
186
194
  t && URL.revokeObjectURL(t.localUrl), M.value = M.value.filter((t) => t.id !== e);
187
- }, Ae = C(!0), je = () => {
188
- Ae.value = !1;
189
- }, Me = c(() => {
195
+ }, Me = C(!0), Ne = () => {
196
+ Me.value = !1;
197
+ }, Pe = c(() => {
190
198
  if (F.attachmentNotice) return [{
191
199
  id: "limit",
192
200
  icon: "ri:information-line",
@@ -206,29 +214,29 @@ var P = N, F = ["type"], I = {
206
214
  icon: "ri:pages-line",
207
215
  text: F.pageNotice,
208
216
  dismiss: () => N("dismiss-page-notice")
209
- }), F.dismissableNotice && Ae.value && e.push({
217
+ }), F.dismissableNotice && Me.value && e.push({
210
218
  id: "dismissable",
211
219
  markdown: F.dismissableNotice,
212
- dismiss: je
220
+ dismiss: Ne
213
221
  }), e;
214
- }), Ne = () => {
222
+ }), Fe = () => {
215
223
  B.value?.querySelector("button:focus-visible") && I.value?.focus();
216
- }, Pe = () => {
217
- Ne(), N("stop-generation");
218
- }, Fe = () => {
219
- X.value && (Ne(), ye(), N("submit"), V.value = "", j.value = "", v(() => {
224
+ }, Ie = () => {
225
+ Fe(), N("stop-generation");
226
+ }, Le = () => {
227
+ X.value && (Fe(), xe(), N("submit"), V.value = "", j.value = "", v(() => {
220
228
  I.value && (I.value.value = "", P.update(I.value));
221
229
  }));
222
- }, Ie = (e) => {
223
- e.shiftKey || e.isComposing || e.keyCode === 229 || (e.preventDefault(), Fe());
230
+ }, Re = (e) => {
231
+ e.shiftKey || e.isComposing || e.keyCode === 229 || (e.preventDefault(), Le());
224
232
  };
225
233
  x(() => {
226
234
  I.value && P(I.value);
227
235
  });
228
- let Le = 0;
236
+ let ze = 0;
229
237
  return oe(I, ([e]) => {
230
238
  let t = e?.contentRect.width ?? 0;
231
- I.value && t !== Le && (Le = t, P.update(I.value));
239
+ I.value && t !== ze && (ze = t, P.update(I.value));
232
240
  }), O(() => F.placeholder, async () => {
233
241
  await v(), I.value && P.update(I.value);
234
242
  }), b(() => {
@@ -236,7 +244,7 @@ var P = N, F = ["type"], I = {
236
244
  for (let e of M.value) URL.revokeObjectURL(e.localUrl);
237
245
  }), g({ focus: () => I.value?.focus() }), (e, c) => {
238
246
  let g = o, v = t, b = a, x = i;
239
- return S(), d("div", se, [Me.value.length ? (S(), d("div", ce, [(S(!0), d(s, null, te(Me.value, (t) => (S(), d("div", {
247
+ return S(), d("div", se, [Pe.value.length ? (S(), d("div", ce, [(S(!0), d(s, null, te(Pe.value, (t) => (S(), d("div", {
240
248
  key: t.id,
241
249
  class: "pk-chatbot-input__notice-item"
242
250
  }, [
@@ -269,153 +277,182 @@ var P = N, F = ["type"], I = {
269
277
  ref_key: "formEl",
270
278
  ref: B,
271
279
  class: "pk-chatbot-input__form",
272
- onSubmit: ae(Fe, ["prevent"])
273
- }, [M.value.length ? (S(), d("div", ue, [(S(!0), d(s, null, te(M.value, (e) => (S(), l(r, {
274
- key: e.id,
275
- "media-type": e.mediaSource?.mimeType ?? e.file.type,
276
- url: e.localUrl,
277
- filename: e.file.name,
278
- size: e.file.size,
279
- loading: e.state === "uploading",
280
- error: e.state === "error" ? e.error : void 0,
281
- removable: e.state !== "uploading",
282
- compact: "",
283
- onRemove: (t) => ke(e.id)
284
- }, null, 8, [
285
- "media-type",
286
- "url",
287
- "filename",
288
- "size",
289
- "loading",
290
- "error",
291
- "removable",
292
- "onRemove"
293
- ]))), 128))])) : u("", !0), f("div", de, [
294
- ne(e.$slots, "prepend"),
295
- h.fileUpload && h.fileUpload.enabled && ($.value || e.$slots["additional-actions"]) ? (S(), l(x, ee(_({ key: 0 }, {
296
- placement: "top-start",
297
- modifiers: "menu",
298
- flip: !0,
299
- offset: 3
300
- })), {
301
- default: k(({ init: t, toggle: n, aria: r }) => [f("button", _({ ref: (e) => t(e) }, r, {
302
- class: "pk-chat-button",
303
- type: "button",
280
+ onSubmit: ae(Le, ["prevent"])
281
+ }, [
282
+ h.pointer ? (S(), d("div", ue, [
283
+ m(g, {
284
+ name: h.pointer.kind === "text" ? "ri:double-quotes-l" : "ri:focus-3-line",
285
+ class: "pk-chatbot-input__pointer-icon"
286
+ }, null, 8, ["name"]),
287
+ f("span", de, w(h.pointer.kind === "text" ? `«${h.pointer.label}»` : h.pointer.label), 1),
288
+ m(v, {
289
+ title: e.$t("pagePointer.remove"),
290
+ modifiers: "action-quiet",
291
+ icon: "ri:close-line",
292
+ class: "w-18 h-18",
293
+ onClick: c[0] ||= (e) => N("remove-pointer")
294
+ }, null, 8, ["title"])
295
+ ])) : u("", !0),
296
+ M.value.length ? (S(), d("div", fe, [(S(!0), d(s, null, te(M.value, (e) => (S(), l(r, {
297
+ key: e.id,
298
+ "media-type": e.mediaSource?.mimeType ?? e.file.type,
299
+ url: e.localUrl,
300
+ filename: e.file.name,
301
+ size: e.file.size,
302
+ loading: e.state === "uploading",
303
+ error: e.state === "error" ? e.error : void 0,
304
+ removable: e.state !== "uploading",
305
+ compact: "",
306
+ onRemove: (t) => je(e.id)
307
+ }, null, 8, [
308
+ "media-type",
309
+ "url",
310
+ "filename",
311
+ "size",
312
+ "loading",
313
+ "error",
314
+ "removable",
315
+ "onRemove"
316
+ ]))), 128))])) : u("", !0),
317
+ f("div", pe, [
318
+ ne(e.$slots, "prepend"),
319
+ h.fileUpload && h.fileUpload.enabled && (Q.value || e.$slots["additional-actions"]) ? (S(), l(x, ee(_({ key: 0 }, {
320
+ placement: "top-start",
321
+ modifiers: "menu",
322
+ flip: !0,
323
+ offset: 3
324
+ })), {
325
+ default: k(({ init: t, toggle: n, aria: r }) => [f("button", _({ ref: (e) => t(e) }, r, {
326
+ class: "pk-chat-button",
327
+ type: "button",
328
+ title: e.$t("action.attachFile"),
329
+ disabled: K.value,
330
+ onClick: n
331
+ }), [m(g, {
332
+ name: "ri:add-line",
333
+ class: "pk-chat-button__icon"
334
+ })], 16, me)]),
335
+ items: k(() => [
336
+ Q.value ? (S(), l(b, {
337
+ key: 0,
338
+ disabled: K.value || h.attachmentLimitReached,
339
+ onClick: Oe
340
+ }, {
341
+ default: k(() => [m(g, {
342
+ name: "ri:camera-line",
343
+ class: "pk-chatbot-input__dropdown-icon"
344
+ }), p(" " + w(e.$t("action.takePhoto")), 1)]),
345
+ _: 1
346
+ }, 8, ["disabled"])) : u("", !0),
347
+ m(b, {
348
+ disabled: K.value || h.attachmentLimitReached,
349
+ onClick: $
350
+ }, {
351
+ default: k(() => [m(g, {
352
+ name: "ri:attachment-line",
353
+ class: "pk-chatbot-input__dropdown-icon"
354
+ }), p(" " + w(e.$t("action.attachFile")), 1)]),
355
+ _: 1
356
+ }, 8, ["disabled"]),
357
+ ne(e.$slots, "additional-actions")
358
+ ]),
359
+ _: 3
360
+ }, 16)) : h.fileUpload && h.fileUpload.enabled ? (S(), l(L, {
361
+ key: 1,
362
+ icon: "ri:add-line",
304
363
  title: e.$t("action.attachFile"),
364
+ disabled: K.value || h.attachmentLimitReached,
365
+ onClick: $
366
+ }, null, 8, ["title", "disabled"])) : u("", !0),
367
+ h.fileUpload && h.fileUpload.enabled ? (S(), d("input", {
368
+ key: 2,
369
+ ref_key: "fileInputEl",
370
+ ref: R,
371
+ type: "file",
372
+ hidden: "",
373
+ multiple: "",
374
+ accept: Ee.value,
375
+ onChange: Ae
376
+ }, null, 40, he)) : u("", !0),
377
+ h.fileUpload && h.fileUpload.enabled && Q.value ? (S(), d("input", {
378
+ key: 3,
379
+ ref_key: "cameraInputEl",
380
+ ref: z,
381
+ type: "file",
382
+ capture: "environment",
383
+ hidden: "",
384
+ accept: De.value,
385
+ onChange: Ae
386
+ }, null, 40, ge)) : u("", !0),
387
+ h.pointerAvailable ? (S(), l(L, {
388
+ key: 4,
389
+ icon: "ri:focus-3-line",
390
+ title: e.$t("pagePointer.start"),
391
+ "aria-pressed": h.pointing,
305
392
  disabled: K.value,
306
- onClick: n
307
- }), [m(g, {
308
- name: "ri:add-line",
309
- class: "pk-chat-button__icon"
310
- })], 16, fe)]),
311
- items: k(() => [
312
- $.value ? (S(), l(b, {
313
- key: 0,
314
- disabled: K.value || h.attachmentLimitReached,
315
- onClick: Ee
316
- }, {
317
- default: k(() => [m(g, {
318
- name: "ri:camera-line",
319
- class: "pk-chatbot-input__dropdown-icon"
320
- }), p(" " + w(e.$t("action.takePhoto")), 1)]),
321
- _: 1
322
- }, 8, ["disabled"])) : u("", !0),
323
- m(b, {
324
- disabled: K.value || h.attachmentLimitReached,
325
- onClick: Te
326
- }, {
327
- default: k(() => [m(g, {
328
- name: "ri:attachment-line",
329
- class: "pk-chatbot-input__dropdown-icon"
330
- }), p(" " + w(e.$t("action.attachFile")), 1)]),
331
- _: 1
332
- }, 8, ["disabled"]),
333
- ne(e.$slots, "additional-actions")
334
- ]),
335
- _: 3
336
- }, 16)) : h.fileUpload && h.fileUpload.enabled ? (S(), l(L, {
337
- key: 1,
338
- icon: "ri:add-line",
339
- title: e.$t("action.attachFile"),
340
- disabled: K.value || h.attachmentLimitReached,
341
- onClick: Te
342
- }, null, 8, ["title", "disabled"])) : u("", !0),
343
- h.fileUpload && h.fileUpload.enabled ? (S(), d("input", {
344
- key: 2,
345
- ref_key: "fileInputEl",
346
- ref: R,
347
- type: "file",
348
- hidden: "",
349
- multiple: "",
350
- accept: we.value,
351
- onChange: Oe
352
- }, null, 40, pe)) : u("", !0),
353
- h.fileUpload && h.fileUpload.enabled && $.value ? (S(), d("input", {
354
- key: 3,
355
- ref_key: "cameraInputEl",
356
- ref: z,
357
- type: "file",
358
- capture: "environment",
359
- hidden: "",
360
- accept: Q.value,
361
- onChange: Oe
362
- }, null, 40, me)) : u("", !0),
363
- f("div", he, [f("textarea", {
364
- ref_key: "textareaEl",
365
- ref: I,
366
- value: V.value,
367
- class: "pk-chatbot-input__textarea",
368
- name: "message",
369
- rows: "1",
370
- enterkeyhint: "send",
371
- "aria-label": e.$t("label.message"),
372
- "aria-describedby": h.maxMessageLength ? T(q) : void 0,
373
- "aria-invalid": Y.value || void 0,
374
- placeholder: h.placeholder,
375
- onInput: xe,
376
- onKeydown: ie(Ie, ["enter"])
377
- }, null, 40, ge)]),
378
- h.maxMessageLength ? (S(), d("div", {
379
- key: 4,
380
- id: T(q),
381
- class: y(["pk-chatbot-input__counter", { "pk-chatbot-input__counter--over": Y.value }])
382
- }, [p(w(e.$n(J.value, "integer")) + "/", 1), f("span", ve, w(e.$n(h.maxMessageLength, "integer")), 1)], 10, _e)) : u("", !0),
383
- h.voiceEnabled && !W.value ? (S(), l(L, {
384
- key: 5,
385
- icon: "ri:mic-line",
386
- title: e.$t("action.talk"),
387
- disabled: K.value,
388
- onClick: c[0] ||= (e) => N("voice-start")
389
- }, null, 8, ["title", "disabled"])) : u("", !0),
390
- W.value ? (S(), l(L, {
391
- key: 6,
392
- icon: "ri:stop-fill",
393
- modifiers: Z.value ? void 0 : "primary",
394
- title: e.$t("action.stop"),
395
- onClick: Pe
396
- }, null, 8, ["modifiers", "title"])) : u("", !0),
397
- Z.value ? (S(), l(L, {
398
- key: 7,
399
- type: "submit",
400
- modifiers: "primary",
401
- icon: "ri:arrow-up-line",
402
- title: e.$t("action.queueMessage")
403
- }, null, 8, ["title"])) : W.value ? u("", !0) : (S(), l(L, {
404
- key: 8,
405
- type: "submit",
406
- modifiers: "primary",
407
- icon: G.value ? "loading-loop" : "ri:arrow-up-line",
408
- title: e.$t("action.submit"),
409
- disabled: !X.value
410
- }, null, 8, [
411
- "icon",
412
- "title",
413
- "disabled"
414
- ]))
415
- ])], 544)]);
393
+ onClick: c[1] ||= (e) => N("point")
394
+ }, null, 8, [
395
+ "title",
396
+ "aria-pressed",
397
+ "disabled"
398
+ ])) : u("", !0),
399
+ f("div", _e, [f("textarea", {
400
+ ref_key: "textareaEl",
401
+ ref: I,
402
+ value: V.value,
403
+ class: "pk-chatbot-input__textarea",
404
+ name: "message",
405
+ rows: "1",
406
+ enterkeyhint: "send",
407
+ "aria-label": e.$t("label.message"),
408
+ "aria-describedby": h.maxMessageLength ? T(q) : void 0,
409
+ "aria-invalid": Y.value || void 0,
410
+ placeholder: h.placeholder,
411
+ onInput: Ce,
412
+ onKeydown: ie(Re, ["enter"])
413
+ }, null, 40, ve)]),
414
+ h.maxMessageLength ? (S(), d("div", {
415
+ key: 5,
416
+ id: T(q),
417
+ class: y(["pk-chatbot-input__counter", { "pk-chatbot-input__counter--over": Y.value }])
418
+ }, [p(w(e.$n(J.value, "integer")) + "/", 1), f("span", be, w(e.$n(h.maxMessageLength, "integer")), 1)], 10, ye)) : u("", !0),
419
+ h.voiceEnabled && !W.value ? (S(), l(L, {
420
+ key: 6,
421
+ icon: "ri:mic-line",
422
+ title: e.$t("action.talk"),
423
+ disabled: K.value,
424
+ onClick: c[2] ||= (e) => N("voice-start")
425
+ }, null, 8, ["title", "disabled"])) : u("", !0),
426
+ W.value ? (S(), l(L, {
427
+ key: 7,
428
+ icon: "ri:stop-fill",
429
+ modifiers: Z.value ? void 0 : "primary",
430
+ title: e.$t("action.stop"),
431
+ onClick: Ie
432
+ }, null, 8, ["modifiers", "title"])) : u("", !0),
433
+ Z.value ? (S(), l(L, {
434
+ key: 8,
435
+ type: "submit",
436
+ modifiers: "primary",
437
+ icon: "ri:arrow-up-line",
438
+ title: e.$t("action.queueMessage")
439
+ }, null, 8, ["title"])) : W.value ? u("", !0) : (S(), l(L, {
440
+ key: 9,
441
+ type: "submit",
442
+ modifiers: "primary",
443
+ icon: G.value ? "loading-loop" : "ri:arrow-up-line",
444
+ title: e.$t("action.submit"),
445
+ disabled: !X.value
446
+ }, null, 8, [
447
+ "icon",
448
+ "title",
449
+ "disabled"
450
+ ]))
451
+ ])
452
+ ], 544)]);
416
453
  };
417
454
  }
418
455
  });
419
456
  export { L as n, R as t };
420
457
 
421
- //# sourceMappingURL=PkChatbotInput-C1i14Ur_.js.map
458
+ //# sourceMappingURL=PkChatbotInput-SWQVz3m7.js.map