@domainkit/react 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,666 @@
1
+ import { Dialog } from "@base-ui/react/dialog";
2
+ import { CSSProperties, ComponentPropsWithoutRef, ElementType, ReactElement, ReactNode, RefObject } from "react";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+ //#region src/composition.d.ts
5
+ type ClassName<State> = string | ((state: State) => string | undefined);
6
+ type Style<State> = CSSProperties | ((state: State) => CSSProperties | undefined);
7
+ type PartProps<Tag extends ElementType, State extends Record<string, unknown>> = Omit<useRender.ElementProps<Tag>, "className" | "style"> & {
8
+ readonly className?: ClassName<State>;
9
+ readonly render?: useRender.RenderProp<State>;
10
+ readonly style?: Style<State>;
11
+ };
12
+ declare namespace transport_d_exports {
13
+ export { ApplyResult, AuthenticationMethod, AuthenticationParameter, CleanupOperation, CleanupPlan, CleanupResult, CleanupTransport, Connected, ConnectionResult, ConnectionSnapshot, ConnectionTransport, DnsRecord, DomainKitTransport, Failure, Observation, ObservationEvidence, OperationResult, PlanOperation, Provider, ProvisioningPlan, ProvisioningTransport, RemoveDomainResult, ReusableConnection, VerificationTransport };
14
+ }
15
+ interface Failure {
16
+ readonly _tag: "Failure";
17
+ readonly message: string;
18
+ readonly retry: "never" | "after-user-action" | "safe" | "unknown";
19
+ }
20
+ interface AuthenticationParameter {
21
+ readonly description?: string;
22
+ readonly key: string;
23
+ readonly label: string;
24
+ readonly placeholder?: string;
25
+ readonly required?: boolean;
26
+ }
27
+ type AuthenticationMethod = {
28
+ readonly _tag: "OAuth";
29
+ readonly label: string;
30
+ } | {
31
+ readonly _tag: "Token";
32
+ readonly label: string;
33
+ readonly parameters?: ReadonlyArray<AuthenticationParameter>;
34
+ readonly placeholder?: string;
35
+ };
36
+ interface Provider {
37
+ readonly authentication: ReadonlyArray<AuthenticationMethod>;
38
+ readonly id: string;
39
+ readonly name: string;
40
+ }
41
+ interface Connected {
42
+ readonly _tag: "Connected";
43
+ readonly connectionId: string;
44
+ readonly domain: string;
45
+ readonly provider: Provider;
46
+ }
47
+ interface ReusableConnection {
48
+ readonly connectionId: string;
49
+ readonly label: string;
50
+ }
51
+ type ConnectionSnapshot = Connected | {
52
+ readonly _tag: "Disconnected";
53
+ readonly domain: string;
54
+ readonly provider: Provider;
55
+ readonly reusableConnection?: ReusableConnection;
56
+ } | {
57
+ readonly _tag: "Unsupported";
58
+ readonly domain: string;
59
+ } | Failure;
60
+ type ConnectionResult = Connected | {
61
+ readonly _tag: "Redirect";
62
+ readonly authorizationUrl: string;
63
+ } | Failure;
64
+ interface ConnectionTransport {
65
+ readonly connect: (input: {
66
+ readonly domain: string;
67
+ readonly method: "oauth" | "token";
68
+ readonly parameters?: Readonly<Record<string, string>>;
69
+ readonly providerId: string;
70
+ readonly token?: string;
71
+ }) => Promise<ConnectionResult>;
72
+ readonly inspect: (input: {
73
+ readonly domain: string;
74
+ }) => Promise<ConnectionSnapshot>;
75
+ readonly reuse: (input: {
76
+ readonly connectionId: string;
77
+ readonly domain: string;
78
+ }) => Promise<Connected | Failure>;
79
+ readonly removeDomain: (input: {
80
+ readonly connectionId: string;
81
+ readonly domain: string;
82
+ readonly preserveDns: true;
83
+ }) => Promise<RemoveDomainResult | Failure>;
84
+ }
85
+ interface RemoveDomainResult {
86
+ readonly _tag: "Removed";
87
+ readonly connectionId: string;
88
+ readonly domain: string;
89
+ readonly remainingDomainCount: number;
90
+ }
91
+ interface DnsRecord {
92
+ readonly id: string;
93
+ readonly name: string;
94
+ readonly priority?: number;
95
+ readonly type: string;
96
+ readonly value: string;
97
+ }
98
+ type PlanOperation = {
99
+ readonly _tag: "Create";
100
+ readonly id: string;
101
+ readonly record: DnsRecord;
102
+ } | {
103
+ readonly _tag: "Noop";
104
+ readonly id: string;
105
+ readonly record: DnsRecord;
106
+ } | {
107
+ readonly _tag: "Conflict";
108
+ readonly id: string;
109
+ readonly record: DnsRecord;
110
+ readonly reason: string;
111
+ };
112
+ interface ProvisioningPlan {
113
+ readonly _tag: "Plan";
114
+ readonly digest: string;
115
+ readonly expiresAt: string;
116
+ readonly operations: ReadonlyArray<PlanOperation>;
117
+ }
118
+ type OperationResult = {
119
+ readonly _tag: "Applied";
120
+ readonly operationId: string;
121
+ } | {
122
+ readonly _tag: "Unchanged";
123
+ readonly operationId: string;
124
+ } | {
125
+ readonly _tag: "Failed";
126
+ readonly message: string;
127
+ readonly operationId: string;
128
+ };
129
+ type ApplyResult = {
130
+ readonly _tag: "Applied";
131
+ readonly operationId: string;
132
+ readonly receiptId: string;
133
+ readonly results: ReadonlyArray<OperationResult>;
134
+ } | {
135
+ readonly _tag: "Partial";
136
+ readonly operationId: string;
137
+ readonly receiptId: string;
138
+ readonly results: ReadonlyArray<OperationResult>;
139
+ } | {
140
+ readonly _tag: "Stale";
141
+ readonly message: string;
142
+ } | Failure;
143
+ interface ProvisioningTransport {
144
+ readonly plan: (input: {
145
+ readonly connectionId: string;
146
+ readonly domain: string;
147
+ readonly records: ReadonlyArray<DnsRecord>;
148
+ }) => Promise<ProvisioningPlan | Failure>;
149
+ readonly apply: (input: {
150
+ readonly connectionId: string;
151
+ readonly domain: string;
152
+ readonly planDigest: string;
153
+ }) => Promise<ApplyResult>;
154
+ }
155
+ type ObservationEvidence = {
156
+ readonly _tag: "Found";
157
+ readonly recordId: string;
158
+ } | {
159
+ readonly _tag: "Missing";
160
+ readonly recordId: string;
161
+ } | {
162
+ readonly _tag: "Mismatch";
163
+ readonly recordId: string;
164
+ readonly message: string;
165
+ } | {
166
+ readonly _tag: "Unavailable";
167
+ readonly recordId: string;
168
+ readonly message: string;
169
+ };
170
+ interface Observation {
171
+ readonly _tag: "Observation";
172
+ readonly provider: ReadonlyArray<ObservationEvidence>;
173
+ readonly publicDns: ReadonlyArray<ObservationEvidence>;
174
+ }
175
+ interface VerificationTransport {
176
+ readonly observe: (input: {
177
+ readonly connectionId?: string;
178
+ readonly domain: string;
179
+ readonly records: ReadonlyArray<DnsRecord>;
180
+ readonly sources: {
181
+ readonly provider: boolean;
182
+ readonly publicDns: boolean;
183
+ };
184
+ }) => Promise<Observation | Failure>;
185
+ }
186
+ type CleanupOperation = {
187
+ readonly _tag: "Delete";
188
+ readonly id: string;
189
+ readonly record: DnsRecord;
190
+ } | {
191
+ readonly _tag: "AlreadyAbsent";
192
+ readonly id: string;
193
+ readonly record: DnsRecord;
194
+ } | {
195
+ readonly _tag: "Blocked";
196
+ readonly id: string;
197
+ readonly record: DnsRecord;
198
+ readonly reason: string;
199
+ };
200
+ interface CleanupPlan {
201
+ readonly _tag: "CleanupPlan";
202
+ readonly digest: string;
203
+ readonly expiresAt: string;
204
+ readonly operations: ReadonlyArray<CleanupOperation>;
205
+ }
206
+ type CleanupResult = {
207
+ readonly _tag: "Cleaned";
208
+ readonly operationId: string;
209
+ readonly results: ReadonlyArray<OperationResult>;
210
+ } | {
211
+ readonly _tag: "Partial";
212
+ readonly operationId: string;
213
+ readonly results: ReadonlyArray<OperationResult>;
214
+ } | {
215
+ readonly _tag: "Stale";
216
+ readonly message: string;
217
+ } | Failure;
218
+ interface CleanupTransport {
219
+ readonly plan: (input: {
220
+ readonly connectionId: string;
221
+ readonly domain: string;
222
+ readonly receiptId: string;
223
+ }) => Promise<CleanupPlan | Failure>;
224
+ readonly apply: (input: {
225
+ readonly connectionId: string;
226
+ readonly domain: string;
227
+ readonly planDigest: string;
228
+ readonly receiptId: string;
229
+ }) => Promise<CleanupResult>;
230
+ }
231
+ interface DomainKitTransport {
232
+ readonly cleanup: CleanupTransport;
233
+ readonly connection: ConnectionTransport;
234
+ readonly provisioning: ProvisioningTransport;
235
+ readonly verification: VerificationTransport;
236
+ }
237
+ declare namespace cleanup_d_exports {
238
+ export { Flow$3 as Flow, FlowProps$3 as FlowProps, State$3 as State, useController$3 as useController };
239
+ }
240
+ type State$3 = {
241
+ readonly _tag: "Idle";
242
+ } | {
243
+ readonly _tag: "Planning";
244
+ } | {
245
+ readonly _tag: "Review";
246
+ readonly plan: CleanupPlan;
247
+ } | {
248
+ readonly _tag: "Cleaning";
249
+ readonly plan: CleanupPlan;
250
+ } | {
251
+ readonly _tag: "Cleaned";
252
+ readonly result: Extract<CleanupResult, {
253
+ readonly _tag: "Cleaned";
254
+ }>;
255
+ } | {
256
+ readonly _tag: "Partial";
257
+ readonly result: Extract<CleanupResult, {
258
+ readonly _tag: "Partial";
259
+ }>;
260
+ } | {
261
+ readonly _tag: "Stale";
262
+ readonly message: string;
263
+ } | Failure;
264
+ declare function useController$3(connection: Connected, receiptId: string): {
265
+ readonly apply: () => Promise<void>;
266
+ readonly dismiss: () => void;
267
+ readonly plan: () => Promise<void>;
268
+ readonly state: State$3;
269
+ };
270
+ interface FlowProps$3 extends PartProps<"div", {
271
+ readonly status: State$3["_tag"];
272
+ }> {
273
+ readonly connection: Connected;
274
+ readonly receiptId: string;
275
+ }
276
+ declare function Flow$3({ connection, receiptId, ...props }: FlowProps$3): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
277
+ declare namespace provider_d_exports {
278
+ export { Mark, MarkElementProps, MarkProps, MarkState, Marks, Provider };
279
+ }
280
+ type Marks = Readonly<Record<string, ReactNode | ((provider: Provider) => ReactNode)>>;
281
+ interface MarkState extends Record<string, unknown> {
282
+ readonly providerId: string;
283
+ }
284
+ interface MarkProps extends PartProps<"span", MarkState> {
285
+ readonly provider: Provider;
286
+ }
287
+ declare function Mark({ provider, ...props }: MarkProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
288
+ type MarkElementProps = ComponentPropsWithoutRef<"span">;
289
+ declare namespace connection_d_exports {
290
+ export { ActionState, Connected, Controller$1 as Controller, Dialog$1 as Dialog, DialogProps, DisconnectAction, DisconnectActionProps, DisconnectState, Flow$2 as Flow, FlowProps$2 as FlowProps, OAuthAction, OAuthActionProps, RetryAction, RetryActionProps, ReuseAction, ReuseActionProps, Root$2 as Root, RootProps$2 as RootProps, RootState$1 as RootState, State$2 as State, Status$2 as Status, StatusProps$2 as StatusProps, StatusState, TokenAction, TokenActionProps, Trigger, TriggerProps, useController$2 as useController, useDisconnect };
291
+ }
292
+ type State$2 = {
293
+ readonly _tag: "Loading";
294
+ } | ConnectionSnapshot | {
295
+ readonly _tag: "Submitting";
296
+ readonly snapshot: Disconnected;
297
+ } | {
298
+ readonly _tag: "Redirecting";
299
+ readonly snapshot: Disconnected;
300
+ };
301
+ type Disconnected = Extract<ConnectionSnapshot, {
302
+ readonly _tag: "Disconnected";
303
+ }>;
304
+ interface Controller$1 {
305
+ readonly connect: (method: "oauth" | "token", token?: string, parameters?: Readonly<Record<string, string>>) => Promise<void>;
306
+ readonly retry: () => void;
307
+ readonly reuse: () => Promise<void>;
308
+ readonly state: State$2;
309
+ }
310
+ declare function useController$2(domain: string): Controller$1;
311
+ interface RootState$1 extends Record<string, unknown> {
312
+ readonly status: State$2["_tag"];
313
+ }
314
+ interface RootProps$2 extends PartProps<"div", RootState$1> {
315
+ readonly status?: State$2["_tag"];
316
+ }
317
+ declare function Root$2({ children, status, ...props }: RootProps$2): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
318
+ interface StatusState extends Record<string, unknown> {
319
+ readonly status: State$2["_tag"];
320
+ }
321
+ interface StatusProps$2 extends PartProps<"div", StatusState> {
322
+ readonly state: State$2;
323
+ }
324
+ declare function Status$2({ state, ...props }: StatusProps$2): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
325
+ interface TriggerProps extends ComponentPropsWithoutRef<typeof Dialog.Trigger> {
326
+ readonly provider: Provider;
327
+ }
328
+ declare function Trigger({ provider, ...props }: TriggerProps): import("react/jsx-runtime").JSX.Element;
329
+ interface ActionState extends Record<string, unknown> {
330
+ readonly authentication: "oauth" | "reuse" | "token";
331
+ }
332
+ interface OAuthActionProps extends PartProps<"button", ActionState> {
333
+ readonly controller: Controller$1;
334
+ readonly label: string;
335
+ }
336
+ declare function OAuthAction({ controller, label, ...props }: OAuthActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
337
+ interface ReuseActionProps extends PartProps<"button", ActionState> {
338
+ readonly controller: Controller$1;
339
+ readonly label: string;
340
+ }
341
+ declare function ReuseAction({ controller, label, ...props }: ReuseActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
342
+ interface TokenActionProps extends Omit<PartProps<"form", ActionState>, "method"> {
343
+ readonly controller: Controller$1;
344
+ readonly method: Extract<AuthenticationMethod, {
345
+ readonly _tag: "Token";
346
+ }>;
347
+ }
348
+ declare function TokenAction({ controller, method, ...props }: TokenActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
349
+ interface DialogProps {
350
+ readonly controller: Controller$1;
351
+ readonly snapshot: Disconnected;
352
+ }
353
+ declare function Dialog$1({ controller, snapshot }: DialogProps): import("react/jsx-runtime").JSX.Element;
354
+ interface FlowProps$2 extends Omit<RootProps$2, "children"> {
355
+ readonly domain: string;
356
+ }
357
+ declare function Flow$2({ domain, ...props }: FlowProps$2): import("react/jsx-runtime").JSX.Element;
358
+ interface RetryActionProps extends PartProps<"button", {
359
+ readonly status: "Failure";
360
+ }> {
361
+ readonly controller: Controller$1;
362
+ readonly kind?: "after-user-action" | "retry";
363
+ }
364
+ declare function RetryAction({ controller, kind, ...props }: RetryActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
365
+ type DisconnectState = {
366
+ readonly _tag: "Idle";
367
+ } | {
368
+ readonly _tag: "Disconnecting";
369
+ } | RemoveDomainResult | Failure;
370
+ declare function useDisconnect(connection: Connected): {
371
+ readonly disconnect: () => Promise<void>;
372
+ readonly state: DisconnectState;
373
+ };
374
+ interface DisconnectActionProps extends PartProps<"div", {
375
+ readonly status: DisconnectState["_tag"];
376
+ }> {
377
+ readonly connection: Connected;
378
+ }
379
+ declare function DisconnectAction({ connection, ...props }: DisconnectActionProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
380
+ declare namespace domain_d_exports {
381
+ export { Flow$1 as Flow, FlowProps$1 as FlowProps };
382
+ }
383
+ interface FlowProps$1 {
384
+ readonly domain: string;
385
+ readonly receiptId?: string;
386
+ readonly records: ReadonlyArray<DnsRecord>;
387
+ }
388
+ declare function Flow$1({ domain, receiptId, records }: FlowProps$1): import("react/jsx-runtime").JSX.Element;
389
+ //#endregion
390
+ //#region src/icons.d.ts
391
+ type Icons = {
392
+ readonly copied: ReactNode;
393
+ readonly copy: ReactNode;
394
+ readonly download: ReactNode;
395
+ };
396
+ declare namespace messages_d_exports {
397
+ export { Catalog, english, merge };
398
+ }
399
+ interface Catalog {
400
+ readonly applyCleanup: string;
401
+ readonly applyDns: string;
402
+ readonly applyingDns: string;
403
+ readonly automaticUnavailable: string;
404
+ readonly cancel: string;
405
+ readonly checkAgain: string;
406
+ readonly checkingDns: string;
407
+ readonly checkDns: string;
408
+ readonly cleanupComplete: string;
409
+ readonly cleanupConsent: string;
410
+ readonly cleanupPartial: string;
411
+ readonly cleaningDns: string;
412
+ readonly connectProvider: (provider: string) => string;
413
+ readonly connected: (provider: string) => string;
414
+ readonly connecting: string;
415
+ readonly close: string;
416
+ readonly detectingProvider: string;
417
+ readonly disconnectDomain: string;
418
+ readonly disconnecting: string;
419
+ readonly domainDisconnected: string;
420
+ readonly dialogDescription: (domain: string) => string;
421
+ readonly dialogTitle: (provider: string) => string;
422
+ readonly openingAuthorization: string;
423
+ readonly planConsent: string;
424
+ readonly planningCleanup: string;
425
+ readonly planningDns: string;
426
+ readonly recordsApplied: string;
427
+ readonly recordsPartiallyApplied: string;
428
+ readonly reviewCleanup: string;
429
+ readonly reviewDns: string;
430
+ readonly retry: string;
431
+ readonly reuseConnection: (connection: string) => string;
432
+ readonly tokenLabel: string;
433
+ }
434
+ declare const english: Catalog;
435
+ declare const merge: (overrides?: Partial<Catalog>) => Catalog;
436
+ declare namespace theme_d_exports {
437
+ export { Theme, toStyle };
438
+ }
439
+ interface Theme {
440
+ readonly accent?: string;
441
+ readonly accentContrast?: string;
442
+ readonly background?: string;
443
+ readonly border?: string;
444
+ readonly danger?: string;
445
+ readonly fill?: string;
446
+ readonly fontFamily?: string;
447
+ readonly muted?: string;
448
+ readonly radius?: string;
449
+ readonly shadow?: string;
450
+ readonly success?: string;
451
+ readonly text?: string;
452
+ }
453
+ declare function toStyle(theme?: Theme): CSSProperties;
454
+ declare namespace domain_kit_d_exports {
455
+ export { Root$1 as Root, RootProps$1 as RootProps, RootState, useDomainKit };
456
+ }
457
+ interface RootState extends Record<string, unknown> {
458
+ readonly colorScheme: "dark" | "inherit" | "light";
459
+ }
460
+ interface RootProps$1 extends Omit<PartProps<"div", RootState>, "children"> {
461
+ readonly children: ReactNode;
462
+ readonly colorScheme?: RootState["colorScheme"];
463
+ readonly icons?: Partial<Icons>;
464
+ readonly messages?: Partial<Catalog>;
465
+ readonly marks?: Marks;
466
+ readonly navigate?: (url: string) => void;
467
+ readonly portalContainer?: HTMLElement | null;
468
+ readonly theme?: Theme;
469
+ readonly transport: DomainKitTransport;
470
+ }
471
+ interface ContextValue {
472
+ readonly colorScheme: RootState["colorScheme"];
473
+ readonly navigate: (url: string) => void;
474
+ readonly marks: Marks;
475
+ readonly messages: Catalog;
476
+ readonly portalContainer: RefObject<HTMLElement | null>;
477
+ readonly themeStyle: ReturnType<typeof toStyle>;
478
+ readonly transport: DomainKitTransport;
479
+ }
480
+ declare function Root$1({ children, colorScheme, icons, marks, messages, navigate, portalContainer, theme, transport, ...props }: RootProps$1): import("react/jsx-runtime").JSX.Element;
481
+ declare function useDomainKit(): ContextValue;
482
+ declare namespace provisioning_d_exports {
483
+ export { Controller, Flow, FlowProps, OperationList, State$1 as State, useController$1 as useController };
484
+ }
485
+ type State$1 = {
486
+ readonly _tag: "Idle";
487
+ } | {
488
+ readonly _tag: "Planning";
489
+ } | {
490
+ readonly _tag: "Review";
491
+ readonly plan: ProvisioningPlan;
492
+ } | {
493
+ readonly _tag: "Applying";
494
+ readonly plan: ProvisioningPlan;
495
+ } | {
496
+ readonly _tag: "Complete";
497
+ readonly result: Extract<ApplyResult, {
498
+ readonly _tag: "Applied";
499
+ }>;
500
+ } | {
501
+ readonly _tag: "Partial";
502
+ readonly result: Extract<ApplyResult, {
503
+ readonly _tag: "Partial";
504
+ }>;
505
+ } | {
506
+ readonly _tag: "Stale";
507
+ readonly message: string;
508
+ } | Failure;
509
+ interface Controller {
510
+ readonly apply: () => Promise<void>;
511
+ readonly dismiss: () => void;
512
+ readonly plan: () => Promise<void>;
513
+ readonly retry: () => Promise<void>;
514
+ readonly state: State$1;
515
+ }
516
+ declare function useController$1(connection: Connected, records: ReadonlyArray<DnsRecord>, onApplied?: (result: Extract<ApplyResult, {
517
+ readonly _tag: "Applied" | "Partial";
518
+ }>) => void): Controller;
519
+ interface FlowProps extends PartProps<"div", {
520
+ readonly status: State$1["_tag"];
521
+ }> {
522
+ readonly connection: Connected;
523
+ readonly onApplied?: (result: Extract<ApplyResult, {
524
+ readonly _tag: "Applied" | "Partial";
525
+ }>) => void;
526
+ readonly records: ReadonlyArray<DnsRecord>;
527
+ readonly showRecords?: boolean;
528
+ }
529
+ declare function Flow({ connection, onApplied, records, showRecords, ...props }: FlowProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
530
+ declare function OperationList({ plan }: {
531
+ readonly plan: ProvisioningPlan;
532
+ }): import("react/jsx-runtime").JSX.Element;
533
+ declare namespace records_d_exports {
534
+ export { Body, Caption, Card, CardContent, CardHeader, CardProps, CardTitle, Cell, CopyValue, CopyValueProps, DnsRecord, Footer, Head, Header, ObservationEvidence, Priority, PriorityProps, Root, RootProps, Row, Status$1 as Status, StatusProps$1 as StatusProps, Table, TableProps, Value, ZoneFile, ZoneFileProps, toZoneFile };
535
+ }
536
+ type LeafState = Record<string, unknown>;
537
+ interface CopyValueProps extends PartProps<"span", {
538
+ readonly copied: boolean;
539
+ }> {
540
+ readonly copiedIcon?: ReactNode;
541
+ readonly copiedLabel?: string;
542
+ readonly copyIcon?: ReactNode;
543
+ readonly copyLabel?: string;
544
+ readonly value: string;
545
+ }
546
+ declare function CopyValue({ copiedIcon, copiedLabel, copyIcon, copyLabel, value, ...props }: CopyValueProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
547
+ interface ZoneFileProps extends PartProps<"div", {
548
+ readonly count: number;
549
+ }> {
550
+ readonly copiedIcon?: ReactNode;
551
+ readonly copiedLabel?: string;
552
+ readonly copyIcon?: ReactNode;
553
+ readonly copyLabel?: string;
554
+ readonly domain: string;
555
+ readonly downloadIcon?: ReactNode;
556
+ readonly downloadLabel?: string;
557
+ readonly records: ReadonlyArray<DnsRecord>;
558
+ }
559
+ declare function ZoneFile({ copiedIcon, copiedLabel, copyIcon, copyLabel, domain, downloadIcon, downloadLabel, records, ...props }: ZoneFileProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
560
+ interface StatusProps$1 extends PartProps<"span", {
561
+ readonly status: ObservationEvidence["_tag"];
562
+ }> {
563
+ readonly evidence: ObservationEvidence;
564
+ }
565
+ declare function Status$1({ evidence, ...props }: StatusProps$1): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
566
+ interface PriorityProps extends PartProps<"span", {
567
+ readonly priority: number;
568
+ }> {
569
+ readonly priority?: number;
570
+ }
571
+ declare function Priority({ children, priority, ...props }: PriorityProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
572
+ declare const Header: (props: PartProps<"thead", LeafState>) => ReactElement;
573
+ declare const Body: (props: PartProps<"tbody", LeafState>) => ReactElement;
574
+ declare const Footer: (props: PartProps<"tfoot", LeafState>) => ReactElement;
575
+ declare const Row: (props: PartProps<"tr", LeafState>) => ReactElement;
576
+ declare const Head: (props: PartProps<"th", LeafState>) => ReactElement;
577
+ declare const Cell: (props: PartProps<"td", LeafState>) => ReactElement;
578
+ declare const Caption: (props: PartProps<"caption", LeafState>) => ReactElement;
579
+ declare const Value: (props: PartProps<"span", LeafState>) => ReactElement;
580
+ declare const CardHeader: (props: PartProps<"div", LeafState>) => ReactElement;
581
+ declare const CardTitle: (props: PartProps<"strong", LeafState>) => ReactElement;
582
+ declare const CardContent: (props: PartProps<"dl", LeafState>) => ReactElement;
583
+ interface RootProps extends PartProps<"table", {
584
+ readonly count: number;
585
+ }> {
586
+ readonly count?: number;
587
+ }
588
+ declare function Root({ count, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
589
+ interface CardProps extends PartProps<"section", {
590
+ readonly recordId: string;
591
+ }> {
592
+ readonly copiedIcon?: ReactNode;
593
+ readonly copyIcon?: ReactNode;
594
+ readonly evidence?: ReadonlyArray<ObservationEvidence>;
595
+ readonly record: DnsRecord;
596
+ }
597
+ declare function Card({ copiedIcon, copyIcon, evidence, record, ...props }: CardProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
598
+ interface TableProps extends PartProps<"table", {
599
+ readonly count: number;
600
+ }> {
601
+ readonly copiedIcon?: ReactNode;
602
+ readonly copyIcon?: ReactNode;
603
+ readonly evidence?: ReadonlyArray<ObservationEvidence>;
604
+ readonly records: ReadonlyArray<DnsRecord>;
605
+ }
606
+ declare function Table({ copiedIcon, copyIcon, evidence, records, ...props }: TableProps): import("react/jsx-runtime").JSX.Element;
607
+ declare const toZoneFile: (records: ReadonlyArray<DnsRecord>) => string;
608
+ declare namespace testing_d_exports {
609
+ export { FakeOptions, FakeTransport, makeFakeTransport, provider$1 as provider };
610
+ }
611
+ interface FakeOptions {
612
+ readonly connect?: ConnectionResult;
613
+ readonly inspect: ConnectionSnapshot | ReadonlyArray<ConnectionSnapshot>;
614
+ readonly reuse?: Connected;
615
+ readonly removeDomain?: RemoveDomainResult;
616
+ readonly plan?: ProvisioningPlan;
617
+ readonly apply?: ApplyResult;
618
+ readonly observe?: Observation;
619
+ readonly cleanupPlan?: CleanupPlan;
620
+ readonly cleanupApply?: CleanupResult;
621
+ }
622
+ interface FakeTransport extends DomainKitTransport {
623
+ readonly calls: {
624
+ readonly connect: Array<Parameters<DomainKitTransport["connection"]["connect"]>[0]>;
625
+ readonly inspect: Array<Parameters<DomainKitTransport["connection"]["inspect"]>[0]>;
626
+ readonly reuse: Array<Parameters<DomainKitTransport["connection"]["reuse"]>[0]>;
627
+ readonly removeDomain: Array<Parameters<DomainKitTransport["connection"]["removeDomain"]>[0]>;
628
+ readonly plan: Array<Parameters<DomainKitTransport["provisioning"]["plan"]>[0]>;
629
+ readonly apply: Array<Parameters<DomainKitTransport["provisioning"]["apply"]>[0]>;
630
+ readonly observe: Array<Parameters<DomainKitTransport["verification"]["observe"]>[0]>;
631
+ readonly cleanupPlan: Array<Parameters<DomainKitTransport["cleanup"]["plan"]>[0]>;
632
+ readonly cleanupApply: Array<Parameters<DomainKitTransport["cleanup"]["apply"]>[0]>;
633
+ };
634
+ }
635
+ declare const provider$1: (overrides?: Partial<Provider>) => Provider;
636
+ declare function makeFakeTransport(options: FakeOptions): FakeTransport;
637
+ declare namespace verification_d_exports {
638
+ export { Observation, ObserveConfig, State, Status, StatusProps, useController };
639
+ }
640
+ type State = {
641
+ readonly _tag: "Idle";
642
+ } | {
643
+ readonly _tag: "Observing";
644
+ } | Observation | Failure;
645
+ interface ObserveConfig {
646
+ readonly connection?: Connected;
647
+ readonly domain: string;
648
+ readonly records: ReadonlyArray<DnsRecord>;
649
+ readonly sources?: {
650
+ readonly provider?: boolean;
651
+ readonly publicDns?: boolean;
652
+ };
653
+ }
654
+ declare function useController(config: ObserveConfig): {
655
+ readonly observe: () => Promise<void>;
656
+ readonly state: State;
657
+ };
658
+ interface StatusProps extends PartProps<"div", {
659
+ readonly status: State["_tag"];
660
+ }> {
661
+ readonly config: ObserveConfig;
662
+ }
663
+ declare function Status({ config, ...props }: StatusProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
664
+ //#endregion
665
+ export { cleanup_d_exports as Cleanup, connection_d_exports as Connection, domain_d_exports as Domain, domain_kit_d_exports as DomainKit, messages_d_exports as Messages, provider_d_exports as Provider, provisioning_d_exports as Provisioning, records_d_exports as Records, testing_d_exports as Testing, theme_d_exports as Theme, transport_d_exports as Transport, verification_d_exports as Verification };
666
+ //# sourceMappingURL=index.d.mts.map