@ourlu/assistant-sdk 0.2.0 → 0.2.3
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 +119 -72
- package/dist/esm/index.js +1 -1
- package/dist/iife/audio.v1.95146620.js +179 -0
- package/dist/iife/audio.v1.js +1 -1
- package/dist/iife/engine.v1.3b09dc20.js +721 -0
- package/dist/iife/engine.v1.773fc15d.js +645 -0
- package/dist/iife/engine.v1.js +721 -645
- package/dist/iife/loader.v1.js +22 -21
- package/dist/iife/ui.v1.41a99419.js +919 -0
- package/dist/iife/ui.v1.7417819d.js +919 -0
- package/dist/iife/ui.v1.js +6 -6
- package/dist/iife/widget-manifest.json +5 -0
- package/package.json +1 -1
package/dist/iife/ui.v1.js
CHANGED
|
@@ -135,7 +135,7 @@ function installMascotTheme(ui) {
|
|
|
135
135
|
if (/^https?:\/\//i.test(normalized)) return normalized;
|
|
136
136
|
var base = String(apiBaseUrl || "").trim().replace(/\/$/, "");
|
|
137
137
|
if (!base) {
|
|
138
|
-
throw new Error("[
|
|
138
|
+
throw new Error("[OurluMairie] mascot URL relative sans apiBaseUrl: " + normalized);
|
|
139
139
|
}
|
|
140
140
|
return normalized.startsWith("/") ? base + normalized : base + "/" + normalized;
|
|
141
141
|
};
|
|
@@ -590,7 +590,7 @@ function installWidgetUIManager(ui) {
|
|
|
590
590
|
'<div id="cm-typing">L\'assistant r\u00e9fl\u00e9chit\u2026</div>',
|
|
591
591
|
'<div id="cm-error"></div>',
|
|
592
592
|
'<div id="cm-transparency"><span>' + esc(this.config.transparencyText) + '</span><button class="cm-close-note" id="cm-transparency-close" type="button" aria-label="Fermer le message de transparence">\u00d7</button></div>',
|
|
593
|
-
'<form id="cm-form"><
|
|
593
|
+
'<form id="cm-form"><button id="cm-mic" type="button" aria-label="Dicter un message">\ud83c\udfa4</button><textarea id="cm-input" rows="1" aria-label="Votre message" placeholder="Posez votre question\u2026"></textarea><button id="cm-send" type="submit" aria-label="Envoyer">\u27a4</button></form>',
|
|
594
594
|
"</div>"
|
|
595
595
|
].join("");
|
|
596
596
|
shadow.appendChild(root);
|
|
@@ -680,7 +680,7 @@ function installWidgetUIManager(ui) {
|
|
|
680
680
|
mascotNode.addEventListener("error", function() {
|
|
681
681
|
var failedUrl = mascotNode.getAttribute("src") || "";
|
|
682
682
|
var errorMessage = failedUrl ? "chargement échoué pour " + failedUrl : "chargement échoué";
|
|
683
|
-
console.error("[
|
|
683
|
+
console.error("[OurluMairie] mascot image error:", errorMessage);
|
|
684
684
|
self.showMascotLoadError(errorMessage);
|
|
685
685
|
});
|
|
686
686
|
});
|
|
@@ -730,7 +730,7 @@ function installWidgetUIManager(ui) {
|
|
|
730
730
|
self.setMascotSource(themedMascotUrl);
|
|
731
731
|
}).catch(function(error) {
|
|
732
732
|
var message = (error && error.message) ? error.message : "Mascotte indisponible.";
|
|
733
|
-
console.error("[
|
|
733
|
+
console.error("[OurluMairie]", message, error);
|
|
734
734
|
self.showMascotLoadError(message);
|
|
735
735
|
});
|
|
736
736
|
};
|
|
@@ -893,10 +893,10 @@ function installWidgetUIManager(ui) {
|
|
|
893
893
|
}
|
|
894
894
|
|
|
895
895
|
"use strict";
|
|
896
|
-
var runtime = window.
|
|
896
|
+
var runtime = window.__OurluWidgetRuntimeV1 || (window.__OurluWidgetRuntimeV1 = {});
|
|
897
897
|
var ui = {};
|
|
898
898
|
|
|
899
|
-
ui.CONTAINER_ID = "
|
|
899
|
+
ui.CONTAINER_ID = "ourlu-widget-root";
|
|
900
900
|
|
|
901
901
|
installColorUtils(ui);
|
|
902
902
|
installMascotTheme(ui);
|