@tiptap/react 2.0.0-beta.21 → 2.0.0-beta.210

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +2 -2
  2. package/dist/index.cjs +437 -0
  3. package/dist/index.d.ts +101 -0
  4. package/dist/index.js +437 -0
  5. package/package.json +45 -16
  6. package/src/BubbleMenu.tsx +32 -16
  7. package/src/Editor.ts +9 -2
  8. package/src/EditorContent.tsx +55 -12
  9. package/src/FloatingMenu.tsx +36 -14
  10. package/src/NodeViewContent.tsx +10 -3
  11. package/src/NodeViewWrapper.tsx +11 -8
  12. package/src/ReactNodeViewRenderer.tsx +82 -34
  13. package/src/ReactRenderer.tsx +38 -29
  14. package/src/index.ts +6 -6
  15. package/src/useEditor.ts +16 -4
  16. package/src/useReactNodeView.ts +1 -0
  17. package/CHANGELOG.md +0 -190
  18. package/LICENSE.md +0 -21
  19. package/dist/packages/react/src/BubbleMenu.d.ts +0 -6
  20. package/dist/packages/react/src/Editor.d.ts +0 -6
  21. package/dist/packages/react/src/EditorContent.d.ts +0 -19
  22. package/dist/packages/react/src/FloatingMenu.d.ts +0 -6
  23. package/dist/packages/react/src/NodeViewContent.d.ts +0 -6
  24. package/dist/packages/react/src/NodeViewWrapper.d.ts +0 -6
  25. package/dist/packages/react/src/ReactNodeViewRenderer.d.ts +0 -9
  26. package/dist/packages/react/src/ReactRenderer.d.ts +0 -21
  27. package/dist/packages/react/src/index.d.ts +0 -10
  28. package/dist/packages/react/src/useEditor.d.ts +0 -3
  29. package/dist/packages/react/src/useReactNodeView.d.ts +0 -6
  30. package/dist/tiptap-react.bundle.umd.min.js +0 -54
  31. package/dist/tiptap-react.bundle.umd.min.js.map +0 -1
  32. package/dist/tiptap-react.cjs.js +0 -318
  33. package/dist/tiptap-react.cjs.js.map +0 -1
  34. package/dist/tiptap-react.esm.js +0 -293
  35. package/dist/tiptap-react.esm.js.map +0 -1
  36. package/dist/tiptap-react.umd.js +0 -318
  37. package/dist/tiptap-react.umd.js.map +0 -1
package/CHANGELOG.md DELETED
@@ -1,190 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [2.0.0-beta.21](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.20...@tiptap/react@2.0.0-beta.21) (2021-04-16)
7
-
8
-
9
- ### Features
10
-
11
- * add tippyOptions prop ([9a56f66](https://github.com/ueberdosis/tiptap-next/commit/9a56f666a118ca7c59a6f1f67f40e6490e20d3b8))
12
- * remove keepInBounds ([d7282f1](https://github.com/ueberdosis/tiptap-next/commit/d7282f168bc6cfae4e1630d14bb8462bc135b254))
13
-
14
-
15
-
16
-
17
-
18
- # [2.0.0-beta.20](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.19...@tiptap/react@2.0.0-beta.20) (2021-04-15)
19
-
20
- **Note:** Version bump only for package @tiptap/react
21
-
22
-
23
-
24
-
25
-
26
- # [2.0.0-beta.19](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.18...@tiptap/react@2.0.0-beta.19) (2021-04-11)
27
-
28
-
29
- ### Bug Fixes
30
-
31
- * fix using react node views with insertContent ([ea0992f](https://github.com/ueberdosis/tiptap-next/commit/ea0992f66e9942c590e75c0ab2f5705640764f4d))
32
-
33
-
34
-
35
-
36
-
37
- # [2.0.0-beta.18](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.17...@tiptap/react@2.0.0-beta.18) (2021-04-08)
38
-
39
- **Note:** Version bump only for package @tiptap/react
40
-
41
-
42
-
43
-
44
-
45
- # [2.0.0-beta.17](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.16...@tiptap/react@2.0.0-beta.17) (2021-04-08)
46
-
47
-
48
- ### Bug Fixes
49
-
50
- * improve node view error message ([536663f](https://github.com/ueberdosis/tiptap-next/commit/536663f816039df6e3d8de23989f343d78e5d08e))
51
- * make `as` prop optional ([f8dec5f](https://github.com/ueberdosis/tiptap-next/commit/f8dec5f905baf5692dd257b3dddec3de2bcad1a1))
52
-
53
-
54
-
55
-
56
-
57
- # [2.0.0-beta.16](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.15...@tiptap/react@2.0.0-beta.16) (2021-04-07)
58
-
59
- **Note:** Version bump only for package @tiptap/react
60
-
61
-
62
-
63
-
64
-
65
- # [2.0.0-beta.15](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.14...@tiptap/react@2.0.0-beta.15) (2021-04-07)
66
-
67
- **Note:** Version bump only for package @tiptap/react
68
-
69
-
70
-
71
-
72
-
73
- # [2.0.0-beta.14](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.13...@tiptap/react@2.0.0-beta.14) (2021-04-04)
74
-
75
-
76
- ### Features
77
-
78
- * render wrapper element for inline node views as span, fix [#242](https://github.com/ueberdosis/tiptap-next/issues/242) ([bdb5d72](https://github.com/ueberdosis/tiptap-next/commit/bdb5d724956c0c757e29be38fb2c9dd85d8fd36b))
79
-
80
-
81
-
82
-
83
-
84
- # [2.0.0-beta.13](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.12...@tiptap/react@2.0.0-beta.13) (2021-04-01)
85
-
86
- **Note:** Version bump only for package @tiptap/react
87
-
88
-
89
-
90
-
91
-
92
- # [2.0.0-beta.12](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.11...@tiptap/react@2.0.0-beta.12) (2021-04-01)
93
-
94
- **Note:** Version bump only for package @tiptap/react
95
-
96
-
97
-
98
-
99
-
100
- # [2.0.0-beta.11](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.10...@tiptap/react@2.0.0-beta.11) (2021-04-01)
101
-
102
- **Note:** Version bump only for package @tiptap/react
103
-
104
-
105
-
106
-
107
-
108
- # [2.0.0-beta.10](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.9...@tiptap/react@2.0.0-beta.10) (2021-04-01)
109
-
110
- **Note:** Version bump only for package @tiptap/react
111
-
112
-
113
-
114
-
115
-
116
- # [2.0.0-beta.9](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.8...@tiptap/react@2.0.0-beta.9) (2021-03-31)
117
-
118
- **Note:** Version bump only for package @tiptap/react
119
-
120
-
121
-
122
-
123
-
124
- # [2.0.0-beta.8](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.7...@tiptap/react@2.0.0-beta.8) (2021-03-31)
125
-
126
- **Note:** Version bump only for package @tiptap/react
127
-
128
-
129
-
130
-
131
-
132
- # [2.0.0-beta.7](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.6...@tiptap/react@2.0.0-beta.7) (2021-03-31)
133
-
134
- **Note:** Version bump only for package @tiptap/react
135
-
136
-
137
-
138
-
139
-
140
- # [2.0.0-beta.6](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.5...@tiptap/react@2.0.0-beta.6) (2021-03-28)
141
-
142
- **Note:** Version bump only for package @tiptap/react
143
-
144
-
145
-
146
-
147
-
148
- # [2.0.0-beta.5](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.4...@tiptap/react@2.0.0-beta.5) (2021-03-24)
149
-
150
- **Note:** Version bump only for package @tiptap/react
151
-
152
-
153
-
154
-
155
-
156
- # [2.0.0-beta.4](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.3...@tiptap/react@2.0.0-beta.4) (2021-03-18)
157
-
158
- **Note:** Version bump only for package @tiptap/react
159
-
160
-
161
-
162
-
163
-
164
- # [2.0.0-beta.3](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.2...@tiptap/react@2.0.0-beta.3) (2021-03-16)
165
-
166
- **Note:** Version bump only for package @tiptap/react
167
-
168
-
169
-
170
-
171
-
172
- # [2.0.0-beta.2](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.1...@tiptap/react@2.0.0-beta.2) (2021-03-09)
173
-
174
- **Note:** Version bump only for package @tiptap/react
175
-
176
-
177
-
178
-
179
-
180
- # [2.0.0-beta.1](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-alpha.2...@tiptap/react@2.0.0-beta.1) (2021-03-05)
181
-
182
- **Note:** Version bump only for package @tiptap/react
183
-
184
-
185
-
186
-
187
-
188
- # 2.0.0-alpha.2 (2021-02-26)
189
-
190
- **Note:** Version bump only for package @tiptap/react
package/LICENSE.md DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2020, überdosis GbR
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { BubbleMenuPluginProps } from '@tiptap/extension-bubble-menu';
3
- export declare type BubbleMenuProps = Omit<BubbleMenuPluginProps, 'element'> & {
4
- className?: string;
5
- };
6
- export declare const BubbleMenu: React.FC<BubbleMenuProps>;
@@ -1,6 +0,0 @@
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
- }
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { Editor } from './Editor';
3
- import { ReactRenderer } from './ReactRenderer';
4
- export interface EditorContentProps {
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>;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { FloatingMenuPluginProps } from '@tiptap/extension-floating-menu';
3
- export declare type FloatingMenuProps = Omit<FloatingMenuPluginProps, 'element'> & {
4
- className?: string;
5
- };
6
- export declare const FloatingMenu: React.FC<FloatingMenuProps>;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export interface NodeViewContentProps {
3
- className?: string;
4
- as?: React.ElementType;
5
- }
6
- export declare const NodeViewContent: React.FC<NodeViewContentProps>;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export interface NodeViewWrapperProps {
3
- className?: string;
4
- as?: React.ElementType;
5
- }
6
- export declare const NodeViewWrapper: React.FC<NodeViewWrapperProps>;
@@ -1,9 +0,0 @@
1
- import { NodeViewRenderer } from '@tiptap/core';
2
- import { Decoration } from 'prosemirror-view';
3
- import { Node as ProseMirrorNode } from 'prosemirror-model';
4
- interface ReactNodeViewRendererOptions {
5
- stopEvent: ((event: Event) => boolean) | null;
6
- update: ((node: ProseMirrorNode, decorations: Decoration[]) => boolean) | null;
7
- }
8
- export declare function ReactNodeViewRenderer(component: any, options?: Partial<ReactNodeViewRendererOptions>): NodeViewRenderer;
9
- export {};
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import { AnyObject } from '@tiptap/core';
3
- import { Editor } from './Editor';
4
- export interface ReactRendererOptions {
5
- editor: Editor;
6
- props?: AnyObject;
7
- as?: string;
8
- }
9
- export declare class ReactRenderer {
10
- id: string;
11
- editor: Editor;
12
- component: any;
13
- element: Element;
14
- props: AnyObject;
15
- reactElement: React.ReactNode;
16
- ref: React.Component | null;
17
- constructor(component: React.Component | React.FunctionComponent, { editor, props, as }: ReactRendererOptions);
18
- render(): void;
19
- updateProps(props?: AnyObject): void;
20
- destroy(): void;
21
- }
@@ -1,10 +0,0 @@
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';
@@ -1,3 +0,0 @@
1
- import { EditorOptions } from '@tiptap/core';
2
- import { Editor } from './Editor';
3
- export declare const useEditor: (options?: Partial<EditorOptions>) => Editor | null;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- export interface ReactNodeViewContextProps {
3
- onDragStart: (event: DragEvent) => void;
4
- }
5
- export declare const ReactNodeViewContext: import("react").Context<Partial<ReactNodeViewContextProps>>;
6
- export declare const useReactNodeView: () => Partial<ReactNodeViewContextProps>;