@cloudcannon/configuration-types 0.0.10 → 0.0.12
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/build/cloudcannon-config-eleventy.json +81 -76
- package/build/cloudcannon-config-hugo.json +81 -76
- package/build/cloudcannon-config-jekyll.json +81 -76
- package/build/cloudcannon-config-reader.json +106 -104
- package/build/cloudcannon-config.json +16 -93
- package/package.json +1 -1
- package/src/build-coupled.d.ts +47 -4
- package/src/configuration.d.ts +28 -53
|
@@ -402,7 +402,7 @@
|
|
|
402
402
|
"type": "boolean"
|
|
403
403
|
},
|
|
404
404
|
"paths": {
|
|
405
|
-
"$ref": "#/definitions/
|
|
405
|
+
"$ref": "#/definitions/Paths",
|
|
406
406
|
"description": "Paths to where new asset files are uploaded to. They also set the default path when choosing existing images, and linking to existing files. Each path is relative to global `source`. Defaults to the global `paths`.",
|
|
407
407
|
"markdownDescription": "Paths to where new asset files are uploaded to. They also set the default path when choosing\nexisting images, and linking to existing files. Each path is relative to global `source`.\nDefaults to the global `paths`."
|
|
408
408
|
},
|
|
@@ -918,11 +918,6 @@
|
|
|
918
918
|
"markdownDescription": "The set of schemas for this collection. Schemas are used when creating and editing files in\nthis collection. Each entry corresponds to a schema that describes a data structure for this\ncollection.\n\nThe keys in this object should match the values used for schema_key inside each of this\ncollection's files. default is a special entry and is used when a file has no schema.",
|
|
919
919
|
"type": "object"
|
|
920
920
|
},
|
|
921
|
-
"singular_key": {
|
|
922
|
-
"description": "Overrides the default singular input key of the collection. This is used for naming conventions for select and multiselect inputs.",
|
|
923
|
-
"markdownDescription": "Overrides the default singular input key of the collection. This is used for naming conventions\nfor select and multiselect inputs.",
|
|
924
|
-
"type": "string"
|
|
925
|
-
},
|
|
926
921
|
"singular_name": {
|
|
927
922
|
"description": "Overrides the default singular display name of the collection. This is displayed in the collection add menu and file context menu.",
|
|
928
923
|
"markdownDescription": "Overrides the default singular display name of the collection. This is displayed in the\ncollection add menu and file context menu.",
|
|
@@ -1269,8 +1264,8 @@
|
|
|
1269
1264
|
},
|
|
1270
1265
|
"paths": {
|
|
1271
1266
|
"$ref": "#/definitions/Paths",
|
|
1272
|
-
"description": "
|
|
1273
|
-
"markdownDescription": "
|
|
1267
|
+
"description": "Paths to where new asset files are uploaded to. They also set the default path when choosing existing images, and linking to existing files. Each path is relative to global `source`. Defaults to the global `paths`.",
|
|
1268
|
+
"markdownDescription": "Paths to where new asset files are uploaded to. They also set the default path when choosing\nexisting images, and linking to existing files. Each path is relative to global `source`.\nDefaults to the global `paths`."
|
|
1274
1269
|
},
|
|
1275
1270
|
"source": {
|
|
1276
1271
|
"description": "Base path to your site source files, relative to the root folder.",
|
|
@@ -1345,19 +1340,6 @@
|
|
|
1345
1340
|
"DataConfigEntry": {
|
|
1346
1341
|
"additionalProperties": false,
|
|
1347
1342
|
"properties": {
|
|
1348
|
-
"parser": {
|
|
1349
|
-
"description": "Overrides the format files are read. Detected automatically from file extension if unset.",
|
|
1350
|
-
"enum": [
|
|
1351
|
-
"csv",
|
|
1352
|
-
"front-matter",
|
|
1353
|
-
"json",
|
|
1354
|
-
"properties",
|
|
1355
|
-
"toml",
|
|
1356
|
-
"yaml"
|
|
1357
|
-
],
|
|
1358
|
-
"markdownDescription": "Overrides the format files are read. Detected automatically from file extension if unset.",
|
|
1359
|
-
"type": "string"
|
|
1360
|
-
},
|
|
1361
1343
|
"path": {
|
|
1362
1344
|
"description": "The path to a file or folder of files containing data.",
|
|
1363
1345
|
"markdownDescription": "The path to a file or folder of files containing data.",
|
|
@@ -1779,7 +1761,7 @@
|
|
|
1779
1761
|
"markdownDescription": "Set how an ‘empty’ value will be saved. Does not apply to existing empty values."
|
|
1780
1762
|
},
|
|
1781
1763
|
"paths": {
|
|
1782
|
-
"$ref": "#/definitions/
|
|
1764
|
+
"$ref": "#/definitions/Paths",
|
|
1783
1765
|
"description": "Paths to where new asset files are uploaded to. They also set the default path when choosing existing images, and linking to existing files. Each path is relative to global `source`. Defaults to the global `paths`.",
|
|
1784
1766
|
"markdownDescription": "Paths to where new asset files are uploaded to. They also set the default path when choosing\nexisting images, and linking to existing files. Each path is relative to global `source`.\nDefaults to the global `paths`."
|
|
1785
1767
|
}
|
|
@@ -3953,7 +3935,7 @@
|
|
|
3953
3935
|
"type": "string"
|
|
3954
3936
|
},
|
|
3955
3937
|
"paths": {
|
|
3956
|
-
"$ref": "#/definitions/
|
|
3938
|
+
"$ref": "#/definitions/Paths",
|
|
3957
3939
|
"description": "Paths to where new asset files are uploaded to. They also set the default path when choosing existing images, and linking to existing files. Each path is relative to global `source`. Defaults to the global `paths`.",
|
|
3958
3940
|
"markdownDescription": "Paths to where new asset files are uploaded to. They also set the default path when choosing\nexisting images, and linking to existing files. Each path is relative to global `source`.\nDefaults to the global `paths`."
|
|
3959
3941
|
},
|
|
@@ -4148,7 +4130,7 @@
|
|
|
4148
4130
|
"type": "string"
|
|
4149
4131
|
},
|
|
4150
4132
|
"paths": {
|
|
4151
|
-
"$ref": "#/definitions/
|
|
4133
|
+
"$ref": "#/definitions/Paths",
|
|
4152
4134
|
"description": "Paths to where new asset files are uploaded to. They also set the default path when choosing existing images, and linking to existing files. Each path is relative to global `source`. Defaults to the global `paths`.",
|
|
4153
4135
|
"markdownDescription": "Paths to where new asset files are uploaded to. They also set the default path when choosing\nexisting images, and linking to existing files. Each path is relative to global `source`.\nDefaults to the global `paths`."
|
|
4154
4136
|
},
|
|
@@ -4306,7 +4288,7 @@
|
|
|
4306
4288
|
"additionalProperties": false,
|
|
4307
4289
|
"properties": {
|
|
4308
4290
|
"paths": {
|
|
4309
|
-
"$ref": "#/definitions/
|
|
4291
|
+
"$ref": "#/definitions/Paths",
|
|
4310
4292
|
"description": "Paths to where new asset files are uploaded to. They also set the default path when choosing existing images, and linking to existing files. Each path is relative to global `source`. Defaults to the global `paths`.",
|
|
4311
4293
|
"markdownDescription": "Paths to where new asset files are uploaded to. They also set the default path when choosing\nexisting images, and linking to existing files. Each path is relative to global `source`.\nDefaults to the global `paths`."
|
|
4312
4294
|
}
|
|
@@ -4725,7 +4707,7 @@
|
|
|
4725
4707
|
},
|
|
4726
4708
|
"quotes": {
|
|
4727
4709
|
"description": "Double + single quotes replacement pairs, when typographer enabled and smartquotes on. For example, you can use '«»„“' for Russian, '„“‚‘' for German, and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).",
|
|
4728
|
-
"markdownDescription": "Double + single quotes replacement pairs, when typographer enabled and smartquotes on. For
|
|
4710
|
+
"markdownDescription": "Double + single quotes replacement pairs, when typographer enabled and smartquotes on. For\nexample, you can use '«»„“' for Russian, '„“‚‘' for German, and ['«\\xA0', '\\xA0»', '‹\\xA0',\n'\\xA0›'] for French (including nbsp).",
|
|
4729
4711
|
"type": "string"
|
|
4730
4712
|
},
|
|
4731
4713
|
"sentence_per_line": {
|
|
@@ -5783,11 +5765,6 @@
|
|
|
5783
5765
|
"Paths": {
|
|
5784
5766
|
"additionalProperties": false,
|
|
5785
5767
|
"properties": {
|
|
5786
|
-
"collections": {
|
|
5787
|
-
"description": "Parent folder of all collections.",
|
|
5788
|
-
"markdownDescription": "Parent folder of all collections.",
|
|
5789
|
-
"type": "string"
|
|
5790
|
-
},
|
|
5791
5768
|
"dam_static": {
|
|
5792
5769
|
"default": "",
|
|
5793
5770
|
"description": "Location of statically copied assets for DAM files. This prefix will be removed from the _DAM Uploads_ path when CloudCannon outputs the URL of an asset.",
|
|
@@ -5805,21 +5782,6 @@
|
|
|
5805
5782
|
"markdownDescription": "Filename template for newly uploaded DAM files.",
|
|
5806
5783
|
"type": "string"
|
|
5807
5784
|
},
|
|
5808
|
-
"data": {
|
|
5809
|
-
"description": "Parent folder of all site data files.",
|
|
5810
|
-
"markdownDescription": "Parent folder of all site data files.",
|
|
5811
|
-
"type": "string"
|
|
5812
|
-
},
|
|
5813
|
-
"includes": {
|
|
5814
|
-
"description": "Parent folder of all includes, partials, or shortcode files. _Only applies to Jekyll, Hugo, and Eleventy sites_.",
|
|
5815
|
-
"markdownDescription": "Parent folder of all includes, partials, or shortcode files. _Only applies to Jekyll, Hugo, and\nEleventy sites_.",
|
|
5816
|
-
"type": "string"
|
|
5817
|
-
},
|
|
5818
|
-
"layouts": {
|
|
5819
|
-
"description": "Parent folder of all site layout files. _Only applies to Jekyll, Hugo, and Eleventy sites_.",
|
|
5820
|
-
"markdownDescription": "Parent folder of all site layout files. _Only applies to Jekyll, Hugo, and Eleventy sites_.",
|
|
5821
|
-
"type": "string"
|
|
5822
|
-
},
|
|
5823
5785
|
"static": {
|
|
5824
5786
|
"description": "Location of assets that are statically copied to the output site. This prefix will be removed from the _Uploads_ path when CloudCannon outputs the URL of an asset.",
|
|
5825
5787
|
"markdownDescription": "Location of assets that are statically copied to the output site. This prefix will be removed\nfrom the _Uploads_ path when CloudCannon outputs the URL of an asset.",
|
|
@@ -6103,50 +6065,6 @@
|
|
|
6103
6065
|
],
|
|
6104
6066
|
"type": "object"
|
|
6105
6067
|
},
|
|
6106
|
-
"ReducedPaths": {
|
|
6107
|
-
"additionalProperties": false,
|
|
6108
|
-
"properties": {
|
|
6109
|
-
"dam_static": {
|
|
6110
|
-
"default": "",
|
|
6111
|
-
"description": "Location of statically copied assets for DAM files. This prefix will be removed from the _DAM Uploads_ path when CloudCannon outputs the URL of an asset.",
|
|
6112
|
-
"markdownDescription": "Location of statically copied assets for DAM files. This prefix will be removed from the _DAM\nUploads_ path when CloudCannon outputs the URL of an asset.",
|
|
6113
|
-
"type": "string"
|
|
6114
|
-
},
|
|
6115
|
-
"dam_uploads": {
|
|
6116
|
-
"default": "",
|
|
6117
|
-
"description": "Default location of newly uploaded DAM files.",
|
|
6118
|
-
"markdownDescription": "Default location of newly uploaded DAM files.",
|
|
6119
|
-
"type": "string"
|
|
6120
|
-
},
|
|
6121
|
-
"dam_uploads_filename": {
|
|
6122
|
-
"description": "Filename template for newly uploaded DAM files.",
|
|
6123
|
-
"markdownDescription": "Filename template for newly uploaded DAM files.",
|
|
6124
|
-
"type": "string"
|
|
6125
|
-
},
|
|
6126
|
-
"static": {
|
|
6127
|
-
"description": "Location of assets that are statically copied to the output site. This prefix will be removed from the _Uploads_ path when CloudCannon outputs the URL of an asset.",
|
|
6128
|
-
"markdownDescription": "Location of assets that are statically copied to the output site. This prefix will be removed\nfrom the _Uploads_ path when CloudCannon outputs the URL of an asset.",
|
|
6129
|
-
"type": "string"
|
|
6130
|
-
},
|
|
6131
|
-
"uploads": {
|
|
6132
|
-
"default": "uploads",
|
|
6133
|
-
"description": "Default location of newly uploaded site files.",
|
|
6134
|
-
"markdownDescription": "Default location of newly uploaded site files.",
|
|
6135
|
-
"type": "string"
|
|
6136
|
-
},
|
|
6137
|
-
"uploads_filename": {
|
|
6138
|
-
"description": "Filename template for newly uploaded site files.",
|
|
6139
|
-
"markdownDescription": "Filename template for newly uploaded site files.",
|
|
6140
|
-
"type": "string"
|
|
6141
|
-
},
|
|
6142
|
-
"uploads_use_relative_path": {
|
|
6143
|
-
"description": "When set to true, CloudCannon will reference files relative to the path of the file they were uploaded to.",
|
|
6144
|
-
"markdownDescription": "When set to true, CloudCannon will reference files relative to the path of the file they were\nuploaded to.",
|
|
6145
|
-
"type": "boolean"
|
|
6146
|
-
}
|
|
6147
|
-
},
|
|
6148
|
-
"type": "object"
|
|
6149
|
-
},
|
|
6150
6068
|
"RichTextInput": {
|
|
6151
6069
|
"additionalProperties": false,
|
|
6152
6070
|
"properties": {
|
|
@@ -6385,7 +6303,7 @@
|
|
|
6385
6303
|
"type": "boolean"
|
|
6386
6304
|
},
|
|
6387
6305
|
"paths": {
|
|
6388
|
-
"$ref": "#/definitions/
|
|
6306
|
+
"$ref": "#/definitions/Paths",
|
|
6389
6307
|
"description": "Paths to where new asset files are uploaded to. They also set the default path when choosing existing images, and linking to existing files. Each path is relative to global `source`. Defaults to the global `paths`.",
|
|
6390
6308
|
"markdownDescription": "Paths to where new asset files are uploaded to. They also set the default path when choosing\nexisting images, and linking to existing files. Each path is relative to global `source`.\nDefaults to the global `paths`."
|
|
6391
6309
|
},
|
|
@@ -7727,7 +7645,7 @@
|
|
|
7727
7645
|
"type": "boolean"
|
|
7728
7646
|
},
|
|
7729
7647
|
"paths": {
|
|
7730
|
-
"$ref": "#/definitions/
|
|
7648
|
+
"$ref": "#/definitions/Paths",
|
|
7731
7649
|
"description": "Paths to where new asset files are uploaded to. They also set the default path when choosing existing images, and linking to existing files. Each path is relative to global `source`. Defaults to the global `paths`.",
|
|
7732
7650
|
"markdownDescription": "Paths to where new asset files are uploaded to. They also set the default path when choosing\nexisting images, and linking to existing files. Each path is relative to global `source`.\nDefaults to the global `paths`."
|
|
7733
7651
|
},
|
|
@@ -7872,6 +7790,11 @@
|
|
|
7872
7790
|
"description": "Set how an ‘empty’ value will be saved. Does not apply to existing empty values.",
|
|
7873
7791
|
"markdownDescription": "Set how an ‘empty’ value will be saved. Does not apply to existing empty values."
|
|
7874
7792
|
},
|
|
7793
|
+
"icon": {
|
|
7794
|
+
"$ref": "#/definitions/Icon",
|
|
7795
|
+
"description": "Icon shown beside the input.",
|
|
7796
|
+
"markdownDescription": "Icon shown beside the input."
|
|
7797
|
+
},
|
|
7875
7798
|
"placeholder": {
|
|
7876
7799
|
"description": "Text shown when this input has no value.",
|
|
7877
7800
|
"markdownDescription": "Text shown when this input has no value.",
|
|
@@ -8690,7 +8613,7 @@
|
|
|
8690
8613
|
"markdownDescription": "Set how an ‘empty’ value will be saved. Does not apply to existing empty values."
|
|
8691
8614
|
},
|
|
8692
8615
|
"paths": {
|
|
8693
|
-
"$ref": "#/definitions/
|
|
8616
|
+
"$ref": "#/definitions/Paths",
|
|
8694
8617
|
"description": "Paths to where new asset files are uploaded to. They also set the default path when choosing existing images, and linking to existing files. Each path is relative to global `source`. Defaults to the global `paths`.",
|
|
8695
8618
|
"markdownDescription": "Paths to where new asset files are uploaded to. They also set the default path when choosing\nexisting images, and linking to existing files. Each path is relative to global `source`.\nDefaults to the global `paths`."
|
|
8696
8619
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcannon/configuration-types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "Contains TypeScript declarations and generates JSONSchema files for the CloudCannon configuration file.",
|
|
5
5
|
"author": "CloudCannon <support@cloudcannon.com>",
|
|
6
6
|
"license": "MIT",
|
package/src/build-coupled.d.ts
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
import { CollectionConfig, Configuration,
|
|
1
|
+
import { CollectionConfig, Configuration, DataConfigEntry, Paths } from './configuration';
|
|
2
|
+
|
|
3
|
+
export interface BuildCoupledPaths extends Paths {
|
|
4
|
+
/**
|
|
5
|
+
* Parent folder of all collections.
|
|
6
|
+
*/
|
|
7
|
+
collections?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Parent folder of all site data files.
|
|
10
|
+
*/
|
|
11
|
+
data?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Parent folder of all site layout files. _Only applies to Jekyll, Hugo, and Eleventy sites_.
|
|
14
|
+
*/
|
|
15
|
+
layouts?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Parent folder of all includes, partials, or shortcode files. _Only applies to Jekyll, Hugo, and
|
|
18
|
+
* Eleventy sites_.
|
|
19
|
+
*/
|
|
20
|
+
includes?: string;
|
|
21
|
+
}
|
|
2
22
|
|
|
3
23
|
export type FilterBase = 'none' | 'all' | 'strict';
|
|
4
24
|
|
|
@@ -20,6 +40,13 @@ export interface Filter {
|
|
|
20
40
|
exclude?: string[];
|
|
21
41
|
}
|
|
22
42
|
|
|
43
|
+
interface Parseable {
|
|
44
|
+
/**
|
|
45
|
+
* Overrides the format files are read. Detected automatically from file extension if unset.
|
|
46
|
+
*/
|
|
47
|
+
parser?: 'csv' | 'front-matter' | 'json' | 'properties' | 'toml' | 'yaml';
|
|
48
|
+
}
|
|
49
|
+
|
|
23
50
|
interface Filterable {
|
|
24
51
|
/**
|
|
25
52
|
* Controls which files are displayed in the collection list. Does not change which files are
|
|
@@ -39,12 +66,20 @@ interface WithCollectionsConfigOverride {
|
|
|
39
66
|
/**
|
|
40
67
|
* The `collections_config` entry format for build-coupled non-Jekyll/Hugo/Eleventy sites.
|
|
41
68
|
*/
|
|
42
|
-
export interface ReaderCollectionConfig extends CollectionConfig, Parseable, Filterable {
|
|
69
|
+
export interface ReaderCollectionConfig extends CollectionConfig, Parseable, Filterable {
|
|
70
|
+
/**
|
|
71
|
+
* Overrides the default singular input key of the collection. This is used for naming conventions
|
|
72
|
+
* for select and multiselect inputs.
|
|
73
|
+
*/
|
|
74
|
+
singular_key?: string;
|
|
75
|
+
}
|
|
43
76
|
|
|
44
77
|
/**
|
|
45
78
|
* The configuration format for build-coupled non-Jekyll/Hugo/Eleventy sites.
|
|
46
79
|
*/
|
|
47
80
|
export interface ReaderConfiguration extends Configuration {
|
|
81
|
+
paths?: BuildCoupledPaths;
|
|
82
|
+
data_config?: Record<string, DataConfigEntry & Parseable>;
|
|
48
83
|
collections_config?: Record<string, ReaderCollectionConfig>;
|
|
49
84
|
/**
|
|
50
85
|
* Generates the integration file in another folder. Not applicable to Jekyll, Hugo, and Eleventy.
|
|
@@ -53,11 +88,19 @@ export interface ReaderConfiguration extends Configuration {
|
|
|
53
88
|
output?: string;
|
|
54
89
|
}
|
|
55
90
|
|
|
56
|
-
export interface BuildCoupledCollectionConfig extends Omit<CollectionConfig, 'url'>, Filterable {
|
|
91
|
+
export interface BuildCoupledCollectionConfig extends Omit<CollectionConfig, 'url'>, Filterable {
|
|
92
|
+
/**
|
|
93
|
+
* Overrides the default singular input key of the collection. This is used for naming conventions
|
|
94
|
+
* for select and multiselect inputs.
|
|
95
|
+
*/
|
|
96
|
+
singular_key?: string;
|
|
97
|
+
}
|
|
57
98
|
|
|
58
99
|
interface BuildCoupledConfiguration
|
|
59
100
|
extends Omit<Configuration, 'data_config'>,
|
|
60
|
-
WithCollectionsConfigOverride {
|
|
101
|
+
WithCollectionsConfigOverride {
|
|
102
|
+
paths?: BuildCoupledPaths;
|
|
103
|
+
}
|
|
61
104
|
|
|
62
105
|
/**
|
|
63
106
|
* The `collections_config` entry format for build-coupled Hugo sites.
|
package/src/configuration.d.ts
CHANGED
|
@@ -9,7 +9,13 @@ import type { Syntax } from './syntax';
|
|
|
9
9
|
export type InstanceValue = 'UUID' | 'NOW';
|
|
10
10
|
export type EditorKey = 'visual' | 'content' | 'data';
|
|
11
11
|
export type SortOrder = 'ascending' | 'descending' | 'asc' | 'desc';
|
|
12
|
-
export type AttributeListPosition =
|
|
12
|
+
export type AttributeListPosition =
|
|
13
|
+
| 'none'
|
|
14
|
+
| 'right'
|
|
15
|
+
| 'space right'
|
|
16
|
+
| 'below'
|
|
17
|
+
| 'newline below'
|
|
18
|
+
| 'right-of-prefix';
|
|
13
19
|
|
|
14
20
|
export type MarkdownAttributeElementOptions = {
|
|
15
21
|
inline?: AttributeListPosition;
|
|
@@ -40,7 +46,9 @@ export interface MarkdownSettings {
|
|
|
40
46
|
*/
|
|
41
47
|
typographer?: boolean;
|
|
42
48
|
/**
|
|
43
|
-
* Double + single quotes replacement pairs, when typographer enabled and smartquotes on. For
|
|
49
|
+
* Double + single quotes replacement pairs, when typographer enabled and smartquotes on. For
|
|
50
|
+
* example, you can use '«»„“' for Russian, '„“‚‘' for German, and ['«\xA0', '\xA0»', '‹\xA0',
|
|
51
|
+
* '\xA0›'] for French (including nbsp).
|
|
44
52
|
*/
|
|
45
53
|
quotes?: string;
|
|
46
54
|
/**
|
|
@@ -91,11 +99,11 @@ export interface MarkdownSettings {
|
|
|
91
99
|
* Save element attributes in Markdown format instead of converting to HTML.
|
|
92
100
|
*/
|
|
93
101
|
attributes?: boolean;
|
|
94
|
-
/**
|
|
102
|
+
/**
|
|
95
103
|
* Define positioning behaviour of Markdown attributes for different elements.
|
|
96
|
-
*/
|
|
104
|
+
*/
|
|
97
105
|
attribute_elements?: MarkdownAttributeElementOptions;
|
|
98
|
-
}
|
|
106
|
+
};
|
|
99
107
|
}
|
|
100
108
|
|
|
101
109
|
// TODO: use SnippetConfig from @cloudcannon/scrap-booker when ParserConfig issue resolved.
|
|
@@ -388,20 +396,20 @@ export interface BlockEditable extends ImageResizeable, TextEditable {
|
|
|
388
396
|
table?: boolean;
|
|
389
397
|
}
|
|
390
398
|
|
|
391
|
-
interface
|
|
399
|
+
interface WithPaths {
|
|
392
400
|
/**
|
|
393
401
|
* Paths to where new asset files are uploaded to. They also set the default path when choosing
|
|
394
402
|
* existing images, and linking to existing files. Each path is relative to global `source`.
|
|
395
403
|
* Defaults to the global `paths`.
|
|
396
404
|
*/
|
|
397
|
-
paths?:
|
|
405
|
+
paths?: Paths;
|
|
398
406
|
}
|
|
399
407
|
|
|
400
|
-
export interface ImageEditable extends ImageResizeable,
|
|
408
|
+
export interface ImageEditable extends ImageResizeable, WithPaths {}
|
|
401
409
|
|
|
402
|
-
export interface LinkEditable extends
|
|
410
|
+
export interface LinkEditable extends WithPaths {}
|
|
403
411
|
|
|
404
|
-
export interface TextEditable extends
|
|
412
|
+
export interface TextEditable extends WithPaths {
|
|
405
413
|
/**
|
|
406
414
|
* Enables a control to set selected text to bold.
|
|
407
415
|
*/
|
|
@@ -621,6 +629,10 @@ export interface TextInputOptions extends BaseInputOptions {
|
|
|
621
629
|
* Text shown when this input has no value.
|
|
622
630
|
*/
|
|
623
631
|
placeholder?: string;
|
|
632
|
+
/**
|
|
633
|
+
* Icon shown beside the input.
|
|
634
|
+
*/
|
|
635
|
+
icon?: Icon;
|
|
624
636
|
}
|
|
625
637
|
|
|
626
638
|
export interface TextInput extends BaseInput<TextInputOptions> {
|
|
@@ -720,7 +732,7 @@ export interface RangeInput extends BaseInput<RangeInputOptions> {
|
|
|
720
732
|
type: 'range';
|
|
721
733
|
}
|
|
722
734
|
|
|
723
|
-
export interface UrlInputOptions extends BaseInputOptions,
|
|
735
|
+
export interface UrlInputOptions extends BaseInputOptions, WithPaths {}
|
|
724
736
|
|
|
725
737
|
export interface UrlInput extends BaseInput<UrlInputOptions> {
|
|
726
738
|
type: 'range';
|
|
@@ -753,7 +765,7 @@ export interface DateInput extends BaseInput<DateInputOptions> {
|
|
|
753
765
|
type: 'date' | 'datetime';
|
|
754
766
|
}
|
|
755
767
|
|
|
756
|
-
export interface FileInputOptions extends BaseInputOptions,
|
|
768
|
+
export interface FileInputOptions extends BaseInputOptions, WithPaths {
|
|
757
769
|
/**
|
|
758
770
|
* Restricts which file types are available to select or upload to this input.
|
|
759
771
|
*/
|
|
@@ -940,7 +952,7 @@ export type Input =
|
|
|
940
952
|
| ObjectInput
|
|
941
953
|
| ArrayInput;
|
|
942
954
|
|
|
943
|
-
export interface
|
|
955
|
+
export interface Paths {
|
|
944
956
|
/**
|
|
945
957
|
* Location of assets that are statically copied to the output site. This prefix will be removed
|
|
946
958
|
* from the _Uploads_ path when CloudCannon outputs the URL of an asset.
|
|
@@ -980,26 +992,6 @@ export interface ReducedPaths {
|
|
|
980
992
|
uploads_use_relative_path?: boolean;
|
|
981
993
|
}
|
|
982
994
|
|
|
983
|
-
export interface Paths extends ReducedPaths {
|
|
984
|
-
/**
|
|
985
|
-
* Parent folder of all collections.
|
|
986
|
-
*/
|
|
987
|
-
collections?: string;
|
|
988
|
-
/**
|
|
989
|
-
* Parent folder of all site data files.
|
|
990
|
-
*/
|
|
991
|
-
data?: string;
|
|
992
|
-
/**
|
|
993
|
-
* Parent folder of all site layout files. _Only applies to Jekyll, Hugo, and Eleventy sites_.
|
|
994
|
-
*/
|
|
995
|
-
layouts?: string;
|
|
996
|
-
/**
|
|
997
|
-
* Parent folder of all includes, partials, or shortcode files. _Only applies to Jekyll, Hugo, and
|
|
998
|
-
* Eleventy sites_.
|
|
999
|
-
*/
|
|
1000
|
-
includes?: string;
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
995
|
export interface Documentation {
|
|
1004
996
|
/**
|
|
1005
997
|
* The "href" value of the link.
|
|
@@ -1277,11 +1269,6 @@ export interface CollectionConfig extends Cascade, Previewable {
|
|
|
1277
1269
|
* collection add menu and file context menu.
|
|
1278
1270
|
*/
|
|
1279
1271
|
singular_name?: string;
|
|
1280
|
-
/**
|
|
1281
|
-
* Overrides the default singular input key of the collection. This is used for naming conventions
|
|
1282
|
-
* for select and multiselect inputs.
|
|
1283
|
-
*/
|
|
1284
|
-
singular_key?: string;
|
|
1285
1272
|
/**
|
|
1286
1273
|
* Changes the options presented in the add menu in the collection file list. Defaults to an
|
|
1287
1274
|
* automatically generated list from _Schemas_, or uses the first file in the collection if no
|
|
@@ -1431,14 +1418,7 @@ export type SelectValues =
|
|
|
1431
1418
|
| Record<string, string>
|
|
1432
1419
|
| Record<string, Record<string, any>>;
|
|
1433
1420
|
|
|
1434
|
-
export interface
|
|
1435
|
-
/**
|
|
1436
|
-
* Overrides the format files are read. Detected automatically from file extension if unset.
|
|
1437
|
-
*/
|
|
1438
|
-
parser?: 'csv' | 'front-matter' | 'json' | 'properties' | 'toml' | 'yaml';
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
|
-
export interface DataConfigEntry extends Parseable {
|
|
1421
|
+
export interface DataConfigEntry {
|
|
1442
1422
|
/**
|
|
1443
1423
|
* The path to a file or folder of files containing data.
|
|
1444
1424
|
*/
|
|
@@ -1523,19 +1503,14 @@ export type SsgKey =
|
|
|
1523
1503
|
| 'nuxtjs'
|
|
1524
1504
|
| 'sphinx'
|
|
1525
1505
|
| 'static'
|
|
1526
|
-
| 'other'
|
|
1527
1506
|
| 'legacy'
|
|
1528
|
-
| '
|
|
1507
|
+
| 'other';
|
|
1529
1508
|
|
|
1530
|
-
export interface Configuration extends Cascade, WithSnippets {
|
|
1509
|
+
export interface Configuration extends Cascade, WithSnippets, WithPaths {
|
|
1531
1510
|
/**
|
|
1532
1511
|
* Base path to your site source files, relative to the root folder.
|
|
1533
1512
|
*/
|
|
1534
1513
|
source?: string;
|
|
1535
|
-
/**
|
|
1536
|
-
* Global paths to common folders.
|
|
1537
|
-
*/
|
|
1538
|
-
paths?: Paths;
|
|
1539
1514
|
/**
|
|
1540
1515
|
* Definitions for your collections, which are the sets of content files for your site grouped by
|
|
1541
1516
|
* folder. Entries are keyed by a chosen collection key, and contain configuration specific to
|