@enegelai/bot-widget 1.7.5 → 1.7.6
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/enegelaibot.umd.js +43 -42
- package/dist/index.es.js +41 -40
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1050,7 +1050,7 @@ class W extends Ke {
|
|
|
1050
1050
|
finishStreamingResponse(e) {
|
|
1051
1051
|
if (!this.replyMessage || !this.streamingResponseInProgress)
|
|
1052
1052
|
return;
|
|
1053
|
-
this.streamingResponseInProgress = !1;
|
|
1053
|
+
this.streamingResponseInProgress = !1, this.streamingResponseBuffer = null, this.streamingResponseTagStartPos = 0, this.streamingResponseCurrentTag = null;
|
|
1054
1054
|
let c = e;
|
|
1055
1055
|
c = this.cleanupImageLinks(c);
|
|
1056
1056
|
const i = c.lastIndexOf("<br>");
|
|
@@ -1350,7 +1350,7 @@ const w = new W(), rc = U`
|
|
|
1350
1350
|
}
|
|
1351
1351
|
|
|
1352
1352
|
.cb-header-close {
|
|
1353
|
-
color: var(--enegelai-bot-header-color, rgba(255, 255, 255, 1));
|
|
1353
|
+
color: var(--enegelai-bot-header-close-color, var(--enegelai-bot-header-color, rgba(255, 255, 255, 1)));
|
|
1354
1354
|
}
|
|
1355
1355
|
|
|
1356
1356
|
.cb-setting-button cb-icon {
|
|
@@ -2734,7 +2734,7 @@ var kc = Object.defineProperty, Cc = Object.getOwnPropertyDescriptor, Sc = (a, e
|
|
|
2734
2734
|
};
|
|
2735
2735
|
let vt = class extends ft {
|
|
2736
2736
|
render() {
|
|
2737
|
-
return m` <div class="cb-thinking"
|
|
2737
|
+
return m` <div class="cb-thinking"><span></span><span></span><span></span></div>`;
|
|
2738
2738
|
}
|
|
2739
2739
|
};
|
|
2740
2740
|
vt.styles = U`
|
|
@@ -2744,7 +2744,7 @@ vt.styles = U`
|
|
|
2744
2744
|
|
|
2745
2745
|
.cb-thinking span {
|
|
2746
2746
|
display: inline-block;
|
|
2747
|
-
background-color:
|
|
2747
|
+
background-color: var(--enegelai-bot-typing-color, rgb(34, 34, 34));
|
|
2748
2748
|
width: 10px;
|
|
2749
2749
|
height: 10px;
|
|
2750
2750
|
border-radius: 100%;
|
|
@@ -4874,48 +4874,48 @@ le = ye([
|
|
|
4874
4874
|
Y("cb-message-list")
|
|
4875
4875
|
], le);
|
|
4876
4876
|
const Xc = U`
|
|
4877
|
-
|
|
4877
|
+
${ge}
|
|
4878
4878
|
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4879
|
+
:host {
|
|
4880
|
+
width: 100%;
|
|
4881
|
+
background: rgb(244, 247, 249);
|
|
4882
|
+
position: relative;
|
|
4883
|
+
padding: 6px 5px;
|
|
4884
|
+
box-sizing: border-box;
|
|
4885
|
+
border-radius-bottom-left: 6px;
|
|
4886
|
+
border-radius-bottom-right: 6px;
|
|
4887
|
+
}
|
|
4888
4888
|
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4889
|
+
.cb-user-input-wrapper {
|
|
4890
|
+
display: flex;
|
|
4891
|
+
flex-direction: row;
|
|
4892
|
+
justify-content: space-between;
|
|
4893
|
+
align-items: center;
|
|
4894
|
+
}
|
|
4895
4895
|
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4896
|
+
.cb-user-input {
|
|
4897
|
+
flex: 1;
|
|
4898
|
+
}
|
|
4899
4899
|
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4900
|
+
.send-button {
|
|
4901
|
+
font-size: 1.5rem;
|
|
4902
|
+
}
|
|
4903
4903
|
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4904
|
+
.paperclip-button {
|
|
4905
|
+
font-size: 1.5rem;
|
|
4906
|
+
position: relative;
|
|
4907
|
+
}
|
|
4908
4908
|
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4909
|
+
.file-input {
|
|
4910
|
+
visibility: hidden;
|
|
4911
|
+
width: 100%;
|
|
4912
|
+
height: 100%;
|
|
4913
|
+
position: absolute;
|
|
4914
|
+
}
|
|
4915
4915
|
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4916
|
+
.cb-input-buttons {
|
|
4917
|
+
padding: 0 5px;
|
|
4918
|
+
}
|
|
4919
4919
|
`, Zc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76l7.494-7.493Z"/></svg>', Gc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M4.5 3a2.5 2.5 0 0 1 5 0v9a1.5 1.5 0 0 1-3 0V5a.5.5 0 0 1 1 0v7a.5.5 0 0 0 1 0V3a1.5 1.5 0 1 0-3 0v9a2.5 2.5 0 0 0 5 0V5a.5.5 0 0 1 1 0v7a3.5 3.5 0 1 1-7 0z"/></svg>';
|
|
4920
4920
|
var Jc = Object.defineProperty, Kc = Object.getOwnPropertyDescriptor, ve = (a, e, c, i) => {
|
|
4921
4921
|
for (var n = i > 1 ? void 0 : i ? Kc(e, c) : e, f = a.length - 1, l; f >= 0; f--)
|
|
@@ -4969,6 +4969,7 @@ let be = class extends Q {
|
|
|
4969
4969
|
return m`
|
|
4970
4970
|
<div class="cb-user-input-wrapper" part="user-input-wrapper">
|
|
4971
4971
|
<sl-textarea
|
|
4972
|
+
part="user-input"
|
|
4972
4973
|
@sl-input=${this._inputChangeHandler}
|
|
4973
4974
|
placeholder=${this.placeholder}
|
|
4974
4975
|
class="cb-user-input"
|
|
@@ -6083,7 +6084,7 @@ let H = class extends Q {
|
|
|
6083
6084
|
`;
|
|
6084
6085
|
}
|
|
6085
6086
|
renderUserInput() {
|
|
6086
|
-
return w.form || w.disabled && this.alwaysOpen ? null : m`<cb-user-input ?loading=${this.loading} ?disabled=${this.loading || w.form} ?enable-file-upload=${this.enableFileUpload}></cb-user-input>`;
|
|
6087
|
+
return w.form || w.disabled && this.alwaysOpen ? null : m`<cb-user-input ?loading=${this.loading} ?disabled=${this.loading || w.form} ?enable-file-upload=${this.enableFileUpload} exportparts="user-input, user-input-wrapper"></cb-user-input>`;
|
|
6087
6088
|
}
|
|
6088
6089
|
connectedCallback() {
|
|
6089
6090
|
super.connectedCallback(), je.info("connectedCallback"), addEventListener("c7o:bot:stateEvent", this.handleStateEvent), addEventListener("message:send", this.handleAddMessage), addEventListener("chatbot:toggle", this._chatbotToggleHandler), addEventListener("form:submit", this._formSubmitHandler);
|