@prosekit/extensions 0.13.0 → 0.14.1

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 (321) hide show
  1. package/dist/{drop-indicator-B1QHFb5m.js → drop-indicator-DJq8pF92.js} +11 -10
  2. package/dist/drop-indicator-DJq8pF92.js.map +1 -0
  3. package/dist/{file-DrfcSid-.js → file-upload-I9m1EJAM.js} +3 -3
  4. package/dist/file-upload-I9m1EJAM.js.map +1 -0
  5. package/dist/{index-oIc1a2f2.d.ts → file-upload-dr3IXUty.d.ts} +1 -1
  6. package/dist/file-upload-dr3IXUty.d.ts.map +1 -0
  7. package/dist/{paste-rule-pVb4sqvJ.js → mark-paste-rule-n_2Ehmb5.js} +7 -7
  8. package/dist/mark-paste-rule-n_2Ehmb5.js.map +1 -0
  9. package/dist/{mark-rule-BcLB4Uv2.js → mark-rule-CUnXwBuy.js} +6 -6
  10. package/dist/mark-rule-CUnXwBuy.js.map +1 -0
  11. package/dist/prosekit-extensions-autocomplete.d.ts.map +1 -1
  12. package/dist/prosekit-extensions-autocomplete.js.map +1 -1
  13. package/dist/prosekit-extensions-background-color.d.ts +62 -0
  14. package/dist/prosekit-extensions-background-color.d.ts.map +1 -0
  15. package/dist/prosekit-extensions-background-color.js +76 -0
  16. package/dist/prosekit-extensions-background-color.js.map +1 -0
  17. package/dist/prosekit-extensions-blockquote.d.ts.map +1 -1
  18. package/dist/prosekit-extensions-blockquote.js +1 -1
  19. package/dist/prosekit-extensions-blockquote.js.map +1 -1
  20. package/dist/prosekit-extensions-bold.d.ts.map +1 -1
  21. package/dist/prosekit-extensions-bold.js +1 -1
  22. package/dist/prosekit-extensions-bold.js.map +1 -1
  23. package/dist/prosekit-extensions-code-block.d.ts +1 -1
  24. package/dist/prosekit-extensions-code-block.d.ts.map +1 -1
  25. package/dist/prosekit-extensions-code-block.js +4 -4
  26. package/dist/prosekit-extensions-code-block.js.map +1 -1
  27. package/dist/prosekit-extensions-code.d.ts.map +1 -1
  28. package/dist/prosekit-extensions-code.js +1 -1
  29. package/dist/prosekit-extensions-code.js.map +1 -1
  30. package/dist/prosekit-extensions-commit.d.ts +0 -1
  31. package/dist/prosekit-extensions-commit.d.ts.map +1 -1
  32. package/dist/prosekit-extensions-commit.js.map +1 -1
  33. package/dist/prosekit-extensions-doc.d.ts +0 -1
  34. package/dist/prosekit-extensions-doc.d.ts.map +1 -1
  35. package/dist/prosekit-extensions-doc.js.map +1 -1
  36. package/dist/prosekit-extensions-drop-cursor.d.ts.map +1 -1
  37. package/dist/prosekit-extensions-drop-cursor.js.map +1 -1
  38. package/dist/prosekit-extensions-drop-indicator.d.ts +0 -1
  39. package/dist/prosekit-extensions-drop-indicator.d.ts.map +1 -1
  40. package/dist/prosekit-extensions-drop-indicator.js +1 -1
  41. package/dist/prosekit-extensions-enter-rule.d.ts +6 -79
  42. package/dist/prosekit-extensions-enter-rule.d.ts.map +1 -1
  43. package/dist/prosekit-extensions-enter-rule.js +37 -2
  44. package/dist/prosekit-extensions-enter-rule.js.map +1 -0
  45. package/dist/prosekit-extensions-file.d.ts +2 -2
  46. package/dist/prosekit-extensions-file.js +1 -1
  47. package/dist/prosekit-extensions-gap-cursor.d.ts +0 -1
  48. package/dist/prosekit-extensions-gap-cursor.d.ts.map +1 -1
  49. package/dist/prosekit-extensions-gap-cursor.js.map +1 -1
  50. package/dist/prosekit-extensions-hard-break.d.ts.map +1 -1
  51. package/dist/prosekit-extensions-hard-break.js.map +1 -1
  52. package/dist/prosekit-extensions-heading.d.ts.map +1 -1
  53. package/dist/prosekit-extensions-heading.js +1 -1
  54. package/dist/prosekit-extensions-heading.js.map +1 -1
  55. package/dist/prosekit-extensions-horizontal-rule.d.ts.map +1 -1
  56. package/dist/prosekit-extensions-horizontal-rule.js +1 -1
  57. package/dist/prosekit-extensions-horizontal-rule.js.map +1 -1
  58. package/dist/prosekit-extensions-image.d.ts +10 -2
  59. package/dist/prosekit-extensions-image.d.ts.map +1 -1
  60. package/dist/prosekit-extensions-image.js +17 -4
  61. package/dist/prosekit-extensions-image.js.map +1 -1
  62. package/dist/prosekit-extensions-input-rule.d.ts +0 -1
  63. package/dist/prosekit-extensions-input-rule.d.ts.map +1 -1
  64. package/dist/prosekit-extensions-input-rule.js +89 -2
  65. package/dist/prosekit-extensions-input-rule.js.map +1 -0
  66. package/dist/prosekit-extensions-italic.d.ts.map +1 -1
  67. package/dist/prosekit-extensions-italic.js +1 -1
  68. package/dist/prosekit-extensions-italic.js.map +1 -1
  69. package/dist/prosekit-extensions-link.d.ts +0 -1
  70. package/dist/prosekit-extensions-link.d.ts.map +1 -1
  71. package/dist/prosekit-extensions-link.js +4 -4
  72. package/dist/prosekit-extensions-link.js.map +1 -1
  73. package/dist/prosekit-extensions-list.d.ts +0 -1
  74. package/dist/prosekit-extensions-list.d.ts.map +1 -1
  75. package/dist/prosekit-extensions-list.js +3 -3
  76. package/dist/prosekit-extensions-list.js.map +1 -1
  77. package/dist/prosekit-extensions-loro.d.ts.map +1 -1
  78. package/dist/prosekit-extensions-loro.js +2 -2
  79. package/dist/prosekit-extensions-loro.js.map +1 -1
  80. package/dist/prosekit-extensions-mark-rule.d.ts +0 -1
  81. package/dist/prosekit-extensions-mark-rule.d.ts.map +1 -1
  82. package/dist/prosekit-extensions-mark-rule.js +1 -1
  83. package/dist/prosekit-extensions-math.d.ts +154 -0
  84. package/dist/prosekit-extensions-math.d.ts.map +1 -0
  85. package/dist/prosekit-extensions-math.js +104 -0
  86. package/dist/prosekit-extensions-math.js.map +1 -0
  87. package/dist/prosekit-extensions-mention.d.ts.map +1 -1
  88. package/dist/prosekit-extensions-mention.js.map +1 -1
  89. package/dist/prosekit-extensions-mod-click-prevention.d.ts +0 -1
  90. package/dist/prosekit-extensions-mod-click-prevention.d.ts.map +1 -1
  91. package/dist/prosekit-extensions-mod-click-prevention.js.map +1 -1
  92. package/dist/prosekit-extensions-paragraph.d.ts.map +1 -1
  93. package/dist/prosekit-extensions-paragraph.js.map +1 -1
  94. package/dist/prosekit-extensions-paste-rule.d.ts +0 -1
  95. package/dist/prosekit-extensions-paste-rule.d.ts.map +1 -1
  96. package/dist/prosekit-extensions-paste-rule.js +1 -1
  97. package/dist/prosekit-extensions-placeholder.d.ts.map +1 -1
  98. package/dist/prosekit-extensions-placeholder.js +1 -1
  99. package/dist/prosekit-extensions-placeholder.js.map +1 -1
  100. package/dist/prosekit-extensions-readonly.d.ts +0 -1
  101. package/dist/prosekit-extensions-readonly.d.ts.map +1 -1
  102. package/dist/prosekit-extensions-readonly.js.map +1 -1
  103. package/dist/prosekit-extensions-search.d.ts +0 -1
  104. package/dist/prosekit-extensions-search.d.ts.map +1 -1
  105. package/dist/prosekit-extensions-search.js.map +1 -1
  106. package/dist/prosekit-extensions-strike.d.ts +0 -1
  107. package/dist/prosekit-extensions-strike.d.ts.map +1 -1
  108. package/dist/prosekit-extensions-strike.js +1 -1
  109. package/dist/prosekit-extensions-table.d.ts.map +1 -1
  110. package/dist/prosekit-extensions-table.js +1 -1
  111. package/dist/prosekit-extensions-text-align.d.ts +0 -1
  112. package/dist/prosekit-extensions-text-align.d.ts.map +1 -1
  113. package/dist/prosekit-extensions-text-align.js +2 -2
  114. package/dist/prosekit-extensions-text-align.js.map +1 -1
  115. package/dist/prosekit-extensions-text-color.d.ts +62 -0
  116. package/dist/prosekit-extensions-text-color.d.ts.map +1 -0
  117. package/dist/prosekit-extensions-text-color.js +76 -0
  118. package/dist/prosekit-extensions-text-color.js.map +1 -0
  119. package/dist/prosekit-extensions-text.d.ts +0 -1
  120. package/dist/prosekit-extensions-text.d.ts.map +1 -1
  121. package/dist/prosekit-extensions-text.js.map +1 -1
  122. package/dist/prosekit-extensions-underline.d.ts +0 -1
  123. package/dist/prosekit-extensions-underline.d.ts.map +1 -1
  124. package/dist/prosekit-extensions-virtual-selection.d.ts +0 -1
  125. package/dist/prosekit-extensions-virtual-selection.d.ts.map +1 -1
  126. package/dist/prosekit-extensions-virtual-selection.js.map +1 -1
  127. package/dist/prosekit-extensions-yjs.d.ts +9 -2
  128. package/dist/prosekit-extensions-yjs.d.ts.map +1 -1
  129. package/dist/prosekit-extensions-yjs.js.map +1 -1
  130. package/dist/shiki-highlighter-chunk.d.ts +19 -2
  131. package/dist/shiki-highlighter-chunk.d.ts.map +1 -0
  132. package/dist/shiki-highlighter-chunk.js.map +1 -1
  133. package/dist/{table-BRDh_9mG.js → table-UJVYsrB7.js} +2 -2
  134. package/dist/table-UJVYsrB7.js.map +1 -0
  135. package/package.json +42 -17
  136. package/src/autocomplete/autocomplete-helpers.ts +1 -5
  137. package/src/autocomplete/autocomplete-plugin.ts +3 -13
  138. package/src/autocomplete/autocomplete.spec.ts +4 -19
  139. package/src/autocomplete/autocomplete.ts +1 -7
  140. package/src/background-color/background-color-commands.spec.ts +71 -0
  141. package/src/background-color/background-color-commands.ts +35 -0
  142. package/src/background-color/background-color-spec.spec.ts +286 -0
  143. package/src/background-color/background-color-spec.ts +58 -0
  144. package/src/background-color/background-color.ts +21 -0
  145. package/src/background-color/index.ts +8 -0
  146. package/src/blockquote/blockquote-commands.ts +1 -7
  147. package/src/blockquote/blockquote-keymap.spec.ts +1 -5
  148. package/src/blockquote/blockquote-keymap.ts +1 -6
  149. package/src/blockquote/blockquote-spec.ts +1 -4
  150. package/src/blockquote/blockquote.ts +3 -12
  151. package/src/blockquote/index.ts +3 -12
  152. package/src/bold/bold-commands.ts +1 -5
  153. package/src/bold/bold-input-rule.spec.ts +1 -5
  154. package/src/bold/bold-input-rule.ts +1 -4
  155. package/src/bold/bold-keymap.ts +1 -5
  156. package/src/bold/bold-spec.ts +1 -4
  157. package/src/bold/bold.ts +3 -12
  158. package/src/bold/index.ts +3 -12
  159. package/src/code/code-commands.ts +1 -5
  160. package/src/code/code-input-rule.ts +1 -4
  161. package/src/code/code-keymap.ts +1 -5
  162. package/src/code/code-spec.ts +1 -4
  163. package/src/code/code.ts +3 -12
  164. package/src/code/index.ts +3 -12
  165. package/src/code-block/code-block-commands.ts +1 -8
  166. package/src/code-block/code-block-highlight.ts +2 -8
  167. package/src/code-block/code-block-keymap.ts +2 -9
  168. package/src/code-block/code-block-shiki.ts +1 -4
  169. package/src/code-block/code-block-spec.spec.ts +4 -11
  170. package/src/code-block/code-block-spec.ts +1 -4
  171. package/src/code-block/code-block.ts +4 -16
  172. package/src/code-block/index.ts +5 -21
  173. package/src/code-block/shiki-highlighter-chunk.ts +1 -7
  174. package/src/code-block/shiki-highlighter.ts +1 -4
  175. package/src/code-block/shiki-parser.ts +1 -4
  176. package/src/commit/index.ts +6 -35
  177. package/src/doc/index.ts +1 -4
  178. package/src/drop-cursor/drop-cursor.ts +1 -4
  179. package/src/drop-cursor/index.ts +1 -5
  180. package/src/drop-indicator/drop-indicator-facet.ts +12 -21
  181. package/src/drop-indicator/index.ts +1 -5
  182. package/src/enter-rule/index.ts +18 -200
  183. package/src/file/file-paste-handler.spec.ts +3 -16
  184. package/src/file/index.ts +3 -16
  185. package/src/gap-cursor/gap-cursor.ts +1 -4
  186. package/src/gap-cursor/index.ts +1 -4
  187. package/src/hard-break/hard-break-commands.ts +1 -5
  188. package/src/hard-break/hard-break-keymap.spec.ts +1 -5
  189. package/src/hard-break/hard-break-keymap.ts +1 -4
  190. package/src/hard-break/hard-break-spec.ts +1 -4
  191. package/src/hard-break/hard-break.ts +3 -12
  192. package/src/hard-break/index.ts +3 -12
  193. package/src/heading/heading-commands.ts +1 -7
  194. package/src/heading/heading-keymap.spec.ts +1 -5
  195. package/src/heading/heading-keymap.ts +1 -8
  196. package/src/heading/heading-spec.ts +1 -4
  197. package/src/heading/heading.ts +3 -12
  198. package/src/heading/index.ts +3 -12
  199. package/src/horizontal-rule/horizontal-rule-commands.spec.ts +1 -5
  200. package/src/horizontal-rule/horizontal-rule-commands.ts +2 -9
  201. package/src/horizontal-rule/horizontal-rule-input-rule.spec.ts +5 -9
  202. package/src/horizontal-rule/horizontal-rule-input-rule.ts +1 -5
  203. package/src/horizontal-rule/horizontal-rule-spec.ts +1 -4
  204. package/src/horizontal-rule/horizontal-rule.ts +3 -12
  205. package/src/horizontal-rule/index.ts +3 -13
  206. package/src/image/image-commands/upload-image.spec.ts +245 -0
  207. package/src/image/image-commands/upload-image.ts +46 -11
  208. package/src/image/image-commands.ts +2 -8
  209. package/src/image/image-spec.ts +1 -4
  210. package/src/image/image-upload-handler.ts +2 -8
  211. package/src/image/image.ts +3 -12
  212. package/src/image/index.ts +3 -13
  213. package/src/input-rule/index.ts +2 -13
  214. package/src/italic/index.ts +3 -12
  215. package/src/italic/italic-commands.spec.ts +2 -10
  216. package/src/italic/italic-commands.ts +1 -5
  217. package/src/italic/italic-input-rule.spec.ts +1 -5
  218. package/src/italic/italic-input-rule.ts +1 -4
  219. package/src/italic/italic-keymap.ts +1 -5
  220. package/src/italic/italic-spec.ts +1 -4
  221. package/src/italic/italic.ts +3 -12
  222. package/src/link/index.spec.ts +1 -5
  223. package/src/link/index.ts +1 -5
  224. package/src/link/link-paste-rule.spec.ts +2 -9
  225. package/src/link/link-regex.spec.ts +1 -5
  226. package/src/list/index.ts +3 -12
  227. package/src/list/list-commands.ts +1 -5
  228. package/src/list/list-input-rules.ts +1 -4
  229. package/src/list/list-keymap.spec.ts +1 -5
  230. package/src/list/list-keymap.ts +2 -8
  231. package/src/list/list-plugins.ts +1 -4
  232. package/src/list/list-serializer.ts +2 -9
  233. package/src/list/list-spec.ts +3 -13
  234. package/src/list/list.spec.ts +10 -21
  235. package/src/list/list.ts +3 -12
  236. package/src/loro/index.ts +3 -13
  237. package/src/loro/loro-commands.ts +2 -8
  238. package/src/loro/loro-cursor-plugin.ts +3 -13
  239. package/src/loro/loro-keymap.ts +2 -10
  240. package/src/loro/loro-sync-plugin.ts +2 -8
  241. package/src/loro/loro-undo-plugin.ts +2 -8
  242. package/src/loro/loro.ts +2 -11
  243. package/src/mark-rule/apply.ts +3 -13
  244. package/src/mark-rule/mark-rule.spec.ts +2 -13
  245. package/src/mark-rule/mark-rule.ts +2 -13
  246. package/src/mark-rule/range.ts +2 -8
  247. package/src/mark-rule/types.ts +1 -4
  248. package/src/math/index.ts +22 -0
  249. package/src/math/math-block.ts +89 -0
  250. package/src/math/math-inline.ts +89 -0
  251. package/src/math/math-plugin.ts +8 -0
  252. package/src/math/math.ts +39 -0
  253. package/src/mention/index.ts +1 -8
  254. package/src/mod-click-prevention/index.ts +2 -9
  255. package/src/paragraph/paragraph-commands.ts +1 -5
  256. package/src/paragraph/paragraph-keymap.ts +1 -4
  257. package/src/paragraph/paragraph-spec.ts +1 -4
  258. package/src/paragraph/paragraph.ts +3 -14
  259. package/src/paste-rule/index.ts +2 -10
  260. package/src/paste-rule/mark-paste-rule.spec.ts +3 -13
  261. package/src/paste-rule/mark-paste-rule.ts +4 -14
  262. package/src/paste-rule/paste-rule-plugin.ts +2 -11
  263. package/src/paste-rule/paste-rule.spec.ts +4 -19
  264. package/src/paste-rule/split-text-by-regex.spec.ts +1 -5
  265. package/src/placeholder/index.ts +3 -16
  266. package/src/readonly/index.ts +2 -8
  267. package/src/search/index.ts +1 -6
  268. package/src/table/index.ts +10 -40
  269. package/src/table/table-commands/delete-cell-selection.spec.ts +1 -5
  270. package/src/table/table-commands/exit-table.spec.ts +1 -5
  271. package/src/table/table-commands/insert-table.spec.ts +1 -5
  272. package/src/table/table-commands/insert-table.ts +1 -4
  273. package/src/table/table-commands/move-table-column.spec.ts +1 -5
  274. package/src/table/table-commands/move-table-column.ts +1 -4
  275. package/src/table/table-commands/move-table-row.spec.ts +1 -5
  276. package/src/table/table-commands/move-table-row.ts +1 -4
  277. package/src/table/table-commands/select-table-cell.spec.ts +1 -5
  278. package/src/table/table-commands/select-table-column.spec.ts +1 -5
  279. package/src/table/table-commands/select-table-row.spec.ts +1 -5
  280. package/src/table/table-commands/select-table.spec.ts +1 -5
  281. package/src/table/table-commands/select-table.ts +1 -4
  282. package/src/table/table-commands.ts +8 -32
  283. package/src/table/table-plugins.ts +2 -8
  284. package/src/table/table-spec.spec.ts +2 -11
  285. package/src/table/table-spec.ts +2 -8
  286. package/src/table/table-utils.ts +2 -6
  287. package/src/table/table.ts +2 -8
  288. package/src/table/test-utils.ts +1 -4
  289. package/src/testing/clipboard.ts +1 -2
  290. package/src/testing/index.ts +10 -12
  291. package/src/testing/katex.ts +9 -0
  292. package/src/text/index.ts +1 -4
  293. package/src/text-align/index.ts +2 -2
  294. package/src/text-color/index.ts +3 -0
  295. package/src/text-color/text-color-commands.spec.ts +71 -0
  296. package/src/text-color/text-color-commands.ts +35 -0
  297. package/src/text-color/text-color-spec.spec.ts +297 -0
  298. package/src/text-color/text-color-spec.ts +58 -0
  299. package/src/text-color/text-color.ts +21 -0
  300. package/src/virtual-selection/index.ts +3 -14
  301. package/src/yjs/index.ts +5 -20
  302. package/src/yjs/yjs-commands.ts +2 -8
  303. package/src/yjs/yjs-cursor-plugin.ts +3 -5
  304. package/src/yjs/yjs-keymap.ts +2 -10
  305. package/src/yjs/yjs-sync-plugin.ts +1 -4
  306. package/src/yjs/yjs-types.ts +8 -0
  307. package/src/yjs/yjs-undo-plugin.ts +2 -8
  308. package/src/yjs/yjs.ts +6 -24
  309. package/dist/drop-indicator-B1QHFb5m.js.map +0 -1
  310. package/dist/enter-rule-CzWOZF_Z.js +0 -96
  311. package/dist/enter-rule-CzWOZF_Z.js.map +0 -1
  312. package/dist/file-DrfcSid-.js.map +0 -1
  313. package/dist/index-oIc1a2f2.d.ts.map +0 -1
  314. package/dist/input-rule-dmsb3j6w.js +0 -90
  315. package/dist/input-rule-dmsb3j6w.js.map +0 -1
  316. package/dist/mark-rule-BcLB4Uv2.js.map +0 -1
  317. package/dist/paste-rule-pVb4sqvJ.js.map +0 -1
  318. package/dist/shiki-highlighter-chunk-rkzofy4z.d.ts +0 -19
  319. package/dist/shiki-highlighter-chunk-rkzofy4z.d.ts.map +0 -1
  320. package/dist/table-BRDh_9mG.js.map +0 -1
  321. package/src/testing/format-html.ts +0 -5
@@ -52,7 +52,7 @@ function defineLoroUndoPlugin(options) {
52
52
  * @public
53
53
  */
54
54
  function defineLoro(options) {
55
- const { doc, awareness, presence, sync, undo: undo$1, cursor } = options;
55
+ const { doc, awareness, presence, sync, undo, cursor } = options;
56
56
  return withPriority(union([
57
57
  defineLoroKeymap(),
58
58
  defineLoroCommands(),
@@ -62,7 +62,7 @@ function defineLoro(options) {
62
62
  presence
63
63
  }),
64
64
  defineLoroUndoPlugin({
65
- ...undo$1,
65
+ ...undo,
66
66
  doc
67
67
  }),
68
68
  defineLoroSyncPlugin({
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-loro.js","names":["keymap: Keymap","undo"],"sources":["../src/loro/loro-commands.ts","../src/loro/loro-cursor-plugin.ts","../src/loro/loro-keymap.ts","../src/loro/loro-sync-plugin.ts","../src/loro/loro-undo-plugin.ts","../src/loro/loro.ts"],"sourcesContent":["import {\n defineCommands,\n type Extension,\n} from '@prosekit/core'\nimport {\n redo,\n undo,\n} from 'loro-prosemirror'\n\nconst commands = {\n undo: () => undo,\n redo: () => redo,\n} as const\n\n/**\n * @internal\n */\nexport type LoroCommandsExtension = Extension<{\n Commands: {\n undo: []\n redo: []\n }\n}>\n\nexport function defineLoroCommands(): LoroCommandsExtension {\n return defineCommands(commands)\n}\n","import {\n definePlugin,\n type PlainExtension,\n} from '@prosekit/core'\nimport type { Plugin } from '@prosekit/pm/state'\nimport type {\n CursorAwareness,\n CursorEphemeralStore,\n CursorPluginOptions,\n} from 'loro-prosemirror'\nimport {\n LoroCursorPlugin,\n LoroEphemeralCursorPlugin,\n} from 'loro-prosemirror'\n\nexport interface LoroCursorOptions extends CursorPluginOptions {\n awareness?: CursorAwareness\n presence?: CursorEphemeralStore\n}\n\nexport function defineLoroCursorPlugin(\n options: LoroCursorOptions,\n): PlainExtension {\n return definePlugin(createLoroCursorPlugin(options))\n}\n\nfunction createLoroCursorPlugin(options: LoroCursorOptions): Plugin {\n const { awareness, presence, ...rest } = options\n if (awareness && presence) {\n throw new Error('Only one of awareness and presence can be provided')\n } else if (awareness) {\n return LoroCursorPlugin(awareness, rest)\n } else if (presence) {\n return LoroEphemeralCursorPlugin(presence, rest)\n } else {\n throw new Error('Either awareness or presence must be provided')\n }\n}\n","import {\n defineKeymap,\n isApple,\n type Keymap,\n type PlainExtension,\n} from '@prosekit/core'\nimport {\n redo,\n undo,\n} from 'loro-prosemirror'\n\nconst keymap: Keymap = {\n 'Mod-z': undo,\n 'Mod-Z': redo,\n}\n\nif (!isApple) {\n keymap['Mod-y'] = redo\n}\n\nexport function defineLoroKeymap(): PlainExtension {\n return defineKeymap(keymap)\n}\n","import {\n definePlugin,\n type PlainExtension,\n} from '@prosekit/core'\nimport {\n LoroSyncPlugin,\n type LoroSyncPluginProps,\n} from 'loro-prosemirror'\n\nexport function defineLoroSyncPlugin(\n options: LoroSyncPluginProps,\n): PlainExtension {\n return definePlugin(LoroSyncPlugin(options))\n}\n","import {\n definePlugin,\n type PlainExtension,\n} from '@prosekit/core'\nimport {\n LoroUndoPlugin,\n type LoroUndoPluginProps,\n} from 'loro-prosemirror'\n\nexport function defineLoroUndoPlugin(options: LoroUndoPluginProps): PlainExtension {\n return definePlugin(LoroUndoPlugin(options))\n}\n","import {\n Priority,\n union,\n withPriority,\n type PlainExtension,\n type Union,\n} from '@prosekit/core'\nimport type {\n CursorAwareness,\n CursorEphemeralStore,\n CursorPluginOptions,\n LoroDocType,\n LoroSyncPluginProps,\n LoroUndoPluginProps,\n} from 'loro-prosemirror'\n\nimport {\n defineLoroCommands,\n type LoroCommandsExtension,\n} from './loro-commands'\nimport { defineLoroCursorPlugin } from './loro-cursor-plugin'\nimport { defineLoroKeymap } from './loro-keymap'\nimport { defineLoroSyncPlugin } from './loro-sync-plugin'\nimport { defineLoroUndoPlugin } from './loro-undo-plugin'\n\nexport interface LoroOptions {\n /**\n * The Loro instance handles the state of shared data.\n */\n doc: LoroDocType\n\n /**\n * The (legacy) Awareness instance. One of `awareness` or `presence` must be provided.\n */\n awareness?: CursorAwareness\n\n /**\n * The CursorEphemeralStore instance. One of `awareness` or `presence` must be provided.\n */\n presence?: CursorEphemeralStore\n\n /**\n * Extra options for `LoroSyncPlugin`.\n */\n sync?: Omit<LoroSyncPluginProps, 'doc'>\n\n /**\n * Extra options for the `LoroUndoPlugin`.\n */\n undo?: Omit<LoroUndoPluginProps, 'doc'>\n\n /**\n * Extra options for `LoroCursorPlugin` or `LoroEphemeralCursorPlugin`.\n */\n cursor?: CursorPluginOptions\n}\n\n/**\n * @internal\n */\nexport type LoroExtension = Union<[LoroCommandsExtension, PlainExtension]>\n\n/**\n * @public\n */\nexport function defineLoro(options: LoroOptions): LoroExtension {\n const { doc, awareness, presence, sync, undo, cursor } = options\n\n return withPriority(\n union([\n defineLoroKeymap(),\n defineLoroCommands(),\n defineLoroCursorPlugin({ ...cursor, awareness, presence }),\n defineLoroUndoPlugin({ ...undo, doc }),\n defineLoroSyncPlugin({ ...sync, doc }),\n ]),\n Priority.high,\n )\n}\n"],"mappings":";;;;AASA,MAAM,WAAW;CACf,YAAY;CACZ,YAAY;CACb;AAYD,SAAgB,qBAA4C;AAC1D,QAAO,eAAe,SAAS;;;;;ACLjC,SAAgB,uBACd,SACgB;AAChB,QAAO,aAAa,uBAAuB,QAAQ,CAAC;;AAGtD,SAAS,uBAAuB,SAAoC;CAClE,MAAM,EAAE,WAAW,UAAU,GAAG,SAAS;AACzC,KAAI,aAAa,SACf,OAAM,IAAI,MAAM,qDAAqD;UAC5D,UACT,QAAO,iBAAiB,WAAW,KAAK;UAC/B,SACT,QAAO,0BAA0B,UAAU,KAAK;KAEhD,OAAM,IAAI,MAAM,gDAAgD;;;;;ACxBpE,MAAMA,SAAiB;CACrB,SAAS;CACT,SAAS;CACV;AAED,IAAI,CAAC,QACH,QAAO,WAAW;AAGpB,SAAgB,mBAAmC;AACjD,QAAO,aAAa,OAAO;;;;;ACZ7B,SAAgB,qBACd,SACgB;AAChB,QAAO,aAAa,eAAe,QAAQ,CAAC;;;;;ACH9C,SAAgB,qBAAqB,SAA8C;AACjF,QAAO,aAAa,eAAe,QAAQ,CAAC;;;;;;;;ACuD9C,SAAgB,WAAW,SAAqC;CAC9D,MAAM,EAAE,KAAK,WAAW,UAAU,MAAM,cAAM,WAAW;AAEzD,QAAO,aACL,MAAM;EACJ,kBAAkB;EAClB,oBAAoB;EACpB,uBAAuB;GAAE,GAAG;GAAQ;GAAW;GAAU,CAAC;EAC1D,qBAAqB;GAAE,GAAGC;GAAM;GAAK,CAAC;EACtC,qBAAqB;GAAE,GAAG;GAAM;GAAK,CAAC;EACvC,CAAC,EACF,SAAS,KACV"}
1
+ {"version":3,"file":"prosekit-extensions-loro.js","names":[],"sources":["../src/loro/loro-commands.ts","../src/loro/loro-cursor-plugin.ts","../src/loro/loro-keymap.ts","../src/loro/loro-sync-plugin.ts","../src/loro/loro-undo-plugin.ts","../src/loro/loro.ts"],"sourcesContent":["import { defineCommands, type Extension } from '@prosekit/core'\nimport { redo, undo } from 'loro-prosemirror'\n\nconst commands = {\n undo: () => undo,\n redo: () => redo,\n} as const\n\n/**\n * @internal\n */\nexport type LoroCommandsExtension = Extension<{\n Commands: {\n undo: []\n redo: []\n }\n}>\n\nexport function defineLoroCommands(): LoroCommandsExtension {\n return defineCommands(commands)\n}\n","import { definePlugin, type PlainExtension } from '@prosekit/core'\nimport type { Plugin } from '@prosekit/pm/state'\nimport type { CursorAwareness, CursorEphemeralStore, CursorPluginOptions } from 'loro-prosemirror'\nimport { LoroCursorPlugin, LoroEphemeralCursorPlugin } from 'loro-prosemirror'\n\nexport interface LoroCursorOptions extends CursorPluginOptions {\n awareness?: CursorAwareness\n presence?: CursorEphemeralStore\n}\n\nexport function defineLoroCursorPlugin(\n options: LoroCursorOptions,\n): PlainExtension {\n return definePlugin(createLoroCursorPlugin(options))\n}\n\nfunction createLoroCursorPlugin(options: LoroCursorOptions): Plugin {\n const { awareness, presence, ...rest } = options\n if (awareness && presence) {\n throw new Error('Only one of awareness and presence can be provided')\n } else if (awareness) {\n return LoroCursorPlugin(awareness, rest)\n } else if (presence) {\n return LoroEphemeralCursorPlugin(presence, rest)\n } else {\n throw new Error('Either awareness or presence must be provided')\n }\n}\n","import { defineKeymap, isApple, type Keymap, type PlainExtension } from '@prosekit/core'\nimport { redo, undo } from 'loro-prosemirror'\n\nconst keymap: Keymap = {\n 'Mod-z': undo,\n 'Mod-Z': redo,\n}\n\nif (!isApple) {\n keymap['Mod-y'] = redo\n}\n\nexport function defineLoroKeymap(): PlainExtension {\n return defineKeymap(keymap)\n}\n","import { definePlugin, type PlainExtension } from '@prosekit/core'\nimport { LoroSyncPlugin, type LoroSyncPluginProps } from 'loro-prosemirror'\n\nexport function defineLoroSyncPlugin(\n options: LoroSyncPluginProps,\n): PlainExtension {\n return definePlugin(LoroSyncPlugin(options))\n}\n","import { definePlugin, type PlainExtension } from '@prosekit/core'\nimport { LoroUndoPlugin, type LoroUndoPluginProps } from 'loro-prosemirror'\n\nexport function defineLoroUndoPlugin(options: LoroUndoPluginProps): PlainExtension {\n return definePlugin(LoroUndoPlugin(options))\n}\n","import { Priority, union, withPriority, type PlainExtension, type Union } from '@prosekit/core'\nimport type {\n CursorAwareness,\n CursorEphemeralStore,\n CursorPluginOptions,\n LoroDocType,\n LoroSyncPluginProps,\n LoroUndoPluginProps,\n} from 'loro-prosemirror'\n\nimport { defineLoroCommands, type LoroCommandsExtension } from './loro-commands'\nimport { defineLoroCursorPlugin } from './loro-cursor-plugin'\nimport { defineLoroKeymap } from './loro-keymap'\nimport { defineLoroSyncPlugin } from './loro-sync-plugin'\nimport { defineLoroUndoPlugin } from './loro-undo-plugin'\n\nexport interface LoroOptions {\n /**\n * The Loro instance handles the state of shared data.\n */\n doc: LoroDocType\n\n /**\n * The (legacy) Awareness instance. One of `awareness` or `presence` must be provided.\n */\n awareness?: CursorAwareness\n\n /**\n * The CursorEphemeralStore instance. One of `awareness` or `presence` must be provided.\n */\n presence?: CursorEphemeralStore\n\n /**\n * Extra options for `LoroSyncPlugin`.\n */\n sync?: Omit<LoroSyncPluginProps, 'doc'>\n\n /**\n * Extra options for the `LoroUndoPlugin`.\n */\n undo?: Omit<LoroUndoPluginProps, 'doc'>\n\n /**\n * Extra options for `LoroCursorPlugin` or `LoroEphemeralCursorPlugin`.\n */\n cursor?: CursorPluginOptions\n}\n\n/**\n * @internal\n */\nexport type LoroExtension = Union<[LoroCommandsExtension, PlainExtension]>\n\n/**\n * @public\n */\nexport function defineLoro(options: LoroOptions): LoroExtension {\n const { doc, awareness, presence, sync, undo, cursor } = options\n\n return withPriority(\n union([\n defineLoroKeymap(),\n defineLoroCommands(),\n defineLoroCursorPlugin({ ...cursor, awareness, presence }),\n defineLoroUndoPlugin({ ...undo, doc }),\n defineLoroSyncPlugin({ ...sync, doc }),\n ]),\n Priority.high,\n )\n}\n"],"mappings":";;;;AAGA,MAAM,WAAW;CACf,YAAY;CACZ,YAAY;CACb;AAYD,SAAgB,qBAA4C;AAC1D,QAAO,eAAe,SAAS;;;;;ACTjC,SAAgB,uBACd,SACgB;AAChB,QAAO,aAAa,uBAAuB,QAAQ,CAAC;;AAGtD,SAAS,uBAAuB,SAAoC;CAClE,MAAM,EAAE,WAAW,UAAU,GAAG,SAAS;AACzC,KAAI,aAAa,SACf,OAAM,IAAI,MAAM,qDAAqD;UAC5D,UACT,QAAO,iBAAiB,WAAW,KAAK;UAC/B,SACT,QAAO,0BAA0B,UAAU,KAAK;KAEhD,OAAM,IAAI,MAAM,gDAAgD;;;;;ACtBpE,MAAM,SAAiB;CACrB,SAAS;CACT,SAAS;CACV;AAED,IAAI,CAAC,QACH,QAAO,WAAW;AAGpB,SAAgB,mBAAmC;AACjD,QAAO,aAAa,OAAO;;;;;ACV7B,SAAgB,qBACd,SACgB;AAChB,QAAO,aAAa,eAAe,QAAQ,CAAC;;;;;ACH9C,SAAgB,qBAAqB,SAA8C;AACjF,QAAO,aAAa,eAAe,QAAQ,CAAC;;;;;;;;ACoD9C,SAAgB,WAAW,SAAqC;CAC9D,MAAM,EAAE,KAAK,WAAW,UAAU,MAAM,MAAM,WAAW;AAEzD,QAAO,aACL,MAAM;EACJ,kBAAkB;EAClB,oBAAoB;EACpB,uBAAuB;GAAE,GAAG;GAAQ;GAAW;GAAU,CAAC;EAC1D,qBAAqB;GAAE,GAAG;GAAM;GAAK,CAAC;EACtC,qBAAqB;GAAE,GAAG;GAAM;GAAK,CAAC;EACvC,CAAC,EACF,SAAS,KACV"}
@@ -2,7 +2,6 @@ import { PlainExtension } from "@prosekit/core";
2
2
  import { Attrs, MarkType } from "@prosekit/pm/model";
3
3
 
4
4
  //#region src/mark-rule/types.d.ts
5
-
6
5
  /**
7
6
  * The options for {@link defineMarkRule}.
8
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-mark-rule.d.ts","names":[],"sources":["../src/mark-rule/types.ts","../src/mark-rule/mark-rule.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAUA;;AAUiB,UAVA,eAAA,CAUA;EAQP;;;;SAbD;;;ACMT;iBDDiB;;;;;;;UAQP,wBAAwB,qBAAqB;;;;;;AAlBvD;;AAUiB,iBCCD,cAAA,CDDC,OAAA,ECCuB,eDDvB,CAAA,ECCyC,cDDzC"}
1
+ {"version":3,"file":"prosekit-extensions-mark-rule.d.ts","names":[],"sources":["../src/mark-rule/types.ts","../src/mark-rule/mark-rule.ts"],"mappings":";;;;;;;AAOA;;UAAiB,eAAA;EAKR;;;;EAAP,KAAA,EAAO,MAAA;EAamD;;;EAR1D,IAAA,WAAe,QAAA;EAAf;;;;;;EAQA,KAAA,GAAQ,KAAA,YAAiB,KAAA,EAAO,gBAAA,KAAqB,KAAA;AAAA;;;;;AAlBvD;;iBCGgB,cAAA,CAAe,OAAA,EAAS,eAAA,GAAkB,cAAA"}
@@ -1,3 +1,3 @@
1
- import { t as defineMarkRule } from "./mark-rule-BcLB4Uv2.js";
1
+ import { t as defineMarkRule } from "./mark-rule-CUnXwBuy.js";
2
2
 
3
3
  export { defineMarkRule };
@@ -0,0 +1,154 @@
1
+ import { Extension, PlainExtension, Union } from "@prosekit/core";
2
+ import { Attrs } from "@prosekit/pm/model";
3
+ import { RenderMathBlock, RenderMathInline } from "prosemirror-math";
4
+
5
+ //#region src/math/math-block.d.ts
6
+ /**
7
+ * @internal
8
+ */
9
+ type MathBlockSpecExtension = Extension<{
10
+ Nodes: {
11
+ mathBlock: Attrs;
12
+ };
13
+ }>;
14
+ /**
15
+ * @internal
16
+ */
17
+ declare function defineMathBlockSpec(): MathBlockSpecExtension;
18
+ /**
19
+ * Options for {@link defineMathBlockView}.
20
+ *
21
+ * @internal
22
+ */
23
+ interface MathBlockViewOptions {
24
+ /**
25
+ * The function to render the math block.
26
+ */
27
+ render: RenderMathBlock;
28
+ }
29
+ /**
30
+ * Defines an extension that renders a math block using a custom node view.
31
+ *
32
+ * @param options
33
+ * @internal
34
+ */
35
+ declare function defineMathBlockView({
36
+ render
37
+ }: MathBlockViewOptions): Extension;
38
+ /**
39
+ * @internal
40
+ */
41
+ declare function defineMathBlockEnterRule(): PlainExtension;
42
+ /**
43
+ * Options for {@link defineMathBlock}.
44
+ *
45
+ * @internal
46
+ */
47
+ interface MathBlockOptions {
48
+ /**
49
+ * The function to render the math block.
50
+ */
51
+ render: RenderMathBlock;
52
+ }
53
+ /**
54
+ * @internal
55
+ */
56
+ type MathBlockExtension = Union<[MathBlockSpecExtension]>;
57
+ /**
58
+ * Defines node `mathBlock` and related functionalities.
59
+ *
60
+ * @param options
61
+ * @public
62
+ */
63
+ declare function defineMathBlock(options: MathBlockOptions): MathBlockExtension;
64
+ //#endregion
65
+ //#region src/math/math-inline.d.ts
66
+ /**
67
+ * @internal
68
+ */
69
+ type MathInlineSpecExtension = Extension<{
70
+ Nodes: {
71
+ mathInline: Attrs;
72
+ };
73
+ }>;
74
+ /**
75
+ * @internal
76
+ */
77
+ declare function defineMathInlineSpec(): MathInlineSpecExtension;
78
+ /**
79
+ * Options for {@link defineMathInlineView}.
80
+ *
81
+ * @internal
82
+ */
83
+ interface MathInlineViewOptions {
84
+ /**
85
+ * The function to render the math inline.
86
+ */
87
+ render: RenderMathInline;
88
+ }
89
+ /**
90
+ * Defines an extension that renders a math inline using a custom node view.
91
+ *
92
+ * @param options
93
+ * @internal
94
+ */
95
+ declare function defineMathInlineView({
96
+ render
97
+ }: MathInlineViewOptions): Extension;
98
+ /**
99
+ * @internal
100
+ */
101
+ declare function defineMathInlineInputRule(): PlainExtension;
102
+ /**
103
+ * Options for {@link defineMathInline}.
104
+ *
105
+ * @internal
106
+ */
107
+ interface MathInlineOptions {
108
+ /**
109
+ * The function to render the math inline.
110
+ */
111
+ render: RenderMathInline;
112
+ }
113
+ /**
114
+ * @internal
115
+ */
116
+ type MathInlineExtension = Union<[MathInlineSpecExtension]>;
117
+ /**
118
+ * Defines node `mathInline` and related functionalities.
119
+ *
120
+ * @param options
121
+ * @public
122
+ */
123
+ declare function defineMathInline(options: MathInlineOptions): MathInlineExtension;
124
+ //#endregion
125
+ //#region src/math/math.d.ts
126
+ /**
127
+ * @public
128
+ */
129
+ type MathExtension = Union<[MathInlineExtension, MathBlockExtension]>;
130
+ /**
131
+ * Options for {@link defineMath}.
132
+ *
133
+ * @public
134
+ */
135
+ interface MathOptions {
136
+ /**
137
+ * The function to render the math block.
138
+ */
139
+ renderMathBlock: RenderMathBlock;
140
+ /**
141
+ * The function to render the math inline.
142
+ */
143
+ renderMathInline: RenderMathInline;
144
+ }
145
+ /**
146
+ * @public
147
+ */
148
+ declare function defineMath(options: MathOptions): MathExtension;
149
+ //#endregion
150
+ //#region src/math/math-plugin.d.ts
151
+ declare function defineMathPlugin(): PlainExtension;
152
+ //#endregion
153
+ export { type MathBlockExtension, type MathBlockOptions, type MathBlockSpecExtension, type MathBlockViewOptions, type MathExtension, type MathInlineExtension, type MathInlineOptions, type MathInlineSpecExtension, type MathInlineViewOptions, type MathOptions, defineMath, defineMathBlock, defineMathBlockEnterRule, defineMathBlockSpec, defineMathBlockView, defineMathInline, defineMathInlineInputRule, defineMathInlineSpec, defineMathInlineView, defineMathPlugin };
154
+ //# sourceMappingURL=prosekit-extensions-math.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prosekit-extensions-math.d.ts","names":[],"sources":["../src/math/math-block.ts","../src/math/math-inline.ts","../src/math/math.ts","../src/math/math-plugin.ts"],"mappings":";;;;;;;AASA;KAAY,sBAAA,GAAyB,SAAA;EACnC,KAAA;IACE,SAAA,EAAW,KAAA;EAAA;AAAA;;;;iBAOC,mBAAA,CAAA,GAAuB,sBAAA;AAAvC;;;;;AAAA,UAYiB,oBAAA;EAAoB;;;EAInC,MAAA,EAAQ,eAAA;AAAA;;;;;;;iBASM,mBAAA,CAAA;EAAsB;AAAA,GAAU,oBAAA,GAAuB,SAAA;;;;iBAYvD,wBAAA,CAAA,GAA4B,cAAA;;;AAA5C;;;UASiB,gBAAA;EATyC;AAS1D;;EAIE,MAAA,EAAQ,eAAA;AAAA;;AAMV;;KAAY,kBAAA,GAAqB,KAAA,EAAO,sBAAA;;;AAQxC;;;;iBAAgB,eAAA,CAAgB,OAAA,EAAS,gBAAA,GAAmB,kBAAA;;;;;AAzE5D;KCAY,uBAAA,GAA0B,SAAA;EACpC,KAAA;IACE,UAAA,EAAY,KAAA;EAAA;AAAA;;;;iBAOA,oBAAA,CAAA,GAAwB,uBAAA;ADAxC;;;;;AAAA,UCYiB,qBAAA;EDAoB;;;ECInC,MAAA,EAAQ,gBAAA;AAAA;;;;;;;iBASM,oBAAA,CAAA;EAAuB;AAAA,GAAU,qBAAA,GAAwB,SAAA;;;;iBAYzD,yBAAA,CAAA,GAA6B,cAAA;;;ADA7C;;;UCSiB,iBAAA;EDTyC;AAS1D;;ECIE,MAAA,EAAQ,gBAAA;AAAA;;ADMV;;KCAY,mBAAA,GAAsB,KAAA,EAAO,uBAAA;;;ADQzC;;;;iBCAgB,gBAAA,CAAiB,OAAA,EAAS,iBAAA,GAAoB,mBAAA;;;;ADzE9D;;KECY,aAAA,GAAgB,KAAA,EAAO,mBAAA,EAAqB,kBAAA;;;;;;UAOvC,WAAA;EFNG;AAOpB;;EEGE,eAAA,EAAiB,eAAA;EFHoB;;AAYvC;EEJE,gBAAA,EAAkB,gBAAA;AAAA;;;AFiBpB;iBEXgB,UAAA,CAAW,OAAA,EAAS,WAAA,GAAc,aAAA;;;iBC7BlC,gBAAA,CAAA,GAAoB,cAAA"}
@@ -0,0 +1,104 @@
1
+ import { defineInputRule } from "./prosekit-extensions-input-rule.js";
2
+ import { defineEnterRule } from "./prosekit-extensions-enter-rule.js";
3
+ import { defineNodeSpec, defineNodeView, definePlugin, union } from "@prosekit/core";
4
+ import { createCursorInsidePlugin, createMathBlockView, createMathInlineInputRule, createMathInlineView, mathBlockEnterRule, mathBlockSpec, mathInlineSpec } from "prosemirror-math";
5
+
6
+ //#region src/math/math-block.ts
7
+ /**
8
+ * @internal
9
+ */
10
+ function defineMathBlockSpec() {
11
+ return defineNodeSpec({
12
+ ...mathBlockSpec,
13
+ name: "mathBlock"
14
+ });
15
+ }
16
+ /**
17
+ * Defines an extension that renders a math block using a custom node view.
18
+ *
19
+ * @param options
20
+ * @internal
21
+ */
22
+ function defineMathBlockView({ render }) {
23
+ return defineNodeView({
24
+ name: "mathBlock",
25
+ constructor: (node, view, getPos, decorations) => {
26
+ return createMathBlockView(render, node, decorations);
27
+ }
28
+ });
29
+ }
30
+ /**
31
+ * @internal
32
+ */
33
+ function defineMathBlockEnterRule() {
34
+ return defineEnterRule(mathBlockEnterRule);
35
+ }
36
+ /**
37
+ * Defines node `mathBlock` and related functionalities.
38
+ *
39
+ * @param options
40
+ * @public
41
+ */
42
+ function defineMathBlock(options) {
43
+ return union(defineMathBlockSpec(), defineMathBlockView(options), defineMathBlockEnterRule());
44
+ }
45
+
46
+ //#endregion
47
+ //#region src/math/math-inline.ts
48
+ /**
49
+ * @internal
50
+ */
51
+ function defineMathInlineSpec() {
52
+ return defineNodeSpec({
53
+ ...mathInlineSpec,
54
+ name: "mathInline"
55
+ });
56
+ }
57
+ /**
58
+ * Defines an extension that renders a math inline using a custom node view.
59
+ *
60
+ * @param options
61
+ * @internal
62
+ */
63
+ function defineMathInlineView({ render }) {
64
+ return defineNodeView({
65
+ name: "mathInline",
66
+ constructor: (node, view, getPos, decorations) => {
67
+ return createMathInlineView(render, node, decorations);
68
+ }
69
+ });
70
+ }
71
+ /**
72
+ * @internal
73
+ */
74
+ function defineMathInlineInputRule() {
75
+ return defineInputRule(createMathInlineInputRule("mathInline"));
76
+ }
77
+ /**
78
+ * Defines node `mathInline` and related functionalities.
79
+ *
80
+ * @param options
81
+ * @public
82
+ */
83
+ function defineMathInline(options) {
84
+ return union(defineMathInlineSpec(), defineMathInlineView(options), defineMathInlineInputRule());
85
+ }
86
+
87
+ //#endregion
88
+ //#region src/math/math-plugin.ts
89
+ function defineMathPlugin() {
90
+ return definePlugin(createCursorInsidePlugin());
91
+ }
92
+
93
+ //#endregion
94
+ //#region src/math/math.ts
95
+ /**
96
+ * @public
97
+ */
98
+ function defineMath(options) {
99
+ return union(defineMathBlock({ render: options.renderMathBlock }), defineMathInline({ render: options.renderMathInline }), defineMathPlugin());
100
+ }
101
+
102
+ //#endregion
103
+ export { defineMath, defineMathBlock, defineMathBlockEnterRule, defineMathBlockSpec, defineMathBlockView, defineMathInline, defineMathInlineInputRule, defineMathInlineSpec, defineMathInlineView, defineMathPlugin };
104
+ //# sourceMappingURL=prosekit-extensions-math.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prosekit-extensions-math.js","names":[],"sources":["../src/math/math-block.ts","../src/math/math-inline.ts","../src/math/math-plugin.ts","../src/math/math.ts"],"sourcesContent":["import { defineNodeSpec, defineNodeView, union, type Extension, type PlainExtension, type Union } from '@prosekit/core'\nimport type { Attrs } from '@prosekit/pm/model'\nimport { createMathBlockView, mathBlockEnterRule, mathBlockSpec, type RenderMathBlock } from 'prosemirror-math'\n\nimport { defineEnterRule } from '../enter-rule'\n\n/**\n * @internal\n */\nexport type MathBlockSpecExtension = Extension<{\n Nodes: {\n mathBlock: Attrs\n }\n}>\n\n/**\n * @internal\n */\nexport function defineMathBlockSpec(): MathBlockSpecExtension {\n return defineNodeSpec<'mathBlock', Attrs>({\n ...mathBlockSpec,\n name: 'mathBlock',\n })\n}\n\n/**\n * Options for {@link defineMathBlockView}.\n *\n * @internal\n */\nexport interface MathBlockViewOptions {\n /**\n * The function to render the math block.\n */\n render: RenderMathBlock\n}\n\n/**\n * Defines an extension that renders a math block using a custom node view.\n *\n * @param options\n * @internal\n */\nexport function defineMathBlockView({ render }: MathBlockViewOptions): Extension {\n return defineNodeView({\n name: 'mathBlock',\n constructor: (node, view, getPos, decorations) => {\n return createMathBlockView(render, node, decorations)\n },\n })\n}\n\n/**\n * @internal\n */\nexport function defineMathBlockEnterRule(): PlainExtension {\n return defineEnterRule(mathBlockEnterRule)\n}\n\n/**\n * Options for {@link defineMathBlock}.\n *\n * @internal\n */\nexport interface MathBlockOptions {\n /**\n * The function to render the math block.\n */\n render: RenderMathBlock\n}\n\n/**\n * @internal\n */\nexport type MathBlockExtension = Union<[MathBlockSpecExtension]>\n\n/**\n * Defines node `mathBlock` and related functionalities.\n *\n * @param options\n * @public\n */\nexport function defineMathBlock(options: MathBlockOptions): MathBlockExtension {\n return union(\n defineMathBlockSpec(),\n defineMathBlockView(options),\n defineMathBlockEnterRule(),\n )\n}\n","import { defineNodeSpec, defineNodeView, union, type Extension, type PlainExtension, type Union } from '@prosekit/core'\nimport type { Attrs } from '@prosekit/pm/model'\nimport { createMathInlineInputRule, createMathInlineView, mathInlineSpec, type RenderMathInline } from 'prosemirror-math'\n\nimport { defineInputRule } from '../input-rule'\n\n/**\n * @internal\n */\nexport type MathInlineSpecExtension = Extension<{\n Nodes: {\n mathInline: Attrs\n }\n}>\n\n/**\n * @internal\n */\nexport function defineMathInlineSpec(): MathInlineSpecExtension {\n return defineNodeSpec<'mathInline', Attrs>({\n ...mathInlineSpec,\n name: 'mathInline',\n })\n}\n\n/**\n * Options for {@link defineMathInlineView}.\n *\n * @internal\n */\nexport interface MathInlineViewOptions {\n /**\n * The function to render the math inline.\n */\n render: RenderMathInline\n}\n\n/**\n * Defines an extension that renders a math inline using a custom node view.\n *\n * @param options\n * @internal\n */\nexport function defineMathInlineView({ render }: MathInlineViewOptions): Extension {\n return defineNodeView({\n name: 'mathInline',\n constructor: (node, view, getPos, decorations) => {\n return createMathInlineView(render, node, decorations)\n },\n })\n}\n\n/**\n * @internal\n */\nexport function defineMathInlineInputRule(): PlainExtension {\n return defineInputRule(createMathInlineInputRule('mathInline'))\n}\n\n/**\n * Options for {@link defineMathInline}.\n *\n * @internal\n */\nexport interface MathInlineOptions {\n /**\n * The function to render the math inline.\n */\n render: RenderMathInline\n}\n\n/**\n * @internal\n */\nexport type MathInlineExtension = Union<[MathInlineSpecExtension]>\n\n/**\n * Defines node `mathInline` and related functionalities.\n *\n * @param options\n * @public\n */\nexport function defineMathInline(options: MathInlineOptions): MathInlineExtension {\n return union(\n defineMathInlineSpec(),\n defineMathInlineView(options),\n defineMathInlineInputRule(),\n )\n}\n","import { definePlugin, type PlainExtension } from '@prosekit/core'\nimport { createCursorInsidePlugin } from 'prosemirror-math'\n\nexport function defineMathPlugin(): PlainExtension {\n return definePlugin(\n createCursorInsidePlugin(),\n )\n}\n","import { union, type Union } from '@prosekit/core'\nimport type { RenderMathBlock, RenderMathInline } from 'prosemirror-math'\n\nimport { defineMathBlock, type MathBlockExtension } from './math-block'\nimport { defineMathInline, type MathInlineExtension } from './math-inline'\nimport { defineMathPlugin } from './math-plugin'\n\n/**\n * @public\n */\nexport type MathExtension = Union<[MathInlineExtension, MathBlockExtension]>\n\n/**\n * Options for {@link defineMath}.\n *\n * @public\n */\nexport interface MathOptions {\n /**\n * The function to render the math block.\n */\n renderMathBlock: RenderMathBlock\n\n /**\n * The function to render the math inline.\n */\n renderMathInline: RenderMathInline\n}\n\n/**\n * @public\n */\nexport function defineMath(options: MathOptions): MathExtension {\n return union(\n defineMathBlock({ render: options.renderMathBlock }),\n defineMathInline({ render: options.renderMathInline }),\n defineMathPlugin(),\n )\n}\n"],"mappings":";;;;;;;;;AAkBA,SAAgB,sBAA8C;AAC5D,QAAO,eAAmC;EACxC,GAAG;EACH,MAAM;EACP,CAAC;;;;;;;;AAqBJ,SAAgB,oBAAoB,EAAE,UAA2C;AAC/E,QAAO,eAAe;EACpB,MAAM;EACN,cAAc,MAAM,MAAM,QAAQ,gBAAgB;AAChD,UAAO,oBAAoB,QAAQ,MAAM,YAAY;;EAExD,CAAC;;;;;AAMJ,SAAgB,2BAA2C;AACzD,QAAO,gBAAgB,mBAAmB;;;;;;;;AA0B5C,SAAgB,gBAAgB,SAA+C;AAC7E,QAAO,MACL,qBAAqB,EACrB,oBAAoB,QAAQ,EAC5B,0BAA0B,CAC3B;;;;;;;;ACrEH,SAAgB,uBAAgD;AAC9D,QAAO,eAAoC;EACzC,GAAG;EACH,MAAM;EACP,CAAC;;;;;;;;AAqBJ,SAAgB,qBAAqB,EAAE,UAA4C;AACjF,QAAO,eAAe;EACpB,MAAM;EACN,cAAc,MAAM,MAAM,QAAQ,gBAAgB;AAChD,UAAO,qBAAqB,QAAQ,MAAM,YAAY;;EAEzD,CAAC;;;;;AAMJ,SAAgB,4BAA4C;AAC1D,QAAO,gBAAgB,0BAA0B,aAAa,CAAC;;;;;;;;AA0BjE,SAAgB,iBAAiB,SAAiD;AAChF,QAAO,MACL,sBAAsB,EACtB,qBAAqB,QAAQ,EAC7B,2BAA2B,CAC5B;;;;;ACpFH,SAAgB,mBAAmC;AACjD,QAAO,aACL,0BAA0B,CAC3B;;;;;;;;AC0BH,SAAgB,WAAW,SAAqC;AAC9D,QAAO,MACL,gBAAgB,EAAE,QAAQ,QAAQ,iBAAiB,CAAC,EACpD,iBAAiB,EAAE,QAAQ,QAAQ,kBAAkB,CAAC,EACtD,kBAAkB,CACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-mention.d.ts","names":[],"sources":["../src/mention/index.ts"],"sourcesContent":[],"mappings":";;;UASiB,YAAA;;EAAA,KAAA,EAAA,MAAA;EASL,IAAA,EAAA,MAAA;AASZ;AAsCA;AAMA;AAWA;AAAsC,KAhE1B,oBAAA,GAAuB,SAgEG,CAAA;EAAsB,KAAA,EAAA;IAA7B,OAAA,EA9DlB,YA8DkB;EAAK,CAAA;AAKpC,CAAA,CAAA;;;;iBA5DgB,iBAAA,CAAA,GAAqB;;;;KAsCzB,wBAAA,GAA2B;;2BAEZ;;;iBAIX,qBAAA,CAAA,GAAyB;;;;KAW7B,gBAAA,GAAmB,OAAO,sBAAsB;;;;iBAK5C,aAAA,CAAA,GAAiB"}
1
+ {"version":3,"file":"prosekit-extensions-mention.d.ts","names":[],"sources":["../src/mention/index.ts"],"mappings":";;;UAEiB,YAAA;EACf,EAAA;EACA,KAAA;EACA,IAAA;AAAA;;;;KAMU,oBAAA,GAAuB,SAAA;EACjC,KAAA;IACE,OAAA,EAAS,YAAA;EAAA;AAAA;;;;iBAOG,iBAAA,CAAA,GAAqB,oBAAA;;;;KAsCzB,wBAAA,GAA2B,SAAA;EACrC,QAAA;IACE,aAAA,GAAgB,KAAA,EAAO,YAAA;EAAA;AAAA;AAAA,iBAIX,qBAAA,CAAA,GAAyB,wBAAA;AANzC;;;AAAA,KAiBY,gBAAA,GAAmB,KAAA,EAAO,oBAAA,EAAsB,wBAAA;;;;iBAK5C,aAAA,CAAA,GAAiB,gBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-mention.js","names":[],"sources":["../src/mention/index.ts"],"sourcesContent":["import {\n defineCommands,\n defineNodeSpec,\n insertNode,\n union,\n type Extension,\n type Union,\n} from '@prosekit/core'\n\nexport interface MentionAttrs {\n id: string\n value: string\n kind: string\n}\n\n/**\n * @internal\n */\nexport type MentionSpecExtension = Extension<{\n Nodes: {\n mention: MentionAttrs\n }\n}>\n\n/**\n * @public\n */\nexport function defineMentionSpec(): MentionSpecExtension {\n return defineNodeSpec<'mention', MentionAttrs>({\n name: 'mention',\n atom: true,\n group: 'inline',\n attrs: {\n id: { validate: 'string' },\n value: { validate: 'string' },\n kind: { default: '', validate: 'string' },\n },\n inline: true,\n leafText: (node) => (node.attrs as MentionAttrs).value.toString(),\n parseDOM: [\n {\n tag: `span[data-mention]`,\n getAttrs: (dom: HTMLElement): MentionAttrs => ({\n id: dom.getAttribute('data-id') || '',\n kind: dom.getAttribute('data-mention') || '',\n value: dom.textContent || '',\n }),\n },\n ],\n toDOM(node) {\n return [\n 'span',\n {\n 'data-id': (node.attrs as MentionAttrs).id.toString(),\n 'data-mention': (node.attrs as MentionAttrs).kind.toString(),\n },\n (node.attrs as MentionAttrs).value.toString(),\n ]\n },\n })\n}\n\n/**\n * @internal\n */\nexport type MentionCommandsExtension = Extension<{\n Commands: {\n insertMention: [attrs: MentionAttrs]\n }\n}>\n\nexport function defineMentionCommands(): MentionCommandsExtension {\n return defineCommands({\n insertMention: (attrs: MentionAttrs) => {\n return insertNode({ type: 'mention', attrs })\n },\n })\n}\n\n/**\n * @internal\n */\nexport type MentionExtension = Union<[MentionSpecExtension, MentionCommandsExtension]>\n\n/**\n * @public\n */\nexport function defineMention(): MentionExtension {\n return union(defineMentionSpec(), defineMentionCommands())\n}\n"],"mappings":";;;;;;AA2BA,SAAgB,oBAA0C;AACxD,QAAO,eAAwC;EAC7C,MAAM;EACN,MAAM;EACN,OAAO;EACP,OAAO;GACL,IAAI,EAAE,UAAU,UAAU;GAC1B,OAAO,EAAE,UAAU,UAAU;GAC7B,MAAM;IAAE,SAAS;IAAI,UAAU;IAAU;GAC1C;EACD,QAAQ;EACR,WAAW,SAAU,KAAK,MAAuB,MAAM,UAAU;EACjE,UAAU,CACR;GACE,KAAK;GACL,WAAW,SAAoC;IAC7C,IAAI,IAAI,aAAa,UAAU,IAAI;IACnC,MAAM,IAAI,aAAa,eAAe,IAAI;IAC1C,OAAO,IAAI,eAAe;IAC3B;GACF,CACF;EACD,MAAM,MAAM;AACV,UAAO;IACL;IACA;KACE,WAAY,KAAK,MAAuB,GAAG,UAAU;KACrD,gBAAiB,KAAK,MAAuB,KAAK,UAAU;KAC7D;IACA,KAAK,MAAuB,MAAM,UAAU;IAC9C;;EAEJ,CAAC;;AAYJ,SAAgB,wBAAkD;AAChE,QAAO,eAAe,EACpB,gBAAgB,UAAwB;AACtC,SAAO,WAAW;GAAE,MAAM;GAAW;GAAO,CAAC;IAEhD,CAAC;;;;;AAWJ,SAAgB,gBAAkC;AAChD,QAAO,MAAM,mBAAmB,EAAE,uBAAuB,CAAC"}
1
+ {"version":3,"file":"prosekit-extensions-mention.js","names":[],"sources":["../src/mention/index.ts"],"sourcesContent":["import { defineCommands, defineNodeSpec, insertNode, union, type Extension, type Union } from '@prosekit/core'\n\nexport interface MentionAttrs {\n id: string\n value: string\n kind: string\n}\n\n/**\n * @internal\n */\nexport type MentionSpecExtension = Extension<{\n Nodes: {\n mention: MentionAttrs\n }\n}>\n\n/**\n * @public\n */\nexport function defineMentionSpec(): MentionSpecExtension {\n return defineNodeSpec<'mention', MentionAttrs>({\n name: 'mention',\n atom: true,\n group: 'inline',\n attrs: {\n id: { validate: 'string' },\n value: { validate: 'string' },\n kind: { default: '', validate: 'string' },\n },\n inline: true,\n leafText: (node) => (node.attrs as MentionAttrs).value.toString(),\n parseDOM: [\n {\n tag: `span[data-mention]`,\n getAttrs: (dom: HTMLElement): MentionAttrs => ({\n id: dom.getAttribute('data-id') || '',\n kind: dom.getAttribute('data-mention') || '',\n value: dom.textContent || '',\n }),\n },\n ],\n toDOM(node) {\n return [\n 'span',\n {\n 'data-id': (node.attrs as MentionAttrs).id.toString(),\n 'data-mention': (node.attrs as MentionAttrs).kind.toString(),\n },\n (node.attrs as MentionAttrs).value.toString(),\n ]\n },\n })\n}\n\n/**\n * @internal\n */\nexport type MentionCommandsExtension = Extension<{\n Commands: {\n insertMention: [attrs: MentionAttrs]\n }\n}>\n\nexport function defineMentionCommands(): MentionCommandsExtension {\n return defineCommands({\n insertMention: (attrs: MentionAttrs) => {\n return insertNode({ type: 'mention', attrs })\n },\n })\n}\n\n/**\n * @internal\n */\nexport type MentionExtension = Union<[MentionSpecExtension, MentionCommandsExtension]>\n\n/**\n * @public\n */\nexport function defineMention(): MentionExtension {\n return union(defineMentionSpec(), defineMentionCommands())\n}\n"],"mappings":";;;;;;AAoBA,SAAgB,oBAA0C;AACxD,QAAO,eAAwC;EAC7C,MAAM;EACN,MAAM;EACN,OAAO;EACP,OAAO;GACL,IAAI,EAAE,UAAU,UAAU;GAC1B,OAAO,EAAE,UAAU,UAAU;GAC7B,MAAM;IAAE,SAAS;IAAI,UAAU;IAAU;GAC1C;EACD,QAAQ;EACR,WAAW,SAAU,KAAK,MAAuB,MAAM,UAAU;EACjE,UAAU,CACR;GACE,KAAK;GACL,WAAW,SAAoC;IAC7C,IAAI,IAAI,aAAa,UAAU,IAAI;IACnC,MAAM,IAAI,aAAa,eAAe,IAAI;IAC1C,OAAO,IAAI,eAAe;IAC3B;GACF,CACF;EACD,MAAM,MAAM;AACV,UAAO;IACL;IACA;KACE,WAAY,KAAK,MAAuB,GAAG,UAAU;KACrD,gBAAiB,KAAK,MAAuB,KAAK,UAAU;KAC7D;IACA,KAAK,MAAuB,MAAM,UAAU;IAC9C;;EAEJ,CAAC;;AAYJ,SAAgB,wBAAkD;AAChE,QAAO,eAAe,EACpB,gBAAgB,UAAwB;AACtC,SAAO,WAAW;GAAE,MAAM;GAAW;GAAO,CAAC;IAEhD,CAAC;;;;;AAWJ,SAAgB,gBAAkC;AAChD,QAAO,MAAM,mBAAmB,EAAE,uBAAuB,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { PlainExtension } from "@prosekit/core";
2
2
 
3
3
  //#region src/mod-click-prevention/index.d.ts
4
-
5
4
  /**
6
5
  * @internal
7
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-mod-click-prevention.d.ts","names":[],"sources":["../src/mod-click-prevention/index.ts"],"sourcesContent":[],"mappings":";;;;;;AAcA;AAQgB,KARJ,2BAAA,GAA8B,cAQE;;;;;;;iBAA5B,wBAAA,CAAA,GAA4B"}
1
+ {"version":3,"file":"prosekit-extensions-mod-click-prevention.d.ts","names":[],"sources":["../src/mod-click-prevention/index.ts"],"mappings":";;;;;AAOA;KAAY,2BAAA,GAA8B,cAAA;;;;AAQ1C;;;iBAAgB,wBAAA,CAAA,GAA4B,2BAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-mod-click-prevention.js","names":["selectNodeModifier: 'metaKey' | 'ctrlKey'"],"sources":["../src/mod-click-prevention/index.ts"],"sourcesContent":["import {\n definePlugin,\n isApple,\n type PlainExtension,\n} from '@prosekit/core'\nimport {\n Plugin,\n PluginKey,\n} from '@prosekit/pm/state'\nimport type { EditorView } from '@prosekit/pm/view'\n\n/**\n * @internal\n */\nexport type ModClickPreventionExtension = PlainExtension\n\n/**\n * By default, clicking a node while holding the mod key will select the node. This\n * extension disables that behavior.\n *\n * @public\n */\nexport function defineModClickPrevention(): ModClickPreventionExtension {\n return definePlugin(new Plugin({ key, props: { handleClick } }))\n}\n\nconst key = new PluginKey('prosekit-mod-click-prevention')\n\nfunction handleClick(_view: EditorView, _pos: number, event: MouseEvent) {\n return !!event[selectNodeModifier]\n}\n\nconst selectNodeModifier: 'metaKey' | 'ctrlKey' = isApple\n ? 'metaKey'\n : 'ctrlKey'\n"],"mappings":";;;;;;;;;;AAsBA,SAAgB,2BAAwD;AACtE,QAAO,aAAa,IAAI,OAAO;EAAE;EAAK,OAAO,EAAE,aAAa;EAAE,CAAC,CAAC;;AAGlE,MAAM,MAAM,IAAI,UAAU,gCAAgC;AAE1D,SAAS,YAAY,OAAmB,MAAc,OAAmB;AACvE,QAAO,CAAC,CAAC,MAAM;;AAGjB,MAAMA,qBAA4C,UAC9C,YACA"}
1
+ {"version":3,"file":"prosekit-extensions-mod-click-prevention.js","names":[],"sources":["../src/mod-click-prevention/index.ts"],"sourcesContent":["import { definePlugin, isApple, type PlainExtension } from '@prosekit/core'\nimport { Plugin, PluginKey } from '@prosekit/pm/state'\nimport type { EditorView } from '@prosekit/pm/view'\n\n/**\n * @internal\n */\nexport type ModClickPreventionExtension = PlainExtension\n\n/**\n * By default, clicking a node while holding the mod key will select the node. This\n * extension disables that behavior.\n *\n * @public\n */\nexport function defineModClickPrevention(): ModClickPreventionExtension {\n return definePlugin(new Plugin({ key, props: { handleClick } }))\n}\n\nconst key = new PluginKey('prosekit-mod-click-prevention')\n\nfunction handleClick(_view: EditorView, _pos: number, event: MouseEvent) {\n return !!event[selectNodeModifier]\n}\n\nconst selectNodeModifier: 'metaKey' | 'ctrlKey' = isApple\n ? 'metaKey'\n : 'ctrlKey'\n"],"mappings":";;;;;;;;;;AAeA,SAAgB,2BAAwD;AACtE,QAAO,aAAa,IAAI,OAAO;EAAE;EAAK,OAAO,EAAE,aAAa;EAAE,CAAC,CAAC;;AAGlE,MAAM,MAAM,IAAI,UAAU,gCAAgC;AAE1D,SAAS,YAAY,OAAmB,MAAc,OAAmB;AACvE,QAAO,CAAC,CAAC,MAAM;;AAGjB,MAAM,qBAA4C,UAC9C,YACA"}
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-paragraph.d.ts","names":[],"sources":["../src/paragraph/paragraph-commands.ts","../src/paragraph/paragraph-spec.ts","../src/paragraph/paragraph.ts","../src/paragraph/paragraph-keymap.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAUY,KAAA,0BAAA,GAA6B,SAAA,CAAA;EAgBzB,QAAA,EAAA;;;;;AENhB;;AAAgE,iBFMhD,uBAAA,CAAA,CENgD,EFMrB,0BENqB;;;;;;AFVpD,KCDA,sBAAA,GAAyB,SDCI,CAAA;EAgBzB,KAAA,EAAA;eCfD;;;AAFf;AAWA;;;;ACAY,iBDAI,mBAAA,CAAA,CCAc,EDAS,sBCAT;;;;;AFV9B;AAgBgB,KENJ,kBAAA,GAAqB,KFMM,CAAA,CENC,sBFMG,EENqB,0BFMK,CAAA,CAAA;;;;ACjBrE;AAWA;;;;ACAY,iBAUI,eAAA,CAAA,CAVc,EAUK,kBAVL;;;;;;iBCVd,qBAAA,CAAA,GAAyB"}
1
+ {"version":3,"file":"prosekit-extensions-paragraph.d.ts","names":[],"sources":["../src/paragraph/paragraph-commands.ts","../src/paragraph/paragraph-spec.ts","../src/paragraph/paragraph.ts","../src/paragraph/paragraph-keymap.ts"],"mappings":";;;;;;;;KAMY,0BAAA,GAA6B,SAAA;EACvC,QAAA;IACE,YAAA;EAAA;AAAA;AAcJ;;;AAAA,iBAAgB,uBAAA,CAAA,GAA2B,0BAAA;;;;;;KChB/B,sBAAA,GAAyB,SAAA;EACnC,KAAA;IACE,SAAA,EAAW,KAAA;EAAA;AAAA;;;;;ADcf;iBCLgB,mBAAA,CAAA,GAAuB,sBAAA;;;;;ADXvC;KEGY,kBAAA,GAAqB,KAAA,EAAO,sBAAA,EAAwB,0BAAA;;;;;;;;AFahE;iBEHgB,eAAA,CAAA,GAAmB,kBAAA;;;;;;iBCZnB,qBAAA,CAAA,GAAyB,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-paragraph.js","names":[],"sources":["../src/paragraph/paragraph-commands.ts","../src/paragraph/paragraph-keymap.ts","../src/paragraph/paragraph-spec.ts","../src/paragraph/paragraph.ts"],"sourcesContent":["import {\n defineCommands,\n setBlockType,\n type Extension,\n} from '@prosekit/core'\nimport type { Command } from '@prosekit/pm/state'\n\n/**\n * @internal\n */\nexport type ParagraphCommandsExtension = Extension<{\n Commands: {\n setParagraph: []\n }\n}>\n\n/**\n * @internal\n */\nexport function setParagraph(): Command {\n return setBlockType({ type: 'paragraph' })\n}\n\n/**\n * @internal\n */\nexport function defineParagraphCommands(): ParagraphCommandsExtension {\n return defineCommands({ setParagraph })\n}\n","import {\n defineKeymap,\n type PlainExtension,\n} from '@prosekit/core'\n\nimport { setParagraph } from './paragraph-commands'\n\n/**\n * @internal\n */\nexport function defineParagraphKeymap(): PlainExtension {\n return defineKeymap({\n 'Mod-Alt-0': setParagraph(),\n })\n}\n","import {\n defineNodeSpec,\n type Extension,\n} from '@prosekit/core'\nimport type { Attrs } from '@prosekit/pm/model'\n\n/**\n * @internal\n */\nexport type ParagraphSpecExtension = Extension<{\n Nodes: {\n paragraph: Attrs\n }\n}>\n\n/**\n * @internal\n *\n * Defines a paragraph node spec.\n */\nexport function defineParagraphSpec(): ParagraphSpecExtension {\n return defineNodeSpec({\n name: 'paragraph',\n content: 'inline*',\n group: 'block',\n parseDOM: [{ tag: 'p' }],\n toDOM() {\n return ['p', 0]\n },\n })\n}\n","import {\n Priority,\n union,\n withPriority,\n type Union,\n} from '@prosekit/core'\n\nimport {\n defineParagraphCommands,\n type ParagraphCommandsExtension,\n} from './paragraph-commands'\nimport { defineParagraphKeymap } from './paragraph-keymap'\nimport {\n defineParagraphSpec,\n type ParagraphSpecExtension,\n} from './paragraph-spec'\n\n/**\n * @internal\n */\nexport type ParagraphExtension = Union<[ParagraphSpecExtension, ParagraphCommandsExtension]>\n\n/**\n * @public\n *\n * Defines a paragraph node.\n *\n * The paragraph node spec has the highest priority, because it should be the\n * default block node for most cases.\n */\nexport function defineParagraph(): ParagraphExtension {\n return union(\n withPriority(defineParagraphSpec(), Priority.highest),\n defineParagraphCommands(),\n defineParagraphKeymap(),\n )\n}\n"],"mappings":";;;;;;AAmBA,SAAgB,eAAwB;AACtC,QAAO,aAAa,EAAE,MAAM,aAAa,CAAC;;;;;AAM5C,SAAgB,0BAAsD;AACpE,QAAO,eAAe,EAAE,cAAc,CAAC;;;;;;;;ACjBzC,SAAgB,wBAAwC;AACtD,QAAO,aAAa,EAClB,aAAa,cAAc,EAC5B,CAAC;;;;;;;;;;ACOJ,SAAgB,sBAA8C;AAC5D,QAAO,eAAe;EACpB,MAAM;EACN,SAAS;EACT,OAAO;EACP,UAAU,CAAC,EAAE,KAAK,KAAK,CAAC;EACxB,QAAQ;AACN,UAAO,CAAC,KAAK,EAAE;;EAElB,CAAC;;;;;;;;;;;;;ACCJ,SAAgB,kBAAsC;AACpD,QAAO,MACL,aAAa,qBAAqB,EAAE,SAAS,QAAQ,EACrD,yBAAyB,EACzB,uBAAuB,CACxB"}
1
+ {"version":3,"file":"prosekit-extensions-paragraph.js","names":[],"sources":["../src/paragraph/paragraph-commands.ts","../src/paragraph/paragraph-keymap.ts","../src/paragraph/paragraph-spec.ts","../src/paragraph/paragraph.ts"],"sourcesContent":["import { defineCommands, setBlockType, type Extension } from '@prosekit/core'\nimport type { Command } from '@prosekit/pm/state'\n\n/**\n * @internal\n */\nexport type ParagraphCommandsExtension = Extension<{\n Commands: {\n setParagraph: []\n }\n}>\n\n/**\n * @internal\n */\nexport function setParagraph(): Command {\n return setBlockType({ type: 'paragraph' })\n}\n\n/**\n * @internal\n */\nexport function defineParagraphCommands(): ParagraphCommandsExtension {\n return defineCommands({ setParagraph })\n}\n","import { defineKeymap, type PlainExtension } from '@prosekit/core'\n\nimport { setParagraph } from './paragraph-commands'\n\n/**\n * @internal\n */\nexport function defineParagraphKeymap(): PlainExtension {\n return defineKeymap({\n 'Mod-Alt-0': setParagraph(),\n })\n}\n","import { defineNodeSpec, type Extension } from '@prosekit/core'\nimport type { Attrs } from '@prosekit/pm/model'\n\n/**\n * @internal\n */\nexport type ParagraphSpecExtension = Extension<{\n Nodes: {\n paragraph: Attrs\n }\n}>\n\n/**\n * @internal\n *\n * Defines a paragraph node spec.\n */\nexport function defineParagraphSpec(): ParagraphSpecExtension {\n return defineNodeSpec({\n name: 'paragraph',\n content: 'inline*',\n group: 'block',\n parseDOM: [{ tag: 'p' }],\n toDOM() {\n return ['p', 0]\n },\n })\n}\n","import { Priority, union, withPriority, type Union } from '@prosekit/core'\n\nimport { defineParagraphCommands, type ParagraphCommandsExtension } from './paragraph-commands'\nimport { defineParagraphKeymap } from './paragraph-keymap'\nimport { defineParagraphSpec, type ParagraphSpecExtension } from './paragraph-spec'\n\n/**\n * @internal\n */\nexport type ParagraphExtension = Union<[ParagraphSpecExtension, ParagraphCommandsExtension]>\n\n/**\n * @public\n *\n * Defines a paragraph node.\n *\n * The paragraph node spec has the highest priority, because it should be the\n * default block node for most cases.\n */\nexport function defineParagraph(): ParagraphExtension {\n return union(\n withPriority(defineParagraphSpec(), Priority.highest),\n defineParagraphCommands(),\n defineParagraphKeymap(),\n )\n}\n"],"mappings":";;;;;;AAeA,SAAgB,eAAwB;AACtC,QAAO,aAAa,EAAE,MAAM,aAAa,CAAC;;;;;AAM5C,SAAgB,0BAAsD;AACpE,QAAO,eAAe,EAAE,cAAc,CAAC;;;;;;;;AChBzC,SAAgB,wBAAwC;AACtD,QAAO,aAAa,EAClB,aAAa,cAAc,EAC5B,CAAC;;;;;;;;;;ACOJ,SAAgB,sBAA8C;AAC5D,QAAO,eAAe;EACpB,MAAM;EACN,SAAS;EACT,OAAO;EACP,UAAU,CAAC,EAAE,KAAK,KAAK,CAAC;EACxB,QAAQ;AACN,UAAO,CAAC,KAAK,EAAE;;EAElB,CAAC;;;;;;;;;;;;;ACPJ,SAAgB,kBAAsC;AACpD,QAAO,MACL,aAAa,qBAAqB,EAAE,SAAS,QAAQ,EACrD,yBAAyB,EACzB,uBAAuB,CACxB"}
@@ -3,7 +3,6 @@ import { EditorView } from "@prosekit/pm/view";
3
3
  import { Attrs, MarkType, ProseMirrorNode, Slice } from "@prosekit/pm/model";
4
4
 
5
5
  //#region src/paste-rule/mark-paste-rule.d.ts
6
-
7
6
  /**
8
7
  * The options for {@link defineMarkPasteRule}.
9
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-paste-rule.d.ts","names":[],"sources":["../src/paste-rule/mark-paste-rule.ts","../src/paste-rule/paste-rule.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAsBA;;AAUiB,UAVA,oBAAA,CAUA;EAQI;;;;EAcL,KAAA,EA3BP,MA2BO;;;;EC3CC,IAAA,EAAA,MAAA,GDqBA,QCrBA;EAwBL;AAOZ;AAeA;;;;EAA8E,QAAA,CAAA,EAAA,CAAA,KAAA,EDjBzD,eCiByD,EAAA,GDjBrC,KCiBqC,GAAA,IAAA,GAAA,SAAA,GAAA,KAAA;;;;;sBDXxD;;;;;;;iBAQN,mBAAA,UAA6B,uBAAuB;;;;;AAhCpE;;;AAkBqB,UC7BJ,uBAAA,CD6BI;EAAoB;;;EAczB,KAAA,ECvCP,KDuCO;;;;EC3CC,IAAA,EAST,UATS;EAwBL;AAOZ;AAeA;;EAA6C,KAAA,EAAA,OAAA;;;;;;;;KAtBjC,gBAAA,aAA6B,4BAA4B;;;;;;UAOpD,gBAAA;;;;WAIN;;;;;;;;;;iBAWK,eAAA;;GAA6B,mBAAmB"}
1
+ {"version":3,"file":"prosekit-extensions-paste-rule.d.ts","names":[],"sources":["../src/paste-rule/mark-paste-rule.ts","../src/paste-rule/paste-rule.ts"],"mappings":";;;;;;;;AAYA;;UAAiB,oBAAA;EAKR;;;;EAAP,KAAA,EAAO,MAAA;EAmB4B;;;EAdnC,IAAA,WAAe,QAAA;EAAf;;;;;;EAQA,QAAA,IAAY,KAAA,EAAO,eAAA,KAAoB,KAAA;EAMnB;;;;EAApB,UAAA,IAAc,IAAA,EAAM,eAAA;AAAA;;;;;;iBAQN,mBAAA,CAAoB,OAAA,EAAS,oBAAA,GAAuB,cAAA;;;;;AAhCpE;;;UCDiB,uBAAA;EDWA;;;ECPf,KAAA,EAAO,KAAA;EDqB4B;;;EChBnC,IAAA,EAAM,UAAA;EDEN;;;;ECIA,KAAA;AAAA;;;;;;ADkBF;KCTY,gBAAA,IAAoB,OAAA,EAAS,uBAAA,KAA4B,KAAA;;;;;;UAOpD,gBAAA;EDEiE;;;ECEhF,OAAA,EAAS,gBAAA;AAAA;;;;;;;;;iBAWK,eAAA,CAAA;EAAkB;AAAA,GAAW,gBAAA,GAAmB,cAAA"}
@@ -1,3 +1,3 @@
1
- import { n as definePasteRule, t as defineMarkPasteRule } from "./paste-rule-pVb4sqvJ.js";
1
+ import { n as definePasteRule, t as defineMarkPasteRule } from "./mark-paste-rule-n_2Ehmb5.js";
2
2
 
3
3
  export { defineMarkPasteRule, definePasteRule };
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-placeholder.d.ts","names":[],"sources":["../src/placeholder/index.ts"],"sourcesContent":[],"mappings":";;;;UAoBiB,kBAAA;;AAAjB;AA4BA;;iCAvBiC;;;;;;;;;;;;;;;wCAgBO;;;;;;iBAOxB,iBAAA,UAA2B,qBAAqB"}
1
+ {"version":3,"file":"prosekit-extensions-placeholder.d.ts","names":[],"sources":["../src/placeholder/index.ts"],"mappings":";;;;UAOiB,kBAAA;;AAAjB;;;EAKE,WAAA,aAAwB,KAAA,EAAO,WAAA;EAA/B;;;;;;;;AAuBF;;;;;;EAPE,QAAA,uBAA+B,KAAA,EAAO,WAAA;AAAA;;;;;iBAOxB,iBAAA,CAAkB,OAAA,EAAS,kBAAA,GAAqB,cAAA"}
@@ -1,4 +1,4 @@
1
- import { p as findTable } from "./table-BRDh_9mG.js";
1
+ import { p as findTable } from "./table-UJVYsrB7.js";
2
2
  import { definePlugin, isInCodeBlock, isTextSelection, maybeRun } from "@prosekit/core";
3
3
  import { Plugin, PluginKey } from "@prosekit/pm/state";
4
4
  import { Decoration, DecorationSet } from "@prosekit/pm/view";
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-placeholder.js","names":[],"sources":["../src/placeholder/index.ts"],"sourcesContent":["import {\n definePlugin,\n isInCodeBlock,\n isTextSelection,\n maybeRun,\n type PlainExtension,\n} from '@prosekit/core'\nimport type { ProseMirrorNode } from '@prosekit/pm/model'\nimport {\n Plugin,\n PluginKey,\n type EditorState,\n} from '@prosekit/pm/state'\nimport {\n Decoration,\n DecorationSet,\n} from '@prosekit/pm/view'\n\nimport { findTable } from '../table'\n\nexport interface PlaceholderOptions {\n /**\n * The placeholder to use. It can be a static string or a function that\n * receives the current editor state and returns a string.\n */\n placeholder: string | ((state: EditorState) => string)\n\n /**\n * By default, the placeholder text will be shown whenever the current text\n * cursor is in an empty text node and it's not inside a code block or a\n * table node.\n *\n * If you only want to show the placeholder when the whole doc is empty, you\n * can set this option to 'doc'.\n *\n * You can also pass a function that receives the current editor state and\n * returns a boolean value to determine whether the placeholder should be\n * shown.\n *\n * @default 'block'\n */\n strategy?: 'doc' | 'block' | ((state: EditorState) => boolean)\n}\n\n/**\n * Add a placeholder text to the editor when the current block or document is\n * empty.\n */\nexport function definePlaceholder(options: PlaceholderOptions): PlainExtension {\n return definePlugin(createPlaceholderPlugin(options))\n}\n\nfunction createPlaceholderPlugin({\n placeholder,\n strategy = 'block',\n}: PlaceholderOptions): Plugin {\n return new Plugin({\n key: new PluginKey('prosekit-placeholder'),\n props: {\n decorations: (state) => {\n const strategyFn = typeof strategy === 'function'\n ? strategy\n : strategy === 'doc'\n ? docStrategy\n : defaultStrategy\n\n if (!strategyFn(state)) {\n return null\n }\n\n const placeholderText: string = maybeRun(placeholder, state)\n const deco = createPlaceholderDecoration(state, placeholderText)\n if (!deco) {\n return null\n }\n\n return DecorationSet.create(state.doc, [deco])\n },\n },\n })\n}\n\nfunction defaultStrategy(state: EditorState): boolean {\n return !isInCodeBlock(state.selection) && !findTable(state.selection.$from)\n}\n\nfunction docStrategy(state: EditorState): boolean {\n return isDocEmpty(state.doc) && defaultStrategy(state)\n}\n\nfunction isDocEmpty(doc: ProseMirrorNode) {\n return doc.childCount <= 1 && !doc.firstChild?.content.size\n}\n\nfunction createPlaceholderDecoration(\n state: EditorState,\n placeholderText: string,\n): Decoration | null {\n if (!placeholderText) return null\n\n const { selection } = state\n if (!selection.empty || !isTextSelection(selection)) return null\n\n const $pos = selection.$anchor\n const node = $pos.parent\n if (node.content.size > 0) return null\n\n const before = $pos.before()\n\n return Decoration.node(before, before + node.nodeSize, {\n 'class': 'prosekit-placeholder',\n 'data-placeholder': placeholderText,\n })\n}\n"],"mappings":";;;;;;;;;;AAgDA,SAAgB,kBAAkB,SAA6C;AAC7E,QAAO,aAAa,wBAAwB,QAAQ,CAAC;;AAGvD,SAAS,wBAAwB,EAC/B,aACA,WAAW,WACkB;AAC7B,QAAO,IAAI,OAAO;EAChB,KAAK,IAAI,UAAU,uBAAuB;EAC1C,OAAO,EACL,cAAc,UAAU;AAOtB,OAAI,EANe,OAAO,aAAa,aACnC,WACA,aAAa,QACb,cACA,iBAEY,MAAM,CACpB,QAAO;GAIT,MAAM,OAAO,4BAA4B,OADT,SAAS,aAAa,MAAM,CACI;AAChE,OAAI,CAAC,KACH,QAAO;AAGT,UAAO,cAAc,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC;KAEjD;EACF,CAAC;;AAGJ,SAAS,gBAAgB,OAA6B;AACpD,QAAO,CAAC,cAAc,MAAM,UAAU,IAAI,CAAC,UAAU,MAAM,UAAU,MAAM;;AAG7E,SAAS,YAAY,OAA6B;AAChD,QAAO,WAAW,MAAM,IAAI,IAAI,gBAAgB,MAAM;;AAGxD,SAAS,WAAW,KAAsB;AACxC,QAAO,IAAI,cAAc,KAAK,CAAC,IAAI,YAAY,QAAQ;;AAGzD,SAAS,4BACP,OACA,iBACmB;AACnB,KAAI,CAAC,gBAAiB,QAAO;CAE7B,MAAM,EAAE,cAAc;AACtB,KAAI,CAAC,UAAU,SAAS,CAAC,gBAAgB,UAAU,CAAE,QAAO;CAE5D,MAAM,OAAO,UAAU;CACvB,MAAM,OAAO,KAAK;AAClB,KAAI,KAAK,QAAQ,OAAO,EAAG,QAAO;CAElC,MAAM,SAAS,KAAK,QAAQ;AAE5B,QAAO,WAAW,KAAK,QAAQ,SAAS,KAAK,UAAU;EACrD,SAAS;EACT,oBAAoB;EACrB,CAAC"}
1
+ {"version":3,"file":"prosekit-extensions-placeholder.js","names":[],"sources":["../src/placeholder/index.ts"],"sourcesContent":["import { definePlugin, isInCodeBlock, isTextSelection, maybeRun, type PlainExtension } from '@prosekit/core'\nimport type { ProseMirrorNode } from '@prosekit/pm/model'\nimport { Plugin, PluginKey, type EditorState } from '@prosekit/pm/state'\nimport { Decoration, DecorationSet } from '@prosekit/pm/view'\n\nimport { findTable } from '../table'\n\nexport interface PlaceholderOptions {\n /**\n * The placeholder to use. It can be a static string or a function that\n * receives the current editor state and returns a string.\n */\n placeholder: string | ((state: EditorState) => string)\n\n /**\n * By default, the placeholder text will be shown whenever the current text\n * cursor is in an empty text node and it's not inside a code block or a\n * table node.\n *\n * If you only want to show the placeholder when the whole doc is empty, you\n * can set this option to 'doc'.\n *\n * You can also pass a function that receives the current editor state and\n * returns a boolean value to determine whether the placeholder should be\n * shown.\n *\n * @default 'block'\n */\n strategy?: 'doc' | 'block' | ((state: EditorState) => boolean)\n}\n\n/**\n * Add a placeholder text to the editor when the current block or document is\n * empty.\n */\nexport function definePlaceholder(options: PlaceholderOptions): PlainExtension {\n return definePlugin(createPlaceholderPlugin(options))\n}\n\nfunction createPlaceholderPlugin({\n placeholder,\n strategy = 'block',\n}: PlaceholderOptions): Plugin {\n return new Plugin({\n key: new PluginKey('prosekit-placeholder'),\n props: {\n decorations: (state) => {\n const strategyFn = typeof strategy === 'function'\n ? strategy\n : strategy === 'doc'\n ? docStrategy\n : defaultStrategy\n\n if (!strategyFn(state)) {\n return null\n }\n\n const placeholderText: string = maybeRun(placeholder, state)\n const deco = createPlaceholderDecoration(state, placeholderText)\n if (!deco) {\n return null\n }\n\n return DecorationSet.create(state.doc, [deco])\n },\n },\n })\n}\n\nfunction defaultStrategy(state: EditorState): boolean {\n return !isInCodeBlock(state.selection) && !findTable(state.selection.$from)\n}\n\nfunction docStrategy(state: EditorState): boolean {\n return isDocEmpty(state.doc) && defaultStrategy(state)\n}\n\nfunction isDocEmpty(doc: ProseMirrorNode) {\n return doc.childCount <= 1 && !doc.firstChild?.content.size\n}\n\nfunction createPlaceholderDecoration(\n state: EditorState,\n placeholderText: string,\n): Decoration | null {\n if (!placeholderText) return null\n\n const { selection } = state\n if (!selection.empty || !isTextSelection(selection)) return null\n\n const $pos = selection.$anchor\n const node = $pos.parent\n if (node.content.size > 0) return null\n\n const before = $pos.before()\n\n return Decoration.node(before, before + node.nodeSize, {\n 'class': 'prosekit-placeholder',\n 'data-placeholder': placeholderText,\n })\n}\n"],"mappings":";;;;;;;;;;AAmCA,SAAgB,kBAAkB,SAA6C;AAC7E,QAAO,aAAa,wBAAwB,QAAQ,CAAC;;AAGvD,SAAS,wBAAwB,EAC/B,aACA,WAAW,WACkB;AAC7B,QAAO,IAAI,OAAO;EAChB,KAAK,IAAI,UAAU,uBAAuB;EAC1C,OAAO,EACL,cAAc,UAAU;AAOtB,OAAI,EANe,OAAO,aAAa,aACnC,WACA,aAAa,QACb,cACA,iBAEY,MAAM,CACpB,QAAO;GAIT,MAAM,OAAO,4BAA4B,OADT,SAAS,aAAa,MAAM,CACI;AAChE,OAAI,CAAC,KACH,QAAO;AAGT,UAAO,cAAc,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC;KAEjD;EACF,CAAC;;AAGJ,SAAS,gBAAgB,OAA6B;AACpD,QAAO,CAAC,cAAc,MAAM,UAAU,IAAI,CAAC,UAAU,MAAM,UAAU,MAAM;;AAG7E,SAAS,YAAY,OAA6B;AAChD,QAAO,WAAW,MAAM,IAAI,IAAI,gBAAgB,MAAM;;AAGxD,SAAS,WAAW,KAAsB;AACxC,QAAO,IAAI,cAAc,KAAK,CAAC,IAAI,YAAY,QAAQ;;AAGzD,SAAS,4BACP,OACA,iBACmB;AACnB,KAAI,CAAC,gBAAiB,QAAO;CAE7B,MAAM,EAAE,cAAc;AACtB,KAAI,CAAC,UAAU,SAAS,CAAC,gBAAgB,UAAU,CAAE,QAAO;CAE5D,MAAM,OAAO,UAAU;CACvB,MAAM,OAAO,KAAK;AAClB,KAAI,KAAK,QAAQ,OAAO,EAAG,QAAO;CAElC,MAAM,SAAS,KAAK,QAAQ;AAE5B,QAAO,WAAW,KAAK,QAAQ,SAAS,KAAK,UAAU;EACrD,SAAS;EACT,oBAAoB;EACrB,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { PlainExtension } from "@prosekit/core";
2
2
 
3
3
  //#region src/readonly/index.d.ts
4
-
5
4
  /**
6
5
  * Make the editor read-only.
7
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-readonly.d.ts","names":[],"sources":["../src/readonly/index.ts"],"sourcesContent":[],"mappings":";;;;;;AAYA;iBAAgB,cAAA,CAAA,GAAkB"}
1
+ {"version":3,"file":"prosekit-extensions-readonly.d.ts","names":[],"sources":["../src/readonly/index.ts"],"mappings":";;;;;AAMA;iBAAgB,cAAA,CAAA,GAAkB,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-readonly.js","names":[],"sources":["../src/readonly/index.ts"],"sourcesContent":["import {\n definePlugin,\n type PlainExtension,\n} from '@prosekit/core'\nimport {\n PluginKey,\n ProseMirrorPlugin,\n} from '@prosekit/pm/state'\n\n/**\n * Make the editor read-only.\n */\nexport function defineReadonly(): PlainExtension {\n return definePlugin(plugin)\n}\n\nconst plugin = new ProseMirrorPlugin({\n key: new PluginKey('prosekey-readonly'),\n props: {\n editable: () => false,\n },\n})\n"],"mappings":";;;;;;;AAYA,SAAgB,iBAAiC;AAC/C,QAAO,aAAa,OAAO;;AAG7B,MAAM,SAAS,IAAI,kBAAkB;CACnC,KAAK,IAAI,UAAU,oBAAoB;CACvC,OAAO,EACL,gBAAgB,OACjB;CACF,CAAC"}
1
+ {"version":3,"file":"prosekit-extensions-readonly.js","names":[],"sources":["../src/readonly/index.ts"],"sourcesContent":["import { definePlugin, type PlainExtension } from '@prosekit/core'\nimport { PluginKey, ProseMirrorPlugin } from '@prosekit/pm/state'\n\n/**\n * Make the editor read-only.\n */\nexport function defineReadonly(): PlainExtension {\n return definePlugin(plugin)\n}\n\nconst plugin = new ProseMirrorPlugin({\n key: new PluginKey('prosekey-readonly'),\n props: {\n editable: () => false,\n },\n})\n"],"mappings":";;;;;;;AAMA,SAAgB,iBAAiC;AAC/C,QAAO,aAAa,OAAO;;AAG7B,MAAM,SAAS,IAAI,kBAAkB;CACnC,KAAK,IAAI,UAAU,oBAAoB;CACvC,OAAO,EACL,gBAAgB,OACjB;CACF,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { Extension, PlainExtension } from "@prosekit/core";
2
2
 
3
3
  //#region src/search/index.d.ts
4
-
5
4
  /**
6
5
  * Options for {@link defineSearchQuery}
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-search.d.ts","names":[],"sources":["../src/search/index.ts"],"sourcesContent":[],"mappings":";;;;;;AA0BA;AA+CA;AAqCA;AAkBgB,UAtGC,kBAAA,CAsGmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAvDpB,iBAAA,UAA2B,qBAAqB;;;;KAqCpD,uBAAA,GAA0B;;;;;;;;;;;;;;;;;iBAkBtB,oBAAA,CAAA,GAAwB"}
1
+ {"version":3,"file":"prosekit-extensions-search.d.ts","names":[],"sources":["../src/search/index.ts"],"mappings":";;;;;AAqBA;;;UAAiB,kBAAA;EAIf;;;EAAA,MAAA;EA4BA;;;EAvBA,OAAA;EAsCc;;;;;EA/Bd,aAAA;EA+B8D;;;AAqChE;;;;EA3DE,OAAA;EA4DA;;;;;EArDA,MAAA;EA2DE;;;;;EApDF,SAAA;AAAA;;;;;;iBAQc,iBAAA,CAAkB,OAAA,EAAS,kBAAA,GAAqB,cAAA;;;;KAqCpD,uBAAA,GAA0B,SAAA;EACpC,QAAA;IACE,QAAA;IACA,QAAA;IACA,cAAA;IACA,cAAA;IACA,WAAA;IACA,iBAAA;IACA,cAAA;IACA,UAAA;EAAA;AAAA;;;;;;iBASY,oBAAA,CAAA,GAAwB,uBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-search.js","names":[],"sources":["../src/search/index.ts"],"sourcesContent":["import {\n defineCommands,\n definePlugin,\n type Extension,\n type PlainExtension,\n} from '@prosekit/core'\nimport type { Command } from '@prosekit/pm/state'\nimport type { EditorView } from '@prosekit/pm/view'\nimport {\n findNext,\n findNextNoWrap,\n findPrev,\n findPrevNoWrap,\n replaceAll,\n replaceCurrent,\n replaceNext,\n replaceNextNoWrap,\n search,\n SearchQuery,\n} from 'prosemirror-search'\n\n/**\n * Options for {@link defineSearchQuery}\n *\n * @public\n */\nexport interface SearchQueryOptions {\n /**\n * The search string (or regular expression).\n */\n search: string\n\n /**\n * The replace text.\n */\n replace?: string\n\n /**\n * Indicates whether the search is case-sensitive\n *\n * @default false\n */\n caseSensitive?: boolean\n\n /**\n * By default, string search will replace `\\n`, `\\r`, and `\\t` in the query\n * with newline, return, and tab characters. When this is set to true, that\n * behavior is disabled.\n *\n * @default false\n */\n literal?: boolean\n\n /**\n * When true, the search string is interpreted as a regular expression.\n *\n * @default false\n */\n regexp?: boolean\n\n /**\n * Enable whole-word matching.\n *\n * @default false\n */\n wholeWord?: boolean\n}\n\n/**\n * Defines an extension that stores a current search query and replace string.\n *\n * @public\n */\nexport function defineSearchQuery(options: SearchQueryOptions): PlainExtension {\n const query = new SearchQuery(options)\n return definePlugin(search({ initialQuery: query }))\n}\n\n/**\n * Scrolls the active search match into view.\n */\nfunction scrollActiveIntoView(view: EditorView) {\n if (view.isDestroyed) return\n const active = view.dom.querySelector('.ProseMirror-active-search-match')\n active?.scrollIntoView({\n block: 'nearest',\n inline: 'nearest',\n behavior: 'smooth',\n })\n}\n\n/**\n * Wraps a command and scrolls the active search match into view when the command\n * is applied.\n */\nfunction withScrollActiveIntoView(command: Command): Command {\n return (state, dispatch, view) => {\n const result = command(state, dispatch, view)\n if (result && dispatch && view) {\n // Add a small delay because the command itself will handle scrolling if\n // the view is focused.\n setTimeout(() => scrollActiveIntoView(view), 50)\n }\n return result\n }\n}\n\n/**\n * @internal\n */\nexport type SearchCommandsExtension = Extension<{\n Commands: {\n findNext: []\n findPrev: []\n findNextNoWrap: []\n findPrevNoWrap: []\n replaceNext: []\n replaceNextNoWrap: []\n replaceCurrent: []\n replaceAll: []\n }\n}>\n\n/**\n * Defines commands for search and replace.\n *\n * @public\n */\nexport function defineSearchCommands(): SearchCommandsExtension {\n return defineCommands({\n findNext: () => withScrollActiveIntoView(findNext),\n findPrev: () => withScrollActiveIntoView(findPrev),\n findNextNoWrap: () => withScrollActiveIntoView(findNextNoWrap),\n findPrevNoWrap: () => withScrollActiveIntoView(findPrevNoWrap),\n replaceNext: () => withScrollActiveIntoView(replaceNext),\n replaceNextNoWrap: () => withScrollActiveIntoView(replaceNextNoWrap),\n replaceCurrent: () => withScrollActiveIntoView(replaceCurrent),\n replaceAll: () => withScrollActiveIntoView(replaceAll),\n })\n}\n"],"mappings":";;;;;;;;;AAyEA,SAAgB,kBAAkB,SAA6C;AAE7E,QAAO,aAAa,OAAO,EAAE,cADf,IAAI,YAAY,QAAQ,EACY,CAAC,CAAC;;;;;AAMtD,SAAS,qBAAqB,MAAkB;AAC9C,KAAI,KAAK,YAAa;AAEtB,CADe,KAAK,IAAI,cAAc,mCAAmC,EACjE,eAAe;EACrB,OAAO;EACP,QAAQ;EACR,UAAU;EACX,CAAC;;;;;;AAOJ,SAAS,yBAAyB,SAA2B;AAC3D,SAAQ,OAAO,UAAU,SAAS;EAChC,MAAM,SAAS,QAAQ,OAAO,UAAU,KAAK;AAC7C,MAAI,UAAU,YAAY,KAGxB,kBAAiB,qBAAqB,KAAK,EAAE,GAAG;AAElD,SAAO;;;;;;;;AAyBX,SAAgB,uBAAgD;AAC9D,QAAO,eAAe;EACpB,gBAAgB,yBAAyB,SAAS;EAClD,gBAAgB,yBAAyB,SAAS;EAClD,sBAAsB,yBAAyB,eAAe;EAC9D,sBAAsB,yBAAyB,eAAe;EAC9D,mBAAmB,yBAAyB,YAAY;EACxD,yBAAyB,yBAAyB,kBAAkB;EACpE,sBAAsB,yBAAyB,eAAe;EAC9D,kBAAkB,yBAAyB,WAAW;EACvD,CAAC"}
1
+ {"version":3,"file":"prosekit-extensions-search.js","names":[],"sources":["../src/search/index.ts"],"sourcesContent":["import { defineCommands, definePlugin, type Extension, type PlainExtension } from '@prosekit/core'\nimport type { Command } from '@prosekit/pm/state'\nimport type { EditorView } from '@prosekit/pm/view'\nimport {\n findNext,\n findNextNoWrap,\n findPrev,\n findPrevNoWrap,\n replaceAll,\n replaceCurrent,\n replaceNext,\n replaceNextNoWrap,\n search,\n SearchQuery,\n} from 'prosemirror-search'\n\n/**\n * Options for {@link defineSearchQuery}\n *\n * @public\n */\nexport interface SearchQueryOptions {\n /**\n * The search string (or regular expression).\n */\n search: string\n\n /**\n * The replace text.\n */\n replace?: string\n\n /**\n * Indicates whether the search is case-sensitive\n *\n * @default false\n */\n caseSensitive?: boolean\n\n /**\n * By default, string search will replace `\\n`, `\\r`, and `\\t` in the query\n * with newline, return, and tab characters. When this is set to true, that\n * behavior is disabled.\n *\n * @default false\n */\n literal?: boolean\n\n /**\n * When true, the search string is interpreted as a regular expression.\n *\n * @default false\n */\n regexp?: boolean\n\n /**\n * Enable whole-word matching.\n *\n * @default false\n */\n wholeWord?: boolean\n}\n\n/**\n * Defines an extension that stores a current search query and replace string.\n *\n * @public\n */\nexport function defineSearchQuery(options: SearchQueryOptions): PlainExtension {\n const query = new SearchQuery(options)\n return definePlugin(search({ initialQuery: query }))\n}\n\n/**\n * Scrolls the active search match into view.\n */\nfunction scrollActiveIntoView(view: EditorView) {\n if (view.isDestroyed) return\n const active = view.dom.querySelector('.ProseMirror-active-search-match')\n active?.scrollIntoView({\n block: 'nearest',\n inline: 'nearest',\n behavior: 'smooth',\n })\n}\n\n/**\n * Wraps a command and scrolls the active search match into view when the command\n * is applied.\n */\nfunction withScrollActiveIntoView(command: Command): Command {\n return (state, dispatch, view) => {\n const result = command(state, dispatch, view)\n if (result && dispatch && view) {\n // Add a small delay because the command itself will handle scrolling if\n // the view is focused.\n setTimeout(() => scrollActiveIntoView(view), 50)\n }\n return result\n }\n}\n\n/**\n * @internal\n */\nexport type SearchCommandsExtension = Extension<{\n Commands: {\n findNext: []\n findPrev: []\n findNextNoWrap: []\n findPrevNoWrap: []\n replaceNext: []\n replaceNextNoWrap: []\n replaceCurrent: []\n replaceAll: []\n }\n}>\n\n/**\n * Defines commands for search and replace.\n *\n * @public\n */\nexport function defineSearchCommands(): SearchCommandsExtension {\n return defineCommands({\n findNext: () => withScrollActiveIntoView(findNext),\n findPrev: () => withScrollActiveIntoView(findPrev),\n findNextNoWrap: () => withScrollActiveIntoView(findNextNoWrap),\n findPrevNoWrap: () => withScrollActiveIntoView(findPrevNoWrap),\n replaceNext: () => withScrollActiveIntoView(replaceNext),\n replaceNextNoWrap: () => withScrollActiveIntoView(replaceNextNoWrap),\n replaceCurrent: () => withScrollActiveIntoView(replaceCurrent),\n replaceAll: () => withScrollActiveIntoView(replaceAll),\n })\n}\n"],"mappings":";;;;;;;;;AAoEA,SAAgB,kBAAkB,SAA6C;AAE7E,QAAO,aAAa,OAAO,EAAE,cADf,IAAI,YAAY,QAAQ,EACY,CAAC,CAAC;;;;;AAMtD,SAAS,qBAAqB,MAAkB;AAC9C,KAAI,KAAK,YAAa;AAEtB,CADe,KAAK,IAAI,cAAc,mCAAmC,EACjE,eAAe;EACrB,OAAO;EACP,QAAQ;EACR,UAAU;EACX,CAAC;;;;;;AAOJ,SAAS,yBAAyB,SAA2B;AAC3D,SAAQ,OAAO,UAAU,SAAS;EAChC,MAAM,SAAS,QAAQ,OAAO,UAAU,KAAK;AAC7C,MAAI,UAAU,YAAY,KAGxB,kBAAiB,qBAAqB,KAAK,EAAE,GAAG;AAElD,SAAO;;;;;;;;AAyBX,SAAgB,uBAAgD;AAC9D,QAAO,eAAe;EACpB,gBAAgB,yBAAyB,SAAS;EAClD,gBAAgB,yBAAyB,SAAS;EAClD,sBAAsB,yBAAyB,eAAe;EAC9D,sBAAsB,yBAAyB,eAAe;EAC9D,mBAAmB,yBAAyB,YAAY;EACxD,yBAAyB,yBAAyB,kBAAkB;EACpE,sBAAsB,yBAAyB,eAAe;EAC9D,kBAAkB,yBAAyB,WAAW;EACvD,CAAC"}
@@ -2,7 +2,6 @@ import { Extension, PlainExtension, Union } from "@prosekit/core";
2
2
  import { Attrs } from "@prosekit/pm/model";
3
3
 
4
4
  //#region src/strike/index.d.ts
5
-
6
5
  /**
7
6
  * @internal
8
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-strike.d.ts","names":[],"sources":["../src/strike/index.ts"],"sourcesContent":[],"mappings":";;;;;;;AAkBA;AASgB,KATJ,mBAAA,GAAsB,SASE,CAAA;EAmBxB,KAAA,EAAA;IASI,MAAA,EAnCJ,KAmCI;EASA,CAAA;AAUhB,CAAA,CAAA;AAYA;;;AAA8B,iBA3Dd,gBAAA,CAAA,CA2Dc,EA3DM,mBA2DN;;AAO9B;;KA/CY,uBAAA,GAA0B;;;;;;;;iBAStB,oBAAA,CAAA,GAAwB;;;;iBASxB,kBAAA,CAAA,GAAsB;;;;iBAUtB,qBAAA,CAAA,GAAyB;;;;KAY7B,eAAA,GAAkB,OAC3B,qBAAqB;;;;iBAMR,YAAA,CAAA,GAAgB"}
1
+ {"version":3,"file":"prosekit-extensions-strike.d.ts","names":[],"sources":["../src/strike/index.ts"],"mappings":";;;;;;AAkBA;KAAY,mBAAA,GAAsB,SAAA;EAChC,KAAA;IACE,MAAA,EAAQ,KAAA;EAAA;AAAA;;;;iBAOI,gBAAA,CAAA,GAAoB,mBAAA;AAApC;;;AAAA,KAmBY,uBAAA,GAA0B,SAAA;EACpC,QAAA;IACE,YAAA;EAAA;AAAA;;;;iBAOY,oBAAA,CAAA,GAAwB,uBAAA;;;AAAxC;iBASgB,kBAAA,CAAA,GAAsB,cAAA;;;;iBAUtB,qBAAA,CAAA,GAAyB,cAAA;;;;KAY7B,eAAA,GAAkB,KAAA,EAC3B,mBAAA,EAAqB,uBAAA;;;AADxB;iBAOgB,YAAA,CAAA,GAAgB,eAAA"}
@@ -1,4 +1,4 @@
1
- import { r as defineMarkInputRule } from "./input-rule-dmsb3j6w.js";
1
+ import { defineMarkInputRule } from "./prosekit-extensions-input-rule.js";
2
2
  import { canUseRegexLookbehind, defineCommands, defineKeymap, defineMarkSpec, toggleMark, union } from "@prosekit/core";
3
3
 
4
4
  //#region src/strike/index.ts
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-extensions-table.d.ts","names":[],"sources":["../src/table/table-commands/insert-table.ts","../src/table/table-commands/select-table.ts","../src/table/table-commands/select-table-cell.ts","../src/table/table-commands/select-table-column.ts","../src/table/table-commands/select-table-row.ts","../src/table/table-commands.ts","../src/table/table-spec.ts","../src/table/table.ts","../src/table/table-commands/exit-table.ts","../src/table/table-drop-indicator.ts","../src/table/table-plugins.ts","../src/table/table-utils.ts"],"sourcesContent":[],"mappings":";;;;;;;;;UA8CiB,kBAAA;;AAAjB;AA2BA;;;;AC9DA;EAWgB,GAAA,EAAA,MAAA;;;;ACdhB;AAWA;;;;ACXA;AAiBA;;;;ACjBA;AAiBA;iBJgDgB,WAAA,UAAqB,qBAAqB;;;;;;UC9DzC,kBAAA;;ADmCjB;AA2BA;;;;AC9DA;AAWA;;iBAAgB,WAAA,WAAsB,qBAAqB;;;;;;UCd1C,sBAAA;;AFsCjB;AA2BA;;;;AC9DA;AAWA;;iBCHgB,eAAA,WAA0B,yBAAyB;;;;;;UCXlD,wBAAA;;AHsCjB;AA2BA;;;;AC9DA;AAWA;;;;ACdA;AAWA;;iBCMgB,iBAAA,WAA4B,2BAA2B;;;;;;UCjBtD,qBAAA;;AJsCjB;AA2BA;;;;AC9DA;AAWA;;;;ACdA;AAWA;;iBEMgB,cAAA,WAAyB,wBAAwB;;;;;;AHdhD,KIuCL,sBAAA,GAAyB,SJvCF,CAAA;EAWnB,QAAA,EAAA;2BI8BW;;4BAGC;IH/CX,eAAA,EAAA,CAAA,OAAsB,GGgDP,sBHhDO,CAAA;IAWvB,iBAAe,EAAA,CAAA,OAAW,GGsCR,wBHtCiC,CAAA;+BGuCpC;;;IFlDd,gBAAA,EAAA,EAAA;IAiBD,gBAAiB,EAAA,EAAA;;;;ICjBhB,mBAAA,EAAqB,EAAA;IAiBtB,eAAc,EAAA,EAAA;;4BCgDF;+BACG;EAxBnB,CAAA;CAEe,CAAA;;;;;;AAsBI,iBASf,mBAAA,CAAA,CATe,EASQ,sBATR;;;;;;UC3Dd,SAAA;EN+BA,OAAA,CAAA,EAAA,MAAA;EA2BD,OAAA,CAAA,EAAA,MAAW;;;;AC9D3B;AAWA;KKQY,kBAAA,GAAqB;;WAEtB;EJxBM,CAAA;AAWjB,CAAA,CAAA;;;;ACXiB,iBGqCD,eAAA,CAAA,CHrCyB,EGqCN,kBHrCM;AAiBzC;;;KG+BY,qBAAA,GAAwB;EFhDnB,KAAA,EAAA;IAiBD,QAAA,EEiCF,KFjCgB;;;;ACyB9B;;AAK4B,iBCUZ,kBAAA,CAAA,CDVY,ECUU,qBDVV;;;;AAkBA,KCGhB,sBAAA,GAAyB,SDHT,CAAA;EACG,KAAA,EAAA;IAxBM,SAAA,EC4BtB,SD5BsB;EAAS,CAAA;AAiC9C,CAAA,CAAA;;;;ACpEiB,iBAsED,mBAAA,CAAA,CAtEU,EAsEa,sBAtEb;AAe1B;AAeA;AAWA;AASgB,KA+BJ,4BAAA,GAA+B,SA/BL,CAAA;EAW1B,KAAA,EAAA;IASI,eAAA,EAaK,SAbc;EAWvB,CAAA;AAMZ,CAAA,CAAA;iBAAgB,yBAAA,CAAA,GAA6B;;;;;;ANxD5B,KOrBL,cAAA,GAAiB,KPqBM,CAAA,COnB/B,kBP8CuB,EO7CvB,uBACA,wBACA,8BACA,sBNpB+B,CAWnC,CAAA;;;;ACdiB,iBK8BD,WAAA,CAAA,CL9BuB,EK8BR,cL9BQ;;;;;;;;AFsCvC;AA2BgB,cQ9DH,SR8Dc,EQ9DH,OR8Da;;;;;;;;AA3BrC;AA2BgB,iBS9DA,wBAAA,CAAA,CT8DqB,ES9DO,cT8DqB;;;;;;iBU7DjD,kBAAA,CAAA,GAAsB;;;;;;;AVkCtC;AA2BgB,iBW5DA,eAAA,CX4DqB,KAAA,EAAA,OAAqB,CAAA,EAAA,KAAO,IW5DP,aX4DO"}
1
+ {"version":3,"file":"prosekit-extensions-table.d.ts","names":[],"sources":["../src/table/table-commands/insert-table.ts","../src/table/table-commands/select-table.ts","../src/table/table-commands/select-table-cell.ts","../src/table/table-commands/select-table-column.ts","../src/table/table-commands/select-table-row.ts","../src/table/table-commands.ts","../src/table/table-spec.ts","../src/table/table.ts","../src/table/table-commands/exit-table.ts","../src/table/table-drop-indicator.ts","../src/table/table-plugins.ts","../src/table/table-utils.ts"],"mappings":";;;;;;;;;UA2CiB,kBAAA;;AAAjB;;EAIE,GAAA;EAJiC;;;EASjC,GAAA;EAOM;;AAWR;;;EAXE,MAAA;AAAA;;;;;;;;ACnDF;iBD8DgB,WAAA,CAAY,OAAA,EAAS,kBAAA,GAAqB,OAAA;;;;;;UC9DzC,kBAAA;;ADmCjB;;;EC9BE,GAAA;AAAA;;;;iBAMc,WAAA,CAAY,OAAA,GAAU,kBAAA,GAAqB,OAAA;;;;;;UCX1C,sBAAA;;AFmCjB;;;EE9BE,GAAA;AAAA;;;;iBAMc,eAAA,CAAgB,OAAA,GAAU,sBAAA,GAAyB,OAAA;;;;;;UCXlD,wBAAA;;AHmCjB;;;EG9BE,MAAA;EHkCA;;;;EG5BA,IAAA;AAAA;;;;iBAMc,iBAAA,CAAkB,OAAA,GAAU,wBAAA,GAA2B,OAAA;;;;;;UCjBtD,qBAAA;;AJmCjB;;;EI9BE,MAAA;EJkCA;;;;EI5BA,IAAA;AAAA;;;;iBAMc,cAAA,CAAe,OAAA,GAAU,qBAAA,GAAwB,OAAA;;;;;;KCCrD,sBAAA,GAAyB,SAAA;EACnC,QAAA;IACE,WAAA,GAAc,OAAA,EAAS,kBAAA;IACvB,SAAA;IAEA,WAAA,GAAc,OAAA,GAAU,kBAAA;IACxB,eAAA,GAAkB,OAAA,GAAU,sBAAA;IAC5B,iBAAA,GAAoB,OAAA,GAAU,wBAAA;IAC9B,cAAA,GAAiB,OAAA,GAAU,qBAAA;IAE3B,oBAAA;IACA,mBAAA;IACA,gBAAA;IACA,gBAAA;IAEA,WAAA;IACA,iBAAA;IACA,cAAA;IACA,mBAAA;IAEA,eAAA;IACA,cAAA;IAEA,YAAA,GAAe,OAAA,EAAS,mBAAA;IACxB,eAAA,GAAkB,OAAA,EAAS,sBAAA;EAAA;AAAA;;;;;;iBASf,mBAAA,CAAA,GAAuB,sBAAA;;;;;;UClDtB,SAAA;EACf,OAAA;EACA,OAAA;EACA,QAAA;AAAA;;;;KAYU,kBAAA,GAAqB,SAAA;EAC/B,KAAA;IACE,KAAA,EAAO,KAAA;EAAA;AAAA;;;;iBAaK,eAAA,CAAA,GAAmB,kBAAA;;;;KAWvB,qBAAA,GAAwB,SAAA;EAClC,KAAA;IACE,QAAA,EAAU,KAAA;EAAA;AAAA;;;ALjCd;iBKwCgB,kBAAA,CAAA,GAAsB,qBAAA;;;;KAW1B,sBAAA,GAAyB,SAAA;EACnC,KAAA;IACE,SAAA,EAAW,SAAA;EAAA;AAAA;;;AJhEf;iBIuEgB,mBAAA,CAAA,GAAuB,sBAAA;;;;KAW3B,4BAAA,GAA+B,SAAA;EACzC,KAAA;IACE,eAAA,EAAiB,SAAA;EAAA;AAAA;AAAA,iBAIL,yBAAA,CAAA,GAA6B,4BAAA;;;;;;KC7EjC,cAAA,GAAiB,KAAA,EAEzB,kBAAA,EACA,qBAAA,EACA,sBAAA,EACA,4BAAA,EACA,sBAAA;;;AP6CJ;iBOtCgB,WAAA,CAAA,GAAe,cAAA;;;;;;;;APW/B;cQhCa,SAAA,EAAW,OAAA;;;;;;;;ARgCxB;iBShCgB,wBAAA,CAAA,GAA4B,cAAA;;;;;;iBCL5B,kBAAA,CAAA,GAAsB,cAAA;;;;;;;AVqCtC;iBWlCgB,eAAA,CAAgB,KAAA,YAAiB,KAAA,IAAS,aAAA"}
@@ -1,3 +1,3 @@
1
- import { _ as insertTable, a as defineTableSpec, c as defineTableCommands, d as selectTableCell, f as selectTable, g as moveTableColumn, h as moveTableRow, i as defineTableRowSpec, l as selectTableRow, m as isCellSelection, n as defineTableCellSpec, o as defineTablePlugins, p as findTable, r as defineTableHeaderCellSpec, s as defineTableDropIndicator, t as defineTable, u as selectTableColumn, v as exitTable } from "./table-BRDh_9mG.js";
1
+ import { _ as insertTable, a as defineTableSpec, c as defineTableCommands, d as selectTableCell, f as selectTable, g as moveTableColumn, h as moveTableRow, i as defineTableRowSpec, l as selectTableRow, m as isCellSelection, n as defineTableCellSpec, o as defineTablePlugins, p as findTable, r as defineTableHeaderCellSpec, s as defineTableDropIndicator, t as defineTable, u as selectTableColumn, v as exitTable } from "./table-UJVYsrB7.js";
2
2
 
3
3
  export { defineTable, defineTableCellSpec, defineTableCommands, defineTableDropIndicator, defineTableHeaderCellSpec, defineTablePlugins, defineTableRowSpec, defineTableSpec, exitTable, findTable, insertTable, isCellSelection, moveTableColumn, moveTableRow, selectTable, selectTableCell, selectTableColumn, selectTableRow };
@@ -2,7 +2,6 @@ import { Extension, PlainExtension, Union } from "@prosekit/core";
2
2
  import { Command } from "@prosekit/pm/state";
3
3
 
4
4
  //#region src/text-align/index.d.ts
5
-
6
5
  /**
7
6
  * @public
8
7
  */