buzzcasting-storage 3.15.9 → 3.15.11

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,51 +76,8 @@ at(
76
76
  "checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"
77
77
  );
78
78
  at("script,style");
79
- new Blob(
80
- [
81
- `const LOG_LEVELS = new Set([1,2,3,4])
82
- self.onmessage = function(e) {
83
- switch(e.data.action){
84
- case 'add':
85
- LOG_LEVELS.add(e.data.level);
86
- break;
87
- case 'clear':
88
- LOG_LEVELS.clear();
89
- break;
90
- case 'delete':
91
- LOG_LEVELS.delete(e.data.level);
92
- break;
93
- case 'list':
94
- e.data.message.push([...LOG_LEVELS])
95
- console.log(...e.data.message);
96
- break;
97
- case 'log':
98
- if(LOG_LEVELS.has(e.data.level)) {
99
- switch (true) {
100
- case e.data.level > 3:
101
- console.debug(...e.data.message);
102
- break;
103
- case e.data.level > 2:
104
- console.info(...e.data.message);
105
- break;
106
- case e.data.level > 1:
107
- console.warn(...e.data.message);
108
- break;
109
- case e.data.level > 0:
110
- console.error(...e.data.message);
111
- break;
112
- default:
113
- console.info(...e.data.message);
114
- }
115
- }
116
- break;
117
- }
118
- }`
119
- ],
120
- { type: "text/javascript" }
121
- );
122
- const j = async (f = 0, t) => {
123
- window.__bc.logger.postMessage({ action: "log", level: f, message: t });
79
+ const Ra = new BroadcastChannel("logging"), j = async (f = 0, t) => {
80
+ Ra.postMessage({ action: "log", level: f, message: t });
124
81
  }, wt = (f) => {
125
82
  switch (f?.type) {
126
83
  case S.MESSAGES:
@@ -137,7 +94,7 @@ function Y(f) {
137
94
  let t = `${f.type}.${f.topics}`;
138
95
  return f.order && (t += `.${f.order}`), f.period && (t += `.${f.period}`), t;
139
96
  }
140
- function Ra(f) {
97
+ function xa(f) {
141
98
  if (f.widget === void 0) {
142
99
  const t = f.topics?.split("-");
143
100
  t && t.length > 1 ? (f.dashboard = t ? t[0] : "", f.widget = t ? t[1] : "") : (f.widget = f.topics, f.dashboard = f.slide);
@@ -161,8 +118,8 @@ function Ot(f, t) {
161
118
  }
162
119
  return t;
163
120
  }
164
- const xa = "3.15.8";
165
- async function* ka(f) {
121
+ const ka = "3.15.10";
122
+ async function* Ca(f) {
166
123
  const t = f.pipeThrough(new TextDecoderStream("utf-8")).getReader();
167
124
  let o = "";
168
125
  for (; ; ) {
@@ -176,7 +133,7 @@ async function* ka(f) {
176
133
  }
177
134
  }
178
135
  }
179
- class Ca {
136
+ class $a {
180
137
  options;
181
138
  url;
182
139
  constructor(t) {
@@ -255,7 +212,7 @@ class Ca {
255
212
  method: "post"
256
213
  }
257
214
  );
258
- for await (const y of ka(g.body))
215
+ for await (const y of Ca(g.body))
259
216
  console.log("Received", y);
260
217
  }
261
218
  async hideMessage(t) {
@@ -519,16 +476,16 @@ class Ca {
519
476
  }).then((y) => y.json()).catch((y) => ({ succes: !1, message: y, data: [] }));
520
477
  }
521
478
  }
522
- var $a = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
523
- function ja(f) {
479
+ var ja = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
480
+ function Ga(f) {
524
481
  return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
525
482
  }
526
- var tr = { exports: {} }, Ga = tr.exports, Cn;
527
- function Ma() {
483
+ var tr = { exports: {} }, Ma = tr.exports, Cn;
484
+ function Ka() {
528
485
  return Cn || (Cn = 1, function(f, t) {
529
486
  (function(o, u) {
530
487
  f.exports = u();
531
- })(Ga, function() {
488
+ })(Ma, function() {
532
489
  var o = function(e, r) {
533
490
  return (o = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, a) {
534
491
  n.__proto__ = a;
@@ -545,7 +502,7 @@ function Ma() {
545
502
  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]);
546
503
  return e.concat(a || Array.prototype.slice.call(r));
547
504
  }
548
- var y = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : $a, I = Object.keys, M = Array.isArray;
505
+ var y = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : ja, I = Object.keys, M = Array.isArray;
549
506
  function te(e, r) {
550
507
  return typeof r != "object" || I(r).forEach(function(n) {
551
508
  e[n] = r[n];
@@ -3534,21 +3491,21 @@ function Ma() {
3534
3491
  });
3535
3492
  }(tr)), tr.exports;
3536
3493
  }
3537
- var Ka = Ma();
3538
- const Fr = /* @__PURE__ */ ja(Ka), $n = Symbol.for("Dexie"), St = globalThis[$n] || (globalThis[$n] = Fr);
3494
+ var La = Ka();
3495
+ const Fr = /* @__PURE__ */ Ga(La), $n = Symbol.for("Dexie"), St = globalThis[$n] || (globalThis[$n] = Fr);
3539
3496
  if (Fr.semVer !== St.semVer)
3540
3497
  throw new Error(`Two different versions of Dexie loaded in the same app: ${Fr.semVer} and ${St.semVer}`);
3541
3498
  const {
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
3499
+ liveQuery: Wa,
3500
+ mergeRanges: Fa,
3501
+ rangesOverlap: Ha,
3502
+ RangeSet: Va,
3503
+ cmp: za,
3504
+ Entity: Ya,
3505
+ PropModification: Xa,
3506
+ replacePrefix: Qa,
3507
+ add: Ja,
3508
+ remove: Za
3552
3509
  } = St;
3553
3510
  class Gn {
3554
3511
  db;
@@ -4093,7 +4050,7 @@ class Gn {
4093
4050
  * @param query IQuery
4094
4051
  * @returns null
4095
4052
  */
4096
- subscribe = (t) => (t = Ra(t), this.subscribers.filter(
4053
+ subscribe = (t) => (t = xa(t), this.subscribers.filter(
4097
4054
  (u) => u.widget === t.widget
4098
4055
  ).length > 0 || (t.type === S.MESSAGES && (t = Ot(this.options, t)), console.info(
4099
4056
  "%cstorage%c %csubscribe",
@@ -4361,7 +4318,7 @@ function Hr(f) {
4361
4318
  f.oncomplete = f.onsuccess = () => t(f.result), f.onabort = f.onerror = () => o(f.error);
4362
4319
  });
4363
4320
  }
4364
- function La(f, t) {
4321
+ function Ba(f, t) {
4365
4322
  let o;
4366
4323
  const u = () => {
4367
4324
  if (o)
@@ -4376,7 +4333,7 @@ function La(f, t) {
4376
4333
  }
4377
4334
  let Wr;
4378
4335
  function Mn() {
4379
- return Wr || (Wr = La("keyval-store", "keyval")), Wr;
4336
+ return Wr || (Wr = Ba("keyval-store", "keyval")), Wr;
4380
4337
  }
4381
4338
  function _e(f, t = Mn()) {
4382
4339
  return t("readonly", (o) => Hr(o.get(f)));
@@ -5698,7 +5655,7 @@ class Un {
5698
5655
  success: !1
5699
5656
  });
5700
5657
  }
5701
- class Za {
5658
+ class qa {
5702
5659
  sm;
5703
5660
  api;
5704
5661
  bc;
@@ -5711,8 +5668,8 @@ class Za {
5711
5668
  i.PRESENTATION,
5712
5669
  t.presentation,
5713
5670
  Q.VERSION,
5714
- xa
5715
- ]), this.options = t, this.sm = null, this.bc = new BroadcastChannel(this.options.presentation), this.api = new Ca(t), t.storage) {
5671
+ ka
5672
+ ]), this.options = t, this.sm = null, this.bc = new BroadcastChannel(this.options.presentation), this.api = new $a(t), t.storage) {
5716
5673
  case pe.DEXIE:
5717
5674
  this.sm = new Gn(t);
5718
5675
  break;
@@ -6003,7 +5960,7 @@ class Za {
6003
5960
  getHash = async (t, o) => await this.sm?.getHash(t, o);
6004
5961
  setHash = async (t, o) => await this.sm?.setHash(t, o) ?? 400;
6005
5962
  }
6006
- class Ba {
5963
+ class Ua {
6007
5964
  sm;
6008
5965
  constructor(t) {
6009
5966
  switch (this.sm = null, t.storage) {
@@ -6085,7 +6042,7 @@ class Ba {
6085
6042
  success: !1
6086
6043
  }) : await this.sm?.getSeries(t);
6087
6044
  }
6088
- class qa {
6045
+ class es {
6089
6046
  storageReader;
6090
6047
  broadcastChannel;
6091
6048
  element;
@@ -6103,7 +6060,7 @@ class qa {
6103
6060
  const g = { ...t.dataset };
6104
6061
  delete g.hmr;
6105
6062
  const y = window.__bc.opts;
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();
6063
+ 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
6064
  }
6108
6065
  addCallbackListener(t) {
6109
6066
  this.callbacks.push(t);
@@ -6306,7 +6263,7 @@ class qa {
6306
6263
  }
6307
6264
  }
6308
6265
  export {
6309
- Za as BuzzcastingStorageManager,
6310
- Ba as BuzzcastingStorageReader,
6311
- qa as Widget
6266
+ qa as BuzzcastingStorageManager,
6267
+ Ua as BuzzcastingStorageReader,
6268
+ es as Widget
6312
6269
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-storage",
3
3
  "type": "module",
4
- "version": "3.15.9",
4
+ "version": "3.15.11",
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.4",
46
+ "buzzcasting-utils": "^1.9.6",
47
47
  "camelcase": "^8.0.0",
48
48
  "changelogen": "^0.6.2",
49
49
  "eslint": "^9.38.0",