@myissue/vue-website-page-builder 3.5.55 → 3.5.57

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
@@ -325,6 +325,12 @@ export declare class PageBuilderService {
325
325
  constructor(pageBuilderStateStore: ReturnType<typeof usePageBuilderStateStore>);
326
326
  private isDebugEnabled;
327
327
  private debugLog;
328
+ /**
329
+ * Returns the active builder canvas element.
330
+ * Prefer the editor canvas marker to avoid collisions with host-rendered
331
+ * published HTML that may also contain #pagebuilder.
332
+ */
333
+ private getBuilderCanvasElement;
328
334
  /**
329
335
  * Returns an array of available languages.
330
336
  * @returns {AvailableLanguage[]} An array of available language codes.
@@ -424,6 +430,11 @@ export declare class PageBuilderService {
424
430
  */
425
431
  private applyElementClassChanges;
426
432
  private removeElementClassesFromArray;
433
+ /**
434
+ * During Page Design editing, keep runtime config pageSettings aligned with the
435
+ * live #pagebuilder wrapper so Vue re-renders do not restore stale styles.
436
+ */
437
+ private syncGlobalPageSettingsIntoRuntimeConfig;
427
438
  /**
428
439
  * Removes all CSS classes from the main page builder container.
429
440
  * @returns {Promise<void>}
@@ -894,6 +905,12 @@ export declare class PageBuilderService {
894
905
  * @private
895
906
  */
896
907
  private cloneAndRemoveSelectionAttributes;
908
+ /**
909
+ * Returns section elements to persist from #pagebuilder.
910
+ * Prefer sections with data-componentid, but fall back to top-level sections
911
+ * so close/reopen cannot wipe content when ids are temporarily missing.
912
+ */
913
+ private getPersistableSections;
897
914
  /**
898
915
  * Syncs the current DOM state of components to the in-memory store.
899
916
  * @private
@@ -913,16 +930,22 @@ export declare class PageBuilderService {
913
930
  private removeCurrentComponentsFromLocalStorage;
914
931
  /**
915
932
  * Handles the form submission process, clearing local storage and the DOM.
916
- * Global page settings (classes / inline styles on the page wrapper) are
917
- * intentionally preserved so they survive a "remove all components" action.
933
+ * By default, global page settings (classes / inline styles on the wrapper)
934
+ * are preserved so they survive a "remove all components" action.
935
+ *
936
+ * Pass `{ preservePageSettings: false }` when starting a brand-new resource
937
+ * after submit, so wrapper classes/styles are reset.
918
938
  * @returns {Promise<void>}
919
939
  */
920
- handleFormSubmission(): Promise<void>;
940
+ handleFormSubmission(options?: {
941
+ preservePageSettings?: boolean;
942
+ }): Promise<void>;
921
943
  /**
922
944
  * Reads the current page settings.
923
945
  * Prioritises the live #pagebuilder element (always current) and falls back to localStorage.
924
946
  */
925
947
  private readCurrentPageSettings;
948
+ private readPersistedPageSettingsFromLocalStorage;
926
949
  /** Applies captured global page classes/styles to the page wrapper once. */
927
950
  private applyPageSettingsToPage;
928
951
  /** Reconnects the global-styles MutationObserver after a Vue remount replaces nodes. */