@jsonpages/core 1.0.11 → 1.0.12

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
@@ -60,6 +60,8 @@ declare interface AdminSidebarProps {
60
60
  onExportHTML?: () => void;
61
61
  /** Trigger Export JSON (same as ControlBar). */
62
62
  onExportJSON?: () => void;
63
+ /** Optional: save to repo (e.g. GitHub). When provided, "Salva su repo" is shown. */
64
+ onSaveToRepo?: () => void;
63
65
  /** Restore page from file (resets in-memory draft for current slug). Hidden by default; set showResetToFile to display. */
64
66
  onResetToFile?: () => void;
65
67
  /** When true, shows the "Ripristina da file" button (default false = hidden). */
@@ -280,6 +282,8 @@ export declare interface PageRendererProps {
280
282
  export declare interface PersistenceConfig {
281
283
  exportJSON: (state: ProjectState, slug: string) => Promise<void>;
282
284
  exportHTML: (state: ProjectState, slug: string, cleanHtml: string) => void;
285
+ /** Optional: save state to remote (e.g. Git repo). When provided, "Salva su repo" is shown. */
286
+ saveToRepo?: (state: ProjectState, slug: string) => Promise<void>;
283
287
  /**
284
288
  * Optional. If provided, flushes in-memory /uploaded-assets/ blobs to disk and returns oldUrl -> newUrl map.
285
289
  * Omit when uploads write directly to disk (e.g. public/assets/images) and section data already stores final URLs.