@yoopta/editor 4.9.8 → 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 (349) 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 +8 -1715
  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/insertBlock.test.d.ts +2 -0
  47. package/dist/editor/blocks/insertBlock.test.d.ts.map +1 -0
  48. package/dist/editor/blocks/mergeBlock.d.ts +48 -2
  49. package/dist/editor/blocks/mergeBlock.d.ts.map +1 -1
  50. package/dist/editor/blocks/mergeBlock.test.d.ts +2 -0
  51. package/dist/editor/blocks/mergeBlock.test.d.ts.map +1 -0
  52. package/dist/editor/blocks/moveBlock.d.ts +1 -1
  53. package/dist/editor/blocks/moveBlock.d.ts.map +1 -1
  54. package/dist/editor/blocks/splitBlock.d.ts +51 -3
  55. package/dist/editor/blocks/splitBlock.d.ts.map +1 -1
  56. package/dist/editor/blocks/splitBlock.test.d.ts +2 -0
  57. package/dist/editor/blocks/splitBlock.test.d.ts.map +1 -0
  58. package/dist/editor/blocks/toggleBlock.d.ts +51 -5
  59. package/dist/editor/blocks/toggleBlock.d.ts.map +1 -1
  60. package/dist/editor/blocks/toggleBlock.test.d.ts +2 -0
  61. package/dist/editor/blocks/toggleBlock.test.d.ts.map +1 -0
  62. package/dist/editor/blocks/updateBlock.d.ts +1 -1
  63. package/dist/editor/blocks/updateBlock.d.ts.map +1 -1
  64. package/dist/editor/core/applyTransforms.d.ts +2 -2
  65. package/dist/editor/core/applyTransforms.d.ts.map +1 -1
  66. package/dist/editor/core/batchOperations.d.ts +1 -1
  67. package/dist/editor/core/batchOperations.d.ts.map +1 -1
  68. package/dist/editor/core/blur.d.ts +1 -1
  69. package/dist/editor/core/blur.d.ts.map +1 -1
  70. package/dist/editor/core/focus.d.ts +1 -1
  71. package/dist/editor/core/focus.d.ts.map +1 -1
  72. package/dist/editor/core/getEditorValue.d.ts +1 -1
  73. package/dist/editor/core/getEditorValue.d.ts.map +1 -1
  74. package/dist/editor/core/history.d.ts +4 -4
  75. package/dist/editor/core/history.d.ts.map +1 -1
  76. package/dist/editor/core/isEmpty.d.ts +1 -1
  77. package/dist/editor/core/isEmpty.d.ts.map +1 -1
  78. package/dist/editor/core/isFocused.d.ts +1 -1
  79. package/dist/editor/core/isFocused.d.ts.map +1 -1
  80. package/dist/editor/core/setEditorValue.d.ts +1 -1
  81. package/dist/editor/core/setEditorValue.d.ts.map +1 -1
  82. package/dist/editor/elements/create-element-structure.d.ts +150 -0
  83. package/dist/editor/elements/create-element-structure.d.ts.map +1 -0
  84. package/dist/editor/elements/create-element-structure.test.d.ts +2 -0
  85. package/dist/editor/elements/create-element-structure.test.d.ts.map +1 -0
  86. package/dist/editor/elements/deleteElement.d.ts +78 -7
  87. package/dist/editor/elements/deleteElement.d.ts.map +1 -1
  88. package/dist/editor/elements/getElement.d.ts +26 -4
  89. package/dist/editor/elements/getElement.d.ts.map +1 -1
  90. package/dist/editor/elements/getElement.test.d.ts +2 -0
  91. package/dist/editor/elements/getElement.test.d.ts.map +1 -0
  92. package/dist/editor/elements/getElementChildren.d.ts +20 -4
  93. package/dist/editor/elements/getElementChildren.d.ts.map +1 -1
  94. package/dist/editor/elements/getElementChildren.test.d.ts +2 -0
  95. package/dist/editor/elements/getElementChildren.test.d.ts.map +1 -0
  96. package/dist/editor/elements/getElementEntry.d.ts +26 -7
  97. package/dist/editor/elements/getElementEntry.d.ts.map +1 -1
  98. package/dist/editor/elements/getElementEntry.test.d.ts +2 -0
  99. package/dist/editor/elements/getElementEntry.test.d.ts.map +1 -0
  100. package/dist/editor/elements/getElementPath.d.ts +20 -3
  101. package/dist/editor/elements/getElementPath.d.ts.map +1 -1
  102. package/dist/editor/elements/getElementPath.test.d.ts +2 -0
  103. package/dist/editor/elements/getElementPath.test.d.ts.map +1 -0
  104. package/dist/editor/elements/getElements.d.ts +26 -0
  105. package/dist/editor/elements/getElements.d.ts.map +1 -0
  106. package/dist/editor/elements/getElements.test.d.ts +2 -0
  107. package/dist/editor/elements/getElements.test.d.ts.map +1 -0
  108. package/dist/editor/elements/getParentElementPath.d.ts +20 -3
  109. package/dist/editor/elements/getParentElementPath.d.ts.map +1 -1
  110. package/dist/editor/elements/getParentElementPath.test.d.ts +2 -0
  111. package/dist/editor/elements/getParentElementPath.test.d.ts.map +1 -0
  112. package/dist/editor/elements/htmlElToSlateNode.d.ts +4 -0
  113. package/dist/editor/elements/htmlElToSlateNode.d.ts.map +1 -0
  114. package/dist/editor/elements/index.d.ts +10 -9
  115. package/dist/editor/elements/index.d.ts.map +1 -1
  116. package/dist/editor/elements/insertElement.d.ts +22 -0
  117. package/dist/editor/elements/insertElement.d.ts.map +1 -0
  118. package/dist/editor/elements/insertElement.test.d.ts +2 -0
  119. package/dist/editor/elements/insertElement.test.d.ts.map +1 -0
  120. package/dist/editor/elements/isElementEmpty.d.ts +20 -7
  121. package/dist/editor/elements/isElementEmpty.d.ts.map +1 -1
  122. package/dist/editor/elements/isElementEmpty.test.d.ts +2 -0
  123. package/dist/editor/elements/isElementEmpty.test.d.ts.map +1 -0
  124. package/dist/editor/elements/types.d.ts +73 -0
  125. package/dist/editor/elements/types.d.ts.map +1 -0
  126. package/dist/editor/elements/updateElement.d.ts +69 -7
  127. package/dist/editor/elements/updateElement.d.ts.map +1 -1
  128. package/dist/editor/index.d.ts +1 -2
  129. package/dist/editor/index.d.ts.map +1 -1
  130. package/dist/editor/paths/getBlockOrder.d.ts +3 -0
  131. package/dist/editor/paths/getBlockOrder.d.ts.map +1 -0
  132. package/dist/editor/paths/getNextBlockOrder.d.ts +3 -0
  133. package/dist/editor/paths/getNextBlockOrder.d.ts.map +1 -0
  134. package/dist/editor/paths/getPreviousBlockOrder.d.ts +3 -0
  135. package/dist/editor/paths/getPreviousBlockOrder.d.ts.map +1 -0
  136. package/dist/editor/paths/getSelectedPaths.d.ts +1 -1
  137. package/dist/editor/paths/getSelectedPaths.d.ts.map +1 -1
  138. package/dist/editor/paths/index.d.ts +10 -8
  139. package/dist/editor/paths/index.d.ts.map +1 -1
  140. package/dist/editor/paths/isBlockSelected.d.ts +1 -1
  141. package/dist/editor/paths/isBlockSelected.d.ts.map +1 -1
  142. package/dist/editor/paths/isPathEmpty.d.ts +1 -1
  143. package/dist/editor/paths/isPathEmpty.d.ts.map +1 -1
  144. package/dist/editor/paths/setPath.d.ts +1 -1
  145. package/dist/editor/paths/setPath.d.ts.map +1 -1
  146. package/dist/editor/selection/getAnchor.d.ts +20 -0
  147. package/dist/editor/selection/getAnchor.d.ts.map +1 -0
  148. package/dist/editor/selection/getCurrent.d.ts +20 -0
  149. package/dist/editor/selection/getCurrent.d.ts.map +1 -0
  150. package/dist/editor/selection/getEnd.d.ts +20 -0
  151. package/dist/editor/selection/getEnd.d.ts.map +1 -0
  152. package/dist/editor/selection/getFirstPoint.d.ts +23 -0
  153. package/dist/editor/selection/getFirstPoint.d.ts.map +1 -0
  154. package/dist/editor/selection/getFocus.d.ts +20 -0
  155. package/dist/editor/selection/getFocus.d.ts.map +1 -0
  156. package/dist/editor/selection/getLastPoint.d.ts +23 -0
  157. package/dist/editor/selection/getLastPoint.d.ts.map +1 -0
  158. package/dist/editor/selection/getNext.d.ts +20 -0
  159. package/dist/editor/selection/getNext.d.ts.map +1 -0
  160. package/dist/editor/selection/getPrevious.d.ts +20 -0
  161. package/dist/editor/selection/getPrevious.d.ts.map +1 -0
  162. package/dist/editor/selection/getRange.d.ts +21 -0
  163. package/dist/editor/selection/getRange.d.ts.map +1 -0
  164. package/dist/editor/selection/getSelected.d.ts +20 -0
  165. package/dist/editor/selection/getSelected.d.ts.map +1 -0
  166. package/dist/editor/selection/getSlateSelection.d.ts +23 -0
  167. package/dist/editor/selection/getSlateSelection.d.ts.map +1 -0
  168. package/dist/editor/selection/getStart.d.ts +20 -0
  169. package/dist/editor/selection/getStart.d.ts.map +1 -0
  170. package/dist/editor/selection/index.d.ts +43 -0
  171. package/dist/editor/selection/index.d.ts.map +1 -0
  172. package/dist/editor/selection/isBlockSelected.d.ts +23 -0
  173. package/dist/editor/selection/isBlockSelected.d.ts.map +1 -0
  174. package/dist/editor/selection/isCollapsed.d.ts +20 -0
  175. package/dist/editor/selection/isCollapsed.d.ts.map +1 -0
  176. package/dist/editor/selection/isEmpty.d.ts +14 -0
  177. package/dist/editor/selection/isEmpty.d.ts.map +1 -0
  178. package/dist/editor/selection/isExpanded.d.ts +20 -0
  179. package/dist/editor/selection/isExpanded.d.ts.map +1 -0
  180. package/dist/editor/selection/setCurrent.d.ts +22 -0
  181. package/dist/editor/selection/setCurrent.d.ts.map +1 -0
  182. package/dist/editor/selection/setSelected.d.ts +25 -0
  183. package/dist/editor/selection/setSelected.d.ts.map +1 -0
  184. package/dist/editor/selection/setSlateSelection.d.ts +24 -0
  185. package/dist/editor/selection/setSlateSelection.d.ts.map +1 -0
  186. package/dist/editor/selection/types.d.ts +128 -0
  187. package/dist/editor/selection/types.d.ts.map +1 -0
  188. package/dist/editor/textFormats/addMark.d.ts +33 -0
  189. package/dist/editor/textFormats/addMark.d.ts.map +1 -0
  190. package/dist/editor/textFormats/clearMarks.d.ts +27 -0
  191. package/dist/editor/textFormats/clearMarks.d.ts.map +1 -0
  192. package/dist/editor/textFormats/getMarks.d.ts +20 -0
  193. package/dist/editor/textFormats/getMarks.d.ts.map +1 -0
  194. package/dist/editor/textFormats/getValue.d.ts +22 -2
  195. package/dist/editor/textFormats/getValue.d.ts.map +1 -1
  196. package/dist/editor/textFormats/index.d.ts +21 -0
  197. package/dist/editor/textFormats/index.d.ts.map +1 -0
  198. package/dist/editor/textFormats/isActive.d.ts +22 -2
  199. package/dist/editor/textFormats/isActive.d.ts.map +1 -1
  200. package/dist/editor/textFormats/removeMark.d.ts +28 -0
  201. package/dist/editor/textFormats/removeMark.d.ts.map +1 -0
  202. package/dist/editor/textFormats/toggle.d.ts +33 -2
  203. package/dist/editor/textFormats/toggle.d.ts.map +1 -1
  204. package/dist/editor/textFormats/types.d.ts +177 -0
  205. package/dist/editor/textFormats/types.d.ts.map +1 -0
  206. package/dist/editor/textFormats/update.d.ts +32 -2
  207. package/dist/editor/textFormats/update.d.ts.map +1 -1
  208. package/dist/editor/types.d.ts +54 -30
  209. package/dist/editor/types.d.ts.map +1 -1
  210. package/dist/extensions/shortcuts.d.ts +6 -2
  211. package/dist/extensions/shortcuts.d.ts.map +1 -1
  212. package/dist/handlers/index.d.ts +1 -1
  213. package/dist/handlers/index.d.ts.map +1 -1
  214. package/dist/handlers/onKeyDown.d.ts +1 -2
  215. package/dist/handlers/onKeyDown.d.ts.map +1 -1
  216. package/dist/index.d.ts +14 -10
  217. package/dist/index.d.ts.map +1 -1
  218. package/dist/index.js +1 -6
  219. package/dist/marks/index.d.ts +1 -1
  220. package/dist/marks/index.d.ts.map +1 -1
  221. package/dist/parsers/deserializeHTML.d.ts +1 -1
  222. package/dist/parsers/deserializeHTML.d.ts.map +1 -1
  223. package/dist/parsers/deserializeTextNodes.d.ts +2 -2
  224. package/dist/parsers/deserializeTextNodes.d.ts.map +1 -1
  225. package/dist/parsers/getEmail.d.ts +2 -4
  226. package/dist/parsers/getEmail.d.ts.map +1 -1
  227. package/dist/parsers/getHTML.d.ts +1 -1
  228. package/dist/parsers/getHTML.d.ts.map +1 -1
  229. package/dist/parsers/getMarkdown.d.ts +1 -1
  230. package/dist/parsers/getMarkdown.d.ts.map +1 -1
  231. package/dist/parsers/getPlainText.d.ts +1 -1
  232. package/dist/parsers/getPlainText.d.ts.map +1 -1
  233. package/dist/plugins/build-plugin-elements.d.ts +13 -0
  234. package/dist/plugins/build-plugin-elements.d.ts.map +1 -0
  235. package/dist/plugins/build-plugin-elements.test.d.ts +2 -0
  236. package/dist/plugins/build-plugin-elements.test.d.ts.map +1 -0
  237. package/dist/plugins/create-yoopta-plugin.d.ts +32 -0
  238. package/dist/plugins/create-yoopta-plugin.d.ts.map +1 -0
  239. package/dist/plugins/create-yoopta-plugin.test.d.ts +2 -0
  240. package/dist/plugins/create-yoopta-plugin.test.d.ts.map +1 -0
  241. package/dist/plugins/extenstions/{withInlines.d.ts → with-inlines.d.ts} +2 -2
  242. package/dist/plugins/extenstions/with-inlines.d.ts.map +1 -0
  243. package/dist/plugins/hooks.d.ts +4 -4
  244. package/dist/plugins/hooks.d.ts.map +1 -1
  245. package/dist/plugins/index.d.ts +1 -1
  246. package/dist/plugins/index.d.ts.map +1 -1
  247. package/dist/plugins/slate-editor-component.d.ts +12 -0
  248. package/dist/plugins/slate-editor-component.d.ts.map +1 -0
  249. package/dist/plugins/types.d.ts +32 -21
  250. package/dist/plugins/types.d.ts.map +1 -1
  251. package/dist/utils/{blockElements.d.ts → block-elements.d.ts} +16 -7
  252. package/dist/utils/block-elements.d.ts.map +1 -0
  253. package/dist/utils/build-slate.d.ts +4 -0
  254. package/dist/utils/build-slate.d.ts.map +1 -0
  255. package/dist/utils/{editorBuilders.d.ts → editor-builders.d.ts} +4 -6
  256. package/dist/utils/editor-builders.d.ts.map +1 -0
  257. package/dist/utils/editor-builders.test.d.ts +2 -0
  258. package/dist/utils/editor-builders.test.d.ts.map +1 -0
  259. package/dist/utils/enter-action.d.ts +40 -0
  260. package/dist/utils/enter-action.d.ts.map +1 -0
  261. package/dist/utils/enter-action.test.d.ts +2 -0
  262. package/dist/utils/enter-action.test.d.ts.map +1 -0
  263. package/dist/utils/execute-backspace-action.d.ts +29 -0
  264. package/dist/utils/execute-backspace-action.d.ts.map +1 -0
  265. package/dist/utils/execute-backspace-action.test.d.ts +2 -0
  266. package/dist/utils/execute-backspace-action.test.d.ts.map +1 -0
  267. package/dist/utils/findSlateBySelectionPath.d.ts +1 -1
  268. package/dist/utils/findSlateBySelectionPath.d.ts.map +1 -1
  269. package/dist/utils/generateId.d.ts.map +1 -1
  270. package/dist/utils/get-block-plugins.d.ts +4 -0
  271. package/dist/utils/get-block-plugins.d.ts.map +1 -0
  272. package/dist/utils/get-block-plugins.test.d.ts +2 -0
  273. package/dist/utils/get-block-plugins.test.d.ts.map +1 -0
  274. package/dist/utils/get-next-hierarchical-selection.d.ts +20 -0
  275. package/dist/utils/get-next-hierarchical-selection.d.ts.map +1 -0
  276. package/dist/utils/get-next-hierarchical-selection.test.d.ts +2 -0
  277. package/dist/utils/get-next-hierarchical-selection.test.d.ts.map +1 -0
  278. package/dist/utils/get-node-points.d.ts +5 -0
  279. package/dist/utils/get-node-points.d.ts.map +1 -0
  280. package/dist/utils/get-node-points.test.d.ts +2 -0
  281. package/dist/utils/get-node-points.test.d.ts.map +1 -0
  282. package/dist/utils/getMaxOffsetInElement.d.ts.map +1 -1
  283. package/dist/utils/invariant.d.ts +2 -0
  284. package/dist/utils/invariant.d.ts.map +1 -0
  285. package/dist/utils/types.d.ts.map +1 -1
  286. package/dist/utils/validations.d.ts +3 -0
  287. package/dist/utils/validations.d.ts.map +1 -0
  288. package/dist/utils/weakMaps.d.ts +1 -2
  289. package/dist/utils/weakMaps.d.ts.map +1 -1
  290. package/dist/yoopta-editor.d.ts +28 -0
  291. package/dist/yoopta-editor.d.ts.map +1 -0
  292. package/package.json +11 -11
  293. package/dist/UI/BlockOptions/BlockOptions.d.ts +0 -25
  294. package/dist/UI/BlockOptions/BlockOptions.d.ts.map +0 -1
  295. package/dist/UI/BlockOptions/utils.d.ts +0 -33
  296. package/dist/UI/BlockOptions/utils.d.ts.map +0 -1
  297. package/dist/UI/ExtendedBlockActions/ExtendedBlockActions.d.ts +0 -11
  298. package/dist/UI/ExtendedBlockActions/ExtendedBlockActions.d.ts.map +0 -1
  299. package/dist/UI/Overlay/Overlay.d.ts +0 -12
  300. package/dist/UI/Overlay/Overlay.d.ts.map +0 -1
  301. package/dist/UI/Portal/Portal.d.ts +0 -8
  302. package/dist/UI/Portal/Portal.d.ts.map +0 -1
  303. package/dist/UI/index.d.ts +0 -38
  304. package/dist/UI/index.d.ts.map +0 -1
  305. package/dist/YooptaEditor.d.ts +0 -30
  306. package/dist/YooptaEditor.d.ts.map +0 -1
  307. package/dist/components/Block/FloatingBlockActions.d.ts +0 -14
  308. package/dist/components/Block/FloatingBlockActions.d.ts.map +0 -1
  309. package/dist/components/Editor/Editor.d.ts.map +0 -1
  310. package/dist/components/Editor/RenderBlocks.d.ts +0 -10
  311. package/dist/components/Editor/RenderBlocks.d.ts.map +0 -1
  312. package/dist/components/Editor/dnd.d.ts +0 -10
  313. package/dist/components/Editor/dnd.d.ts.map +0 -1
  314. package/dist/components/TextLeaf/TextLeaf.d.ts.map +0 -1
  315. package/dist/contexts/YooptaContext/ToolsContext.d.ts +0 -23
  316. package/dist/contexts/YooptaContext/ToolsContext.d.ts.map +0 -1
  317. package/dist/editor/elements/createElement.d.ts +0 -13
  318. package/dist/editor/elements/createElement.d.ts.map +0 -1
  319. package/dist/editor/elements/insertElementText.d.ts +0 -7
  320. package/dist/editor/elements/insertElementText.d.ts.map +0 -1
  321. package/dist/editor/paths/getNextPath.d.ts +0 -3
  322. package/dist/editor/paths/getNextPath.d.ts.map +0 -1
  323. package/dist/editor/paths/getPath.d.ts +0 -3
  324. package/dist/editor/paths/getPath.d.ts.map +0 -1
  325. package/dist/editor/paths/getPreviousPath.d.ts +0 -3
  326. package/dist/editor/paths/getPreviousPath.d.ts.map +0 -1
  327. package/dist/marks/FakeSelectionMark.d.ts +0 -5
  328. package/dist/marks/FakeSelectionMark.d.ts.map +0 -1
  329. package/dist/plugins/SlateEditorComponent.d.ts +0 -13
  330. package/dist/plugins/SlateEditorComponent.d.ts.map +0 -1
  331. package/dist/plugins/createYooptaPlugin.d.ts +0 -25
  332. package/dist/plugins/createYooptaPlugin.d.ts.map +0 -1
  333. package/dist/plugins/extenstions/withInlines.d.ts.map +0 -1
  334. package/dist/utils/blockElements.d.ts.map +0 -1
  335. package/dist/utils/buildSlate.d.ts +0 -3
  336. package/dist/utils/buildSlate.d.ts.map +0 -1
  337. package/dist/utils/deepClone.d.ts +0 -2
  338. package/dist/utils/deepClone.d.ts.map +0 -1
  339. package/dist/utils/editorBuilders.d.ts.map +0 -1
  340. package/dist/utils/findPluginBlockByPath.d.ts +0 -5
  341. package/dist/utils/findPluginBlockByPath.d.ts.map +0 -1
  342. package/dist/utils/getLastNodePoint.d.ts +0 -9
  343. package/dist/utils/getLastNodePoint.d.ts.map +0 -1
  344. package/dist/utils/throttle.d.ts +0 -8
  345. package/dist/utils/throttle.d.ts.map +0 -1
  346. package/dist/utils/validateYooptaValue.d.ts +0 -2
  347. package/dist/utils/validateYooptaValue.d.ts.map +0 -1
  348. package/dist/utils/validators.d.ts +0 -2
  349. package/dist/utils/validators.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getEnd.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/getEnd.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,eAAe,oCAgBlE"}
@@ -0,0 +1,23 @@
1
+ import type { YooEditor } from '../types';
2
+ import type { GetPointOptions } from './types';
3
+ /**
4
+ * Get first point in block
5
+ *
6
+ * @param editor - YooEditor instance
7
+ * @param options - Get point options
8
+ * @returns First point in block
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // Get first point in current block
13
+ * const firstPoint = Selection.getFirstPoint(editor);
14
+ *
15
+ * // Get first point in specific block
16
+ * const firstPoint = Selection.getFirstPoint(editor, { at: 0 });
17
+ * ```
18
+ */
19
+ export declare function getFirstPoint(editor: YooEditor, options?: GetPointOptions): {
20
+ path: number[];
21
+ offset: number;
22
+ };
23
+ //# sourceMappingURL=getFirstPoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFirstPoint.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/getFirstPoint.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,eAAe;;;EAkBzE"}
@@ -0,0 +1,20 @@
1
+ import type { YooEditor } from '../types';
2
+ import type { GetPointOptions } from './types';
3
+ /**
4
+ * Get focus point from Slate selection
5
+ *
6
+ * @param editor - YooEditor instance
7
+ * @param options - Get point options
8
+ * @returns Focus point or null
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // Get focus point from current selection
13
+ * const focus = Selection.getFocus(editor);
14
+ *
15
+ * // Get focus point from specific block
16
+ * const focus = Selection.getFocus(editor, { at: 0 });
17
+ * ```
18
+ */
19
+ export declare function getFocus(editor: YooEditor, options?: GetPointOptions): any;
20
+ //# sourceMappingURL=getFocus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFocus.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/getFocus.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,eAAe,OAcpE"}
@@ -0,0 +1,23 @@
1
+ import type { YooEditor } from '../types';
2
+ import type { GetPointOptions } from './types';
3
+ /**
4
+ * Get last point in block
5
+ *
6
+ * @param editor - YooEditor instance
7
+ * @param options - Get point options
8
+ * @returns Last point in block
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // Get last point in current block
13
+ * const lastPoint = Selection.getLastPoint(editor);
14
+ *
15
+ * // Get last point in specific block
16
+ * const lastPoint = Selection.getLastPoint(editor, { at: 0 });
17
+ * ```
18
+ */
19
+ export declare function getLastPoint(editor: YooEditor, options?: GetPointOptions): {
20
+ path: number[];
21
+ offset: number;
22
+ };
23
+ //# sourceMappingURL=getLastPoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLastPoint.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/getLastPoint.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,eAAe;;;EAkBxE"}
@@ -0,0 +1,20 @@
1
+ import type { YooEditor, YooptaPathIndex } from '../types';
2
+ import type { GetNextBlockOptions } from './types';
3
+ /**
4
+ * Get next block order
5
+ *
6
+ * @param editor - YooEditor instance
7
+ * @param options - Get next options
8
+ * @returns Next block order or null
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // Get next block from current
13
+ * const next = Selection.getNext(editor);
14
+ *
15
+ * // Get next block from specific order
16
+ * const next = Selection.getNext(editor, { at: 0 });
17
+ * ```
18
+ */
19
+ export declare function getNext(editor: YooEditor, options?: GetNextBlockOptions): YooptaPathIndex;
20
+ //# sourceMappingURL=getNext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getNext.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/getNext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,eAAe,CAQzF"}
@@ -0,0 +1,20 @@
1
+ import type { YooEditor, YooptaPathIndex } from '../types';
2
+ import type { GetNextBlockOptions } from './types';
3
+ /**
4
+ * Get previous block order
5
+ *
6
+ * @param editor - YooEditor instance
7
+ * @param options - Get previous options
8
+ * @returns Previous block order or null
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // Get previous block from current
13
+ * const previous = Selection.getPrevious(editor);
14
+ *
15
+ * // Get previous block from specific order
16
+ * const previous = Selection.getPrevious(editor, { at: 1 });
17
+ * ```
18
+ */
19
+ export declare function getPrevious(editor: YooEditor, options?: GetNextBlockOptions): YooptaPathIndex;
20
+ //# sourceMappingURL=getPrevious.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPrevious.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/getPrevious.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,eAAe,CAQ7F"}
@@ -0,0 +1,21 @@
1
+ import { Range } from 'slate';
2
+ import type { YooEditor } from '../types';
3
+ import type { GetRangeOptions } from './types';
4
+ /**
5
+ * Get range from Slate selection
6
+ *
7
+ * @param editor - YooEditor instance
8
+ * @param options - Get range options
9
+ * @returns Range or null if no selection
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * // Get range from current block selection
14
+ * const range = Selection.getRange(editor);
15
+ *
16
+ * // Get range from specific block
17
+ * const range = Selection.getRange(editor, { at: 0 });
18
+ * ```
19
+ */
20
+ export declare function getRange(editor: YooEditor, options?: GetRangeOptions): Range | null;
21
+ //# sourceMappingURL=getRange.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRange.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/getRange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,EAAE,MAAM,OAAO,CAAC;AAItC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,KAAK,GAAG,IAAI,CAgBnF"}
@@ -0,0 +1,20 @@
1
+ import type { YooEditor } from '../types';
2
+ import type { GetSelectedOptions } from './types';
3
+ /**
4
+ * Get selected block orders or check if specific block is selected
5
+ *
6
+ * @param editor - YooEditor instance
7
+ * @param options - Get selected options
8
+ * @returns Selected block orders array, or boolean if `at` is provided
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // Get all selected block orders
13
+ * const selected = Selection.getSelected(editor);
14
+ *
15
+ * // Check if specific block is selected
16
+ * const isSelected = Selection.getSelected(editor, { at: 0 });
17
+ * ```
18
+ */
19
+ export declare function getSelected(editor: YooEditor, options?: GetSelectedOptions): number[] | null | boolean;
20
+ //# sourceMappingURL=getSelected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSelected.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/getSelected.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,SAAS,EACjB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,MAAM,EAAE,GAAG,IAAI,GAAG,OAAO,CAW3B"}
@@ -0,0 +1,23 @@
1
+ import type { YooEditor } from '../types';
2
+ import type { GetSlateSelectionOptions } from './types';
3
+ /**
4
+ * Get Slate selection from block
5
+ *
6
+ * @param editor - YooEditor instance
7
+ * @param options - Get selection options
8
+ * @returns Slate selection (Range) or null
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // Get selection from current block
13
+ * const selection = Selection.getSlateSelection(editor);
14
+ *
15
+ * // Get selection from specific block
16
+ * const selection = Selection.getSlateSelection(editor, { at: 0 });
17
+ *
18
+ * // Get selection from block by ID
19
+ * const selection = Selection.getSlateSelection(editor, { blockId: 'block-1' });
20
+ * ```
21
+ */
22
+ export declare function getSlateSelection(editor: YooEditor, options?: GetSlateSelectionOptions): Range | null;
23
+ //# sourceMappingURL=getSlateSelection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSlateSelection.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/getSlateSelection.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,SAAS,EACjB,OAAO,CAAC,EAAE,wBAAwB,GACjC,KAAK,GAAG,IAAI,CAcd"}
@@ -0,0 +1,20 @@
1
+ import type { YooEditor } from '../types';
2
+ import type { GetPointOptions } from './types';
3
+ /**
4
+ * Get start point from Slate selection (earlier point)
5
+ *
6
+ * @param editor - YooEditor instance
7
+ * @param options - Get point options
8
+ * @returns Start point or null
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // Get start point from current selection
13
+ * const start = Selection.getStart(editor);
14
+ *
15
+ * // Get start point from specific block
16
+ * const start = Selection.getStart(editor, { at: 0 });
17
+ * ```
18
+ */
19
+ export declare function getStart(editor: YooEditor, options?: GetPointOptions): import("slate").BasePoint | null;
20
+ //# sourceMappingURL=getStart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getStart.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/getStart.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,eAAe,oCAgBpE"}
@@ -0,0 +1,43 @@
1
+ import { getAnchor } from './getAnchor';
2
+ import { getCurrent } from './getCurrent';
3
+ import { getEnd } from './getEnd';
4
+ import { getFirstPoint } from './getFirstPoint';
5
+ import { getFocus } from './getFocus';
6
+ import { getLastPoint } from './getLastPoint';
7
+ import { getNext } from './getNext';
8
+ import { getPrevious } from './getPrevious';
9
+ import { getRange } from './getRange';
10
+ import { getSelected } from './getSelected';
11
+ import { getSlateSelection } from './getSlateSelection';
12
+ import { getStart } from './getStart';
13
+ import { isBlockSelected } from './isBlockSelected';
14
+ import { isCollapsed } from './isCollapsed';
15
+ import { isEmpty } from './isEmpty';
16
+ import { isExpanded } from './isExpanded';
17
+ import { setCurrent } from './setCurrent';
18
+ import { setSelected } from './setSelected';
19
+ import { setSlateSelection } from './setSlateSelection';
20
+ export declare const Selection: {
21
+ getCurrent: typeof getCurrent;
22
+ setCurrent: typeof setCurrent;
23
+ getSelected: typeof getSelected;
24
+ setSelected: typeof setSelected;
25
+ isBlockSelected: typeof isBlockSelected;
26
+ isEmpty: typeof isEmpty;
27
+ getNext: typeof getNext;
28
+ getPrevious: typeof getPrevious;
29
+ getSlateSelection: typeof getSlateSelection;
30
+ setSlateSelection: typeof setSlateSelection;
31
+ getRange: typeof getRange;
32
+ isExpanded: typeof isExpanded;
33
+ isCollapsed: typeof isCollapsed;
34
+ getAnchor: typeof getAnchor;
35
+ getFocus: typeof getFocus;
36
+ getStart: typeof getStart;
37
+ getEnd: typeof getEnd;
38
+ getFirstPoint: typeof getFirstPoint;
39
+ getLastPoint: typeof getLastPoint;
40
+ };
41
+ export { getAnchor, getCurrent, getEnd, getFirstPoint, getFocus, getLastPoint, getNext, getPrevious, getRange, getSelected, getSlateSelection, isBlockSelected, isCollapsed, isEmpty, isExpanded, setCurrent, setSelected, setSlateSelection, };
42
+ export type { GetCurrentOptions, GetNextBlockOptions, GetPointOptions, GetRangeOptions, GetSelectedOptions, GetSlateSelectionOptions, IsBlockSelectedOptions, SetCurrentOptions, SetSelectedOptions, SetSlateSelectionOptions, } from './types';
43
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;CAyBrB,CAAC;AAGF,OAAO,EACL,SAAS,EACT,UAAU,EACV,MAAM,EACN,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,WAAW,EACX,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,OAAO,EACP,UAAU,EACV,UAAU,EACV,WAAW,EACX,iBAAiB,GAClB,CAAC;AAGF,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,wBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { YooEditor } from '../types';
2
+ import type { IsBlockSelectedOptions } from './types';
3
+ /**
4
+ * Check if block is selected
5
+ *
6
+ * @param editor - YooEditor instance
7
+ * @param options - Check options
8
+ * @returns True if block is selected, false otherwise
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // Check if block at order 0 is selected
13
+ * const isSelected = Selection.isBlockSelected(editor, { at: 0 });
14
+ *
15
+ * // Check if block is selected (by block data)
16
+ * const block = Blocks.getBlock(editor, { at: 0 });
17
+ * if (block) {
18
+ * const isSelected = Selection.isBlockSelected(editor, { at: block.meta.order });
19
+ * }
20
+ * ```
21
+ */
22
+ export declare function isBlockSelected(editor: YooEditor, options: IsBlockSelectedOptions): boolean;
23
+ //# sourceMappingURL=isBlockSelected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isBlockSelected.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/isBlockSelected.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAS3F"}
@@ -0,0 +1,20 @@
1
+ import type { YooEditor } from '../types';
2
+ import type { GetSlateSelectionOptions } from './types';
3
+ /**
4
+ * Check if Slate selection is collapsed (cursor position)
5
+ *
6
+ * @param editor - YooEditor instance
7
+ * @param options - Check options
8
+ * @returns True if selection is collapsed, false otherwise
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // Check if current selection is collapsed
13
+ * const isCollapsed = Selection.isCollapsed(editor);
14
+ *
15
+ * // Check if selection in specific block is collapsed
16
+ * const isCollapsed = Selection.isCollapsed(editor, { at: 0 });
17
+ * ```
18
+ */
19
+ export declare function isCollapsed(editor: YooEditor, options?: GetSlateSelectionOptions): boolean;
20
+ //# sourceMappingURL=isCollapsed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isCollapsed.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/isCollapsed.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAgB1F"}
@@ -0,0 +1,14 @@
1
+ import type { YooEditor } from '../types';
2
+ /**
3
+ * Check if path is empty (no current block)
4
+ *
5
+ * @param editor - YooEditor instance
6
+ * @returns True if path is empty, false otherwise
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * const isEmpty = Selection.isEmpty(editor);
11
+ * ```
12
+ */
13
+ export declare function isEmpty(editor: YooEditor): boolean;
14
+ //# sourceMappingURL=isEmpty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isEmpty.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/isEmpty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAElD"}
@@ -0,0 +1,20 @@
1
+ import type { YooEditor } from '../types';
2
+ import type { GetSlateSelectionOptions } from './types';
3
+ /**
4
+ * Check if Slate selection is expanded (has selected text)
5
+ *
6
+ * @param editor - YooEditor instance
7
+ * @param options - Check options
8
+ * @returns True if selection is expanded, false otherwise
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // Check if current selection is expanded
13
+ * const isExpanded = Selection.isExpanded(editor);
14
+ *
15
+ * // Check if selection in specific block is expanded
16
+ * const isExpanded = Selection.isExpanded(editor, { at: 0 });
17
+ * ```
18
+ */
19
+ export declare function isExpanded(editor: YooEditor, options?: GetSlateSelectionOptions): boolean;
20
+ //# sourceMappingURL=isExpanded.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isExpanded.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/isExpanded.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAgBzF"}
@@ -0,0 +1,22 @@
1
+ import type { YooEditor } from '../types';
2
+ import type { SetCurrentOptions } from './types';
3
+ /**
4
+ * Set current block order
5
+ *
6
+ * @param editor - YooEditor instance
7
+ * @param options - Set current options
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * // Set current block to order 0
12
+ * Selection.setCurrent(editor, { at: 0 });
13
+ *
14
+ * // Set current block with source
15
+ * Selection.setCurrent(editor, {
16
+ * at: 1,
17
+ * source: 'keyboard'
18
+ * });
19
+ * ```
20
+ */
21
+ export declare function setCurrent(editor: YooEditor, options: SetCurrentOptions): void;
22
+ //# sourceMappingURL=setCurrent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setCurrent.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/setCurrent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAW9E"}
@@ -0,0 +1,25 @@
1
+ import type { YooEditor } from '../types';
2
+ import type { SetSelectedOptions } from './types';
3
+ /**
4
+ * Set selected block orders
5
+ *
6
+ * @param editor - YooEditor instance
7
+ * @param options - Set selected options
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * // Select single block
12
+ * Selection.setSelected(editor, { at: 0 });
13
+ *
14
+ * // Select multiple blocks
15
+ * Selection.setSelected(editor, { at: [0, 1, 2] });
16
+ *
17
+ * // Select with source
18
+ * Selection.setSelected(editor, {
19
+ * at: [0, 1],
20
+ * source: 'selection-box'
21
+ * });
22
+ * ```
23
+ */
24
+ export declare function setSelected(editor: YooEditor, options: SetSelectedOptions): void;
25
+ //# sourceMappingURL=setSelected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setSelected.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/setSelected.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAchF"}
@@ -0,0 +1,24 @@
1
+ import type { YooEditor } from '../types';
2
+ import type { SetSlateSelectionOptions } from './types';
3
+ /**
4
+ * Set Slate selection in block
5
+ *
6
+ * @param editor - YooEditor instance
7
+ * @param options - Set selection options
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * // Set selection in current block
12
+ * Selection.setSlateSelection(editor, {
13
+ * selection: { anchor: { path: [0, 0], offset: 0 }, focus: { path: [0, 0], offset: 5 } }
14
+ * });
15
+ *
16
+ * // Set selection in specific block
17
+ * Selection.setSlateSelection(editor, {
18
+ * selection: { anchor: { path: [0, 0], offset: 0 }, focus: { path: [0, 0], offset: 5 } },
19
+ * at: 0
20
+ * });
21
+ * ```
22
+ */
23
+ export declare function setSlateSelection(editor: YooEditor, options: SetSlateSelectionOptions): void;
24
+ //# sourceMappingURL=setSlateSelection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setSlateSelection.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/setSlateSelection.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,wBAAwB,GAAG,IAAI,CA0B5F"}
@@ -0,0 +1,128 @@
1
+ import type { Range } from 'slate';
2
+ import type { YooptaPathIndex } from '../types';
3
+ /**
4
+ * Options for getting current block order
5
+ */
6
+ export type GetCurrentOptions = {
7
+ /**
8
+ * Block index (order) to get
9
+ * If not provided, returns editor.path.current
10
+ */
11
+ at?: YooptaPathIndex;
12
+ };
13
+ /**
14
+ * Options for setting current block order
15
+ */
16
+ export type SetCurrentOptions = {
17
+ /**
18
+ * Block index (order) to set as current
19
+ */
20
+ at: YooptaPathIndex;
21
+ /**
22
+ * Source of the path change
23
+ */
24
+ source?: 'selection-box' | 'native-selection' | 'mousemove' | 'keyboard' | 'copy-paste';
25
+ };
26
+ /**
27
+ * Options for getting selected block orders
28
+ */
29
+ export type GetSelectedOptions = {
30
+ /**
31
+ * Block index (order) to check if selected
32
+ * If not provided, returns all selected block orders
33
+ */
34
+ at?: YooptaPathIndex;
35
+ };
36
+ /**
37
+ * Options for setting selected block orders
38
+ */
39
+ export type SetSelectedOptions = {
40
+ /**
41
+ * Block index (order) or array of orders to select
42
+ */
43
+ at: YooptaPathIndex | YooptaPathIndex[];
44
+ /**
45
+ * Source of the selection change
46
+ */
47
+ source?: 'selection-box' | 'native-selection' | 'mousemove' | 'keyboard' | 'copy-paste';
48
+ };
49
+ /**
50
+ * Options for checking if block is selected
51
+ */
52
+ export type IsBlockSelectedOptions = {
53
+ /**
54
+ * Block index (order) to check
55
+ */
56
+ at: YooptaPathIndex;
57
+ };
58
+ /**
59
+ * Options for getting Slate selection
60
+ */
61
+ export type GetSlateSelectionOptions = {
62
+ /**
63
+ * Block index (order) to get selection from
64
+ * If not provided, uses current block
65
+ */
66
+ at?: YooptaPathIndex;
67
+ /**
68
+ * Block ID to get selection from
69
+ */
70
+ blockId?: string;
71
+ };
72
+ /**
73
+ * Options for setting Slate selection
74
+ */
75
+ export type SetSlateSelectionOptions = {
76
+ /**
77
+ * Selection (Range) to set
78
+ */
79
+ selection: Range;
80
+ /**
81
+ * Block index (order) to set selection in
82
+ * If not provided, uses current block
83
+ */
84
+ at?: YooptaPathIndex;
85
+ /**
86
+ * Block ID to set selection in
87
+ */
88
+ blockId?: string;
89
+ };
90
+ /**
91
+ * Options for getting range from selection
92
+ */
93
+ export type GetRangeOptions = {
94
+ /**
95
+ * Block index (order) to get range from
96
+ * If not provided, uses current block
97
+ */
98
+ at?: YooptaPathIndex;
99
+ /**
100
+ * Block ID to get range from
101
+ */
102
+ blockId?: string;
103
+ };
104
+ /**
105
+ * Options for getting point (anchor, focus, start, end)
106
+ */
107
+ export type GetPointOptions = {
108
+ /**
109
+ * Block index (order) to get point from
110
+ * If not provided, uses current block
111
+ */
112
+ at?: YooptaPathIndex;
113
+ /**
114
+ * Block ID to get point from
115
+ */
116
+ blockId?: string;
117
+ };
118
+ /**
119
+ * Options for getting next/previous block order
120
+ */
121
+ export type GetNextBlockOptions = {
122
+ /**
123
+ * Block index (order) to get next/previous from
124
+ * If not provided, uses current block
125
+ */
126
+ at?: YooptaPathIndex;
127
+ };
128
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,KAAK,EAAa,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,EAAE,EAAE,eAAe,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,eAAe,GAAG,kBAAkB,GAAG,WAAW,GAAG,UAAU,GAAG,YAAY,CAAC;CACzF,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,EAAE,EAAE,eAAe,GAAG,eAAe,EAAE,CAAC;IACxC;;OAEG;IACH,MAAM,CAAC,EAAE,eAAe,GAAG,kBAAkB,GAAG,WAAW,GAAG,UAAU,GAAG,YAAY,CAAC;CACzF,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,EAAE,EAAE,eAAe,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC;IACjB;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;CACtB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { YooEditor } from '../types';
2
+ import type { AddMarkOptions } from './types';
3
+ /**
4
+ * Add mark to specified selection or blocks
5
+ *
6
+ * @param editor - YooEditor instance
7
+ * @param options - Add mark options
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * // Add bold mark to current text selection (slate.selection) or whole block
12
+ * Marks.add(editor, {
13
+ * type: 'bold',
14
+ * value: true
15
+ * });
16
+ *
17
+ * // Add mark to specific selection
18
+ * Marks.add(editor, {
19
+ * type: 'bold',
20
+ * value: true,
21
+ * selection: { anchor: { path: [0, 0], offset: 0 }, focus: { path: [0, 0], offset: 5 } }
22
+ * });
23
+ *
24
+ * // Add color mark to specific block (ignores text selection)
25
+ * Marks.add(editor, {
26
+ * type: 'color',
27
+ * value: '#ff0000',
28
+ * at: 0
29
+ * });
30
+ * ```
31
+ */
32
+ export declare function addMark(editor: YooEditor, options: AddMarkOptions): void;
33
+ //# sourceMappingURL=addMark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addMark.d.ts","sourceRoot":"","sources":["../../../src/editor/textFormats/addMark.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA4C9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,CA2CxE"}