UNPKG

@uva-glass/component-library

Version:

React components UvA

41 lines (40 loc) 1.57 kB
import { h as s } from "../../LexicalLink.prod-Du8ZoNsh.js"; import { j as n, K as i } from "../../LexicalList.prod-BUcoZhe4.js"; import { ac as a, J as c } from "../../Lexical.prod-CniF7zEE.js"; import { Z as m, O as g, y as u } from "../../LexicalTable.prod-CYafu_j9.js"; const h = (e) => /^<(b|i|u|strong|em|mark|small|del|ins|sub|sup|div|p|span|h[1-6]|a|img|table|tr|td|th|ul|ol|li|blockquote|pre|code|br)(\s+[^>]*)?>/i.test(e.trim()), y = (e) => { let r = e.replace(/<b><strong>/gi, "<strong>"); return r = r.replace(/<\/strong><\/b>/gi, "</strong>"), r; }, l = (e, r) => { const t = r.exportDOM(e); if (t && t.element instanceof HTMLElement) for (const o of [t.element, ...t.element.querySelectorAll('[style],[class],[dir="ltr"]')]) o.removeAttribute("class"), o.getAttribute("style") && (o.setAttribute("style", ""), o.removeAttribute("style")), o.getAttribute("dir") === "ltr" && o.removeAttribute("dir"); return t; }, v = /* @__PURE__ */ new Map([ [a, l], [c, l], [n, l], [i, l], [m, l], [g, l], [u, l], [s, l] ]), A = (e) => { document.querySelectorAll("*").forEach((t) => { t.scrollHeight > t.clientHeight && t.addEventListener("scroll", e); }); }, S = (e) => { document.querySelectorAll("*").forEach((t) => { t.scrollHeight > t.clientHeight && t.removeEventListener("scroll", e); }); }; export { v as exportMap, h as isStartingWithHtmlTag, y as mergeBoldStrongTags, S as removeScrollableContainers, l as removeStylesExportDOM, A as setScrollableContainers }; //# sourceMappingURL=helpers.js.map