webim-adapter 2.10.5 → 2.10.7

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.
@@ -200,36 +200,40 @@ var n = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
200
200
  };
201
201
  r.light, r.dark, `${n}`, `${n}`;
202
202
  function i(e, t) {
203
+ let n = e?.scheme;
204
+ return n === "light" || n === "dark" ? n : n === "auto" ? "" : t?.scheme === "light" || t?.scheme === "dark" ? t.scheme : "";
205
+ }
206
+ function a(e, t) {
203
207
  return e?.themeRef && t?.[e.themeRef] || e?.theme;
204
208
  }
205
209
  //#endregion
206
210
  //#region src/bundle.js
207
- function a({ page: e, settings: t, tenant: n, apiUrl: r, locale: a }) {
208
- let o = {
211
+ function o({ page: e, settings: t, tenant: n, apiUrl: r, locale: o }) {
212
+ let s = {
209
213
  ...t?.global ?? {},
210
214
  ...t?.tenant ?? {}
211
- }, s = e.meta ?? {};
215
+ }, c = e.meta ?? {}, l = a(c, s.builder_themes?.themes);
212
216
  return {
213
217
  schema: 1,
214
218
  title: e.title,
215
219
  slug: e.slug,
216
220
  param: e.param ?? "",
217
- blocks: a && s.i18n?.[a]?.blocks || e.blocks,
218
- theme: i(s, o.builder_themes?.themes),
219
- components: o.builder_components?.components ?? {},
220
- custom: s.custom,
221
- animations: s.animations,
222
- seo: s.seo,
223
- direction: s.direction,
224
- scheme: s.scheme,
225
- locale: a || o.locales?.default,
226
- locales: o.locales,
221
+ blocks: o && c.i18n?.[o]?.blocks || e.blocks,
222
+ theme: l,
223
+ components: s.builder_components?.components ?? {},
224
+ custom: c.custom,
225
+ animations: c.animations,
226
+ seo: c.seo,
227
+ direction: c.direction,
228
+ scheme: i(l, c),
229
+ locale: o || s.locales?.default,
230
+ locales: s.locales,
227
231
  tenant: n ?? "",
228
232
  apiUrl: r ?? "",
229
- settings: o
233
+ settings: s
230
234
  };
231
235
  }
232
- function o(e) {
236
+ function s(e) {
233
237
  let t = e?.seo ?? {}, n = String(t.title || e?.title || e?.slug || "").trim(), r = e?.settings ?? {}, i = r["site.titleFormat"], a = typeof r["site.name"] == "string" ? r["site.name"].trim() : "";
234
238
  if (!a || i !== "suffix" && i !== "prefix") return n;
235
239
  if (!n || n.toLowerCase().includes(a.toLowerCase())) return n || a;
@@ -237,4 +241,4 @@ function o(e) {
237
241
  return i === "prefix" ? `${a}${s}${n}` : `${n}${s}${a}`;
238
242
  }
239
243
  //#endregion
240
- export { a as assembleBundle, o as documentTitle };
244
+ export { o as assembleBundle, s as documentTitle };