buzzcasting-storage 3.15.8 → 3.15.10

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.
@@ -118,11 +118,10 @@ const Ra = new Blob(
118
118
  }`
119
119
  ],
120
120
  { type: "text/javascript" }
121
- );
122
- window.__bc = window.__bc || {};
123
- window.__bc.logger = window.__bc?.logger || new Worker(window.URL.createObjectURL(Ra), { name: "logger" });
124
- const j = async (f = 0, t) => {
125
- window.__bc.logger.postMessage({ action: "log", level: f, message: t });
121
+ ), xa = new Worker(window.URL.createObjectURL(Ra), {
122
+ name: "logger"
123
+ }), j = async (f = 0, t) => {
124
+ xa.postMessage({ action: "log", level: f, message: t });
126
125
  }, wt = (f) => {
127
126
  switch (f?.type) {
128
127
  case S.MESSAGES:
@@ -139,7 +138,7 @@ function Y(f) {
139
138
  let t = `${f.type}.${f.topics}`;
140
139
  return f.order && (t += `.${f.order}`), f.period && (t += `.${f.period}`), t;
141
140
  }
142
- function xa(f) {
141
+ function ka(f) {
143
142
  if (f.widget === void 0) {
144
143
  const t = f.topics?.split("-");
145
144
  t && t.length > 1 ? (f.dashboard = t ? t[0] : "", f.widget = t ? t[1] : "") : (f.widget = f.topics, f.dashboard = f.slide);
@@ -163,8 +162,8 @@ function Ot(f, t) {
163
162
  }
164
163
  return t;
165
164
  }
166
- const ka = "3.15.7";
167
- async function* Ca(f) {
165
+ const Ca = "3.15.9";
166
+ async function* $a(f) {
168
167
  const t = f.pipeThrough(new TextDecoderStream("utf-8")).getReader();
169
168
  let o = "";
170
169
  for (; ; ) {
@@ -178,7 +177,7 @@ async function* Ca(f) {
178
177
  }
179
178
  }
180
179
  }
181
- class $a {
180
+ class ja {
182
181
  options;
183
182
  url;
184
183
  constructor(t) {
@@ -257,7 +256,7 @@ class $a {
257
256
  method: "post"
258
257
  }
259
258
  );
260
- for await (const y of Ca(g.body))
259
+ for await (const y of $a(g.body))
261
260
  console.log("Received", y);
262
261
  }
263
262
  async hideMessage(t) {
@@ -521,16 +520,16 @@ class $a {
521
520
  }).then((y) => y.json()).catch((y) => ({ succes: !1, message: y, data: [] }));
522
521
  }
523
522
  }
524
- var ja = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
525
- function Ga(f) {
523
+ var Ga = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
524
+ function Ma(f) {
526
525
  return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
527
526
  }
528
- var tr = { exports: {} }, Ma = tr.exports, Cn;
529
- function Ka() {
527
+ var tr = { exports: {} }, Ka = tr.exports, Cn;
528
+ function La() {
530
529
  return Cn || (Cn = 1, function(f, t) {
531
530
  (function(o, u) {
532
531
  f.exports = u();
533
- })(Ma, function() {
532
+ })(Ka, function() {
534
533
  var o = function(e, r) {
535
534
  return (o = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, a) {
536
535
  n.__proto__ = a;
@@ -547,7 +546,7 @@ function Ka() {
547
546
  for (var a, s = 0, c = r.length; s < c; s++) !a && s in r || ((a = a || Array.prototype.slice.call(r, 0, s))[s] = r[s]);
548
547
  return e.concat(a || Array.prototype.slice.call(r));
549
548
  }
550
- var y = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : ja, I = Object.keys, M = Array.isArray;
549
+ var y = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Ga, I = Object.keys, M = Array.isArray;
551
550
  function te(e, r) {
552
551
  return typeof r != "object" || I(r).forEach(function(n) {
553
552
  e[n] = r[n];
@@ -3536,21 +3535,21 @@ function Ka() {
3536
3535
  });
3537
3536
  }(tr)), tr.exports;
3538
3537
  }
3539
- var La = Ka();
3540
- const Fr = /* @__PURE__ */ Ga(La), $n = Symbol.for("Dexie"), St = globalThis[$n] || (globalThis[$n] = Fr);
3538
+ var Ba = La();
3539
+ const Fr = /* @__PURE__ */ Ma(Ba), $n = Symbol.for("Dexie"), St = globalThis[$n] || (globalThis[$n] = Fr);
3541
3540
  if (Fr.semVer !== St.semVer)
3542
3541
  throw new Error(`Two different versions of Dexie loaded in the same app: ${Fr.semVer} and ${St.semVer}`);
3543
3542
  const {
3544
- liveQuery: Wa,
3545
- mergeRanges: Fa,
3546
- rangesOverlap: Ha,
3547
- RangeSet: Va,
3548
- cmp: za,
3549
- Entity: Ya,
3550
- PropModification: Xa,
3551
- replacePrefix: Qa,
3552
- add: Ja,
3553
- remove: Za
3543
+ liveQuery: Fa,
3544
+ mergeRanges: Ha,
3545
+ rangesOverlap: Va,
3546
+ RangeSet: za,
3547
+ cmp: Ya,
3548
+ Entity: Xa,
3549
+ PropModification: Qa,
3550
+ replacePrefix: Ja,
3551
+ add: Za,
3552
+ remove: qa
3554
3553
  } = St;
3555
3554
  class Gn {
3556
3555
  db;
@@ -4095,7 +4094,7 @@ class Gn {
4095
4094
  * @param query IQuery
4096
4095
  * @returns null
4097
4096
  */
4098
- subscribe = (t) => (t = xa(t), this.subscribers.filter(
4097
+ subscribe = (t) => (t = ka(t), this.subscribers.filter(
4099
4098
  (u) => u.widget === t.widget
4100
4099
  ).length > 0 || (t.type === S.MESSAGES && (t = Ot(this.options, t)), console.info(
4101
4100
  "%cstorage%c %csubscribe",
@@ -4363,7 +4362,7 @@ function Hr(f) {
4363
4362
  f.oncomplete = f.onsuccess = () => t(f.result), f.onabort = f.onerror = () => o(f.error);
4364
4363
  });
4365
4364
  }
4366
- function Ba(f, t) {
4365
+ function Ua(f, t) {
4367
4366
  let o;
4368
4367
  const u = () => {
4369
4368
  if (o)
@@ -4378,7 +4377,7 @@ function Ba(f, t) {
4378
4377
  }
4379
4378
  let Wr;
4380
4379
  function Mn() {
4381
- return Wr || (Wr = Ba("keyval-store", "keyval")), Wr;
4380
+ return Wr || (Wr = Ua("keyval-store", "keyval")), Wr;
4382
4381
  }
4383
4382
  function _e(f, t = Mn()) {
4384
4383
  return t("readonly", (o) => Hr(o.get(f)));
@@ -5700,7 +5699,7 @@ class Un {
5700
5699
  success: !1
5701
5700
  });
5702
5701
  }
5703
- class qa {
5702
+ class es {
5704
5703
  sm;
5705
5704
  api;
5706
5705
  bc;
@@ -5713,8 +5712,8 @@ class qa {
5713
5712
  i.PRESENTATION,
5714
5713
  t.presentation,
5715
5714
  Q.VERSION,
5716
- ka
5717
- ]), this.options = t, this.sm = null, this.bc = new BroadcastChannel(this.options.presentation), this.api = new $a(t), t.storage) {
5715
+ Ca
5716
+ ]), this.options = t, this.sm = null, this.bc = new BroadcastChannel(this.options.presentation), this.api = new ja(t), t.storage) {
5718
5717
  case pe.DEXIE:
5719
5718
  this.sm = new Gn(t);
5720
5719
  break;
@@ -6005,7 +6004,7 @@ class qa {
6005
6004
  getHash = async (t, o) => await this.sm?.getHash(t, o);
6006
6005
  setHash = async (t, o) => await this.sm?.setHash(t, o) ?? 400;
6007
6006
  }
6008
- class Ua {
6007
+ class Wa {
6009
6008
  sm;
6010
6009
  constructor(t) {
6011
6010
  switch (this.sm = null, t.storage) {
@@ -6087,7 +6086,7 @@ class Ua {
6087
6086
  success: !1
6088
6087
  }) : await this.sm?.getSeries(t);
6089
6088
  }
6090
- class es {
6089
+ class ts {
6091
6090
  storageReader;
6092
6091
  broadcastChannel;
6093
6092
  element;
@@ -6105,7 +6104,7 @@ class es {
6105
6104
  const g = { ...t.dataset };
6106
6105
  delete g.hmr;
6107
6106
  const y = window.__bc.opts;
6108
- g.presentation = y?.presentation ?? `${u} not found`, this.query = g, Na(t), this.storageReader = new Ua(y), this.broadcastChannel = new BroadcastChannel(g.presentation), this.broadcastListener();
6107
+ g.presentation = y?.presentation ?? `${u} not found`, this.query = g, Na(t), this.storageReader = new Wa(y), this.broadcastChannel = new BroadcastChannel(g.presentation), this.broadcastListener();
6109
6108
  }
6110
6109
  addCallbackListener(t) {
6111
6110
  this.callbacks.push(t);
@@ -6308,7 +6307,7 @@ class es {
6308
6307
  }
6309
6308
  }
6310
6309
  export {
6311
- qa as BuzzcastingStorageManager,
6312
- Ua as BuzzcastingStorageReader,
6313
- es as Widget
6310
+ es as BuzzcastingStorageManager,
6311
+ Wa as BuzzcastingStorageReader,
6312
+ ts as Widget
6314
6313
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-storage",
3
3
  "type": "module",
4
- "version": "3.15.8",
4
+ "version": "3.15.10",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "Mark Tamis, TouchFlows SAS",
@@ -43,7 +43,7 @@
43
43
  "@typescript-eslint/eslint-plugin": "^8.46.2",
44
44
  "@typescript-eslint/parser": "^8.46.2",
45
45
  "@vitest/coverage-v8": "^4.0.1",
46
- "buzzcasting-utils": "^1.9.3",
46
+ "buzzcasting-utils": "^1.9.5",
47
47
  "camelcase": "^8.0.0",
48
48
  "changelogen": "^0.6.2",
49
49
  "eslint": "^9.38.0",