@zag-js/slider 0.9.1 → 0.9.2

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.
@@ -6,7 +6,14 @@ import {
6
6
  } from "./chunk-JG4OWFJP.mjs";
7
7
 
8
8
  // src/slider.connect.ts
9
- import { getEventKey, getEventStep, getNativeEvent, isLeftClick, isModifiedEvent } from "@zag-js/dom-event";
9
+ import {
10
+ getEventKey,
11
+ getEventPoint,
12
+ getEventStep,
13
+ getNativeEvent,
14
+ isLeftClick,
15
+ isModifiedEvent
16
+ } from "@zag-js/dom-event";
10
17
  import { ariaAttr, dataAttr } from "@zag-js/dom-query";
11
18
  import { getPercentValue, getValuePercent } from "@zag-js/numeric-range";
12
19
  function connect(state, send, normalize) {
@@ -221,7 +228,7 @@ function connect(state, send, normalize) {
221
228
  const evt = getNativeEvent(event);
222
229
  if (!isLeftClick(evt) || isModifiedEvent(evt))
223
230
  return;
224
- const point = { x: evt.clientX, y: evt.clientY };
231
+ const point = getEventPoint(evt);
225
232
  send({ type: "POINTER_DOWN", point });
226
233
  event.preventDefault();
227
234
  event.stopPropagation();
package/dist/index.js CHANGED
@@ -418,7 +418,7 @@ function connect(state, send, normalize) {
418
418
  const evt = (0, import_dom_event2.getNativeEvent)(event);
419
419
  if (!(0, import_dom_event2.isLeftClick)(evt) || (0, import_dom_event2.isModifiedEvent)(evt))
420
420
  return;
421
- const point = { x: evt.clientX, y: evt.clientY };
421
+ const point = (0, import_dom_event2.getEventPoint)(evt);
422
422
  send({ type: "POINTER_DOWN", point });
423
423
  event.preventDefault();
424
424
  event.stopPropagation();
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  connect
3
- } from "./chunk-T4EPOG77.mjs";
3
+ } from "./chunk-TMLAO23S.mjs";
4
4
  import {
5
5
  anatomy
6
6
  } from "./chunk-3Y7IIPR5.mjs";
@@ -413,7 +413,7 @@ function connect(state, send, normalize) {
413
413
  const evt = (0, import_dom_event2.getNativeEvent)(event);
414
414
  if (!(0, import_dom_event2.isLeftClick)(evt) || (0, import_dom_event2.isModifiedEvent)(evt))
415
415
  return;
416
- const point = { x: evt.clientX, y: evt.clientY };
416
+ const point = (0, import_dom_event2.getEventPoint)(evt);
417
417
  send({ type: "POINTER_DOWN", point });
418
418
  event.preventDefault();
419
419
  event.stopPropagation();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  connect
3
- } from "./chunk-T4EPOG77.mjs";
3
+ } from "./chunk-TMLAO23S.mjs";
4
4
  import "./chunk-3Y7IIPR5.mjs";
5
5
  import "./chunk-JG4OWFJP.mjs";
6
6
  import "./chunk-IJAAAKZQ.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/slider",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "Core logic for the slider widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -26,15 +26,15 @@
26
26
  "url": "https://github.com/chakra-ui/zag/issues"
27
27
  },
28
28
  "dependencies": {
29
- "@zag-js/anatomy": "0.9.1",
30
- "@zag-js/core": "0.9.1",
31
- "@zag-js/dom-query": "0.9.1",
32
- "@zag-js/dom-event": "0.9.1",
33
- "@zag-js/form-utils": "0.9.1",
34
- "@zag-js/utils": "0.9.1",
35
- "@zag-js/element-size": "0.9.1",
36
- "@zag-js/numeric-range": "0.9.1",
37
- "@zag-js/types": "0.9.1"
29
+ "@zag-js/anatomy": "0.9.2",
30
+ "@zag-js/core": "0.9.2",
31
+ "@zag-js/dom-query": "0.9.2",
32
+ "@zag-js/dom-event": "0.9.2",
33
+ "@zag-js/form-utils": "0.9.2",
34
+ "@zag-js/utils": "0.9.2",
35
+ "@zag-js/element-size": "0.9.2",
36
+ "@zag-js/numeric-range": "0.9.2",
37
+ "@zag-js/types": "0.9.2"
38
38
  },
39
39
  "devDependencies": {
40
40
  "clean-package": "2.2.0"