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