@cloudcannon/configuration-types 0.0.38 → 0.0.39

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.
@@ -147,37 +147,8 @@
147
147
  ],
148
148
  "markdownDescription": "This key defines the documentation link at the top of a _Collection browser_. Collection documentation is useful for assisting your team members."
149
149
  },
150
- "sort": {
151
- "description": "This key defines how CloudCannon sorts your Collection files when you first open your _Collection browser_.",
152
- "title": "Sort",
153
- "type": "object",
154
- "properties": {
155
- "key": {
156
- "description": "Defines what field contains the value to sort on inside each collection item's data.",
157
- "type": "string",
158
- "markdownDescription": "Defines what field contains the value to sort on inside each collection item's data."
159
- },
160
- "order": {
161
- "description": "Controls which sort values come first.",
162
- "default": "ascending",
163
- "type": "string",
164
- "enum": [
165
- "ascending",
166
- "descending",
167
- "asc",
168
- "desc"
169
- ],
170
- "markdownDescription": "Controls which sort values come first."
171
- }
172
- },
173
- "required": [
174
- "key"
175
- ],
176
- "additionalProperties": false,
177
- "markdownDescription": "This key defines how CloudCannon sorts your Collection files when you first open your _Collection browser_."
178
- },
179
150
  "sort_options": {
180
- "description": "This key defines the options for the Sort dropdown in a _Collection browser_.",
151
+ "description": "This key defines the options for the Sort dropdown in a _Collection browser_. The first option listed is used as the default sort.",
181
152
  "type": "array",
182
153
  "items": {
183
154
  "title": "SortOption",
@@ -213,7 +184,21 @@
213
184
  "additionalProperties": false,
214
185
  "markdownDescription": "A sort option for a Collection."
215
186
  },
216
- "markdownDescription": "This key defines the options for the Sort dropdown in a _Collection browser_."
187
+ "markdownDescription": "This key defines the options for the Sort dropdown in a _Collection browser_. The first option listed is used as the default sort."
188
+ },
189
+ "view_options": {
190
+ "uniqueItems": true,
191
+ "description": "This key defines the options for the View dropdown in a _Collection browser_. The first option listed is used as the default view.",
192
+ "type": "array",
193
+ "items": {
194
+ "type": "string",
195
+ "enum": [
196
+ "card",
197
+ "list",
198
+ "gallery"
199
+ ]
200
+ },
201
+ "markdownDescription": "This key defines the options for the View dropdown in a _Collection browser_. The first option listed is used as the default view."
217
202
  },
218
203
  "singular_name": {
219
204
  "description": "This key defines the singular noun for your Collection name. CloudCannon uses the singular noun in the _+ Add_ button in the top right of the _Collection browser_.",
@@ -9841,37 +9841,8 @@
9841
9841
  ],
9842
9842
  "markdownDescription": "This key defines the documentation link at the top of a _Collection browser_. Collection documentation is useful for assisting your team members."
9843
9843
  },
9844
- "sort": {
9845
- "description": "This key defines how CloudCannon sorts your Collection files when you first open your _Collection browser_.",
9846
- "title": "Sort",
9847
- "type": "object",
9848
- "properties": {
9849
- "key": {
9850
- "description": "Defines what field contains the value to sort on inside each collection item's data.",
9851
- "type": "string",
9852
- "markdownDescription": "Defines what field contains the value to sort on inside each collection item's data."
9853
- },
9854
- "order": {
9855
- "description": "Controls which sort values come first.",
9856
- "default": "ascending",
9857
- "type": "string",
9858
- "enum": [
9859
- "ascending",
9860
- "descending",
9861
- "asc",
9862
- "desc"
9863
- ],
9864
- "markdownDescription": "Controls which sort values come first."
9865
- }
9866
- },
9867
- "required": [
9868
- "key"
9869
- ],
9870
- "additionalProperties": false,
9871
- "markdownDescription": "This key defines how CloudCannon sorts your Collection files when you first open your _Collection browser_."
9872
- },
9873
9844
  "sort_options": {
9874
- "description": "This key defines the options for the Sort dropdown in a _Collection browser_.",
9845
+ "description": "This key defines the options for the Sort dropdown in a _Collection browser_. The first option listed is used as the default sort.",
9875
9846
  "type": "array",
9876
9847
  "items": {
9877
9848
  "title": "SortOption",
@@ -9907,7 +9878,21 @@
9907
9878
  "additionalProperties": false,
9908
9879
  "markdownDescription": "A sort option for a Collection."
9909
9880
  },
9910
- "markdownDescription": "This key defines the options for the Sort dropdown in a _Collection browser_."
9881
+ "markdownDescription": "This key defines the options for the Sort dropdown in a _Collection browser_. The first option listed is used as the default sort."
9882
+ },
9883
+ "view_options": {
9884
+ "uniqueItems": true,
9885
+ "description": "This key defines the options for the View dropdown in a _Collection browser_. The first option listed is used as the default view.",
9886
+ "type": "array",
9887
+ "items": {
9888
+ "type": "string",
9889
+ "enum": [
9890
+ "card",
9891
+ "list",
9892
+ "gallery"
9893
+ ]
9894
+ },
9895
+ "markdownDescription": "This key defines the options for the View dropdown in a _Collection browser_. The first option listed is used as the default view."
9911
9896
  },
9912
9897
  "singular_name": {
9913
9898
  "description": "This key defines the singular noun for your Collection name. CloudCannon uses the singular noun in the _+ Add_ button in the top right of the _Collection browser_.",
@@ -131,37 +131,8 @@
131
131
  ],
132
132
  "markdownDescription": "This key defines the documentation link at the top of a _Collection browser_. Collection documentation is useful for assisting your team members."
133
133
  },
134
- "sort": {
135
- "description": "This key defines how CloudCannon sorts your Collection files when you first open your _Collection browser_.",
136
- "title": "Sort",
137
- "type": "object",
138
- "properties": {
139
- "key": {
140
- "description": "Defines what field contains the value to sort on inside each collection item's data.",
141
- "type": "string",
142
- "markdownDescription": "Defines what field contains the value to sort on inside each collection item's data."
143
- },
144
- "order": {
145
- "description": "Controls which sort values come first.",
146
- "default": "ascending",
147
- "type": "string",
148
- "enum": [
149
- "ascending",
150
- "descending",
151
- "asc",
152
- "desc"
153
- ],
154
- "markdownDescription": "Controls which sort values come first."
155
- }
156
- },
157
- "required": [
158
- "key"
159
- ],
160
- "additionalProperties": false,
161
- "markdownDescription": "This key defines how CloudCannon sorts your Collection files when you first open your _Collection browser_."
162
- },
163
134
  "sort_options": {
164
- "description": "This key defines the options for the Sort dropdown in a _Collection browser_.",
135
+ "description": "This key defines the options for the Sort dropdown in a _Collection browser_. The first option listed is used as the default sort.",
165
136
  "type": "array",
166
137
  "items": {
167
138
  "title": "SortOption",
@@ -197,7 +168,21 @@
197
168
  "additionalProperties": false,
198
169
  "markdownDescription": "A sort option for a Collection."
199
170
  },
200
- "markdownDescription": "This key defines the options for the Sort dropdown in a _Collection browser_."
171
+ "markdownDescription": "This key defines the options for the Sort dropdown in a _Collection browser_. The first option listed is used as the default sort."
172
+ },
173
+ "view_options": {
174
+ "uniqueItems": true,
175
+ "description": "This key defines the options for the View dropdown in a _Collection browser_. The first option listed is used as the default view.",
176
+ "type": "array",
177
+ "items": {
178
+ "type": "string",
179
+ "enum": [
180
+ "card",
181
+ "list",
182
+ "gallery"
183
+ ]
184
+ },
185
+ "markdownDescription": "This key defines the options for the View dropdown in a _Collection browser_. The first option listed is used as the default view."
201
186
  },
202
187
  "singular_name": {
203
188
  "description": "This key defines the singular noun for your Collection name. CloudCannon uses the singular noun in the _+ Add_ button in the top right of the _Collection browser_.",
@@ -9841,37 +9841,8 @@
9841
9841
  ],
9842
9842
  "markdownDescription": "This key defines the documentation link at the top of a _Collection browser_. Collection documentation is useful for assisting your team members."
9843
9843
  },
9844
- "sort": {
9845
- "description": "This key defines how CloudCannon sorts your Collection files when you first open your _Collection browser_.",
9846
- "title": "Sort",
9847
- "type": "object",
9848
- "properties": {
9849
- "key": {
9850
- "description": "Defines what field contains the value to sort on inside each collection item's data.",
9851
- "type": "string",
9852
- "markdownDescription": "Defines what field contains the value to sort on inside each collection item's data."
9853
- },
9854
- "order": {
9855
- "description": "Controls which sort values come first.",
9856
- "default": "ascending",
9857
- "type": "string",
9858
- "enum": [
9859
- "ascending",
9860
- "descending",
9861
- "asc",
9862
- "desc"
9863
- ],
9864
- "markdownDescription": "Controls which sort values come first."
9865
- }
9866
- },
9867
- "required": [
9868
- "key"
9869
- ],
9870
- "additionalProperties": false,
9871
- "markdownDescription": "This key defines how CloudCannon sorts your Collection files when you first open your _Collection browser_."
9872
- },
9873
9844
  "sort_options": {
9874
- "description": "This key defines the options for the Sort dropdown in a _Collection browser_.",
9845
+ "description": "This key defines the options for the Sort dropdown in a _Collection browser_. The first option listed is used as the default sort.",
9875
9846
  "type": "array",
9876
9847
  "items": {
9877
9848
  "title": "SortOption",
@@ -9907,7 +9878,21 @@
9907
9878
  "additionalProperties": false,
9908
9879
  "markdownDescription": "A sort option for a Collection."
9909
9880
  },
9910
- "markdownDescription": "This key defines the options for the Sort dropdown in a _Collection browser_."
9881
+ "markdownDescription": "This key defines the options for the Sort dropdown in a _Collection browser_. The first option listed is used as the default sort."
9882
+ },
9883
+ "view_options": {
9884
+ "uniqueItems": true,
9885
+ "description": "This key defines the options for the View dropdown in a _Collection browser_. The first option listed is used as the default view.",
9886
+ "type": "array",
9887
+ "items": {
9888
+ "type": "string",
9889
+ "enum": [
9890
+ "card",
9891
+ "list",
9892
+ "gallery"
9893
+ ]
9894
+ },
9895
+ "markdownDescription": "This key defines the options for the View dropdown in a _Collection browser_. The first option listed is used as the default view."
9911
9896
  },
9912
9897
  "singular_name": {
9913
9898
  "description": "This key defines the singular noun for your Collection name. CloudCannon uses the singular noun in the _+ Add_ button in the top right of the _Collection browser_.",
@@ -138,37 +138,8 @@
138
138
  ],
139
139
  "markdownDescription": "This key defines the documentation link at the top of a _Collection browser_. Collection documentation is useful for assisting your team members."
140
140
  },
141
- "sort": {
142
- "description": "This key defines how CloudCannon sorts your Collection files when you first open your _Collection browser_.",
143
- "title": "Sort",
144
- "type": "object",
145
- "properties": {
146
- "key": {
147
- "description": "Defines what field contains the value to sort on inside each collection item's data.",
148
- "type": "string",
149
- "markdownDescription": "Defines what field contains the value to sort on inside each collection item's data."
150
- },
151
- "order": {
152
- "description": "Controls which sort values come first.",
153
- "default": "ascending",
154
- "type": "string",
155
- "enum": [
156
- "ascending",
157
- "descending",
158
- "asc",
159
- "desc"
160
- ],
161
- "markdownDescription": "Controls which sort values come first."
162
- }
163
- },
164
- "required": [
165
- "key"
166
- ],
167
- "additionalProperties": false,
168
- "markdownDescription": "This key defines how CloudCannon sorts your Collection files when you first open your _Collection browser_."
169
- },
170
141
  "sort_options": {
171
- "description": "This key defines the options for the Sort dropdown in a _Collection browser_.",
142
+ "description": "This key defines the options for the Sort dropdown in a _Collection browser_. The first option listed is used as the default sort.",
172
143
  "type": "array",
173
144
  "items": {
174
145
  "title": "SortOption",
@@ -204,7 +175,21 @@
204
175
  "additionalProperties": false,
205
176
  "markdownDescription": "A sort option for a Collection."
206
177
  },
207
- "markdownDescription": "This key defines the options for the Sort dropdown in a _Collection browser_."
178
+ "markdownDescription": "This key defines the options for the Sort dropdown in a _Collection browser_. The first option listed is used as the default sort."
179
+ },
180
+ "view_options": {
181
+ "uniqueItems": true,
182
+ "description": "This key defines the options for the View dropdown in a _Collection browser_. The first option listed is used as the default view.",
183
+ "type": "array",
184
+ "items": {
185
+ "type": "string",
186
+ "enum": [
187
+ "card",
188
+ "list",
189
+ "gallery"
190
+ ]
191
+ },
192
+ "markdownDescription": "This key defines the options for the View dropdown in a _Collection browser_. The first option listed is used as the default view."
208
193
  },
209
194
  "singular_name": {
210
195
  "description": "This key defines the singular noun for your Collection name. CloudCannon uses the singular noun in the _+ Add_ button in the top right of the _Collection browser_.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudcannon/configuration-types",
3
- "version": "0.0.38",
3
+ "version": "0.0.39",
4
4
  "type": "module",
5
5
  "description": "Contains TypeScript declarations and generates JSONSchema files for the CloudCannon configuration file.",
6
6
  "author": "CloudCannon <support@cloudcannon.com>",
@@ -202,13 +202,18 @@ export const CollectionConfigSchema = z
202
202
  description:
203
203
  'This key defines the documentation link at the top of a _Collection browser_. Collection documentation is useful for assisting your team members.',
204
204
  }),
205
- sort: SortSchema.optional().meta({
206
- description:
207
- 'This key defines how CloudCannon sorts your Collection files when you first open your _Collection browser_.',
208
- }),
209
205
  sort_options: z.array(SortOptionSchema).optional().meta({
210
- description: 'This key defines the options for the Sort dropdown in a _Collection browser_.',
206
+ description:
207
+ 'This key defines the options for the Sort dropdown in a _Collection browser_. The first option listed is used as the default sort.',
211
208
  }),
209
+ view_options: z
210
+ .array(z.enum(['card', 'list', 'gallery']))
211
+ .optional()
212
+ .meta({
213
+ uniqueItems: true,
214
+ description:
215
+ 'This key defines the options for the View dropdown in a _Collection browser_. The first option listed is used as the default view.',
216
+ }),
212
217
  singular_name: z.string().optional().meta({
213
218
  description:
214
219
  'This key defines the singular noun for your Collection name. CloudCannon uses the singular noun in the _+ Add_ button in the top right of the _Collection browser_.',