@zag-js/pin-input 0.2.4 → 0.2.5

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.ts CHANGED
@@ -5,25 +5,25 @@ import { StateMachine } from '@zag-js/core';
5
5
  declare const anatomy: Omit<{
6
6
  parts: <U extends string>(...parts: U[]) => Omit<{
7
7
  parts: any;
8
- extend: <V extends string>(...parts: V[]) => Omit<{
8
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
9
9
  parts: any;
10
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
10
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
11
11
  parts: any;
12
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
12
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
13
13
  parts: any;
14
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
14
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
15
15
  parts: any;
16
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
16
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
17
17
  parts: any;
18
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
18
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
19
19
  parts: any;
20
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
20
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
21
21
  parts: any;
22
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
22
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
23
23
  parts: any;
24
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
24
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
25
25
  parts: any;
26
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
26
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
27
27
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
28
28
  selector: string;
29
29
  attrs: Record<"data-scope" | "data-part", string>;
@@ -74,28 +74,28 @@ declare const anatomy: Omit<{
74
74
  attrs: Record<"data-scope" | "data-part", string>;
75
75
  }>;
76
76
  }, "parts">;
77
- extend: <V_10 extends string>(...parts: V_10[]) => Omit<{
77
+ extendWith: <V_10 extends string>(...parts: V_10[]) => Omit<{
78
78
  parts: <U extends string>(...parts: U[]) => Omit<{
79
79
  parts: any;
80
- extend: <V extends string>(...parts: V[]) => Omit<{
80
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
81
81
  parts: any;
82
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
82
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
83
83
  parts: any;
84
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
84
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
85
85
  parts: any;
86
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
86
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
87
87
  parts: any;
88
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
88
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
89
89
  parts: any;
90
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
90
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
91
91
  parts: any;
92
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
92
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
93
93
  parts: any;
94
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
94
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
95
95
  parts: any;
96
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
96
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
97
97
  parts: any;
98
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
98
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
99
99
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
100
100
  selector: string;
101
101
  attrs: Record<"data-scope" | "data-part", string>;
@@ -146,28 +146,28 @@ declare const anatomy: Omit<{
146
146
  attrs: Record<"data-scope" | "data-part", string>;
147
147
  }>;
148
148
  }, "parts">;
149
- extend: <V_11 extends string>(...parts: V_11[]) => Omit<{
149
+ extendWith: <V_11 extends string>(...parts: V_11[]) => Omit<{
150
150
  parts: <U extends string>(...parts: U[]) => Omit<{
151
151
  parts: any;
152
- extend: <V extends string>(...parts: V[]) => Omit<{
152
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
153
153
  parts: any;
154
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
154
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
155
155
  parts: any;
156
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
156
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
157
157
  parts: any;
158
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
158
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
159
159
  parts: any;
160
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
160
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
161
161
  parts: any;
162
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
162
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
163
163
  parts: any;
164
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
164
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
165
165
  parts: any;
166
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
166
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
167
167
  parts: any;
168
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
168
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
169
169
  parts: any;
170
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
170
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
171
171
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
172
172
  selector: string;
173
173
  attrs: Record<"data-scope" | "data-part", string>;
@@ -218,28 +218,28 @@ declare const anatomy: Omit<{
218
218
  attrs: Record<"data-scope" | "data-part", string>;
219
219
  }>;
220
220
  }, "parts">;
221
- extend: <V_12 extends string>(...parts: V_12[]) => Omit<{
221
+ extendWith: <V_12 extends string>(...parts: V_12[]) => Omit<{
222
222
  parts: <U extends string>(...parts: U[]) => Omit<{
223
223
  parts: any;
224
- extend: <V extends string>(...parts: V[]) => Omit<{
224
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
225
225
  parts: any;
226
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
226
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
227
227
  parts: any;
228
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
228
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
229
229
  parts: any;
230
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
230
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
231
231
  parts: any;
232
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
232
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
233
233
  parts: any;
234
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
234
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
235
235
  parts: any;
236
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
236
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
237
237
  parts: any;
238
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
238
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
239
239
  parts: any;
240
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
240
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
241
241
  parts: any;
242
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
242
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
243
243
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
244
244
  selector: string;
245
245
  attrs: Record<"data-scope" | "data-part", string>;
@@ -290,28 +290,28 @@ declare const anatomy: Omit<{
290
290
  attrs: Record<"data-scope" | "data-part", string>;
291
291
  }>;
292
292
  }, "parts">;
293
- extend: <V_13 extends string>(...parts: V_13[]) => Omit<{
293
+ extendWith: <V_13 extends string>(...parts: V_13[]) => Omit<{
294
294
  parts: <U extends string>(...parts: U[]) => Omit<{
295
295
  parts: any;
296
- extend: <V extends string>(...parts: V[]) => Omit<{
296
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
297
297
  parts: any;
298
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
298
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
299
299
  parts: any;
300
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
300
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
301
301
  parts: any;
302
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
302
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
303
303
  parts: any;
304
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
304
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
305
305
  parts: any;
306
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
306
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
307
307
  parts: any;
308
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
308
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
309
309
  parts: any;
310
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
310
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
311
311
  parts: any;
312
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
312
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
313
313
  parts: any;
314
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
314
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
315
315
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
316
316
  selector: string;
317
317
  attrs: Record<"data-scope" | "data-part", string>;
@@ -362,28 +362,28 @@ declare const anatomy: Omit<{
362
362
  attrs: Record<"data-scope" | "data-part", string>;
363
363
  }>;
364
364
  }, "parts">;
365
- extend: <V_14 extends string>(...parts: V_14[]) => Omit<{
365
+ extendWith: <V_14 extends string>(...parts: V_14[]) => Omit<{
366
366
  parts: <U extends string>(...parts: U[]) => Omit<{
367
367
  parts: any;
368
- extend: <V extends string>(...parts: V[]) => Omit<{
368
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
369
369
  parts: any;
370
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
370
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
371
371
  parts: any;
372
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
372
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
373
373
  parts: any;
374
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
374
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
375
375
  parts: any;
376
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
376
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
377
377
  parts: any;
378
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
378
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
379
379
  parts: any;
380
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
380
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
381
381
  parts: any;
382
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
382
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
383
383
  parts: any;
384
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
384
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
385
385
  parts: any;
386
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
386
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
387
387
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
388
388
  selector: string;
389
389
  attrs: Record<"data-scope" | "data-part", string>;
@@ -434,28 +434,28 @@ declare const anatomy: Omit<{
434
434
  attrs: Record<"data-scope" | "data-part", string>;
435
435
  }>;
436
436
  }, "parts">;
437
- extend: <V_15 extends string>(...parts: V_15[]) => Omit<{
437
+ extendWith: <V_15 extends string>(...parts: V_15[]) => Omit<{
438
438
  parts: <U extends string>(...parts: U[]) => Omit<{
439
439
  parts: any;
440
- extend: <V extends string>(...parts: V[]) => Omit<{
440
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
441
441
  parts: any;
442
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
442
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
443
443
  parts: any;
444
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
444
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
445
445
  parts: any;
446
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
446
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
447
447
  parts: any;
448
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
448
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
449
449
  parts: any;
450
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
450
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
451
451
  parts: any;
452
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
452
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
453
453
  parts: any;
454
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
454
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
455
455
  parts: any;
456
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
456
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
457
457
  parts: any;
458
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
458
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
459
459
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
460
460
  selector: string;
461
461
  attrs: Record<"data-scope" | "data-part", string>;
@@ -506,28 +506,28 @@ declare const anatomy: Omit<{
506
506
  attrs: Record<"data-scope" | "data-part", string>;
507
507
  }>;
508
508
  }, "parts">;
509
- extend: <V_16 extends string>(...parts: V_16[]) => Omit<{
509
+ extendWith: <V_16 extends string>(...parts: V_16[]) => Omit<{
510
510
  parts: <U extends string>(...parts: U[]) => Omit<{
511
511
  parts: any;
512
- extend: <V extends string>(...parts: V[]) => Omit<{
512
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
513
513
  parts: any;
514
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
514
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
515
515
  parts: any;
516
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
516
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
517
517
  parts: any;
518
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
518
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
519
519
  parts: any;
520
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
520
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
521
521
  parts: any;
522
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
522
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
523
523
  parts: any;
524
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
524
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
525
525
  parts: any;
526
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
526
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
527
527
  parts: any;
528
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
528
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
529
529
  parts: any;
530
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
530
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
531
531
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
532
532
  selector: string;
533
533
  attrs: Record<"data-scope" | "data-part", string>;
@@ -578,28 +578,28 @@ declare const anatomy: Omit<{
578
578
  attrs: Record<"data-scope" | "data-part", string>;
579
579
  }>;
580
580
  }, "parts">;
581
- extend: <V_17 extends string>(...parts: V_17[]) => Omit<{
581
+ extendWith: <V_17 extends string>(...parts: V_17[]) => Omit<{
582
582
  parts: <U extends string>(...parts: U[]) => Omit<{
583
583
  parts: any;
584
- extend: <V extends string>(...parts: V[]) => Omit<{
584
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
585
585
  parts: any;
586
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
586
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
587
587
  parts: any;
588
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
588
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
589
589
  parts: any;
590
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
590
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
591
591
  parts: any;
592
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
592
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
593
593
  parts: any;
594
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
594
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
595
595
  parts: any;
596
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
596
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
597
597
  parts: any;
598
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
598
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
599
599
  parts: any;
600
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
600
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
601
601
  parts: any;
602
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
602
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
603
603
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
604
604
  selector: string;
605
605
  attrs: Record<"data-scope" | "data-part", string>;
@@ -650,28 +650,28 @@ declare const anatomy: Omit<{
650
650
  attrs: Record<"data-scope" | "data-part", string>;
651
651
  }>;
652
652
  }, "parts">;
653
- extend: <V_18 extends string>(...parts: V_18[]) => Omit<{
653
+ extendWith: <V_18 extends string>(...parts: V_18[]) => Omit<{
654
654
  parts: <U extends string>(...parts: U[]) => Omit<{
655
655
  parts: any;
656
- extend: <V extends string>(...parts: V[]) => Omit<{
656
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
657
657
  parts: any;
658
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
658
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
659
659
  parts: any;
660
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
660
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
661
661
  parts: any;
662
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
662
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
663
663
  parts: any;
664
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
664
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
665
665
  parts: any;
666
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
666
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
667
667
  parts: any;
668
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
668
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
669
669
  parts: any;
670
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
670
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
671
671
  parts: any;
672
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
672
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
673
673
  parts: any;
674
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
674
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
675
675
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
676
676
  selector: string;
677
677
  attrs: Record<"data-scope" | "data-part", string>;
@@ -722,28 +722,28 @@ declare const anatomy: Omit<{
722
722
  attrs: Record<"data-scope" | "data-part", string>;
723
723
  }>;
724
724
  }, "parts">;
725
- extend: <V_19 extends string>(...parts: V_19[]) => Omit<{
725
+ extendWith: <V_19 extends string>(...parts: V_19[]) => Omit<{
726
726
  parts: <U extends string>(...parts: U[]) => Omit<{
727
727
  parts: any;
728
- extend: <V extends string>(...parts: V[]) => Omit<{
728
+ extendWith: <V extends string>(...parts: V[]) => Omit<{
729
729
  parts: any;
730
- extend: <V_1 extends string>(...parts: V_1[]) => Omit<{
730
+ extendWith: <V_1 extends string>(...parts: V_1[]) => Omit<{
731
731
  parts: any;
732
- extend: <V_2 extends string>(...parts: V_2[]) => Omit<{
732
+ extendWith: <V_2 extends string>(...parts: V_2[]) => Omit<{
733
733
  parts: any;
734
- extend: <V_3 extends string>(...parts: V_3[]) => Omit<{
734
+ extendWith: <V_3 extends string>(...parts: V_3[]) => Omit<{
735
735
  parts: any;
736
- extend: <V_4 extends string>(...parts: V_4[]) => Omit<{
736
+ extendWith: <V_4 extends string>(...parts: V_4[]) => Omit<{
737
737
  parts: any;
738
- extend: <V_5 extends string>(...parts: V_5[]) => Omit<{
738
+ extendWith: <V_5 extends string>(...parts: V_5[]) => Omit<{
739
739
  parts: any;
740
- extend: <V_6 extends string>(...parts: V_6[]) => Omit<{
740
+ extendWith: <V_6 extends string>(...parts: V_6[]) => Omit<{
741
741
  parts: any;
742
- extend: <V_7 extends string>(...parts: V_7[]) => Omit<{
742
+ extendWith: <V_7 extends string>(...parts: V_7[]) => Omit<{
743
743
  parts: any;
744
- extend: <V_8 extends string>(...parts: V_8[]) => Omit<{
744
+ extendWith: <V_8 extends string>(...parts: V_8[]) => Omit<{
745
745
  parts: any;
746
- extend: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
746
+ extendWith: <V_9 extends string>(...parts: V_9[]) => Omit<any, "parts">;
747
747
  build: () => Record<U | V | V_1 | V_2 | V_3 | V_4 | V_5 | V_6 | V_7 | V_8, {
748
748
  selector: string;
749
749
  attrs: Record<"data-scope" | "data-part", string>;
@@ -794,73 +794,74 @@ declare const anatomy: Omit<{
794
794
  attrs: Record<"data-scope" | "data-part", string>;
795
795
  }>;
796
796
  }, "parts">;
797
- extend: <V_20 extends string>(...parts: V_20[]) => Omit<any, "parts">;
798
- build: () => Record<"root" | "label" | "hiddenInput" | "input" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17 | V_18 | V_19, {
797
+ extendWith: <V_20 extends string>(...parts: V_20[]) => Omit<any, "parts">;
798
+ build: () => Record<"root" | "label" | "hiddenInput" | "input" | "control" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17 | V_18 | V_19, {
799
799
  selector: string;
800
800
  attrs: Record<"data-scope" | "data-part", string>;
801
801
  }>;
802
802
  }, "parts">;
803
- build: () => Record<"root" | "label" | "hiddenInput" | "input" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17 | V_18, {
803
+ build: () => Record<"root" | "label" | "hiddenInput" | "input" | "control" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17 | V_18, {
804
804
  selector: string;
805
805
  attrs: Record<"data-scope" | "data-part", string>;
806
806
  }>;
807
807
  }, "parts">;
808
- build: () => Record<"root" | "label" | "hiddenInput" | "input" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17, {
808
+ build: () => Record<"root" | "label" | "hiddenInput" | "input" | "control" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17, {
809
809
  selector: string;
810
810
  attrs: Record<"data-scope" | "data-part", string>;
811
811
  }>;
812
812
  }, "parts">;
813
- build: () => Record<"root" | "label" | "hiddenInput" | "input" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16, {
813
+ build: () => Record<"root" | "label" | "hiddenInput" | "input" | "control" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16, {
814
814
  selector: string;
815
815
  attrs: Record<"data-scope" | "data-part", string>;
816
816
  }>;
817
817
  }, "parts">;
818
- build: () => Record<"root" | "label" | "hiddenInput" | "input" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15, {
818
+ build: () => Record<"root" | "label" | "hiddenInput" | "input" | "control" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15, {
819
819
  selector: string;
820
820
  attrs: Record<"data-scope" | "data-part", string>;
821
821
  }>;
822
822
  }, "parts">;
823
- build: () => Record<"root" | "label" | "hiddenInput" | "input" | V_10 | V_11 | V_12 | V_13 | V_14, {
823
+ build: () => Record<"root" | "label" | "hiddenInput" | "input" | "control" | V_10 | V_11 | V_12 | V_13 | V_14, {
824
824
  selector: string;
825
825
  attrs: Record<"data-scope" | "data-part", string>;
826
826
  }>;
827
827
  }, "parts">;
828
- build: () => Record<"root" | "label" | "hiddenInput" | "input" | V_10 | V_11 | V_12 | V_13, {
828
+ build: () => Record<"root" | "label" | "hiddenInput" | "input" | "control" | V_10 | V_11 | V_12 | V_13, {
829
829
  selector: string;
830
830
  attrs: Record<"data-scope" | "data-part", string>;
831
831
  }>;
832
832
  }, "parts">;
833
- build: () => Record<"root" | "label" | "hiddenInput" | "input" | V_10 | V_11 | V_12, {
833
+ build: () => Record<"root" | "label" | "hiddenInput" | "input" | "control" | V_10 | V_11 | V_12, {
834
834
  selector: string;
835
835
  attrs: Record<"data-scope" | "data-part", string>;
836
836
  }>;
837
837
  }, "parts">;
838
- build: () => Record<"root" | "label" | "hiddenInput" | "input" | V_10 | V_11, {
838
+ build: () => Record<"root" | "label" | "hiddenInput" | "input" | "control" | V_10 | V_11, {
839
839
  selector: string;
840
840
  attrs: Record<"data-scope" | "data-part", string>;
841
841
  }>;
842
842
  }, "parts">;
843
- build: () => Record<"root" | "label" | "hiddenInput" | "input" | V_10, {
843
+ build: () => Record<"root" | "label" | "hiddenInput" | "input" | "control" | V_10, {
844
844
  selector: string;
845
845
  attrs: Record<"data-scope" | "data-part", string>;
846
846
  }>;
847
847
  }, "parts">;
848
- build: () => Record<"root" | "label" | "hiddenInput" | "input", {
848
+ build: () => Record<"root" | "label" | "hiddenInput" | "input" | "control", {
849
849
  selector: string;
850
850
  attrs: Record<"data-scope" | "data-part", string>;
851
851
  }>;
852
852
  }, "parts">;
853
853
 
854
- declare type IntlTranslations = {
854
+ type IntlTranslations = {
855
855
  inputLabel: (index: number, length: number) => string;
856
856
  };
857
- declare type ElementIds = Partial<{
857
+ type ElementIds = Partial<{
858
858
  root: string;
859
859
  hiddenInput: string;
860
860
  label: string;
861
+ control: string;
861
862
  input(id: string): string;
862
863
  }>;
863
- declare type PublicContext = DirectionProperty & CommonProperties & {
864
+ type PublicContext = DirectionProperty & CommonProperties & {
864
865
  /**
865
866
  * The name of the input element. Useful for form submission.
866
867
  */
@@ -943,8 +944,8 @@ declare type PublicContext = DirectionProperty & CommonProperties & {
943
944
  */
944
945
  translations: IntlTranslations;
945
946
  };
946
- declare type UserDefinedContext = RequiredBy<PublicContext, "id">;
947
- declare type ComputedContext = Readonly<{
947
+ type UserDefinedContext = RequiredBy<PublicContext, "id">;
948
+ type ComputedContext = Readonly<{
948
949
  /**
949
950
  * @computed
950
951
  * The number of inputs
@@ -971,13 +972,13 @@ declare type ComputedContext = Readonly<{
971
972
  */
972
973
  focusedValue: string;
973
974
  }>;
974
- declare type PrivateContext = Context<{}>;
975
- declare type MachineContext = PublicContext & PrivateContext & ComputedContext;
976
- declare type MachineState = {
975
+ type PrivateContext = Context<{}>;
976
+ type MachineContext = PublicContext & PrivateContext & ComputedContext;
977
+ type MachineState = {
977
978
  value: "unknown" | "idle" | "focused";
978
979
  };
979
- declare type State = StateMachine.State<MachineContext, MachineState>;
980
- declare type Send = StateMachine.Send<StateMachine.AnyEventObject>;
980
+ type State = StateMachine.State<MachineContext, MachineState>;
981
+ type Send = StateMachine.Send<StateMachine.AnyEventObject>;
981
982
 
982
983
  declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): {
983
984
  value: string[];
@@ -990,6 +991,7 @@ declare function connect<T extends PropTypes>(state: State, send: Send, normaliz
990
991
  rootProps: T["element"];
991
992
  labelProps: T["label"];
992
993
  hiddenInputProps: T["input"];
994
+ controlProps: T["element"];
993
995
  getInputProps({ index }: {
994
996
  index: number;
995
997
  }): T["input"];
package/dist/index.js CHANGED
@@ -28,7 +28,7 @@ module.exports = __toCommonJS(src_exports);
28
28
 
29
29
  // src/pin-input.anatomy.ts
30
30
  var import_anatomy = require("@zag-js/anatomy");
31
- var anatomy = (0, import_anatomy.createAnatomy)("pinInput").parts("root", "label", "hiddenInput", "input");
31
+ var anatomy = (0, import_anatomy.createAnatomy)("pinInput").parts("root", "label", "hiddenInput", "input", "control");
32
32
  var parts = anatomy.build();
33
33
 
34
34
  // ../../utilities/dom/dist/index.mjs
@@ -177,6 +177,10 @@ var dom = defineDomHelpers({
177
177
  var _a, _b;
178
178
  return (_b = (_a = ctx.ids) == null ? void 0 : _a.label) != null ? _b : `pin-input:${ctx.id}:label`;
179
179
  },
180
+ getControlId: (ctx) => {
181
+ var _a, _b;
182
+ return (_b = (_a = ctx.ids) == null ? void 0 : _a.control) != null ? _b : `pin-input:${ctx.id}:control`;
183
+ },
180
184
  getRootEl: (ctx) => dom.getById(ctx, dom.getRootId(ctx)),
181
185
  getElements: (ctx) => {
182
186
  const ownerId = CSS.escape(dom.getRootId(ctx));
@@ -247,6 +251,10 @@ function connect(state, send, normalize) {
247
251
  maxLength: state.context.valueLength,
248
252
  defaultValue: state.context.valueAsString
249
253
  }),
254
+ controlProps: normalize.element({
255
+ ...parts.control.attrs,
256
+ id: dom.getControlId(state.context)
257
+ }),
250
258
  getInputProps({ index }) {
251
259
  const inputType = state.context.type === "numeric" ? "tel" : "text";
252
260
  return normalize.input({
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  // src/pin-input.anatomy.ts
2
2
  import { createAnatomy } from "@zag-js/anatomy";
3
- var anatomy = createAnatomy("pinInput").parts("root", "label", "hiddenInput", "input");
3
+ var anatomy = createAnatomy("pinInput").parts("root", "label", "hiddenInput", "input", "control");
4
4
  var parts = anatomy.build();
5
5
 
6
6
  // ../../utilities/dom/dist/index.mjs
@@ -149,6 +149,10 @@ var dom = defineDomHelpers({
149
149
  var _a, _b;
150
150
  return (_b = (_a = ctx.ids) == null ? void 0 : _a.label) != null ? _b : `pin-input:${ctx.id}:label`;
151
151
  },
152
+ getControlId: (ctx) => {
153
+ var _a, _b;
154
+ return (_b = (_a = ctx.ids) == null ? void 0 : _a.control) != null ? _b : `pin-input:${ctx.id}:control`;
155
+ },
152
156
  getRootEl: (ctx) => dom.getById(ctx, dom.getRootId(ctx)),
153
157
  getElements: (ctx) => {
154
158
  const ownerId = CSS.escape(dom.getRootId(ctx));
@@ -219,6 +223,10 @@ function connect(state, send, normalize) {
219
223
  maxLength: state.context.valueLength,
220
224
  defaultValue: state.context.valueAsString
221
225
  }),
226
+ controlProps: normalize.element({
227
+ ...parts.control.attrs,
228
+ id: dom.getControlId(state.context)
229
+ }),
222
230
  getInputProps({ index }) {
223
231
  const inputType = state.context.type === "numeric" ? "tel" : "text";
224
232
  return normalize.input({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/pin-input",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Core logic for the pin-input widget implemented as a state machine",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@zag-js/anatomy": "0.1.1",
33
- "@zag-js/core": "0.2.2",
33
+ "@zag-js/core": "0.2.3",
34
34
  "@zag-js/types": "0.3.1"
35
35
  },
36
36
  "devDependencies": {