@designcrowd/library.brand-page 5.17.25-undo-6 → 5.17.25-undo-8

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 (21) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-Tz4la--g.js → CreatedOnBrandCrowd-de-de-AfnY8zoN.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-BwX6VQ7n.js → CreatedOnBrandCrowd-en-us-D8X7A_M5.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-D-X5dqmk.js → CreatedOnBrandCrowd-es-es-DjKTziiy.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-C26oV3hg.js → CreatedOnBrandCrowd-fr-ca-dSR3lZfa.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-C26oV3hg.js → CreatedOnBrandCrowd-fr-fr-dSR3lZfa.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-wuMDIU99.js → CreatedOnBrandCrowd-pt-br-BTD44ERQ.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-wuMDIU99.js → CreatedOnBrandCrowd-pt-pt-BTD44ERQ.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-NV--j2Ly.js → CreatedOnDcom-de-de-QP4_OShH.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-CoQldVno.js → CreatedOnDcom-en-us-CWyO9t7x.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-BDYtM7OQ.js → CreatedOnDcom-es-es-B3sZqeKP.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-DqeHK60l.js → CreatedOnDcom-fr-ca-BR3-inLX.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-CBEBKPx2.js → CreatedOnDcom-fr-fr-DdrT0HCa.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-U4l3IbG5.js → CreatedOnDcom-pt-br-3Oz8RFHK.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-zx47Q7Gm.js → CreatedOnDcom-pt-pt-DwrZkI_f.js} +1 -1
  15. package/lib/src/brand-page-maker/stores/history/history-store.js +42 -12
  16. package/lib/src/index.mjs +1 -1
  17. package/lib/src/{lib-LWqKxGvV.js → lib-Y0xSZnR9.js} +485 -490
  18. package/package.json +1 -1
  19. package/src/brand-page-maker/stores/history/history-store.test.ts +137 -2
  20. package/src/brand-page-maker/stores/history/history-store.ts +44 -13
  21. package/src/shared/content-settings/components/logo-selection-field/LogoSelection.vue +16 -23
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-LWqKxGvV.js";
2
+ import { _ as t } from "./lib-Y0xSZnR9.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-LWqKxGvV.js";
2
+ import { _ as t } from "./lib-Y0xSZnR9.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-LWqKxGvV.js";
2
+ import { _ as t } from "./lib-Y0xSZnR9.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-LWqKxGvV.js";
2
+ import { _ as t } from "./lib-Y0xSZnR9.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-LWqKxGvV.js";
2
+ import { _ as t } from "./lib-Y0xSZnR9.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-LWqKxGvV.js";
2
+ import { _ as t } from "./lib-Y0xSZnR9.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-LWqKxGvV.js";
2
+ import { _ as t } from "./lib-Y0xSZnR9.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-LWqKxGvV.js";
2
+ import { _ as e } from "./lib-Y0xSZnR9.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-LWqKxGvV.js";
2
+ import { _ as e } from "./lib-Y0xSZnR9.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-LWqKxGvV.js";
2
+ import { _ as e } from "./lib-Y0xSZnR9.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-LWqKxGvV.js";
2
+ import { _ as e } from "./lib-Y0xSZnR9.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-LWqKxGvV.js";
2
+ import { _ as e } from "./lib-Y0xSZnR9.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-LWqKxGvV.js";
2
+ import { _ as M } from "./lib-Y0xSZnR9.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-LWqKxGvV.js";
2
+ import { _ as M } from "./lib-Y0xSZnR9.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -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
- * - Lazy hydration of `textStyle` fields (`fontSize`, `letterSpacing`)
93
- * when a content settings panel computes resolved values from
94
- * `textStyleType` and writes them onto the model.
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
- // strip lazily-hydrated fields that get filled in when the settings
160
- // panel computes resolved values from `textStyleType`.
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 cleanedStyle = {};
167
- for (const sk of Object.keys(styleObj)) {
168
- if (sk === 'fontSize' || sk === 'letterSpacing')
169
- continue;
170
- cleanedStyle[sk] = normalizeNode(styleObj[sk]);
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
- out[key] = cleanedStyle;
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-LWqKxGvV.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-Y0xSZnR9.js";
2
2
  import { createPinia as wE, setActivePinia as ZE } from "pinia";
3
3
  export {
4
4
  E as ABOUT_SECTION_SETTINGS_CONFIG,