@domainkit/react 0.8.0 → 0.9.1
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/README.md +128 -36
- package/dist/index.d.mts +1219 -1308
- package/dist/index.mjs +2016 -1614
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1185 -1023
- package/package.json +2 -10
package/dist/index.d.mts
CHANGED
|
@@ -1,998 +1,1337 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Approval, DnsRecord, DomainKit, Plan, Reason, Receipt, Storage } from "domainkit";
|
|
2
|
+
import "effect/Effect";
|
|
3
|
+
import { CSSProperties, ElementType, ReactElement, ReactNode, RefObject } from "react";
|
|
2
4
|
import * as Data from "effect/Data";
|
|
3
|
-
import
|
|
4
|
-
import { CSSProperties, ComponentPropsWithoutRef, ElementType, ReactElement, ReactNode, RefObject } from "react";
|
|
5
|
+
import { Transport } from "domainkit/client";
|
|
5
6
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
type
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
readonly retry: Transport.Failure["retry"];
|
|
7
|
+
import { Testing } from "domainkit/testing";
|
|
8
|
+
//#region src/events.d.ts
|
|
9
|
+
/** What a customer finished doing, for host notifications, analytics, and audit trails. */
|
|
10
|
+
type Event = Data.TaggedEnum<{
|
|
11
|
+
Connected: {
|
|
12
|
+
readonly domain: string;
|
|
13
|
+
readonly connectionId: string;
|
|
14
|
+
readonly snapshot: Transport.Snapshot;
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
|
|
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"]>>;
|
|
16
|
+
Detached: {
|
|
17
|
+
readonly domain: string;
|
|
53
18
|
};
|
|
54
|
-
|
|
55
|
-
readonly
|
|
56
|
-
readonly
|
|
57
|
-
readonly operation: string;
|
|
58
|
-
readonly retry: Transport.Failure["retry"];
|
|
59
|
-
}, "_tag">;
|
|
60
|
-
};
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region src/composition.d.ts
|
|
63
|
-
type ClassName<State> = string | ((state: State) => string | undefined);
|
|
64
|
-
type Style<State> = CSSProperties | ((state: State) => CSSProperties | undefined);
|
|
65
|
-
type PartProps<Tag extends ElementType, State extends Record<string, unknown>> = Omit<useRender.ElementProps<Tag>, "className" | "style"> & {
|
|
66
|
-
readonly className?: ClassName<State>;
|
|
67
|
-
readonly render?: useRender.RenderProp<State>;
|
|
68
|
-
readonly style?: Style<State>;
|
|
69
|
-
};
|
|
70
|
-
declare namespace cleanup_d_exports {
|
|
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
|
-
}
|
|
73
|
-
type LocalState$3 = Data.TaggedEnum<{
|
|
74
|
-
Cleaned: {
|
|
75
|
-
readonly result: Extract<Transport.CleanupResult, {
|
|
76
|
-
readonly _tag: "Cleaned";
|
|
77
|
-
}>;
|
|
19
|
+
Disconnected: {
|
|
20
|
+
readonly domain: string;
|
|
21
|
+
readonly connectionId: string;
|
|
78
22
|
};
|
|
79
|
-
|
|
80
|
-
readonly
|
|
23
|
+
Applied: {
|
|
24
|
+
readonly domain: string;
|
|
25
|
+
readonly receipt: Receipt.Model;
|
|
81
26
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
readonly
|
|
85
|
-
readonly _tag: "Partial";
|
|
86
|
-
}>;
|
|
27
|
+
Cleaned: {
|
|
28
|
+
readonly domain: string;
|
|
29
|
+
readonly receipt: Receipt.Model;
|
|
87
30
|
};
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
readonly
|
|
31
|
+
Declined: {
|
|
32
|
+
readonly domain: string;
|
|
33
|
+
readonly attempt: Transport.Attempt;
|
|
34
|
+
};
|
|
35
|
+
Failed: {
|
|
36
|
+
readonly domain: string;
|
|
37
|
+
readonly error: DomainKit.Error;
|
|
91
38
|
};
|
|
92
39
|
}>;
|
|
93
|
-
declare const
|
|
94
|
-
readonly $is: <Tag extends "Cleaned" | "
|
|
40
|
+
declare const Event: {
|
|
41
|
+
readonly $is: <Tag extends "Applied" | "Cleaned" | "Connected" | "Declined" | "Detached" | "Disconnected" | "Failed">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
42
|
+
readonly _tag: "Applied";
|
|
43
|
+
readonly domain: string;
|
|
44
|
+
readonly receipt: Receipt.Model;
|
|
45
|
+
}, {
|
|
46
|
+
readonly _tag: Tag;
|
|
47
|
+
}> | Extract<{
|
|
95
48
|
readonly _tag: "Cleaned";
|
|
96
|
-
readonly
|
|
97
|
-
|
|
98
|
-
}>;
|
|
49
|
+
readonly domain: string;
|
|
50
|
+
readonly receipt: Receipt.Model;
|
|
99
51
|
}, {
|
|
100
52
|
readonly _tag: Tag;
|
|
101
53
|
}> | Extract<{
|
|
102
|
-
readonly _tag: "
|
|
103
|
-
readonly
|
|
54
|
+
readonly _tag: "Connected";
|
|
55
|
+
readonly domain: string;
|
|
56
|
+
readonly connectionId: string;
|
|
57
|
+
readonly snapshot: Transport.Snapshot;
|
|
104
58
|
}, {
|
|
105
59
|
readonly _tag: Tag;
|
|
106
60
|
}> | Extract<{
|
|
107
|
-
readonly _tag: "
|
|
61
|
+
readonly _tag: "Declined";
|
|
62
|
+
readonly domain: string;
|
|
63
|
+
readonly attempt: Transport.Attempt;
|
|
108
64
|
}, {
|
|
109
65
|
readonly _tag: Tag;
|
|
110
66
|
}> | Extract<{
|
|
111
|
-
readonly _tag: "
|
|
112
|
-
readonly
|
|
113
|
-
readonly _tag: "Partial";
|
|
114
|
-
}>;
|
|
67
|
+
readonly _tag: "Detached";
|
|
68
|
+
readonly domain: string;
|
|
115
69
|
}, {
|
|
116
70
|
readonly _tag: Tag;
|
|
117
71
|
}> | Extract<{
|
|
118
|
-
readonly _tag: "
|
|
72
|
+
readonly _tag: "Disconnected";
|
|
73
|
+
readonly domain: string;
|
|
74
|
+
readonly connectionId: string;
|
|
119
75
|
}, {
|
|
120
76
|
readonly _tag: Tag;
|
|
121
77
|
}> | Extract<{
|
|
122
|
-
readonly _tag: "
|
|
123
|
-
readonly
|
|
78
|
+
readonly _tag: "Failed";
|
|
79
|
+
readonly domain: string;
|
|
80
|
+
readonly error: DomainKit.Error;
|
|
124
81
|
}, {
|
|
125
82
|
readonly _tag: Tag;
|
|
126
83
|
}>;
|
|
127
84
|
readonly $match: {
|
|
128
|
-
<Cases extends { readonly [Tag in "Cleaned" | "
|
|
85
|
+
<Cases extends { readonly [Tag in "Applied" | "Cleaned" | "Connected" | "Declined" | "Detached" | "Disconnected" | "Failed"]: (args: Extract<{
|
|
86
|
+
readonly _tag: "Applied";
|
|
87
|
+
readonly domain: string;
|
|
88
|
+
readonly receipt: Receipt.Model;
|
|
89
|
+
} | {
|
|
129
90
|
readonly _tag: "Cleaned";
|
|
130
|
-
readonly
|
|
131
|
-
|
|
132
|
-
}>;
|
|
91
|
+
readonly domain: string;
|
|
92
|
+
readonly receipt: Receipt.Model;
|
|
133
93
|
} | {
|
|
134
|
-
readonly _tag: "
|
|
135
|
-
readonly
|
|
94
|
+
readonly _tag: "Connected";
|
|
95
|
+
readonly domain: string;
|
|
96
|
+
readonly connectionId: string;
|
|
97
|
+
readonly snapshot: Transport.Snapshot;
|
|
136
98
|
} | {
|
|
137
|
-
readonly _tag: "
|
|
99
|
+
readonly _tag: "Declined";
|
|
100
|
+
readonly domain: string;
|
|
101
|
+
readonly attempt: Transport.Attempt;
|
|
138
102
|
} | {
|
|
139
|
-
readonly _tag: "
|
|
140
|
-
readonly
|
|
141
|
-
readonly _tag: "Partial";
|
|
142
|
-
}>;
|
|
103
|
+
readonly _tag: "Detached";
|
|
104
|
+
readonly domain: string;
|
|
143
105
|
} | {
|
|
144
|
-
readonly _tag: "
|
|
106
|
+
readonly _tag: "Disconnected";
|
|
107
|
+
readonly domain: string;
|
|
108
|
+
readonly connectionId: string;
|
|
145
109
|
} | {
|
|
146
|
-
readonly _tag: "
|
|
147
|
-
readonly
|
|
110
|
+
readonly _tag: "Failed";
|
|
111
|
+
readonly domain: string;
|
|
112
|
+
readonly error: DomainKit.Error;
|
|
148
113
|
}, {
|
|
149
114
|
readonly _tag: Tag;
|
|
150
115
|
}>) => any; }>(cases: Cases): (value: {
|
|
116
|
+
readonly _tag: "Applied";
|
|
117
|
+
readonly domain: string;
|
|
118
|
+
readonly receipt: Receipt.Model;
|
|
119
|
+
} | {
|
|
151
120
|
readonly _tag: "Cleaned";
|
|
152
|
-
readonly
|
|
153
|
-
|
|
154
|
-
|
|
121
|
+
readonly domain: string;
|
|
122
|
+
readonly receipt: Receipt.Model;
|
|
123
|
+
} | {
|
|
124
|
+
readonly _tag: "Connected";
|
|
125
|
+
readonly domain: string;
|
|
126
|
+
readonly connectionId: string;
|
|
127
|
+
readonly snapshot: Transport.Snapshot;
|
|
155
128
|
} | {
|
|
156
|
-
readonly _tag: "
|
|
157
|
-
readonly
|
|
129
|
+
readonly _tag: "Declined";
|
|
130
|
+
readonly domain: string;
|
|
131
|
+
readonly attempt: Transport.Attempt;
|
|
158
132
|
} | {
|
|
159
|
-
readonly _tag: "
|
|
133
|
+
readonly _tag: "Detached";
|
|
134
|
+
readonly domain: string;
|
|
160
135
|
} | {
|
|
161
|
-
readonly _tag: "
|
|
162
|
-
readonly
|
|
163
|
-
|
|
164
|
-
}>;
|
|
136
|
+
readonly _tag: "Disconnected";
|
|
137
|
+
readonly domain: string;
|
|
138
|
+
readonly connectionId: string;
|
|
165
139
|
} | {
|
|
166
|
-
readonly _tag: "
|
|
140
|
+
readonly _tag: "Failed";
|
|
141
|
+
readonly domain: string;
|
|
142
|
+
readonly error: DomainKit.Error;
|
|
143
|
+
}) => import("effect/Unify").Unify<ReturnType<Cases["Applied" | "Cleaned" | "Connected" | "Declined" | "Detached" | "Disconnected" | "Failed"]>>;
|
|
144
|
+
<Cases extends { readonly [Tag in "Applied" | "Cleaned" | "Connected" | "Declined" | "Detached" | "Disconnected" | "Failed"]: (args: Extract<{
|
|
145
|
+
readonly _tag: "Applied";
|
|
146
|
+
readonly domain: string;
|
|
147
|
+
readonly receipt: Receipt.Model;
|
|
167
148
|
} | {
|
|
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
149
|
readonly _tag: "Cleaned";
|
|
173
|
-
readonly
|
|
174
|
-
|
|
175
|
-
}>;
|
|
150
|
+
readonly domain: string;
|
|
151
|
+
readonly receipt: Receipt.Model;
|
|
176
152
|
} | {
|
|
177
|
-
readonly _tag: "
|
|
178
|
-
readonly
|
|
153
|
+
readonly _tag: "Connected";
|
|
154
|
+
readonly domain: string;
|
|
155
|
+
readonly connectionId: string;
|
|
156
|
+
readonly snapshot: Transport.Snapshot;
|
|
179
157
|
} | {
|
|
180
|
-
readonly _tag: "
|
|
158
|
+
readonly _tag: "Declined";
|
|
159
|
+
readonly domain: string;
|
|
160
|
+
readonly attempt: Transport.Attempt;
|
|
181
161
|
} | {
|
|
182
|
-
readonly _tag: "
|
|
183
|
-
readonly
|
|
184
|
-
readonly _tag: "Partial";
|
|
185
|
-
}>;
|
|
162
|
+
readonly _tag: "Detached";
|
|
163
|
+
readonly domain: string;
|
|
186
164
|
} | {
|
|
187
|
-
readonly _tag: "
|
|
165
|
+
readonly _tag: "Disconnected";
|
|
166
|
+
readonly domain: string;
|
|
167
|
+
readonly connectionId: string;
|
|
188
168
|
} | {
|
|
189
|
-
readonly _tag: "
|
|
190
|
-
readonly
|
|
169
|
+
readonly _tag: "Failed";
|
|
170
|
+
readonly domain: string;
|
|
171
|
+
readonly error: DomainKit.Error;
|
|
191
172
|
}, {
|
|
192
173
|
readonly _tag: Tag;
|
|
193
174
|
}>) => any; }>(value: {
|
|
175
|
+
readonly _tag: "Applied";
|
|
176
|
+
readonly domain: string;
|
|
177
|
+
readonly receipt: Receipt.Model;
|
|
178
|
+
} | {
|
|
194
179
|
readonly _tag: "Cleaned";
|
|
195
|
-
readonly
|
|
196
|
-
|
|
197
|
-
}>;
|
|
180
|
+
readonly domain: string;
|
|
181
|
+
readonly receipt: Receipt.Model;
|
|
198
182
|
} | {
|
|
199
|
-
readonly _tag: "
|
|
200
|
-
readonly
|
|
183
|
+
readonly _tag: "Connected";
|
|
184
|
+
readonly domain: string;
|
|
185
|
+
readonly connectionId: string;
|
|
186
|
+
readonly snapshot: Transport.Snapshot;
|
|
201
187
|
} | {
|
|
202
|
-
readonly _tag: "
|
|
188
|
+
readonly _tag: "Declined";
|
|
189
|
+
readonly domain: string;
|
|
190
|
+
readonly attempt: Transport.Attempt;
|
|
203
191
|
} | {
|
|
204
|
-
readonly _tag: "
|
|
205
|
-
readonly
|
|
206
|
-
readonly _tag: "Partial";
|
|
207
|
-
}>;
|
|
192
|
+
readonly _tag: "Detached";
|
|
193
|
+
readonly domain: string;
|
|
208
194
|
} | {
|
|
209
|
-
readonly _tag: "
|
|
195
|
+
readonly _tag: "Disconnected";
|
|
196
|
+
readonly domain: string;
|
|
197
|
+
readonly connectionId: string;
|
|
210
198
|
} | {
|
|
211
|
-
readonly _tag: "
|
|
212
|
-
readonly
|
|
213
|
-
|
|
199
|
+
readonly _tag: "Failed";
|
|
200
|
+
readonly domain: string;
|
|
201
|
+
readonly error: DomainKit.Error;
|
|
202
|
+
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Applied" | "Cleaned" | "Connected" | "Declined" | "Detached" | "Disconnected" | "Failed"]>>;
|
|
214
203
|
};
|
|
204
|
+
readonly Applied: Data.TaggedEnum.ConstructorFrom<{
|
|
205
|
+
readonly _tag: "Applied";
|
|
206
|
+
readonly domain: string;
|
|
207
|
+
readonly receipt: Receipt.Model;
|
|
208
|
+
}, "_tag">;
|
|
215
209
|
readonly Cleaned: Data.TaggedEnum.ConstructorFrom<{
|
|
216
210
|
readonly _tag: "Cleaned";
|
|
217
|
-
readonly
|
|
218
|
-
|
|
219
|
-
}>;
|
|
211
|
+
readonly domain: string;
|
|
212
|
+
readonly receipt: Receipt.Model;
|
|
220
213
|
}, "_tag">;
|
|
221
|
-
readonly
|
|
222
|
-
readonly _tag: "
|
|
223
|
-
readonly
|
|
214
|
+
readonly Connected: Data.TaggedEnum.ConstructorFrom<{
|
|
215
|
+
readonly _tag: "Connected";
|
|
216
|
+
readonly domain: string;
|
|
217
|
+
readonly connectionId: string;
|
|
218
|
+
readonly snapshot: Transport.Snapshot;
|
|
224
219
|
}, "_tag">;
|
|
225
|
-
readonly
|
|
226
|
-
readonly _tag: "
|
|
220
|
+
readonly Declined: Data.TaggedEnum.ConstructorFrom<{
|
|
221
|
+
readonly _tag: "Declined";
|
|
222
|
+
readonly domain: string;
|
|
223
|
+
readonly attempt: Transport.Attempt;
|
|
227
224
|
}, "_tag">;
|
|
228
|
-
readonly
|
|
229
|
-
readonly _tag: "
|
|
230
|
-
readonly
|
|
231
|
-
readonly _tag: "Partial";
|
|
232
|
-
}>;
|
|
225
|
+
readonly Detached: Data.TaggedEnum.ConstructorFrom<{
|
|
226
|
+
readonly _tag: "Detached";
|
|
227
|
+
readonly domain: string;
|
|
233
228
|
}, "_tag">;
|
|
234
|
-
readonly
|
|
235
|
-
readonly _tag: "
|
|
229
|
+
readonly Disconnected: Data.TaggedEnum.ConstructorFrom<{
|
|
230
|
+
readonly _tag: "Disconnected";
|
|
231
|
+
readonly domain: string;
|
|
232
|
+
readonly connectionId: string;
|
|
236
233
|
}, "_tag">;
|
|
237
|
-
readonly
|
|
238
|
-
readonly _tag: "
|
|
239
|
-
readonly
|
|
234
|
+
readonly Failed: Data.TaggedEnum.ConstructorFrom<{
|
|
235
|
+
readonly _tag: "Failed";
|
|
236
|
+
readonly domain: string;
|
|
237
|
+
readonly error: DomainKit.Error;
|
|
240
238
|
}, "_tag">;
|
|
241
239
|
};
|
|
242
|
-
type
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
type
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
240
|
+
type Listener = (event: Event) => void;
|
|
241
|
+
//#endregion
|
|
242
|
+
//#region src/attempt.d.ts
|
|
243
|
+
type State$2 = Data.TaggedEnum<{
|
|
244
|
+
Idle: {};
|
|
245
|
+
Planning: {};
|
|
246
|
+
Planned: {
|
|
247
|
+
readonly plan: Plan.Model;
|
|
248
|
+
};
|
|
249
|
+
Approving: {
|
|
250
|
+
readonly plan: Plan.Model;
|
|
251
|
+
};
|
|
252
|
+
Applying: {
|
|
253
|
+
readonly plan: Plan.Model;
|
|
254
|
+
readonly approval: Approval.Model;
|
|
255
|
+
};
|
|
256
|
+
Applied: {
|
|
257
|
+
readonly plan: Plan.Model | null;
|
|
258
|
+
readonly receipt: Receipt.Model;
|
|
259
|
+
};
|
|
260
|
+
Rejecting: {
|
|
261
|
+
readonly plan: Plan.Model;
|
|
262
|
+
};
|
|
263
|
+
Rejected: {
|
|
264
|
+
readonly plan: Plan.Model;
|
|
265
|
+
readonly attempt: Transport.Attempt;
|
|
266
|
+
};
|
|
267
|
+
Failure: {
|
|
268
|
+
readonly error: DomainKit.Error;
|
|
269
|
+
};
|
|
249
270
|
}>;
|
|
250
|
-
declare const
|
|
251
|
-
readonly $is: <Tag extends "
|
|
252
|
-
readonly _tag: "
|
|
271
|
+
declare const State$2: {
|
|
272
|
+
readonly $is: <Tag extends "Applied" | "Applying" | "Approving" | "Failure" | "Idle" | "Planned" | "Planning" | "Rejected" | "Rejecting">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
273
|
+
readonly _tag: "Applied";
|
|
274
|
+
readonly plan: Plan.Model | null;
|
|
275
|
+
readonly receipt: Receipt.Model;
|
|
276
|
+
}, {
|
|
277
|
+
readonly _tag: Tag;
|
|
278
|
+
}> | Extract<{
|
|
279
|
+
readonly _tag: "Applying";
|
|
280
|
+
readonly plan: Plan.Model;
|
|
281
|
+
readonly approval: Approval.Model;
|
|
282
|
+
}, {
|
|
283
|
+
readonly _tag: Tag;
|
|
284
|
+
}> | Extract<{
|
|
285
|
+
readonly _tag: "Approving";
|
|
286
|
+
readonly plan: Plan.Model;
|
|
287
|
+
}, {
|
|
288
|
+
readonly _tag: Tag;
|
|
289
|
+
}> | Extract<{
|
|
290
|
+
readonly _tag: "Failure";
|
|
291
|
+
readonly error: DomainKit.Error;
|
|
292
|
+
}, {
|
|
293
|
+
readonly _tag: Tag;
|
|
294
|
+
}> | Extract<{
|
|
295
|
+
readonly _tag: "Idle";
|
|
296
|
+
}, {
|
|
297
|
+
readonly _tag: Tag;
|
|
298
|
+
}> | Extract<{
|
|
299
|
+
readonly _tag: "Planned";
|
|
300
|
+
readonly plan: Plan.Model;
|
|
253
301
|
}, {
|
|
254
302
|
readonly _tag: Tag;
|
|
255
303
|
}> | Extract<{
|
|
256
|
-
readonly _tag: "
|
|
304
|
+
readonly _tag: "Planning";
|
|
305
|
+
}, {
|
|
306
|
+
readonly _tag: Tag;
|
|
307
|
+
}> | Extract<{
|
|
308
|
+
readonly _tag: "Rejected";
|
|
309
|
+
readonly plan: Plan.Model;
|
|
310
|
+
readonly attempt: Transport.Attempt;
|
|
257
311
|
}, {
|
|
258
312
|
readonly _tag: Tag;
|
|
259
313
|
}> | Extract<{
|
|
260
|
-
readonly _tag: "
|
|
314
|
+
readonly _tag: "Rejecting";
|
|
315
|
+
readonly plan: Plan.Model;
|
|
261
316
|
}, {
|
|
262
317
|
readonly _tag: Tag;
|
|
263
318
|
}>;
|
|
264
319
|
readonly $match: {
|
|
265
|
-
<Cases extends { readonly [Tag in "
|
|
266
|
-
readonly _tag: "
|
|
320
|
+
<Cases extends { readonly [Tag in "Applied" | "Applying" | "Approving" | "Failure" | "Idle" | "Planned" | "Planning" | "Rejected" | "Rejecting"]: (args: Extract<{
|
|
321
|
+
readonly _tag: "Applied";
|
|
322
|
+
readonly plan: Plan.Model | null;
|
|
323
|
+
readonly receipt: Receipt.Model;
|
|
324
|
+
} | {
|
|
325
|
+
readonly _tag: "Applying";
|
|
326
|
+
readonly plan: Plan.Model;
|
|
327
|
+
readonly approval: Approval.Model;
|
|
328
|
+
} | {
|
|
329
|
+
readonly _tag: "Approving";
|
|
330
|
+
readonly plan: Plan.Model;
|
|
267
331
|
} | {
|
|
268
|
-
readonly _tag: "
|
|
332
|
+
readonly _tag: "Failure";
|
|
333
|
+
readonly error: DomainKit.Error;
|
|
334
|
+
} | {
|
|
335
|
+
readonly _tag: "Idle";
|
|
336
|
+
} | {
|
|
337
|
+
readonly _tag: "Planned";
|
|
338
|
+
readonly plan: Plan.Model;
|
|
269
339
|
} | {
|
|
270
|
-
readonly _tag: "
|
|
340
|
+
readonly _tag: "Planning";
|
|
341
|
+
} | {
|
|
342
|
+
readonly _tag: "Rejected";
|
|
343
|
+
readonly plan: Plan.Model;
|
|
344
|
+
readonly attempt: Transport.Attempt;
|
|
345
|
+
} | {
|
|
346
|
+
readonly _tag: "Rejecting";
|
|
347
|
+
readonly plan: Plan.Model;
|
|
271
348
|
}, {
|
|
272
349
|
readonly _tag: Tag;
|
|
273
350
|
}>) => any; }>(cases: Cases): (value: {
|
|
274
|
-
readonly _tag: "
|
|
351
|
+
readonly _tag: "Applied";
|
|
352
|
+
readonly plan: Plan.Model | null;
|
|
353
|
+
readonly receipt: Receipt.Model;
|
|
354
|
+
} | {
|
|
355
|
+
readonly _tag: "Applying";
|
|
356
|
+
readonly plan: Plan.Model;
|
|
357
|
+
readonly approval: Approval.Model;
|
|
358
|
+
} | {
|
|
359
|
+
readonly _tag: "Approving";
|
|
360
|
+
readonly plan: Plan.Model;
|
|
361
|
+
} | {
|
|
362
|
+
readonly _tag: "Failure";
|
|
363
|
+
readonly error: DomainKit.Error;
|
|
364
|
+
} | {
|
|
365
|
+
readonly _tag: "Idle";
|
|
366
|
+
} | {
|
|
367
|
+
readonly _tag: "Planned";
|
|
368
|
+
readonly plan: Plan.Model;
|
|
369
|
+
} | {
|
|
370
|
+
readonly _tag: "Planning";
|
|
371
|
+
} | {
|
|
372
|
+
readonly _tag: "Rejected";
|
|
373
|
+
readonly plan: Plan.Model;
|
|
374
|
+
readonly attempt: Transport.Attempt;
|
|
375
|
+
} | {
|
|
376
|
+
readonly _tag: "Rejecting";
|
|
377
|
+
readonly plan: Plan.Model;
|
|
378
|
+
}) => import("effect/Unify").Unify<ReturnType<Cases["Applied" | "Applying" | "Approving" | "Failure" | "Idle" | "Planned" | "Planning" | "Rejected" | "Rejecting"]>>;
|
|
379
|
+
<Cases extends { readonly [Tag in "Applied" | "Applying" | "Approving" | "Failure" | "Idle" | "Planned" | "Planning" | "Rejected" | "Rejecting"]: (args: Extract<{
|
|
380
|
+
readonly _tag: "Applied";
|
|
381
|
+
readonly plan: Plan.Model | null;
|
|
382
|
+
readonly receipt: Receipt.Model;
|
|
383
|
+
} | {
|
|
384
|
+
readonly _tag: "Applying";
|
|
385
|
+
readonly plan: Plan.Model;
|
|
386
|
+
readonly approval: Approval.Model;
|
|
387
|
+
} | {
|
|
388
|
+
readonly _tag: "Approving";
|
|
389
|
+
readonly plan: Plan.Model;
|
|
275
390
|
} | {
|
|
276
|
-
readonly _tag: "
|
|
391
|
+
readonly _tag: "Failure";
|
|
392
|
+
readonly error: DomainKit.Error;
|
|
393
|
+
} | {
|
|
394
|
+
readonly _tag: "Idle";
|
|
395
|
+
} | {
|
|
396
|
+
readonly _tag: "Planned";
|
|
397
|
+
readonly plan: Plan.Model;
|
|
277
398
|
} | {
|
|
278
|
-
readonly _tag: "
|
|
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";
|
|
399
|
+
readonly _tag: "Planning";
|
|
282
400
|
} | {
|
|
283
|
-
readonly _tag: "
|
|
401
|
+
readonly _tag: "Rejected";
|
|
402
|
+
readonly plan: Plan.Model;
|
|
403
|
+
readonly attempt: Transport.Attempt;
|
|
284
404
|
} | {
|
|
285
|
-
readonly _tag: "
|
|
405
|
+
readonly _tag: "Rejecting";
|
|
406
|
+
readonly plan: Plan.Model;
|
|
286
407
|
}, {
|
|
287
408
|
readonly _tag: Tag;
|
|
288
409
|
}>) => any; }>(value: {
|
|
289
|
-
readonly _tag: "
|
|
410
|
+
readonly _tag: "Applied";
|
|
411
|
+
readonly plan: Plan.Model | null;
|
|
412
|
+
readonly receipt: Receipt.Model;
|
|
413
|
+
} | {
|
|
414
|
+
readonly _tag: "Applying";
|
|
415
|
+
readonly plan: Plan.Model;
|
|
416
|
+
readonly approval: Approval.Model;
|
|
417
|
+
} | {
|
|
418
|
+
readonly _tag: "Approving";
|
|
419
|
+
readonly plan: Plan.Model;
|
|
420
|
+
} | {
|
|
421
|
+
readonly _tag: "Failure";
|
|
422
|
+
readonly error: DomainKit.Error;
|
|
423
|
+
} | {
|
|
424
|
+
readonly _tag: "Idle";
|
|
425
|
+
} | {
|
|
426
|
+
readonly _tag: "Planned";
|
|
427
|
+
readonly plan: Plan.Model;
|
|
428
|
+
} | {
|
|
429
|
+
readonly _tag: "Planning";
|
|
290
430
|
} | {
|
|
291
|
-
readonly _tag: "
|
|
431
|
+
readonly _tag: "Rejected";
|
|
432
|
+
readonly plan: Plan.Model;
|
|
433
|
+
readonly attempt: Transport.Attempt;
|
|
292
434
|
} | {
|
|
293
|
-
readonly _tag: "
|
|
294
|
-
|
|
435
|
+
readonly _tag: "Rejecting";
|
|
436
|
+
readonly plan: Plan.Model;
|
|
437
|
+
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Applied" | "Applying" | "Approving" | "Failure" | "Idle" | "Planned" | "Planning" | "Rejected" | "Rejecting"]>>;
|
|
295
438
|
};
|
|
296
|
-
readonly
|
|
297
|
-
readonly _tag: "
|
|
439
|
+
readonly Applied: Data.TaggedEnum.ConstructorFrom<{
|
|
440
|
+
readonly _tag: "Applied";
|
|
441
|
+
readonly plan: Plan.Model | null;
|
|
442
|
+
readonly receipt: Receipt.Model;
|
|
298
443
|
}, "_tag">;
|
|
299
|
-
readonly
|
|
300
|
-
readonly _tag: "
|
|
444
|
+
readonly Applying: Data.TaggedEnum.ConstructorFrom<{
|
|
445
|
+
readonly _tag: "Applying";
|
|
446
|
+
readonly plan: Plan.Model;
|
|
447
|
+
readonly approval: Approval.Model;
|
|
448
|
+
}, "_tag">;
|
|
449
|
+
readonly Approving: Data.TaggedEnum.ConstructorFrom<{
|
|
450
|
+
readonly _tag: "Approving";
|
|
451
|
+
readonly plan: Plan.Model;
|
|
452
|
+
}, "_tag">;
|
|
453
|
+
readonly Failure: Data.TaggedEnum.ConstructorFrom<{
|
|
454
|
+
readonly _tag: "Failure";
|
|
455
|
+
readonly error: DomainKit.Error;
|
|
456
|
+
}, "_tag">;
|
|
457
|
+
readonly Idle: Data.TaggedEnum.ConstructorFrom<{
|
|
458
|
+
readonly _tag: "Idle";
|
|
459
|
+
}, "_tag">;
|
|
460
|
+
readonly Planned: Data.TaggedEnum.ConstructorFrom<{
|
|
461
|
+
readonly _tag: "Planned";
|
|
462
|
+
readonly plan: Plan.Model;
|
|
463
|
+
}, "_tag">;
|
|
464
|
+
readonly Planning: Data.TaggedEnum.ConstructorFrom<{
|
|
465
|
+
readonly _tag: "Planning";
|
|
466
|
+
}, "_tag">;
|
|
467
|
+
readonly Rejected: Data.TaggedEnum.ConstructorFrom<{
|
|
468
|
+
readonly _tag: "Rejected";
|
|
469
|
+
readonly plan: Plan.Model;
|
|
470
|
+
readonly attempt: Transport.Attempt;
|
|
301
471
|
}, "_tag">;
|
|
302
|
-
readonly
|
|
303
|
-
readonly _tag: "
|
|
472
|
+
readonly Rejecting: Data.TaggedEnum.ConstructorFrom<{
|
|
473
|
+
readonly _tag: "Rejecting";
|
|
474
|
+
readonly plan: Plan.Model;
|
|
304
475
|
}, "_tag">;
|
|
305
476
|
};
|
|
306
|
-
interface
|
|
307
|
-
readonly
|
|
308
|
-
|
|
309
|
-
}
|
|
310
|
-
interface Controller$3 {
|
|
311
|
-
readonly apply: () => void;
|
|
312
|
-
readonly dismiss: () => void;
|
|
477
|
+
interface Controller$2 {
|
|
478
|
+
readonly state: State$2;
|
|
479
|
+
/** Build a plan. The plan itself rides on the state, from `Planned` through `Applied`. */
|
|
313
480
|
readonly plan: () => void;
|
|
481
|
+
/** Authorize the digest and apply it. Pass `operationIds` to approve part of the plan. */
|
|
482
|
+
readonly approve: (operationIds?: ReadonlyArray<Plan.OperationId>) => void;
|
|
483
|
+
/** Decline the plan. Terminal: approving it afterwards fails `Stale`. */
|
|
484
|
+
readonly reject: (reason?: string) => void;
|
|
485
|
+
/** Apply the approval this controller already holds. */
|
|
486
|
+
readonly apply: () => void;
|
|
487
|
+
/** Re-plan when the zone moved under the plan, otherwise re-run the step that failed. */
|
|
314
488
|
readonly retry: () => void;
|
|
315
|
-
readonly
|
|
489
|
+
readonly reset: () => void;
|
|
316
490
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
491
|
+
//#endregion
|
|
492
|
+
//#region src/composition.d.ts
|
|
493
|
+
type ClassName<State> = string | ((state: State) => string | undefined);
|
|
494
|
+
type Style<State> = CSSProperties | ((state: State) => CSSProperties | undefined);
|
|
495
|
+
/**
|
|
496
|
+
* What every rendered part accepts: the element's own props, a state-aware `className` and
|
|
497
|
+
* `style`, and Base UI's `render` for replacing the element outright.
|
|
498
|
+
*/
|
|
499
|
+
type PartProps<Tag extends ElementType = "div", State extends Record<string, unknown> = Record<string, unknown>> = Omit<useRender.ElementProps<Tag>, "className" | "style"> & {
|
|
500
|
+
readonly className?: ClassName<State>;
|
|
501
|
+
readonly render?: useRender.RenderProp<State>;
|
|
502
|
+
readonly style?: Style<State>;
|
|
503
|
+
};
|
|
504
|
+
//#endregion
|
|
505
|
+
//#region src/review.d.ts
|
|
506
|
+
interface ReviewState extends Record<string, unknown> {
|
|
507
|
+
readonly status: Controller$2["state"]["_tag"];
|
|
508
|
+
}
|
|
509
|
+
interface KindProps {
|
|
510
|
+
readonly controller: Controller$2;
|
|
511
|
+
readonly kind: Plan.Kind;
|
|
512
|
+
}
|
|
513
|
+
interface StatusProps$5 extends PartProps<"p", ReviewState>, KindProps {}
|
|
514
|
+
interface OutcomeProps$4 extends PartProps<"p", ReviewState>, KindProps {}
|
|
515
|
+
interface ActionsProps$2 extends PartProps<"div", ReviewState>, KindProps {}
|
|
516
|
+
interface DialogProps$3 extends KindProps {
|
|
517
|
+
readonly children?: ReactNode;
|
|
333
518
|
readonly onOpenChange?: (open: boolean) => void;
|
|
334
|
-
readonly
|
|
335
|
-
|
|
519
|
+
readonly open?: boolean;
|
|
520
|
+
/** Replace the dialog surface entirely: a drawer, an inline panel, a host modal. */
|
|
521
|
+
readonly render?: (props: {
|
|
522
|
+
readonly open: boolean;
|
|
523
|
+
readonly children: ReactNode;
|
|
524
|
+
}) => ReactNode;
|
|
525
|
+
readonly trigger?: ReactNode;
|
|
526
|
+
}
|
|
527
|
+
declare namespace cleanup_d_exports {
|
|
528
|
+
export { Actions$1 as Actions, ActionsProps$1 as ActionsProps, Controller$2 as Controller, Dialog$2 as Dialog, DialogProps$2 as DialogProps, Flow$3 as Flow, FlowProps$3 as FlowProps, Options$3 as Options, Outcome$3 as Outcome, OutcomeProps$3 as OutcomeProps, Root$6 as Root, RootProps$6 as RootProps, RootState$4 as RootState, State$2 as State, Status$4 as Status, StatusProps$4 as StatusProps, useController$3 as useController };
|
|
529
|
+
}
|
|
530
|
+
interface Options$3 {
|
|
531
|
+
readonly domain: string;
|
|
532
|
+
/** Which apply to undo. Without it, the domain's latest provisioning receipt. */
|
|
533
|
+
readonly receiptId?: Receipt.ReceiptId;
|
|
534
|
+
readonly onCleaned?: (receipt: Receipt.Model) => void;
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Cleanup is bound to a receipt: it removes only what an apply proved DomainKit created. When the
|
|
538
|
+
* host does not name one, the controller reads the domain's latest from the snapshot.
|
|
539
|
+
*/
|
|
540
|
+
declare function useController$3({ domain, onCleaned, receiptId }: Options$3): Controller$2;
|
|
541
|
+
interface RootState$4 extends Record<string, unknown> {
|
|
542
|
+
readonly status: State$2["_tag"];
|
|
543
|
+
}
|
|
544
|
+
interface RootProps$6 extends PartProps<"div", RootState$4> {
|
|
545
|
+
readonly controller: Controller$2;
|
|
336
546
|
}
|
|
337
|
-
declare function
|
|
338
|
-
interface
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
547
|
+
declare function Root$6({ controller, ...props }: RootProps$6): ReactElement;
|
|
548
|
+
interface DialogProps$2 extends Omit<DialogProps$3, "kind"> {}
|
|
549
|
+
declare function Dialog$2(props: DialogProps$2): ReactElement;
|
|
550
|
+
interface ActionsProps$1 extends Omit<ActionsProps$2, "kind"> {}
|
|
551
|
+
declare function Actions$1(props: ActionsProps$1): ReactElement | null;
|
|
552
|
+
interface OutcomeProps$3 extends Omit<OutcomeProps$4, "kind"> {}
|
|
553
|
+
declare function Outcome$3(props: OutcomeProps$3): ReactElement | null;
|
|
554
|
+
interface StatusProps$4 extends Omit<StatusProps$5, "kind"> {}
|
|
555
|
+
declare function Status$4(props: StatusProps$4): ReactElement;
|
|
556
|
+
interface FlowProps$3 extends Omit<RootProps$6, "controller"> {
|
|
557
|
+
readonly domain: string;
|
|
558
|
+
readonly onCleaned?: (receipt: Receipt.Model) => void;
|
|
559
|
+
readonly receiptId?: Receipt.ReceiptId;
|
|
560
|
+
readonly trigger?: ReactNode;
|
|
343
561
|
}
|
|
344
|
-
|
|
562
|
+
/** Cleanup on its own: a trigger that plans the removal, then the same review dialog. */
|
|
563
|
+
declare function Flow$3({ domain, onCleaned, receiptId, trigger, ...props }: FlowProps$3): import("react/jsx-runtime").JSX.Element;
|
|
345
564
|
declare namespace provider_d_exports {
|
|
346
|
-
export {
|
|
565
|
+
export { Descriptor$1 as Descriptor, Mark, MarkProps, MarkState, Marks };
|
|
347
566
|
}
|
|
348
|
-
|
|
349
|
-
type
|
|
567
|
+
/** A provider as the snapshot describes it: an id, a display name, and its auth methods. */
|
|
568
|
+
type Descriptor$1 = Transport.Snapshot["providers"][number];
|
|
569
|
+
/** Host-supplied artwork per provider id. A function receives the descriptor it renders for. */
|
|
570
|
+
type Marks = Readonly<Record<string, ReactNode | ((provider: Descriptor$1) => ReactNode)>>;
|
|
350
571
|
interface MarkState extends Record<string, unknown> {
|
|
351
572
|
readonly providerId: string;
|
|
352
573
|
}
|
|
353
574
|
interface MarkProps extends PartProps<"span", MarkState> {
|
|
354
|
-
readonly provider:
|
|
575
|
+
readonly provider: Descriptor$1;
|
|
355
576
|
}
|
|
577
|
+
/**
|
|
578
|
+
* A provider's artwork. `DomainKit.Root`'s `marks` decides what a provider looks like; without an
|
|
579
|
+
* entry the mark is the provider's initial. Nothing is fetched at render time.
|
|
580
|
+
*/
|
|
356
581
|
declare function Mark({ provider, ...props }: MarkProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
type
|
|
362
|
-
|
|
363
|
-
|
|
582
|
+
declare namespace connect_d_exports {
|
|
583
|
+
export { Candidate, Card$1 as Card, CardProps$1 as CardProps, ConnectInput, Controller$1 as Controller, Descriptor, Dialog$1 as Dialog, DialogProps$1 as DialogProps, Discovery, Field, Flow$2 as Flow, FlowProps$2 as FlowProps, Form, FormProps, MethodDescriptor, Options$2 as Options, Outcome$2 as Outcome, OutcomeProps$2 as OutcomeProps, Root$5 as Root, RootProps$5 as RootProps, RootState$3 as RootState, Snapshot, State$1 as State, Status$3 as Status, StatusProps$3 as StatusProps, useController$2 as useController };
|
|
584
|
+
}
|
|
585
|
+
type Snapshot = Transport.Snapshot;
|
|
586
|
+
type Discovery = Transport.Discovery;
|
|
587
|
+
type Candidate = Transport.Candidate;
|
|
588
|
+
type Descriptor = Descriptor$1;
|
|
589
|
+
type MethodDescriptor = Descriptor["methods"][number];
|
|
590
|
+
type Field = NonNullable<MethodDescriptor["fields"]>[number];
|
|
591
|
+
/**
|
|
592
|
+
* Where a domain stands with its DNS provider. `Disconnected` carries whatever
|
|
593
|
+
* `connection.discover` found, so the UI can offer a connection the customer already has before
|
|
594
|
+
* asking for another one.
|
|
595
|
+
*/
|
|
596
|
+
type State$1 = Data.TaggedEnum<{
|
|
597
|
+
Loading: {
|
|
598
|
+
readonly snapshot: Snapshot | null;
|
|
364
599
|
};
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
readonly
|
|
600
|
+
Disconnected: {
|
|
601
|
+
readonly snapshot: Snapshot;
|
|
602
|
+
readonly discovery: Discovery | null;
|
|
603
|
+
};
|
|
604
|
+
Connected: {
|
|
605
|
+
readonly snapshot: Snapshot;
|
|
606
|
+
};
|
|
607
|
+
Reconnect: {
|
|
608
|
+
readonly snapshot: Snapshot;
|
|
368
609
|
};
|
|
369
610
|
Submitting: {
|
|
370
|
-
readonly snapshot:
|
|
611
|
+
readonly snapshot: Snapshot | null;
|
|
612
|
+
};
|
|
613
|
+
Redirecting: {
|
|
614
|
+
readonly url: string;
|
|
615
|
+
};
|
|
616
|
+
SelectionRequired: {
|
|
617
|
+
readonly snapshot: Snapshot | null;
|
|
618
|
+
readonly connectionId: string;
|
|
619
|
+
readonly candidates: ReadonlyArray<Candidate>;
|
|
620
|
+
};
|
|
621
|
+
Failure: {
|
|
622
|
+
readonly error: DomainKit.Error;
|
|
371
623
|
};
|
|
372
624
|
}>;
|
|
373
|
-
declare const State$
|
|
374
|
-
readonly $is: <Tag extends "
|
|
375
|
-
readonly _tag: "
|
|
376
|
-
readonly snapshot:
|
|
625
|
+
declare const State$1: {
|
|
626
|
+
readonly $is: <Tag extends "Connected" | "Disconnected" | "Failure" | "Loading" | "Reconnect" | "Redirecting" | "SelectionRequired" | "Submitting">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
627
|
+
readonly _tag: "Connected";
|
|
628
|
+
readonly snapshot: Snapshot;
|
|
629
|
+
}, {
|
|
630
|
+
readonly _tag: Tag;
|
|
631
|
+
}> | Extract<{
|
|
632
|
+
readonly _tag: "Disconnected";
|
|
633
|
+
readonly snapshot: Snapshot;
|
|
634
|
+
readonly discovery: Discovery | null;
|
|
635
|
+
}, {
|
|
636
|
+
readonly _tag: Tag;
|
|
637
|
+
}> | Extract<{
|
|
638
|
+
readonly _tag: "Failure";
|
|
639
|
+
readonly error: DomainKit.Error;
|
|
377
640
|
}, {
|
|
378
641
|
readonly _tag: Tag;
|
|
379
642
|
}> | Extract<{
|
|
380
643
|
readonly _tag: "Loading";
|
|
644
|
+
readonly snapshot: Snapshot | null;
|
|
645
|
+
}, {
|
|
646
|
+
readonly _tag: Tag;
|
|
647
|
+
}> | Extract<{
|
|
648
|
+
readonly _tag: "Reconnect";
|
|
649
|
+
readonly snapshot: Snapshot;
|
|
381
650
|
}, {
|
|
382
651
|
readonly _tag: Tag;
|
|
383
652
|
}> | Extract<{
|
|
384
653
|
readonly _tag: "Redirecting";
|
|
385
|
-
readonly
|
|
654
|
+
readonly url: string;
|
|
655
|
+
}, {
|
|
656
|
+
readonly _tag: Tag;
|
|
657
|
+
}> | Extract<{
|
|
658
|
+
readonly _tag: "SelectionRequired";
|
|
659
|
+
readonly snapshot: Snapshot | null;
|
|
660
|
+
readonly connectionId: string;
|
|
661
|
+
readonly candidates: ReadonlyArray<Candidate>;
|
|
386
662
|
}, {
|
|
387
663
|
readonly _tag: Tag;
|
|
388
664
|
}> | Extract<{
|
|
389
665
|
readonly _tag: "Submitting";
|
|
390
|
-
readonly snapshot:
|
|
666
|
+
readonly snapshot: Snapshot | null;
|
|
391
667
|
}, {
|
|
392
668
|
readonly _tag: Tag;
|
|
393
669
|
}>;
|
|
394
670
|
readonly $match: {
|
|
395
|
-
<Cases extends { readonly [Tag in "
|
|
396
|
-
readonly _tag: "
|
|
397
|
-
readonly snapshot:
|
|
671
|
+
<Cases extends { readonly [Tag in "Connected" | "Disconnected" | "Failure" | "Loading" | "Reconnect" | "Redirecting" | "SelectionRequired" | "Submitting"]: (args: Extract<{
|
|
672
|
+
readonly _tag: "Connected";
|
|
673
|
+
readonly snapshot: Snapshot;
|
|
674
|
+
} | {
|
|
675
|
+
readonly _tag: "Disconnected";
|
|
676
|
+
readonly snapshot: Snapshot;
|
|
677
|
+
readonly discovery: Discovery | null;
|
|
678
|
+
} | {
|
|
679
|
+
readonly _tag: "Failure";
|
|
680
|
+
readonly error: DomainKit.Error;
|
|
398
681
|
} | {
|
|
399
682
|
readonly _tag: "Loading";
|
|
683
|
+
readonly snapshot: Snapshot | null;
|
|
684
|
+
} | {
|
|
685
|
+
readonly _tag: "Reconnect";
|
|
686
|
+
readonly snapshot: Snapshot;
|
|
400
687
|
} | {
|
|
401
688
|
readonly _tag: "Redirecting";
|
|
402
|
-
readonly
|
|
689
|
+
readonly url: string;
|
|
690
|
+
} | {
|
|
691
|
+
readonly _tag: "SelectionRequired";
|
|
692
|
+
readonly snapshot: Snapshot | null;
|
|
693
|
+
readonly connectionId: string;
|
|
694
|
+
readonly candidates: ReadonlyArray<Candidate>;
|
|
403
695
|
} | {
|
|
404
696
|
readonly _tag: "Submitting";
|
|
405
|
-
readonly snapshot:
|
|
697
|
+
readonly snapshot: Snapshot | null;
|
|
406
698
|
}, {
|
|
407
699
|
readonly _tag: Tag;
|
|
408
700
|
}>) => any; }>(cases: Cases): (value: {
|
|
409
|
-
readonly _tag: "
|
|
410
|
-
readonly snapshot:
|
|
701
|
+
readonly _tag: "Connected";
|
|
702
|
+
readonly snapshot: Snapshot;
|
|
703
|
+
} | {
|
|
704
|
+
readonly _tag: "Disconnected";
|
|
705
|
+
readonly snapshot: Snapshot;
|
|
706
|
+
readonly discovery: Discovery | null;
|
|
707
|
+
} | {
|
|
708
|
+
readonly _tag: "Failure";
|
|
709
|
+
readonly error: DomainKit.Error;
|
|
411
710
|
} | {
|
|
412
711
|
readonly _tag: "Loading";
|
|
712
|
+
readonly snapshot: Snapshot | null;
|
|
713
|
+
} | {
|
|
714
|
+
readonly _tag: "Reconnect";
|
|
715
|
+
readonly snapshot: Snapshot;
|
|
413
716
|
} | {
|
|
414
717
|
readonly _tag: "Redirecting";
|
|
415
|
-
readonly
|
|
718
|
+
readonly url: string;
|
|
719
|
+
} | {
|
|
720
|
+
readonly _tag: "SelectionRequired";
|
|
721
|
+
readonly snapshot: Snapshot | null;
|
|
722
|
+
readonly connectionId: string;
|
|
723
|
+
readonly candidates: ReadonlyArray<Candidate>;
|
|
416
724
|
} | {
|
|
417
725
|
readonly _tag: "Submitting";
|
|
418
|
-
readonly snapshot:
|
|
419
|
-
}) => import("effect/Unify").Unify<ReturnType<Cases["
|
|
420
|
-
<Cases extends { readonly [Tag in "
|
|
421
|
-
readonly _tag: "
|
|
422
|
-
readonly snapshot:
|
|
726
|
+
readonly snapshot: Snapshot | null;
|
|
727
|
+
}) => import("effect/Unify").Unify<ReturnType<Cases["Connected" | "Disconnected" | "Failure" | "Loading" | "Reconnect" | "Redirecting" | "SelectionRequired" | "Submitting"]>>;
|
|
728
|
+
<Cases extends { readonly [Tag in "Connected" | "Disconnected" | "Failure" | "Loading" | "Reconnect" | "Redirecting" | "SelectionRequired" | "Submitting"]: (args: Extract<{
|
|
729
|
+
readonly _tag: "Connected";
|
|
730
|
+
readonly snapshot: Snapshot;
|
|
731
|
+
} | {
|
|
732
|
+
readonly _tag: "Disconnected";
|
|
733
|
+
readonly snapshot: Snapshot;
|
|
734
|
+
readonly discovery: Discovery | null;
|
|
735
|
+
} | {
|
|
736
|
+
readonly _tag: "Failure";
|
|
737
|
+
readonly error: DomainKit.Error;
|
|
423
738
|
} | {
|
|
424
739
|
readonly _tag: "Loading";
|
|
740
|
+
readonly snapshot: Snapshot | null;
|
|
741
|
+
} | {
|
|
742
|
+
readonly _tag: "Reconnect";
|
|
743
|
+
readonly snapshot: Snapshot;
|
|
425
744
|
} | {
|
|
426
745
|
readonly _tag: "Redirecting";
|
|
427
|
-
readonly
|
|
746
|
+
readonly url: string;
|
|
747
|
+
} | {
|
|
748
|
+
readonly _tag: "SelectionRequired";
|
|
749
|
+
readonly snapshot: Snapshot | null;
|
|
750
|
+
readonly connectionId: string;
|
|
751
|
+
readonly candidates: ReadonlyArray<Candidate>;
|
|
428
752
|
} | {
|
|
429
753
|
readonly _tag: "Submitting";
|
|
430
|
-
readonly snapshot:
|
|
754
|
+
readonly snapshot: Snapshot | null;
|
|
431
755
|
}, {
|
|
432
756
|
readonly _tag: Tag;
|
|
433
757
|
}>) => any; }>(value: {
|
|
434
|
-
readonly _tag: "
|
|
435
|
-
readonly snapshot:
|
|
758
|
+
readonly _tag: "Connected";
|
|
759
|
+
readonly snapshot: Snapshot;
|
|
760
|
+
} | {
|
|
761
|
+
readonly _tag: "Disconnected";
|
|
762
|
+
readonly snapshot: Snapshot;
|
|
763
|
+
readonly discovery: Discovery | null;
|
|
764
|
+
} | {
|
|
765
|
+
readonly _tag: "Failure";
|
|
766
|
+
readonly error: DomainKit.Error;
|
|
436
767
|
} | {
|
|
437
768
|
readonly _tag: "Loading";
|
|
769
|
+
readonly snapshot: Snapshot | null;
|
|
770
|
+
} | {
|
|
771
|
+
readonly _tag: "Reconnect";
|
|
772
|
+
readonly snapshot: Snapshot;
|
|
438
773
|
} | {
|
|
439
774
|
readonly _tag: "Redirecting";
|
|
440
|
-
readonly
|
|
775
|
+
readonly url: string;
|
|
776
|
+
} | {
|
|
777
|
+
readonly _tag: "SelectionRequired";
|
|
778
|
+
readonly snapshot: Snapshot | null;
|
|
779
|
+
readonly connectionId: string;
|
|
780
|
+
readonly candidates: ReadonlyArray<Candidate>;
|
|
441
781
|
} | {
|
|
442
782
|
readonly _tag: "Submitting";
|
|
443
|
-
readonly snapshot:
|
|
444
|
-
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["
|
|
783
|
+
readonly snapshot: Snapshot | null;
|
|
784
|
+
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Connected" | "Disconnected" | "Failure" | "Loading" | "Reconnect" | "Redirecting" | "SelectionRequired" | "Submitting"]>>;
|
|
445
785
|
};
|
|
446
|
-
readonly
|
|
447
|
-
readonly _tag: "
|
|
448
|
-
readonly snapshot:
|
|
786
|
+
readonly Connected: Data.TaggedEnum.ConstructorFrom<{
|
|
787
|
+
readonly _tag: "Connected";
|
|
788
|
+
readonly snapshot: Snapshot;
|
|
789
|
+
}, "_tag">;
|
|
790
|
+
readonly Disconnected: Data.TaggedEnum.ConstructorFrom<{
|
|
791
|
+
readonly _tag: "Disconnected";
|
|
792
|
+
readonly snapshot: Snapshot;
|
|
793
|
+
readonly discovery: Discovery | null;
|
|
794
|
+
}, "_tag">;
|
|
795
|
+
readonly Failure: Data.TaggedEnum.ConstructorFrom<{
|
|
796
|
+
readonly _tag: "Failure";
|
|
797
|
+
readonly error: DomainKit.Error;
|
|
449
798
|
}, "_tag">;
|
|
450
799
|
readonly Loading: Data.TaggedEnum.ConstructorFrom<{
|
|
451
800
|
readonly _tag: "Loading";
|
|
801
|
+
readonly snapshot: Snapshot | null;
|
|
802
|
+
}, "_tag">;
|
|
803
|
+
readonly Reconnect: Data.TaggedEnum.ConstructorFrom<{
|
|
804
|
+
readonly _tag: "Reconnect";
|
|
805
|
+
readonly snapshot: Snapshot;
|
|
452
806
|
}, "_tag">;
|
|
453
807
|
readonly Redirecting: Data.TaggedEnum.ConstructorFrom<{
|
|
454
808
|
readonly _tag: "Redirecting";
|
|
455
|
-
readonly
|
|
809
|
+
readonly url: string;
|
|
810
|
+
}, "_tag">;
|
|
811
|
+
readonly SelectionRequired: Data.TaggedEnum.ConstructorFrom<{
|
|
812
|
+
readonly _tag: "SelectionRequired";
|
|
813
|
+
readonly snapshot: Snapshot | null;
|
|
814
|
+
readonly connectionId: string;
|
|
815
|
+
readonly candidates: ReadonlyArray<Candidate>;
|
|
456
816
|
}, "_tag">;
|
|
457
817
|
readonly Submitting: Data.TaggedEnum.ConstructorFrom<{
|
|
458
818
|
readonly _tag: "Submitting";
|
|
459
|
-
readonly snapshot:
|
|
819
|
+
readonly snapshot: Snapshot | null;
|
|
460
820
|
}, "_tag">;
|
|
461
821
|
};
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
readonly
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
readonly
|
|
822
|
+
interface ConnectInput {
|
|
823
|
+
readonly provider: string;
|
|
824
|
+
readonly method: Storage.AuthMethod;
|
|
825
|
+
/** Keyed by the descriptor's field names. Ignored by the interactive methods. */
|
|
826
|
+
readonly values?: Readonly<Record<string, string>>;
|
|
827
|
+
/** Where an interactive method returns the customer. */
|
|
828
|
+
readonly returnTo?: string;
|
|
829
|
+
}
|
|
830
|
+
interface Controller$1 {
|
|
831
|
+
readonly state: State$1;
|
|
832
|
+
readonly snapshot: Snapshot | null;
|
|
833
|
+
readonly discovery: Discovery | null;
|
|
834
|
+
readonly providers: ReadonlyArray<Descriptor>;
|
|
835
|
+
readonly connect: (input: ConnectInput) => void;
|
|
836
|
+
/** Attach the domain to a connection this owner already has. */
|
|
837
|
+
readonly reuse: (input: {
|
|
838
|
+
readonly connectionId: string;
|
|
839
|
+
readonly zone?: string;
|
|
840
|
+
}) => void;
|
|
841
|
+
/** Answer `SelectionRequired` by naming the zone that serves the domain. */
|
|
842
|
+
readonly select: (zone: string) => void;
|
|
469
843
|
readonly detach: () => void;
|
|
844
|
+
readonly disconnect: () => void;
|
|
845
|
+
/** Re-inspect the domain, discarding any failure. */
|
|
846
|
+
readonly refresh: () => void;
|
|
847
|
+
/** Re-run the step that failed; without one, re-inspect. */
|
|
470
848
|
readonly retry: () => void;
|
|
471
|
-
readonly state: State$2;
|
|
472
849
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
850
|
+
interface Options$2 {
|
|
851
|
+
readonly domain: string;
|
|
852
|
+
/**
|
|
853
|
+
* Where an interactive method returns the customer. Defaults to the page they started from;
|
|
854
|
+
* pass `null` to send none and let the server's `defaultReturnTo` decide.
|
|
855
|
+
*/
|
|
856
|
+
readonly returnTo?: string | null;
|
|
857
|
+
}
|
|
858
|
+
/**
|
|
859
|
+
* The domain's connection, and the four ways to change it. Discovery runs on mount whenever the
|
|
860
|
+
* transport declares it and the domain has no connection yet; a discovery failure is not the
|
|
861
|
+
* customer's problem, so the provider list still renders.
|
|
862
|
+
*/
|
|
863
|
+
declare function useController$2({ domain, returnTo }: Options$2): Controller$1;
|
|
864
|
+
interface RootState$3 extends Record<string, unknown> {
|
|
865
|
+
readonly status: State$1["_tag"];
|
|
866
|
+
}
|
|
867
|
+
interface RootProps$5 extends PartProps<"div", RootState$3> {
|
|
868
|
+
readonly controller: Controller$1;
|
|
869
|
+
}
|
|
870
|
+
declare function Root$5({ controller, ...props }: RootProps$5): ReactElement;
|
|
871
|
+
interface OutcomeProps$2 extends PartProps<"p", RootState$3> {
|
|
872
|
+
readonly controller: Controller$1;
|
|
873
|
+
}
|
|
874
|
+
/** The failure sentence, chosen by the error's reason, plus the retry that reason allows. */
|
|
875
|
+
declare function Outcome$2({ controller, ...props }: OutcomeProps$2): ReactElement | null;
|
|
876
|
+
interface StatusProps$3 extends PartProps<"p", RootState$3> {
|
|
877
|
+
readonly controller: Controller$1;
|
|
878
|
+
}
|
|
879
|
+
declare function Status$3({ controller, ...props }: StatusProps$3): ReactElement;
|
|
880
|
+
interface FormProps extends PartProps<"div", RootState$3> {
|
|
881
|
+
readonly controller: Controller$1;
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* Everything a disconnected domain can do: a connection discovery already found, the connections
|
|
885
|
+
* this owner already has, then each provider's declared methods.
|
|
886
|
+
*/
|
|
887
|
+
declare function Form({ controller, ...props }: FormProps): ReactElement;
|
|
888
|
+
interface DialogProps$1 {
|
|
889
|
+
readonly controller: Controller$1;
|
|
890
|
+
readonly children?: ReactNode;
|
|
891
|
+
/** Replace the dialog surface: a drawer, a panel, whatever the host already has. */
|
|
892
|
+
readonly render?: (props: {
|
|
893
|
+
readonly open: boolean;
|
|
894
|
+
readonly children: ReactNode;
|
|
895
|
+
}) => ReactNode;
|
|
896
|
+
readonly title?: ReactNode;
|
|
897
|
+
readonly trigger?: ReactNode;
|
|
898
|
+
}
|
|
899
|
+
/** The connect surface. Without `render` it is a Base UI dialog behind `trigger`. */
|
|
900
|
+
declare function Dialog$1({ children, controller, render, title, trigger }: DialogProps$1): ReactElement;
|
|
901
|
+
interface CardProps$1 extends PartProps<"div", RootState$3> {
|
|
902
|
+
readonly controller: Controller$1;
|
|
903
|
+
}
|
|
904
|
+
/** A connected domain: which provider holds it, and how to let it go. */
|
|
905
|
+
declare function Card$1({ controller, ...props }: CardProps$1): ReactElement;
|
|
906
|
+
interface FlowProps$2 extends Omit<RootProps$5, "controller"> {
|
|
907
|
+
readonly domain: string;
|
|
908
|
+
readonly returnTo?: string | null;
|
|
909
|
+
}
|
|
910
|
+
/** Connection on its own: the card once connected, the dialog until then. */
|
|
911
|
+
declare function Flow$2({ domain, returnTo, ...props }: FlowProps$2): ReactElement;
|
|
912
|
+
declare namespace provision_d_exports {
|
|
913
|
+
export { Actions, ActionsProps, Controller$2 as Controller, Dialog, DialogProps, Flow$1 as Flow, FlowProps$1 as FlowProps, Options$1 as Options, Outcome$1 as Outcome, OutcomeProps$1 as OutcomeProps, Root$4 as Root, RootProps$4 as RootProps, RootState$2 as RootState, State$2 as State, Status$2 as Status, StatusProps$2 as StatusProps, useController$1 as useController };
|
|
914
|
+
}
|
|
915
|
+
interface Options$1 {
|
|
916
|
+
readonly domain: string;
|
|
917
|
+
readonly requirements: ReadonlyArray<DnsRecord.Model>;
|
|
918
|
+
readonly onApplied?: (receipt: Receipt.Model) => void;
|
|
919
|
+
}
|
|
920
|
+
declare function useController$1({ domain, onApplied, requirements }: Options$1): Controller$2;
|
|
921
|
+
interface RootState$2 extends Record<string, unknown> {
|
|
922
|
+
readonly status: State$2["_tag"];
|
|
923
|
+
}
|
|
924
|
+
interface RootProps$4 extends PartProps<"div", RootState$2> {
|
|
925
|
+
readonly controller: Controller$2;
|
|
926
|
+
}
|
|
927
|
+
declare function Root$4({ controller, ...props }: RootProps$4): ReactElement;
|
|
928
|
+
interface DialogProps extends Omit<DialogProps$3, "kind"> {}
|
|
929
|
+
declare function Dialog(props: DialogProps): ReactElement;
|
|
930
|
+
interface ActionsProps extends Omit<ActionsProps$2, "kind"> {}
|
|
931
|
+
/** Approve and Decline for a plan already under review. */
|
|
932
|
+
declare function Actions(props: ActionsProps): ReactElement | null;
|
|
933
|
+
interface OutcomeProps$1 extends Omit<OutcomeProps$4, "kind"> {}
|
|
934
|
+
declare function Outcome$1(props: OutcomeProps$1): ReactElement | null;
|
|
935
|
+
interface StatusProps$2 extends Omit<StatusProps$5, "kind"> {}
|
|
936
|
+
declare function Status$2(props: StatusProps$2): ReactElement;
|
|
937
|
+
interface FlowProps$1 extends Omit<RootProps$4, "controller"> {
|
|
938
|
+
readonly domain: string;
|
|
939
|
+
readonly onApplied?: (receipt: Receipt.Model) => void;
|
|
940
|
+
readonly requirements: ReadonlyArray<DnsRecord.Model>;
|
|
941
|
+
readonly trigger?: ReactNode;
|
|
942
|
+
}
|
|
943
|
+
/** Provisioning on its own: a trigger that plans, then the review dialog. */
|
|
944
|
+
declare function Flow$1({ domain, onApplied, requirements, trigger, ...props }: FlowProps$1): import("react/jsx-runtime").JSX.Element;
|
|
945
|
+
declare namespace verify_d_exports {
|
|
946
|
+
export { Controller, Evidence, EvidenceProps, HostEvidence, ObserveAction, ObserveActionProps, Options, Outcome, OutcomeProps, Readiness$1 as Readiness, Requirement, Root$3 as Root, RootProps$3 as RootProps, RootState$1 as RootState, State, Status$1 as Status, StatusProps$1 as StatusProps, useController };
|
|
947
|
+
}
|
|
948
|
+
type Readiness$1 = Transport.Readiness;
|
|
949
|
+
type HostEvidence = Readiness$1["host"][number];
|
|
950
|
+
type Requirement = Readiness$1["requirements"][number];
|
|
951
|
+
type Evidence = Requirement["evidence"][number];
|
|
952
|
+
/**
|
|
953
|
+
* Readiness rides on the state rather than a ref, so it can never outlive the render that
|
|
954
|
+
* produced it: a controller pointed at a new domain has no readiness in the very first frame.
|
|
955
|
+
*/
|
|
956
|
+
type State = Data.TaggedEnum<{
|
|
957
|
+
Idle: {};
|
|
958
|
+
Observing: {
|
|
959
|
+
readonly readiness: Readiness$1 | null;
|
|
960
|
+
};
|
|
961
|
+
Observed: {
|
|
962
|
+
readonly readiness: Readiness$1;
|
|
477
963
|
};
|
|
478
|
-
|
|
479
|
-
readonly
|
|
964
|
+
Failure: {
|
|
965
|
+
readonly error: DomainKit.Error;
|
|
966
|
+
readonly readiness: Readiness$1 | null;
|
|
480
967
|
};
|
|
481
|
-
Detach: {};
|
|
482
|
-
Retry: {};
|
|
483
968
|
}>;
|
|
484
|
-
declare const
|
|
485
|
-
readonly $is: <Tag extends "
|
|
486
|
-
readonly _tag: "
|
|
487
|
-
readonly
|
|
488
|
-
readonly
|
|
969
|
+
declare const State: {
|
|
970
|
+
readonly $is: <Tag extends "Failure" | "Idle" | "Observed" | "Observing">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
971
|
+
readonly _tag: "Failure";
|
|
972
|
+
readonly error: DomainKit.Error;
|
|
973
|
+
readonly readiness: Readiness$1 | null;
|
|
489
974
|
}, {
|
|
490
975
|
readonly _tag: Tag;
|
|
491
976
|
}> | Extract<{
|
|
492
|
-
readonly _tag: "
|
|
493
|
-
readonly method: Transport.Method;
|
|
977
|
+
readonly _tag: "Idle";
|
|
494
978
|
}, {
|
|
495
979
|
readonly _tag: Tag;
|
|
496
980
|
}> | Extract<{
|
|
497
|
-
readonly _tag: "
|
|
981
|
+
readonly _tag: "Observed";
|
|
982
|
+
readonly readiness: Readiness$1;
|
|
498
983
|
}, {
|
|
499
984
|
readonly _tag: Tag;
|
|
500
985
|
}> | Extract<{
|
|
501
|
-
readonly _tag: "
|
|
986
|
+
readonly _tag: "Observing";
|
|
987
|
+
readonly readiness: Readiness$1 | null;
|
|
502
988
|
}, {
|
|
503
989
|
readonly _tag: Tag;
|
|
504
990
|
}>;
|
|
505
991
|
readonly $match: {
|
|
506
|
-
<Cases extends { readonly [Tag in "
|
|
507
|
-
readonly _tag: "
|
|
508
|
-
readonly
|
|
509
|
-
readonly
|
|
992
|
+
<Cases extends { readonly [Tag in "Failure" | "Idle" | "Observed" | "Observing"]: (args: Extract<{
|
|
993
|
+
readonly _tag: "Failure";
|
|
994
|
+
readonly error: DomainKit.Error;
|
|
995
|
+
readonly readiness: Readiness$1 | null;
|
|
510
996
|
} | {
|
|
511
|
-
readonly _tag: "
|
|
512
|
-
readonly method: Transport.Method;
|
|
997
|
+
readonly _tag: "Idle";
|
|
513
998
|
} | {
|
|
514
|
-
readonly _tag: "
|
|
999
|
+
readonly _tag: "Observed";
|
|
1000
|
+
readonly readiness: Readiness$1;
|
|
515
1001
|
} | {
|
|
516
|
-
readonly _tag: "
|
|
1002
|
+
readonly _tag: "Observing";
|
|
1003
|
+
readonly readiness: Readiness$1 | null;
|
|
517
1004
|
}, {
|
|
518
1005
|
readonly _tag: Tag;
|
|
519
1006
|
}>) => any; }>(cases: Cases): (value: {
|
|
520
|
-
readonly _tag: "
|
|
521
|
-
readonly
|
|
522
|
-
readonly
|
|
1007
|
+
readonly _tag: "Failure";
|
|
1008
|
+
readonly error: DomainKit.Error;
|
|
1009
|
+
readonly readiness: Readiness$1 | null;
|
|
523
1010
|
} | {
|
|
524
|
-
readonly _tag: "
|
|
525
|
-
readonly method: Transport.Method;
|
|
1011
|
+
readonly _tag: "Idle";
|
|
526
1012
|
} | {
|
|
527
|
-
readonly _tag: "
|
|
1013
|
+
readonly _tag: "Observed";
|
|
1014
|
+
readonly readiness: Readiness$1;
|
|
528
1015
|
} | {
|
|
529
|
-
readonly _tag: "
|
|
530
|
-
|
|
531
|
-
<Cases
|
|
532
|
-
|
|
533
|
-
readonly
|
|
534
|
-
readonly
|
|
1016
|
+
readonly _tag: "Observing";
|
|
1017
|
+
readonly readiness: Readiness$1 | null;
|
|
1018
|
+
}) => import("effect/Unify").Unify<ReturnType<Cases["Failure" | "Idle" | "Observed" | "Observing"]>>;
|
|
1019
|
+
<Cases extends { readonly [Tag in "Failure" | "Idle" | "Observed" | "Observing"]: (args: Extract<{
|
|
1020
|
+
readonly _tag: "Failure";
|
|
1021
|
+
readonly error: DomainKit.Error;
|
|
1022
|
+
readonly readiness: Readiness$1 | null;
|
|
535
1023
|
} | {
|
|
536
|
-
readonly _tag: "
|
|
537
|
-
readonly method: Transport.Method;
|
|
1024
|
+
readonly _tag: "Idle";
|
|
538
1025
|
} | {
|
|
539
|
-
readonly _tag: "
|
|
1026
|
+
readonly _tag: "Observed";
|
|
1027
|
+
readonly readiness: Readiness$1;
|
|
540
1028
|
} | {
|
|
541
|
-
readonly _tag: "
|
|
1029
|
+
readonly _tag: "Observing";
|
|
1030
|
+
readonly readiness: Readiness$1 | null;
|
|
542
1031
|
}, {
|
|
543
1032
|
readonly _tag: Tag;
|
|
544
1033
|
}>) => any; }>(value: {
|
|
545
|
-
readonly _tag: "
|
|
546
|
-
readonly
|
|
547
|
-
readonly
|
|
1034
|
+
readonly _tag: "Failure";
|
|
1035
|
+
readonly error: DomainKit.Error;
|
|
1036
|
+
readonly readiness: Readiness$1 | null;
|
|
548
1037
|
} | {
|
|
549
|
-
readonly _tag: "
|
|
550
|
-
readonly method: Transport.Method;
|
|
1038
|
+
readonly _tag: "Idle";
|
|
551
1039
|
} | {
|
|
552
|
-
readonly _tag: "
|
|
1040
|
+
readonly _tag: "Observed";
|
|
1041
|
+
readonly readiness: Readiness$1;
|
|
553
1042
|
} | {
|
|
554
|
-
readonly _tag: "
|
|
555
|
-
|
|
1043
|
+
readonly _tag: "Observing";
|
|
1044
|
+
readonly readiness: Readiness$1 | null;
|
|
1045
|
+
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Failure" | "Idle" | "Observed" | "Observing"]>>;
|
|
556
1046
|
};
|
|
557
|
-
readonly
|
|
558
|
-
readonly _tag: "
|
|
559
|
-
readonly
|
|
560
|
-
readonly
|
|
1047
|
+
readonly Failure: Data.TaggedEnum.ConstructorFrom<{
|
|
1048
|
+
readonly _tag: "Failure";
|
|
1049
|
+
readonly error: DomainKit.Error;
|
|
1050
|
+
readonly readiness: Readiness$1 | null;
|
|
561
1051
|
}, "_tag">;
|
|
562
|
-
readonly
|
|
563
|
-
readonly _tag: "
|
|
564
|
-
readonly method: Transport.Method;
|
|
1052
|
+
readonly Idle: Data.TaggedEnum.ConstructorFrom<{
|
|
1053
|
+
readonly _tag: "Idle";
|
|
565
1054
|
}, "_tag">;
|
|
566
|
-
readonly
|
|
567
|
-
readonly _tag: "
|
|
1055
|
+
readonly Observed: Data.TaggedEnum.ConstructorFrom<{
|
|
1056
|
+
readonly _tag: "Observed";
|
|
1057
|
+
readonly readiness: Readiness$1;
|
|
568
1058
|
}, "_tag">;
|
|
569
|
-
readonly
|
|
570
|
-
readonly _tag: "
|
|
1059
|
+
readonly Observing: Data.TaggedEnum.ConstructorFrom<{
|
|
1060
|
+
readonly _tag: "Observing";
|
|
1061
|
+
readonly readiness: Readiness$1 | null;
|
|
571
1062
|
}, "_tag">;
|
|
572
1063
|
};
|
|
573
|
-
interface
|
|
574
|
-
readonly
|
|
575
|
-
|
|
1064
|
+
interface Controller {
|
|
1065
|
+
readonly state: State;
|
|
1066
|
+
/** The latest readiness, kept while a new observation runs. */
|
|
1067
|
+
readonly readiness: Readiness$1 | null;
|
|
1068
|
+
readonly observe: () => void;
|
|
1069
|
+
/** Observe again after a failure. */
|
|
1070
|
+
readonly retry: () => void;
|
|
1071
|
+
/** Whether this controller re-observes at `nextCheckAt` while mounted. */
|
|
1072
|
+
readonly polling: boolean;
|
|
576
1073
|
}
|
|
577
|
-
|
|
578
|
-
|
|
1074
|
+
interface Options {
|
|
1075
|
+
readonly domain: string;
|
|
1076
|
+
/**
|
|
1077
|
+
* What to look for. Supplied requirements win over the attachment's latest provisioning receipt,
|
|
1078
|
+
* which is what lets a domain with no attachment be verified at all.
|
|
1079
|
+
*/
|
|
1080
|
+
readonly requirements?: ReadonlyArray<DnsRecord.Model>;
|
|
1081
|
+
/** Re-observe at each `nextCheckAt` while mounted. Default true. */
|
|
1082
|
+
readonly polling?: boolean;
|
|
1083
|
+
}
|
|
1084
|
+
/** Observe once on mount, then follow the readiness's own `nextCheckAt` while polling is on. */
|
|
1085
|
+
declare function useController({ domain, polling, requirements }: Options): Controller;
|
|
579
1086
|
interface RootState$1 extends Record<string, unknown> {
|
|
580
|
-
readonly status: State
|
|
581
|
-
}
|
|
582
|
-
interface RootProps$5 extends PartProps<"div", RootState$1> {
|
|
583
|
-
readonly status?: State$2["_tag"];
|
|
584
|
-
}
|
|
585
|
-
declare function Root$5({ children, status, ...props }: RootProps$5): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
586
|
-
interface StatusState extends Record<string, unknown> {
|
|
587
|
-
readonly status: State$2["_tag"];
|
|
588
|
-
}
|
|
589
|
-
interface StatusProps$2 extends PartProps<"div", StatusState> {
|
|
590
|
-
readonly state: State$2;
|
|
591
|
-
}
|
|
592
|
-
declare function Status$2({ children, state, ...props }: StatusProps$2): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
593
|
-
interface TriggerProps extends Omit<ComponentPropsWithoutRef<typeof Dialog.Trigger>, "children"> {
|
|
594
|
-
readonly children: ReactNode;
|
|
595
|
-
}
|
|
596
|
-
interface ConnectTriggerProps extends Omit<TriggerProps, "children"> {
|
|
597
|
-
readonly children?: ReactNode;
|
|
598
|
-
readonly provider: ProviderDescriptor;
|
|
1087
|
+
readonly status: State["_tag"];
|
|
599
1088
|
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
interface ActionState extends Record<string, unknown> {
|
|
603
|
-
readonly authentication: "attach" | "integration" | "oauth" | "token";
|
|
1089
|
+
interface RootProps$3 extends PartProps<"div", RootState$1> {
|
|
1090
|
+
readonly controller: Controller;
|
|
604
1091
|
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
readonly
|
|
1092
|
+
declare function Root$3({ controller, ...props }: RootProps$3): ReactElement;
|
|
1093
|
+
interface ObserveActionProps extends PartProps<"button", RootState$1> {
|
|
1094
|
+
readonly controller: Controller;
|
|
608
1095
|
}
|
|
609
|
-
declare function
|
|
610
|
-
interface
|
|
611
|
-
readonly
|
|
612
|
-
readonly label: string;
|
|
1096
|
+
declare function ObserveAction({ controller, ...props }: ObserveActionProps): ReactElement;
|
|
1097
|
+
interface EvidenceProps {
|
|
1098
|
+
readonly readiness: Readiness$1;
|
|
613
1099
|
}
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
1100
|
+
/**
|
|
1101
|
+
* Per-requirement readiness and, below it, the host's own evidence: an SES identity, a certificate,
|
|
1102
|
+
* anything DomainKit cannot observe but the host feeds in.
|
|
1103
|
+
*/
|
|
1104
|
+
declare function Evidence({ readiness }: EvidenceProps): ReactElement;
|
|
1105
|
+
interface OutcomeProps extends PartProps<"p", RootState$1> {
|
|
1106
|
+
readonly controller: Controller;
|
|
620
1107
|
}
|
|
621
|
-
declare function
|
|
622
|
-
interface
|
|
623
|
-
|
|
624
|
-
readonly
|
|
625
|
-
readonly
|
|
626
|
-
|
|
1108
|
+
declare function Outcome({ controller, ...props }: OutcomeProps): ReactElement | null;
|
|
1109
|
+
interface StatusProps$1 extends Omit<RootProps$3, "render"> {
|
|
1110
|
+
/** Replace the popover surface with a panel of the host's own. */
|
|
1111
|
+
readonly render?: (props: {
|
|
1112
|
+
readonly open: boolean;
|
|
1113
|
+
readonly children: ReactNode;
|
|
1114
|
+
}) => ReactNode;
|
|
627
1115
|
}
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
1116
|
+
/** The default verification slot: a button that observes, with the evidence behind it. */
|
|
1117
|
+
declare function Status$1({ controller, render, ...props }: StatusProps$1): ReactElement;
|
|
1118
|
+
declare namespace domain_d_exports {
|
|
1119
|
+
export { ActionsSlotProps, ConnectionSlotProps, Flow, FlowProps, FlowState, RecordsSlotProps, Slots, VerificationSlotProps };
|
|
632
1120
|
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
1121
|
+
interface RecordsSlotProps {
|
|
1122
|
+
readonly records: ReadonlyArray<DnsRecord.Model>;
|
|
1123
|
+
readonly readiness: Readiness$1 | null;
|
|
1124
|
+
readonly controller: Controller;
|
|
636
1125
|
readonly domain: string;
|
|
637
1126
|
}
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
readonly
|
|
641
|
-
}> {
|
|
642
|
-
readonly controller: Controller$2;
|
|
643
|
-
readonly kind?: "after-user-action" | "retry";
|
|
644
|
-
}
|
|
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;
|
|
1127
|
+
interface VerificationSlotProps {
|
|
1128
|
+
readonly controller: Controller;
|
|
1129
|
+
readonly domain: string;
|
|
670
1130
|
}
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
1131
|
+
interface ActionsSlotProps {
|
|
1132
|
+
readonly connection: Controller$1;
|
|
1133
|
+
readonly provisioning: Controller$2;
|
|
1134
|
+
readonly cleanup: Controller$2;
|
|
1135
|
+
readonly domain: string;
|
|
675
1136
|
}
|
|
676
|
-
interface
|
|
1137
|
+
interface ConnectionSlotProps {
|
|
1138
|
+
readonly controller: Controller$1;
|
|
677
1139
|
readonly domain: string;
|
|
678
|
-
readonly receiptId?: string;
|
|
679
|
-
readonly records: ReadonlyArray<Transport.DnsRecord>;
|
|
680
1140
|
}
|
|
681
|
-
|
|
1141
|
+
/**
|
|
1142
|
+
* Each slot replaces one part of the flow and keeps the rest. Every slot has a default, so
|
|
1143
|
+
* `<Domain.Flow domain requirements />` is complete on its own.
|
|
1144
|
+
*/
|
|
1145
|
+
interface Slots {
|
|
1146
|
+
/** The requirements table. Defaults to `Records.Table` with readiness when there is any. */
|
|
1147
|
+
readonly records?: (props: RecordsSlotProps) => ReactNode;
|
|
1148
|
+
/** Defaults to `Verify.Status`. Rendered only when the transport declares `verification`. */
|
|
1149
|
+
readonly verification?: (props: VerificationSlotProps) => ReactNode;
|
|
1150
|
+
/** Defaults to Approve and Decline, plus cleanup when the transport declares it. */
|
|
1151
|
+
readonly actions?: (props: ActionsSlotProps) => ReactNode;
|
|
1152
|
+
/** Defaults to `Connect.Card` once connected and `Connect.Dialog` until then. */
|
|
1153
|
+
readonly connection?: (props: ConnectionSlotProps) => ReactNode;
|
|
1154
|
+
}
|
|
1155
|
+
interface FlowState extends Record<string, unknown> {
|
|
1156
|
+
readonly connection: State$1["_tag"];
|
|
1157
|
+
readonly provisioning: State$2["_tag"];
|
|
1158
|
+
}
|
|
1159
|
+
interface FlowProps extends Omit<PartProps<"div", FlowState>, "children"> {
|
|
1160
|
+
readonly domain: string;
|
|
1161
|
+
readonly requirements: ReadonlyArray<DnsRecord.Model>;
|
|
1162
|
+
readonly slots?: Slots;
|
|
1163
|
+
readonly onApplied?: (receipt: Receipt.Model) => void;
|
|
1164
|
+
readonly onCleaned?: (receipt: Receipt.Model) => void;
|
|
1165
|
+
/**
|
|
1166
|
+
* Where an interactive provider flow returns the customer. Defaults to the page they started
|
|
1167
|
+
* from; pass `null` to let the server's `defaultReturnTo` decide.
|
|
1168
|
+
*/
|
|
1169
|
+
readonly returnTo?: string | null;
|
|
1170
|
+
/** Render this domain's state without the controls that change it. Defaults to the root's. */
|
|
1171
|
+
readonly readOnly?: boolean;
|
|
1172
|
+
}
|
|
1173
|
+
/**
|
|
1174
|
+
* The whole lifecycle for one domain: connect, review, apply, observe, clean up. The flow renders
|
|
1175
|
+
* only what the transport declares, and every part of it is a slot with a default. It adds no
|
|
1176
|
+
* layout containers of its own, so a host's grid can place the slot output directly.
|
|
1177
|
+
*/
|
|
1178
|
+
declare function Flow({ domain, onApplied, onCleaned, readOnly, requirements, returnTo, slots, ...props }: FlowProps): ReactElement;
|
|
682
1179
|
//#endregion
|
|
683
1180
|
//#region src/icons.d.ts
|
|
684
|
-
|
|
1181
|
+
/**
|
|
1182
|
+
* Every glyph the package draws, in one place. Parts read them from context; none of them takes
|
|
1183
|
+
* an icon prop of its own, so a host swaps the whole set once on `DomainKit.Root`.
|
|
1184
|
+
*/
|
|
1185
|
+
interface Icons {
|
|
1186
|
+
readonly close: ReactNode;
|
|
685
1187
|
readonly copied: ReactNode;
|
|
686
1188
|
readonly copy: ReactNode;
|
|
687
1189
|
readonly download: ReactNode;
|
|
1190
|
+
readonly external: ReactNode;
|
|
1191
|
+
readonly failure: ReactNode;
|
|
1192
|
+
readonly pending: ReactNode;
|
|
1193
|
+
readonly success: ReactNode;
|
|
1194
|
+
}
|
|
1195
|
+
declare const defaultIcons: {
|
|
1196
|
+
readonly close: import("react/jsx-runtime").JSX.Element;
|
|
1197
|
+
readonly copied: import("react/jsx-runtime").JSX.Element;
|
|
1198
|
+
readonly copy: import("react/jsx-runtime").JSX.Element;
|
|
1199
|
+
readonly download: import("react/jsx-runtime").JSX.Element;
|
|
1200
|
+
readonly external: import("react/jsx-runtime").JSX.Element;
|
|
1201
|
+
readonly failure: import("react/jsx-runtime").JSX.Element;
|
|
1202
|
+
readonly pending: import("react/jsx-runtime").JSX.Element;
|
|
1203
|
+
readonly success: import("react/jsx-runtime").JSX.Element;
|
|
688
1204
|
};
|
|
689
|
-
declare
|
|
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
|
-
};
|
|
726
|
-
}>;
|
|
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";
|
|
732
|
-
}, {
|
|
733
|
-
readonly _tag: Tag;
|
|
734
|
-
}> | Extract<{
|
|
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
|
-
}>;
|
|
770
|
-
}, {
|
|
771
|
-
readonly _tag: Tag;
|
|
772
|
-
}>;
|
|
773
|
-
readonly $match: {
|
|
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";
|
|
778
|
-
} | {
|
|
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
|
-
}>;
|
|
806
|
-
}, {
|
|
807
|
-
readonly _tag: Tag;
|
|
808
|
-
}>) => any; }>(cases: Cases): (value: {
|
|
809
|
-
readonly _tag: "ConnectionEstablished";
|
|
810
|
-
readonly connection: Transport.Connected;
|
|
811
|
-
readonly source: "attach" | "connect";
|
|
812
|
-
} | {
|
|
813
|
-
readonly _tag: "DomainDetached";
|
|
814
|
-
readonly connection: Transport.Connected;
|
|
815
|
-
readonly result: Transport.DetachResult;
|
|
816
|
-
} | {
|
|
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
|
-
}>;
|
|
873
|
-
}, {
|
|
874
|
-
readonly _tag: Tag;
|
|
875
|
-
}>) => any; }>(value: {
|
|
876
|
-
readonly _tag: "ConnectionEstablished";
|
|
877
|
-
readonly connection: Transport.Connected;
|
|
878
|
-
readonly source: "attach" | "connect";
|
|
879
|
-
} | {
|
|
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"]>>;
|
|
908
|
-
};
|
|
909
|
-
readonly ConnectionEstablished: Data.TaggedEnum.ConstructorFrom<{
|
|
910
|
-
readonly _tag: "ConnectionEstablished";
|
|
911
|
-
readonly connection: Transport.Connected;
|
|
912
|
-
readonly source: "attach" | "connect";
|
|
913
|
-
}, "_tag">;
|
|
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
|
-
}>;
|
|
946
|
-
}, "_tag">;
|
|
947
|
-
};
|
|
948
|
-
type Listener = (event: Event) => void;
|
|
1205
|
+
declare function useIcons(): Icons;
|
|
949
1206
|
declare namespace messages_d_exports {
|
|
950
|
-
export { Catalog, english, merge };
|
|
1207
|
+
export { Catalog, EvidenceLike, english, failure, merge };
|
|
951
1208
|
}
|
|
952
1209
|
interface Catalog {
|
|
953
|
-
readonly
|
|
954
|
-
readonly
|
|
955
|
-
readonly
|
|
956
|
-
readonly
|
|
957
|
-
readonly automaticUnavailable: string;
|
|
1210
|
+
readonly connect: string;
|
|
1211
|
+
readonly connectWith: (method: string) => string;
|
|
1212
|
+
readonly disconnect: string;
|
|
1213
|
+
readonly detach: string;
|
|
958
1214
|
readonly cancel: string;
|
|
959
|
-
readonly
|
|
960
|
-
readonly
|
|
1215
|
+
readonly close: string;
|
|
1216
|
+
readonly retry: string;
|
|
1217
|
+
readonly approve: string;
|
|
1218
|
+
readonly decline: string;
|
|
1219
|
+
readonly reviewChanges: string;
|
|
1220
|
+
readonly cleanUp: string;
|
|
961
1221
|
readonly checkDns: string;
|
|
962
|
-
readonly
|
|
963
|
-
readonly
|
|
964
|
-
readonly
|
|
965
|
-
readonly
|
|
966
|
-
readonly
|
|
967
|
-
readonly
|
|
1222
|
+
readonly checkAgain: string;
|
|
1223
|
+
readonly moreActions: string;
|
|
1224
|
+
readonly copy: string;
|
|
1225
|
+
readonly copied: string;
|
|
1226
|
+
readonly copyZone: string;
|
|
1227
|
+
readonly download: string;
|
|
1228
|
+
readonly useConnection: (label: string) => string;
|
|
1229
|
+
readonly chooseZone: string;
|
|
1230
|
+
readonly getToken: string;
|
|
1231
|
+
readonly loading: string;
|
|
968
1232
|
readonly connecting: string;
|
|
969
|
-
readonly
|
|
970
|
-
readonly detectingProvider: string;
|
|
971
|
-
readonly disconnectDomain: string;
|
|
972
|
-
readonly disconnectConsent: string;
|
|
973
|
-
readonly disconnecting: string;
|
|
1233
|
+
readonly redirecting: string;
|
|
974
1234
|
readonly detaching: string;
|
|
1235
|
+
readonly disconnecting: string;
|
|
1236
|
+
readonly planning: string;
|
|
1237
|
+
readonly approving: string;
|
|
1238
|
+
readonly applying: string;
|
|
1239
|
+
readonly rejecting: string;
|
|
1240
|
+
readonly planningCleanup: string;
|
|
1241
|
+
readonly cleaning: string;
|
|
1242
|
+
readonly observing: string;
|
|
1243
|
+
readonly connectTitle: (provider: string) => string;
|
|
1244
|
+
/** The dialog heading before a provider is chosen. */
|
|
1245
|
+
readonly connectAnyTitle: string;
|
|
1246
|
+
readonly connectDescription: (domain: string) => string;
|
|
1247
|
+
readonly connectedTo: (provider: string) => string;
|
|
1248
|
+
/** Shown where a connect control would be when the customer may not connect. */
|
|
1249
|
+
readonly notConnected: string;
|
|
1250
|
+
readonly reconnectRequired: (provider: string) => string;
|
|
975
1251
|
readonly disconnectTitle: (provider: string) => string;
|
|
976
|
-
readonly
|
|
977
|
-
readonly
|
|
978
|
-
readonly
|
|
979
|
-
readonly
|
|
980
|
-
readonly
|
|
981
|
-
readonly
|
|
1252
|
+
readonly disconnectConsent: string;
|
|
1253
|
+
readonly detachConsent: string;
|
|
1254
|
+
readonly detached: string;
|
|
1255
|
+
readonly reusableConnections: string;
|
|
1256
|
+
readonly authenticationAlternative: string;
|
|
1257
|
+
readonly discoveredConnection: (label: string) => string;
|
|
1258
|
+
readonly discoveryAmbiguous: string;
|
|
1259
|
+
readonly discoveryNotFound: (nameservers: ReadonlyArray<string>) => string;
|
|
1260
|
+
readonly noProviders: string;
|
|
1261
|
+
readonly fieldLabel: (name: string) => string;
|
|
1262
|
+
readonly optionalField: string;
|
|
1263
|
+
readonly planTitle: string;
|
|
982
1264
|
readonly planConsent: string;
|
|
983
|
-
readonly
|
|
984
|
-
readonly
|
|
985
|
-
readonly
|
|
986
|
-
readonly
|
|
987
|
-
readonly
|
|
988
|
-
readonly
|
|
989
|
-
readonly
|
|
990
|
-
readonly
|
|
991
|
-
readonly
|
|
992
|
-
readonly
|
|
993
|
-
|
|
1265
|
+
readonly cleanupTitle: string;
|
|
1266
|
+
readonly cleanupConsent: string;
|
|
1267
|
+
readonly noChanges: string;
|
|
1268
|
+
readonly planExpires: (at: string) => string;
|
|
1269
|
+
readonly declinedBy: (actor: string) => string;
|
|
1270
|
+
readonly declineReason: (reason: string) => string;
|
|
1271
|
+
readonly operation: (operation: Plan.Operation) => string;
|
|
1272
|
+
readonly conflictReason: (reason: Plan.Conflict["reason"]) => string;
|
|
1273
|
+
readonly attemptStatus: (status: Storage.AttemptStatus) => string;
|
|
1274
|
+
readonly recordsCaption: (domain: string) => string;
|
|
1275
|
+
readonly headingType: string;
|
|
1276
|
+
readonly headingName: string;
|
|
1277
|
+
readonly headingValue: string;
|
|
1278
|
+
readonly headingStatus: string;
|
|
1279
|
+
readonly headingPurpose: string;
|
|
1280
|
+
readonly priority: (priority: number) => string;
|
|
1281
|
+
readonly ttl: (seconds: number) => string;
|
|
1282
|
+
readonly recordType: (record: DnsRecord.Observed) => string;
|
|
1283
|
+
readonly applied: (receipt: Receipt.Model) => string;
|
|
1284
|
+
readonly cleaned: (receipt: Receipt.Model) => string;
|
|
1285
|
+
readonly partiallyApplied: string;
|
|
1286
|
+
readonly partiallyCleaned: string;
|
|
1287
|
+
readonly outcome: (outcome: Receipt.Outcome) => string;
|
|
1288
|
+
readonly skippedReason: (reason: Receipt.Skipped["reason"]) => string;
|
|
1289
|
+
readonly requirementStatus: (status: Storage.RequirementStatus) => string;
|
|
1290
|
+
readonly overall: (overall: Storage.Overall) => string;
|
|
1291
|
+
readonly evidenceSource: (evidence: EvidenceLike) => string;
|
|
1292
|
+
readonly hostEvidenceStatus: (status: "failed" | "ok" | "pending") => string;
|
|
1293
|
+
/** What the requirement asks for, shown when an observation disagrees with it. */
|
|
1294
|
+
readonly expectedValue: (value: string) => string;
|
|
1295
|
+
/** What one observer actually read back for that name. */
|
|
1296
|
+
readonly observedValues: (values: ReadonlyArray<string>) => string;
|
|
1297
|
+
readonly observedNothing: string;
|
|
1298
|
+
readonly checkedAt: (at: string) => string;
|
|
1299
|
+
readonly nextCheckAt: (at: string) => string;
|
|
1300
|
+
readonly hostEvidence: string;
|
|
1301
|
+
readonly noEvidence: string;
|
|
1302
|
+
readonly invalidInput: (reason: Reason.InvalidInput) => string;
|
|
1303
|
+
readonly unauthenticated: (reason: Reason.Unauthenticated) => string;
|
|
1304
|
+
readonly forbidden: (reason: Reason.Forbidden) => string;
|
|
1305
|
+
readonly notFound: (reason: Reason.NotFound) => string;
|
|
1306
|
+
readonly conflict: (reason: Reason.Conflict) => string;
|
|
1307
|
+
readonly stale: (reason: Reason.Stale) => string;
|
|
1308
|
+
readonly expired: (reason: Reason.Expired) => string;
|
|
1309
|
+
readonly busy: (reason: Reason.Busy) => string;
|
|
1310
|
+
readonly providerRejected: (reason: Reason.ProviderRejected) => string;
|
|
1311
|
+
readonly providerUnavailable: (reason: Reason.ProviderUnavailable) => string;
|
|
1312
|
+
readonly providerConflict: (reason: Reason.ProviderConflict) => string;
|
|
1313
|
+
readonly unsupported: (reason: Reason.Unsupported) => string;
|
|
1314
|
+
readonly reconnect: (reason: Reason.Reconnect) => string;
|
|
1315
|
+
readonly storageFailed: (reason: Reason.StorageFailed) => string;
|
|
1316
|
+
readonly cryptoFailed: (reason: Reason.CryptoFailed) => string;
|
|
1317
|
+
readonly resolverFailed: (reason: Reason.ResolverFailed) => string;
|
|
1318
|
+
}
|
|
1319
|
+
/** The evidence shapes `Verify` produces, structurally, so the catalog needs no service import. */
|
|
1320
|
+
type EvidenceLike = {
|
|
1321
|
+
readonly _tag: "Host";
|
|
1322
|
+
readonly source: string;
|
|
1323
|
+
readonly label: string;
|
|
1324
|
+
} | {
|
|
1325
|
+
readonly _tag: "Provider";
|
|
1326
|
+
readonly provider: string;
|
|
1327
|
+
} | {
|
|
1328
|
+
readonly _tag: "PublicDns";
|
|
1329
|
+
readonly resolver: string;
|
|
1330
|
+
};
|
|
994
1331
|
declare const english: Catalog;
|
|
995
1332
|
declare const merge: (overrides?: Partial<Catalog>) => Catalog;
|
|
1333
|
+
/** The user-facing sentence for a failure, chosen by the error's reason. */
|
|
1334
|
+
declare const failure: (error: DomainKit.Error, catalog: Catalog) => string;
|
|
996
1335
|
declare namespace theme_d_exports {
|
|
997
1336
|
export { Theme, toStyle };
|
|
998
1337
|
}
|
|
@@ -1014,351 +1353,98 @@ interface Theme {
|
|
|
1014
1353
|
}
|
|
1015
1354
|
declare function toStyle(theme?: Theme): CSSProperties;
|
|
1016
1355
|
declare namespace domain_kit_d_exports {
|
|
1017
|
-
export { Root$
|
|
1356
|
+
export { ReadOnly, Root$2 as Root, RootProps$2 as RootProps, RootState, StableTransport, useCapabilities, useDomainKit, useReadOnly, useTransport };
|
|
1018
1357
|
}
|
|
1019
1358
|
interface RootState extends Record<string, unknown> {
|
|
1020
1359
|
readonly colorScheme: "dark" | "inherit" | "light";
|
|
1021
1360
|
}
|
|
1022
|
-
interface RootProps$
|
|
1361
|
+
interface RootProps$2 extends Omit<PartProps<"div", RootState>, "children"> {
|
|
1023
1362
|
readonly children: ReactNode;
|
|
1024
1363
|
readonly colorScheme?: RootState["colorScheme"];
|
|
1025
1364
|
readonly icons?: Partial<Icons>;
|
|
1026
|
-
readonly messages?: Partial<Catalog>;
|
|
1027
1365
|
readonly marks?: Marks;
|
|
1366
|
+
readonly messages?: Partial<Catalog>;
|
|
1367
|
+
/** Where an interactive provider flow sends the customer. Defaults to `window.location`. */
|
|
1028
1368
|
readonly navigate?: (url: string) => void;
|
|
1029
1369
|
readonly onEvent?: Listener;
|
|
1030
1370
|
readonly portalContainer?: HTMLElement | null;
|
|
1371
|
+
/**
|
|
1372
|
+
* Render the state without the controls that change it, for a customer who may read the domain
|
|
1373
|
+
* but not write to it. Capability gating already hides a group the transport does not declare;
|
|
1374
|
+
* this covers authorization the transport cannot express, such as a member of an organisation.
|
|
1375
|
+
*/
|
|
1376
|
+
readonly readOnly?: boolean;
|
|
1377
|
+
/** Bump to re-inspect every mounted domain after a change the UI did not make. */
|
|
1378
|
+
readonly revision?: number;
|
|
1031
1379
|
readonly theme?: Theme;
|
|
1032
|
-
|
|
1380
|
+
/** The transport, by value. Rebuilding it inline on every render does not restart controllers. */
|
|
1381
|
+
readonly transport: Transport.Interface;
|
|
1033
1382
|
}
|
|
1034
1383
|
interface ContextValue {
|
|
1384
|
+
readonly capabilities: ReadonlyArray<Transport.Capability>;
|
|
1035
1385
|
readonly colorScheme: RootState["colorScheme"];
|
|
1036
|
-
readonly
|
|
1386
|
+
readonly emit: Listener;
|
|
1037
1387
|
readonly marks: Marks;
|
|
1038
1388
|
readonly messages: Catalog;
|
|
1039
|
-
readonly
|
|
1389
|
+
readonly navigate: (url: string) => void;
|
|
1040
1390
|
readonly portalContainer: RefObject<HTMLElement | null>;
|
|
1391
|
+
readonly readOnly: boolean;
|
|
1392
|
+
readonly revision: number;
|
|
1041
1393
|
readonly themeStyle: ReturnType<typeof toStyle>;
|
|
1042
|
-
readonly
|
|
1394
|
+
readonly transport: Transport.Interface;
|
|
1043
1395
|
}
|
|
1044
|
-
|
|
1396
|
+
interface StableTransport {
|
|
1397
|
+
readonly transport: Transport.Interface;
|
|
1398
|
+
readonly capabilities: ReadonlyArray<Transport.Capability>;
|
|
1399
|
+
}
|
|
1400
|
+
declare function Root$2({ children, colorScheme, icons, marks, messages, navigate, onEvent, portalContainer, readOnly, revision, theme, transport, ...props }: RootProps$2): import("react/jsx-runtime").JSX.Element;
|
|
1045
1401
|
declare function useDomainKit(): ContextValue;
|
|
1402
|
+
/** The transport `DomainKit.Root` holds, with the identity it keeps for the whole mount. */
|
|
1403
|
+
declare function useTransport(): Transport.Interface;
|
|
1404
|
+
/** Narrow one subtree to read-only without touching the rest of the page. */
|
|
1405
|
+
declare function ReadOnly({ children, value }: {
|
|
1406
|
+
readonly children: ReactNode;
|
|
1407
|
+
readonly value: boolean;
|
|
1408
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
1409
|
+
/** Whether this part may offer controls that change the domain. */
|
|
1410
|
+
declare function useReadOnly(): boolean;
|
|
1411
|
+
/** Which capability groups the host's transport declares, for gating a custom part. */
|
|
1412
|
+
declare function useCapabilities(): ReadonlyArray<Transport.Capability>;
|
|
1046
1413
|
declare namespace operations_d_exports {
|
|
1047
|
-
export { Item, ItemProps, Kind,
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
declare const
|
|
1052
|
-
declare const
|
|
1053
|
-
declare const
|
|
1054
|
-
declare const Name: (props: PartProps<"span", LeafState$1>) => ReactElement;
|
|
1055
|
-
declare const Value$1: (props: PartProps<"code", LeafState$1>) => ReactElement;
|
|
1056
|
-
declare const Priority$1: (props: PartProps<"span", LeafState$1>) => ReactElement;
|
|
1057
|
-
declare const Reason: (props: PartProps<"span", LeafState$1>) => ReactElement;
|
|
1414
|
+
export { Item, ItemProps, Kind, List, ListProps, Name, Reason$1 as Reason, Record$1 as Record, Root$1 as Root, RootProps$1 as RootProps, Type };
|
|
1415
|
+
}
|
|
1416
|
+
declare const Kind: (props: PartProps<"span", Record$1<string, unknown>>) => ReactElement;
|
|
1417
|
+
declare const Type: (props: PartProps<"strong", Record$1<string, unknown>>) => ReactElement;
|
|
1418
|
+
declare const Record$1: (props: PartProps<"span", Record$1<string, unknown>>) => ReactElement;
|
|
1419
|
+
declare const Name: (props: PartProps<"span", Record$1<string, unknown>>) => ReactElement;
|
|
1420
|
+
declare const Reason$1: (props: PartProps<"span", Record$1<string, unknown>>) => ReactElement;
|
|
1058
1421
|
interface ItemProps extends PartProps<"li", {
|
|
1059
|
-
readonly operation: Operation["_tag"];
|
|
1422
|
+
readonly operation: Plan.Operation["_tag"];
|
|
1060
1423
|
}> {
|
|
1061
|
-
readonly operation: Operation;
|
|
1424
|
+
readonly operation: Plan.Operation;
|
|
1062
1425
|
}
|
|
1063
|
-
declare function Item({ operation, ...props }: ItemProps): ReactElement
|
|
1064
|
-
interface RootProps$
|
|
1426
|
+
declare function Item({ operation, ...props }: ItemProps): ReactElement;
|
|
1427
|
+
interface RootProps$1 extends PartProps<"ul", {
|
|
1065
1428
|
readonly count: number;
|
|
1066
|
-
readonly
|
|
1429
|
+
readonly kind: Plan.Kind;
|
|
1067
1430
|
}> {
|
|
1068
1431
|
readonly count?: number;
|
|
1069
|
-
readonly
|
|
1070
|
-
}
|
|
1071
|
-
type Lifecycle = "cleanup" | "provisioning";
|
|
1072
|
-
declare function Root$3({ count, lifecycle, ...props }: RootProps$3): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1073
|
-
interface ListProps extends Omit<RootProps$3, "children" | "count"> {
|
|
1074
|
-
readonly operations: ReadonlyArray<Operation>;
|
|
1432
|
+
readonly kind: Plan.Kind;
|
|
1075
1433
|
}
|
|
1076
|
-
declare function
|
|
1077
|
-
|
|
1078
|
-
|
|
1434
|
+
declare function Root$1({ count, kind, ...props }: RootProps$1): ReactElement;
|
|
1435
|
+
interface ListProps extends Omit<RootProps$1, "children" | "count" | "kind"> {
|
|
1436
|
+
readonly plan: Plan.Model;
|
|
1079
1437
|
}
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
readonly plan: Transport.ProvisioningPlan;
|
|
1083
|
-
};
|
|
1084
|
-
Complete: {
|
|
1085
|
-
readonly result: Extract<Transport.ApplyResult, {
|
|
1086
|
-
readonly _tag: "Applied";
|
|
1087
|
-
}>;
|
|
1088
|
-
};
|
|
1089
|
-
Idle: {};
|
|
1090
|
-
Partial: {
|
|
1091
|
-
readonly result: Extract<Transport.ApplyResult, {
|
|
1092
|
-
readonly _tag: "Partial";
|
|
1093
|
-
}>;
|
|
1094
|
-
};
|
|
1095
|
-
Planning: {};
|
|
1096
|
-
Review: {
|
|
1097
|
-
readonly plan: Transport.ProvisioningPlan;
|
|
1098
|
-
};
|
|
1099
|
-
}>;
|
|
1100
|
-
declare const State$1: {
|
|
1101
|
-
readonly $is: <Tag extends "Applying" | "Complete" | "Idle" | "Partial" | "Planning" | "Review">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
1102
|
-
readonly _tag: "Applying";
|
|
1103
|
-
readonly plan: Transport.ProvisioningPlan;
|
|
1104
|
-
}, {
|
|
1105
|
-
readonly _tag: Tag;
|
|
1106
|
-
}> | Extract<{
|
|
1107
|
-
readonly _tag: "Complete";
|
|
1108
|
-
readonly result: Extract<Transport.ApplyResult, {
|
|
1109
|
-
readonly _tag: "Applied";
|
|
1110
|
-
}>;
|
|
1111
|
-
}, {
|
|
1112
|
-
readonly _tag: Tag;
|
|
1113
|
-
}> | Extract<{
|
|
1114
|
-
readonly _tag: "Idle";
|
|
1115
|
-
}, {
|
|
1116
|
-
readonly _tag: Tag;
|
|
1117
|
-
}> | Extract<{
|
|
1118
|
-
readonly _tag: "Partial";
|
|
1119
|
-
readonly result: Extract<Transport.ApplyResult, {
|
|
1120
|
-
readonly _tag: "Partial";
|
|
1121
|
-
}>;
|
|
1122
|
-
}, {
|
|
1123
|
-
readonly _tag: Tag;
|
|
1124
|
-
}> | Extract<{
|
|
1125
|
-
readonly _tag: "Planning";
|
|
1126
|
-
}, {
|
|
1127
|
-
readonly _tag: Tag;
|
|
1128
|
-
}> | Extract<{
|
|
1129
|
-
readonly _tag: "Review";
|
|
1130
|
-
readonly plan: Transport.ProvisioningPlan;
|
|
1131
|
-
}, {
|
|
1132
|
-
readonly _tag: Tag;
|
|
1133
|
-
}>;
|
|
1134
|
-
readonly $match: {
|
|
1135
|
-
<Cases extends { readonly [Tag in "Applying" | "Complete" | "Idle" | "Partial" | "Planning" | "Review"]: (args: Extract<{
|
|
1136
|
-
readonly _tag: "Applying";
|
|
1137
|
-
readonly plan: Transport.ProvisioningPlan;
|
|
1138
|
-
} | {
|
|
1139
|
-
readonly _tag: "Complete";
|
|
1140
|
-
readonly result: Extract<Transport.ApplyResult, {
|
|
1141
|
-
readonly _tag: "Applied";
|
|
1142
|
-
}>;
|
|
1143
|
-
} | {
|
|
1144
|
-
readonly _tag: "Idle";
|
|
1145
|
-
} | {
|
|
1146
|
-
readonly _tag: "Partial";
|
|
1147
|
-
readonly result: Extract<Transport.ApplyResult, {
|
|
1148
|
-
readonly _tag: "Partial";
|
|
1149
|
-
}>;
|
|
1150
|
-
} | {
|
|
1151
|
-
readonly _tag: "Planning";
|
|
1152
|
-
} | {
|
|
1153
|
-
readonly _tag: "Review";
|
|
1154
|
-
readonly plan: Transport.ProvisioningPlan;
|
|
1155
|
-
}, {
|
|
1156
|
-
readonly _tag: Tag;
|
|
1157
|
-
}>) => any; }>(cases: Cases): (value: {
|
|
1158
|
-
readonly _tag: "Applying";
|
|
1159
|
-
readonly plan: Transport.ProvisioningPlan;
|
|
1160
|
-
} | {
|
|
1161
|
-
readonly _tag: "Complete";
|
|
1162
|
-
readonly result: Extract<Transport.ApplyResult, {
|
|
1163
|
-
readonly _tag: "Applied";
|
|
1164
|
-
}>;
|
|
1165
|
-
} | {
|
|
1166
|
-
readonly _tag: "Idle";
|
|
1167
|
-
} | {
|
|
1168
|
-
readonly _tag: "Partial";
|
|
1169
|
-
readonly result: Extract<Transport.ApplyResult, {
|
|
1170
|
-
readonly _tag: "Partial";
|
|
1171
|
-
}>;
|
|
1172
|
-
} | {
|
|
1173
|
-
readonly _tag: "Planning";
|
|
1174
|
-
} | {
|
|
1175
|
-
readonly _tag: "Review";
|
|
1176
|
-
readonly plan: Transport.ProvisioningPlan;
|
|
1177
|
-
}) => import("effect/Unify").Unify<ReturnType<Cases["Applying" | "Complete" | "Idle" | "Partial" | "Planning" | "Review"]>>;
|
|
1178
|
-
<Cases extends { readonly [Tag in "Applying" | "Complete" | "Idle" | "Partial" | "Planning" | "Review"]: (args: Extract<{
|
|
1179
|
-
readonly _tag: "Applying";
|
|
1180
|
-
readonly plan: Transport.ProvisioningPlan;
|
|
1181
|
-
} | {
|
|
1182
|
-
readonly _tag: "Complete";
|
|
1183
|
-
readonly result: Extract<Transport.ApplyResult, {
|
|
1184
|
-
readonly _tag: "Applied";
|
|
1185
|
-
}>;
|
|
1186
|
-
} | {
|
|
1187
|
-
readonly _tag: "Idle";
|
|
1188
|
-
} | {
|
|
1189
|
-
readonly _tag: "Partial";
|
|
1190
|
-
readonly result: Extract<Transport.ApplyResult, {
|
|
1191
|
-
readonly _tag: "Partial";
|
|
1192
|
-
}>;
|
|
1193
|
-
} | {
|
|
1194
|
-
readonly _tag: "Planning";
|
|
1195
|
-
} | {
|
|
1196
|
-
readonly _tag: "Review";
|
|
1197
|
-
readonly plan: Transport.ProvisioningPlan;
|
|
1198
|
-
}, {
|
|
1199
|
-
readonly _tag: Tag;
|
|
1200
|
-
}>) => any; }>(value: {
|
|
1201
|
-
readonly _tag: "Applying";
|
|
1202
|
-
readonly plan: Transport.ProvisioningPlan;
|
|
1203
|
-
} | {
|
|
1204
|
-
readonly _tag: "Complete";
|
|
1205
|
-
readonly result: Extract<Transport.ApplyResult, {
|
|
1206
|
-
readonly _tag: "Applied";
|
|
1207
|
-
}>;
|
|
1208
|
-
} | {
|
|
1209
|
-
readonly _tag: "Idle";
|
|
1210
|
-
} | {
|
|
1211
|
-
readonly _tag: "Partial";
|
|
1212
|
-
readonly result: Extract<Transport.ApplyResult, {
|
|
1213
|
-
readonly _tag: "Partial";
|
|
1214
|
-
}>;
|
|
1215
|
-
} | {
|
|
1216
|
-
readonly _tag: "Planning";
|
|
1217
|
-
} | {
|
|
1218
|
-
readonly _tag: "Review";
|
|
1219
|
-
readonly plan: Transport.ProvisioningPlan;
|
|
1220
|
-
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Applying" | "Complete" | "Idle" | "Partial" | "Planning" | "Review"]>>;
|
|
1221
|
-
};
|
|
1222
|
-
readonly Applying: Data.TaggedEnum.ConstructorFrom<{
|
|
1223
|
-
readonly _tag: "Applying";
|
|
1224
|
-
readonly plan: Transport.ProvisioningPlan;
|
|
1225
|
-
}, "_tag">;
|
|
1226
|
-
readonly Complete: Data.TaggedEnum.ConstructorFrom<{
|
|
1227
|
-
readonly _tag: "Complete";
|
|
1228
|
-
readonly result: Extract<Transport.ApplyResult, {
|
|
1229
|
-
readonly _tag: "Applied";
|
|
1230
|
-
}>;
|
|
1231
|
-
}, "_tag">;
|
|
1232
|
-
readonly Idle: Data.TaggedEnum.ConstructorFrom<{
|
|
1233
|
-
readonly _tag: "Idle";
|
|
1234
|
-
}, "_tag">;
|
|
1235
|
-
readonly Partial: Data.TaggedEnum.ConstructorFrom<{
|
|
1236
|
-
readonly _tag: "Partial";
|
|
1237
|
-
readonly result: Extract<Transport.ApplyResult, {
|
|
1238
|
-
readonly _tag: "Partial";
|
|
1239
|
-
}>;
|
|
1240
|
-
}, "_tag">;
|
|
1241
|
-
readonly Planning: Data.TaggedEnum.ConstructorFrom<{
|
|
1242
|
-
readonly _tag: "Planning";
|
|
1243
|
-
}, "_tag">;
|
|
1244
|
-
readonly Review: Data.TaggedEnum.ConstructorFrom<{
|
|
1245
|
-
readonly _tag: "Review";
|
|
1246
|
-
readonly plan: Transport.ProvisioningPlan;
|
|
1247
|
-
}, "_tag">;
|
|
1248
|
-
};
|
|
1249
|
-
type State$1 = LocalState$1 | Extract<Transport.ApplyResult, {
|
|
1250
|
-
readonly _tag: "Stale";
|
|
1251
|
-
}> | Failure;
|
|
1252
|
-
interface Controller$1 {
|
|
1253
|
-
readonly apply: () => void;
|
|
1254
|
-
readonly dismiss: () => void;
|
|
1255
|
-
readonly plan: () => void;
|
|
1256
|
-
readonly retry: () => void;
|
|
1257
|
-
readonly state: State$1;
|
|
1258
|
-
}
|
|
1259
|
-
type Command$1 = Data.TaggedEnum<{
|
|
1260
|
-
Apply: {};
|
|
1261
|
-
Dismiss: {};
|
|
1262
|
-
Plan: {};
|
|
1263
|
-
}>;
|
|
1264
|
-
declare const Command$1: {
|
|
1265
|
-
readonly $is: <Tag extends "Apply" | "Dismiss" | "Plan">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
1266
|
-
readonly _tag: "Apply";
|
|
1267
|
-
}, {
|
|
1268
|
-
readonly _tag: Tag;
|
|
1269
|
-
}> | Extract<{
|
|
1270
|
-
readonly _tag: "Dismiss";
|
|
1271
|
-
}, {
|
|
1272
|
-
readonly _tag: Tag;
|
|
1273
|
-
}> | Extract<{
|
|
1274
|
-
readonly _tag: "Plan";
|
|
1275
|
-
}, {
|
|
1276
|
-
readonly _tag: Tag;
|
|
1277
|
-
}>;
|
|
1278
|
-
readonly $match: {
|
|
1279
|
-
<Cases extends { readonly [Tag in "Apply" | "Dismiss" | "Plan"]: (args: Extract<{
|
|
1280
|
-
readonly _tag: "Apply";
|
|
1281
|
-
} | {
|
|
1282
|
-
readonly _tag: "Dismiss";
|
|
1283
|
-
} | {
|
|
1284
|
-
readonly _tag: "Plan";
|
|
1285
|
-
}, {
|
|
1286
|
-
readonly _tag: Tag;
|
|
1287
|
-
}>) => any; }>(cases: Cases): (value: {
|
|
1288
|
-
readonly _tag: "Apply";
|
|
1289
|
-
} | {
|
|
1290
|
-
readonly _tag: "Dismiss";
|
|
1291
|
-
} | {
|
|
1292
|
-
readonly _tag: "Plan";
|
|
1293
|
-
}) => import("effect/Unify").Unify<ReturnType<Cases["Apply" | "Dismiss" | "Plan"]>>;
|
|
1294
|
-
<Cases extends { readonly [Tag in "Apply" | "Dismiss" | "Plan"]: (args: Extract<{
|
|
1295
|
-
readonly _tag: "Apply";
|
|
1296
|
-
} | {
|
|
1297
|
-
readonly _tag: "Dismiss";
|
|
1298
|
-
} | {
|
|
1299
|
-
readonly _tag: "Plan";
|
|
1300
|
-
}, {
|
|
1301
|
-
readonly _tag: Tag;
|
|
1302
|
-
}>) => any; }>(value: {
|
|
1303
|
-
readonly _tag: "Apply";
|
|
1304
|
-
} | {
|
|
1305
|
-
readonly _tag: "Dismiss";
|
|
1306
|
-
} | {
|
|
1307
|
-
readonly _tag: "Plan";
|
|
1308
|
-
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Apply" | "Dismiss" | "Plan"]>>;
|
|
1309
|
-
};
|
|
1310
|
-
readonly Apply: Data.TaggedEnum.ConstructorFrom<{
|
|
1311
|
-
readonly _tag: "Apply";
|
|
1312
|
-
}, "_tag">;
|
|
1313
|
-
readonly Dismiss: Data.TaggedEnum.ConstructorFrom<{
|
|
1314
|
-
readonly _tag: "Dismiss";
|
|
1315
|
-
}, "_tag">;
|
|
1316
|
-
readonly Plan: Data.TaggedEnum.ConstructorFrom<{
|
|
1317
|
-
readonly _tag: "Plan";
|
|
1318
|
-
}, "_tag">;
|
|
1319
|
-
};
|
|
1320
|
-
interface Model$1 {
|
|
1321
|
-
readonly command: Atom.AtomResultFn<Command$1, void>;
|
|
1322
|
-
readonly state: Atom.Atom<State$1>;
|
|
1323
|
-
}
|
|
1324
|
-
declare function useModel$1(connection: Transport.Connected, records: ReadonlyArray<Transport.DnsRecord>, onApplied?: (result: Extract<Transport.ApplyResult, {
|
|
1325
|
-
readonly _tag: "Applied" | "Partial";
|
|
1326
|
-
}>) => void): Model$1;
|
|
1327
|
-
declare function useController$1(connection: Transport.Connected, records: ReadonlyArray<Transport.DnsRecord>, onApplied?: (result: Extract<Transport.ApplyResult, {
|
|
1328
|
-
readonly _tag: "Applied" | "Partial";
|
|
1329
|
-
}>) => void): Controller$1;
|
|
1330
|
-
interface RootProps$2 extends PartProps<"div", {
|
|
1331
|
-
readonly status: State$1["_tag"];
|
|
1332
|
-
}> {
|
|
1333
|
-
readonly status: State$1["_tag"];
|
|
1334
|
-
}
|
|
1335
|
-
declare function Root$2({ status, ...props }: RootProps$2): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1336
|
-
declare function Outcome$1({ state }: {
|
|
1337
|
-
readonly state: State$1;
|
|
1338
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
1339
|
-
interface DialogProps {
|
|
1340
|
-
readonly controller: Controller$1;
|
|
1341
|
-
readonly trigger?: ReactElement;
|
|
1342
|
-
}
|
|
1343
|
-
declare function Dialog$1({ controller, trigger }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
1344
|
-
declare function RetryAction({ controller }: {
|
|
1345
|
-
readonly controller: Controller$1;
|
|
1346
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
1347
|
-
interface FlowProps extends Omit<RootProps$2, "status"> {
|
|
1348
|
-
readonly connection: Transport.Connected;
|
|
1349
|
-
readonly onApplied?: (result: Extract<Transport.ApplyResult, {
|
|
1350
|
-
readonly _tag: "Applied" | "Partial";
|
|
1351
|
-
}>) => void;
|
|
1352
|
-
readonly records: ReadonlyArray<Transport.DnsRecord>;
|
|
1353
|
-
readonly showRecords?: boolean;
|
|
1354
|
-
readonly trigger?: ReactElement;
|
|
1355
|
-
}
|
|
1356
|
-
declare function Flow({ connection, onApplied, records, showRecords, trigger, ...props }: FlowProps): import("react/jsx-runtime").JSX.Element;
|
|
1438
|
+
/** Every operation the plan holds, in plan order, so a customer reviews exactly what will run. */
|
|
1439
|
+
declare function List({ plan, ...props }: ListProps): ReactElement;
|
|
1357
1440
|
declare namespace records_d_exports {
|
|
1358
|
-
export { Body, Caption, Card, CardContent, CardHeader, CardProps, CardTitle, Cell, CopyController, CopyValue, CopyValueProps,
|
|
1441
|
+
export { Body, Caption, Card, CardContent, CardHeader, CardProps, CardTitle, Cell, CopyController, CopyValue, CopyValueProps, Footer, Head, Header, Purpose, Readiness, RequirementStatus, Root, RootProps, Row, Status, StatusProps, Table, TableProps, Value, ZoneFile, ZoneFileProps, copyText, downloadZoneFile, identity, requirementsKey, statusOf, toZoneFile, useCopy };
|
|
1359
1442
|
}
|
|
1443
|
+
type Readiness = Transport.Readiness;
|
|
1444
|
+
type RequirementStatus = Readiness["requirements"][number]["status"];
|
|
1445
|
+
declare const toZoneFile: (records: ReadonlyArray<DnsRecord.Model>) => string;
|
|
1446
|
+
declare const downloadZoneFile: (domain: string, records: ReadonlyArray<DnsRecord.Model>) => void;
|
|
1360
1447
|
declare const copyText: (value: string) => Promise<boolean>;
|
|
1361
|
-
type LeafState = Record<string, unknown>;
|
|
1362
1448
|
interface CopyController {
|
|
1363
1449
|
readonly copied: boolean;
|
|
1364
1450
|
readonly copy: () => void;
|
|
@@ -1367,292 +1453,117 @@ declare function useCopy(value: string, resetAfter?: number): CopyController;
|
|
|
1367
1453
|
interface CopyValueProps extends PartProps<"span", {
|
|
1368
1454
|
readonly copied: boolean;
|
|
1369
1455
|
}> {
|
|
1370
|
-
readonly copiedIcon?: ReactNode;
|
|
1371
|
-
readonly copiedLabel?: string;
|
|
1372
|
-
readonly copyIcon?: ReactNode;
|
|
1373
|
-
readonly copyLabel?: string;
|
|
1374
1456
|
readonly value: string;
|
|
1375
1457
|
}
|
|
1376
|
-
declare function CopyValue({
|
|
1458
|
+
declare function CopyValue({ value, ...props }: CopyValueProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1377
1459
|
interface ZoneFileProps extends PartProps<"div", {
|
|
1378
1460
|
readonly count: number;
|
|
1379
1461
|
}> {
|
|
1380
|
-
readonly copiedIcon?: ReactNode;
|
|
1381
|
-
readonly copiedLabel?: string;
|
|
1382
|
-
readonly copyIcon?: ReactNode;
|
|
1383
|
-
readonly copyLabel?: string;
|
|
1384
1462
|
readonly domain: string;
|
|
1385
|
-
readonly
|
|
1386
|
-
readonly downloadLabel?: string;
|
|
1387
|
-
readonly records: ReadonlyArray<Transport.DnsRecord>;
|
|
1388
|
-
}
|
|
1389
|
-
declare function ZoneFile({ copiedIcon, copiedLabel, copyIcon, copyLabel, domain, downloadIcon, downloadLabel, records, ...props }: ZoneFileProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1390
|
-
interface StatusProps$1 extends PartProps<"span", {
|
|
1391
|
-
readonly status: Transport.ObservationEvidence["_tag"];
|
|
1392
|
-
}> {
|
|
1393
|
-
readonly evidence: Transport.ObservationEvidence;
|
|
1463
|
+
readonly records: ReadonlyArray<DnsRecord.Model>;
|
|
1394
1464
|
}
|
|
1395
|
-
declare function
|
|
1396
|
-
|
|
1397
|
-
|
|
1465
|
+
declare function ZoneFile({ domain, records, ...props }: ZoneFileProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1466
|
+
/** The readiness this record reached, or `null` when nothing has observed it. */
|
|
1467
|
+
declare const statusOf: (record: DnsRecord.Model, readiness: Readiness | null | undefined) => RequirementStatus | null;
|
|
1468
|
+
interface StatusProps extends PartProps<"span", {
|
|
1469
|
+
readonly status: RequirementStatus;
|
|
1398
1470
|
}> {
|
|
1399
|
-
readonly
|
|
1400
|
-
}
|
|
1401
|
-
declare function
|
|
1402
|
-
declare const Header: (props: PartProps<"thead",
|
|
1403
|
-
declare const Body: (props: PartProps<"tbody",
|
|
1404
|
-
declare const Footer: (props: PartProps<"tfoot",
|
|
1405
|
-
declare const Row: (props: PartProps<"tr",
|
|
1406
|
-
declare const Head: (props: PartProps<"th",
|
|
1407
|
-
declare const Cell: (props: PartProps<"td",
|
|
1408
|
-
declare const Caption: (props: PartProps<"caption",
|
|
1409
|
-
declare const Value: (props: PartProps<"span",
|
|
1410
|
-
declare const
|
|
1411
|
-
declare const
|
|
1412
|
-
declare const
|
|
1413
|
-
|
|
1471
|
+
readonly status: RequirementStatus;
|
|
1472
|
+
}
|
|
1473
|
+
declare function Status({ status, ...props }: StatusProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1474
|
+
declare const Header: (props: PartProps<"thead", Record<string, unknown>>) => ReactElement;
|
|
1475
|
+
declare const Body: (props: PartProps<"tbody", Record<string, unknown>>) => ReactElement;
|
|
1476
|
+
declare const Footer: (props: PartProps<"tfoot", Record<string, unknown>>) => ReactElement;
|
|
1477
|
+
declare const Row: (props: PartProps<"tr", Record<string, unknown>>) => ReactElement;
|
|
1478
|
+
declare const Head: (props: PartProps<"th", Record<string, unknown>>) => ReactElement;
|
|
1479
|
+
declare const Cell: (props: PartProps<"td", Record<string, unknown>>) => ReactElement;
|
|
1480
|
+
declare const Caption: (props: PartProps<"caption", Record<string, unknown>>) => ReactElement;
|
|
1481
|
+
declare const Value: (props: PartProps<"span", Record<string, unknown>>) => ReactElement;
|
|
1482
|
+
declare const Purpose: (props: PartProps<"span", Record<string, unknown>>) => ReactElement;
|
|
1483
|
+
declare const CardHeader: (props: PartProps<"div", Record<string, unknown>>) => ReactElement;
|
|
1484
|
+
declare const CardTitle: (props: PartProps<"strong", Record<string, unknown>>) => ReactElement;
|
|
1485
|
+
declare const CardContent: (props: PartProps<"dl", Record<string, unknown>>) => ReactElement;
|
|
1486
|
+
interface RootProps extends PartProps<"table", {
|
|
1414
1487
|
readonly count: number;
|
|
1415
1488
|
}> {
|
|
1416
1489
|
readonly count?: number;
|
|
1417
1490
|
}
|
|
1418
|
-
declare function Root
|
|
1491
|
+
declare function Root({ count, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
1492
|
+
/** A stable React key for a requirement: type, name, and data identify a record. */
|
|
1493
|
+
declare const identity: (record: DnsRecord.Model) => string;
|
|
1494
|
+
/**
|
|
1495
|
+
* A requirement set keyed by everything it carries, for memos that decide whether to re-send it.
|
|
1496
|
+
* `identity` is deliberately narrower: it answers "is this the same record" for a React key, while
|
|
1497
|
+
* a plan and an observation are built from `ttl`, `policy`, and `purpose` as well. `policy` in
|
|
1498
|
+
* particular decides whether a name may hold anything else, so readiness turns on it.
|
|
1499
|
+
*/
|
|
1500
|
+
declare const requirementsKey: (records: ReadonlyArray<DnsRecord.Model>) => string;
|
|
1419
1501
|
interface CardProps extends PartProps<"section", {
|
|
1420
|
-
readonly
|
|
1502
|
+
readonly record: string;
|
|
1421
1503
|
}> {
|
|
1422
|
-
readonly
|
|
1423
|
-
readonly
|
|
1424
|
-
readonly evidence?: ReadonlyArray<Transport.ObservationEvidence>;
|
|
1425
|
-
readonly record: Transport.DnsRecord;
|
|
1504
|
+
readonly readiness?: Readiness | null;
|
|
1505
|
+
readonly record: DnsRecord.Model;
|
|
1426
1506
|
}
|
|
1427
|
-
declare function Card({
|
|
1507
|
+
declare function Card({ readiness, record, ...props }: CardProps): ReactElement;
|
|
1428
1508
|
interface TableProps extends PartProps<"table", {
|
|
1429
1509
|
readonly count: number;
|
|
1430
1510
|
}> {
|
|
1431
|
-
readonly
|
|
1432
|
-
readonly
|
|
1433
|
-
readonly
|
|
1434
|
-
readonly records: ReadonlyArray<Transport.DnsRecord>;
|
|
1435
|
-
}
|
|
1436
|
-
declare function Table({ copiedIcon, copyIcon, evidence, records, ...props }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
1437
|
-
declare const toZoneFile: (records: ReadonlyArray<Transport.DnsRecord>) => string;
|
|
1438
|
-
declare const downloadZoneFile: (domain: string, records: ReadonlyArray<Transport.DnsRecord>) => void;
|
|
1439
|
-
type DnsRecord = Transport.DnsRecord;
|
|
1440
|
-
type ObservationEvidence = Transport.ObservationEvidence;
|
|
1441
|
-
declare namespace testing_d_exports {
|
|
1442
|
-
export { FakeOptions, FakeTransport, attachment, connected, connection$1 as connection, makeFakeTransport, provider$1 as provider, target$1 as target };
|
|
1443
|
-
}
|
|
1444
|
-
interface FakeOptions {
|
|
1445
|
-
readonly connect?: Transport.ConnectionResult;
|
|
1446
|
-
readonly inspect: Transport.ConnectionSnapshot | FakeFailure | ReadonlyArray<Transport.ConnectionSnapshot | FakeFailure>;
|
|
1447
|
-
readonly attach?: Transport.Connected;
|
|
1448
|
-
readonly detach?: Transport.DetachResult;
|
|
1449
|
-
readonly plan?: Transport.ProvisioningPlan;
|
|
1450
|
-
readonly apply?: Transport.ApplyResult;
|
|
1451
|
-
readonly observe?: Transport.Observation;
|
|
1452
|
-
readonly cleanupPlan?: Transport.CleanupPlan;
|
|
1453
|
-
readonly cleanupApply?: Transport.CleanupResult;
|
|
1454
|
-
}
|
|
1455
|
-
interface FakeFailure {
|
|
1456
|
-
readonly _tag: "Failure";
|
|
1457
|
-
readonly message: string;
|
|
1458
|
-
readonly operation?: string;
|
|
1459
|
-
readonly retry: Transport.Failure["retry"];
|
|
1460
|
-
}
|
|
1461
|
-
interface FakeTransport extends Transport.AsyncInterface, Layer.Layer<Transport.Service> {
|
|
1462
|
-
readonly calls: {
|
|
1463
|
-
readonly attach: Array<Transport.AttachInput>;
|
|
1464
|
-
readonly connect: Array<Transport.ConnectInput>;
|
|
1465
|
-
readonly detach: Array<Transport.DetachInput>;
|
|
1466
|
-
readonly inspect: Array<Transport.InspectInput>;
|
|
1467
|
-
readonly plan: Array<Transport.ProvisioningPlanInput>;
|
|
1468
|
-
readonly apply: Array<Transport.ProvisioningApplyInput>;
|
|
1469
|
-
readonly observe: Array<Transport.ObserveInput>;
|
|
1470
|
-
readonly cleanupPlan: Array<Transport.CleanupPlanInput>;
|
|
1471
|
-
readonly cleanupApply: Array<Transport.CleanupApplyInput>;
|
|
1472
|
-
};
|
|
1511
|
+
readonly caption?: string;
|
|
1512
|
+
readonly readiness?: Readiness | null;
|
|
1513
|
+
readonly records: ReadonlyArray<DnsRecord.Model>;
|
|
1473
1514
|
}
|
|
1474
|
-
|
|
1475
|
-
declare
|
|
1476
|
-
declare
|
|
1477
|
-
|
|
1478
|
-
declare const connected: (overrides?: Partial<Transport.Connected>) => Transport.Connected;
|
|
1479
|
-
declare function makeFakeTransport(options: FakeOptions): FakeTransport;
|
|
1480
|
-
declare namespace verification_d_exports {
|
|
1481
|
-
export { Command, Controller, Evidence, Model, Observation, ObserveAction, ObserveActionProps, ObserveConfig, Outcome, Root, RootProps, State, Status, StatusProps, useController, useModel };
|
|
1515
|
+
/** The default records presentation: one row per requirement, with readiness when there is any. */
|
|
1516
|
+
declare function Table({ caption, readiness, records, ...props }: TableProps): ReactElement;
|
|
1517
|
+
declare namespace testing_d_exports {
|
|
1518
|
+
export { RecordedCall, RecordingTransport, TransportOptions, transport$1 as transport };
|
|
1482
1519
|
}
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
readonly
|
|
1496
|
-
readonly failure: Failure;
|
|
1497
|
-
readonly previous?: Transport.Observation;
|
|
1498
|
-
}, {
|
|
1499
|
-
readonly _tag: Tag;
|
|
1500
|
-
}> | Extract<{
|
|
1501
|
-
readonly _tag: "Idle";
|
|
1502
|
-
}, {
|
|
1503
|
-
readonly _tag: Tag;
|
|
1504
|
-
}> | Extract<{
|
|
1505
|
-
readonly _tag: "Observing";
|
|
1506
|
-
readonly previous?: Transport.Observation;
|
|
1507
|
-
}, {
|
|
1508
|
-
readonly _tag: Tag;
|
|
1509
|
-
}>;
|
|
1510
|
-
readonly $match: {
|
|
1511
|
-
<Cases extends { readonly [Tag in "Failed" | "Idle" | "Observing"]: (args: Extract<{
|
|
1512
|
-
readonly _tag: "Failed";
|
|
1513
|
-
readonly failure: Failure;
|
|
1514
|
-
readonly previous?: Transport.Observation;
|
|
1515
|
-
} | {
|
|
1516
|
-
readonly _tag: "Idle";
|
|
1517
|
-
} | {
|
|
1518
|
-
readonly _tag: "Observing";
|
|
1519
|
-
readonly previous?: Transport.Observation;
|
|
1520
|
-
}, {
|
|
1521
|
-
readonly _tag: Tag;
|
|
1522
|
-
}>) => any; }>(cases: Cases): (value: {
|
|
1523
|
-
readonly _tag: "Failed";
|
|
1524
|
-
readonly failure: Failure;
|
|
1525
|
-
readonly previous?: Transport.Observation;
|
|
1526
|
-
} | {
|
|
1527
|
-
readonly _tag: "Idle";
|
|
1528
|
-
} | {
|
|
1529
|
-
readonly _tag: "Observing";
|
|
1530
|
-
readonly previous?: Transport.Observation;
|
|
1531
|
-
}) => import("effect/Unify").Unify<ReturnType<Cases["Failed" | "Idle" | "Observing"]>>;
|
|
1532
|
-
<Cases extends { readonly [Tag in "Failed" | "Idle" | "Observing"]: (args: Extract<{
|
|
1533
|
-
readonly _tag: "Failed";
|
|
1534
|
-
readonly failure: Failure;
|
|
1535
|
-
readonly previous?: Transport.Observation;
|
|
1536
|
-
} | {
|
|
1537
|
-
readonly _tag: "Idle";
|
|
1538
|
-
} | {
|
|
1539
|
-
readonly _tag: "Observing";
|
|
1540
|
-
readonly previous?: Transport.Observation;
|
|
1541
|
-
}, {
|
|
1542
|
-
readonly _tag: Tag;
|
|
1543
|
-
}>) => any; }>(value: {
|
|
1544
|
-
readonly _tag: "Failed";
|
|
1545
|
-
readonly failure: Failure;
|
|
1546
|
-
readonly previous?: Transport.Observation;
|
|
1547
|
-
} | {
|
|
1548
|
-
readonly _tag: "Idle";
|
|
1549
|
-
} | {
|
|
1550
|
-
readonly _tag: "Observing";
|
|
1551
|
-
readonly previous?: Transport.Observation;
|
|
1552
|
-
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Failed" | "Idle" | "Observing"]>>;
|
|
1553
|
-
};
|
|
1554
|
-
readonly Failed: Data.TaggedEnum.ConstructorFrom<{
|
|
1555
|
-
readonly _tag: "Failed";
|
|
1556
|
-
readonly failure: Failure;
|
|
1557
|
-
readonly previous?: Transport.Observation;
|
|
1558
|
-
}, "_tag">;
|
|
1559
|
-
readonly Idle: Data.TaggedEnum.ConstructorFrom<{
|
|
1560
|
-
readonly _tag: "Idle";
|
|
1561
|
-
}, "_tag">;
|
|
1562
|
-
readonly Observing: Data.TaggedEnum.ConstructorFrom<{
|
|
1563
|
-
readonly _tag: "Observing";
|
|
1564
|
-
readonly previous?: Transport.Observation;
|
|
1565
|
-
}, "_tag">;
|
|
1566
|
-
};
|
|
1567
|
-
type State = LocalState | Transport.Observation;
|
|
1568
|
-
interface ObserveConfig {
|
|
1569
|
-
readonly connection?: Transport.Connected;
|
|
1570
|
-
readonly domain: string;
|
|
1571
|
-
readonly records: ReadonlyArray<Transport.DnsRecord>;
|
|
1572
|
-
readonly sources?: {
|
|
1573
|
-
readonly provider?: boolean;
|
|
1574
|
-
readonly publicDns?: boolean;
|
|
1520
|
+
declare const transport$1: (options?: Testing.TransportOptions) => Testing.RecordingTransport;
|
|
1521
|
+
type RecordedCall = Testing.RecordedCall;
|
|
1522
|
+
type RecordingTransport = Testing.RecordingTransport;
|
|
1523
|
+
type TransportOptions = Testing.TransportOptions;
|
|
1524
|
+
//#endregion
|
|
1525
|
+
//#region src/failure.d.ts
|
|
1526
|
+
/**
|
|
1527
|
+
* The failed member every controller state shares. It carries the `DomainKit.Error` itself, so a
|
|
1528
|
+
* host reads `error.reason`, `error.category`, and `error.isRetryable` instead of parsing text.
|
|
1529
|
+
*/
|
|
1530
|
+
type Failure = Data.TaggedEnum<{
|
|
1531
|
+
Failure: {
|
|
1532
|
+
readonly error: DomainKit.Error;
|
|
1575
1533
|
};
|
|
1576
|
-
}
|
|
1577
|
-
type Command = Data.TaggedEnum<{
|
|
1578
|
-
Observe: {};
|
|
1579
|
-
Reset: {};
|
|
1580
1534
|
}>;
|
|
1581
|
-
declare const
|
|
1582
|
-
readonly $is: <Tag extends "
|
|
1583
|
-
readonly _tag: "
|
|
1584
|
-
|
|
1585
|
-
readonly _tag: Tag;
|
|
1586
|
-
}> | Extract<{
|
|
1587
|
-
readonly _tag: "Reset";
|
|
1535
|
+
declare const Failure: {
|
|
1536
|
+
readonly $is: <Tag extends "Failure">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
1537
|
+
readonly _tag: "Failure";
|
|
1538
|
+
readonly error: DomainKit.Error;
|
|
1588
1539
|
}, {
|
|
1589
1540
|
readonly _tag: Tag;
|
|
1590
1541
|
}>;
|
|
1591
1542
|
readonly $match: {
|
|
1592
|
-
<Cases extends { readonly [Tag in "
|
|
1593
|
-
readonly _tag: "
|
|
1594
|
-
|
|
1595
|
-
readonly _tag: "Reset";
|
|
1543
|
+
<Cases extends { readonly [Tag in "Failure"]: (args: Extract<{
|
|
1544
|
+
readonly _tag: "Failure";
|
|
1545
|
+
readonly error: DomainKit.Error;
|
|
1596
1546
|
}, {
|
|
1597
1547
|
readonly _tag: Tag;
|
|
1598
1548
|
}>) => any; }>(cases: Cases): (value: {
|
|
1599
|
-
readonly _tag: "
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
readonly
|
|
1605
|
-
} | {
|
|
1606
|
-
readonly _tag: "Reset";
|
|
1549
|
+
readonly _tag: "Failure";
|
|
1550
|
+
readonly error: DomainKit.Error;
|
|
1551
|
+
}) => import("effect/Unify").Unify<ReturnType<Cases["Failure"]>>;
|
|
1552
|
+
<Cases extends { readonly [Tag in "Failure"]: (args: Extract<{
|
|
1553
|
+
readonly _tag: "Failure";
|
|
1554
|
+
readonly error: DomainKit.Error;
|
|
1607
1555
|
}, {
|
|
1608
1556
|
readonly _tag: Tag;
|
|
1609
1557
|
}>) => any; }>(value: {
|
|
1610
|
-
readonly _tag: "
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Observe" | "Reset"]>>;
|
|
1558
|
+
readonly _tag: "Failure";
|
|
1559
|
+
readonly error: DomainKit.Error;
|
|
1560
|
+
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Failure"]>>;
|
|
1614
1561
|
};
|
|
1615
|
-
readonly
|
|
1616
|
-
readonly _tag: "
|
|
1617
|
-
|
|
1618
|
-
readonly Reset: Data.TaggedEnum.ConstructorFrom<{
|
|
1619
|
-
readonly _tag: "Reset";
|
|
1562
|
+
readonly Failure: Data.TaggedEnum.ConstructorFrom<{
|
|
1563
|
+
readonly _tag: "Failure";
|
|
1564
|
+
readonly error: DomainKit.Error;
|
|
1620
1565
|
}, "_tag">;
|
|
1621
1566
|
};
|
|
1622
|
-
interface Model {
|
|
1623
|
-
readonly command: Atom.AtomResultFn<Command, void>;
|
|
1624
|
-
readonly state: Atom.Atom<State>;
|
|
1625
|
-
}
|
|
1626
|
-
interface Controller {
|
|
1627
|
-
readonly observe: () => void;
|
|
1628
|
-
readonly reset: () => void;
|
|
1629
|
-
readonly state: State;
|
|
1630
|
-
}
|
|
1631
|
-
declare function useModel(config: ObserveConfig): Model;
|
|
1632
|
-
declare function useController(config: ObserveConfig): Controller;
|
|
1633
|
-
interface RootProps extends PartProps<"div", {
|
|
1634
|
-
readonly status: State["_tag"];
|
|
1635
|
-
}> {
|
|
1636
|
-
readonly status: State["_tag"];
|
|
1637
|
-
}
|
|
1638
|
-
declare function Root({ status, ...props }: RootProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1639
|
-
declare function Evidence({ observation }: {
|
|
1640
|
-
readonly observation: Transport.Observation;
|
|
1641
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
1642
|
-
declare function Outcome({ state }: {
|
|
1643
|
-
readonly state: State;
|
|
1644
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
1645
|
-
interface ObserveActionProps extends PartProps<"button", {
|
|
1646
|
-
readonly status: State["_tag"];
|
|
1647
|
-
}> {
|
|
1648
|
-
readonly controller: Controller;
|
|
1649
|
-
}
|
|
1650
|
-
declare function ObserveAction({ controller, ...props }: ObserveActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
1651
|
-
interface StatusProps extends Omit<RootProps, "status"> {
|
|
1652
|
-
readonly config: ObserveConfig;
|
|
1653
|
-
}
|
|
1654
|
-
declare function Status({ config, ...props }: StatusProps): import("react/jsx-runtime").JSX.Element;
|
|
1655
|
-
type Observation = Transport.Observation;
|
|
1656
1567
|
//#endregion
|
|
1657
|
-
export { cleanup_d_exports as Cleanup,
|
|
1568
|
+
export { type ClassName, cleanup_d_exports as Cleanup, connect_d_exports as Connect, domain_d_exports as Domain, domain_kit_d_exports as DomainKit, Event, Failure, type Icons, type Listener, messages_d_exports as Messages, operations_d_exports as Operations, type PartProps, provider_d_exports as Provider, provision_d_exports as Provision, records_d_exports as Records, type Style, testing_d_exports as Testing, theme_d_exports as Theme, verify_d_exports as Verify, defaultIcons, useIcons };
|
|
1658
1569
|
//# sourceMappingURL=index.d.mts.map
|