@elia-assistant/chatui 2.0.1 → 2.0.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/dist/chatui.iife.js +27 -27
- package/dist/chunks/{settingsStore-C7relGs3.js → settingsStore-ClKc5xeV.js} +10 -6
- package/dist/index.js +2022 -2003
- package/dist/store.js +1 -1
- package/dist/themes.d.ts +3 -0
- package/package.json +1 -1
|
@@ -101,9 +101,13 @@ var r = [
|
|
|
101
101
|
function a(e) {
|
|
102
102
|
return r.find((t) => t.id === e) ?? r[0];
|
|
103
103
|
}
|
|
104
|
+
function o(e) {
|
|
105
|
+
let t = a(e).baseColor.replace("#", ""), n = parseInt(t.slice(0, 2), 16), r = parseInt(t.slice(2, 4), 16), i = parseInt(t.slice(4, 6), 16);
|
|
106
|
+
return .299 * n + .587 * r + .114 * i < 128;
|
|
107
|
+
}
|
|
104
108
|
//#endregion
|
|
105
109
|
//#region src/store/settingsStore.ts
|
|
106
|
-
var
|
|
110
|
+
var s = {
|
|
107
111
|
webhookUrl: "",
|
|
108
112
|
chatInputKey: "chatInput",
|
|
109
113
|
chatSessionKey: "sessionId",
|
|
@@ -130,9 +134,9 @@ var o = {
|
|
|
130
134
|
}
|
|
131
135
|
}
|
|
132
136
|
};
|
|
133
|
-
function
|
|
137
|
+
function c(r, a) {
|
|
134
138
|
return e()(n((e) => ({
|
|
135
|
-
config:
|
|
139
|
+
config: s,
|
|
136
140
|
activeTheme: i,
|
|
137
141
|
language: "en",
|
|
138
142
|
setConfig(t) {
|
|
@@ -143,7 +147,7 @@ function s(r, a) {
|
|
|
143
147
|
},
|
|
144
148
|
initConfig(t) {
|
|
145
149
|
e({ config: {
|
|
146
|
-
...
|
|
150
|
+
...s,
|
|
147
151
|
...t
|
|
148
152
|
} });
|
|
149
153
|
},
|
|
@@ -169,6 +173,6 @@ function s(r, a) {
|
|
|
169
173
|
}));
|
|
170
174
|
}
|
|
171
175
|
//#endregion
|
|
172
|
-
export { a as n, r,
|
|
176
|
+
export { r as i, a as n, o as r, c as t };
|
|
173
177
|
|
|
174
|
-
//# sourceMappingURL=settingsStore-
|
|
178
|
+
//# sourceMappingURL=settingsStore-ClKc5xeV.js.map
|