@zag-js/splitter 0.2.16 → 0.6.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.
|
@@ -271,7 +271,7 @@ function machine(userContext) {
|
|
|
271
271
|
const rootEl = dom.getRootEl(ctx2);
|
|
272
272
|
if (!panels || !rootEl || !bounds)
|
|
273
273
|
return;
|
|
274
|
-
let pointValue = getRelativePointPercent(evt.point, rootEl).normalize(ctx2);
|
|
274
|
+
let pointValue = getRelativePointPercent(evt.point, rootEl).normalize(ctx2) * 100;
|
|
275
275
|
ctx2.activeResizeState = {
|
|
276
276
|
isAtMin: pointValue < bounds.min,
|
|
277
277
|
isAtMax: pointValue > bounds.max
|
package/dist/index.js
CHANGED
|
@@ -662,7 +662,7 @@ function machine(userContext) {
|
|
|
662
662
|
const rootEl = dom.getRootEl(ctx2);
|
|
663
663
|
if (!panels || !rootEl || !bounds)
|
|
664
664
|
return;
|
|
665
|
-
let pointValue = (0, import_dom_event2.getRelativePointPercent)(evt.point, rootEl).normalize(ctx2);
|
|
665
|
+
let pointValue = (0, import_dom_event2.getRelativePointPercent)(evt.point, rootEl).normalize(ctx2) * 100;
|
|
666
666
|
ctx2.activeResizeState = {
|
|
667
667
|
isAtMin: pointValue < bounds.min,
|
|
668
668
|
isAtMax: pointValue > bounds.max
|
package/dist/index.mjs
CHANGED
package/dist/splitter.dom.d.ts
CHANGED
|
@@ -4,22 +4,22 @@ import '@zag-js/core';
|
|
|
4
4
|
|
|
5
5
|
declare const dom: {
|
|
6
6
|
getRootNode: (ctx: {
|
|
7
|
-
getRootNode?: (() =>
|
|
8
|
-
}) =>
|
|
7
|
+
getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
|
|
8
|
+
}) => Document | ShadowRoot;
|
|
9
9
|
getDoc: (ctx: {
|
|
10
|
-
getRootNode?: (() =>
|
|
10
|
+
getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
|
|
11
11
|
}) => Document;
|
|
12
12
|
getWin: (ctx: {
|
|
13
|
-
getRootNode?: (() =>
|
|
13
|
+
getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
|
|
14
14
|
}) => Window & typeof globalThis;
|
|
15
15
|
getActiveElement: (ctx: {
|
|
16
|
-
getRootNode?: (() =>
|
|
16
|
+
getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
|
|
17
17
|
}) => HTMLElement | null;
|
|
18
18
|
getById: <T extends HTMLElement = HTMLElement>(ctx: {
|
|
19
|
-
getRootNode?: (() =>
|
|
19
|
+
getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
|
|
20
20
|
}, id: string) => T | null;
|
|
21
21
|
queryById: <T_1 extends HTMLElement = HTMLElement>(ctx: {
|
|
22
|
-
getRootNode?: (() =>
|
|
22
|
+
getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
|
|
23
23
|
}, id: string) => T_1;
|
|
24
24
|
} & {
|
|
25
25
|
getRootId: (ctx: MachineContext) => string;
|
package/dist/splitter.machine.js
CHANGED
|
@@ -465,7 +465,7 @@ function machine(userContext) {
|
|
|
465
465
|
const rootEl = dom.getRootEl(ctx2);
|
|
466
466
|
if (!panels || !rootEl || !bounds)
|
|
467
467
|
return;
|
|
468
|
-
let pointValue = (0, import_dom_event.getRelativePointPercent)(evt.point, rootEl).normalize(ctx2);
|
|
468
|
+
let pointValue = (0, import_dom_event.getRelativePointPercent)(evt.point, rootEl).normalize(ctx2) * 100;
|
|
469
469
|
ctx2.activeResizeState = {
|
|
470
470
|
isAtMin: pointValue < bounds.min,
|
|
471
471
|
isAtMax: pointValue > bounds.max
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/splitter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Core logic for the splitter widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@zag-js/anatomy": "0.1.4",
|
|
31
|
-
"@zag-js/
|
|
32
|
-
"@zag-js/
|
|
31
|
+
"@zag-js/core": "0.5.0",
|
|
32
|
+
"@zag-js/types": "0.5.0",
|
|
33
33
|
"@zag-js/dom-query": "0.1.4",
|
|
34
|
-
"@zag-js/dom-event": "0.0
|
|
35
|
-
"@zag-js/utils": "0.3
|
|
36
|
-
"@zag-js/
|
|
34
|
+
"@zag-js/dom-event": "0.6.0",
|
|
35
|
+
"@zag-js/number-utils": "0.2.3",
|
|
36
|
+
"@zag-js/utils": "0.3.4"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"clean-package": "2.2.0"
|