@yoopta/editor 4.9.9 → 6.0.0-beta.10
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.
- package/README.md +13 -5
- package/dist/components/Block/Block.d.ts +3 -4
- package/dist/components/Block/Block.d.ts.map +1 -1
- package/dist/components/Block/hooks.d.ts +3 -1706
- package/dist/components/Block/hooks.d.ts.map +1 -1
- package/dist/components/Editor/render-blocks.d.ts +13 -0
- package/dist/components/Editor/render-blocks.d.ts.map +1 -0
- package/dist/components/Editor/render-editor.d.ts +13 -0
- package/dist/components/Editor/render-editor.d.ts.map +1 -0
- package/dist/components/Editor/selection.d.ts +1 -1
- package/dist/components/Editor/selection.d.ts.map +1 -1
- package/dist/components/Editor/utils.d.ts +1 -1
- package/dist/components/Editor/utils.d.ts.map +1 -1
- package/dist/components/{TextLeaf/TextLeaf.d.ts → text-leaf/text-leaf.d.ts} +2 -2
- package/dist/components/text-leaf/text-leaf.d.ts.map +1 -0
- package/dist/contexts/YooptaContext/YooptaContext.d.ts +3 -3
- package/dist/contexts/YooptaContext/YooptaContext.d.ts.map +1 -1
- package/dist/editor/blocks/buildBlockData.d.ts +1 -1
- package/dist/editor/blocks/buildBlockData.d.ts.map +1 -1
- package/dist/editor/blocks/decreaseBlockDepth.d.ts +2 -2
- package/dist/editor/blocks/decreaseBlockDepth.d.ts.map +1 -1
- package/dist/editor/blocks/deleteBlock.d.ts +46 -15
- package/dist/editor/blocks/deleteBlock.d.ts.map +1 -1
- package/dist/editor/blocks/deleteBlock.test.d.ts +2 -0
- package/dist/editor/blocks/deleteBlock.test.d.ts.map +1 -0
- package/dist/editor/blocks/duplicateBlock.d.ts +45 -10
- package/dist/editor/blocks/duplicateBlock.d.ts.map +1 -1
- package/dist/editor/blocks/duplicateBlock.test.d.ts +2 -0
- package/dist/editor/blocks/duplicateBlock.test.d.ts.map +1 -0
- package/dist/editor/blocks/focusBlock.d.ts +1 -1
- package/dist/editor/blocks/focusBlock.d.ts.map +1 -1
- package/dist/editor/blocks/getBlock.d.ts +2 -2
- package/dist/editor/blocks/getBlock.d.ts.map +1 -1
- package/dist/editor/blocks/getBlockSlate.d.ts +2 -2
- package/dist/editor/blocks/getBlockSlate.d.ts.map +1 -1
- package/dist/editor/blocks/increaseBlockDepth.d.ts +1 -1
- package/dist/editor/blocks/increaseBlockDepth.d.ts.map +1 -1
- package/dist/editor/blocks/index.d.ts +9 -9
- package/dist/editor/blocks/index.d.ts.map +1 -1
- package/dist/editor/blocks/insertBlock.d.ts +28 -1
- package/dist/editor/blocks/insertBlock.d.ts.map +1 -1
- package/dist/editor/blocks/mergeBlock.d.ts +48 -2
- package/dist/editor/blocks/mergeBlock.d.ts.map +1 -1
- package/dist/editor/blocks/mergeBlock.test.d.ts +2 -0
- package/dist/editor/blocks/mergeBlock.test.d.ts.map +1 -0
- package/dist/editor/blocks/moveBlock.d.ts +1 -1
- package/dist/editor/blocks/moveBlock.d.ts.map +1 -1
- package/dist/editor/blocks/splitBlock.d.ts +51 -3
- package/dist/editor/blocks/splitBlock.d.ts.map +1 -1
- package/dist/editor/blocks/splitBlock.test.d.ts +2 -0
- package/dist/editor/blocks/splitBlock.test.d.ts.map +1 -0
- package/dist/editor/blocks/toggleBlock.d.ts +51 -5
- package/dist/editor/blocks/toggleBlock.d.ts.map +1 -1
- package/dist/editor/blocks/toggleBlock.test.d.ts +2 -0
- package/dist/editor/blocks/toggleBlock.test.d.ts.map +1 -0
- package/dist/editor/blocks/updateBlock.d.ts +1 -1
- package/dist/editor/blocks/updateBlock.d.ts.map +1 -1
- package/dist/editor/core/applyTransforms.d.ts +2 -2
- package/dist/editor/core/applyTransforms.d.ts.map +1 -1
- package/dist/editor/core/batchOperations.d.ts +1 -1
- package/dist/editor/core/batchOperations.d.ts.map +1 -1
- package/dist/editor/core/blur.d.ts +1 -1
- package/dist/editor/core/blur.d.ts.map +1 -1
- package/dist/editor/core/focus.d.ts +1 -1
- package/dist/editor/core/focus.d.ts.map +1 -1
- package/dist/editor/core/getEditorValue.d.ts +1 -1
- package/dist/editor/core/getEditorValue.d.ts.map +1 -1
- package/dist/editor/core/history.d.ts +4 -4
- package/dist/editor/core/history.d.ts.map +1 -1
- package/dist/editor/core/isEmpty.d.ts +1 -1
- package/dist/editor/core/isEmpty.d.ts.map +1 -1
- package/dist/editor/core/isFocused.d.ts +1 -1
- package/dist/editor/core/isFocused.d.ts.map +1 -1
- package/dist/editor/core/setEditorValue.d.ts +1 -1
- package/dist/editor/core/setEditorValue.d.ts.map +1 -1
- package/dist/editor/elements/create-element-structure.d.ts +150 -0
- package/dist/editor/elements/create-element-structure.d.ts.map +1 -0
- package/dist/editor/elements/create-element-structure.test.d.ts +2 -0
- package/dist/editor/elements/create-element-structure.test.d.ts.map +1 -0
- package/dist/editor/elements/deleteElement.d.ts +78 -7
- package/dist/editor/elements/deleteElement.d.ts.map +1 -1
- package/dist/editor/elements/getElement.d.ts +26 -4
- package/dist/editor/elements/getElement.d.ts.map +1 -1
- package/dist/editor/elements/getElement.test.d.ts +2 -0
- package/dist/editor/elements/getElement.test.d.ts.map +1 -0
- package/dist/editor/elements/getElementChildren.d.ts +20 -4
- package/dist/editor/elements/getElementChildren.d.ts.map +1 -1
- package/dist/editor/elements/getElementChildren.test.d.ts +2 -0
- package/dist/editor/elements/getElementChildren.test.d.ts.map +1 -0
- package/dist/editor/elements/getElementEntry.d.ts +26 -7
- package/dist/editor/elements/getElementEntry.d.ts.map +1 -1
- package/dist/editor/elements/getElementEntry.test.d.ts +2 -0
- package/dist/editor/elements/getElementEntry.test.d.ts.map +1 -0
- package/dist/editor/elements/getElementPath.d.ts +20 -3
- package/dist/editor/elements/getElementPath.d.ts.map +1 -1
- package/dist/editor/elements/getElementPath.test.d.ts +2 -0
- package/dist/editor/elements/getElementPath.test.d.ts.map +1 -0
- package/dist/editor/elements/getElementRect.d.ts +28 -0
- package/dist/editor/elements/getElementRect.d.ts.map +1 -0
- package/dist/editor/elements/getElements.d.ts +26 -0
- package/dist/editor/elements/getElements.d.ts.map +1 -0
- package/dist/editor/elements/getElements.test.d.ts +2 -0
- package/dist/editor/elements/getElements.test.d.ts.map +1 -0
- package/dist/editor/elements/getParentElementPath.d.ts +20 -3
- package/dist/editor/elements/getParentElementPath.d.ts.map +1 -1
- package/dist/editor/elements/getParentElementPath.test.d.ts +2 -0
- package/dist/editor/elements/getParentElementPath.test.d.ts.map +1 -0
- package/dist/editor/elements/htmlElToSlateNode.d.ts +4 -0
- package/dist/editor/elements/htmlElToSlateNode.d.ts.map +1 -0
- package/dist/editor/elements/index.d.ts +12 -9
- package/dist/editor/elements/index.d.ts.map +1 -1
- package/dist/editor/elements/insertElement.d.ts +22 -0
- package/dist/editor/elements/insertElement.d.ts.map +1 -0
- package/dist/editor/elements/insertElement.test.d.ts +2 -0
- package/dist/editor/elements/insertElement.test.d.ts.map +1 -0
- package/dist/editor/elements/isElementEmpty.d.ts +20 -7
- package/dist/editor/elements/isElementEmpty.d.ts.map +1 -1
- package/dist/editor/elements/isElementEmpty.test.d.ts +2 -0
- package/dist/editor/elements/isElementEmpty.test.d.ts.map +1 -0
- package/dist/editor/elements/types.d.ts +73 -0
- package/dist/editor/elements/types.d.ts.map +1 -0
- package/dist/editor/elements/updateElement.d.ts +69 -7
- package/dist/editor/elements/updateElement.d.ts.map +1 -1
- package/dist/editor/index.d.ts +11 -3
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/paths/getBlockOrder.d.ts +3 -0
- package/dist/editor/paths/getBlockOrder.d.ts.map +1 -0
- package/dist/editor/paths/getNextBlockOrder.d.ts +3 -0
- package/dist/editor/paths/getNextBlockOrder.d.ts.map +1 -0
- package/dist/editor/paths/getPreviousBlockOrder.d.ts +3 -0
- package/dist/editor/paths/getPreviousBlockOrder.d.ts.map +1 -0
- package/dist/editor/paths/getSelectedPaths.d.ts +1 -1
- package/dist/editor/paths/getSelectedPaths.d.ts.map +1 -1
- package/dist/editor/paths/index.d.ts +10 -8
- package/dist/editor/paths/index.d.ts.map +1 -1
- package/dist/editor/paths/isBlockSelected.d.ts +1 -1
- package/dist/editor/paths/isBlockSelected.d.ts.map +1 -1
- package/dist/editor/paths/isPathEmpty.d.ts +1 -1
- package/dist/editor/paths/isPathEmpty.d.ts.map +1 -1
- package/dist/editor/paths/setPath.d.ts +1 -1
- package/dist/editor/paths/setPath.d.ts.map +1 -1
- package/dist/editor/selection/getAnchor.d.ts +20 -0
- package/dist/editor/selection/getAnchor.d.ts.map +1 -0
- package/dist/editor/selection/getCurrent.d.ts +20 -0
- package/dist/editor/selection/getCurrent.d.ts.map +1 -0
- package/dist/editor/selection/getEnd.d.ts +20 -0
- package/dist/editor/selection/getEnd.d.ts.map +1 -0
- package/dist/editor/selection/getFirstPoint.d.ts +23 -0
- package/dist/editor/selection/getFirstPoint.d.ts.map +1 -0
- package/dist/editor/selection/getFocus.d.ts +20 -0
- package/dist/editor/selection/getFocus.d.ts.map +1 -0
- package/dist/editor/selection/getLastPoint.d.ts +23 -0
- package/dist/editor/selection/getLastPoint.d.ts.map +1 -0
- package/dist/editor/selection/getNext.d.ts +20 -0
- package/dist/editor/selection/getNext.d.ts.map +1 -0
- package/dist/editor/selection/getPrevious.d.ts +20 -0
- package/dist/editor/selection/getPrevious.d.ts.map +1 -0
- package/dist/editor/selection/getRange.d.ts +21 -0
- package/dist/editor/selection/getRange.d.ts.map +1 -0
- package/dist/editor/selection/getSelected.d.ts +20 -0
- package/dist/editor/selection/getSelected.d.ts.map +1 -0
- package/dist/editor/selection/getSlateSelection.d.ts +23 -0
- package/dist/editor/selection/getSlateSelection.d.ts.map +1 -0
- package/dist/editor/selection/getStart.d.ts +20 -0
- package/dist/editor/selection/getStart.d.ts.map +1 -0
- package/dist/editor/selection/index.d.ts +43 -0
- package/dist/editor/selection/index.d.ts.map +1 -0
- package/dist/editor/selection/isBlockSelected.d.ts +23 -0
- package/dist/editor/selection/isBlockSelected.d.ts.map +1 -0
- package/dist/editor/selection/isCollapsed.d.ts +20 -0
- package/dist/editor/selection/isCollapsed.d.ts.map +1 -0
- package/dist/editor/selection/isEmpty.d.ts +14 -0
- package/dist/editor/selection/isEmpty.d.ts.map +1 -0
- package/dist/editor/selection/isExpanded.d.ts +20 -0
- package/dist/editor/selection/isExpanded.d.ts.map +1 -0
- package/dist/editor/selection/setCurrent.d.ts +22 -0
- package/dist/editor/selection/setCurrent.d.ts.map +1 -0
- package/dist/editor/selection/setSelected.d.ts +25 -0
- package/dist/editor/selection/setSelected.d.ts.map +1 -0
- package/dist/editor/selection/setSlateSelection.d.ts +24 -0
- package/dist/editor/selection/setSlateSelection.d.ts.map +1 -0
- package/dist/editor/selection/types.d.ts +128 -0
- package/dist/editor/selection/types.d.ts.map +1 -0
- package/dist/editor/textFormats/addMark.d.ts +33 -0
- package/dist/editor/textFormats/addMark.d.ts.map +1 -0
- package/dist/editor/textFormats/clearMarks.d.ts +27 -0
- package/dist/editor/textFormats/clearMarks.d.ts.map +1 -0
- package/dist/editor/textFormats/getMarks.d.ts +20 -0
- package/dist/editor/textFormats/getMarks.d.ts.map +1 -0
- package/dist/editor/textFormats/getValue.d.ts +22 -2
- package/dist/editor/textFormats/getValue.d.ts.map +1 -1
- package/dist/editor/textFormats/index.d.ts +21 -0
- package/dist/editor/textFormats/index.d.ts.map +1 -0
- package/dist/editor/textFormats/isActive.d.ts +22 -2
- package/dist/editor/textFormats/isActive.d.ts.map +1 -1
- package/dist/editor/textFormats/removeMark.d.ts +28 -0
- package/dist/editor/textFormats/removeMark.d.ts.map +1 -0
- package/dist/editor/textFormats/toggle.d.ts +33 -2
- package/dist/editor/textFormats/toggle.d.ts.map +1 -1
- package/dist/editor/textFormats/types.d.ts +177 -0
- package/dist/editor/textFormats/types.d.ts.map +1 -0
- package/dist/editor/textFormats/update.d.ts +32 -2
- package/dist/editor/textFormats/update.d.ts.map +1 -1
- package/dist/editor/types.d.ts +60 -31
- package/dist/editor/types.d.ts.map +1 -1
- package/dist/extensions/shortcuts.d.ts +6 -2
- package/dist/extensions/shortcuts.d.ts.map +1 -1
- package/dist/handlers/index.d.ts +1 -1
- package/dist/handlers/index.d.ts.map +1 -1
- package/dist/handlers/onKeyDown.d.ts +1 -2
- package/dist/handlers/onKeyDown.d.ts.map +1 -1
- package/dist/index.d.ts +16 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -6
- package/dist/marks/index.d.ts +1 -1
- package/dist/marks/index.d.ts.map +1 -1
- package/dist/parsers/deserializeHTML.d.ts +10 -2
- package/dist/parsers/deserializeHTML.d.ts.map +1 -1
- package/dist/parsers/deserializeHTML.test.d.ts +2 -0
- package/dist/parsers/deserializeHTML.test.d.ts.map +1 -0
- package/dist/parsers/deserializeTextNodes.d.ts +2 -2
- package/dist/parsers/deserializeTextNodes.d.ts.map +1 -1
- package/dist/parsers/deserializeYooptaJSON.d.ts +16 -0
- package/dist/parsers/deserializeYooptaJSON.d.ts.map +1 -0
- package/dist/parsers/getEmail.d.ts +2 -4
- package/dist/parsers/getEmail.d.ts.map +1 -1
- package/dist/parsers/getHTML.d.ts +1 -1
- package/dist/parsers/getHTML.d.ts.map +1 -1
- package/dist/parsers/getMarkdown.d.ts +1 -1
- package/dist/parsers/getMarkdown.d.ts.map +1 -1
- package/dist/parsers/getPlainText.d.ts +1 -1
- package/dist/parsers/getPlainText.d.ts.map +1 -1
- package/dist/parsers/getYooptaJSON.d.ts +20 -0
- package/dist/parsers/getYooptaJSON.d.ts.map +1 -0
- package/dist/plugins/build-plugin-elements.d.ts +13 -0
- package/dist/plugins/build-plugin-elements.d.ts.map +1 -0
- package/dist/plugins/build-plugin-elements.test.d.ts +2 -0
- package/dist/plugins/build-plugin-elements.test.d.ts.map +1 -0
- package/dist/plugins/create-yoopta-plugin.d.ts +32 -0
- package/dist/plugins/create-yoopta-plugin.d.ts.map +1 -0
- package/dist/plugins/create-yoopta-plugin.test.d.ts +2 -0
- package/dist/plugins/create-yoopta-plugin.test.d.ts.map +1 -0
- package/dist/plugins/extenstions/{withInlines.d.ts → with-inlines.d.ts} +2 -2
- package/dist/plugins/extenstions/with-inlines.d.ts.map +1 -0
- package/dist/plugins/hooks.d.ts +4 -4
- package/dist/plugins/hooks.d.ts.map +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/slate-editor-component.d.ts +12 -0
- package/dist/plugins/slate-editor-component.d.ts.map +1 -0
- package/dist/plugins/types.d.ts +32 -21
- package/dist/plugins/types.d.ts.map +1 -1
- package/dist/utils/{blockElements.d.ts → block-elements.d.ts} +16 -7
- package/dist/utils/block-elements.d.ts.map +1 -0
- package/dist/utils/build-slate.d.ts +4 -0
- package/dist/utils/build-slate.d.ts.map +1 -0
- package/dist/utils/editor-builders.d.ts +7 -0
- package/dist/utils/editor-builders.d.ts.map +1 -0
- package/dist/utils/editor-builders.test.d.ts +2 -0
- package/dist/utils/editor-builders.test.d.ts.map +1 -0
- package/dist/utils/enter-action.d.ts +40 -0
- package/dist/utils/enter-action.d.ts.map +1 -0
- package/dist/utils/enter-action.test.d.ts +2 -0
- package/dist/utils/enter-action.test.d.ts.map +1 -0
- package/dist/utils/execute-backspace-action.d.ts +29 -0
- package/dist/utils/execute-backspace-action.d.ts.map +1 -0
- package/dist/utils/execute-backspace-action.test.d.ts +2 -0
- package/dist/utils/execute-backspace-action.test.d.ts.map +1 -0
- package/dist/utils/findSlateBySelectionPath.d.ts +1 -1
- package/dist/utils/findSlateBySelectionPath.d.ts.map +1 -1
- package/dist/utils/generateId.d.ts.map +1 -1
- package/dist/utils/get-block-plugins.d.ts +4 -0
- package/dist/utils/get-block-plugins.d.ts.map +1 -0
- package/dist/utils/get-block-plugins.test.d.ts +2 -0
- package/dist/utils/get-block-plugins.test.d.ts.map +1 -0
- package/dist/utils/get-next-hierarchical-selection.d.ts +20 -0
- package/dist/utils/get-next-hierarchical-selection.d.ts.map +1 -0
- package/dist/utils/get-next-hierarchical-selection.test.d.ts +2 -0
- package/dist/utils/get-next-hierarchical-selection.test.d.ts.map +1 -0
- package/dist/utils/get-node-points.d.ts +5 -0
- package/dist/utils/get-node-points.d.ts.map +1 -0
- package/dist/utils/get-node-points.test.d.ts +2 -0
- package/dist/utils/get-node-points.test.d.ts.map +1 -0
- package/dist/utils/getMaxOffsetInElement.d.ts.map +1 -1
- package/dist/utils/invariant.d.ts +2 -0
- package/dist/utils/invariant.d.ts.map +1 -0
- package/dist/utils/types.d.ts.map +1 -1
- package/dist/utils/validations.d.ts +3 -0
- package/dist/utils/validations.d.ts.map +1 -0
- package/dist/utils/weakMaps.d.ts +1 -2
- package/dist/utils/weakMaps.d.ts.map +1 -1
- package/dist/yoopta-editor.d.ts +27 -0
- package/dist/yoopta-editor.d.ts.map +1 -0
- package/package.json +11 -11
- package/dist/UI/BlockOptions/BlockOptions.d.ts +0 -25
- package/dist/UI/BlockOptions/BlockOptions.d.ts.map +0 -1
- package/dist/UI/BlockOptions/utils.d.ts +0 -33
- package/dist/UI/BlockOptions/utils.d.ts.map +0 -1
- package/dist/UI/ExtendedBlockActions/ExtendedBlockActions.d.ts +0 -11
- package/dist/UI/ExtendedBlockActions/ExtendedBlockActions.d.ts.map +0 -1
- package/dist/UI/Overlay/Overlay.d.ts +0 -12
- package/dist/UI/Overlay/Overlay.d.ts.map +0 -1
- package/dist/UI/Portal/Portal.d.ts +0 -8
- package/dist/UI/Portal/Portal.d.ts.map +0 -1
- package/dist/UI/index.d.ts +0 -38
- package/dist/UI/index.d.ts.map +0 -1
- package/dist/YooptaEditor.d.ts +0 -30
- package/dist/YooptaEditor.d.ts.map +0 -1
- package/dist/components/Block/FloatingBlockActions.d.ts +0 -14
- package/dist/components/Block/FloatingBlockActions.d.ts.map +0 -1
- package/dist/components/Editor/Editor.d.ts +0 -15
- package/dist/components/Editor/Editor.d.ts.map +0 -1
- package/dist/components/Editor/RenderBlocks.d.ts +0 -10
- package/dist/components/Editor/RenderBlocks.d.ts.map +0 -1
- package/dist/components/Editor/dnd.d.ts +0 -10
- package/dist/components/Editor/dnd.d.ts.map +0 -1
- package/dist/components/SelectionBox/SelectionBox.d.ts +0 -19
- package/dist/components/SelectionBox/SelectionBox.d.ts.map +0 -1
- package/dist/components/SelectionBox/hooks.d.ts +0 -7
- package/dist/components/SelectionBox/hooks.d.ts.map +0 -1
- package/dist/components/TextLeaf/TextLeaf.d.ts.map +0 -1
- package/dist/contexts/YooptaContext/ToolsContext.d.ts +0 -23
- package/dist/contexts/YooptaContext/ToolsContext.d.ts.map +0 -1
- package/dist/editor/elements/createElement.d.ts +0 -13
- package/dist/editor/elements/createElement.d.ts.map +0 -1
- package/dist/editor/elements/insertElementText.d.ts +0 -7
- package/dist/editor/elements/insertElementText.d.ts.map +0 -1
- package/dist/editor/paths/getNextPath.d.ts +0 -3
- package/dist/editor/paths/getNextPath.d.ts.map +0 -1
- package/dist/editor/paths/getPath.d.ts +0 -3
- package/dist/editor/paths/getPath.d.ts.map +0 -1
- package/dist/editor/paths/getPreviousPath.d.ts +0 -3
- package/dist/editor/paths/getPreviousPath.d.ts.map +0 -1
- package/dist/marks/FakeSelectionMark.d.ts +0 -5
- package/dist/marks/FakeSelectionMark.d.ts.map +0 -1
- package/dist/plugins/SlateEditorComponent.d.ts +0 -13
- package/dist/plugins/SlateEditorComponent.d.ts.map +0 -1
- package/dist/plugins/createYooptaPlugin.d.ts +0 -25
- package/dist/plugins/createYooptaPlugin.d.ts.map +0 -1
- package/dist/plugins/extenstions/withInlines.d.ts.map +0 -1
- package/dist/utils/blockElements.d.ts.map +0 -1
- package/dist/utils/buildSlate.d.ts +0 -3
- package/dist/utils/buildSlate.d.ts.map +0 -1
- package/dist/utils/deepClone.d.ts +0 -2
- package/dist/utils/deepClone.d.ts.map +0 -1
- package/dist/utils/editorBuilders.d.ts +0 -10
- package/dist/utils/editorBuilders.d.ts.map +0 -1
- package/dist/utils/findPluginBlockByPath.d.ts +0 -5
- package/dist/utils/findPluginBlockByPath.d.ts.map +0 -1
- package/dist/utils/getLastNodePoint.d.ts +0 -9
- package/dist/utils/getLastNodePoint.d.ts.map +0 -1
- package/dist/utils/throttle.d.ts +0 -8
- package/dist/utils/throttle.d.ts.map +0 -1
- package/dist/utils/validateYooptaValue.d.ts +0 -2
- package/dist/utils/validateYooptaValue.d.ts.map +0 -1
- package/dist/utils/validators.d.ts +0 -2
- package/dist/utils/validators.d.ts.map +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { YooEditor, YooptaPathIndex } from '../types';
|
|
2
|
+
import type { GetCurrentOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Get current block order
|
|
5
|
+
*
|
|
6
|
+
* @param editor - YooEditor instance
|
|
7
|
+
* @param options - Get current options
|
|
8
|
+
* @returns Current block order or null
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* // Get current block order
|
|
13
|
+
* const current = Selection.getCurrent(editor);
|
|
14
|
+
*
|
|
15
|
+
* // Get specific block order (same as editor.path.current)
|
|
16
|
+
* const current = Selection.getCurrent(editor, { at: 0 });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function getCurrent(editor: YooEditor, options?: GetCurrentOptions): YooptaPathIndex;
|
|
20
|
+
//# sourceMappingURL=getCurrent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCurrent.d.ts","sourceRoot":"","sources":["../../../src/editor/selection/getCurrent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,eAAe,CAM1F"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { YooEditor } from '../types';
|
|
2
|
+
import type { GetPointOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Get end point from Slate selection (later point)
|
|
5
|
+
*
|
|
6
|
+
* @param editor - YooEditor instance
|
|
7
|
+
* @param options - Get point options
|
|
8
|
+
* @returns End point or null
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* // Get end point from current selection
|
|
13
|
+
* const end = Selection.getEnd(editor);
|
|
14
|
+
*
|
|
15
|
+
* // Get end point from specific block
|
|
16
|
+
* const end = Selection.getEnd(editor, { at: 0 });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function getEnd(editor: YooEditor, options?: GetPointOptions): import("slate").BasePoint | null;
|
|
20
|
+
//# sourceMappingURL=getEnd.d.ts.map
|
|
@@ -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
|