@crestapps/ai-chat-ui 2.0.0-preview.260 → 2.0.0-preview.263
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/dist/ai-chat.js +6 -2
- package/dist/ai-chat.js.map +1 -1
- package/dist/ai-chat.min.js +1 -1
- package/dist/ai-chat.min.js.map +1 -1
- package/dist/chat-interaction.js +6 -2
- package/dist/chat-interaction.js.map +1 -1
- package/dist/chat-interaction.min.js +2 -2
- package/dist/chat-interaction.min.js.map +1 -1
- package/dist/chat-markers.js +31 -0
- package/dist/chat-markers.js.map +1 -1
- package/dist/chat-markers.min.js +1 -1
- package/dist/chat-markers.min.js.map +1 -1
- package/package.json +1 -1
package/dist/chat-interaction.js
CHANGED
|
@@ -418,6 +418,7 @@
|
|
|
418
418
|
console.error("The sendButtonElementSelector is required.");
|
|
419
419
|
return;
|
|
420
420
|
}
|
|
421
|
+
window.CoreAIChatSurface.registerRoot(document.querySelector(config.appElementSelector));
|
|
421
422
|
return Vue.createApp({
|
|
422
423
|
data() {
|
|
423
424
|
return {
|
|
@@ -1857,8 +1858,11 @@
|
|
|
1857
1858
|
}
|
|
1858
1859
|
function scanForAutoInitialization(root) {
|
|
1859
1860
|
if (!root || typeof root.querySelectorAll !== "function") return;
|
|
1860
|
-
|
|
1861
|
-
root.
|
|
1861
|
+
const isPageMarkup = (element) => !window.CoreAIChatSurface.isInsideRenderedMessage(element);
|
|
1862
|
+
if (typeof root.matches === "function" && root.matches(autoInitializeSelector) && isPageMarkup(root)) initializeFromElement(root);
|
|
1863
|
+
root.querySelectorAll(autoInitializeSelector).forEach((element) => {
|
|
1864
|
+
if (isPageMarkup(element)) initializeFromElement(element);
|
|
1865
|
+
});
|
|
1862
1866
|
}
|
|
1863
1867
|
function startAutoInitialization() {
|
|
1864
1868
|
scanForAutoInitialization(document);
|