@sveltia/cms 0.157.0 → 0.158.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/types/public.d.ts CHANGED
@@ -1370,23 +1370,25 @@ export type Field = StandardField | CustomField;
1370
1370
  /**
1371
1371
  * Internationalization (i18n) file structure type.
1372
1372
  */
1373
- export type I18nFileStructure = "single_file" | "single_file_flat_default" | "multiple_files" | "multiple_folders" | "multiple_folders_i18n_root" | "multiple_root_folders";
1373
+ export type I18nFileStructure = "single_file" | "single_file_default_root" | "multiple_files" | "multiple_folders" | "multiple_folders_i18n_root" | "multiple_root_folders";
1374
1374
  /**
1375
1375
  * Global, collection-level or collection file-level i18n options. See the
1376
1376
  * [documentation](https://sveltiacms.app/en/docs/i18n) for details.
1377
1377
  */
1378
1378
  export type I18nOptions = {
1379
1379
  /**
1380
- * File structure for entry collections. File/singleton
1381
- * collection must define the structure using `{{locale}}` in the `file` option.
1382
- * `multiple_folders_i18n_root` has been deprecated in favor of `multiple_root_folders`. See the
1380
+ * File structure for entry collections. **Required for
1381
+ * the global i18n options**. File/singleton collection must define the structure using `{{locale}}`
1382
+ * in the `file` option. `multiple_folders_i18n_root` has been deprecated in favor of
1383
+ * `multiple_root_folders`. See the
1383
1384
  * [documentation](https://sveltiacms.app/en/docs/i18n#managing-content-structure) for details.
1384
1385
  */
1385
- structure: I18nFileStructure;
1386
+ structure?: I18nFileStructure;
1386
1387
  /**
1387
- * List of all available locales.
1388
+ * List of all available locales. **Required for the global i18n
1389
+ * options**.
1388
1390
  */
1389
- locales: LocaleCode[];
1391
+ locales?: LocaleCode[];
1390
1392
  /**
1391
1393
  * Default locale. Default: first locale in the `locales`
1392
1394
  * option.
@@ -1865,6 +1867,16 @@ export type EntryCollectionProps = {
1865
1867
  * Default: `true`.
1866
1868
  */
1867
1869
  duplicate?: boolean;
1870
+ /**
1871
+ * Whether to allow users to reorder entries in the
1872
+ * collection. Default: `false`. If set to `true`, entries can be reordered with a drag-and-drop UI,
1873
+ * and the numeric order starting from 1 is saved in an automatically generated `order` field. If an
1874
+ * object with a `key` property is provided, e.g. `{ key: 'weight' }`, the specified field is used
1875
+ * to save the order instead of the default `order` field.
1876
+ */
1877
+ reorder?: boolean | {
1878
+ key: string;
1879
+ };
1868
1880
  /**
1869
1881
  * File extension. Default: `md`.
1870
1882
  */