@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
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/Block/hooks.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CjC,CAAC;AAEF,eAAO,MAAM,cAAc,UAClB,eAAe,aACX,SAAS,GAAG,IAAI,cACf,MAAM,GAAG,SAAS,cAClB,OAAO,UACX,OAAO;;;;;;CAYhB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B/B,CAAC"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/Block/hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,eAAO,MAAM,cAAc,UAClB,eAAe,aACX,SAAS,GAAG,IAAI,cACf,MAAM,GAAG,SAAS,cAClB,OAAO,UACX,OAAO;;;;;;aAYkD,CAAC"}
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import type { YooEditor } from '../../editor/types';
3
+ import type { YooptaMark } from '../../marks';
4
+ type Props = {
5
+ editor: YooEditor;
6
+ marks?: YooptaMark<any>[];
7
+ placeholder?: string;
8
+ };
9
+ declare const RenderBlocks: ({ editor, marks, placeholder }: Props) => JSX.Element[];
10
+ export { RenderBlocks };
11
+ //# sourceMappingURL=render-blocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-blocks.d.ts","sourceRoot":"","sources":["../../../src/components/Editor/render-blocks.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAM9C,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,QAAA,MAAM,YAAY,mCAAoC,KAAK,kBA6C1D,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
- import { CSSProperties, ReactNode } from 'react';
2
- import { YooptaMark } from '../../marks';
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ import type { YooptaMark } from '../../marks';
3
3
  type Props = {
4
4
  marks?: YooptaMark<any>[];
5
5
  selectionBoxRoot?: HTMLElement | React.MutableRefObject<HTMLElement | null> | false;
@@ -12,4 +12,4 @@ type Props = {
12
12
  };
13
13
  declare const Editor: ({ placeholder, marks, className, selectionBoxRoot, width, style, children, autoFocus, }: Props) => import("react/jsx-runtime").JSX.Element;
14
14
  export { Editor };
15
- //# sourceMappingURL=Editor.d.ts.map
15
+ //# sourceMappingURL=render-editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-editor.d.ts","sourceRoot":"","sources":["../../../src/components/Editor/render-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAkB,SAAS,EAAE,MAAM,OAAO,CAAC;AAWtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAO9C,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC;IACpF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAQF,QAAA,MAAM,MAAM,4FAST,KAAK,4CA4SP,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { YooEditor } from '../../editor/types';
1
+ import type { YooEditor } from '../../editor/types';
2
2
  type MultiSelectionOptions = {
3
3
  editor: YooEditor;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../src/components/Editor/selection.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAc,MAAM,oBAAoB,CAAC;AAK3D,KAAK,qBAAqB,GAAG;IAC3B,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,aAAa,EAAE,IAAI,GAAG,MAAM,CAAC;IAC7B,oBAAoB,EAAE,IAAI,GAAG,MAAM,CAAC;CACrC,CAAC;AAQF,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,EAAE,qBAAqB;qBA4CzC,gBAAgB;;;;EA2OzC"}
1
+ {"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../src/components/Editor/selection.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,KAAK,qBAAqB,GAAG;IAC3B,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,aAAa,EAAE,IAAI,GAAG,MAAM,CAAC;IAC7B,oBAAoB,EAAE,IAAI,GAAG,MAAM,CAAC;CACrC,CAAC;AAQF,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,EAAE,qBAAqB;qBAgDzC,gBAAgB;;;;EAyPzC"}
@@ -1,4 +1,4 @@
1
- import { YooptaBlockData, SlateElement, YooptaBlockBaseMeta } from '../../editor/types';
1
+ import type { SlateElement, YooptaBlockBaseMeta, YooptaBlockData } from '../../editor/types';
2
2
  export declare const buildBlockElement: (element?: Partial<SlateElement>) => SlateElement;
3
3
  type BuildBlockDataOptions = Partial<YooptaBlockData<SlateElement>> & {
4
4
  value?: SlateElement[];
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Editor/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGxF,eAAO,MAAM,iBAAiB,aAAc,QAAQ,YAAY,CAAC,KAAG,YAUnE,CAAC;AAEF,KAAK,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,GAAG;IACpE,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,cAAc,WAAY,qBAAqB,KAAG,eAS7D,CAAC;AAEH,eAAO,MAAM,wBAAwB;;CAMpC,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Editor/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG7F,eAAO,MAAM,iBAAiB,aAAc,QAAQ,YAAY,CAAC,KAAG,YAQlE,CAAC;AAEH,KAAK,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,GAAG;IACpE,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,cAAc,WAAY,qBAAqB,KAAG,eAS7D,CAAC;AAEH,eAAO,MAAM,wBAAwB;;CAMpC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { YooEditor } from '../../editor/types';
2
+ import type { YooEditor } from '../../editor/types';
3
3
  export type RectangeSelectionProps = {
4
4
  editor: YooEditor;
5
5
  root?: HTMLElement | React.MutableRefObject<HTMLElement | null> | false;
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionBox.d.ts","sourceRoot":"","sources":["../../../src/components/SelectionBox/SelectionBox.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC;CACzE,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,QAAA,MAAM,YAAY,+BAAgC,iBAAiB,mDAyBlE,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"SelectionBox.d.ts","sourceRoot":"","sources":["../../../src/components/SelectionBox/SelectionBox.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC;CACzE,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,QAAA,MAAM,YAAY,+BAAgC,iBAAiB,mDAyBlE,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,7 +1,7 @@
1
- import { RectangeSelectionProps, RectangeSelectionState } from './SelectionBox';
1
+ import type { RectangeSelectionProps, RectangeSelectionState } from './SelectionBox';
2
2
  type RectangeSelectionReturn = RectangeSelectionState & {
3
3
  onClose: () => void;
4
4
  };
5
- export declare const useRectangeSelectionBox: ({ editor, root }: RectangeSelectionProps) => RectangeSelectionReturn;
5
+ export declare const useRectangeSelectionBox: ({ editor, root, }: RectangeSelectionProps) => RectangeSelectionReturn;
6
6
  export {};
7
7
  //# sourceMappingURL=hooks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/SelectionBox/hooks.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAgChF,KAAK,uBAAuB,GAAG,sBAAsB,GAAG;IACtD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAIF,eAAO,MAAM,uBAAuB,qBAAsB,sBAAsB,KAAG,uBA+FlF,CAAC"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/SelectionBox/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAkCrF,KAAK,uBAAuB,GAAG,sBAAsB,GAAG;IACtD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAIF,eAAO,MAAM,uBAAuB,sBAGjC,sBAAsB,KAAG,uBAwG3B,CAAC"}
@@ -1,7 +1,7 @@
1
- import { ExtendedLeafProps } from '../../plugins/types';
1
+ import type { ExtendedLeafProps } from '../../plugins/types';
2
2
  type Props = Pick<ExtendedLeafProps<any, any>, 'attributes' | 'children'> & {
3
3
  placeholder?: string;
4
4
  };
5
5
  declare const TextLeaf: ({ children, attributes, placeholder }: Props) => import("react/jsx-runtime").JSX.Element;
6
6
  export { TextLeaf };
7
- //# sourceMappingURL=TextLeaf.d.ts.map
7
+ //# sourceMappingURL=text-leaf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-leaf.d.ts","sourceRoot":"","sources":["../../../src/components/text-leaf/text-leaf.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,KAAK,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC,GAAG;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,QAAA,MAAM,QAAQ,0CAA2C,KAAK,4CAa7D,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { YooEditor, YooptaPathIndex } from '../../editor/types';
3
- import { PluginOptions } from '../../plugins/types';
2
+ import type { YooEditor, YooptaPathIndex } from '../../editor/types';
3
+ import type { PluginOptions } from '../../plugins/types';
4
4
  export type YooptaEditorContext = {
5
5
  editor: YooEditor;
6
6
  };
@@ -20,7 +20,7 @@ declare const useYooptaPluginOptions: <TOptions>(pluginType: string) => Partial<
20
20
  display?: {
21
21
  title?: string | undefined;
22
22
  description?: string | undefined;
23
- icon?: import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
23
+ icon?: import("react").ReactNode;
24
24
  } | undefined;
25
25
  shortcuts?: string[] | undefined;
26
26
  HTMLAttributes?: import("react").HTMLAttributes<HTMLElement> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"YooptaContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/YooptaContext/YooptaContext.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AAMF,eAAO,MAAM,aAAa,8CAAuD,CAAC;AAElF;;GAEG;AACH,QAAA,MAAM,qBAAqB;;;6CAQ1B,CAAC;AAEF,QAAA,MAAM,eAAe,QAAO,SAQ3B,CAAC;AAEF,QAAA,MAAM,YAAY,YAAa,MAAM,6EAAwC,CAAC;AAC9E,QAAA,MAAM,gBAAgB,eAAsC,CAAC;AAC7D,QAAA,MAAM,iBAAiB,eAAmC,CAAC;AAC3D,QAAA,MAAM,sBAAsB,yBAA2B,MAAM;;;;;;;;aACc,CAAC;AAE5E,KAAK,qBAAqB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,eAAe,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,eAAe,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnH,QAAA,MAAM,gBAAgB,oBAAqB,qBAAqB,YAkB/D,CAAC;AAEF,OAAO,EACL,eAAe,EACf,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,GACtB,CAAC"}
1
+ {"version":3,"file":"YooptaContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/YooptaContext/YooptaContext.tsx"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AAMF,eAAO,MAAM,aAAa,8CAAuD,CAAC;AAElF;;GAEG;AACH,QAAA,MAAM,qBAAqB;;;6CAU1B,CAAC;AAEF,QAAA,MAAM,eAAe,QAAO,SAQ3B,CAAC;AAEF,QAAA,MAAM,YAAY,YAAa,MAAM,6EAAwC,CAAC;AAC9E,QAAA,MAAM,gBAAgB,eAAsC,CAAC;AAC7D,QAAA,MAAM,iBAAiB,eAAmC,CAAC;AAC3D,QAAA,MAAM,sBAAsB,yBAA2B,MAAM;;;;;;;;aACc,CAAC;AAE5E,KAAK,qBAAqB,GACtB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,eAAe,CAAA;CAAE,GACzC;IAAE,EAAE,EAAE,eAAe,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9C,QAAA,MAAM,gBAAgB,oBAAqB,qBAAqB,YAkB/D,CAAC;AAEF,OAAO,EACL,eAAe,EACf,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,GACtB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { YooptaBlockData, SlateElement, YooptaBlockBaseMeta } from '../../editor/types';
1
+ import type { SlateElement, YooptaBlockBaseMeta, YooptaBlockData } from '../types';
2
2
  export declare const buildBlockElement: (element?: Partial<SlateElement>) => SlateElement;
3
3
  type BuildBlockDataOptions = Partial<Omit<YooptaBlockData<SlateElement>, 'meta'>> & {
4
4
  value?: SlateElement[];
@@ -1 +1 @@
1
- {"version":3,"file":"buildBlockData.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/buildBlockData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGxF,eAAO,MAAM,iBAAiB,aAAc,QAAQ,YAAY,CAAC,KAAG,YAUnE,CAAC;AAEF,KAAK,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG;IAClF,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACrC,CAAC;AAEF,wBAAgB,cAAc,CAAC,KAAK,CAAC,EAAE,qBAAqB,GAAG,eAAe,CAW7E;AAED,eAAO,MAAM,oBAAoB;;CAMhC,CAAC"}
1
+ {"version":3,"file":"buildBlockData.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/buildBlockData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEnF,eAAO,MAAM,iBAAiB,aAAc,QAAQ,YAAY,CAAC,KAAG,YAQlE,CAAC;AAEH,KAAK,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG;IAClF,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACrC,CAAC;AAEF,wBAAgB,cAAc,CAAC,KAAK,CAAC,EAAE,qBAAqB,GAAG,eAAe,CAW7E;AAED,eAAO,MAAM,oBAAoB;;CAMhC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { YooEditor } from '../types';
2
- import { BlockDepthOptions } from './increaseBlockDepth';
1
+ import type { BlockDepthOptions } from './increaseBlockDepth';
2
+ import type { YooEditor } from '../types';
3
3
  export declare function decreaseBlockDepth(editor: YooEditor, options?: BlockDepthOptions): void;
4
4
  //# sourceMappingURL=decreaseBlockDepth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"decreaseBlockDepth.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/decreaseBlockDepth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,GAAE,iBAAsB,QAgBpF"}
1
+ {"version":3,"file":"decreaseBlockDepth.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/decreaseBlockDepth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,GAAE,iBAAsB,QAgBpF"}
@@ -1,17 +1,48 @@
1
- import { YooEditor, YooptaPathIndex } from '../types';
2
- type DeleteBlockByIdOptions = {
3
- blockId: string;
4
- at?: never;
5
- };
6
- type DeleteBlockByPathOptions = {
7
- at: YooptaPathIndex;
8
- blockId?: never;
9
- };
10
- export type DeleteBlockOptions = (DeleteBlockByIdOptions & {
1
+ import type { YooEditor, YooptaPathIndex } from '../types';
2
+ export type DeleteBlockOptions = {
3
+ /**
4
+ * Block to delete (by path or id)
5
+ * @default editor.path.current
6
+ */
7
+ at?: YooptaPathIndex;
8
+ blockId?: string;
9
+ /**
10
+ * Focus after delete
11
+ * @default true
12
+ */
11
13
  focus?: boolean;
12
- }) | (DeleteBlockByPathOptions & {
13
- focus?: boolean;
14
- });
15
- export declare function deleteBlock(editor: YooEditor, options: DeleteBlockOptions): void;
16
- export {};
14
+ /**
15
+ * Focus target after delete
16
+ * - 'previous': focus previous block (default)
17
+ * - 'next': focus next block
18
+ * - 'none': don't focus anything
19
+ * @default 'previous'
20
+ */
21
+ focusTarget?: 'previous' | 'next' | 'none';
22
+ };
23
+ /**
24
+ * Delete a block
25
+ *
26
+ * @param editor - YooEditor instance
27
+ * @param options - Delete options
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * // Delete current block
32
+ * editor.deleteBlock();
33
+ *
34
+ * // Delete specific block by path
35
+ * editor.deleteBlock({ at: 3 });
36
+ *
37
+ * // Delete specific block by id
38
+ * editor.deleteBlock({ blockId: 'block-123' });
39
+ *
40
+ * // Delete without focusing
41
+ * editor.deleteBlock({ at: 3, focus: false });
42
+ *
43
+ * // Delete and focus next block instead of previous
44
+ * editor.deleteBlock({ at: 3, focusTarget: 'next' });
45
+ * ```
46
+ */
47
+ export declare function deleteBlock(editor: YooEditor, options?: DeleteBlockOptions): void;
17
48
  //# sourceMappingURL=deleteBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deleteBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/deleteBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKtD,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,KAAK,CAAC;CACZ,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,EAAE,EAAE,eAAe,CAAC;IACpB,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAC1B,CAAC,sBAAsB,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,GAC9C,CAAC,wBAAwB,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAErD,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,QAyCzE"}
1
+ {"version":3,"file":"deleteBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/deleteBlock.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3D,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;CAC5C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,GAAE,kBAAuB,GAAG,IAAI,CAoDrF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=deleteBlock.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteBlock.test.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/deleteBlock.test.ts"],"names":[],"mappings":""}
@@ -1,14 +1,49 @@
1
- import { YooEditor, YooptaPathIndex } from '../types';
1
+ import type { SlateElement, YooEditor, YooptaPathIndex } from '../types';
2
2
  export type DuplicateBlockOptions = {
3
- original: {
4
- blockId?: never;
5
- path: YooptaPathIndex;
6
- } | {
7
- blockId: string;
8
- path?: never;
9
- };
10
- focus?: boolean;
3
+ /**
4
+ * Block to duplicate (by path or id)
5
+ * @default editor.path.current
6
+ */
11
7
  at?: YooptaPathIndex;
8
+ blockId?: string;
9
+ /**
10
+ * Position to insert duplicate
11
+ * If not provided, inserts after original block
12
+ * @default original.meta.order + 1
13
+ */
14
+ insertAt?: YooptaPathIndex;
15
+ /**
16
+ * Focus after duplicate
17
+ * @default true
18
+ */
19
+ focus?: boolean;
20
+ /**
21
+ * Custom element structure for duplicate
22
+ * If provided, overrides default duplication
23
+ */
24
+ elements?: SlateElement;
12
25
  };
13
- export declare function duplicateBlock(editor: YooEditor, options: DuplicateBlockOptions): any;
26
+ /**
27
+ * Duplicate a block
28
+ *
29
+ * @param editor - YooEditor instance
30
+ * @param options - Duplicate options
31
+ * @returns ID of the newly created block
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * // Duplicate current block
36
+ * const newId = editor.duplicateBlock();
37
+ *
38
+ * // Duplicate specific block by path
39
+ * const newId = editor.duplicateBlock({ at: 3 });
40
+ *
41
+ * // Duplicate specific block by id
42
+ * const newId = editor.duplicateBlock({ blockId: 'block-123' });
43
+ *
44
+ * // Duplicate and insert at specific position
45
+ * const newId = editor.duplicateBlock({ at: 3, insertAt: 0 });
46
+ * ```
47
+ */
48
+ export declare function duplicateBlock(editor: YooEditor, options?: DuplicateBlockOptions): string | undefined;
14
49
  //# sourceMappingURL=duplicateBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"duplicateBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/duplicateBlock.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAgC,eAAe,EAAE,MAAM,UAAU,CAAC;AAEpF,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE;QAAE,OAAO,CAAC,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,eAAe,CAAA;KAAE,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,KAAK,CAAA;KAAE,CAAC;IACzF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,EAAE,CAAC,EAAE,eAAe,CAAC;CACtB,CAAC;AAEF,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,qBAAqB,OAyC/E"}
1
+ {"version":3,"file":"duplicateBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/duplicateBlock.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAmB,eAAe,EAAE,MAAM,UAAU,CAAC;AAG1F,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAE3B;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,SAAS,EACjB,OAAO,GAAE,qBAA0B,GAClC,MAAM,GAAG,SAAS,CA2CpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=duplicateBlock.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duplicateBlock.test.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/duplicateBlock.test.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { FocusAt, SlateEditor, YooEditor } from '../types';
1
+ import type { FocusAt, SlateEditor, YooEditor } from '../types';
2
2
  export type FocusBlockOptions = {
3
3
  waitExecution?: boolean;
4
4
  waitExecutionMs?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"focusBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/focusBlock.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE3D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAkBF,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,QAiC7F"}
1
+ {"version":3,"file":"focusBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/focusBlock.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEhE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAkBF,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,QAoC7F"}
@@ -1,7 +1,7 @@
1
- import { YooEditor, YooptaPathIndex } from '../types';
1
+ import type { YooEditor, YooptaBlockData, YooptaPathIndex } from '../types';
2
2
  export type GetBlockOptions = {
3
3
  at?: YooptaPathIndex;
4
4
  id?: string;
5
5
  };
6
- export declare function getBlock(editor: YooEditor, options: GetBlockOptions): import("../types").YooptaBlockData<import("slate").Descendant> | null;
6
+ export declare function getBlock(editor: YooEditor, options: GetBlockOptions): YooptaBlockData | null;
7
7
  //# sourceMappingURL=getBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/getBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,yEAkBnE"}
1
+ {"version":3,"file":"getBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/getBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5E,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,GAAG,eAAe,GAAG,IAAI,CAkB5F"}
@@ -1,7 +1,7 @@
1
- import { SlateEditor, YooEditor, YooptaPathIndex } from '../types';
1
+ import type { SlateEditor, YooEditor, YooptaPathIndex } from '../types';
2
2
  export type GetBlockSlateOptions = {
3
3
  at?: YooptaPathIndex;
4
4
  id?: string;
5
5
  };
6
- export declare function getBlockSlate(editor: YooEditor, options: GetBlockSlateOptions): SlateEditor;
6
+ export declare function getBlockSlate(editor: YooEditor, options: GetBlockSlateOptions): SlateEditor | null;
7
7
  //# sourceMappingURL=getBlockSlate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBlockSlate.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/getBlockSlate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAmB,eAAe,EAAE,MAAM,UAAU,CAAC;AAEpF,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,oBAAoB,GAAG,WAAW,CAqB3F"}
1
+ {"version":3,"file":"getBlockSlate.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/getBlockSlate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAExE,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,wBAAgB,aAAa,CAC3B,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,oBAAoB,GAC5B,WAAW,GAAG,IAAI,CAepB"}
@@ -1,4 +1,4 @@
1
- import { YooEditor, YooptaPathIndex } from '../types';
1
+ import type { YooEditor, YooptaPathIndex } from '../types';
2
2
  export type BlockDepthOptions = {
3
3
  blockId?: string;
4
4
  at?: YooptaPathIndex;
@@ -1 +1 @@
1
- {"version":3,"file":"increaseBlockDepth.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/increaseBlockDepth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGtD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,eAAe,CAAC;CACtB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,GAAE,iBAAsB,QAgBpF"}
1
+ {"version":3,"file":"increaseBlockDepth.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/increaseBlockDepth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,eAAe,CAAC;CACtB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,GAAE,iBAAsB,QAgBpF"}
@@ -1,17 +1,17 @@
1
- import { insertBlock } from './insertBlock';
2
- import { deleteBlock } from './deleteBlock';
3
- import { moveBlock } from './moveBlock';
4
- import { focusBlock } from './focusBlock';
5
- import { splitBlock } from './splitBlock';
6
- import { increaseBlockDepth } from './increaseBlockDepth';
1
+ import { buildBlockData } from './buildBlockData';
7
2
  import { decreaseBlockDepth } from './decreaseBlockDepth';
3
+ import { deleteBlock } from './deleteBlock';
8
4
  import { duplicateBlock } from './duplicateBlock';
9
- import { updateBlock } from './updateBlock';
10
- import { toggleBlock } from './toggleBlock';
5
+ import { focusBlock } from './focusBlock';
11
6
  import { getBlock } from './getBlock';
12
7
  import { getBlockSlate } from './getBlockSlate';
8
+ import { increaseBlockDepth } from './increaseBlockDepth';
9
+ import { insertBlock } from './insertBlock';
13
10
  import { mergeBlock } from './mergeBlock';
14
- import { buildBlockData } from './buildBlockData';
11
+ import { moveBlock } from './moveBlock';
12
+ import { splitBlock } from './splitBlock';
13
+ import { toggleBlock } from './toggleBlock';
14
+ import { updateBlock } from './updateBlock';
15
15
  export declare const Blocks: {
16
16
  insertBlock: typeof insertBlock;
17
17
  deleteBlock: typeof deleteBlock;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;CAelB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;CAelB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC"}
@@ -1,8 +1,35 @@
1
- import { YooEditor, YooptaBlockData, YooptaPathIndex } from '../types';
1
+ import type { SlateElement, YooEditor, YooptaBlockData, YooptaPathIndex } from '../types';
2
2
  export type InsertBlockOptions = {
3
3
  at?: YooptaPathIndex;
4
4
  focus?: boolean;
5
5
  blockData?: Omit<Partial<YooptaBlockData>, 'type'>;
6
+ /**
7
+ * Element structure created with editor.y()
8
+ * If provided, this will be used as the block's value
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * editor.insertBlock('Accordion', {
13
+ * elements: editor.y('accordion-list', {
14
+ * children: [
15
+ * editor.y('accordion-list-item', {
16
+ * props: { isExpanded: false },
17
+ * children: [
18
+ * editor.y('accordion-list-item-heading'),
19
+ * editor.y('accordion-list-item-content', {
20
+ * children: [
21
+ * editor.y('paragraph'),
22
+ * editor.y('heading-one')
23
+ * ]
24
+ * })
25
+ * ]
26
+ * })
27
+ * ]
28
+ * })
29
+ * });
30
+ * ```
31
+ */
32
+ elements?: SlateElement;
6
33
  };
7
34
  export declare function insertBlock(editor: YooEditor, type: string, options?: InsertBlockOptions): string;
8
35
  //# sourceMappingURL=insertBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"insertBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/insertBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGvE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC,CAAC;CACpD,CAAC;AAIF,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,UAqC5F"}
1
+ {"version":3,"file":"insertBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/insertBlock.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE1F,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC,CAAC;IACnD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB,CAAC;AAIF,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,UA6C5F"}
@@ -1,3 +1,49 @@
1
- import { YooEditor } from '../types';
2
- export declare function mergeBlock(editor: YooEditor): void;
1
+ import type { YooEditor, YooptaPathIndex } from '../types';
2
+ export type MergeBlockOptions = {
3
+ /**
4
+ * Source block to merge (the one that will be merged into target)
5
+ * @default editor.path.current
6
+ */
7
+ at?: YooptaPathIndex;
8
+ blockId?: string;
9
+ /**
10
+ * Target block to merge into (the one that will receive content)
11
+ * If not provided, uses previous block
12
+ * @default previous block
13
+ */
14
+ targetAt?: YooptaPathIndex;
15
+ targetBlockId?: string;
16
+ /**
17
+ * Focus after merge
18
+ * @default true
19
+ */
20
+ focus?: boolean;
21
+ /**
22
+ * Preserve content from source block
23
+ * @default true
24
+ */
25
+ preserveContent?: boolean;
26
+ };
27
+ /**
28
+ * Merge a block into another block
29
+ *
30
+ * @param editor - YooEditor instance
31
+ * @param options - Merge options
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * // Merge current block into previous (default behavior)
36
+ * editor.mergeBlock();
37
+ *
38
+ * // Merge specific block into previous
39
+ * editor.mergeBlock({ at: 5 });
40
+ *
41
+ * // Merge block at index 5 into block at index 3
42
+ * editor.mergeBlock({ at: 5, targetAt: 3 });
43
+ *
44
+ * // Merge without focusing
45
+ * editor.mergeBlock({ focus: false });
46
+ * ```
47
+ */
48
+ export declare function mergeBlock(editor: YooEditor, options?: MergeBlockOptions): void;
3
49
  //# sourceMappingURL=mergeBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mergeBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/mergeBlock.ts"],"names":[],"mappings":"AAOA,OAAO,EAAgB,SAAS,EAAE,MAAM,UAAU,CAAC;AAGnD,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,QAiE3C"}
1
+ {"version":3,"file":"mergeBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/mergeBlock.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAgB,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIzE,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAoBF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,GAAE,iBAAsB,GAAG,IAAI,CA8GnF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=mergeBlock.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeBlock.test.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/mergeBlock.test.ts"],"names":[],"mappings":""}
@@ -1,3 +1,3 @@
1
- import { YooEditor, YooptaPathIndex } from '../types';
1
+ import type { YooEditor, YooptaPathIndex } from '../types';
2
2
  export declare function moveBlock(editor: YooEditor, draggedBlockId: string, newPath: YooptaPathIndex): void;
3
3
  //# sourceMappingURL=moveBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"moveBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/moveBlock.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEtD,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,QA2B5F"}
1
+ {"version":3,"file":"moveBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/moveBlock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3D,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,QA4B5F"}
@@ -1,7 +1,55 @@
1
- import { SlateEditor, YooEditor } from '../types';
1
+ import type { Location } from 'slate';
2
+ import type { YooEditor, YooptaPathIndex } from '../types';
2
3
  export type SplitBlockOptions = {
4
+ /**
5
+ * Block to split
6
+ * @default editor.path.current
7
+ */
8
+ at?: YooptaPathIndex;
9
+ blockId?: string;
10
+ /**
11
+ * Split position (selection point)
12
+ * If not provided, uses current selection
13
+ * @default slate.selection
14
+ */
15
+ splitAt?: Location;
16
+ /**
17
+ * Focus after split
18
+ * @default true
19
+ */
3
20
  focus?: boolean;
4
- slate?: SlateEditor;
21
+ /**
22
+ * Focus target after split
23
+ * - 'new': focus the new block (default)
24
+ * - 'original': focus the original block
25
+ * - 'none': don't focus anything
26
+ * @default 'new'
27
+ */
28
+ focusTarget?: 'new' | 'original' | 'none';
29
+ /**
30
+ * Preserve content in both blocks
31
+ * @default true
32
+ */
33
+ preserveContent?: boolean;
5
34
  };
6
- export declare function splitBlock(editor: YooEditor, options?: SplitBlockOptions): void;
35
+ /**
36
+ * Split a block at the selection point or specified position
37
+ *
38
+ * @param editor - YooEditor instance
39
+ * @param options - Split options
40
+ * @returns ID of the newly created block, or undefined if split failed
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * // Split current block at selection
45
+ * const newBlockId = editor.splitBlock();
46
+ *
47
+ * // Split specific block
48
+ * const newBlockId = editor.splitBlock({ at: 3 });
49
+ *
50
+ * // Split and focus original block
51
+ * const newBlockId = editor.splitBlock({ focusTarget: 'original' });
52
+ * ```
53
+ */
54
+ export declare function splitBlock(editor: YooEditor, options?: SplitBlockOptions): string | undefined;
7
55
  //# sourceMappingURL=splitBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"splitBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/splitBlock.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAgB,SAAS,EAAmB,MAAM,UAAU,CAAC;AAIjF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,GAAE,iBAAsB,QA6C5E"}
1
+ {"version":3,"file":"splitBlock.d.ts","sourceRoot":"","sources":["../../../src/editor/blocks/splitBlock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQtC,OAAO,KAAK,EAAgB,SAAS,EAAmB,eAAe,EAAE,MAAM,UAAU,CAAC;AAI1F,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,QAAQ,CAAC;IAEnB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,MAAM,CAAC;IAE1C;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAoEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,GAAE,iBAAsB,GAAG,MAAM,GAAG,SAAS,CAwHjG"}