@zag-js/slider 0.0.0-dev-20220712093736 → 0.0.0-dev-20220713111527
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 +9 -7
- package/dist/index.mjs +9 -7
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -105,21 +105,21 @@ function getWindow(el) {
|
|
|
105
105
|
var _a;
|
|
106
106
|
return (_a = el == null ? void 0 : el.ownerDocument.defaultView) != null ? _a : window;
|
|
107
107
|
}
|
|
108
|
-
function defineDomHelpers(
|
|
109
|
-
const
|
|
108
|
+
function defineDomHelpers(helpers) {
|
|
109
|
+
const dom2 = {
|
|
110
110
|
getRootNode: (ctx) => {
|
|
111
111
|
var _a, _b;
|
|
112
112
|
return (_b = (_a = ctx.getRootNode) == null ? void 0 : _a.call(ctx)) != null ? _b : document;
|
|
113
113
|
},
|
|
114
|
-
getDoc: (ctx) => getDocument(
|
|
114
|
+
getDoc: (ctx) => getDocument(dom2.getRootNode(ctx)),
|
|
115
115
|
getWin: (ctx) => {
|
|
116
116
|
var _a;
|
|
117
|
-
return (_a =
|
|
117
|
+
return (_a = dom2.getDoc(ctx).defaultView) != null ? _a : window;
|
|
118
118
|
},
|
|
119
|
-
getActiveElement: (ctx) =>
|
|
120
|
-
getById: (ctx, id) =>
|
|
119
|
+
getActiveElement: (ctx) => dom2.getDoc(ctx).activeElement,
|
|
120
|
+
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
121
121
|
};
|
|
122
|
-
return __spreadValues2(__spreadValues2({},
|
|
122
|
+
return __spreadValues2(__spreadValues2({}, dom2), helpers);
|
|
123
123
|
}
|
|
124
124
|
function getNativeEvent(e) {
|
|
125
125
|
var _a;
|
|
@@ -219,6 +219,8 @@ function getDescriptor(el, options) {
|
|
|
219
219
|
}
|
|
220
220
|
function dispatchInputValueEvent(el, value) {
|
|
221
221
|
var _a;
|
|
222
|
+
if (!el)
|
|
223
|
+
return;
|
|
222
224
|
const win = getWindow(el);
|
|
223
225
|
if (!(el instanceof win.HTMLInputElement))
|
|
224
226
|
return;
|
package/dist/index.mjs
CHANGED
|
@@ -80,21 +80,21 @@ function getWindow(el) {
|
|
|
80
80
|
var _a;
|
|
81
81
|
return (_a = el == null ? void 0 : el.ownerDocument.defaultView) != null ? _a : window;
|
|
82
82
|
}
|
|
83
|
-
function defineDomHelpers(
|
|
84
|
-
const
|
|
83
|
+
function defineDomHelpers(helpers) {
|
|
84
|
+
const dom2 = {
|
|
85
85
|
getRootNode: (ctx) => {
|
|
86
86
|
var _a, _b;
|
|
87
87
|
return (_b = (_a = ctx.getRootNode) == null ? void 0 : _a.call(ctx)) != null ? _b : document;
|
|
88
88
|
},
|
|
89
|
-
getDoc: (ctx) => getDocument(
|
|
89
|
+
getDoc: (ctx) => getDocument(dom2.getRootNode(ctx)),
|
|
90
90
|
getWin: (ctx) => {
|
|
91
91
|
var _a;
|
|
92
|
-
return (_a =
|
|
92
|
+
return (_a = dom2.getDoc(ctx).defaultView) != null ? _a : window;
|
|
93
93
|
},
|
|
94
|
-
getActiveElement: (ctx) =>
|
|
95
|
-
getById: (ctx, id) =>
|
|
94
|
+
getActiveElement: (ctx) => dom2.getDoc(ctx).activeElement,
|
|
95
|
+
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
96
96
|
};
|
|
97
|
-
return __spreadValues2(__spreadValues2({},
|
|
97
|
+
return __spreadValues2(__spreadValues2({}, dom2), helpers);
|
|
98
98
|
}
|
|
99
99
|
function getNativeEvent(e) {
|
|
100
100
|
var _a;
|
|
@@ -194,6 +194,8 @@ function getDescriptor(el, options) {
|
|
|
194
194
|
}
|
|
195
195
|
function dispatchInputValueEvent(el, value) {
|
|
196
196
|
var _a;
|
|
197
|
+
if (!el)
|
|
198
|
+
return;
|
|
197
199
|
const win = getWindow(el);
|
|
198
200
|
if (!(el instanceof win.HTMLInputElement))
|
|
199
201
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/slider",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20220713111527",
|
|
4
4
|
"description": "Core logic for the slider widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@zag-js/core": "0.0.0-dev-
|
|
33
|
-
"@zag-js/types": "0.0.0-dev-
|
|
32
|
+
"@zag-js/core": "0.0.0-dev-20220713111527",
|
|
33
|
+
"@zag-js/types": "0.0.0-dev-20220713111527"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@zag-js/dom-utils": "0.0.0-dev-
|
|
36
|
+
"@zag-js/dom-utils": "0.0.0-dev-20220713111527",
|
|
37
37
|
"@zag-js/number-utils": "0.1.2",
|
|
38
38
|
"@zag-js/utils": "0.1.2"
|
|
39
39
|
},
|