@cloudcannon/configuration-types 0.0.22 → 0.0.24
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 +9347 -0
- package/dist/cloudcannon-config.legacy-eleventy.schema.json +9446 -0
- package/dist/cloudcannon-config.legacy-hugo.schema.json +9453 -0
- package/dist/cloudcannon-config.legacy-jekyll.schema.json +9446 -0
- package/dist/cloudcannon-config.legacy-reader.schema.json +9499 -0
- package/dist/cloudcannon-config.schema.json +78 -8680
- package/package.json +58 -47
- package/src/build-coupled.d.ts +97 -13
- package/src/cascade.d.ts +37 -0
- package/src/cloudcannon-config.schema.json +79 -0
- package/src/configuration.d.ts +384 -1471
- package/src/documentation.d.ts +18 -0
- package/src/editables.d.ts +238 -0
- package/src/image-resizeable.d.ts +65 -0
- package/src/index.d.ts +14 -6
- package/src/inputs.d.ts +1286 -0
- package/src/markdown.d.ts +1 -1
- package/src/paths.d.ts +44 -0
- package/src/preview.d.ts +102 -0
- package/src/select-values.d.ts +6 -0
- package/src/snippets.d.ts +227 -0
- package/src/source-editor.d.ts +86 -0
- package/src/structures.d.ts +113 -0
- package/src/mime-type.d.ts +0 -434
- package/src/syntax.d.ts +0 -172
- package/src/theme.d.ts +0 -39
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Icon } from './icon';
|
|
2
|
+
|
|
3
|
+
export interface Documentation {
|
|
4
|
+
/**
|
|
5
|
+
* The "href" value of the link.
|
|
6
|
+
*/
|
|
7
|
+
url: string;
|
|
8
|
+
/**
|
|
9
|
+
* The visible text used in the link.
|
|
10
|
+
*/
|
|
11
|
+
text?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The icon displayed next to the link.
|
|
14
|
+
*
|
|
15
|
+
* @default auto_stories
|
|
16
|
+
*/
|
|
17
|
+
icon?: Icon;
|
|
18
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import type { ImageResizeable } from './image-resizeable';
|
|
2
|
+
import type { WithPaths } from './paths';
|
|
3
|
+
|
|
4
|
+
export interface Editables {
|
|
5
|
+
/**
|
|
6
|
+
* Contains input options for the Content Editor.
|
|
7
|
+
*/
|
|
8
|
+
content?: BlockEditable;
|
|
9
|
+
/**
|
|
10
|
+
* Contains input options for block Editable Regions.
|
|
11
|
+
*/
|
|
12
|
+
block?: BlockEditable;
|
|
13
|
+
/**
|
|
14
|
+
* Contains input options for link Editable Regions.
|
|
15
|
+
*/
|
|
16
|
+
link?: LinkEditable;
|
|
17
|
+
/**
|
|
18
|
+
* Contains input options for image Editable Regions.
|
|
19
|
+
*/
|
|
20
|
+
image?: ImageEditable;
|
|
21
|
+
/**
|
|
22
|
+
* Contains input options for text Editable Regions.
|
|
23
|
+
*/
|
|
24
|
+
text?: TextEditable;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface BlockEditable extends ImageResizeable, TextEditable {
|
|
28
|
+
/**
|
|
29
|
+
* Enables a control to wrap blocks of text in block quotes.
|
|
30
|
+
*
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
blockquote?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Enables a control to insert an unordered list, or to convert selected blocks of text into a
|
|
36
|
+
* unordered list.
|
|
37
|
+
*
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
bulletedlist?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Enables a control to center align text by toggling a class name for a block of text. The value
|
|
43
|
+
* is the class name the editor should add to align the text. The styles for this class need to be
|
|
44
|
+
* listed in the `styles` file to take effect outside of the input.
|
|
45
|
+
*/
|
|
46
|
+
center?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Enables a control to create an inline code element, containing any selected text.
|
|
49
|
+
*
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
code_inline?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Enables a control to insert a code block.
|
|
55
|
+
*
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
code_block?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Enables both block and inline code controls: `code_block` and `code_inline`.
|
|
61
|
+
*
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
code?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Enables a control to insert a region of raw HTML, including YouTube, Vimeo, Tweets, and other
|
|
67
|
+
* media. Embedded content is sanitized to mitigate XSS risks, which includes removing style tags.
|
|
68
|
+
* Embeds containing script tags are not loaded in the editor.
|
|
69
|
+
*
|
|
70
|
+
* @default false
|
|
71
|
+
*/
|
|
72
|
+
embed?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Enables a drop down menu for structured text. Has options for "p", "h1", "h2", "h3", "h4",
|
|
75
|
+
* "h5", "h6". Set as space separated options (e.g. "p h1 h2").
|
|
76
|
+
*
|
|
77
|
+
* @default p h1 h2 h3 h4 h5 h6
|
|
78
|
+
*/
|
|
79
|
+
format?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Enables a control to insert a horizontal rule.
|
|
82
|
+
*
|
|
83
|
+
* @default false
|
|
84
|
+
*/
|
|
85
|
+
horizontalrule?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Enables a control to insert an image. The image can be uploaded, existing or an external link.
|
|
88
|
+
*
|
|
89
|
+
* @default true
|
|
90
|
+
*/
|
|
91
|
+
image?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Enables a control to increase indentation for numbered and unordered lists.
|
|
94
|
+
*
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
indent?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Enables a control to justify text by toggling a class name for a block of text. The value is
|
|
100
|
+
* the class name the editor should add to justify the text. The styles for this class need to be
|
|
101
|
+
* listed in the `styles` file to take effect outside of the input.
|
|
102
|
+
*/
|
|
103
|
+
justify?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Enables a control to left align text by toggling a class name for a block of text. The value is
|
|
106
|
+
* the class name the editor should add to align the text. The styles for this class need to be
|
|
107
|
+
* listed in the `styles` file to take effect outside of the input.
|
|
108
|
+
*/
|
|
109
|
+
left?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Enables a control to insert a numbered list, or to convert selected blocks of text into a
|
|
112
|
+
* numbered list.
|
|
113
|
+
*
|
|
114
|
+
* @default true
|
|
115
|
+
*/
|
|
116
|
+
numberedlist?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Enables a control to reduce indentation for numbered and unordered lists.
|
|
119
|
+
*
|
|
120
|
+
* @default false
|
|
121
|
+
*/
|
|
122
|
+
outdent?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Enables a control to right align text by toggling a class name for a block of text. The value
|
|
125
|
+
* is the class name the editor should add to align the text. The styles for this class need to be
|
|
126
|
+
* listed in the `styles` file to take effect outside of the input.
|
|
127
|
+
*/
|
|
128
|
+
right?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Enables a control to insert snippets, if any are available.
|
|
131
|
+
*
|
|
132
|
+
* @default true
|
|
133
|
+
*/
|
|
134
|
+
snippet?: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Enables a drop down menu for editors to style selected text or blocks or text. Styles are the
|
|
137
|
+
* combination of an element and class name. The value for this option is the path (either source
|
|
138
|
+
* or build output) to the CSS file containing the styles.
|
|
139
|
+
*/
|
|
140
|
+
styles?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Enables a control to insert a table. Further options for table cells are available in the
|
|
143
|
+
* context menu for cells within the editor.
|
|
144
|
+
*
|
|
145
|
+
* @default false
|
|
146
|
+
*/
|
|
147
|
+
table?: boolean;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export type ImageEditable = ImageResizeable & WithPaths;
|
|
151
|
+
|
|
152
|
+
export type LinkEditable = WithPaths;
|
|
153
|
+
|
|
154
|
+
export interface TextEditable extends WithPaths {
|
|
155
|
+
/**
|
|
156
|
+
* Enables a control to set selected text to bold.
|
|
157
|
+
*
|
|
158
|
+
* @default true
|
|
159
|
+
*/
|
|
160
|
+
bold?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Enables a control to copy formatting from text to other text. Only applies to formatting from
|
|
163
|
+
* `bold`, `italic`, `underline`, `strike`, `subscript`, and `superscript`. Does not copy other
|
|
164
|
+
* styles or formatting.
|
|
165
|
+
*
|
|
166
|
+
* @default false
|
|
167
|
+
*/
|
|
168
|
+
copyformatting?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Enables a control to italicize selected text.
|
|
171
|
+
*
|
|
172
|
+
* @default true
|
|
173
|
+
*/
|
|
174
|
+
italic?: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Enables a control to create hyperlinks around selected text.
|
|
177
|
+
*
|
|
178
|
+
* @default true
|
|
179
|
+
*/
|
|
180
|
+
link?: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* Enables a control to redo recent edits undone with undo. Redo is always enabled through
|
|
183
|
+
* standard OS-specific keyboard shortcuts.
|
|
184
|
+
*
|
|
185
|
+
* @default false
|
|
186
|
+
*/
|
|
187
|
+
redo?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Enables the control to remove formatting from text. Applies to formatting from `bold`,
|
|
190
|
+
* `italic`, `underline`, `strike`, `subscript`, and `superscript`. Does not remove other styles
|
|
191
|
+
* or formatting.
|
|
192
|
+
*
|
|
193
|
+
* @default true
|
|
194
|
+
*/
|
|
195
|
+
removeformat?: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* Enables a control to strike selected text.
|
|
198
|
+
*
|
|
199
|
+
* @default false
|
|
200
|
+
*/
|
|
201
|
+
strike?: boolean;
|
|
202
|
+
/**
|
|
203
|
+
* Enables a control to set selected text to subscript.
|
|
204
|
+
*
|
|
205
|
+
* @default false
|
|
206
|
+
*/
|
|
207
|
+
subscript?: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Enables a control to set selected text to superscript.
|
|
210
|
+
*
|
|
211
|
+
* @default false
|
|
212
|
+
*/
|
|
213
|
+
superscript?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Enables a control to underline selected text.
|
|
216
|
+
*
|
|
217
|
+
* @default false
|
|
218
|
+
*/
|
|
219
|
+
underline?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Enables a control to undo recent edits. Undo is always enabled through standard OS-specific
|
|
222
|
+
* keyboard shortcuts.
|
|
223
|
+
*
|
|
224
|
+
* @default false
|
|
225
|
+
*/
|
|
226
|
+
undo?: boolean;
|
|
227
|
+
/**
|
|
228
|
+
* Defines if the content should be stripped of "custom markup". It is recommended to have this
|
|
229
|
+
* option turned on once you have all of your rich text options configured. Having
|
|
230
|
+
* `allow_custom_markup` turned on disables this option. Defaults to false.
|
|
231
|
+
*/
|
|
232
|
+
remove_custom_markup?: boolean;
|
|
233
|
+
/**
|
|
234
|
+
* Defines if the content can contain "custom markup". It is not recommended to have this option
|
|
235
|
+
* turned on. Defaults to true for non-content editable regions, false otherwise.
|
|
236
|
+
*/
|
|
237
|
+
allow_custom_markup?: boolean;
|
|
238
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export interface ImageResizeable {
|
|
2
|
+
/**
|
|
3
|
+
* Sets the format images are converted to prior to upload. The extension of the file is updated
|
|
4
|
+
* to match. Defaults to keeping the mime type of the uploaded file.
|
|
5
|
+
*/
|
|
6
|
+
mime_type?: 'image/jpeg' | 'image/png' | 'image/webp';
|
|
7
|
+
/**
|
|
8
|
+
* Sets how uploaded image files are resized with a bounding box defined by width and height prior
|
|
9
|
+
* to upload. Has no effect when selecting existing images, or if width and height are unset.
|
|
10
|
+
*
|
|
11
|
+
* @default contain
|
|
12
|
+
*/
|
|
13
|
+
resize_style?: 'cover' | 'contain' | 'stretch' | 'crop';
|
|
14
|
+
/**
|
|
15
|
+
* Defines the width of the bounding box used in the image resizing process defined with
|
|
16
|
+
* resize_style.
|
|
17
|
+
*/
|
|
18
|
+
width?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Defines the height of the bounding box used in the image resizing process defined with
|
|
21
|
+
* resize_style.
|
|
22
|
+
*/
|
|
23
|
+
height?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Controls whether or not images can be upscaled to fit the bounding box during resize prior to
|
|
26
|
+
* upload. Has no effect if files are not resized.
|
|
27
|
+
*
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
expandable?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Instructs the editor to save `width` and `height` attributes on the image elements. This can
|
|
33
|
+
* prevent pop-in as a page loads.
|
|
34
|
+
*
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
image_size_attributes?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* If you have one or more DAMs connected to your site, you can use this key to list which asset
|
|
40
|
+
* sources can be uploaded to and selected from.
|
|
41
|
+
*/
|
|
42
|
+
allowed_sources?: string[];
|
|
43
|
+
/**
|
|
44
|
+
* Enable to skip the image resizing process configured for this input when selecting existing
|
|
45
|
+
* images.
|
|
46
|
+
*
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
prevent_resize_existing_files?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Definitions for creating additional images of different sizes when uploading or selecting
|
|
52
|
+
* existing files.
|
|
53
|
+
*/
|
|
54
|
+
sizes?: {
|
|
55
|
+
/**
|
|
56
|
+
* A number suffixed with "x" (relative size) or "w" (fixed width) for setting the dimensions of
|
|
57
|
+
* the image (e.g. 2x, 3x, 100w, 360w).
|
|
58
|
+
*/
|
|
59
|
+
size: string;
|
|
60
|
+
/**
|
|
61
|
+
* A reference to another input that is given the path to this additional image file.
|
|
62
|
+
*/
|
|
63
|
+
target?: string;
|
|
64
|
+
}[];
|
|
65
|
+
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
+
export type * from './build-coupled';
|
|
2
|
+
export type * from './cascade';
|
|
3
|
+
export type * from './configuration';
|
|
4
|
+
export type * from './documentation';
|
|
5
|
+
export type * from './editables';
|
|
1
6
|
export type * from './icon';
|
|
2
|
-
export type * from './
|
|
3
|
-
export type * from './
|
|
4
|
-
export type * from './theme';
|
|
5
|
-
export type * from './syntax';
|
|
7
|
+
export type * from './image-resizeable';
|
|
8
|
+
export type * from './inputs';
|
|
6
9
|
export type * from './markdown';
|
|
7
|
-
export type * from './
|
|
8
|
-
export type * from './
|
|
10
|
+
export type * from './paths';
|
|
11
|
+
export type * from './preview';
|
|
12
|
+
export type * from './select-values';
|
|
13
|
+
export type * from './snippets';
|
|
14
|
+
export type * from './source-editor';
|
|
15
|
+
export type * from './structures';
|
|
16
|
+
export type * from './timezone';
|
|
9
17
|
|
|
10
18
|
export type SsgKey =
|
|
11
19
|
| 'hugo'
|