reactjs-tiptap-editor 1.0.25 → 1.0.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.
Files changed (289) hide show
  1. package/lib/{ActionMenuButton-8cTG45Ft.js → ActionMenuButton-B4KDkZ0z.js} +1 -1
  2. package/lib/{ActionMenuButton-CXeFhner.cjs → ActionMenuButton-C3Cfeza9.cjs} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.js +25 -25
  5. package/lib/Blockquote.cjs +5 -5
  6. package/lib/Blockquote.js +1490 -53
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +3 -3
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +2 -2
  11. package/lib/Callout.cjs +1 -1
  12. package/lib/Callout.js +222 -8
  13. package/lib/Clear.cjs +1 -1
  14. package/lib/Clear.js +2 -2
  15. package/lib/Code.cjs +1 -1
  16. package/lib/Code.js +56 -39
  17. package/lib/CodeBlock.cjs +1 -1
  18. package/lib/CodeBlock.js +8 -4
  19. package/lib/CodeView.cjs +1 -1
  20. package/lib/CodeView.js +2 -2
  21. package/lib/Color.cjs +1 -1
  22. package/lib/Color.js +3 -3
  23. package/lib/Column.cjs +1 -1
  24. package/lib/Column.js +2 -2
  25. package/lib/{Drawer-TJY4NuHx.cjs → Drawer-D7E9kTca.cjs} +1 -1
  26. package/lib/{Drawer-C-EO1uoK.js → Drawer-DA0FLHs9.js} +20 -20
  27. package/lib/Drawer.cjs +1 -1
  28. package/lib/Drawer.js +4 -4
  29. package/lib/Emoji.cjs +1 -1
  30. package/lib/Emoji.js +1644 -148
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +10 -10
  33. package/lib/ExportPdf.cjs +1 -1
  34. package/lib/ExportPdf.js +2 -2
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +2 -2
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +5 -5
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +5 -5
  41. package/lib/FormatPainter.cjs +1 -0
  42. package/lib/FormatPainter.js +133 -0
  43. package/lib/Heading.cjs +1 -1
  44. package/lib/Heading.js +10 -6
  45. package/lib/Highlight.cjs +1 -1
  46. package/lib/Highlight.js +3 -3
  47. package/lib/History.cjs +7 -1
  48. package/lib/History.js +519 -478
  49. package/lib/HorizontalRule.cjs +1 -1
  50. package/lib/HorizontalRule.js +2 -2
  51. package/lib/{Iframe-CGb6-2LD.js → Iframe-DZ3r3QzK.js} +7 -7
  52. package/lib/{Iframe-5zx43DL4.cjs → Iframe-OMVd0xa_.cjs} +1 -1
  53. package/lib/Iframe.cjs +1 -1
  54. package/lib/Iframe.js +3 -3
  55. package/lib/Image.cjs +1 -1
  56. package/lib/Image.js +6 -6
  57. package/lib/ImageGif.cjs +1 -1
  58. package/lib/ImageGif.js +35 -35
  59. package/lib/ImportWord.cjs +1 -1
  60. package/lib/ImportWord.js +15 -15
  61. package/lib/{Indent-DuwV8s1t.cjs → Indent-QgCoonRk.cjs} +1 -1
  62. package/lib/{Indent-CdMYsDNS.js → Indent-kI4G-clX.js} +2 -2
  63. package/lib/Indent.cjs +1 -1
  64. package/lib/Indent.js +2 -2
  65. package/lib/Italic.cjs +1 -1
  66. package/lib/Italic.js +2 -2
  67. package/lib/{Katex-CCP_ZQz2.js → Katex-BPbXjcZQ.js} +6 -7
  68. package/lib/Katex-CUofhjB5.cjs +4 -0
  69. package/lib/Katex.cjs +1 -1
  70. package/lib/Katex.js +3 -3
  71. package/lib/LineHeight.cjs +1 -1
  72. package/lib/LineHeight.js +4 -4
  73. package/lib/Link.cjs +1 -1
  74. package/lib/Link.js +2 -2
  75. package/lib/{LinkEditBlock-B1m-TVMu.js → LinkEditBlock-BYWwH2_x.js} +59 -32
  76. package/lib/{LinkEditBlock-DQ8-iufJ.cjs → LinkEditBlock-Z7RRurvx.cjs} +2 -2
  77. package/lib/MarkdownPaste.cjs +1 -1
  78. package/lib/MarkdownPaste.js +1 -1
  79. package/lib/Mention.cjs +1 -1
  80. package/lib/Mention.js +9 -5
  81. package/lib/Mermaid.cjs +2 -2
  82. package/lib/Mermaid.js +61 -62
  83. package/lib/MoreMark.cjs +1 -1
  84. package/lib/MoreMark.js +5 -5
  85. package/lib/OrderedList.cjs +1 -1
  86. package/lib/OrderedList.js +2 -2
  87. package/lib/SearchAndReplace.cjs +1 -1
  88. package/lib/SearchAndReplace.js +14 -14
  89. package/lib/SlashCommand.cjs +1 -1
  90. package/lib/SlashCommand.js +7 -7
  91. package/lib/{SlashCommandNodeView-Dt6n1SP9.js → SlashCommandNodeView-C0l3Fb_3.js} +10 -10
  92. package/lib/{SlashCommandNodeView-DNixmQGa.cjs → SlashCommandNodeView-DPPmYEjC.cjs} +1 -1
  93. package/lib/Strike.cjs +1 -1
  94. package/lib/Strike.js +2 -2
  95. package/lib/{Table-C5JxBXef.cjs → Table-D5G3rfwb.cjs} +5 -5
  96. package/lib/{Table-DdEgaUwa.js → Table-DwseaFSD.js} +115 -97
  97. package/lib/Table.cjs +1 -1
  98. package/lib/Table.js +1 -1
  99. package/lib/TaskList.cjs +1 -1
  100. package/lib/TaskList.js +2 -2
  101. package/lib/TextAlign.cjs +1 -1
  102. package/lib/TextAlign.js +11 -11
  103. package/lib/TextDirection.cjs +1 -1
  104. package/lib/TextDirection.js +3 -3
  105. package/lib/TextUnderline.cjs +1 -1
  106. package/lib/TextUnderline.js +2 -2
  107. package/lib/{Twitter-Dnz9qyW0.js → Twitter-DP26Lkn8.js} +195 -195
  108. package/lib/Twitter-q4ZGZL0i.cjs +1 -0
  109. package/lib/Twitter.cjs +1 -1
  110. package/lib/Twitter.js +3 -3
  111. package/lib/Video.cjs +1 -1
  112. package/lib/Video.js +5 -5
  113. package/lib/bubble.cjs +6 -6
  114. package/lib/bubble.js +2783 -2137
  115. package/lib/{clsx-D6gYQn3o.cjs → clsx-DRbkQ4T7.cjs} +1 -1
  116. package/lib/{clsx-0OU6n9va.js → clsx-_bq4MQQ7.js} +14 -4
  117. package/lib/components/Bubble/RichTextBubbleCallout.d.ts +1 -1
  118. package/lib/components/Bubble/RichTextBubbleCodeBlock.d.ts +1 -1
  119. package/lib/components/Bubble/RichTextBubbleColumns.d.ts +1 -1
  120. package/lib/components/Bubble/RichTextBubbleDrawer.d.ts +1 -1
  121. package/lib/components/Bubble/RichTextBubbleExcalidraw.d.ts +1 -1
  122. package/lib/components/Bubble/RichTextBubbleIframe.d.ts +1 -1
  123. package/lib/components/Bubble/RichTextBubbleKatex.d.ts +2 -1
  124. package/lib/components/Bubble/RichTextBubbleLink.d.ts +1 -1
  125. package/lib/components/Bubble/RichTextBubbleMedia.d.ts +3 -3
  126. package/lib/components/Bubble/RichTextBubbleMenuDragHandle.d.ts +2 -1
  127. package/lib/components/Bubble/RichTextBubbleMermaid.d.ts +1 -1
  128. package/lib/components/Bubble/RichTextBubbleTable.d.ts +1 -1
  129. package/lib/components/Bubble/RichTextBubbleText.d.ts +1 -1
  130. package/lib/components/Bubble/RichTextBubbleTwitter.d.ts +1 -1
  131. package/lib/components/ColorPicker.d.ts +1 -1
  132. package/lib/components/ReactBus.d.ts +1 -1
  133. package/lib/components/RichTextProvider.d.ts +1 -1
  134. package/lib/components/SlashDialogTrigger/RenderDialogUploadImage.d.ts +1 -1
  135. package/lib/components/SlashDialogTrigger/RenderDialogUploadVideo.d.ts +1 -1
  136. package/lib/components/SlashDialogTrigger/SlashDialogTrigger.d.ts +2 -1
  137. package/lib/components/icons/Activity.d.ts +2 -1
  138. package/lib/components/icons/Animas.d.ts +2 -1
  139. package/lib/components/icons/AspectRatio.d.ts +1 -1
  140. package/lib/components/icons/Blockquote.d.ts +1 -1
  141. package/lib/components/icons/CodeView.d.ts +1 -1
  142. package/lib/components/icons/ColumnAddLeft.d.ts +1 -1
  143. package/lib/components/icons/ColumnAddRight.d.ts +1 -1
  144. package/lib/components/icons/DeleteColumn.d.ts +1 -1
  145. package/lib/components/icons/DeleteRow.d.ts +1 -1
  146. package/lib/components/icons/Direction.d.ts +1 -1
  147. package/lib/components/icons/Excalidraw.d.ts +1 -1
  148. package/lib/components/icons/ExportPdf.d.ts +1 -1
  149. package/lib/components/icons/ExportWord.d.ts +2 -1
  150. package/lib/components/icons/FileWordOutline.d.ts +1 -1
  151. package/lib/components/icons/Flag.d.ts +2 -1
  152. package/lib/components/icons/Food.d.ts +2 -1
  153. package/lib/components/icons/GIfIcon.d.ts +1 -1
  154. package/lib/components/icons/Html.d.ts +1 -1
  155. package/lib/components/icons/Icon.d.ts +1 -1
  156. package/lib/components/icons/IconColorFill.d.ts +1 -1
  157. package/lib/components/icons/IconHighlightFill.d.ts +1 -1
  158. package/lib/components/icons/ImportWord.d.ts +2 -1
  159. package/lib/components/icons/LeftToRight.d.ts +1 -1
  160. package/lib/components/icons/LineHeight.d.ts +1 -1
  161. package/lib/components/icons/MenuDown.d.ts +1 -1
  162. package/lib/components/icons/Mermaid.d.ts +1 -1
  163. package/lib/components/icons/NoFill.d.ts +1 -1
  164. package/lib/components/icons/Object.d.ts +2 -1
  165. package/lib/components/icons/RightToLeft.d.ts +1 -1
  166. package/lib/components/icons/SizeL.d.ts +1 -1
  167. package/lib/components/icons/SizeM.d.ts +1 -1
  168. package/lib/components/icons/SizeS.d.ts +1 -1
  169. package/lib/components/icons/Symbol.d.ts +2 -1
  170. package/lib/components/icons/Travel.d.ts +2 -1
  171. package/lib/components/icons/Twitter.d.ts +1 -1
  172. package/lib/components/ui/dialog.d.ts +2 -2
  173. package/lib/components/ui/dropdown-menu.d.ts +1 -1
  174. package/lib/components/ui/emoji-picker.d.ts +4 -4
  175. package/lib/components/ui/toaster.d.ts +1 -1
  176. package/lib/{dropdown-menu-ROihzXsP.js → dropdown-menu-BKSX4gvT.js} +1 -1
  177. package/lib/{dropdown-menu-yQ-sQ1k4.cjs → dropdown-menu-CURWpB9o.cjs} +1 -1
  178. package/lib/extensions/Attachment/components/NodeViewAttachment/FileIcon.d.ts +1 -1
  179. package/lib/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.d.ts +1 -1
  180. package/lib/extensions/Attachment/components/RichTextAttachment.d.ts +1 -1
  181. package/lib/extensions/Blockquote/components/RichTextBlockquote.d.ts +1 -1
  182. package/lib/extensions/Bold/components/RichTextBold.d.ts +1 -1
  183. package/lib/extensions/BulletList/components/RichTextBulletList.d.ts +1 -1
  184. package/lib/extensions/Callout/components/NodeViewCallout/NodeViewCallout.d.ts +1 -1
  185. package/lib/extensions/Callout/components/RichTextCallout.d.ts +1 -1
  186. package/lib/extensions/Clear/components/RichTextClear.d.ts +1 -1
  187. package/lib/extensions/Code/components/RichTextCode.d.ts +1 -1
  188. package/lib/extensions/CodeBlock/components/RichTextCodeBlock.d.ts +2 -1
  189. package/lib/extensions/CodeView/components/RichTextCodeView.d.ts +1 -1
  190. package/lib/extensions/Color/components/RichTextColor.d.ts +1 -1
  191. package/lib/extensions/Column/components/RichTextColumn.d.ts +1 -1
  192. package/lib/extensions/Drawer/components/ControlDrawer/ControlDrawer.d.ts +2 -1
  193. package/lib/extensions/Drawer/components/ControlDrawer/icon.d.ts +27 -27
  194. package/lib/extensions/Drawer/components/EditDrawerBlock.d.ts +1 -1
  195. package/lib/extensions/Drawer/components/NodeViewDrawer/NodeViewDrawer.d.ts +2 -1
  196. package/lib/extensions/Drawer/components/RichTextDrawer.d.ts +1 -1
  197. package/lib/extensions/Emoji/components/RichTextEmoji.d.ts +2 -1
  198. package/lib/extensions/Excalidraw/components/NodeViewExcalidraw/NodeViewExcalidraw.d.ts +2 -1
  199. package/lib/extensions/Excalidraw/components/RichTextExcalidraw.d.ts +1 -1
  200. package/lib/extensions/ExportPdf/components/RichTextExportPdf.d.ts +1 -1
  201. package/lib/extensions/ExportWord/components/RichTextExportWord.d.ts +1 -1
  202. package/lib/extensions/FontFamily/components/RichTextFontFamily.d.ts +1 -1
  203. package/lib/extensions/FontSize/components/RichTextFontSize.d.ts +1 -1
  204. package/lib/extensions/FormatPainter/FormatPainter.d.ts +17 -0
  205. package/lib/extensions/FormatPainter/components/RichTextFormatPainter.d.ts +1 -0
  206. package/lib/extensions/FormatPainter/index.d.ts +1 -0
  207. package/lib/extensions/Heading/components/RichTextHeading.d.ts +1 -1
  208. package/lib/extensions/Highlight/components/RichTextHighlight.d.ts +2 -1
  209. package/lib/extensions/History/components/RichTextHistory.d.ts +3 -2
  210. package/lib/extensions/HorizontalRule/components/RichTextHorizontalRule.d.ts +1 -1
  211. package/lib/extensions/Iframe/components/IframeNodeView.d.ts +1 -1
  212. package/lib/extensions/Iframe/components/RichTextIframe.d.ts +1 -1
  213. package/lib/extensions/Image/components/ImageCropper.d.ts +2 -1
  214. package/lib/extensions/Image/components/ImageView.d.ts +2 -1
  215. package/lib/extensions/Image/components/RichTextImage.d.ts +1 -1
  216. package/lib/extensions/ImageGif/components/ImageGifView.d.ts +2 -1
  217. package/lib/extensions/ImageGif/components/RichTextImageGif.d.ts +2 -1
  218. package/lib/extensions/ImportWord/components/RichTextImportWord.d.ts +1 -1
  219. package/lib/extensions/Indent/components/RichTextIndent.d.ts +1 -1
  220. package/lib/extensions/Italic/components/RichTextItalic.d.ts +1 -1
  221. package/lib/extensions/Katex/components/KatexWrapper.d.ts +1 -1
  222. package/lib/extensions/Katex/components/RichTextKatex.d.ts +1 -1
  223. package/lib/extensions/LineHeight/components/RichTextLightHeight.d.ts +1 -1
  224. package/lib/extensions/Link/components/LinkEditBlock.d.ts +1 -1
  225. package/lib/extensions/Link/components/LinkViewBlock.d.ts +2 -1
  226. package/lib/extensions/Link/components/RichTextLink.d.ts +1 -1
  227. package/lib/extensions/Mermaid/components/NodeViewMermaid/NodeViewMermaid.d.ts +2 -1
  228. package/lib/extensions/Mermaid/components/RichTextMermaid.d.ts +1 -1
  229. package/lib/extensions/MoreMark/components/RichTextMoreMark.d.ts +1 -1
  230. package/lib/extensions/OrderedList/components/RichTextOrderedList.d.ts +1 -1
  231. package/lib/extensions/SearchAndReplace/components/RichTextSearchAndReplace.d.ts +1 -1
  232. package/lib/extensions/SlashCommand/components/SlashCommandList.d.ts +1 -1
  233. package/lib/extensions/Strike/components/RichTextStrike.d.ts +1 -1
  234. package/lib/extensions/Table/components/CreateTablePopover.d.ts +2 -1
  235. package/lib/extensions/Table/components/RichTextTable.d.ts +2 -1
  236. package/lib/extensions/TaskList/components/RichTextTaskList.d.ts +1 -1
  237. package/lib/extensions/TextAlign/components/RichTextAlign.d.ts +1 -1
  238. package/lib/extensions/TextDirection/components/RichTextTextDirection.d.ts +1 -1
  239. package/lib/extensions/TextUnderline/components/RichTextUnderline.d.ts +1 -1
  240. package/lib/extensions/Twitter/components/FormEditLinkTwitter.d.ts +1 -1
  241. package/lib/extensions/Twitter/components/NodeViewTweet.d.ts +1 -1
  242. package/lib/extensions/Twitter/components/RichTextTwitter.d.ts +1 -1
  243. package/lib/extensions/Video/components/RichTextVideo.d.ts +1 -1
  244. package/lib/index-BGfIcDCQ.cjs +26 -0
  245. package/lib/index-BaR0Brts.js +1115 -0
  246. package/lib/index-BgNKVyMW.cjs +2 -0
  247. package/lib/index-BpLw6ebr.cjs +1 -0
  248. package/lib/{index-X6WZUM9O.js → index-C52cuQ_Y.js} +1503 -1352
  249. package/lib/index-CDw4Eszh.cjs +12 -0
  250. package/lib/{index-CUvjYuRp.cjs → index-CHVV5iY-.cjs} +1 -1
  251. package/lib/{index-zw-Kd38i.js → index-CJMI7Fjf.js} +1 -1
  252. package/lib/{index-D-Ouz0vF.js → index-DQy9iBzV.js} +1 -1
  253. package/lib/index-Dbm_Mans.js +1756 -0
  254. package/lib/{index-oj858lQO.js → index-DtyAGMbq.js} +208 -208
  255. package/lib/{index-BblvcbTH.js → index-Dx-Dh7KS.js} +1464 -1348
  256. package/lib/{index-BAb_UADw.cjs → index-SEMQrdk2.cjs} +1 -1
  257. package/lib/index-aujjnfSJ.cjs +1 -0
  258. package/lib/index.cjs +1 -1
  259. package/lib/index.js +12 -12
  260. package/lib/{jsx-runtime-CT7Pcg-t.js → jsx-runtime-DE8oVoME.js} +3 -1
  261. package/lib/locale-bundle.cjs +1 -1
  262. package/lib/locale-bundle.js +1 -1
  263. package/lib/locales/index.d.ts +1 -1
  264. package/lib/{popover-BfWFqCIs.js → popover-BB-ZDnqk.js} +1 -1
  265. package/lib/{popover-BPzkMuyi.cjs → popover-CrywEkBR.cjs} +1 -1
  266. package/lib/{renderNodeView-D--fDFov.cjs → renderNodeView-5h3-p80E.cjs} +1 -1
  267. package/lib/{renderNodeView-CfWJK4rG.js → renderNodeView-DoKZ4GYy.js} +2 -2
  268. package/lib/{separator-DpaS43Gt.cjs → separator-BGO9AZp4.cjs} +1 -1
  269. package/lib/{separator-CBPrZizK.js → separator-DuuOJRQd.js} +21 -21
  270. package/lib/store/EditorEditableReactive.d.ts +1 -1
  271. package/lib/store/ThemeColorReactive.d.ts +1 -1
  272. package/lib/style.css +1 -1
  273. package/lib/types.d.ts +2 -2
  274. package/lib/{updatePosition-DGPtRfWN.cjs → updatePosition-B1oRJE1x.cjs} +1 -1
  275. package/lib/{updatePosition-BwzAsiY0.js → updatePosition-CFTYKYNJ.js} +2 -2
  276. package/package.json +79 -66
  277. package/lib/Callout-DWOMZPiP.cjs +0 -1
  278. package/lib/Callout-ZlPQrMEt.js +0 -340
  279. package/lib/Katex-D9FP7EUE.cjs +0 -4
  280. package/lib/Twitter--tfifMt1.cjs +0 -1
  281. package/lib/index-BF3EVCB1.cjs +0 -2
  282. package/lib/index-Bcj8cyOO.cjs +0 -24
  283. package/lib/index-CGjT-a9h.js +0 -1377
  284. package/lib/index-CPTpXLfX.cjs +0 -11
  285. package/lib/index-CWw4s87s.cjs +0 -1
  286. package/lib/index-Cal5SPfB.js +0 -779
  287. package/lib/index-Gi752TMk.cjs +0 -1
  288. package/lib/textarea-Bl64keav.js +0 -20
  289. package/lib/textarea-wvARZKyA.cjs +0 -1
@@ -1,779 +0,0 @@
1
- import { N as g, w as b, m as L, r as $, E as S, a as K, p as x, i as I, b as z, c as V, d as O, e as X } from "./index-BblvcbTH.js";
2
- var F = Object.defineProperty, G = (t, e) => {
3
- for (var s in e)
4
- F(t, s, { get: e[s], enumerable: !0 });
5
- }, W = "listItem", w = "textStyle", C = /^\s*([-+*])\s$/, q = g.create({
6
- name: "bulletList",
7
- addOptions() {
8
- return {
9
- itemTypeName: "listItem",
10
- HTMLAttributes: {},
11
- keepMarks: !1,
12
- keepAttributes: !1
13
- };
14
- },
15
- group: "block list",
16
- content() {
17
- return `${this.options.itemTypeName}+`;
18
- },
19
- parseHTML() {
20
- return [{ tag: "ul" }];
21
- },
22
- renderHTML({ HTMLAttributes: t }) {
23
- return ["ul", L(this.options.HTMLAttributes, t), 0];
24
- },
25
- markdownTokenName: "list",
26
- parseMarkdown: (t, e) => t.type !== "list" || t.ordered ? [] : {
27
- type: "bulletList",
28
- content: t.items ? e.parseChildren(t.items) : []
29
- },
30
- renderMarkdown: (t, e) => t.content ? e.renderChildren(t.content, `
31
- `) : "",
32
- markdownOptions: {
33
- indentsContent: !0
34
- },
35
- addCommands() {
36
- return {
37
- toggleBulletList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(W, this.editor.getAttributes(w)).run() : t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
38
- };
39
- },
40
- addKeyboardShortcuts() {
41
- return {
42
- "Mod-Shift-8": () => this.editor.commands.toggleBulletList()
43
- };
44
- },
45
- addInputRules() {
46
- let t = b({
47
- find: C,
48
- type: this.type
49
- });
50
- return (this.options.keepMarks || this.options.keepAttributes) && (t = b({
51
- find: C,
52
- type: this.type,
53
- keepMarks: this.options.keepMarks,
54
- keepAttributes: this.options.keepAttributes,
55
- getAttributes: () => this.editor.getAttributes(w),
56
- editor: this.editor
57
- })), [t];
58
- }
59
- });
60
- function Y(t) {
61
- var e, s;
62
- const n = (e = t.tokens) == null ? void 0 : e[0];
63
- return !!(t.text && ((s = t.tokens) == null ? void 0 : s.length) === 1 && (n == null ? void 0 : n.type) === "list" && n.ordered && n.raw === t.text);
64
- }
65
- function J(t, e) {
66
- return e.tokenizeInline ? e.parseInline(e.tokenizeInline(t)) : e.parseInline([
67
- {
68
- type: "text",
69
- raw: t,
70
- text: t
71
- }
72
- ]);
73
- }
74
- var Q = g.create({
75
- name: "listItem",
76
- addOptions() {
77
- return {
78
- HTMLAttributes: {},
79
- bulletListTypeName: "bulletList",
80
- orderedListTypeName: "orderedList"
81
- };
82
- },
83
- content: "paragraph block*",
84
- defining: !0,
85
- parseHTML() {
86
- return [
87
- {
88
- tag: "li"
89
- }
90
- ];
91
- },
92
- renderHTML({ HTMLAttributes: t }) {
93
- return ["li", L(this.options.HTMLAttributes, t), 0];
94
- },
95
- markdownTokenName: "list_item",
96
- parseMarkdown: (t, e) => {
97
- var s;
98
- if (t.type !== "list_item")
99
- return [];
100
- const n = (s = e.parseBlockChildren) != null ? s : e.parseChildren;
101
- let r = [];
102
- if (t.tokens && t.tokens.length > 0) {
103
- if (Y(t))
104
- return {
105
- type: "listItem",
106
- content: [
107
- {
108
- type: "paragraph",
109
- content: J(t.text || "", e)
110
- }
111
- ]
112
- };
113
- if (t.tokens.some((u) => u.type === "paragraph"))
114
- r = n(t.tokens);
115
- else {
116
- const u = t.tokens[0];
117
- if (u && u.type === "text" && u.tokens && u.tokens.length > 0) {
118
- if (r = [
119
- {
120
- type: "paragraph",
121
- content: e.parseInline(u.tokens)
122
- }
123
- ], t.tokens.length > 1) {
124
- const p = t.tokens.slice(1), h = n(p);
125
- r.push(...h);
126
- }
127
- } else
128
- r = n(t.tokens);
129
- }
130
- }
131
- return r.length === 0 && (r = [
132
- {
133
- type: "paragraph",
134
- content: []
135
- }
136
- ]), {
137
- type: "listItem",
138
- content: r
139
- };
140
- },
141
- renderMarkdown: (t, e, s) => $(
142
- t,
143
- e,
144
- (n) => {
145
- var r, i;
146
- return n.parentType === "bulletList" ? "- " : n.parentType === "orderedList" ? `${(((i = (r = n.meta) == null ? void 0 : r.parentAttrs) == null ? void 0 : i.start) || 1) + n.index}. ` : "- ";
147
- },
148
- s
149
- ),
150
- addKeyboardShortcuts() {
151
- return {
152
- Enter: () => this.editor.commands.splitListItem(this.name),
153
- Tab: () => this.editor.commands.sinkListItem(this.name),
154
- "Shift-Tab": () => this.editor.commands.liftListItem(this.name)
155
- };
156
- }
157
- }), U = {};
158
- G(U, {
159
- findListItemPos: () => y,
160
- getNextListDepth: () => A,
161
- handleBackspace: () => T,
162
- handleDelete: () => M,
163
- hasListBefore: () => _,
164
- hasListItemAfter: () => Z,
165
- hasListItemBefore: () => B,
166
- listItemHasSubList: () => P,
167
- nextListIsDeeper: () => D,
168
- nextListIsHigher: () => j
169
- });
170
- var y = (t, e) => {
171
- const { $from: s } = e.selection, n = O(t, e.schema);
172
- let r = null, i = s.depth, u = s.pos, a = null;
173
- for (; i > 0 && a === null; )
174
- r = s.node(i), r.type === n ? a = i : (i -= 1, u -= 1);
175
- return a === null ? null : { $pos: e.doc.resolve(u), depth: a };
176
- }, A = (t, e) => {
177
- const s = y(t, e);
178
- if (!s)
179
- return !1;
180
- const [, n] = X(e, t, s.$pos.pos + 4);
181
- return n;
182
- }, _ = (t, e, s) => {
183
- const { $anchor: n } = t.selection, r = Math.max(0, n.pos - 2), i = t.doc.resolve(r).node();
184
- return !(!i || !s.includes(i.type.name));
185
- }, B = (t, e) => {
186
- var s;
187
- const { $anchor: n } = e.selection, r = e.doc.resolve(n.pos - 2);
188
- return !(r.index() === 0 || ((s = r.nodeBefore) == null ? void 0 : s.type.name) !== t);
189
- }, P = (t, e, s) => {
190
- if (!s)
191
- return !1;
192
- const n = O(t, e.schema);
193
- let r = !1;
194
- return s.descendants((i) => {
195
- i.type === n && (r = !0);
196
- }), r;
197
- }, T = (t, e, s) => {
198
- if (t.commands.undoInputRule())
199
- return !0;
200
- if (t.state.selection.from !== t.state.selection.to)
201
- return !1;
202
- if (!I(t.state, e) && _(t.state, e, s)) {
203
- const { $anchor: a } = t.state.selection, p = t.state.doc.resolve(a.before() - 1), h = [];
204
- p.node().descendants((c, l) => {
205
- c.type.name === e && h.push({ node: c, pos: l });
206
- });
207
- const m = h.at(-1);
208
- if (!m)
209
- return !1;
210
- const o = t.state.doc.resolve(p.start() + m.pos + 1);
211
- return t.chain().cut({ from: a.start() - 1, to: a.end() + 1 }, o.end()).joinForward().run();
212
- }
213
- if (!I(t.state, e) || !z(t.state))
214
- return !1;
215
- const n = y(e, t.state);
216
- if (!n)
217
- return !1;
218
- const i = t.state.doc.resolve(n.$pos.pos - 2).node(n.depth), u = P(e, t.state, i);
219
- return B(e, t.state) && !u ? t.commands.joinItemBackward() : t.chain().liftListItem(e).run();
220
- }, D = (t, e) => {
221
- const s = A(t, e), n = y(t, e);
222
- return !n || !s ? !1 : s > n.depth;
223
- }, j = (t, e) => {
224
- const s = A(t, e), n = y(t, e);
225
- return !n || !s ? !1 : s < n.depth;
226
- }, M = (t, e) => {
227
- if (!I(t.state, e) || !V(t.state, e))
228
- return !1;
229
- const { selection: s } = t.state, { $from: n, $to: r } = s;
230
- return !s.empty && n.sameParent(r) ? !1 : D(e, t.state) ? t.chain().focus(t.state.selection.from + 4).lift(e).joinBackward().run() : j(e, t.state) ? t.chain().joinForward().joinBackward().run() : t.commands.joinItemForward();
231
- }, Z = (t, e) => {
232
- var s;
233
- const { $anchor: n } = e.selection, r = e.doc.resolve(n.pos - n.parentOffset - 2);
234
- return !(r.index() === r.parent.childCount - 1 || ((s = r.nodeAfter) == null ? void 0 : s.type.name) !== t);
235
- }, tt = S.create({
236
- name: "listKeymap",
237
- addOptions() {
238
- return {
239
- listTypes: [
240
- {
241
- itemName: "listItem",
242
- wrapperNames: ["bulletList", "orderedList"]
243
- },
244
- {
245
- itemName: "taskItem",
246
- wrapperNames: ["taskList"]
247
- }
248
- ]
249
- };
250
- },
251
- addKeyboardShortcuts() {
252
- return {
253
- Delete: ({ editor: t }) => {
254
- let e = !1;
255
- return this.options.listTypes.forEach(({ itemName: s }) => {
256
- t.state.schema.nodes[s] !== void 0 && M(t, s) && (e = !0);
257
- }), e;
258
- },
259
- "Mod-Delete": ({ editor: t }) => {
260
- let e = !1;
261
- return this.options.listTypes.forEach(({ itemName: s }) => {
262
- t.state.schema.nodes[s] !== void 0 && M(t, s) && (e = !0);
263
- }), e;
264
- },
265
- Backspace: ({ editor: t }) => {
266
- let e = !1;
267
- return this.options.listTypes.forEach(({ itemName: s, wrapperNames: n }) => {
268
- t.state.schema.nodes[s] !== void 0 && T(t, s, n) && (e = !0);
269
- }), e;
270
- },
271
- "Mod-Backspace": ({ editor: t }) => {
272
- let e = !1;
273
- return this.options.listTypes.forEach(({ itemName: s, wrapperNames: n }) => {
274
- t.state.schema.nodes[s] !== void 0 && T(t, s, n) && (e = !0);
275
- }), e;
276
- }
277
- };
278
- }
279
- }), N = /^(\s*)(\d+)\.\s+(.*)$/, et = /^\s/;
280
- function st(t) {
281
- const e = t.trimStart();
282
- return /^[-+*]\s+/.test(e) || /^\d+\.\s+/.test(e) || /^>\s?/.test(e) || /^```/.test(e) || /^~~~/.test(e);
283
- }
284
- function nt(t) {
285
- const e = [], s = [];
286
- let n = !1;
287
- return t.forEach((r) => {
288
- if (n) {
289
- s.push(r);
290
- return;
291
- }
292
- if (r.trim() === "") {
293
- n = !0, s.push(r);
294
- return;
295
- }
296
- if (e.length > 0 && st(r)) {
297
- n = !0, s.push(r);
298
- return;
299
- }
300
- e.push(r);
301
- }), {
302
- paragraphLines: e,
303
- blockLines: s
304
- };
305
- }
306
- function rt(t) {
307
- const e = [];
308
- let s = 0, n = 0;
309
- for (; s < t.length; ) {
310
- const r = t[s], i = r.match(N);
311
- if (!i)
312
- break;
313
- const [, u, a, p] = i, h = u.length, m = [p];
314
- let o = s + 1;
315
- const c = [r];
316
- let l = !1;
317
- for (; o < t.length; ) {
318
- const d = t[o];
319
- if (d.match(N))
320
- break;
321
- if (d.trim() === "")
322
- c.push(d), m.push(""), l = !0, o += 1;
323
- else if (d.match(et))
324
- c.push(d), m.push(d.slice(h + 2)), o += 1;
325
- else {
326
- if (l)
327
- break;
328
- c.push(d), m.push(d), o += 1;
329
- }
330
- }
331
- e.push({
332
- indent: h,
333
- number: parseInt(a, 10),
334
- content: m.join(`
335
- `).trim(),
336
- contentLines: m,
337
- raw: c.join(`
338
- `)
339
- }), n = o, s = o;
340
- }
341
- return [e, n];
342
- }
343
- function R(t, e, s) {
344
- const n = [];
345
- let r = 0;
346
- for (; r < t.length; ) {
347
- const i = t[r];
348
- if (i.indent === e) {
349
- const { paragraphLines: u, blockLines: a } = nt(i.contentLines), p = u.join(`
350
- `).trim(), h = [];
351
- p && h.push({
352
- type: "paragraph",
353
- raw: p,
354
- tokens: s.inlineTokens(p)
355
- });
356
- const m = a.join(`
357
- `).trim();
358
- if (m) {
359
- const l = s.blockTokens(m);
360
- h.push(...l);
361
- }
362
- let o = r + 1;
363
- const c = [];
364
- for (; o < t.length && t[o].indent > e; )
365
- c.push(t[o]), o += 1;
366
- if (c.length > 0) {
367
- const l = Math.min(...c.map((f) => f.indent)), d = R(c, l, s);
368
- h.push({
369
- type: "list",
370
- ordered: !0,
371
- start: c[0].number,
372
- items: d,
373
- raw: c.map((f) => f.raw).join(`
374
- `)
375
- });
376
- }
377
- n.push({
378
- type: "list_item",
379
- raw: i.raw,
380
- tokens: h
381
- }), r = o;
382
- } else
383
- r += 1;
384
- }
385
- return n;
386
- }
387
- function it(t, e) {
388
- return t.map((s) => {
389
- if (s.type !== "list_item")
390
- return e.parseChildren([s])[0];
391
- const n = [];
392
- return s.tokens && s.tokens.length > 0 && s.tokens.forEach((r) => {
393
- if (r.type === "paragraph" || r.type === "list" || r.type === "blockquote" || r.type === "code")
394
- n.push(...e.parseChildren([r]));
395
- else if (r.type === "text" && r.tokens) {
396
- const i = e.parseChildren([r]);
397
- n.push({
398
- type: "paragraph",
399
- content: i
400
- });
401
- } else {
402
- const i = e.parseChildren([r]);
403
- i.length > 0 && n.push(...i);
404
- }
405
- }), {
406
- type: "listItem",
407
- content: n
408
- };
409
- });
410
- }
411
- var at = "listItem", E = "textStyle", H = /^(\d+)\.\s$/, ot = g.create({
412
- name: "orderedList",
413
- addOptions() {
414
- return {
415
- itemTypeName: "listItem",
416
- HTMLAttributes: {},
417
- keepMarks: !1,
418
- keepAttributes: !1
419
- };
420
- },
421
- group: "block list",
422
- content() {
423
- return `${this.options.itemTypeName}+`;
424
- },
425
- addAttributes() {
426
- return {
427
- start: {
428
- default: 1,
429
- parseHTML: (t) => t.hasAttribute("start") ? parseInt(t.getAttribute("start") || "", 10) : 1
430
- },
431
- type: {
432
- default: null,
433
- parseHTML: (t) => t.getAttribute("type")
434
- }
435
- };
436
- },
437
- parseHTML() {
438
- return [
439
- {
440
- tag: "ol"
441
- }
442
- ];
443
- },
444
- renderHTML({ HTMLAttributes: t }) {
445
- const { start: e, ...s } = t;
446
- return e === 1 ? ["ol", L(this.options.HTMLAttributes, s), 0] : ["ol", L(this.options.HTMLAttributes, t), 0];
447
- },
448
- markdownTokenName: "list",
449
- parseMarkdown: (t, e) => {
450
- if (t.type !== "list" || !t.ordered)
451
- return [];
452
- const s = t.start || 1, n = t.items ? it(t.items, e) : [];
453
- return s !== 1 ? {
454
- type: "orderedList",
455
- attrs: { start: s },
456
- content: n
457
- } : {
458
- type: "orderedList",
459
- content: n
460
- };
461
- },
462
- renderMarkdown: (t, e) => t.content ? e.renderChildren(t.content, `
463
- `) : "",
464
- markdownTokenizer: {
465
- name: "orderedList",
466
- level: "block",
467
- start: (t) => {
468
- const e = t.match(/^(\s*)(\d+)\.\s+/), s = e == null ? void 0 : e.index;
469
- return s !== void 0 ? s : -1;
470
- },
471
- tokenize: (t, e, s) => {
472
- var n;
473
- const r = t.split(`
474
- `), [i, u] = rt(r);
475
- if (i.length === 0)
476
- return;
477
- const a = R(i, 0, s);
478
- return a.length === 0 ? void 0 : {
479
- type: "list",
480
- ordered: !0,
481
- start: ((n = i[0]) == null ? void 0 : n.number) || 1,
482
- items: a,
483
- raw: r.slice(0, u).join(`
484
- `)
485
- };
486
- }
487
- },
488
- markdownOptions: {
489
- indentsContent: !0
490
- },
491
- addCommands() {
492
- return {
493
- toggleOrderedList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(at, this.editor.getAttributes(E)).run() : t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
494
- };
495
- },
496
- addKeyboardShortcuts() {
497
- return {
498
- "Mod-Shift-7": () => this.editor.commands.toggleOrderedList()
499
- };
500
- },
501
- addInputRules() {
502
- let t = b({
503
- find: H,
504
- type: this.type,
505
- getAttributes: (e) => ({ start: +e[1] }),
506
- joinPredicate: (e, s) => s.childCount + s.attrs.start === +e[1]
507
- });
508
- return (this.options.keepMarks || this.options.keepAttributes) && (t = b({
509
- find: H,
510
- type: this.type,
511
- keepMarks: this.options.keepMarks,
512
- keepAttributes: this.options.keepAttributes,
513
- getAttributes: (e) => ({ start: +e[1], ...this.editor.getAttributes(E) }),
514
- joinPredicate: (e, s) => s.childCount + s.attrs.start === +e[1],
515
- editor: this.editor
516
- })), [t];
517
- }
518
- }), ut = /^\s*(\[([( |x])?\])\s$/, ct = g.create({
519
- name: "taskItem",
520
- addOptions() {
521
- return {
522
- nested: !1,
523
- HTMLAttributes: {},
524
- taskListTypeName: "taskList",
525
- a11y: void 0
526
- };
527
- },
528
- content() {
529
- return this.options.nested ? "paragraph block*" : "paragraph+";
530
- },
531
- defining: !0,
532
- addAttributes() {
533
- return {
534
- checked: {
535
- default: !1,
536
- keepOnSplit: !1,
537
- parseHTML: (t) => {
538
- const e = t.getAttribute("data-checked");
539
- return e === "" || e === "true";
540
- },
541
- renderHTML: (t) => ({
542
- "data-checked": t.checked
543
- })
544
- }
545
- };
546
- },
547
- parseHTML() {
548
- return [
549
- {
550
- tag: `li[data-type="${this.name}"]`,
551
- priority: 51
552
- }
553
- ];
554
- },
555
- renderHTML({ node: t, HTMLAttributes: e }) {
556
- return [
557
- "li",
558
- L(this.options.HTMLAttributes, e, {
559
- "data-type": this.name
560
- }),
561
- [
562
- "label",
563
- [
564
- "input",
565
- {
566
- type: "checkbox",
567
- checked: t.attrs.checked ? "checked" : null
568
- }
569
- ],
570
- ["span"]
571
- ],
572
- ["div", 0]
573
- ];
574
- },
575
- parseMarkdown: (t, e) => {
576
- const s = [];
577
- if (t.tokens && t.tokens.length > 0 ? s.push(e.createNode("paragraph", {}, e.parseInline(t.tokens))) : t.text ? s.push(e.createNode("paragraph", {}, [e.createNode("text", { text: t.text })])) : s.push(e.createNode("paragraph", {}, [])), t.nestedTokens && t.nestedTokens.length > 0) {
578
- const n = e.parseChildren(t.nestedTokens);
579
- s.push(...n);
580
- }
581
- return e.createNode("taskItem", { checked: t.checked || !1 }, s);
582
- },
583
- renderMarkdown: (t, e) => {
584
- var s;
585
- const r = `- [${(s = t.attrs) != null && s.checked ? "x" : " "}] `;
586
- return $(t, e, r);
587
- },
588
- addKeyboardShortcuts() {
589
- const t = {
590
- Enter: () => this.editor.commands.splitListItem(this.name),
591
- "Shift-Tab": () => this.editor.commands.liftListItem(this.name)
592
- };
593
- return this.options.nested ? {
594
- ...t,
595
- Tab: () => this.editor.commands.sinkListItem(this.name)
596
- } : t;
597
- },
598
- addNodeView() {
599
- return ({ node: t, HTMLAttributes: e, getPos: s, editor: n }) => {
600
- const r = document.createElement("li"), i = document.createElement("label"), u = document.createElement("span"), a = document.createElement("input"), p = document.createElement("div"), h = (o) => {
601
- var c, l;
602
- a.ariaLabel = ((l = (c = this.options.a11y) == null ? void 0 : c.checkboxLabel) == null ? void 0 : l.call(c, o, a.checked)) || `Task item checkbox for ${o.textContent || "empty task item"}`;
603
- };
604
- h(t), i.contentEditable = "false", a.type = "checkbox", a.addEventListener("mousedown", (o) => o.preventDefault()), a.addEventListener("change", (o) => {
605
- if (!n.isEditable && !this.options.onReadOnlyChecked) {
606
- a.checked = !a.checked;
607
- return;
608
- }
609
- const { checked: c } = o.target;
610
- n.isEditable && typeof s == "function" && n.chain().focus(void 0, { scrollIntoView: !1 }).command(({ tr: l }) => {
611
- const d = s();
612
- if (typeof d != "number")
613
- return !1;
614
- const f = l.doc.nodeAt(d);
615
- return l.setNodeMarkup(d, void 0, {
616
- ...f == null ? void 0 : f.attrs,
617
- checked: c
618
- }), !0;
619
- }).run(), !n.isEditable && this.options.onReadOnlyChecked && (this.options.onReadOnlyChecked(t, c) || (a.checked = !a.checked));
620
- }), Object.entries(this.options.HTMLAttributes).forEach(([o, c]) => {
621
- r.setAttribute(o, c);
622
- }), r.dataset.checked = t.attrs.checked, a.checked = t.attrs.checked, i.append(a, u), r.append(i, p), Object.entries(e).forEach(([o, c]) => {
623
- r.setAttribute(o, c);
624
- });
625
- let m = new Set(Object.keys(e));
626
- return {
627
- dom: r,
628
- contentDOM: p,
629
- update: (o) => {
630
- if (o.type !== this.type)
631
- return !1;
632
- r.dataset.checked = o.attrs.checked, a.checked = o.attrs.checked, h(o);
633
- const c = n.extensionManager.attributes, l = K(o, c), d = new Set(Object.keys(l)), f = this.options.HTMLAttributes;
634
- return m.forEach((k) => {
635
- d.has(k) || (k in f ? r.setAttribute(k, f[k]) : r.removeAttribute(k));
636
- }), Object.entries(l).forEach(([k, v]) => {
637
- v == null ? k in f ? r.setAttribute(k, f[k]) : r.removeAttribute(k) : r.setAttribute(k, v);
638
- }), m = d, !0;
639
- }
640
- };
641
- };
642
- },
643
- addInputRules() {
644
- return [
645
- b({
646
- find: ut,
647
- type: this.type,
648
- getAttributes: (t) => ({
649
- checked: t[t.length - 1] === "x"
650
- })
651
- })
652
- ];
653
- }
654
- }), lt = g.create({
655
- name: "taskList",
656
- addOptions() {
657
- return {
658
- itemTypeName: "taskItem",
659
- HTMLAttributes: {}
660
- };
661
- },
662
- group: "block list",
663
- content() {
664
- return `${this.options.itemTypeName}+`;
665
- },
666
- parseHTML() {
667
- return [
668
- {
669
- tag: `ul[data-type="${this.name}"]`,
670
- priority: 51
671
- }
672
- ];
673
- },
674
- renderHTML({ HTMLAttributes: t }) {
675
- return ["ul", L(this.options.HTMLAttributes, t, { "data-type": this.name }), 0];
676
- },
677
- parseMarkdown: (t, e) => e.createNode("taskList", {}, e.parseChildren(t.items || [])),
678
- renderMarkdown: (t, e) => t.content ? e.renderChildren(t.content, `
679
- `) : "",
680
- markdownTokenizer: {
681
- name: "taskList",
682
- level: "block",
683
- start(t) {
684
- var e;
685
- const s = (e = t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)) == null ? void 0 : e.index;
686
- return s !== void 0 ? s : -1;
687
- },
688
- tokenize(t, e, s) {
689
- const n = (i) => {
690
- const u = x(
691
- i,
692
- {
693
- itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
694
- extractItemData: (a) => ({
695
- indentLevel: a[1].length,
696
- mainContent: a[4],
697
- checked: a[3].toLowerCase() === "x"
698
- }),
699
- createToken: (a, p) => ({
700
- type: "taskItem",
701
- raw: "",
702
- mainContent: a.mainContent,
703
- indentLevel: a.indentLevel,
704
- checked: a.checked,
705
- text: a.mainContent,
706
- tokens: s.inlineTokens(a.mainContent),
707
- nestedTokens: p
708
- }),
709
- // Allow recursive nesting
710
- customNestedParser: n
711
- },
712
- s
713
- );
714
- return u ? [
715
- {
716
- type: "taskList",
717
- raw: u.raw,
718
- items: u.items
719
- }
720
- ] : s.blockTokens(i);
721
- }, r = x(
722
- t,
723
- {
724
- itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
725
- extractItemData: (i) => ({
726
- indentLevel: i[1].length,
727
- mainContent: i[4],
728
- checked: i[3].toLowerCase() === "x"
729
- }),
730
- createToken: (i, u) => ({
731
- type: "taskItem",
732
- raw: "",
733
- mainContent: i.mainContent,
734
- indentLevel: i.indentLevel,
735
- checked: i.checked,
736
- text: i.mainContent,
737
- tokens: s.inlineTokens(i.mainContent),
738
- nestedTokens: u
739
- }),
740
- // Use the recursive parser for nested content
741
- customNestedParser: n
742
- },
743
- s
744
- );
745
- if (r)
746
- return {
747
- type: "taskList",
748
- raw: r.raw,
749
- items: r.items
750
- };
751
- }
752
- },
753
- markdownOptions: {
754
- indentsContent: !0
755
- },
756
- addCommands() {
757
- return {
758
- toggleTaskList: () => ({ commands: t }) => t.toggleList(this.name, this.options.itemTypeName)
759
- };
760
- },
761
- addKeyboardShortcuts() {
762
- return {
763
- "Mod-Shift-9": () => this.editor.commands.toggleTaskList()
764
- };
765
- }
766
- });
767
- S.create({
768
- name: "listKit",
769
- addExtensions() {
770
- const t = [];
771
- return this.options.bulletList !== !1 && t.push(q.configure(this.options.bulletList)), this.options.listItem !== !1 && t.push(Q.configure(this.options.listItem)), this.options.listKeymap !== !1 && t.push(tt.configure(this.options.listKeymap)), this.options.orderedList !== !1 && t.push(ot.configure(this.options.orderedList)), this.options.taskItem !== !1 && t.push(ct.configure(this.options.taskItem)), this.options.taskList !== !1 && t.push(lt.configure(this.options.taskList)), t;
772
- }
773
- });
774
- export {
775
- q as B,
776
- ot as O,
777
- lt as T,
778
- ct as a
779
- };