@sveltia/cms 0.129.5 → 0.140.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
@@ -692,6 +692,14 @@ export type KeyValueFieldProps = {
692
692
  * Label for the value column. Default: Value.
693
693
  */
694
694
  value_label?: string;
695
+ /**
696
+ * Whether to save the field value at the top-level of the data file
697
+ * without the field name. If the `single_file` i18n structure is enabled, the key-value pairs will
698
+ * still be saved under locale keys. Default: `false`. See the
699
+ * [documentation](https://sveltiacms.app/en/docs/fields/keyvalue#top-level-key-value-pairs) for
700
+ * details.
701
+ */
702
+ root?: boolean;
695
703
  };
696
704
  /**
697
705
  * KeyValue field definition.
@@ -1237,7 +1245,7 @@ export type Field = StandardField | CustomField;
1237
1245
  /**
1238
1246
  * Internationalization (i18n) file structure type.
1239
1247
  */
1240
- export type I18nFileStructure = "single_file" | "multiple_files" | "multiple_folders" | "multiple_folders_i18n_root";
1248
+ export type I18nFileStructure = "single_file" | "multiple_files" | "multiple_folders" | "multiple_folders_i18n_root" | "multiple_root_folders";
1241
1249
  /**
1242
1250
  * Global, collection-level or collection file-level i18n options. See the
1243
1251
  * [documentation](https://sveltiacms.app/en/docs/i18n) for details.
@@ -1245,7 +1253,8 @@ export type I18nFileStructure = "single_file" | "multiple_files" | "multiple_fol
1245
1253
  export type I18nOptions = {
1246
1254
  /**
1247
1255
  * File structure for entry collections. File/singleton
1248
- * collection must define the structure using `{{locale}}` in the `file` option. See the
1256
+ * collection must define the structure using `{{locale}}` in the `file` option.
1257
+ * `multiple_folders_i18n_root` has been deprecated in favor of `multiple_root_folders`. See the
1249
1258
  * [documentation](https://sveltiacms.app/en/docs/i18n#managing-content-structure) for details.
1250
1259
  */
1251
1260
  structure: I18nFileStructure;
@@ -1291,8 +1300,22 @@ export type I18nOptions = {
1291
1300
  * `multiple_files` i18n structure enabled, as well as to file/singleton collection items with the
1292
1301
  * `file` path ending with `.{{locale}}.<extension>`, aiming to support [Zola’s multilingual
1293
1302
  * sites](https://www.getzola.org/documentation/content/multilingual/).
1303
+ * @deprecated Use the `omit_default_locale_from_file_path` option instead.
1294
1304
  */
1295
1305
  omit_default_locale_from_filename?: boolean;
1306
+ /**
1307
+ * Whether to exclude the default locale
1308
+ * from entry file paths. Default: `false`. This option applies to both entry collections and file
1309
+ * collections, where the path includes a `{{locale}}.` or `{{locale}}/` placeholder. It aims to
1310
+ * support [Zola’s multilingual sites](https://www.getzola.org/documentation/content/multilingual/).
1311
+ */
1312
+ omit_default_locale_from_file_path?: boolean;
1313
+ /**
1314
+ * Whether to exclude the default locale
1315
+ * from preview URL paths. Default: `false`. This option helps to create cleaner URLs for the
1316
+ * default locale when generating preview links for multilingual content.
1317
+ */
1318
+ omit_default_locale_from_preview_path?: boolean;
1296
1319
  };
1297
1320
  /**
1298
1321
  * Single file in a file/singleton collection.