@designcrowd/library.brand-page 5.18.1-undo-28 → 5.18.1-undo-29

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 (19) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-CmaFdOwA.js → CreatedOnBrandCrowd-de-de-BxL6mTJW.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-DYcx1zJ5.js → CreatedOnBrandCrowd-en-us-BPbjqfkj.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-BW-OyQM7.js → CreatedOnBrandCrowd-es-es-DDsoe143.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-DDBKibOe.js → CreatedOnBrandCrowd-fr-ca-Dak7ppy_.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-DDBKibOe.js → CreatedOnBrandCrowd-fr-fr-Dak7ppy_.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-6OSkxFgf.js → CreatedOnBrandCrowd-pt-br-BUAneEVD.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-6OSkxFgf.js → CreatedOnBrandCrowd-pt-pt-BUAneEVD.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-Ds3pSY3b.js → CreatedOnDcom-de-de-BJ00bTz_.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-nu_xhm3W.js → CreatedOnDcom-en-us-B0V1M9Hs.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-DeWd8xLJ.js → CreatedOnDcom-es-es-YDMLB7u6.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-C30UWAc7.js → CreatedOnDcom-fr-ca-DppQ26s1.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-ZFAi67Ii.js → CreatedOnDcom-fr-fr-0Xi-3slB.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-Bvtz3TFZ.js → CreatedOnDcom-pt-br-De-wHqSu.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-Dr__mA4b.js → CreatedOnDcom-pt-pt-CQGAsn5D.js} +1 -1
  15. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +37 -4
  16. package/lib/src/index.mjs +1 -1
  17. package/lib/src/{lib-BBItimSg.js → lib-YRlMax_i.js} +683 -674
  18. package/package.json +1 -1
  19. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +46 -4
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BBItimSg.js";
2
+ import { _ as t } from "./lib-YRlMax_i.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BBItimSg.js";
2
+ import { _ as t } from "./lib-YRlMax_i.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BBItimSg.js";
2
+ import { _ as t } from "./lib-YRlMax_i.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BBItimSg.js";
2
+ import { _ as t } from "./lib-YRlMax_i.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BBItimSg.js";
2
+ import { _ as t } from "./lib-YRlMax_i.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BBItimSg.js";
2
+ import { _ as t } from "./lib-YRlMax_i.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BBItimSg.js";
2
+ import { _ as t } from "./lib-YRlMax_i.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BBItimSg.js";
2
+ import { _ as e } from "./lib-YRlMax_i.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BBItimSg.js";
2
+ import { _ as e } from "./lib-YRlMax_i.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BBItimSg.js";
2
+ import { _ as e } from "./lib-YRlMax_i.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BBItimSg.js";
2
+ import { _ as e } from "./lib-YRlMax_i.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BBItimSg.js";
2
+ import { _ as e } from "./lib-YRlMax_i.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-BBItimSg.js";
2
+ import { _ as M } from "./lib-YRlMax_i.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-BBItimSg.js";
2
+ import { _ as M } from "./lib-YRlMax_i.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -605,6 +605,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
605
605
  const logoSettingsStore = useUiLogoSettingsStore();
606
606
  const editableLogoStore = useUiEditableLogoStore();
607
607
  const logoStore = useLogoStore();
608
+ const containerStore = useBrandPageContainerStore();
608
609
  // Restore `editableLogoStore.logoEdits` first — sidecar to `brandPageData`,
609
610
  // captured per-entry. Wholesale-replace via `$patch` so a previous
610
611
  // entry's textObjects/colors don't leak through (e.g. switching
@@ -638,9 +639,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
638
639
  // and BYO upload stamps `templateAsset` onto the registered draft when
639
640
  // it lands — so the registered draft is enough to fully restore the
640
641
  // sidebar's design/upload chooser without storing anything inside
641
- // each history entry. The variations grid is restored from the
642
- // editable-logo store's per-token cache (populated by every
643
- // `updateEditableLogoImageUrlAsync` render).
642
+ // each history entry.
644
643
  const draft = logoStore.getLogoDraftAssetByToken(draftToken);
645
644
  if (draft) {
646
645
  editableLogoStore.setEnableEditMode(!draft.isByo);
@@ -649,7 +648,41 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
649
648
  }
650
649
  }
651
650
  editableLogoStore.setLogoDraftToken(draftToken);
652
- editableLogoStore.restoreVariationsForDraftToken(draftToken);
651
+ const isByo = !!draft?.isByo;
652
+ if (isByo) {
653
+ // BYO uploads register a fresh `logoDraftToken` per upload, so
654
+ // `variationsByDraftToken` keyed off that token always matches the
655
+ // base64 the user saw at capture. No re-render — the uploaded
656
+ // image bytes are the source of truth and there's nothing for
657
+ // fabric-render to derive.
658
+ editableLogoStore.restoreVariationsForDraftToken(draftToken);
659
+ return;
660
+ }
661
+ // Designed (non-BYO) logo. The draft token is reused across every
662
+ // form-field edit, so any per-token cache only ever holds the latest
663
+ // render — undoing past it would leave `editableLogoVariations` (and
664
+ // every consumer that reads from it: the sidebar preview, the
665
+ // canvas, post-undo save metadata, recalculateLogoSizes) showing
666
+ // the post-edit base64 while the form fields show pre-edit state.
667
+ //
668
+ // Fire-and-forget the same render the live edit path runs:
669
+ // `updateEditableLogoImageUrlAsync` POSTs the freshly-restored
670
+ // `logoEdits` to fabric-render and writes the returned base64 across
671
+ // every header/footer + per-page logo content + `editableLogoVariations`.
672
+ // The undo/redo apply itself stays synchronous; the canvas updates
673
+ // a moment later when fabric-render responds.
674
+ //
675
+ // Arm `mergeNextMutation` so the watcher folds the post-render
676
+ // mutation back into the entry we just restored instead of pushing
677
+ // a phantom entry.
678
+ if (containerStore.isPrePurchase &&
679
+ logoEditsStr &&
680
+ logoStore.logoTemplateAsset) {
681
+ useHistoryStore().mergeNextMutation();
682
+ editableLogoStore.updateEditableLogoImageUrlAsync().catch((error) => {
683
+ console.error('brandpage-maker-store: failed to re-render logo on history apply', error);
684
+ });
685
+ }
653
686
  },
654
687
  /**
655
688
  * Restore the active page after a history apply. The id passed in is
package/lib/src/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as E, a as T, b as s, c as I, d as S, e as N, f as e, B as A, g as O, h as C, i as G, j as D, k as P, l as t, m as R, n as L, o as M, p as o, q as r, r as b, s as n, t as F, u as i, v as l, w as g, x as B, y as c, z as Y, C as U, D as d, E as u, F as H, G as p, H as y, I as K, J as k, K as m, L as V, M as X, N as h, O as v, P as W, Q as f, R as x, S as z, T as w, U as Z, V as j, W as Q, X as q, Y as J, Z as $, $ as aa, a0 as _a, a1 as Ea, a2 as Ta, a3 as sa, a4 as Ia, a5 as Sa, a6 as Na, a7 as ea, a8 as Aa, a9 as Oa, aa as Ca, ab as Ga, ac as Da, ad as Pa, ae as ta, af as Ra, ag as La, ah as Ma, ai as oa, aj as ra, ak as ba, al as na, am as Fa, an as ia, ao as la, ap as ga, aq as Ba, ar as ca, as as Ya, at as Ua, au as da, av as ua, aw as Ha, ax as pa, ay as ya, az as Ka, aA as ka, aB as ma, aC as Va, aD as Xa, aE as ha, aF as va, aG as Wa, aH as fa, aI as xa, aJ as za, aK as wa, aL as Za, aM as ja, aN as Qa, aO as qa, aP as Ja, aQ as $a, aR as a_, aS as __, aT as E_, aU as T_, aV as s_, aW as I_, aX as S_, aY as N_, aZ as e_, a_ as A_, a$ as O_, b0 as C_, b1 as G_, b2 as D_, b3 as P_, b4 as t_, b5 as R_, b6 as L_, b7 as M_, b8 as o_, b9 as r_, ba as b_, bb as n_, bc as F_, bd as i_, be as l_, bf as g_, bg as B_, bh as c_, bi as Y_, bj as U_, bk as d_, bl as u_, bm as H_, bn as p_, bo as y_, bp as K_, bq as k_, br as m_, bs as V_, bt as X_, bu as h_, bv as v_, bw as W_, bx as f_, by as x_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as Q_, bE as q_, bF as J_, bG as $_, bH as aE, bI as _E, bJ as EE, bK as TE, bL as sE, bM as IE, bN as SE, bO as NE, bP as eE, bQ as AE, bR as OE, bS as CE, bT as GE, bU as DE, bV as PE, bW as tE, bX as RE, bY as LE, bZ as ME, b_ as oE, b$ as rE, c0 as bE, c1 as nE, c2 as FE, c3 as iE, c4 as lE, c5 as gE, c6 as BE, c7 as cE, c8 as YE, c9 as UE, ca as dE, cb as uE, cc as HE, cd as pE, ce as yE, cf as KE, cg as kE, ch as mE, ci as VE, cj as XE, ck as hE, cl as vE, cm as WE, cn as fE, co as xE } from "./lib-BBItimSg.js";
1
+ import { A as E, a as T, b as s, c as I, d as S, e as N, f as e, B as A, g as O, h as C, i as G, j as D, k as P, l as t, m as R, n as L, o as M, p as o, q as r, r as b, s as n, t as F, u as i, v as l, w as g, x as B, y as c, z as Y, C as U, D as d, E as u, F as H, G as p, H as y, I as K, J as k, K as m, L as V, M as X, N as h, O as v, P as W, Q as f, R as x, S as z, T as w, U as Z, V as j, W as Q, X as q, Y as J, Z as $, $ as aa, a0 as _a, a1 as Ea, a2 as Ta, a3 as sa, a4 as Ia, a5 as Sa, a6 as Na, a7 as ea, a8 as Aa, a9 as Oa, aa as Ca, ab as Ga, ac as Da, ad as Pa, ae as ta, af as Ra, ag as La, ah as Ma, ai as oa, aj as ra, ak as ba, al as na, am as Fa, an as ia, ao as la, ap as ga, aq as Ba, ar as ca, as as Ya, at as Ua, au as da, av as ua, aw as Ha, ax as pa, ay as ya, az as Ka, aA as ka, aB as ma, aC as Va, aD as Xa, aE as ha, aF as va, aG as Wa, aH as fa, aI as xa, aJ as za, aK as wa, aL as Za, aM as ja, aN as Qa, aO as qa, aP as Ja, aQ as $a, aR as a_, aS as __, aT as E_, aU as T_, aV as s_, aW as I_, aX as S_, aY as N_, aZ as e_, a_ as A_, a$ as O_, b0 as C_, b1 as G_, b2 as D_, b3 as P_, b4 as t_, b5 as R_, b6 as L_, b7 as M_, b8 as o_, b9 as r_, ba as b_, bb as n_, bc as F_, bd as i_, be as l_, bf as g_, bg as B_, bh as c_, bi as Y_, bj as U_, bk as d_, bl as u_, bm as H_, bn as p_, bo as y_, bp as K_, bq as k_, br as m_, bs as V_, bt as X_, bu as h_, bv as v_, bw as W_, bx as f_, by as x_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as Q_, bE as q_, bF as J_, bG as $_, bH as aE, bI as _E, bJ as EE, bK as TE, bL as sE, bM as IE, bN as SE, bO as NE, bP as eE, bQ as AE, bR as OE, bS as CE, bT as GE, bU as DE, bV as PE, bW as tE, bX as RE, bY as LE, bZ as ME, b_ as oE, b$ as rE, c0 as bE, c1 as nE, c2 as FE, c3 as iE, c4 as lE, c5 as gE, c6 as BE, c7 as cE, c8 as YE, c9 as UE, ca as dE, cb as uE, cc as HE, cd as pE, ce as yE, cf as KE, cg as kE, ch as mE, ci as VE, cj as XE, ck as hE, cl as vE, cm as WE, cn as fE, co as xE } from "./lib-YRlMax_i.js";
2
2
  import { createPinia as wE, setActivePinia as ZE } from "pinia";
3
3
  export {
4
4
  E as ABOUT_SECTION_SETTINGS_CONFIG,