@zag-js/slider 2.0.0-next.1 → 2.0.0-next.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.
@@ -1,5 +1,5 @@
1
1
  import { Machine, EventObject, Service } from '@zag-js/core';
2
- import { PropTypes, RequiredBy, DirectionProperty, CommonProperties } from '@zag-js/types';
2
+ import { PropTypes, DirectionProperty, CommonProperties } from '@zag-js/types';
3
3
 
4
4
  type ThumbCollisionBehavior = "none" | "push" | "swap";
5
5
  type ThumbAlignment = "contain" | "center";
@@ -15,17 +15,17 @@ interface ValueTextDetails {
15
15
  value: number;
16
16
  index: number;
17
17
  }
18
- type ElementIds = Partial<{
19
- root: string;
20
- thumb: (index: number) => string;
21
- hiddenInput: (index: number) => string;
22
- control: string;
23
- track: string;
24
- range: string;
25
- label: string;
26
- valueText: string;
27
- marker: (index: number) => string;
28
- }>;
18
+ interface ElementIds {
19
+ root?: string | undefined;
20
+ thumb?: ((index: number) => string) | undefined;
21
+ hiddenInput?: ((index: number) => string) | undefined;
22
+ control?: string | undefined;
23
+ track?: string | undefined;
24
+ range?: string | undefined;
25
+ label?: string | undefined;
26
+ valueText?: string | undefined;
27
+ marker?: ((index: number) => string) | undefined;
28
+ }
29
29
  interface SliderProps extends DirectionProperty, CommonProperties {
30
30
  /**
31
31
  * The ids of the elements in the slider. Useful for composition.
@@ -210,7 +210,8 @@ interface Context {
210
210
  }
211
211
  interface SliderSchema {
212
212
  state: "idle" | "dragging" | "focus";
213
- props: RequiredBy<SliderProps, PropsWithDefault>;
213
+ props: SliderProps;
214
+ defaultPropKey: PropsWithDefault;
214
215
  context: Context;
215
216
  refs: {
216
217
  /**
@@ -1,5 +1,5 @@
1
1
  import { Machine, EventObject, Service } from '@zag-js/core';
2
- import { PropTypes, RequiredBy, DirectionProperty, CommonProperties } from '@zag-js/types';
2
+ import { PropTypes, DirectionProperty, CommonProperties } from '@zag-js/types';
3
3
 
4
4
  type ThumbCollisionBehavior = "none" | "push" | "swap";
5
5
  type ThumbAlignment = "contain" | "center";
@@ -15,17 +15,17 @@ interface ValueTextDetails {
15
15
  value: number;
16
16
  index: number;
17
17
  }
18
- type ElementIds = Partial<{
19
- root: string;
20
- thumb: (index: number) => string;
21
- hiddenInput: (index: number) => string;
22
- control: string;
23
- track: string;
24
- range: string;
25
- label: string;
26
- valueText: string;
27
- marker: (index: number) => string;
28
- }>;
18
+ interface ElementIds {
19
+ root?: string | undefined;
20
+ thumb?: ((index: number) => string) | undefined;
21
+ hiddenInput?: ((index: number) => string) | undefined;
22
+ control?: string | undefined;
23
+ track?: string | undefined;
24
+ range?: string | undefined;
25
+ label?: string | undefined;
26
+ valueText?: string | undefined;
27
+ marker?: ((index: number) => string) | undefined;
28
+ }
29
29
  interface SliderProps extends DirectionProperty, CommonProperties {
30
30
  /**
31
31
  * The ids of the elements in the slider. Useful for composition.
@@ -210,7 +210,8 @@ interface Context {
210
210
  }
211
211
  interface SliderSchema {
212
212
  state: "idle" | "dragging" | "focus";
213
- props: RequiredBy<SliderProps, PropsWithDefault>;
213
+ props: SliderProps;
214
+ defaultPropKey: PropsWithDefault;
214
215
  context: Context;
215
216
  refs: {
216
217
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/slider",
3
- "version": "2.0.0-next.1",
3
+ "version": "2.0.0-next.2",
4
4
  "description": "Core logic for the slider widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -30,11 +30,11 @@
30
30
  "url": "https://github.com/chakra-ui/zag/issues"
31
31
  },
32
32
  "dependencies": {
33
- "@zag-js/anatomy": "2.0.0-next.1",
34
- "@zag-js/core": "2.0.0-next.1",
35
- "@zag-js/dom-query": "2.0.0-next.1",
36
- "@zag-js/types": "2.0.0-next.1",
37
- "@zag-js/utils": "2.0.0-next.1"
33
+ "@zag-js/anatomy": "2.0.0-next.2",
34
+ "@zag-js/core": "2.0.0-next.2",
35
+ "@zag-js/dom-query": "2.0.0-next.2",
36
+ "@zag-js/utils": "2.0.0-next.2",
37
+ "@zag-js/types": "2.0.0-next.2"
38
38
  },
39
39
  "devDependencies": {
40
40
  "clean-package": "2.2.0"
@@ -68,7 +68,7 @@
68
68
  },
69
69
  "scripts": {
70
70
  "build": "tsup",
71
- "lint": "eslint src",
71
+ "lint": "oxlint src",
72
72
  "typecheck": "tsc --noEmit"
73
73
  }
74
74
  }