@domainkit/react 0.22.0 → 0.23.0

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 CHANGED
@@ -36,206 +36,35 @@ export type Event = Data.TaggedEnum<{
36
36
  readonly error: DomainKit.Error;
37
37
  };
38
38
  }>;
39
- export declare const Event: {
40
- readonly $is: <Tag extends "Applied" | "Cleaned" | "Connected" | "Declined" | "Detached" | "Disconnected" | "Failed">(tag: Tag) => (u: unknown) => u is Extract<{
41
- readonly _tag: "Applied";
42
- readonly domain: string;
43
- readonly receipt: Receipt.Model;
44
- }, {
45
- readonly _tag: Tag;
46
- }> | Extract<{
47
- readonly _tag: "Cleaned";
48
- readonly domain: string;
49
- readonly receipt: Receipt.Model;
50
- }, {
51
- readonly _tag: Tag;
52
- }> | Extract<{
53
- readonly _tag: "Connected";
54
- readonly domain: string;
55
- readonly connectionId: string;
56
- readonly snapshot: Transport.Snapshot;
57
- }, {
58
- readonly _tag: Tag;
59
- }> | Extract<{
60
- readonly _tag: "Declined";
61
- readonly domain: string;
62
- readonly attempt: Transport.Attempt;
63
- }, {
64
- readonly _tag: Tag;
65
- }> | Extract<{
66
- readonly _tag: "Detached";
67
- readonly domain: string;
68
- }, {
69
- readonly _tag: Tag;
70
- }> | Extract<{
71
- readonly _tag: "Disconnected";
72
- readonly domain: string;
73
- readonly connectionId: string;
74
- }, {
75
- readonly _tag: Tag;
76
- }> | Extract<{
77
- readonly _tag: "Failed";
78
- readonly domain: string;
79
- readonly error: DomainKit.Error;
80
- }, {
81
- readonly _tag: Tag;
82
- }>;
83
- readonly $match: {
84
- <Cases extends { readonly [Tag in "Applied" | "Cleaned" | "Connected" | "Declined" | "Detached" | "Disconnected" | "Failed"]: (args: Extract<{
85
- readonly _tag: "Applied";
86
- readonly domain: string;
87
- readonly receipt: Receipt.Model;
88
- } | {
89
- readonly _tag: "Cleaned";
90
- readonly domain: string;
91
- readonly receipt: Receipt.Model;
92
- } | {
93
- readonly _tag: "Connected";
94
- readonly domain: string;
95
- readonly connectionId: string;
96
- readonly snapshot: Transport.Snapshot;
97
- } | {
98
- readonly _tag: "Declined";
99
- readonly domain: string;
100
- readonly attempt: Transport.Attempt;
101
- } | {
102
- readonly _tag: "Detached";
103
- readonly domain: string;
104
- } | {
105
- readonly _tag: "Disconnected";
106
- readonly domain: string;
107
- readonly connectionId: string;
108
- } | {
109
- readonly _tag: "Failed";
110
- readonly domain: string;
111
- readonly error: DomainKit.Error;
112
- }, {
113
- readonly _tag: Tag;
114
- }>) => any; }>(cases: Cases): (value: {
115
- readonly _tag: "Applied";
116
- readonly domain: string;
117
- readonly receipt: Receipt.Model;
118
- } | {
119
- readonly _tag: "Cleaned";
120
- readonly domain: string;
121
- readonly receipt: Receipt.Model;
122
- } | {
123
- readonly _tag: "Connected";
124
- readonly domain: string;
125
- readonly connectionId: string;
126
- readonly snapshot: Transport.Snapshot;
127
- } | {
128
- readonly _tag: "Declined";
129
- readonly domain: string;
130
- readonly attempt: Transport.Attempt;
131
- } | {
132
- readonly _tag: "Detached";
133
- readonly domain: string;
134
- } | {
135
- readonly _tag: "Disconnected";
136
- readonly domain: string;
137
- readonly connectionId: string;
138
- } | {
139
- readonly _tag: "Failed";
140
- readonly domain: string;
141
- readonly error: DomainKit.Error;
142
- }) => import("effect/Unify").Unify<ReturnType<Cases["Applied" | "Cleaned" | "Connected" | "Declined" | "Detached" | "Disconnected" | "Failed"]>>;
143
- <Cases extends { readonly [Tag in "Applied" | "Cleaned" | "Connected" | "Declined" | "Detached" | "Disconnected" | "Failed"]: (args: Extract<{
144
- readonly _tag: "Applied";
145
- readonly domain: string;
146
- readonly receipt: Receipt.Model;
147
- } | {
148
- readonly _tag: "Cleaned";
149
- readonly domain: string;
150
- readonly receipt: Receipt.Model;
151
- } | {
152
- readonly _tag: "Connected";
153
- readonly domain: string;
154
- readonly connectionId: string;
155
- readonly snapshot: Transport.Snapshot;
156
- } | {
157
- readonly _tag: "Declined";
158
- readonly domain: string;
159
- readonly attempt: Transport.Attempt;
160
- } | {
161
- readonly _tag: "Detached";
162
- readonly domain: string;
163
- } | {
164
- readonly _tag: "Disconnected";
165
- readonly domain: string;
166
- readonly connectionId: string;
167
- } | {
168
- readonly _tag: "Failed";
169
- readonly domain: string;
170
- readonly error: DomainKit.Error;
171
- }, {
172
- readonly _tag: Tag;
173
- }>) => any; }>(value: {
174
- readonly _tag: "Applied";
175
- readonly domain: string;
176
- readonly receipt: Receipt.Model;
177
- } | {
178
- readonly _tag: "Cleaned";
179
- readonly domain: string;
180
- readonly receipt: Receipt.Model;
181
- } | {
182
- readonly _tag: "Connected";
183
- readonly domain: string;
184
- readonly connectionId: string;
185
- readonly snapshot: Transport.Snapshot;
186
- } | {
187
- readonly _tag: "Declined";
188
- readonly domain: string;
189
- readonly attempt: Transport.Attempt;
190
- } | {
191
- readonly _tag: "Detached";
192
- readonly domain: string;
193
- } | {
194
- readonly _tag: "Disconnected";
195
- readonly domain: string;
196
- readonly connectionId: string;
197
- } | {
198
- readonly _tag: "Failed";
199
- readonly domain: string;
200
- readonly error: DomainKit.Error;
201
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Applied" | "Cleaned" | "Connected" | "Declined" | "Detached" | "Disconnected" | "Failed"]>>;
202
- };
203
- readonly Applied: Data.TaggedEnum.ConstructorFrom<{
204
- readonly _tag: "Applied";
205
- readonly domain: string;
206
- readonly receipt: Receipt.Model;
207
- }, "_tag">;
208
- readonly Cleaned: Data.TaggedEnum.ConstructorFrom<{
209
- readonly _tag: "Cleaned";
210
- readonly domain: string;
211
- readonly receipt: Receipt.Model;
212
- }, "_tag">;
213
- readonly Connected: Data.TaggedEnum.ConstructorFrom<{
214
- readonly _tag: "Connected";
215
- readonly domain: string;
216
- readonly connectionId: string;
217
- readonly snapshot: Transport.Snapshot;
218
- }, "_tag">;
219
- readonly Declined: Data.TaggedEnum.ConstructorFrom<{
220
- readonly _tag: "Declined";
221
- readonly domain: string;
222
- readonly attempt: Transport.Attempt;
223
- }, "_tag">;
224
- readonly Detached: Data.TaggedEnum.ConstructorFrom<{
225
- readonly _tag: "Detached";
226
- readonly domain: string;
227
- }, "_tag">;
228
- readonly Disconnected: Data.TaggedEnum.ConstructorFrom<{
229
- readonly _tag: "Disconnected";
230
- readonly domain: string;
231
- readonly connectionId: string;
232
- }, "_tag">;
233
- readonly Failed: Data.TaggedEnum.ConstructorFrom<{
234
- readonly _tag: "Failed";
235
- readonly domain: string;
236
- readonly error: DomainKit.Error;
237
- }, "_tag">;
238
- };
39
+ export declare const Event: Data.TaggedEnum.Constructor<{
40
+ readonly _tag: "Applied";
41
+ readonly domain: string;
42
+ readonly receipt: Receipt.Model;
43
+ } | {
44
+ readonly _tag: "Cleaned";
45
+ readonly domain: string;
46
+ readonly receipt: Receipt.Model;
47
+ } | {
48
+ readonly _tag: "Connected";
49
+ readonly domain: string;
50
+ readonly connectionId: string;
51
+ readonly snapshot: Transport.Snapshot;
52
+ } | {
53
+ readonly _tag: "Declined";
54
+ readonly domain: string;
55
+ readonly attempt: Transport.Attempt;
56
+ } | {
57
+ readonly _tag: "Detached";
58
+ readonly domain: string;
59
+ } | {
60
+ readonly _tag: "Disconnected";
61
+ readonly domain: string;
62
+ readonly connectionId: string;
63
+ } | {
64
+ readonly _tag: "Failed";
65
+ readonly domain: string;
66
+ readonly error: DomainKit.Error;
67
+ }>;
239
68
  type Listener = (event: Event) => void;
240
69
  //#endregion
241
70
  //#region src/attempt.d.ts
@@ -267,212 +96,35 @@ type State$2 = Data.TaggedEnum<{
267
96
  readonly error: DomainKit.Error;
268
97
  };
269
98
  }>;
270
- declare const State$2: {
271
- readonly $is: <Tag extends "Applied" | "Applying" | "Approving" | "Failure" | "Idle" | "Planned" | "Planning" | "Rejected" | "Rejecting">(tag: Tag) => (u: unknown) => u is Extract<{
272
- readonly _tag: "Applied";
273
- readonly plan: Plan.Model | null;
274
- readonly receipt: Receipt.Model;
275
- }, {
276
- readonly _tag: Tag;
277
- }> | Extract<{
278
- readonly _tag: "Applying";
279
- readonly plan: Plan.Model;
280
- readonly approval: Approval.Model;
281
- }, {
282
- readonly _tag: Tag;
283
- }> | Extract<{
284
- readonly _tag: "Approving";
285
- readonly plan: Plan.Model;
286
- }, {
287
- readonly _tag: Tag;
288
- }> | Extract<{
289
- readonly _tag: "Failure";
290
- readonly error: DomainKit.Error;
291
- }, {
292
- readonly _tag: Tag;
293
- }> | Extract<{
294
- readonly _tag: "Idle";
295
- }, {
296
- readonly _tag: Tag;
297
- }> | Extract<{
298
- readonly _tag: "Planned";
299
- readonly plan: Plan.Model;
300
- }, {
301
- readonly _tag: Tag;
302
- }> | Extract<{
303
- readonly _tag: "Planning";
304
- }, {
305
- readonly _tag: Tag;
306
- }> | Extract<{
307
- readonly _tag: "Rejected";
308
- readonly plan: Plan.Model;
309
- readonly attempt: Transport.Attempt;
310
- }, {
311
- readonly _tag: Tag;
312
- }> | Extract<{
313
- readonly _tag: "Rejecting";
314
- readonly plan: Plan.Model;
315
- }, {
316
- readonly _tag: Tag;
317
- }>;
318
- readonly $match: {
319
- <Cases extends { readonly [Tag in "Applied" | "Applying" | "Approving" | "Failure" | "Idle" | "Planned" | "Planning" | "Rejected" | "Rejecting"]: (args: Extract<{
320
- readonly _tag: "Applied";
321
- readonly plan: Plan.Model | null;
322
- readonly receipt: Receipt.Model;
323
- } | {
324
- readonly _tag: "Applying";
325
- readonly plan: Plan.Model;
326
- readonly approval: Approval.Model;
327
- } | {
328
- readonly _tag: "Approving";
329
- readonly plan: Plan.Model;
330
- } | {
331
- readonly _tag: "Failure";
332
- readonly error: DomainKit.Error;
333
- } | {
334
- readonly _tag: "Idle";
335
- } | {
336
- readonly _tag: "Planned";
337
- readonly plan: Plan.Model;
338
- } | {
339
- readonly _tag: "Planning";
340
- } | {
341
- readonly _tag: "Rejected";
342
- readonly plan: Plan.Model;
343
- readonly attempt: Transport.Attempt;
344
- } | {
345
- readonly _tag: "Rejecting";
346
- readonly plan: Plan.Model;
347
- }, {
348
- readonly _tag: Tag;
349
- }>) => any; }>(cases: Cases): (value: {
350
- readonly _tag: "Applied";
351
- readonly plan: Plan.Model | null;
352
- readonly receipt: Receipt.Model;
353
- } | {
354
- readonly _tag: "Applying";
355
- readonly plan: Plan.Model;
356
- readonly approval: Approval.Model;
357
- } | {
358
- readonly _tag: "Approving";
359
- readonly plan: Plan.Model;
360
- } | {
361
- readonly _tag: "Failure";
362
- readonly error: DomainKit.Error;
363
- } | {
364
- readonly _tag: "Idle";
365
- } | {
366
- readonly _tag: "Planned";
367
- readonly plan: Plan.Model;
368
- } | {
369
- readonly _tag: "Planning";
370
- } | {
371
- readonly _tag: "Rejected";
372
- readonly plan: Plan.Model;
373
- readonly attempt: Transport.Attempt;
374
- } | {
375
- readonly _tag: "Rejecting";
376
- readonly plan: Plan.Model;
377
- }) => import("effect/Unify").Unify<ReturnType<Cases["Applied" | "Applying" | "Approving" | "Failure" | "Idle" | "Planned" | "Planning" | "Rejected" | "Rejecting"]>>;
378
- <Cases extends { readonly [Tag in "Applied" | "Applying" | "Approving" | "Failure" | "Idle" | "Planned" | "Planning" | "Rejected" | "Rejecting"]: (args: Extract<{
379
- readonly _tag: "Applied";
380
- readonly plan: Plan.Model | null;
381
- readonly receipt: Receipt.Model;
382
- } | {
383
- readonly _tag: "Applying";
384
- readonly plan: Plan.Model;
385
- readonly approval: Approval.Model;
386
- } | {
387
- readonly _tag: "Approving";
388
- readonly plan: Plan.Model;
389
- } | {
390
- readonly _tag: "Failure";
391
- readonly error: DomainKit.Error;
392
- } | {
393
- readonly _tag: "Idle";
394
- } | {
395
- readonly _tag: "Planned";
396
- readonly plan: Plan.Model;
397
- } | {
398
- readonly _tag: "Planning";
399
- } | {
400
- readonly _tag: "Rejected";
401
- readonly plan: Plan.Model;
402
- readonly attempt: Transport.Attempt;
403
- } | {
404
- readonly _tag: "Rejecting";
405
- readonly plan: Plan.Model;
406
- }, {
407
- readonly _tag: Tag;
408
- }>) => any; }>(value: {
409
- readonly _tag: "Applied";
410
- readonly plan: Plan.Model | null;
411
- readonly receipt: Receipt.Model;
412
- } | {
413
- readonly _tag: "Applying";
414
- readonly plan: Plan.Model;
415
- readonly approval: Approval.Model;
416
- } | {
417
- readonly _tag: "Approving";
418
- readonly plan: Plan.Model;
419
- } | {
420
- readonly _tag: "Failure";
421
- readonly error: DomainKit.Error;
422
- } | {
423
- readonly _tag: "Idle";
424
- } | {
425
- readonly _tag: "Planned";
426
- readonly plan: Plan.Model;
427
- } | {
428
- readonly _tag: "Planning";
429
- } | {
430
- readonly _tag: "Rejected";
431
- readonly plan: Plan.Model;
432
- readonly attempt: Transport.Attempt;
433
- } | {
434
- readonly _tag: "Rejecting";
435
- readonly plan: Plan.Model;
436
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Applied" | "Applying" | "Approving" | "Failure" | "Idle" | "Planned" | "Planning" | "Rejected" | "Rejecting"]>>;
437
- };
438
- readonly Applied: Data.TaggedEnum.ConstructorFrom<{
439
- readonly _tag: "Applied";
440
- readonly plan: Plan.Model | null;
441
- readonly receipt: Receipt.Model;
442
- }, "_tag">;
443
- readonly Applying: Data.TaggedEnum.ConstructorFrom<{
444
- readonly _tag: "Applying";
445
- readonly plan: Plan.Model;
446
- readonly approval: Approval.Model;
447
- }, "_tag">;
448
- readonly Approving: Data.TaggedEnum.ConstructorFrom<{
449
- readonly _tag: "Approving";
450
- readonly plan: Plan.Model;
451
- }, "_tag">;
452
- readonly Failure: Data.TaggedEnum.ConstructorFrom<{
453
- readonly _tag: "Failure";
454
- readonly error: DomainKit.Error;
455
- }, "_tag">;
456
- readonly Idle: Data.TaggedEnum.ConstructorFrom<{
457
- readonly _tag: "Idle";
458
- }, "_tag">;
459
- readonly Planned: Data.TaggedEnum.ConstructorFrom<{
460
- readonly _tag: "Planned";
461
- readonly plan: Plan.Model;
462
- }, "_tag">;
463
- readonly Planning: Data.TaggedEnum.ConstructorFrom<{
464
- readonly _tag: "Planning";
465
- }, "_tag">;
466
- readonly Rejected: Data.TaggedEnum.ConstructorFrom<{
467
- readonly _tag: "Rejected";
468
- readonly plan: Plan.Model;
469
- readonly attempt: Transport.Attempt;
470
- }, "_tag">;
471
- readonly Rejecting: Data.TaggedEnum.ConstructorFrom<{
472
- readonly _tag: "Rejecting";
473
- readonly plan: Plan.Model;
474
- }, "_tag">;
475
- };
99
+ declare const State$2: Data.TaggedEnum.Constructor<{
100
+ readonly _tag: "Applied";
101
+ readonly plan: Plan.Model | null;
102
+ readonly receipt: Receipt.Model;
103
+ } | {
104
+ readonly _tag: "Applying";
105
+ readonly plan: Plan.Model;
106
+ readonly approval: Approval.Model;
107
+ } | {
108
+ readonly _tag: "Approving";
109
+ readonly plan: Plan.Model;
110
+ } | {
111
+ readonly _tag: "Failure";
112
+ readonly error: DomainKit.Error;
113
+ } | {
114
+ readonly _tag: "Idle";
115
+ } | {
116
+ readonly _tag: "Planned";
117
+ readonly plan: Plan.Model;
118
+ } | {
119
+ readonly _tag: "Planning";
120
+ } | {
121
+ readonly _tag: "Rejected";
122
+ readonly plan: Plan.Model;
123
+ readonly attempt: Transport.Attempt;
124
+ } | {
125
+ readonly _tag: "Rejecting";
126
+ readonly plan: Plan.Model;
127
+ }>;
476
128
  interface Controller$2 {
477
129
  readonly state: State$2;
478
130
  /** Build a plan. The plan itself rides on the state, from `Planned` through `Applied`. */
@@ -531,86 +183,17 @@ type ZonesState = Data.TaggedEnum<{
531
183
  readonly error: DomainKit.Error;
532
184
  };
533
185
  }>;
534
- declare const ZonesState: {
535
- readonly $is: <Tag extends "Failure" | "Loading" | "Ready">(tag: Tag) => (u: unknown) => u is Extract<{
536
- readonly _tag: "Failure";
537
- readonly error: DomainKit.Error;
538
- }, {
539
- readonly _tag: Tag;
540
- }> | Extract<{
541
- readonly _tag: "Loading";
542
- }, {
543
- readonly _tag: Tag;
544
- }> | Extract<{
545
- readonly _tag: "Ready";
546
- readonly zones: ReadonlyArray<Zone>;
547
- readonly connections: ReadonlyArray<Account>;
548
- readonly providers: ReadonlyArray<Descriptor>;
549
- }, {
550
- readonly _tag: Tag;
551
- }>;
552
- readonly $match: {
553
- <Cases extends { readonly [Tag in "Failure" | "Loading" | "Ready"]: (args: Extract<{
554
- readonly _tag: "Failure";
555
- readonly error: DomainKit.Error;
556
- } | {
557
- readonly _tag: "Loading";
558
- } | {
559
- readonly _tag: "Ready";
560
- readonly zones: ReadonlyArray<Zone>;
561
- readonly connections: ReadonlyArray<Account>;
562
- readonly providers: ReadonlyArray<Descriptor>;
563
- }, {
564
- readonly _tag: Tag;
565
- }>) => any; }>(cases: Cases): (value: {
566
- readonly _tag: "Failure";
567
- readonly error: DomainKit.Error;
568
- } | {
569
- readonly _tag: "Loading";
570
- } | {
571
- readonly _tag: "Ready";
572
- readonly zones: ReadonlyArray<Zone>;
573
- readonly connections: ReadonlyArray<Account>;
574
- readonly providers: ReadonlyArray<Descriptor>;
575
- }) => import("effect/Unify").Unify<ReturnType<Cases["Failure" | "Loading" | "Ready"]>>;
576
- <Cases extends { readonly [Tag in "Failure" | "Loading" | "Ready"]: (args: Extract<{
577
- readonly _tag: "Failure";
578
- readonly error: DomainKit.Error;
579
- } | {
580
- readonly _tag: "Loading";
581
- } | {
582
- readonly _tag: "Ready";
583
- readonly zones: ReadonlyArray<Zone>;
584
- readonly connections: ReadonlyArray<Account>;
585
- readonly providers: ReadonlyArray<Descriptor>;
586
- }, {
587
- readonly _tag: Tag;
588
- }>) => any; }>(value: {
589
- readonly _tag: "Failure";
590
- readonly error: DomainKit.Error;
591
- } | {
592
- readonly _tag: "Loading";
593
- } | {
594
- readonly _tag: "Ready";
595
- readonly zones: ReadonlyArray<Zone>;
596
- readonly connections: ReadonlyArray<Account>;
597
- readonly providers: ReadonlyArray<Descriptor>;
598
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Failure" | "Loading" | "Ready"]>>;
599
- };
600
- readonly Failure: Data.TaggedEnum.ConstructorFrom<{
601
- readonly _tag: "Failure";
602
- readonly error: DomainKit.Error;
603
- }, "_tag">;
604
- readonly Loading: Data.TaggedEnum.ConstructorFrom<{
605
- readonly _tag: "Loading";
606
- }, "_tag">;
607
- readonly Ready: Data.TaggedEnum.ConstructorFrom<{
608
- readonly _tag: "Ready";
609
- readonly zones: ReadonlyArray<Zone>;
610
- readonly connections: ReadonlyArray<Account>;
611
- readonly providers: ReadonlyArray<Descriptor>;
612
- }, "_tag">;
613
- };
186
+ declare const ZonesState: Data.TaggedEnum.Constructor<{
187
+ readonly _tag: "Failure";
188
+ readonly error: DomainKit.Error;
189
+ } | {
190
+ readonly _tag: "Loading";
191
+ } | {
192
+ readonly _tag: "Ready";
193
+ readonly zones: ReadonlyArray<Zone>;
194
+ readonly connections: ReadonlyArray<Account>;
195
+ readonly providers: ReadonlyArray<Descriptor>;
196
+ }>;
614
197
  interface ZonesController {
615
198
  readonly state: ZonesState;
616
199
  readonly zones: ReadonlyArray<Zone>;
@@ -647,110 +230,20 @@ type AccountsState = Data.TaggedEnum<{
647
230
  readonly error: DomainKit.Error;
648
231
  };
649
232
  }>;
650
- declare const AccountsState: {
651
- readonly $is: <Tag extends "Failure" | "Loading" | "Ready" | "Redirecting" | "Submitting">(tag: Tag) => (u: unknown) => u is Extract<{
652
- readonly _tag: "Failure";
653
- readonly error: DomainKit.Error;
654
- }, {
655
- readonly _tag: Tag;
656
- }> | Extract<{
657
- readonly _tag: "Loading";
658
- }, {
659
- readonly _tag: Tag;
660
- }> | Extract<{
661
- readonly _tag: "Ready";
662
- }, {
663
- readonly _tag: Tag;
664
- }> | Extract<{
665
- readonly _tag: "Redirecting";
666
- readonly url: string;
667
- }, {
668
- readonly _tag: Tag;
669
- }> | Extract<{
670
- readonly _tag: "Submitting";
671
- readonly provider: string;
672
- }, {
673
- readonly _tag: Tag;
674
- }>;
675
- readonly $match: {
676
- <Cases extends { readonly [Tag in "Failure" | "Loading" | "Ready" | "Redirecting" | "Submitting"]: (args: Extract<{
677
- readonly _tag: "Failure";
678
- readonly error: DomainKit.Error;
679
- } | {
680
- readonly _tag: "Loading";
681
- } | {
682
- readonly _tag: "Ready";
683
- } | {
684
- readonly _tag: "Redirecting";
685
- readonly url: string;
686
- } | {
687
- readonly _tag: "Submitting";
688
- readonly provider: string;
689
- }, {
690
- readonly _tag: Tag;
691
- }>) => any; }>(cases: Cases): (value: {
692
- readonly _tag: "Failure";
693
- readonly error: DomainKit.Error;
694
- } | {
695
- readonly _tag: "Loading";
696
- } | {
697
- readonly _tag: "Ready";
698
- } | {
699
- readonly _tag: "Redirecting";
700
- readonly url: string;
701
- } | {
702
- readonly _tag: "Submitting";
703
- readonly provider: string;
704
- }) => import("effect/Unify").Unify<ReturnType<Cases["Failure" | "Loading" | "Ready" | "Redirecting" | "Submitting"]>>;
705
- <Cases extends { readonly [Tag in "Failure" | "Loading" | "Ready" | "Redirecting" | "Submitting"]: (args: Extract<{
706
- readonly _tag: "Failure";
707
- readonly error: DomainKit.Error;
708
- } | {
709
- readonly _tag: "Loading";
710
- } | {
711
- readonly _tag: "Ready";
712
- } | {
713
- readonly _tag: "Redirecting";
714
- readonly url: string;
715
- } | {
716
- readonly _tag: "Submitting";
717
- readonly provider: string;
718
- }, {
719
- readonly _tag: Tag;
720
- }>) => any; }>(value: {
721
- readonly _tag: "Failure";
722
- readonly error: DomainKit.Error;
723
- } | {
724
- readonly _tag: "Loading";
725
- } | {
726
- readonly _tag: "Ready";
727
- } | {
728
- readonly _tag: "Redirecting";
729
- readonly url: string;
730
- } | {
731
- readonly _tag: "Submitting";
732
- readonly provider: string;
733
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Failure" | "Loading" | "Ready" | "Redirecting" | "Submitting"]>>;
734
- };
735
- readonly Failure: Data.TaggedEnum.ConstructorFrom<{
736
- readonly _tag: "Failure";
737
- readonly error: DomainKit.Error;
738
- }, "_tag">;
739
- readonly Loading: Data.TaggedEnum.ConstructorFrom<{
740
- readonly _tag: "Loading";
741
- }, "_tag">;
742
- readonly Ready: Data.TaggedEnum.ConstructorFrom<{
743
- readonly _tag: "Ready";
744
- }, "_tag">;
745
- readonly Redirecting: Data.TaggedEnum.ConstructorFrom<{
746
- readonly _tag: "Redirecting";
747
- readonly url: string;
748
- }, "_tag">;
749
- readonly Submitting: Data.TaggedEnum.ConstructorFrom<{
750
- readonly _tag: "Submitting";
751
- readonly provider: string;
752
- }, "_tag">;
753
- };
233
+ declare const AccountsState: Data.TaggedEnum.Constructor<{
234
+ readonly _tag: "Failure";
235
+ readonly error: DomainKit.Error;
236
+ } | {
237
+ readonly _tag: "Loading";
238
+ } | {
239
+ readonly _tag: "Ready";
240
+ } | {
241
+ readonly _tag: "Redirecting";
242
+ readonly url: string;
243
+ } | {
244
+ readonly _tag: "Submitting";
245
+ readonly provider: string;
246
+ }>;
754
247
  interface AccountsController {
755
248
  readonly state: AccountsState;
756
249
  readonly zones: ReadonlyArray<Zone>;
@@ -788,7 +281,12 @@ declare const placementOf: (value: string, zones: ReadonlyArray<Zone>, preferred
788
281
  readonly zone: Zone;
789
282
  readonly placement: Placement;
790
283
  } | null;
791
- /** Zones the typed value is reaching for: a prefix of the zone, or a subdomain of one. */
284
+ /**
285
+ * Zones the typed value is reaching for. A zone that already holds the name wins outright, the
286
+ * deepest first, so `probe.example.com` offers `example.com` and never a zone that only shares
287
+ * letters with it. Otherwise the value is still being typed: a zone it is a prefix of, or one whose
288
+ * start follows a subdomain.
289
+ */
792
290
  declare const suggestionsFor: (value: string, zones: ReadonlyArray<Zone>) => ReadonlyArray<Zone>;
793
291
  /** The value a suggestion completes to: whatever subdomain was typed, then the zone. */
794
292
  declare const completionOf: (value: string, zone: Zone) => string;
@@ -920,227 +418,38 @@ type State$1 = Data.TaggedEnum<{
920
418
  readonly attempt: Attempt | null;
921
419
  };
922
420
  }>;
923
- declare const State$1: {
924
- readonly $is: <Tag extends "Connected" | "Disconnected" | "Failure" | "Loading" | "Reconnect" | "Redirecting" | "SelectionRequired" | "Submitting">(tag: Tag) => (u: unknown) => u is Extract<{
925
- readonly _tag: "Connected";
926
- readonly snapshot: Snapshot;
927
- }, {
928
- readonly _tag: Tag;
929
- }> | Extract<{
930
- readonly _tag: "Disconnected";
931
- readonly snapshot: Snapshot;
932
- readonly discovery: Discovery | null;
933
- }, {
934
- readonly _tag: Tag;
935
- }> | Extract<{
936
- readonly _tag: "Failure";
937
- readonly error: DomainKit.Error;
938
- readonly snapshot: Snapshot | null;
939
- readonly discovery: Discovery | null;
940
- readonly attempt: Attempt | null;
941
- }, {
942
- readonly _tag: Tag;
943
- }> | Extract<{
944
- readonly _tag: "Loading";
945
- readonly snapshot: Snapshot | null;
946
- }, {
947
- readonly _tag: Tag;
948
- }> | Extract<{
949
- readonly _tag: "Reconnect";
950
- readonly snapshot: Snapshot;
951
- }, {
952
- readonly _tag: Tag;
953
- }> | Extract<{
954
- readonly _tag: "Redirecting";
955
- readonly url: string;
956
- }, {
957
- readonly _tag: Tag;
958
- }> | Extract<{
959
- readonly _tag: "SelectionRequired";
960
- readonly snapshot: Snapshot | null;
961
- readonly connectionId: string;
962
- readonly candidates: ReadonlyArray<Candidate>;
963
- }, {
964
- readonly _tag: Tag;
965
- }> | Extract<{
966
- readonly _tag: "Submitting";
967
- readonly snapshot: Snapshot | null;
968
- readonly discovery: Discovery | null;
969
- }, {
970
- readonly _tag: Tag;
971
- }>;
972
- readonly $match: {
973
- <Cases extends { readonly [Tag in "Connected" | "Disconnected" | "Failure" | "Loading" | "Reconnect" | "Redirecting" | "SelectionRequired" | "Submitting"]: (args: Extract<{
974
- readonly _tag: "Connected";
975
- readonly snapshot: Snapshot;
976
- } | {
977
- readonly _tag: "Disconnected";
978
- readonly snapshot: Snapshot;
979
- readonly discovery: Discovery | null;
980
- } | {
981
- readonly _tag: "Failure";
982
- readonly error: DomainKit.Error;
983
- readonly snapshot: Snapshot | null;
984
- readonly discovery: Discovery | null;
985
- readonly attempt: Attempt | null;
986
- } | {
987
- readonly _tag: "Loading";
988
- readonly snapshot: Snapshot | null;
989
- } | {
990
- readonly _tag: "Reconnect";
991
- readonly snapshot: Snapshot;
992
- } | {
993
- readonly _tag: "Redirecting";
994
- readonly url: string;
995
- } | {
996
- readonly _tag: "SelectionRequired";
997
- readonly snapshot: Snapshot | null;
998
- readonly connectionId: string;
999
- readonly candidates: ReadonlyArray<Candidate>;
1000
- } | {
1001
- readonly _tag: "Submitting";
1002
- readonly snapshot: Snapshot | null;
1003
- readonly discovery: Discovery | null;
1004
- }, {
1005
- readonly _tag: Tag;
1006
- }>) => any; }>(cases: Cases): (value: {
1007
- readonly _tag: "Connected";
1008
- readonly snapshot: Snapshot;
1009
- } | {
1010
- readonly _tag: "Disconnected";
1011
- readonly snapshot: Snapshot;
1012
- readonly discovery: Discovery | null;
1013
- } | {
1014
- readonly _tag: "Failure";
1015
- readonly error: DomainKit.Error;
1016
- readonly snapshot: Snapshot | null;
1017
- readonly discovery: Discovery | null;
1018
- readonly attempt: Attempt | null;
1019
- } | {
1020
- readonly _tag: "Loading";
1021
- readonly snapshot: Snapshot | null;
1022
- } | {
1023
- readonly _tag: "Reconnect";
1024
- readonly snapshot: Snapshot;
1025
- } | {
1026
- readonly _tag: "Redirecting";
1027
- readonly url: string;
1028
- } | {
1029
- readonly _tag: "SelectionRequired";
1030
- readonly snapshot: Snapshot | null;
1031
- readonly connectionId: string;
1032
- readonly candidates: ReadonlyArray<Candidate>;
1033
- } | {
1034
- readonly _tag: "Submitting";
1035
- readonly snapshot: Snapshot | null;
1036
- readonly discovery: Discovery | null;
1037
- }) => import("effect/Unify").Unify<ReturnType<Cases["Connected" | "Disconnected" | "Failure" | "Loading" | "Reconnect" | "Redirecting" | "SelectionRequired" | "Submitting"]>>;
1038
- <Cases extends { readonly [Tag in "Connected" | "Disconnected" | "Failure" | "Loading" | "Reconnect" | "Redirecting" | "SelectionRequired" | "Submitting"]: (args: Extract<{
1039
- readonly _tag: "Connected";
1040
- readonly snapshot: Snapshot;
1041
- } | {
1042
- readonly _tag: "Disconnected";
1043
- readonly snapshot: Snapshot;
1044
- readonly discovery: Discovery | null;
1045
- } | {
1046
- readonly _tag: "Failure";
1047
- readonly error: DomainKit.Error;
1048
- readonly snapshot: Snapshot | null;
1049
- readonly discovery: Discovery | null;
1050
- readonly attempt: Attempt | null;
1051
- } | {
1052
- readonly _tag: "Loading";
1053
- readonly snapshot: Snapshot | null;
1054
- } | {
1055
- readonly _tag: "Reconnect";
1056
- readonly snapshot: Snapshot;
1057
- } | {
1058
- readonly _tag: "Redirecting";
1059
- readonly url: string;
1060
- } | {
1061
- readonly _tag: "SelectionRequired";
1062
- readonly snapshot: Snapshot | null;
1063
- readonly connectionId: string;
1064
- readonly candidates: ReadonlyArray<Candidate>;
1065
- } | {
1066
- readonly _tag: "Submitting";
1067
- readonly snapshot: Snapshot | null;
1068
- readonly discovery: Discovery | null;
1069
- }, {
1070
- readonly _tag: Tag;
1071
- }>) => any; }>(value: {
1072
- readonly _tag: "Connected";
1073
- readonly snapshot: Snapshot;
1074
- } | {
1075
- readonly _tag: "Disconnected";
1076
- readonly snapshot: Snapshot;
1077
- readonly discovery: Discovery | null;
1078
- } | {
1079
- readonly _tag: "Failure";
1080
- readonly error: DomainKit.Error;
1081
- readonly snapshot: Snapshot | null;
1082
- readonly discovery: Discovery | null;
1083
- readonly attempt: Attempt | null;
1084
- } | {
1085
- readonly _tag: "Loading";
1086
- readonly snapshot: Snapshot | null;
1087
- } | {
1088
- readonly _tag: "Reconnect";
1089
- readonly snapshot: Snapshot;
1090
- } | {
1091
- readonly _tag: "Redirecting";
1092
- readonly url: string;
1093
- } | {
1094
- readonly _tag: "SelectionRequired";
1095
- readonly snapshot: Snapshot | null;
1096
- readonly connectionId: string;
1097
- readonly candidates: ReadonlyArray<Candidate>;
1098
- } | {
1099
- readonly _tag: "Submitting";
1100
- readonly snapshot: Snapshot | null;
1101
- readonly discovery: Discovery | null;
1102
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Connected" | "Disconnected" | "Failure" | "Loading" | "Reconnect" | "Redirecting" | "SelectionRequired" | "Submitting"]>>;
1103
- };
1104
- readonly Connected: Data.TaggedEnum.ConstructorFrom<{
1105
- readonly _tag: "Connected";
1106
- readonly snapshot: Snapshot;
1107
- }, "_tag">;
1108
- readonly Disconnected: Data.TaggedEnum.ConstructorFrom<{
1109
- readonly _tag: "Disconnected";
1110
- readonly snapshot: Snapshot;
1111
- readonly discovery: Discovery | null;
1112
- }, "_tag">;
1113
- readonly Failure: Data.TaggedEnum.ConstructorFrom<{
1114
- readonly _tag: "Failure";
1115
- readonly error: DomainKit.Error;
1116
- readonly snapshot: Snapshot | null;
1117
- readonly discovery: Discovery | null;
1118
- readonly attempt: Attempt | null;
1119
- }, "_tag">;
1120
- readonly Loading: Data.TaggedEnum.ConstructorFrom<{
1121
- readonly _tag: "Loading";
1122
- readonly snapshot: Snapshot | null;
1123
- }, "_tag">;
1124
- readonly Reconnect: Data.TaggedEnum.ConstructorFrom<{
1125
- readonly _tag: "Reconnect";
1126
- readonly snapshot: Snapshot;
1127
- }, "_tag">;
1128
- readonly Redirecting: Data.TaggedEnum.ConstructorFrom<{
1129
- readonly _tag: "Redirecting";
1130
- readonly url: string;
1131
- }, "_tag">;
1132
- readonly SelectionRequired: Data.TaggedEnum.ConstructorFrom<{
1133
- readonly _tag: "SelectionRequired";
1134
- readonly snapshot: Snapshot | null;
1135
- readonly connectionId: string;
1136
- readonly candidates: ReadonlyArray<Candidate>;
1137
- }, "_tag">;
1138
- readonly Submitting: Data.TaggedEnum.ConstructorFrom<{
1139
- readonly _tag: "Submitting";
1140
- readonly snapshot: Snapshot | null;
1141
- readonly discovery: Discovery | null;
1142
- }, "_tag">;
1143
- };
421
+ declare const State$1: Data.TaggedEnum.Constructor<{
422
+ readonly _tag: "Connected";
423
+ readonly snapshot: Snapshot;
424
+ } | {
425
+ readonly _tag: "Disconnected";
426
+ readonly snapshot: Snapshot;
427
+ readonly discovery: Discovery | null;
428
+ } | {
429
+ readonly _tag: "Failure";
430
+ readonly error: DomainKit.Error;
431
+ readonly snapshot: Snapshot | null;
432
+ readonly discovery: Discovery | null;
433
+ readonly attempt: Attempt | null;
434
+ } | {
435
+ readonly _tag: "Loading";
436
+ readonly snapshot: Snapshot | null;
437
+ } | {
438
+ readonly _tag: "Reconnect";
439
+ readonly snapshot: Snapshot;
440
+ } | {
441
+ readonly _tag: "Redirecting";
442
+ readonly url: string;
443
+ } | {
444
+ readonly _tag: "SelectionRequired";
445
+ readonly snapshot: Snapshot | null;
446
+ readonly connectionId: string;
447
+ readonly candidates: ReadonlyArray<Candidate>;
448
+ } | {
449
+ readonly _tag: "Submitting";
450
+ readonly snapshot: Snapshot | null;
451
+ readonly discovery: Discovery | null;
452
+ }>;
1144
453
  /** Which provider and method the failed command was for, so the form can answer beside it. */
1145
454
  interface Attempt {
1146
455
  readonly provider: string;
@@ -1346,101 +655,19 @@ type State = Data.TaggedEnum<{
1346
655
  readonly readiness: Readiness$1 | null;
1347
656
  };
1348
657
  }>;
1349
- declare const State: {
1350
- readonly $is: <Tag extends "Failure" | "Idle" | "Observed" | "Observing">(tag: Tag) => (u: unknown) => u is Extract<{
1351
- readonly _tag: "Failure";
1352
- readonly error: DomainKit.Error;
1353
- readonly readiness: Readiness$1 | null;
1354
- }, {
1355
- readonly _tag: Tag;
1356
- }> | Extract<{
1357
- readonly _tag: "Idle";
1358
- }, {
1359
- readonly _tag: Tag;
1360
- }> | Extract<{
1361
- readonly _tag: "Observed";
1362
- readonly readiness: Readiness$1;
1363
- }, {
1364
- readonly _tag: Tag;
1365
- }> | Extract<{
1366
- readonly _tag: "Observing";
1367
- readonly readiness: Readiness$1 | null;
1368
- }, {
1369
- readonly _tag: Tag;
1370
- }>;
1371
- readonly $match: {
1372
- <Cases extends { readonly [Tag in "Failure" | "Idle" | "Observed" | "Observing"]: (args: Extract<{
1373
- readonly _tag: "Failure";
1374
- readonly error: DomainKit.Error;
1375
- readonly readiness: Readiness$1 | null;
1376
- } | {
1377
- readonly _tag: "Idle";
1378
- } | {
1379
- readonly _tag: "Observed";
1380
- readonly readiness: Readiness$1;
1381
- } | {
1382
- readonly _tag: "Observing";
1383
- readonly readiness: Readiness$1 | null;
1384
- }, {
1385
- readonly _tag: Tag;
1386
- }>) => any; }>(cases: Cases): (value: {
1387
- readonly _tag: "Failure";
1388
- readonly error: DomainKit.Error;
1389
- readonly readiness: Readiness$1 | null;
1390
- } | {
1391
- readonly _tag: "Idle";
1392
- } | {
1393
- readonly _tag: "Observed";
1394
- readonly readiness: Readiness$1;
1395
- } | {
1396
- readonly _tag: "Observing";
1397
- readonly readiness: Readiness$1 | null;
1398
- }) => import("effect/Unify").Unify<ReturnType<Cases["Failure" | "Idle" | "Observed" | "Observing"]>>;
1399
- <Cases extends { readonly [Tag in "Failure" | "Idle" | "Observed" | "Observing"]: (args: Extract<{
1400
- readonly _tag: "Failure";
1401
- readonly error: DomainKit.Error;
1402
- readonly readiness: Readiness$1 | null;
1403
- } | {
1404
- readonly _tag: "Idle";
1405
- } | {
1406
- readonly _tag: "Observed";
1407
- readonly readiness: Readiness$1;
1408
- } | {
1409
- readonly _tag: "Observing";
1410
- readonly readiness: Readiness$1 | null;
1411
- }, {
1412
- readonly _tag: Tag;
1413
- }>) => any; }>(value: {
1414
- readonly _tag: "Failure";
1415
- readonly error: DomainKit.Error;
1416
- readonly readiness: Readiness$1 | null;
1417
- } | {
1418
- readonly _tag: "Idle";
1419
- } | {
1420
- readonly _tag: "Observed";
1421
- readonly readiness: Readiness$1;
1422
- } | {
1423
- readonly _tag: "Observing";
1424
- readonly readiness: Readiness$1 | null;
1425
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Failure" | "Idle" | "Observed" | "Observing"]>>;
1426
- };
1427
- readonly Failure: Data.TaggedEnum.ConstructorFrom<{
1428
- readonly _tag: "Failure";
1429
- readonly error: DomainKit.Error;
1430
- readonly readiness: Readiness$1 | null;
1431
- }, "_tag">;
1432
- readonly Idle: Data.TaggedEnum.ConstructorFrom<{
1433
- readonly _tag: "Idle";
1434
- }, "_tag">;
1435
- readonly Observed: Data.TaggedEnum.ConstructorFrom<{
1436
- readonly _tag: "Observed";
1437
- readonly readiness: Readiness$1;
1438
- }, "_tag">;
1439
- readonly Observing: Data.TaggedEnum.ConstructorFrom<{
1440
- readonly _tag: "Observing";
1441
- readonly readiness: Readiness$1 | null;
1442
- }, "_tag">;
1443
- };
658
+ declare const State: Data.TaggedEnum.Constructor<{
659
+ readonly _tag: "Failure";
660
+ readonly error: DomainKit.Error;
661
+ readonly readiness: Readiness$1 | null;
662
+ } | {
663
+ readonly _tag: "Idle";
664
+ } | {
665
+ readonly _tag: "Observed";
666
+ readonly readiness: Readiness$1;
667
+ } | {
668
+ readonly _tag: "Observing";
669
+ readonly readiness: Readiness$1 | null;
670
+ }>;
1444
671
  interface Controller {
1445
672
  readonly state: State;
1446
673
  /** The latest readiness, kept while a new observation runs. */
@@ -1908,38 +1135,10 @@ export type Failure = Data.TaggedEnum<{
1908
1135
  readonly error: DomainKit.Error;
1909
1136
  };
1910
1137
  }>;
1911
- export declare const Failure: {
1912
- readonly $is: <Tag extends "Failure">(tag: Tag) => (u: unknown) => u is Extract<{
1913
- readonly _tag: "Failure";
1914
- readonly error: DomainKit.Error;
1915
- }, {
1916
- readonly _tag: Tag;
1917
- }>;
1918
- readonly $match: {
1919
- <Cases extends { readonly [Tag in "Failure"]: (args: Extract<{
1920
- readonly _tag: "Failure";
1921
- readonly error: DomainKit.Error;
1922
- }, {
1923
- readonly _tag: Tag;
1924
- }>) => any; }>(cases: Cases): (value: {
1925
- readonly _tag: "Failure";
1926
- readonly error: DomainKit.Error;
1927
- }) => import("effect/Unify").Unify<ReturnType<Cases["Failure"]>>;
1928
- <Cases extends { readonly [Tag in "Failure"]: (args: Extract<{
1929
- readonly _tag: "Failure";
1930
- readonly error: DomainKit.Error;
1931
- }, {
1932
- readonly _tag: Tag;
1933
- }>) => any; }>(value: {
1934
- readonly _tag: "Failure";
1935
- readonly error: DomainKit.Error;
1936
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Failure"]>>;
1937
- };
1938
- readonly Failure: Data.TaggedEnum.ConstructorFrom<{
1939
- readonly _tag: "Failure";
1940
- readonly error: DomainKit.Error;
1941
- }, "_tag">;
1942
- };
1138
+ export declare const Failure: Data.TaggedEnum.Constructor<{
1139
+ readonly _tag: "Failure";
1140
+ readonly error: DomainKit.Error;
1141
+ }>;
1943
1142
  //#endregion
1944
1143
  export { cleanup_d_exports as Cleanup, connect_d_exports as Connect, domain_d_exports as Domain, domain_kit_d_exports as DomainKit, type Listener, messages_d_exports as Messages, outcome_d_exports as Outcome, provision_d_exports as Provision, records_d_exports as Records, testing_d_exports as Testing, verify_d_exports as Verify };
1945
1144
  //# sourceMappingURL=index.d.mts.map