@tiptap/react 2.0.0-beta.91 → 2.0.0-beta.95
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/dist/packages/core/src/CommandManager.d.ts +20 -0
- package/dist/packages/core/src/Editor.d.ts +145 -0
- package/dist/packages/core/src/EventEmitter.d.ts +11 -0
- package/dist/packages/core/src/Extension.d.ts +227 -0
- package/dist/packages/core/src/ExtensionManager.d.ts +18 -0
- package/dist/packages/core/src/InputRule.d.ts +42 -0
- package/dist/packages/core/src/Mark.d.ts +319 -0
- package/dist/packages/core/src/Node.d.ts +388 -0
- package/dist/packages/core/src/NodeView.d.ts +27 -0
- package/dist/packages/core/src/PasteRule.d.ts +42 -0
- package/dist/packages/core/src/Tracker.d.ts +11 -0
- package/dist/packages/core/src/commands/blur.d.ts +12 -0
- package/dist/packages/core/src/commands/clearContent.d.ts +12 -0
- package/dist/packages/core/src/commands/clearNodes.d.ts +12 -0
- package/dist/packages/core/src/commands/command.d.ts +12 -0
- package/dist/packages/core/src/commands/createParagraphNear.d.ts +12 -0
- package/dist/packages/core/src/commands/deleteNode.d.ts +13 -0
- package/dist/packages/core/src/commands/deleteRange.d.ts +12 -0
- package/dist/packages/core/src/commands/deleteSelection.d.ts +12 -0
- package/dist/packages/core/src/commands/enter.d.ts +12 -0
- package/dist/packages/core/src/commands/exitCode.d.ts +12 -0
- package/dist/packages/core/src/commands/extendMarkRange.d.ts +13 -0
- package/dist/packages/core/src/commands/first.d.ts +12 -0
- package/dist/packages/core/src/commands/focus.d.ts +12 -0
- package/dist/packages/core/src/commands/forEach.d.ts +14 -0
- package/dist/packages/core/src/commands/insertContent.d.ts +16 -0
- package/dist/packages/core/src/commands/insertContentAt.d.ts +16 -0
- package/dist/packages/core/src/commands/joinBackward.d.ts +12 -0
- package/dist/packages/core/src/commands/joinForward.d.ts +12 -0
- package/dist/packages/core/src/commands/keyboardShortcut.d.ts +12 -0
- package/dist/packages/core/src/commands/lift.d.ts +13 -0
- package/dist/packages/core/src/commands/liftEmptyBlock.d.ts +12 -0
- package/dist/packages/core/src/commands/liftListItem.d.ts +13 -0
- package/dist/packages/core/src/commands/newlineInCode.d.ts +12 -0
- package/dist/packages/core/src/commands/resetAttributes.d.ts +13 -0
- package/dist/packages/core/src/commands/scrollIntoView.d.ts +12 -0
- package/dist/packages/core/src/commands/selectAll.d.ts +12 -0
- package/dist/packages/core/src/commands/selectNodeBackward.d.ts +12 -0
- package/dist/packages/core/src/commands/selectNodeForward.d.ts +12 -0
- package/dist/packages/core/src/commands/selectParentNode.d.ts +12 -0
- package/dist/packages/core/src/commands/setContent.d.ts +13 -0
- package/dist/packages/core/src/commands/setMark.d.ts +13 -0
- package/dist/packages/core/src/commands/setMeta.d.ts +12 -0
- package/dist/packages/core/src/commands/setNode.d.ts +13 -0
- package/dist/packages/core/src/commands/setNodeSelection.d.ts +12 -0
- package/dist/packages/core/src/commands/setTextSelection.d.ts +12 -0
- package/dist/packages/core/src/commands/sinkListItem.d.ts +13 -0
- package/dist/packages/core/src/commands/splitBlock.d.ts +14 -0
- package/dist/packages/core/src/commands/splitListItem.d.ts +13 -0
- package/dist/packages/core/src/commands/toggleList.d.ts +13 -0
- package/dist/packages/core/src/commands/toggleMark.d.ts +18 -0
- package/dist/packages/core/src/commands/toggleNode.d.ts +13 -0
- package/dist/packages/core/src/commands/toggleWrap.d.ts +13 -0
- package/dist/packages/core/src/commands/undoInputRule.d.ts +12 -0
- package/dist/packages/core/src/commands/unsetAllMarks.d.ts +12 -0
- package/dist/packages/core/src/commands/unsetMark.d.ts +18 -0
- package/dist/packages/core/src/commands/updateAttributes.d.ts +13 -0
- package/dist/packages/core/src/commands/wrapIn.d.ts +13 -0
- package/dist/packages/core/src/commands/wrapInList.d.ts +13 -0
- package/dist/packages/core/src/extensions/clipboardTextSerializer.d.ts +2 -0
- package/dist/packages/core/src/extensions/commands.d.ts +98 -0
- package/dist/packages/core/src/extensions/editable.d.ts +2 -0
- package/dist/packages/core/src/extensions/focusEvents.d.ts +2 -0
- package/dist/packages/core/src/extensions/index.d.ts +6 -0
- package/dist/packages/core/src/extensions/keymap.d.ts +2 -0
- package/dist/packages/core/src/extensions/tabindex.d.ts +2 -0
- package/dist/packages/core/src/helpers/createChainableState.d.ts +5 -0
- package/dist/packages/core/src/helpers/createDocument.d.ts +3 -0
- package/dist/packages/core/src/helpers/createNodeFromContent.d.ts +7 -0
- package/dist/packages/core/src/helpers/findChildren.d.ts +3 -0
- package/dist/packages/core/src/helpers/findChildrenInRange.d.ts +6 -0
- package/dist/packages/core/src/helpers/findParentNode.d.ts +9 -0
- package/dist/packages/core/src/helpers/findParentNodeClosestToPos.d.ts +8 -0
- package/dist/packages/core/src/helpers/generateHTML.d.ts +2 -0
- package/dist/packages/core/src/helpers/generateJSON.d.ts +2 -0
- package/dist/packages/core/src/helpers/generateText.d.ts +5 -0
- package/dist/packages/core/src/helpers/getAttributes.d.ts +3 -0
- package/dist/packages/core/src/helpers/getAttributesFromExtensions.d.ts +6 -0
- package/dist/packages/core/src/helpers/getDebugJSON.d.ts +8 -0
- package/dist/packages/core/src/helpers/getExtensionField.d.ts +2 -0
- package/dist/packages/core/src/helpers/getHTMLFromFragment.d.ts +2 -0
- package/dist/packages/core/src/helpers/getMarkAttributes.d.ts +3 -0
- package/dist/packages/core/src/helpers/getMarkRange.d.ts +3 -0
- package/dist/packages/core/src/helpers/getMarkType.d.ts +2 -0
- package/dist/packages/core/src/helpers/getMarksBetween.d.ts +3 -0
- package/dist/packages/core/src/helpers/getNodeAttributes.d.ts +3 -0
- package/dist/packages/core/src/helpers/getNodeType.d.ts +2 -0
- package/dist/packages/core/src/helpers/getRenderedAttributes.d.ts +3 -0
- package/dist/packages/core/src/helpers/getSchema.d.ts +3 -0
- package/dist/packages/core/src/helpers/getSchemaByResolvedExtensions.d.ts +3 -0
- package/dist/packages/core/src/helpers/getSchemaTypeByName.d.ts +2 -0
- package/dist/packages/core/src/helpers/getSchemaTypeNameByName.d.ts +2 -0
- package/dist/packages/core/src/helpers/getSplittedAttributes.d.ts +2 -0
- package/dist/packages/core/src/helpers/getText.d.ts +6 -0
- package/dist/packages/core/src/helpers/getTextBetween.d.ts +6 -0
- package/dist/packages/core/src/helpers/getTextSeralizersFromSchema.d.ts +3 -0
- package/dist/packages/core/src/helpers/injectExtensionAttributesToParseRule.d.ts +9 -0
- package/dist/packages/core/src/helpers/isActive.d.ts +2 -0
- package/dist/packages/core/src/helpers/isExtensionRulesEnabled.d.ts +2 -0
- package/dist/packages/core/src/helpers/isList.d.ts +2 -0
- package/dist/packages/core/src/helpers/isMarkActive.d.ts +3 -0
- package/dist/packages/core/src/helpers/isNodeActive.d.ts +3 -0
- package/dist/packages/core/src/helpers/isNodeEmpty.d.ts +2 -0
- package/dist/packages/core/src/helpers/isNodeSelection.d.ts +2 -0
- package/dist/packages/core/src/helpers/isTextSelection.d.ts +2 -0
- package/dist/packages/core/src/helpers/posToDOMRect.d.ts +2 -0
- package/dist/packages/core/src/helpers/selectionToInsertionEnd.d.ts +2 -0
- package/dist/packages/core/src/helpers/splitExtensions.d.ts +9 -0
- package/dist/packages/core/src/index.d.ts +57 -0
- package/dist/packages/core/src/inputRules/markInputRule.d.ts +12 -0
- package/dist/packages/core/src/inputRules/nodeInputRule.d.ts +12 -0
- package/dist/packages/core/src/inputRules/textInputRule.d.ts +9 -0
- package/dist/packages/core/src/inputRules/textblockTypeInputRule.d.ts +14 -0
- package/dist/packages/core/src/inputRules/wrappingInputRule.d.ts +23 -0
- package/dist/packages/core/src/pasteRules/markPasteRule.d.ts +12 -0
- package/dist/packages/core/src/pasteRules/textPasteRule.d.ts +9 -0
- package/dist/packages/core/src/style.d.ts +2 -0
- package/dist/packages/core/src/types.d.ts +210 -0
- package/dist/packages/core/src/utilities/callOrReturn.d.ts +9 -0
- package/dist/packages/core/src/utilities/createStyleTag.d.ts +1 -0
- package/dist/packages/core/src/utilities/deleteProps.d.ts +6 -0
- package/dist/packages/core/src/utilities/elementFromString.d.ts +1 -0
- package/dist/packages/core/src/utilities/findDuplicates.d.ts +1 -0
- package/dist/packages/core/src/utilities/fromString.d.ts +1 -0
- package/dist/packages/core/src/utilities/isClass.d.ts +1 -0
- package/dist/packages/core/src/utilities/isEmptyObject.d.ts +1 -0
- package/dist/packages/core/src/utilities/isFunction.d.ts +1 -0
- package/dist/packages/core/src/utilities/isNumber.d.ts +1 -0
- package/dist/packages/core/src/utilities/isObject.d.ts +1 -0
- package/dist/packages/core/src/utilities/isPlainObject.d.ts +1 -0
- package/dist/packages/core/src/utilities/isRegExp.d.ts +1 -0
- package/dist/packages/core/src/utilities/isString.d.ts +1 -0
- package/dist/packages/core/src/utilities/isiOS.d.ts +1 -0
- package/dist/packages/core/src/utilities/mergeAttributes.d.ts +1 -0
- package/dist/packages/core/src/utilities/mergeDeep.d.ts +1 -0
- package/dist/packages/core/src/utilities/minMax.d.ts +1 -0
- package/dist/packages/core/src/utilities/objectIncludes.d.ts +8 -0
- package/dist/packages/extension-blockquote/src/blockquote.d.ts +24 -0
- package/dist/packages/extension-blockquote/src/index.d.ts +3 -0
- package/dist/packages/extension-bold/src/bold.d.ts +27 -0
- package/dist/packages/extension-bold/src/index.d.ts +3 -0
- package/dist/packages/extension-bubble-menu/src/bubble-menu-plugin.d.ts +43 -0
- package/dist/packages/extension-bubble-menu/src/bubble-menu.d.ts +6 -0
- package/dist/packages/extension-bubble-menu/src/index.d.ts +4 -0
- package/dist/packages/extension-bullet-list/src/bullet-list.d.ts +16 -0
- package/dist/packages/extension-bullet-list/src/index.d.ts +3 -0
- package/dist/packages/extension-character-count/src/character-count.d.ts +7 -0
- package/dist/packages/extension-character-count/src/index.d.ts +3 -0
- package/dist/packages/extension-code/src/code.d.ts +25 -0
- package/dist/packages/extension-code/src/index.d.ts +3 -0
- package/dist/packages/extension-code-block/src/code-block.d.ts +26 -0
- package/dist/packages/extension-code-block/src/index.d.ts +3 -0
- package/dist/packages/extension-code-block-lowlight/src/code-block-lowlight.d.ts +6 -0
- package/dist/packages/extension-code-block-lowlight/src/index.d.ts +3 -0
- package/dist/packages/extension-code-block-lowlight/src/lowlight-plugin.d.ts +6 -0
- package/dist/packages/extension-collaboration/src/collaboration.d.ts +30 -0
- package/dist/packages/extension-collaboration/src/helpers/isChangeOrigin.d.ts +2 -0
- package/dist/packages/extension-collaboration/src/index.d.ts +4 -0
- package/dist/packages/extension-collaboration-cursor/src/collaboration-cursor.d.ts +37 -0
- package/dist/packages/extension-collaboration-cursor/src/index.d.ts +3 -0
- package/dist/packages/extension-color/src/color.d.ts +21 -0
- package/dist/packages/extension-color/src/index.d.ts +3 -0
- package/dist/packages/extension-document/src/document.d.ts +2 -0
- package/dist/packages/extension-document/src/index.d.ts +3 -0
- package/dist/packages/extension-dropcursor/src/dropcursor.d.ts +7 -0
- package/dist/packages/extension-dropcursor/src/index.d.ts +3 -0
- package/dist/packages/extension-floating-menu/src/floating-menu-plugin.d.ts +40 -0
- package/dist/packages/extension-floating-menu/src/floating-menu.d.ts +6 -0
- package/dist/packages/extension-floating-menu/src/index.d.ts +4 -0
- package/dist/packages/extension-focus/src/focus.d.ts +6 -0
- package/dist/packages/extension-focus/src/index.d.ts +3 -0
- package/dist/packages/extension-font-family/src/font-family.d.ts +21 -0
- package/dist/packages/extension-font-family/src/index.d.ts +3 -0
- package/dist/packages/extension-gapcursor/src/gapcursor.d.ts +15 -0
- package/dist/packages/extension-gapcursor/src/index.d.ts +3 -0
- package/dist/packages/extension-hard-break/src/hard-break.d.ts +16 -0
- package/dist/packages/extension-hard-break/src/index.d.ts +3 -0
- package/dist/packages/extension-heading/src/heading.d.ts +26 -0
- package/dist/packages/extension-heading/src/index.d.ts +3 -0
- package/dist/packages/extension-highlight/src/highlight.d.ts +30 -0
- package/dist/packages/extension-highlight/src/index.d.ts +3 -0
- package/dist/packages/extension-history/src/history.d.ts +20 -0
- package/dist/packages/extension-history/src/index.d.ts +3 -0
- package/dist/packages/extension-horizontal-rule/src/horizontal-rule.d.ts +15 -0
- package/dist/packages/extension-horizontal-rule/src/index.d.ts +3 -0
- package/dist/packages/extension-image/src/image.d.ts +21 -0
- package/dist/packages/extension-image/src/index.d.ts +3 -0
- package/dist/packages/extension-italic/src/index.d.ts +3 -0
- package/dist/packages/extension-italic/src/italic.d.ts +27 -0
- package/dist/packages/extension-link/src/index.d.ts +3 -0
- package/dist/packages/extension-link/src/link.d.ts +40 -0
- package/dist/packages/extension-list-item/src/index.d.ts +3 -0
- package/dist/packages/extension-list-item/src/list-item.d.ts +5 -0
- package/dist/packages/extension-mention/src/index.d.ts +3 -0
- package/dist/packages/extension-mention/src/mention.d.ts +14 -0
- package/dist/packages/extension-ordered-list/src/index.d.ts +3 -0
- package/dist/packages/extension-ordered-list/src/ordered-list.d.ts +16 -0
- package/dist/packages/extension-paragraph/src/index.d.ts +3 -0
- package/dist/packages/extension-paragraph/src/paragraph.d.ts +15 -0
- package/dist/packages/extension-placeholder/src/index.d.ts +3 -0
- package/dist/packages/extension-placeholder/src/placeholder.d.ts +15 -0
- package/dist/packages/extension-strike/src/index.d.ts +3 -0
- package/dist/packages/extension-strike/src/strike.d.ts +25 -0
- package/dist/packages/extension-subscript/src/index.d.ts +3 -0
- package/dist/packages/extension-subscript/src/subscript.d.ts +23 -0
- package/dist/packages/extension-superscript/src/index.d.ts +3 -0
- package/dist/packages/extension-superscript/src/superscript.d.ts +23 -0
- package/dist/packages/extension-table/src/TableView.d.ts +17 -0
- package/dist/packages/extension-table/src/index.d.ts +4 -0
- package/dist/packages/extension-table/src/table.d.ts +55 -0
- package/dist/packages/extension-table/src/utilities/createCell.d.ts +2 -0
- package/dist/packages/extension-table/src/utilities/createTable.d.ts +2 -0
- package/dist/packages/extension-table/src/utilities/deleteTableWhenAllCellsSelected.d.ts +2 -0
- package/dist/packages/extension-table/src/utilities/getTableNodeTypes.d.ts +4 -0
- package/dist/packages/extension-table/src/utilities/isCellSelection.d.ts +2 -0
- package/dist/packages/extension-table-cell/src/index.d.ts +3 -0
- package/dist/packages/extension-table-cell/src/table-cell.d.ts +5 -0
- package/dist/packages/extension-table-header/src/index.d.ts +3 -0
- package/dist/packages/extension-table-header/src/table-header.d.ts +5 -0
- package/dist/packages/extension-table-row/src/index.d.ts +3 -0
- package/dist/packages/extension-table-row/src/table-row.d.ts +5 -0
- package/dist/packages/extension-task-item/src/index.d.ts +3 -0
- package/dist/packages/extension-task-item/src/task-item.d.ts +7 -0
- package/dist/packages/extension-task-list/src/index.d.ts +3 -0
- package/dist/packages/extension-task-list/src/task-list.d.ts +15 -0
- package/dist/packages/extension-text/src/index.d.ts +3 -0
- package/dist/packages/extension-text/src/text.d.ts +2 -0
- package/dist/packages/extension-text-align/src/index.d.ts +3 -0
- package/dist/packages/extension-text-align/src/text-align.d.ts +21 -0
- package/dist/packages/extension-text-style/src/index.d.ts +3 -0
- package/dist/packages/extension-text-style/src/text-style.d.ts +15 -0
- package/dist/packages/extension-typography/src/index.d.ts +3 -0
- package/dist/packages/extension-typography/src/typography.d.ts +23 -0
- package/dist/packages/extension-underline/src/index.d.ts +3 -0
- package/dist/packages/extension-underline/src/underline.d.ts +23 -0
- package/dist/packages/html/src/generateHTML.d.ts +2 -0
- package/dist/packages/html/src/generateJSON.d.ts +2 -0
- package/dist/packages/html/src/getHTMLFromFragment.d.ts +2 -0
- package/dist/packages/html/src/index.d.ts +2 -0
- package/dist/packages/react/src/BubbleMenu.d.ts +8 -0
- package/dist/packages/react/src/Editor.d.ts +6 -0
- package/dist/packages/react/src/EditorContent.d.ts +19 -0
- package/dist/packages/react/src/FloatingMenu.d.ts +8 -0
- package/dist/packages/react/src/NodeViewContent.d.ts +6 -0
- package/dist/packages/react/src/NodeViewWrapper.d.ts +6 -0
- package/dist/packages/react/src/ReactNodeViewRenderer.d.ts +13 -0
- package/dist/packages/react/src/ReactRenderer.d.ts +27 -0
- package/dist/packages/react/src/index.d.ts +10 -0
- package/dist/packages/react/src/useEditor.d.ts +4 -0
- package/dist/packages/react/src/useReactNodeView.d.ts +7 -0
- package/dist/packages/starter-kit/src/index.d.ts +3 -0
- package/dist/packages/starter-kit/src/starter-kit.d.ts +37 -0
- package/dist/packages/suggestion/src/findSuggestionMatch.d.ts +15 -0
- package/dist/packages/suggestion/src/index.d.ts +4 -0
- package/dist/packages/suggestion/src/suggestion.d.ts +49 -0
- package/dist/tests/cypress/integration/core/can.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/editorProps.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/extendExtensions.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/extendMarkRange.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/extensionOptions.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/fromString.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/generateHTML.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/generateJSON.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/isActive.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/isClass.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/mergeAttributes.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/mergeDeep.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/core/pluginOrder.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/extensions/bold.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/extensions/codeBlockLowlight.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/html/generateHTML.spec.d.ts +1 -0
- package/dist/tests/cypress/integration/html/generateJSON.spec.d.ts +1 -0
- package/dist/tiptap-react.cjs.js +375 -0
- package/dist/tiptap-react.cjs.js.map +1 -0
- package/dist/tiptap-react.esm.js +352 -0
- package/dist/tiptap-react.esm.js.map +1 -0
- package/dist/tiptap-react.umd.js +375 -0
- package/dist/tiptap-react.umd.js.map +1 -0
- package/package.json +6 -6
- package/src/ReactNodeViewRenderer.tsx +1 -0
- package/src/ReactRenderer.tsx +12 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NodeView } from 'prosemirror-view';
|
|
2
|
+
import { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
3
|
+
export declare function updateColumns(node: ProseMirrorNode, colgroup: Element, table: Element, cellMinWidth: number, overrideCol?: number, overrideValue?: any): void;
|
|
4
|
+
export declare class TableView implements NodeView {
|
|
5
|
+
node: ProseMirrorNode;
|
|
6
|
+
cellMinWidth: number;
|
|
7
|
+
dom: Element;
|
|
8
|
+
table: Element;
|
|
9
|
+
colgroup: Element;
|
|
10
|
+
contentDOM: Element;
|
|
11
|
+
constructor(node: ProseMirrorNode, cellMinWidth: number);
|
|
12
|
+
update(node: ProseMirrorNode): boolean;
|
|
13
|
+
ignoreMutation(mutation: MutationRecord | {
|
|
14
|
+
type: 'selection';
|
|
15
|
+
target: Element;
|
|
16
|
+
}): boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Node, ParentConfig } from '@tiptap/core';
|
|
2
|
+
import { NodeView } from 'prosemirror-view';
|
|
3
|
+
export interface TableOptions {
|
|
4
|
+
HTMLAttributes: Record<string, any>;
|
|
5
|
+
resizable: boolean;
|
|
6
|
+
handleWidth: number;
|
|
7
|
+
cellMinWidth: number;
|
|
8
|
+
View: NodeView;
|
|
9
|
+
lastColumnResizable: boolean;
|
|
10
|
+
allowTableNodeSelection: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare module '@tiptap/core' {
|
|
13
|
+
interface Commands<ReturnType> {
|
|
14
|
+
table: {
|
|
15
|
+
insertTable: (options?: {
|
|
16
|
+
rows?: number;
|
|
17
|
+
cols?: number;
|
|
18
|
+
withHeaderRow?: boolean;
|
|
19
|
+
}) => ReturnType;
|
|
20
|
+
addColumnBefore: () => ReturnType;
|
|
21
|
+
addColumnAfter: () => ReturnType;
|
|
22
|
+
deleteColumn: () => ReturnType;
|
|
23
|
+
addRowBefore: () => ReturnType;
|
|
24
|
+
addRowAfter: () => ReturnType;
|
|
25
|
+
deleteRow: () => ReturnType;
|
|
26
|
+
deleteTable: () => ReturnType;
|
|
27
|
+
mergeCells: () => ReturnType;
|
|
28
|
+
splitCell: () => ReturnType;
|
|
29
|
+
toggleHeaderColumn: () => ReturnType;
|
|
30
|
+
toggleHeaderRow: () => ReturnType;
|
|
31
|
+
toggleHeaderCell: () => ReturnType;
|
|
32
|
+
mergeOrSplit: () => ReturnType;
|
|
33
|
+
setCellAttribute: (name: string, value: any) => ReturnType;
|
|
34
|
+
goToNextCell: () => ReturnType;
|
|
35
|
+
goToPreviousCell: () => ReturnType;
|
|
36
|
+
fixTables: () => ReturnType;
|
|
37
|
+
setCellSelection: (position: {
|
|
38
|
+
anchorCell: number;
|
|
39
|
+
headCell?: number;
|
|
40
|
+
}) => ReturnType;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
interface NodeConfig<Options, Storage> {
|
|
44
|
+
/**
|
|
45
|
+
* Table Role
|
|
46
|
+
*/
|
|
47
|
+
tableRole?: string | ((this: {
|
|
48
|
+
name: string;
|
|
49
|
+
options: Options;
|
|
50
|
+
storage: Storage;
|
|
51
|
+
parent: ParentConfig<NodeConfig<Options>>['tableRole'];
|
|
52
|
+
}) => string);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export declare const Table: Node<TableOptions, unknown>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Schema, Fragment, Node as ProsemirrorNode } from 'prosemirror-model';
|
|
2
|
+
export declare function createTable(schema: Schema, rowsCount: number, colsCount: number, withHeaderRow: boolean, cellContent?: Fragment<Schema> | ProsemirrorNode<Schema> | Array<ProsemirrorNode<Schema>>): ProsemirrorNode;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
export interface TaskListOptions {
|
|
3
|
+
HTMLAttributes: Record<string, any>;
|
|
4
|
+
}
|
|
5
|
+
declare module '@tiptap/core' {
|
|
6
|
+
interface Commands<ReturnType> {
|
|
7
|
+
taskList: {
|
|
8
|
+
/**
|
|
9
|
+
* Toggle a task list
|
|
10
|
+
*/
|
|
11
|
+
toggleTaskList: () => ReturnType;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export declare const TaskList: Node<TaskListOptions, any>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
export interface TextAlignOptions {
|
|
3
|
+
types: string[];
|
|
4
|
+
alignments: string[];
|
|
5
|
+
defaultAlignment: string;
|
|
6
|
+
}
|
|
7
|
+
declare module '@tiptap/core' {
|
|
8
|
+
interface Commands<ReturnType> {
|
|
9
|
+
textAlign: {
|
|
10
|
+
/**
|
|
11
|
+
* Set the text align attribute
|
|
12
|
+
*/
|
|
13
|
+
setTextAlign: (alignment: string) => ReturnType;
|
|
14
|
+
/**
|
|
15
|
+
* Unset the text align attribute
|
|
16
|
+
*/
|
|
17
|
+
unsetTextAlign: () => ReturnType;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export declare const TextAlign: Extension<TextAlignOptions, any>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Mark } from '@tiptap/core';
|
|
2
|
+
export interface TextStyleOptions {
|
|
3
|
+
HTMLAttributes: Record<string, any>;
|
|
4
|
+
}
|
|
5
|
+
declare module '@tiptap/core' {
|
|
6
|
+
interface Commands<ReturnType> {
|
|
7
|
+
textStyle: {
|
|
8
|
+
/**
|
|
9
|
+
* Remove spans without inline style attributes.
|
|
10
|
+
*/
|
|
11
|
+
removeEmptyTextStyle: () => ReturnType;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export declare const TextStyle: Mark<TextStyleOptions, any>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
export declare const emDash: import("@tiptap/core").InputRule;
|
|
3
|
+
export declare const ellipsis: import("@tiptap/core").InputRule;
|
|
4
|
+
export declare const openDoubleQuote: import("@tiptap/core").InputRule;
|
|
5
|
+
export declare const closeDoubleQuote: import("@tiptap/core").InputRule;
|
|
6
|
+
export declare const openSingleQuote: import("@tiptap/core").InputRule;
|
|
7
|
+
export declare const closeSingleQuote: import("@tiptap/core").InputRule;
|
|
8
|
+
export declare const leftArrow: import("@tiptap/core").InputRule;
|
|
9
|
+
export declare const rightArrow: import("@tiptap/core").InputRule;
|
|
10
|
+
export declare const copyright: import("@tiptap/core").InputRule;
|
|
11
|
+
export declare const trademark: import("@tiptap/core").InputRule;
|
|
12
|
+
export declare const registeredTrademark: import("@tiptap/core").InputRule;
|
|
13
|
+
export declare const oneHalf: import("@tiptap/core").InputRule;
|
|
14
|
+
export declare const plusMinus: import("@tiptap/core").InputRule;
|
|
15
|
+
export declare const notEqual: import("@tiptap/core").InputRule;
|
|
16
|
+
export declare const laquo: import("@tiptap/core").InputRule;
|
|
17
|
+
export declare const raquo: import("@tiptap/core").InputRule;
|
|
18
|
+
export declare const multiplication: import("@tiptap/core").InputRule;
|
|
19
|
+
export declare const superscriptTwo: import("@tiptap/core").InputRule;
|
|
20
|
+
export declare const superscriptThree: import("@tiptap/core").InputRule;
|
|
21
|
+
export declare const oneQuarter: import("@tiptap/core").InputRule;
|
|
22
|
+
export declare const threeQuarters: import("@tiptap/core").InputRule;
|
|
23
|
+
export declare const Typography: Extension<any, any>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Mark } from '@tiptap/core';
|
|
2
|
+
export interface UnderlineOptions {
|
|
3
|
+
HTMLAttributes: Record<string, any>;
|
|
4
|
+
}
|
|
5
|
+
declare module '@tiptap/core' {
|
|
6
|
+
interface Commands<ReturnType> {
|
|
7
|
+
underline: {
|
|
8
|
+
/**
|
|
9
|
+
* Set an underline mark
|
|
10
|
+
*/
|
|
11
|
+
setUnderline: () => ReturnType;
|
|
12
|
+
/**
|
|
13
|
+
* Toggle an underline mark
|
|
14
|
+
*/
|
|
15
|
+
toggleUnderline: () => ReturnType;
|
|
16
|
+
/**
|
|
17
|
+
* Unset an underline mark
|
|
18
|
+
*/
|
|
19
|
+
unsetUnderline: () => ReturnType;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare const Underline: Mark<UnderlineOptions, any>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BubbleMenuPluginProps } from '@tiptap/extension-bubble-menu';
|
|
3
|
+
declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
4
|
+
export declare type BubbleMenuProps = Omit<Optional<BubbleMenuPluginProps, 'pluginKey'>, 'element'> & {
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const BubbleMenu: React.FC<BubbleMenuProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Editor as CoreEditor } from '@tiptap/core';
|
|
3
|
+
import { EditorContentProps, EditorContentState } from './EditorContent';
|
|
4
|
+
export declare class Editor extends CoreEditor {
|
|
5
|
+
contentComponent: React.Component<EditorContentProps, EditorContentState> | null;
|
|
6
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { HTMLProps } from 'react';
|
|
2
|
+
import { Editor } from './Editor';
|
|
3
|
+
import { ReactRenderer } from './ReactRenderer';
|
|
4
|
+
export interface EditorContentProps extends HTMLProps<HTMLDivElement> {
|
|
5
|
+
editor: Editor | null;
|
|
6
|
+
}
|
|
7
|
+
export interface EditorContentState {
|
|
8
|
+
renderers: Map<string, ReactRenderer>;
|
|
9
|
+
}
|
|
10
|
+
export declare class PureEditorContent extends React.Component<EditorContentProps, EditorContentState> {
|
|
11
|
+
editorContentRef: React.RefObject<any>;
|
|
12
|
+
constructor(props: EditorContentProps);
|
|
13
|
+
componentDidMount(): void;
|
|
14
|
+
componentDidUpdate(): void;
|
|
15
|
+
init(): void;
|
|
16
|
+
componentWillUnmount(): void;
|
|
17
|
+
render(): JSX.Element;
|
|
18
|
+
}
|
|
19
|
+
export declare const EditorContent: React.MemoExoticComponent<typeof PureEditorContent>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FloatingMenuPluginProps } from '@tiptap/extension-floating-menu';
|
|
3
|
+
declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
4
|
+
export declare type FloatingMenuProps = Omit<Optional<FloatingMenuPluginProps, 'pluginKey'>, 'element'> & {
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const FloatingMenu: React.FC<FloatingMenuProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { NodeViewRenderer, NodeViewRendererOptions } from '@tiptap/core';
|
|
2
|
+
import { Decoration } from 'prosemirror-view';
|
|
3
|
+
import { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
4
|
+
export interface ReactNodeViewRendererOptions extends NodeViewRendererOptions {
|
|
5
|
+
update: ((props: {
|
|
6
|
+
oldNode: ProseMirrorNode;
|
|
7
|
+
oldDecorations: Decoration[];
|
|
8
|
+
newNode: ProseMirrorNode;
|
|
9
|
+
newDecorations: Decoration[];
|
|
10
|
+
updateProps: () => void;
|
|
11
|
+
}) => boolean) | null;
|
|
12
|
+
}
|
|
13
|
+
export declare function ReactNodeViewRenderer(component: any, options?: Partial<ReactNodeViewRendererOptions>): NodeViewRenderer;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Editor } from '@tiptap/core';
|
|
3
|
+
import { Editor as ExtendedEditor } from './Editor';
|
|
4
|
+
export interface ReactRendererOptions {
|
|
5
|
+
editor: Editor;
|
|
6
|
+
props?: Record<string, any>;
|
|
7
|
+
as?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare type ComponentType<R> = React.ComponentClass | React.FunctionComponent | React.ForwardRefExoticComponent<{
|
|
11
|
+
items: any[];
|
|
12
|
+
command: any;
|
|
13
|
+
} & React.RefAttributes<R>>;
|
|
14
|
+
export declare class ReactRenderer<R = unknown> {
|
|
15
|
+
id: string;
|
|
16
|
+
editor: ExtendedEditor;
|
|
17
|
+
component: any;
|
|
18
|
+
element: Element;
|
|
19
|
+
props: Record<string, any>;
|
|
20
|
+
reactElement: React.ReactNode;
|
|
21
|
+
ref: R | null;
|
|
22
|
+
constructor(component: ComponentType<R>, { editor, props, as, className, }: ReactRendererOptions);
|
|
23
|
+
render(): void;
|
|
24
|
+
updateProps(props?: Record<string, any>): void;
|
|
25
|
+
destroy(): void;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from '@tiptap/core';
|
|
2
|
+
export * from './BubbleMenu';
|
|
3
|
+
export { Editor } from './Editor';
|
|
4
|
+
export * from './FloatingMenu';
|
|
5
|
+
export * from './useEditor';
|
|
6
|
+
export * from './ReactRenderer';
|
|
7
|
+
export * from './ReactNodeViewRenderer';
|
|
8
|
+
export * from './EditorContent';
|
|
9
|
+
export * from './NodeViewWrapper';
|
|
10
|
+
export * from './NodeViewContent';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface ReactNodeViewContextProps {
|
|
3
|
+
onDragStart: (event: DragEvent) => void;
|
|
4
|
+
nodeViewContentRef: (element: HTMLElement | null) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const ReactNodeViewContext: import("react").Context<Partial<ReactNodeViewContextProps>>;
|
|
7
|
+
export declare const useReactNodeView: () => Partial<ReactNodeViewContextProps>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { BlockquoteOptions } from '@tiptap/extension-blockquote';
|
|
3
|
+
import { BoldOptions } from '@tiptap/extension-bold';
|
|
4
|
+
import { BulletListOptions } from '@tiptap/extension-bullet-list';
|
|
5
|
+
import { CodeOptions } from '@tiptap/extension-code';
|
|
6
|
+
import { CodeBlockOptions } from '@tiptap/extension-code-block';
|
|
7
|
+
import { DropcursorOptions } from '@tiptap/extension-dropcursor';
|
|
8
|
+
import { HardBreakOptions } from '@tiptap/extension-hard-break';
|
|
9
|
+
import { HeadingOptions } from '@tiptap/extension-heading';
|
|
10
|
+
import { HistoryOptions } from '@tiptap/extension-history';
|
|
11
|
+
import { HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule';
|
|
12
|
+
import { ItalicOptions } from '@tiptap/extension-italic';
|
|
13
|
+
import { ListItemOptions } from '@tiptap/extension-list-item';
|
|
14
|
+
import { OrderedListOptions } from '@tiptap/extension-ordered-list';
|
|
15
|
+
import { ParagraphOptions } from '@tiptap/extension-paragraph';
|
|
16
|
+
import { StrikeOptions } from '@tiptap/extension-strike';
|
|
17
|
+
export interface StarterKitOptions {
|
|
18
|
+
blockquote: Partial<BlockquoteOptions> | false;
|
|
19
|
+
bold: Partial<BoldOptions> | false;
|
|
20
|
+
bulletList: Partial<BulletListOptions> | false;
|
|
21
|
+
code: Partial<CodeOptions> | false;
|
|
22
|
+
codeBlock: Partial<CodeBlockOptions> | false;
|
|
23
|
+
document: false;
|
|
24
|
+
dropcursor: Partial<DropcursorOptions> | false;
|
|
25
|
+
gapcursor: false;
|
|
26
|
+
hardBreak: Partial<HardBreakOptions> | false;
|
|
27
|
+
heading: Partial<HeadingOptions> | false;
|
|
28
|
+
history: Partial<HistoryOptions> | false;
|
|
29
|
+
horizontalRule: Partial<HorizontalRuleOptions> | false;
|
|
30
|
+
italic: Partial<ItalicOptions> | false;
|
|
31
|
+
listItem: Partial<ListItemOptions> | false;
|
|
32
|
+
orderedList: Partial<OrderedListOptions> | false;
|
|
33
|
+
paragraph: Partial<ParagraphOptions> | false;
|
|
34
|
+
strike: Partial<StrikeOptions> | false;
|
|
35
|
+
text: false;
|
|
36
|
+
}
|
|
37
|
+
export declare const StarterKit: Extension<StarterKitOptions, any>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Range } from '@tiptap/core';
|
|
2
|
+
import { ResolvedPos } from 'prosemirror-model';
|
|
3
|
+
export interface Trigger {
|
|
4
|
+
char: string;
|
|
5
|
+
allowSpaces: boolean;
|
|
6
|
+
prefixSpace: boolean;
|
|
7
|
+
startOfLine: boolean;
|
|
8
|
+
$position: ResolvedPos;
|
|
9
|
+
}
|
|
10
|
+
export declare type SuggestionMatch = {
|
|
11
|
+
range: Range;
|
|
12
|
+
query: string;
|
|
13
|
+
text: string;
|
|
14
|
+
} | null;
|
|
15
|
+
export declare function findSuggestionMatch(config: Trigger): SuggestionMatch;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Editor, Range } from '@tiptap/core';
|
|
2
|
+
import { Plugin, PluginKey } from 'prosemirror-state';
|
|
3
|
+
import { EditorView } from 'prosemirror-view';
|
|
4
|
+
export interface SuggestionOptions {
|
|
5
|
+
pluginKey?: PluginKey;
|
|
6
|
+
editor: Editor;
|
|
7
|
+
char?: string;
|
|
8
|
+
allowSpaces?: boolean;
|
|
9
|
+
startOfLine?: boolean;
|
|
10
|
+
prefixSpace?: boolean;
|
|
11
|
+
decorationTag?: string;
|
|
12
|
+
decorationClass?: string;
|
|
13
|
+
command?: (props: {
|
|
14
|
+
editor: Editor;
|
|
15
|
+
range: Range;
|
|
16
|
+
props: any;
|
|
17
|
+
}) => void;
|
|
18
|
+
items?: (props: {
|
|
19
|
+
query: string;
|
|
20
|
+
editor: Editor;
|
|
21
|
+
}) => any[] | Promise<any[]>;
|
|
22
|
+
render?: () => {
|
|
23
|
+
onStart?: (props: SuggestionProps) => void;
|
|
24
|
+
onUpdate?: (props: SuggestionProps) => void;
|
|
25
|
+
onExit?: (props: SuggestionProps) => void;
|
|
26
|
+
onKeyDown?: (props: SuggestionKeyDownProps) => boolean;
|
|
27
|
+
};
|
|
28
|
+
allow?: (props: {
|
|
29
|
+
editor: Editor;
|
|
30
|
+
range: Range;
|
|
31
|
+
}) => boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface SuggestionProps {
|
|
34
|
+
editor: Editor;
|
|
35
|
+
range: Range;
|
|
36
|
+
query: string;
|
|
37
|
+
text: string;
|
|
38
|
+
items: any[];
|
|
39
|
+
command: (props: any) => void;
|
|
40
|
+
decorationNode: Element | null;
|
|
41
|
+
clientRect: (() => DOMRect) | null;
|
|
42
|
+
}
|
|
43
|
+
export interface SuggestionKeyDownProps {
|
|
44
|
+
view: EditorView;
|
|
45
|
+
event: KeyboardEvent;
|
|
46
|
+
range: Range;
|
|
47
|
+
}
|
|
48
|
+
export declare const SuggestionPluginKey: PluginKey<any, any>;
|
|
49
|
+
export declare function Suggestion({ pluginKey, editor, char, allowSpaces, prefixSpace, startOfLine, decorationTag, decorationClass, command, items, render, allow, }: SuggestionOptions): Plugin<any, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|