@myissue/vue-website-page-builder 3.5.48 → 3.5.51

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
@@ -102,6 +102,8 @@ declare interface BuildProductSectionStyleOptions {
102
102
  cardStyle?: ProductCardStyle;
103
103
  roundedImages?: boolean;
104
104
  openInNewTab?: boolean;
105
+ buttonStyle?: ProductButtonStyle;
106
+ roundedButtons?: boolean;
105
107
  hidePrice?: boolean;
106
108
  hideImage?: boolean;
107
109
  hideButton?: boolean;
@@ -153,6 +155,10 @@ export declare interface InsertProductsOptions {
153
155
  roundedImages?: boolean;
154
156
  /** Adds target="_blank" rel="noopener noreferrer" to product links */
155
157
  openInNewTab?: boolean;
158
+ /** Product CTA appearance: plain text link or button style */
159
+ buttonStyle?: ProductButtonStyle;
160
+ /** Applies rounded/full corners when CTA button style is enabled */
161
+ roundedButtons?: boolean;
156
162
  /** Hides price and compare-at price when product data includes them */
157
163
  hidePrice?: boolean;
158
164
  /** Hides product photos when product data includes images */
@@ -307,11 +313,17 @@ export declare class PageBuilderService {
307
313
  private _pendingPageSettings;
308
314
  private _lastKnownPageSettings;
309
315
  private isPageBuilderMissingOnStart;
316
+ private hasCompletedBuilderMount;
317
+ private builderWasMountedBeforeClose;
318
+ private builderMountPromise;
319
+ private activeBuilderSessionToken;
310
320
  private canvasClickCaptureListener;
311
321
  private canvasDblClickCaptureListener;
312
322
  private elementsWithListeners;
313
323
  private translate;
314
324
  constructor(pageBuilderStateStore: ReturnType<typeof usePageBuilderStateStore>);
325
+ private isDebugEnabled;
326
+ private debugLog;
315
327
  /**
316
328
  * Returns an array of available languages.
317
329
  * @returns {AvailableLanguage[]} An array of available language codes.
@@ -364,12 +376,30 @@ export declare class PageBuilderService {
364
376
  * @returns {Promise<StartBuilderResult>} A result object indicating success or failure.
365
377
  */
366
378
  startBuilder(config: PageBuilderConfig, passedComponentsArray?: BuilderResourceData): Promise<StartBuilderResult>;
379
+ /**
380
+ * Whether PageBuilder.vue should run deferred mount on mount (DOM was missing at startBuilder).
381
+ *
382
+ * @param ownCanvas - The component's own #pagebuilder element (passed from PageBuilder.vue ref).
383
+ * Using this instead of document.querySelector ensures the correct canvas is checked when
384
+ * multiple PageBuilder instances exist on the same page (e.g. one always-visible + one in a
385
+ * modal). When the modal's canvas is empty while another instance already has content, the
386
+ * document.querySelector approach would miss the empty canvas entirely.
387
+ */
388
+ shouldCompleteBuilderMountOnMount(ownCanvas?: HTMLElement): boolean;
389
+ /**
390
+ * Marks the builder canvas lifecycle as "missing on start" for the next mount.
391
+ * Used by PageBuilder.vue on unmount (v-if modal close) so reopen performs
392
+ * a full draft-aware initialization instead of reusing potentially stale store DOM.
393
+ */
394
+ markCanvasUnmountedForNextMount(): void;
367
395
  /**
368
396
  * Completes the builder initialization process once the DOM is ready.
369
397
  * @param {BuilderResourceData} [passedComponentsArray] - Optional array of components to load.
370
398
  * @returns {Promise<void>}
371
399
  */
372
400
  completeBuilderInitialization(passedComponentsArray?: BuilderResourceData): Promise<void>;
401
+ private completeBuilderInitializationWithSession;
402
+ private runCompleteBuilderInitialization;
373
403
  /**
374
404
  * Converts an array of ComponentObject into a single HTML string.
375
405
  *
@@ -523,6 +553,16 @@ export declare class PageBuilderService {
523
553
  private handleCanvasDoubleClickCapture;
524
554
  openInlineTipTapFromEvent(e: Event): Promise<void>;
525
555
  private hasInlineTipTapElement;
556
+ /**
557
+ * Writes any active inline TipTap editor back to the live DOM synchronously.
558
+ * Used before localStorage persistence and before the builder unmounts.
559
+ */
560
+ private commitActiveInlineTipTapEditorSync;
561
+ /**
562
+ * Commits open inline editors and persists the current canvas to localStorage.
563
+ * Call before destroying the PageBuilder component (e.g. modal v-if close).
564
+ */
565
+ flushPendingEditsToLocalStorage(): void;
526
566
  finishActiveInlineTipTapEditorFromDom(nextElement?: HTMLElement | null): Promise<void>;
527
567
  /**
528
568
  * Handles the click event for editable elements, setting the element as selected.
@@ -907,6 +947,12 @@ export declare class PageBuilderService {
907
947
  * Call this after programmatically inserting elements into the builder canvas.
908
948
  */
909
949
  refreshListeners(): Promise<void>;
950
+ /**
951
+ * Applies config-provided pageSettings.style to #pagebuilder when the element
952
+ * has no inline style attribute. Safe to call on every canvas refresh because
953
+ * the guard `!domStyle` means user-edited styles are never overwritten.
954
+ */
955
+ private reapplyConfigPageSettingsIfMissing;
910
956
  /**
911
957
  * Resumes editing from a draft saved in local storage.
912
958
  * @returns {Promise<void>}
@@ -997,6 +1043,7 @@ export declare class PageBuilderService {
997
1043
  * @private
998
1044
  */
999
1045
  private convertStyleObjectToString;
1046
+ private hasMeaningfulPageSettings;
1000
1047
  /**
1001
1048
  * Parses a string of HTML and extracts builder components and global page settings.
1002
1049
  * - This method expects an **HTML string** containing one or more `<section>...</section>` elements (such as the output from `getSavedPageHtml()` or a previously saved builder HTML string).
@@ -1155,6 +1202,8 @@ export declare interface PageSettings {
1155
1202
  [key: string]: unknown;
1156
1203
  }
1157
1204
 
1205
+ declare type ProductButtonStyle = 'text' | 'button' | (string & {});
1206
+
1158
1207
  export declare type ProductCardStyle = 'minimal' | 'bordered' | 'shadow' | 'elevated' | (string & {});
1159
1208
 
1160
1209
  export declare type ProductGridLayout = 'grid-1' | 'grid-2' | 'grid-3' | 'grid-4' | 'grid-6' | (string & {});
@@ -1167,6 +1216,10 @@ export declare interface ProductSectionOptions {
1167
1216
  cardStyle?: ProductCardStyle;
1168
1217
  roundedImages?: boolean;
1169
1218
  openInNewTab?: boolean;
1219
+ /** Product CTA appearance: plain text link or button style */
1220
+ buttonStyle?: ProductButtonStyle;
1221
+ /** Applies rounded/full corners when CTA button style is enabled */
1222
+ roundedButtons?: boolean;
1170
1223
  /** Hides price and compare-at price when product data includes them */
1171
1224
  hidePrice?: boolean;
1172
1225
  /** Hides product photos when product data includes images */