buzzcasting-storage 3.15.7 → 3.15.9

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