@plitzi/plitzi-builder 0.37.6 → 0.37.7
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/CHANGELOG.md +38 -0
- package/dist/modules/Builder/Models/TemplateForm.d.ts +9 -9
- package/dist/modules/Functions/components/FunctionsOffer/FunctionsOffer.d.ts +1 -1
- package/dist/modules/Resources/Models/CdnAccountFields.d.ts +7 -0
- package/dist/modules/Resources/Models/CdnBucketFields.d.ts +10 -0
- package/dist/modules/Resources/Models/ResourceCdnAccountForm.d.ts +21 -0
- package/dist/modules/Resources/Models/ResourceCdnBucketForm.d.ts +28 -0
- package/dist/modules/Resources/Models/ResourceCdnForm.d.ts +13 -28
- package/dist/modules/Resources/Models/cdnSchemas.d.ts +34 -0
- package/dist/modules/Resources/components/Resource/Resource.d.ts +2 -1
- package/dist/modules/Resources/components/Resource/subTypes/ResourceServerCode/ResourceServerCode.d.ts +3 -3
- package/dist/modules/Resources/components/ResourceManager/ResourceManager.d.ts +3 -1
- package/dist/modules/Resources/components/ResourceManager/TemporalResource.d.ts +2 -1
- package/dist/modules/Resources/components/ResourcesCdn/ResourcesCdn.d.ts +6 -6
- package/dist/modules/Resources/components/ResourcesCdnBucket/ResourcesCdnBucket.d.ts +18 -0
- package/dist/modules/Resources/components/ResourcesCdnBucket/index.d.ts +3 -0
- package/dist/modules/Resources/components/ResourcesList/ListHelper.d.ts +2 -2
- package/dist/modules/Resources/components/ResourcesList/ListHelper.test.d.ts +1 -0
- package/dist/modules/Resources/components/ResourcesList/ResourceDirectory.d.ts +2 -1
- package/dist/modules/Resources/components/ResourcesList/ResourcesList.d.ts +5 -2
- package/dist/package.json.d.ts +1 -1
- package/dist/plitzi-builder.css +1 -1
- package/dist/plitzi-builder.css.gz +0 -0
- package/dist/plitzi-builder.js +1263 -1250
- package/dist/plitzi-builder.js.gz +0 -0
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @plitzi/plitzi-builder
|
|
2
2
|
|
|
3
|
+
## 0.37.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4d10e0a: ## CDNs with several buckets
|
|
8
|
+
|
|
9
|
+
A CDN is the customer's own storage account — S3 or R2, which they run and pay for — and now holds any number of
|
|
10
|
+
buckets, each with its own configuration: its name at the provider, its region, `public` (served at its domain) or
|
|
11
|
+
`private` (no domain, read only by the platform with the CDN's credential).
|
|
12
|
+
|
|
13
|
+
- `Cdn` carries `buckets: CdnBucket[]`; `domain`, `visibility`, `bucketName` and `region` moved from the CDN to its
|
|
14
|
+
buckets. `Resource.bucketIdentifier` names the bucket a file is in.
|
|
15
|
+
- `SpaceAddCdn(name, provider, endpoint, buckets)` creates the account with its buckets; `SpaceUpdateCdn` changes the
|
|
16
|
+
account only. New `SpaceAddCdnBucket`, `SpaceUpdateCdnBucket` and `SpaceRemoveCdnBucket`.
|
|
17
|
+
- `SpaceResources`, `SpaceAddResource`, `SpaceRemoveResource` and `SpaceMoveResource` take `bucketIdentifier`.
|
|
18
|
+
- Server code — functions and runtime — goes in the space's oldest private bucket. A bucket that keeps code a version
|
|
19
|
+
runs can be neither made public, pointed at another bucket nor removed, and neither can its CDN.
|
|
20
|
+
- Builder: Resources shows each CDN with its buckets — add, edit and remove buckets, upload and browse per bucket; the
|
|
21
|
+
account (name, provider, endpoint, credential) is edited apart. Saving an element as a template picks a public
|
|
22
|
+
bucket (`elementAsTemplate({ cdnIdentifier, bucketIdentifier }, …)`).
|
|
23
|
+
- CLI: `plitzi upload plugin --bucket <identifier>` (with `--cdn` to narrow); only public buckets are offered, a private
|
|
24
|
+
one is refused.
|
|
25
|
+
|
|
26
|
+
- Updated dependencies [4d10e0a]
|
|
27
|
+
- @plitzi/sdk-auth@0.37.7
|
|
28
|
+
- @plitzi/sdk-authoring@0.37.7
|
|
29
|
+
- @plitzi/sdk-dev-tools@0.37.7
|
|
30
|
+
- @plitzi/sdk-elements@0.37.7
|
|
31
|
+
- @plitzi/sdk-event-bridge@0.37.7
|
|
32
|
+
- @plitzi/sdk-interactions@0.37.7
|
|
33
|
+
- @plitzi/sdk-navigation@0.37.7
|
|
34
|
+
- @plitzi/sdk-plugins@0.37.7
|
|
35
|
+
- @plitzi/sdk-schema@0.37.7
|
|
36
|
+
- @plitzi/sdk-shared@0.37.7
|
|
37
|
+
- @plitzi/sdk-style@0.37.7
|
|
38
|
+
- @plitzi/sdk-variables@0.37.7
|
|
39
|
+
- @plitzi/plitzi-sdk@0.37.7
|
|
40
|
+
|
|
3
41
|
## 0.37.6
|
|
4
42
|
|
|
5
43
|
### Patch Changes
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { MouseEvent } from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
/** What the form answers: the template, and the public bucket of which CDN it goes in. */
|
|
3
|
+
export type TemplateFormValues = {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
cdnIdentifier: string;
|
|
7
|
+
bucketIdentifier: string;
|
|
8
|
+
};
|
|
8
9
|
export type TemplateFormProps = {
|
|
9
10
|
name?: string;
|
|
10
11
|
description?: string;
|
|
11
|
-
cdnIdentifier?: string;
|
|
12
12
|
onClose?: (e?: MouseEvent) => void;
|
|
13
|
-
onSubmit?: (e: MouseEvent | undefined, values:
|
|
13
|
+
onSubmit?: (e: MouseEvent | undefined, values: TemplateFormValues) => void;
|
|
14
14
|
};
|
|
15
|
-
declare const TemplateForm: ({ name, description,
|
|
15
|
+
declare const TemplateForm: ({ name, description, onSubmit, onClose }: TemplateFormProps) => import('react').JSX.Element;
|
|
16
16
|
export default TemplateForm;
|
|
@@ -5,7 +5,7 @@ export type FunctionsOfferProps = {
|
|
|
5
5
|
onInstall?: () => void;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
|
-
* The functions the space's template brought, offered to install: a space made from a template has no private
|
|
8
|
+
* The functions the space's template brought, offered to install: a space made from a template has no private bucket to
|
|
9
9
|
* keep server code on at first, so they wait here until it has one. Installing saves them as the space's own.
|
|
10
10
|
*/
|
|
11
11
|
declare const FunctionsOffer: ({ template, isInstalling, onInstall }: FunctionsOfferProps) => import('react').JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type CdnAccountFieldsProps = {
|
|
2
|
+
provider: string;
|
|
3
|
+
onChangeProvider?: (value: string) => void;
|
|
4
|
+
};
|
|
5
|
+
/** A CDN account's fields — its name, its provider and, on R2, its endpoint — inside a form that holds them. */
|
|
6
|
+
declare const CdnAccountFields: ({ provider, onChangeProvider }: CdnAccountFieldsProps) => import('react').JSX.Element;
|
|
7
|
+
export default CdnAccountFields;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type CdnBucketFieldsProps = {
|
|
2
|
+
provider: string;
|
|
3
|
+
visibility: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* A bucket's fields — the bucket as the provider knows it, its region on S3, who may read it and, when public, where —
|
|
7
|
+
* inside a form that holds them.
|
|
8
|
+
*/
|
|
9
|
+
declare const CdnBucketFields: ({ provider, visibility }: CdnBucketFieldsProps) => import('react').JSX.Element;
|
|
10
|
+
export default CdnBucketFields;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MouseEvent } from 'react';
|
|
3
|
+
declare const resourceCdnAccountFormSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
provider: z.ZodEnum<{
|
|
6
|
+
s3: "s3";
|
|
7
|
+
r2: "r2";
|
|
8
|
+
}>;
|
|
9
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type ResourceCdnAccountFormValues = z.infer<typeof resourceCdnAccountFormSchema>;
|
|
12
|
+
export type ResourceCdnAccountFormProps = {
|
|
13
|
+
name: string;
|
|
14
|
+
provider: 's3' | 'r2';
|
|
15
|
+
endpoint?: string;
|
|
16
|
+
onClose?: (e?: MouseEvent) => void;
|
|
17
|
+
onSubmit?: (e: MouseEvent | undefined, values: ResourceCdnAccountFormValues) => void;
|
|
18
|
+
};
|
|
19
|
+
/** A CDN's account — its name, provider and endpoint. Its buckets are changed one by one. */
|
|
20
|
+
declare const ResourceCdnAccountForm: ({ name, provider, endpoint, onSubmit, onClose }: ResourceCdnAccountFormProps) => import('react').JSX.Element;
|
|
21
|
+
export default ResourceCdnAccountForm;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CdnVisibility } from '@plitzi/sdk-shared';
|
|
3
|
+
import { MouseEvent } from 'react';
|
|
4
|
+
declare const bucketFormSchemaFor: (provider: "s3" | "r2") => z.ZodObject<{
|
|
5
|
+
bucketName: z.ZodString;
|
|
6
|
+
region: z.ZodOptional<z.ZodString>;
|
|
7
|
+
visibility: z.ZodEnum<{
|
|
8
|
+
public: "public";
|
|
9
|
+
private: "private";
|
|
10
|
+
}>;
|
|
11
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
12
|
+
name: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type ResourceCdnBucketFormValues = z.infer<ReturnType<typeof bucketFormSchemaFor>>;
|
|
15
|
+
export type ResourceCdnBucketFormProps = {
|
|
16
|
+
/** The provider of the CDN it belongs to: an S3 bucket has a region of its own. */
|
|
17
|
+
provider: 's3' | 'r2';
|
|
18
|
+
name?: string;
|
|
19
|
+
bucketName?: string;
|
|
20
|
+
region?: string;
|
|
21
|
+
visibility?: CdnVisibility;
|
|
22
|
+
domain?: string;
|
|
23
|
+
onClose?: (e?: MouseEvent) => void;
|
|
24
|
+
onSubmit?: (e: MouseEvent | undefined, values: ResourceCdnBucketFormValues) => void;
|
|
25
|
+
};
|
|
26
|
+
/** A bucket of a CDN, added or changed: what the builder calls it, and its configuration. */
|
|
27
|
+
declare const ResourceCdnBucketForm: ({ provider, name, bucketName, region, visibility, domain, onSubmit, onClose }: ResourceCdnBucketFormProps) => import('react').JSX.Element;
|
|
28
|
+
export default ResourceCdnBucketForm;
|
|
@@ -1,40 +1,25 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { CdnVisibility } from '@plitzi/sdk-shared';
|
|
3
2
|
import { MouseEvent } from 'react';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
/** A new CDN: the customer's storage account and its first bucket — more are added to it afterwards. */
|
|
4
|
+
declare const resourceCdnFormSchema: z.ZodObject<{
|
|
5
|
+
bucketName: z.ZodString;
|
|
6
|
+
region: z.ZodOptional<z.ZodString>;
|
|
7
7
|
visibility: z.ZodEnum<{
|
|
8
8
|
public: "public";
|
|
9
9
|
private: "private";
|
|
10
10
|
}>;
|
|
11
|
-
domain: z.ZodString
|
|
12
|
-
region: z.ZodString;
|
|
13
|
-
endpoint: z.ZodOptional<z.ZodString>;
|
|
14
|
-
bucketName: z.ZodString;
|
|
15
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
16
|
-
provider: z.ZodLiteral<"r2">;
|
|
11
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
17
12
|
name: z.ZodString;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
provider: z.ZodEnum<{
|
|
14
|
+
s3: "s3";
|
|
15
|
+
r2: "r2";
|
|
21
16
|
}>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
bucketName: z.ZodString;
|
|
26
|
-
}, z.core.$strip>], "provider">;
|
|
17
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type ResourceCdnFormValues = z.infer<typeof resourceCdnFormSchema>;
|
|
27
20
|
export type ResourceCdnFormProps = {
|
|
28
|
-
className?: string;
|
|
29
|
-
name?: string;
|
|
30
|
-
domain?: string;
|
|
31
|
-
visibility?: CdnVisibility;
|
|
32
|
-
provider?: 's3' | 'r2';
|
|
33
|
-
region?: string;
|
|
34
|
-
endpoint?: string;
|
|
35
|
-
bucketName?: string;
|
|
36
21
|
onClose?: (e?: MouseEvent) => void;
|
|
37
|
-
onSubmit?: (e: MouseEvent | undefined, values:
|
|
22
|
+
onSubmit?: (e: MouseEvent | undefined, values: ResourceCdnFormValues) => void;
|
|
38
23
|
};
|
|
39
|
-
declare const ResourceCdnForm: ({
|
|
24
|
+
declare const ResourceCdnForm: ({ onSubmit, onClose }: ResourceCdnFormProps) => import('react').JSX.Element;
|
|
40
25
|
export default ResourceCdnForm;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z, RefinementCtx } from 'zod';
|
|
2
|
+
/** A CDN's account, as its forms take it: the customer's storage account — provider, and where R2 reaches it. */
|
|
3
|
+
export declare const cdnAccountShape: {
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
provider: z.ZodEnum<{
|
|
6
|
+
s3: "s3";
|
|
7
|
+
r2: "r2";
|
|
8
|
+
}>;
|
|
9
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
10
|
+
};
|
|
11
|
+
/** A bucket's configuration, as its forms take it. */
|
|
12
|
+
export declare const cdnBucketShape: {
|
|
13
|
+
bucketName: z.ZodString;
|
|
14
|
+
region: z.ZodOptional<z.ZodString>;
|
|
15
|
+
visibility: z.ZodEnum<{
|
|
16
|
+
public: "public";
|
|
17
|
+
private: "private";
|
|
18
|
+
}>;
|
|
19
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
20
|
+
};
|
|
21
|
+
/** What an account needs beyond its shape: R2 is reached at an endpoint of its own. */
|
|
22
|
+
export declare const checkCdnAccount: ({ provider, endpoint }: {
|
|
23
|
+
provider: "s3" | "r2";
|
|
24
|
+
endpoint?: string;
|
|
25
|
+
}, ctx: RefinementCtx) => void;
|
|
26
|
+
/**
|
|
27
|
+
* What a bucket needs beyond its shape: an S3 bucket lives in a region of its own, and a public bucket is read at its
|
|
28
|
+
* domain — a private one has none: only Plitzi reads it, with the CDN's credential.
|
|
29
|
+
*/
|
|
30
|
+
export declare const checkCdnBucket: (provider: "s3" | "r2", { region, visibility, domain }: {
|
|
31
|
+
region?: string;
|
|
32
|
+
visibility: "public" | "private";
|
|
33
|
+
domain?: string;
|
|
34
|
+
}, ctx: RefinementCtx) => void;
|
|
@@ -3,6 +3,7 @@ export type ResourceProps = {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
id: string;
|
|
5
5
|
cdnIdentifier: string;
|
|
6
|
+
bucketIdentifier: string;
|
|
6
7
|
type?: TResourceType;
|
|
7
8
|
src?: string;
|
|
8
9
|
title?: string;
|
|
@@ -13,5 +14,5 @@ export type ResourceProps = {
|
|
|
13
14
|
isLoading?: boolean;
|
|
14
15
|
onRemove?: (id: string) => void;
|
|
15
16
|
};
|
|
16
|
-
declare const Resource: ({ className, id, cdnIdentifier, type, src, title, metadata, usedBy, directoryName, isLoading, onRemove }: ResourceProps) => import('react').JSX.Element;
|
|
17
|
+
declare const Resource: ({ className, id, cdnIdentifier, bucketIdentifier, type, src, title, metadata, usedBy, directoryName, isLoading, onRemove }: ResourceProps) => import('react').JSX.Element;
|
|
17
18
|
export default Resource;
|
|
@@ -9,9 +9,9 @@ export type ResourceServerCodeProps = {
|
|
|
9
9
|
onRemove?: (e: MouseEvent) => void;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
* A file of the space's server code
|
|
13
|
-
* named by what it holds. No preview and no address: a private
|
|
14
|
-
* it, so what nothing runs any more can be cleared from here.
|
|
12
|
+
* A file of the space's server code in its private bucket — its functions or its runtime, kept by saves and pushes
|
|
13
|
+
* and named by what it holds. No preview and no address: a private bucket serves nothing. What it shows is which
|
|
14
|
+
* versions run it, so what nothing runs any more can be cleared from here.
|
|
15
15
|
*/
|
|
16
16
|
declare const ResourceServerCode: ({ className, id, usedBy, removing, isLoading, onRemove }: ResourceServerCodeProps) => import('react').JSX.Element;
|
|
17
17
|
export default ResourceServerCode;
|
|
@@ -2,9 +2,11 @@ import { ResourceFile, ResourceWithFile } from '@plitzi/sdk-shared';
|
|
|
2
2
|
export type ResourceManagerProps = {
|
|
3
3
|
className?: string;
|
|
4
4
|
cdnIdentifier?: string;
|
|
5
|
+
/** Which of the CDN's buckets the files go in — a public one. */
|
|
6
|
+
bucketIdentifier?: string;
|
|
5
7
|
uploadTypes?: string[];
|
|
6
8
|
onUploaded?: (resource: ResourceWithFile) => void;
|
|
7
9
|
onUploadAdded?: (file: ResourceFile) => boolean;
|
|
8
10
|
};
|
|
9
|
-
declare const ResourceManager: ({ className, cdnIdentifier, uploadTypes, onUploaded, onUploadAdded }: ResourceManagerProps) => import('react').JSX.Element;
|
|
11
|
+
declare const ResourceManager: ({ className, cdnIdentifier, bucketIdentifier, uploadTypes, onUploaded, onUploadAdded }: ResourceManagerProps) => import('react').JSX.Element;
|
|
10
12
|
export default ResourceManager;
|
|
@@ -2,6 +2,7 @@ import { PluginManifest, ResourceFile, ResourceType as TResourceType, ResourceWi
|
|
|
2
2
|
export type TemporalResourceProps = {
|
|
3
3
|
className?: string;
|
|
4
4
|
cdnIdentifier?: string;
|
|
5
|
+
bucketIdentifier?: string;
|
|
5
6
|
id?: string;
|
|
6
7
|
file?: ResourceFile;
|
|
7
8
|
type?: TResourceType;
|
|
@@ -11,5 +12,5 @@ export type TemporalResourceProps = {
|
|
|
11
12
|
onUploadCancel?: (file: File) => void;
|
|
12
13
|
onError?: (e: Error) => void;
|
|
13
14
|
};
|
|
14
|
-
declare const TemporalResource: ({ cdnIdentifier, id, type, title, className, file, metadata, onUploaded, onError: onErrorProp, onUploadCancel }: TemporalResourceProps) => import('react').JSX.Element;
|
|
15
|
+
declare const TemporalResource: ({ cdnIdentifier, bucketIdentifier, id, type, title, className, file, metadata, onUploaded, onError: onErrorProp, onUploadCancel }: TemporalResourceProps) => import('react').JSX.Element;
|
|
15
16
|
export default TemporalResource;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Cdn } from '@plitzi/sdk-shared';
|
|
2
2
|
export type ResourcesCdnProps = {
|
|
3
|
-
/** The CDN as the space's list gives it
|
|
3
|
+
/** The CDN as the space's list gives it: its account and its buckets. */
|
|
4
4
|
cdn: Cdn;
|
|
5
|
-
identifier: string;
|
|
6
|
-
name: string;
|
|
7
|
-
prefix: string;
|
|
8
|
-
credentialIdentifier?: string;
|
|
9
5
|
isCollapsed?: boolean;
|
|
10
6
|
onCollapse?: (category: string, isCollapsed: boolean) => void;
|
|
11
7
|
onChange?: (identifier: string) => void;
|
|
12
8
|
onRemove?: (identifier: string) => void;
|
|
13
9
|
};
|
|
14
|
-
|
|
10
|
+
/**
|
|
11
|
+
* A CDN — the customer's own storage account — and its buckets, each with its own configuration and files. The account
|
|
12
|
+
* holds the credential every bucket is opened with.
|
|
13
|
+
*/
|
|
14
|
+
declare const ResourcesCdn: ({ cdn, isCollapsed, onCollapse, onChange, onRemove }: ResourcesCdnProps) => import('react').JSX.Element;
|
|
15
15
|
export default ResourcesCdn;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CdnBucket } from '@plitzi/sdk-shared';
|
|
2
|
+
export type ResourcesCdnBucketProps = {
|
|
3
|
+
cdnIdentifier: string;
|
|
4
|
+
/** The CDN's provider: what a bucket's settings ask for depends on it. */
|
|
5
|
+
provider: 's3' | 'r2';
|
|
6
|
+
bucket: CdnBucket;
|
|
7
|
+
/** The folder every file of the space is kept under in its buckets. */
|
|
8
|
+
prefix: string;
|
|
9
|
+
/** The CDN changed — a bucket added, edited or removed — and its list is read again. */
|
|
10
|
+
onChange?: () => void;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* One bucket of a CDN and the space's files in it. A public one takes uploads — plugins, images, templates — and serves
|
|
14
|
+
* them at its domain; a private one keeps the space's server code, written when it is saved or pushed, and serves
|
|
15
|
+
* nothing.
|
|
16
|
+
*/
|
|
17
|
+
declare const ResourcesCdnBucket: ({ cdnIdentifier, provider, bucket, prefix, onChange }: ResourcesCdnBucketProps) => import('react').JSX.Element;
|
|
18
|
+
export default ResourcesCdnBucket;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ResourceDirectory } from './ResourcesList';
|
|
2
|
-
import { Resource } from '@plitzi/sdk-shared';
|
|
2
|
+
import { CdnVisibility, Resource } from '@plitzi/sdk-shared';
|
|
3
3
|
declare const sortDirectories: (a: ResourceDirectory, b: ResourceDirectory) => number;
|
|
4
|
-
declare const getDirectories: (prefix?: string, items?: Resource[]) => ResourceDirectory[];
|
|
4
|
+
declare const getDirectories: (prefix?: string, items?: Resource[], visibility?: CdnVisibility) => ResourceDirectory[];
|
|
5
5
|
export { getDirectories, sortDirectories };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,9 +7,10 @@ export type ResourcesDirectoryProps = {
|
|
|
7
7
|
canDrop?: boolean;
|
|
8
8
|
canRemove?: boolean;
|
|
9
9
|
cdnIdentifier: string;
|
|
10
|
+
bucketIdentifier: string;
|
|
10
11
|
onChange?: () => void;
|
|
11
12
|
onRemove?: (item: TResource) => void;
|
|
12
13
|
onRemoveDirectory?: (name?: string) => void;
|
|
13
14
|
};
|
|
14
|
-
declare const ResourceDirectory: ({ className, name, items, isDefault, canRemove, canDrop, cdnIdentifier, onChange, onRemove, onRemoveDirectory }: ResourcesDirectoryProps) => import('react').JSX.Element;
|
|
15
|
+
declare const ResourceDirectory: ({ className, name, items, isDefault, canRemove, canDrop, cdnIdentifier, bucketIdentifier, onChange, onRemove, onRemoveDirectory }: ResourcesDirectoryProps) => import('react').JSX.Element;
|
|
15
16
|
export default ResourceDirectory;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { Resource as TResource } from '@plitzi/sdk-shared';
|
|
1
|
+
import { CdnVisibility, Resource as TResource } from '@plitzi/sdk-shared';
|
|
2
2
|
export type ResourcesListProps = {
|
|
3
3
|
className?: string;
|
|
4
4
|
items: TResource[];
|
|
5
5
|
prefix: string;
|
|
6
6
|
cdnIdentifier: string;
|
|
7
|
+
bucketIdentifier: string;
|
|
8
|
+
/** A private bucket takes no upload: it lists its server code, and offers no folder to add. */
|
|
9
|
+
visibility?: CdnVisibility;
|
|
7
10
|
onChange?: () => void;
|
|
8
11
|
onRemove?: (item: TResource) => void;
|
|
9
12
|
};
|
|
@@ -14,5 +17,5 @@ export type ResourceDirectory = {
|
|
|
14
17
|
isDefault: boolean;
|
|
15
18
|
canRemove: boolean;
|
|
16
19
|
};
|
|
17
|
-
declare const ResourcesList: ({ className, prefix, items, cdnIdentifier, onChange, onRemove }: ResourcesListProps) => import('react').JSX.Element;
|
|
20
|
+
declare const ResourcesList: ({ className, prefix, items, cdnIdentifier, bucketIdentifier, visibility, onChange, onRemove }: ResourcesListProps) => import('react').JSX.Element;
|
|
18
21
|
export default ResourcesList;
|