@designcrowd/library.brand-page 5.17.25-undo-9 → 5.17.25-undo-10

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 (23) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-DmDSspcZ.js → CreatedOnBrandCrowd-de-de-C2CJCAQ1.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-B5Lh1tFl.js → CreatedOnBrandCrowd-en-us-Bg5k7y_D.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-BOiOyh5Y.js → CreatedOnBrandCrowd-es-es-DAaAXvzy.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-BbC8s_pY.js → CreatedOnBrandCrowd-fr-ca-B7C0ERbi.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-BbC8s_pY.js → CreatedOnBrandCrowd-fr-fr-B7C0ERbi.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-B9PQ72m4.js → CreatedOnBrandCrowd-pt-br-1pvCqQK1.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-B9PQ72m4.js → CreatedOnBrandCrowd-pt-pt-1pvCqQK1.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-C7NzbKIg.js → CreatedOnDcom-de-de-hbcr-qW0.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-DbVi6Q9C.js → CreatedOnDcom-en-us-BToix_74.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-C4TPAk-c.js → CreatedOnDcom-es-es-DOCxN0tr.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-xqzYFaKy.js → CreatedOnDcom-fr-ca-Q3ZYgCxp.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-Bh-7lY7W.js → CreatedOnDcom-fr-fr-C1-dUWKB.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-D3J8peaF.js → CreatedOnDcom-pt-br-KWKgld1I.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-101mCRJX.js → CreatedOnDcom-pt-pt-CRR3Hfej.js} +1 -1
  15. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +22 -0
  16. package/lib/src/brand-page-maker/stores/history/history-store.js +20 -1
  17. package/lib/src/index.mjs +1 -1
  18. package/lib/src/{lib-MGJszuw2.js → lib-Bhf5ZHsd.js} +604 -596
  19. package/package.json +1 -1
  20. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +74 -0
  21. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +28 -0
  22. package/src/brand-page-maker/stores/history/history-store.test.ts +62 -0
  23. package/src/brand-page-maker/stores/history/history-store.ts +22 -1
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-MGJszuw2.js";
2
+ import { _ as t } from "./lib-Bhf5ZHsd.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-MGJszuw2.js";
2
+ import { _ as t } from "./lib-Bhf5ZHsd.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-MGJszuw2.js";
2
+ import { _ as t } from "./lib-Bhf5ZHsd.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-MGJszuw2.js";
2
+ import { _ as t } from "./lib-Bhf5ZHsd.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-MGJszuw2.js";
2
+ import { _ as t } from "./lib-Bhf5ZHsd.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-MGJszuw2.js";
2
+ import { _ as t } from "./lib-Bhf5ZHsd.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-MGJszuw2.js";
2
+ import { _ as t } from "./lib-Bhf5ZHsd.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-MGJszuw2.js";
2
+ import { _ as e } from "./lib-Bhf5ZHsd.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-MGJszuw2.js";
2
+ import { _ as e } from "./lib-Bhf5ZHsd.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-MGJszuw2.js";
2
+ import { _ as e } from "./lib-Bhf5ZHsd.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-MGJszuw2.js";
2
+ import { _ as e } from "./lib-Bhf5ZHsd.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-MGJszuw2.js";
2
+ import { _ as e } from "./lib-Bhf5ZHsd.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-MGJszuw2.js";
2
+ import { _ as M } from "./lib-Bhf5ZHsd.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-MGJszuw2.js";
2
+ import { _ as M } from "./lib-Bhf5ZHsd.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -594,6 +594,28 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
594
594
  const draft = logoStore.getLogoDraftAssetByToken(logoImage.logoDraftToken);
595
595
  if (draft)
596
596
  editableLogoStore.setEnableEditMode(!draft.isByo);
597
+ // Repaint the canvas logo when the restored draft token differs
598
+ // from the editable logo store's current token. History snapshots
599
+ // intentionally drop the rendered `logoImageBase64Url` (a high-res
600
+ // BYO upload renders ~10 MB across the four viewports, which would
601
+ // blow the 5 MB per-entry cap and freeze history). On undo back to
602
+ // a different draft, the page-settings logo fields now have an
603
+ // empty base64, so the canvas would show no logo until something
604
+ // re-renders. Pointing the editable logo store at the restored
605
+ // draft and asking it to re-render fans out fabric-render requests
606
+ // for the four variations and writes fresh base64 onto every page
607
+ // section + logo content block — same path as the original BYO
608
+ // upload. Fire-and-forget: the restore returns immediately and the
609
+ // canvas updates as the renders complete, just like the upload UX.
610
+ const tokenChanged = editableLogoStore.logoDraftToken !== logoImage.logoDraftToken;
611
+ if (tokenChanged && logoImage.logoDraftToken) {
612
+ editableLogoStore.setLogoDraftToken(logoImage.logoDraftToken);
613
+ editableLogoStore
614
+ .updateEditableLogoImageUrlAsync()
615
+ .catch((err) => {
616
+ console.error('history-store: failed to repaint logo on restore', err);
617
+ });
618
+ }
597
619
  },
598
620
  _fallbackSidebarIfSelectedContentMissing(snapshot) {
599
621
  const contentSettingsStore = useUiContentSettingsStore();
@@ -73,7 +73,26 @@ export const useHistoryStore = defineStore('history', () => {
73
73
  return null;
74
74
  try {
75
75
  const raw = toRaw(cachedMakerStore.brandPageData);
76
- return JSON.stringify(raw);
76
+ // Drop `logoImageBase64Url` from the serialized form. A high-res
77
+ // BYO upload renders a ~2.5 MB base64 PNG into each of the four
78
+ // viewport sections (~10 MB raw), which is well past the 5 MB
79
+ // per-entry cap and would otherwise stick every BYO capture — and
80
+ // every follow-up edit while the upload is on the page — into the
81
+ // `oversized` path, freezing history. Stripping the field at
82
+ // serialize time keeps entries small and is safe for restore:
83
+ // - BYO upload IS undoable. The undo-relevant signal is
84
+ // `logoImage.logoDraftToken`, which is preserved.
85
+ // - On undo `LogoRender` watches `viewModel` and falls back to
86
+ // fetching the SVG by `logoDraftToken` when `logoImageBase64Url`
87
+ // is undefined (LogoRender.vue:97-102, 139-161), so the canvas
88
+ // repaints the previous logo without the cached PNG.
89
+ // - Per-property logo edits (text, color, font) author via
90
+ // `editableLogoStore.logoEdits` — not `brandPageData` — so
91
+ // they're already out of V1 undo scope. Same key is also
92
+ // stripped in the dedup normalizer; that strip is now
93
+ // redundant for the watcher path but kept as belt-and-braces
94
+ // in case a snapshot string lands there from another origin.
95
+ return JSON.stringify(raw, (key, value) => key === 'logoImageBase64Url' ? undefined : value);
77
96
  }
78
97
  catch (error) {
79
98
  console.error('history-store: failed to serialize brandPageData', error);
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-MGJszuw2.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-Bhf5ZHsd.js";
2
2
  import { createPinia as wE, setActivePinia as ZE } from "pinia";
3
3
  export {
4
4
  E as ABOUT_SECTION_SETTINGS_CONFIG,