@zag-js/number-input 1.0.0 → 1.0.1
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.
- package/dist/index.d.mts +4 -3
- package/dist/index.d.ts +4 -3
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _zag_js_anatomy from '@zag-js/anatomy';
|
|
|
2
2
|
import { LocaleProperties, CommonProperties, PropTypes, RequiredBy, NormalizeProps } from '@zag-js/types';
|
|
3
3
|
import { NumberFormatter, NumberParser } from '@internationalized/number';
|
|
4
4
|
import * as _zag_js_core from '@zag-js/core';
|
|
5
|
-
import { Service, EventObject } from '@zag-js/core';
|
|
5
|
+
import { Service, Machine, EventObject } from '@zag-js/core';
|
|
6
6
|
|
|
7
7
|
declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "label" | "input" | "control" | "valueText" | "incrementTrigger" | "decrementTrigger" | "scrubber">;
|
|
8
8
|
|
|
@@ -240,6 +240,7 @@ interface NumberInputSchema {
|
|
|
240
240
|
effect: string;
|
|
241
241
|
}
|
|
242
242
|
type NumberInputService = Service<NumberInputSchema>;
|
|
243
|
+
type NumberInputMachine = Machine<NumberInputSchema>;
|
|
243
244
|
interface NumberInputApi<T extends PropTypes = PropTypes> {
|
|
244
245
|
/**
|
|
245
246
|
* Whether the input is focused.
|
|
@@ -301,9 +302,9 @@ interface NumberInputApi<T extends PropTypes = PropTypes> {
|
|
|
301
302
|
|
|
302
303
|
declare function connect<T extends PropTypes>(service: NumberInputService, normalize: NormalizeProps<T>): NumberInputApi<T>;
|
|
303
304
|
|
|
304
|
-
declare const machine: _zag_js_core.
|
|
305
|
+
declare const machine: _zag_js_core.Machine<NumberInputSchema>;
|
|
305
306
|
|
|
306
307
|
declare const props: (keyof NumberInputProps)[];
|
|
307
308
|
declare const splitProps: <Props extends Partial<NumberInputProps>>(props: Props) => [Partial<NumberInputProps>, Omit<Props, keyof NumberInputProps>];
|
|
308
309
|
|
|
309
|
-
export { type NumberInputApi as Api, type ElementIds, type FocusChangeDetails, type IntlTranslations, type NumberInputProps as Props, type NumberInputService as Service, type ValueChangeDetails, type ValueInvalidDetails, anatomy, connect, machine, props, splitProps };
|
|
310
|
+
export { type NumberInputApi as Api, type ElementIds, type FocusChangeDetails, type IntlTranslations, type NumberInputMachine as Machine, type NumberInputProps as Props, type NumberInputService as Service, type ValueChangeDetails, type ValueInvalidDetails, anatomy, connect, machine, props, splitProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _zag_js_anatomy from '@zag-js/anatomy';
|
|
|
2
2
|
import { LocaleProperties, CommonProperties, PropTypes, RequiredBy, NormalizeProps } from '@zag-js/types';
|
|
3
3
|
import { NumberFormatter, NumberParser } from '@internationalized/number';
|
|
4
4
|
import * as _zag_js_core from '@zag-js/core';
|
|
5
|
-
import { Service, EventObject } from '@zag-js/core';
|
|
5
|
+
import { Service, Machine, EventObject } from '@zag-js/core';
|
|
6
6
|
|
|
7
7
|
declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "label" | "input" | "control" | "valueText" | "incrementTrigger" | "decrementTrigger" | "scrubber">;
|
|
8
8
|
|
|
@@ -240,6 +240,7 @@ interface NumberInputSchema {
|
|
|
240
240
|
effect: string;
|
|
241
241
|
}
|
|
242
242
|
type NumberInputService = Service<NumberInputSchema>;
|
|
243
|
+
type NumberInputMachine = Machine<NumberInputSchema>;
|
|
243
244
|
interface NumberInputApi<T extends PropTypes = PropTypes> {
|
|
244
245
|
/**
|
|
245
246
|
* Whether the input is focused.
|
|
@@ -301,9 +302,9 @@ interface NumberInputApi<T extends PropTypes = PropTypes> {
|
|
|
301
302
|
|
|
302
303
|
declare function connect<T extends PropTypes>(service: NumberInputService, normalize: NormalizeProps<T>): NumberInputApi<T>;
|
|
303
304
|
|
|
304
|
-
declare const machine: _zag_js_core.
|
|
305
|
+
declare const machine: _zag_js_core.Machine<NumberInputSchema>;
|
|
305
306
|
|
|
306
307
|
declare const props: (keyof NumberInputProps)[];
|
|
307
308
|
declare const splitProps: <Props extends Partial<NumberInputProps>>(props: Props) => [Partial<NumberInputProps>, Omit<Props, keyof NumberInputProps>];
|
|
308
309
|
|
|
309
|
-
export { type NumberInputApi as Api, type ElementIds, type FocusChangeDetails, type IntlTranslations, type NumberInputProps as Props, type NumberInputService as Service, type ValueChangeDetails, type ValueInvalidDetails, anatomy, connect, machine, props, splitProps };
|
|
310
|
+
export { type NumberInputApi as Api, type ElementIds, type FocusChangeDetails, type IntlTranslations, type NumberInputMachine as Machine, type NumberInputProps as Props, type NumberInputService as Service, type ValueChangeDetails, type ValueInvalidDetails, anatomy, connect, machine, props, splitProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/number-input",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Core logic for the number-input widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@internationalized/number": "3.6.0",
|
|
30
|
-
"@zag-js/anatomy": "1.0.
|
|
31
|
-
"@zag-js/core": "1.0.
|
|
32
|
-
"@zag-js/dom-query": "1.0.
|
|
33
|
-
"@zag-js/types": "1.0.
|
|
34
|
-
"@zag-js/utils": "1.0.
|
|
30
|
+
"@zag-js/anatomy": "1.0.1",
|
|
31
|
+
"@zag-js/core": "1.0.1",
|
|
32
|
+
"@zag-js/dom-query": "1.0.1",
|
|
33
|
+
"@zag-js/types": "1.0.1",
|
|
34
|
+
"@zag-js/utils": "1.0.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"clean-package": "2.2.0"
|