@zag-js/slider 0.0.0-dev-20220709094318 → 0.0.0-dev-20220709145914
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 +4 -3
- package/dist/index.mjs +4 -3
- package/dist/slider.dom.d.ts +3 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -105,7 +105,7 @@ 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
|
|
108
|
+
function defineDomHelpers(domUtils) {
|
|
109
109
|
const roots = {
|
|
110
110
|
getRootNode: (ctx) => {
|
|
111
111
|
var _a, _b;
|
|
@@ -115,7 +115,8 @@ function withRootHelpers(domUtils) {
|
|
|
115
115
|
getWin: (ctx) => {
|
|
116
116
|
var _a;
|
|
117
117
|
return (_a = roots.getDoc(ctx).defaultView) != null ? _a : window;
|
|
118
|
-
}
|
|
118
|
+
},
|
|
119
|
+
getActiveElement: (ctx) => roots.getDoc(ctx).activeElement
|
|
119
120
|
};
|
|
120
121
|
return __spreadValues2(__spreadValues2({}, roots), domUtils);
|
|
121
122
|
}
|
|
@@ -598,7 +599,7 @@ var utils = {
|
|
|
598
599
|
};
|
|
599
600
|
|
|
600
601
|
// src/slider.dom.ts
|
|
601
|
-
var dom =
|
|
602
|
+
var dom = defineDomHelpers(__spreadProps(__spreadValues({}, styles), {
|
|
602
603
|
getRootId: (ctx) => {
|
|
603
604
|
var _a, _b;
|
|
604
605
|
return (_b = (_a = ctx.ids) == null ? void 0 : _a.root) != null ? _b : `slider:${ctx.id}`;
|
package/dist/index.mjs
CHANGED
|
@@ -80,7 +80,7 @@ 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
|
|
83
|
+
function defineDomHelpers(domUtils) {
|
|
84
84
|
const roots = {
|
|
85
85
|
getRootNode: (ctx) => {
|
|
86
86
|
var _a, _b;
|
|
@@ -90,7 +90,8 @@ function withRootHelpers(domUtils) {
|
|
|
90
90
|
getWin: (ctx) => {
|
|
91
91
|
var _a;
|
|
92
92
|
return (_a = roots.getDoc(ctx).defaultView) != null ? _a : window;
|
|
93
|
-
}
|
|
93
|
+
},
|
|
94
|
+
getActiveElement: (ctx) => roots.getDoc(ctx).activeElement
|
|
94
95
|
};
|
|
95
96
|
return __spreadValues2(__spreadValues2({}, roots), domUtils);
|
|
96
97
|
}
|
|
@@ -573,7 +574,7 @@ var utils = {
|
|
|
573
574
|
};
|
|
574
575
|
|
|
575
576
|
// src/slider.dom.ts
|
|
576
|
-
var dom =
|
|
577
|
+
var dom = defineDomHelpers(__spreadProps(__spreadValues({}, styles), {
|
|
577
578
|
getRootId: (ctx) => {
|
|
578
579
|
var _a, _b;
|
|
579
580
|
return (_b = (_a = ctx.ids) == null ? void 0 : _a.root) != null ? _b : `slider:${ctx.id}`;
|
package/dist/slider.dom.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ export declare const dom: {
|
|
|
9
9
|
getWin: (ctx: {
|
|
10
10
|
getRootNode?: () => Node | Document | ShadowRoot;
|
|
11
11
|
}) => Window & typeof globalThis;
|
|
12
|
+
getActiveElement: (ctx: {
|
|
13
|
+
getRootNode?: () => Node | Document | ShadowRoot;
|
|
14
|
+
}) => HTMLElement;
|
|
12
15
|
} & {
|
|
13
16
|
getRootId: (ctx: Ctx) => string;
|
|
14
17
|
getThumbId: (ctx: Ctx) => string;
|
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-20220709145914",
|
|
4
4
|
"description": "Core logic for the slider 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/core": "0.1.7",
|
|
33
|
-
"@zag-js/dom-utils": "0.0.0-dev-
|
|
33
|
+
"@zag-js/dom-utils": "0.0.0-dev-20220709145914",
|
|
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-20220709145914",
|
|
36
36
|
"@zag-js/utils": "0.1.2"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|