@zag-js/popover 0.0.0-dev-20220627111117 → 0.0.0-dev-20220627213111
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.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -138,16 +138,16 @@ function preventBodyPointerEvents(el, opts = {}) {
|
|
|
138
138
|
cleanups.forEach((cleanup) => cleanup == null ? void 0 : cleanup());
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
;
|
|
143
|
-
|
|
144
|
-
return
|
|
141
|
+
function getCache() {
|
|
142
|
+
const g = globalThis;
|
|
143
|
+
g.__styleCache__ = g.__styleCache__ || /* @__PURE__ */ new WeakMap();
|
|
144
|
+
return g.__styleCache__;
|
|
145
145
|
}
|
|
146
146
|
function getComputedStyle(el) {
|
|
147
147
|
var _a;
|
|
148
148
|
if (!el)
|
|
149
149
|
return {};
|
|
150
|
-
const cache =
|
|
150
|
+
const cache = getCache();
|
|
151
151
|
let style = cache.get(el);
|
|
152
152
|
if (!style) {
|
|
153
153
|
const win = (_a = el == null ? void 0 : el.ownerDocument.defaultView) != null ? _a : window;
|
package/dist/index.mjs
CHANGED
|
@@ -115,16 +115,16 @@ function preventBodyPointerEvents(el, opts = {}) {
|
|
|
115
115
|
cleanups.forEach((cleanup) => cleanup == null ? void 0 : cleanup());
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
;
|
|
120
|
-
|
|
121
|
-
return
|
|
118
|
+
function getCache() {
|
|
119
|
+
const g = globalThis;
|
|
120
|
+
g.__styleCache__ = g.__styleCache__ || /* @__PURE__ */ new WeakMap();
|
|
121
|
+
return g.__styleCache__;
|
|
122
122
|
}
|
|
123
123
|
function getComputedStyle(el) {
|
|
124
124
|
var _a;
|
|
125
125
|
if (!el)
|
|
126
126
|
return {};
|
|
127
|
-
const cache =
|
|
127
|
+
const cache = getCache();
|
|
128
128
|
let style = cache.get(el);
|
|
129
129
|
if (!style) {
|
|
130
130
|
const win = (_a = el == null ? void 0 : el.ownerDocument.defaultView) != null ? _a : window;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/popover",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20220627213111",
|
|
4
4
|
"description": "Core logic for the popover widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@zag-js/aria-hidden": "0.1.0",
|
|
33
|
-
"@zag-js/core": "0.0.0-dev-
|
|
34
|
-
"@zag-js/dom-utils": "0.0.0-dev-
|
|
35
|
-
"@zag-js/popper": "0.0.0-dev-
|
|
33
|
+
"@zag-js/core": "0.0.0-dev-20220627213111",
|
|
34
|
+
"@zag-js/dom-utils": "0.0.0-dev-20220627213111",
|
|
35
|
+
"@zag-js/popper": "0.0.0-dev-20220627213111",
|
|
36
36
|
"@zag-js/remove-scroll": "0.1.0",
|
|
37
37
|
"@zag-js/types": "0.2.0",
|
|
38
38
|
"@zag-js/utils": "0.1.2",
|