@domainkit/react 0.3.1 → 0.5.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
@@ -1,9 +1,9 @@
1
- import { Dialog } from "@base-ui/react/dialog";
2
1
  import { Transport } from "domainkit";
3
2
  import * as Data from "effect/Data";
4
3
  import * as Atom from "effect/unstable/reactivity/Atom";
5
4
  import { CSSProperties, ComponentPropsWithoutRef, ElementType, ReactElement, ReactNode, RefObject } from "react";
6
5
  import { useRender } from "@base-ui/react/use-render";
6
+ import { Dialog } from "@base-ui/react/dialog";
7
7
  import * as Layer from "effect/Layer";
8
8
  //#region src/atom.d.ts
9
9
  type Runtime = Atom.AtomRuntime<Transport.Service>;
@@ -68,7 +68,7 @@ type PartProps<Tag extends ElementType, State extends Record<string, unknown>> =
68
68
  readonly style?: Style<State>;
69
69
  };
70
70
  declare namespace cleanup_d_exports {
71
- export { Command$3 as Command, Controller$3 as Controller, Dialog$3 as Dialog, Flow$3 as Flow, FlowProps$3 as FlowProps, Model$3 as Model, Outcome$2 as Outcome, Root$6 as Root, RootProps$6 as RootProps, State$3 as State, useController$3 as useController, useModel$3 as useModel };
71
+ export { Command$3 as Command, Completion, Controller$3 as Controller, Dialog$3 as Dialog, DialogProps$2 as DialogProps, Flow$3 as Flow, FlowProps$3 as FlowProps, Model$3 as Model, Outcome$2 as Outcome, Root$6 as Root, RootProps$6 as RootProps, State$3 as State, useController$3 as useController, useModel$3 as useModel };
72
72
  }
73
73
  type LocalState$3 = Data.TaggedEnum<{
74
74
  Cleaned: {
@@ -311,27 +311,37 @@ interface Controller$3 {
311
311
  readonly apply: () => void;
312
312
  readonly dismiss: () => void;
313
313
  readonly plan: () => void;
314
+ readonly retry: () => void;
314
315
  readonly state: State$3;
315
316
  }
316
- declare function useModel$3(connection: Transport.Connected, receiptId: string): Model$3;
317
- declare function useController$3(connection: Transport.Connected, receiptId: string): Controller$3;
317
+ type Completion = Extract<Transport.CleanupResult, {
318
+ readonly _tag: "Cleaned" | "Partial";
319
+ }>;
320
+ declare function useModel$3(connection: Transport.Connected, receiptId: string, onCleaned?: (result: Completion) => void): Model$3;
321
+ declare function useController$3(connection: Transport.Connected, receiptId: string, onCleaned?: (result: Completion) => void): Controller$3;
318
322
  interface RootProps$6 extends PartProps<"div", {
319
323
  readonly status: State$3["_tag"];
320
324
  }> {
321
325
  readonly status: State$3["_tag"];
322
326
  }
323
- declare function Root$6({ status, ...props }: RootProps$6): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
327
+ declare function Root$6({ status, ...props }: RootProps$6): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
324
328
  declare function Outcome$2({ state }: {
325
329
  readonly state: State$3;
326
330
  }): import("react/jsx-runtime").JSX.Element | null;
327
- declare function Dialog$3({ controller }: {
331
+ interface DialogProps$2 {
328
332
  readonly controller: Controller$3;
329
- }): import("react/jsx-runtime").JSX.Element;
333
+ readonly onOpenChange?: (open: boolean) => void;
334
+ readonly onOpenChangeComplete?: (open: boolean) => void;
335
+ readonly trigger?: ReactElement | null;
336
+ }
337
+ declare function Dialog$3({ controller, onOpenChange, onOpenChangeComplete, trigger }: DialogProps$2): import("react/jsx-runtime").JSX.Element;
330
338
  interface FlowProps$3 extends Omit<RootProps$6, "status"> {
331
339
  readonly connection: Transport.Connected;
340
+ readonly onCleaned?: (result: Completion) => void;
332
341
  readonly receiptId: string;
342
+ readonly trigger?: ReactElement;
333
343
  }
334
- declare function Flow$3({ connection, receiptId, ...props }: FlowProps$3): import("react/jsx-runtime").JSX.Element;
344
+ declare function Flow$3({ connection, onCleaned, receiptId, trigger, ...props }: FlowProps$3): import("react/jsx-runtime").JSX.Element;
335
345
  declare namespace provider_d_exports {
336
346
  export { Mark, MarkElementProps, MarkProps, MarkState, Marks, ProviderDescriptor as Provider };
337
347
  }
@@ -346,9 +356,12 @@ interface MarkProps extends PartProps<"span", MarkState> {
346
356
  declare function Mark({ provider, ...props }: MarkProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
347
357
  type MarkElementProps = ComponentPropsWithoutRef<"span">;
348
358
  declare namespace connection_d_exports {
349
- export { ActionState, Command$2 as Command, ConnectTrigger, ConnectTriggerProps, Connected, Controller$2 as Controller, Dialog$2 as Dialog, DialogProps, DisconnectAction, DisconnectActionProps, DisconnectState, Flow$2 as Flow, FlowProps$2 as FlowProps, Model$2 as Model, OAuthAction, OAuthActionProps, RetryAction$1 as RetryAction, RetryActionProps, ReuseAction, ReuseActionProps, Root$5 as Root, RootProps$5 as RootProps, RootState$1 as RootState, State$2 as State, Status$2 as Status, StatusProps$2 as StatusProps, StatusState, TokenAction, TokenActionProps, Trigger, TriggerProps, useController$2 as useController, useDisconnect, useModel$2 as useModel };
359
+ export { ActionState, AttachAction, AttachActionProps, Card$1 as Card, CardActions, CardActionsProps, CardIdentity, CardIdentityProps, CardProps$1 as CardProps, Command$2 as Command, ConnectTrigger, ConnectTriggerProps, Connected, Controller$2 as Controller, Dialog$2 as Dialog, DialogProps$1 as DialogProps, DisconnectDialog, DisconnectDialogProps, Flow$2 as Flow, FlowProps$2 as FlowProps, IntegrationAction, IntegrationActionProps, Model$2 as Model, OAuthAction, OAuthActionProps, RetryAction$1 as RetryAction, RetryActionProps, Root$5 as Root, RootProps$5 as RootProps, RootState$1 as RootState, State$2 as State, Status$2 as Status, StatusProps$2 as StatusProps, StatusState, TokenAction, TokenActionProps, Trigger, TriggerProps, targetLabel, useController$2 as useController, useModel$2 as useModel };
350
360
  }
351
361
  type LocalState$2 = Data.TaggedEnum<{
362
+ Detaching: {
363
+ readonly snapshot: Transport.Connected;
364
+ };
352
365
  Loading: {};
353
366
  Redirecting: {
354
367
  readonly snapshot: Disconnected;
@@ -358,7 +371,12 @@ type LocalState$2 = Data.TaggedEnum<{
358
371
  };
359
372
  }>;
360
373
  declare const State$2: {
361
- readonly $is: <Tag extends "Loading" | "Redirecting" | "Submitting">(tag: Tag) => (u: unknown) => u is Extract<{
374
+ readonly $is: <Tag extends "Detaching" | "Loading" | "Redirecting" | "Submitting">(tag: Tag) => (u: unknown) => u is Extract<{
375
+ readonly _tag: "Detaching";
376
+ readonly snapshot: Transport.Connected;
377
+ }, {
378
+ readonly _tag: Tag;
379
+ }> | Extract<{
362
380
  readonly _tag: "Loading";
363
381
  }, {
364
382
  readonly _tag: Tag;
@@ -374,7 +392,10 @@ declare const State$2: {
374
392
  readonly _tag: Tag;
375
393
  }>;
376
394
  readonly $match: {
377
- <Cases extends { readonly [Tag in "Loading" | "Redirecting" | "Submitting"]: (args: Extract<{
395
+ <Cases extends { readonly [Tag in "Detaching" | "Loading" | "Redirecting" | "Submitting"]: (args: Extract<{
396
+ readonly _tag: "Detaching";
397
+ readonly snapshot: Transport.Connected;
398
+ } | {
378
399
  readonly _tag: "Loading";
379
400
  } | {
380
401
  readonly _tag: "Redirecting";
@@ -385,6 +406,9 @@ declare const State$2: {
385
406
  }, {
386
407
  readonly _tag: Tag;
387
408
  }>) => any; }>(cases: Cases): (value: {
409
+ readonly _tag: "Detaching";
410
+ readonly snapshot: Transport.Connected;
411
+ } | {
388
412
  readonly _tag: "Loading";
389
413
  } | {
390
414
  readonly _tag: "Redirecting";
@@ -392,8 +416,11 @@ declare const State$2: {
392
416
  } | {
393
417
  readonly _tag: "Submitting";
394
418
  readonly snapshot: Disconnected;
395
- }) => import("effect/Unify").Unify<ReturnType<Cases["Loading" | "Redirecting" | "Submitting"]>>;
396
- <Cases extends { readonly [Tag in "Loading" | "Redirecting" | "Submitting"]: (args: Extract<{
419
+ }) => import("effect/Unify").Unify<ReturnType<Cases["Detaching" | "Loading" | "Redirecting" | "Submitting"]>>;
420
+ <Cases extends { readonly [Tag in "Detaching" | "Loading" | "Redirecting" | "Submitting"]: (args: Extract<{
421
+ readonly _tag: "Detaching";
422
+ readonly snapshot: Transport.Connected;
423
+ } | {
397
424
  readonly _tag: "Loading";
398
425
  } | {
399
426
  readonly _tag: "Redirecting";
@@ -404,6 +431,9 @@ declare const State$2: {
404
431
  }, {
405
432
  readonly _tag: Tag;
406
433
  }>) => any; }>(value: {
434
+ readonly _tag: "Detaching";
435
+ readonly snapshot: Transport.Connected;
436
+ } | {
407
437
  readonly _tag: "Loading";
408
438
  } | {
409
439
  readonly _tag: "Redirecting";
@@ -411,8 +441,12 @@ declare const State$2: {
411
441
  } | {
412
442
  readonly _tag: "Submitting";
413
443
  readonly snapshot: Disconnected;
414
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Loading" | "Redirecting" | "Submitting"]>>;
444
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Detaching" | "Loading" | "Redirecting" | "Submitting"]>>;
415
445
  };
446
+ readonly Detaching: Data.TaggedEnum.ConstructorFrom<{
447
+ readonly _tag: "Detaching";
448
+ readonly snapshot: Transport.Connected;
449
+ }, "_tag">;
416
450
  readonly Loading: Data.TaggedEnum.ConstructorFrom<{
417
451
  readonly _tag: "Loading";
418
452
  }, "_tag">;
@@ -430,79 +464,111 @@ type Disconnected = Extract<Transport.ConnectionSnapshot, {
430
464
  readonly _tag: "Disconnected";
431
465
  }>;
432
466
  interface Controller$2 {
467
+ readonly attach: (connection: Transport.ReusableConnection, target: Transport.ProviderTarget) => void;
433
468
  readonly connect: (method: Transport.Method) => void;
469
+ readonly detach: () => void;
434
470
  readonly retry: () => void;
435
- readonly reuse: () => void;
436
471
  readonly state: State$2;
437
472
  }
438
473
  type Command$2 = Data.TaggedEnum<{
474
+ Attach: {
475
+ readonly connectionId: string;
476
+ readonly target: Transport.ProviderTarget;
477
+ };
439
478
  Connect: {
440
479
  readonly method: Transport.Method;
441
480
  };
481
+ Detach: {};
442
482
  Retry: {};
443
- Reuse: {};
444
483
  }>;
445
484
  declare const Command$2: {
446
- readonly $is: <Tag extends "Connect" | "Retry" | "Reuse">(tag: Tag) => (u: unknown) => u is Extract<{
485
+ readonly $is: <Tag extends "Attach" | "Connect" | "Detach" | "Retry">(tag: Tag) => (u: unknown) => u is Extract<{
486
+ readonly _tag: "Attach";
487
+ readonly connectionId: string;
488
+ readonly target: Transport.ProviderTarget;
489
+ }, {
490
+ readonly _tag: Tag;
491
+ }> | Extract<{
447
492
  readonly _tag: "Connect";
448
493
  readonly method: Transport.Method;
449
494
  }, {
450
495
  readonly _tag: Tag;
451
496
  }> | Extract<{
452
- readonly _tag: "Retry";
497
+ readonly _tag: "Detach";
453
498
  }, {
454
499
  readonly _tag: Tag;
455
500
  }> | Extract<{
456
- readonly _tag: "Reuse";
501
+ readonly _tag: "Retry";
457
502
  }, {
458
503
  readonly _tag: Tag;
459
504
  }>;
460
505
  readonly $match: {
461
- <Cases extends { readonly [Tag in "Connect" | "Retry" | "Reuse"]: (args: Extract<{
506
+ <Cases extends { readonly [Tag in "Attach" | "Connect" | "Detach" | "Retry"]: (args: Extract<{
507
+ readonly _tag: "Attach";
508
+ readonly connectionId: string;
509
+ readonly target: Transport.ProviderTarget;
510
+ } | {
462
511
  readonly _tag: "Connect";
463
512
  readonly method: Transport.Method;
464
513
  } | {
465
- readonly _tag: "Retry";
514
+ readonly _tag: "Detach";
466
515
  } | {
467
- readonly _tag: "Reuse";
516
+ readonly _tag: "Retry";
468
517
  }, {
469
518
  readonly _tag: Tag;
470
519
  }>) => any; }>(cases: Cases): (value: {
520
+ readonly _tag: "Attach";
521
+ readonly connectionId: string;
522
+ readonly target: Transport.ProviderTarget;
523
+ } | {
471
524
  readonly _tag: "Connect";
472
525
  readonly method: Transport.Method;
526
+ } | {
527
+ readonly _tag: "Detach";
473
528
  } | {
474
529
  readonly _tag: "Retry";
530
+ }) => import("effect/Unify").Unify<ReturnType<Cases["Attach" | "Connect" | "Detach" | "Retry"]>>;
531
+ <Cases extends { readonly [Tag in "Attach" | "Connect" | "Detach" | "Retry"]: (args: Extract<{
532
+ readonly _tag: "Attach";
533
+ readonly connectionId: string;
534
+ readonly target: Transport.ProviderTarget;
475
535
  } | {
476
- readonly _tag: "Reuse";
477
- }) => import("effect/Unify").Unify<ReturnType<Cases["Connect" | "Retry" | "Reuse"]>>;
478
- <Cases extends { readonly [Tag in "Connect" | "Retry" | "Reuse"]: (args: Extract<{
479
536
  readonly _tag: "Connect";
480
537
  readonly method: Transport.Method;
481
538
  } | {
482
- readonly _tag: "Retry";
539
+ readonly _tag: "Detach";
483
540
  } | {
484
- readonly _tag: "Reuse";
541
+ readonly _tag: "Retry";
485
542
  }, {
486
543
  readonly _tag: Tag;
487
544
  }>) => any; }>(value: {
545
+ readonly _tag: "Attach";
546
+ readonly connectionId: string;
547
+ readonly target: Transport.ProviderTarget;
548
+ } | {
488
549
  readonly _tag: "Connect";
489
550
  readonly method: Transport.Method;
490
551
  } | {
491
- readonly _tag: "Retry";
552
+ readonly _tag: "Detach";
492
553
  } | {
493
- readonly _tag: "Reuse";
494
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Connect" | "Retry" | "Reuse"]>>;
554
+ readonly _tag: "Retry";
555
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Attach" | "Connect" | "Detach" | "Retry"]>>;
495
556
  };
557
+ readonly Attach: Data.TaggedEnum.ConstructorFrom<{
558
+ readonly _tag: "Attach";
559
+ readonly connectionId: string;
560
+ readonly target: Transport.ProviderTarget;
561
+ }, "_tag">;
496
562
  readonly Connect: Data.TaggedEnum.ConstructorFrom<{
497
563
  readonly _tag: "Connect";
498
564
  readonly method: Transport.Method;
499
565
  }, "_tag">;
566
+ readonly Detach: Data.TaggedEnum.ConstructorFrom<{
567
+ readonly _tag: "Detach";
568
+ }, "_tag">;
500
569
  readonly Retry: Data.TaggedEnum.ConstructorFrom<{
501
570
  readonly _tag: "Retry";
502
571
  }, "_tag">;
503
- readonly Reuse: Data.TaggedEnum.ConstructorFrom<{
504
- readonly _tag: "Reuse";
505
- }, "_tag">;
506
572
  };
507
573
  interface Model$2 {
508
574
  readonly command: Atom.AtomResultFn<Command$2, void>;
@@ -516,14 +582,14 @@ interface RootState$1 extends Record<string, unknown> {
516
582
  interface RootProps$5 extends PartProps<"div", RootState$1> {
517
583
  readonly status?: State$2["_tag"];
518
584
  }
519
- declare function Root$5({ children, status, ...props }: RootProps$5): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
585
+ declare function Root$5({ children, status, ...props }: RootProps$5): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
520
586
  interface StatusState extends Record<string, unknown> {
521
587
  readonly status: State$2["_tag"];
522
588
  }
523
589
  interface StatusProps$2 extends PartProps<"div", StatusState> {
524
590
  readonly state: State$2;
525
591
  }
526
- declare function Status$2({ children, state, ...props }: StatusProps$2): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
592
+ declare function Status$2({ children, state, ...props }: StatusProps$2): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
527
593
  interface TriggerProps extends Omit<ComponentPropsWithoutRef<typeof Dialog.Trigger>, "children"> {
528
594
  readonly children: ReactNode;
529
595
  }
@@ -534,30 +600,38 @@ interface ConnectTriggerProps extends Omit<TriggerProps, "children"> {
534
600
  declare function Trigger({ children, ...props }: TriggerProps): import("react/jsx-runtime").JSX.Element;
535
601
  declare function ConnectTrigger({ children, provider, ...props }: ConnectTriggerProps): import("react/jsx-runtime").JSX.Element;
536
602
  interface ActionState extends Record<string, unknown> {
537
- readonly authentication: "oauth" | "reuse" | "token";
603
+ readonly authentication: "attach" | "integration" | "oauth" | "token";
538
604
  }
539
605
  interface OAuthActionProps extends PartProps<"button", ActionState> {
540
606
  readonly controller: Controller$2;
541
607
  readonly label: string;
542
608
  }
543
- declare function OAuthAction({ controller, label, ...props }: OAuthActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
544
- interface ReuseActionProps extends PartProps<"button", ActionState> {
609
+ declare function OAuthAction({ controller, label, ...props }: OAuthActionProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
610
+ interface IntegrationActionProps extends PartProps<"button", ActionState> {
545
611
  readonly controller: Controller$2;
546
612
  readonly label: string;
547
613
  }
548
- declare function ReuseAction({ controller, label, ...props }: ReuseActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
614
+ declare function IntegrationAction({ controller, label, ...props }: IntegrationActionProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
615
+ interface AttachActionProps extends PartProps<"button", ActionState> {
616
+ readonly connection: Transport.ReusableConnection;
617
+ readonly controller: Controller$2;
618
+ readonly label: string;
619
+ readonly target: Transport.ProviderTarget;
620
+ }
621
+ declare function AttachAction({ connection, controller, label, target, ...props }: AttachActionProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
549
622
  interface TokenActionProps extends Omit<PartProps<"form", ActionState>, "method"> {
550
623
  readonly controller: Controller$2;
551
624
  readonly method: Extract<Transport.AuthenticationMethod, {
552
625
  readonly _tag: "Token";
553
626
  }>;
554
627
  }
555
- declare function TokenAction({ controller, method, ...props }: TokenActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
556
- interface DialogProps {
628
+ declare function TokenAction({ controller, method, ...props }: TokenActionProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
629
+ interface DialogProps$1 {
557
630
  readonly controller: Controller$2;
558
631
  readonly snapshot: Disconnected;
559
632
  }
560
- declare function Dialog$2({ controller, snapshot }: DialogProps): import("react/jsx-runtime").JSX.Element;
633
+ declare const targetLabel: (target: Transport.ProviderTarget) => string;
634
+ declare function Dialog$2({ controller, snapshot }: DialogProps$1): import("react/jsx-runtime").JSX.Element;
561
635
  interface FlowProps$2 extends Omit<RootProps$5, "children"> {
562
636
  readonly domain: string;
563
637
  }
@@ -568,80 +642,310 @@ interface RetryActionProps extends PartProps<"button", {
568
642
  readonly controller: Controller$2;
569
643
  readonly kind?: "after-user-action" | "retry";
570
644
  }
571
- declare function RetryAction$1({ controller, kind, ...props }: RetryActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
572
- type LocalDisconnectState = Data.TaggedEnum<{
573
- Disconnecting: {};
574
- Idle: {};
645
+ declare function RetryAction$1({ controller, kind, ...props }: RetryActionProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
646
+ interface CardProps$1 extends PartProps<"div", {
647
+ readonly status: State$2["_tag"];
648
+ }> {
649
+ readonly status: State$2["_tag"];
650
+ }
651
+ declare function Card$1({ status, ...props }: CardProps$1): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
652
+ interface CardIdentityProps extends PartProps<"div", {
653
+ readonly status: State$2["_tag"];
654
+ }> {
655
+ readonly status: State$2["_tag"];
656
+ }
657
+ declare function CardIdentity({ status, ...props }: CardIdentityProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
658
+ interface CardActionsProps extends PartProps<"div", {
659
+ readonly status: State$2["_tag"];
660
+ }> {
661
+ readonly status: State$2["_tag"];
662
+ }
663
+ declare function CardActions({ status, ...props }: CardActionsProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
664
+ interface DisconnectDialogProps {
665
+ readonly connection: Transport.Connected;
666
+ readonly controller: Controller$2;
667
+ readonly onOpenChange?: (open: boolean) => void;
668
+ readonly open?: boolean;
669
+ readonly trigger?: ReactElement | null;
670
+ }
671
+ declare function DisconnectDialog({ connection, controller, onOpenChange, open: openProp, trigger }: DisconnectDialogProps): import("react/jsx-runtime").JSX.Element;
672
+ type Connected = Transport.Connected;
673
+ declare namespace domain_d_exports {
674
+ export { Flow$1 as Flow, FlowProps$1 as FlowProps };
675
+ }
676
+ interface FlowProps$1 {
677
+ readonly domain: string;
678
+ readonly receiptId?: string;
679
+ readonly records: ReadonlyArray<Transport.DnsRecord>;
680
+ }
681
+ declare function Flow$1({ domain, receiptId, records }: FlowProps$1): import("react/jsx-runtime").JSX.Element;
682
+ //#endregion
683
+ //#region src/icons.d.ts
684
+ type Icons = {
685
+ readonly copied: ReactNode;
686
+ readonly copy: ReactNode;
687
+ readonly download: ReactNode;
688
+ };
689
+ declare namespace lifecycle_d_exports {
690
+ export { Event, Listener };
691
+ }
692
+ /** User-action lifecycle events suitable for host notifications and telemetry. */
693
+ type Event = Data.TaggedEnum<{
694
+ ConnectionEstablished: {
695
+ readonly connection: Transport.Connected;
696
+ readonly source: "attach" | "connect";
697
+ };
698
+ DomainDetached: {
699
+ readonly connection: Transport.Connected;
700
+ readonly result: Transport.DetachResult;
701
+ };
702
+ RecordsApplied: {
703
+ readonly connection: Transport.Connected;
704
+ readonly result: Extract<Transport.ApplyResult, {
705
+ readonly _tag: "Applied";
706
+ }>;
707
+ };
708
+ RecordsCleaned: {
709
+ readonly connection: Transport.Connected;
710
+ readonly result: Extract<Transport.CleanupResult, {
711
+ readonly _tag: "Cleaned";
712
+ }>;
713
+ };
714
+ RecordsPartiallyApplied: {
715
+ readonly connection: Transport.Connected;
716
+ readonly result: Extract<Transport.ApplyResult, {
717
+ readonly _tag: "Partial";
718
+ }>;
719
+ };
720
+ RecordsPartiallyCleaned: {
721
+ readonly connection: Transport.Connected;
722
+ readonly result: Extract<Transport.CleanupResult, {
723
+ readonly _tag: "Partial";
724
+ }>;
725
+ };
575
726
  }>;
576
- declare const DisconnectState: {
577
- readonly $is: <Tag extends "Disconnecting" | "Idle">(tag: Tag) => (u: unknown) => u is Extract<{
578
- readonly _tag: "Disconnecting";
727
+ declare const Event: {
728
+ readonly $is: <Tag extends "ConnectionEstablished" | "DomainDetached" | "RecordsApplied" | "RecordsCleaned" | "RecordsPartiallyApplied" | "RecordsPartiallyCleaned">(tag: Tag) => (u: unknown) => u is Extract<{
729
+ readonly _tag: "ConnectionEstablished";
730
+ readonly connection: Transport.Connected;
731
+ readonly source: "attach" | "connect";
579
732
  }, {
580
733
  readonly _tag: Tag;
581
734
  }> | Extract<{
582
- readonly _tag: "Idle";
735
+ readonly _tag: "DomainDetached";
736
+ readonly connection: Transport.Connected;
737
+ readonly result: Transport.DetachResult;
738
+ }, {
739
+ readonly _tag: Tag;
740
+ }> | Extract<{
741
+ readonly _tag: "RecordsApplied";
742
+ readonly connection: Transport.Connected;
743
+ readonly result: Extract<Transport.ApplyResult, {
744
+ readonly _tag: "Applied";
745
+ }>;
746
+ }, {
747
+ readonly _tag: Tag;
748
+ }> | Extract<{
749
+ readonly _tag: "RecordsCleaned";
750
+ readonly connection: Transport.Connected;
751
+ readonly result: Extract<Transport.CleanupResult, {
752
+ readonly _tag: "Cleaned";
753
+ }>;
754
+ }, {
755
+ readonly _tag: Tag;
756
+ }> | Extract<{
757
+ readonly _tag: "RecordsPartiallyApplied";
758
+ readonly connection: Transport.Connected;
759
+ readonly result: Extract<Transport.ApplyResult, {
760
+ readonly _tag: "Partial";
761
+ }>;
762
+ }, {
763
+ readonly _tag: Tag;
764
+ }> | Extract<{
765
+ readonly _tag: "RecordsPartiallyCleaned";
766
+ readonly connection: Transport.Connected;
767
+ readonly result: Extract<Transport.CleanupResult, {
768
+ readonly _tag: "Partial";
769
+ }>;
583
770
  }, {
584
771
  readonly _tag: Tag;
585
772
  }>;
586
773
  readonly $match: {
587
- <Cases extends { readonly [Tag in "Disconnecting" | "Idle"]: (args: Extract<{
588
- readonly _tag: "Disconnecting";
774
+ <Cases extends { readonly [Tag in "ConnectionEstablished" | "DomainDetached" | "RecordsApplied" | "RecordsCleaned" | "RecordsPartiallyApplied" | "RecordsPartiallyCleaned"]: (args: Extract<{
775
+ readonly _tag: "ConnectionEstablished";
776
+ readonly connection: Transport.Connected;
777
+ readonly source: "attach" | "connect";
589
778
  } | {
590
- readonly _tag: "Idle";
779
+ readonly _tag: "DomainDetached";
780
+ readonly connection: Transport.Connected;
781
+ readonly result: Transport.DetachResult;
782
+ } | {
783
+ readonly _tag: "RecordsApplied";
784
+ readonly connection: Transport.Connected;
785
+ readonly result: Extract<Transport.ApplyResult, {
786
+ readonly _tag: "Applied";
787
+ }>;
788
+ } | {
789
+ readonly _tag: "RecordsCleaned";
790
+ readonly connection: Transport.Connected;
791
+ readonly result: Extract<Transport.CleanupResult, {
792
+ readonly _tag: "Cleaned";
793
+ }>;
794
+ } | {
795
+ readonly _tag: "RecordsPartiallyApplied";
796
+ readonly connection: Transport.Connected;
797
+ readonly result: Extract<Transport.ApplyResult, {
798
+ readonly _tag: "Partial";
799
+ }>;
800
+ } | {
801
+ readonly _tag: "RecordsPartiallyCleaned";
802
+ readonly connection: Transport.Connected;
803
+ readonly result: Extract<Transport.CleanupResult, {
804
+ readonly _tag: "Partial";
805
+ }>;
591
806
  }, {
592
807
  readonly _tag: Tag;
593
808
  }>) => any; }>(cases: Cases): (value: {
594
- readonly _tag: "Disconnecting";
809
+ readonly _tag: "ConnectionEstablished";
810
+ readonly connection: Transport.Connected;
811
+ readonly source: "attach" | "connect";
595
812
  } | {
596
- readonly _tag: "Idle";
597
- }) => import("effect/Unify").Unify<ReturnType<Cases["Disconnecting" | "Idle"]>>;
598
- <Cases extends { readonly [Tag in "Disconnecting" | "Idle"]: (args: Extract<{
599
- readonly _tag: "Disconnecting";
813
+ readonly _tag: "DomainDetached";
814
+ readonly connection: Transport.Connected;
815
+ readonly result: Transport.DetachResult;
600
816
  } | {
601
- readonly _tag: "Idle";
817
+ readonly _tag: "RecordsApplied";
818
+ readonly connection: Transport.Connected;
819
+ readonly result: Extract<Transport.ApplyResult, {
820
+ readonly _tag: "Applied";
821
+ }>;
822
+ } | {
823
+ readonly _tag: "RecordsCleaned";
824
+ readonly connection: Transport.Connected;
825
+ readonly result: Extract<Transport.CleanupResult, {
826
+ readonly _tag: "Cleaned";
827
+ }>;
828
+ } | {
829
+ readonly _tag: "RecordsPartiallyApplied";
830
+ readonly connection: Transport.Connected;
831
+ readonly result: Extract<Transport.ApplyResult, {
832
+ readonly _tag: "Partial";
833
+ }>;
834
+ } | {
835
+ readonly _tag: "RecordsPartiallyCleaned";
836
+ readonly connection: Transport.Connected;
837
+ readonly result: Extract<Transport.CleanupResult, {
838
+ readonly _tag: "Partial";
839
+ }>;
840
+ }) => import("effect/Unify").Unify<ReturnType<Cases["ConnectionEstablished" | "DomainDetached" | "RecordsApplied" | "RecordsCleaned" | "RecordsPartiallyApplied" | "RecordsPartiallyCleaned"]>>;
841
+ <Cases extends { readonly [Tag in "ConnectionEstablished" | "DomainDetached" | "RecordsApplied" | "RecordsCleaned" | "RecordsPartiallyApplied" | "RecordsPartiallyCleaned"]: (args: Extract<{
842
+ readonly _tag: "ConnectionEstablished";
843
+ readonly connection: Transport.Connected;
844
+ readonly source: "attach" | "connect";
845
+ } | {
846
+ readonly _tag: "DomainDetached";
847
+ readonly connection: Transport.Connected;
848
+ readonly result: Transport.DetachResult;
849
+ } | {
850
+ readonly _tag: "RecordsApplied";
851
+ readonly connection: Transport.Connected;
852
+ readonly result: Extract<Transport.ApplyResult, {
853
+ readonly _tag: "Applied";
854
+ }>;
855
+ } | {
856
+ readonly _tag: "RecordsCleaned";
857
+ readonly connection: Transport.Connected;
858
+ readonly result: Extract<Transport.CleanupResult, {
859
+ readonly _tag: "Cleaned";
860
+ }>;
861
+ } | {
862
+ readonly _tag: "RecordsPartiallyApplied";
863
+ readonly connection: Transport.Connected;
864
+ readonly result: Extract<Transport.ApplyResult, {
865
+ readonly _tag: "Partial";
866
+ }>;
867
+ } | {
868
+ readonly _tag: "RecordsPartiallyCleaned";
869
+ readonly connection: Transport.Connected;
870
+ readonly result: Extract<Transport.CleanupResult, {
871
+ readonly _tag: "Partial";
872
+ }>;
602
873
  }, {
603
874
  readonly _tag: Tag;
604
875
  }>) => any; }>(value: {
605
- readonly _tag: "Disconnecting";
876
+ readonly _tag: "ConnectionEstablished";
877
+ readonly connection: Transport.Connected;
878
+ readonly source: "attach" | "connect";
606
879
  } | {
607
- readonly _tag: "Idle";
608
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Disconnecting" | "Idle"]>>;
880
+ readonly _tag: "DomainDetached";
881
+ readonly connection: Transport.Connected;
882
+ readonly result: Transport.DetachResult;
883
+ } | {
884
+ readonly _tag: "RecordsApplied";
885
+ readonly connection: Transport.Connected;
886
+ readonly result: Extract<Transport.ApplyResult, {
887
+ readonly _tag: "Applied";
888
+ }>;
889
+ } | {
890
+ readonly _tag: "RecordsCleaned";
891
+ readonly connection: Transport.Connected;
892
+ readonly result: Extract<Transport.CleanupResult, {
893
+ readonly _tag: "Cleaned";
894
+ }>;
895
+ } | {
896
+ readonly _tag: "RecordsPartiallyApplied";
897
+ readonly connection: Transport.Connected;
898
+ readonly result: Extract<Transport.ApplyResult, {
899
+ readonly _tag: "Partial";
900
+ }>;
901
+ } | {
902
+ readonly _tag: "RecordsPartiallyCleaned";
903
+ readonly connection: Transport.Connected;
904
+ readonly result: Extract<Transport.CleanupResult, {
905
+ readonly _tag: "Partial";
906
+ }>;
907
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["ConnectionEstablished" | "DomainDetached" | "RecordsApplied" | "RecordsCleaned" | "RecordsPartiallyApplied" | "RecordsPartiallyCleaned"]>>;
609
908
  };
610
- readonly Disconnecting: Data.TaggedEnum.ConstructorFrom<{
611
- readonly _tag: "Disconnecting";
909
+ readonly ConnectionEstablished: Data.TaggedEnum.ConstructorFrom<{
910
+ readonly _tag: "ConnectionEstablished";
911
+ readonly connection: Transport.Connected;
912
+ readonly source: "attach" | "connect";
612
913
  }, "_tag">;
613
- readonly Idle: Data.TaggedEnum.ConstructorFrom<{
614
- readonly _tag: "Idle";
914
+ readonly DomainDetached: Data.TaggedEnum.ConstructorFrom<{
915
+ readonly _tag: "DomainDetached";
916
+ readonly connection: Transport.Connected;
917
+ readonly result: Transport.DetachResult;
918
+ }, "_tag">;
919
+ readonly RecordsApplied: Data.TaggedEnum.ConstructorFrom<{
920
+ readonly _tag: "RecordsApplied";
921
+ readonly connection: Transport.Connected;
922
+ readonly result: Extract<Transport.ApplyResult, {
923
+ readonly _tag: "Applied";
924
+ }>;
925
+ }, "_tag">;
926
+ readonly RecordsCleaned: Data.TaggedEnum.ConstructorFrom<{
927
+ readonly _tag: "RecordsCleaned";
928
+ readonly connection: Transport.Connected;
929
+ readonly result: Extract<Transport.CleanupResult, {
930
+ readonly _tag: "Cleaned";
931
+ }>;
932
+ }, "_tag">;
933
+ readonly RecordsPartiallyApplied: Data.TaggedEnum.ConstructorFrom<{
934
+ readonly _tag: "RecordsPartiallyApplied";
935
+ readonly connection: Transport.Connected;
936
+ readonly result: Extract<Transport.ApplyResult, {
937
+ readonly _tag: "Partial";
938
+ }>;
939
+ }, "_tag">;
940
+ readonly RecordsPartiallyCleaned: Data.TaggedEnum.ConstructorFrom<{
941
+ readonly _tag: "RecordsPartiallyCleaned";
942
+ readonly connection: Transport.Connected;
943
+ readonly result: Extract<Transport.CleanupResult, {
944
+ readonly _tag: "Partial";
945
+ }>;
615
946
  }, "_tag">;
616
947
  };
617
- type DisconnectState = LocalDisconnectState | Transport.RemoveDomainResult | Failure;
618
- declare function useDisconnect(connection: Transport.Connected): {
619
- readonly disconnect: () => void;
620
- readonly state: DisconnectState;
621
- };
622
- interface DisconnectActionProps extends PartProps<"div", {
623
- readonly status: DisconnectState["_tag"];
624
- }> {
625
- readonly connection: Transport.Connected;
626
- }
627
- declare function DisconnectAction({ connection, ...props }: DisconnectActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
628
- type Connected = Transport.Connected;
629
- declare namespace domain_d_exports {
630
- export { Flow$1 as Flow, FlowProps$1 as FlowProps };
631
- }
632
- interface FlowProps$1 {
633
- readonly domain: string;
634
- readonly receiptId?: string;
635
- readonly records: ReadonlyArray<Transport.DnsRecord>;
636
- }
637
- declare function Flow$1({ domain, receiptId, records }: FlowProps$1): import("react/jsx-runtime").JSX.Element;
638
- //#endregion
639
- //#region src/icons.d.ts
640
- type Icons = {
641
- readonly copied: ReactNode;
642
- readonly copy: ReactNode;
643
- readonly download: ReactNode;
644
- };
948
+ type Listener = (event: Event) => void;
645
949
  declare namespace messages_d_exports {
646
950
  export { Catalog, english, merge };
647
951
  }
@@ -649,12 +953,12 @@ interface Catalog {
649
953
  readonly applyCleanup: string;
650
954
  readonly applyDns: string;
651
955
  readonly applyingDns: string;
956
+ readonly authenticationAlternative: string;
652
957
  readonly automaticUnavailable: string;
653
958
  readonly cancel: string;
654
959
  readonly checkAgain: string;
655
960
  readonly checkingDns: string;
656
961
  readonly checkDns: string;
657
- readonly cleanupComplete: string;
658
962
  readonly cleanupConsent: string;
659
963
  readonly cleanupPartial: string;
660
964
  readonly cleaningDns: string;
@@ -665,20 +969,25 @@ interface Catalog {
665
969
  readonly close: string;
666
970
  readonly detectingProvider: string;
667
971
  readonly disconnectDomain: string;
972
+ readonly disconnectConsent: string;
668
973
  readonly disconnecting: string;
974
+ readonly detaching: string;
975
+ readonly disconnectTitle: (provider: string) => string;
669
976
  readonly domainDisconnected: string;
670
977
  readonly dialogDescription: (domain: string) => string;
671
978
  readonly dialogTitle: (provider: string) => string;
672
979
  readonly openingAuthorization: string;
980
+ readonly moreActions: string;
673
981
  readonly planConsent: string;
674
982
  readonly planningCleanup: string;
675
983
  readonly planningDns: string;
676
- readonly recordsApplied: string;
677
984
  readonly recordsPartiallyApplied: string;
678
985
  readonly reviewCleanup: string;
679
986
  readonly reviewDns: string;
680
987
  readonly retry: string;
681
- readonly reuseConnection: (connection: string) => string;
988
+ readonly existingConnection: string;
989
+ readonly targetUnavailable: string;
990
+ readonly attachTarget: (target: string) => string;
682
991
  readonly tokenLabel: string;
683
992
  }
684
993
  declare const english: Catalog;
@@ -689,9 +998,11 @@ declare namespace theme_d_exports {
689
998
  interface Theme {
690
999
  readonly accent?: string;
691
1000
  readonly accentContrast?: string;
1001
+ readonly backdrop?: string;
692
1002
  readonly background?: string;
693
1003
  readonly border?: string;
694
1004
  readonly danger?: string;
1005
+ readonly dangerContrast?: string;
695
1006
  readonly fill?: string;
696
1007
  readonly fontFamily?: string;
697
1008
  readonly muted?: string;
@@ -714,6 +1025,7 @@ interface RootProps$4 extends Omit<PartProps<"div", RootState>, "children"> {
714
1025
  readonly messages?: Partial<Catalog>;
715
1026
  readonly marks?: Marks;
716
1027
  readonly navigate?: (url: string) => void;
1028
+ readonly onEvent?: Listener;
717
1029
  readonly portalContainer?: HTMLElement | null;
718
1030
  readonly theme?: Theme;
719
1031
  readonly transport: Layer.Layer<Transport.Service>;
@@ -723,11 +1035,12 @@ interface ContextValue {
723
1035
  readonly navigate: (url: string) => void;
724
1036
  readonly marks: Marks;
725
1037
  readonly messages: Catalog;
1038
+ readonly emit: Listener;
726
1039
  readonly portalContainer: RefObject<HTMLElement | null>;
727
1040
  readonly themeStyle: ReturnType<typeof toStyle>;
728
1041
  readonly runtime: Runtime;
729
1042
  }
730
- declare function Root$4({ children, colorScheme, icons, marks, messages, navigate, portalContainer, theme, transport, ...props }: RootProps$4): import("react/jsx-runtime").JSX.Element;
1043
+ declare function Root$4({ children, colorScheme, icons, marks, messages, navigate, onEvent, portalContainer, theme, transport, ...props }: RootProps$4): import("react/jsx-runtime").JSX.Element;
731
1044
  declare function useDomainKit(): ContextValue;
732
1045
  declare namespace operations_d_exports {
733
1046
  export { Item, ItemProps, Kind, Lifecycle, List, ListProps, Name, Operation, Priority$1 as Priority, Reason, Record$1 as Record, Root$3 as Root, RootProps$3 as RootProps, Type, Value$1 as Value };
@@ -761,7 +1074,7 @@ interface ListProps extends Omit<RootProps$3, "children" | "count"> {
761
1074
  }
762
1075
  declare function List({ lifecycle, operations, ...props }: ListProps): import("react/jsx-runtime").JSX.Element;
763
1076
  declare namespace provisioning_d_exports {
764
- export { Command$1 as Command, Controller$1 as Controller, Dialog$1 as Dialog, Flow, FlowProps, Model$1 as Model, Outcome$1 as Outcome, RetryAction, Root$2 as Root, RootProps$2 as RootProps, State$1 as State, useController$1 as useController, useModel$1 as useModel };
1077
+ export { Command$1 as Command, Controller$1 as Controller, Dialog$1 as Dialog, DialogProps, Flow, FlowProps, Model$1 as Model, Outcome$1 as Outcome, RetryAction, Root$2 as Root, RootProps$2 as RootProps, State$1 as State, useController$1 as useController, useModel$1 as useModel };
765
1078
  }
766
1079
  type LocalState$1 = Data.TaggedEnum<{
767
1080
  Applying: {
@@ -1018,13 +1331,15 @@ interface RootProps$2 extends PartProps<"div", {
1018
1331
  }> {
1019
1332
  readonly status: State$1["_tag"];
1020
1333
  }
1021
- declare function Root$2({ status, ...props }: RootProps$2): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
1334
+ declare function Root$2({ status, ...props }: RootProps$2): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
1022
1335
  declare function Outcome$1({ state }: {
1023
1336
  readonly state: State$1;
1024
1337
  }): import("react/jsx-runtime").JSX.Element | null;
1025
- declare function Dialog$1({ controller }: {
1338
+ interface DialogProps {
1026
1339
  readonly controller: Controller$1;
1027
- }): import("react/jsx-runtime").JSX.Element;
1340
+ readonly trigger?: ReactElement;
1341
+ }
1342
+ declare function Dialog$1({ controller, trigger }: DialogProps): import("react/jsx-runtime").JSX.Element;
1028
1343
  declare function RetryAction({ controller }: {
1029
1344
  readonly controller: Controller$1;
1030
1345
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -1035,8 +1350,9 @@ interface FlowProps extends Omit<RootProps$2, "status"> {
1035
1350
  }>) => void;
1036
1351
  readonly records: ReadonlyArray<Transport.DnsRecord>;
1037
1352
  readonly showRecords?: boolean;
1353
+ readonly trigger?: ReactElement;
1038
1354
  }
1039
- declare function Flow({ connection, onApplied, records, showRecords, ...props }: FlowProps): import("react/jsx-runtime").JSX.Element;
1355
+ declare function Flow({ connection, onApplied, records, showRecords, trigger, ...props }: FlowProps): import("react/jsx-runtime").JSX.Element;
1040
1356
  declare namespace records_d_exports {
1041
1357
  export { Body, Caption, Card, CardContent, CardHeader, CardProps, CardTitle, Cell, CopyController, CopyValue, CopyValueProps, DnsRecord, Footer, Head, Header, ObservationEvidence, Priority, PriorityProps, Root$1 as Root, RootProps$1 as RootProps, Row, Status$1 as Status, StatusProps$1 as StatusProps, Table, TableProps, Value, ZoneFile, ZoneFileProps, copyText, downloadZoneFile, toZoneFile, useCopy };
1042
1358
  }
@@ -1122,13 +1438,13 @@ declare const downloadZoneFile: (domain: string, records: ReadonlyArray<Transpor
1122
1438
  type DnsRecord = Transport.DnsRecord;
1123
1439
  type ObservationEvidence = Transport.ObservationEvidence;
1124
1440
  declare namespace testing_d_exports {
1125
- export { FakeOptions, FakeTransport, makeFakeTransport, provider$1 as provider };
1441
+ export { FakeOptions, FakeTransport, attachment, connected, connection$1 as connection, makeFakeTransport, provider$1 as provider, target$1 as target };
1126
1442
  }
1127
1443
  interface FakeOptions {
1128
1444
  readonly connect?: Transport.ConnectionResult;
1129
1445
  readonly inspect: Transport.ConnectionSnapshot | FakeFailure | ReadonlyArray<Transport.ConnectionSnapshot | FakeFailure>;
1130
- readonly reuse?: Transport.Connected;
1131
- readonly removeDomain?: Transport.RemoveDomainResult;
1446
+ readonly attach?: Transport.Connected;
1447
+ readonly detach?: Transport.DetachResult;
1132
1448
  readonly plan?: Transport.ProvisioningPlan;
1133
1449
  readonly apply?: Transport.ApplyResult;
1134
1450
  readonly observe?: Transport.Observation;
@@ -1143,10 +1459,10 @@ interface FakeFailure {
1143
1459
  }
1144
1460
  interface FakeTransport extends Transport.AsyncInterface, Layer.Layer<Transport.Service> {
1145
1461
  readonly calls: {
1462
+ readonly attach: Array<Transport.AttachInput>;
1146
1463
  readonly connect: Array<Transport.ConnectInput>;
1464
+ readonly detach: Array<Transport.DetachInput>;
1147
1465
  readonly inspect: Array<Transport.InspectInput>;
1148
- readonly reuse: Array<Transport.ReuseInput>;
1149
- readonly removeDomain: Array<Transport.RemoveDomainInput>;
1150
1466
  readonly plan: Array<Transport.ProvisioningPlanInput>;
1151
1467
  readonly apply: Array<Transport.ProvisioningApplyInput>;
1152
1468
  readonly observe: Array<Transport.ObserveInput>;
@@ -1155,56 +1471,99 @@ interface FakeTransport extends Transport.AsyncInterface, Layer.Layer<Transport.
1155
1471
  };
1156
1472
  }
1157
1473
  declare const provider$1: (overrides?: Partial<Transport.Provider>) => Transport.Provider;
1474
+ declare const target$1: (overrides?: Partial<Transport.ProviderTarget>) => Transport.ProviderTarget;
1475
+ declare const connection$1: (overrides?: Partial<Transport.ProviderConnection>) => Transport.ProviderConnection;
1476
+ declare const attachment: (overrides?: Partial<Transport.DomainAttachment>) => Transport.DomainAttachment;
1477
+ declare const connected: (overrides?: Partial<Transport.Connected>) => Transport.Connected;
1158
1478
  declare function makeFakeTransport(options: FakeOptions): FakeTransport;
1159
1479
  declare namespace verification_d_exports {
1160
- export { Command, Controller, Evidence, Model, Observation, ObserveAction, ObserveConfig, Outcome, Root, RootProps, State, Status, StatusProps, useController, useModel };
1480
+ export { Command, Controller, Evidence, Model, Observation, ObserveAction, ObserveActionProps, ObserveConfig, Outcome, Root, RootProps, State, Status, StatusProps, useController, useModel };
1161
1481
  }
1162
1482
  type LocalState = Data.TaggedEnum<{
1483
+ Failed: {
1484
+ readonly failure: Failure;
1485
+ readonly previous?: Transport.Observation;
1486
+ };
1163
1487
  Idle: {};
1164
- Observing: {};
1488
+ Observing: {
1489
+ readonly previous?: Transport.Observation;
1490
+ };
1165
1491
  }>;
1166
1492
  declare const State: {
1167
- readonly $is: <Tag extends "Idle" | "Observing">(tag: Tag) => (u: unknown) => u is Extract<{
1493
+ readonly $is: <Tag extends "Failed" | "Idle" | "Observing">(tag: Tag) => (u: unknown) => u is Extract<{
1494
+ readonly _tag: "Failed";
1495
+ readonly failure: Failure;
1496
+ readonly previous?: Transport.Observation;
1497
+ }, {
1498
+ readonly _tag: Tag;
1499
+ }> | Extract<{
1168
1500
  readonly _tag: "Idle";
1169
1501
  }, {
1170
1502
  readonly _tag: Tag;
1171
1503
  }> | Extract<{
1172
1504
  readonly _tag: "Observing";
1505
+ readonly previous?: Transport.Observation;
1173
1506
  }, {
1174
1507
  readonly _tag: Tag;
1175
1508
  }>;
1176
1509
  readonly $match: {
1177
- <Cases extends { readonly [Tag in "Idle" | "Observing"]: (args: Extract<{
1510
+ <Cases extends { readonly [Tag in "Failed" | "Idle" | "Observing"]: (args: Extract<{
1511
+ readonly _tag: "Failed";
1512
+ readonly failure: Failure;
1513
+ readonly previous?: Transport.Observation;
1514
+ } | {
1178
1515
  readonly _tag: "Idle";
1179
1516
  } | {
1180
1517
  readonly _tag: "Observing";
1518
+ readonly previous?: Transport.Observation;
1181
1519
  }, {
1182
1520
  readonly _tag: Tag;
1183
1521
  }>) => any; }>(cases: Cases): (value: {
1522
+ readonly _tag: "Failed";
1523
+ readonly failure: Failure;
1524
+ readonly previous?: Transport.Observation;
1525
+ } | {
1184
1526
  readonly _tag: "Idle";
1185
1527
  } | {
1186
1528
  readonly _tag: "Observing";
1187
- }) => import("effect/Unify").Unify<ReturnType<Cases["Idle" | "Observing"]>>;
1188
- <Cases extends { readonly [Tag in "Idle" | "Observing"]: (args: Extract<{
1529
+ readonly previous?: Transport.Observation;
1530
+ }) => import("effect/Unify").Unify<ReturnType<Cases["Failed" | "Idle" | "Observing"]>>;
1531
+ <Cases extends { readonly [Tag in "Failed" | "Idle" | "Observing"]: (args: Extract<{
1532
+ readonly _tag: "Failed";
1533
+ readonly failure: Failure;
1534
+ readonly previous?: Transport.Observation;
1535
+ } | {
1189
1536
  readonly _tag: "Idle";
1190
1537
  } | {
1191
1538
  readonly _tag: "Observing";
1539
+ readonly previous?: Transport.Observation;
1192
1540
  }, {
1193
1541
  readonly _tag: Tag;
1194
1542
  }>) => any; }>(value: {
1543
+ readonly _tag: "Failed";
1544
+ readonly failure: Failure;
1545
+ readonly previous?: Transport.Observation;
1546
+ } | {
1195
1547
  readonly _tag: "Idle";
1196
1548
  } | {
1197
1549
  readonly _tag: "Observing";
1198
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Idle" | "Observing"]>>;
1550
+ readonly previous?: Transport.Observation;
1551
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Failed" | "Idle" | "Observing"]>>;
1199
1552
  };
1553
+ readonly Failed: Data.TaggedEnum.ConstructorFrom<{
1554
+ readonly _tag: "Failed";
1555
+ readonly failure: Failure;
1556
+ readonly previous?: Transport.Observation;
1557
+ }, "_tag">;
1200
1558
  readonly Idle: Data.TaggedEnum.ConstructorFrom<{
1201
1559
  readonly _tag: "Idle";
1202
1560
  }, "_tag">;
1203
1561
  readonly Observing: Data.TaggedEnum.ConstructorFrom<{
1204
1562
  readonly _tag: "Observing";
1563
+ readonly previous?: Transport.Observation;
1205
1564
  }, "_tag">;
1206
1565
  };
1207
- type State = LocalState | Transport.Observation | Failure;
1566
+ type State = LocalState | Transport.Observation;
1208
1567
  interface ObserveConfig {
1209
1568
  readonly connection?: Transport.Connected;
1210
1569
  readonly domain: string;
@@ -1282,14 +1641,17 @@ declare function Evidence({ observation }: {
1282
1641
  declare function Outcome({ state }: {
1283
1642
  readonly state: State;
1284
1643
  }): import("react/jsx-runtime").JSX.Element | null;
1285
- declare function ObserveAction({ controller }: {
1644
+ interface ObserveActionProps extends PartProps<"button", {
1645
+ readonly status: State["_tag"];
1646
+ }> {
1286
1647
  readonly controller: Controller;
1287
- }): import("react/jsx-runtime").JSX.Element;
1648
+ }
1649
+ declare function ObserveAction({ controller, ...props }: ObserveActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
1288
1650
  interface StatusProps extends Omit<RootProps, "status"> {
1289
1651
  readonly config: ObserveConfig;
1290
1652
  }
1291
1653
  declare function Status({ config, ...props }: StatusProps): import("react/jsx-runtime").JSX.Element;
1292
1654
  type Observation = Transport.Observation;
1293
1655
  //#endregion
1294
- export { cleanup_d_exports as Cleanup, connection_d_exports as Connection, domain_d_exports as Domain, domain_kit_d_exports as DomainKit, messages_d_exports as Messages, operations_d_exports as Operations, provider_d_exports as Provider, provisioning_d_exports as Provisioning, records_d_exports as Records, testing_d_exports as Testing, theme_d_exports as Theme, verification_d_exports as Verification };
1656
+ export { cleanup_d_exports as Cleanup, connection_d_exports as Connection, domain_d_exports as Domain, domain_kit_d_exports as DomainKit, lifecycle_d_exports as Lifecycle, messages_d_exports as Messages, operations_d_exports as Operations, provider_d_exports as Provider, provisioning_d_exports as Provisioning, records_d_exports as Records, testing_d_exports as Testing, theme_d_exports as Theme, verification_d_exports as Verification };
1295
1657
  //# sourceMappingURL=index.d.mts.map