@sveltia/cms 0.95.1 → 0.97.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltia/cms",
3
- "version": "0.95.1",
3
+ "version": "0.97.0",
4
4
  "description": "Sveltia CMS is a modern, lightweight, Git-based headless content management system.",
5
5
  "keywords": [
6
6
  "cms",
@@ -13,7 +13,7 @@
13
13
  "license": "MIT",
14
14
  "type": "module",
15
15
  "devDependencies": {
16
- "@types/react": "^19.1.9"
16
+ "@types/react": "^19.1.10"
17
17
  },
18
18
  "publishConfig": {
19
19
  "directory": "package",
@@ -182,8 +182,8 @@
182
182
  }
183
183
  ]
184
184
  },
185
- "description": "Set of collections. The list can also contain dividers, which are used to group collections in the collection list.",
186
- "markdownDescription": "Set of collections. The list can also contain dividers, which are used to group collections in the collection list."
185
+ "description": "Set of collections. The list can also contain dividers, which are used to group collections in the collection list. Either `collections` or `singletons` option must be defined.",
186
+ "markdownDescription": "Set of collections. The list can also contain dividers, which are used to group collections in the collection list. Either `collections` or `singletons` option must be defined."
187
187
  },
188
188
  "singletons": {
189
189
  "type": "array",
@@ -218,8 +218,7 @@
218
218
  },
219
219
  "required": [
220
220
  "backend",
221
- "media_folder",
222
- "collections"
221
+ "media_folder"
223
222
  ],
224
223
  "additionalProperties": false,
225
224
  "description": "Site configuration.",
@@ -2541,6 +2540,11 @@
2541
2540
  "description": "Whether to allow users to remove items from the list. Default: `true`.",
2542
2541
  "markdownDescription": "Whether to allow users to remove items from the list. Default: `true`."
2543
2542
  },
2543
+ "allow_reorder": {
2544
+ "type": "boolean",
2545
+ "description": "Whether to allow users to reorder items in the list. Default: `true`.",
2546
+ "markdownDescription": "Whether to allow users to reorder items in the list. Default: `true`."
2547
+ },
2544
2548
  "add_to_top": {
2545
2549
  "type": "boolean",
2546
2550
  "description": "Whether to add new items to the top of the list instead of the bottom. Default: `false`.",
package/types/public.d.ts CHANGED
@@ -702,6 +702,11 @@ export type ListFieldProps = {
702
702
  * `true`.
703
703
  */
704
704
  allow_remove?: boolean;
705
+ /**
706
+ * Whether to allow users to reorder items in the list. Default:
707
+ * `true`.
708
+ */
709
+ allow_reorder?: boolean;
705
710
  /**
706
711
  * Whether to add new items to the top of the list instead of the
707
712
  * bottom. Default: `false`.
@@ -1924,10 +1929,11 @@ export type SiteConfig = {
1924
1929
  */
1925
1930
  slug?: SlugOptions;
1926
1931
  /**
1927
- * Set of collections. The list can also
1928
- * contain dividers, which are used to group collections in the collection list.
1932
+ * Set of collections. The list can
1933
+ * also contain dividers, which are used to group collections in the collection list. Either
1934
+ * `collections` or `singletons` option must be defined.
1929
1935
  */
1930
- collections: (Collection | CollectionDivider)[];
1936
+ collections?: (Collection | CollectionDivider)[];
1931
1937
  /**
1932
1938
  * Set of singleton files, such as
1933
1939
  * the site configuration file or the homepage file. They are not part of any collection and can be