@sveltia/cms 0.74.1 → 0.76.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/README.md +52 -22
- package/dist/sveltia-cms.js +201 -201
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +199 -199
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +2 -2
- package/types/public.d.ts +38 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltia/cms",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.76.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"provenance": true
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@types/react": "^19.1.
|
|
16
|
+
"@types/react": "^19.1.4"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist",
|
package/types/public.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type MediaLibraryName = "default" | "cloudinary" | "uploadcare" | "stock_
|
|
|
16
16
|
/**
|
|
17
17
|
* Supported raster image format.
|
|
18
18
|
*/
|
|
19
|
-
export type RasterImageFormat = "avif" | "
|
|
19
|
+
export type RasterImageFormat = "avif" | "gif" | "jpeg" | "png" | "webp";
|
|
20
20
|
/**
|
|
21
21
|
* Supported vector image format.
|
|
22
22
|
*/
|
|
@@ -264,6 +264,12 @@ export type MediaFieldProps = {
|
|
|
264
264
|
* Default value. Accepts a file path or complete URL.
|
|
265
265
|
*/
|
|
266
266
|
default?: string;
|
|
267
|
+
/**
|
|
268
|
+
* File types that the field should accept. The value would be a
|
|
269
|
+
* comma-separated list of unique file type specifiers, the format used for the HTML `accept`
|
|
270
|
+
* attribute: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/accept.
|
|
271
|
+
*/
|
|
272
|
+
accept?: string;
|
|
267
273
|
/**
|
|
268
274
|
* Whether to show the URL input UI. Default: `true`.
|
|
269
275
|
*/
|
|
@@ -1028,6 +1034,14 @@ export type I18nOptions = {
|
|
|
1028
1034
|
key: string;
|
|
1029
1035
|
value: string;
|
|
1030
1036
|
};
|
|
1037
|
+
/**
|
|
1038
|
+
* Whether to exclude the default locale
|
|
1039
|
+
* from entry filenames. Default: `false`. This option applies to entry collections with the
|
|
1040
|
+
* `multiple_files` i18n structure enabled, as well as to file collection items with the `file` path
|
|
1041
|
+
* ending with `.{{locale}}.<extension>`, aiming to support Zola’s multilingual sites:
|
|
1042
|
+
* https://www.getzola.org/documentation/content/multilingual/.
|
|
1043
|
+
*/
|
|
1044
|
+
omit_default_locale_from_filename?: boolean;
|
|
1031
1045
|
};
|
|
1032
1046
|
/**
|
|
1033
1047
|
* Single file in a file collection.
|
|
@@ -1049,6 +1063,28 @@ export type CollectionFile = {
|
|
|
1049
1063
|
* Set of fields to be included in the file.
|
|
1050
1064
|
*/
|
|
1051
1065
|
fields: Field[];
|
|
1066
|
+
/**
|
|
1067
|
+
* Internal media folder path for the collection. This overrides
|
|
1068
|
+
* the global or collection-level `media_folder` option.
|
|
1069
|
+
*/
|
|
1070
|
+
media_folder?: string;
|
|
1071
|
+
/**
|
|
1072
|
+
* Public media folder path for an entry collection. This
|
|
1073
|
+
* overrides the global or collection-level `public_folder` option. Default: `media_folder` option
|
|
1074
|
+
* value.
|
|
1075
|
+
*/
|
|
1076
|
+
public_folder?: string;
|
|
1077
|
+
/**
|
|
1078
|
+
* File format. This overrides the collection-level `format` option.
|
|
1079
|
+
* Default: `yaml-frontmatter`.
|
|
1080
|
+
*/
|
|
1081
|
+
format?: FileFormat;
|
|
1082
|
+
/**
|
|
1083
|
+
* Delimiters to be used for the front matter
|
|
1084
|
+
* format. This overrides the collection-level `frontmatter_delimiter` option. Default: depends on
|
|
1085
|
+
* the front matter type.
|
|
1086
|
+
*/
|
|
1087
|
+
frontmatter_delimiter?: string | string[];
|
|
1052
1088
|
/**
|
|
1053
1089
|
* I18n options. Default: `false`.
|
|
1054
1090
|
*/
|
|
@@ -1316,7 +1352,7 @@ export type Collection = {
|
|
|
1316
1352
|
format?: FileFormat;
|
|
1317
1353
|
/**
|
|
1318
1354
|
* Delimiters to be used for the front matter
|
|
1319
|
-
* format.
|
|
1355
|
+
* format. Default: depends on the front matter type.
|
|
1320
1356
|
*/
|
|
1321
1357
|
frontmatter_delimiter?: string | string[];
|
|
1322
1358
|
/**
|