@prosekit/react 0.2.6 → 0.3.0
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 -82
- 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 +29 -91
- 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-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,85 +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 {
|
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';
|
48
45
|
import { Priority } from '@prosekit/core';
|
49
46
|
import type { ProseMirrorNode } from '@prosekit/pm/model';
|
50
47
|
import { Provider } from 'react';
|
51
|
-
import { default as React_2 } from 'react';
|
52
48
|
import { ReactNode } from 'react';
|
53
49
|
import { ReactPortal } from 'react';
|
54
|
-
import {
|
55
|
-
import {
|
56
|
-
import { ResizableHandleProps
|
57
|
-
import {
|
58
|
-
|
59
|
-
|
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>>;
|
60
63
|
export { AutocompleteEmpty }
|
61
64
|
export { AutocompleteEmpty as AutocompleteEmpty_alias_1 }
|
62
65
|
|
63
|
-
declare
|
64
|
-
export { AutocompleteEmptyProps }
|
65
|
-
export { AutocompleteEmptyProps as AutocompleteEmptyProps_alias_1 }
|
66
|
-
|
67
|
-
declare const AutocompleteItem: React_2.ComponentType<AutocompleteItemProps & React_2.RefAttributes<AutocompleteItem_2>>;
|
66
|
+
declare const AutocompleteItem: ForwardRefExoticComponent<Partial<AutocompleteItemProps> & RefAttributes<AutocompleteItemElement> & HTMLAttributes<AutocompleteItemElement>>;
|
68
67
|
export { AutocompleteItem }
|
69
68
|
export { AutocompleteItem as AutocompleteItem_alias_1 }
|
70
69
|
|
71
|
-
declare
|
72
|
-
export { AutocompleteItemProps }
|
73
|
-
export { AutocompleteItemProps as AutocompleteItemProps_alias_1 }
|
74
|
-
|
75
|
-
declare const AutocompleteList: React_2.ComponentType<AutocompleteListProps & React_2.RefAttributes<AutocompleteList_2>>;
|
70
|
+
declare const AutocompleteList: ForwardRefExoticComponent<Partial<AutocompleteListProps> & RefAttributes<AutocompleteListElement> & HTMLAttributes<AutocompleteListElement>>;
|
76
71
|
export { AutocompleteList }
|
77
72
|
export { AutocompleteList as AutocompleteList_alias_1 }
|
78
73
|
|
79
|
-
declare
|
80
|
-
export { AutocompleteListProps }
|
81
|
-
export { AutocompleteListProps as AutocompleteListProps_alias_1 }
|
82
|
-
|
83
|
-
declare const AutocompletePopover: React_2.ComponentType<AutocompletePopoverProps & React_2.RefAttributes<AutocompletePopover_2>>;
|
74
|
+
declare const AutocompletePopover: ForwardRefExoticComponent<Partial<AutocompletePopoverProps> & RefAttributes<AutocompletePopoverElement> & HTMLAttributes<AutocompletePopoverElement>>;
|
84
75
|
export { AutocompletePopover }
|
85
76
|
export { AutocompletePopover as AutocompletePopover_alias_1 }
|
86
77
|
|
87
|
-
declare
|
88
|
-
export {
|
89
|
-
export {
|
90
|
-
|
91
|
-
export declare const BlockPopover: React_2.ComponentType<BlockPopoverProps & React_2.RefAttributes<BlockPopover_2>>;
|
92
|
-
|
93
|
-
export declare type BlockPopoverProps = React_2.PropsWithChildren<PropsWithClassName<BlockPopoverProps_2>>;
|
94
|
-
|
95
|
-
export declare const ComboBox: React_2.ComponentType<ComboBoxProps & React_2.RefAttributes<ComboBox_2>>;
|
96
|
-
|
97
|
-
export declare const ComboBoxInput: React_2.ComponentType<ComboBoxInputProps & React_2.RefAttributes<ComboBoxInput_2>>;
|
78
|
+
declare const BlockDragHandle: ForwardRefExoticComponent<Partial<BlockDragHandleProps> & RefAttributes<BlockDragHandleElement> & HTMLAttributes<BlockDragHandleElement>>;
|
79
|
+
export { BlockDragHandle }
|
80
|
+
export { BlockDragHandle as BlockDragHandle_alias_1 }
|
98
81
|
|
99
|
-
|
82
|
+
declare const BlockPopover: ForwardRefExoticComponent<Partial<BlockPopoverProps> & RefAttributes<BlockPopoverElement> & HTMLAttributes<BlockPopoverElement>>;
|
83
|
+
export { BlockPopover }
|
84
|
+
export { BlockPopover as BlockPopover_alias_1 }
|
100
85
|
|
101
|
-
export declare
|
102
|
-
|
103
|
-
export declare type ComboBoxItemProps = React_2.PropsWithChildren<PropsWithClassName<ComboBoxItemProps_2>>;
|
104
|
-
|
105
|
-
export declare const ComboBoxList: React_2.ComponentType<ComboBoxListProps & React_2.RefAttributes<ComboBoxList_2>>;
|
106
|
-
|
107
|
-
export declare type ComboBoxListProps = React_2.PropsWithChildren<PropsWithClassName<ComboBoxListProps_2>>;
|
108
|
-
|
109
|
-
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>>;
|
110
87
|
|
111
88
|
export declare const createNodeViewContext: Context<NodeViewFactory | null>;
|
112
89
|
|
@@ -136,26 +113,28 @@ export { defineReactNodeView as defineReactNodeView_alias_1 }
|
|
136
113
|
*/
|
137
114
|
export declare function defineReactNodeViewFactory(nodeViewFactory: NodeViewFactory): Extension<ExtensionTyping<string, string, CommandArgs>>;
|
138
115
|
|
139
|
-
export declare const DragHandle: React_2.ComponentType<DragHandleProps & React_2.RefAttributes<DragHandle_2>>;
|
140
|
-
|
141
|
-
export declare type DragHandleProps = React_2.PropsWithChildren<PropsWithClassName<DragHandleProps_2>>;
|
142
|
-
|
143
116
|
/**
|
144
117
|
* @internal
|
145
118
|
*/
|
146
119
|
export declare const EditorContextProvider: Provider<Editor<any> | null>;
|
147
120
|
|
148
|
-
|
149
|
-
|
150
|
-
export
|
121
|
+
declare const InlinePopover: ForwardRefExoticComponent<Partial<InlinePopoverProps> & RefAttributes<InlinePopoverElement> & HTMLAttributes<InlinePopoverElement>>;
|
122
|
+
export { InlinePopover }
|
123
|
+
export { InlinePopover as InlinePopover_alias_1 }
|
151
124
|
|
152
125
|
export declare type NodeViewFactory = (options: ReactNodeViewUserOptions) => NodeViewConstructor;
|
153
126
|
|
154
|
-
|
127
|
+
declare const PopoverContent: ForwardRefExoticComponent<Partial<PopoverContentProps> & RefAttributes<PopoverContentElement> & HTMLAttributes<PopoverContentElement>>;
|
128
|
+
export { PopoverContent }
|
129
|
+
export { PopoverContent as PopoverContent_alias_1 }
|
155
130
|
|
156
|
-
|
131
|
+
declare const PopoverRoot: ForwardRefExoticComponent<Partial<PopoverRootProps> & RefAttributes<PopoverRootElement> & HTMLAttributes<PopoverRootElement>>;
|
132
|
+
export { PopoverRoot }
|
133
|
+
export { PopoverRoot as PopoverRoot_alias_1 }
|
157
134
|
|
158
|
-
|
135
|
+
declare const PopoverTrigger: ForwardRefExoticComponent<Partial<PopoverTriggerProps> & RefAttributes<PopoverTriggerElement> & HTMLAttributes<PopoverTriggerElement>>;
|
136
|
+
export { PopoverTrigger }
|
137
|
+
export { PopoverTrigger as PopoverTrigger_alias_1 }
|
159
138
|
|
160
139
|
/**
|
161
140
|
* @internal
|
@@ -255,13 +234,25 @@ declare const ReactViewsProvider: FC<{
|
|
255
234
|
export { ReactViewsProvider }
|
256
235
|
export { ReactViewsProvider as ReactViewsProvider_alias_1 }
|
257
236
|
|
258
|
-
|
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 }
|
259
244
|
|
260
|
-
|
245
|
+
declare const TooltipContent: ForwardRefExoticComponent<Partial<TooltipContentProps> & RefAttributes<TooltipContentElement> & HTMLAttributes<TooltipContentElement>>;
|
246
|
+
export { TooltipContent }
|
247
|
+
export { TooltipContent as TooltipContent_alias_1 }
|
261
248
|
|
262
|
-
|
249
|
+
declare const TooltipRoot: ForwardRefExoticComponent<Partial<TooltipRootProps> & RefAttributes<TooltipRootElement> & HTMLAttributes<TooltipRootElement>>;
|
250
|
+
export { TooltipRoot }
|
251
|
+
export { TooltipRoot as TooltipRoot_alias_1 }
|
263
252
|
|
264
|
-
|
253
|
+
declare const TooltipTrigger: ForwardRefExoticComponent<Partial<TooltipTriggerProps> & RefAttributes<TooltipTriggerElement> & HTMLAttributes<TooltipTriggerElement>>;
|
254
|
+
export { TooltipTrigger }
|
255
|
+
export { TooltipTrigger as TooltipTrigger_alias_1 }
|
265
256
|
|
266
257
|
/**
|
267
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.0",
|
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",
|
@@ -95,21 +55,23 @@
|
|
95
55
|
"import": "./dist/prosekit-react-resizable.js",
|
96
56
|
"default": "./dist/prosekit-react-resizable.js"
|
97
57
|
},
|
98
|
-
"./
|
99
|
-
"types": "./dist/prosekit-react-
|
100
|
-
"import": "./dist/prosekit-react-
|
101
|
-
"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"
|
102
62
|
}
|
103
63
|
},
|
104
64
|
"files": [
|
105
65
|
"dist"
|
106
66
|
],
|
107
67
|
"dependencies": {
|
108
|
-
"@lit/react": "^1.0.
|
68
|
+
"@lit/react": "^1.0.4",
|
109
69
|
"@prosekit/core": "^0.4.0",
|
110
|
-
"@prosekit/lit": "^0.
|
111
|
-
"@prosekit/pm": "^0.1.
|
112
|
-
"@
|
70
|
+
"@prosekit/lit": "^0.3.0",
|
71
|
+
"@prosekit/pm": "^0.1.2",
|
72
|
+
"@prosekit/web": "^0.1.0",
|
73
|
+
"@prosemirror-adapter/core": "^0.2.6",
|
74
|
+
"react-merge-refs": "^2.1.1"
|
113
75
|
},
|
114
76
|
"peerDependencies": {
|
115
77
|
"react": ">= 17.0.0",
|
@@ -125,13 +87,13 @@
|
|
125
87
|
},
|
126
88
|
"devDependencies": {
|
127
89
|
"@prosekit/dev": "*",
|
128
|
-
"@types/react": "^18.2.
|
129
|
-
"@types/react-dom": "^18.2.
|
90
|
+
"@types/react": "^18.2.79",
|
91
|
+
"@types/react-dom": "^18.2.25",
|
130
92
|
"react": "^18.2.0",
|
131
93
|
"react-dom": "^18.2.0",
|
132
94
|
"tsup": "^8.0.2",
|
133
|
-
"typescript": "^5.
|
134
|
-
"vitest": "^1.
|
95
|
+
"typescript": "^5.4.5",
|
96
|
+
"vitest": "^1.5.0"
|
135
97
|
},
|
136
98
|
"scripts": {
|
137
99
|
"build:tsup": "tsup",
|
@@ -143,35 +105,11 @@
|
|
143
105
|
".": [
|
144
106
|
"./dist/prosekit-react.d.ts"
|
145
107
|
],
|
146
|
-
"autocomplete
|
147
|
-
"./dist/prosekit-react-autocomplete
|
148
|
-
],
|
149
|
-
"autocomplete-item": [
|
150
|
-
"./dist/prosekit-react-autocomplete-item.d.ts"
|
151
|
-
],
|
152
|
-
"autocomplete-list": [
|
153
|
-
"./dist/prosekit-react-autocomplete-list.d.ts"
|
154
|
-
],
|
155
|
-
"autocomplete-popover": [
|
156
|
-
"./dist/prosekit-react-autocomplete-popover.d.ts"
|
157
|
-
],
|
158
|
-
"block-popover": [
|
159
|
-
"./dist/prosekit-react-block-popover.d.ts"
|
160
|
-
],
|
161
|
-
"combo-box": [
|
162
|
-
"./dist/prosekit-react-combo-box.d.ts"
|
163
|
-
],
|
164
|
-
"combo-box-input": [
|
165
|
-
"./dist/prosekit-react-combo-box-input.d.ts"
|
166
|
-
],
|
167
|
-
"combo-box-item": [
|
168
|
-
"./dist/prosekit-react-combo-box-item.d.ts"
|
169
|
-
],
|
170
|
-
"combo-box-list": [
|
171
|
-
"./dist/prosekit-react-combo-box-list.d.ts"
|
108
|
+
"autocomplete": [
|
109
|
+
"./dist/prosekit-react-autocomplete.d.ts"
|
172
110
|
],
|
173
|
-
"
|
174
|
-
"./dist/prosekit-react-
|
111
|
+
"block-handle": [
|
112
|
+
"./dist/prosekit-react-block-handle.d.ts"
|
175
113
|
],
|
176
114
|
"inline-popover": [
|
177
115
|
"./dist/prosekit-react-inline-popover.d.ts"
|
@@ -182,8 +120,8 @@
|
|
182
120
|
"resizable": [
|
183
121
|
"./dist/prosekit-react-resizable.d.ts"
|
184
122
|
],
|
185
|
-
"
|
186
|
-
"./dist/prosekit-react-
|
123
|
+
"tooltip": [
|
124
|
+
"./dist/prosekit-react-tooltip.d.ts"
|
187
125
|
]
|
188
126
|
}
|
189
127
|
}
|
@@ -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/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
|
-
};
|