@cloudcannon/configuration-types 0.0.37 → 0.0.38
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/dist/cloudcannon-config.latest.schema.json +9352 -10957
- package/dist/cloudcannon-config.legacy-eleventy.schema.json +9476 -11075
- package/dist/cloudcannon-config.legacy-hugo.schema.json +9424 -11028
- package/dist/cloudcannon-config.legacy-jekyll.schema.json +9476 -11075
- package/dist/cloudcannon-config.legacy-reader.schema.json +5882 -7489
- package/package.json +19 -21
- package/src/build-coupled.ts +295 -0
- package/src/cascade.ts +38 -0
- package/src/configuration.ts +421 -0
- package/src/documentation.ts +22 -0
- package/src/editables.ts +243 -0
- package/src/icon.ts +3597 -0
- package/src/image-options.ts +72 -0
- package/src/index.ts +40 -0
- package/src/inputs.ts +993 -0
- package/src/markdown.ts +97 -0
- package/src/mimetype.ts +445 -0
- package/src/paths.ts +43 -0
- package/src/preview.ts +125 -0
- package/src/select-values.ts +26 -0
- package/src/snippets.ts +113 -0
- package/src/source-editor.ts +68 -0
- package/src/structures.ts +120 -0
- package/src/syntax.ts +183 -0
- package/src/timezone.ts +607 -0
- package/src/build-coupled.d.ts +0 -315
- package/src/cascade.d.ts +0 -37
- package/src/cloudcannon-config.schema.json +0 -79
- package/src/configuration.d.ts +0 -750
- package/src/documentation.d.ts +0 -18
- package/src/editables.d.ts +0 -252
- package/src/icon.d.ts +0 -3585
- package/src/image-resizeable.d.ts +0 -65
- package/src/index.d.ts +0 -36
- package/src/inputs.d.ts +0 -1647
- package/src/javascript-api.d.ts +0 -204
- package/src/markdown.d.ts +0 -103
- package/src/paths.d.ts +0 -44
- package/src/preview.d.ts +0 -110
- package/src/select-values.d.ts +0 -6
- package/src/snippets.d.ts +0 -227
- package/src/source-editor.d.ts +0 -92
- package/src/structures.d.ts +0 -113
- package/src/timezone.d.ts +0 -596
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
|
|
3
|
+
export const ImageOptionsSchema = z.object({
|
|
4
|
+
mime_type: z.enum(['image/jpeg', 'image/png', 'image/webp']).optional().meta({
|
|
5
|
+
id: 'mime_type',
|
|
6
|
+
title: 'Mime Type',
|
|
7
|
+
description:
|
|
8
|
+
'Sets the format images are converted to prior to upload. The extension of the file is updated to match. Defaults to keeping the mime type of the uploaded file.',
|
|
9
|
+
}),
|
|
10
|
+
resize_style: z.enum(['cover', 'contain', 'stretch', 'crop']).default('contain').optional().meta({
|
|
11
|
+
id: 'resize_style',
|
|
12
|
+
title: 'Resize Style',
|
|
13
|
+
description:
|
|
14
|
+
'Sets how uploaded image files are resized with a bounding box defined by width and height prior to upload. Has no effect when selecting existing images, or if width and height are unset.',
|
|
15
|
+
}),
|
|
16
|
+
width: z.number().optional().meta({
|
|
17
|
+
id: 'width',
|
|
18
|
+
title: 'Width',
|
|
19
|
+
description:
|
|
20
|
+
'Defines the width of the bounding box used in the image resizing process defined with resize_style.',
|
|
21
|
+
}),
|
|
22
|
+
height: z.number().optional().meta({
|
|
23
|
+
id: 'height',
|
|
24
|
+
title: 'Height',
|
|
25
|
+
description:
|
|
26
|
+
'Defines the height of the bounding box used in the image resizing process defined with resize_style.',
|
|
27
|
+
}),
|
|
28
|
+
expandable: z.boolean().default(false).optional().meta({
|
|
29
|
+
id: 'expandable',
|
|
30
|
+
title: 'Expandable',
|
|
31
|
+
description:
|
|
32
|
+
'Controls whether or not images can be upscaled to fit the bounding box during resize prior to upload. Has no effect if files are not resized.',
|
|
33
|
+
}),
|
|
34
|
+
image_size_attributes: z.boolean().default(true).optional().meta({
|
|
35
|
+
id: 'image_size_attributes',
|
|
36
|
+
title: 'Image Size Attributes',
|
|
37
|
+
description:
|
|
38
|
+
'Instructs the editor to save `width` and `height` attributes on the image elements. This can prevent pop-in as a page loads.',
|
|
39
|
+
}),
|
|
40
|
+
allowed_sources: z.array(z.string()).optional().meta({
|
|
41
|
+
id: 'allowed_sources',
|
|
42
|
+
title: 'Allowed Sources',
|
|
43
|
+
description:
|
|
44
|
+
'If you have one or more DAMs connected to your site, you can use this key to list which asset sources can be uploaded to and selected from.',
|
|
45
|
+
}),
|
|
46
|
+
prevent_resize_existing_files: z.boolean().default(false).optional().meta({
|
|
47
|
+
id: 'prevent_resize_existing_files',
|
|
48
|
+
title: 'Prevent Resize Existing Files',
|
|
49
|
+
description:
|
|
50
|
+
'Enable to skip the image resizing process configured for this input when selecting existing images.',
|
|
51
|
+
}),
|
|
52
|
+
sizes: z
|
|
53
|
+
.array(
|
|
54
|
+
z.object({
|
|
55
|
+
size: z.string().meta({
|
|
56
|
+
description:
|
|
57
|
+
'A number suffixed with "x" (relative size) or "w" (fixed width) for setting the dimensions of the image (e.g. 2x, 3x, 100w, 360w).',
|
|
58
|
+
}),
|
|
59
|
+
target: z.string().optional().meta({
|
|
60
|
+
description:
|
|
61
|
+
'A reference to another input that is given the path to this additional image file.',
|
|
62
|
+
}),
|
|
63
|
+
})
|
|
64
|
+
)
|
|
65
|
+
.optional()
|
|
66
|
+
.meta({
|
|
67
|
+
id: 'sizes',
|
|
68
|
+
title: 'Sizes',
|
|
69
|
+
description:
|
|
70
|
+
'Definitions for creating additional images of different sizes when uploading or selecting existing files.',
|
|
71
|
+
}),
|
|
72
|
+
});
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
|
|
3
|
+
export * from './build-coupled';
|
|
4
|
+
export * from './cascade';
|
|
5
|
+
export * from './configuration';
|
|
6
|
+
export * from './documentation';
|
|
7
|
+
export * from './editables';
|
|
8
|
+
export * from './icon';
|
|
9
|
+
export * from './image-options';
|
|
10
|
+
export * from './inputs';
|
|
11
|
+
export * from './markdown';
|
|
12
|
+
export * from './paths';
|
|
13
|
+
export * from './preview';
|
|
14
|
+
export * from './select-values';
|
|
15
|
+
export * from './snippets';
|
|
16
|
+
export * from './source-editor';
|
|
17
|
+
export * from './structures';
|
|
18
|
+
export * from './timezone';
|
|
19
|
+
|
|
20
|
+
export const SsgKeySchema = z.enum([
|
|
21
|
+
'hugo',
|
|
22
|
+
'jekyll',
|
|
23
|
+
'eleventy',
|
|
24
|
+
'astro',
|
|
25
|
+
'lume',
|
|
26
|
+
'mkdocs',
|
|
27
|
+
'nextjs',
|
|
28
|
+
'sveltekit',
|
|
29
|
+
'bridgetown',
|
|
30
|
+
'docusaurus',
|
|
31
|
+
'gatsby',
|
|
32
|
+
'hexo',
|
|
33
|
+
'nuxtjs',
|
|
34
|
+
'sphinx',
|
|
35
|
+
'static',
|
|
36
|
+
'legacy',
|
|
37
|
+
'other',
|
|
38
|
+
]);
|
|
39
|
+
|
|
40
|
+
export type SsgKey = z.infer<typeof SsgKeySchema>;
|