@designcrowd/library.brand-page 5.17.15-ast-fix-2 → 5.17.15

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 (28) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-B1T8_OBV.js → CreatedOnBrandCrowd-de-de-BKNej8ZT.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-BhdAX9UQ.js → CreatedOnBrandCrowd-en-us-ogKV49pg.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-BjVvpU3y.js → CreatedOnBrandCrowd-es-es-C61Up_D5.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-r-KrKXsc.js → CreatedOnBrandCrowd-fr-ca-CgkbsVnk.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-r-KrKXsc.js → CreatedOnBrandCrowd-fr-fr-CgkbsVnk.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-B8LGmP2n.js → CreatedOnBrandCrowd-pt-br-DIcjlmcn.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-B8LGmP2n.js → CreatedOnBrandCrowd-pt-pt-DIcjlmcn.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-DwvfyZnW.js → CreatedOnDcom-de-de-OY2ieqRz.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-fJNeDirk.js → CreatedOnDcom-en-us-DvZlTQTs.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-Cjr-is4P.js → CreatedOnDcom-es-es-C52TrGZQ.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-DqZIWWZk.js → CreatedOnDcom-fr-ca-B0Kipm6g.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-DElGCXcY.js → CreatedOnDcom-fr-fr-C1FEzqvW.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-DmVlUFyY.js → CreatedOnDcom-pt-br-uptTt9JP.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-B4xiFpxQ.js → CreatedOnDcom-pt-pt-C60roAt5.js} +1 -1
  15. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +1 -8
  16. package/lib/src/brand-page-maker/utils/rich-text-editor.util.d.ts +0 -8
  17. package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +10 -56
  18. package/lib/src/css/library.brand-page-brandCrowd.min.css +1 -1
  19. package/lib/src/css/library.brand-page-brandPage.min.css +1 -1
  20. package/lib/src/css/library.brand-page-designCom.min.css +1 -1
  21. package/lib/src/css/library.brand-page-preview.min.css +1 -1
  22. package/lib/src/index.mjs +1 -1
  23. package/lib/src/{lib-CCIsFrCY.js → lib-C9NGI-t2.js} +6462 -6491
  24. package/package.json +1 -1
  25. package/src/brand-page/components/text-wrapper/TextWrapper.vue +1 -1
  26. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +0 -12
  27. package/src/brand-page-maker/utils/rich-text-editor.util.test.ts +0 -51
  28. package/src/brand-page-maker/utils/rich-text-editor.util.ts +10 -72
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CCIsFrCY.js";
2
+ import { _ as t } from "./lib-C9NGI-t2.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-CCIsFrCY.js";
2
+ import { _ as t } from "./lib-C9NGI-t2.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-CCIsFrCY.js";
2
+ import { _ as t } from "./lib-C9NGI-t2.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-CCIsFrCY.js";
2
+ import { _ as t } from "./lib-C9NGI-t2.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-CCIsFrCY.js";
2
+ import { _ as t } from "./lib-C9NGI-t2.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-CCIsFrCY.js";
2
+ import { _ as t } from "./lib-C9NGI-t2.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-CCIsFrCY.js";
2
+ import { _ as t } from "./lib-C9NGI-t2.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-CCIsFrCY.js";
2
+ import { _ as e } from "./lib-C9NGI-t2.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-CCIsFrCY.js";
2
+ import { _ as e } from "./lib-C9NGI-t2.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-CCIsFrCY.js";
2
+ import { _ as e } from "./lib-C9NGI-t2.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-CCIsFrCY.js";
2
+ import { _ as e } from "./lib-C9NGI-t2.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-CCIsFrCY.js";
2
+ import { _ as e } from "./lib-C9NGI-t2.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-CCIsFrCY.js";
2
+ import { _ as M } from "./lib-C9NGI-t2.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-CCIsFrCY.js";
2
+ import { _ as M } from "./lib-C9NGI-t2.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -11,7 +11,7 @@ import { useUiPageSettingsStore } from '@shared/page-settings/store';
11
11
  import { PAGE_SECTIONS } from '@shared/page-settings/models';
12
12
  import { EVENTS, SELECT_LOCATIONS, useEventTracker, } from '@brand-page-maker/composables/useEventTracker';
13
13
  import debounce from 'lodash.debounce';
14
- import { transformToRTE, fixHighlightLineHeightsOnLoad, RTE_ALLOWED_SECTION_TYPES, } from '@brand-page-maker/utils';
14
+ import { transformToRTE, RTE_ALLOWED_SECTION_TYPES, } from '@brand-page-maker/utils';
15
15
  import { useExternalRichTextEditor } from '@brand-page-maker/composables/rich-text-editor/useRichTextEditor';
16
16
  import { useUiStyleSettingsStore } from '@shared/style-settings/store';
17
17
  import { STYLE_THEME_KEYS } from '@brand-page/constants';
@@ -127,13 +127,6 @@ export default defineComponent({
127
127
  },
128
128
  mounted() {
129
129
  this.dispatchViewPortChangeEvent();
130
- // Fix highlight overlap on initial load: spans with line-height < 1.2
131
- // cause <mark> backgrounds to overlap adjacent lines. Bump them to the
132
- // global style value. Only runs for items with textStyleType = None
133
- // (those with a type are already handled by transformToRTE on click).
134
- if (this.canUseRichTextEditor) {
135
- fixHighlightLineHeightsOnLoad(this.pageSettingsStore, this.styleSettingsStore);
136
- }
137
130
  },
138
131
  watch: {
139
132
  viewport() {
@@ -11,14 +11,6 @@ export declare const skipStyleDetection: (chain: ChainedCommands, marks?: Mark[]
11
11
  export declare const hasRTEContent: (content: string) => boolean;
12
12
  export declare const getPlainTextFromRTE: (content: string) => string;
13
13
  export declare const replaceTextInRTE: (existingHtml: string, newText: string) => string;
14
- /**
15
- * On initial load, content items whose textStyleType is not set (None) are
16
- * skipped by transformToRTE, leaving their spans with the fixture's default
17
- * line-height (e.g. 1.1). When a <mark> highlight is present this causes
18
- * visible overlap between lines. Bumps any span with line-height < 1.2 to
19
- * the global style value — no TipTap needed.
20
- */
21
- export declare const fixHighlightLineHeightsOnLoad: (uiPageSettingStore: PageSettingsState, uiStyleSettingsStore: StyleSettingsState) => void;
22
14
  export declare const transformToRTE: (uiPageSettingStore: PageSettingsState, externalEditor: Editor, uiStyleSettingsStore?: StyleSettingsState, newContent?: Content, type?: TextStyleType, newStyle?: TextStyleDeclaration) => void;
23
15
  export declare const switchAllContentToRTE: (uiPageSettingStore: PageSettingsState, externalEditor: Editor, uiStyleSettingsStore?: StyleSettingsState) => void;
24
16
  export declare const getUpdatedHTMLFromEditor: (externalEditor: Editor, contentText: string, newContentStyle: TextStyleDeclaration) => string;
@@ -1,4 +1,4 @@
1
- import { STYLE_THEME_KEYS, TEXT_STYLE_TYPES, } from '@brand-page';
1
+ import { STYLE_THEME_KEYS, } from '@brand-page';
2
2
  import { ESCAPED_NEWLINE_CHARACTER } from '@src/constants/ui';
3
3
  import { getRenderText } from '@brand-page/utils';
4
4
  import createDomPurify, {} from 'dompurify';
@@ -173,13 +173,15 @@ export const replaceTextInRTE = (existingHtml, newText) => {
173
173
  };
174
174
  // Iterate through all spans to collect and merge styles
175
175
  spans.forEach((span) => {
176
- // Use getPropertyValue per allowed property instead of parsing cssText.
177
- // cssText.split(':') breaks for multi-colon values like rgb(), var(), etc.
178
- for (const property of allowedCSSProperties) {
179
- const value = span.style.getPropertyValue(property);
180
- if (value) {
181
- mergedStyles[property] = value; // Latest value overwrites previous
182
- }
176
+ // Collect inline styles
177
+ if (span.style.cssText) {
178
+ const styleDeclarations = span.style.cssText.split(';');
179
+ styleDeclarations.forEach((declaration) => {
180
+ const [property, value] = declaration.split(':').map((s) => s.trim());
181
+ if (property && value) {
182
+ mergedStyles[property] = value; // Latest value overwrites previous
183
+ }
184
+ });
183
185
  }
184
186
  // Collect data attributes (like data-color for marks)
185
187
  if (span.hasAttribute('data-color')) {
@@ -254,54 +256,6 @@ export const replaceTextInRTE = (existingHtml, newText) => {
254
256
  blockElement.appendChild(newSpan);
255
257
  return tempDiv.innerHTML;
256
258
  };
257
- /**
258
- * On initial load, content items whose textStyleType is not set (None) are
259
- * skipped by transformToRTE, leaving their spans with the fixture's default
260
- * line-height (e.g. 1.1). When a <mark> highlight is present this causes
261
- * visible overlap between lines. Bumps any span with line-height < 1.2 to
262
- * the global style value — no TipTap needed.
263
- */
264
- export const fixHighlightLineHeightsOnLoad = (uiPageSettingStore, uiStyleSettingsStore) => {
265
- const lh = (type) => uiStyleSettingsStore.textStyles.textStyleOptions[TEXT_STYLE_TYPES[type]]
266
- ?.style?.lineHeight;
267
- const titlesLH = lh('titles');
268
- const headingsLH = lh('headings');
269
- const paragraphsLH = lh('paragraphs');
270
- const fix = (html, lineHeight) => {
271
- if (!lineHeight || !/<mark\b/i.test(html))
272
- return html;
273
- const div = document.createElement('div');
274
- div.innerHTML = html;
275
- div.querySelectorAll('span').forEach((span) => {
276
- const current = parseFloat(span.style.lineHeight);
277
- if (!isNaN(current) && current < 1.2)
278
- span.style.lineHeight = lineHeight;
279
- });
280
- return div.innerHTML;
281
- };
282
- for (const page of uiPageSettingStore.pages) {
283
- for (const contentItem of page.contents) {
284
- if (!RTE_ALLOWED_SECTION_TYPES.includes(contentItem.type))
285
- continue;
286
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
287
- const c = contentItem.settings.content;
288
- if ('titleStyle' in c && !c.titleStyle?.textStyleType)
289
- c.title = fix(c.title, contentItem.type === 'profile' ? headingsLH : titlesLH);
290
- if ('nameStyle' in c && !c.nameStyle?.textStyleType)
291
- c.name = fix(c.name, titlesLH);
292
- if ('descriptionStyle' in c && !c.descriptionStyle?.textStyleType)
293
- c.description = fix(c.description, paragraphsLH);
294
- if (c.textItems?.length) {
295
- for (const item of c.textItems)
296
- if (!item.textStyle?.textStyleType)
297
- item.text = fix(item.text, paragraphsLH);
298
- }
299
- else if ('textStyle' in c && !c.textStyle?.textStyleType) {
300
- c.text = fix(c.text, paragraphsLH);
301
- }
302
- }
303
- }
304
- };
305
259
  export const transformToRTE = (uiPageSettingStore, externalEditor, uiStyleSettingsStore, newContent, type, newStyle) => {
306
260
  for (const page of uiPageSettingStore.pages) {
307
261
  for (const contentItem of page.contents) {
@@ -5568,7 +5568,7 @@ input[data-v-4cd691db]::-webkit-inner-spin-button {
5568
5568
  max-height: 45vh;
5569
5569
  }
5570
5570
 
5571
- .empty-para[data-v-c9046a90] p:empty::after {
5571
+ .empty-para[data-v-5a056a60] p:empty::after {
5572
5572
  content: '\00A0';
5573
5573
  }
5574
5574
 
@@ -5882,7 +5882,7 @@ input[data-v-4cd691db]::-webkit-inner-spin-button {
5882
5882
  max-height: 45vh;
5883
5883
  }
5884
5884
 
5885
- .empty-para[data-v-c9046a90] p:empty::after {
5885
+ .empty-para[data-v-5a056a60] p:empty::after {
5886
5886
  content: '\00A0';
5887
5887
  }
5888
5888
 
@@ -5598,7 +5598,7 @@ input[data-v-4cd691db]::-webkit-inner-spin-button {
5598
5598
  max-height: 45vh;
5599
5599
  }
5600
5600
 
5601
- .empty-para[data-v-c9046a90] p:empty::after {
5601
+ .empty-para[data-v-5a056a60] p:empty::after {
5602
5602
  content: '\00A0';
5603
5603
  }
5604
5604
 
@@ -5296,7 +5296,7 @@ input[data-v-4cd691db]::-webkit-inner-spin-button {
5296
5296
  max-height: 45vh;
5297
5297
  }
5298
5298
 
5299
- .bp .empty-para[data-v-c9046a90] p:empty::after {
5299
+ .bp .empty-para[data-v-5a056a60] p:empty::after {
5300
5300
  content: '\00A0';
5301
5301
  }
5302
5302
 
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-CCIsFrCY.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-C9NGI-t2.js";
2
2
  import { createPinia as wE, setActivePinia as ZE } from "pinia";
3
3
  export {
4
4
  E as ABOUT_SECTION_SETTINGS_CONFIG,