@prosekit/react 0.3.30 → 0.4.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 +264 -57
- package/dist/chunk-OFZQYJNI.js +110 -0
- package/dist/prosekit-react-autocomplete.d.ts +4 -0
- package/dist/prosekit-react-autocomplete.js +17 -9
- package/dist/prosekit-react-block-handle.d.ts +3 -2
- package/dist/prosekit-react-block-handle.js +14 -30
- package/dist/prosekit-react-inline-popover.d.ts +1 -0
- package/dist/prosekit-react-inline-popover.js +5 -3
- package/dist/prosekit-react-popover.d.ts +3 -0
- package/dist/prosekit-react-popover.js +13 -7
- package/dist/prosekit-react-resizable.d.ts +2 -0
- package/dist/prosekit-react-resizable.js +9 -5
- package/dist/prosekit-react-table-handle.d.ts +7 -0
- package/dist/prosekit-react-table-handle.js +29 -15
- package/dist/prosekit-react-tooltip.d.ts +3 -0
- package/dist/prosekit-react-tooltip.js +13 -7
- package/package.json +3 -3
- package/dist/chunk-UG3RPLME.js +0 -51
@@ -1,23 +1,26 @@
|
|
1
1
|
import type { Attrs } from '@prosekit/pm/model';
|
2
2
|
import { AutocompleteEmptyElement } from '@prosekit/web/autocomplete';
|
3
|
-
import {
|
3
|
+
import { AutocompleteEmptyEvents } from '@prosekit/web/autocomplete';
|
4
|
+
import { AutocompleteEmptyProps as AutocompleteEmptyProps_2 } from '@prosekit/web/autocomplete';
|
4
5
|
import { AutocompleteItemElement } from '@prosekit/web/autocomplete';
|
5
|
-
import {
|
6
|
+
import { AutocompleteItemEvents } from '@prosekit/web/autocomplete';
|
7
|
+
import { AutocompleteItemProps as AutocompleteItemProps_2 } from '@prosekit/web/autocomplete';
|
6
8
|
import { AutocompleteListElement } from '@prosekit/web/autocomplete';
|
7
|
-
import {
|
9
|
+
import { AutocompleteListEvents } from '@prosekit/web/autocomplete';
|
10
|
+
import { AutocompleteListProps as AutocompleteListProps_2 } from '@prosekit/web/autocomplete';
|
8
11
|
import { AutocompletePopoverElement } from '@prosekit/web/autocomplete';
|
9
|
-
import {
|
12
|
+
import { AutocompletePopoverEvents } from '@prosekit/web/autocomplete';
|
13
|
+
import { AutocompletePopoverProps as AutocompletePopoverProps_2 } from '@prosekit/web/autocomplete';
|
10
14
|
import { BaseNodeViewOptions } from '@prosekit/core';
|
11
|
-
import { BlockDragHandleElement } from '@prosekit/web/block-handle';
|
12
|
-
import { BlockDragHandleProps } from '@prosekit/web/block-handle';
|
13
15
|
import { BlockHandleAddElement } from '@prosekit/web/block-handle';
|
14
|
-
import {
|
16
|
+
import { BlockHandleAddEvents } from '@prosekit/web/block-handle';
|
17
|
+
import { BlockHandleAddProps as BlockHandleAddProps_2 } from '@prosekit/web/block-handle';
|
15
18
|
import { BlockHandleDraggableElement } from '@prosekit/web/block-handle';
|
16
|
-
import {
|
19
|
+
import { BlockHandleDraggableEvents } from '@prosekit/web/block-handle';
|
20
|
+
import { BlockHandleDraggableProps as BlockHandleDraggableProps_2 } from '@prosekit/web/block-handle';
|
17
21
|
import { BlockHandlePopoverElement } from '@prosekit/web/block-handle';
|
18
|
-
import {
|
19
|
-
import {
|
20
|
-
import { BlockPopoverProps } from '@prosekit/web/block-handle';
|
22
|
+
import { BlockHandlePopoverEvents } from '@prosekit/web/block-handle';
|
23
|
+
import { BlockHandlePopoverProps as BlockHandlePopoverProps_2 } from '@prosekit/web/block-handle';
|
21
24
|
import { ComponentType } from 'react';
|
22
25
|
import type { Decoration } from '@prosekit/pm/view';
|
23
26
|
import type { DecorationSource } from '@prosekit/pm/view';
|
@@ -30,82 +33,158 @@ import { FC } from 'react';
|
|
30
33
|
import { ForwardRefExoticComponent } from 'react';
|
31
34
|
import { HTMLAttributes } from 'react';
|
32
35
|
import { InlinePopoverElement } from '@prosekit/web/inline-popover';
|
33
|
-
import {
|
36
|
+
import { InlinePopoverEvents } from '@prosekit/web/inline-popover';
|
37
|
+
import { InlinePopoverProps as InlinePopoverProps_2 } from '@prosekit/web/inline-popover';
|
34
38
|
import { Keymap } from '@prosekit/core';
|
35
39
|
import { Options } from 'tsup';
|
36
40
|
import { PopoverContentElement } from '@prosekit/web/popover';
|
37
|
-
import {
|
41
|
+
import { PopoverContentEvents } from '@prosekit/web/popover';
|
42
|
+
import { PopoverContentProps as PopoverContentProps_2 } from '@prosekit/web/popover';
|
38
43
|
import { PopoverRootElement } from '@prosekit/web/popover';
|
39
|
-
import {
|
44
|
+
import { PopoverRootEvents } from '@prosekit/web/popover';
|
45
|
+
import { PopoverRootProps as PopoverRootProps_2 } from '@prosekit/web/popover';
|
40
46
|
import { PopoverTriggerElement } from '@prosekit/web/popover';
|
41
|
-
import {
|
47
|
+
import { PopoverTriggerEvents } from '@prosekit/web/popover';
|
48
|
+
import { PopoverTriggerProps as PopoverTriggerProps_2 } from '@prosekit/web/popover';
|
42
49
|
import { Priority } from '@prosekit/core';
|
43
50
|
import type { ProseMirrorNode } from '@prosekit/pm/model';
|
44
51
|
import { Provider } from 'react';
|
45
52
|
import { ReactNode } from 'react';
|
46
53
|
import { RefAttributes } from 'react';
|
47
54
|
import { ResizableHandleElement } from '@prosekit/web/resizable';
|
48
|
-
import {
|
55
|
+
import { ResizableHandleEvents } from '@prosekit/web/resizable';
|
56
|
+
import { ResizableHandleProps as ResizableHandleProps_2 } from '@prosekit/web/resizable';
|
49
57
|
import { ResizableRootElement } from '@prosekit/web/resizable';
|
50
|
-
import {
|
58
|
+
import { ResizableRootEvents } from '@prosekit/web/resizable';
|
59
|
+
import { ResizableRootProps as ResizableRootProps_2 } from '@prosekit/web/resizable';
|
51
60
|
import { TableHandleColumnRootElement } from '@prosekit/web/table-handle';
|
52
|
-
import {
|
61
|
+
import { TableHandleColumnRootEvents } from '@prosekit/web/table-handle';
|
62
|
+
import { TableHandleColumnRootProps as TableHandleColumnRootProps_2 } from '@prosekit/web/table-handle';
|
53
63
|
import { TableHandleColumnTriggerElement } from '@prosekit/web/table-handle';
|
54
|
-
import {
|
64
|
+
import { TableHandleColumnTriggerEvents } from '@prosekit/web/table-handle';
|
65
|
+
import { TableHandleColumnTriggerProps as TableHandleColumnTriggerProps_2 } from '@prosekit/web/table-handle';
|
55
66
|
import { TableHandlePopoverContentElement } from '@prosekit/web/table-handle';
|
56
|
-
import {
|
67
|
+
import { TableHandlePopoverContentEvents } from '@prosekit/web/table-handle';
|
68
|
+
import { TableHandlePopoverContentProps as TableHandlePopoverContentProps_2 } from '@prosekit/web/table-handle';
|
57
69
|
import { TableHandlePopoverItemElement } from '@prosekit/web/table-handle';
|
58
|
-
import {
|
70
|
+
import { TableHandlePopoverItemEvents } from '@prosekit/web/table-handle';
|
71
|
+
import { TableHandlePopoverItemProps as TableHandlePopoverItemProps_2 } from '@prosekit/web/table-handle';
|
59
72
|
import { TableHandleRootElement } from '@prosekit/web/table-handle';
|
60
|
-
import {
|
73
|
+
import { TableHandleRootEvents } from '@prosekit/web/table-handle';
|
74
|
+
import { TableHandleRootProps as TableHandleRootProps_2 } from '@prosekit/web/table-handle';
|
61
75
|
import { TableHandleRowRootElement } from '@prosekit/web/table-handle';
|
62
|
-
import {
|
76
|
+
import { TableHandleRowRootEvents } from '@prosekit/web/table-handle';
|
77
|
+
import { TableHandleRowRootProps as TableHandleRowRootProps_2 } from '@prosekit/web/table-handle';
|
63
78
|
import { TableHandleRowTriggerElement } from '@prosekit/web/table-handle';
|
64
|
-
import {
|
79
|
+
import { TableHandleRowTriggerEvents } from '@prosekit/web/table-handle';
|
80
|
+
import { TableHandleRowTriggerProps as TableHandleRowTriggerProps_2 } from '@prosekit/web/table-handle';
|
65
81
|
import { TooltipContentElement } from '@prosekit/web/tooltip';
|
66
|
-
import {
|
82
|
+
import { TooltipContentEvents } from '@prosekit/web/tooltip';
|
83
|
+
import { TooltipContentProps as TooltipContentProps_2 } from '@prosekit/web/tooltip';
|
67
84
|
import { TooltipRootElement } from '@prosekit/web/tooltip';
|
68
|
-
import {
|
85
|
+
import { TooltipRootEvents } from '@prosekit/web/tooltip';
|
86
|
+
import { TooltipRootProps as TooltipRootProps_2 } from '@prosekit/web/tooltip';
|
69
87
|
import { TooltipTriggerElement } from '@prosekit/web/tooltip';
|
70
|
-
import {
|
88
|
+
import { TooltipTriggerEvents } from '@prosekit/web/tooltip';
|
89
|
+
import { TooltipTriggerProps as TooltipTriggerProps_2 } from '@prosekit/web/tooltip';
|
71
90
|
|
72
|
-
declare const AutocompleteEmpty: ForwardRefExoticComponent<
|
91
|
+
declare const AutocompleteEmpty: ForwardRefExoticComponent<AutocompleteEmptyProps & RefAttributes<AutocompleteEmptyElement> & HTMLAttributes<AutocompleteEmptyElement>>;
|
73
92
|
export { AutocompleteEmpty }
|
74
93
|
export { AutocompleteEmpty as AutocompleteEmpty_alias_1 }
|
75
94
|
|
76
|
-
|
95
|
+
/**
|
96
|
+
* Props for the {@link AutocompleteEmpty} component.
|
97
|
+
*/
|
98
|
+
declare interface AutocompleteEmptyProps extends Partial<CreateProps<AutocompleteEmptyProps_2, AutocompleteEmptyEvents>> {
|
99
|
+
}
|
100
|
+
export { AutocompleteEmptyProps }
|
101
|
+
export { AutocompleteEmptyProps as AutocompleteEmptyProps_alias_1 }
|
102
|
+
|
103
|
+
declare const AutocompleteItem: ForwardRefExoticComponent<AutocompleteItemProps & RefAttributes<AutocompleteItemElement> & HTMLAttributes<AutocompleteItemElement>>;
|
77
104
|
export { AutocompleteItem }
|
78
105
|
export { AutocompleteItem as AutocompleteItem_alias_1 }
|
79
106
|
|
80
|
-
|
107
|
+
/**
|
108
|
+
* Props for the {@link AutocompleteItem} component.
|
109
|
+
*/
|
110
|
+
declare interface AutocompleteItemProps extends Partial<CreateProps<AutocompleteItemProps_2, AutocompleteItemEvents>> {
|
111
|
+
}
|
112
|
+
export { AutocompleteItemProps }
|
113
|
+
export { AutocompleteItemProps as AutocompleteItemProps_alias_1 }
|
114
|
+
|
115
|
+
declare const AutocompleteList: ForwardRefExoticComponent<AutocompleteListProps & RefAttributes<AutocompleteListElement> & HTMLAttributes<AutocompleteListElement>>;
|
81
116
|
export { AutocompleteList }
|
82
117
|
export { AutocompleteList as AutocompleteList_alias_1 }
|
83
118
|
|
84
|
-
|
119
|
+
/**
|
120
|
+
* Props for the {@link AutocompleteList} component.
|
121
|
+
*/
|
122
|
+
declare interface AutocompleteListProps extends Partial<CreateProps<AutocompleteListProps_2, AutocompleteListEvents>> {
|
123
|
+
}
|
124
|
+
export { AutocompleteListProps }
|
125
|
+
export { AutocompleteListProps as AutocompleteListProps_alias_1 }
|
126
|
+
|
127
|
+
declare const AutocompletePopover: ForwardRefExoticComponent<AutocompletePopoverProps & RefAttributes<AutocompletePopoverElement> & HTMLAttributes<AutocompletePopoverElement>>;
|
85
128
|
export { AutocompletePopover }
|
86
129
|
export { AutocompletePopover as AutocompletePopover_alias_1 }
|
87
130
|
|
88
|
-
|
89
|
-
|
90
|
-
|
131
|
+
/**
|
132
|
+
* Props for the {@link AutocompletePopover} component.
|
133
|
+
*/
|
134
|
+
declare interface AutocompletePopoverProps extends Partial<CreateProps<AutocompletePopoverProps_2, AutocompletePopoverEvents>> {
|
135
|
+
}
|
136
|
+
export { AutocompletePopoverProps }
|
137
|
+
export { AutocompletePopoverProps as AutocompletePopoverProps_alias_1 }
|
91
138
|
|
92
|
-
declare const BlockHandleAdd: ForwardRefExoticComponent<
|
139
|
+
declare const BlockHandleAdd: ForwardRefExoticComponent<BlockHandleAddProps & RefAttributes<BlockHandleAddElement> & HTMLAttributes<BlockHandleAddElement>>;
|
93
140
|
export { BlockHandleAdd }
|
94
141
|
export { BlockHandleAdd as BlockHandleAdd_alias_1 }
|
95
142
|
|
96
|
-
|
143
|
+
/**
|
144
|
+
* Props for the {@link BlockHandleAdd} component.
|
145
|
+
*/
|
146
|
+
declare interface BlockHandleAddProps extends Partial<CreateProps<BlockHandleAddProps_2, BlockHandleAddEvents>> {
|
147
|
+
}
|
148
|
+
export { BlockHandleAddProps }
|
149
|
+
export { BlockHandleAddProps as BlockHandleAddProps_alias_1 }
|
150
|
+
|
151
|
+
declare const BlockHandleDraggable: ForwardRefExoticComponent<BlockHandleDraggableProps & RefAttributes<BlockHandleDraggableElement> & HTMLAttributes<BlockHandleDraggableElement>>;
|
97
152
|
export { BlockHandleDraggable }
|
98
153
|
export { BlockHandleDraggable as BlockHandleDraggable_alias_1 }
|
99
154
|
|
100
|
-
|
155
|
+
/**
|
156
|
+
* Props for the {@link BlockHandleDraggable} component.
|
157
|
+
*/
|
158
|
+
declare interface BlockHandleDraggableProps extends Partial<CreateProps<BlockHandleDraggableProps_2, BlockHandleDraggableEvents>> {
|
159
|
+
}
|
160
|
+
export { BlockHandleDraggableProps }
|
161
|
+
export { BlockHandleDraggableProps as BlockHandleDraggableProps_alias_1 }
|
162
|
+
|
163
|
+
declare const BlockHandlePopover: ForwardRefExoticComponent<BlockHandlePopoverProps & RefAttributes<BlockHandlePopoverElement> & HTMLAttributes<BlockHandlePopoverElement>>;
|
101
164
|
export { BlockHandlePopover }
|
102
165
|
export { BlockHandlePopover as BlockHandlePopover_alias_1 }
|
103
166
|
|
104
|
-
|
105
|
-
|
106
|
-
|
167
|
+
/**
|
168
|
+
* Props for the {@link BlockHandlePopover} component.
|
169
|
+
*/
|
170
|
+
declare interface BlockHandlePopoverProps extends Partial<CreateProps<BlockHandlePopoverProps_2, BlockHandlePopoverEvents>> {
|
171
|
+
}
|
172
|
+
export { BlockHandlePopoverProps }
|
173
|
+
export { BlockHandlePopoverProps as BlockHandlePopoverProps_alias_1 }
|
174
|
+
|
175
|
+
export declare function createComponent<Props extends object, CustomElement extends HTMLElement>(tagName: string, displayName: string, propNames: string[], eventNames: string[]): ForwardRefExoticComponent<Partial<Props> & RefAttributes<CustomElement> & HTMLAttributes<CustomElement>>;
|
107
176
|
|
108
|
-
|
177
|
+
declare type CreateEventProps<Events extends {
|
178
|
+
[EventName in keyof Events]: CustomEvent;
|
179
|
+
}> = {
|
180
|
+
[EventName in keyof Events as `on${Capitalize<string & EventName>}`]: (event: EventName extends `${string}Change` ? Events[EventName]['detail'] : Events[EventName]) => void;
|
181
|
+
};
|
182
|
+
|
183
|
+
export declare type CreateProps<Props extends {
|
184
|
+
[PropName in keyof Props]: unknown;
|
185
|
+
}, Events extends {
|
186
|
+
[EventName in keyof Events]: CustomEvent;
|
187
|
+
}> = Props & CreateEventProps<Events>;
|
109
188
|
|
110
189
|
export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
111
190
|
|
@@ -125,22 +204,54 @@ export { defineReactNodeView as defineReactNodeView_alias_1 }
|
|
125
204
|
*/
|
126
205
|
export declare const EditorContextProvider: Provider<Editor<any> | null>;
|
127
206
|
|
128
|
-
declare const InlinePopover: ForwardRefExoticComponent<
|
207
|
+
declare const InlinePopover: ForwardRefExoticComponent<InlinePopoverProps & RefAttributes<InlinePopoverElement> & HTMLAttributes<InlinePopoverElement>>;
|
129
208
|
export { InlinePopover }
|
130
209
|
export { InlinePopover as InlinePopover_alias_1 }
|
131
210
|
|
132
|
-
|
211
|
+
/**
|
212
|
+
* Props for the {@link InlinePopover} component.
|
213
|
+
*/
|
214
|
+
declare interface InlinePopoverProps extends Partial<CreateProps<InlinePopoverProps_2, InlinePopoverEvents>> {
|
215
|
+
}
|
216
|
+
export { InlinePopoverProps }
|
217
|
+
export { InlinePopoverProps as InlinePopoverProps_alias_1 }
|
218
|
+
|
219
|
+
declare const PopoverContent: ForwardRefExoticComponent<PopoverContentProps & RefAttributes<PopoverContentElement> & HTMLAttributes<PopoverContentElement>>;
|
133
220
|
export { PopoverContent }
|
134
221
|
export { PopoverContent as PopoverContent_alias_1 }
|
135
222
|
|
136
|
-
|
223
|
+
/**
|
224
|
+
* Props for the {@link PopoverContent} component.
|
225
|
+
*/
|
226
|
+
declare interface PopoverContentProps extends Partial<CreateProps<PopoverContentProps_2, PopoverContentEvents>> {
|
227
|
+
}
|
228
|
+
export { PopoverContentProps }
|
229
|
+
export { PopoverContentProps as PopoverContentProps_alias_1 }
|
230
|
+
|
231
|
+
declare const PopoverRoot: ForwardRefExoticComponent<PopoverRootProps & RefAttributes<PopoverRootElement> & HTMLAttributes<PopoverRootElement>>;
|
137
232
|
export { PopoverRoot }
|
138
233
|
export { PopoverRoot as PopoverRoot_alias_1 }
|
139
234
|
|
140
|
-
|
235
|
+
/**
|
236
|
+
* Props for the {@link PopoverRoot} component.
|
237
|
+
*/
|
238
|
+
declare interface PopoverRootProps extends Partial<CreateProps<PopoverRootProps_2, PopoverRootEvents>> {
|
239
|
+
}
|
240
|
+
export { PopoverRootProps }
|
241
|
+
export { PopoverRootProps as PopoverRootProps_alias_1 }
|
242
|
+
|
243
|
+
declare const PopoverTrigger: ForwardRefExoticComponent<PopoverTriggerProps & RefAttributes<PopoverTriggerElement> & HTMLAttributes<PopoverTriggerElement>>;
|
141
244
|
export { PopoverTrigger }
|
142
245
|
export { PopoverTrigger as PopoverTrigger_alias_1 }
|
143
246
|
|
247
|
+
/**
|
248
|
+
* Props for the {@link PopoverTrigger} component.
|
249
|
+
*/
|
250
|
+
declare interface PopoverTriggerProps extends Partial<CreateProps<PopoverTriggerProps_2, PopoverTriggerEvents>> {
|
251
|
+
}
|
252
|
+
export { PopoverTriggerProps }
|
253
|
+
export { PopoverTriggerProps as PopoverTriggerProps_alias_1 }
|
254
|
+
|
144
255
|
/**
|
145
256
|
* @internal
|
146
257
|
*/
|
@@ -212,54 +323,150 @@ export { ReactNodeViewProps as ReactNodeViewProps_alias_1 }
|
|
212
323
|
*/
|
213
324
|
export declare const ReactViewsConsumer: FC;
|
214
325
|
|
215
|
-
declare const ResizableHandle: ForwardRefExoticComponent<
|
326
|
+
declare const ResizableHandle: ForwardRefExoticComponent<ResizableHandleProps & RefAttributes<ResizableHandleElement> & HTMLAttributes<ResizableHandleElement>>;
|
216
327
|
export { ResizableHandle }
|
217
328
|
export { ResizableHandle as ResizableHandle_alias_1 }
|
218
329
|
|
219
|
-
|
330
|
+
/**
|
331
|
+
* Props for the {@link ResizableHandle} component.
|
332
|
+
*/
|
333
|
+
declare interface ResizableHandleProps extends Partial<CreateProps<ResizableHandleProps_2, ResizableHandleEvents>> {
|
334
|
+
}
|
335
|
+
export { ResizableHandleProps }
|
336
|
+
export { ResizableHandleProps as ResizableHandleProps_alias_1 }
|
337
|
+
|
338
|
+
declare const ResizableRoot: ForwardRefExoticComponent<ResizableRootProps & RefAttributes<ResizableRootElement> & HTMLAttributes<ResizableRootElement>>;
|
220
339
|
export { ResizableRoot }
|
221
340
|
export { ResizableRoot as ResizableRoot_alias_1 }
|
222
341
|
|
223
|
-
|
342
|
+
/**
|
343
|
+
* Props for the {@link ResizableRoot} component.
|
344
|
+
*/
|
345
|
+
declare interface ResizableRootProps extends Partial<CreateProps<ResizableRootProps_2, ResizableRootEvents>> {
|
346
|
+
}
|
347
|
+
export { ResizableRootProps }
|
348
|
+
export { ResizableRootProps as ResizableRootProps_alias_1 }
|
349
|
+
|
350
|
+
declare const TableHandleColumnRoot: ForwardRefExoticComponent<TableHandleColumnRootProps & RefAttributes<TableHandleColumnRootElement> & HTMLAttributes<TableHandleColumnRootElement>>;
|
224
351
|
export { TableHandleColumnRoot }
|
225
352
|
export { TableHandleColumnRoot as TableHandleColumnRoot_alias_1 }
|
226
353
|
|
227
|
-
|
354
|
+
/**
|
355
|
+
* Props for the {@link TableHandleColumnRoot} component.
|
356
|
+
*/
|
357
|
+
declare interface TableHandleColumnRootProps extends Partial<CreateProps<TableHandleColumnRootProps_2, TableHandleColumnRootEvents>> {
|
358
|
+
}
|
359
|
+
export { TableHandleColumnRootProps }
|
360
|
+
export { TableHandleColumnRootProps as TableHandleColumnRootProps_alias_1 }
|
361
|
+
|
362
|
+
declare const TableHandleColumnTrigger: ForwardRefExoticComponent<TableHandleColumnTriggerProps & RefAttributes<TableHandleColumnTriggerElement> & HTMLAttributes<TableHandleColumnTriggerElement>>;
|
228
363
|
export { TableHandleColumnTrigger }
|
229
364
|
export { TableHandleColumnTrigger as TableHandleColumnTrigger_alias_1 }
|
230
365
|
|
231
|
-
|
366
|
+
/**
|
367
|
+
* Props for the {@link TableHandleColumnTrigger} component.
|
368
|
+
*/
|
369
|
+
declare interface TableHandleColumnTriggerProps extends Partial<CreateProps<TableHandleColumnTriggerProps_2, TableHandleColumnTriggerEvents>> {
|
370
|
+
}
|
371
|
+
export { TableHandleColumnTriggerProps }
|
372
|
+
export { TableHandleColumnTriggerProps as TableHandleColumnTriggerProps_alias_1 }
|
373
|
+
|
374
|
+
declare const TableHandlePopoverContent: ForwardRefExoticComponent<TableHandlePopoverContentProps & RefAttributes<TableHandlePopoverContentElement> & HTMLAttributes<TableHandlePopoverContentElement>>;
|
232
375
|
export { TableHandlePopoverContent }
|
233
376
|
export { TableHandlePopoverContent as TableHandlePopoverContent_alias_1 }
|
234
377
|
|
235
|
-
|
378
|
+
/**
|
379
|
+
* Props for the {@link TableHandlePopoverContent} component.
|
380
|
+
*/
|
381
|
+
declare interface TableHandlePopoverContentProps extends Partial<CreateProps<TableHandlePopoverContentProps_2, TableHandlePopoverContentEvents>> {
|
382
|
+
}
|
383
|
+
export { TableHandlePopoverContentProps }
|
384
|
+
export { TableHandlePopoverContentProps as TableHandlePopoverContentProps_alias_1 }
|
385
|
+
|
386
|
+
declare const TableHandlePopoverItem: ForwardRefExoticComponent<TableHandlePopoverItemProps & RefAttributes<TableHandlePopoverItemElement> & HTMLAttributes<TableHandlePopoverItemElement>>;
|
236
387
|
export { TableHandlePopoverItem }
|
237
388
|
export { TableHandlePopoverItem as TableHandlePopoverItem_alias_1 }
|
238
389
|
|
239
|
-
|
390
|
+
/**
|
391
|
+
* Props for the {@link TableHandlePopoverItem} component.
|
392
|
+
*/
|
393
|
+
declare interface TableHandlePopoverItemProps extends Partial<CreateProps<TableHandlePopoverItemProps_2, TableHandlePopoverItemEvents>> {
|
394
|
+
}
|
395
|
+
export { TableHandlePopoverItemProps }
|
396
|
+
export { TableHandlePopoverItemProps as TableHandlePopoverItemProps_alias_1 }
|
397
|
+
|
398
|
+
declare const TableHandleRoot: ForwardRefExoticComponent<TableHandleRootProps & RefAttributes<TableHandleRootElement> & HTMLAttributes<TableHandleRootElement>>;
|
240
399
|
export { TableHandleRoot }
|
241
400
|
export { TableHandleRoot as TableHandleRoot_alias_1 }
|
242
401
|
|
243
|
-
|
402
|
+
/**
|
403
|
+
* Props for the {@link TableHandleRoot} component.
|
404
|
+
*/
|
405
|
+
declare interface TableHandleRootProps extends Partial<CreateProps<TableHandleRootProps_2, TableHandleRootEvents>> {
|
406
|
+
}
|
407
|
+
export { TableHandleRootProps }
|
408
|
+
export { TableHandleRootProps as TableHandleRootProps_alias_1 }
|
409
|
+
|
410
|
+
declare const TableHandleRowRoot: ForwardRefExoticComponent<TableHandleRowRootProps & RefAttributes<TableHandleRowRootElement> & HTMLAttributes<TableHandleRowRootElement>>;
|
244
411
|
export { TableHandleRowRoot }
|
245
412
|
export { TableHandleRowRoot as TableHandleRowRoot_alias_1 }
|
246
413
|
|
247
|
-
|
414
|
+
/**
|
415
|
+
* Props for the {@link TableHandleRowRoot} component.
|
416
|
+
*/
|
417
|
+
declare interface TableHandleRowRootProps extends Partial<CreateProps<TableHandleRowRootProps_2, TableHandleRowRootEvents>> {
|
418
|
+
}
|
419
|
+
export { TableHandleRowRootProps }
|
420
|
+
export { TableHandleRowRootProps as TableHandleRowRootProps_alias_1 }
|
421
|
+
|
422
|
+
declare const TableHandleRowTrigger: ForwardRefExoticComponent<TableHandleRowTriggerProps & RefAttributes<TableHandleRowTriggerElement> & HTMLAttributes<TableHandleRowTriggerElement>>;
|
248
423
|
export { TableHandleRowTrigger }
|
249
424
|
export { TableHandleRowTrigger as TableHandleRowTrigger_alias_1 }
|
250
425
|
|
251
|
-
|
426
|
+
/**
|
427
|
+
* Props for the {@link TableHandleRowTrigger} component.
|
428
|
+
*/
|
429
|
+
declare interface TableHandleRowTriggerProps extends Partial<CreateProps<TableHandleRowTriggerProps_2, TableHandleRowTriggerEvents>> {
|
430
|
+
}
|
431
|
+
export { TableHandleRowTriggerProps }
|
432
|
+
export { TableHandleRowTriggerProps as TableHandleRowTriggerProps_alias_1 }
|
433
|
+
|
434
|
+
declare const TooltipContent: ForwardRefExoticComponent<TooltipContentProps & RefAttributes<TooltipContentElement> & HTMLAttributes<TooltipContentElement>>;
|
252
435
|
export { TooltipContent }
|
253
436
|
export { TooltipContent as TooltipContent_alias_1 }
|
254
437
|
|
255
|
-
|
438
|
+
/**
|
439
|
+
* Props for the {@link TooltipContent} component.
|
440
|
+
*/
|
441
|
+
declare interface TooltipContentProps extends Partial<CreateProps<TooltipContentProps_2, TooltipContentEvents>> {
|
442
|
+
}
|
443
|
+
export { TooltipContentProps }
|
444
|
+
export { TooltipContentProps as TooltipContentProps_alias_1 }
|
445
|
+
|
446
|
+
declare const TooltipRoot: ForwardRefExoticComponent<TooltipRootProps & RefAttributes<TooltipRootElement> & HTMLAttributes<TooltipRootElement>>;
|
256
447
|
export { TooltipRoot }
|
257
448
|
export { TooltipRoot as TooltipRoot_alias_1 }
|
258
449
|
|
259
|
-
|
450
|
+
/**
|
451
|
+
* Props for the {@link TooltipRoot} component.
|
452
|
+
*/
|
453
|
+
declare interface TooltipRootProps extends Partial<CreateProps<TooltipRootProps_2, TooltipRootEvents>> {
|
454
|
+
}
|
455
|
+
export { TooltipRootProps }
|
456
|
+
export { TooltipRootProps as TooltipRootProps_alias_1 }
|
457
|
+
|
458
|
+
declare const TooltipTrigger: ForwardRefExoticComponent<TooltipTriggerProps & RefAttributes<TooltipTriggerElement> & HTMLAttributes<TooltipTriggerElement>>;
|
260
459
|
export { TooltipTrigger }
|
261
460
|
export { TooltipTrigger as TooltipTrigger_alias_1 }
|
262
461
|
|
462
|
+
/**
|
463
|
+
* Props for the {@link TooltipTrigger} component.
|
464
|
+
*/
|
465
|
+
declare interface TooltipTriggerProps extends Partial<CreateProps<TooltipTriggerProps_2, TooltipTriggerEvents>> {
|
466
|
+
}
|
467
|
+
export { TooltipTriggerProps }
|
468
|
+
export { TooltipTriggerProps as TooltipTriggerProps_alias_1 }
|
469
|
+
|
263
470
|
/**
|
264
471
|
* Calls the given handler whenever the editor document changes.
|
265
472
|
*
|
@@ -0,0 +1,110 @@
|
|
1
|
+
import {
|
2
|
+
useEditorContext
|
3
|
+
} from "./chunk-BH56NR2Q.js";
|
4
|
+
|
5
|
+
// src/components/create-component.ts
|
6
|
+
import {
|
7
|
+
createElement,
|
8
|
+
forwardRef,
|
9
|
+
useEffect,
|
10
|
+
useLayoutEffect,
|
11
|
+
useRef,
|
12
|
+
useState
|
13
|
+
} from "react";
|
14
|
+
import { mergeRefs } from "react-merge-refs";
|
15
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
16
|
+
function createComponent(tagName, displayName, propNames, eventNames) {
|
17
|
+
const hasEditor = propNames.includes("editor");
|
18
|
+
const lowerCaseEventNameMap = Object.fromEntries(
|
19
|
+
eventNames.map((name) => [name.toLowerCase(), name])
|
20
|
+
);
|
21
|
+
const Component = forwardRef((props, ref) => {
|
22
|
+
const [el, setEl] = useState(null);
|
23
|
+
const properties = {};
|
24
|
+
const attributes = {};
|
25
|
+
const eventHandlersRef = useRef(
|
26
|
+
Object.fromEntries(eventNames.map((eventName) => [eventName, []]))
|
27
|
+
);
|
28
|
+
const eventHandlers = {};
|
29
|
+
for (const [name, value] of Object.entries(props)) {
|
30
|
+
if (value === void 0) {
|
31
|
+
continue;
|
32
|
+
}
|
33
|
+
if (propNames.includes(name)) {
|
34
|
+
properties[name] = value;
|
35
|
+
continue;
|
36
|
+
}
|
37
|
+
if (name.startsWith("on")) {
|
38
|
+
const lowerCaseEventName = name.slice(2).toLowerCase();
|
39
|
+
const eventName = lowerCaseEventNameMap[lowerCaseEventName];
|
40
|
+
const handler = value;
|
41
|
+
if (eventName && handler) {
|
42
|
+
const extractDetail = eventName.endsWith("Change");
|
43
|
+
const normalizedHandler = extractDetail ? (event) => {
|
44
|
+
handler(event.detail);
|
45
|
+
} : handler;
|
46
|
+
eventHandlers[eventName] = normalizedHandler;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
if (name === "className") {
|
50
|
+
attributes["class"] = value;
|
51
|
+
} else {
|
52
|
+
attributes[name] = value;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
const editor = useEditorContext();
|
56
|
+
if (hasEditor && editor && !properties["editor"]) {
|
57
|
+
properties["editor"] = editor;
|
58
|
+
}
|
59
|
+
useIsomorphicLayoutEffect(() => {
|
60
|
+
if (!el) return;
|
61
|
+
for (const [name, value] of Object.entries(properties)) {
|
62
|
+
if (value !== void 0) {
|
63
|
+
el[name] = value;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}, [el, ...propNames.map((name) => properties[name])]);
|
67
|
+
useIsomorphicLayoutEffect(() => {
|
68
|
+
for (const [eventName, handerArray] of Object.entries(
|
69
|
+
eventHandlersRef.current
|
70
|
+
)) {
|
71
|
+
const handler = eventHandlers[eventName];
|
72
|
+
handerArray.length = 0;
|
73
|
+
if (handler) {
|
74
|
+
handerArray.push(handler);
|
75
|
+
}
|
76
|
+
}
|
77
|
+
});
|
78
|
+
useIsomorphicLayoutEffect(() => {
|
79
|
+
if (!el) {
|
80
|
+
return;
|
81
|
+
}
|
82
|
+
const handlers = {};
|
83
|
+
for (const eventName of eventNames) {
|
84
|
+
handlers[eventName] = (event) => {
|
85
|
+
for (const handler of eventHandlersRef.current[eventName]) {
|
86
|
+
handler(event);
|
87
|
+
}
|
88
|
+
};
|
89
|
+
}
|
90
|
+
for (const [name, handler] of Object.entries(handlers)) {
|
91
|
+
el.addEventListener(name, handler);
|
92
|
+
}
|
93
|
+
return () => {
|
94
|
+
for (const [name, handler] of Object.entries(handlers)) {
|
95
|
+
el.removeEventListener(name, handler);
|
96
|
+
}
|
97
|
+
};
|
98
|
+
}, [el]);
|
99
|
+
return createElement(tagName, {
|
100
|
+
...attributes,
|
101
|
+
ref: mergeRefs([ref, setEl])
|
102
|
+
});
|
103
|
+
});
|
104
|
+
Component.displayName = displayName;
|
105
|
+
return Component;
|
106
|
+
}
|
107
|
+
|
108
|
+
export {
|
109
|
+
createComponent
|
110
|
+
};
|
@@ -1,4 +1,8 @@
|
|
1
1
|
export { AutocompleteEmpty_alias_1 as AutocompleteEmpty } from './_tsup-dts-rollup';
|
2
|
+
export { AutocompleteEmptyProps_alias_1 as AutocompleteEmptyProps } from './_tsup-dts-rollup';
|
2
3
|
export { AutocompleteItem_alias_1 as AutocompleteItem } from './_tsup-dts-rollup';
|
4
|
+
export { AutocompleteItemProps_alias_1 as AutocompleteItemProps } from './_tsup-dts-rollup';
|
3
5
|
export { AutocompleteList_alias_1 as AutocompleteList } from './_tsup-dts-rollup';
|
6
|
+
export { AutocompleteListProps_alias_1 as AutocompleteListProps } from './_tsup-dts-rollup';
|
4
7
|
export { AutocompletePopover_alias_1 as AutocompletePopover } from './_tsup-dts-rollup';
|
8
|
+
export { AutocompletePopoverProps_alias_1 as AutocompletePopoverProps } from './_tsup-dts-rollup';
|
@@ -1,46 +1,54 @@
|
|
1
1
|
import {
|
2
2
|
createComponent
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-OFZQYJNI.js";
|
4
4
|
import "./chunk-BH56NR2Q.js";
|
5
5
|
|
6
6
|
// src/components/autocomplete/autocomplete-empty.gen.ts
|
7
7
|
import {
|
8
|
-
|
8
|
+
autocompleteEmptyProps,
|
9
|
+
autocompleteEmptyEvents
|
9
10
|
} from "@prosekit/web/autocomplete";
|
10
11
|
var AutocompleteEmpty = createComponent(
|
11
12
|
"prosekit-autocomplete-empty",
|
12
13
|
"AutocompleteEmpty",
|
13
|
-
|
14
|
+
Object.keys(autocompleteEmptyProps),
|
15
|
+
Object.keys(autocompleteEmptyEvents)
|
14
16
|
);
|
15
17
|
|
16
18
|
// src/components/autocomplete/autocomplete-item.gen.ts
|
17
19
|
import {
|
18
|
-
|
20
|
+
autocompleteItemProps,
|
21
|
+
autocompleteItemEvents
|
19
22
|
} from "@prosekit/web/autocomplete";
|
20
23
|
var AutocompleteItem = createComponent(
|
21
24
|
"prosekit-autocomplete-item",
|
22
25
|
"AutocompleteItem",
|
23
|
-
|
26
|
+
Object.keys(autocompleteItemProps),
|
27
|
+
Object.keys(autocompleteItemEvents)
|
24
28
|
);
|
25
29
|
|
26
30
|
// src/components/autocomplete/autocomplete-list.gen.ts
|
27
31
|
import {
|
28
|
-
|
32
|
+
autocompleteListProps,
|
33
|
+
autocompleteListEvents
|
29
34
|
} from "@prosekit/web/autocomplete";
|
30
35
|
var AutocompleteList = createComponent(
|
31
36
|
"prosekit-autocomplete-list",
|
32
37
|
"AutocompleteList",
|
33
|
-
|
38
|
+
Object.keys(autocompleteListProps),
|
39
|
+
Object.keys(autocompleteListEvents)
|
34
40
|
);
|
35
41
|
|
36
42
|
// src/components/autocomplete/autocomplete-popover.gen.ts
|
37
43
|
import {
|
38
|
-
|
44
|
+
autocompletePopoverProps,
|
45
|
+
autocompletePopoverEvents
|
39
46
|
} from "@prosekit/web/autocomplete";
|
40
47
|
var AutocompletePopover = createComponent(
|
41
48
|
"prosekit-autocomplete-popover",
|
42
49
|
"AutocompletePopover",
|
43
|
-
|
50
|
+
Object.keys(autocompletePopoverProps),
|
51
|
+
Object.keys(autocompletePopoverEvents)
|
44
52
|
);
|
45
53
|
export {
|
46
54
|
AutocompleteEmpty,
|
@@ -1,5 +1,6 @@
|
|
1
|
-
export { BlockDragHandle_alias_1 as BlockDragHandle } from './_tsup-dts-rollup';
|
2
1
|
export { BlockHandleAdd_alias_1 as BlockHandleAdd } from './_tsup-dts-rollup';
|
2
|
+
export { BlockHandleAddProps_alias_1 as BlockHandleAddProps } from './_tsup-dts-rollup';
|
3
3
|
export { BlockHandleDraggable_alias_1 as BlockHandleDraggable } from './_tsup-dts-rollup';
|
4
|
+
export { BlockHandleDraggableProps_alias_1 as BlockHandleDraggableProps } from './_tsup-dts-rollup';
|
4
5
|
export { BlockHandlePopover_alias_1 as BlockHandlePopover } from './_tsup-dts-rollup';
|
5
|
-
export {
|
6
|
+
export { BlockHandlePopoverProps_alias_1 as BlockHandlePopoverProps } from './_tsup-dts-rollup';
|
@@ -1,61 +1,45 @@
|
|
1
1
|
import {
|
2
2
|
createComponent
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-OFZQYJNI.js";
|
4
4
|
import "./chunk-BH56NR2Q.js";
|
5
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
6
|
// src/components/block-handle/block-handle-add.gen.ts
|
17
7
|
import {
|
18
|
-
|
8
|
+
blockHandleAddProps,
|
9
|
+
blockHandleAddEvents
|
19
10
|
} from "@prosekit/web/block-handle";
|
20
11
|
var BlockHandleAdd = createComponent(
|
21
12
|
"prosekit-block-handle-add",
|
22
13
|
"BlockHandleAdd",
|
23
|
-
|
14
|
+
Object.keys(blockHandleAddProps),
|
15
|
+
Object.keys(blockHandleAddEvents)
|
24
16
|
);
|
25
17
|
|
26
18
|
// src/components/block-handle/block-handle-draggable.gen.ts
|
27
19
|
import {
|
28
|
-
|
20
|
+
blockHandleDraggableProps,
|
21
|
+
blockHandleDraggableEvents
|
29
22
|
} from "@prosekit/web/block-handle";
|
30
23
|
var BlockHandleDraggable = createComponent(
|
31
24
|
"prosekit-block-handle-draggable",
|
32
25
|
"BlockHandleDraggable",
|
33
|
-
|
26
|
+
Object.keys(blockHandleDraggableProps),
|
27
|
+
Object.keys(blockHandleDraggableEvents)
|
34
28
|
);
|
35
29
|
|
36
30
|
// src/components/block-handle/block-handle-popover.gen.ts
|
37
31
|
import {
|
38
|
-
|
32
|
+
blockHandlePopoverProps,
|
33
|
+
blockHandlePopoverEvents
|
39
34
|
} from "@prosekit/web/block-handle";
|
40
35
|
var BlockHandlePopover = createComponent(
|
41
36
|
"prosekit-block-handle-popover",
|
42
37
|
"BlockHandlePopover",
|
43
|
-
|
44
|
-
)
|
45
|
-
|
46
|
-
// src/components/block-handle/block-popover.gen.ts
|
47
|
-
import {
|
48
|
-
defaultBlockPopoverProps
|
49
|
-
} from "@prosekit/web/block-handle";
|
50
|
-
var BlockPopover = createComponent(
|
51
|
-
"prosekit-block-popover",
|
52
|
-
"BlockPopover",
|
53
|
-
defaultBlockPopoverProps
|
38
|
+
Object.keys(blockHandlePopoverProps),
|
39
|
+
Object.keys(blockHandlePopoverEvents)
|
54
40
|
);
|
55
41
|
export {
|
56
|
-
BlockDragHandle,
|
57
42
|
BlockHandleAdd,
|
58
43
|
BlockHandleDraggable,
|
59
|
-
BlockHandlePopover
|
60
|
-
BlockPopover
|
44
|
+
BlockHandlePopover
|
61
45
|
};
|
@@ -1,16 +1,18 @@
|
|
1
1
|
import {
|
2
2
|
createComponent
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-OFZQYJNI.js";
|
4
4
|
import "./chunk-BH56NR2Q.js";
|
5
5
|
|
6
6
|
// src/components/inline-popover/inline-popover.gen.ts
|
7
7
|
import {
|
8
|
-
|
8
|
+
inlinePopoverProps,
|
9
|
+
inlinePopoverEvents
|
9
10
|
} from "@prosekit/web/inline-popover";
|
10
11
|
var InlinePopover = createComponent(
|
11
12
|
"prosekit-inline-popover",
|
12
13
|
"InlinePopover",
|
13
|
-
|
14
|
+
Object.keys(inlinePopoverProps),
|
15
|
+
Object.keys(inlinePopoverEvents)
|
14
16
|
);
|
15
17
|
export {
|
16
18
|
InlinePopover
|
@@ -1,3 +1,6 @@
|
|
1
1
|
export { PopoverContent } from './_tsup-dts-rollup';
|
2
|
+
export { PopoverContentProps } from './_tsup-dts-rollup';
|
2
3
|
export { PopoverRoot } from './_tsup-dts-rollup';
|
4
|
+
export { PopoverRootProps } from './_tsup-dts-rollup';
|
3
5
|
export { PopoverTrigger } from './_tsup-dts-rollup';
|
6
|
+
export { PopoverTriggerProps } from './_tsup-dts-rollup';
|
@@ -1,36 +1,42 @@
|
|
1
1
|
import {
|
2
2
|
createComponent
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-OFZQYJNI.js";
|
4
4
|
import "./chunk-BH56NR2Q.js";
|
5
5
|
|
6
6
|
// src/components/popover/popover-content.gen.ts
|
7
7
|
import {
|
8
|
-
|
8
|
+
popoverContentProps,
|
9
|
+
popoverContentEvents
|
9
10
|
} from "@prosekit/web/popover";
|
10
11
|
var PopoverContent = createComponent(
|
11
12
|
"prosekit-popover-content",
|
12
13
|
"PopoverContent",
|
13
|
-
|
14
|
+
Object.keys(popoverContentProps),
|
15
|
+
Object.keys(popoverContentEvents)
|
14
16
|
);
|
15
17
|
|
16
18
|
// src/components/popover/popover-root.gen.ts
|
17
19
|
import {
|
18
|
-
|
20
|
+
popoverRootProps,
|
21
|
+
popoverRootEvents
|
19
22
|
} from "@prosekit/web/popover";
|
20
23
|
var PopoverRoot = createComponent(
|
21
24
|
"prosekit-popover-root",
|
22
25
|
"PopoverRoot",
|
23
|
-
|
26
|
+
Object.keys(popoverRootProps),
|
27
|
+
Object.keys(popoverRootEvents)
|
24
28
|
);
|
25
29
|
|
26
30
|
// src/components/popover/popover-trigger.gen.ts
|
27
31
|
import {
|
28
|
-
|
32
|
+
popoverTriggerProps,
|
33
|
+
popoverTriggerEvents
|
29
34
|
} from "@prosekit/web/popover";
|
30
35
|
var PopoverTrigger = createComponent(
|
31
36
|
"prosekit-popover-trigger",
|
32
37
|
"PopoverTrigger",
|
33
|
-
|
38
|
+
Object.keys(popoverTriggerProps),
|
39
|
+
Object.keys(popoverTriggerEvents)
|
34
40
|
);
|
35
41
|
export {
|
36
42
|
PopoverContent,
|
@@ -1,26 +1,30 @@
|
|
1
1
|
import {
|
2
2
|
createComponent
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-OFZQYJNI.js";
|
4
4
|
import "./chunk-BH56NR2Q.js";
|
5
5
|
|
6
6
|
// src/components/resizable/resizable-handle.gen.ts
|
7
7
|
import {
|
8
|
-
|
8
|
+
resizableHandleProps,
|
9
|
+
resizableHandleEvents
|
9
10
|
} from "@prosekit/web/resizable";
|
10
11
|
var ResizableHandle = createComponent(
|
11
12
|
"prosekit-resizable-handle",
|
12
13
|
"ResizableHandle",
|
13
|
-
|
14
|
+
Object.keys(resizableHandleProps),
|
15
|
+
Object.keys(resizableHandleEvents)
|
14
16
|
);
|
15
17
|
|
16
18
|
// src/components/resizable/resizable-root.gen.ts
|
17
19
|
import {
|
18
|
-
|
20
|
+
resizableRootProps,
|
21
|
+
resizableRootEvents
|
19
22
|
} from "@prosekit/web/resizable";
|
20
23
|
var ResizableRoot = createComponent(
|
21
24
|
"prosekit-resizable-root",
|
22
25
|
"ResizableRoot",
|
23
|
-
|
26
|
+
Object.keys(resizableRootProps),
|
27
|
+
Object.keys(resizableRootEvents)
|
24
28
|
);
|
25
29
|
export {
|
26
30
|
ResizableHandle,
|
@@ -1,7 +1,14 @@
|
|
1
1
|
export { TableHandleColumnRoot } from './_tsup-dts-rollup';
|
2
|
+
export { TableHandleColumnRootProps } from './_tsup-dts-rollup';
|
2
3
|
export { TableHandleColumnTrigger } from './_tsup-dts-rollup';
|
4
|
+
export { TableHandleColumnTriggerProps } from './_tsup-dts-rollup';
|
3
5
|
export { TableHandlePopoverContent } from './_tsup-dts-rollup';
|
6
|
+
export { TableHandlePopoverContentProps } from './_tsup-dts-rollup';
|
4
7
|
export { TableHandlePopoverItem } from './_tsup-dts-rollup';
|
8
|
+
export { TableHandlePopoverItemProps } from './_tsup-dts-rollup';
|
5
9
|
export { TableHandleRoot } from './_tsup-dts-rollup';
|
10
|
+
export { TableHandleRootProps } from './_tsup-dts-rollup';
|
6
11
|
export { TableHandleRowRoot } from './_tsup-dts-rollup';
|
12
|
+
export { TableHandleRowRootProps } from './_tsup-dts-rollup';
|
7
13
|
export { TableHandleRowTrigger } from './_tsup-dts-rollup';
|
14
|
+
export { TableHandleRowTriggerProps } from './_tsup-dts-rollup';
|
@@ -1,76 +1,90 @@
|
|
1
1
|
import {
|
2
2
|
createComponent
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-OFZQYJNI.js";
|
4
4
|
import "./chunk-BH56NR2Q.js";
|
5
5
|
|
6
6
|
// src/components/table-handle/table-handle-column-root.gen.ts
|
7
7
|
import {
|
8
|
-
|
8
|
+
tableHandleColumnRootProps,
|
9
|
+
tableHandleColumnRootEvents
|
9
10
|
} from "@prosekit/web/table-handle";
|
10
11
|
var TableHandleColumnRoot = createComponent(
|
11
12
|
"prosekit-table-handle-column-root",
|
12
13
|
"TableHandleColumnRoot",
|
13
|
-
|
14
|
+
Object.keys(tableHandleColumnRootProps),
|
15
|
+
Object.keys(tableHandleColumnRootEvents)
|
14
16
|
);
|
15
17
|
|
16
18
|
// src/components/table-handle/table-handle-column-trigger.gen.ts
|
17
19
|
import {
|
18
|
-
|
20
|
+
tableHandleColumnTriggerProps,
|
21
|
+
tableHandleColumnTriggerEvents
|
19
22
|
} from "@prosekit/web/table-handle";
|
20
23
|
var TableHandleColumnTrigger = createComponent(
|
21
24
|
"prosekit-table-handle-column-trigger",
|
22
25
|
"TableHandleColumnTrigger",
|
23
|
-
|
26
|
+
Object.keys(tableHandleColumnTriggerProps),
|
27
|
+
Object.keys(tableHandleColumnTriggerEvents)
|
24
28
|
);
|
25
29
|
|
26
30
|
// src/components/table-handle/table-handle-popover-content.gen.ts
|
27
31
|
import {
|
28
|
-
|
32
|
+
tableHandlePopoverContentProps,
|
33
|
+
tableHandlePopoverContentEvents
|
29
34
|
} from "@prosekit/web/table-handle";
|
30
35
|
var TableHandlePopoverContent = createComponent(
|
31
36
|
"prosekit-table-handle-popover-content",
|
32
37
|
"TableHandlePopoverContent",
|
33
|
-
|
38
|
+
Object.keys(tableHandlePopoverContentProps),
|
39
|
+
Object.keys(tableHandlePopoverContentEvents)
|
34
40
|
);
|
35
41
|
|
36
42
|
// src/components/table-handle/table-handle-popover-item.gen.ts
|
37
43
|
import {
|
38
|
-
|
44
|
+
tableHandlePopoverItemProps,
|
45
|
+
tableHandlePopoverItemEvents
|
39
46
|
} from "@prosekit/web/table-handle";
|
40
47
|
var TableHandlePopoverItem = createComponent(
|
41
48
|
"prosekit-table-handle-popover-item",
|
42
49
|
"TableHandlePopoverItem",
|
43
|
-
|
50
|
+
Object.keys(tableHandlePopoverItemProps),
|
51
|
+
Object.keys(tableHandlePopoverItemEvents)
|
44
52
|
);
|
45
53
|
|
46
54
|
// src/components/table-handle/table-handle-root.gen.ts
|
47
55
|
import {
|
48
|
-
|
56
|
+
tableHandleRootProps,
|
57
|
+
tableHandleRootEvents
|
49
58
|
} from "@prosekit/web/table-handle";
|
50
59
|
var TableHandleRoot = createComponent(
|
51
60
|
"prosekit-table-handle-root",
|
52
61
|
"TableHandleRoot",
|
53
|
-
|
62
|
+
Object.keys(tableHandleRootProps),
|
63
|
+
Object.keys(tableHandleRootEvents)
|
54
64
|
);
|
55
65
|
|
56
66
|
// src/components/table-handle/table-handle-row-root.gen.ts
|
57
67
|
import {
|
58
|
-
|
68
|
+
tableHandleRowRootProps,
|
69
|
+
tableHandleRowRootEvents
|
59
70
|
} from "@prosekit/web/table-handle";
|
60
71
|
var TableHandleRowRoot = createComponent(
|
61
72
|
"prosekit-table-handle-row-root",
|
62
73
|
"TableHandleRowRoot",
|
63
|
-
|
74
|
+
Object.keys(tableHandleRowRootProps),
|
75
|
+
Object.keys(tableHandleRowRootEvents)
|
64
76
|
);
|
65
77
|
|
66
78
|
// src/components/table-handle/table-handle-row-trigger.gen.ts
|
67
79
|
import {
|
68
|
-
|
80
|
+
tableHandleRowTriggerProps,
|
81
|
+
tableHandleRowTriggerEvents
|
69
82
|
} from "@prosekit/web/table-handle";
|
70
83
|
var TableHandleRowTrigger = createComponent(
|
71
84
|
"prosekit-table-handle-row-trigger",
|
72
85
|
"TableHandleRowTrigger",
|
73
|
-
|
86
|
+
Object.keys(tableHandleRowTriggerProps),
|
87
|
+
Object.keys(tableHandleRowTriggerEvents)
|
74
88
|
);
|
75
89
|
export {
|
76
90
|
TableHandleColumnRoot,
|
@@ -1,3 +1,6 @@
|
|
1
1
|
export { TooltipContent } from './_tsup-dts-rollup';
|
2
|
+
export { TooltipContentProps } from './_tsup-dts-rollup';
|
2
3
|
export { TooltipRoot } from './_tsup-dts-rollup';
|
4
|
+
export { TooltipRootProps } from './_tsup-dts-rollup';
|
3
5
|
export { TooltipTrigger } from './_tsup-dts-rollup';
|
6
|
+
export { TooltipTriggerProps } from './_tsup-dts-rollup';
|
@@ -1,36 +1,42 @@
|
|
1
1
|
import {
|
2
2
|
createComponent
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-OFZQYJNI.js";
|
4
4
|
import "./chunk-BH56NR2Q.js";
|
5
5
|
|
6
6
|
// src/components/tooltip/tooltip-content.gen.ts
|
7
7
|
import {
|
8
|
-
|
8
|
+
tooltipContentProps,
|
9
|
+
tooltipContentEvents
|
9
10
|
} from "@prosekit/web/tooltip";
|
10
11
|
var TooltipContent = createComponent(
|
11
12
|
"prosekit-tooltip-content",
|
12
13
|
"TooltipContent",
|
13
|
-
|
14
|
+
Object.keys(tooltipContentProps),
|
15
|
+
Object.keys(tooltipContentEvents)
|
14
16
|
);
|
15
17
|
|
16
18
|
// src/components/tooltip/tooltip-root.gen.ts
|
17
19
|
import {
|
18
|
-
|
20
|
+
tooltipRootProps,
|
21
|
+
tooltipRootEvents
|
19
22
|
} from "@prosekit/web/tooltip";
|
20
23
|
var TooltipRoot = createComponent(
|
21
24
|
"prosekit-tooltip-root",
|
22
25
|
"TooltipRoot",
|
23
|
-
|
26
|
+
Object.keys(tooltipRootProps),
|
27
|
+
Object.keys(tooltipRootEvents)
|
24
28
|
);
|
25
29
|
|
26
30
|
// src/components/tooltip/tooltip-trigger.gen.ts
|
27
31
|
import {
|
28
|
-
|
32
|
+
tooltipTriggerProps,
|
33
|
+
tooltipTriggerEvents
|
29
34
|
} from "@prosekit/web/tooltip";
|
30
35
|
var TooltipTrigger = createComponent(
|
31
36
|
"prosekit-tooltip-trigger",
|
32
37
|
"TooltipTrigger",
|
33
|
-
|
38
|
+
Object.keys(tooltipTriggerProps),
|
39
|
+
Object.keys(tooltipTriggerEvents)
|
34
40
|
);
|
35
41
|
export {
|
36
42
|
TooltipContent,
|
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.4.0",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -74,7 +74,7 @@
|
|
74
74
|
"react-merge-refs": "^2.1.1",
|
75
75
|
"@prosekit/core": "^0.7.11",
|
76
76
|
"@prosekit/pm": "^0.1.8",
|
77
|
-
"@prosekit/web": "^0.
|
77
|
+
"@prosekit/web": "^0.4.0"
|
78
78
|
},
|
79
79
|
"peerDependencies": {
|
80
80
|
"react": ">= 18.2.0",
|
@@ -95,7 +95,7 @@
|
|
95
95
|
"react-dom": "^18.3.1",
|
96
96
|
"tsup": "^8.3.0",
|
97
97
|
"typescript": "^5.6.2",
|
98
|
-
"vitest": "^2.1.
|
98
|
+
"vitest": "^2.1.2",
|
99
99
|
"@prosekit/dev": "0.0.0"
|
100
100
|
},
|
101
101
|
"scripts": {
|
package/dist/chunk-UG3RPLME.js
DELETED
@@ -1,51 +0,0 @@
|
|
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
|
-
};
|