@enyxs/wikex-components 0.11.25 → 0.11.26
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/dist/consultation-model.d.mts +1 -11
- package/dist/consultation-model.d.ts +1 -11
- package/dist/consultation-model.js +0 -8
- package/dist/consultation-model.js.map +1 -1
- package/dist/consultation-model.mjs +0 -7
- package/dist/consultation-model.mjs.map +1 -1
- package/dist/consultations.d.mts +3 -6
- package/dist/consultations.d.ts +3 -6
- package/dist/consultations.js +48 -106
- package/dist/consultations.js.map +1 -1
- package/dist/consultations.mjs +49 -107
- package/dist/consultations.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -363,6 +363,7 @@ function parseCmsRichText(value4) {
|
|
|
363
363
|
if (typeof mark.italic === "boolean") next.italic = mark.italic;
|
|
364
364
|
if (typeof mark.underline === "boolean") next.underline = mark.underline;
|
|
365
365
|
if (typeof mark.href === "string") next.href = safeCmsTextHref(mark.href);
|
|
366
|
+
if (next.href && typeof mark.newTab === "boolean") next.newTab = mark.newTab;
|
|
366
367
|
if (next.bold !== void 0 || next.italic !== void 0 || next.underline !== void 0 || next.href) marks.push(next);
|
|
367
368
|
}
|
|
368
369
|
return { text: raw.text, marks };
|
|
@@ -400,6 +401,7 @@ function patchCmsRichText(value4, text2, start, end, patch) {
|
|
|
400
401
|
rich.marks.filter((m) => m.start <= a && m.end >= b).forEach((m) => Object.assign(style, m));
|
|
401
402
|
if (a >= start && b <= end) Object.assign(style, patch);
|
|
402
403
|
const next = { start: a, end: b, bold: style.bold, italic: style.italic, underline: style.underline, newTab: style.newTab, href: style.href ? safeCmsTextHref(style.href) : void 0 };
|
|
404
|
+
if (!next.href) delete next.newTab;
|
|
403
405
|
if (next.bold === void 0 && next.italic === void 0 && next.underline === void 0 && !next.href) continue;
|
|
404
406
|
const previous = marks[marks.length - 1];
|
|
405
407
|
if (previous && previous.end === a && previous.bold === next.bold && previous.italic === next.italic && previous.underline === next.underline && previous.href === next.href && previous.newTab === next.newTab) previous.end = b;
|