@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.
@@ -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 o = {
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 s(r, a) {
137
+ function c(r, a) {
134
138
  return e()(n((e) => ({
135
- config: o,
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
- ...o,
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, s as t };
176
+ export { r as i, a as n, o as r, c as t };
173
177
 
174
- //# sourceMappingURL=settingsStore-C7relGs3.js.map
178
+ //# sourceMappingURL=settingsStore-ClKc5xeV.js.map