@clevertask/scribe 0.1.7 → 0.1.9

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 (47) hide show
  1. package/README.md +5 -4
  2. package/dist/{BarMenu-DC-S5Ggq.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.d.ts.map +1 -1
  8. package/dist/components/Menu/LinkBubbleMenu.js +64 -50
  9. package/dist/components/Menu/LinkEditor.js +4 -4
  10. package/dist/components/Menu/Mobile/ListOptionBar.d.ts.map +1 -1
  11. package/dist/components/Menu/Mobile/ListOptionBar.js +11 -5
  12. package/dist/components/Menu/linkBubbleMenuPlugin.d.ts +1 -0
  13. package/dist/components/Menu/linkBubbleMenuPlugin.d.ts.map +1 -1
  14. package/dist/components/Menu/linkBubbleMenuPlugin.js +4 -2
  15. package/dist/components/Scribe/extension/emoji/EmojiList.d.ts.map +1 -1
  16. package/dist/components/Scribe/extension/emoji/EmojiList.js +6 -2
  17. package/dist/components/Scribe/extension/emoji/suggest.js +2 -2
  18. package/dist/components/Scribe/extension/extension-link.js +1 -1
  19. package/dist/components/Scribe/extension/extension-markdown-paste.js +14 -6
  20. package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
  21. package/dist/components/Scribe/extension/index.js +1 -1
  22. package/dist/components/Scribe/extension/slashCommand/SlashCommandList.d.ts.map +1 -1
  23. package/dist/components/Scribe/extension/slashCommand/SlashCommandList.js +948 -943
  24. package/dist/components/Scribe/extension/slashCommand/index.js +1 -1
  25. package/dist/components/Scribe/extension/slashCommand/renderItems.js +2 -2
  26. package/dist/components/Scribe/extension/tableOfContents.js +2 -2
  27. package/dist/components/Scribe/index.d.ts +2 -0
  28. package/dist/components/Scribe/index.d.ts.map +1 -1
  29. package/dist/components/Scribe/index.js +182 -80
  30. package/dist/{dist-BQjH-i-q.js → dist-BMKyBtRa.js} +112 -105
  31. package/dist/{dist-DT3iiwSr.js → dist-BgEySLwo.js} +9 -8
  32. package/dist/{dist-CnXCIcnl.js → dist-FrapLVQu.js} +16 -9
  33. package/dist/{extension-CZOsheCI.js → extension-BVGWENts.js} +1306 -1300
  34. package/dist/{extension-link-DZID_SYl.js → extension-link-CMRfHUc5.js} +5 -5
  35. package/dist/{floating-ui.dom-rih69525.js → floating-ui.dom-CmJ6iBdh.js} +4 -5
  36. package/dist/{html-to-markdown-CrNOkSye.js → html-to-markdown-Cta7-ssO.js} +3 -2
  37. package/dist/main.js +2 -2
  38. package/dist/{markdown-to-html-DEczPfuq.js → markdown-to-html-DwSNqq2i.js} +8 -6
  39. package/dist/{menus-CrKTaPWU.js → menus-D9OsP28c.js} +8 -8
  40. package/dist/{purify.es-DF9CW1cl.js → purify.es-CFiLaBu1.js} +1 -1
  41. package/dist/{slashCommand-B7CRIaKG.js → slashCommand-B6Iz1i0d.js} +5 -8
  42. package/dist/{tables-CjOC70rm.js → tables-CXpUVKdw.js} +9 -7
  43. package/dist/{tippy.esm-D9LL2xiE.js → tippy.esm-DOXqN1Qm.js} +2 -7
  44. package/dist/utils/html-to-markdown.js +1 -1
  45. package/dist/utils/index.js +4 -4
  46. package/dist/utils/markdown-to-html.js +1 -1
  47. package/package.json +49 -34
@@ -1 +1 @@
1
- {"version":3,"file":"BarMenu.d.ts","sourceRoot":"","sources":["../../../lib/components/Menu/BarMenu.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,MAAM,EAAkB,MAAM,eAAe,CAAC;AACvD,OAAO,EAAe,EAAE,EAA+C,MAAM,OAAO,CAAC;AAoBrF,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB;AAWD,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CA8T7B,CAAC;eAEa,OAAO"}
1
+ {"version":3,"file":"BarMenu.d.ts","sourceRoot":"","sources":["../../../lib/components/Menu/BarMenu.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,MAAM,EAAkB,MAAM,eAAe,CAAC;AACvD,OAAO,EAAe,EAAE,EAA+C,MAAM,OAAO,CAAC;AAoBrF,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB;AAaD,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CAkV7B,CAAC;eAEa,OAAO"}
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../BarMenu-DC-S5Ggq.js";
1
+ import { t as e } from "../../BarMenu-BG_w4DVo.js";
2
2
  export { e as default };
@@ -1,6 +1,6 @@
1
- import { a as e } from "../../dist-DT3iiwSr.js";
1
+ import { a as e } from "../../dist-BgEySLwo.js";
2
2
  import { getPopupMountTarget as t } from "../Scribe/extension/getPopupMountTarget.js";
3
- import { t as n } from "../../menus-CrKTaPWU.js";
3
+ import { t as n } from "../../menus-D9OsP28c.js";
4
4
  import { Flex as r, IconButton as i } from "@radix-ui/themes";
5
5
  import { useCallback as a } from "react";
6
6
  import { jsx as o } from "react/jsx-runtime";
@@ -1 +1 @@
1
- {"version":3,"file":"LinkBubbleMenu.d.ts","sourceRoot":"","sources":["../../../lib/components/Menu/LinkBubbleMenu.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAkB,MAAM,eAAe,CAAC;AAKvD,OAAO,EAAE,EAAE,EAAqD,MAAM,OAAO,CAAC;AAK9E,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;CAChB;AAID,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAyG3C,CAAC;eAEa,cAAc"}
1
+ {"version":3,"file":"LinkBubbleMenu.d.ts","sourceRoot":"","sources":["../../../lib/components/Menu/LinkBubbleMenu.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAkB,MAAM,eAAe,CAAC;AAKvD,OAAO,EAAE,EAAE,EAAqD,MAAM,OAAO,CAAC;AAS9E,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;CAChB;AAID,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA+J3C,CAAC;eAEa,cAAc"}
@@ -1,15 +1,15 @@
1
- import { a as e } from "../../dist-DT3iiwSr.js";
1
+ import { a as e } from "../../dist-BgEySLwo.js";
2
2
  import { getPopupMountTarget as t } from "../Scribe/extension/getPopupMountTarget.js";
3
3
  import n from "./LinkEditor.js";
4
- import { hideLinkBubbleMenu as r, linkBubbleMenuPluginKey as i } from "./linkBubbleMenuPlugin.js";
5
- import { t as a } from "../../menus-CrKTaPWU.js";
6
- import { Box as o } from "@radix-ui/themes";
7
- import { useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
8
- import { jsx as f } from "react/jsx-runtime";
4
+ import { hideLinkBubbleMenu as r, linkBubbleMenuPluginKey as i, showLinkBubbleMenu as a } from "./linkBubbleMenuPlugin.js";
5
+ import { t as o } from "../../menus-D9OsP28c.js";
6
+ import { Box as s } from "@radix-ui/themes";
7
+ import { useCallback as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
8
+ import { jsx as p } from "react/jsx-runtime";
9
9
  //#region lib/components/Menu/LinkBubbleMenu.tsx
10
- var p = ({ editor: p }) => {
11
- let [m, h] = d(""), g = u(null), _ = u(null), v = e({
12
- editor: p,
10
+ var m = ({ editor: m }) => {
11
+ let [h, g] = f(""), _ = d(null), v = d(null), y = e({
12
+ editor: m,
13
13
  selector: ({ editor: e }) => {
14
14
  let { from: t, to: n } = e.state.selection;
15
15
  return {
@@ -19,43 +19,57 @@ var p = ({ editor: p }) => {
19
19
  };
20
20
  }
21
21
  });
22
- c(() => {
23
- h(v.href);
22
+ l(() => {
23
+ g(y.href);
24
24
  }, [
25
- v.from,
26
- v.href,
27
- v.to
28
- ]), c(() => () => {
29
- _.current !== null && window.cancelAnimationFrame(_.current);
30
- }, []);
31
- let y = s(() => {
32
- if (p.isDestroyed) return;
33
- let e = p.state.selection.to;
34
- r(p), p.chain().setTextSelection(e).focus().run();
35
- }, [p]), b = s(() => {
36
- _.current !== null && window.cancelAnimationFrame(_.current), _.current = window.requestAnimationFrame(() => {
37
- g.current?.focus(), g.current?.select(), _.current = null;
25
+ y.from,
26
+ y.href,
27
+ y.to
28
+ ]), l(() => () => {
29
+ v.current !== null && window.cancelAnimationFrame(v.current);
30
+ }, []), l(() => {
31
+ if (m.isDestroyed) return;
32
+ let e = m.view.dom, t = null, n = !1, r = (r) => {
33
+ if (r.button !== 0 || !m.isEditable) return;
34
+ let i = r.target?.closest?.("a");
35
+ !i || !e.contains(i) || (t !== null && window.clearTimeout(t), t = window.setTimeout(() => {
36
+ if (t = null, n || m.isDestroyed || !m.isEditable || !r.defaultPrevented) return;
37
+ let { from: e, to: i } = m.state.selection;
38
+ e === i || !m.isActive("link") || a(m);
39
+ }));
40
+ };
41
+ return e.addEventListener("mouseup", r), () => {
42
+ n = !0, t !== null && window.clearTimeout(t), e.removeEventListener("mouseup", r);
43
+ };
44
+ }, [m]);
45
+ let b = c(() => {
46
+ if (m.isDestroyed) return;
47
+ let e = m.state.selection.to;
48
+ r(m), m.chain().setTextSelection(e).focus().run();
49
+ }, [m]), x = c(() => {
50
+ v.current !== null && window.cancelAnimationFrame(v.current), v.current = window.requestAnimationFrame(() => {
51
+ _.current?.focus(), _.current?.select(), v.current = null;
38
52
  });
39
- }, []), x = s(({ editor: e, element: t, from: n, to: r, view: i }) => {
40
- let a = t.contains(t.ownerDocument.activeElement);
41
- return e.isEditable && n !== r && e.isActive("link") && (i.hasFocus() || a);
42
- }, []);
43
- return /* @__PURE__ */ f(a, {
44
- editor: p,
53
+ }, []), S = c(({ editor: e, element: t, from: n, to: r }) => {
54
+ let i = t.contains(t.ownerDocument.activeElement);
55
+ return e.isEditable && n !== r && e.isActive("link") && i;
56
+ }, []), C = c(() => t(m), [m]), w = u(() => ({
57
+ strategy: "fixed",
58
+ placement: "bottom",
59
+ offset: 8,
60
+ flip: {},
61
+ shift: { padding: 8 },
62
+ inline: !0,
63
+ onShow: x
64
+ }), [x]);
65
+ return /* @__PURE__ */ p(o, {
66
+ editor: m,
45
67
  pluginKey: i,
46
68
  updateDelay: 0,
47
- appendTo: s(() => t(p), [p]),
48
- shouldShow: x,
49
- options: l(() => ({
50
- strategy: "fixed",
51
- placement: "bottom",
52
- offset: 8,
53
- flip: {},
54
- shift: { padding: 8 },
55
- inline: !0,
56
- onShow: b
57
- }), [b]),
58
- children: /* @__PURE__ */ f(o, {
69
+ appendTo: C,
70
+ shouldShow: S,
71
+ options: w,
72
+ children: /* @__PURE__ */ p(s, {
59
73
  className: "scribe-link-popover",
60
74
  role: "dialog",
61
75
  "aria-label": "Edit link",
@@ -63,16 +77,16 @@ var p = ({ editor: p }) => {
63
77
  maxWidth: "calc(100vw - 32px)",
64
78
  width: 320
65
79
  },
66
- children: /* @__PURE__ */ f(n, {
67
- editor: p,
68
- existingHref: v.href,
69
- inputRef: g,
70
- onClose: y,
71
- onValueChange: h,
72
- value: m
80
+ children: /* @__PURE__ */ p(n, {
81
+ editor: m,
82
+ existingHref: y.href,
83
+ inputRef: _,
84
+ onClose: b,
85
+ onValueChange: g,
86
+ value: h
73
87
  })
74
88
  })
75
89
  });
76
90
  };
77
91
  //#endregion
78
- export { p as default };
92
+ export { m as default };
@@ -36,11 +36,11 @@ var f = ({ editor: f, existingHref: p, inputRef: m, onClose: h, onValueChange: g
36
36
  return;
37
37
  }
38
38
  C();
39
- }, [f, C]);
39
+ }, [f, C]), D = o((e) => {
40
+ e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), C());
41
+ }, [C]);
40
42
  return /* @__PURE__ */ u("form", {
41
- onKeyDown: o((e) => {
42
- e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), C());
43
- }, [C]),
43
+ onKeyDown: D,
44
44
  onSubmit: T,
45
45
  children: /* @__PURE__ */ d(r, {
46
46
  direction: "column",
@@ -1 +1 @@
1
- {"version":3,"file":"ListOptionBar.d.ts","sourceRoot":"","sources":["../../../../lib/components/Menu/Mobile/ListOptionBar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAItC,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,aAAa,eAAgB,kBAAkB,uCAiD3D,CAAC"}
1
+ {"version":3,"file":"ListOptionBar.d.ts","sourceRoot":"","sources":["../../../../lib/components/Menu/Mobile/ListOptionBar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAItC,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,aAAa,eAAgB,kBAAkB,uCAoD3D,CAAC"}
@@ -1,4 +1,4 @@
1
- import { a as e } from "../../../dist-DT3iiwSr.js";
1
+ import { a as e } from "../../../dist-BgEySLwo.js";
2
2
  import { Button as t, Flex as n } from "@radix-ui/themes";
3
3
  import { useCallback as r } from "react";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
@@ -10,27 +10,33 @@ var o = ({ editor: o }) => {
10
10
  isInsideList: e.isActive("bulletList") || e.isActive("orderedList"),
11
11
  isEditable: e.isEditable
12
12
  } : null
13
- }), c = r((e, t) => {
14
- e.preventDefault(), t();
13
+ }), c = r((e) => {
14
+ e.preventDefault();
15
15
  }, []);
16
16
  return !s?.isInsideList || !s.isEditable ? null : /* @__PURE__ */ a(n, {
17
17
  align: "center",
18
18
  justify: "between",
19
19
  className: "scribe-list-toolbar",
20
20
  gap: "3",
21
+ role: "group",
22
+ "aria-label": "List indentation",
21
23
  children: [/* @__PURE__ */ i(t, {
22
24
  type: "button",
25
+ "aria-label": "Outdent list item",
23
26
  size: "1",
24
27
  variant: "soft",
25
28
  color: "gray",
26
- onMouseDown: (e) => c(e, () => o.chain().focus().liftListItem("listItem").run()),
29
+ onMouseDown: c,
30
+ onClick: () => o.chain().focus().liftListItem("listItem").run(),
27
31
  children: "← Outdent"
28
32
  }), /* @__PURE__ */ i(t, {
29
33
  type: "button",
34
+ "aria-label": "Indent list item",
30
35
  size: "1",
31
36
  variant: "soft",
32
37
  color: "gray",
33
- onMouseDown: (e) => c(e, () => o.chain().focus().sinkListItem("listItem").run()),
38
+ onMouseDown: c,
39
+ onClick: () => o.chain().focus().sinkListItem("listItem").run(),
34
40
  children: "Indent →"
35
41
  })]
36
42
  });
@@ -1,5 +1,6 @@
1
1
  import { PluginKey } from "@tiptap/pm/state";
2
2
  import { Editor } from "@tiptap/react";
3
3
  export declare const linkBubbleMenuPluginKey: PluginKey<any>;
4
+ export declare const showLinkBubbleMenu: (editor: Editor) => void;
4
5
  export declare const hideLinkBubbleMenu: (editor: Editor) => void;
5
6
  //# sourceMappingURL=linkBubbleMenuPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"linkBubbleMenuPlugin.d.ts","sourceRoot":"","sources":["../../../lib/components/Menu/linkBubbleMenuPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,eAAO,MAAM,uBAAuB,gBAAwC,CAAC;AAE7E,eAAO,MAAM,kBAAkB,WAAY,MAAM,SAMhD,CAAC"}
1
+ {"version":3,"file":"linkBubbleMenuPlugin.d.ts","sourceRoot":"","sources":["../../../lib/components/Menu/linkBubbleMenuPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,eAAO,MAAM,uBAAuB,gBAAwC,CAAC;AAE7E,eAAO,MAAM,kBAAkB,WAAY,MAAM,SAahD,CAAC;AAEF,eAAO,MAAM,kBAAkB,WAAY,MAAM,SAMhD,CAAC"}
@@ -1,7 +1,9 @@
1
- import { a as e } from "../../dist-CnXCIcnl.js";
1
+ import { a as e } from "../../dist-FrapLVQu.js";
2
2
  //#region lib/components/Menu/linkBubbleMenuPlugin.ts
3
3
  var t = new e("scribeLinkBubbleMenu"), n = (e) => {
4
+ e.isDestroyed || (e.view.dispatch(e.state.tr.setMeta(t, "show")), !e.isDestroyed && e.view.dispatch(e.state.tr.setMeta(t, "updatePosition")));
5
+ }, r = (e) => {
4
6
  e.isDestroyed || e.view.dispatch(e.state.tr.setMeta(t, "hide"));
5
7
  };
6
8
  //#endregion
7
- export { n as hideLinkBubbleMenu, t as linkBubbleMenuPluginKey };
9
+ export { r as hideLinkBubbleMenu, t as linkBubbleMenuPluginKey, n as showLinkBubbleMenu };
@@ -1 +1 @@
1
- {"version":3,"file":"EmojiList.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Scribe/extension/emoji/EmojiList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAG5D,UAAU,mBAAmB;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,CAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAAC;CACvD;AAED,eAAO,MAAM,SAAS,yGA+EpB,CAAC"}
1
+ {"version":3,"file":"EmojiList.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Scribe/extension/emoji/EmojiList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAG5D,UAAU,mBAAmB;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,CAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAAC;CACvD;AAED,eAAO,MAAM,SAAS,yGAiFpB,CAAC"}
@@ -5,8 +5,8 @@ import { jsx as o, jsxs as s } from "react/jsx-runtime";
5
5
  var c = r((r, c) => {
6
6
  let { command: l, items: u } = r, [d, f] = a(0), p = u.length === 0 ? 0 : Math.min(d, u.length - 1);
7
7
  return i(c, () => ({ onKeyDown: (e) => {
8
- if (e.event.key === "ArrowUp") return u.length === 0 ? !1 : (f((e) => (e + u.length - 1) % u.length), !0);
9
- if (e.event.key === "ArrowDown") return u.length === 0 ? !1 : (f((e) => (e + 1) % u.length), !0);
8
+ if (e.event.key === "ArrowUp") return u.length !== 0 && (f((e) => (e + u.length - 1) % u.length), !0);
9
+ if (e.event.key === "ArrowDown") return u.length !== 0 && (f((e) => (e + 1) % u.length), !0);
10
10
  if (e.event.key === "Enter") {
11
11
  let e = u[p];
12
12
  return e && l({ name: e.name }), !0;
@@ -25,8 +25,12 @@ var c = r((r, c) => {
25
25
  style: { maxHeight: 240 },
26
26
  children: /* @__PURE__ */ o("div", {
27
27
  className: "scribe-popup-list",
28
+ role: "group",
29
+ "aria-label": "Emoji suggestions",
28
30
  children: u.map((e, t) => /* @__PURE__ */ s("button", {
29
31
  type: "button",
32
+ "aria-current": t === p ? "true" : void 0,
33
+ "aria-label": `Insert ${e.name} emoji`,
30
34
  className: "scribe-popup-item",
31
35
  "data-selected": t === p,
32
36
  onClick: () => l({ name: e.name }),
@@ -1,6 +1,6 @@
1
- import { n as e } from "../../../../dist-DT3iiwSr.js";
1
+ import { n as e } from "../../../../dist-BgEySLwo.js";
2
2
  import { getPopupMountTarget as t } from "../getPopupMountTarget.js";
3
- import { t as n } from "../../../../tippy.esm-D9LL2xiE.js";
3
+ import { t as n } from "../../../../tippy.esm-DOXqN1Qm.js";
4
4
  import { EmojiList as r } from "./EmojiList.js";
5
5
  //#region lib/components/Scribe/extension/emoji/suggest.ts
6
6
  var i = () => ({
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../../extension-link-DZID_SYl.js";
1
+ import { t as e } from "../../../extension-link-CMRfHUc5.js";
2
2
  export { e as default };
@@ -1,6 +1,6 @@
1
- import { a as e, i as t } from "../../../dist-CnXCIcnl.js";
2
- import { n } from "../../../dist-BQjH-i-q.js";
3
- import { n as r, t as i } from "../../../markdown-to-html-DEczPfuq.js";
1
+ import { a as e, i as t } from "../../../dist-FrapLVQu.js";
2
+ import { n } from "../../../dist-BMKyBtRa.js";
3
+ import { n as r, t as i } from "../../../markdown-to-html-DwSNqq2i.js";
4
4
  //#region lib/components/Scribe/extension/extension-markdown-paste.ts
5
5
  var a = new e("markdownPaste"), o = /* @__PURE__ */ new Set([
6
6
  "blockquote",
@@ -35,17 +35,25 @@ var a = new e("markdownPaste"), o = /* @__PURE__ */ new Set([
35
35
  }));
36
36
  }
37
37
  return t.innerHTML;
38
- }, p = n.create({
38
+ }, p = (e, t) => {
39
+ let n = t;
40
+ return e.someProp("transformPastedHTML", (t) => {
41
+ n = t(n, e);
42
+ }), n;
43
+ }, m = n.create({
39
44
  name: "markdownPaste",
40
45
  addProseMirrorPlugins() {
41
46
  return [new t({
42
47
  key: a,
43
48
  props: { handlePaste: (e, t) => {
44
49
  let n = t.clipboardData?.getData("text/html"), r = t.clipboardData?.getData("text/plain");
45
- return !r || n || !u(r) ? !1 : (t.preventDefault(), this.editor.chain().focus().insertContent(f(i(r))).run(), !0);
50
+ if (!r || n || !u(r)) return !1;
51
+ t.preventDefault();
52
+ let a = f(i(r));
53
+ return this.editor.chain().focus().insertContent(p(e, a)).run(), !0;
46
54
  } }
47
55
  })];
48
56
  }
49
57
  });
50
58
  //#endregion
51
- export { p as default };
59
+ export { m as default };
@@ -1,4 +1,4 @@
1
- import { n as e } from "../../../dist-BQjH-i-q.js";
1
+ import { n as e } from "../../../dist-BMKyBtRa.js";
2
2
  //#region lib/components/Scribe/extension/extension-selectedText.ts
3
3
  var t = e.create({
4
4
  name: "SelectedText",
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../../extension-CZOsheCI.js";
1
+ import { t as e } from "../../../extension-BVGWENts.js";
2
2
  export { e as initExtensions };
@@ -1 +1 @@
1
- {"version":3,"file":"SlashCommandList.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Scribe/extension/slashCommand/SlashCommandList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAI7E,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAAC;CACvD;AAID,eAAO,MAAM,gBAAgB;WAF2B,cAAc,EAAE;mDAoHtE,CAAC"}
1
+ {"version":3,"file":"SlashCommandList.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Scribe/extension/slashCommand/SlashCommandList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAI7E,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAAC;CACvD;AAID,eAAO,MAAM,gBAAgB;WAF2B,cAAc,EAAE;mDA0HtE,CAAC"}