@zag-js/slider 0.2.8 → 0.2.9

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.
@@ -78,7 +78,7 @@ function connect(state, send, normalize) {
78
78
  const isDisabled = state.context.disabled;
79
79
  const isInteractive = state.context.isInteractive;
80
80
  const isInvalid = state.context.invalid;
81
- return {
81
+ const api = {
82
82
  isFocused,
83
83
  isDragging,
84
84
  value: state.context.value,
@@ -266,7 +266,7 @@ function connect(state, send, normalize) {
266
266
  style: dom.getMarkerGroupStyle()
267
267
  }),
268
268
  getMarkerProps({ value }) {
269
- const percent = this.getValuePercent(value);
269
+ const percent = api.getValuePercent(value);
270
270
  const style = dom.getMarkerStyle(state.context, percent);
271
271
  const markerState = value > state.context.value ? "over-value" : value < state.context.value ? "under-value" : "at-value";
272
272
  return normalize.element({
@@ -281,6 +281,7 @@ function connect(state, send, normalize) {
281
281
  });
282
282
  }
283
283
  };
284
+ return api;
284
285
  }
285
286
 
286
287
  export {
package/dist/index.js CHANGED
@@ -650,7 +650,7 @@ function connect(state2, send, normalize) {
650
650
  const isDisabled = state2.context.disabled;
651
651
  const isInteractive = state2.context.isInteractive;
652
652
  const isInvalid = state2.context.invalid;
653
- return {
653
+ const api = {
654
654
  isFocused,
655
655
  isDragging,
656
656
  value: state2.context.value,
@@ -838,7 +838,7 @@ function connect(state2, send, normalize) {
838
838
  style: dom.getMarkerGroupStyle()
839
839
  }),
840
840
  getMarkerProps({ value }) {
841
- const percent = this.getValuePercent(value);
841
+ const percent = api.getValuePercent(value);
842
842
  const style = dom.getMarkerStyle(state2.context, percent);
843
843
  const markerState = value > state2.context.value ? "over-value" : value < state2.context.value ? "under-value" : "at-value";
844
844
  return normalize.element({
@@ -853,6 +853,7 @@ function connect(state2, send, normalize) {
853
853
  });
854
854
  }
855
855
  };
856
+ return api;
856
857
  }
857
858
 
858
859
  // src/slider.machine.ts
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  connect
3
- } from "./chunk-6D4ETNPG.mjs";
3
+ } from "./chunk-WMQQQRK5.mjs";
4
4
  import {
5
5
  anatomy
6
6
  } from "./chunk-3Y7IIPR5.mjs";
@@ -391,7 +391,7 @@ function connect(state, send, normalize) {
391
391
  const isDisabled = state.context.disabled;
392
392
  const isInteractive = state.context.isInteractive;
393
393
  const isInvalid = state.context.invalid;
394
- return {
394
+ const api = {
395
395
  isFocused,
396
396
  isDragging,
397
397
  value: state.context.value,
@@ -579,7 +579,7 @@ function connect(state, send, normalize) {
579
579
  style: dom.getMarkerGroupStyle()
580
580
  }),
581
581
  getMarkerProps({ value }) {
582
- const percent = this.getValuePercent(value);
582
+ const percent = api.getValuePercent(value);
583
583
  const style = dom.getMarkerStyle(state.context, percent);
584
584
  const markerState = value > state.context.value ? "over-value" : value < state.context.value ? "under-value" : "at-value";
585
585
  return normalize.element({
@@ -594,6 +594,7 @@ function connect(state, send, normalize) {
594
594
  });
595
595
  }
596
596
  };
597
+ return api;
597
598
  }
598
599
  // Annotate the CommonJS export names for ESM import in node:
599
600
  0 && (module.exports = {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  connect
3
- } from "./chunk-6D4ETNPG.mjs";
3
+ } from "./chunk-WMQQQRK5.mjs";
4
4
  import "./chunk-3Y7IIPR5.mjs";
5
5
  import "./chunk-SGCWELVB.mjs";
6
6
  import "./chunk-J5IGGBVE.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/slider",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "Core logic for the slider widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",