@sveltia/cms 0.157.1 → 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/dist/sveltia-cms.js +208 -208
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +130 -130
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/sveltia-cms.json +1 -1
- package/types/public.d.ts +18 -6
package/types/public.d.ts
CHANGED
|
@@ -1377,16 +1377,18 @@ export type I18nFileStructure = "single_file" | "single_file_default_root" | "mu
|
|
|
1377
1377
|
*/
|
|
1378
1378
|
export type I18nOptions = {
|
|
1379
1379
|
/**
|
|
1380
|
-
* File structure for entry collections.
|
|
1381
|
-
* collection must define the structure using `{{locale}}`
|
|
1382
|
-
* `multiple_folders_i18n_root` has been deprecated in favor of
|
|
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
|
|
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
|
|
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
|
*/
|