@cmdoss/walrus-site-builder-react 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +256 -0
- package/dist/index.css +1442 -0
- package/dist/index.d.ts +484 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4908 -0
- package/dist/index.js.map +1 -0
- package/package.json +64 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
import { IAsset as IAsset$1, ISignAndExecuteTransaction, ISponsorConfig, IWalrusSiteBuilderSdk } from "@cmdoss/walrus-site-builder";
|
|
2
|
+
import { SuinsClient } from "@mysten/suins";
|
|
3
|
+
import { WalrusClient } from "@mysten/walrus";
|
|
4
|
+
import * as react1 from "react";
|
|
5
|
+
import { ButtonHTMLAttributes, FC, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, ReactNode, TextareaHTMLAttributes } from "react";
|
|
6
|
+
import * as _tanstack_react_query0 from "@tanstack/react-query";
|
|
7
|
+
import { QueryClient } from "@tanstack/react-query";
|
|
8
|
+
import * as nanostores0 from "nanostores";
|
|
9
|
+
import { ZenFsFileManager } from "@cmdoss/file-manager";
|
|
10
|
+
import { SuiClient } from "@mysten/sui/client";
|
|
11
|
+
import { WalletAccount } from "@mysten/wallet-standard";
|
|
12
|
+
|
|
13
|
+
//#region src/lib/result.d.ts
|
|
14
|
+
interface TOk<T> {
|
|
15
|
+
ok: true;
|
|
16
|
+
data: T;
|
|
17
|
+
error?: never;
|
|
18
|
+
}
|
|
19
|
+
interface TFailed<E> {
|
|
20
|
+
ok: false;
|
|
21
|
+
error: E;
|
|
22
|
+
data?: never;
|
|
23
|
+
}
|
|
24
|
+
type TResult<T = void, E = string> = TOk<T> | TFailed<E>;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/stores/site-publishing.store.d.ts
|
|
27
|
+
declare enum DeploySteps {
|
|
28
|
+
Idle = 0,
|
|
29
|
+
Prepared = 1,
|
|
30
|
+
Uploaded = 2,
|
|
31
|
+
Certified = 3,
|
|
32
|
+
Deployed = 4,
|
|
33
|
+
}
|
|
34
|
+
declare enum DeploymentStatus {
|
|
35
|
+
Idle = 0,
|
|
36
|
+
/** Preparing assets for upload */
|
|
37
|
+
Preparing = 1,
|
|
38
|
+
/** Assets have been prepared */
|
|
39
|
+
Prepared = 2,
|
|
40
|
+
/** Uploading assets to the network */
|
|
41
|
+
Uploading = 3,
|
|
42
|
+
/** Assets have been uploaded */
|
|
43
|
+
Uploaded = 4,
|
|
44
|
+
/** Certify uploaded assets */
|
|
45
|
+
Certifying = 5,
|
|
46
|
+
/** Assets have been certified */
|
|
47
|
+
Certified = 6,
|
|
48
|
+
/** Deploy site metadata */
|
|
49
|
+
Deploying = 7,
|
|
50
|
+
/** Site has been deployed */
|
|
51
|
+
Deployed = 8,
|
|
52
|
+
}
|
|
53
|
+
interface SiteMetadata {
|
|
54
|
+
id?: string;
|
|
55
|
+
title?: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
link?: string;
|
|
58
|
+
projectUrl?: string;
|
|
59
|
+
imageUrl?: string;
|
|
60
|
+
creator?: string;
|
|
61
|
+
}
|
|
62
|
+
interface SiteMetadataUpdate extends Omit<SiteMetadata, 'imageUrl'> {
|
|
63
|
+
imageUrl?: string | File;
|
|
64
|
+
}
|
|
65
|
+
interface DeploymentHandlers {
|
|
66
|
+
prepareAssets: () => Promise<void>;
|
|
67
|
+
uploadAssets: (epoch: number | 'max', permanent?: boolean) => Promise<void>;
|
|
68
|
+
certifyAssets: () => Promise<void>;
|
|
69
|
+
updateSite: () => Promise<void>;
|
|
70
|
+
}
|
|
71
|
+
declare class SitePublishingStore {
|
|
72
|
+
deployStatus: nanostores0.PreinitializedWritableAtom<DeploymentStatus> & object;
|
|
73
|
+
deploymentStepIndex: nanostores0.ReadableAtom<0 | 1 | 2 | 3 | 4>;
|
|
74
|
+
isPublishDialogOpen: nanostores0.PreinitializedWritableAtom<boolean> & object;
|
|
75
|
+
certifiedBlobs: nanostores0.PreinitializedWritableAtom<ICertifiedBlob[]> & object;
|
|
76
|
+
isWorking: nanostores0.ReadableAtom<boolean>;
|
|
77
|
+
deployStatusText: nanostores0.ReadableAtom<"Start Deployment" | "Preparing assets..." | "Upload assets" | "Uploading assets..." | "Certify assets" | "Certifying assets..." | "Update Site Metadata" | "Updating site metadata..." | "Customize Domain" | "Unknown status">;
|
|
78
|
+
private currentFlow?;
|
|
79
|
+
private siteId?;
|
|
80
|
+
runDeploymentStep(sdk: IWalrusSiteBuilderSdk, assets: IAsset$1[], site: SiteMetadata): Promise<TResult<string>>;
|
|
81
|
+
reset(): void;
|
|
82
|
+
closePublishDialog: () => void;
|
|
83
|
+
openCustomDomainDialog: () => void;
|
|
84
|
+
}
|
|
85
|
+
declare const sitePublishingStore: SitePublishingStore;
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/queries/suins-domains.query.d.ts
|
|
88
|
+
type SuiNsDomain = {
|
|
89
|
+
name: string;
|
|
90
|
+
objectId: string;
|
|
91
|
+
expiresAt?: number;
|
|
92
|
+
};
|
|
93
|
+
interface SuiNsDomainDetail {
|
|
94
|
+
name: string;
|
|
95
|
+
avatar?: string;
|
|
96
|
+
expirationTimestampMs?: number;
|
|
97
|
+
nftId: string;
|
|
98
|
+
walrusSiteId?: string;
|
|
99
|
+
targetAddress?: string;
|
|
100
|
+
walrusSiteUrl: string;
|
|
101
|
+
}
|
|
102
|
+
interface ISuiNsDomainQuery {
|
|
103
|
+
isLoading: boolean;
|
|
104
|
+
isError: boolean;
|
|
105
|
+
data: Array<SuiNsDomainDetail>;
|
|
106
|
+
}
|
|
107
|
+
declare function useSuiNsDomainsQuery(currentAccount: WalletAccount | null, clients: {
|
|
108
|
+
suiClient: SuiClient;
|
|
109
|
+
queryClient: QueryClient;
|
|
110
|
+
}): ISuiNsDomainQuery;
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region src/queries/walrus-site.query.d.ts
|
|
113
|
+
interface WalrusSiteDisplayData {
|
|
114
|
+
creator: string;
|
|
115
|
+
description: string;
|
|
116
|
+
image_url: string;
|
|
117
|
+
link: string;
|
|
118
|
+
project_url: string;
|
|
119
|
+
name: string;
|
|
120
|
+
}
|
|
121
|
+
interface ResourceData {
|
|
122
|
+
blob_hash: string;
|
|
123
|
+
blob_id: string;
|
|
124
|
+
headers: {
|
|
125
|
+
key: string;
|
|
126
|
+
value: string;
|
|
127
|
+
}[];
|
|
128
|
+
path: string;
|
|
129
|
+
}
|
|
130
|
+
interface WalrusSiteData extends WalrusSiteDisplayData {
|
|
131
|
+
id: string;
|
|
132
|
+
resources: ResourceData[];
|
|
133
|
+
}
|
|
134
|
+
declare function useWalrusSiteQuery(id: string | undefined, clients: {
|
|
135
|
+
suiClient: SuiClient;
|
|
136
|
+
queryClient: QueryClient;
|
|
137
|
+
}): _tanstack_react_query0.UseQueryResult<WalrusSiteData, Error>;
|
|
138
|
+
declare function useWalrusSitesQuery(address: string | undefined, options: {
|
|
139
|
+
limit?: number;
|
|
140
|
+
cursor?: string | null;
|
|
141
|
+
}, clients: {
|
|
142
|
+
suiClient: SuiClient;
|
|
143
|
+
queryClient: QueryClient;
|
|
144
|
+
}): {
|
|
145
|
+
data: WalrusSiteData[];
|
|
146
|
+
nextCursor: string | null;
|
|
147
|
+
hasNextPage: boolean;
|
|
148
|
+
isLoading: boolean;
|
|
149
|
+
isError: boolean;
|
|
150
|
+
error: Error | null;
|
|
151
|
+
};
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/queries/zenfs-files.query.d.ts
|
|
154
|
+
declare function useZenfsFilesQuery(fm: ZenFsFileManager | null, clients: {
|
|
155
|
+
queryClient: QueryClient;
|
|
156
|
+
}): _tanstack_react_query0.UseQueryResult<IAsset[], Error>;
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region src/hooks/useSitePublishing.d.ts
|
|
159
|
+
interface UseSitePublishingParams {
|
|
160
|
+
/**
|
|
161
|
+
* Site Object ID on chain. If not provided, a new site will be created upon publishing.
|
|
162
|
+
*/
|
|
163
|
+
siteId?: string;
|
|
164
|
+
/**
|
|
165
|
+
* Site's assets to be published.
|
|
166
|
+
*/
|
|
167
|
+
assets: IAsset$1[];
|
|
168
|
+
/**
|
|
169
|
+
* Optional callback to update site metadata after publishing. The site ID will
|
|
170
|
+
* be available in the `site` parameter.
|
|
171
|
+
*/
|
|
172
|
+
onUpdateSiteMetadata?: (site: SiteMetadataUpdate) => Promise<SiteMetadata | undefined>;
|
|
173
|
+
/** Optional callback when a domain is associated with the site. */
|
|
174
|
+
onAssociatedDomain?: (nftId: string, siteId: string, suiNSName: string) => Promise<void>;
|
|
175
|
+
/** Optional callback for handling errors. */
|
|
176
|
+
onError?: (msg: string) => void;
|
|
177
|
+
/** Optional callback when blobs are extended. */
|
|
178
|
+
onExtendedBlobs?: (msg: string, txDigest?: string) => void;
|
|
179
|
+
/**
|
|
180
|
+
* Sui and Query clients needed for on-chain operations.
|
|
181
|
+
*/
|
|
182
|
+
clients: {
|
|
183
|
+
suiClient: SuiClient;
|
|
184
|
+
queryClient: QueryClient;
|
|
185
|
+
suinsClient: SuinsClient;
|
|
186
|
+
walrusClient: WalrusClient;
|
|
187
|
+
};
|
|
188
|
+
/** Current wallet account information. */
|
|
189
|
+
currentAccount: WalletAccount | null;
|
|
190
|
+
/** Callback for signing and executing transactions. */
|
|
191
|
+
signAndExecuteTransaction: ISignAndExecuteTransaction;
|
|
192
|
+
sponsorConfig?: ISponsorConfig;
|
|
193
|
+
/** Optional domain for the portal to view published site. */
|
|
194
|
+
portalDomain?: string;
|
|
195
|
+
/** Whether to use HTTPS for the portal URL. */
|
|
196
|
+
portalHttps?: boolean;
|
|
197
|
+
}
|
|
198
|
+
declare function useSitePublishing({
|
|
199
|
+
siteId,
|
|
200
|
+
assets,
|
|
201
|
+
onUpdateSiteMetadata,
|
|
202
|
+
onAssociatedDomain,
|
|
203
|
+
onError,
|
|
204
|
+
onExtendedBlobs,
|
|
205
|
+
currentAccount,
|
|
206
|
+
signAndExecuteTransaction,
|
|
207
|
+
sponsorConfig,
|
|
208
|
+
portalDomain,
|
|
209
|
+
portalHttps,
|
|
210
|
+
clients: {
|
|
211
|
+
suiClient,
|
|
212
|
+
queryClient,
|
|
213
|
+
suinsClient,
|
|
214
|
+
walrusClient
|
|
215
|
+
}
|
|
216
|
+
}: UseSitePublishingParams): {
|
|
217
|
+
state: {
|
|
218
|
+
isDeployed: boolean;
|
|
219
|
+
isAssigning: boolean;
|
|
220
|
+
isExtending: boolean;
|
|
221
|
+
isPublishDialogOpen: boolean;
|
|
222
|
+
isWorking: boolean;
|
|
223
|
+
certifiedBlobs: ICertifiedBlob[];
|
|
224
|
+
epochs: number;
|
|
225
|
+
title: string;
|
|
226
|
+
iconUrl: string | File | null;
|
|
227
|
+
description: string;
|
|
228
|
+
link: string;
|
|
229
|
+
isEditingSiteMetadata: boolean;
|
|
230
|
+
deployStatus: DeploymentStatus;
|
|
231
|
+
deployStatusText: string;
|
|
232
|
+
deployStepIndex: number;
|
|
233
|
+
walrusSiteUrl: any;
|
|
234
|
+
nsDomains: SuiNsDomainDetail[];
|
|
235
|
+
isLoadingNsDomains: boolean;
|
|
236
|
+
isErrorNsDomains: boolean;
|
|
237
|
+
isSavingSiteMetadata: boolean;
|
|
238
|
+
associatedDomains: SuiNsDomainDetail[];
|
|
239
|
+
};
|
|
240
|
+
actions: {
|
|
241
|
+
handleRunDeploymentStep: () => Promise<void>;
|
|
242
|
+
handleSaveSiteMetadata: () => Promise<void>;
|
|
243
|
+
handleAssociateDomain: (nftId: string, siteId: string, suiNSName: string) => Promise<void>;
|
|
244
|
+
handleExtendBlobs: (extendEpochs: number) => Promise<void>;
|
|
245
|
+
handleOpenDomainDialog: () => void;
|
|
246
|
+
handleOpenPublishingDialog: () => void;
|
|
247
|
+
handleCancelEditingSiteMetadata: () => void;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region src/components/PublishButton.d.ts
|
|
252
|
+
interface Props extends UseSitePublishingParams {
|
|
253
|
+
children?: ReactNode;
|
|
254
|
+
}
|
|
255
|
+
declare const PublishButton: FC<Props>;
|
|
256
|
+
//#endregion
|
|
257
|
+
//#region src/components/publish-menu/PublishMenu.d.ts
|
|
258
|
+
interface PublishMenuProps {
|
|
259
|
+
children?: ReactNode;
|
|
260
|
+
siteId: string | undefined;
|
|
261
|
+
onPublishClick?: () => void;
|
|
262
|
+
onDomainClick?: () => void;
|
|
263
|
+
network?: 'mainnet' | 'testnet';
|
|
264
|
+
/** Optional domain for the portal to view published site. */
|
|
265
|
+
portalDomain?: string;
|
|
266
|
+
/** Whether to use HTTPS for the portal URL. */
|
|
267
|
+
portalHttps?: boolean;
|
|
268
|
+
clients: {
|
|
269
|
+
suiClient: SuiClient;
|
|
270
|
+
queryClient: QueryClient;
|
|
271
|
+
};
|
|
272
|
+
currentAccount: WalletAccount | null;
|
|
273
|
+
}
|
|
274
|
+
declare const PublishMenu: FC<PublishMenuProps>;
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region src/components/publish-modal/PublishModal.d.ts
|
|
277
|
+
interface PublishModalProps {
|
|
278
|
+
siteId: string | undefined;
|
|
279
|
+
assets: IAsset$1[];
|
|
280
|
+
onDeploy?: () => void;
|
|
281
|
+
onSaveMetadata?: () => Promise<void>;
|
|
282
|
+
onExtendBlobs?: (extendEpochs: number) => Promise<void>;
|
|
283
|
+
clients: {
|
|
284
|
+
queryClient: QueryClient;
|
|
285
|
+
walrusClient: WalrusClient;
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
declare const PublishModal: FC<PublishModalProps>;
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region src/components/suins-modal/SuiNsModal.d.ts
|
|
291
|
+
interface SuiNsModalProps {
|
|
292
|
+
siteId: string | undefined;
|
|
293
|
+
onAssociateDomain?: (nftId: string, siteId: string, suiNSName: string) => void;
|
|
294
|
+
currentAccount: WalletAccount | null;
|
|
295
|
+
/** Optional domain for the portal to view published site. */
|
|
296
|
+
portalDomain?: string;
|
|
297
|
+
/** Whether to use HTTPS for the portal URL. */
|
|
298
|
+
portalHttps?: boolean;
|
|
299
|
+
/**
|
|
300
|
+
* Sui and Query clients needed for on-chain operations.
|
|
301
|
+
*/
|
|
302
|
+
clients: {
|
|
303
|
+
suiClient: SuiClient;
|
|
304
|
+
queryClient: QueryClient;
|
|
305
|
+
suinsClient: SuinsClient;
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* Callback for signing and executing transactions.
|
|
309
|
+
* Required for registering new SuiNS domains.
|
|
310
|
+
*/
|
|
311
|
+
signAndExecuteTransaction?: ISignAndExecuteTransaction;
|
|
312
|
+
/**
|
|
313
|
+
* Optional sponsor configuration for transaction sponsorship.
|
|
314
|
+
*/
|
|
315
|
+
sponsorConfig?: ISponsorConfig;
|
|
316
|
+
}
|
|
317
|
+
declare const SuiNsModal: FC<SuiNsModalProps>;
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region src/components/ui/Banner.d.ts
|
|
320
|
+
type BannerVariant = 'info' | 'success' | 'warning' | 'alert' | 'error';
|
|
321
|
+
interface BannerProps {
|
|
322
|
+
title: string;
|
|
323
|
+
description?: string;
|
|
324
|
+
icon?: ReactNode;
|
|
325
|
+
showIcon?: boolean;
|
|
326
|
+
className?: string;
|
|
327
|
+
variant?: BannerVariant;
|
|
328
|
+
onClose?: () => void;
|
|
329
|
+
url?: string;
|
|
330
|
+
urlName?: string;
|
|
331
|
+
}
|
|
332
|
+
declare const Banner: FC<BannerProps>;
|
|
333
|
+
//#endregion
|
|
334
|
+
//#region src/components/ui/Button.d.ts
|
|
335
|
+
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
336
|
+
variant?: 'default' | 'outline' | 'ghost' | 'destructive' | 'gradient';
|
|
337
|
+
size?: 'default' | 'sm' | 'lg' | 'icon';
|
|
338
|
+
asChild?: boolean;
|
|
339
|
+
}
|
|
340
|
+
declare const Button: FC<ButtonProps>;
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region src/components/ui/FlickeringGrid.d.ts
|
|
343
|
+
interface FlickeringGridProps extends HTMLAttributes<HTMLDivElement> {
|
|
344
|
+
squareSize?: number;
|
|
345
|
+
gridGap?: number;
|
|
346
|
+
flickerChance?: number;
|
|
347
|
+
color?: string;
|
|
348
|
+
width?: number;
|
|
349
|
+
height?: number;
|
|
350
|
+
maxOpacity?: number;
|
|
351
|
+
}
|
|
352
|
+
declare const FlickeringGrid: FC<FlickeringGridProps>;
|
|
353
|
+
//#endregion
|
|
354
|
+
//#region src/components/ui/Input.d.ts
|
|
355
|
+
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {}
|
|
356
|
+
declare const Input: react1.ForwardRefExoticComponent<InputProps & react1.RefAttributes<HTMLInputElement>>;
|
|
357
|
+
interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
358
|
+
children?: ReactNode;
|
|
359
|
+
}
|
|
360
|
+
declare const Label: FC<LabelProps>;
|
|
361
|
+
interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {}
|
|
362
|
+
declare const Textarea: FC<TextareaProps>;
|
|
363
|
+
//#endregion
|
|
364
|
+
//#region src/components/ui/Stepper.d.ts
|
|
365
|
+
interface StepperProps {
|
|
366
|
+
steps: Array<{
|
|
367
|
+
title: string;
|
|
368
|
+
description?: string;
|
|
369
|
+
}>;
|
|
370
|
+
currentStep: number;
|
|
371
|
+
isLoading?: boolean;
|
|
372
|
+
}
|
|
373
|
+
declare const Stepper: FC<StepperProps>;
|
|
374
|
+
//#endregion
|
|
375
|
+
//#region src/hooks/useEpochDuration.d.ts
|
|
376
|
+
declare function useEpochDuration(walrusClient: WalrusClient | null): {
|
|
377
|
+
epochDurationMs: number | null;
|
|
378
|
+
getExpirationDate: (epochs: number) => Date | null;
|
|
379
|
+
formatDate: (date: Date) => string;
|
|
380
|
+
};
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region src/hooks/useSuiNsRegistration.d.ts
|
|
383
|
+
interface UseSuiNsRegistrationParams {
|
|
384
|
+
currentAccount: WalletAccount | null;
|
|
385
|
+
clients: {
|
|
386
|
+
suiClient: SuiClient;
|
|
387
|
+
queryClient: QueryClient;
|
|
388
|
+
suinsClient: SuinsClient;
|
|
389
|
+
};
|
|
390
|
+
signAndExecuteTransaction: ISignAndExecuteTransaction;
|
|
391
|
+
sponsorConfig?: ISponsorConfig;
|
|
392
|
+
}
|
|
393
|
+
declare function useSuiNsRegistration({
|
|
394
|
+
currentAccount,
|
|
395
|
+
clients: {
|
|
396
|
+
suiClient,
|
|
397
|
+
queryClient,
|
|
398
|
+
suinsClient
|
|
399
|
+
},
|
|
400
|
+
signAndExecuteTransaction,
|
|
401
|
+
sponsorConfig
|
|
402
|
+
}: UseSuiNsRegistrationParams): {
|
|
403
|
+
searchName: string;
|
|
404
|
+
setSearchName: react1.Dispatch<react1.SetStateAction<string>>;
|
|
405
|
+
isSearching: boolean;
|
|
406
|
+
isAvailable: boolean | null;
|
|
407
|
+
isRegistering: boolean;
|
|
408
|
+
isSwapping: boolean;
|
|
409
|
+
estimatedPrice: string | null;
|
|
410
|
+
error: string | null;
|
|
411
|
+
normalizedName: string;
|
|
412
|
+
fullName: string;
|
|
413
|
+
handleSearch: () => Promise<void>;
|
|
414
|
+
handleRegister: () => Promise<boolean | undefined>;
|
|
415
|
+
reset: () => void;
|
|
416
|
+
};
|
|
417
|
+
//#endregion
|
|
418
|
+
//#region src/hooks/useTransactionExecutor.d.ts
|
|
419
|
+
interface UseTransactionExecutorParams {
|
|
420
|
+
suiClient: SuiClient;
|
|
421
|
+
walletAddress: string | undefined;
|
|
422
|
+
signAndExecuteTransaction: ISignAndExecuteTransaction;
|
|
423
|
+
sponsorConfig?: ISponsorConfig;
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* React hook to create a TransactionExecutorService instance.
|
|
427
|
+
* Automatically handles sponsor configuration and wallet changes.
|
|
428
|
+
*/
|
|
429
|
+
declare function useTransactionExecutor({
|
|
430
|
+
suiClient,
|
|
431
|
+
walletAddress,
|
|
432
|
+
signAndExecuteTransaction,
|
|
433
|
+
sponsorConfig
|
|
434
|
+
}: UseTransactionExecutorParams): any;
|
|
435
|
+
//#endregion
|
|
436
|
+
//#region src/hooks/useZenFsWorkspace.d.ts
|
|
437
|
+
declare function useZenFsWorkspace(workspaceDir: string | undefined, mountDir: string | undefined, queryClient: QueryClient): {
|
|
438
|
+
loading: boolean;
|
|
439
|
+
fileManager: any;
|
|
440
|
+
};
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region src/stores/site-domain.store.d.ts
|
|
443
|
+
declare const isDomainDialogOpen: nanostores0.PreinitializedWritableAtom<boolean> & object;
|
|
444
|
+
declare const isAssigningDomain: nanostores0.PreinitializedWritableAtom<boolean> & object;
|
|
445
|
+
declare const isRegisterSuiNSDomainDialogOpen: nanostores0.PreinitializedWritableAtom<boolean> & object;
|
|
446
|
+
declare const isExtendTimeDialogOpen: nanostores0.PreinitializedWritableAtom<boolean> & object;
|
|
447
|
+
//#endregion
|
|
448
|
+
//#region src/stores/site-metadata.store.d.ts
|
|
449
|
+
declare class SiteMetadata$1 {
|
|
450
|
+
title: nanostores0.PreinitializedWritableAtom<string> & object;
|
|
451
|
+
description: nanostores0.PreinitializedWritableAtom<string> & object;
|
|
452
|
+
imageUrl: nanostores0.PreinitializedWritableAtom<string | File | null> & object;
|
|
453
|
+
link: nanostores0.PreinitializedWritableAtom<string> & object;
|
|
454
|
+
projectUrl: nanostores0.PreinitializedWritableAtom<string> & object;
|
|
455
|
+
epochs: nanostores0.PreinitializedWritableAtom<number> & object;
|
|
456
|
+
deletable: nanostores0.PreinitializedWritableAtom<boolean> & object;
|
|
457
|
+
loading: nanostores0.PreinitializedWritableAtom<boolean> & object;
|
|
458
|
+
suiNSUrl: nanostores0.PreinitializedWritableAtom<{
|
|
459
|
+
suins: string;
|
|
460
|
+
nftId: string;
|
|
461
|
+
}[]> & object;
|
|
462
|
+
originalTitle: nanostores0.PreinitializedWritableAtom<string> & object;
|
|
463
|
+
originalDescription: nanostores0.PreinitializedWritableAtom<string> & object;
|
|
464
|
+
originalImageUrl: nanostores0.PreinitializedWritableAtom<string | File | null> & object;
|
|
465
|
+
originalLink: nanostores0.PreinitializedWritableAtom<string> & object;
|
|
466
|
+
originalProjectUrl: nanostores0.PreinitializedWritableAtom<string> & object;
|
|
467
|
+
originalEpochs: nanostores0.PreinitializedWritableAtom<number> & object;
|
|
468
|
+
originalSuiNSUrl: nanostores0.PreinitializedWritableAtom<{
|
|
469
|
+
suins: string;
|
|
470
|
+
nftId: string;
|
|
471
|
+
}[]> & object;
|
|
472
|
+
isDirty: nanostores0.ReadableAtom<boolean>;
|
|
473
|
+
/**
|
|
474
|
+
* Computed URL for displaying the image preview
|
|
475
|
+
*/
|
|
476
|
+
imageDisplayUrl: nanostores0.ReadableAtom<string | null>;
|
|
477
|
+
commitChanges(): void;
|
|
478
|
+
reset(): void;
|
|
479
|
+
cancelEdit: () => void;
|
|
480
|
+
}
|
|
481
|
+
declare const siteMetadataStore: SiteMetadata$1;
|
|
482
|
+
//#endregion
|
|
483
|
+
export { Banner, BannerProps, Button, ButtonProps, DeploySteps, DeploymentHandlers, DeploymentStatus, FlickeringGrid, FlickeringGridProps, ISuiNsDomainQuery, Input, InputProps, Label, LabelProps, PublishButton, PublishMenu, PublishModal, SiteMetadata, SiteMetadataUpdate, Stepper, SuiNsDomain, SuiNsDomainDetail, SuiNsModal, Textarea, TextareaProps, UseSitePublishingParams, UseTransactionExecutorParams, isAssigningDomain, isDomainDialogOpen, isExtendTimeDialogOpen, isRegisterSuiNSDomainDialogOpen, siteMetadataStore, sitePublishingStore, useEpochDuration, useSitePublishing, useSuiNsDomainsQuery, useSuiNsRegistration, useTransactionExecutor, useWalrusSiteQuery, useWalrusSitesQuery, useZenFsWorkspace, useZenfsFilesQuery };
|
|
484
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/lib/result.ts","../src/stores/site-publishing.store.ts","../src/queries/suins-domains.query.ts","../src/queries/walrus-site.query.ts","../src/queries/zenfs-files.query.ts","../src/hooks/useSitePublishing.ts","../src/components/PublishButton.tsx","../src/components/publish-menu/PublishMenu.tsx","../src/components/publish-modal/PublishModal.tsx","../src/components/suins-modal/SuiNsModal.tsx","../src/components/ui/Banner.tsx","../src/components/ui/Button.tsx","../src/components/ui/FlickeringGrid.tsx","../src/components/ui/Input.tsx","../src/components/ui/Stepper.tsx","../src/hooks/useEpochDuration.ts","../src/hooks/useSuiNsRegistration.ts","../src/hooks/useTransactionExecutor.ts","../src/hooks/useZenFsWorkspace.ts","../src/stores/site-domain.store.ts","../src/stores/site-metadata.store.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;UAAiB;;QAET;;;UAGS;;SAER;;;KAGG,gCAAgC,IAAI,KAAK,QAAQ;;;aCCjD,WAAA;;;;;;;aAQA,gBAAA;;;;EDnBK;EAKA,QAAA,GAAO,CAAA;EAKZ;EAAoC,SAAA,GAAA,CAAA;EAAJ;EAAiB,QAAA,GAAA,CAAA;EAAR;EAAO,UAAA,GAAA,CAAA;;;;ECChD,SAAA,GAAA,CAAA;EAQA;EAoBK,QAAA,GAAA,CAAA;AASjB;AAAiD,UAThC,YAAA,CASgC;EAC3B,EAAA,CAAA,EAAA,MAAA;EADsB,KAAA,CAAA,EAAA,MAAA;EAAI,WAAA,CAAA,EAAA,MAAA;EAI/B,IAAA,CAAA,EAAA,MAAA;EACM,UAAA,CAAA,EAAA,MAAA;EACyC,QAAA,CAAA,EAAA,MAAA;EACzC,OAAA,CAAA,EAAA,MAAA;;AACI,UARV,kBAAA,SAA2B,IAQjB,CARsB,YAQtB,EAAA,UAAA,CAAA,CAAA;EAGrB,QAAA,CAAA,EAAA,MAAA,GAVgB,IAUG;;AAEX,UATG,kBAAA,CASH;EAAA,aACO,EAAA,GAAA,GAT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