@sveltia/cms 0.147.2 → 0.148.1
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 +278 -276
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +278 -276
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
- package/types/public.d.ts +12 -8
package/package.json
CHANGED
package/types/public.d.ts
CHANGED
|
@@ -307,6 +307,10 @@ export type MediaLibraries = {
|
|
|
307
307
|
*/
|
|
308
308
|
stock_assets?: StockAssetMediaLibrary;
|
|
309
309
|
};
|
|
310
|
+
/**
|
|
311
|
+
* Parsed, localized entry content.
|
|
312
|
+
*/
|
|
313
|
+
export type RawEntryContent = Record<string, any>;
|
|
310
314
|
/**
|
|
311
315
|
* Common field properties that are shared among all field types.
|
|
312
316
|
*/
|
|
@@ -2490,7 +2494,7 @@ export type AppEventAuthor = {
|
|
|
2490
2494
|
/**
|
|
2491
2495
|
* Event entry media file data.
|
|
2492
2496
|
*/
|
|
2493
|
-
export type
|
|
2497
|
+
export type ApiEntryMedia = {
|
|
2494
2498
|
/**
|
|
2495
2499
|
* Media file ID.
|
|
2496
2500
|
*/
|
|
@@ -2523,7 +2527,7 @@ export type AppEventEntryMedia = {
|
|
|
2523
2527
|
/**
|
|
2524
2528
|
* Event entry data.
|
|
2525
2529
|
*/
|
|
2526
|
-
export type
|
|
2530
|
+
export type ApiEntry = {
|
|
2527
2531
|
/**
|
|
2528
2532
|
* Entry data for the default locale.
|
|
2529
2533
|
*/
|
|
@@ -2551,7 +2555,7 @@ export type AppEventEntry = {
|
|
|
2551
2555
|
/**
|
|
2552
2556
|
* List of media files associated with the entry.
|
|
2553
2557
|
*/
|
|
2554
|
-
mediaFiles:
|
|
2558
|
+
mediaFiles: ApiEntryMedia[];
|
|
2555
2559
|
/**
|
|
2556
2560
|
* Entry meta data.
|
|
2557
2561
|
*/
|
|
@@ -2596,14 +2600,14 @@ export type AppEventListener = {
|
|
|
2596
2600
|
*/
|
|
2597
2601
|
name: AppEventType;
|
|
2598
2602
|
/**
|
|
2599
|
-
* Event handler. For
|
|
2600
|
-
*
|
|
2601
|
-
*
|
|
2603
|
+
* Event handler. For the `preSave` event, the
|
|
2604
|
+
* handler can return a modified entry object in Immutable Map format to change the data before it
|
|
2605
|
+
* is saved. For other events, the return value is ignored.
|
|
2602
2606
|
*/
|
|
2603
2607
|
handler: (args: {
|
|
2604
2608
|
author: AppEventAuthor;
|
|
2605
|
-
entry: MapOf<
|
|
2606
|
-
}) => void | MapOf<
|
|
2609
|
+
entry: MapOf<ApiEntry>;
|
|
2610
|
+
}) => void | MapOf<ApiEntry> | Promise<void> | Promise<MapOf<ApiEntry>>;
|
|
2607
2611
|
};
|
|
2608
2612
|
export type CustomPreviewTemplateProps = {
|
|
2609
2613
|
entry: Record<string, any>;
|