@clevertask/scribe 0.1.6 → 0.1.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 (44) hide show
  1. package/README.md +6 -4
  2. package/dist/{BarMenu-CXaFlpRJ.js → BarMenu-BG_w4DVo.js} +53 -25
  3. package/dist/assets/index.css +1 -1
  4. package/dist/components/Menu/BarMenu.d.ts.map +1 -1
  5. package/dist/components/Menu/BarMenu.js +1 -1
  6. package/dist/components/Menu/BubbleMenu.js +2 -2
  7. package/dist/components/Menu/LinkBubbleMenu.js +13 -13
  8. package/dist/components/Menu/LinkEditor.js +4 -4
  9. package/dist/components/Menu/Mobile/ListOptionBar.d.ts.map +1 -1
  10. package/dist/components/Menu/Mobile/ListOptionBar.js +11 -5
  11. package/dist/components/Menu/linkBubbleMenuPlugin.js +1 -1
  12. package/dist/components/Scribe/extension/emoji/EmojiList.d.ts.map +1 -1
  13. package/dist/components/Scribe/extension/emoji/EmojiList.js +6 -2
  14. package/dist/components/Scribe/extension/emoji/suggest.js +2 -2
  15. package/dist/components/Scribe/extension/extension-link.js +1 -1
  16. package/dist/components/Scribe/extension/extension-markdown-paste.js +14 -6
  17. package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
  18. package/dist/components/Scribe/extension/index.js +1 -1
  19. package/dist/components/Scribe/extension/slashCommand/SlashCommandList.d.ts.map +1 -1
  20. package/dist/components/Scribe/extension/slashCommand/SlashCommandList.js +948 -943
  21. package/dist/components/Scribe/extension/slashCommand/index.js +1 -1
  22. package/dist/components/Scribe/extension/slashCommand/renderItems.js +2 -2
  23. package/dist/components/Scribe/extension/tableOfContents.js +2 -2
  24. package/dist/components/Scribe/index.d.ts +6 -0
  25. package/dist/components/Scribe/index.d.ts.map +1 -1
  26. package/dist/components/Scribe/index.js +213 -76
  27. package/dist/{dist-BQjH-i-q.js → dist-BMKyBtRa.js} +112 -105
  28. package/dist/{dist-Cp938P7P.js → dist-BgEySLwo.js} +283 -146
  29. package/dist/{dist-CnXCIcnl.js → dist-FrapLVQu.js} +16 -9
  30. package/dist/{extension-CZOsheCI.js → extension-BVGWENts.js} +1306 -1300
  31. package/dist/{extension-link-DZID_SYl.js → extension-link-CMRfHUc5.js} +5 -5
  32. package/dist/{floating-ui.dom-rih69525.js → floating-ui.dom-CmJ6iBdh.js} +4 -5
  33. package/dist/{html-to-markdown-CrNOkSye.js → html-to-markdown-Cta7-ssO.js} +3 -2
  34. package/dist/main.js +2 -2
  35. package/dist/{markdown-to-html-DEczPfuq.js → markdown-to-html-DwSNqq2i.js} +8 -6
  36. package/dist/{menus-CakIdDdY.js → menus-D9OsP28c.js} +8 -8
  37. package/dist/{purify.es-DF9CW1cl.js → purify.es-CFiLaBu1.js} +1 -1
  38. package/dist/{slashCommand-B7CRIaKG.js → slashCommand-B6Iz1i0d.js} +5 -8
  39. package/dist/{tables-CjOC70rm.js → tables-CXpUVKdw.js} +9 -7
  40. package/dist/{tippy.esm-D9LL2xiE.js → tippy.esm-DOXqN1Qm.js} +2 -7
  41. package/dist/utils/html-to-markdown.js +1 -1
  42. package/dist/utils/index.js +4 -4
  43. package/dist/utils/markdown-to-html.js +1 -1
  44. package/package.json +49 -34
@@ -393,11 +393,13 @@ function h(e, t, n, r) {
393
393
  if (i == t.index(r) && r < e.depth - n.openStart) {
394
394
  let o = h(e, t, n, r + 1);
395
395
  return a.copy(a.content.replaceChild(i, o));
396
- } else if (!n.content.size) return y(a, b(e, t, r));
397
- else if (!n.openStart && !n.openEnd && e.depth == r && t.depth == r) {
396
+ }
397
+ if (!n.content.size) return y(a, b(e, t, r));
398
+ if (!n.openStart && !n.openEnd && e.depth == r && t.depth == r) {
398
399
  let r = e.parent, i = r.content;
399
400
  return y(r, i.cut(0, e.parentOffset).append(n.content).append(i.cut(t.parentOffset)));
400
- } else {
401
+ }
402
+ {
401
403
  let { start: i, end: o } = ne(n, e);
402
404
  return y(a, te(e, i, o, t, r));
403
405
  }
@@ -990,7 +992,8 @@ function ve(e) {
990
992
  if (e.eat("(")) {
991
993
  let t = fe(e);
992
994
  return e.eat(")") || e.err("Missing closing paren"), t;
993
- } else if (/\W/.test(e.next)) e.err("Unexpected token '" + e.next + "'");
995
+ }
996
+ if (/\W/.test(e.next)) e.err("Unexpected token '" + e.next + "'");
994
997
  else {
995
998
  let t = _e(e, e.next).map((t) => (e.inline == null ? e.inline = t.isInline : e.inline != t.isInline && e.err("Mixing inline and block content"), {
996
999
  type: "name",
@@ -1611,7 +1614,7 @@ var T = class {
1611
1614
  let o = Ve(e, i, a.options);
1612
1615
  a.options & w && a.content.length == 0 && (o |= w);
1613
1616
  let s = l.none;
1614
- return n = n.filter((t) => (a.type ? a.type.allowsMarkType(t.type) : Ke(t.type, e)) ? (s = t.addToSet(s), !1) : !0), this.nodes.push(new T(e, t, s, r, null, o)), this.open++, n;
1617
+ return n = n.filter((t) => !(a.type ? a.type.allowsMarkType(t.type) : Ke(t.type, e)) || (s = t.addToSet(s), !1)), this.nodes.push(new T(e, t, s, r, null, o)), this.open++, n;
1615
1618
  }
1616
1619
  closeExtra(e = !1) {
1617
1620
  let t = this.nodes.length - 1;
@@ -1659,7 +1662,8 @@ var T = class {
1659
1662
  if (e == t.length - 1 || e == 0) continue;
1660
1663
  for (; o >= i; o--) if (a(e - 1, o)) return !0;
1661
1664
  return !1;
1662
- } else {
1665
+ }
1666
+ {
1663
1667
  let e = o > 0 || o == 0 && r ? this.nodes[o].type : n && o >= i ? n.node(o - i).type : null;
1664
1668
  if (!e || e.name != s && !e.isInGroup(s)) return !1;
1665
1669
  o--;
@@ -1822,7 +1826,8 @@ function D(e, t, n, r) {
1822
1826
  dom: c,
1823
1827
  contentDOM: c
1824
1828
  };
1825
- } else if (typeof a == "string") c.appendChild(e.createTextNode(a));
1829
+ }
1830
+ if (typeof a == "string") c.appendChild(e.createTextNode(a));
1826
1831
  else {
1827
1832
  let { dom: t, contentDOM: i } = D(e, a, n, r);
1828
1833
  if (c.appendChild(t), i) {
@@ -2195,10 +2200,12 @@ var R = class e extends j {
2195
2200
  if (this.from + this.slice.size == t.from && !this.slice.openEnd && !t.slice.openStart) {
2196
2201
  let n = this.slice.size + t.slice.size == 0 ? d.empty : new d(this.slice.content.append(t.slice.content), this.slice.openStart, t.slice.openEnd);
2197
2202
  return new e(this.from, this.to + (t.to - t.from), n, this.structure);
2198
- } else if (t.to == this.from && !this.slice.openStart && !t.slice.openEnd) {
2203
+ }
2204
+ if (t.to == this.from && !this.slice.openStart && !t.slice.openEnd) {
2199
2205
  let n = this.slice.size + t.slice.size == 0 ? d.empty : new d(t.slice.content.append(this.slice.content), t.slice.openStart, this.slice.openEnd);
2200
2206
  return new e(t.from, this.to, n, this.structure);
2201
- } else return null;
2207
+ }
2208
+ return null;
2202
2209
  }
2203
2210
  toJSON() {
2204
2211
  let e = {