@zag-js/auto-resize 0.1.4 → 0.2.1
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 -3
- package/dist/index.mjs +5 -3
- package/package.json +17 -7
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ __export(src_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(src_exports);
|
|
26
26
|
|
|
27
|
-
// ../dom/
|
|
27
|
+
// ../dom/src/query.ts
|
|
28
28
|
function isDocument(el) {
|
|
29
29
|
return el.nodeType === Node.DOCUMENT_NODE;
|
|
30
30
|
}
|
|
@@ -32,14 +32,16 @@ function isWindow(value) {
|
|
|
32
32
|
return (value == null ? void 0 : value.toString()) === "[object Window]";
|
|
33
33
|
}
|
|
34
34
|
function getDocument(el) {
|
|
35
|
+
var _a;
|
|
35
36
|
if (isWindow(el))
|
|
36
37
|
return el.document;
|
|
37
38
|
if (isDocument(el))
|
|
38
39
|
return el;
|
|
39
|
-
return (el == null ? void 0 : el.ownerDocument)
|
|
40
|
+
return (_a = el == null ? void 0 : el.ownerDocument) != null ? _a : document;
|
|
40
41
|
}
|
|
41
42
|
function getWindow(el) {
|
|
42
|
-
|
|
43
|
+
var _a;
|
|
44
|
+
return (_a = el == null ? void 0 : el.ownerDocument.defaultView) != null ? _a : window;
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
// src/index.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../dom/
|
|
1
|
+
// ../dom/src/query.ts
|
|
2
2
|
function isDocument(el) {
|
|
3
3
|
return el.nodeType === Node.DOCUMENT_NODE;
|
|
4
4
|
}
|
|
@@ -6,14 +6,16 @@ function isWindow(value) {
|
|
|
6
6
|
return (value == null ? void 0 : value.toString()) === "[object Window]";
|
|
7
7
|
}
|
|
8
8
|
function getDocument(el) {
|
|
9
|
+
var _a;
|
|
9
10
|
if (isWindow(el))
|
|
10
11
|
return el.document;
|
|
11
12
|
if (isDocument(el))
|
|
12
13
|
return el;
|
|
13
|
-
return (el == null ? void 0 : el.ownerDocument)
|
|
14
|
+
return (_a = el == null ? void 0 : el.ownerDocument) != null ? _a : document;
|
|
14
15
|
}
|
|
15
16
|
function getWindow(el) {
|
|
16
|
-
|
|
17
|
+
var _a;
|
|
18
|
+
return (_a = el == null ? void 0 : el.ownerDocument.defaultView) != null ? _a : window;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
// src/index.ts
|
package/package.json
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/auto-resize",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Autoresize utilities for the web",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
5
|
"keywords": [
|
|
9
6
|
"js",
|
|
10
7
|
"utils",
|
|
@@ -25,12 +22,25 @@
|
|
|
25
22
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
26
23
|
},
|
|
27
24
|
"devDependencies": {
|
|
28
|
-
"
|
|
25
|
+
"clean-package": "2.2.0",
|
|
26
|
+
"@zag-js/dom-utils": "0.2.2"
|
|
27
|
+
},
|
|
28
|
+
"clean-package": "../../../clean-package.config.json",
|
|
29
|
+
"main": "dist/index.js",
|
|
30
|
+
"module": "dist/index.mjs",
|
|
31
|
+
"types": "dist/index.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"import": "./dist/index.mjs",
|
|
36
|
+
"require": "./dist/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./package.json": "./package.json"
|
|
29
39
|
},
|
|
30
40
|
"scripts": {
|
|
31
|
-
"build-fast": "tsup src
|
|
41
|
+
"build-fast": "tsup src",
|
|
32
42
|
"start": "pnpm build --watch",
|
|
33
|
-
"build": "tsup src
|
|
43
|
+
"build": "tsup src --dts",
|
|
34
44
|
"test": "jest --config ../../../jest.config.js --rootDir tests",
|
|
35
45
|
"lint": "eslint src --ext .ts,.tsx",
|
|
36
46
|
"test-ci": "pnpm test --ci --runInBand -u",
|