@designcrowd/library.brand-page 6.0.6-undo-5 → 6.0.6-undo-7
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/lib/src/{CreatedOnBrandCrowd-de-de-BRaWY6nF.js → CreatedOnBrandCrowd-de-de-BDxea4Se.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-D0DuxW2v.js → CreatedOnBrandCrowd-en-us-BvCtPc-H.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-Du0Wjx0E.js → CreatedOnBrandCrowd-es-es-BFQR8krQ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-Cz1OGFZT.js → CreatedOnBrandCrowd-fr-ca-Dy0Xb5GE.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-Cz1OGFZT.js → CreatedOnBrandCrowd-fr-fr-Dy0Xb5GE.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-TfMgQ231.js → CreatedOnBrandCrowd-pt-br-BSGwZq7a.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-TfMgQ231.js → CreatedOnBrandCrowd-pt-pt-BSGwZq7a.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CIxWfXsX.js → CreatedOnDcom-de-de-DU42Z-z_.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-BQeFEYIF.js → CreatedOnDcom-en-us-BR_2u6_i.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-Bu9Nr8t-.js → CreatedOnDcom-es-es-Dts49b6I.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-Dpsu-wxQ.js → CreatedOnDcom-fr-ca-C7Lo2AbX.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-CWGZAKa0.js → CreatedOnDcom-fr-fr-ZpEbqlkx.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-Ds8H3Kiq.js → CreatedOnDcom-pt-br-CrUIv-Ye.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-kDx8VWIo.js → CreatedOnDcom-pt-pt-JlbQbaR1.js} +1 -1
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +65 -54
- package/lib/src/css/library.brand-page-brandCrowd.min.css +2 -2
- package/lib/src/css/library.brand-page-brandPage.min.css +2 -2
- package/lib/src/css/library.brand-page-designCom.min.css +2 -2
- package/lib/src/css/library.brand-page-preview.min.css +2 -2
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-BJdIOaxe.js → lib-6j91ExXu.js} +10679 -10663
- package/lib/src/shared/content-settings/store/content-settings-store.js +17 -0
- package/package.json +1 -1
- package/src/brand-page-maker/components/quick-link-bar/RedoButton.vue +9 -1
- package/src/brand-page-maker/components/quick-link-bar/UndoButton.vue +9 -1
- package/src/brand-page-maker/components/quick-link-bar/undo-redo-buttons.test.ts +29 -2
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +130 -0
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +71 -62
- package/src/shared/content-settings/store/content-settings-store.test.ts +103 -0
- package/src/shared/content-settings/store/content-settings-store.ts +28 -0
|
@@ -634,66 +634,77 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
634
634
|
const logoImage = logoUtil.getLogoImageFromModel(snapshot);
|
|
635
635
|
if (!logoImage)
|
|
636
636
|
return;
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
// Re-derive enableEditMode + templateAsset from the draft registry
|
|
650
|
-
// (append-only for the session) instead of stashing on every entry.
|
|
651
|
-
const draft = logoStore.getLogoDraftAssetByToken(draftToken);
|
|
652
|
-
if (draft) {
|
|
653
|
-
editableLogoStore.setEnableEditMode(!draft.isByo);
|
|
654
|
-
if (draft.templateAsset) {
|
|
655
|
-
logoStore.setLogoTemplateAsset(draft.templateAsset);
|
|
637
|
+
try {
|
|
638
|
+
const draftToken = logoImage.logoDraftToken;
|
|
639
|
+
if (!draftToken)
|
|
640
|
+
return;
|
|
641
|
+
// Re-derive enableEditMode + templateAsset from the draft registry
|
|
642
|
+
// (append-only for the session) instead of stashing on every entry.
|
|
643
|
+
const draft = logoStore.getLogoDraftAssetByToken(draftToken);
|
|
644
|
+
if (draft) {
|
|
645
|
+
editableLogoStore.setEnableEditMode(!draft.isByo);
|
|
646
|
+
if (draft.templateAsset) {
|
|
647
|
+
logoStore.setLogoTemplateAsset(draft.templateAsset);
|
|
648
|
+
}
|
|
656
649
|
}
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
(
|
|
663
|
-
if (logoUnchanged) {
|
|
664
|
-
editableLogoStore.stampLogoBase64IntoBrandPageData();
|
|
665
|
-
return;
|
|
666
|
-
}
|
|
667
|
-
const isByo = !!draft?.isByo;
|
|
668
|
-
if (isByo) {
|
|
669
|
-
// BYO mints a fresh draftToken per upload so the per-token
|
|
670
|
-
// cache always matches; no re-render needed.
|
|
671
|
-
if (editableLogoStore.restoreVariationsForDraftToken(draftToken)) {
|
|
650
|
+
editableLogoStore.setLogoDraftToken(draftToken);
|
|
651
|
+
// No logo change → cache is still correct; just stamp base64 back
|
|
652
|
+
// (snapshot doesn't carry logoImageBase64Url).
|
|
653
|
+
const logoUnchanged = prevDraftToken === draftToken &&
|
|
654
|
+
(logoEditsStr === undefined || logoEditsStr === prevLogoEditsStr);
|
|
655
|
+
if (logoUnchanged) {
|
|
672
656
|
editableLogoStore.stampLogoBase64IntoBrandPageData();
|
|
657
|
+
return;
|
|
673
658
|
}
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
logoEditsStr &&
|
|
683
|
-
logoStore.logoTemplateAsset) {
|
|
684
|
-
// Stamp the cached (pre-undo) base64 onto brandPageData first
|
|
685
|
-
// so the canvas keeps showing the previous logo while the
|
|
686
|
-
// re-render is in flight. Without this the logoImageBase64Url
|
|
687
|
-
// fields are undefined (snapshot is stripped pre-purchase) and
|
|
688
|
-
// the canvas flickers blank for ~500-1500ms.
|
|
689
|
-
editableLogoStore.stampLogoBase64IntoBrandPageData();
|
|
690
|
-
try {
|
|
691
|
-
await editableLogoStore.updateEditableLogoImageUrlAsync();
|
|
659
|
+
const isByo = !!draft?.isByo;
|
|
660
|
+
if (isByo) {
|
|
661
|
+
// BYO mints a fresh draftToken per upload so the per-token
|
|
662
|
+
// cache always matches; no re-render needed.
|
|
663
|
+
if (editableLogoStore.restoreVariationsForDraftToken(draftToken)) {
|
|
664
|
+
editableLogoStore.stampLogoBase64IntoBrandPageData();
|
|
665
|
+
}
|
|
666
|
+
return;
|
|
692
667
|
}
|
|
693
|
-
|
|
694
|
-
|
|
668
|
+
// Designed: draft token is reused across edits, so the cache
|
|
669
|
+
// only holds the latest render. Re-issue fabric-render — same
|
|
670
|
+
// call as the live edit path. Awaited so concurrent undos
|
|
671
|
+
// serialize and the call sits inside the isApplyingSnapshot
|
|
672
|
+
// window (watcher guard suppresses the writeback).
|
|
673
|
+
if (containerStore.isPrePurchase &&
|
|
674
|
+
logoEditsStr &&
|
|
675
|
+
logoStore.logoTemplateAsset) {
|
|
676
|
+
// Stamp the cached (pre-undo) base64 onto brandPageData first
|
|
677
|
+
// so the canvas keeps showing the previous logo while the
|
|
678
|
+
// re-render is in flight. Without this the logoImageBase64Url
|
|
679
|
+
// fields are undefined (snapshot is stripped pre-purchase) and
|
|
680
|
+
// the canvas flickers blank for ~500-1500ms.
|
|
681
|
+
editableLogoStore.stampLogoBase64IntoBrandPageData();
|
|
682
|
+
try {
|
|
683
|
+
await editableLogoStore.updateEditableLogoImageUrlAsync();
|
|
684
|
+
}
|
|
685
|
+
catch (error) {
|
|
686
|
+
console.error('brandpage-maker-store: failed to re-render logo on history apply', error);
|
|
687
|
+
}
|
|
695
688
|
}
|
|
696
689
|
}
|
|
690
|
+
finally {
|
|
691
|
+
// Assign a FRESH object — the same way the upload/selection flows
|
|
692
|
+
// write selectedLogoImage. A setState/$patch here deep-merges into
|
|
693
|
+
// the existing object, so the templates store's deep watcher would
|
|
694
|
+
// receive old === new (same reference), see no logoDraftToken
|
|
695
|
+
// change, and never refetch the template previews (BP-5814).
|
|
696
|
+
//
|
|
697
|
+
// Set LAST — after the branch above has prepared the preview key
|
|
698
|
+
// (BYO cache restore, or the awaited designed re-render that mints
|
|
699
|
+
// the s3 token) — so the watcher always fires with a fetchable key,
|
|
700
|
+
// the same precondition that makes the upload flow work. Firing it
|
|
701
|
+
// before the re-render fetched the template list with the previous
|
|
702
|
+
// render's s3 token: an obsolete list that repainted seconds later
|
|
703
|
+
// (the undo "flash"). The sidebar instead holds the previous
|
|
704
|
+
// previews while the render is in flight, matching the canvas
|
|
705
|
+
// policy above.
|
|
706
|
+
logoSettingsStore.setSelectedLogoImage({ ...logoImage });
|
|
707
|
+
}
|
|
697
708
|
},
|
|
698
709
|
/**
|
|
699
710
|
* Restore the active page after a history apply. The id passed in is
|
|
@@ -9240,12 +9240,12 @@ input.dynamic-width-input[data-v-97be2e87]:focus {
|
|
|
9240
9240
|
background-attachment: scroll !important;
|
|
9241
9241
|
}
|
|
9242
9242
|
|
|
9243
|
-
.c-undo-button-tooltip[data-v-
|
|
9243
|
+
.c-undo-button-tooltip[data-v-9c6ca156] .shared-tooltip__body {
|
|
9244
9244
|
width: auto;
|
|
9245
9245
|
padding: 4px 8px;
|
|
9246
9246
|
}
|
|
9247
9247
|
|
|
9248
|
-
.c-redo-button-tooltip[data-v-
|
|
9248
|
+
.c-redo-button-tooltip[data-v-346c90b7] .shared-tooltip__body {
|
|
9249
9249
|
width: auto;
|
|
9250
9250
|
padding: 4px 8px;
|
|
9251
9251
|
}
|
|
@@ -9851,12 +9851,12 @@ input.dynamic-width-input[data-v-97be2e87]:focus {
|
|
|
9851
9851
|
background-attachment: scroll !important;
|
|
9852
9852
|
}
|
|
9853
9853
|
|
|
9854
|
-
.c-undo-button-tooltip[data-v-
|
|
9854
|
+
.c-undo-button-tooltip[data-v-9c6ca156] .shared-tooltip__body {
|
|
9855
9855
|
width: auto;
|
|
9856
9856
|
padding: 4px 8px;
|
|
9857
9857
|
}
|
|
9858
9858
|
|
|
9859
|
-
.c-redo-button-tooltip[data-v-
|
|
9859
|
+
.c-redo-button-tooltip[data-v-346c90b7] .shared-tooltip__body {
|
|
9860
9860
|
width: auto;
|
|
9861
9861
|
padding: 4px 8px;
|
|
9862
9862
|
}
|
|
@@ -9270,12 +9270,12 @@ input.dynamic-width-input[data-v-97be2e87]:focus {
|
|
|
9270
9270
|
background-attachment: scroll !important;
|
|
9271
9271
|
}
|
|
9272
9272
|
|
|
9273
|
-
.c-undo-button-tooltip[data-v-
|
|
9273
|
+
.c-undo-button-tooltip[data-v-9c6ca156] .shared-tooltip__body {
|
|
9274
9274
|
width: auto;
|
|
9275
9275
|
padding: 4px 8px;
|
|
9276
9276
|
}
|
|
9277
9277
|
|
|
9278
|
-
.c-redo-button-tooltip[data-v-
|
|
9278
|
+
.c-redo-button-tooltip[data-v-346c90b7] .shared-tooltip__body {
|
|
9279
9279
|
width: auto;
|
|
9280
9280
|
padding: 4px 8px;
|
|
9281
9281
|
}
|
|
@@ -9240,12 +9240,12 @@ input.dynamic-width-input[data-v-97be2e87]:focus {
|
|
|
9240
9240
|
background-attachment: scroll !important;
|
|
9241
9241
|
}
|
|
9242
9242
|
|
|
9243
|
-
.bp .c-undo-button-tooltip[data-v-
|
|
9243
|
+
.bp .c-undo-button-tooltip[data-v-9c6ca156] .shared-tooltip__body {
|
|
9244
9244
|
width: auto;
|
|
9245
9245
|
padding: 4px 8px;
|
|
9246
9246
|
}
|
|
9247
9247
|
|
|
9248
|
-
.bp .c-redo-button-tooltip[data-v-
|
|
9248
|
+
.bp .c-redo-button-tooltip[data-v-346c90b7] .shared-tooltip__body {
|
|
9249
9249
|
width: auto;
|
|
9250
9250
|
padding: 4px 8px;
|
|
9251
9251
|
}
|
package/lib/src/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as T, a as E, 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 t, j as G, k as D, l as P, m as R, n as L, o, p as M, q as r, r as n, s as b, t as l, u as F, v as i, w as c, x as g, y as B, 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 m, K as k, L as V, M as X, N as v, O as h, P as f, Q as W, R as x, S as z, T as w, U as Z, V as j, W as q, X as J, Y as Q, Z as $, $ as aa, a0 as _a, a1 as Ta, a2 as Ea, 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 ta, ac as Ga, ad as Da, ae as Pa, af as Ra, ag as La, ah as oa, ai as Ma, aj as ra, ak as na, al as ba, am as la, an as Fa, ao as ia, ap as ca, aq as ga, ar as Ba, 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 ma, aB as ka, aC as Va, aD as Xa, aE as va, aF as ha, aG as fa, aH as Wa, aI as xa, aJ as za, aK as wa, aL as Za, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as $a, aR as a_, aS as __, aT as T_, aU as E_, 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 t_, b2 as G_, b3 as D_, b4 as P_, b5 as R_, b6 as L_, b7 as o_, b8 as M_, b9 as r_, ba as n_, bb as b_, bc as l_, bd as F_, be as i_, bf as c_, bg as g_, bh as B_, 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 m_, br as k_, bs as V_, bt as X_, bu as v_, bv as h_, bw as f_, bx as W_, by as x_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as q_, bE as J_, bF as Q_, bG as $_, bH as aT, bI as _T, bJ as TT, bK as ET, bL as sT, bM as IT, bN as ST, bO as NT, bP as eT, bQ as AT, bR as OT, bS as CT, bT as tT, bU as GT, bV as DT, bW as PT, bX as RT, bY as LT, bZ as oT, b_ as MT, b$ as rT, c0 as nT, c1 as bT, c2 as lT, c3 as FT, c4 as iT, c5 as cT, c6 as gT, c7 as BT, c8 as YT, c9 as UT, ca as dT, cb as uT, cc as HT, cd as pT, ce as yT, cf as KT, cg as mT, ch as kT, ci as VT, cj as XT, ck as vT, cl as hT, cm as fT, cn as WT, co as xT, cp as zT, cq as wT, cr as ZT, cs as jT, ct as qT, cu as JT } from "./lib-
|
|
1
|
+
import { A as T, a as E, 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 t, j as G, k as D, l as P, m as R, n as L, o, p as M, q as r, r as n, s as b, t as l, u as F, v as i, w as c, x as g, y as B, 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 m, K as k, L as V, M as X, N as v, O as h, P as f, Q as W, R as x, S as z, T as w, U as Z, V as j, W as q, X as J, Y as Q, Z as $, $ as aa, a0 as _a, a1 as Ta, a2 as Ea, 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 ta, ac as Ga, ad as Da, ae as Pa, af as Ra, ag as La, ah as oa, ai as Ma, aj as ra, ak as na, al as ba, am as la, an as Fa, ao as ia, ap as ca, aq as ga, ar as Ba, 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 ma, aB as ka, aC as Va, aD as Xa, aE as va, aF as ha, aG as fa, aH as Wa, aI as xa, aJ as za, aK as wa, aL as Za, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as $a, aR as a_, aS as __, aT as T_, aU as E_, 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 t_, b2 as G_, b3 as D_, b4 as P_, b5 as R_, b6 as L_, b7 as o_, b8 as M_, b9 as r_, ba as n_, bb as b_, bc as l_, bd as F_, be as i_, bf as c_, bg as g_, bh as B_, 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 m_, br as k_, bs as V_, bt as X_, bu as v_, bv as h_, bw as f_, bx as W_, by as x_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as q_, bE as J_, bF as Q_, bG as $_, bH as aT, bI as _T, bJ as TT, bK as ET, bL as sT, bM as IT, bN as ST, bO as NT, bP as eT, bQ as AT, bR as OT, bS as CT, bT as tT, bU as GT, bV as DT, bW as PT, bX as RT, bY as LT, bZ as oT, b_ as MT, b$ as rT, c0 as nT, c1 as bT, c2 as lT, c3 as FT, c4 as iT, c5 as cT, c6 as gT, c7 as BT, c8 as YT, c9 as UT, ca as dT, cb as uT, cc as HT, cd as pT, ce as yT, cf as KT, cg as mT, ch as kT, ci as VT, cj as XT, ck as vT, cl as hT, cm as fT, cn as WT, co as xT, cp as zT, cq as wT, cr as ZT, cs as jT, ct as qT, cu as JT } from "./lib-6j91ExXu.js";
|
|
2
2
|
import { createPinia as $T, setActivePinia as aE } from "pinia";
|
|
3
3
|
export {
|
|
4
4
|
T as ABOUT_SECTION_SETTINGS_CONFIG,
|