@designcrowd/library.brand-page 5.18.1-undo-32 → 5.18.1-undo-33

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.
Files changed (40) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-DUgkmx89.js → CreatedOnBrandCrowd-de-de-986OpXvU.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-C5dQGLuA.js → CreatedOnBrandCrowd-en-us-CTZuZ366.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-CjPcnNlq.js → CreatedOnBrandCrowd-es-es-CHrTgX9-.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-D2wnZOOE.js → CreatedOnBrandCrowd-fr-ca-xJAvxQ-x.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-D2wnZOOE.js → CreatedOnBrandCrowd-fr-fr-xJAvxQ-x.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-OQj-IBh_.js → CreatedOnBrandCrowd-pt-br-lpRIGIcs.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-OQj-IBh_.js → CreatedOnBrandCrowd-pt-pt-lpRIGIcs.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-DLijuIaL.js → CreatedOnDcom-de-de-CZuim3ee.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-D9M_heGE.js → CreatedOnDcom-en-us-DG4I5f4s.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-PgWwbBLA.js → CreatedOnDcom-es-es-Hpieh1wX.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-BXiB-abj.js → CreatedOnDcom-fr-ca-DWr5P-df.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-BXhTmu7F.js → CreatedOnDcom-fr-fr-CHfOyS6V.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-3e6y567w.js → CreatedOnDcom-pt-br-bQwCCDDI.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-GojOtHmO.js → CreatedOnDcom-pt-pt-bo-i_h0N.js} +1 -1
  15. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +2 -11
  16. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +15 -47
  17. package/lib/src/brand-page-maker/stores/history/history-store.d.ts +7 -47
  18. package/lib/src/brand-page-maker/stores/history/history-store.js +63 -277
  19. package/lib/src/index.mjs +1 -1
  20. package/lib/src/{lib-DVs3jUit.js → lib-DNHBgZyy.js} +3887 -3903
  21. package/lib/src/shared/content-settings/components/GenericTextInput.mixin.d.ts +1 -1
  22. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +1 -8
  23. package/lib/src/shared/content-settings/components/email-field/EmailField.mixin.d.ts +1 -1
  24. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.js +2 -8
  25. package/lib/src/shared/content-settings/components/radio-field/RadioField.mixin.d.ts +1 -1
  26. package/lib/src/shared/content-settings/components/tel-field/TelField.mixin.d.ts +1 -1
  27. package/lib/src/shared/content-settings/components/text-field/TextField.mixin.d.ts +1 -1
  28. package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.d.ts +1 -1
  29. package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +1 -1
  30. package/lib/src/shared/content-settings/components/youtube-video-field/YoutubeVideoField.mixin.d.ts +1 -1
  31. package/lib/src/shared/logo-settings/store/editable-logo-store.d.ts +0 -18
  32. package/lib/src/shared/logo-settings/store/editable-logo-store.js +6 -24
  33. package/package.json +1 -1
  34. package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +2 -11
  35. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +15 -47
  36. package/src/brand-page-maker/stores/history/history-store.ts +70 -333
  37. package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +1 -8
  38. package/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.vue +1 -4
  39. package/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.ts +2 -8
  40. package/src/shared/logo-settings/store/editable-logo-store.ts +9 -29
@@ -119,14 +119,8 @@ export default defineComponent({
119
119
  value,
120
120
  };
121
121
 
122
- // Stripe Connect linkage hydration runs the first time the user
123
- // opens a Tipping/Request Payment/Shop section sidebar. The emit
124
- // below mutates `brandPageData[*].paymentConfig` from undefined to
125
- // the live `shopConfigStore.paymentConfig` — no user authoring
126
- // intent. Arm the merge flag so the watcher's flush folds this
127
- // into the current head instead of pushing a phantom undo entry
128
- // that would, when undone, surface the "Please enable a payment
129
- // provider" warning.
122
+ // Lazy paymentConfig hydration — fold into current head instead
123
+ // of pushing a phantom entry.
130
124
  this.historyStore.mergeNextMutation();
131
125
 
132
126
  this.$emit('update:modelValue', payload);
@@ -116,11 +116,9 @@ export interface EditableLogoState {
116
116
  logoTemplateMetadata: string;
117
117
  isLogoDraftSaved: boolean;
118
118
  isTextOnlyLogo: boolean;
119
- // Per-draft-token snapshot of `editableLogoVariations`. Repopulated each
120
- // time `updateEditableLogoImageUrlAsync` finishes rendering for the active
121
- // draft. Undo/redo reads from this map to restore the variations grid for
122
- // the snapshot's `logoDraftToken` instead of re-rendering through fabric-
123
- // render or stuffing 4 base64 PNGs into every history entry.
119
+ // Per-draft-token snapshot of editableLogoVariations; repopulated on
120
+ // every render. Used by undo/redo to restore the BYO variations grid
121
+ // without re-rendering.
124
122
  variationsByDraftToken: Record<string, EditableLogoVariation[]>;
125
123
  }
126
124
 
@@ -415,31 +413,16 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
415
413
 
416
414
  this.stampLogoBase64IntoBrandPageData(overrideLogoVariation);
417
415
 
418
- // Stash the freshly rendered variation set under the active draft
419
- // token so undo can restore it later without re-rendering. This is
420
- // the only place in production that meaningfully populates
421
- // `editableLogoVariations` (BYO upload + designed-logo setStateAsync
422
- // both funnel here), so caching here keeps every distinct draft's
423
- // grid available for the lifetime of the session.
416
+ // Cache per draft token so BYO undo can restore without re-rendering.
424
417
  if (this.logoDraftToken) {
425
418
  this.variationsByDraftToken[this.logoDraftToken] =
426
419
  this.editableLogoVariations.map((v) => ({ ...v }));
427
420
  }
428
421
  },
429
422
 
430
- /**
431
- * Stamp `editableLogoVariations[*].base64` across every consumer in
432
- * `brandPageData`: header/footer logo sections (desktop + mobile)
433
- * and every `LogoContent` block on every page. Used by the live edit
434
- * path after a fabric-render POST AND by the undo/redo BYO branch
435
- * after `restoreVariationsForDraftToken` has rehydrated the cache.
436
- *
437
- * The history store strips `logoImageBase64Url` from snapshots to
438
- * keep them under the 25 MB per-entry cap, so something has to
439
- * write the base64 back into `brandPageData` after restore — for
440
- * designed logos it's the awaited fabric-render call; for BYO it's
441
- * this method.
442
- */
423
+ // Stamp editableLogoVariations[*].base64 across header/footer + every
424
+ // LogoContent. Called by the live edit path post-render, and by
425
+ // undo/redo to repopulate the stripped logoImageBase64Url fields.
443
426
  stampLogoBase64IntoBrandPageData(overrideLogoVariation?: number): void {
444
427
  const pageSettingStore = useUiPageSettingsStore();
445
428
 
@@ -479,11 +462,8 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
479
462
  });
480
463
  },
481
464
 
482
- /**
483
- * Restore the variations grid for `logoDraftToken` from the per-token
484
- * cache. Called by `_syncLogoSettingsFromSnapshot` during undo/redo.
485
- * Returns true on cache hit.
486
- */
465
+ // Restore variations grid for a draft token from the per-token cache.
466
+ // Returns true on cache hit.
487
467
  restoreVariationsForDraftToken(logoDraftToken: string): boolean {
488
468
  const cached = this.variationsByDraftToken[logoDraftToken];
489
469