@zag-js/number-input 0.0.0-dev-20230202104000 → 0.0.0-dev-20230202113057

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.
@@ -147,7 +147,7 @@ function machine(userContext) {
147
147
  return createMachine(
148
148
  {
149
149
  id: "number-input",
150
- initial: "unknown",
150
+ initial: "idle",
151
151
  context: {
152
152
  dir: "ltr",
153
153
  focusInputOnChange: true,
@@ -187,6 +187,7 @@ function machine(userContext) {
187
187
  isOutOfRange: ["invokeOnInvalid"],
188
188
  scrubberCursorPoint: ["setVirtualCursorPosition"]
189
189
  },
190
+ entry: ["syncInputValue"],
190
191
  on: {
191
192
  SET_VALUE: [
192
193
  {
@@ -208,14 +209,6 @@ function machine(userContext) {
208
209
  }
209
210
  },
210
211
  states: {
211
- unknown: {
212
- on: {
213
- SETUP: {
214
- target: "idle",
215
- actions: "syncInputValue"
216
- }
217
- }
218
- },
219
212
  idle: {
220
213
  exit: "invokeOnFocus",
221
214
  on: {
package/dist/index.js CHANGED
@@ -650,7 +650,7 @@ function machine(userContext) {
650
650
  return (0, import_core.createMachine)(
651
651
  {
652
652
  id: "number-input",
653
- initial: "unknown",
653
+ initial: "idle",
654
654
  context: {
655
655
  dir: "ltr",
656
656
  focusInputOnChange: true,
@@ -690,6 +690,7 @@ function machine(userContext) {
690
690
  isOutOfRange: ["invokeOnInvalid"],
691
691
  scrubberCursorPoint: ["setVirtualCursorPosition"]
692
692
  },
693
+ entry: ["syncInputValue"],
693
694
  on: {
694
695
  SET_VALUE: [
695
696
  {
@@ -711,14 +712,6 @@ function machine(userContext) {
711
712
  }
712
713
  },
713
714
  states: {
714
- unknown: {
715
- on: {
716
- SETUP: {
717
- target: "idle",
718
- actions: "syncInputValue"
719
- }
720
- }
721
- },
722
715
  idle: {
723
716
  exit: "invokeOnFocus",
724
717
  on: {
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-XHRILSH3.mjs";
7
7
  import {
8
8
  machine
9
- } from "./chunk-SD245JYC.mjs";
9
+ } from "./chunk-4A67X5BX.mjs";
10
10
  import "./chunk-GQN3V2LU.mjs";
11
11
  import "./chunk-6CS5P7OC.mjs";
12
12
  import "./chunk-EPCXXTFL.mjs";
@@ -404,7 +404,7 @@ function machine(userContext) {
404
404
  return (0, import_core.createMachine)(
405
405
  {
406
406
  id: "number-input",
407
- initial: "unknown",
407
+ initial: "idle",
408
408
  context: {
409
409
  dir: "ltr",
410
410
  focusInputOnChange: true,
@@ -444,6 +444,7 @@ function machine(userContext) {
444
444
  isOutOfRange: ["invokeOnInvalid"],
445
445
  scrubberCursorPoint: ["setVirtualCursorPosition"]
446
446
  },
447
+ entry: ["syncInputValue"],
447
448
  on: {
448
449
  SET_VALUE: [
449
450
  {
@@ -465,14 +466,6 @@ function machine(userContext) {
465
466
  }
466
467
  },
467
468
  states: {
468
- unknown: {
469
- on: {
470
- SETUP: {
471
- target: "idle",
472
- actions: "syncInputValue"
473
- }
474
- }
475
- },
476
469
  idle: {
477
470
  exit: "invokeOnFocus",
478
471
  on: {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  machine
3
- } from "./chunk-SD245JYC.mjs";
3
+ } from "./chunk-4A67X5BX.mjs";
4
4
  import "./chunk-GQN3V2LU.mjs";
5
5
  import "./chunk-6CS5P7OC.mjs";
6
6
  import "./chunk-EPCXXTFL.mjs";
@@ -208,7 +208,7 @@ type ComputedContext = Readonly<{
208
208
  type PrivateContext = Context<{}>;
209
209
  type MachineContext = PublicContext & PrivateContext & ComputedContext;
210
210
  type MachineState = {
211
- value: "unknown" | "idle" | "focused" | "spinning" | "before:spin" | "scrubbing";
211
+ value: "idle" | "focused" | "spinning" | "before:spin" | "scrubbing";
212
212
  tags: "focus";
213
213
  };
214
214
  type State = StateMachine.State<MachineContext, MachineState>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/number-input",
3
- "version": "0.0.0-dev-20230202104000",
3
+ "version": "0.0.0-dev-20230202113057",
4
4
  "description": "Core logic for the number-input widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -26,16 +26,16 @@
26
26
  "url": "https://github.com/chakra-ui/zag/issues"
27
27
  },
28
28
  "dependencies": {
29
- "@zag-js/anatomy": "0.0.0-dev-20230202104000",
30
- "@zag-js/core": "0.0.0-dev-20230202104000",
31
- "@zag-js/types": "0.0.0-dev-20230202104000"
29
+ "@zag-js/anatomy": "0.0.0-dev-20230202113057",
30
+ "@zag-js/core": "0.0.0-dev-20230202113057",
31
+ "@zag-js/types": "0.0.0-dev-20230202113057"
32
32
  },
33
33
  "devDependencies": {
34
34
  "clean-package": "2.2.0",
35
- "@zag-js/dom-utils": "0.0.0-dev-20230202104000",
36
- "@zag-js/form-utils": "0.0.0-dev-20230202104000",
37
- "@zag-js/number-utils": "0.0.0-dev-20230202104000",
38
- "@zag-js/utils": "0.0.0-dev-20230202104000"
35
+ "@zag-js/dom-utils": "0.0.0-dev-20230202113057",
36
+ "@zag-js/form-utils": "0.0.0-dev-20230202113057",
37
+ "@zag-js/number-utils": "0.0.0-dev-20230202113057",
38
+ "@zag-js/utils": "0.0.0-dev-20230202113057"
39
39
  },
40
40
  "clean-package": "../../../clean-package.config.json",
41
41
  "main": "dist/index.js",