@sveltia/cms 0.64.0 → 0.65.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.64.0",
3
+ "version": "0.65.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
package/types/public.d.ts CHANGED
@@ -91,6 +91,23 @@ export type UploadcareMediaLibrary = {
91
91
  * Supported media library.
92
92
  */
93
93
  export type MediaLibrary = DefaultMediaLibrary | CloudinaryMediaLibrary | UploadcareMediaLibrary;
94
+ /**
95
+ * Unified media library option that supports multiple libraries.
96
+ */
97
+ export type MediaLibraries = {
98
+ /**
99
+ * Options for the built-in media library.
100
+ */
101
+ default?: DefaultMediaLibrary;
102
+ /**
103
+ * Options for the Cloudinary media library.
104
+ */
105
+ cloudinary?: CloudinaryMediaLibrary;
106
+ /**
107
+ * Options for the Uploadcare media library.
108
+ */
109
+ uploadcare?: UploadcareMediaLibrary;
110
+ };
94
111
  /**
95
112
  * Common field properties.
96
113
  */
@@ -176,10 +193,15 @@ export type MediaFieldProps = {
176
193
  */
177
194
  public_folder?: string;
178
195
  /**
179
- * Media library options for the
180
- * field. Default: global `media_library` value.
196
+ * Legacy media library option
197
+ * that allows only one library. Use `media_libraries` to support multiple libraries.
181
198
  */
182
199
  media_library?: MediaLibrary & FieldMediaLibraryOptions;
200
+ /**
201
+ * Unified media library option that supports multiple
202
+ * libraries.
203
+ */
204
+ media_libraries?: MediaLibraries;
183
205
  /**
184
206
  * Whether to enable multiple item selection in an external
185
207
  * media library. Default: `true`.
@@ -1494,9 +1516,16 @@ export type SiteConfig = {
1494
1516
  */
1495
1517
  public_folder?: string;
1496
1518
  /**
1497
- * Media library options.
1519
+ * Legacy media library option
1520
+ * that allows only one library. This overrides the global `media_library` option. Use
1521
+ * `media_libraries` to support multiple libraries.
1498
1522
  */
1499
1523
  media_library?: MediaLibrary & GlobalMediaLibraryOptions;
1524
+ /**
1525
+ * Unified media library option that supports multiple
1526
+ * libraries. This overrides the global `media_libraries` option.
1527
+ */
1528
+ media_libraries?: MediaLibraries;
1500
1529
  /**
1501
1530
  * Site URL. Default: `location.origin`.
1502
1531
  */