@zag-js/pin-input 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.
@@ -141,6 +141,8 @@ function machine(userContext) {
141
141
  },
142
142
  actions: {
143
143
  setupValue: (ctx2) => {
144
+ if (ctx2.value.length)
145
+ return;
144
146
  const inputs = dom.getElements(ctx2);
145
147
  const emptyValues = Array.from({ length: inputs.length }).fill("");
146
148
  assign(ctx2, emptyValues);
package/dist/index.js CHANGED
@@ -354,6 +354,8 @@ function machine(userContext) {
354
354
  },
355
355
  actions: {
356
356
  setupValue: (ctx2) => {
357
+ if (ctx2.value.length)
358
+ return;
357
359
  const inputs = dom.getElements(ctx2);
358
360
  const emptyValues = Array.from({ length: inputs.length }).fill("");
359
361
  assign(ctx2, emptyValues);
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-BJXKBZJG.mjs";
7
7
  import {
8
8
  machine
9
- } from "./chunk-AVHHECH6.mjs";
9
+ } from "./chunk-RXPBAYJD.mjs";
10
10
  import "./chunk-CPXMEVTH.mjs";
11
11
  export {
12
12
  anatomy,
@@ -183,6 +183,8 @@ function machine(userContext) {
183
183
  },
184
184
  actions: {
185
185
  setupValue: (ctx2) => {
186
+ if (ctx2.value.length)
187
+ return;
186
188
  const inputs = dom.getElements(ctx2);
187
189
  const emptyValues = Array.from({ length: inputs.length }).fill("");
188
190
  assign(ctx2, emptyValues);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  machine
3
- } from "./chunk-AVHHECH6.mjs";
3
+ } from "./chunk-RXPBAYJD.mjs";
4
4
  import "./chunk-CPXMEVTH.mjs";
5
5
  export {
6
6
  machine
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/pin-input",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "Core logic for the pin-input widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -26,14 +26,14 @@
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/dom-query": "0.9.1",
31
- "@zag-js/dom-event": "0.9.1",
32
- "@zag-js/form-utils": "0.9.1",
33
- "@zag-js/visually-hidden": "0.9.1",
34
- "@zag-js/utils": "0.9.1",
35
- "@zag-js/core": "0.9.1",
36
- "@zag-js/types": "0.9.1"
29
+ "@zag-js/anatomy": "0.9.2",
30
+ "@zag-js/dom-query": "0.9.2",
31
+ "@zag-js/dom-event": "0.9.2",
32
+ "@zag-js/form-utils": "0.9.2",
33
+ "@zag-js/visually-hidden": "0.9.2",
34
+ "@zag-js/utils": "0.9.2",
35
+ "@zag-js/core": "0.9.2",
36
+ "@zag-js/types": "0.9.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "clean-package": "2.2.0"