@domainkit/react 0.1.1 → 0.3.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,6 +1,64 @@
1
1
  import { Dialog } from "@base-ui/react/dialog";
2
+ import { Transport } from "domainkit";
3
+ import * as Data from "effect/Data";
4
+ import * as Atom from "effect/unstable/reactivity/Atom";
2
5
  import { CSSProperties, ComponentPropsWithoutRef, ElementType, ReactElement, ReactNode, RefObject } from "react";
3
6
  import { useRender } from "@base-ui/react/use-render";
7
+ import * as Layer from "effect/Layer";
8
+ //#region src/atom.d.ts
9
+ type Runtime = Atom.AtomRuntime<Transport.Service>;
10
+ type Failure = Data.TaggedEnum<{
11
+ Failure: {
12
+ readonly message: string;
13
+ readonly operation: string;
14
+ readonly retry: Transport.Failure["retry"];
15
+ };
16
+ }>;
17
+ declare const Failure: {
18
+ readonly $is: <Tag extends "Failure">(tag: Tag) => (u: unknown) => u is Extract<{
19
+ readonly _tag: "Failure";
20
+ readonly message: string;
21
+ readonly operation: string;
22
+ readonly retry: Transport.Failure["retry"];
23
+ }, {
24
+ readonly _tag: Tag;
25
+ }>;
26
+ readonly $match: {
27
+ <Cases extends { readonly [Tag in "Failure"]: (args: Extract<{
28
+ readonly _tag: "Failure";
29
+ readonly message: string;
30
+ readonly operation: string;
31
+ readonly retry: Transport.Failure["retry"];
32
+ }, {
33
+ readonly _tag: Tag;
34
+ }>) => any; }>(cases: Cases): (value: {
35
+ readonly _tag: "Failure";
36
+ readonly message: string;
37
+ readonly operation: string;
38
+ readonly retry: Transport.Failure["retry"];
39
+ }) => import("effect/Unify").Unify<ReturnType<Cases["Failure"]>>;
40
+ <Cases extends { readonly [Tag in "Failure"]: (args: Extract<{
41
+ readonly _tag: "Failure";
42
+ readonly message: string;
43
+ readonly operation: string;
44
+ readonly retry: Transport.Failure["retry"];
45
+ }, {
46
+ readonly _tag: Tag;
47
+ }>) => any; }>(value: {
48
+ readonly _tag: "Failure";
49
+ readonly message: string;
50
+ readonly operation: string;
51
+ readonly retry: Transport.Failure["retry"];
52
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Failure"]>>;
53
+ };
54
+ readonly Failure: Data.TaggedEnum.ConstructorFrom<{
55
+ readonly _tag: "Failure";
56
+ readonly message: string;
57
+ readonly operation: string;
58
+ readonly retry: Transport.Failure["retry"];
59
+ }, "_tag">;
60
+ };
61
+ //#endregion
4
62
  //#region src/composition.d.ts
5
63
  type ClassName<State> = string | ((state: State) => string | undefined);
6
64
  type Style<State> = CSSProperties | ((state: State) => CSSProperties | undefined);
@@ -9,381 +67,572 @@ type PartProps<Tag extends ElementType, State extends Record<string, unknown>> =
9
67
  readonly render?: useRender.RenderProp<State>;
10
68
  readonly style?: Style<State>;
11
69
  };
12
- declare namespace transport_d_exports {
13
- export { ApplyResult, AuthenticationMethod, AuthenticationParameter, CleanupOperation, CleanupPlan, CleanupResult, CleanupTransport, Connected, ConnectionResult, ConnectionSnapshot, ConnectionTransport, DnsRecord, DomainKitTransport, Failure, Observation, ObservationEvidence, OperationResult, PlanOperation, Provider, ProvisioningPlan, ProvisioningTransport, RemoveDomainResult, ReusableConnection, VerificationTransport };
14
- }
15
- interface Failure {
16
- readonly _tag: "Failure";
17
- readonly message: string;
18
- readonly retry: "never" | "after-user-action" | "safe" | "unknown";
19
- }
20
- interface AuthenticationParameter {
21
- readonly description?: string;
22
- readonly key: string;
23
- readonly label: string;
24
- readonly placeholder?: string;
25
- readonly required?: boolean;
26
- }
27
- type AuthenticationMethod = {
28
- readonly _tag: "OAuth";
29
- readonly label: string;
30
- } | {
31
- readonly _tag: "Token";
32
- readonly label: string;
33
- readonly parameters?: ReadonlyArray<AuthenticationParameter>;
34
- readonly placeholder?: string;
35
- };
36
- interface Provider {
37
- readonly authentication: ReadonlyArray<AuthenticationMethod>;
38
- readonly id: string;
39
- readonly name: string;
40
- }
41
- interface Connected {
42
- readonly _tag: "Connected";
43
- readonly connectionId: string;
44
- readonly domain: string;
45
- readonly provider: Provider;
46
- }
47
- interface ReusableConnection {
48
- readonly connectionId: string;
49
- readonly label: string;
50
- }
51
- type ConnectionSnapshot = Connected | {
52
- readonly _tag: "Disconnected";
53
- readonly domain: string;
54
- readonly provider: Provider;
55
- readonly reusableConnection?: ReusableConnection;
56
- } | {
57
- readonly _tag: "Unsupported";
58
- readonly domain: string;
59
- } | Failure;
60
- type ConnectionResult = Connected | {
61
- readonly _tag: "Redirect";
62
- readonly authorizationUrl: string;
63
- } | Failure;
64
- interface ConnectionTransport {
65
- readonly connect: (input: {
66
- readonly domain: string;
67
- readonly method: "oauth" | "token";
68
- readonly parameters?: Readonly<Record<string, string>>;
69
- readonly providerId: string;
70
- readonly token?: string;
71
- }) => Promise<ConnectionResult>;
72
- readonly inspect: (input: {
73
- readonly domain: string;
74
- }) => Promise<ConnectionSnapshot>;
75
- readonly reuse: (input: {
76
- readonly connectionId: string;
77
- readonly domain: string;
78
- }) => Promise<Connected | Failure>;
79
- readonly removeDomain: (input: {
80
- readonly connectionId: string;
81
- readonly domain: string;
82
- readonly preserveDns: true;
83
- }) => Promise<RemoveDomainResult | Failure>;
84
- }
85
- interface RemoveDomainResult {
86
- readonly _tag: "Removed";
87
- readonly connectionId: string;
88
- readonly domain: string;
89
- readonly remainingDomainCount: number;
90
- }
91
- interface DnsRecord {
92
- readonly id: string;
93
- readonly name: string;
94
- readonly priority?: number;
95
- readonly type: string;
96
- readonly value: string;
97
- }
98
- type PlanOperation = {
99
- readonly _tag: "Create";
100
- readonly id: string;
101
- readonly record: DnsRecord;
102
- } | {
103
- readonly _tag: "Noop";
104
- readonly id: string;
105
- readonly record: DnsRecord;
106
- } | {
107
- readonly _tag: "Conflict";
108
- readonly id: string;
109
- readonly record: DnsRecord;
110
- readonly reason: string;
111
- };
112
- interface ProvisioningPlan {
113
- readonly _tag: "Plan";
114
- readonly digest: string;
115
- readonly expiresAt: string;
116
- readonly operations: ReadonlyArray<PlanOperation>;
117
- }
118
- type OperationResult = {
119
- readonly _tag: "Applied";
120
- readonly operationId: string;
121
- } | {
122
- readonly _tag: "Unchanged";
123
- readonly operationId: string;
124
- } | {
125
- readonly _tag: "Failed";
126
- readonly message: string;
127
- readonly operationId: string;
128
- };
129
- type ApplyResult = {
130
- readonly _tag: "Applied";
131
- readonly operationId: string;
132
- readonly receiptId: string;
133
- readonly results: ReadonlyArray<OperationResult>;
134
- } | {
135
- readonly _tag: "Partial";
136
- readonly operationId: string;
137
- readonly receiptId: string;
138
- readonly results: ReadonlyArray<OperationResult>;
139
- } | {
140
- readonly _tag: "Stale";
141
- readonly message: string;
142
- } | Failure;
143
- interface ProvisioningTransport {
144
- readonly plan: (input: {
145
- readonly connectionId: string;
146
- readonly domain: string;
147
- readonly records: ReadonlyArray<DnsRecord>;
148
- }) => Promise<ProvisioningPlan | Failure>;
149
- readonly apply: (input: {
150
- readonly connectionId: string;
151
- readonly domain: string;
152
- readonly planDigest: string;
153
- }) => Promise<ApplyResult>;
154
- }
155
- type ObservationEvidence = {
156
- readonly _tag: "Found";
157
- readonly recordId: string;
158
- } | {
159
- readonly _tag: "Missing";
160
- readonly recordId: string;
161
- } | {
162
- readonly _tag: "Mismatch";
163
- readonly recordId: string;
164
- readonly message: string;
165
- } | {
166
- readonly _tag: "Unavailable";
167
- readonly recordId: string;
168
- readonly message: string;
169
- };
170
- interface Observation {
171
- readonly _tag: "Observation";
172
- readonly provider: ReadonlyArray<ObservationEvidence>;
173
- readonly publicDns: ReadonlyArray<ObservationEvidence>;
174
- }
175
- interface VerificationTransport {
176
- readonly observe: (input: {
177
- readonly connectionId?: string;
178
- readonly domain: string;
179
- readonly records: ReadonlyArray<DnsRecord>;
180
- readonly sources: {
181
- readonly provider: boolean;
182
- readonly publicDns: boolean;
183
- };
184
- }) => Promise<Observation | Failure>;
185
- }
186
- type CleanupOperation = {
187
- readonly _tag: "Delete";
188
- readonly id: string;
189
- readonly record: DnsRecord;
190
- } | {
191
- readonly _tag: "AlreadyAbsent";
192
- readonly id: string;
193
- readonly record: DnsRecord;
194
- } | {
195
- readonly _tag: "Blocked";
196
- readonly id: string;
197
- readonly record: DnsRecord;
198
- readonly reason: string;
199
- };
200
- interface CleanupPlan {
201
- readonly _tag: "CleanupPlan";
202
- readonly digest: string;
203
- readonly expiresAt: string;
204
- readonly operations: ReadonlyArray<CleanupOperation>;
205
- }
206
- type CleanupResult = {
207
- readonly _tag: "Cleaned";
208
- readonly operationId: string;
209
- readonly results: ReadonlyArray<OperationResult>;
210
- } | {
211
- readonly _tag: "Partial";
212
- readonly operationId: string;
213
- readonly results: ReadonlyArray<OperationResult>;
214
- } | {
215
- readonly _tag: "Stale";
216
- readonly message: string;
217
- } | Failure;
218
- interface CleanupTransport {
219
- readonly plan: (input: {
220
- readonly connectionId: string;
221
- readonly domain: string;
222
- readonly receiptId: string;
223
- }) => Promise<CleanupPlan | Failure>;
224
- readonly apply: (input: {
225
- readonly connectionId: string;
226
- readonly domain: string;
227
- readonly planDigest: string;
228
- readonly receiptId: string;
229
- }) => Promise<CleanupResult>;
230
- }
231
- interface DomainKitTransport {
232
- readonly cleanup: CleanupTransport;
233
- readonly connection: ConnectionTransport;
234
- readonly provisioning: ProvisioningTransport;
235
- readonly verification: VerificationTransport;
236
- }
237
70
  declare namespace cleanup_d_exports {
238
- export { Flow$3 as Flow, FlowProps$3 as FlowProps, State$3 as State, useController$3 as useController };
239
- }
240
- type State$3 = {
241
- readonly _tag: "Idle";
242
- } | {
243
- readonly _tag: "Planning";
244
- } | {
245
- readonly _tag: "Review";
246
- readonly plan: CleanupPlan;
247
- } | {
248
- readonly _tag: "Cleaning";
249
- readonly plan: CleanupPlan;
250
- } | {
251
- readonly _tag: "Cleaned";
252
- readonly result: Extract<CleanupResult, {
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 };
72
+ }
73
+ type LocalState$3 = Data.TaggedEnum<{
74
+ Cleaned: {
75
+ readonly result: Extract<Transport.CleanupResult, {
76
+ readonly _tag: "Cleaned";
77
+ }>;
78
+ };
79
+ Cleaning: {
80
+ readonly plan: Transport.CleanupPlan;
81
+ };
82
+ Idle: {};
83
+ Partial: {
84
+ readonly result: Extract<Transport.CleanupResult, {
85
+ readonly _tag: "Partial";
86
+ }>;
87
+ };
88
+ Planning: {};
89
+ Review: {
90
+ readonly plan: Transport.CleanupPlan;
91
+ };
92
+ }>;
93
+ declare const State$3: {
94
+ readonly $is: <Tag extends "Cleaned" | "Cleaning" | "Idle" | "Partial" | "Planning" | "Review">(tag: Tag) => (u: unknown) => u is Extract<{
253
95
  readonly _tag: "Cleaned";
254
- }>;
255
- } | {
256
- readonly _tag: "Partial";
257
- readonly result: Extract<CleanupResult, {
96
+ readonly result: Extract<Transport.CleanupResult, {
97
+ readonly _tag: "Cleaned";
98
+ }>;
99
+ }, {
100
+ readonly _tag: Tag;
101
+ }> | Extract<{
102
+ readonly _tag: "Cleaning";
103
+ readonly plan: Transport.CleanupPlan;
104
+ }, {
105
+ readonly _tag: Tag;
106
+ }> | Extract<{
107
+ readonly _tag: "Idle";
108
+ }, {
109
+ readonly _tag: Tag;
110
+ }> | Extract<{
258
111
  readonly _tag: "Partial";
112
+ readonly result: Extract<Transport.CleanupResult, {
113
+ readonly _tag: "Partial";
114
+ }>;
115
+ }, {
116
+ readonly _tag: Tag;
117
+ }> | Extract<{
118
+ readonly _tag: "Planning";
119
+ }, {
120
+ readonly _tag: Tag;
121
+ }> | Extract<{
122
+ readonly _tag: "Review";
123
+ readonly plan: Transport.CleanupPlan;
124
+ }, {
125
+ readonly _tag: Tag;
259
126
  }>;
260
- } | {
127
+ readonly $match: {
128
+ <Cases extends { readonly [Tag in "Cleaned" | "Cleaning" | "Idle" | "Partial" | "Planning" | "Review"]: (args: Extract<{
129
+ readonly _tag: "Cleaned";
130
+ readonly result: Extract<Transport.CleanupResult, {
131
+ readonly _tag: "Cleaned";
132
+ }>;
133
+ } | {
134
+ readonly _tag: "Cleaning";
135
+ readonly plan: Transport.CleanupPlan;
136
+ } | {
137
+ readonly _tag: "Idle";
138
+ } | {
139
+ readonly _tag: "Partial";
140
+ readonly result: Extract<Transport.CleanupResult, {
141
+ readonly _tag: "Partial";
142
+ }>;
143
+ } | {
144
+ readonly _tag: "Planning";
145
+ } | {
146
+ readonly _tag: "Review";
147
+ readonly plan: Transport.CleanupPlan;
148
+ }, {
149
+ readonly _tag: Tag;
150
+ }>) => any; }>(cases: Cases): (value: {
151
+ readonly _tag: "Cleaned";
152
+ readonly result: Extract<Transport.CleanupResult, {
153
+ readonly _tag: "Cleaned";
154
+ }>;
155
+ } | {
156
+ readonly _tag: "Cleaning";
157
+ readonly plan: Transport.CleanupPlan;
158
+ } | {
159
+ readonly _tag: "Idle";
160
+ } | {
161
+ readonly _tag: "Partial";
162
+ readonly result: Extract<Transport.CleanupResult, {
163
+ readonly _tag: "Partial";
164
+ }>;
165
+ } | {
166
+ readonly _tag: "Planning";
167
+ } | {
168
+ readonly _tag: "Review";
169
+ readonly plan: Transport.CleanupPlan;
170
+ }) => import("effect/Unify").Unify<ReturnType<Cases["Cleaned" | "Cleaning" | "Idle" | "Partial" | "Planning" | "Review"]>>;
171
+ <Cases extends { readonly [Tag in "Cleaned" | "Cleaning" | "Idle" | "Partial" | "Planning" | "Review"]: (args: Extract<{
172
+ readonly _tag: "Cleaned";
173
+ readonly result: Extract<Transport.CleanupResult, {
174
+ readonly _tag: "Cleaned";
175
+ }>;
176
+ } | {
177
+ readonly _tag: "Cleaning";
178
+ readonly plan: Transport.CleanupPlan;
179
+ } | {
180
+ readonly _tag: "Idle";
181
+ } | {
182
+ readonly _tag: "Partial";
183
+ readonly result: Extract<Transport.CleanupResult, {
184
+ readonly _tag: "Partial";
185
+ }>;
186
+ } | {
187
+ readonly _tag: "Planning";
188
+ } | {
189
+ readonly _tag: "Review";
190
+ readonly plan: Transport.CleanupPlan;
191
+ }, {
192
+ readonly _tag: Tag;
193
+ }>) => any; }>(value: {
194
+ readonly _tag: "Cleaned";
195
+ readonly result: Extract<Transport.CleanupResult, {
196
+ readonly _tag: "Cleaned";
197
+ }>;
198
+ } | {
199
+ readonly _tag: "Cleaning";
200
+ readonly plan: Transport.CleanupPlan;
201
+ } | {
202
+ readonly _tag: "Idle";
203
+ } | {
204
+ readonly _tag: "Partial";
205
+ readonly result: Extract<Transport.CleanupResult, {
206
+ readonly _tag: "Partial";
207
+ }>;
208
+ } | {
209
+ readonly _tag: "Planning";
210
+ } | {
211
+ readonly _tag: "Review";
212
+ readonly plan: Transport.CleanupPlan;
213
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Cleaned" | "Cleaning" | "Idle" | "Partial" | "Planning" | "Review"]>>;
214
+ };
215
+ readonly Cleaned: Data.TaggedEnum.ConstructorFrom<{
216
+ readonly _tag: "Cleaned";
217
+ readonly result: Extract<Transport.CleanupResult, {
218
+ readonly _tag: "Cleaned";
219
+ }>;
220
+ }, "_tag">;
221
+ readonly Cleaning: Data.TaggedEnum.ConstructorFrom<{
222
+ readonly _tag: "Cleaning";
223
+ readonly plan: Transport.CleanupPlan;
224
+ }, "_tag">;
225
+ readonly Idle: Data.TaggedEnum.ConstructorFrom<{
226
+ readonly _tag: "Idle";
227
+ }, "_tag">;
228
+ readonly Partial: Data.TaggedEnum.ConstructorFrom<{
229
+ readonly _tag: "Partial";
230
+ readonly result: Extract<Transport.CleanupResult, {
231
+ readonly _tag: "Partial";
232
+ }>;
233
+ }, "_tag">;
234
+ readonly Planning: Data.TaggedEnum.ConstructorFrom<{
235
+ readonly _tag: "Planning";
236
+ }, "_tag">;
237
+ readonly Review: Data.TaggedEnum.ConstructorFrom<{
238
+ readonly _tag: "Review";
239
+ readonly plan: Transport.CleanupPlan;
240
+ }, "_tag">;
241
+ };
242
+ type State$3 = LocalState$3 | Extract<Transport.CleanupResult, {
261
243
  readonly _tag: "Stale";
262
- readonly message: string;
263
- } | Failure;
264
- declare function useController$3(connection: Connected, receiptId: string): {
265
- readonly apply: () => Promise<void>;
244
+ }> | Failure;
245
+ type Command$3 = Data.TaggedEnum<{
246
+ Apply: {};
247
+ Dismiss: {};
248
+ Plan: {};
249
+ }>;
250
+ declare const Command$3: {
251
+ readonly $is: <Tag extends "Apply" | "Dismiss" | "Plan">(tag: Tag) => (u: unknown) => u is Extract<{
252
+ readonly _tag: "Apply";
253
+ }, {
254
+ readonly _tag: Tag;
255
+ }> | Extract<{
256
+ readonly _tag: "Dismiss";
257
+ }, {
258
+ readonly _tag: Tag;
259
+ }> | Extract<{
260
+ readonly _tag: "Plan";
261
+ }, {
262
+ readonly _tag: Tag;
263
+ }>;
264
+ readonly $match: {
265
+ <Cases extends { readonly [Tag in "Apply" | "Dismiss" | "Plan"]: (args: Extract<{
266
+ readonly _tag: "Apply";
267
+ } | {
268
+ readonly _tag: "Dismiss";
269
+ } | {
270
+ readonly _tag: "Plan";
271
+ }, {
272
+ readonly _tag: Tag;
273
+ }>) => any; }>(cases: Cases): (value: {
274
+ readonly _tag: "Apply";
275
+ } | {
276
+ readonly _tag: "Dismiss";
277
+ } | {
278
+ readonly _tag: "Plan";
279
+ }) => import("effect/Unify").Unify<ReturnType<Cases["Apply" | "Dismiss" | "Plan"]>>;
280
+ <Cases extends { readonly [Tag in "Apply" | "Dismiss" | "Plan"]: (args: Extract<{
281
+ readonly _tag: "Apply";
282
+ } | {
283
+ readonly _tag: "Dismiss";
284
+ } | {
285
+ readonly _tag: "Plan";
286
+ }, {
287
+ readonly _tag: Tag;
288
+ }>) => any; }>(value: {
289
+ readonly _tag: "Apply";
290
+ } | {
291
+ readonly _tag: "Dismiss";
292
+ } | {
293
+ readonly _tag: "Plan";
294
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Apply" | "Dismiss" | "Plan"]>>;
295
+ };
296
+ readonly Apply: Data.TaggedEnum.ConstructorFrom<{
297
+ readonly _tag: "Apply";
298
+ }, "_tag">;
299
+ readonly Dismiss: Data.TaggedEnum.ConstructorFrom<{
300
+ readonly _tag: "Dismiss";
301
+ }, "_tag">;
302
+ readonly Plan: Data.TaggedEnum.ConstructorFrom<{
303
+ readonly _tag: "Plan";
304
+ }, "_tag">;
305
+ };
306
+ interface Model$3 {
307
+ readonly command: Atom.AtomResultFn<Command$3, void>;
308
+ readonly state: Atom.Atom<State$3>;
309
+ }
310
+ interface Controller$3 {
311
+ readonly apply: () => void;
266
312
  readonly dismiss: () => void;
267
- readonly plan: () => Promise<void>;
313
+ readonly plan: () => void;
268
314
  readonly state: State$3;
269
- };
270
- interface FlowProps$3 extends PartProps<"div", {
315
+ }
316
+ declare function useModel$3(connection: Transport.Connected, receiptId: string): Model$3;
317
+ declare function useController$3(connection: Transport.Connected, receiptId: string): Controller$3;
318
+ interface RootProps$6 extends PartProps<"div", {
271
319
  readonly status: State$3["_tag"];
272
320
  }> {
273
- readonly connection: Connected;
321
+ readonly status: State$3["_tag"];
322
+ }
323
+ declare function Root$6({ status, ...props }: RootProps$6): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
324
+ declare function Outcome$2({ state }: {
325
+ readonly state: State$3;
326
+ }): import("react/jsx-runtime").JSX.Element | null;
327
+ declare function Dialog$3({ controller }: {
328
+ readonly controller: Controller$3;
329
+ }): import("react/jsx-runtime").JSX.Element;
330
+ interface FlowProps$3 extends Omit<RootProps$6, "status"> {
331
+ readonly connection: Transport.Connected;
274
332
  readonly receiptId: string;
275
333
  }
276
- declare function Flow$3({ connection, receiptId, ...props }: FlowProps$3): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
334
+ declare function Flow$3({ connection, receiptId, ...props }: FlowProps$3): import("react/jsx-runtime").JSX.Element;
277
335
  declare namespace provider_d_exports {
278
- export { Mark, MarkElementProps, MarkProps, MarkState, Marks, Provider };
336
+ export { Mark, MarkElementProps, MarkProps, MarkState, Marks, ProviderDescriptor as Provider };
279
337
  }
280
- type Marks = Readonly<Record<string, ReactNode | ((provider: Provider) => ReactNode)>>;
338
+ type ProviderDescriptor = Transport.Provider;
339
+ type Marks = Readonly<Record<string, ReactNode | ((provider: ProviderDescriptor) => ReactNode)>>;
281
340
  interface MarkState extends Record<string, unknown> {
282
341
  readonly providerId: string;
283
342
  }
284
343
  interface MarkProps extends PartProps<"span", MarkState> {
285
- readonly provider: Provider;
344
+ readonly provider: ProviderDescriptor;
286
345
  }
287
346
  declare function Mark({ provider, ...props }: MarkProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
288
347
  type MarkElementProps = ComponentPropsWithoutRef<"span">;
289
348
  declare namespace connection_d_exports {
290
- export { ActionState, Connected, Controller$1 as Controller, Dialog$1 as Dialog, DialogProps, DisconnectAction, DisconnectActionProps, DisconnectState, Flow$2 as Flow, FlowProps$2 as FlowProps, OAuthAction, OAuthActionProps, RetryAction, RetryActionProps, ReuseAction, ReuseActionProps, Root$2 as Root, RootProps$2 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 };
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 };
291
350
  }
292
- type State$2 = {
293
- readonly _tag: "Loading";
294
- } | ConnectionSnapshot | {
295
- readonly _tag: "Submitting";
296
- readonly snapshot: Disconnected;
297
- } | {
298
- readonly _tag: "Redirecting";
299
- readonly snapshot: Disconnected;
351
+ type LocalState$2 = Data.TaggedEnum<{
352
+ Loading: {};
353
+ Redirecting: {
354
+ readonly snapshot: Disconnected;
355
+ };
356
+ Submitting: {
357
+ readonly snapshot: Disconnected;
358
+ };
359
+ }>;
360
+ declare const State$2: {
361
+ readonly $is: <Tag extends "Loading" | "Redirecting" | "Submitting">(tag: Tag) => (u: unknown) => u is Extract<{
362
+ readonly _tag: "Loading";
363
+ }, {
364
+ readonly _tag: Tag;
365
+ }> | Extract<{
366
+ readonly _tag: "Redirecting";
367
+ readonly snapshot: Disconnected;
368
+ }, {
369
+ readonly _tag: Tag;
370
+ }> | Extract<{
371
+ readonly _tag: "Submitting";
372
+ readonly snapshot: Disconnected;
373
+ }, {
374
+ readonly _tag: Tag;
375
+ }>;
376
+ readonly $match: {
377
+ <Cases extends { readonly [Tag in "Loading" | "Redirecting" | "Submitting"]: (args: Extract<{
378
+ readonly _tag: "Loading";
379
+ } | {
380
+ readonly _tag: "Redirecting";
381
+ readonly snapshot: Disconnected;
382
+ } | {
383
+ readonly _tag: "Submitting";
384
+ readonly snapshot: Disconnected;
385
+ }, {
386
+ readonly _tag: Tag;
387
+ }>) => any; }>(cases: Cases): (value: {
388
+ readonly _tag: "Loading";
389
+ } | {
390
+ readonly _tag: "Redirecting";
391
+ readonly snapshot: Disconnected;
392
+ } | {
393
+ readonly _tag: "Submitting";
394
+ readonly snapshot: Disconnected;
395
+ }) => import("effect/Unify").Unify<ReturnType<Cases["Loading" | "Redirecting" | "Submitting"]>>;
396
+ <Cases extends { readonly [Tag in "Loading" | "Redirecting" | "Submitting"]: (args: Extract<{
397
+ readonly _tag: "Loading";
398
+ } | {
399
+ readonly _tag: "Redirecting";
400
+ readonly snapshot: Disconnected;
401
+ } | {
402
+ readonly _tag: "Submitting";
403
+ readonly snapshot: Disconnected;
404
+ }, {
405
+ readonly _tag: Tag;
406
+ }>) => any; }>(value: {
407
+ readonly _tag: "Loading";
408
+ } | {
409
+ readonly _tag: "Redirecting";
410
+ readonly snapshot: Disconnected;
411
+ } | {
412
+ readonly _tag: "Submitting";
413
+ readonly snapshot: Disconnected;
414
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Loading" | "Redirecting" | "Submitting"]>>;
415
+ };
416
+ readonly Loading: Data.TaggedEnum.ConstructorFrom<{
417
+ readonly _tag: "Loading";
418
+ }, "_tag">;
419
+ readonly Redirecting: Data.TaggedEnum.ConstructorFrom<{
420
+ readonly _tag: "Redirecting";
421
+ readonly snapshot: Disconnected;
422
+ }, "_tag">;
423
+ readonly Submitting: Data.TaggedEnum.ConstructorFrom<{
424
+ readonly _tag: "Submitting";
425
+ readonly snapshot: Disconnected;
426
+ }, "_tag">;
300
427
  };
301
- type Disconnected = Extract<ConnectionSnapshot, {
428
+ type State$2 = LocalState$2 | Transport.ConnectionSnapshot | Failure;
429
+ type Disconnected = Extract<Transport.ConnectionSnapshot, {
302
430
  readonly _tag: "Disconnected";
303
431
  }>;
304
- interface Controller$1 {
305
- readonly connect: (method: "oauth" | "token", token?: string, parameters?: Readonly<Record<string, string>>) => Promise<void>;
432
+ interface Controller$2 {
433
+ readonly connect: (method: Transport.Method) => void;
306
434
  readonly retry: () => void;
307
- readonly reuse: () => Promise<void>;
435
+ readonly reuse: () => void;
308
436
  readonly state: State$2;
309
437
  }
310
- declare function useController$2(domain: string): Controller$1;
438
+ type Command$2 = Data.TaggedEnum<{
439
+ Connect: {
440
+ readonly method: Transport.Method;
441
+ };
442
+ Retry: {};
443
+ Reuse: {};
444
+ }>;
445
+ declare const Command$2: {
446
+ readonly $is: <Tag extends "Connect" | "Retry" | "Reuse">(tag: Tag) => (u: unknown) => u is Extract<{
447
+ readonly _tag: "Connect";
448
+ readonly method: Transport.Method;
449
+ }, {
450
+ readonly _tag: Tag;
451
+ }> | Extract<{
452
+ readonly _tag: "Retry";
453
+ }, {
454
+ readonly _tag: Tag;
455
+ }> | Extract<{
456
+ readonly _tag: "Reuse";
457
+ }, {
458
+ readonly _tag: Tag;
459
+ }>;
460
+ readonly $match: {
461
+ <Cases extends { readonly [Tag in "Connect" | "Retry" | "Reuse"]: (args: Extract<{
462
+ readonly _tag: "Connect";
463
+ readonly method: Transport.Method;
464
+ } | {
465
+ readonly _tag: "Retry";
466
+ } | {
467
+ readonly _tag: "Reuse";
468
+ }, {
469
+ readonly _tag: Tag;
470
+ }>) => any; }>(cases: Cases): (value: {
471
+ readonly _tag: "Connect";
472
+ readonly method: Transport.Method;
473
+ } | {
474
+ readonly _tag: "Retry";
475
+ } | {
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
+ readonly _tag: "Connect";
480
+ readonly method: Transport.Method;
481
+ } | {
482
+ readonly _tag: "Retry";
483
+ } | {
484
+ readonly _tag: "Reuse";
485
+ }, {
486
+ readonly _tag: Tag;
487
+ }>) => any; }>(value: {
488
+ readonly _tag: "Connect";
489
+ readonly method: Transport.Method;
490
+ } | {
491
+ readonly _tag: "Retry";
492
+ } | {
493
+ readonly _tag: "Reuse";
494
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Connect" | "Retry" | "Reuse"]>>;
495
+ };
496
+ readonly Connect: Data.TaggedEnum.ConstructorFrom<{
497
+ readonly _tag: "Connect";
498
+ readonly method: Transport.Method;
499
+ }, "_tag">;
500
+ readonly Retry: Data.TaggedEnum.ConstructorFrom<{
501
+ readonly _tag: "Retry";
502
+ }, "_tag">;
503
+ readonly Reuse: Data.TaggedEnum.ConstructorFrom<{
504
+ readonly _tag: "Reuse";
505
+ }, "_tag">;
506
+ };
507
+ interface Model$2 {
508
+ readonly command: Atom.AtomResultFn<Command$2, void>;
509
+ readonly state: Atom.Atom<State$2>;
510
+ }
511
+ declare function useModel$2(domain: string): Model$2;
512
+ declare function useController$2(domain: string): Controller$2;
311
513
  interface RootState$1 extends Record<string, unknown> {
312
514
  readonly status: State$2["_tag"];
313
515
  }
314
- interface RootProps$2 extends PartProps<"div", RootState$1> {
516
+ interface RootProps$5 extends PartProps<"div", RootState$1> {
315
517
  readonly status?: State$2["_tag"];
316
518
  }
317
- declare function Root$2({ children, status, ...props }: RootProps$2): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
519
+ declare function Root$5({ children, status, ...props }: RootProps$5): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
318
520
  interface StatusState extends Record<string, unknown> {
319
521
  readonly status: State$2["_tag"];
320
522
  }
321
523
  interface StatusProps$2 extends PartProps<"div", StatusState> {
322
524
  readonly state: State$2;
323
525
  }
324
- declare function Status$2({ state, ...props }: StatusProps$2): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
325
- interface TriggerProps extends ComponentPropsWithoutRef<typeof Dialog.Trigger> {
326
- readonly provider: Provider;
526
+ declare function Status$2({ children, state, ...props }: StatusProps$2): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
527
+ interface TriggerProps extends Omit<ComponentPropsWithoutRef<typeof Dialog.Trigger>, "children"> {
528
+ readonly children: ReactNode;
529
+ }
530
+ interface ConnectTriggerProps extends Omit<TriggerProps, "children"> {
531
+ readonly children?: ReactNode;
532
+ readonly provider: ProviderDescriptor;
327
533
  }
328
- declare function Trigger({ provider, ...props }: TriggerProps): import("react/jsx-runtime").JSX.Element;
534
+ declare function Trigger({ children, ...props }: TriggerProps): import("react/jsx-runtime").JSX.Element;
535
+ declare function ConnectTrigger({ children, provider, ...props }: ConnectTriggerProps): import("react/jsx-runtime").JSX.Element;
329
536
  interface ActionState extends Record<string, unknown> {
330
537
  readonly authentication: "oauth" | "reuse" | "token";
331
538
  }
332
539
  interface OAuthActionProps extends PartProps<"button", ActionState> {
333
- readonly controller: Controller$1;
540
+ readonly controller: Controller$2;
334
541
  readonly label: string;
335
542
  }
336
543
  declare function OAuthAction({ controller, label, ...props }: OAuthActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
337
544
  interface ReuseActionProps extends PartProps<"button", ActionState> {
338
- readonly controller: Controller$1;
545
+ readonly controller: Controller$2;
339
546
  readonly label: string;
340
547
  }
341
548
  declare function ReuseAction({ controller, label, ...props }: ReuseActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
342
549
  interface TokenActionProps extends Omit<PartProps<"form", ActionState>, "method"> {
343
- readonly controller: Controller$1;
344
- readonly method: Extract<AuthenticationMethod, {
550
+ readonly controller: Controller$2;
551
+ readonly method: Extract<Transport.AuthenticationMethod, {
345
552
  readonly _tag: "Token";
346
553
  }>;
347
554
  }
348
555
  declare function TokenAction({ controller, method, ...props }: TokenActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
349
556
  interface DialogProps {
350
- readonly controller: Controller$1;
557
+ readonly controller: Controller$2;
351
558
  readonly snapshot: Disconnected;
352
559
  }
353
- declare function Dialog$1({ controller, snapshot }: DialogProps): import("react/jsx-runtime").JSX.Element;
354
- interface FlowProps$2 extends Omit<RootProps$2, "children"> {
560
+ declare function Dialog$2({ controller, snapshot }: DialogProps): import("react/jsx-runtime").JSX.Element;
561
+ interface FlowProps$2 extends Omit<RootProps$5, "children"> {
355
562
  readonly domain: string;
356
563
  }
357
564
  declare function Flow$2({ domain, ...props }: FlowProps$2): import("react/jsx-runtime").JSX.Element;
358
565
  interface RetryActionProps extends PartProps<"button", {
359
566
  readonly status: "Failure";
360
567
  }> {
361
- readonly controller: Controller$1;
568
+ readonly controller: Controller$2;
362
569
  readonly kind?: "after-user-action" | "retry";
363
570
  }
364
- declare function RetryAction({ controller, kind, ...props }: RetryActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
365
- type DisconnectState = {
366
- readonly _tag: "Idle";
367
- } | {
368
- readonly _tag: "Disconnecting";
369
- } | RemoveDomainResult | Failure;
370
- declare function useDisconnect(connection: Connected): {
371
- readonly disconnect: () => Promise<void>;
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: {};
575
+ }>;
576
+ declare const DisconnectState: {
577
+ readonly $is: <Tag extends "Disconnecting" | "Idle">(tag: Tag) => (u: unknown) => u is Extract<{
578
+ readonly _tag: "Disconnecting";
579
+ }, {
580
+ readonly _tag: Tag;
581
+ }> | Extract<{
582
+ readonly _tag: "Idle";
583
+ }, {
584
+ readonly _tag: Tag;
585
+ }>;
586
+ readonly $match: {
587
+ <Cases extends { readonly [Tag in "Disconnecting" | "Idle"]: (args: Extract<{
588
+ readonly _tag: "Disconnecting";
589
+ } | {
590
+ readonly _tag: "Idle";
591
+ }, {
592
+ readonly _tag: Tag;
593
+ }>) => any; }>(cases: Cases): (value: {
594
+ readonly _tag: "Disconnecting";
595
+ } | {
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";
600
+ } | {
601
+ readonly _tag: "Idle";
602
+ }, {
603
+ readonly _tag: Tag;
604
+ }>) => any; }>(value: {
605
+ readonly _tag: "Disconnecting";
606
+ } | {
607
+ readonly _tag: "Idle";
608
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Disconnecting" | "Idle"]>>;
609
+ };
610
+ readonly Disconnecting: Data.TaggedEnum.ConstructorFrom<{
611
+ readonly _tag: "Disconnecting";
612
+ }, "_tag">;
613
+ readonly Idle: Data.TaggedEnum.ConstructorFrom<{
614
+ readonly _tag: "Idle";
615
+ }, "_tag">;
616
+ };
617
+ type DisconnectState = LocalDisconnectState | Transport.RemoveDomainResult | Failure;
618
+ declare function useDisconnect(connection: Transport.Connected): {
619
+ readonly disconnect: () => void;
372
620
  readonly state: DisconnectState;
373
621
  };
374
622
  interface DisconnectActionProps extends PartProps<"div", {
375
623
  readonly status: DisconnectState["_tag"];
376
624
  }> {
377
- readonly connection: Connected;
625
+ readonly connection: Transport.Connected;
378
626
  }
379
627
  declare function DisconnectAction({ connection, ...props }: DisconnectActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
628
+ type Connected = Transport.Connected;
380
629
  declare namespace domain_d_exports {
381
630
  export { Flow$1 as Flow, FlowProps$1 as FlowProps };
382
631
  }
383
632
  interface FlowProps$1 {
384
633
  readonly domain: string;
385
634
  readonly receiptId?: string;
386
- readonly records: ReadonlyArray<DnsRecord>;
635
+ readonly records: ReadonlyArray<Transport.DnsRecord>;
387
636
  }
388
637
  declare function Flow$1({ domain, receiptId, records }: FlowProps$1): import("react/jsx-runtime").JSX.Element;
389
638
  //#endregion
@@ -411,6 +660,7 @@ interface Catalog {
411
660
  readonly cleaningDns: string;
412
661
  readonly connectProvider: (provider: string) => string;
413
662
  readonly connected: (provider: string) => string;
663
+ readonly providerAvailable: (provider: string) => string;
414
664
  readonly connecting: string;
415
665
  readonly close: string;
416
666
  readonly detectingProvider: string;
@@ -452,12 +702,12 @@ interface Theme {
452
702
  }
453
703
  declare function toStyle(theme?: Theme): CSSProperties;
454
704
  declare namespace domain_kit_d_exports {
455
- export { Root$1 as Root, RootProps$1 as RootProps, RootState, useDomainKit };
705
+ export { Root$4 as Root, RootProps$4 as RootProps, RootState, useDomainKit };
456
706
  }
457
707
  interface RootState extends Record<string, unknown> {
458
708
  readonly colorScheme: "dark" | "inherit" | "light";
459
709
  }
460
- interface RootProps$1 extends Omit<PartProps<"div", RootState>, "children"> {
710
+ interface RootProps$4 extends Omit<PartProps<"div", RootState>, "children"> {
461
711
  readonly children: ReactNode;
462
712
  readonly colorScheme?: RootState["colorScheme"];
463
713
  readonly icons?: Partial<Icons>;
@@ -466,7 +716,7 @@ interface RootProps$1 extends Omit<PartProps<"div", RootState>, "children"> {
466
716
  readonly navigate?: (url: string) => void;
467
717
  readonly portalContainer?: HTMLElement | null;
468
718
  readonly theme?: Theme;
469
- readonly transport: DomainKitTransport;
719
+ readonly transport: Layer.Layer<Transport.Service>;
470
720
  }
471
721
  interface ContextValue {
472
722
  readonly colorScheme: RootState["colorScheme"];
@@ -475,65 +725,328 @@ interface ContextValue {
475
725
  readonly messages: Catalog;
476
726
  readonly portalContainer: RefObject<HTMLElement | null>;
477
727
  readonly themeStyle: ReturnType<typeof toStyle>;
478
- readonly transport: DomainKitTransport;
728
+ readonly runtime: Runtime;
479
729
  }
480
- declare function Root$1({ children, colorScheme, icons, marks, messages, navigate, portalContainer, theme, transport, ...props }: RootProps$1): import("react/jsx-runtime").JSX.Element;
730
+ declare function Root$4({ children, colorScheme, icons, marks, messages, navigate, portalContainer, theme, transport, ...props }: RootProps$4): import("react/jsx-runtime").JSX.Element;
481
731
  declare function useDomainKit(): ContextValue;
732
+ declare namespace operations_d_exports {
733
+ 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 };
734
+ }
735
+ type Operation = Transport.ProvisioningPlan["operations"][number] | Transport.CleanupPlan["operations"][number];
736
+ type LeafState$1 = Record$1<string, unknown>;
737
+ declare const Kind: (props: PartProps<"span", LeafState$1>) => ReactElement;
738
+ declare const Type: (props: PartProps<"strong", LeafState$1>) => ReactElement;
739
+ declare const Record$1: (props: PartProps<"span", LeafState$1>) => ReactElement;
740
+ declare const Name: (props: PartProps<"span", LeafState$1>) => ReactElement;
741
+ declare const Value$1: (props: PartProps<"code", LeafState$1>) => ReactElement;
742
+ declare const Priority$1: (props: PartProps<"span", LeafState$1>) => ReactElement;
743
+ declare const Reason: (props: PartProps<"span", LeafState$1>) => ReactElement;
744
+ interface ItemProps extends PartProps<"li", {
745
+ readonly operation: Operation["_tag"];
746
+ }> {
747
+ readonly operation: Operation;
748
+ }
749
+ declare function Item({ operation, ...props }: ItemProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
750
+ interface RootProps$3 extends PartProps<"ul", {
751
+ readonly count: number;
752
+ readonly lifecycle: Lifecycle;
753
+ }> {
754
+ readonly count?: number;
755
+ readonly lifecycle: Lifecycle;
756
+ }
757
+ type Lifecycle = "cleanup" | "provisioning";
758
+ declare function Root$3({ count, lifecycle, ...props }: RootProps$3): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
759
+ interface ListProps extends Omit<RootProps$3, "children" | "count"> {
760
+ readonly operations: ReadonlyArray<Operation>;
761
+ }
762
+ declare function List({ lifecycle, operations, ...props }: ListProps): import("react/jsx-runtime").JSX.Element;
482
763
  declare namespace provisioning_d_exports {
483
- export { Controller, Flow, FlowProps, OperationList, State$1 as State, useController$1 as useController };
484
- }
485
- type State$1 = {
486
- readonly _tag: "Idle";
487
- } | {
488
- readonly _tag: "Planning";
489
- } | {
490
- readonly _tag: "Review";
491
- readonly plan: ProvisioningPlan;
492
- } | {
493
- readonly _tag: "Applying";
494
- readonly plan: ProvisioningPlan;
495
- } | {
496
- readonly _tag: "Complete";
497
- readonly result: Extract<ApplyResult, {
498
- readonly _tag: "Applied";
499
- }>;
500
- } | {
501
- readonly _tag: "Partial";
502
- readonly result: Extract<ApplyResult, {
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 };
765
+ }
766
+ type LocalState$1 = Data.TaggedEnum<{
767
+ Applying: {
768
+ readonly plan: Transport.ProvisioningPlan;
769
+ };
770
+ Complete: {
771
+ readonly result: Extract<Transport.ApplyResult, {
772
+ readonly _tag: "Applied";
773
+ }>;
774
+ };
775
+ Idle: {};
776
+ Partial: {
777
+ readonly result: Extract<Transport.ApplyResult, {
778
+ readonly _tag: "Partial";
779
+ }>;
780
+ };
781
+ Planning: {};
782
+ Review: {
783
+ readonly plan: Transport.ProvisioningPlan;
784
+ };
785
+ }>;
786
+ declare const State$1: {
787
+ readonly $is: <Tag extends "Applying" | "Complete" | "Idle" | "Partial" | "Planning" | "Review">(tag: Tag) => (u: unknown) => u is Extract<{
788
+ readonly _tag: "Applying";
789
+ readonly plan: Transport.ProvisioningPlan;
790
+ }, {
791
+ readonly _tag: Tag;
792
+ }> | Extract<{
793
+ readonly _tag: "Complete";
794
+ readonly result: Extract<Transport.ApplyResult, {
795
+ readonly _tag: "Applied";
796
+ }>;
797
+ }, {
798
+ readonly _tag: Tag;
799
+ }> | Extract<{
800
+ readonly _tag: "Idle";
801
+ }, {
802
+ readonly _tag: Tag;
803
+ }> | Extract<{
503
804
  readonly _tag: "Partial";
805
+ readonly result: Extract<Transport.ApplyResult, {
806
+ readonly _tag: "Partial";
807
+ }>;
808
+ }, {
809
+ readonly _tag: Tag;
810
+ }> | Extract<{
811
+ readonly _tag: "Planning";
812
+ }, {
813
+ readonly _tag: Tag;
814
+ }> | Extract<{
815
+ readonly _tag: "Review";
816
+ readonly plan: Transport.ProvisioningPlan;
817
+ }, {
818
+ readonly _tag: Tag;
504
819
  }>;
505
- } | {
820
+ readonly $match: {
821
+ <Cases extends { readonly [Tag in "Applying" | "Complete" | "Idle" | "Partial" | "Planning" | "Review"]: (args: Extract<{
822
+ readonly _tag: "Applying";
823
+ readonly plan: Transport.ProvisioningPlan;
824
+ } | {
825
+ readonly _tag: "Complete";
826
+ readonly result: Extract<Transport.ApplyResult, {
827
+ readonly _tag: "Applied";
828
+ }>;
829
+ } | {
830
+ readonly _tag: "Idle";
831
+ } | {
832
+ readonly _tag: "Partial";
833
+ readonly result: Extract<Transport.ApplyResult, {
834
+ readonly _tag: "Partial";
835
+ }>;
836
+ } | {
837
+ readonly _tag: "Planning";
838
+ } | {
839
+ readonly _tag: "Review";
840
+ readonly plan: Transport.ProvisioningPlan;
841
+ }, {
842
+ readonly _tag: Tag;
843
+ }>) => any; }>(cases: Cases): (value: {
844
+ readonly _tag: "Applying";
845
+ readonly plan: Transport.ProvisioningPlan;
846
+ } | {
847
+ readonly _tag: "Complete";
848
+ readonly result: Extract<Transport.ApplyResult, {
849
+ readonly _tag: "Applied";
850
+ }>;
851
+ } | {
852
+ readonly _tag: "Idle";
853
+ } | {
854
+ readonly _tag: "Partial";
855
+ readonly result: Extract<Transport.ApplyResult, {
856
+ readonly _tag: "Partial";
857
+ }>;
858
+ } | {
859
+ readonly _tag: "Planning";
860
+ } | {
861
+ readonly _tag: "Review";
862
+ readonly plan: Transport.ProvisioningPlan;
863
+ }) => import("effect/Unify").Unify<ReturnType<Cases["Applying" | "Complete" | "Idle" | "Partial" | "Planning" | "Review"]>>;
864
+ <Cases extends { readonly [Tag in "Applying" | "Complete" | "Idle" | "Partial" | "Planning" | "Review"]: (args: Extract<{
865
+ readonly _tag: "Applying";
866
+ readonly plan: Transport.ProvisioningPlan;
867
+ } | {
868
+ readonly _tag: "Complete";
869
+ readonly result: Extract<Transport.ApplyResult, {
870
+ readonly _tag: "Applied";
871
+ }>;
872
+ } | {
873
+ readonly _tag: "Idle";
874
+ } | {
875
+ readonly _tag: "Partial";
876
+ readonly result: Extract<Transport.ApplyResult, {
877
+ readonly _tag: "Partial";
878
+ }>;
879
+ } | {
880
+ readonly _tag: "Planning";
881
+ } | {
882
+ readonly _tag: "Review";
883
+ readonly plan: Transport.ProvisioningPlan;
884
+ }, {
885
+ readonly _tag: Tag;
886
+ }>) => any; }>(value: {
887
+ readonly _tag: "Applying";
888
+ readonly plan: Transport.ProvisioningPlan;
889
+ } | {
890
+ readonly _tag: "Complete";
891
+ readonly result: Extract<Transport.ApplyResult, {
892
+ readonly _tag: "Applied";
893
+ }>;
894
+ } | {
895
+ readonly _tag: "Idle";
896
+ } | {
897
+ readonly _tag: "Partial";
898
+ readonly result: Extract<Transport.ApplyResult, {
899
+ readonly _tag: "Partial";
900
+ }>;
901
+ } | {
902
+ readonly _tag: "Planning";
903
+ } | {
904
+ readonly _tag: "Review";
905
+ readonly plan: Transport.ProvisioningPlan;
906
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Applying" | "Complete" | "Idle" | "Partial" | "Planning" | "Review"]>>;
907
+ };
908
+ readonly Applying: Data.TaggedEnum.ConstructorFrom<{
909
+ readonly _tag: "Applying";
910
+ readonly plan: Transport.ProvisioningPlan;
911
+ }, "_tag">;
912
+ readonly Complete: Data.TaggedEnum.ConstructorFrom<{
913
+ readonly _tag: "Complete";
914
+ readonly result: Extract<Transport.ApplyResult, {
915
+ readonly _tag: "Applied";
916
+ }>;
917
+ }, "_tag">;
918
+ readonly Idle: Data.TaggedEnum.ConstructorFrom<{
919
+ readonly _tag: "Idle";
920
+ }, "_tag">;
921
+ readonly Partial: Data.TaggedEnum.ConstructorFrom<{
922
+ readonly _tag: "Partial";
923
+ readonly result: Extract<Transport.ApplyResult, {
924
+ readonly _tag: "Partial";
925
+ }>;
926
+ }, "_tag">;
927
+ readonly Planning: Data.TaggedEnum.ConstructorFrom<{
928
+ readonly _tag: "Planning";
929
+ }, "_tag">;
930
+ readonly Review: Data.TaggedEnum.ConstructorFrom<{
931
+ readonly _tag: "Review";
932
+ readonly plan: Transport.ProvisioningPlan;
933
+ }, "_tag">;
934
+ };
935
+ type State$1 = LocalState$1 | Extract<Transport.ApplyResult, {
506
936
  readonly _tag: "Stale";
507
- readonly message: string;
508
- } | Failure;
509
- interface Controller {
510
- readonly apply: () => Promise<void>;
937
+ }> | Failure;
938
+ interface Controller$1 {
939
+ readonly apply: () => void;
511
940
  readonly dismiss: () => void;
512
- readonly plan: () => Promise<void>;
513
- readonly retry: () => Promise<void>;
941
+ readonly plan: () => void;
942
+ readonly retry: () => void;
514
943
  readonly state: State$1;
515
944
  }
516
- declare function useController$1(connection: Connected, records: ReadonlyArray<DnsRecord>, onApplied?: (result: Extract<ApplyResult, {
945
+ type Command$1 = Data.TaggedEnum<{
946
+ Apply: {};
947
+ Dismiss: {};
948
+ Plan: {};
949
+ }>;
950
+ declare const Command$1: {
951
+ readonly $is: <Tag extends "Apply" | "Dismiss" | "Plan">(tag: Tag) => (u: unknown) => u is Extract<{
952
+ readonly _tag: "Apply";
953
+ }, {
954
+ readonly _tag: Tag;
955
+ }> | Extract<{
956
+ readonly _tag: "Dismiss";
957
+ }, {
958
+ readonly _tag: Tag;
959
+ }> | Extract<{
960
+ readonly _tag: "Plan";
961
+ }, {
962
+ readonly _tag: Tag;
963
+ }>;
964
+ readonly $match: {
965
+ <Cases extends { readonly [Tag in "Apply" | "Dismiss" | "Plan"]: (args: Extract<{
966
+ readonly _tag: "Apply";
967
+ } | {
968
+ readonly _tag: "Dismiss";
969
+ } | {
970
+ readonly _tag: "Plan";
971
+ }, {
972
+ readonly _tag: Tag;
973
+ }>) => any; }>(cases: Cases): (value: {
974
+ readonly _tag: "Apply";
975
+ } | {
976
+ readonly _tag: "Dismiss";
977
+ } | {
978
+ readonly _tag: "Plan";
979
+ }) => import("effect/Unify").Unify<ReturnType<Cases["Apply" | "Dismiss" | "Plan"]>>;
980
+ <Cases extends { readonly [Tag in "Apply" | "Dismiss" | "Plan"]: (args: Extract<{
981
+ readonly _tag: "Apply";
982
+ } | {
983
+ readonly _tag: "Dismiss";
984
+ } | {
985
+ readonly _tag: "Plan";
986
+ }, {
987
+ readonly _tag: Tag;
988
+ }>) => any; }>(value: {
989
+ readonly _tag: "Apply";
990
+ } | {
991
+ readonly _tag: "Dismiss";
992
+ } | {
993
+ readonly _tag: "Plan";
994
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Apply" | "Dismiss" | "Plan"]>>;
995
+ };
996
+ readonly Apply: Data.TaggedEnum.ConstructorFrom<{
997
+ readonly _tag: "Apply";
998
+ }, "_tag">;
999
+ readonly Dismiss: Data.TaggedEnum.ConstructorFrom<{
1000
+ readonly _tag: "Dismiss";
1001
+ }, "_tag">;
1002
+ readonly Plan: Data.TaggedEnum.ConstructorFrom<{
1003
+ readonly _tag: "Plan";
1004
+ }, "_tag">;
1005
+ };
1006
+ interface Model$1 {
1007
+ readonly command: Atom.AtomResultFn<Command$1, void>;
1008
+ readonly state: Atom.Atom<State$1>;
1009
+ }
1010
+ declare function useModel$1(connection: Transport.Connected, records: ReadonlyArray<Transport.DnsRecord>, onApplied?: (result: Extract<Transport.ApplyResult, {
1011
+ readonly _tag: "Applied" | "Partial";
1012
+ }>) => void): Model$1;
1013
+ declare function useController$1(connection: Transport.Connected, records: ReadonlyArray<Transport.DnsRecord>, onApplied?: (result: Extract<Transport.ApplyResult, {
517
1014
  readonly _tag: "Applied" | "Partial";
518
- }>) => void): Controller;
519
- interface FlowProps extends PartProps<"div", {
1015
+ }>) => void): Controller$1;
1016
+ interface RootProps$2 extends PartProps<"div", {
520
1017
  readonly status: State$1["_tag"];
521
1018
  }> {
522
- readonly connection: Connected;
523
- readonly onApplied?: (result: Extract<ApplyResult, {
1019
+ readonly status: State$1["_tag"];
1020
+ }
1021
+ declare function Root$2({ status, ...props }: RootProps$2): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
1022
+ declare function Outcome$1({ state }: {
1023
+ readonly state: State$1;
1024
+ }): import("react/jsx-runtime").JSX.Element | null;
1025
+ declare function Dialog$1({ controller }: {
1026
+ readonly controller: Controller$1;
1027
+ }): import("react/jsx-runtime").JSX.Element;
1028
+ declare function RetryAction({ controller }: {
1029
+ readonly controller: Controller$1;
1030
+ }): import("react/jsx-runtime").JSX.Element | null;
1031
+ interface FlowProps extends Omit<RootProps$2, "status"> {
1032
+ readonly connection: Transport.Connected;
1033
+ readonly onApplied?: (result: Extract<Transport.ApplyResult, {
524
1034
  readonly _tag: "Applied" | "Partial";
525
1035
  }>) => void;
526
- readonly records: ReadonlyArray<DnsRecord>;
1036
+ readonly records: ReadonlyArray<Transport.DnsRecord>;
527
1037
  readonly showRecords?: boolean;
528
1038
  }
529
- declare function Flow({ connection, onApplied, records, showRecords, ...props }: FlowProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
530
- declare function OperationList({ plan }: {
531
- readonly plan: ProvisioningPlan;
532
- }): import("react/jsx-runtime").JSX.Element;
1039
+ declare function Flow({ connection, onApplied, records, showRecords, ...props }: FlowProps): import("react/jsx-runtime").JSX.Element;
533
1040
  declare namespace records_d_exports {
534
- export { Body, Caption, Card, CardContent, CardHeader, CardProps, CardTitle, Cell, CopyValue, CopyValueProps, DnsRecord, Footer, Head, Header, ObservationEvidence, Priority, PriorityProps, Root, RootProps, Row, Status$1 as Status, StatusProps$1 as StatusProps, Table, TableProps, Value, ZoneFile, ZoneFileProps, toZoneFile };
1041
+ 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 };
535
1042
  }
1043
+ declare const copyText: (value: string) => Promise<boolean>;
536
1044
  type LeafState = Record<string, unknown>;
1045
+ interface CopyController {
1046
+ readonly copied: boolean;
1047
+ readonly copy: () => void;
1048
+ }
1049
+ declare function useCopy(value: string, resetAfter?: number): CopyController;
537
1050
  interface CopyValueProps extends PartProps<"span", {
538
1051
  readonly copied: boolean;
539
1052
  }> {
@@ -554,13 +1067,13 @@ interface ZoneFileProps extends PartProps<"div", {
554
1067
  readonly domain: string;
555
1068
  readonly downloadIcon?: ReactNode;
556
1069
  readonly downloadLabel?: string;
557
- readonly records: ReadonlyArray<DnsRecord>;
1070
+ readonly records: ReadonlyArray<Transport.DnsRecord>;
558
1071
  }
559
1072
  declare function ZoneFile({ copiedIcon, copiedLabel, copyIcon, copyLabel, domain, downloadIcon, downloadLabel, records, ...props }: ZoneFileProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
560
1073
  interface StatusProps$1 extends PartProps<"span", {
561
- readonly status: ObservationEvidence["_tag"];
1074
+ readonly status: Transport.ObservationEvidence["_tag"];
562
1075
  }> {
563
- readonly evidence: ObservationEvidence;
1076
+ readonly evidence: Transport.ObservationEvidence;
564
1077
  }
565
1078
  declare function Status$1({ evidence, ...props }: StatusProps$1): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
566
1079
  interface PriorityProps extends PartProps<"span", {
@@ -580,19 +1093,19 @@ declare const Value: (props: PartProps<"span", LeafState>) => ReactElement;
580
1093
  declare const CardHeader: (props: PartProps<"div", LeafState>) => ReactElement;
581
1094
  declare const CardTitle: (props: PartProps<"strong", LeafState>) => ReactElement;
582
1095
  declare const CardContent: (props: PartProps<"dl", LeafState>) => ReactElement;
583
- interface RootProps extends PartProps<"table", {
1096
+ interface RootProps$1 extends PartProps<"table", {
584
1097
  readonly count: number;
585
1098
  }> {
586
1099
  readonly count?: number;
587
1100
  }
588
- declare function Root({ count, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
1101
+ declare function Root$1({ count, ...props }: RootProps$1): import("react/jsx-runtime").JSX.Element;
589
1102
  interface CardProps extends PartProps<"section", {
590
1103
  readonly recordId: string;
591
1104
  }> {
592
1105
  readonly copiedIcon?: ReactNode;
593
1106
  readonly copyIcon?: ReactNode;
594
- readonly evidence?: ReadonlyArray<ObservationEvidence>;
595
- readonly record: DnsRecord;
1107
+ readonly evidence?: ReadonlyArray<Transport.ObservationEvidence>;
1108
+ readonly record: Transport.DnsRecord;
596
1109
  }
597
1110
  declare function Card({ copiedIcon, copyIcon, evidence, record, ...props }: CardProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
598
1111
  interface TableProps extends PartProps<"table", {
@@ -600,67 +1113,183 @@ interface TableProps extends PartProps<"table", {
600
1113
  }> {
601
1114
  readonly copiedIcon?: ReactNode;
602
1115
  readonly copyIcon?: ReactNode;
603
- readonly evidence?: ReadonlyArray<ObservationEvidence>;
604
- readonly records: ReadonlyArray<DnsRecord>;
1116
+ readonly evidence?: ReadonlyArray<Transport.ObservationEvidence>;
1117
+ readonly records: ReadonlyArray<Transport.DnsRecord>;
605
1118
  }
606
1119
  declare function Table({ copiedIcon, copyIcon, evidence, records, ...props }: TableProps): import("react/jsx-runtime").JSX.Element;
607
- declare const toZoneFile: (records: ReadonlyArray<DnsRecord>) => string;
1120
+ declare const toZoneFile: (records: ReadonlyArray<Transport.DnsRecord>) => string;
1121
+ declare const downloadZoneFile: (domain: string, records: ReadonlyArray<Transport.DnsRecord>) => void;
1122
+ type DnsRecord = Transport.DnsRecord;
1123
+ type ObservationEvidence = Transport.ObservationEvidence;
608
1124
  declare namespace testing_d_exports {
609
1125
  export { FakeOptions, FakeTransport, makeFakeTransport, provider$1 as provider };
610
1126
  }
611
1127
  interface FakeOptions {
612
- readonly connect?: ConnectionResult;
613
- readonly inspect: ConnectionSnapshot | ReadonlyArray<ConnectionSnapshot>;
614
- readonly reuse?: Connected;
615
- readonly removeDomain?: RemoveDomainResult;
616
- readonly plan?: ProvisioningPlan;
617
- readonly apply?: ApplyResult;
618
- readonly observe?: Observation;
619
- readonly cleanupPlan?: CleanupPlan;
620
- readonly cleanupApply?: CleanupResult;
621
- }
622
- interface FakeTransport extends DomainKitTransport {
1128
+ readonly connect?: Transport.ConnectionResult;
1129
+ readonly inspect: Transport.ConnectionSnapshot | FakeFailure | ReadonlyArray<Transport.ConnectionSnapshot | FakeFailure>;
1130
+ readonly reuse?: Transport.Connected;
1131
+ readonly removeDomain?: Transport.RemoveDomainResult;
1132
+ readonly plan?: Transport.ProvisioningPlan;
1133
+ readonly apply?: Transport.ApplyResult;
1134
+ readonly observe?: Transport.Observation;
1135
+ readonly cleanupPlan?: Transport.CleanupPlan;
1136
+ readonly cleanupApply?: Transport.CleanupResult;
1137
+ }
1138
+ interface FakeFailure {
1139
+ readonly _tag: "Failure";
1140
+ readonly message: string;
1141
+ readonly operation?: string;
1142
+ readonly retry: Transport.Failure["retry"];
1143
+ }
1144
+ interface FakeTransport extends Transport.AsyncInterface, Layer.Layer<Transport.Service> {
623
1145
  readonly calls: {
624
- readonly connect: Array<Parameters<DomainKitTransport["connection"]["connect"]>[0]>;
625
- readonly inspect: Array<Parameters<DomainKitTransport["connection"]["inspect"]>[0]>;
626
- readonly reuse: Array<Parameters<DomainKitTransport["connection"]["reuse"]>[0]>;
627
- readonly removeDomain: Array<Parameters<DomainKitTransport["connection"]["removeDomain"]>[0]>;
628
- readonly plan: Array<Parameters<DomainKitTransport["provisioning"]["plan"]>[0]>;
629
- readonly apply: Array<Parameters<DomainKitTransport["provisioning"]["apply"]>[0]>;
630
- readonly observe: Array<Parameters<DomainKitTransport["verification"]["observe"]>[0]>;
631
- readonly cleanupPlan: Array<Parameters<DomainKitTransport["cleanup"]["plan"]>[0]>;
632
- readonly cleanupApply: Array<Parameters<DomainKitTransport["cleanup"]["apply"]>[0]>;
1146
+ readonly connect: Array<Transport.ConnectInput>;
1147
+ readonly inspect: Array<Transport.InspectInput>;
1148
+ readonly reuse: Array<Transport.ReuseInput>;
1149
+ readonly removeDomain: Array<Transport.RemoveDomainInput>;
1150
+ readonly plan: Array<Transport.ProvisioningPlanInput>;
1151
+ readonly apply: Array<Transport.ProvisioningApplyInput>;
1152
+ readonly observe: Array<Transport.ObserveInput>;
1153
+ readonly cleanupPlan: Array<Transport.CleanupPlanInput>;
1154
+ readonly cleanupApply: Array<Transport.CleanupApplyInput>;
633
1155
  };
634
1156
  }
635
- declare const provider$1: (overrides?: Partial<Provider>) => Provider;
1157
+ declare const provider$1: (overrides?: Partial<Transport.Provider>) => Transport.Provider;
636
1158
  declare function makeFakeTransport(options: FakeOptions): FakeTransport;
637
1159
  declare namespace verification_d_exports {
638
- export { Observation, ObserveConfig, State, Status, StatusProps, useController };
1160
+ export { Command, Controller, Evidence, Model, Observation, ObserveAction, ObserveConfig, Outcome, Root, RootProps, State, Status, StatusProps, useController, useModel };
639
1161
  }
640
- type State = {
641
- readonly _tag: "Idle";
642
- } | {
643
- readonly _tag: "Observing";
644
- } | Observation | Failure;
1162
+ type LocalState = Data.TaggedEnum<{
1163
+ Idle: {};
1164
+ Observing: {};
1165
+ }>;
1166
+ declare const State: {
1167
+ readonly $is: <Tag extends "Idle" | "Observing">(tag: Tag) => (u: unknown) => u is Extract<{
1168
+ readonly _tag: "Idle";
1169
+ }, {
1170
+ readonly _tag: Tag;
1171
+ }> | Extract<{
1172
+ readonly _tag: "Observing";
1173
+ }, {
1174
+ readonly _tag: Tag;
1175
+ }>;
1176
+ readonly $match: {
1177
+ <Cases extends { readonly [Tag in "Idle" | "Observing"]: (args: Extract<{
1178
+ readonly _tag: "Idle";
1179
+ } | {
1180
+ readonly _tag: "Observing";
1181
+ }, {
1182
+ readonly _tag: Tag;
1183
+ }>) => any; }>(cases: Cases): (value: {
1184
+ readonly _tag: "Idle";
1185
+ } | {
1186
+ readonly _tag: "Observing";
1187
+ }) => import("effect/Unify").Unify<ReturnType<Cases["Idle" | "Observing"]>>;
1188
+ <Cases extends { readonly [Tag in "Idle" | "Observing"]: (args: Extract<{
1189
+ readonly _tag: "Idle";
1190
+ } | {
1191
+ readonly _tag: "Observing";
1192
+ }, {
1193
+ readonly _tag: Tag;
1194
+ }>) => any; }>(value: {
1195
+ readonly _tag: "Idle";
1196
+ } | {
1197
+ readonly _tag: "Observing";
1198
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Idle" | "Observing"]>>;
1199
+ };
1200
+ readonly Idle: Data.TaggedEnum.ConstructorFrom<{
1201
+ readonly _tag: "Idle";
1202
+ }, "_tag">;
1203
+ readonly Observing: Data.TaggedEnum.ConstructorFrom<{
1204
+ readonly _tag: "Observing";
1205
+ }, "_tag">;
1206
+ };
1207
+ type State = LocalState | Transport.Observation | Failure;
645
1208
  interface ObserveConfig {
646
- readonly connection?: Connected;
1209
+ readonly connection?: Transport.Connected;
647
1210
  readonly domain: string;
648
- readonly records: ReadonlyArray<DnsRecord>;
1211
+ readonly records: ReadonlyArray<Transport.DnsRecord>;
649
1212
  readonly sources?: {
650
1213
  readonly provider?: boolean;
651
1214
  readonly publicDns?: boolean;
652
1215
  };
653
1216
  }
654
- declare function useController(config: ObserveConfig): {
655
- readonly observe: () => Promise<void>;
656
- readonly state: State;
1217
+ type Command = Data.TaggedEnum<{
1218
+ Observe: {};
1219
+ Reset: {};
1220
+ }>;
1221
+ declare const Command: {
1222
+ readonly $is: <Tag extends "Observe" | "Reset">(tag: Tag) => (u: unknown) => u is Extract<{
1223
+ readonly _tag: "Observe";
1224
+ }, {
1225
+ readonly _tag: Tag;
1226
+ }> | Extract<{
1227
+ readonly _tag: "Reset";
1228
+ }, {
1229
+ readonly _tag: Tag;
1230
+ }>;
1231
+ readonly $match: {
1232
+ <Cases extends { readonly [Tag in "Observe" | "Reset"]: (args: Extract<{
1233
+ readonly _tag: "Observe";
1234
+ } | {
1235
+ readonly _tag: "Reset";
1236
+ }, {
1237
+ readonly _tag: Tag;
1238
+ }>) => any; }>(cases: Cases): (value: {
1239
+ readonly _tag: "Observe";
1240
+ } | {
1241
+ readonly _tag: "Reset";
1242
+ }) => import("effect/Unify").Unify<ReturnType<Cases["Observe" | "Reset"]>>;
1243
+ <Cases extends { readonly [Tag in "Observe" | "Reset"]: (args: Extract<{
1244
+ readonly _tag: "Observe";
1245
+ } | {
1246
+ readonly _tag: "Reset";
1247
+ }, {
1248
+ readonly _tag: Tag;
1249
+ }>) => any; }>(value: {
1250
+ readonly _tag: "Observe";
1251
+ } | {
1252
+ readonly _tag: "Reset";
1253
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Observe" | "Reset"]>>;
1254
+ };
1255
+ readonly Observe: Data.TaggedEnum.ConstructorFrom<{
1256
+ readonly _tag: "Observe";
1257
+ }, "_tag">;
1258
+ readonly Reset: Data.TaggedEnum.ConstructorFrom<{
1259
+ readonly _tag: "Reset";
1260
+ }, "_tag">;
657
1261
  };
658
- interface StatusProps extends PartProps<"div", {
1262
+ interface Model {
1263
+ readonly command: Atom.AtomResultFn<Command, void>;
1264
+ readonly state: Atom.Atom<State>;
1265
+ }
1266
+ interface Controller {
1267
+ readonly observe: () => void;
1268
+ readonly reset: () => void;
1269
+ readonly state: State;
1270
+ }
1271
+ declare function useModel(config: ObserveConfig): Model;
1272
+ declare function useController(config: ObserveConfig): Controller;
1273
+ interface RootProps extends PartProps<"div", {
659
1274
  readonly status: State["_tag"];
660
1275
  }> {
1276
+ readonly status: State["_tag"];
1277
+ }
1278
+ declare function Root({ status, ...props }: RootProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
1279
+ declare function Evidence({ observation }: {
1280
+ readonly observation: Transport.Observation;
1281
+ }): import("react/jsx-runtime").JSX.Element;
1282
+ declare function Outcome({ state }: {
1283
+ readonly state: State;
1284
+ }): import("react/jsx-runtime").JSX.Element | null;
1285
+ declare function ObserveAction({ controller }: {
1286
+ readonly controller: Controller;
1287
+ }): import("react/jsx-runtime").JSX.Element;
1288
+ interface StatusProps extends Omit<RootProps, "status"> {
661
1289
  readonly config: ObserveConfig;
662
1290
  }
663
- declare function Status({ config, ...props }: StatusProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
1291
+ declare function Status({ config, ...props }: StatusProps): import("react/jsx-runtime").JSX.Element;
1292
+ type Observation = Transport.Observation;
664
1293
  //#endregion
665
- 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, 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, transport_d_exports as Transport, verification_d_exports as Verification };
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 };
666
1295
  //# sourceMappingURL=index.d.mts.map