@elia-assistant/chatui 2.0.0 → 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.
@@ -101,15 +101,20 @@ 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 o = {
110
+ var s = {
107
111
  webhookUrl: "",
108
112
  chatInputKey: "chatInput",
109
113
  chatSessionKey: "sessionId",
110
114
  mode: "window",
111
115
  showWelcomeScreen: !0,
112
116
  streaming: !1,
117
+ allowFileUploads: !1,
113
118
  botName: "Bot",
114
119
  showCta: !0,
115
120
  ctaText: "Hi! How can I help you today?",
@@ -129,9 +134,9 @@ var o = {
129
134
  }
130
135
  }
131
136
  };
132
- function s(r, a) {
137
+ function c(r, a) {
133
138
  return e()(n((e) => ({
134
- config: o,
139
+ config: s,
135
140
  activeTheme: i,
136
141
  language: "en",
137
142
  setConfig(t) {
@@ -140,6 +145,12 @@ function s(r, a) {
140
145
  ...t
141
146
  } }));
142
147
  },
148
+ initConfig(t) {
149
+ e({ config: {
150
+ ...s,
151
+ ...t
152
+ } });
153
+ },
143
154
  setTheme(t) {
144
155
  e({ activeTheme: t });
145
156
  },
@@ -162,6 +173,6 @@ function s(r, a) {
162
173
  }));
163
174
  }
164
175
  //#endregion
165
- export { a as n, r, s as t };
176
+ export { r as i, a as n, o as r, c as t };
166
177
 
167
- //# sourceMappingURL=settingsStore-DzpdfGcd.js.map
178
+ //# sourceMappingURL=settingsStore-ClKc5xeV.js.map