@yoopta/editor 4.9.8 → 6.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -3
- 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 +8 -1715
- package/dist/components/Block/hooks.d.ts.map +1 -1
- package/dist/components/Editor/render-blocks.d.ts +11 -0
- package/dist/components/Editor/render-blocks.d.ts.map +1 -0
- package/dist/components/Editor/{Editor.d.ts → render-editor.d.ts} +3 -3
- 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/SelectionBox/SelectionBox.d.ts +1 -1
- package/dist/components/SelectionBox/SelectionBox.d.ts.map +1 -1
- package/dist/components/SelectionBox/hooks.d.ts +2 -2
- package/dist/components/SelectionBox/hooks.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/insertBlock.test.d.ts +2 -0
- package/dist/editor/blocks/insertBlock.test.d.ts.map +1 -0
- 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/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 +10 -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 +1 -2
- 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 +54 -30
- 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 +14 -10
- 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 +1 -1
- package/dist/parsers/deserializeHTML.d.ts.map +1 -1
- package/dist/parsers/deserializeTextNodes.d.ts +2 -2
- package/dist/parsers/deserializeTextNodes.d.ts.map +1 -1
- 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/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/{editorBuilders.d.ts → editor-builders.d.ts} +4 -6
- 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 +28 -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.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/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.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,27 @@
|
|
|
1
|
+
import type { YooEditor } from '../types';
|
|
2
|
+
import type { ClearMarksOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Clear all marks from specified selection or blocks
|
|
5
|
+
*
|
|
6
|
+
* @param editor - YooEditor instance
|
|
7
|
+
* @param options - Clear marks options
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* // Clear all marks from current text selection (slate.selection) or whole block
|
|
12
|
+
* Marks.clear(editor);
|
|
13
|
+
*
|
|
14
|
+
* // Clear all marks from specific selection
|
|
15
|
+
* Marks.clear(editor, {
|
|
16
|
+
* selection: { anchor: { path: [0, 0], offset: 0 }, focus: { path: [0, 0], offset: 5 } }
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* // Clear all marks from specific block
|
|
20
|
+
* Marks.clear(editor, { at: 0 });
|
|
21
|
+
*
|
|
22
|
+
* // Clear all marks from multiple blocks
|
|
23
|
+
* Marks.clear(editor, { at: [0, 1, 2] });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function clearMarks(editor: YooEditor, options?: ClearMarksOptions): void;
|
|
27
|
+
//# sourceMappingURL=clearMarks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clearMarks.d.ts","sourceRoot":"","sources":["../../../src/editor/textFormats/clearMarks.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AA4CjD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAwE/E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { YooEditor } from '../types';
|
|
2
|
+
import type { GetMarksOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Get all marks from current selection or specified block
|
|
5
|
+
*
|
|
6
|
+
* @param editor - YooEditor instance
|
|
7
|
+
* @param options - Get marks options
|
|
8
|
+
* @returns Object with all marks or null if no slate found
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* // Get all marks from current selection
|
|
13
|
+
* const marks = Marks.getAll(editor);
|
|
14
|
+
*
|
|
15
|
+
* // Get all marks from specific block
|
|
16
|
+
* const marks = Marks.getAll(editor, { at: 0 });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function getMarks(editor: YooEditor, options?: GetMarksOptions): Record<string, unknown> | null;
|
|
20
|
+
//# sourceMappingURL=getMarks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMarks.d.ts","sourceRoot":"","sources":["../../../src/editor/textFormats/getMarks.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,CACtB,MAAM,EAAE,SAAS,EACjB,OAAO,CAAC,EAAE,eAAe,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAiBhC"}
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
import { YooEditor } from '../types';
|
|
2
|
-
|
|
1
|
+
import type { YooEditor } from '../types';
|
|
2
|
+
import type { GetMarkValueOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Get mark value from current selection or specified block
|
|
5
|
+
*
|
|
6
|
+
* @param editor - YooEditor instance
|
|
7
|
+
* @param options - Get mark value options
|
|
8
|
+
* @returns Mark value or null if not found
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* // Get mark value from current selection
|
|
13
|
+
* const boldValue = Marks.getValue(editor, { type: 'bold' });
|
|
14
|
+
*
|
|
15
|
+
* // Get mark value from specific block
|
|
16
|
+
* const italicValue = Marks.getValue(editor, {
|
|
17
|
+
* type: 'italic',
|
|
18
|
+
* at: 0
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function getValue(editor: YooEditor, options: GetMarkValueOptions): unknown | null;
|
|
3
23
|
//# sourceMappingURL=getValue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getValue.d.ts","sourceRoot":"","sources":["../../../src/editor/textFormats/getValue.
|
|
1
|
+
{"version":3,"file":"getValue.d.ts","sourceRoot":"","sources":["../../../src/editor/textFormats/getValue.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,GAAG,IAAI,CAiBxF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { addMark } from './addMark';
|
|
2
|
+
import { clearMarks } from './clearMarks';
|
|
3
|
+
import { getMarks } from './getMarks';
|
|
4
|
+
import { getValue } from './getValue';
|
|
5
|
+
import { isActive } from './isActive';
|
|
6
|
+
import { removeMark } from './removeMark';
|
|
7
|
+
import { toggle } from './toggle';
|
|
8
|
+
import { update } from './update';
|
|
9
|
+
export declare const Marks: {
|
|
10
|
+
getValue: typeof getValue;
|
|
11
|
+
isActive: typeof isActive;
|
|
12
|
+
toggle: typeof toggle;
|
|
13
|
+
update: typeof update;
|
|
14
|
+
add: typeof addMark;
|
|
15
|
+
remove: typeof removeMark;
|
|
16
|
+
getAll: typeof getMarks;
|
|
17
|
+
clear: typeof clearMarks;
|
|
18
|
+
};
|
|
19
|
+
export { addMark, clearMarks, getMarks, getValue, isActive, removeMark, toggle, update, };
|
|
20
|
+
export type { AddMarkOptions, ClearMarksOptions, GetMarkValueOptions, GetMarksOptions, IsMarkActiveOptions, RemoveMarkOptions, ToggleMarkOptions, UpdateMarkOptions, } from './types';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/textFormats/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,eAAO,MAAM,KAAK;;;;;;;;;CAWjB,CAAC;AAGF,OAAO,EACL,OAAO,EACP,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,MAAM,EACN,MAAM,GACP,CAAC;AAGF,YAAY,EACV,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,SAAS,CAAC"}
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
import { YooEditor } from '../types';
|
|
2
|
-
|
|
1
|
+
import type { YooEditor } from '../types';
|
|
2
|
+
import type { IsMarkActiveOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Check if mark is active in current selection or specified block
|
|
5
|
+
*
|
|
6
|
+
* @param editor - YooEditor instance
|
|
7
|
+
* @param options - Check mark active options
|
|
8
|
+
* @returns True if mark is active, false otherwise
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* // Check if bold is active in current selection
|
|
13
|
+
* const isBold = Marks.isActive(editor, { type: 'bold' });
|
|
14
|
+
*
|
|
15
|
+
* // Check if italic is active in specific block
|
|
16
|
+
* const isItalic = Marks.isActive(editor, {
|
|
17
|
+
* type: 'italic',
|
|
18
|
+
* at: 0
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function isActive(editor: YooEditor, options: IsMarkActiveOptions): boolean;
|
|
3
23
|
//# sourceMappingURL=isActive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isActive.d.ts","sourceRoot":"","sources":["../../../src/editor/textFormats/isActive.
|
|
1
|
+
{"version":3,"file":"isActive.d.ts","sourceRoot":"","sources":["../../../src/editor/textFormats/isActive.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAiBjF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { YooEditor } from '../types';
|
|
2
|
+
import type { RemoveMarkOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Remove mark from specified selection or blocks
|
|
5
|
+
*
|
|
6
|
+
* @param editor - YooEditor instance
|
|
7
|
+
* @param options - Remove mark options
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* // Remove bold mark from current text selection (slate.selection) or whole block
|
|
12
|
+
* Marks.remove(editor, { type: 'bold' });
|
|
13
|
+
*
|
|
14
|
+
* // Remove mark from specific selection
|
|
15
|
+
* Marks.remove(editor, {
|
|
16
|
+
* type: 'bold',
|
|
17
|
+
* selection: { anchor: { path: [0, 0], offset: 0 }, focus: { path: [0, 0], offset: 5 } }
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* // Remove color mark from specific block
|
|
21
|
+
* Marks.remove(editor, {
|
|
22
|
+
* type: 'color',
|
|
23
|
+
* at: 0
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function removeMark(editor: YooEditor, options: RemoveMarkOptions): void;
|
|
28
|
+
//# sourceMappingURL=removeMark.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeMark.d.ts","sourceRoot":"","sources":["../../../src/editor/textFormats/removeMark.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AA4CjD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAyC9E"}
|
|
@@ -1,3 +1,34 @@
|
|
|
1
|
-
import { YooEditor } from '../types';
|
|
2
|
-
|
|
1
|
+
import type { YooEditor } from '../types';
|
|
2
|
+
import type { ToggleMarkOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Toggle mark in specified selection or blocks
|
|
5
|
+
*
|
|
6
|
+
* @param editor - YooEditor instance
|
|
7
|
+
* @param options - Toggle mark options
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* // Toggle bold in current text selection (slate.selection) or whole block
|
|
12
|
+
* Marks.toggle(editor, { type: 'bold' });
|
|
13
|
+
*
|
|
14
|
+
* // Toggle mark in specific selection
|
|
15
|
+
* Marks.toggle(editor, {
|
|
16
|
+
* type: 'bold',
|
|
17
|
+
* selection: { anchor: { path: [0, 0], offset: 0 }, focus: { path: [0, 0], offset: 5 } }
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* // Toggle italic in specific block
|
|
21
|
+
* Marks.toggle(editor, {
|
|
22
|
+
* type: 'italic',
|
|
23
|
+
* at: 0
|
|
24
|
+
* });
|
|
25
|
+
*
|
|
26
|
+
* // Toggle underline in multiple blocks
|
|
27
|
+
* Marks.toggle(editor, {
|
|
28
|
+
* type: 'underline',
|
|
29
|
+
* at: [0, 1, 2]
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function toggle(editor: YooEditor, options: ToggleMarkOptions): void;
|
|
3
34
|
//# sourceMappingURL=toggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../src/editor/textFormats/toggle.
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../src/editor/textFormats/toggle.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAe,SAAS,EAAE,MAAM,UAAU,CAAC;AAEvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAiDjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAwE1E"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import type { Range } from 'slate';
|
|
2
|
+
import type { YooptaPathIndex } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Options for getting mark value
|
|
5
|
+
*/
|
|
6
|
+
export type GetMarkValueOptions = {
|
|
7
|
+
/**
|
|
8
|
+
* Block index (order) to get mark from
|
|
9
|
+
* If not provided, uses current selection path
|
|
10
|
+
*/
|
|
11
|
+
at?: YooptaPathIndex;
|
|
12
|
+
/**
|
|
13
|
+
* Block ID to get mark from
|
|
14
|
+
*/
|
|
15
|
+
blockId?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Mark type to get value for
|
|
18
|
+
*/
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Options for checking if mark is active
|
|
23
|
+
*/
|
|
24
|
+
export type IsMarkActiveOptions = {
|
|
25
|
+
/**
|
|
26
|
+
* Block index (order) to check mark in
|
|
27
|
+
* If not provided, uses current selection path
|
|
28
|
+
*/
|
|
29
|
+
at?: YooptaPathIndex;
|
|
30
|
+
/**
|
|
31
|
+
* Block ID to check mark in
|
|
32
|
+
*/
|
|
33
|
+
blockId?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Mark type to check
|
|
36
|
+
*/
|
|
37
|
+
type: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Options for toggling a mark
|
|
41
|
+
*/
|
|
42
|
+
export type ToggleMarkOptions = {
|
|
43
|
+
/**
|
|
44
|
+
* Block index (order) or array of indices to toggle mark in
|
|
45
|
+
* If not provided and selection is not specified, uses current text selection (slate.selection) or block selection
|
|
46
|
+
*/
|
|
47
|
+
at?: YooptaPathIndex | YooptaPathIndex[];
|
|
48
|
+
/**
|
|
49
|
+
* Block ID or array of IDs to toggle mark in
|
|
50
|
+
*/
|
|
51
|
+
blockId?: string | string[];
|
|
52
|
+
/**
|
|
53
|
+
* Mark type to toggle
|
|
54
|
+
*/
|
|
55
|
+
type: string;
|
|
56
|
+
/**
|
|
57
|
+
* Specific text selection (Range) to apply mark to
|
|
58
|
+
* If not provided, uses slate.selection from current block
|
|
59
|
+
* If provided, works with this selection instead of whole blocks
|
|
60
|
+
*/
|
|
61
|
+
selection?: Range;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Options for updating a mark
|
|
65
|
+
*/
|
|
66
|
+
export type UpdateMarkOptions = {
|
|
67
|
+
/**
|
|
68
|
+
* Block index (order) or array of indices to update mark in
|
|
69
|
+
* If not provided and selection is not specified, uses current text selection (slate.selection) or block selection
|
|
70
|
+
*/
|
|
71
|
+
at?: YooptaPathIndex | YooptaPathIndex[];
|
|
72
|
+
/**
|
|
73
|
+
* Block ID or array of IDs to update mark in
|
|
74
|
+
*/
|
|
75
|
+
blockId?: string | string[];
|
|
76
|
+
/**
|
|
77
|
+
* Mark type to update
|
|
78
|
+
*/
|
|
79
|
+
type: string;
|
|
80
|
+
/**
|
|
81
|
+
* Value to set for the mark
|
|
82
|
+
*/
|
|
83
|
+
value: unknown;
|
|
84
|
+
/**
|
|
85
|
+
* Specific text selection (Range) to apply mark to
|
|
86
|
+
* If not provided, uses slate.selection from current block
|
|
87
|
+
* If provided, works with this selection instead of whole blocks
|
|
88
|
+
*/
|
|
89
|
+
selection?: Range;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Options for adding a mark
|
|
93
|
+
*/
|
|
94
|
+
export type AddMarkOptions = {
|
|
95
|
+
/**
|
|
96
|
+
* Block index (order) or array of indices to add mark to
|
|
97
|
+
* If not provided and selection is not specified, uses current text selection (slate.selection) or block selection
|
|
98
|
+
*/
|
|
99
|
+
at?: YooptaPathIndex | YooptaPathIndex[];
|
|
100
|
+
/**
|
|
101
|
+
* Block ID or array of IDs to add mark to
|
|
102
|
+
*/
|
|
103
|
+
blockId?: string | string[];
|
|
104
|
+
/**
|
|
105
|
+
* Mark type to add
|
|
106
|
+
*/
|
|
107
|
+
type: string;
|
|
108
|
+
/**
|
|
109
|
+
* Value to set for the mark
|
|
110
|
+
*/
|
|
111
|
+
value: unknown;
|
|
112
|
+
/**
|
|
113
|
+
* Specific text selection (Range) to apply mark to
|
|
114
|
+
* If not provided, uses slate.selection from current block
|
|
115
|
+
* If provided, works with this selection instead of whole blocks
|
|
116
|
+
*/
|
|
117
|
+
selection?: Range;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Options for removing a mark
|
|
121
|
+
*/
|
|
122
|
+
export type RemoveMarkOptions = {
|
|
123
|
+
/**
|
|
124
|
+
* Block index (order) or array of indices to remove mark from
|
|
125
|
+
* If not provided and selection is not specified, uses current text selection (slate.selection) or block selection
|
|
126
|
+
*/
|
|
127
|
+
at?: YooptaPathIndex | YooptaPathIndex[];
|
|
128
|
+
/**
|
|
129
|
+
* Block ID or array of IDs to remove mark from
|
|
130
|
+
*/
|
|
131
|
+
blockId?: string | string[];
|
|
132
|
+
/**
|
|
133
|
+
* Mark type to remove
|
|
134
|
+
*/
|
|
135
|
+
type: string;
|
|
136
|
+
/**
|
|
137
|
+
* Specific text selection (Range) to remove mark from
|
|
138
|
+
* If not provided, uses slate.selection from current block
|
|
139
|
+
* If provided, works with this selection instead of whole blocks
|
|
140
|
+
*/
|
|
141
|
+
selection?: Range;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Options for getting all marks
|
|
145
|
+
*/
|
|
146
|
+
export type GetMarksOptions = {
|
|
147
|
+
/**
|
|
148
|
+
* Block index (order) to get marks from
|
|
149
|
+
* If not provided, uses current selection path
|
|
150
|
+
*/
|
|
151
|
+
at?: YooptaPathIndex;
|
|
152
|
+
/**
|
|
153
|
+
* Block ID to get marks from
|
|
154
|
+
*/
|
|
155
|
+
blockId?: string;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Options for clearing all marks
|
|
159
|
+
*/
|
|
160
|
+
export type ClearMarksOptions = {
|
|
161
|
+
/**
|
|
162
|
+
* Block index (order) or array of indices to clear marks in
|
|
163
|
+
* If not provided and selection is not specified, uses current text selection (slate.selection) or block selection
|
|
164
|
+
*/
|
|
165
|
+
at?: YooptaPathIndex | YooptaPathIndex[];
|
|
166
|
+
/**
|
|
167
|
+
* Block ID or array of IDs to clear marks in
|
|
168
|
+
*/
|
|
169
|
+
blockId?: string | string[];
|
|
170
|
+
/**
|
|
171
|
+
* Specific text selection (Range) to clear marks from
|
|
172
|
+
* If not provided, uses slate.selection from current block
|
|
173
|
+
* If provided, works with this selection instead of whole blocks
|
|
174
|
+
*/
|
|
175
|
+
selection?: Range;
|
|
176
|
+
};
|
|
177
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/editor/textFormats/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,GAAG,eAAe,EAAE,CAAC;IACzC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,GAAG,eAAe,EAAE,CAAC;IACzC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,GAAG,eAAe,EAAE,CAAC;IACzC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,GAAG,eAAe,EAAE,CAAC;IACzC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,EAAE,CAAC,EAAE,eAAe,GAAG,eAAe,EAAE,CAAC;IACzC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB,CAAC"}
|
|
@@ -1,3 +1,33 @@
|
|
|
1
|
-
import { YooEditor } from '../types';
|
|
2
|
-
|
|
1
|
+
import type { YooEditor } from '../types';
|
|
2
|
+
import type { UpdateMarkOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Update mark value in specified selection or blocks
|
|
5
|
+
*
|
|
6
|
+
* @param editor - YooEditor instance
|
|
7
|
+
* @param options - Update mark options
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* // Update color mark in current text selection (slate.selection) or whole block
|
|
12
|
+
* Marks.update(editor, {
|
|
13
|
+
* type: 'color',
|
|
14
|
+
* value: '#ff0000'
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* // Update mark in specific selection
|
|
18
|
+
* Marks.update(editor, {
|
|
19
|
+
* type: 'color',
|
|
20
|
+
* value: '#ff0000',
|
|
21
|
+
* selection: { anchor: { path: [0, 0], offset: 0 }, focus: { path: [0, 0], offset: 5 } }
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* // Update font size in specific block
|
|
25
|
+
* Marks.update(editor, {
|
|
26
|
+
* type: 'fontSize',
|
|
27
|
+
* value: 16,
|
|
28
|
+
* at: 0
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function update(editor: YooEditor, options: UpdateMarkOptions): void;
|
|
3
33
|
//# sourceMappingURL=update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/editor/textFormats/update.
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/editor/textFormats/update.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AA4CjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,iBAAiB,GAAG,IAAI,CA4E1E"}
|
package/dist/editor/types.d.ts
CHANGED
|
@@ -1,26 +1,38 @@
|
|
|
1
|
-
import { Descendant, Path, Point, Selection } from 'slate';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { deleteBlock } from './blocks/deleteBlock';
|
|
5
|
-
import { duplicateBlock } from './blocks/duplicateBlock';
|
|
6
|
-
import { focusBlock } from './blocks/focusBlock';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
1
|
+
import type { Descendant, Path, Point, Selection } from 'slate';
|
|
2
|
+
import type { ReactEditor } from 'slate-react';
|
|
3
|
+
import type { decreaseBlockDepth } from './blocks/decreaseBlockDepth';
|
|
4
|
+
import type { deleteBlock } from './blocks/deleteBlock';
|
|
5
|
+
import type { duplicateBlock } from './blocks/duplicateBlock';
|
|
6
|
+
import type { focusBlock } from './blocks/focusBlock';
|
|
7
|
+
import type { GetBlockOptions } from './blocks/getBlock';
|
|
8
|
+
import type { increaseBlockDepth } from './blocks/increaseBlockDepth';
|
|
9
|
+
import type { insertBlock } from './blocks/insertBlock';
|
|
10
|
+
import type { mergeBlock } from './blocks/mergeBlock';
|
|
11
|
+
import type { toggleBlock } from './blocks/toggleBlock';
|
|
12
|
+
import type { EditorBlurOptions } from './core/blur';
|
|
13
|
+
import type { HistoryStack, HistoryStackName, YooptaHistory } from './core/history';
|
|
14
|
+
import type { getEmail } from '../parsers/getEmail';
|
|
15
|
+
import type { getHTML } from '../parsers/getHTML';
|
|
16
|
+
import type { WithoutFirstArg } from '../utils/types';
|
|
17
|
+
import type { moveBlock } from './blocks/moveBlock';
|
|
18
|
+
import type { SplitBlockOptions } from './blocks/splitBlock';
|
|
19
|
+
import type { updateBlock } from './blocks/updateBlock';
|
|
20
|
+
import type { YooptaOperation, applyTransforms } from './core/applyTransforms';
|
|
21
|
+
import type { setEditorValue } from './core/setEditorValue';
|
|
22
|
+
import type { getMarkdown } from '../parsers/getMarkdown';
|
|
23
|
+
import type { getPlainText } from '../parsers/getPlainText';
|
|
24
|
+
import type { Plugin, PluginElementProps, PluginElementsMap, PluginOptions } from '../plugins/types';
|
|
25
|
+
import type { ElementStructureOptions, TextNodeOptions } from './elements/create-element-structure';
|
|
26
|
+
import type { deleteElement } from './elements/deleteElement';
|
|
27
|
+
import type { getElement } from './elements/getElement';
|
|
28
|
+
import type { getElementChildren } from './elements/getElementChildren';
|
|
29
|
+
import type { getElementEntry } from './elements/getElementEntry';
|
|
30
|
+
import type { getElementPath } from './elements/getElementPath';
|
|
31
|
+
import type { getElements } from './elements/getElements';
|
|
32
|
+
import type { getParentElementPath } from './elements/getParentElementPath';
|
|
33
|
+
import type { insertElement } from './elements/insertElement';
|
|
34
|
+
import type { isElementEmpty } from './elements/isElementEmpty';
|
|
35
|
+
import type { updateElement } from './elements/updateElement';
|
|
24
36
|
export type YooptaBlockData<T = Descendant | SlateElement> = {
|
|
25
37
|
id: string;
|
|
26
38
|
value: T[];
|
|
@@ -54,8 +66,7 @@ export type TextFormat = {
|
|
|
54
66
|
export type YooptaBlock = {
|
|
55
67
|
type: string;
|
|
56
68
|
options?: PluginOptions<any>;
|
|
57
|
-
elements: PluginElementsMap
|
|
58
|
-
hasCustomEditor?: boolean;
|
|
69
|
+
elements: PluginElementsMap;
|
|
59
70
|
isActive: () => boolean;
|
|
60
71
|
};
|
|
61
72
|
export type YooptaBlocks = Record<string, YooptaBlock>;
|
|
@@ -73,7 +84,7 @@ export type YooptaEventsMap = {
|
|
|
73
84
|
'path-change': YooptaPath;
|
|
74
85
|
};
|
|
75
86
|
export type BaseCommands = Record<string, (...args: any[]) => any>;
|
|
76
|
-
export type
|
|
87
|
+
export type BaseYooEditor = {
|
|
77
88
|
id: string;
|
|
78
89
|
readOnly: boolean;
|
|
79
90
|
isEmpty: () => boolean;
|
|
@@ -86,18 +97,30 @@ export type YooEditor = {
|
|
|
86
97
|
decreaseBlockDepth: WithoutFirstArg<typeof decreaseBlockDepth>;
|
|
87
98
|
moveBlock: WithoutFirstArg<typeof moveBlock>;
|
|
88
99
|
focusBlock: WithoutFirstArg<typeof focusBlock>;
|
|
89
|
-
mergeBlock:
|
|
90
|
-
splitBlock: (options?: SplitBlockOptions) =>
|
|
100
|
+
mergeBlock: WithoutFirstArg<typeof mergeBlock>;
|
|
101
|
+
splitBlock: (options?: SplitBlockOptions) => string | undefined;
|
|
91
102
|
getBlock: (options: GetBlockOptions) => YooptaBlockData | null;
|
|
103
|
+
insertElement: WithoutFirstArg<typeof insertElement>;
|
|
104
|
+
updateElement: WithoutFirstArg<typeof updateElement>;
|
|
105
|
+
deleteElement: WithoutFirstArg<typeof deleteElement>;
|
|
106
|
+
getElement: WithoutFirstArg<typeof getElement>;
|
|
107
|
+
getElements: WithoutFirstArg<typeof getElements>;
|
|
108
|
+
getElementEntry: WithoutFirstArg<typeof getElementEntry>;
|
|
109
|
+
getElementPath: WithoutFirstArg<typeof getElementPath>;
|
|
110
|
+
getParentElementPath: WithoutFirstArg<typeof getParentElementPath>;
|
|
111
|
+
getElementChildren: WithoutFirstArg<typeof getElementChildren>;
|
|
112
|
+
isElementEmpty: WithoutFirstArg<typeof isElementEmpty>;
|
|
113
|
+
y: ((type: string, options?: ElementStructureOptions) => SlateElement) & {
|
|
114
|
+
text: (text: string, marks?: TextNodeOptions) => SlateElementTextNode;
|
|
115
|
+
inline: (type: string, options?: ElementStructureOptions) => SlateElement;
|
|
116
|
+
};
|
|
92
117
|
path: YooptaPath;
|
|
93
118
|
setPath: (path: YooptaPath) => void;
|
|
94
119
|
children: YooptaContentValue;
|
|
95
120
|
getEditorValue: () => YooptaContentValue;
|
|
96
121
|
setEditorValue: WithoutFirstArg<typeof setEditorValue>;
|
|
97
122
|
blockEditorsMap: YooptaPluginsEditorMap;
|
|
98
|
-
blocks: YooptaBlocks;
|
|
99
123
|
formats: YooptaFormats;
|
|
100
|
-
shortcuts: Record<string, YooptaBlock>;
|
|
101
124
|
plugins: Record<string, Plugin<Record<string, SlateElement>, unknown>>;
|
|
102
125
|
commands: Record<string, (...args: any[]) => any>;
|
|
103
126
|
applyTransforms: WithoutFirstArg<typeof applyTransforms>;
|
|
@@ -139,4 +162,5 @@ export type SlateElement<K extends string = string, T = any> = {
|
|
|
139
162
|
children: Descendant[];
|
|
140
163
|
props?: PluginElementProps<T>;
|
|
141
164
|
};
|
|
165
|
+
export type YooEditor = BaseYooEditor;
|
|
142
166
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,UA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,CAAC,CAAC;IAC7E,iBAAiB,EAAE,eAAe,CAAC,OAAO,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC3E,IAAI,EAAE,eAAe,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC;IACjD,IAAI,EAAE,eAAe,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC;IAGjD,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB,CAAC;AAGF,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,GAAG,IAAI;IAC7D,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC;IACR,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,aAAa,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import { SlateEditor, YooEditor } from '../editor/types';
|
|
2
|
-
|
|
1
|
+
import type { SlateEditor, YooEditor } from '../editor/types';
|
|
2
|
+
type Shortcuts = Record<string, {
|
|
3
|
+
type: string;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const withShortcuts: (editor: YooEditor, slate: SlateEditor, shortcuts: Shortcuts) => import("slate-react").ReactEditor;
|
|
6
|
+
export {};
|
|
3
7
|
//# sourceMappingURL=shortcuts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shortcuts.d.ts","sourceRoot":"","sources":["../../src/extensions/shortcuts.
|
|
1
|
+
{"version":3,"file":"shortcuts.d.ts","sourceRoot":"","sources":["../../src/extensions/shortcuts.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAgB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5E,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAElD,eAAO,MAAM,aAAa,WAAY,SAAS,SAAS,WAAW,aAAa,SAAS,sCAwDxF,CAAC"}
|
package/dist/handlers/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,qBAAqB;;CAEjC,CAAC"}
|