@tixyel/streamelements 7.6.1 → 7.6.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.
package/dist/index.es.js CHANGED
@@ -13060,26 +13060,28 @@ var le = class {
13060
13060
  }),
13061
13061
  events: {
13062
13062
  emit(e, t) {
13063
- let n = new CustomEvent("onEventReceived", { detail: {
13063
+ let n = {
13064
13064
  listener: e,
13065
13065
  event: t,
13066
13066
  result: void 0
13067
- } });
13067
+ }, r = new CustomEvent("onEventReceived", { detail: n });
13068
13068
  return this.history.push({
13069
- ...n,
13069
+ detail: n,
13070
+ timestamp: r.timeStamp,
13070
13071
  origin: P?.[0]?.id
13071
- }), localStorage.setItem("SE_API-EVENTS", JSON.stringify(this.history)), window.dispatchEvent(n) ? { ok: !0 } : { ok: !1 };
13072
+ }), localStorage.setItem("SE_API-EVENTS", JSON.stringify(this.history)), window.dispatchEvent(r) ? { ok: !0 } : { ok: !1 };
13072
13073
  },
13073
13074
  broadcast(e, t) {
13074
- let n = new CustomEvent("onEventReceived", { detail: {
13075
+ let n = {
13075
13076
  listener: e,
13076
13077
  event: t,
13077
13078
  result: void 0
13078
- } });
13079
+ }, r = new CustomEvent("onEventReceived", { detail: n });
13079
13080
  return this.history.push({
13080
- ...n,
13081
+ detail: n,
13082
+ timestamp: Date.now(),
13081
13083
  origin: P?.[0]?.id
13082
- }), localStorage.setItem("SE_API-EVENTS", JSON.stringify(this.history)), window.dispatchEvent(n) ? { ok: !0 } : { ok: !1 };
13084
+ }), localStorage.setItem("SE_API-EVENTS", JSON.stringify(this.history)), window.dispatchEvent(r) ? { ok: !0 } : { ok: !1 };
13083
13085
  },
13084
13086
  history: []
13085
13087
  }