@yoopta/editor 4.9.9 → 6.0.0-beta.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 (347) hide show
  1. package/README.md +12 -3
  2. package/dist/components/Block/Block.d.ts +3 -4
  3. package/dist/components/Block/Block.d.ts.map +1 -1
  4. package/dist/components/Block/hooks.d.ts +3 -1706
  5. package/dist/components/Block/hooks.d.ts.map +1 -1
  6. package/dist/components/Editor/render-blocks.d.ts +11 -0
  7. package/dist/components/Editor/render-blocks.d.ts.map +1 -0
  8. package/dist/components/Editor/{Editor.d.ts → render-editor.d.ts} +3 -3
  9. package/dist/components/Editor/render-editor.d.ts.map +1 -0
  10. package/dist/components/Editor/selection.d.ts +1 -1
  11. package/dist/components/Editor/selection.d.ts.map +1 -1
  12. package/dist/components/Editor/utils.d.ts +1 -1
  13. package/dist/components/Editor/utils.d.ts.map +1 -1
  14. package/dist/components/SelectionBox/SelectionBox.d.ts +1 -1
  15. package/dist/components/SelectionBox/SelectionBox.d.ts.map +1 -1
  16. package/dist/components/SelectionBox/hooks.d.ts +2 -2
  17. package/dist/components/SelectionBox/hooks.d.ts.map +1 -1
  18. package/dist/components/{TextLeaf/TextLeaf.d.ts → text-leaf/text-leaf.d.ts} +2 -2
  19. package/dist/components/text-leaf/text-leaf.d.ts.map +1 -0
  20. package/dist/contexts/YooptaContext/YooptaContext.d.ts +3 -3
  21. package/dist/contexts/YooptaContext/YooptaContext.d.ts.map +1 -1
  22. package/dist/editor/blocks/buildBlockData.d.ts +1 -1
  23. package/dist/editor/blocks/buildBlockData.d.ts.map +1 -1
  24. package/dist/editor/blocks/decreaseBlockDepth.d.ts +2 -2
  25. package/dist/editor/blocks/decreaseBlockDepth.d.ts.map +1 -1
  26. package/dist/editor/blocks/deleteBlock.d.ts +46 -15
  27. package/dist/editor/blocks/deleteBlock.d.ts.map +1 -1
  28. package/dist/editor/blocks/deleteBlock.test.d.ts +2 -0
  29. package/dist/editor/blocks/deleteBlock.test.d.ts.map +1 -0
  30. package/dist/editor/blocks/duplicateBlock.d.ts +45 -10
  31. package/dist/editor/blocks/duplicateBlock.d.ts.map +1 -1
  32. package/dist/editor/blocks/duplicateBlock.test.d.ts +2 -0
  33. package/dist/editor/blocks/duplicateBlock.test.d.ts.map +1 -0
  34. package/dist/editor/blocks/focusBlock.d.ts +1 -1
  35. package/dist/editor/blocks/focusBlock.d.ts.map +1 -1
  36. package/dist/editor/blocks/getBlock.d.ts +2 -2
  37. package/dist/editor/blocks/getBlock.d.ts.map +1 -1
  38. package/dist/editor/blocks/getBlockSlate.d.ts +2 -2
  39. package/dist/editor/blocks/getBlockSlate.d.ts.map +1 -1
  40. package/dist/editor/blocks/increaseBlockDepth.d.ts +1 -1
  41. package/dist/editor/blocks/increaseBlockDepth.d.ts.map +1 -1
  42. package/dist/editor/blocks/index.d.ts +9 -9
  43. package/dist/editor/blocks/index.d.ts.map +1 -1
  44. package/dist/editor/blocks/insertBlock.d.ts +28 -1
  45. package/dist/editor/blocks/insertBlock.d.ts.map +1 -1
  46. package/dist/editor/blocks/mergeBlock.d.ts +48 -2
  47. package/dist/editor/blocks/mergeBlock.d.ts.map +1 -1
  48. package/dist/editor/blocks/mergeBlock.test.d.ts +2 -0
  49. package/dist/editor/blocks/mergeBlock.test.d.ts.map +1 -0
  50. package/dist/editor/blocks/moveBlock.d.ts +1 -1
  51. package/dist/editor/blocks/moveBlock.d.ts.map +1 -1
  52. package/dist/editor/blocks/splitBlock.d.ts +51 -3
  53. package/dist/editor/blocks/splitBlock.d.ts.map +1 -1
  54. package/dist/editor/blocks/splitBlock.test.d.ts +2 -0
  55. package/dist/editor/blocks/splitBlock.test.d.ts.map +1 -0
  56. package/dist/editor/blocks/toggleBlock.d.ts +51 -5
  57. package/dist/editor/blocks/toggleBlock.d.ts.map +1 -1
  58. package/dist/editor/blocks/toggleBlock.test.d.ts +2 -0
  59. package/dist/editor/blocks/toggleBlock.test.d.ts.map +1 -0
  60. package/dist/editor/blocks/updateBlock.d.ts +1 -1
  61. package/dist/editor/blocks/updateBlock.d.ts.map +1 -1
  62. package/dist/editor/core/applyTransforms.d.ts +2 -2
  63. package/dist/editor/core/applyTransforms.d.ts.map +1 -1
  64. package/dist/editor/core/batchOperations.d.ts +1 -1
  65. package/dist/editor/core/batchOperations.d.ts.map +1 -1
  66. package/dist/editor/core/blur.d.ts +1 -1
  67. package/dist/editor/core/blur.d.ts.map +1 -1
  68. package/dist/editor/core/focus.d.ts +1 -1
  69. package/dist/editor/core/focus.d.ts.map +1 -1
  70. package/dist/editor/core/getEditorValue.d.ts +1 -1
  71. package/dist/editor/core/getEditorValue.d.ts.map +1 -1
  72. package/dist/editor/core/history.d.ts +4 -4
  73. package/dist/editor/core/history.d.ts.map +1 -1
  74. package/dist/editor/core/isEmpty.d.ts +1 -1
  75. package/dist/editor/core/isEmpty.d.ts.map +1 -1
  76. package/dist/editor/core/isFocused.d.ts +1 -1
  77. package/dist/editor/core/isFocused.d.ts.map +1 -1
  78. package/dist/editor/core/setEditorValue.d.ts +1 -1
  79. package/dist/editor/core/setEditorValue.d.ts.map +1 -1
  80. package/dist/editor/elements/create-element-structure.d.ts +150 -0
  81. package/dist/editor/elements/create-element-structure.d.ts.map +1 -0
  82. package/dist/editor/elements/create-element-structure.test.d.ts +2 -0
  83. package/dist/editor/elements/create-element-structure.test.d.ts.map +1 -0
  84. package/dist/editor/elements/deleteElement.d.ts +78 -7
  85. package/dist/editor/elements/deleteElement.d.ts.map +1 -1
  86. package/dist/editor/elements/getElement.d.ts +26 -4
  87. package/dist/editor/elements/getElement.d.ts.map +1 -1
  88. package/dist/editor/elements/getElement.test.d.ts +2 -0
  89. package/dist/editor/elements/getElement.test.d.ts.map +1 -0
  90. package/dist/editor/elements/getElementChildren.d.ts +20 -4
  91. package/dist/editor/elements/getElementChildren.d.ts.map +1 -1
  92. package/dist/editor/elements/getElementChildren.test.d.ts +2 -0
  93. package/dist/editor/elements/getElementChildren.test.d.ts.map +1 -0
  94. package/dist/editor/elements/getElementEntry.d.ts +26 -7
  95. package/dist/editor/elements/getElementEntry.d.ts.map +1 -1
  96. package/dist/editor/elements/getElementEntry.test.d.ts +2 -0
  97. package/dist/editor/elements/getElementEntry.test.d.ts.map +1 -0
  98. package/dist/editor/elements/getElementPath.d.ts +20 -3
  99. package/dist/editor/elements/getElementPath.d.ts.map +1 -1
  100. package/dist/editor/elements/getElementPath.test.d.ts +2 -0
  101. package/dist/editor/elements/getElementPath.test.d.ts.map +1 -0
  102. package/dist/editor/elements/getElements.d.ts +26 -0
  103. package/dist/editor/elements/getElements.d.ts.map +1 -0
  104. package/dist/editor/elements/getElements.test.d.ts +2 -0
  105. package/dist/editor/elements/getElements.test.d.ts.map +1 -0
  106. package/dist/editor/elements/getParentElementPath.d.ts +20 -3
  107. package/dist/editor/elements/getParentElementPath.d.ts.map +1 -1
  108. package/dist/editor/elements/getParentElementPath.test.d.ts +2 -0
  109. package/dist/editor/elements/getParentElementPath.test.d.ts.map +1 -0
  110. package/dist/editor/elements/htmlElToSlateNode.d.ts +4 -0
  111. package/dist/editor/elements/htmlElToSlateNode.d.ts.map +1 -0
  112. package/dist/editor/elements/index.d.ts +10 -9
  113. package/dist/editor/elements/index.d.ts.map +1 -1
  114. package/dist/editor/elements/insertElement.d.ts +22 -0
  115. package/dist/editor/elements/insertElement.d.ts.map +1 -0
  116. package/dist/editor/elements/insertElement.test.d.ts +2 -0
  117. package/dist/editor/elements/insertElement.test.d.ts.map +1 -0
  118. package/dist/editor/elements/isElementEmpty.d.ts +20 -7
  119. package/dist/editor/elements/isElementEmpty.d.ts.map +1 -1
  120. package/dist/editor/elements/isElementEmpty.test.d.ts +2 -0
  121. package/dist/editor/elements/isElementEmpty.test.d.ts.map +1 -0
  122. package/dist/editor/elements/types.d.ts +73 -0
  123. package/dist/editor/elements/types.d.ts.map +1 -0
  124. package/dist/editor/elements/updateElement.d.ts +69 -7
  125. package/dist/editor/elements/updateElement.d.ts.map +1 -1
  126. package/dist/editor/index.d.ts +1 -2
  127. package/dist/editor/index.d.ts.map +1 -1
  128. package/dist/editor/paths/getBlockOrder.d.ts +3 -0
  129. package/dist/editor/paths/getBlockOrder.d.ts.map +1 -0
  130. package/dist/editor/paths/getNextBlockOrder.d.ts +3 -0
  131. package/dist/editor/paths/getNextBlockOrder.d.ts.map +1 -0
  132. package/dist/editor/paths/getPreviousBlockOrder.d.ts +3 -0
  133. package/dist/editor/paths/getPreviousBlockOrder.d.ts.map +1 -0
  134. package/dist/editor/paths/getSelectedPaths.d.ts +1 -1
  135. package/dist/editor/paths/getSelectedPaths.d.ts.map +1 -1
  136. package/dist/editor/paths/index.d.ts +10 -8
  137. package/dist/editor/paths/index.d.ts.map +1 -1
  138. package/dist/editor/paths/isBlockSelected.d.ts +1 -1
  139. package/dist/editor/paths/isBlockSelected.d.ts.map +1 -1
  140. package/dist/editor/paths/isPathEmpty.d.ts +1 -1
  141. package/dist/editor/paths/isPathEmpty.d.ts.map +1 -1
  142. package/dist/editor/paths/setPath.d.ts +1 -1
  143. package/dist/editor/paths/setPath.d.ts.map +1 -1
  144. package/dist/editor/selection/getAnchor.d.ts +20 -0
  145. package/dist/editor/selection/getAnchor.d.ts.map +1 -0
  146. package/dist/editor/selection/getCurrent.d.ts +20 -0
  147. package/dist/editor/selection/getCurrent.d.ts.map +1 -0
  148. package/dist/editor/selection/getEnd.d.ts +20 -0
  149. package/dist/editor/selection/getEnd.d.ts.map +1 -0
  150. package/dist/editor/selection/getFirstPoint.d.ts +23 -0
  151. package/dist/editor/selection/getFirstPoint.d.ts.map +1 -0
  152. package/dist/editor/selection/getFocus.d.ts +20 -0
  153. package/dist/editor/selection/getFocus.d.ts.map +1 -0
  154. package/dist/editor/selection/getLastPoint.d.ts +23 -0
  155. package/dist/editor/selection/getLastPoint.d.ts.map +1 -0
  156. package/dist/editor/selection/getNext.d.ts +20 -0
  157. package/dist/editor/selection/getNext.d.ts.map +1 -0
  158. package/dist/editor/selection/getPrevious.d.ts +20 -0
  159. package/dist/editor/selection/getPrevious.d.ts.map +1 -0
  160. package/dist/editor/selection/getRange.d.ts +21 -0
  161. package/dist/editor/selection/getRange.d.ts.map +1 -0
  162. package/dist/editor/selection/getSelected.d.ts +20 -0
  163. package/dist/editor/selection/getSelected.d.ts.map +1 -0
  164. package/dist/editor/selection/getSlateSelection.d.ts +23 -0
  165. package/dist/editor/selection/getSlateSelection.d.ts.map +1 -0
  166. package/dist/editor/selection/getStart.d.ts +20 -0
  167. package/dist/editor/selection/getStart.d.ts.map +1 -0
  168. package/dist/editor/selection/index.d.ts +43 -0
  169. package/dist/editor/selection/index.d.ts.map +1 -0
  170. package/dist/editor/selection/isBlockSelected.d.ts +23 -0
  171. package/dist/editor/selection/isBlockSelected.d.ts.map +1 -0
  172. package/dist/editor/selection/isCollapsed.d.ts +20 -0
  173. package/dist/editor/selection/isCollapsed.d.ts.map +1 -0
  174. package/dist/editor/selection/isEmpty.d.ts +14 -0
  175. package/dist/editor/selection/isEmpty.d.ts.map +1 -0
  176. package/dist/editor/selection/isExpanded.d.ts +20 -0
  177. package/dist/editor/selection/isExpanded.d.ts.map +1 -0
  178. package/dist/editor/selection/setCurrent.d.ts +22 -0
  179. package/dist/editor/selection/setCurrent.d.ts.map +1 -0
  180. package/dist/editor/selection/setSelected.d.ts +25 -0
  181. package/dist/editor/selection/setSelected.d.ts.map +1 -0
  182. package/dist/editor/selection/setSlateSelection.d.ts +24 -0
  183. package/dist/editor/selection/setSlateSelection.d.ts.map +1 -0
  184. package/dist/editor/selection/types.d.ts +128 -0
  185. package/dist/editor/selection/types.d.ts.map +1 -0
  186. package/dist/editor/textFormats/addMark.d.ts +33 -0
  187. package/dist/editor/textFormats/addMark.d.ts.map +1 -0
  188. package/dist/editor/textFormats/clearMarks.d.ts +27 -0
  189. package/dist/editor/textFormats/clearMarks.d.ts.map +1 -0
  190. package/dist/editor/textFormats/getMarks.d.ts +20 -0
  191. package/dist/editor/textFormats/getMarks.d.ts.map +1 -0
  192. package/dist/editor/textFormats/getValue.d.ts +22 -2
  193. package/dist/editor/textFormats/getValue.d.ts.map +1 -1
  194. package/dist/editor/textFormats/index.d.ts +21 -0
  195. package/dist/editor/textFormats/index.d.ts.map +1 -0
  196. package/dist/editor/textFormats/isActive.d.ts +22 -2
  197. package/dist/editor/textFormats/isActive.d.ts.map +1 -1
  198. package/dist/editor/textFormats/removeMark.d.ts +28 -0
  199. package/dist/editor/textFormats/removeMark.d.ts.map +1 -0
  200. package/dist/editor/textFormats/toggle.d.ts +33 -2
  201. package/dist/editor/textFormats/toggle.d.ts.map +1 -1
  202. package/dist/editor/textFormats/types.d.ts +177 -0
  203. package/dist/editor/textFormats/types.d.ts.map +1 -0
  204. package/dist/editor/textFormats/update.d.ts +32 -2
  205. package/dist/editor/textFormats/update.d.ts.map +1 -1
  206. package/dist/editor/types.d.ts +54 -30
  207. package/dist/editor/types.d.ts.map +1 -1
  208. package/dist/extensions/shortcuts.d.ts +6 -2
  209. package/dist/extensions/shortcuts.d.ts.map +1 -1
  210. package/dist/handlers/index.d.ts +1 -1
  211. package/dist/handlers/index.d.ts.map +1 -1
  212. package/dist/handlers/onKeyDown.d.ts +1 -2
  213. package/dist/handlers/onKeyDown.d.ts.map +1 -1
  214. package/dist/index.d.ts +14 -10
  215. package/dist/index.d.ts.map +1 -1
  216. package/dist/index.js +1 -6
  217. package/dist/marks/index.d.ts +1 -1
  218. package/dist/marks/index.d.ts.map +1 -1
  219. package/dist/parsers/deserializeHTML.d.ts +1 -1
  220. package/dist/parsers/deserializeHTML.d.ts.map +1 -1
  221. package/dist/parsers/deserializeTextNodes.d.ts +2 -2
  222. package/dist/parsers/deserializeTextNodes.d.ts.map +1 -1
  223. package/dist/parsers/getEmail.d.ts +2 -4
  224. package/dist/parsers/getEmail.d.ts.map +1 -1
  225. package/dist/parsers/getHTML.d.ts +1 -1
  226. package/dist/parsers/getHTML.d.ts.map +1 -1
  227. package/dist/parsers/getMarkdown.d.ts +1 -1
  228. package/dist/parsers/getMarkdown.d.ts.map +1 -1
  229. package/dist/parsers/getPlainText.d.ts +1 -1
  230. package/dist/parsers/getPlainText.d.ts.map +1 -1
  231. package/dist/plugins/build-plugin-elements.d.ts +13 -0
  232. package/dist/plugins/build-plugin-elements.d.ts.map +1 -0
  233. package/dist/plugins/build-plugin-elements.test.d.ts +2 -0
  234. package/dist/plugins/build-plugin-elements.test.d.ts.map +1 -0
  235. package/dist/plugins/create-yoopta-plugin.d.ts +32 -0
  236. package/dist/plugins/create-yoopta-plugin.d.ts.map +1 -0
  237. package/dist/plugins/create-yoopta-plugin.test.d.ts +2 -0
  238. package/dist/plugins/create-yoopta-plugin.test.d.ts.map +1 -0
  239. package/dist/plugins/extenstions/{withInlines.d.ts → with-inlines.d.ts} +2 -2
  240. package/dist/plugins/extenstions/with-inlines.d.ts.map +1 -0
  241. package/dist/plugins/hooks.d.ts +4 -4
  242. package/dist/plugins/hooks.d.ts.map +1 -1
  243. package/dist/plugins/index.d.ts +1 -1
  244. package/dist/plugins/index.d.ts.map +1 -1
  245. package/dist/plugins/slate-editor-component.d.ts +12 -0
  246. package/dist/plugins/slate-editor-component.d.ts.map +1 -0
  247. package/dist/plugins/types.d.ts +32 -21
  248. package/dist/plugins/types.d.ts.map +1 -1
  249. package/dist/utils/{blockElements.d.ts → block-elements.d.ts} +16 -7
  250. package/dist/utils/block-elements.d.ts.map +1 -0
  251. package/dist/utils/build-slate.d.ts +4 -0
  252. package/dist/utils/build-slate.d.ts.map +1 -0
  253. package/dist/utils/{editorBuilders.d.ts → editor-builders.d.ts} +4 -6
  254. package/dist/utils/editor-builders.d.ts.map +1 -0
  255. package/dist/utils/editor-builders.test.d.ts +2 -0
  256. package/dist/utils/editor-builders.test.d.ts.map +1 -0
  257. package/dist/utils/enter-action.d.ts +40 -0
  258. package/dist/utils/enter-action.d.ts.map +1 -0
  259. package/dist/utils/enter-action.test.d.ts +2 -0
  260. package/dist/utils/enter-action.test.d.ts.map +1 -0
  261. package/dist/utils/execute-backspace-action.d.ts +29 -0
  262. package/dist/utils/execute-backspace-action.d.ts.map +1 -0
  263. package/dist/utils/execute-backspace-action.test.d.ts +2 -0
  264. package/dist/utils/execute-backspace-action.test.d.ts.map +1 -0
  265. package/dist/utils/findSlateBySelectionPath.d.ts +1 -1
  266. package/dist/utils/findSlateBySelectionPath.d.ts.map +1 -1
  267. package/dist/utils/generateId.d.ts.map +1 -1
  268. package/dist/utils/get-block-plugins.d.ts +4 -0
  269. package/dist/utils/get-block-plugins.d.ts.map +1 -0
  270. package/dist/utils/get-block-plugins.test.d.ts +2 -0
  271. package/dist/utils/get-block-plugins.test.d.ts.map +1 -0
  272. package/dist/utils/get-next-hierarchical-selection.d.ts +20 -0
  273. package/dist/utils/get-next-hierarchical-selection.d.ts.map +1 -0
  274. package/dist/utils/get-next-hierarchical-selection.test.d.ts +2 -0
  275. package/dist/utils/get-next-hierarchical-selection.test.d.ts.map +1 -0
  276. package/dist/utils/get-node-points.d.ts +5 -0
  277. package/dist/utils/get-node-points.d.ts.map +1 -0
  278. package/dist/utils/get-node-points.test.d.ts +2 -0
  279. package/dist/utils/get-node-points.test.d.ts.map +1 -0
  280. package/dist/utils/getMaxOffsetInElement.d.ts.map +1 -1
  281. package/dist/utils/invariant.d.ts +2 -0
  282. package/dist/utils/invariant.d.ts.map +1 -0
  283. package/dist/utils/types.d.ts.map +1 -1
  284. package/dist/utils/validations.d.ts +3 -0
  285. package/dist/utils/validations.d.ts.map +1 -0
  286. package/dist/utils/weakMaps.d.ts +1 -2
  287. package/dist/utils/weakMaps.d.ts.map +1 -1
  288. package/dist/yoopta-editor.d.ts +28 -0
  289. package/dist/yoopta-editor.d.ts.map +1 -0
  290. package/package.json +11 -11
  291. package/dist/UI/BlockOptions/BlockOptions.d.ts +0 -25
  292. package/dist/UI/BlockOptions/BlockOptions.d.ts.map +0 -1
  293. package/dist/UI/BlockOptions/utils.d.ts +0 -33
  294. package/dist/UI/BlockOptions/utils.d.ts.map +0 -1
  295. package/dist/UI/ExtendedBlockActions/ExtendedBlockActions.d.ts +0 -11
  296. package/dist/UI/ExtendedBlockActions/ExtendedBlockActions.d.ts.map +0 -1
  297. package/dist/UI/Overlay/Overlay.d.ts +0 -12
  298. package/dist/UI/Overlay/Overlay.d.ts.map +0 -1
  299. package/dist/UI/Portal/Portal.d.ts +0 -8
  300. package/dist/UI/Portal/Portal.d.ts.map +0 -1
  301. package/dist/UI/index.d.ts +0 -38
  302. package/dist/UI/index.d.ts.map +0 -1
  303. package/dist/YooptaEditor.d.ts +0 -30
  304. package/dist/YooptaEditor.d.ts.map +0 -1
  305. package/dist/components/Block/FloatingBlockActions.d.ts +0 -14
  306. package/dist/components/Block/FloatingBlockActions.d.ts.map +0 -1
  307. package/dist/components/Editor/Editor.d.ts.map +0 -1
  308. package/dist/components/Editor/RenderBlocks.d.ts +0 -10
  309. package/dist/components/Editor/RenderBlocks.d.ts.map +0 -1
  310. package/dist/components/Editor/dnd.d.ts +0 -10
  311. package/dist/components/Editor/dnd.d.ts.map +0 -1
  312. package/dist/components/TextLeaf/TextLeaf.d.ts.map +0 -1
  313. package/dist/contexts/YooptaContext/ToolsContext.d.ts +0 -23
  314. package/dist/contexts/YooptaContext/ToolsContext.d.ts.map +0 -1
  315. package/dist/editor/elements/createElement.d.ts +0 -13
  316. package/dist/editor/elements/createElement.d.ts.map +0 -1
  317. package/dist/editor/elements/insertElementText.d.ts +0 -7
  318. package/dist/editor/elements/insertElementText.d.ts.map +0 -1
  319. package/dist/editor/paths/getNextPath.d.ts +0 -3
  320. package/dist/editor/paths/getNextPath.d.ts.map +0 -1
  321. package/dist/editor/paths/getPath.d.ts +0 -3
  322. package/dist/editor/paths/getPath.d.ts.map +0 -1
  323. package/dist/editor/paths/getPreviousPath.d.ts +0 -3
  324. package/dist/editor/paths/getPreviousPath.d.ts.map +0 -1
  325. package/dist/marks/FakeSelectionMark.d.ts +0 -5
  326. package/dist/marks/FakeSelectionMark.d.ts.map +0 -1
  327. package/dist/plugins/SlateEditorComponent.d.ts +0 -13
  328. package/dist/plugins/SlateEditorComponent.d.ts.map +0 -1
  329. package/dist/plugins/createYooptaPlugin.d.ts +0 -25
  330. package/dist/plugins/createYooptaPlugin.d.ts.map +0 -1
  331. package/dist/plugins/extenstions/withInlines.d.ts.map +0 -1
  332. package/dist/utils/blockElements.d.ts.map +0 -1
  333. package/dist/utils/buildSlate.d.ts +0 -3
  334. package/dist/utils/buildSlate.d.ts.map +0 -1
  335. package/dist/utils/deepClone.d.ts +0 -2
  336. package/dist/utils/deepClone.d.ts.map +0 -1
  337. package/dist/utils/editorBuilders.d.ts.map +0 -1
  338. package/dist/utils/findPluginBlockByPath.d.ts +0 -5
  339. package/dist/utils/findPluginBlockByPath.d.ts.map +0 -1
  340. package/dist/utils/getLastNodePoint.d.ts +0 -9
  341. package/dist/utils/getLastNodePoint.d.ts.map +0 -1
  342. package/dist/utils/throttle.d.ts +0 -8
  343. package/dist/utils/throttle.d.ts.map +0 -1
  344. package/dist/utils/validateYooptaValue.d.ts +0 -2
  345. package/dist/utils/validateYooptaValue.d.ts.map +0 -1
  346. package/dist/utils/validators.d.ts +0 -2
  347. package/dist/utils/validators.d.ts.map +0 -1
@@ -9,5 +9,5 @@ export type YooptaMarkParams<TProps> = {
9
9
  hotkey?: string;
10
10
  render: (props: TProps) => JSX.Element;
11
11
  };
12
- export declare function createYooptaMark<TProps>({ type, hotkey, render }: YooptaMarkParams<TProps>): YooptaMark<TProps>;
12
+ export declare function createYooptaMark<TProps>({ type, hotkey, render, }: YooptaMarkParams<TProps>): YooptaMark<TProps>;
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/marks/index.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,UAAU,CAAC,MAAM,IAAI;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC,OAAO,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,MAAM,IAAI;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC,OAAO,CAAC;CACxC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAM/G"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/marks/index.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,UAAU,CAAC,MAAM,IAAI;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC,OAAO,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,MAAM,IAAI;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC,OAAO,CAAC;CACxC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,EACvC,IAAI,EACJ,MAAM,EACN,MAAM,GACP,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAM/C"}
@@ -1,3 +1,3 @@
1
- import { YooEditor, YooptaBlockData } from '../editor/types';
1
+ import type { YooEditor, YooptaBlockData } from '../editor/types';
2
2
  export declare function deserializeHTML(editor: YooEditor, html: HTMLElement): YooptaBlockData<import("slate").Descendant>[];
3
3
  //# sourceMappingURL=deserializeHTML.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deserializeHTML.d.ts","sourceRoot":"","sources":["../../src/parsers/deserializeHTML.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,SAAS,EAAuB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AA+LhG,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,iDAUnE"}
1
+ {"version":3,"file":"deserializeHTML.d.ts","sourceRoot":"","sources":["../../src/parsers/deserializeHTML.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,SAAS,EAET,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAoMzB,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,iDAUnE"}
@@ -1,4 +1,4 @@
1
- import { Descendant } from 'slate';
2
- import { YooEditor } from '../editor/types';
1
+ import type { Descendant } from 'slate';
2
+ import type { YooEditor } from '../editor/types';
3
3
  export declare function deserializeTextNodes(editor: YooEditor, nodes: NodeListOf<ChildNode>): Descendant[];
4
4
  //# sourceMappingURL=deserializeTextNodes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deserializeTextNodes.d.ts","sourceRoot":"","sources":["../../src/parsers/deserializeTextNodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAK5C,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,GAAG,UAAU,EAAE,CA4FlG"}
1
+ {"version":3,"file":"deserializeTextNodes.d.ts","sourceRoot":"","sources":["../../src/parsers/deserializeTextNodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAKjD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,GAC3B,UAAU,EAAE,CA4Fd"}
@@ -1,4 +1,4 @@
1
- import { YooEditor, YooptaContentValue } from '../editor/types';
1
+ import type { YooEditor, YooptaContentValue } from '../editor/types';
2
2
  type StyleElement = {
3
3
  id?: string;
4
4
  content: string;
@@ -10,9 +10,7 @@ type MetaElement = {
10
10
  property?: string;
11
11
  charset?: string;
12
12
  };
13
- type StyleAttribute = {
14
- [key: string]: string | number;
15
- };
13
+ type StyleAttribute = Record<string, string | number>;
16
14
  type ElementAttributes = {
17
15
  style?: StyleAttribute;
18
16
  [key: string]: any;
@@ -1 +1 @@
1
- {"version":3,"file":"getEmail.d.ts","sourceRoot":"","sources":["../../src/parsers/getEmail.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,SAAS,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAG9E,KAAK,YAAY,GAAG;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAChC,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,CAAC,EAAE;QACL,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;QACxB,IAAI,CAAC,EAAE,WAAW,EAAE,CAAC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,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,iBAAiB,CAAC;KAC3B,CAAC;IACF,SAAS,CAAC,EAAE;QACV,KAAK,CAAC,EAAE,iBAAiB,CAAC;KAC3B,CAAC;IACF,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAC9C,CAAC;AA6BF,wBAAgB,QAAQ,CACtB,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,kBAAkB,EAC3B,IAAI,CAAC,EAAE,oBAAoB,GAC1B,MAAM,CA6DR"}
@@ -1,3 +1,3 @@
1
- import { YooEditor, YooptaContentValue } from '../editor/types';
1
+ import type { YooEditor, YooptaContentValue } from '../editor/types';
2
2
  export declare function getHTML(editor: YooEditor, content: YooptaContentValue): string;
3
3
  //# sourceMappingURL=getHTML.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getHTML.d.ts","sourceRoot":"","sources":["../../src/parsers/getHTML.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,SAAS,EAAuB,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAyCnG,wBAAgB,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAwB9E"}
1
+ {"version":3,"file":"getHTML.d.ts","sourceRoot":"","sources":["../../src/parsers/getHTML.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,SAAS,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AA6CnF,wBAAgB,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAgC9E"}
@@ -1,4 +1,4 @@
1
- import { YooEditor, YooptaBlockData, YooptaContentValue } from '../editor/types';
1
+ import type { YooEditor, YooptaBlockData, YooptaContentValue } from '../editor/types';
2
2
  export declare function serialize(editor: YooEditor, blocksData: YooptaBlockData[]): string;
3
3
  export declare function getMarkdown(editor: YooEditor, content: YooptaContentValue): string;
4
4
  //# sourceMappingURL=getMarkdown.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getMarkdown.d.ts","sourceRoot":"","sources":["../../src/parsers/getMarkdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,SAAS,EAAuB,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEpH,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,UAwBzE;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,UAGzE"}
1
+ {"version":3,"file":"getMarkdown.d.ts","sourceRoot":"","sources":["../../src/parsers/getMarkdown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,SAAS,EAET,eAAe,EACf,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAEzB,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,UAwBzE;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,UAGzE"}
@@ -1,3 +1,3 @@
1
- import { YooEditor, YooptaContentValue } from '../editor/types';
1
+ import type { YooEditor, YooptaContentValue } from '../editor/types';
2
2
  export declare function getPlainText(editor: YooEditor, content: YooptaContentValue): string;
3
3
  //# sourceMappingURL=getPlainText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getPlainText.d.ts","sourceRoot":"","sources":["../../src/parsers/getPlainText.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGhE,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,UAM1E"}
1
+ {"version":3,"file":"getPlainText.d.ts","sourceRoot":"","sources":["../../src/parsers/getPlainText.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErE,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,UAM1E"}
@@ -0,0 +1,13 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { PluginElementNodeType, PluginElementRenderProps, PluginElementsMap } from './types';
3
+ export type PluginJSXElementProps = {
4
+ render: (props: PluginElementRenderProps) => JSX.Element;
5
+ props?: Record<string, unknown>;
6
+ children?: ReactElement<PluginJSXElementProps> | ReactElement<PluginJSXElementProps>[];
7
+ nodeType?: PluginElementNodeType;
8
+ placeholder?: string;
9
+ };
10
+ export type PluginJSXElement = ReactElement<PluginJSXElementProps, string>;
11
+ export declare function buildPluginElements<TKeys extends string = string>(jsxElement: PluginJSXElement, pluginType: string): PluginElementsMap<TKeys>;
12
+ export declare function isReactElement(value: unknown): value is PluginJSXElement;
13
+ //# sourceMappingURL=build-plugin-elements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-plugin-elements.d.ts","sourceRoot":"","sources":["../../src/plugins/build-plugin-elements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAEV,qBAAqB,EAErB,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,GAAG,CAAC,OAAO,CAAC;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,YAAY,CAAC,qBAAqB,CAAC,GAAG,YAAY,CAAC,qBAAqB,CAAC,EAAE,CAAC;IACvF,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AAyE3E,wBAAgB,mBAAmB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EAC/D,UAAU,EAAE,gBAAgB,EAC5B,UAAU,EAAE,MAAM,GACjB,iBAAiB,CAAC,KAAK,CAAC,CAG1B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAExE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=build-plugin-elements.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-plugin-elements.test.d.ts","sourceRoot":"","sources":["../../src/plugins/build-plugin-elements.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
1
+ /// <reference types="react" />
2
+ import type { Plugin, PluginDOMEvents, PluginElementRenderProps, PluginInputElements, PluginLifeCycleEvents, PluginOptions } from './types';
3
+ import type { SlateElement } from '../editor/types';
4
+ export type ExtendPluginRender<TKeys extends string> = {
5
+ [x in TKeys]: (props: PluginElementRenderProps) => JSX.Element;
6
+ };
7
+ export type ExtendPluginElementConfig = {
8
+ render?: (props: PluginElementRenderProps) => JSX.Element;
9
+ props?: Record<string, unknown>;
10
+ injectElementsFromPlugins?: YooptaPlugin<any, any>[];
11
+ placeholder?: string;
12
+ };
13
+ export type ExtendPlugin<TElementMap extends Record<string, SlateElement>, TOptions> = {
14
+ options?: Partial<PluginOptions<TOptions>>;
15
+ events?: Partial<PluginDOMEvents>;
16
+ lifecycle?: Partial<PluginLifeCycleEvents>;
17
+ injectElementsFromPlugins?: YooptaPlugin<any, any>[];
18
+ elements?: {
19
+ [K in keyof TElementMap]?: ExtendPluginElementConfig;
20
+ };
21
+ };
22
+ type PluginInput<TElementMap extends Record<string, SlateElement>, TOptions> = Omit<Plugin<TElementMap, TOptions>, 'elements'> & {
23
+ elements: PluginInputElements<TElementMap> | Plugin<TElementMap, TOptions>['elements'];
24
+ };
25
+ export declare class YooptaPlugin<TElementMap extends Record<string, SlateElement>, TOptions = Record<string, unknown>> {
26
+ private readonly plugin;
27
+ constructor(pluginInput: PluginInput<TElementMap, TOptions>);
28
+ get getPlugin(): Plugin<TElementMap, TOptions>;
29
+ extend(extendPlugin: ExtendPlugin<TElementMap, TOptions>): YooptaPlugin<TElementMap, TOptions>;
30
+ }
31
+ export {};
32
+ //# sourceMappingURL=create-yoopta-plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-yoopta-plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/create-yoopta-plugin.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EACV,MAAM,EACN,eAAe,EACf,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACd,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,MAAM,kBAAkB,CAAC,KAAK,SAAS,MAAM,IAAI;KACpD,CAAC,IAAI,KAAK,GAAG,CAAC,KAAK,EAAE,wBAAwB,KAAK,GAAG,CAAC,OAAO;CAC/D,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,GAAG,CAAC,OAAO,CAAC;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,yBAAyB,CAAC,EAAE,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,QAAQ,IAAI;IACrF,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC3C,yBAAyB,CAAC,EAAE,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;IACrD,QAAQ,CAAC,EAAE;SACR,CAAC,IAAI,MAAM,WAAW,CAAC,CAAC,EAAE,yBAAyB;KACrD,CAAC;CACH,CAAC;AAEF,KAAK,WAAW,CAAC,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,QAAQ,IAAI,IAAI,CACjF,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,EAC7B,UAAU,CACX,GAAG;IACF,QAAQ,EAAE,mBAAmB,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC;CACxF,CAAC;AAEF,qBAAa,YAAY,CACvB,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAChD,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAElC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgC;gBAC3C,WAAW,EAAE,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC;IAqB3D,IAAI,SAAS,IAAI,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAE7C;IAOD,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG,YAAY,CAAC,WAAW,EAAE,QAAQ,CAAC;CAuH/F"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=create-yoopta-plugin.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-yoopta-plugin.test.d.ts","sourceRoot":"","sources":["../../src/plugins/create-yoopta-plugin.test.ts"],"names":[],"mappings":""}
@@ -1,3 +1,3 @@
1
- import { SlateEditor, YooEditor } from '../../editor/types';
1
+ import type { SlateEditor, YooEditor } from '../../editor/types';
2
2
  export declare const withInlines: (editor: YooEditor, slate: SlateEditor) => import("slate-react").ReactEditor;
3
- //# sourceMappingURL=withInlines.d.ts.map
3
+ //# sourceMappingURL=with-inlines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-inlines.d.ts","sourceRoot":"","sources":["../../../src/plugins/extenstions/with-inlines.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AA8DjE,eAAO,MAAM,WAAW,WAAY,SAAS,SAAS,WAAW,sCAqBhE,CAAC"}
@@ -1,6 +1,6 @@
1
- import { SlateEditor, YooEditor, YooptaBlockData } from '../editor/types';
2
- import { EditorEventHandlers } from '../types/eventHandlers';
3
- import { PluginEvents } from './types';
1
+ import type { PluginDOMEvents } from './types';
2
+ import type { SlateEditor, YooEditor, YooptaBlockData } from '../editor/types';
3
+ import type { EditorEventHandlers } from '../types/eventHandlers';
4
4
  export declare const useSlateEditor: (id: string, editor: YooEditor, block: YooptaBlockData, elements: any, withExtensions: any) => import("slate-react").ReactEditor;
5
- export declare const useEventHandlers: (events: PluginEvents | undefined, editor: YooEditor, block: YooptaBlockData, slate: SlateEditor) => EditorEventHandlers;
5
+ export declare const useEventHandlers: (events: PluginDOMEvents | undefined, editor: YooEditor, block: YooptaBlockData, slate: SlateEditor) => EditorEventHandlers;
6
6
  //# sourceMappingURL=hooks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/plugins/hooks.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAK7D,OAAO,EAA6B,YAAY,EAAE,MAAM,SAAS,CAAC;AAIlE,eAAO,MAAM,cAAc,OACrB,MAAM,UACF,SAAS,SACV,eAAe,YACZ,GAAG,kBACG,GAAG,sCA0JpB,CAAC;AAEF,eAAO,MAAM,gBAAgB,WACnB,YAAY,GAAG,SAAS,UACxB,SAAS,SACV,eAAe,SACf,WAAW,wBAwBnB,CAAC"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/plugins/hooks.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAA6B,MAAM,SAAS,CAAC;AAI1E,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAKlE,eAAO,MAAM,cAAc,OACrB,MAAM,UACF,SAAS,SACV,eAAe,YACZ,GAAG,kBACG,GAAG,sCA2JC,CAAC;AAEvB,eAAO,MAAM,gBAAgB,WACnB,eAAe,GAAG,SAAS,UAC3B,SAAS,SACV,eAAe,SACf,WAAW,wBA0DgB,CAAC"}
@@ -1,2 +1,2 @@
1
- export { YooptaPlugin } from './createYooptaPlugin';
1
+ export { YooptaPlugin } from './create-yoopta-plugin';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { Plugin, PluginDOMEvents } from './types';
2
+ import type { SlateElement } from '../editor/types';
3
+ import type { YooptaMark } from '../marks';
4
+ type Props<TElementMap extends Record<string, SlateElement>, TOptions> = Plugin<TElementMap, TOptions> & {
5
+ id: string;
6
+ marks?: YooptaMark<any>[];
7
+ placeholder?: string;
8
+ events?: PluginDOMEvents;
9
+ };
10
+ declare const SlateEditorComponent: <TElementMap extends Record<string, SlateElement<string, any>>, TOptions>({ id, elements, marks, events, extensions: withExtensions, }: Props<TElementMap, TOptions>) => import("react/jsx-runtime").JSX.Element;
11
+ export { SlateEditorComponent };
12
+ //# sourceMappingURL=slate-editor-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slate-editor-component.d.ts","sourceRoot":"","sources":["../../src/plugins/slate-editor-component.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAqB,MAAM,EAAE,eAAe,EAA2B,MAAM,SAAS,CAAC;AAGnG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAK3C,KAAK,KAAK,CAAC,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,QAAQ,IAAI,MAAM,CAC7E,WAAW,EACX,QAAQ,CACT,GAAG;IACF,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B,CAAC;AAoBF,QAAA,MAAM,oBAAoB,kNAyOzB,CAAC;AAuEF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -1,8 +1,8 @@
1
- import { HTMLAttributes, ReactElement, ReactNode } from 'react';
2
- import { RenderElementProps as RenderSlateElementProps, RenderLeafProps } from 'slate-react';
3
- import { SlateEditor, SlateElement, YooEditor, YooptaBlockBaseMeta, YooptaBlockData } from '../editor/types';
4
- import { EditorEventHandlers } from '../types/eventHandlers';
5
- import { HOTKEYS_TYPE } from '../utils/hotkeys';
1
+ import type { HTMLAttributes, ReactElement, ReactNode } from 'react';
2
+ import type { RenderElementProps, RenderLeafProps } from 'slate-react';
3
+ import type { SlateEditor, SlateElement, YooEditor, YooptaBlockBaseMeta, YooptaBlockData } from '../editor/types';
4
+ import type { EditorEventHandlers } from '../types/eventHandlers';
5
+ import type { HOTKEYS_TYPE } from '../utils/hotkeys';
6
6
  export declare enum NodeType {
7
7
  Block = "block",
8
8
  Inline = "inline",
@@ -13,35 +13,39 @@ export type PluginOptions<T> = Partial<{
13
13
  display?: {
14
14
  title?: string;
15
15
  description?: string;
16
- icon?: string | ReactNode | ReactElement;
16
+ icon?: ReactNode;
17
17
  };
18
18
  shortcuts?: string[];
19
19
  HTMLAttributes?: HTMLAttributes<HTMLElement>;
20
20
  } & T>;
21
- export type PluginElementOptions = {
22
- draggable?: boolean;
21
+ export type RenderSlateElementProps = Omit<RenderElementProps, 'element'> & {
22
+ element: SlateElement;
23
23
  };
24
24
  export type PluginElementExtendRenderProps = RenderSlateElementProps & {
25
25
  blockId: string;
26
26
  HTMLAttributes?: HTMLAttributes<HTMLElement>;
27
27
  };
28
- export type PluginElementRenderProps = PluginElementExtendRenderProps & {
29
- extendRender?: (props: PluginElementExtendRenderProps) => JSX.Element;
30
- };
28
+ export type PluginElementRenderProps = PluginElementExtendRenderProps;
31
29
  export type PluginCustomEditorRenderProps = {
32
30
  blockId: string;
33
31
  };
32
+ export type PluginElementNodeType = 'block' | 'inline' | 'void' | 'inlineVoid';
34
33
  export type PluginDefaultProps = {
35
- nodeType?: 'block' | 'inline' | 'void' | 'inlineVoid';
34
+ nodeType?: PluginElementNodeType;
36
35
  };
37
36
  export type PluginElementProps<T> = PluginDefaultProps & T;
38
37
  export type PluginElement<TKeys, T> = {
39
- render: (props: PluginElementRenderProps) => JSX.Element;
38
+ render?: (props: PluginElementRenderProps) => JSX.Element;
40
39
  props?: PluginElementProps<T>;
41
- options?: PluginElementOptions;
42
40
  asRoot?: boolean;
43
41
  children?: TKeys[];
42
+ injectElementsFromPlugins?: string[];
44
43
  rootPlugin?: string;
44
+ /**
45
+ * Placeholder text for this element when it's empty
46
+ * Only applies to leaf elements (elements without children)
47
+ */
48
+ placeholder?: string;
45
49
  };
46
50
  export type PluginElementsMap<TKeys extends string = string, TProps = PluginDefaultProps> = {
47
51
  [key in TKeys]: PluginElement<TKeys, TProps>;
@@ -55,20 +59,24 @@ export type PluginEventHandlerOptions = {
55
59
  currentBlock: YooptaBlockData;
56
60
  };
57
61
  export type ElementPropsMap = Record<string, Record<string, unknown>>;
58
- export type PluginEvents = {
59
- onBeforeCreate?: (editor: YooEditor) => SlateElement;
62
+ export type PluginDOMEvents = EventHandlers;
63
+ export type PluginLifeCycleEvents = {
64
+ beforeCreate?: (editor: YooEditor) => SlateElement;
60
65
  onCreate?: (editor: YooEditor, blockId: string) => void;
61
66
  onDestroy?: (editor: YooEditor, blockId: string) => void;
62
- } & EventHandlers;
67
+ };
68
+ export type PluginInputElements<TElementMap extends Record<string, SlateElement>> = {
69
+ [K in keyof TElementMap]: PluginElement<Exclude<keyof TElementMap, K>, TElementMap[K]['props']>;
70
+ } | ReactElement<unknown, string>;
63
71
  export type Plugin<TElementMap extends Record<string, SlateElement>, TPluginOptions = Record<string, unknown>> = {
64
72
  type: string;
65
- customEditor?: (props: PluginCustomEditorRenderProps) => JSX.Element;
66
73
  extensions?: (slate: SlateEditor, editor: YooEditor, blockId: string) => SlateEditor;
67
74
  commands?: Record<string, (editor: YooEditor, ...args: any[]) => any>;
68
75
  elements: {
69
76
  [K in keyof TElementMap]: PluginElement<Exclude<keyof TElementMap, K>, TElementMap[K]['props']>;
70
77
  };
71
- events?: PluginEvents;
78
+ events?: PluginDOMEvents;
79
+ lifecycle?: PluginLifeCycleEvents;
72
80
  options?: PluginOptions<TPluginOptions>;
73
81
  parsers?: Partial<Record<PluginParserTypes, PluginParsers>>;
74
82
  };
@@ -81,12 +89,15 @@ export type PluginParserValues = 'deserialize' | 'serialize';
81
89
  export type PluginSerializeParser = (element: SlateElement, content: string, blockMetaData?: YooptaBlockBaseMeta) => string;
82
90
  export type PluginDeserializeParser = {
83
91
  nodeNames: string[];
84
- parse?: (el: HTMLElement, editor: YooEditor) => SlateElement<string, any> | YooptaBlockData[] | void;
92
+ parse?: (el: HTMLElement, editor: YooEditor) => SlateElement | YooptaBlockData[] | void;
85
93
  };
86
94
  export type LeafFormats<K extends string, V> = {
87
95
  [key in K]: V;
88
96
  };
89
- export type ExtendedLeaf<K extends string, V> = RenderLeafProps['leaf'] & LeafFormats<K, V>;
97
+ export type ExtendedLeaf<K extends string, V> = RenderLeafProps['leaf'] & LeafFormats<K, V> & {
98
+ withPlaceholder?: boolean;
99
+ elementPlaceholder?: string;
100
+ };
90
101
  export type YooptaMarkProps<K extends string, V> = {
91
102
  children: RenderLeafProps['children'];
92
103
  leaf: ExtendedLeaf<K, V>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,kBAAkB,IAAI,uBAAuB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC7G,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,UAAU,eAAe;CAC1B;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,OAAO,CACpC;IACE,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,CAAC;KAC1C,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,cAAc,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,EAAE,CAAC,IAAI;KAC5C,GAAG,IAAI,CAAC,GAAG,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,GACrE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEJ,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,IAAI;IACjD,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IACtC,IAAI,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,IAAI,eAAe,GAAG;IACrE,IAAI,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC1B,CAAC"}
@@ -1,6 +1,7 @@
1
- import { NodeEntry, Path } from 'slate';
2
- import { SlateEditor, SlateElement, YooEditor } from '../editor/types';
3
- import { Plugin, PluginElement, PluginElementProps, PluginElementsMap } from '../plugins/types';
1
+ import type { NodeEntry } from 'slate';
2
+ import { Path } from 'slate';
3
+ import type { SlateEditor, SlateElement, YooEditor } from '../editor/types';
4
+ import type { Plugin, PluginElement, PluginElementProps, PluginElementsMap } from '../plugins/types';
4
5
  export declare function getRootBlockElementType(elems: PluginElementsMap<string, unknown> | undefined): string | undefined;
5
6
  export declare function getRootBlockElement(elems: PluginElementsMap<string, unknown> | undefined): PluginElement<string, unknown> | undefined;
6
7
  export declare function isRootElementVoid(elems: PluginElementsMap<string, unknown> | undefined): boolean;
@@ -10,10 +11,18 @@ export type GetBlockElementNodeOptions = {
10
11
  };
11
12
  export declare function getBlockElementNode(slate: SlateEditor, options?: GetBlockElementNodeOptions): NodeEntry<SlateElement> | undefined;
12
13
  export declare function buildSlateNodeElement(type: string, props?: PluginElementProps<unknown>): SlateElement<any>;
13
- type ElementsMapWithTextContent = {
14
- [key: string]: string;
15
- };
14
+ type ElementsMapWithTextContent = Record<string, string>;
16
15
  export declare function buildBlockElementsStructure(editor: YooEditor, blockType: string, elementsMapWithTextContent?: ElementsMapWithTextContent): SlateElement;
17
16
  export declare function getPluginByInlineElement(plugins: YooEditor['plugins'], elementType: string): Plugin<Record<string, SlateElement>, unknown> | undefined;
17
+ /**
18
+ * Checks if the current selection is inside an element with injectElementsFromPlugins
19
+ * Returns injectElementsFromPlugins array if found, null otherwise
20
+ */
21
+ /**
22
+ * Find injectElementsFromPlugins from current element OR nearest parent element with injectElementsFromPlugins
23
+ * This is important for nested structures like Steps > blockquote,
24
+ * where blockquote doesn't have injectElementsFromPlugins but its parent step-list-item-content does
25
+ */
26
+ export declare function getAllowedPluginsFromElement(editor: YooEditor, slate: SlateEditor): string[] | null;
18
27
  export {};
19
- //# sourceMappingURL=blockElements.d.ts.map
28
+ //# sourceMappingURL=block-elements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-elements.d.ts","sourceRoot":"","sources":["../../src/utils/block-elements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAmB,IAAI,EAAE,MAAM,OAAO,CAAC;AAM9C,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,KAAK,EACV,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAE1B,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACpD,MAAM,GAAG,SAAS,CAQpB;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACpD,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAO5C;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,OAAO,CAGhG;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,EAAE,CAAC,EAAE,IAAI,CAAC;IACV,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,WAAW,EAClB,OAAO,GAAE,0BAA+B,GACvC,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAuBrC;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,KAAK,GAAE,kBAAkB,CAAC,OAAO,CAAyB,GACzD,YAAY,CAAC,GAAG,CAAC,CAEnB;AAiCD,KAAK,0BAA0B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEzD,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,0BAA0B,CAAC,EAAE,0BAA0B,GACtD,YAAY,CAyBd;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,EAC7B,WAAW,EAAE,MAAM,GAClB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,GAAG,SAAS,CAM3D;AAED;;;GAGG;AACH;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,WAAW,GACjB,MAAM,EAAE,GAAG,IAAI,CAiDjB"}
@@ -0,0 +1,4 @@
1
+ import type { SlateEditor, YooEditor } from '../editor/types';
2
+ export declare function buildShortcuts(editor: YooEditor): {};
3
+ export declare function buildSlateEditor(editor: YooEditor): SlateEditor;
4
+ //# sourceMappingURL=build-slate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-slate.d.ts","sourceRoot":"","sources":["../../src/utils/build-slate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG9D,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,MAkB/C;AAGD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,WAAW,CAI/D"}
@@ -1,10 +1,8 @@
1
- import { SlateElement, YooEditor } from '../editor/types';
2
- import { Plugin } from '../plugins/types';
3
- import { YooptaMark } from '../marks';
1
+ import type { SlateElement, YooEditor } from '../editor/types';
2
+ import type { YooptaMark } from '../marks';
3
+ import type { Plugin } from '../plugins/types';
4
4
  export declare function buildMarks(editor: any, marks: YooptaMark<any>[]): import("../editor/types").YooptaFormats;
5
- export declare function buildBlocks(editor: any, plugins: Plugin<Record<string, SlateElement>>[]): import("../editor/types").YooptaBlocks;
6
5
  export declare function buildBlockSlateEditors(editor: YooEditor): {};
7
- export declare function buildBlockShortcuts(editor: YooEditor): {};
8
6
  export declare function buildPlugins(plugins: Plugin<Record<string, SlateElement>>[]): Record<string, Plugin<Record<string, SlateElement>>>;
9
7
  export declare function buildCommands(editor: YooEditor, plugins: Plugin<Record<string, SlateElement>>[]): Record<string, (...args: any[]) => any>;
10
- //# sourceMappingURL=editorBuilders.d.ts.map
8
+ //# sourceMappingURL=editor-builders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-builders.d.ts","sourceRoot":"","sources":["../../src/utils/editor-builders.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAqB,MAAM,kBAAkB,CAAC;AAElE,wBAAgB,UAAU,CAAC,MAAM,KAAA,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,2CAgB1D;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,MAkBvD;AAID,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,EAAE,GAC9C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAyGtD;AAED,wBAAgB,aAAa,CAC3B,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,EAAE,GAC9C,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAczC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=editor-builders.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-builders.test.d.ts","sourceRoot":"","sources":["../../src/utils/editor-builders.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,40 @@
1
+ import type { Path } from 'slate';
2
+ import { Editor } from 'slate';
3
+ import type { YooEditor } from '../editor/types';
4
+ type EnterResult = {
5
+ action: 'split-block';
6
+ } | {
7
+ action: 'insert-block-after';
8
+ } | {
9
+ action: 'insert-block-before';
10
+ } | {
11
+ action: 'insert-soft-break';
12
+ } | {
13
+ action: 'split-injected-element';
14
+ path: Path;
15
+ } | {
16
+ action: 'exit-injected-element';
17
+ injectedPath: Path;
18
+ parentLeafPath: Path;
19
+ } | {
20
+ action: 'delete-empty-injected';
21
+ path: Path;
22
+ } | {
23
+ action: 'reset-to-paragraph';
24
+ } | {
25
+ action: 'delegate-to-plugin';
26
+ } | {
27
+ action: 'default';
28
+ } | {
29
+ action: 'prevent';
30
+ };
31
+ /**
32
+ * Main function to determine the action for Enter
33
+ */
34
+ export declare function getEnterAction(editor: YooEditor, slate: Editor): EnterResult;
35
+ /**
36
+ * Executes the Enter action
37
+ */
38
+ export declare function executeEnterAction(editor: YooEditor, slate: Editor, result: EnterResult): void;
39
+ export {};
40
+ //# sourceMappingURL=enter-action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enter-action.d.ts","sourceRoot":"","sources":["../../src/utils/enter-action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,MAAM,EAA8B,MAAM,OAAO,CAAC;AAM3D,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE/D,KAAK,WAAW,GACZ;IAAE,MAAM,EAAE,aAAa,CAAA;CAAE,GACzB;IAAE,MAAM,EAAE,oBAAoB,CAAA;CAAE,GAChC;IAAE,MAAM,EAAE,qBAAqB,CAAA;CAAE,GACjC;IAAE,MAAM,EAAE,mBAAmB,CAAA;CAAE,GAC/B;IAAE,MAAM,EAAE,wBAAwB,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GAChD;IAAE,MAAM,EAAE,uBAAuB,CAAC;IAAC,YAAY,EAAE,IAAI,CAAC;IAAC,cAAc,EAAE,IAAI,CAAA;CAAE,GAC7E;IAAE,MAAM,EAAE,uBAAuB,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GAC/C;IAAE,MAAM,EAAE,oBAAoB,CAAA;CAAE,GAChC;IAAE,MAAM,EAAE,oBAAoB,CAAA;CAAE,GAChC;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC;AA0J1B;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAoG5E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAsG9F"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=enter-action.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enter-action.test.d.ts","sourceRoot":"","sources":["../../src/utils/enter-action.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,29 @@
1
+ import { Editor, Path } from 'slate';
2
+ import type { YooEditor } from '../editor/types';
3
+ type BackspaceResult = {
4
+ action: 'delete-injected-element';
5
+ path: Path;
6
+ } | {
7
+ action: 'delete-block';
8
+ } | {
9
+ action: 'move-cursor';
10
+ targetPath: Path;
11
+ } | {
12
+ action: 'move-to-previous-block';
13
+ } | {
14
+ action: 'merge-with-previous-block';
15
+ } | {
16
+ action: 'default';
17
+ } | {
18
+ action: 'prevent';
19
+ };
20
+ /**
21
+ * Main function to determine the action for Backspace
22
+ */
23
+ export declare function getBackspaceAction(editor: YooEditor, slate: Editor): BackspaceResult;
24
+ /**
25
+ * Executes the Backspace action
26
+ */
27
+ export declare function executeBackspaceAction(editor: YooEditor, slate: Editor, result: BackspaceResult): void;
28
+ export {};
29
+ //# sourceMappingURL=execute-backspace-action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute-backspace-action.d.ts","sourceRoot":"","sources":["../../src/utils/execute-backspace-action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAW,IAAI,EAAqB,MAAM,OAAO,CAAC;AAOjE,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE/D,KAAK,eAAe,GAChB;IAAE,MAAM,EAAE,yBAAyB,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GACjD;IAAE,MAAM,EAAE,cAAc,CAAA;CAAE,GAC1B;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,UAAU,EAAE,IAAI,CAAA;CAAE,GAC3C;IAAE,MAAM,EAAE,wBAAwB,CAAA;CAAE,GACpC;IAAE,MAAM,EAAE,2BAA2B,CAAA;CAAE,GACvC;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC;AA+M1B;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,eAAe,CAmJpF;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,eAAe,GACtB,IAAI,CAkDN"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=execute-backspace-action.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute-backspace-action.test.d.ts","sourceRoot":"","sources":["../../src/utils/execute-backspace-action.test.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { SlateEditor, YooEditor, YooptaPathIndex } from '../editor/types';
1
+ import type { SlateEditor, YooEditor, YooptaPathIndex } from '../editor/types';
2
2
  export declare function findSlateBySelectionPath(editor: YooEditor, options?: {
3
3
  at: YooptaPathIndex;
4
4
  }): SlateEditor | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"findSlateBySelectionPath.d.ts","sourceRoot":"","sources":["../../src/utils/findSlateBySelectionPath.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE1E,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,SAAS,EACjB,OAAO,CAAC,EAAE;IAAE,EAAE,EAAE,eAAe,CAAA;CAAE,GAChC,WAAW,GAAG,SAAS,CAWzB"}
1
+ {"version":3,"file":"findSlateBySelectionPath.d.ts","sourceRoot":"","sources":["../../src/utils/findSlateBySelectionPath.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE/E,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,SAAS,EACjB,OAAO,CAAC,EAAE;IAAE,EAAE,EAAE,eAAe,CAAA;CAAE,GAChC,WAAW,GAAG,SAAS,CAWzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"generateId.d.ts","sourceRoot":"","sources":["../../src/utils/generateId.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,UAAU,cAKtB,CAAC"}
1
+ {"version":3,"file":"generateId.d.ts","sourceRoot":"","sources":["../../src/utils/generateId.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,UAAU,QAAO,MAK7B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { SlateElement, YooEditor } from '../editor/types';
2
+ import type { Plugin } from '../plugins/types';
3
+ export declare function getBlockPlugins(editor: YooEditor): Record<string, Plugin<Record<string, SlateElement>>>;
4
+ //# sourceMappingURL=get-block-plugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-block-plugins.d.ts","sourceRoot":"","sources":["../../src/utils/get-block-plugins.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,wBAAgB,eAAe,CAC7B,MAAM,EAAE,SAAS,GAChB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CActD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=get-block-plugins.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-block-plugins.test.d.ts","sourceRoot":"","sources":["../../src/utils/get-block-plugins.test.ts"],"names":[],"mappings":""}