@zag-js/slider 0.0.0-dev-20220628115342 → 0.0.0-dev-20220703123907
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 +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -156,7 +156,7 @@ function raf(fn) {
|
|
|
156
156
|
globalThis.cancelAnimationFrame(id);
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function getWindow(el) {
|
|
160
160
|
var _a;
|
|
161
161
|
return (_a = el == null ? void 0 : el.ownerDocument.defaultView) != null ? _a : window;
|
|
162
162
|
}
|
|
@@ -246,12 +246,12 @@ function getPointRelativeToNode(point, element) {
|
|
|
246
246
|
function getDescriptor(el, options) {
|
|
247
247
|
var _a;
|
|
248
248
|
const { type, property } = options;
|
|
249
|
-
const proto =
|
|
249
|
+
const proto = getWindow(el)[type].prototype;
|
|
250
250
|
return (_a = Object.getOwnPropertyDescriptor(proto, property)) != null ? _a : {};
|
|
251
251
|
}
|
|
252
252
|
function dispatchInputValueEvent(el, value) {
|
|
253
253
|
var _a;
|
|
254
|
-
const win =
|
|
254
|
+
const win = getWindow(el);
|
|
255
255
|
if (!(el instanceof win.HTMLInputElement))
|
|
256
256
|
return;
|
|
257
257
|
const desc = getDescriptor(el, { type: "HTMLInputElement", property: "value" });
|
package/dist/index.mjs
CHANGED
|
@@ -132,7 +132,7 @@ function raf(fn) {
|
|
|
132
132
|
globalThis.cancelAnimationFrame(id);
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function getWindow(el) {
|
|
136
136
|
var _a;
|
|
137
137
|
return (_a = el == null ? void 0 : el.ownerDocument.defaultView) != null ? _a : window;
|
|
138
138
|
}
|
|
@@ -222,12 +222,12 @@ function getPointRelativeToNode(point, element) {
|
|
|
222
222
|
function getDescriptor(el, options) {
|
|
223
223
|
var _a;
|
|
224
224
|
const { type, property } = options;
|
|
225
|
-
const proto =
|
|
225
|
+
const proto = getWindow(el)[type].prototype;
|
|
226
226
|
return (_a = Object.getOwnPropertyDescriptor(proto, property)) != null ? _a : {};
|
|
227
227
|
}
|
|
228
228
|
function dispatchInputValueEvent(el, value) {
|
|
229
229
|
var _a;
|
|
230
|
-
const win =
|
|
230
|
+
const win = getWindow(el);
|
|
231
231
|
if (!(el instanceof win.HTMLInputElement))
|
|
232
232
|
return;
|
|
233
233
|
const desc = getDescriptor(el, { type: "HTMLInputElement", property: "value" });
|
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-20220703123907",
|
|
4
4
|
"description": "Core logic for the slider widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -29,10 +29,10 @@
|
|
|
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/dom-utils": "0.0.0-dev-
|
|
32
|
+
"@zag-js/core": "0.0.0-dev-20220703123907",
|
|
33
|
+
"@zag-js/dom-utils": "0.0.0-dev-20220703123907",
|
|
34
34
|
"@zag-js/number-utils": "0.1.2",
|
|
35
|
-
"@zag-js/types": "0.0.0-dev-
|
|
35
|
+
"@zag-js/types": "0.0.0-dev-20220703123907",
|
|
36
36
|
"@zag-js/utils": "0.1.2"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|