@domternal/core 0.3.0 → 0.4.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 (385) hide show
  1. package/README.md +7 -5
  2. package/dist/CanChecker.d.ts +79 -0
  3. package/dist/CanChecker.d.ts.map +1 -0
  4. package/dist/CanChecker.test.d.ts +2 -0
  5. package/dist/CanChecker.test.d.ts.map +1 -0
  6. package/dist/ChainBuilder.d.ts +119 -0
  7. package/dist/ChainBuilder.d.ts.map +1 -0
  8. package/dist/ChainBuilder.test.d.ts +2 -0
  9. package/dist/ChainBuilder.test.d.ts.map +1 -0
  10. package/dist/CommandManager.d.ts +86 -0
  11. package/dist/CommandManager.d.ts.map +1 -0
  12. package/dist/CommandManager.test.d.ts +2 -0
  13. package/dist/CommandManager.test.d.ts.map +1 -0
  14. package/dist/Editor.d.ts +262 -0
  15. package/dist/Editor.d.ts.map +1 -0
  16. package/dist/Editor.test.d.ts +2 -0
  17. package/dist/Editor.test.d.ts.map +1 -0
  18. package/dist/EventEmitter.d.ts +57 -0
  19. package/dist/EventEmitter.d.ts.map +1 -0
  20. package/dist/EventEmitter.test.d.ts +2 -0
  21. package/dist/EventEmitter.test.d.ts.map +1 -0
  22. package/dist/Extension.d.ts +171 -0
  23. package/dist/Extension.d.ts.map +1 -0
  24. package/dist/Extension.test.d.ts +2 -0
  25. package/dist/Extension.test.d.ts.map +1 -0
  26. package/dist/ExtensionManager.d.ts +283 -0
  27. package/dist/ExtensionManager.d.ts.map +1 -0
  28. package/dist/ExtensionManager.test.d.ts +2 -0
  29. package/dist/ExtensionManager.test.d.ts.map +1 -0
  30. package/dist/Mark.d.ts +164 -0
  31. package/dist/Mark.d.ts.map +1 -0
  32. package/dist/Mark.test.d.ts +5 -0
  33. package/dist/Mark.test.d.ts.map +1 -0
  34. package/dist/Node.d.ts +153 -0
  35. package/dist/Node.d.ts.map +1 -0
  36. package/dist/Node.test.d.ts +2 -0
  37. package/dist/Node.test.d.ts.map +1 -0
  38. package/dist/ToolbarController.d.ts +169 -0
  39. package/dist/ToolbarController.d.ts.map +1 -0
  40. package/dist/ToolbarController.test.d.ts +2 -0
  41. package/dist/ToolbarController.test.d.ts.map +1 -0
  42. package/dist/commandPropsBuilder.d.ts +70 -0
  43. package/dist/commandPropsBuilder.d.ts.map +1 -0
  44. package/dist/commandPropsBuilder.test.d.ts +2 -0
  45. package/dist/commandPropsBuilder.test.d.ts.map +1 -0
  46. package/dist/commands/attributeCommands.d.ts +24 -0
  47. package/dist/commands/attributeCommands.d.ts.map +1 -0
  48. package/dist/commands/attributeCommands.test.d.ts +2 -0
  49. package/dist/commands/attributeCommands.test.d.ts.map +1 -0
  50. package/dist/commands/builtIn.test.d.ts +2 -0
  51. package/dist/commands/builtIn.test.d.ts.map +1 -0
  52. package/dist/commands/contentCommands.d.ts +52 -0
  53. package/dist/commands/contentCommands.d.ts.map +1 -0
  54. package/dist/commands/contentCommands.test.d.ts +2 -0
  55. package/dist/commands/contentCommands.test.d.ts.map +1 -0
  56. package/dist/commands/index.d.ts +43 -0
  57. package/dist/commands/index.d.ts.map +1 -0
  58. package/dist/commands/listCommands.d.ts +15 -0
  59. package/dist/commands/listCommands.d.ts.map +1 -0
  60. package/dist/commands/listCommands.test.d.ts +2 -0
  61. package/dist/commands/listCommands.test.d.ts.map +1 -0
  62. package/dist/commands/markCommands.d.ts +40 -0
  63. package/dist/commands/markCommands.d.ts.map +1 -0
  64. package/dist/commands/markCommands.test.d.ts +2 -0
  65. package/dist/commands/markCommands.test.d.ts.map +1 -0
  66. package/dist/commands/nodeCommands.d.ts +53 -0
  67. package/dist/commands/nodeCommands.d.ts.map +1 -0
  68. package/dist/commands/nodeCommands.test.d.ts +2 -0
  69. package/dist/commands/nodeCommands.test.d.ts.map +1 -0
  70. package/dist/commands/selectionCommands.d.ts +37 -0
  71. package/dist/commands/selectionCommands.d.ts.map +1 -0
  72. package/dist/commands/selectionCommands.test.d.ts +2 -0
  73. package/dist/commands/selectionCommands.test.d.ts.map +1 -0
  74. package/dist/extensions/BaseKeymap.d.ts +36 -0
  75. package/dist/extensions/BaseKeymap.d.ts.map +1 -0
  76. package/dist/extensions/BaseKeymap.test.d.ts +2 -0
  77. package/dist/extensions/BaseKeymap.test.d.ts.map +1 -0
  78. package/dist/extensions/BubbleMenu.d.ts +85 -0
  79. package/dist/extensions/BubbleMenu.d.ts.map +1 -0
  80. package/dist/extensions/BubbleMenu.test.d.ts +2 -0
  81. package/dist/extensions/BubbleMenu.test.d.ts.map +1 -0
  82. package/dist/extensions/CharacterCount.d.ts +60 -0
  83. package/dist/extensions/CharacterCount.d.ts.map +1 -0
  84. package/dist/extensions/CharacterCount.test.d.ts +2 -0
  85. package/dist/extensions/CharacterCount.test.d.ts.map +1 -0
  86. package/dist/extensions/ClearFormatting.d.ts +25 -0
  87. package/dist/extensions/ClearFormatting.d.ts.map +1 -0
  88. package/dist/extensions/ClearFormatting.test.d.ts +2 -0
  89. package/dist/extensions/ClearFormatting.test.d.ts.map +1 -0
  90. package/dist/extensions/Dropcursor.d.ts +20 -0
  91. package/dist/extensions/Dropcursor.d.ts.map +1 -0
  92. package/dist/extensions/Dropcursor.test.d.ts +2 -0
  93. package/dist/extensions/Dropcursor.test.d.ts.map +1 -0
  94. package/dist/extensions/FloatingMenu.d.ts +74 -0
  95. package/dist/extensions/FloatingMenu.d.ts.map +1 -0
  96. package/dist/extensions/FloatingMenu.test.d.ts +2 -0
  97. package/dist/extensions/FloatingMenu.test.d.ts.map +1 -0
  98. package/dist/extensions/Focus.d.ts +26 -0
  99. package/dist/extensions/Focus.d.ts.map +1 -0
  100. package/dist/extensions/Focus.test.d.ts +2 -0
  101. package/dist/extensions/Focus.test.d.ts.map +1 -0
  102. package/dist/extensions/FontFamily.d.ts +41 -0
  103. package/dist/extensions/FontFamily.d.ts.map +1 -0
  104. package/dist/extensions/FontFamily.test.d.ts +2 -0
  105. package/dist/extensions/FontFamily.test.d.ts.map +1 -0
  106. package/dist/extensions/FontSize.d.ts +46 -0
  107. package/dist/extensions/FontSize.d.ts.map +1 -0
  108. package/dist/extensions/FontSize.test.d.ts +2 -0
  109. package/dist/extensions/FontSize.test.d.ts.map +1 -0
  110. package/dist/extensions/Gapcursor.d.ts +3 -0
  111. package/dist/extensions/Gapcursor.d.ts.map +1 -0
  112. package/dist/extensions/Gapcursor.test.d.ts +2 -0
  113. package/dist/extensions/Gapcursor.test.d.ts.map +1 -0
  114. package/dist/extensions/Highlight.d.ts +61 -0
  115. package/dist/extensions/Highlight.d.ts.map +1 -0
  116. package/dist/extensions/Highlight.test.d.ts +2 -0
  117. package/dist/extensions/Highlight.test.d.ts.map +1 -0
  118. package/dist/extensions/History.d.ts +22 -0
  119. package/dist/extensions/History.d.ts.map +1 -0
  120. package/dist/extensions/History.test.d.ts +2 -0
  121. package/dist/extensions/History.test.d.ts.map +1 -0
  122. package/dist/extensions/InvisibleChars.d.ts +86 -0
  123. package/dist/extensions/InvisibleChars.d.ts.map +1 -0
  124. package/dist/extensions/InvisibleChars.test.d.ts +2 -0
  125. package/dist/extensions/InvisibleChars.test.d.ts.map +1 -0
  126. package/dist/extensions/LineHeight.d.ts +50 -0
  127. package/dist/extensions/LineHeight.d.ts.map +1 -0
  128. package/dist/extensions/LineHeight.test.d.ts +2 -0
  129. package/dist/extensions/LineHeight.test.d.ts.map +1 -0
  130. package/dist/extensions/LinkPopover.d.ts +10 -0
  131. package/dist/extensions/LinkPopover.d.ts.map +1 -0
  132. package/dist/extensions/ListKeymap.d.ts +10 -0
  133. package/dist/extensions/ListKeymap.d.ts.map +1 -0
  134. package/dist/extensions/ListKeymap.test.d.ts +2 -0
  135. package/dist/extensions/ListKeymap.test.d.ts.map +1 -0
  136. package/dist/extensions/Placeholder.d.ts +47 -0
  137. package/dist/extensions/Placeholder.d.ts.map +1 -0
  138. package/dist/extensions/Placeholder.test.d.ts +2 -0
  139. package/dist/extensions/Placeholder.test.d.ts.map +1 -0
  140. package/dist/extensions/Selection.d.ts +71 -0
  141. package/dist/extensions/Selection.d.ts.map +1 -0
  142. package/dist/extensions/Selection.test.d.ts +2 -0
  143. package/dist/extensions/Selection.test.d.ts.map +1 -0
  144. package/dist/extensions/SelectionDecoration.d.ts +18 -0
  145. package/dist/extensions/SelectionDecoration.d.ts.map +1 -0
  146. package/dist/extensions/SelectionDecoration.test.d.ts +2 -0
  147. package/dist/extensions/SelectionDecoration.test.d.ts.map +1 -0
  148. package/dist/extensions/StarterKit.d.ts +138 -0
  149. package/dist/extensions/StarterKit.d.ts.map +1 -0
  150. package/dist/extensions/StarterKit.test.d.ts +2 -0
  151. package/dist/extensions/StarterKit.test.d.ts.map +1 -0
  152. package/dist/extensions/TextAlign.d.ts +32 -0
  153. package/dist/extensions/TextAlign.d.ts.map +1 -0
  154. package/dist/extensions/TextAlign.test.d.ts +2 -0
  155. package/dist/extensions/TextAlign.test.d.ts.map +1 -0
  156. package/dist/extensions/TextColor.d.ts +55 -0
  157. package/dist/extensions/TextColor.d.ts.map +1 -0
  158. package/dist/extensions/TextColor.test.d.ts +2 -0
  159. package/dist/extensions/TextColor.test.d.ts.map +1 -0
  160. package/dist/extensions/TrailingNode.d.ts +16 -0
  161. package/dist/extensions/TrailingNode.d.ts.map +1 -0
  162. package/dist/extensions/TrailingNode.test.d.ts +2 -0
  163. package/dist/extensions/TrailingNode.test.d.ts.map +1 -0
  164. package/dist/extensions/Typography.d.ts +65 -0
  165. package/dist/extensions/Typography.d.ts.map +1 -0
  166. package/dist/extensions/Typography.test.d.ts +2 -0
  167. package/dist/extensions/Typography.test.d.ts.map +1 -0
  168. package/dist/extensions/UniqueID.d.ts +48 -0
  169. package/dist/extensions/UniqueID.d.ts.map +1 -0
  170. package/dist/extensions/UniqueID.test.d.ts +2 -0
  171. package/dist/extensions/UniqueID.test.d.ts.map +1 -0
  172. package/dist/extensions/index.d.ts +29 -0
  173. package/dist/extensions/index.d.ts.map +1 -0
  174. package/dist/extensions/isActive-markExclusion.test.d.ts +2 -0
  175. package/dist/extensions/isActive-markExclusion.test.d.ts.map +1 -0
  176. package/dist/helpers/callOrReturn.d.ts +30 -0
  177. package/dist/helpers/callOrReturn.d.ts.map +1 -0
  178. package/dist/helpers/callOrReturn.test.d.ts +2 -0
  179. package/dist/helpers/callOrReturn.test.d.ts.map +1 -0
  180. package/dist/helpers/createDocument.d.ts +48 -0
  181. package/dist/helpers/createDocument.d.ts.map +1 -0
  182. package/dist/helpers/createDocument.test.d.ts +2 -0
  183. package/dist/helpers/createDocument.test.d.ts.map +1 -0
  184. package/dist/helpers/defaultBlockAt.d.ts +15 -0
  185. package/dist/helpers/defaultBlockAt.d.ts.map +1 -0
  186. package/dist/helpers/defaultBlockAt.test.d.ts +2 -0
  187. package/dist/helpers/defaultBlockAt.test.d.ts.map +1 -0
  188. package/dist/helpers/findChildren.d.ts +13 -0
  189. package/dist/helpers/findChildren.d.ts.map +1 -0
  190. package/dist/helpers/findChildren.test.d.ts +2 -0
  191. package/dist/helpers/findChildren.test.d.ts.map +1 -0
  192. package/dist/helpers/findParentNode.d.ts +21 -0
  193. package/dist/helpers/findParentNode.d.ts.map +1 -0
  194. package/dist/helpers/findParentNode.test.d.ts +2 -0
  195. package/dist/helpers/findParentNode.test.d.ts.map +1 -0
  196. package/dist/helpers/getMarkRange.d.ts +17 -0
  197. package/dist/helpers/getMarkRange.d.ts.map +1 -0
  198. package/dist/helpers/getMarkRange.test.d.ts +2 -0
  199. package/dist/helpers/getMarkRange.test.d.ts.map +1 -0
  200. package/dist/helpers/index.d.ts +18 -0
  201. package/dist/helpers/index.d.ts.map +1 -0
  202. package/dist/helpers/inputRulesPlugin.d.ts +26 -0
  203. package/dist/helpers/isNodeEmpty.d.ts +52 -0
  204. package/dist/helpers/isNodeEmpty.d.ts.map +1 -0
  205. package/dist/helpers/isNodeEmpty.test.d.ts +2 -0
  206. package/dist/helpers/isNodeEmpty.test.d.ts.map +1 -0
  207. package/dist/helpers/isValidUrl.d.ts +31 -0
  208. package/dist/helpers/isValidUrl.d.ts.map +1 -0
  209. package/dist/helpers/isValidUrl.test.d.ts +2 -0
  210. package/dist/helpers/isValidUrl.test.d.ts.map +1 -0
  211. package/dist/helpers/markInputRule.d.ts +88 -0
  212. package/dist/helpers/markInputRule.d.ts.map +1 -0
  213. package/dist/helpers/markInputRule.test.d.ts +2 -0
  214. package/dist/helpers/markInputRule.test.d.ts.map +1 -0
  215. package/dist/helpers/nodeInputRule.d.ts +41 -0
  216. package/dist/helpers/nodeInputRule.d.ts.map +1 -0
  217. package/dist/helpers/normalizeColor.d.ts +7 -0
  218. package/dist/helpers/normalizeColor.d.ts.map +1 -0
  219. package/dist/helpers/normalizeColor.test.d.ts +2 -0
  220. package/dist/helpers/normalizeColor.test.d.ts.map +1 -0
  221. package/dist/helpers/specBuilder.d.ts +28 -0
  222. package/dist/helpers/specBuilder.d.ts.map +1 -0
  223. package/dist/helpers/specBuilder.test.d.ts +2 -0
  224. package/dist/helpers/specBuilder.test.d.ts.map +1 -0
  225. package/dist/helpers/ssr.d.ts +80 -0
  226. package/dist/helpers/ssr.d.ts.map +1 -0
  227. package/dist/helpers/ssr.test.d.ts +2 -0
  228. package/dist/helpers/ssr.test.d.ts.map +1 -0
  229. package/dist/helpers/textInputRule.d.ts +34 -0
  230. package/dist/helpers/textInputRule.d.ts.map +1 -0
  231. package/dist/helpers/textblockTypeInputRule.d.ts +41 -0
  232. package/dist/helpers/textblockTypeInputRule.d.ts.map +1 -0
  233. package/dist/helpers/wrappingInputRule.d.ts +66 -0
  234. package/dist/helpers/wrappingInputRule.d.ts.map +1 -0
  235. package/dist/icons/index.d.ts +2 -0
  236. package/dist/icons/index.d.ts.map +1 -0
  237. package/dist/icons/phosphor.d.ts +3 -0
  238. package/dist/icons/phosphor.d.ts.map +1 -0
  239. package/dist/index.cjs +20 -12
  240. package/dist/index.cjs.map +1 -1
  241. package/dist/index.d.cts +823 -794
  242. package/dist/index.d.ts +23 -5803
  243. package/dist/index.d.ts.map +1 -0
  244. package/dist/index.js +20 -12
  245. package/dist/index.js.map +1 -1
  246. package/dist/index.test.d.ts +2 -0
  247. package/dist/index.test.d.ts.map +1 -0
  248. package/dist/marks/Bold.d.ts +40 -0
  249. package/dist/marks/Bold.d.ts.map +1 -0
  250. package/dist/marks/Bold.test.d.ts +2 -0
  251. package/dist/marks/Bold.test.d.ts.map +1 -0
  252. package/dist/marks/Code.d.ts +40 -0
  253. package/dist/marks/Code.d.ts.map +1 -0
  254. package/dist/marks/Code.test.d.ts +2 -0
  255. package/dist/marks/Code.test.d.ts.map +1 -0
  256. package/dist/marks/Italic.d.ts +40 -0
  257. package/dist/marks/Italic.d.ts.map +1 -0
  258. package/dist/marks/Italic.test.d.ts +2 -0
  259. package/dist/marks/Italic.test.d.ts.map +1 -0
  260. package/dist/marks/Link.d.ts +75 -0
  261. package/dist/marks/Link.d.ts.map +1 -0
  262. package/dist/marks/Link.test.d.ts +2 -0
  263. package/dist/marks/Link.test.d.ts.map +1 -0
  264. package/dist/marks/Strike.d.ts +39 -0
  265. package/dist/marks/Strike.d.ts.map +1 -0
  266. package/dist/marks/Strike.test.d.ts +2 -0
  267. package/dist/marks/Strike.test.d.ts.map +1 -0
  268. package/dist/marks/Subscript.d.ts +38 -0
  269. package/dist/marks/Subscript.d.ts.map +1 -0
  270. package/dist/marks/Subscript.test.d.ts +2 -0
  271. package/dist/marks/Subscript.test.d.ts.map +1 -0
  272. package/dist/marks/Superscript.d.ts +38 -0
  273. package/dist/marks/Superscript.d.ts.map +1 -0
  274. package/dist/marks/Superscript.test.d.ts +2 -0
  275. package/dist/marks/Superscript.test.d.ts.map +1 -0
  276. package/dist/marks/TextStyle.d.ts +41 -0
  277. package/dist/marks/TextStyle.d.ts.map +1 -0
  278. package/dist/marks/TextStyle.test.d.ts +2 -0
  279. package/dist/marks/TextStyle.test.d.ts.map +1 -0
  280. package/dist/marks/Underline.d.ts +38 -0
  281. package/dist/marks/Underline.d.ts.map +1 -0
  282. package/dist/marks/Underline.test.d.ts +2 -0
  283. package/dist/marks/Underline.test.d.ts.map +1 -0
  284. package/dist/marks/helpers/autolinkPlugin.d.ts +48 -0
  285. package/dist/marks/helpers/autolinkPlugin.d.ts.map +1 -0
  286. package/dist/marks/helpers/autolinkPlugin.test.d.ts +2 -0
  287. package/dist/marks/helpers/autolinkPlugin.test.d.ts.map +1 -0
  288. package/dist/marks/helpers/index.d.ts +10 -0
  289. package/dist/marks/helpers/index.d.ts.map +1 -0
  290. package/dist/marks/helpers/linkClickPlugin.d.ts +43 -0
  291. package/dist/marks/helpers/linkClickPlugin.d.ts.map +1 -0
  292. package/dist/marks/helpers/linkClickPlugin.test.d.ts +2 -0
  293. package/dist/marks/helpers/linkClickPlugin.test.d.ts.map +1 -0
  294. package/dist/marks/helpers/linkExitPlugin.d.ts +37 -0
  295. package/dist/marks/helpers/linkExitPlugin.d.ts.map +1 -0
  296. package/dist/marks/helpers/linkExitPlugin.test.d.ts +2 -0
  297. package/dist/marks/helpers/linkExitPlugin.test.d.ts.map +1 -0
  298. package/dist/marks/helpers/linkPastePlugin.d.ts +44 -0
  299. package/dist/marks/helpers/linkPastePlugin.d.ts.map +1 -0
  300. package/dist/marks/helpers/linkPastePlugin.test.d.ts +2 -0
  301. package/dist/marks/helpers/linkPastePlugin.test.d.ts.map +1 -0
  302. package/dist/marks/index.d.ts +16 -0
  303. package/dist/marks/index.d.ts.map +1 -0
  304. package/dist/nodes/Blockquote.d.ts +19 -0
  305. package/dist/nodes/Blockquote.d.ts.map +1 -0
  306. package/dist/nodes/Blockquote.test.d.ts +2 -0
  307. package/dist/nodes/Blockquote.test.d.ts.map +1 -0
  308. package/dist/nodes/BulletList.d.ts +18 -0
  309. package/dist/nodes/BulletList.d.ts.map +1 -0
  310. package/dist/nodes/BulletList.test.d.ts +2 -0
  311. package/dist/nodes/BulletList.test.d.ts.map +1 -0
  312. package/dist/nodes/CodeBlock.d.ts +29 -0
  313. package/dist/nodes/CodeBlock.d.ts.map +1 -0
  314. package/dist/nodes/CodeBlock.test.d.ts +2 -0
  315. package/dist/nodes/CodeBlock.test.d.ts.map +1 -0
  316. package/dist/nodes/Document.d.ts +9 -0
  317. package/dist/nodes/Document.d.ts.map +1 -0
  318. package/dist/nodes/Document.test.d.ts +2 -0
  319. package/dist/nodes/Document.test.d.ts.map +1 -0
  320. package/dist/nodes/HardBreak.d.ts +18 -0
  321. package/dist/nodes/HardBreak.d.ts.map +1 -0
  322. package/dist/nodes/HardBreak.test.d.ts +2 -0
  323. package/dist/nodes/HardBreak.test.d.ts.map +1 -0
  324. package/dist/nodes/Heading.d.ts +23 -0
  325. package/dist/nodes/Heading.d.ts.map +1 -0
  326. package/dist/nodes/Heading.test.d.ts +2 -0
  327. package/dist/nodes/Heading.test.d.ts.map +1 -0
  328. package/dist/nodes/HorizontalRule.d.ts +17 -0
  329. package/dist/nodes/HorizontalRule.test.d.ts +2 -0
  330. package/dist/nodes/HorizontalRule.test.d.ts.map +1 -0
  331. package/dist/nodes/ListItem.d.ts +16 -0
  332. package/dist/nodes/ListItem.d.ts.map +1 -0
  333. package/dist/nodes/ListItem.test.d.ts +2 -0
  334. package/dist/nodes/ListItem.test.d.ts.map +1 -0
  335. package/dist/nodes/OrderedList.d.ts +18 -0
  336. package/dist/nodes/OrderedList.d.ts.map +1 -0
  337. package/dist/nodes/OrderedList.test.d.ts +2 -0
  338. package/dist/nodes/OrderedList.test.d.ts.map +1 -0
  339. package/dist/nodes/Paragraph.d.ts +17 -0
  340. package/dist/nodes/Paragraph.d.ts.map +1 -0
  341. package/dist/nodes/Paragraph.test.d.ts +2 -0
  342. package/dist/nodes/Paragraph.test.d.ts.map +1 -0
  343. package/dist/nodes/TaskItem.d.ts +24 -0
  344. package/dist/nodes/TaskItem.d.ts.map +1 -0
  345. package/dist/nodes/TaskItem.test.d.ts +2 -0
  346. package/dist/nodes/TaskItem.test.d.ts.map +1 -0
  347. package/dist/nodes/TaskList.d.ts +18 -0
  348. package/dist/nodes/TaskList.d.ts.map +1 -0
  349. package/dist/nodes/TaskList.test.d.ts +2 -0
  350. package/dist/nodes/TaskList.test.d.ts.map +1 -0
  351. package/dist/nodes/Text.d.ts +9 -0
  352. package/dist/nodes/Text.d.ts.map +1 -0
  353. package/dist/nodes/Text.test.d.ts +2 -0
  354. package/dist/nodes/Text.test.d.ts.map +1 -0
  355. package/dist/nodes/index.d.ts +19 -0
  356. package/dist/nodes/index.d.ts.map +1 -0
  357. package/dist/nodes/integration.test.d.ts +7 -0
  358. package/dist/nodes/integration.test.d.ts.map +1 -0
  359. package/dist/types/AttributeSpec.d.ts +78 -0
  360. package/dist/types/AttributeSpec.d.ts.map +1 -0
  361. package/dist/types/Commands.d.ts +125 -0
  362. package/dist/types/Commands.d.ts.map +1 -0
  363. package/dist/types/Content.d.ts +40 -0
  364. package/dist/types/Content.d.ts.map +1 -0
  365. package/dist/types/EditorEvents.d.ts +131 -0
  366. package/dist/types/EditorEvents.d.ts.map +1 -0
  367. package/dist/types/EditorOptions.d.ts +133 -0
  368. package/dist/types/EditorOptions.d.ts.map +1 -0
  369. package/dist/types/ExtensionConfig.d.ts +271 -0
  370. package/dist/types/ExtensionConfig.d.ts.map +1 -0
  371. package/dist/types/MarkConfig.d.ts +206 -0
  372. package/dist/types/MarkConfig.d.ts.map +1 -0
  373. package/dist/types/NodeConfig.d.ts +263 -0
  374. package/dist/types/NodeConfig.d.ts.map +1 -0
  375. package/dist/types/Toolbar.d.ts +172 -0
  376. package/dist/types/Toolbar.d.ts.map +1 -0
  377. package/dist/types/index.d.ts +13 -0
  378. package/dist/types/index.d.ts.map +1 -0
  379. package/dist/utils/inlineStyles.d.ts +83 -0
  380. package/dist/utils/inlineStyles.d.ts.map +1 -0
  381. package/dist/utils/inlineStyles.test.d.ts +2 -0
  382. package/dist/utils/inlineStyles.test.d.ts.map +1 -0
  383. package/dist/utils/positionFloating.d.ts +74 -0
  384. package/dist/utils/positionFloating.d.ts.map +1 -0
  385. package/package.json +2 -2
@@ -0,0 +1,52 @@
1
+ import type { CommandSpec } from '../types/Commands.js';
2
+ import type { Content } from '../types/index.js';
3
+ /**
4
+ * Options for setContent command
5
+ */
6
+ export interface SetContentOptions {
7
+ /**
8
+ * Emit update event after setting content
9
+ * @default true
10
+ */
11
+ emitUpdate?: boolean;
12
+ /**
13
+ * Parse options for HTML content
14
+ */
15
+ parseOptions?: Record<string, unknown>;
16
+ }
17
+ /**
18
+ * Options for clearContent command
19
+ */
20
+ export interface ClearContentOptions {
21
+ /**
22
+ * Emit update event after clearing content
23
+ * @default true
24
+ */
25
+ emitUpdate?: boolean;
26
+ }
27
+ /**
28
+ * SetContent command - sets the editor content
29
+ *
30
+ * @param content - JSON or HTML content
31
+ * @param options - Options for setting content
32
+ */
33
+ export declare const setContent: CommandSpec<[content: Content, options?: SetContentOptions]>;
34
+ /**
35
+ * ClearContent command - clears the editor content to empty state
36
+ *
37
+ * @param options - Options for clearing content
38
+ */
39
+ export declare const clearContent: CommandSpec<[options?: ClearContentOptions]>;
40
+ /**
41
+ * InsertText command - inserts text at the current selection
42
+ *
43
+ * @param text - Text to insert
44
+ */
45
+ export declare const insertText: CommandSpec<[text: string]>;
46
+ /**
47
+ * InsertContent command - inserts content at the current selection
48
+ *
49
+ * @param content - The content to insert (JSON object, array, or HTML string)
50
+ */
51
+ export declare const insertContent: CommandSpec<[content: Content]>;
52
+ //# sourceMappingURL=contentCommands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contentCommands.d.ts","sourceRoot":"","sources":["../../src/commands/contentCommands.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAGjD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,iBAAiB,CAAC,CAgCjF,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC,CAyBnE,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAsBhD,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CA8CvD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=contentCommands.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contentCommands.test.d.ts","sourceRoot":"","sources":["../../src/commands/contentCommands.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Built-in commands for @domternal/core
3
+ *
4
+ * Re-exports from domain-specific command files and assembles the
5
+ * builtInCommands map consumed by CommandManager.
6
+ */
7
+ import type { CommandMap } from '../types/Commands.js';
8
+ export { focus, blur, selectAll, selectNodeBackward, deleteSelection, } from './selectionCommands.js';
9
+ export { setContent, clearContent, insertText, insertContent, type SetContentOptions, type ClearContentOptions, } from './contentCommands.js';
10
+ export { toggleMark, setMark, unsetMark, unsetAllMarks, } from './markCommands.js';
11
+ export { setBlockType, toggleBlockType, wrapIn, toggleWrap, lift, } from './nodeCommands.js';
12
+ export { toggleList } from './listCommands.js';
13
+ export { updateAttributes, resetAttributes, } from './attributeCommands.js';
14
+ export declare const builtInCommands: CommandMap;
15
+ import type { Attrs } from '@domternal/pm/model';
16
+ import type { FocusPosition, Content } from '../types/index.js';
17
+ import type { SetContentOptions, ClearContentOptions } from './contentCommands.js';
18
+ declare module '../types/Commands.js' {
19
+ interface RawCommands {
20
+ focus: CommandSpec<[position?: FocusPosition]>;
21
+ blur: CommandSpec;
22
+ setContent: CommandSpec<[content: Content, options?: SetContentOptions]>;
23
+ clearContent: CommandSpec<[options?: ClearContentOptions]>;
24
+ insertText: CommandSpec<[text: string]>;
25
+ deleteSelection: CommandSpec;
26
+ selectAll: CommandSpec;
27
+ toggleMark: CommandSpec<[markName: string, attributes?: Attrs]>;
28
+ setMark: CommandSpec<[markName: string, attributes?: Attrs]>;
29
+ unsetMark: CommandSpec<[markName: string]>;
30
+ unsetAllMarks: CommandSpec;
31
+ setBlockType: CommandSpec<[nodeName: string, attributes?: Attrs]>;
32
+ toggleBlockType: CommandSpec<[nodeName: string, defaultNodeName: string, attributes?: Attrs]>;
33
+ wrapIn: CommandSpec<[nodeName: string, attributes?: Attrs]>;
34
+ toggleWrap: CommandSpec<[nodeName: string, attributes?: Attrs]>;
35
+ lift: CommandSpec;
36
+ toggleList: CommandSpec<[listNodeName: string, listItemNodeName: string, attributes?: Attrs]>;
37
+ insertContent: CommandSpec<[content: Content]>;
38
+ selectNodeBackward: CommandSpec;
39
+ updateAttributes: CommandSpec<[typeOrName: string, attributes: Record<string, unknown>]>;
40
+ resetAttributes: CommandSpec<[typeOrName: string, attributeName: string]>;
41
+ }
42
+ }
43
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,15 @@
1
+ import type { Attrs } from '@domternal/pm/model';
2
+ import type { CommandSpec } from '../types/Commands.js';
3
+ /**
4
+ * ToggleList command - toggles a list type on the current selection
5
+ *
6
+ * If the selection is not in a list, wraps it in the specified list type.
7
+ * If it's in the same list type, lifts the list items out.
8
+ * If it's in a different list type, converts to the new list type in-place.
9
+ *
10
+ * @param listNodeName - The name of the list node type (e.g., 'bulletList', 'orderedList')
11
+ * @param listItemNodeName - The name of the list item node type (usually 'listItem')
12
+ * @param attributes - Optional attributes for the list node
13
+ */
14
+ export declare const toggleList: CommandSpec<[listNodeName: string, listItemNodeName: string, attributes?: Attrs]>;
15
+ //# sourceMappingURL=listCommands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listCommands.d.ts","sourceRoot":"","sources":["../../src/commands/listCommands.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAA4B,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAsCxD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,CAAC,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK,CAAC,CAmQtG,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=listCommands.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listCommands.test.d.ts","sourceRoot":"","sources":["../../src/commands/listCommands.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Mark commands — toggleMark, setMark, unsetMark, unsetAllMarks
3
+ */
4
+ import type { Attrs } from '@domternal/pm/model';
5
+ import type { CommandSpec } from '../types/Commands.js';
6
+ /**
7
+ * ToggleMark command - toggles a mark on the current selection
8
+ *
9
+ * In cursor mode (empty selection): toggles stored mark.
10
+ * In range mode: applies/removes mark across the entire selection,
11
+ * respecting CellSelection ranges.
12
+ *
13
+ * @param markName - The name of the mark to toggle
14
+ * @param attributes - Optional attributes for the mark
15
+ */
16
+ export declare const toggleMark: CommandSpec<[markName: string, attributes?: Attrs]>;
17
+ /**
18
+ * SetMark command - adds a mark to the current selection
19
+ *
20
+ * @param markName - The name of the mark to set
21
+ * @param attributes - Optional attributes for the mark
22
+ */
23
+ export declare const setMark: CommandSpec<[markName: string, attributes?: Attrs]>;
24
+ /**
25
+ * UnsetMark command - removes a mark from the current selection
26
+ *
27
+ * @param markName - The name of the mark to remove
28
+ */
29
+ export declare const unsetMark: CommandSpec<[markName: string]>;
30
+ /**
31
+ * UnsetAllMarks command - removes all formatting marks from the current selection
32
+ *
33
+ * Iterates over all mark types in the schema and removes those with
34
+ * `isFormatting !== false`. Marks like Link that set `isFormatting: false`
35
+ * are preserved.
36
+ *
37
+ * Returns false for empty selections (no range to clear).
38
+ */
39
+ export declare const unsetAllMarks: CommandSpec;
40
+ //# sourceMappingURL=markCommands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markCommands.d.ts","sourceRoot":"","sources":["../../src/commands/markCommands.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAY,MAAM,qBAAqB,CAAC;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAsDxD;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK,CAAC,CA+CxE,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,OAAO,EAAE,WAAW,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK,CAAC,CA8ErE,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CA+BnD,CAAC;AAEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,EAAE,WA4BzB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=markCommands.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markCommands.test.d.ts","sourceRoot":"","sources":["../../src/commands/markCommands.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,53 @@
1
+ import type { Attrs } from '@domternal/pm/model';
2
+ import type { CommandSpec } from '../types/Commands.js';
3
+ /**
4
+ * SetBlockType command - changes the block type of the selection
5
+ *
6
+ * Uses tr.doc/tr.selection for chain compatibility. Preserves global
7
+ * attributes (textAlign, lineHeight, etc.) by merging existing node
8
+ * attrs with the provided ones via tr.setBlockType's function form.
9
+ *
10
+ * @param nodeName - The name of the node type to set
11
+ * @param attributes - Optional attributes for the node
12
+ */
13
+ export declare const setBlockType: CommandSpec<[nodeName: string, attributes?: Attrs]>;
14
+ /**
15
+ * ToggleBlockType command - toggles between a block type and a default type
16
+ *
17
+ * If the current block is of the target type, changes it to the default type.
18
+ * If the current block is not of the target type, changes it to the target type.
19
+ * Preserves global attributes (textAlign, lineHeight) on toggle.
20
+ *
21
+ * @param nodeName - The name of the node type to toggle to
22
+ * @param defaultNodeName - The name of the default node type (usually 'paragraph')
23
+ * @param attributes - Optional attributes for the node
24
+ */
25
+ export declare const toggleBlockType: CommandSpec<[nodeName: string, defaultNodeName: string, attributes?: Attrs]>;
26
+ /**
27
+ * WrapIn command - wraps the selection in a node type
28
+ *
29
+ * Uses tr.doc/tr.selection for chain compatibility.
30
+ *
31
+ * @param nodeName - The name of the wrapping node type
32
+ * @param attributes - Optional attributes for the node
33
+ */
34
+ export declare const wrapIn: CommandSpec<[nodeName: string, attributes?: Attrs]>;
35
+ /**
36
+ * ToggleWrap command - toggles wrapping of the selection in a node type
37
+ *
38
+ * If the selection is already wrapped in the node type, lifts it out.
39
+ * Otherwise, wraps the selection in the node type.
40
+ * Uses tr.doc/tr.selection for chain compatibility.
41
+ *
42
+ * @param nodeName - The name of the wrapping node type
43
+ * @param attributes - Optional attributes for the node
44
+ */
45
+ export declare const toggleWrap: CommandSpec<[nodeName: string, attributes?: Attrs]>;
46
+ /**
47
+ * Lift command - lifts the current block out of its parent wrapper
48
+ *
49
+ * Uses tr.doc/tr.selection for chain compatibility.
50
+ * For example, lifts a paragraph out of a blockquote.
51
+ */
52
+ export declare const lift: CommandSpec;
53
+ //# sourceMappingURL=nodeCommands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeCommands.d.ts","sourceRoot":"","sources":["../../src/commands/nodeCommands.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAkB,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK,CAAC,CAyC1E,CAAC;AAEJ;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK,CAAC,CAqCtG,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,EAAE,WAAW,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK,CAAC,CAoBpE,CAAC;AAEJ;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK,CAAC,CAuFxE,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,IAAI,EAAE,WAsChB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=nodeCommands.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeCommands.test.d.ts","sourceRoot":"","sources":["../../src/commands/nodeCommands.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,37 @@
1
+ import type { CommandSpec } from '../types/Commands.js';
2
+ import type { FocusPosition } from '../types/index.js';
3
+ /**
4
+ * Focus command - focuses the editor at the specified position
5
+ *
6
+ * @param position - Where to place the cursor
7
+ * - true/'end': End of document
8
+ * - 'start': Start of document
9
+ * - 'all': Select all content
10
+ * - number: Specific position
11
+ * - null/false: Just focus without changing selection
12
+ */
13
+ export declare const focus: CommandSpec<[position?: FocusPosition]>;
14
+ /**
15
+ * Blur command - removes focus from the editor
16
+ */
17
+ export declare const blur: CommandSpec;
18
+ /**
19
+ * SelectAll command - selects all content in the editor
20
+ *
21
+ * Uses AllSelection to select the entire document.
22
+ * Uses tr.doc to support chain context.
23
+ */
24
+ export declare const selectAll: CommandSpec;
25
+ /**
26
+ * SelectNodeBackward command - selects the node before the cursor
27
+ *
28
+ * When the cursor is at the start of a textblock, this selects the node before it.
29
+ */
30
+ export declare const selectNodeBackward: CommandSpec;
31
+ /**
32
+ * DeleteSelection command - deletes the current selection
33
+ *
34
+ * Uses tr.selection to support chain context.
35
+ */
36
+ export declare const deleteSelection: CommandSpec;
37
+ //# sourceMappingURL=selectionCommands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectionCommands.d.ts","sourceRoot":"","sources":["../../src/commands/selectionCommands.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAmCvD;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,CAqCvD,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,WAYhB,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,SAAS,EAAE,WAUrB,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAI9B,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,WAgB3B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=selectionCommands.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectionCommands.test.d.ts","sourceRoot":"","sources":["../../src/commands/selectionCommands.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * BaseKeymap Extension
3
+ *
4
+ * Adds essential keyboard shortcuts for basic editing operations.
5
+ * This includes Enter (new paragraph), Backspace, Delete, and other
6
+ * fundamental editing commands from ProseMirror's baseKeymap.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import { BaseKeymap } from '@domternal/core';
11
+ *
12
+ * const editor = new Editor({
13
+ * extensions: [Document, Paragraph, Text, BaseKeymap],
14
+ * });
15
+ * ```
16
+ *
17
+ * ## Included Shortcuts
18
+ * - Enter: Create new paragraph / split block
19
+ * - Backspace: Delete backward
20
+ * - Delete: Delete forward
21
+ * - Mod-Backspace: Delete to start of line
22
+ * - Mod-Delete: Delete to end of line
23
+ * - Alt-ArrowUp/Down: Join with block above/below
24
+ * - Mod-a: Select all
25
+ * - And more standard editing commands
26
+ */
27
+ import { Extension } from '../Extension.js';
28
+ export interface BaseKeymapOptions {
29
+ /**
30
+ * Whether to include the default Enter behavior.
31
+ * @default true
32
+ */
33
+ enter: boolean;
34
+ }
35
+ export declare const BaseKeymap: Extension<BaseKeymapOptions, unknown>;
36
+ //# sourceMappingURL=BaseKeymap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseKeymap.d.ts","sourceRoot":"","sources":["../../src/extensions/BaseKeymap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAY5C,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,EAAE,OAAO,CAAC;CAChB;AAUD,eAAO,MAAM,UAAU,uCAmBrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=BaseKeymap.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseKeymap.test.d.ts","sourceRoot":"","sources":["../../src/extensions/BaseKeymap.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * BubbleMenu Extension
3
+ *
4
+ * Shows a floating menu when text is selected in the editor.
5
+ * Useful for formatting toolbars that appear contextually.
6
+ *
7
+ * Styles are included automatically via `@domternal/theme` (`_bubble-menu.scss`).
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * import { BubbleMenu } from '@domternal/core';
12
+ *
13
+ * // Create menu element
14
+ * const menuElement = document.getElementById('bubble-menu');
15
+ *
16
+ * const editor = new Editor({
17
+ * extensions: [
18
+ * // ... other extensions
19
+ * BubbleMenu.configure({
20
+ * element: menuElement,
21
+ * shouldShow: ({ editor, state, from, to }) => {
22
+ * // Only show for text selections
23
+ * return !state.selection.empty;
24
+ * },
25
+ * }),
26
+ * ],
27
+ * });
28
+ * ```
29
+ */
30
+ import { Extension } from '../Extension.js';
31
+ import { Plugin, PluginKey } from '@domternal/pm/state';
32
+ import type { EditorView } from '@domternal/pm/view';
33
+ import type { EditorState } from '@domternal/pm/state';
34
+ import type { Editor } from '../Editor.js';
35
+ export declare const bubbleMenuPluginKey: PluginKey<any>;
36
+ export interface BubbleMenuOptions {
37
+ /**
38
+ * The HTML element that contains the menu.
39
+ * Must be provided by the user.
40
+ */
41
+ element: HTMLElement | null;
42
+ /**
43
+ * Duration in ms to wait before showing the menu.
44
+ * @default 0
45
+ */
46
+ updateDelay: number;
47
+ /**
48
+ * Function to determine if the menu should be shown.
49
+ * By default, shows for text selections with actual content in an editable editor.
50
+ */
51
+ shouldShow: (props: {
52
+ editor: Editor;
53
+ view: EditorView;
54
+ state: EditorState;
55
+ from: number;
56
+ to: number;
57
+ }) => boolean;
58
+ /**
59
+ * Placement of the menu relative to the selection.
60
+ * @default 'top'
61
+ */
62
+ placement: 'top' | 'bottom';
63
+ /**
64
+ * Offset in pixels from the selection.
65
+ * @default 8
66
+ */
67
+ offset: number;
68
+ }
69
+ export interface CreateBubbleMenuPluginOptions {
70
+ pluginKey: PluginKey;
71
+ editor: Editor;
72
+ element: HTMLElement;
73
+ shouldShow?: BubbleMenuOptions['shouldShow'];
74
+ placement?: 'top' | 'bottom';
75
+ offset?: number;
76
+ updateDelay?: number;
77
+ }
78
+ /**
79
+ * Creates a standalone BubbleMenu ProseMirror plugin.
80
+ * Can be used by framework wrappers (Angular, React, Vue) to create the plugin
81
+ * independently of the extension system.
82
+ */
83
+ export declare function createBubbleMenuPlugin(options: CreateBubbleMenuPluginOptions): Plugin;
84
+ export declare const BubbleMenu: Extension<BubbleMenuOptions, unknown>;
85
+ //# sourceMappingURL=BubbleMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BubbleMenu.d.ts","sourceRoot":"","sources":["../../src/extensions/BubbleMenu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAiB,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,eAAO,MAAM,mBAAmB,gBAA8B,CAAC;AAwC/D,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAE5B;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,UAAU,EAAE,CAAC,KAAK,EAAE;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,UAAU,CAAC;QACjB,KAAK,EAAE,WAAW,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;KACZ,KAAK,OAAO,CAAC;IAEd;;;OAGG;IACH,SAAS,EAAE,KAAK,GAAG,QAAQ,CAAC;IAE5B;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAQD,MAAM,WAAW,6BAA6B;IAC5C,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAC7C,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,6BAA6B,GAAG,MAAM,CAmRrF;AAED,eAAO,MAAM,UAAU,uCAsCrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=BubbleMenu.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BubbleMenu.test.d.ts","sourceRoot":"","sources":["../../src/extensions/BubbleMenu.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * CharacterCount Extension
3
+ *
4
+ * Provides character and word counting with optional limits.
5
+ * Access counts via editor.storage.characterCount.characters() and .words()
6
+ */
7
+ import { PluginKey } from '@domternal/pm/state';
8
+ import { Extension } from '../Extension.js';
9
+ export interface CharacterCountOptions {
10
+ /**
11
+ * Maximum number of characters allowed. Set to null for no limit.
12
+ * @default null
13
+ */
14
+ limit: number | null;
15
+ /**
16
+ * Maximum number of words allowed. Set to null for no limit.
17
+ * @default null
18
+ */
19
+ wordLimit: number | null;
20
+ /**
21
+ * How to count characters:
22
+ * - 'textSize': Count text characters only
23
+ * - 'nodeSize': Count ProseMirror node size (includes structural characters)
24
+ * @default 'textSize'
25
+ */
26
+ mode: 'textSize' | 'nodeSize';
27
+ }
28
+ export interface CharacterCountStorage {
29
+ /**
30
+ * Get current character count.
31
+ */
32
+ characters: () => number;
33
+ /**
34
+ * Get current word count.
35
+ */
36
+ words: () => number;
37
+ /**
38
+ * Get percentage of limit used (0-100). Returns 0 if no limit.
39
+ */
40
+ percentage: () => number;
41
+ /**
42
+ * Get remaining characters before limit. Returns Infinity if no limit.
43
+ */
44
+ remaining: () => number;
45
+ /**
46
+ * Get percentage of word limit used (0-100). Returns 0 if no word limit.
47
+ */
48
+ wordPercentage: () => number;
49
+ /**
50
+ * Get remaining words before limit. Returns Infinity if no word limit.
51
+ */
52
+ wordRemaining: () => number;
53
+ /**
54
+ * Check if limit is exceeded.
55
+ */
56
+ isLimitExceeded: () => boolean;
57
+ }
58
+ export declare const characterCountPluginKey: PluginKey<any>;
59
+ export declare const CharacterCount: Extension<CharacterCountOptions, CharacterCountStorage>;
60
+ //# sourceMappingURL=CharacterCount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CharacterCount.d.ts","sourceRoot":"","sources":["../../src/extensions/CharacterCount.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAU,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;OAGG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;;;;OAKG;IACH,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,UAAU,EAAE,MAAM,MAAM,CAAC;IAEzB;;OAEG;IACH,KAAK,EAAE,MAAM,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,MAAM,MAAM,CAAC;IAEzB;;OAEG;IACH,SAAS,EAAE,MAAM,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,EAAE,MAAM,MAAM,CAAC;IAE7B;;OAEG;IACH,aAAa,EAAE,MAAM,MAAM,CAAC;IAE5B;;OAEG;IACH,eAAe,EAAE,MAAM,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,uBAAuB,gBAAkC,CAAC;AAEvE,eAAO,MAAM,cAAc,yDAuHzB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=CharacterCount.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CharacterCount.test.d.ts","sourceRoot":"","sources":["../../src/extensions/CharacterCount.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * ClearFormatting Extension
3
+ *
4
+ * Adds a toolbar button that removes all formatting marks from the current
5
+ * selection. Marks with `isFormatting: false` (like Link) are preserved.
6
+ *
7
+ * Uses the built-in `unsetAllMarks` command.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * import { ClearFormatting } from '@domternal/core';
12
+ *
13
+ * const editor = new Editor({
14
+ * extensions: [
15
+ * // ... other extensions
16
+ * ClearFormatting,
17
+ * ],
18
+ * });
19
+ *
20
+ * editor.commands.unsetAllMarks(); // removes formatting marks from selection
21
+ * ```
22
+ */
23
+ import { Extension } from '../Extension.js';
24
+ export declare const ClearFormatting: Extension<unknown, unknown>;
25
+ //# sourceMappingURL=ClearFormatting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClearFormatting.d.ts","sourceRoot":"","sources":["../../src/extensions/ClearFormatting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,eAAO,MAAM,eAAe,6BAgB1B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ClearFormatting.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClearFormatting.test.d.ts","sourceRoot":"","sources":["../../src/extensions/ClearFormatting.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ import { Extension } from '../Extension.js';
2
+ export interface DropcursorOptions {
3
+ /**
4
+ * Color of the drop cursor line.
5
+ * @default 'currentColor'
6
+ */
7
+ color: string;
8
+ /**
9
+ * Width of the drop cursor line in pixels.
10
+ * @default 1
11
+ */
12
+ width: number;
13
+ /**
14
+ * CSS class to add to the drop cursor element.
15
+ * @default undefined
16
+ */
17
+ class?: string;
18
+ }
19
+ export declare const Dropcursor: Extension<DropcursorOptions, unknown>;
20
+ //# sourceMappingURL=Dropcursor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dropcursor.d.ts","sourceRoot":"","sources":["../../src/extensions/Dropcursor.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,UAAU,uCAmBrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Dropcursor.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dropcursor.test.d.ts","sourceRoot":"","sources":["../../src/extensions/Dropcursor.test.ts"],"names":[],"mappings":""}