@plitzi/plitzi-builder 0.37.6 → 0.37.8

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.
Files changed (26) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/dist/modules/Builder/Models/TemplateForm.d.ts +9 -9
  3. package/dist/modules/Functions/components/FunctionsOffer/FunctionsOffer.d.ts +1 -1
  4. package/dist/modules/Resources/Models/CdnAccountFields.d.ts +7 -0
  5. package/dist/modules/Resources/Models/CdnBucketFields.d.ts +10 -0
  6. package/dist/modules/Resources/Models/ResourceCdnAccountForm.d.ts +21 -0
  7. package/dist/modules/Resources/Models/ResourceCdnBucketForm.d.ts +28 -0
  8. package/dist/modules/Resources/Models/ResourceCdnForm.d.ts +13 -28
  9. package/dist/modules/Resources/Models/cdnSchemas.d.ts +34 -0
  10. package/dist/modules/Resources/components/Resource/Resource.d.ts +2 -1
  11. package/dist/modules/Resources/components/Resource/subTypes/ResourceServerCode/ResourceServerCode.d.ts +3 -3
  12. package/dist/modules/Resources/components/ResourceManager/ResourceManager.d.ts +3 -1
  13. package/dist/modules/Resources/components/ResourceManager/TemporalResource.d.ts +2 -1
  14. package/dist/modules/Resources/components/ResourcesCdn/ResourcesCdn.d.ts +6 -6
  15. package/dist/modules/Resources/components/ResourcesCdnBucket/ResourcesCdnBucket.d.ts +18 -0
  16. package/dist/modules/Resources/components/ResourcesCdnBucket/index.d.ts +3 -0
  17. package/dist/modules/Resources/components/ResourcesList/ListHelper.d.ts +2 -2
  18. package/dist/modules/Resources/components/ResourcesList/ListHelper.test.d.ts +1 -0
  19. package/dist/modules/Resources/components/ResourcesList/ResourceDirectory.d.ts +2 -1
  20. package/dist/modules/Resources/components/ResourcesList/ResourcesList.d.ts +5 -2
  21. package/dist/package.json.d.ts +1 -1
  22. package/dist/plitzi-builder.css +1 -1
  23. package/dist/plitzi-builder.css.gz +0 -0
  24. package/dist/plitzi-builder.js +1263 -1250
  25. package/dist/plitzi-builder.js.gz +0 -0
  26. package/package.json +15 -15
package/CHANGELOG.md CHANGED
@@ -1,5 +1,73 @@
1
1
  # @plitzi/plitzi-builder
2
2
 
3
+ ## 0.37.8
4
+
5
+ ### Patch Changes
6
+
7
+ - 4d10e0a: ## Fixed: an api container could not read a file from a CDN
8
+
9
+ - **What happened:** the api container sent `Content-Type: application/json` on every request, including a GET with no
10
+ body to describe. That made every read a non-simple cross-origin request, so the browser asked the host's
11
+ permission first.
12
+ - **Who it hit:** hosts that allow plain cross-origin reads (GET and HEAD from any origin, the usual CORS of a public
13
+ bucket, the space's own CDN among them) refused that preflight. The file never loaded. Tremor's world outlines on
14
+ `cdn-dev.plitzi.com` are one example.
15
+ - **What changes:** a read now sends `Accept: application/json`, and `Content-Type` goes only with a body, unless the
16
+ author set their own. Headers the author adds still make the request non-simple, as they must.
17
+
18
+ - Updated dependencies [4d10e0a]
19
+ - @plitzi/sdk-auth@0.37.8
20
+ - @plitzi/sdk-authoring@0.37.8
21
+ - @plitzi/sdk-dev-tools@0.37.8
22
+ - @plitzi/sdk-elements@0.37.8
23
+ - @plitzi/sdk-event-bridge@0.37.8
24
+ - @plitzi/sdk-interactions@0.37.8
25
+ - @plitzi/sdk-navigation@0.37.8
26
+ - @plitzi/sdk-plugins@0.37.8
27
+ - @plitzi/sdk-schema@0.37.8
28
+ - @plitzi/sdk-shared@0.37.8
29
+ - @plitzi/sdk-style@0.37.8
30
+ - @plitzi/sdk-variables@0.37.8
31
+ - @plitzi/plitzi-sdk@0.37.8
32
+
33
+ ## 0.37.7
34
+
35
+ ### Patch Changes
36
+
37
+ - 4d10e0a: ## CDNs with several buckets
38
+
39
+ A CDN is the customer's own storage account — S3 or R2, which they run and pay for — and now holds any number of
40
+ buckets, each with its own configuration: its name at the provider, its region, `public` (served at its domain) or
41
+ `private` (no domain, read only by the platform with the CDN's credential).
42
+
43
+ - `Cdn` carries `buckets: CdnBucket[]`; `domain`, `visibility`, `bucketName` and `region` moved from the CDN to its
44
+ buckets. `Resource.bucketIdentifier` names the bucket a file is in.
45
+ - `SpaceAddCdn(name, provider, endpoint, buckets)` creates the account with its buckets; `SpaceUpdateCdn` changes the
46
+ account only. New `SpaceAddCdnBucket`, `SpaceUpdateCdnBucket` and `SpaceRemoveCdnBucket`.
47
+ - `SpaceResources`, `SpaceAddResource`, `SpaceRemoveResource` and `SpaceMoveResource` take `bucketIdentifier`.
48
+ - Server code — functions and runtime — goes in the space's oldest private bucket. A bucket that keeps code a version
49
+ runs can be neither made public, pointed at another bucket nor removed, and neither can its CDN.
50
+ - Builder: Resources shows each CDN with its buckets — add, edit and remove buckets, upload and browse per bucket; the
51
+ account (name, provider, endpoint, credential) is edited apart. Saving an element as a template picks a public
52
+ bucket (`elementAsTemplate({ cdnIdentifier, bucketIdentifier }, …)`).
53
+ - CLI: `plitzi upload plugin --bucket <identifier>` (with `--cdn` to narrow); only public buckets are offered, a private
54
+ one is refused.
55
+
56
+ - Updated dependencies [4d10e0a]
57
+ - @plitzi/sdk-auth@0.37.7
58
+ - @plitzi/sdk-authoring@0.37.7
59
+ - @plitzi/sdk-dev-tools@0.37.7
60
+ - @plitzi/sdk-elements@0.37.7
61
+ - @plitzi/sdk-event-bridge@0.37.7
62
+ - @plitzi/sdk-interactions@0.37.7
63
+ - @plitzi/sdk-navigation@0.37.7
64
+ - @plitzi/sdk-plugins@0.37.7
65
+ - @plitzi/sdk-schema@0.37.7
66
+ - @plitzi/sdk-shared@0.37.7
67
+ - @plitzi/sdk-style@0.37.7
68
+ - @plitzi/sdk-variables@0.37.7
69
+ - @plitzi/plitzi-sdk@0.37.7
70
+
3
71
  ## 0.37.6
4
72
 
5
73
  ### Patch Changes
@@ -1,16 +1,16 @@
1
- import { z } from 'zod';
2
1
  import { MouseEvent } from 'react';
3
- declare const templateFormSchema: z.ZodObject<{
4
- name: z.ZodString;
5
- description: z.ZodOptional<z.ZodString>;
6
- cdnIdentifier: z.ZodString;
7
- }, z.core.$strip>;
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: z.infer<typeof templateFormSchema>) => void;
13
+ onSubmit?: (e: MouseEvent | undefined, values: TemplateFormValues) => void;
14
14
  };
15
- declare const TemplateForm: ({ name, description, cdnIdentifier, onSubmit, onClose }: TemplateFormProps) => import('react').JSX.Element;
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 CDN to
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
- declare const resourceCdnFormSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5
- provider: z.ZodLiteral<"s3">;
6
- name: z.ZodString;
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
- visibility: z.ZodEnum<{
19
- public: "public";
20
- private: "private";
13
+ provider: z.ZodEnum<{
14
+ s3: "s3";
15
+ r2: "r2";
21
16
  }>;
22
- domain: z.ZodString;
23
- region: z.ZodDefault<z.ZodString>;
24
- endpoint: z.ZodString;
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: z.infer<typeof resourceCdnFormSchema>) => void;
22
+ onSubmit?: (e: MouseEvent | undefined, values: ResourceCdnFormValues) => void;
38
23
  };
39
- declare const ResourceCdnForm: ({ name, domain, visibility, provider, region, endpoint, bucketName, onSubmit, onClose }: ResourceCdnFormProps) => import('react').JSX.Element;
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 on its private CDN — its functions or its runtime, kept by saves and pushes and
13
- * named by what it holds. No preview and no address: a private CDN serves nothing. What it shows is which versions run
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 — what its settings open with. */
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
- declare const ResourcesCdn: ({ cdn, identifier, name, prefix, credentialIdentifier, isCollapsed, onCollapse, onChange, onRemove }: ResourcesCdnProps) => import('react').JSX.Element;
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;
@@ -0,0 +1,3 @@
1
+ import { default as ResourcesCdnBucket } from './ResourcesCdnBucket';
2
+ export * from './ResourcesCdnBucket';
3
+ 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 };
@@ -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;
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "@plitzi/plitzi-builder",
3
- "version": "0.37.6",
3
+ "version": "0.37.8",
4
4
  "homepage": "./",
5
5
  "license": "AGPL-3.0",
6
6
  "files": [