@prosekit/react 0.1.3 → 0.1.5

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';
@@ -43,6 +44,10 @@ import { Priority } from '@prosekit/core';
43
44
  import { default as React_2 } from 'react';
44
45
  import { ReactNode } from 'react';
45
46
  import { ReactPortal } from 'react';
47
+ import { Resizable as Resizable_2 } from '@prosekit/lit/resizable';
48
+ import { ResizableHandle as ResizableHandle_2 } from '@prosekit/lit/resizable-handle';
49
+ import { ResizableHandleProps as ResizableHandleProps_2 } from '@prosekit/lit/resizable-handle';
50
+ import { ResizableProps as ResizableProps_2 } from '@prosekit/lit/resizable';
46
51
 
47
52
  declare const AutocompleteEmpty: React_2.ComponentType<AutocompleteEmptyProps & React_2.RefAttributes<AutocompleteEmpty_2>>;
48
53
  export { AutocompleteEmpty }
@@ -177,11 +182,15 @@ export { ReactNodeViewComponent as ReactNodeViewComponent_alias_1 }
177
182
  *
178
183
  * @public
179
184
  */
180
- declare interface ReactNodeViewOptions extends ReactNodeViewUserOptions {
185
+ declare interface ReactNodeViewOptions extends BaseNodeViewOptions {
181
186
  /**
182
- * The name of the node.
187
+ * The name of the node type.
183
188
  */
184
189
  name: string;
190
+ /**
191
+ * The React component to render the node.
192
+ */
193
+ component: ReactNodeViewComponent;
185
194
  }
186
195
  export { ReactNodeViewOptions }
187
196
  export { ReactNodeViewOptions as ReactNodeViewOptions_alias_1 }
@@ -227,6 +236,14 @@ declare const ReactViewsProvider: FC<{
227
236
  export { ReactViewsProvider }
228
237
  export { ReactViewsProvider as ReactViewsProvider_alias_1 }
229
238
 
239
+ export declare const Resizable: React_2.ComponentType<ResizableProps & React_2.RefAttributes<Resizable_2>>;
240
+
241
+ export declare const ResizableHandle: React_2.ComponentType<ResizableHandleProps & React_2.RefAttributes<ResizableHandle_2>>;
242
+
243
+ export declare type ResizableHandleProps = React_2.PropsWithChildren<PropsWithClassName<ResizableHandleProps_2>>;
244
+
245
+ export declare type ResizableProps = React_2.PropsWithChildren<PropsWithClassName<ResizableProps_2>>;
246
+
230
247
  declare function useEditor<E extends Extension = any>(options?: {
231
248
  update?: boolean;
232
249
  }): Editor<E>;
@@ -0,0 +1,2 @@
1
+ export { ResizableHandleProps } from './_tsup-dts-rollup';
2
+ export { ResizableHandle } from './_tsup-dts-rollup';
@@ -0,0 +1,17 @@
1
+ // src/components/resizable-handle.gen.ts
2
+ import { createComponent } from "@lit/react";
3
+ import { ResizableHandle as ResizableHandleElement } from "@prosekit/lit/resizable-handle";
4
+ import React from "react";
5
+ var ResizableHandleInner = createComponent({
6
+ tagName: "prosekit-resizable-handle",
7
+ elementClass: ResizableHandleElement,
8
+ react: React,
9
+ displayName: "ResizableHandleInner"
10
+ });
11
+ var ResizableHandle = React.forwardRef((props, ref) => {
12
+ return React.createElement(ResizableHandleInner, { ...props, ref });
13
+ });
14
+ ResizableHandle.displayName = "ResizableHandle";
15
+ export {
16
+ ResizableHandle
17
+ };
@@ -0,0 +1,2 @@
1
+ export { ResizableProps } from './_tsup-dts-rollup';
2
+ export { Resizable } from './_tsup-dts-rollup';
@@ -0,0 +1,17 @@
1
+ // src/components/resizable.gen.ts
2
+ import { createComponent } from "@lit/react";
3
+ import { Resizable as ResizableElement } from "@prosekit/lit/resizable";
4
+ import React from "react";
5
+ var ResizableInner = createComponent({
6
+ tagName: "prosekit-resizable",
7
+ elementClass: ResizableElement,
8
+ react: React,
9
+ displayName: "ResizableInner"
10
+ });
11
+ var Resizable = React.forwardRef((props, ref) => {
12
+ return React.createElement(ResizableInner, { ...props, ref });
13
+ });
14
+ Resizable.displayName = "Resizable";
15
+ export {
16
+ Resizable
17
+ };
@@ -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 { defineNodeViewFactory } from "@prosekit/core";
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.3",
4
+ "version": "0.1.5",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "ocavue",
@@ -79,6 +79,16 @@
79
79
  "types": "./dist/prosekit-react-popover.d.ts",
80
80
  "import": "./dist/prosekit-react-popover.js",
81
81
  "default": "./dist/prosekit-react-popover.js"
82
+ },
83
+ "./resizable": {
84
+ "types": "./dist/prosekit-react-resizable.d.ts",
85
+ "import": "./dist/prosekit-react-resizable.js",
86
+ "default": "./dist/prosekit-react-resizable.js"
87
+ },
88
+ "./resizable-handle": {
89
+ "types": "./dist/prosekit-react-resizable-handle.d.ts",
90
+ "import": "./dist/prosekit-react-resizable-handle.js",
91
+ "default": "./dist/prosekit-react-resizable-handle.js"
82
92
  }
83
93
  },
84
94
  "files": [
@@ -86,9 +96,9 @@
86
96
  ],
87
97
  "dependencies": {
88
98
  "@lit/react": "^1.0.2",
89
- "@prosekit/core": "^0.1.0",
90
- "@prosekit/lit": "^0.1.0",
91
- "@prosekit/pm": "^0.1.0",
99
+ "@prosekit/core": "^0.2.2",
100
+ "@prosekit/lit": "^0.1.7",
101
+ "@prosekit/pm": "^0.1.1",
92
102
  "@prosemirror-adapter/core": "^0.2.6"
93
103
  },
94
104
  "peerDependencies": {
@@ -105,13 +115,13 @@
105
115
  },
106
116
  "devDependencies": {
107
117
  "@prosekit/dev": "*",
108
- "@types/react": "^18.2.45",
109
- "@types/react-dom": "^18.2.17",
118
+ "@types/react": "^18.2.47",
119
+ "@types/react-dom": "^18.2.18",
110
120
  "react": "^18.2.0",
111
121
  "react-dom": "^18.2.0",
112
122
  "tsup": "^8.0.1",
113
123
  "typescript": "^5.3.3",
114
- "vitest": "^1.0.4"
124
+ "vitest": "^1.1.3"
115
125
  },
116
126
  "scripts": {
117
127
  "build:tsup": "tsup",
@@ -152,6 +162,12 @@
152
162
  ],
153
163
  "popover": [
154
164
  "./dist/prosekit-react-popover.d.ts"
165
+ ],
166
+ "resizable": [
167
+ "./dist/prosekit-react-resizable.d.ts"
168
+ ],
169
+ "resizable-handle": [
170
+ "./dist/prosekit-react-resizable-handle.d.ts"
155
171
  ]
156
172
  }
157
173
  }