@prosekit/react 0.2.7 → 0.3.1
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 +73 -100
- package/dist/chunk-BH56NR2Q.js +12 -0
- package/dist/chunk-UG3RPLME.js +51 -0
- package/dist/prosekit-react-autocomplete.d.ts +4 -0
- package/dist/prosekit-react-autocomplete.js +50 -0
- package/dist/prosekit-react-block-handle.d.ts +2 -0
- package/dist/prosekit-react-block-handle.js +28 -0
- package/dist/prosekit-react-inline-popover.d.ts +0 -1
- package/dist/prosekit-react-inline-popover.js +14 -14
- package/dist/prosekit-react-popover.d.ts +3 -2
- package/dist/prosekit-react-popover.js +37 -15
- package/dist/prosekit-react-resizable.d.ts +2 -2
- package/dist/prosekit-react-resizable.js +26 -15
- package/dist/prosekit-react-tooltip.d.ts +3 -0
- package/dist/prosekit-react-tooltip.js +39 -0
- package/dist/prosekit-react.js +10 -13
- package/package.json +26 -113
- package/dist/prosekit-react-autocomplete-empty.d.ts +0 -2
- package/dist/prosekit-react-autocomplete-empty.js +0 -17
- package/dist/prosekit-react-autocomplete-item.d.ts +0 -2
- package/dist/prosekit-react-autocomplete-item.js +0 -17
- package/dist/prosekit-react-autocomplete-list.d.ts +0 -2
- package/dist/prosekit-react-autocomplete-list.js +0 -17
- package/dist/prosekit-react-autocomplete-popover.d.ts +0 -3
- package/dist/prosekit-react-autocomplete-popover.js +0 -17
- package/dist/prosekit-react-block-popover.d.ts +0 -2
- package/dist/prosekit-react-block-popover.js +0 -17
- package/dist/prosekit-react-combo-box-input.d.ts +0 -2
- package/dist/prosekit-react-combo-box-input.js +0 -17
- package/dist/prosekit-react-combo-box-item.d.ts +0 -2
- package/dist/prosekit-react-combo-box-item.js +0 -17
- package/dist/prosekit-react-combo-box-list.d.ts +0 -2
- package/dist/prosekit-react-combo-box-list.js +0 -17
- package/dist/prosekit-react-combo-box.d.ts +0 -2
- package/dist/prosekit-react-combo-box.js +0 -17
- package/dist/prosekit-react-drag-handle.d.ts +0 -2
- package/dist/prosekit-react-drag-handle.js +0 -17
- package/dist/prosekit-react-popover-content.d.ts +0 -2
- package/dist/prosekit-react-popover-content.js +0 -17
- package/dist/prosekit-react-popover-root.d.ts +0 -2
- package/dist/prosekit-react-popover-root.js +0 -17
- package/dist/prosekit-react-popover-trigger.d.ts +0 -2
- package/dist/prosekit-react-popover-trigger.js +0 -17
- package/dist/prosekit-react-resizable-handle.d.ts +0 -2
- package/dist/prosekit-react-resizable-handle.js +0 -17
@@ -1,25 +1,19 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
|
3
3
|
import type { Attrs } from '@prosekit/pm/model';
|
4
|
-
import {
|
5
|
-
import { AutocompleteEmptyProps
|
6
|
-
import {
|
7
|
-
import { AutocompleteItemProps
|
8
|
-
import {
|
9
|
-
import { AutocompleteListProps
|
10
|
-
import {
|
11
|
-
import { AutocompletePopoverProps
|
4
|
+
import { AutocompleteEmptyElement } from '@prosekit/web/autocomplete';
|
5
|
+
import { AutocompleteEmptyProps } from '@prosekit/web/autocomplete';
|
6
|
+
import { AutocompleteItemElement } from '@prosekit/web/autocomplete';
|
7
|
+
import { AutocompleteItemProps } from '@prosekit/web/autocomplete';
|
8
|
+
import { AutocompleteListElement } from '@prosekit/web/autocomplete';
|
9
|
+
import { AutocompleteListProps } from '@prosekit/web/autocomplete';
|
10
|
+
import { AutocompletePopoverElement } from '@prosekit/web/autocomplete';
|
11
|
+
import { AutocompletePopoverProps } from '@prosekit/web/autocomplete';
|
12
12
|
import { BaseNodeViewOptions } from '@prosekit/core';
|
13
|
-
import {
|
14
|
-
import {
|
15
|
-
import {
|
16
|
-
import {
|
17
|
-
import { ComboBoxInputProps as ComboBoxInputProps_2 } from '@prosekit/lit/combo-box-input';
|
18
|
-
import { ComboBoxItem as ComboBoxItem_2 } from '@prosekit/lit/combo-box-item';
|
19
|
-
import { ComboBoxItemProps as ComboBoxItemProps_2 } from '@prosekit/lit/combo-box-item';
|
20
|
-
import { ComboBoxList as ComboBoxList_2 } from '@prosekit/lit/combo-box-list';
|
21
|
-
import { ComboBoxListProps as ComboBoxListProps_2 } from '@prosekit/lit/combo-box-list';
|
22
|
-
import { ComboBoxProps as ComboBoxProps_2 } from '@prosekit/lit/combo-box';
|
13
|
+
import { BlockDragHandleElement } from '@prosekit/web/block-handle';
|
14
|
+
import { BlockDragHandleProps } from '@prosekit/web/block-handle';
|
15
|
+
import { BlockPopoverElement } from '@prosekit/web/block-handle';
|
16
|
+
import { BlockPopoverProps } from '@prosekit/web/block-handle';
|
23
17
|
import { CommandArgs } from '@prosekit/core';
|
24
18
|
import { ComponentType } from 'react';
|
25
19
|
import { Context } from 'react';
|
@@ -28,91 +22,68 @@ import type { CoreNodeViewSpec } from '@prosemirror-adapter/core';
|
|
28
22
|
import type { CoreNodeViewUserOptions } from '@prosemirror-adapter/core';
|
29
23
|
import type { Decoration } from '@prosekit/pm/view';
|
30
24
|
import type { DecorationSource } from '@prosekit/pm/view';
|
31
|
-
import { DragHandle as DragHandle_2 } from '@prosekit/lit/drag-handle';
|
32
|
-
import { DragHandleProps as DragHandleProps_2 } from '@prosekit/lit/drag-handle';
|
33
25
|
import { Editor } from '@prosekit/core';
|
34
26
|
import type { EditorState } from '@prosekit/pm/state';
|
35
27
|
import type { EditorView } from '@prosekit/pm/view';
|
36
28
|
import { Extension } from '@prosekit/core';
|
37
29
|
import { ExtensionTyping } from '@prosekit/core';
|
38
30
|
import { FC } from 'react';
|
39
|
-
import {
|
40
|
-
import {
|
31
|
+
import { ForwardRefExoticComponent } from 'react';
|
32
|
+
import { HTMLAttributes } from 'react';
|
33
|
+
import { InlinePopoverElement } from '@prosekit/web/inline-popover';
|
34
|
+
import { InlinePopoverProps } from '@prosekit/web/inline-popover';
|
41
35
|
import { Keymap } from '@prosekit/core';
|
42
36
|
import type { Node as Node_2 } from '@prosekit/pm/model';
|
43
37
|
import type { NodeViewConstructor } from '@prosekit/pm/view';
|
44
38
|
import { Options } from 'tsup';
|
45
|
-
import {
|
46
|
-
import {
|
47
|
-
import {
|
48
|
-
import {
|
49
|
-
import {
|
50
|
-
import {
|
51
|
-
import { PopoverTrigger as PopoverTrigger_2 } from '@prosekit/lit/popover-trigger';
|
52
|
-
import { PopoverTriggerProps as PopoverTriggerProps_2 } from '@prosekit/lit/popover-trigger';
|
53
|
-
import { PositioningOptions } from '@prosekit/lit/autocomplete-popover';
|
39
|
+
import { PopoverContentElement } from '@prosekit/web/popover';
|
40
|
+
import { PopoverContentProps } from '@prosekit/web/popover';
|
41
|
+
import { PopoverRootElement } from '@prosekit/web/popover';
|
42
|
+
import { PopoverRootProps } from '@prosekit/web/popover';
|
43
|
+
import { PopoverTriggerElement } from '@prosekit/web/popover';
|
44
|
+
import { PopoverTriggerProps } from '@prosekit/web/popover';
|
54
45
|
import { Priority } from '@prosekit/core';
|
55
46
|
import type { ProseMirrorNode } from '@prosekit/pm/model';
|
56
47
|
import { Provider } from 'react';
|
57
|
-
import { default as React_2 } from 'react';
|
58
48
|
import { ReactNode } from 'react';
|
59
49
|
import { ReactPortal } from 'react';
|
60
|
-
import {
|
61
|
-
import {
|
62
|
-
import { ResizableHandleProps
|
63
|
-
import {
|
64
|
-
|
65
|
-
|
50
|
+
import { RefAttributes } from 'react';
|
51
|
+
import { ResizableHandleElement } from '@prosekit/web/resizable';
|
52
|
+
import { ResizableHandleProps } from '@prosekit/web/resizable';
|
53
|
+
import { ResizableRootElement } from '@prosekit/web/resizable';
|
54
|
+
import { ResizableRootProps } from '@prosekit/web/resizable';
|
55
|
+
import { TooltipContentElement } from '@prosekit/web/tooltip';
|
56
|
+
import { TooltipContentProps } from '@prosekit/web/tooltip';
|
57
|
+
import { TooltipRootElement } from '@prosekit/web/tooltip';
|
58
|
+
import { TooltipRootProps } from '@prosekit/web/tooltip';
|
59
|
+
import { TooltipTriggerElement } from '@prosekit/web/tooltip';
|
60
|
+
import { TooltipTriggerProps } from '@prosekit/web/tooltip';
|
61
|
+
|
62
|
+
declare const AutocompleteEmpty: ForwardRefExoticComponent<Partial<AutocompleteEmptyProps> & RefAttributes<AutocompleteEmptyElement> & HTMLAttributes<AutocompleteEmptyElement>>;
|
66
63
|
export { AutocompleteEmpty }
|
67
64
|
export { AutocompleteEmpty as AutocompleteEmpty_alias_1 }
|
68
65
|
|
69
|
-
declare
|
70
|
-
export { AutocompleteEmptyProps }
|
71
|
-
export { AutocompleteEmptyProps as AutocompleteEmptyProps_alias_1 }
|
72
|
-
|
73
|
-
declare const AutocompleteItem: React_2.ComponentType<AutocompleteItemProps & React_2.RefAttributes<AutocompleteItem_2>>;
|
66
|
+
declare const AutocompleteItem: ForwardRefExoticComponent<Partial<AutocompleteItemProps> & RefAttributes<AutocompleteItemElement> & HTMLAttributes<AutocompleteItemElement>>;
|
74
67
|
export { AutocompleteItem }
|
75
68
|
export { AutocompleteItem as AutocompleteItem_alias_1 }
|
76
69
|
|
77
|
-
declare
|
78
|
-
export { AutocompleteItemProps }
|
79
|
-
export { AutocompleteItemProps as AutocompleteItemProps_alias_1 }
|
80
|
-
|
81
|
-
declare const AutocompleteList: React_2.ComponentType<AutocompleteListProps & React_2.RefAttributes<AutocompleteList_2>>;
|
70
|
+
declare const AutocompleteList: ForwardRefExoticComponent<Partial<AutocompleteListProps> & RefAttributes<AutocompleteListElement> & HTMLAttributes<AutocompleteListElement>>;
|
82
71
|
export { AutocompleteList }
|
83
72
|
export { AutocompleteList as AutocompleteList_alias_1 }
|
84
73
|
|
85
|
-
declare
|
86
|
-
export { AutocompleteListProps }
|
87
|
-
export { AutocompleteListProps as AutocompleteListProps_alias_1 }
|
88
|
-
|
89
|
-
declare const AutocompletePopover: React_2.ComponentType<AutocompletePopoverProps & React_2.RefAttributes<AutocompletePopover_2>>;
|
74
|
+
declare const AutocompletePopover: ForwardRefExoticComponent<Partial<AutocompletePopoverProps> & RefAttributes<AutocompletePopoverElement> & HTMLAttributes<AutocompletePopoverElement>>;
|
90
75
|
export { AutocompletePopover }
|
91
76
|
export { AutocompletePopover as AutocompletePopover_alias_1 }
|
92
77
|
|
93
|
-
declare
|
94
|
-
export {
|
95
|
-
export {
|
96
|
-
|
97
|
-
export declare const BlockPopover: React_2.ComponentType<BlockPopoverProps & React_2.RefAttributes<BlockPopover_2>>;
|
98
|
-
|
99
|
-
export declare type BlockPopoverProps = React_2.PropsWithChildren<PropsWithClassName<BlockPopoverProps_2>>;
|
100
|
-
|
101
|
-
export declare const ComboBox: React_2.ComponentType<ComboBoxProps & React_2.RefAttributes<ComboBox_2>>;
|
102
|
-
|
103
|
-
export declare const ComboBoxInput: React_2.ComponentType<ComboBoxInputProps & React_2.RefAttributes<ComboBoxInput_2>>;
|
104
|
-
|
105
|
-
export declare type ComboBoxInputProps = React_2.PropsWithChildren<PropsWithClassName<ComboBoxInputProps_2>>;
|
106
|
-
|
107
|
-
export declare const ComboBoxItem: React_2.ComponentType<ComboBoxItemProps & React_2.RefAttributes<ComboBoxItem_2>>;
|
108
|
-
|
109
|
-
export declare type ComboBoxItemProps = React_2.PropsWithChildren<PropsWithClassName<ComboBoxItemProps_2>>;
|
78
|
+
declare const BlockDragHandle: ForwardRefExoticComponent<Partial<BlockDragHandleProps> & RefAttributes<BlockDragHandleElement> & HTMLAttributes<BlockDragHandleElement>>;
|
79
|
+
export { BlockDragHandle }
|
80
|
+
export { BlockDragHandle as BlockDragHandle_alias_1 }
|
110
81
|
|
111
|
-
|
82
|
+
declare const BlockPopover: ForwardRefExoticComponent<Partial<BlockPopoverProps> & RefAttributes<BlockPopoverElement> & HTMLAttributes<BlockPopoverElement>>;
|
83
|
+
export { BlockPopover }
|
84
|
+
export { BlockPopover as BlockPopover_alias_1 }
|
112
85
|
|
113
|
-
export declare
|
114
|
-
|
115
|
-
export declare type ComboBoxProps = React_2.PropsWithChildren<PropsWithClassName<ComboBoxProps_2>>;
|
86
|
+
export declare function createComponent<Props extends object, CustomElement extends HTMLElement>(tagName: string, displayName: string, defaultProps: Props): ForwardRefExoticComponent<Partial<Props> & RefAttributes<CustomElement> & HTMLAttributes<CustomElement>>;
|
116
87
|
|
117
88
|
export declare const createNodeViewContext: Context<NodeViewFactory | null>;
|
118
89
|
|
@@ -142,38 +113,28 @@ export { defineReactNodeView as defineReactNodeView_alias_1 }
|
|
142
113
|
*/
|
143
114
|
export declare function defineReactNodeViewFactory(nodeViewFactory: NodeViewFactory): Extension<ExtensionTyping<string, string, CommandArgs>>;
|
144
115
|
|
145
|
-
export declare const DragHandle: React_2.ComponentType<DragHandleProps & React_2.RefAttributes<DragHandle_2>>;
|
146
|
-
|
147
|
-
export declare type DragHandleProps = React_2.PropsWithChildren<PropsWithClassName<DragHandleProps_2>>;
|
148
|
-
|
149
116
|
/**
|
150
117
|
* @internal
|
151
118
|
*/
|
152
119
|
export declare const EditorContextProvider: Provider<Editor<any> | null>;
|
153
120
|
|
154
|
-
|
155
|
-
|
156
|
-
export
|
121
|
+
declare const InlinePopover: ForwardRefExoticComponent<Partial<InlinePopoverProps> & RefAttributes<InlinePopoverElement> & HTMLAttributes<InlinePopoverElement>>;
|
122
|
+
export { InlinePopover }
|
123
|
+
export { InlinePopover as InlinePopover_alias_1 }
|
157
124
|
|
158
125
|
export declare type NodeViewFactory = (options: ReactNodeViewUserOptions) => NodeViewConstructor;
|
159
126
|
|
160
|
-
|
161
|
-
|
162
|
-
export
|
163
|
-
|
164
|
-
export declare type PopoverContentProps = React_2.PropsWithChildren<PropsWithClassName<PopoverContentProps_2>>;
|
127
|
+
declare const PopoverContent: ForwardRefExoticComponent<Partial<PopoverContentProps> & RefAttributes<PopoverContentElement> & HTMLAttributes<PopoverContentElement>>;
|
128
|
+
export { PopoverContent }
|
129
|
+
export { PopoverContent as PopoverContent_alias_1 }
|
165
130
|
|
166
|
-
|
131
|
+
declare const PopoverRoot: ForwardRefExoticComponent<Partial<PopoverRootProps> & RefAttributes<PopoverRootElement> & HTMLAttributes<PopoverRootElement>>;
|
132
|
+
export { PopoverRoot }
|
133
|
+
export { PopoverRoot as PopoverRoot_alias_1 }
|
167
134
|
|
168
|
-
|
169
|
-
|
170
|
-
export
|
171
|
-
|
172
|
-
export declare const PopoverTrigger: React_2.ComponentType<PopoverTriggerProps & React_2.RefAttributes<PopoverTrigger_2>>;
|
173
|
-
|
174
|
-
export declare type PopoverTriggerProps = React_2.PropsWithChildren<PropsWithClassName<PopoverTriggerProps_2>>;
|
175
|
-
|
176
|
-
export { PositioningOptions }
|
135
|
+
declare const PopoverTrigger: ForwardRefExoticComponent<Partial<PopoverTriggerProps> & RefAttributes<PopoverTriggerElement> & HTMLAttributes<PopoverTriggerElement>>;
|
136
|
+
export { PopoverTrigger }
|
137
|
+
export { PopoverTrigger as PopoverTrigger_alias_1 }
|
177
138
|
|
178
139
|
/**
|
179
140
|
* @internal
|
@@ -273,13 +234,25 @@ declare const ReactViewsProvider: FC<{
|
|
273
234
|
export { ReactViewsProvider }
|
274
235
|
export { ReactViewsProvider as ReactViewsProvider_alias_1 }
|
275
236
|
|
276
|
-
|
237
|
+
declare const ResizableHandle: ForwardRefExoticComponent<Partial<ResizableHandleProps> & RefAttributes<ResizableHandleElement> & HTMLAttributes<ResizableHandleElement>>;
|
238
|
+
export { ResizableHandle }
|
239
|
+
export { ResizableHandle as ResizableHandle_alias_1 }
|
240
|
+
|
241
|
+
declare const ResizableRoot: ForwardRefExoticComponent<Partial<ResizableRootProps> & RefAttributes<ResizableRootElement> & HTMLAttributes<ResizableRootElement>>;
|
242
|
+
export { ResizableRoot }
|
243
|
+
export { ResizableRoot as ResizableRoot_alias_1 }
|
277
244
|
|
278
|
-
|
245
|
+
declare const TooltipContent: ForwardRefExoticComponent<Partial<TooltipContentProps> & RefAttributes<TooltipContentElement> & HTMLAttributes<TooltipContentElement>>;
|
246
|
+
export { TooltipContent }
|
247
|
+
export { TooltipContent as TooltipContent_alias_1 }
|
279
248
|
|
280
|
-
|
249
|
+
declare const TooltipRoot: ForwardRefExoticComponent<Partial<TooltipRootProps> & RefAttributes<TooltipRootElement> & HTMLAttributes<TooltipRootElement>>;
|
250
|
+
export { TooltipRoot }
|
251
|
+
export { TooltipRoot as TooltipRoot_alias_1 }
|
281
252
|
|
282
|
-
|
253
|
+
declare const TooltipTrigger: ForwardRefExoticComponent<Partial<TooltipTriggerProps> & RefAttributes<TooltipTriggerElement> & HTMLAttributes<TooltipTriggerElement>>;
|
254
|
+
export { TooltipTrigger }
|
255
|
+
export { TooltipTrigger as TooltipTrigger_alias_1 }
|
283
256
|
|
284
257
|
/**
|
285
258
|
* Calls the given handler whenever the editor document changes.
|
@@ -0,0 +1,12 @@
|
|
1
|
+
// src/contexts/editor-context.ts
|
2
|
+
import { createContext, useContext } from "react";
|
3
|
+
var editorContext = createContext(null);
|
4
|
+
function useEditorContext() {
|
5
|
+
return useContext(editorContext);
|
6
|
+
}
|
7
|
+
var EditorContextProvider = editorContext.Provider;
|
8
|
+
|
9
|
+
export {
|
10
|
+
useEditorContext,
|
11
|
+
EditorContextProvider
|
12
|
+
};
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import {
|
2
|
+
useEditorContext
|
3
|
+
} from "./chunk-BH56NR2Q.js";
|
4
|
+
|
5
|
+
// src/components/create-component.ts
|
6
|
+
import {
|
7
|
+
createElement,
|
8
|
+
forwardRef,
|
9
|
+
useLayoutEffect,
|
10
|
+
useState
|
11
|
+
} from "react";
|
12
|
+
import { mergeRefs } from "react-merge-refs";
|
13
|
+
function createComponent(tagName, displayName, defaultProps) {
|
14
|
+
const propertyNames = Object.keys(defaultProps);
|
15
|
+
const hasEditor = Object.hasOwn(defaultProps, "editor");
|
16
|
+
const Component = forwardRef((props, ref) => {
|
17
|
+
const [el, setEl] = useState(null);
|
18
|
+
const properties = {};
|
19
|
+
const attributes = {};
|
20
|
+
for (const [name, value] of Object.entries(props)) {
|
21
|
+
if (propertyNames.includes(name)) {
|
22
|
+
properties[name] = value;
|
23
|
+
} else {
|
24
|
+
attributes[name === "className" ? "class" : name] = value;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
const editor = useEditorContext();
|
28
|
+
if (hasEditor && editor && !properties["editor"]) {
|
29
|
+
properties["editor"] = editor;
|
30
|
+
}
|
31
|
+
useLayoutEffect(() => {
|
32
|
+
if (el) {
|
33
|
+
for (const [name, value] of Object.entries(properties)) {
|
34
|
+
if (value !== void 0) {
|
35
|
+
el[name] = value;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}, [el, ...propertyNames.map((name) => properties[name])]);
|
40
|
+
return createElement(tagName, {
|
41
|
+
...attributes,
|
42
|
+
ref: mergeRefs([ref, setEl])
|
43
|
+
});
|
44
|
+
});
|
45
|
+
Component.displayName = displayName;
|
46
|
+
return Component;
|
47
|
+
}
|
48
|
+
|
49
|
+
export {
|
50
|
+
createComponent
|
51
|
+
};
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export { AutocompleteEmpty_alias_1 as AutocompleteEmpty } from './_tsup-dts-rollup';
|
2
|
+
export { AutocompleteItem_alias_1 as AutocompleteItem } from './_tsup-dts-rollup';
|
3
|
+
export { AutocompleteList_alias_1 as AutocompleteList } from './_tsup-dts-rollup';
|
4
|
+
export { AutocompletePopover_alias_1 as AutocompletePopover } from './_tsup-dts-rollup';
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import {
|
2
|
+
createComponent
|
3
|
+
} from "./chunk-UG3RPLME.js";
|
4
|
+
import "./chunk-BH56NR2Q.js";
|
5
|
+
|
6
|
+
// src/components/autocomplete/autocomplete-empty.gen.ts
|
7
|
+
import {
|
8
|
+
defaultAutocompleteEmptyProps
|
9
|
+
} from "@prosekit/web/autocomplete";
|
10
|
+
var AutocompleteEmpty = createComponent(
|
11
|
+
"prosekit-autocomplete-empty",
|
12
|
+
"AutocompleteEmpty",
|
13
|
+
defaultAutocompleteEmptyProps
|
14
|
+
);
|
15
|
+
|
16
|
+
// src/components/autocomplete/autocomplete-item.gen.ts
|
17
|
+
import {
|
18
|
+
defaultAutocompleteItemProps
|
19
|
+
} from "@prosekit/web/autocomplete";
|
20
|
+
var AutocompleteItem = createComponent(
|
21
|
+
"prosekit-autocomplete-item",
|
22
|
+
"AutocompleteItem",
|
23
|
+
defaultAutocompleteItemProps
|
24
|
+
);
|
25
|
+
|
26
|
+
// src/components/autocomplete/autocomplete-list.gen.ts
|
27
|
+
import {
|
28
|
+
defaultAutocompleteListProps
|
29
|
+
} from "@prosekit/web/autocomplete";
|
30
|
+
var AutocompleteList = createComponent(
|
31
|
+
"prosekit-autocomplete-list",
|
32
|
+
"AutocompleteList",
|
33
|
+
defaultAutocompleteListProps
|
34
|
+
);
|
35
|
+
|
36
|
+
// src/components/autocomplete/autocomplete-popover.gen.ts
|
37
|
+
import {
|
38
|
+
defaultAutocompletePopoverProps
|
39
|
+
} from "@prosekit/web/autocomplete";
|
40
|
+
var AutocompletePopover = createComponent(
|
41
|
+
"prosekit-autocomplete-popover",
|
42
|
+
"AutocompletePopover",
|
43
|
+
defaultAutocompletePopoverProps
|
44
|
+
);
|
45
|
+
export {
|
46
|
+
AutocompleteEmpty,
|
47
|
+
AutocompleteItem,
|
48
|
+
AutocompleteList,
|
49
|
+
AutocompletePopover
|
50
|
+
};
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import {
|
2
|
+
createComponent
|
3
|
+
} from "./chunk-UG3RPLME.js";
|
4
|
+
import "./chunk-BH56NR2Q.js";
|
5
|
+
|
6
|
+
// src/components/block-handle/block-drag-handle.gen.ts
|
7
|
+
import {
|
8
|
+
defaultBlockDragHandleProps
|
9
|
+
} from "@prosekit/web/block-handle";
|
10
|
+
var BlockDragHandle = createComponent(
|
11
|
+
"prosekit-block-drag-handle",
|
12
|
+
"BlockDragHandle",
|
13
|
+
defaultBlockDragHandleProps
|
14
|
+
);
|
15
|
+
|
16
|
+
// src/components/block-handle/block-popover.gen.ts
|
17
|
+
import {
|
18
|
+
defaultBlockPopoverProps
|
19
|
+
} from "@prosekit/web/block-handle";
|
20
|
+
var BlockPopover = createComponent(
|
21
|
+
"prosekit-block-popover",
|
22
|
+
"BlockPopover",
|
23
|
+
defaultBlockPopoverProps
|
24
|
+
);
|
25
|
+
export {
|
26
|
+
BlockDragHandle,
|
27
|
+
BlockPopover
|
28
|
+
};
|
@@ -1,17 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
import
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
import {
|
2
|
+
createComponent
|
3
|
+
} from "./chunk-UG3RPLME.js";
|
4
|
+
import "./chunk-BH56NR2Q.js";
|
5
|
+
|
6
|
+
// src/components/inline-popover/inline-popover.gen.ts
|
7
|
+
import {
|
8
|
+
defaultInlinePopoverProps
|
9
|
+
} from "@prosekit/web/inline-popover";
|
10
|
+
var InlinePopover = createComponent(
|
11
|
+
"prosekit-inline-popover",
|
12
|
+
"InlinePopover",
|
13
|
+
defaultInlinePopoverProps
|
14
|
+
);
|
15
15
|
export {
|
16
16
|
InlinePopover
|
17
17
|
};
|
@@ -1,2 +1,3 @@
|
|
1
|
-
export {
|
2
|
-
export {
|
1
|
+
export { PopoverContent } from './_tsup-dts-rollup';
|
2
|
+
export { PopoverRoot } from './_tsup-dts-rollup';
|
3
|
+
export { PopoverTrigger } from './_tsup-dts-rollup';
|
@@ -1,17 +1,39 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
import
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
import {
|
2
|
+
createComponent
|
3
|
+
} from "./chunk-UG3RPLME.js";
|
4
|
+
import "./chunk-BH56NR2Q.js";
|
5
|
+
|
6
|
+
// src/components/popover/popover-content.gen.ts
|
7
|
+
import {
|
8
|
+
defaultPopoverContentProps
|
9
|
+
} from "@prosekit/web/popover";
|
10
|
+
var PopoverContent = createComponent(
|
11
|
+
"prosekit-popover-content",
|
12
|
+
"PopoverContent",
|
13
|
+
defaultPopoverContentProps
|
14
|
+
);
|
15
|
+
|
16
|
+
// src/components/popover/popover-root.gen.ts
|
17
|
+
import {
|
18
|
+
defaultPopoverRootProps
|
19
|
+
} from "@prosekit/web/popover";
|
20
|
+
var PopoverRoot = createComponent(
|
21
|
+
"prosekit-popover-root",
|
22
|
+
"PopoverRoot",
|
23
|
+
defaultPopoverRootProps
|
24
|
+
);
|
25
|
+
|
26
|
+
// src/components/popover/popover-trigger.gen.ts
|
27
|
+
import {
|
28
|
+
defaultPopoverTriggerProps
|
29
|
+
} from "@prosekit/web/popover";
|
30
|
+
var PopoverTrigger = createComponent(
|
31
|
+
"prosekit-popover-trigger",
|
32
|
+
"PopoverTrigger",
|
33
|
+
defaultPopoverTriggerProps
|
34
|
+
);
|
15
35
|
export {
|
16
|
-
|
36
|
+
PopoverContent,
|
37
|
+
PopoverRoot,
|
38
|
+
PopoverTrigger
|
17
39
|
};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export {
|
2
|
-
export {
|
1
|
+
export { ResizableHandle } from './_tsup-dts-rollup';
|
2
|
+
export { ResizableRoot } from './_tsup-dts-rollup';
|
@@ -1,17 +1,28 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
import
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
import {
|
2
|
+
createComponent
|
3
|
+
} from "./chunk-UG3RPLME.js";
|
4
|
+
import "./chunk-BH56NR2Q.js";
|
5
|
+
|
6
|
+
// src/components/resizable/resizable-handle.gen.ts
|
7
|
+
import {
|
8
|
+
defaultResizableHandleProps
|
9
|
+
} from "@prosekit/web/resizable";
|
10
|
+
var ResizableHandle = createComponent(
|
11
|
+
"prosekit-resizable-handle",
|
12
|
+
"ResizableHandle",
|
13
|
+
defaultResizableHandleProps
|
14
|
+
);
|
15
|
+
|
16
|
+
// src/components/resizable/resizable-root.gen.ts
|
17
|
+
import {
|
18
|
+
defaultResizableRootProps
|
19
|
+
} from "@prosekit/web/resizable";
|
20
|
+
var ResizableRoot = createComponent(
|
21
|
+
"prosekit-resizable-root",
|
22
|
+
"ResizableRoot",
|
23
|
+
defaultResizableRootProps
|
24
|
+
);
|
15
25
|
export {
|
16
|
-
|
26
|
+
ResizableHandle,
|
27
|
+
ResizableRoot
|
17
28
|
};
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import {
|
2
|
+
createComponent
|
3
|
+
} from "./chunk-UG3RPLME.js";
|
4
|
+
import "./chunk-BH56NR2Q.js";
|
5
|
+
|
6
|
+
// src/components/tooltip/tooltip-content.gen.ts
|
7
|
+
import {
|
8
|
+
defaultTooltipContentProps
|
9
|
+
} from "@prosekit/web/tooltip";
|
10
|
+
var TooltipContent = createComponent(
|
11
|
+
"prosekit-tooltip-content",
|
12
|
+
"TooltipContent",
|
13
|
+
defaultTooltipContentProps
|
14
|
+
);
|
15
|
+
|
16
|
+
// src/components/tooltip/tooltip-root.gen.ts
|
17
|
+
import {
|
18
|
+
defaultTooltipRootProps
|
19
|
+
} from "@prosekit/web/tooltip";
|
20
|
+
var TooltipRoot = createComponent(
|
21
|
+
"prosekit-tooltip-root",
|
22
|
+
"TooltipRoot",
|
23
|
+
defaultTooltipRootProps
|
24
|
+
);
|
25
|
+
|
26
|
+
// src/components/tooltip/tooltip-trigger.gen.ts
|
27
|
+
import {
|
28
|
+
defaultTooltipTriggerProps
|
29
|
+
} from "@prosekit/web/tooltip";
|
30
|
+
var TooltipTrigger = createComponent(
|
31
|
+
"prosekit-tooltip-trigger",
|
32
|
+
"TooltipTrigger",
|
33
|
+
defaultTooltipTriggerProps
|
34
|
+
);
|
35
|
+
export {
|
36
|
+
TooltipContent,
|
37
|
+
TooltipRoot,
|
38
|
+
TooltipTrigger
|
39
|
+
};
|
package/dist/prosekit-react.js
CHANGED
@@ -1,15 +1,12 @@
|
|
1
|
+
import {
|
2
|
+
EditorContextProvider,
|
3
|
+
useEditorContext
|
4
|
+
} from "./chunk-BH56NR2Q.js";
|
5
|
+
|
1
6
|
// src/components/prosekit.ts
|
2
7
|
import "@prosekit/core";
|
3
8
|
import { createElement as createElement3 } from "react";
|
4
9
|
|
5
|
-
// src/contexts/editor-context.ts
|
6
|
-
import { createContext, useContext } from "react";
|
7
|
-
var editorContext = createContext(null);
|
8
|
-
function useEditorContext() {
|
9
|
-
return useContext(editorContext);
|
10
|
-
}
|
11
|
-
var EditorContextProvider = editorContext.Provider;
|
12
|
-
|
13
10
|
// src/views/react-views-consumer.ts
|
14
11
|
import { useMemo as useMemo2 } from "react";
|
15
12
|
|
@@ -60,19 +57,19 @@ function usePriorityExtension(extension, priority) {
|
|
60
57
|
|
61
58
|
// src/hooks/use-extension.ts
|
62
59
|
function useExtension(extension, options) {
|
63
|
-
const
|
60
|
+
const editorContext = useEditorContext();
|
64
61
|
useEditorExtension(
|
65
|
-
(options == null ? void 0 : options.editor) ||
|
62
|
+
(options == null ? void 0 : options.editor) || editorContext,
|
66
63
|
usePriorityExtension(extension, options == null ? void 0 : options.priority)
|
67
64
|
);
|
68
65
|
}
|
69
66
|
|
70
67
|
// src/views/node-view/node-view-context.ts
|
71
68
|
import { ProseKitError } from "@prosekit/core";
|
72
|
-
import { createContext
|
73
|
-
var createNodeViewContext =
|
69
|
+
import { createContext, useContext } from "react";
|
70
|
+
var createNodeViewContext = createContext(null);
|
74
71
|
function useNodeViewFactory() {
|
75
|
-
const nodeViewFactory =
|
72
|
+
const nodeViewFactory = useContext(createNodeViewContext);
|
76
73
|
if (!nodeViewFactory) {
|
77
74
|
throw new ProseKitError("Cannot find node view factory context.");
|
78
75
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosekit/react",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.3.1",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -30,55 +30,15 @@
|
|
30
30
|
"import": "./dist/prosekit-react.js",
|
31
31
|
"default": "./dist/prosekit-react.js"
|
32
32
|
},
|
33
|
-
"./autocomplete
|
34
|
-
"types": "./dist/prosekit-react-autocomplete
|
35
|
-
"import": "./dist/prosekit-react-autocomplete
|
36
|
-
"default": "./dist/prosekit-react-autocomplete
|
33
|
+
"./autocomplete": {
|
34
|
+
"types": "./dist/prosekit-react-autocomplete.d.ts",
|
35
|
+
"import": "./dist/prosekit-react-autocomplete.js",
|
36
|
+
"default": "./dist/prosekit-react-autocomplete.js"
|
37
37
|
},
|
38
|
-
"./
|
39
|
-
"types": "./dist/prosekit-react-
|
40
|
-
"import": "./dist/prosekit-react-
|
41
|
-
"default": "./dist/prosekit-react-
|
42
|
-
},
|
43
|
-
"./autocomplete-list": {
|
44
|
-
"types": "./dist/prosekit-react-autocomplete-list.d.ts",
|
45
|
-
"import": "./dist/prosekit-react-autocomplete-list.js",
|
46
|
-
"default": "./dist/prosekit-react-autocomplete-list.js"
|
47
|
-
},
|
48
|
-
"./autocomplete-popover": {
|
49
|
-
"types": "./dist/prosekit-react-autocomplete-popover.d.ts",
|
50
|
-
"import": "./dist/prosekit-react-autocomplete-popover.js",
|
51
|
-
"default": "./dist/prosekit-react-autocomplete-popover.js"
|
52
|
-
},
|
53
|
-
"./block-popover": {
|
54
|
-
"types": "./dist/prosekit-react-block-popover.d.ts",
|
55
|
-
"import": "./dist/prosekit-react-block-popover.js",
|
56
|
-
"default": "./dist/prosekit-react-block-popover.js"
|
57
|
-
},
|
58
|
-
"./combo-box": {
|
59
|
-
"types": "./dist/prosekit-react-combo-box.d.ts",
|
60
|
-
"import": "./dist/prosekit-react-combo-box.js",
|
61
|
-
"default": "./dist/prosekit-react-combo-box.js"
|
62
|
-
},
|
63
|
-
"./combo-box-input": {
|
64
|
-
"types": "./dist/prosekit-react-combo-box-input.d.ts",
|
65
|
-
"import": "./dist/prosekit-react-combo-box-input.js",
|
66
|
-
"default": "./dist/prosekit-react-combo-box-input.js"
|
67
|
-
},
|
68
|
-
"./combo-box-item": {
|
69
|
-
"types": "./dist/prosekit-react-combo-box-item.d.ts",
|
70
|
-
"import": "./dist/prosekit-react-combo-box-item.js",
|
71
|
-
"default": "./dist/prosekit-react-combo-box-item.js"
|
72
|
-
},
|
73
|
-
"./combo-box-list": {
|
74
|
-
"types": "./dist/prosekit-react-combo-box-list.d.ts",
|
75
|
-
"import": "./dist/prosekit-react-combo-box-list.js",
|
76
|
-
"default": "./dist/prosekit-react-combo-box-list.js"
|
77
|
-
},
|
78
|
-
"./drag-handle": {
|
79
|
-
"types": "./dist/prosekit-react-drag-handle.d.ts",
|
80
|
-
"import": "./dist/prosekit-react-drag-handle.js",
|
81
|
-
"default": "./dist/prosekit-react-drag-handle.js"
|
38
|
+
"./block-handle": {
|
39
|
+
"types": "./dist/prosekit-react-block-handle.d.ts",
|
40
|
+
"import": "./dist/prosekit-react-block-handle.js",
|
41
|
+
"default": "./dist/prosekit-react-block-handle.js"
|
82
42
|
},
|
83
43
|
"./inline-popover": {
|
84
44
|
"types": "./dist/prosekit-react-inline-popover.d.ts",
|
@@ -90,30 +50,15 @@
|
|
90
50
|
"import": "./dist/prosekit-react-popover.js",
|
91
51
|
"default": "./dist/prosekit-react-popover.js"
|
92
52
|
},
|
93
|
-
"./popover-content": {
|
94
|
-
"types": "./dist/prosekit-react-popover-content.d.ts",
|
95
|
-
"import": "./dist/prosekit-react-popover-content.js",
|
96
|
-
"default": "./dist/prosekit-react-popover-content.js"
|
97
|
-
},
|
98
|
-
"./popover-root": {
|
99
|
-
"types": "./dist/prosekit-react-popover-root.d.ts",
|
100
|
-
"import": "./dist/prosekit-react-popover-root.js",
|
101
|
-
"default": "./dist/prosekit-react-popover-root.js"
|
102
|
-
},
|
103
|
-
"./popover-trigger": {
|
104
|
-
"types": "./dist/prosekit-react-popover-trigger.d.ts",
|
105
|
-
"import": "./dist/prosekit-react-popover-trigger.js",
|
106
|
-
"default": "./dist/prosekit-react-popover-trigger.js"
|
107
|
-
},
|
108
53
|
"./resizable": {
|
109
54
|
"types": "./dist/prosekit-react-resizable.d.ts",
|
110
55
|
"import": "./dist/prosekit-react-resizable.js",
|
111
56
|
"default": "./dist/prosekit-react-resizable.js"
|
112
57
|
},
|
113
|
-
"./
|
114
|
-
"types": "./dist/prosekit-react-
|
115
|
-
"import": "./dist/prosekit-react-
|
116
|
-
"default": "./dist/prosekit-react-
|
58
|
+
"./tooltip": {
|
59
|
+
"types": "./dist/prosekit-react-tooltip.d.ts",
|
60
|
+
"import": "./dist/prosekit-react-tooltip.js",
|
61
|
+
"default": "./dist/prosekit-react-tooltip.js"
|
117
62
|
}
|
118
63
|
},
|
119
64
|
"files": [
|
@@ -122,9 +67,10 @@
|
|
122
67
|
"dependencies": {
|
123
68
|
"@lit/react": "^1.0.4",
|
124
69
|
"@prosekit/core": "^0.4.0",
|
125
|
-
"@prosekit/lit": "^0.2.8",
|
126
70
|
"@prosekit/pm": "^0.1.2",
|
127
|
-
"@
|
71
|
+
"@prosekit/web": "^0.1.0",
|
72
|
+
"@prosemirror-adapter/core": "^0.2.6",
|
73
|
+
"react-merge-refs": "^2.1.1"
|
128
74
|
},
|
129
75
|
"peerDependencies": {
|
130
76
|
"react": ">= 17.0.0",
|
@@ -140,13 +86,13 @@
|
|
140
86
|
},
|
141
87
|
"devDependencies": {
|
142
88
|
"@prosekit/dev": "*",
|
143
|
-
"@types/react": "^18.2.
|
144
|
-
"@types/react-dom": "^18.2.
|
89
|
+
"@types/react": "^18.2.79",
|
90
|
+
"@types/react-dom": "^18.2.25",
|
145
91
|
"react": "^18.2.0",
|
146
92
|
"react-dom": "^18.2.0",
|
147
93
|
"tsup": "^8.0.2",
|
148
|
-
"typescript": "^5.4.
|
149
|
-
"vitest": "^1.
|
94
|
+
"typescript": "^5.4.5",
|
95
|
+
"vitest": "^1.5.0"
|
150
96
|
},
|
151
97
|
"scripts": {
|
152
98
|
"build:tsup": "tsup",
|
@@ -158,35 +104,11 @@
|
|
158
104
|
".": [
|
159
105
|
"./dist/prosekit-react.d.ts"
|
160
106
|
],
|
161
|
-
"autocomplete
|
162
|
-
"./dist/prosekit-react-autocomplete
|
107
|
+
"autocomplete": [
|
108
|
+
"./dist/prosekit-react-autocomplete.d.ts"
|
163
109
|
],
|
164
|
-
"
|
165
|
-
"./dist/prosekit-react-
|
166
|
-
],
|
167
|
-
"autocomplete-list": [
|
168
|
-
"./dist/prosekit-react-autocomplete-list.d.ts"
|
169
|
-
],
|
170
|
-
"autocomplete-popover": [
|
171
|
-
"./dist/prosekit-react-autocomplete-popover.d.ts"
|
172
|
-
],
|
173
|
-
"block-popover": [
|
174
|
-
"./dist/prosekit-react-block-popover.d.ts"
|
175
|
-
],
|
176
|
-
"combo-box": [
|
177
|
-
"./dist/prosekit-react-combo-box.d.ts"
|
178
|
-
],
|
179
|
-
"combo-box-input": [
|
180
|
-
"./dist/prosekit-react-combo-box-input.d.ts"
|
181
|
-
],
|
182
|
-
"combo-box-item": [
|
183
|
-
"./dist/prosekit-react-combo-box-item.d.ts"
|
184
|
-
],
|
185
|
-
"combo-box-list": [
|
186
|
-
"./dist/prosekit-react-combo-box-list.d.ts"
|
187
|
-
],
|
188
|
-
"drag-handle": [
|
189
|
-
"./dist/prosekit-react-drag-handle.d.ts"
|
110
|
+
"block-handle": [
|
111
|
+
"./dist/prosekit-react-block-handle.d.ts"
|
190
112
|
],
|
191
113
|
"inline-popover": [
|
192
114
|
"./dist/prosekit-react-inline-popover.d.ts"
|
@@ -194,20 +116,11 @@
|
|
194
116
|
"popover": [
|
195
117
|
"./dist/prosekit-react-popover.d.ts"
|
196
118
|
],
|
197
|
-
"popover-content": [
|
198
|
-
"./dist/prosekit-react-popover-content.d.ts"
|
199
|
-
],
|
200
|
-
"popover-root": [
|
201
|
-
"./dist/prosekit-react-popover-root.d.ts"
|
202
|
-
],
|
203
|
-
"popover-trigger": [
|
204
|
-
"./dist/prosekit-react-popover-trigger.d.ts"
|
205
|
-
],
|
206
119
|
"resizable": [
|
207
120
|
"./dist/prosekit-react-resizable.d.ts"
|
208
121
|
],
|
209
|
-
"
|
210
|
-
"./dist/prosekit-react-
|
122
|
+
"tooltip": [
|
123
|
+
"./dist/prosekit-react-tooltip.d.ts"
|
211
124
|
]
|
212
125
|
}
|
213
126
|
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
// src/components/autocomplete-empty.gen.ts
|
2
|
-
import { createComponent } from "@lit/react";
|
3
|
-
import { AutocompleteEmpty as AutocompleteEmptyElement } from "@prosekit/lit/autocomplete-empty";
|
4
|
-
import React from "react";
|
5
|
-
var AutocompleteEmptyInner = createComponent({
|
6
|
-
tagName: "prosekit-autocomplete-empty",
|
7
|
-
elementClass: AutocompleteEmptyElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "AutocompleteEmptyInner"
|
10
|
-
});
|
11
|
-
var AutocompleteEmpty = React.forwardRef((props, ref) => {
|
12
|
-
return React.createElement(AutocompleteEmptyInner, { ...props, ref });
|
13
|
-
});
|
14
|
-
AutocompleteEmpty.displayName = "AutocompleteEmpty";
|
15
|
-
export {
|
16
|
-
AutocompleteEmpty
|
17
|
-
};
|
@@ -1,17 +0,0 @@
|
|
1
|
-
// src/components/autocomplete-item.gen.ts
|
2
|
-
import { createComponent } from "@lit/react";
|
3
|
-
import { AutocompleteItem as AutocompleteItemElement } from "@prosekit/lit/autocomplete-item";
|
4
|
-
import React from "react";
|
5
|
-
var AutocompleteItemInner = createComponent({
|
6
|
-
tagName: "prosekit-autocomplete-item",
|
7
|
-
elementClass: AutocompleteItemElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "AutocompleteItemInner"
|
10
|
-
});
|
11
|
-
var AutocompleteItem = React.forwardRef((props, ref) => {
|
12
|
-
return React.createElement(AutocompleteItemInner, { ...props, ref });
|
13
|
-
});
|
14
|
-
AutocompleteItem.displayName = "AutocompleteItem";
|
15
|
-
export {
|
16
|
-
AutocompleteItem
|
17
|
-
};
|
@@ -1,17 +0,0 @@
|
|
1
|
-
// src/components/autocomplete-list.gen.ts
|
2
|
-
import { createComponent } from "@lit/react";
|
3
|
-
import { AutocompleteList as AutocompleteListElement } from "@prosekit/lit/autocomplete-list";
|
4
|
-
import React from "react";
|
5
|
-
var AutocompleteListInner = createComponent({
|
6
|
-
tagName: "prosekit-autocomplete-list",
|
7
|
-
elementClass: AutocompleteListElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "AutocompleteListInner"
|
10
|
-
});
|
11
|
-
var AutocompleteList = React.forwardRef((props, ref) => {
|
12
|
-
return React.createElement(AutocompleteListInner, { ...props, ref });
|
13
|
-
});
|
14
|
-
AutocompleteList.displayName = "AutocompleteList";
|
15
|
-
export {
|
16
|
-
AutocompleteList
|
17
|
-
};
|
@@ -1,17 +0,0 @@
|
|
1
|
-
// src/components/autocomplete-popover.gen.ts
|
2
|
-
import { createComponent } from "@lit/react";
|
3
|
-
import { AutocompletePopover as AutocompletePopoverElement } from "@prosekit/lit/autocomplete-popover";
|
4
|
-
import React from "react";
|
5
|
-
var AutocompletePopoverInner = createComponent({
|
6
|
-
tagName: "prosekit-autocomplete-popover",
|
7
|
-
elementClass: AutocompletePopoverElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "AutocompletePopoverInner"
|
10
|
-
});
|
11
|
-
var AutocompletePopover = React.forwardRef((props, ref) => {
|
12
|
-
return React.createElement(AutocompletePopoverInner, { ...props, ref });
|
13
|
-
});
|
14
|
-
AutocompletePopover.displayName = "AutocompletePopover";
|
15
|
-
export {
|
16
|
-
AutocompletePopover
|
17
|
-
};
|
@@ -1,17 +0,0 @@
|
|
1
|
-
// src/components/block-popover.gen.ts
|
2
|
-
import { createComponent } from "@lit/react";
|
3
|
-
import { BlockPopover as BlockPopoverElement } from "@prosekit/lit/block-popover";
|
4
|
-
import React from "react";
|
5
|
-
var BlockPopoverInner = createComponent({
|
6
|
-
tagName: "prosekit-block-popover",
|
7
|
-
elementClass: BlockPopoverElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "BlockPopoverInner"
|
10
|
-
});
|
11
|
-
var BlockPopover = React.forwardRef((props, ref) => {
|
12
|
-
return React.createElement(BlockPopoverInner, { ...props, ref });
|
13
|
-
});
|
14
|
-
BlockPopover.displayName = "BlockPopover";
|
15
|
-
export {
|
16
|
-
BlockPopover
|
17
|
-
};
|
@@ -1,17 +0,0 @@
|
|
1
|
-
// src/components/combo-box-input.gen.ts
|
2
|
-
import { createComponent } from "@lit/react";
|
3
|
-
import { ComboBoxInput as ComboBoxInputElement } from "@prosekit/lit/combo-box-input";
|
4
|
-
import React from "react";
|
5
|
-
var ComboBoxInputInner = createComponent({
|
6
|
-
tagName: "prosekit-combo-box-input",
|
7
|
-
elementClass: ComboBoxInputElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "ComboBoxInputInner"
|
10
|
-
});
|
11
|
-
var ComboBoxInput = React.forwardRef((props, ref) => {
|
12
|
-
return React.createElement(ComboBoxInputInner, { ...props, ref });
|
13
|
-
});
|
14
|
-
ComboBoxInput.displayName = "ComboBoxInput";
|
15
|
-
export {
|
16
|
-
ComboBoxInput
|
17
|
-
};
|
@@ -1,17 +0,0 @@
|
|
1
|
-
// src/components/combo-box-item.gen.ts
|
2
|
-
import { createComponent } from "@lit/react";
|
3
|
-
import { ComboBoxItem as ComboBoxItemElement } from "@prosekit/lit/combo-box-item";
|
4
|
-
import React from "react";
|
5
|
-
var ComboBoxItemInner = createComponent({
|
6
|
-
tagName: "prosekit-combo-box-item",
|
7
|
-
elementClass: ComboBoxItemElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "ComboBoxItemInner"
|
10
|
-
});
|
11
|
-
var ComboBoxItem = React.forwardRef((props, ref) => {
|
12
|
-
return React.createElement(ComboBoxItemInner, { ...props, ref });
|
13
|
-
});
|
14
|
-
ComboBoxItem.displayName = "ComboBoxItem";
|
15
|
-
export {
|
16
|
-
ComboBoxItem
|
17
|
-
};
|
@@ -1,17 +0,0 @@
|
|
1
|
-
// src/components/combo-box-list.gen.ts
|
2
|
-
import { createComponent } from "@lit/react";
|
3
|
-
import { ComboBoxList as ComboBoxListElement } from "@prosekit/lit/combo-box-list";
|
4
|
-
import React from "react";
|
5
|
-
var ComboBoxListInner = createComponent({
|
6
|
-
tagName: "prosekit-combo-box-list",
|
7
|
-
elementClass: ComboBoxListElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "ComboBoxListInner"
|
10
|
-
});
|
11
|
-
var ComboBoxList = React.forwardRef((props, ref) => {
|
12
|
-
return React.createElement(ComboBoxListInner, { ...props, ref });
|
13
|
-
});
|
14
|
-
ComboBoxList.displayName = "ComboBoxList";
|
15
|
-
export {
|
16
|
-
ComboBoxList
|
17
|
-
};
|
@@ -1,17 +0,0 @@
|
|
1
|
-
// src/components/combo-box.gen.ts
|
2
|
-
import { createComponent } from "@lit/react";
|
3
|
-
import { ComboBox as ComboBoxElement } from "@prosekit/lit/combo-box";
|
4
|
-
import React from "react";
|
5
|
-
var ComboBoxInner = createComponent({
|
6
|
-
tagName: "prosekit-combo-box",
|
7
|
-
elementClass: ComboBoxElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "ComboBoxInner"
|
10
|
-
});
|
11
|
-
var ComboBox = React.forwardRef((props, ref) => {
|
12
|
-
return React.createElement(ComboBoxInner, { ...props, ref });
|
13
|
-
});
|
14
|
-
ComboBox.displayName = "ComboBox";
|
15
|
-
export {
|
16
|
-
ComboBox
|
17
|
-
};
|
@@ -1,17 +0,0 @@
|
|
1
|
-
// src/components/drag-handle.gen.ts
|
2
|
-
import { createComponent } from "@lit/react";
|
3
|
-
import { DragHandle as DragHandleElement } from "@prosekit/lit/drag-handle";
|
4
|
-
import React from "react";
|
5
|
-
var DragHandleInner = createComponent({
|
6
|
-
tagName: "prosekit-drag-handle",
|
7
|
-
elementClass: DragHandleElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "DragHandleInner"
|
10
|
-
});
|
11
|
-
var DragHandle = React.forwardRef((props, ref) => {
|
12
|
-
return React.createElement(DragHandleInner, { ...props, ref });
|
13
|
-
});
|
14
|
-
DragHandle.displayName = "DragHandle";
|
15
|
-
export {
|
16
|
-
DragHandle
|
17
|
-
};
|
@@ -1,17 +0,0 @@
|
|
1
|
-
// src/components/popover-content.gen.ts
|
2
|
-
import { createComponent } from "@lit/react";
|
3
|
-
import { PopoverContent as PopoverContentElement } from "@prosekit/lit/popover-content";
|
4
|
-
import React from "react";
|
5
|
-
var PopoverContentInner = createComponent({
|
6
|
-
tagName: "prosekit-popover-content",
|
7
|
-
elementClass: PopoverContentElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "PopoverContentInner"
|
10
|
-
});
|
11
|
-
var PopoverContent = React.forwardRef((props, ref) => {
|
12
|
-
return React.createElement(PopoverContentInner, { ...props, ref });
|
13
|
-
});
|
14
|
-
PopoverContent.displayName = "PopoverContent";
|
15
|
-
export {
|
16
|
-
PopoverContent
|
17
|
-
};
|
@@ -1,17 +0,0 @@
|
|
1
|
-
// src/components/popover-root.gen.ts
|
2
|
-
import { createComponent } from "@lit/react";
|
3
|
-
import { PopoverRoot as PopoverRootElement } from "@prosekit/lit/popover-root";
|
4
|
-
import React from "react";
|
5
|
-
var PopoverRootInner = createComponent({
|
6
|
-
tagName: "prosekit-popover-root",
|
7
|
-
elementClass: PopoverRootElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "PopoverRootInner"
|
10
|
-
});
|
11
|
-
var PopoverRoot = React.forwardRef((props, ref) => {
|
12
|
-
return React.createElement(PopoverRootInner, { ...props, ref });
|
13
|
-
});
|
14
|
-
PopoverRoot.displayName = "PopoverRoot";
|
15
|
-
export {
|
16
|
-
PopoverRoot
|
17
|
-
};
|
@@ -1,17 +0,0 @@
|
|
1
|
-
// src/components/popover-trigger.gen.ts
|
2
|
-
import { createComponent } from "@lit/react";
|
3
|
-
import { PopoverTrigger as PopoverTriggerElement } from "@prosekit/lit/popover-trigger";
|
4
|
-
import React from "react";
|
5
|
-
var PopoverTriggerInner = createComponent({
|
6
|
-
tagName: "prosekit-popover-trigger",
|
7
|
-
elementClass: PopoverTriggerElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "PopoverTriggerInner"
|
10
|
-
});
|
11
|
-
var PopoverTrigger = React.forwardRef((props, ref) => {
|
12
|
-
return React.createElement(PopoverTriggerInner, { ...props, ref });
|
13
|
-
});
|
14
|
-
PopoverTrigger.displayName = "PopoverTrigger";
|
15
|
-
export {
|
16
|
-
PopoverTrigger
|
17
|
-
};
|
@@ -1,17 +0,0 @@
|
|
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
|
-
};
|