@clevertask/scribe 0.1.30 → 0.1.32

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 (53) hide show
  1. package/README.md +5 -2
  2. package/dist/{BarMenu-Bban-B3t.js → BarMenu-Bm5IfWVV.js} +1 -1
  3. package/dist/components/Menu/BarMenu.js +1 -2
  4. package/dist/components/Menu/BubbleMenu.js +2 -2
  5. package/dist/components/Menu/CalloutBubbleMenu.js +2 -2
  6. package/dist/components/Menu/LinkBubbleMenu.d.ts.map +1 -1
  7. package/dist/components/Menu/LinkBubbleMenu.js +70 -48
  8. package/dist/components/Menu/LinkEditor.js +4 -12
  9. package/dist/components/Menu/Mobile/ListOptionBar.js +1 -1
  10. package/dist/components/Menu/TableBubbleMenu.js +3 -3
  11. package/dist/components/Menu/TableHeightSettings.js +3 -11
  12. package/dist/components/Menu/TableLayoutOptions.js +1 -5
  13. package/dist/components/Menu/linkBubbleMenuPlugin.js +1 -1
  14. package/dist/components/Scribe/extension/callout.js +1 -1
  15. package/dist/components/Scribe/extension/emoji/suggest.js +2 -2
  16. package/dist/components/Scribe/extension/extension-link.js +1 -2
  17. package/dist/components/Scribe/extension/extension-markdown-paste.js +2 -2
  18. package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
  19. package/dist/components/Scribe/extension/external-link-preview/commands.js +2 -2
  20. package/dist/components/Scribe/extension/external-link-preview/render-html.js +1 -1
  21. package/dist/components/Scribe/extension/external-link-preview/schema.js +1 -1
  22. package/dist/components/Scribe/extension/external-link-preview/serialization.js +1 -7
  23. package/dist/components/Scribe/extension/index.js +1 -2
  24. package/dist/components/Scribe/extension/resizable-table.js +2 -2
  25. package/dist/components/Scribe/extension/slashCommand/SlashCommandList.js +10 -14
  26. package/dist/components/Scribe/extension/slashCommand/index.js +2 -2
  27. package/dist/components/Scribe/extension/slashCommand/renderItems.js +2 -2
  28. package/dist/components/Scribe/extension/table-layout.js +1 -2
  29. package/dist/components/Scribe/extension/tableOfContents.js +1 -1
  30. package/dist/components/Scribe/index.d.ts.map +1 -1
  31. package/dist/components/Scribe/index.js +8 -22
  32. package/dist/{dist-DGEcUiqG.js → dist-BoAzo5MN.js} +27 -37
  33. package/dist/{dist-TKt66Yz8.js → dist-BqlzKS-_.js} +9 -17
  34. package/dist/{dist-ZGDUiMX8.js → dist-SM4NoN4h.js} +61 -64
  35. package/dist/document-node-capabilities.js +1 -1
  36. package/dist/{extension-I7Ocj_D_.js → extension-dz0CIf3r.js} +1 -1
  37. package/dist/{extension-link-Cb1UO6hv.js → extension-link-DxIXGCtV.js} +3 -11
  38. package/dist/{html-to-markdown-DF93it73.js → html-to-markdown-DeRG9OPm.js} +1 -1
  39. package/dist/main.css +1 -0
  40. package/dist/main.js +2 -2
  41. package/dist/{markdown-to-html-BoK5O_j-.js → markdown-to-html-tCPjQ5u6.js} +23 -70
  42. package/dist/{menus-BrQTLTFL.js → menus-BKxcTUsl.js} +23 -105
  43. package/dist/{purify.es-q6CUdJQi.js → purify.es-CSWcs7f1.js} +1 -23
  44. package/dist/{schema-extensions-CzDKrIf8.js → schema-extensions-B9hR1VrD.js} +17 -42
  45. package/dist/schema-extensions.js +1 -2
  46. package/dist/schema.js +1 -1
  47. package/dist/{table-layout-Dt7KmVp_.js → table-layout-ClqaGg1E.js} +1 -1
  48. package/dist/{tippy.esm-MjWnmeEn.js → tippy.esm-C8V6GlaF.js} +5 -17
  49. package/dist/utils/create-scribe-editor.js +1 -2
  50. package/dist/utils/html-to-markdown.js +1 -2
  51. package/dist/utils/index.js +4 -4
  52. package/dist/utils/markdown-to-html.js +1 -2
  53. package/package.json +10 -10
@@ -1,6 +1,6 @@
1
1
  import { normalizeExternalLinkPreviewsInTree as e } from "./components/Scribe/extension/external-link-preview/serialization.js";
2
- import { t } from "./purify.es-q6CUdJQi.js";
3
- //#region node_modules/.pnpm/marked@18.0.14/node_modules/marked/lib/marked.esm.js
2
+ import { t } from "./purify.es-CSWcs7f1.js";
3
+ //#region node_modules/.pnpm/marked@18.1.0/node_modules/marked/lib/marked.esm.js
4
4
  function n() {
5
5
  return {
6
6
  async: !1,
@@ -130,7 +130,7 @@ var c = ((e = "") => {
130
130
  fences: a,
131
131
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
132
132
  paragraph: s(v).replace("hr", p).replace("heading", " *#{1,6} *[^\n]").replace("lheading", _).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
133
- }, le = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ue = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, T = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, de = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, E = /[\p{P}\p{S}]/u, D = /[\s\p{P}\p{S}]/u, O = /[^\s\p{P}\p{S}]/u, fe = s(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, D).getRegex(), pe = /[\p{Pi}\p{Ps}"']/u, k = /(?!~)[\p{P}\p{S}]/u, me = /(?!~)[\s\p{P}\p{S}]/u, he = /(?:[^\s\p{P}\p{S}]|~)/u, ge = s(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", c ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), A = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, _e = s(A, "u").replace(/punct/g, E).getRegex(), ve = s(A, "u").replace(/punct/g, k).getRegex(), ye = s(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, pe).replace(/punct/g, E).getRegex(), j = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", be = s(j, "gu").replace(/notPunctSpace/g, O).replace(/punctSpace/g, D).replace(/punct/g, E).getRegex(), xe = s(j, "gu").replace(/notPunctSpace/g, he).replace(/punctSpace/g, me).replace(/punct/g, k).getRegex(), Se = s("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, O).replace(/punctSpace/g, D).replace(/punct/g, E).getRegex(), Ce = s("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, O).replace(/punctSpace/g, D).replace(/punct/g, E).getRegex(), we = s("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, O).replace(/punctSpace/g, D).replace(/punct/g, E).getRegex(), Te = s(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, E).getRegex(), Ee = s("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, O).replace(/punctSpace/g, D).replace(/punct/g, E).getRegex(), De = s(/\\(punct)/, "gu").replace(/punct/g, E).getRegex(), Oe = s(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), ke = s(x).replace("(?:-->|$)", "-->").getRegex(), Ae = s("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ke).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), M = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, N = s(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", M).getRegex(), je = s(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", N).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Me = s(/^!?\[(label)\]\[(ref)\]/).replace("label", N).replace("ref", y).getRegex(), Ne = s(/^!?\[(ref)\](?:\[\])?/).replace("ref", y).getRegex(), P = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, Pe = s(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", M).getRegex(), Fe = s("reflink|nolink(?!\\()", "g").replace("reflink", s(/^!?\[(label)\]\[(ref)\]/).replace("label", Pe).replace("ref", P).getRegex()).replace("nolink", s(/^!?\[(ref)\](?:\[\])?/).replace("ref", P).getRegex()).getRegex(), F = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Ie = s(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), I = {
133
+ }, le = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ue = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, T = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, de = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, E = /[\p{P}\p{S}]/u, D = /[\s\p{P}\p{S}]/u, O = /[^\s\p{P}\p{S}]/u, fe = s(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, D).getRegex(), pe = /[\p{Pi}\p{Ps}"']/u, k = /(?!~)[\p{P}\p{S}]/u, me = /(?!~)[\s\p{P}\p{S}]/u, he = /(?:[^\s\p{P}\p{S}]|~)/u, ge = s(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", c ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), A = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, _e = s(A, "u").replace(/punct/g, E).getRegex(), ve = s(A, "u").replace(/punct/g, k).getRegex(), ye = s(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, pe).replace(/punct/g, E).getRegex(), j = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", be = s(j, "gu").replace(/notPunctSpace/g, O).replace(/punctSpace/g, D).replace(/punct/g, E).getRegex(), xe = s(j, "gu").replace(/notPunctSpace/g, he).replace(/punctSpace/g, me).replace(/punct/g, k).getRegex(), Se = s("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, O).replace(/punctSpace/g, D).replace(/punct/g, E).getRegex(), Ce = s("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, O).replace(/punctSpace/g, D).replace(/punct/g, E).getRegex(), we = s("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, O).replace(/punctSpace/g, D).replace(/punct/g, E).getRegex(), Te = s(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, E).getRegex(), Ee = s("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, O).replace(/punctSpace/g, D).replace(/punct/g, E).getRegex(), De = s(/\\(punct)/, "gu").replace(/punct/g, E).getRegex(), Oe = s(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), ke = s(x).replace("(?:-->|$)", "-->").getRegex(), Ae = s("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ke).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), M = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, N = s(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", M).getRegex(), je = s(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label", N).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Me = s(/^!?\[(label)\]\[(ref)\]/).replace("label", N).replace("ref", y).getRegex(), Ne = s(/^!?\[(ref)\](?:\[\])?/).replace("ref", y).getRegex(), P = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, Pe = s(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", M).getRegex(), Fe = s("reflink|nolink(?!\\()", "g").replace("reflink", s(/^!?\[(label)\]\[(ref)\]/).replace("label", Pe).replace("ref", P).getRegex()).replace("nolink", s(/^!?\[(ref)\](?:\[\])?/).replace("ref", P).getRegex()).getRegex(), F = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Ie = s(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), I = {
134
134
  _backpedal: a,
135
135
  anyPunctuation: De,
136
136
  autolink: Oe,
@@ -243,7 +243,7 @@ function G(e) {
243
243
  return e.trim().toLowerCase().toUpperCase().toLowerCase();
244
244
  }
245
245
  function He(e, t) {
246
- if (e.indexOf(t[1]) === -1) return -1;
246
+ if (e.indexOf(t[0]) === -1 && e.indexOf(t[1]) === -1) return -1;
247
247
  let n = 0;
248
248
  for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
249
249
  else if (e[r] === t[0]) n++;
@@ -405,7 +405,6 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
405
405
  if (u?.type === "list") {
406
406
  let t = u, a = t.raw + "\n" + e.join("\n"), o = this.list(a);
407
407
  i[i.length - 1] = o, n = n.substring(0, n.length - u.raw.length) + o.raw, r = r.substring(0, r.length - t.raw.length) + o.raw, e = a.substring(i.at(-1).raw.length).split("\n");
408
- continue;
409
408
  }
410
409
  }
411
410
  return {
@@ -511,6 +510,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
511
510
  def(e) {
512
511
  let t = this.rules.block.def.exec(e);
513
512
  if (t) {
513
+ if (!this.rules.other.startAngleBracket.test(t[2]) && He(t[2], "()") !== -1) return;
514
514
  let e = G(t[1]).replace(this.rules.other.multipleSpaceGlobal, " "), n = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
515
515
  return {
516
516
  type: "def",
@@ -602,6 +602,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
602
602
  };
603
603
  }
604
604
  link(e) {
605
+ if (this.lexer.state.linkParenPossible === !1) return;
605
606
  let t = this.rules.inline.link.exec(e);
606
607
  if (t) {
607
608
  let n = t[0].charAt(0) === "!" ? 2 : 1;
@@ -793,6 +794,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
793
794
  inLink: !1,
794
795
  inRawBlock: !1,
795
796
  linkEmitted: !1,
797
+ linkParenPossible: !0,
796
798
  top: !0
797
799
  };
798
800
  let t = {
@@ -845,27 +847,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
845
847
  n?.type === "paragraph" || n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + i.raw, n.text += "\n" + i.text, this.inlineQueue.at(-1).src = n.text) : t.push(i);
846
848
  continue;
847
849
  }
848
- if (i = this.tokenizer.fences(e)) {
849
- e = e.substring(i.raw.length), t.push(i);
850
- continue;
851
- }
852
- if (i = this.tokenizer.heading(e)) {
853
- e = e.substring(i.raw.length), t.push(i);
854
- continue;
855
- }
856
- if (i = this.tokenizer.hr(e)) {
857
- e = e.substring(i.raw.length), t.push(i);
858
- continue;
859
- }
860
- if (i = this.tokenizer.blockquote(e)) {
861
- e = e.substring(i.raw.length), t.push(i);
862
- continue;
863
- }
864
- if (i = this.tokenizer.list(e)) {
865
- e = e.substring(i.raw.length), t.push(i);
866
- continue;
867
- }
868
- if (i = this.tokenizer.html(e)) {
850
+ if ((i = this.tokenizer.fences(e)) || (i = this.tokenizer.heading(e)) || (i = this.tokenizer.hr(e)) || (i = this.tokenizer.blockquote(e)) || (i = this.tokenizer.list(e)) || (i = this.tokenizer.html(e))) {
869
851
  e = e.substring(i.raw.length), t.push(i);
870
852
  continue;
871
853
  }
@@ -878,11 +860,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
878
860
  }, t.push(i));
879
861
  continue;
880
862
  }
881
- if (i = this.tokenizer.table(e)) {
882
- e = e.substring(i.raw.length), t.push(i);
883
- continue;
884
- }
885
- if (i = this.tokenizer.lheading(e)) {
863
+ if ((i = this.tokenizer.table(e)) || (i = this.tokenizer.lheading(e))) {
886
864
  e = e.substring(i.raw.length), t.push(i);
887
865
  continue;
888
866
  }
@@ -896,15 +874,11 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
896
874
  if (this.state.top && (i = this.tokenizer.paragraph(a))) {
897
875
  let r = t.at(-1);
898
876
  n && r?.type === "paragraph" ? (r.raw += (r.raw.endsWith("\n") ? "" : "\n") + i.raw, r.text += "\n" + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = r.text) : t.push(i), n = a.length !== e.length, e = e.substring(i.raw.length);
899
- continue;
900
- }
901
- if (i = this.tokenizer.text(e)) {
877
+ } else if (i = this.tokenizer.text(e)) {
902
878
  e = e.substring(i.raw.length);
903
879
  let n = t.at(-1);
904
880
  n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + i.raw, n.text += "\n" + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = n.text) : t.push(i);
905
- continue;
906
- }
907
- if (e) {
881
+ } else if (e) {
908
882
  this.infiniteLoopError(e.charCodeAt(0));
909
883
  break;
910
884
  }
@@ -929,6 +903,15 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
929
903
  }
930
904
  inlineTokens(e, t = []) {
931
905
  this.tokenizer.lexer = this;
906
+ let n = this.state.linkParenPossible;
907
+ this.state.linkParenPossible = n && e.includes(")");
908
+ try {
909
+ return this.#e(e, t);
910
+ } finally {
911
+ this.state.linkParenPossible = n;
912
+ }
913
+ }
914
+ #e(e, t) {
932
915
  let n = e;
933
916
  if (this.tokens.links && e.includes("[")) {
934
917
  let e = this.tokenizer.rules.inline.reflinkSearch, t = (n) => {
@@ -956,15 +939,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
956
939
  r || (i = ""), r = !1;
957
940
  let o;
958
941
  if (this.options.extensions?.inline?.some((n) => (o = n.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), !0) : !1)) continue;
959
- if (o = this.tokenizer.escape(e)) {
960
- e = e.substring(o.raw.length), t.push(o);
961
- continue;
962
- }
963
- if (o = this.tokenizer.tag(e)) {
964
- e = e.substring(o.raw.length), t.push(o);
965
- continue;
966
- }
967
- if (o = this.tokenizer.link(e)) {
942
+ if ((o = this.tokenizer.escape(e)) || (o = this.tokenizer.tag(e)) || (o = this.tokenizer.link(e))) {
968
943
  e = e.substring(o.raw.length), t.push(o);
969
944
  continue;
970
945
  }
@@ -974,27 +949,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
974
949
  o.type === "text" && n?.type === "text" ? (n.raw += o.raw, n.text += o.text) : t.push(o);
975
950
  continue;
976
951
  }
977
- if (o = this.tokenizer.emStrong(e, n, i)) {
978
- e = e.substring(o.raw.length), t.push(o);
979
- continue;
980
- }
981
- if (o = this.tokenizer.codespan(e)) {
982
- e = e.substring(o.raw.length), t.push(o);
983
- continue;
984
- }
985
- if (o = this.tokenizer.br(e)) {
986
- e = e.substring(o.raw.length), t.push(o);
987
- continue;
988
- }
989
- if (o = this.tokenizer.del(e, n, i)) {
990
- e = e.substring(o.raw.length), t.push(o);
991
- continue;
992
- }
993
- if (o = this.tokenizer.autolink(e)) {
994
- e = e.substring(o.raw.length), t.push(o);
995
- continue;
996
- }
997
- if (!this.state.inLink && (o = this.tokenizer.url(e))) {
952
+ if ((o = this.tokenizer.emStrong(e, n, i)) || (o = this.tokenizer.codespan(e)) || (o = this.tokenizer.br(e)) || (o = this.tokenizer.del(e, n, i)) || (o = this.tokenizer.autolink(e)) || !this.state.inLink && (o = this.tokenizer.url(e))) {
998
953
  e = e.substring(o.raw.length), t.push(o);
999
954
  continue;
1000
955
  }
@@ -1009,9 +964,7 @@ ${d.join("\n")}`), r = r.substring(0, r.length - t.text.length) + s.text;
1009
964
  e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (i = o.raw.slice(-1)), r = !0;
1010
965
  let n = t.at(-1);
1011
966
  n?.type === "text" ? (n.raw += o.raw, n.text += o.text) : t.push(o);
1012
- continue;
1013
- }
1014
- if (e) {
967
+ } else if (e) {
1015
968
  this.infiniteLoopError(e.charCodeAt(0));
1016
969
  break;
1017
970
  }
@@ -1,6 +1,6 @@
1
- import { D as e, E as t, F as n, U as r, n as i } from "./dist-DGEcUiqG.js";
1
+ import { D as e, E as t, F as n, U as r, n as i } from "./dist-BoAzo5MN.js";
2
2
  import { a, c as o, i as s, l as c, n as l, o as u, s as d, t as f, u as p } from "./floating-ui.dom-CmJ6iBdh.js";
3
- import { r as m } from "./dist-ZGDUiMX8.js";
3
+ import { r as m } from "./dist-SM4NoN4h.js";
4
4
  import { NodeSelection as h, Plugin as g, PluginKey as _ } from "@tiptap/pm/state";
5
5
  import { CellSelection as v } from "@tiptap/pm/tables";
6
6
  import y, { useEffect as b, useLayoutEffect as x, useRef as S, useState as C } from "react";
@@ -72,15 +72,7 @@ var E = class {
72
72
  }, this.focusHandler = () => {
73
73
  setTimeout(() => this.update(this.editor.view));
74
74
  }, this.blurHandler = ({ event: e }) => {
75
- if (this.editor.isDestroyed) {
76
- this.destroy();
77
- return;
78
- }
79
- if (this.preventHide) {
80
- this.preventHide = !1;
81
- return;
82
- }
83
- e?.relatedTarget && this.element.parentNode?.contains(e.relatedTarget) || e?.relatedTarget !== this.editor.view.dom && this.hide();
75
+ this.editor.isDestroyed ? this.destroy() : this.preventHide ? this.preventHide = !1 : e?.relatedTarget && this.element.parentNode?.contains(e.relatedTarget) || e?.relatedTarget !== this.editor.view.dom && this.hide();
84
76
  }, this.handleDebouncedUpdate = (e, t) => {
85
77
  let n = !t?.selection.eq(e.state.selection), r = !t?.doc.eq(e.state.doc);
86
78
  (n || r) && (this.updateDebounceTimer && clearTimeout(this.updateDebounceTimer), this.updateDebounceTimer = window.setTimeout(() => {
@@ -88,13 +80,7 @@ var E = class {
88
80
  }, this.updateDelay));
89
81
  }, this.updateHandler = (e, t, n, r) => {
90
82
  let { composing: i } = e;
91
- if (!(i || !t && !n)) {
92
- if (!this.getShouldShow(r)) {
93
- this.hide();
94
- return;
95
- }
96
- this.show(), this.updatePosition();
97
- }
83
+ i || !t && !n || (this.getShouldShow(r) ? (this.show(), this.updatePosition()) : this.hide());
98
84
  }, this.transactionHandler = ({ transaction: e }) => {
99
85
  let t = e.getMeta(this.pluginKey);
100
86
  t === "updatePosition" ? this.updatePosition() : t && typeof t == "object" && t.type === "updateOptions" ? this.updateOptions(t.options) : t === "hide" ? this.hide() : t === "show" && (this.updatePosition(), this.show());
@@ -111,13 +97,7 @@ var E = class {
111
97
  strategy: this.floatingUIOptions.strategy,
112
98
  middleware: this.middlewares
113
99
  }).then(({ x: e, y: t, strategy: n, middlewareData: r }) => {
114
- if (this.isVisible && !this.editor.isDestroyed && this.element.isConnected) {
115
- if (r.hide?.referenceHidden || r.hide?.escaped) {
116
- this.element.style.visibility = "hidden";
117
- return;
118
- }
119
- this.element.style.visibility = "visible", this.element.style.width = "max-content", this.element.style.position = n, this.element.style.left = `${e}px`, this.element.style.top = `${t}px`, this.isVisible && this.floatingUIOptions.onUpdate && this.floatingUIOptions.onUpdate();
120
- }
100
+ this.isVisible && !this.editor.isDestroyed && this.element.isConnected && (r.hide?.referenceHidden || r.hide?.escaped ? this.element.style.visibility = "hidden" : (this.element.style.visibility = "visible", this.element.style.width = "max-content", this.element.style.position = n, this.element.style.left = `${e}px`, this.element.style.top = `${t}px`, this.isVisible && this.floatingUIOptions.onUpdate && this.floatingUIOptions.onUpdate()));
121
101
  });
122
102
  }
123
103
  update(e, t) {
@@ -143,7 +123,7 @@ var E = class {
143
123
  }
144
124
  show() {
145
125
  var e;
146
- this.isVisible || (this.element.style.visibility = "visible", this.element.style.opacity = "1", (e = (typeof this.appendTo == "function" ? this.appendTo() : this.appendTo) ?? this.view.dom.parentElement) == null || e.appendChild(this.element), this.floatingUIOptions.onShow && this.floatingUIOptions.onShow(), this.isVisible = !0);
126
+ this.isVisible ||= (this.element.style.visibility = "visible", this.element.style.opacity = "1", (e = (typeof this.appendTo == "function" ? this.appendTo() : this.appendTo) ?? this.view.dom.parentElement) == null || e.appendChild(this.element), this.floatingUIOptions.onShow && this.floatingUIOptions.onShow(), !0);
147
127
  }
148
128
  hide() {
149
129
  this.isVisible &&= (this.element.style.visibility = "hidden", this.element.style.opacity = "0", this.element.remove(), this.floatingUIOptions.onHide && this.floatingUIOptions.onHide(), !1);
@@ -218,23 +198,13 @@ var O = class {
218
198
  inline: !1
219
199
  }, this.updateHandler = (e, t, n, r) => {
220
200
  let { composing: i } = e;
221
- if (!(i || !t && !n)) {
222
- if (!this.getShouldShow(r)) {
223
- this.hide();
224
- return;
225
- }
226
- this.updatePosition(), this.show();
227
- }
201
+ i || !t && !n || (this.getShouldShow(r) ? (this.updatePosition(), this.show()) : this.hide());
228
202
  }, this.mousedownHandler = () => {
229
203
  this.preventHide = !0;
230
204
  }, this.focusHandler = () => {
231
205
  setTimeout(() => this.update(this.editor.view));
232
206
  }, this.blurHandler = ({ event: e }) => {
233
- if (this.preventHide) {
234
- this.preventHide = !1;
235
- return;
236
- }
237
- e?.relatedTarget && this.element.parentNode?.contains(e.relatedTarget) || e?.relatedTarget !== this.editor.view.dom && this.hide();
207
+ this.preventHide ? this.preventHide = !1 : e?.relatedTarget && this.element.parentNode?.contains(e.relatedTarget) || e?.relatedTarget !== this.editor.view.dom && this.hide();
238
208
  }, this.transactionHandler = ({ transaction: e }) => {
239
209
  let t = e.getMeta(this.pluginKey);
240
210
  t === "updatePosition" ? this.updatePosition() : t && typeof t == "object" && t.type === "updateOptions" ? this.updateOptions(t.options) : t === "hide" ? this.hide() : t === "show" && (this.updatePosition(), this.show());
@@ -279,11 +249,7 @@ var O = class {
279
249
  strategy: this.floatingUIOptions.strategy,
280
250
  middleware: this.middlewares
281
251
  }).then(({ x: e, y: t, strategy: n, middlewareData: r }) => {
282
- if (r.hide?.referenceHidden || r.hide?.escaped) {
283
- this.element.style.visibility = "hidden";
284
- return;
285
- }
286
- this.element.style.visibility = "visible", this.element.style.width = "max-content", this.element.style.position = n, this.element.style.left = `${e}px`, this.element.style.top = `${t}px`, this.isVisible && this.floatingUIOptions.onUpdate && this.floatingUIOptions.onUpdate();
252
+ r.hide?.referenceHidden || r.hide?.escaped ? this.element.style.visibility = "hidden" : (this.element.style.visibility = "visible", this.element.style.width = "max-content", this.element.style.position = n, this.element.style.left = `${e}px`, this.element.style.top = `${t}px`, this.isVisible && this.floatingUIOptions.onUpdate && this.floatingUIOptions.onUpdate());
287
253
  });
288
254
  }
289
255
  update(e, t) {
@@ -292,7 +258,7 @@ var O = class {
292
258
  }
293
259
  show() {
294
260
  var e;
295
- this.isVisible || (this.element.style.visibility = "visible", this.element.style.opacity = "1", (e = (typeof this.appendTo == "function" ? this.appendTo() : this.appendTo) ?? this.view.dom.parentElement) == null || e.appendChild(this.element), this.floatingUIOptions.onShow && this.floatingUIOptions.onShow(), this.isVisible = !0);
261
+ this.isVisible ||= (this.element.style.visibility = "visible", this.element.style.opacity = "1", (e = (typeof this.appendTo == "function" ? this.appendTo() : this.appendTo) ?? this.view.dom.parentElement) == null || e.appendChild(this.element), this.floatingUIOptions.onShow && this.floatingUIOptions.onShow(), !0);
296
262
  }
297
263
  hide() {
298
264
  this.isVisible &&= (this.element.style.visibility = "hidden", this.element.style.opacity = "0", this.element.remove(), this.floatingUIOptions.onHide && this.floatingUIOptions.onHide(), !1);
@@ -417,11 +383,7 @@ function U(e) {
417
383
  return P.has(e);
418
384
  }
419
385
  function W(e, t, n) {
420
- if (t === "tabIndex") {
421
- e.tabIndex = Number(n);
422
- return;
423
- }
424
- e[t] = n;
386
+ t === "tabIndex" ? e.tabIndex = Number(n) : e[t] = n;
425
387
  }
426
388
  function G(e, t) {
427
389
  if (t === "tabIndex") {
@@ -429,15 +391,7 @@ function G(e, t) {
429
391
  return;
430
392
  }
431
393
  let n = e[t];
432
- if (typeof n == "boolean") {
433
- e[t] = !1;
434
- return;
435
- }
436
- if (typeof n == "number") {
437
- e[t] = 0;
438
- return;
439
- }
440
- e[t] = "";
394
+ e[t] = typeof n == "boolean" ? !1 : typeof n == "number" ? 0 : "";
441
395
  }
442
396
  function K(e, t) {
443
397
  return typeof t != "number" || t === 0 || e.startsWith("--") || N.has(e) ? String(t) : `${t}px`;
@@ -454,41 +408,17 @@ function Y(e, t, n) {
454
408
  let i = t[r], a = n[r];
455
409
  if (i === a) return;
456
410
  let o = R(r);
457
- if (a == null || a === !1) {
458
- U(r) && G(e, r), e.removeAttribute(o);
459
- return;
460
- }
461
- if (a === !0) {
462
- U(r) && W(e, r, !0), e.setAttribute(o, "");
463
- return;
464
- }
465
- if (U(r)) {
466
- W(e, r, a);
467
- return;
468
- }
469
- e.setAttribute(o, String(a));
411
+ a == null || a === !1 ? (U(r) && G(e, r), e.removeAttribute(o)) : a === !0 ? (U(r) && W(e, r, !0), e.setAttribute(o, "")) : U(r) ? W(e, r, a) : e.setAttribute(o, String(a));
470
412
  });
471
413
  }
472
414
  function X(e, t, n) {
473
- if (t !== n) {
474
- if (n) {
475
- e.className = n;
476
- return;
477
- }
478
- e.removeAttribute("class");
479
- }
415
+ t !== n && (n ? e.className = n : e.removeAttribute("class"));
480
416
  }
481
417
  function Z(e, t, n) {
482
418
  let r = t ?? {}, i = n ?? {};
483
419
  (/* @__PURE__ */ new Set([...Object.keys(r), ...Object.keys(i)])).forEach((t) => {
484
420
  let n = r[t], a = i[t];
485
- if (n !== a) {
486
- if (a == null) {
487
- q(e, t);
488
- return;
489
- }
490
- J(e, t, a);
491
- }
421
+ n !== a && (a == null ? q(e, t) : J(e, t, a));
492
422
  });
493
423
  }
494
424
  function Q(e, t, n) {
@@ -554,16 +484,10 @@ var te = y.forwardRef(({ pluginKey: e, editor: t, updateDelay: n, resizeDelay: r
554
484
  });
555
485
  };
556
486
  }, [h]), b(() => {
557
- if (v && h && !h.isDestroyed) {
558
- if (x.current) {
559
- x.current = !1;
560
- return;
561
- }
562
- h.view.dispatch(h.state.tr.setMeta(f, {
563
- type: "updateOptions",
564
- options: _.current
565
- }));
566
- }
487
+ v && h && !h.isDestroyed && (x.current ? x.current = !1 : h.view.dispatch(h.state.tr.setMeta(f, {
488
+ type: "updateOptions",
489
+ options: _.current
490
+ })));
567
491
  }, [
568
492
  v,
569
493
  h,
@@ -610,16 +534,10 @@ y.forwardRef(({ pluginKey: e, editor: t, updateDelay: n, resizeDelay: r, appendT
610
534
  });
611
535
  };
612
536
  }, [p]), b(() => {
613
- if (_ && p && !p.isDestroyed) {
614
- if (y.current) {
615
- y.current = !1;
616
- return;
617
- }
618
- p.view.dispatch(p.state.tr.setMeta(d, {
619
- type: "updateOptions",
620
- options: g.current
621
- }));
622
- }
537
+ _ && p && !p.isDestroyed && (y.current ? y.current = !1 : p.view.dispatch(p.state.tr.setMeta(d, {
538
+ type: "updateOptions",
539
+ options: g.current
540
+ })));
623
541
  }, [
624
542
  _,
625
543
  p,
@@ -718,29 +718,7 @@ function Ye() {
718
718
  }, a = r.length, o = J(e.nodeName);
719
719
  for (; a--;) {
720
720
  let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = J(s), d = l, f = s === "value" ? d : fe(d), p = !1;
721
- if (i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, Q(F.uponSanitizeAttribute, e, i), f = i.attrValue, Nt && (u === "id" || u === "name") && de(f, Pt) !== 0 && (Z(s, e, n), f = Pt + f, p = !0), V && S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f)) {
722
- Z(s, e, n);
723
- continue;
724
- }
725
- if (u === "attributename" && le(f, "href")) {
726
- Z(s, e, n);
727
- continue;
728
- }
729
- if (!i.forceKeepAttr) {
730
- if (!i.keepAttr) {
731
- Z(s, e, n);
732
- continue;
733
- }
734
- if (!Tt && S(He, f)) {
735
- Z(s, e, n);
736
- continue;
737
- }
738
- if (B && (f = vn(f)), !On(o, u, f)) {
739
- Z(s, e, n);
740
- continue;
741
- }
742
- f = jn(o, u, c, f), f !== d && Mn(e, s, c, f) && p && ie(t.removed);
743
- }
721
+ i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, Q(F.uponSanitizeAttribute, e, i), f = i.attrValue, Nt && (u === "id" || u === "name") && de(f, Pt) !== 0 && (Z(s, e, n), f = Pt + f, p = !0), V && S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f) || u === "attributename" && le(f, "href") ? Z(s, e, n) : i.forceKeepAttr || (i.keepAttr ? !Tt && S(He, f) ? Z(s, e, n) : (B && (f = vn(f)), On(o, u, f) ? (f = jn(o, u, c, f), f !== d && Mn(e, s, c, f) && p && ie(t.removed)) : Z(s, e, n)) : Z(s, e, n));
744
722
  }
745
723
  Q(F.afterSanitizeAttributes, e, null), $(e, n);
746
724
  }, Pn = function(e) {
@@ -1,7 +1,7 @@
1
- import { A as e, B as t, C as n, G as r, H as i, I as a, K as o, M as s, N as c, P as l, R as u, S as d, T as f, V as p, W as m, _ as h, a as g, c as _, f as v, g as y, i as b, j as x, k as S, l as C, n as w, o as ee, p as te, q as ne, r as re, s as ie, u as ae, w as oe, x as se, z as ce } from "./dist-DGEcUiqG.js";
2
- import { t as le } from "./dist-TKt66Yz8.js";
3
- import { m as ue } from "./table-layout-Dt7KmVp_.js";
4
- import { n as de, t as fe } from "./extension-link-Cb1UO6hv.js";
1
+ import { A as e, B as t, C as n, G as r, H as i, I as a, K as o, M as s, N as c, P as l, R as u, S as d, T as f, V as p, W as m, _ as h, a as g, c as _, f as v, g as y, i as b, j as x, k as S, l as C, n as w, o as ee, p as te, q as ne, r as re, s as ie, u as ae, w as oe, x as se, z as ce } from "./dist-BoAzo5MN.js";
2
+ import { t as le } from "./dist-BqlzKS-_.js";
3
+ import { m as ue } from "./table-layout-ClqaGg1E.js";
4
+ import { n as de, t as fe } from "./extension-link-DxIXGCtV.js";
5
5
  import { Callout as pe } from "./components/Scribe/extension/callout.js";
6
6
  import { ExternalLinkPreviewSchema as me } from "./components/Scribe/extension/external-link-preview/schema.js";
7
7
  import { ScribeTable as he } from "./components/Scribe/extension/resizable-table.js";
@@ -30914,11 +30914,7 @@ var Ke = new ve("emojiSuggestion"), qe = /:([a-zA-Z0-9_+-]+):$/, Je = /(^|\s):([
30914
30914
  }
30915
30915
  }), d.src !== null && (u.src = d.src);
30916
30916
  let f = { ...c }, p = (e) => {
30917
- if (typeof e == "string" && e !== "") {
30918
- u.getAttribute("src") !== e && (u.src = e);
30919
- return;
30920
- }
30921
- u.hasAttribute("src") && u.removeAttribute("src"), u.src !== "" && (u.src = "");
30917
+ typeof e == "string" && e !== "" ? u.getAttribute("src") !== e && (u.src = e) : (u.hasAttribute("src") && u.removeAttribute("src"), u.src !== "" && (u.src = ""));
30922
30918
  };
30923
30919
  p(c.src);
30924
30920
  let m = new ie({
@@ -46743,18 +46739,17 @@ var Pr = function(e) {
46743
46739
  r && e.push(r);
46744
46740
  for (var a = 0; a < e.length; a++) {
46745
46741
  var o = e[a], s = Vr(o);
46746
- if (s) {
46747
- Br(s.children, t, n, null, i);
46748
- continue;
46749
- }
46750
- var c = !o.hasClass("mspace");
46751
- if (c) {
46752
- var l = t(o, n.node);
46753
- l && (n.insertAfter ? n.insertAfter(l) : (e.unshift(l), a++));
46742
+ if (s) Br(s.children, t, n, null, i);
46743
+ else {
46744
+ var c = !o.hasClass("mspace");
46745
+ if (c) {
46746
+ var l = t(o, n.node);
46747
+ l && (n.insertAfter ? n.insertAfter(l) : (e.unshift(l), a++));
46748
+ }
46749
+ c ? n.node = o : i && o.hasClass("katex-newline") && (n.node = U(["leftmost"])), n.insertAfter = ((t) => (n) => {
46750
+ e.splice(t + 1, 0, n), a++;
46751
+ })(a);
46754
46752
  }
46755
- c ? n.node = o : i && o.hasClass("katex-newline") && (n.node = U(["leftmost"])), n.insertAfter = ((t) => (n) => {
46756
- e.splice(t + 1, 0, n), a++;
46757
- })(a);
46758
46753
  }
46759
46754
  r && e.pop();
46760
46755
  }, Vr = function(e) {
@@ -46934,15 +46929,7 @@ var ni = function(e, t, n) {
46934
46929
  for (var i = [], a, o = 0; o < e.length; o++) {
46935
46930
  var s = Z(e[o], t);
46936
46931
  if (s instanceof Y && a instanceof Y) {
46937
- if (s.type === "mtext" && a.type === "mtext" && s.getAttribute("mathvariant") === a.getAttribute("mathvariant")) {
46938
- a.children.push(...s.children);
46939
- continue;
46940
- }
46941
- if (s.type === "mn" && a.type === "mn") {
46942
- a.children.push(...s.children);
46943
- continue;
46944
- }
46945
- if (ti(s) && a.type === "mn") {
46932
+ if (s.type === "mtext" && a.type === "mtext" && s.getAttribute("mathvariant") === a.getAttribute("mathvariant") || s.type === "mn" && a.type === "mn" || ti(s) && a.type === "mn") {
46946
46933
  a.children.push(...s.children);
46947
46934
  continue;
46948
46935
  }
@@ -53576,19 +53563,7 @@ function Gs(e) {
53576
53563
  function Ks(e) {
53577
53564
  let t = [], n = [], r = !1;
53578
53565
  return e.forEach((e) => {
53579
- if (r) {
53580
- n.push(e);
53581
- return;
53582
- }
53583
- if (e.trim() === "") {
53584
- r = !0, n.push(e);
53585
- return;
53586
- }
53587
- if (t.length > 0 && Ws(e)) {
53588
- r = !0, n.push(e);
53589
- return;
53590
- }
53591
- t.push(e);
53566
+ r ? n.push(e) : e.trim() === "" || t.length > 0 && Ws(e) ? (r = !0, n.push(e)) : t.push(e);
53592
53567
  }), {
53593
53568
  paragraphLines: t,
53594
53569
  blockLines: n
@@ -1,2 +1 @@
1
- import { t as e } from "./schema-extensions-CzDKrIf8.js";
2
- export { e as createScribeSchemaExtensionSet };
1
+ export { t as createScribeSchemaExtensionSet } from "./schema-extensions-B9hR1VrD.js";
package/dist/schema.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ScribeTableTransformError as e, applyScribeTableTransform as t } from "./table-transforms.js";
2
- import { t as n } from "./schema-extensions-CzDKrIf8.js";
2
+ import { t as n } from "./schema-extensions-B9hR1VrD.js";
3
3
  import { SCRIBE_DOCUMENT_NODE_CAPABILITY_ROLES as r, SCRIBE_DOCUMENT_NODE_CONTENT_KINDS as i, createScribeDocumentNodeCapabilityManifest as a, defineScribeDocumentNodeCapability as o } from "./document-node-capabilities.js";
4
4
  //#region lib/schema.ts
5
5
  var s = (e = {}) => Object.values(n(e));
@@ -1,4 +1,4 @@
1
- import { B as e, I as t, _ as n, a as r, c as i, m as a, n as o } from "./dist-DGEcUiqG.js";
1
+ import { B as e, I as t, _ as n, a as r, c as i, m as a, n as o } from "./dist-BoAzo5MN.js";
2
2
  import { Plugin as s, PluginKey as c, TextSelection as l } from "@tiptap/pm/state";
3
3
  import { CellSelection as u, addColumnAfter as d, addColumnBefore as f, addRowAfter as ee, addRowBefore as p, columnResizing as te, deleteColumn as ne, deleteRow as m, deleteTable as re, fixTables as ie, goToNextCell as h, mergeCells as g, setCellAttr as _, splitCell as v, tableEditing as ae, toggleHeader as y, toggleHeaderCell as b } from "@tiptap/pm/tables";
4
4
  //#region node_modules/.pnpm/@tiptap+extension-table@3.31.4_@tiptap+core@3.31.4_@tiptap+pm@3.31.4__@tiptap+pm@3.31.4/node_modules/@tiptap/extension-table/dist/index.js
@@ -899,11 +899,8 @@ function Ye(e) {
899
899
  }, i.reset = !1, i.placement = i.options.placement, i.orderedModifiers.forEach(function(e) {
900
900
  return i.modifiersData[e.name] = Object.assign({}, e.data);
901
901
  });
902
- for (var r = 0; r < i.orderedModifiers.length; r++) {
903
- if (i.reset === !0) {
904
- i.reset = !1, r = -1;
905
- continue;
906
- }
902
+ for (var r = 0; r < i.orderedModifiers.length; r++) if (i.reset === !0) i.reset = !1, r = -1;
903
+ else {
907
904
  var a = i.orderedModifiers[r], o = a.fn, l = a.options, u = l === void 0 ? {} : l, d = a.name;
908
905
  typeof o == "function" && (i = o({
909
906
  state: i,
@@ -1472,13 +1469,7 @@ function on(e, t) {
1472
1469
  }).filter(Boolean), e) && (I(), le(e));
1473
1470
  }
1474
1471
  function ie(e) {
1475
- if (!(oe(e) || y.props.trigger.indexOf("click") >= 0 && o)) {
1476
- if (y.props.interactive) {
1477
- y.hideWithInteractivity(e);
1478
- return;
1479
- }
1480
- le(e);
1481
- }
1472
+ oe(e) || y.props.trigger.indexOf("click") >= 0 && o || (y.props.interactive ? y.hideWithInteractivity(e) : le(e));
1482
1473
  }
1483
1474
  function ae(e) {
1484
1475
  y.props.trigger.indexOf("focusin") < 0 && e.target !== O() || y.props.interactive && e.relatedTarget && x.contains(e.relatedTarget) || le(e);
@@ -1577,11 +1568,8 @@ function on(e, t) {
1577
1568
  }, t) : y.show();
1578
1569
  }
1579
1570
  function le(e) {
1580
- if (y.clearDelayTimeouts(), N("onUntrigger", [y, e]), !y.state.isVisible) {
1581
- B();
1582
- return;
1583
- }
1584
- if (!(y.props.trigger.indexOf("mouseenter") >= 0 && y.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(e.type) >= 0 && o)) {
1571
+ if (y.clearDelayTimeouts(), N("onUntrigger", [y, e]), !y.state.isVisible) B();
1572
+ else if (!(y.props.trigger.indexOf("mouseenter") >= 0 && y.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(e.type) >= 0 && o)) {
1585
1573
  var t = j(!1);
1586
1574
  t ? i = setTimeout(function() {
1587
1575
  y.state.isVisible && y.hide();
@@ -1,2 +1 @@
1
- import { createScribeEditor as e } from "./index.js";
2
- export { e as createScribeEditor };
1
+ export { createScribeEditor } from "./index.js";
@@ -1,2 +1 @@
1
- import { t as e } from "../html-to-markdown-DF93it73.js";
2
- export { e as html2md };
1
+ export { t as html2md } from "../html-to-markdown-DeRG9OPm.js";
@@ -1,9 +1,9 @@
1
- import { t as e } from "../dist-DGEcUiqG.js";
2
- import { t } from "../html-to-markdown-DF93it73.js";
3
- import { t as n } from "../markdown-to-html-BoK5O_j-.js";
1
+ import { t as e } from "../dist-BoAzo5MN.js";
2
+ import { t } from "../html-to-markdown-DeRG9OPm.js";
3
+ import { t as n } from "../markdown-to-html-tCPjQ5u6.js";
4
4
  import { isInViewport as r } from "./is-in-viewport.js";
5
5
  import { convertLegacyMathDelimiters as i } from "./convert-legacy-math-delimiters.js";
6
- import { t as a } from "../extension-I7Ocj_D_.js";
6
+ import { t as a } from "../extension-dz0CIf3r.js";
7
7
  //#region lib/utils/create-scribe-editor.ts
8
8
  function o({ content: n = "", editable: r = !1, enableUndoRedo: i, externalLinkPreview: o, onContentChange: s }) {
9
9
  return new e({