@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
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-HPRMFGOY.mjs";
7
7
  import {
8
8
  machine
9
- } from "./chunk-63NJ553U.mjs";
9
+ } from "./chunk-AWUYJLPO.mjs";
10
10
  import "./chunk-BSW3DTW4.mjs";
11
11
  import "./chunk-MV44GBQY.mjs";
12
12
  export {
@@ -4,22 +4,22 @@ import '@zag-js/core';
4
4
 
5
5
  declare const dom: {
6
6
  getRootNode: (ctx: {
7
- getRootNode?: (() => ShadowRoot | Node | Document) | undefined;
8
- }) => ShadowRoot | Document;
7
+ getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
8
+ }) => Document | ShadowRoot;
9
9
  getDoc: (ctx: {
10
- getRootNode?: (() => ShadowRoot | Node | Document) | undefined;
10
+ getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
11
11
  }) => Document;
12
12
  getWin: (ctx: {
13
- getRootNode?: (() => ShadowRoot | Node | Document) | undefined;
13
+ getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
14
14
  }) => Window & typeof globalThis;
15
15
  getActiveElement: (ctx: {
16
- getRootNode?: (() => ShadowRoot | Node | Document) | undefined;
16
+ getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
17
17
  }) => HTMLElement | null;
18
18
  getById: <T extends HTMLElement = HTMLElement>(ctx: {
19
- getRootNode?: (() => ShadowRoot | Node | Document) | undefined;
19
+ getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
20
20
  }, id: string) => T | null;
21
21
  queryById: <T_1 extends HTMLElement = HTMLElement>(ctx: {
22
- getRootNode?: (() => ShadowRoot | Node | Document) | undefined;
22
+ getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
23
23
  }, id: string) => T_1;
24
24
  } & {
25
25
  getRootId: (ctx: MachineContext) => string;
@@ -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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  machine
3
- } from "./chunk-63NJ553U.mjs";
3
+ } from "./chunk-AWUYJLPO.mjs";
4
4
  import "./chunk-BSW3DTW4.mjs";
5
5
  import "./chunk-MV44GBQY.mjs";
6
6
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/splitter",
3
- "version": "0.2.16",
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/types": "0.3.4",
32
- "@zag-js/core": "0.2.12",
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.1",
35
- "@zag-js/utils": "0.3.4",
36
- "@zag-js/number-utils": "0.2.3"
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"