@designcrowd/library.brand-page 5.17.25-undo-5 → 5.17.25-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-CHMMocnx.js → CreatedOnBrandCrowd-de-de-Bj3SnIcG.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-DHlWLkwc.js → CreatedOnBrandCrowd-en-us-Cctc4swb.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DeoGQeBU.js → CreatedOnBrandCrowd-es-es-BEH9gTNh.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-DmZV08MV.js → CreatedOnBrandCrowd-fr-ca-BgWoNZ-T.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-DmZV08MV.js → CreatedOnBrandCrowd-fr-fr-BgWoNZ-T.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-COuMaj13.js → CreatedOnBrandCrowd-pt-br-VI26X7xu.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-COuMaj13.js → CreatedOnBrandCrowd-pt-pt-VI26X7xu.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-C9XvdB6Y.js → CreatedOnDcom-de-de-CQKXLChO.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-CSIczk-e.js → CreatedOnDcom-en-us-DTjoj2Iv.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-B8PxGq85.js → CreatedOnDcom-es-es-C7ZOaeD4.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-ClXbe4Tz.js → CreatedOnDcom-fr-ca-CaODnIN8.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-DvVB8qIo.js → CreatedOnDcom-fr-fr-CrF0dPzz.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-DmBFmt7n.js → CreatedOnDcom-pt-br-51WgNOhj.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DdPrMHbl.js → CreatedOnDcom-pt-pt-Bkn3fggv.js} +1 -1
- package/lib/src/brand-page-maker/stores/history/history-store.js +42 -12
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-Cox69cyq.js → lib-rp5REB2a.js} +2873 -2853
- package/package.json +1 -1
- package/src/brand-page-maker/stores/history/history-store.test.ts +137 -2
- package/src/brand-page-maker/stores/history/history-store.ts +44 -13
- package/src/shared/content-settings/components/logo-selection-field/LogoSelection.vue +57 -35
|
@@ -89,9 +89,14 @@ export const useHistoryStore = defineStore('history', () => {
|
|
|
89
89
|
* Known phantom sources (BP-5506):
|
|
90
90
|
* - TipTap RTE writing back its empty-paragraph default on first mount
|
|
91
91
|
* (e.g. `""` → `<p style="text-align: center;"></p>`).
|
|
92
|
-
* -
|
|
93
|
-
*
|
|
94
|
-
*
|
|
92
|
+
* - TipTap RTE writing back its default-style hydration on first mount
|
|
93
|
+
* (e.g. plain `"Hello"` → `<p style="..."><span style="..."><mark ...>Hello</mark></span></p>`).
|
|
94
|
+
* - Lazy hydration of `*Style` objects when a content settings panel —
|
|
95
|
+
* or section selection on the canvas — resolves `textStyleType` and
|
|
96
|
+
* writes the full resolved style (fontFamily, fontSize, color,
|
|
97
|
+
* fontWeight, fontStyle, letterSpacing, lineHeight, textDecoration)
|
|
98
|
+
* onto the model. The `textStyleType` itself is the authoring
|
|
99
|
+
* intent; the resolved keys are just cached values.
|
|
95
100
|
* - `isModifiedAfterTemplateApplied` flipping on first edit gesture.
|
|
96
101
|
*
|
|
97
102
|
* Used ONLY for dedup comparison. Stored snapshots remain unchanged so
|
|
@@ -155,21 +160,46 @@ export const useHistoryStore = defineStore('history', () => {
|
|
|
155
160
|
// and the two normalized strings would differ.
|
|
156
161
|
if (isEmptyRteHtml(v) || v === '')
|
|
157
162
|
continue;
|
|
158
|
-
// textStyle / descriptionStyle / titleStyle / *Style objects
|
|
159
|
-
//
|
|
160
|
-
//
|
|
163
|
+
// textStyle / descriptionStyle / titleStyle / *Style objects.
|
|
164
|
+
//
|
|
165
|
+
// When `textStyleType` is set, the live store lazily fills in the
|
|
166
|
+
// resolved values (fontFamily, fontSize, color, fontWeight,
|
|
167
|
+
// fontStyle, letterSpacing, lineHeight, textDecoration, etc.) the
|
|
168
|
+
// first time a settings panel — or section-selection on the canvas
|
|
169
|
+
// — resolves `textStyleType` against `styles.textStyles.textStyleOptions`.
|
|
170
|
+
// None of those lazy fields represent a real user edit; the
|
|
171
|
+
// `textStyleType` itself is the authoring intent.
|
|
172
|
+
//
|
|
173
|
+
// Real user edits via the inline RTE toolbar set `textStyleType: undefined`
|
|
174
|
+
// (see useRichTextEditor.ts `fontStyleChanges = { ..., textStyleType: undefined }`),
|
|
175
|
+
// so we leave every key intact in that case — those values ARE the
|
|
176
|
+
// real authoring intent.
|
|
177
|
+
//
|
|
178
|
+
// Per-content style edits via the global Style panel land in
|
|
179
|
+
// `snapshot.styles.textStyles` (a separate sub-tree), so they still
|
|
180
|
+
// produce a real diff outside this branch.
|
|
161
181
|
if (v !== null &&
|
|
162
182
|
typeof v === 'object' &&
|
|
163
183
|
!Array.isArray(v) &&
|
|
164
184
|
/Style$/.test(key)) {
|
|
165
185
|
const styleObj = v;
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
186
|
+
const hasTextStyleType = styleObj.textStyleType !== undefined &&
|
|
187
|
+
styleObj.textStyleType !== null;
|
|
188
|
+
if (hasTextStyleType) {
|
|
189
|
+
// Drop everything except `textStyleType` itself + `textAlign`,
|
|
190
|
+
// which is the user's per-instance alignment override (preserved
|
|
191
|
+
// on hydration via `globalContentStyle = { ...resolved, textAlign: style?.textAlign }`).
|
|
192
|
+
out[key] = {
|
|
193
|
+
textStyleType: styleObj.textStyleType,
|
|
194
|
+
...(styleObj.textAlign !== undefined
|
|
195
|
+
? { textAlign: styleObj.textAlign }
|
|
196
|
+
: {}),
|
|
197
|
+
};
|
|
198
|
+
continue;
|
|
171
199
|
}
|
|
172
|
-
|
|
200
|
+
// No textStyleType — these are real per-content overrides. Recurse
|
|
201
|
+
// normally so nested objects still get the standard treatment.
|
|
202
|
+
out[key] = normalizeNode(styleObj);
|
|
173
203
|
continue;
|
|
174
204
|
}
|
|
175
205
|
out[key] = normalizeNode(v);
|
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-
|
|
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-rp5REB2a.js";
|
|
2
2
|
import { createPinia as wE, setActivePinia as ZE } from "pinia";
|
|
3
3
|
export {
|
|
4
4
|
E as ABOUT_SECTION_SETTINGS_CONFIG,
|