@jsonpages/core 1.0.4 → 1.0.5

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 CHANGED
@@ -56,6 +56,10 @@ 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;
59
63
  /** Trigger Bake HTML (same as ControlBar). */
60
64
  onExportHTML?: () => void;
61
65
  /** Trigger Export JSON (same as ControlBar). */
@@ -280,6 +284,8 @@ export declare interface PageRendererProps {
280
284
  export declare interface PersistenceConfig {
281
285
  exportJSON: (state: ProjectState, slug: string) => Promise<void>;
282
286
  exportHTML: (state: ProjectState, slug: string, cleanHtml: string) => void;
287
+ /** If provided, flushes in-memory /uploaded-assets/ blobs to disk and returns oldUrl -> newUrl map. Used before persisting to localStorage so reload shows images from disk. */
288
+ flushUploadedAssets?: (urls: string[]) => Promise<Record<string, string>>;
283
289
  }
284
290
 
285
291
  export declare const PreviewEntry: default_2.FC;