@zag-js/rect-utils 0.1.8 → 0.2.0
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 +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -274,12 +274,13 @@ function getCache() {
|
|
|
274
274
|
return g.__styleCache;
|
|
275
275
|
}
|
|
276
276
|
function getComputedStyle(el) {
|
|
277
|
+
var _a;
|
|
277
278
|
if (!el)
|
|
278
279
|
return {};
|
|
279
280
|
const cache = getCache();
|
|
280
281
|
let style = cache.get(el);
|
|
281
282
|
if (!style) {
|
|
282
|
-
const win = (el == null ? void 0 : el.ownerDocument.defaultView)
|
|
283
|
+
const win = (_a = el == null ? void 0 : el.ownerDocument.defaultView) != null ? _a : window;
|
|
283
284
|
style = win.getComputedStyle(el);
|
|
284
285
|
cache.set(el, style);
|
|
285
286
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -213,12 +213,13 @@ function getCache() {
|
|
|
213
213
|
return g.__styleCache;
|
|
214
214
|
}
|
|
215
215
|
function getComputedStyle(el) {
|
|
216
|
+
var _a;
|
|
216
217
|
if (!el)
|
|
217
218
|
return {};
|
|
218
219
|
const cache = getCache();
|
|
219
220
|
let style = cache.get(el);
|
|
220
221
|
if (!style) {
|
|
221
|
-
const win = (el == null ? void 0 : el.ownerDocument.defaultView)
|
|
222
|
+
const win = (_a = el == null ? void 0 : el.ownerDocument.defaultView) != null ? _a : window;
|
|
222
223
|
style = win.getComputedStyle(el);
|
|
223
224
|
cache.set(el, style);
|
|
224
225
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/rect-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@zag-js/dom-utils": "0.
|
|
29
|
-
"@zag-js/utils": "0.
|
|
28
|
+
"@zag-js/dom-utils": "0.2.0",
|
|
29
|
+
"@zag-js/utils": "0.2.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build-fast": "tsup src/index.ts --format=esm,cjs",
|