seitu 0.5.2 → 0.5.4

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.
Files changed (2) hide show
  1. package/dist/web.js +9 -3
  2. package/package.json +1 -1
package/dist/web.js CHANGED
@@ -53,8 +53,11 @@ function i(n) {
53
53
  let t = window[n.kind];
54
54
  r = !0, Object.entries(e).forEach(([e, r]) => {
55
55
  let i = typeof r == "string" ? r : JSON.stringify(r);
56
- t.setItem(n.keyTransform ? n.keyTransform(e) : e, i);
57
- }), window.dispatchEvent(new Event("storage")), r = !1;
56
+ t.setItem(n.keyTransform ? n.keyTransform(e) : e, i), window.dispatchEvent(new StorageEvent("storage", {
57
+ key: n.keyTransform ? n.keyTransform(e) : e,
58
+ newValue: i
59
+ }));
60
+ }), r = !1;
58
61
  }
59
62
  }
60
63
  }), a = () => {
@@ -123,7 +126,10 @@ function o(t) {
123
126
  set: (e) => {
124
127
  if (typeof window > "u") return;
125
128
  let n = window[r], a = typeof e == "function" ? e(l()) : e;
126
- i = !0, n.setItem(t.key, typeof a == "string" ? a : JSON.stringify(a)), window.dispatchEvent(new Event("storage")), i = !1, c();
129
+ i = !0, n.setItem(t.key, typeof a == "string" ? a : JSON.stringify(a)), window.dispatchEvent(new StorageEvent("storage", {
130
+ key: t.key,
131
+ newValue: a
132
+ })), i = !1, c();
127
133
  },
128
134
  subscribe: (e) => s(() => e(l())),
129
135
  remove: () => {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "seitu",
3
3
  "displayName": "Seitu",
4
4
  "type": "module",
5
- "version": "0.5.2",
5
+ "version": "0.5.4",
6
6
  "private": false,
7
7
  "author": "Valerii Strilets",
8
8
  "license": "MIT",