@prosekit/react 0.4.6 → 0.4.8
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/_tsup-dts-rollup.d.ts +0 -6
- package/dist/{chunk-IO5VSPOS.js → chunk-VASCWPBI.js} +1 -2
- package/dist/prosekit-react-autocomplete.js +1 -1
- package/dist/prosekit-react-block-handle.js +1 -1
- package/dist/prosekit-react-inline-popover.js +1 -1
- package/dist/prosekit-react-popover.js +1 -1
- package/dist/prosekit-react-resizable.js +1 -1
- package/dist/prosekit-react-table-handle.js +1 -1
- package/dist/prosekit-react-tooltip.js +1 -1
- package/dist/prosekit-react.js +3 -4
- package/package.json +8 -8
@@ -22,7 +22,6 @@ import { BlockHandlePopoverProps as BlockHandlePopoverProps_2 } from '@prosekit/
|
|
22
22
|
import { ComponentType } from 'react';
|
23
23
|
import type { CoreMarkViewUserOptions } from '@prosemirror-adapter/core';
|
24
24
|
import type { CoreNodeViewUserOptions } from '@prosemirror-adapter/core';
|
25
|
-
import { config as default_alias_1 } from '@prosekit/dev/config-vitest';
|
26
25
|
import { Editor } from '@prosekit/core';
|
27
26
|
import type { EditorState } from '@prosekit/pm/state';
|
28
27
|
import { Extension } from '@prosekit/core';
|
@@ -35,7 +34,6 @@ import { InlinePopoverProps as InlinePopoverProps_2 } from '@prosekit/web/inline
|
|
35
34
|
import { Keymap } from '@prosekit/core';
|
36
35
|
import { MarkViewContext } from '@prosemirror-adapter/react';
|
37
36
|
import { NodeViewContext } from '@prosemirror-adapter/react';
|
38
|
-
import { Options } from 'tsup';
|
39
37
|
import { PopoverContentElement } from '@prosekit/web/popover';
|
40
38
|
import { PopoverContentEvents } from '@prosekit/web/popover';
|
41
39
|
import { PopoverContentProps as PopoverContentProps_2 } from '@prosekit/web/popover';
|
@@ -185,10 +183,6 @@ export declare type CreateProps<Props extends {
|
|
185
183
|
[EventName in keyof Events]: CustomEvent;
|
186
184
|
}> = Props & CreateEventProps<Events>;
|
187
185
|
|
188
|
-
export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
189
|
-
|
190
|
-
export { default_alias_1 }
|
191
|
-
|
192
186
|
/**
|
193
187
|
* Defines a mark view using a React component.
|
194
188
|
*
|
@@ -72,8 +72,7 @@ function createComponent(tagName, displayName, propNames, eventNames) {
|
|
72
72
|
const fixedEventHandlers = {};
|
73
73
|
for (const eventName of eventNames) {
|
74
74
|
fixedEventHandlers[eventName] = (event) => {
|
75
|
-
|
76
|
-
(_b = (_a = eventHandlersRef.current)[eventName]) == null ? void 0 : _b.call(_a, event);
|
75
|
+
eventHandlersRef.current[eventName]?.(event);
|
77
76
|
};
|
78
77
|
}
|
79
78
|
for (const [name, handler] of Object.entries(fixedEventHandlers)) {
|
package/dist/prosekit-react.js
CHANGED
@@ -54,8 +54,8 @@ function usePriorityExtension(extension, priority) {
|
|
54
54
|
function useExtension(extension, options) {
|
55
55
|
const editorContext = useEditorContext();
|
56
56
|
useEditorExtension(
|
57
|
-
|
58
|
-
usePriorityExtension(extension, options
|
57
|
+
options?.editor || editorContext,
|
58
|
+
usePriorityExtension(extension, options?.priority)
|
59
59
|
);
|
60
60
|
}
|
61
61
|
|
@@ -180,8 +180,7 @@ import {
|
|
180
180
|
useReducer
|
181
181
|
} from "react";
|
182
182
|
function useEditor(options) {
|
183
|
-
|
184
|
-
const update = (_a = options == null ? void 0 : options.update) != null ? _a : false;
|
183
|
+
const update = options?.update ?? false;
|
185
184
|
const editor = useEditorContext();
|
186
185
|
if (!editor) {
|
187
186
|
throw new ProseKitError(
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosekit/react",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.4.
|
4
|
+
"version": "0.4.8",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -73,9 +73,9 @@
|
|
73
73
|
"@prosemirror-adapter/core": "^0.4.0",
|
74
74
|
"@prosemirror-adapter/react": "^0.4.0",
|
75
75
|
"react-merge-refs": "^2.1.1",
|
76
|
-
"@prosekit/core": "^0.7.
|
77
|
-
"@prosekit/
|
78
|
-
"@prosekit/
|
76
|
+
"@prosekit/core": "^0.7.14",
|
77
|
+
"@prosekit/pm": "^0.1.9",
|
78
|
+
"@prosekit/web": "^0.5.3"
|
79
79
|
},
|
80
80
|
"peerDependencies": {
|
81
81
|
"react": ">= 18.2.0",
|
@@ -90,18 +90,18 @@
|
|
90
90
|
}
|
91
91
|
},
|
92
92
|
"devDependencies": {
|
93
|
-
"@types/react": "^18.3.
|
93
|
+
"@types/react": "^18.3.18",
|
94
94
|
"@types/react-dom": "^18.3.5",
|
95
95
|
"react": "^18.3.1",
|
96
96
|
"react-dom": "^18.3.1",
|
97
97
|
"tsup": "^8.3.5",
|
98
|
-
"typescript": "~5.
|
98
|
+
"typescript": "~5.7.2",
|
99
99
|
"vitest": "^2.1.8",
|
100
100
|
"@prosekit/dev": "0.0.0"
|
101
101
|
},
|
102
102
|
"scripts": {
|
103
|
-
"build:
|
104
|
-
"build:
|
103
|
+
"build:tsc": "tsc -b tsconfig.json",
|
104
|
+
"build:tsup": "tsup"
|
105
105
|
},
|
106
106
|
"types": "./dist/prosekit-react.d.ts",
|
107
107
|
"typesVersions": {
|