@prosekit/react 0.1.3 → 0.1.4
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.
@@ -9,6 +9,7 @@ import { AutocompleteList as AutocompleteList_2 } from '@prosekit/lit/autocomple
|
|
9
9
|
import { AutocompleteListProps as AutocompleteListProps_2 } from '@prosekit/lit/autocomplete-list';
|
10
10
|
import { AutocompletePopover as AutocompletePopover_2 } from '@prosekit/lit/autocomplete-popover';
|
11
11
|
import { AutocompletePopoverProps as AutocompletePopoverProps_2 } from '@prosekit/lit/autocomplete-popover';
|
12
|
+
import { BaseNodeViewOptions } from '@prosekit/core';
|
12
13
|
import { ComboBox as ComboBox_2 } from '@prosekit/lit/combo-box';
|
13
14
|
import { ComboBoxInput as ComboBoxInput_2 } from '@prosekit/lit/combo-box-input';
|
14
15
|
import { ComboBoxInputProps as ComboBoxInputProps_2 } from '@prosekit/lit/combo-box-input';
|
@@ -177,11 +178,15 @@ export { ReactNodeViewComponent as ReactNodeViewComponent_alias_1 }
|
|
177
178
|
*
|
178
179
|
* @public
|
179
180
|
*/
|
180
|
-
declare interface ReactNodeViewOptions extends
|
181
|
+
declare interface ReactNodeViewOptions extends BaseNodeViewOptions {
|
181
182
|
/**
|
182
|
-
* The name of the node.
|
183
|
+
* The name of the node type.
|
183
184
|
*/
|
184
185
|
name: string;
|
186
|
+
/**
|
187
|
+
* The React component to render the node.
|
188
|
+
*/
|
189
|
+
component: ReactNodeViewComponent;
|
185
190
|
}
|
186
191
|
export { ReactNodeViewOptions }
|
187
192
|
export { ReactNodeViewOptions as ReactNodeViewOptions_alias_1 }
|
package/dist/prosekit-react.js
CHANGED
@@ -10,7 +10,9 @@ var editorContext = createContext(null);
|
|
10
10
|
import { useMemo } from "react";
|
11
11
|
|
12
12
|
// src/extensions/react-node-view.ts
|
13
|
-
import {
|
13
|
+
import {
|
14
|
+
defineNodeViewFactory
|
15
|
+
} from "@prosekit/core";
|
14
16
|
function defineReactNodeView(options) {
|
15
17
|
const { name, ...userOptions } = options;
|
16
18
|
return defineNodeViewFactory({
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosekit/react",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.1.
|
4
|
+
"version": "0.1.4",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -86,9 +86,9 @@
|
|
86
86
|
],
|
87
87
|
"dependencies": {
|
88
88
|
"@lit/react": "^1.0.2",
|
89
|
-
"@prosekit/core": "^0.
|
90
|
-
"@prosekit/lit": "^0.1.
|
91
|
-
"@prosekit/pm": "^0.1.
|
89
|
+
"@prosekit/core": "^0.2.0",
|
90
|
+
"@prosekit/lit": "^0.1.5",
|
91
|
+
"@prosekit/pm": "^0.1.1",
|
92
92
|
"@prosemirror-adapter/core": "^0.2.6"
|
93
93
|
},
|
94
94
|
"peerDependencies": {
|
@@ -106,12 +106,12 @@
|
|
106
106
|
"devDependencies": {
|
107
107
|
"@prosekit/dev": "*",
|
108
108
|
"@types/react": "^18.2.45",
|
109
|
-
"@types/react-dom": "^18.2.
|
109
|
+
"@types/react-dom": "^18.2.18",
|
110
110
|
"react": "^18.2.0",
|
111
111
|
"react-dom": "^18.2.0",
|
112
112
|
"tsup": "^8.0.1",
|
113
113
|
"typescript": "^5.3.3",
|
114
|
-
"vitest": "^1.0
|
114
|
+
"vitest": "^1.1.0"
|
115
115
|
},
|
116
116
|
"scripts": {
|
117
117
|
"build:tsup": "tsup",
|