@myissue/vue-website-page-builder 3.5.63 → 3.5.64
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 +23 -1
- package/dist/style.css +1 -1
- package/dist/vue-website-page-builder.js +12685 -10558
- package/dist/vue-website-page-builder.umd.cjs +75 -73
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -330,11 +330,17 @@ export declare class PageBuilderService {
|
|
|
330
330
|
private activeBuilderSessionToken;
|
|
331
331
|
private canvasClickCaptureListener;
|
|
332
332
|
private canvasDblClickCaptureListener;
|
|
333
|
+
/** Bumped when TipTap opens (or other work must cancel in-flight selection/autosave). */
|
|
334
|
+
private persistenceGeneration;
|
|
333
335
|
private elementsWithListeners;
|
|
334
336
|
private translate;
|
|
335
337
|
constructor(pageBuilderStateStore: ReturnType<typeof usePageBuilderStateStore>);
|
|
336
338
|
private isDebugEnabled;
|
|
337
339
|
private debugLog;
|
|
340
|
+
private isInlineTipTapActive;
|
|
341
|
+
private invalidatePendingPersistence;
|
|
342
|
+
private debugPreview;
|
|
343
|
+
private debugFindFirstHistoryDiff;
|
|
338
344
|
/**
|
|
339
345
|
* Returns the active builder canvas element.
|
|
340
346
|
* Prefer the editor canvas marker to avoid collisions with host-rendered
|
|
@@ -607,15 +613,19 @@ export declare class PageBuilderService {
|
|
|
607
613
|
* Selects an editable builder element and syncs builder state.
|
|
608
614
|
* @param {HTMLElement} element - The element to select.
|
|
609
615
|
* @param {boolean} shouldAutoSave - Whether to autosave after selection.
|
|
616
|
+
* Defaults to false: clicking/selecting must not inflate undo history.
|
|
617
|
+
* Pass true only when the caller knows the DOM was edited.
|
|
610
618
|
* @returns {Promise<void>}
|
|
611
619
|
*/
|
|
612
620
|
selectEditableElement(element: HTMLElement, shouldAutoSave?: boolean): Promise<void>;
|
|
613
621
|
private getHistoryBaseKey;
|
|
614
622
|
private initializeHistory;
|
|
623
|
+
getHistorySnapshots(): unknown[];
|
|
615
624
|
/**
|
|
616
625
|
* Triggers an auto-save of the current page builder content to local storage if enabled.
|
|
626
|
+
* @param expectedPersistenceGeneration - When set, abort if TipTap open invalidated pending work.
|
|
617
627
|
*/
|
|
618
|
-
handleAutoSave: () => Promise<void>;
|
|
628
|
+
handleAutoSave: (expectedPersistenceGeneration?: number) => Promise<void>;
|
|
619
629
|
/**
|
|
620
630
|
* Manually saves the current page builder content to local storage.
|
|
621
631
|
*/
|
|
@@ -816,6 +826,8 @@ export declare class PageBuilderService {
|
|
|
816
826
|
* @private
|
|
817
827
|
*/
|
|
818
828
|
private deleteAllComponentsFromDOM;
|
|
829
|
+
private restoreHistoryStateAtIndex;
|
|
830
|
+
restoreHistoryIndex(index: number): Promise<void>;
|
|
819
831
|
undo(): Promise<void>;
|
|
820
832
|
redo(): Promise<void>;
|
|
821
833
|
private hasVisibleContent;
|
|
@@ -932,6 +944,8 @@ export declare class PageBuilderService {
|
|
|
932
944
|
generateFullPageHtml(): Promise<string>;
|
|
933
945
|
/**
|
|
934
946
|
* Saves the current DOM state of components to local storage.
|
|
947
|
+
* Never snapshots while TipTap is open — callers must commit TipTap first,
|
|
948
|
+
* then save after the editor flag/host attributes are cleared.
|
|
935
949
|
* @private
|
|
936
950
|
*/
|
|
937
951
|
private saveDomComponentsToLocalStorage;
|
|
@@ -952,6 +966,14 @@ export declare class PageBuilderService {
|
|
|
952
966
|
handleFormSubmission(options?: {
|
|
953
967
|
preservePageSettings?: boolean;
|
|
954
968
|
}): Promise<void>;
|
|
969
|
+
/**
|
|
970
|
+
* Builds pageSettings for draft/history persistence from the live canvas.
|
|
971
|
+
*
|
|
972
|
+
* Normalizes class token order and reads only the style *attribute* (never
|
|
973
|
+
* `style.cssText`), so Vue `:class` / `:style` re-renders do not invent
|
|
974
|
+
* undo-history diffs on every click/save.
|
|
975
|
+
*/
|
|
976
|
+
private buildPageSettingsForPersistence;
|
|
955
977
|
/**
|
|
956
978
|
* Reads the current page settings.
|
|
957
979
|
* Prioritises the live #pagebuilder element (always current) and falls back to localStorage.
|