@jsonpages/core 1.0.8 → 1.0.11
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/index.d.ts +5 -6
- package/dist/jsonpages-core.js +3156 -3238
- package/dist/jsonpages-core.umd.cjs +39 -39
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -56,15 +56,11 @@ declare interface AdminSidebarProps {
|
|
|
56
56
|
onAddSection?: () => void;
|
|
57
57
|
/** Whether there are unsaved changes (disables Bake HTML / Export JSON when false). */
|
|
58
58
|
hasChanges?: boolean;
|
|
59
|
-
/** Autosave to localStorage when on (default on). When off, draft is not persisted automatically. */
|
|
60
|
-
autosaveEnabled?: boolean;
|
|
61
|
-
/** Called when user toggles autosave. */
|
|
62
|
-
onAutosaveChange?: (enabled: boolean) => void;
|
|
63
59
|
/** Trigger Bake HTML (same as ControlBar). */
|
|
64
60
|
onExportHTML?: () => void;
|
|
65
61
|
/** Trigger Export JSON (same as ControlBar). */
|
|
66
62
|
onExportJSON?: () => void;
|
|
67
|
-
/** Restore page from file (
|
|
63
|
+
/** Restore page from file (resets in-memory draft for current slug). Hidden by default; set showResetToFile to display. */
|
|
68
64
|
onResetToFile?: () => void;
|
|
69
65
|
/** When true, shows the "Ripristina da file" button (default false = hidden). */
|
|
70
66
|
showResetToFile?: boolean;
|
|
@@ -284,7 +280,10 @@ export declare interface PageRendererProps {
|
|
|
284
280
|
export declare interface PersistenceConfig {
|
|
285
281
|
exportJSON: (state: ProjectState, slug: string) => Promise<void>;
|
|
286
282
|
exportHTML: (state: ProjectState, slug: string, cleanHtml: string) => void;
|
|
287
|
-
/**
|
|
283
|
+
/**
|
|
284
|
+
* Optional. If provided, flushes in-memory /uploaded-assets/ blobs to disk and returns oldUrl -> newUrl map.
|
|
285
|
+
* Omit when uploads write directly to disk (e.g. public/assets/images) and section data already stores final URLs.
|
|
286
|
+
*/
|
|
288
287
|
flushUploadedAssets?: (urls: string[]) => Promise<Record<string, string>>;
|
|
289
288
|
}
|
|
290
289
|
|