@prosekit/preact 0.3.30 → 0.4.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 +218 -34
- package/dist/chunk-YDJM74CW.js +112 -0
- package/dist/prosekit-preact-autocomplete.d.ts +4 -0
- package/dist/prosekit-preact-autocomplete.js +17 -9
- package/dist/prosekit-preact-block-handle.d.ts +3 -2
- package/dist/prosekit-preact-block-handle.js +14 -30
- package/dist/prosekit-preact-inline-popover.d.ts +1 -0
- package/dist/prosekit-preact-inline-popover.js +5 -3
- package/dist/prosekit-preact-popover.d.ts +3 -0
- package/dist/prosekit-preact-popover.js +13 -7
- package/dist/prosekit-preact-resizable.d.ts +2 -0
- package/dist/prosekit-preact-resizable.js +9 -5
- package/dist/prosekit-preact-table-handle.d.ts +7 -0
- package/dist/prosekit-preact-table-handle.js +29 -15
- package/dist/prosekit-preact-tooltip.d.ts +3 -0
- package/dist/prosekit-preact-tooltip.js +13 -7
- package/package.json +7 -7
- package/dist/chunk-5LWA54E4.js +0 -50
@@ -1,21 +1,24 @@
|
|
1
1
|
import { AutocompleteEmptyElement } from '@prosekit/web/autocomplete';
|
2
|
-
import {
|
2
|
+
import { AutocompleteEmptyEvents } from '@prosekit/web/autocomplete';
|
3
|
+
import { AutocompleteEmptyProps as AutocompleteEmptyProps_2 } from '@prosekit/web/autocomplete';
|
3
4
|
import { AutocompleteItemElement } from '@prosekit/web/autocomplete';
|
4
|
-
import {
|
5
|
+
import { AutocompleteItemEvents } from '@prosekit/web/autocomplete';
|
6
|
+
import { AutocompleteItemProps as AutocompleteItemProps_2 } from '@prosekit/web/autocomplete';
|
5
7
|
import { AutocompleteListElement } from '@prosekit/web/autocomplete';
|
6
|
-
import {
|
8
|
+
import { AutocompleteListEvents } from '@prosekit/web/autocomplete';
|
9
|
+
import { AutocompleteListProps as AutocompleteListProps_2 } from '@prosekit/web/autocomplete';
|
7
10
|
import { AutocompletePopoverElement } from '@prosekit/web/autocomplete';
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import { BlockDragHandleProps } from '@prosekit/web/block-handle';
|
11
|
+
import { AutocompletePopoverEvents } from '@prosekit/web/autocomplete';
|
12
|
+
import { AutocompletePopoverProps as AutocompletePopoverProps_2 } from '@prosekit/web/autocomplete';
|
11
13
|
import { BlockHandleAddElement } from '@prosekit/web/block-handle';
|
12
|
-
import {
|
14
|
+
import { BlockHandleAddEvents } from '@prosekit/web/block-handle';
|
15
|
+
import { BlockHandleAddProps as BlockHandleAddProps_2 } from '@prosekit/web/block-handle';
|
13
16
|
import { BlockHandleDraggableElement } from '@prosekit/web/block-handle';
|
14
|
-
import {
|
17
|
+
import { BlockHandleDraggableEvents } from '@prosekit/web/block-handle';
|
18
|
+
import { BlockHandleDraggableProps as BlockHandleDraggableProps_2 } from '@prosekit/web/block-handle';
|
15
19
|
import { BlockHandlePopoverElement } from '@prosekit/web/block-handle';
|
16
|
-
import {
|
17
|
-
import {
|
18
|
-
import { BlockPopoverProps } from '@prosekit/web/block-handle';
|
20
|
+
import { BlockHandlePopoverEvents } from '@prosekit/web/block-handle';
|
21
|
+
import { BlockHandlePopoverProps as BlockHandlePopoverProps_2 } from '@prosekit/web/block-handle';
|
19
22
|
import { ComponentChildren } from 'preact';
|
20
23
|
import { ComponentType } from 'preact';
|
21
24
|
import { config as default_alias_1 } from '@prosekit/dev/config-vitest';
|
@@ -25,81 +28,150 @@ import { Extension } from '@prosekit/core';
|
|
25
28
|
import { ForwardRefExoticComponent } from 'preact/compat';
|
26
29
|
import { HTMLAttributes } from 'preact/compat';
|
27
30
|
import { InlinePopoverElement } from '@prosekit/web/inline-popover';
|
28
|
-
import {
|
31
|
+
import { InlinePopoverEvents } from '@prosekit/web/inline-popover';
|
32
|
+
import { InlinePopoverProps as InlinePopoverProps_2 } from '@prosekit/web/inline-popover';
|
29
33
|
import { Keymap } from '@prosekit/core';
|
30
34
|
import { Options } from 'tsup';
|
31
35
|
import { PopoverContentElement } from '@prosekit/web/popover';
|
32
|
-
import {
|
36
|
+
import { PopoverContentEvents } from '@prosekit/web/popover';
|
37
|
+
import { PopoverContentProps as PopoverContentProps_2 } from '@prosekit/web/popover';
|
33
38
|
import { PopoverRootElement } from '@prosekit/web/popover';
|
34
|
-
import {
|
39
|
+
import { PopoverRootEvents } from '@prosekit/web/popover';
|
40
|
+
import { PopoverRootProps as PopoverRootProps_2 } from '@prosekit/web/popover';
|
35
41
|
import { PopoverTriggerElement } from '@prosekit/web/popover';
|
36
|
-
import {
|
42
|
+
import { PopoverTriggerEvents } from '@prosekit/web/popover';
|
43
|
+
import { PopoverTriggerProps as PopoverTriggerProps_2 } from '@prosekit/web/popover';
|
37
44
|
import { Priority } from '@prosekit/core';
|
38
45
|
import type { ProseMirrorNode } from '@prosekit/pm/model';
|
39
46
|
import { Provider } from 'preact';
|
40
47
|
import { RefAttributes } from 'preact/compat';
|
41
48
|
import { ResizableHandleElement } from '@prosekit/web/resizable';
|
42
|
-
import {
|
49
|
+
import { ResizableHandleEvents } from '@prosekit/web/resizable';
|
50
|
+
import { ResizableHandleProps as ResizableHandleProps_2 } from '@prosekit/web/resizable';
|
43
51
|
import { ResizableRootElement } from '@prosekit/web/resizable';
|
44
|
-
import {
|
52
|
+
import { ResizableRootEvents } from '@prosekit/web/resizable';
|
53
|
+
import { ResizableRootProps as ResizableRootProps_2 } from '@prosekit/web/resizable';
|
45
54
|
import { TableHandleColumnRootElement } from '@prosekit/web/table-handle';
|
46
|
-
import {
|
55
|
+
import { TableHandleColumnRootEvents } from '@prosekit/web/table-handle';
|
56
|
+
import { TableHandleColumnRootProps as TableHandleColumnRootProps_2 } from '@prosekit/web/table-handle';
|
47
57
|
import { TableHandleColumnTriggerElement } from '@prosekit/web/table-handle';
|
48
|
-
import {
|
58
|
+
import { TableHandleColumnTriggerEvents } from '@prosekit/web/table-handle';
|
59
|
+
import { TableHandleColumnTriggerProps as TableHandleColumnTriggerProps_2 } from '@prosekit/web/table-handle';
|
49
60
|
import { TableHandlePopoverContentElement } from '@prosekit/web/table-handle';
|
50
|
-
import {
|
61
|
+
import { TableHandlePopoverContentEvents } from '@prosekit/web/table-handle';
|
62
|
+
import { TableHandlePopoverContentProps as TableHandlePopoverContentProps_2 } from '@prosekit/web/table-handle';
|
51
63
|
import { TableHandlePopoverItemElement } from '@prosekit/web/table-handle';
|
52
|
-
import {
|
64
|
+
import { TableHandlePopoverItemEvents } from '@prosekit/web/table-handle';
|
65
|
+
import { TableHandlePopoverItemProps as TableHandlePopoverItemProps_2 } from '@prosekit/web/table-handle';
|
53
66
|
import { TableHandleRootElement } from '@prosekit/web/table-handle';
|
54
|
-
import {
|
67
|
+
import { TableHandleRootEvents } from '@prosekit/web/table-handle';
|
68
|
+
import { TableHandleRootProps as TableHandleRootProps_2 } from '@prosekit/web/table-handle';
|
55
69
|
import { TableHandleRowRootElement } from '@prosekit/web/table-handle';
|
56
|
-
import {
|
70
|
+
import { TableHandleRowRootEvents } from '@prosekit/web/table-handle';
|
71
|
+
import { TableHandleRowRootProps as TableHandleRowRootProps_2 } from '@prosekit/web/table-handle';
|
57
72
|
import { TableHandleRowTriggerElement } from '@prosekit/web/table-handle';
|
58
|
-
import {
|
73
|
+
import { TableHandleRowTriggerEvents } from '@prosekit/web/table-handle';
|
74
|
+
import { TableHandleRowTriggerProps as TableHandleRowTriggerProps_2 } from '@prosekit/web/table-handle';
|
59
75
|
import { TooltipContentElement } from '@prosekit/web/tooltip';
|
60
|
-
import {
|
76
|
+
import { TooltipContentEvents } from '@prosekit/web/tooltip';
|
77
|
+
import { TooltipContentProps as TooltipContentProps_2 } from '@prosekit/web/tooltip';
|
61
78
|
import { TooltipRootElement } from '@prosekit/web/tooltip';
|
62
|
-
import {
|
79
|
+
import { TooltipRootEvents } from '@prosekit/web/tooltip';
|
80
|
+
import { TooltipRootProps as TooltipRootProps_2 } from '@prosekit/web/tooltip';
|
63
81
|
import { TooltipTriggerElement } from '@prosekit/web/tooltip';
|
64
|
-
import {
|
82
|
+
import { TooltipTriggerEvents } from '@prosekit/web/tooltip';
|
83
|
+
import { TooltipTriggerProps as TooltipTriggerProps_2 } from '@prosekit/web/tooltip';
|
65
84
|
|
66
85
|
declare const AutocompleteEmpty: ForwardRefExoticComponent<Partial<AutocompleteEmptyProps> & RefAttributes<AutocompleteEmptyElement> & HTMLAttributes<AutocompleteEmptyElement>>;
|
67
86
|
export { AutocompleteEmpty }
|
68
87
|
export { AutocompleteEmpty as AutocompleteEmpty_alias_1 }
|
69
88
|
|
89
|
+
/**
|
90
|
+
* Props for the {@link AutocompleteEmpty} component.
|
91
|
+
*/
|
92
|
+
declare type AutocompleteEmptyProps = Partial<CreateProps<AutocompleteEmptyProps_2, AutocompleteEmptyEvents>>;
|
93
|
+
export { AutocompleteEmptyProps }
|
94
|
+
export { AutocompleteEmptyProps as AutocompleteEmptyProps_alias_1 }
|
95
|
+
|
70
96
|
declare const AutocompleteItem: ForwardRefExoticComponent<Partial<AutocompleteItemProps> & RefAttributes<AutocompleteItemElement> & HTMLAttributes<AutocompleteItemElement>>;
|
71
97
|
export { AutocompleteItem }
|
72
98
|
export { AutocompleteItem as AutocompleteItem_alias_1 }
|
73
99
|
|
100
|
+
/**
|
101
|
+
* Props for the {@link AutocompleteItem} component.
|
102
|
+
*/
|
103
|
+
declare type AutocompleteItemProps = Partial<CreateProps<AutocompleteItemProps_2, AutocompleteItemEvents>>;
|
104
|
+
export { AutocompleteItemProps }
|
105
|
+
export { AutocompleteItemProps as AutocompleteItemProps_alias_1 }
|
106
|
+
|
74
107
|
declare const AutocompleteList: ForwardRefExoticComponent<Partial<AutocompleteListProps> & RefAttributes<AutocompleteListElement> & HTMLAttributes<AutocompleteListElement>>;
|
75
108
|
export { AutocompleteList }
|
76
109
|
export { AutocompleteList as AutocompleteList_alias_1 }
|
77
110
|
|
111
|
+
/**
|
112
|
+
* Props for the {@link AutocompleteList} component.
|
113
|
+
*/
|
114
|
+
declare type AutocompleteListProps = Partial<CreateProps<AutocompleteListProps_2, AutocompleteListEvents>>;
|
115
|
+
export { AutocompleteListProps }
|
116
|
+
export { AutocompleteListProps as AutocompleteListProps_alias_1 }
|
117
|
+
|
78
118
|
declare const AutocompletePopover: ForwardRefExoticComponent<Partial<AutocompletePopoverProps> & RefAttributes<AutocompletePopoverElement> & HTMLAttributes<AutocompletePopoverElement>>;
|
79
119
|
export { AutocompletePopover }
|
80
120
|
export { AutocompletePopover as AutocompletePopover_alias_1 }
|
81
121
|
|
82
|
-
|
83
|
-
|
84
|
-
|
122
|
+
/**
|
123
|
+
* Props for the {@link AutocompletePopover} component.
|
124
|
+
*/
|
125
|
+
declare type AutocompletePopoverProps = Partial<CreateProps<AutocompletePopoverProps_2, AutocompletePopoverEvents>>;
|
126
|
+
export { AutocompletePopoverProps }
|
127
|
+
export { AutocompletePopoverProps as AutocompletePopoverProps_alias_1 }
|
85
128
|
|
86
129
|
declare const BlockHandleAdd: ForwardRefExoticComponent<Partial<BlockHandleAddProps> & RefAttributes<BlockHandleAddElement> & HTMLAttributes<BlockHandleAddElement>>;
|
87
130
|
export { BlockHandleAdd }
|
88
131
|
export { BlockHandleAdd as BlockHandleAdd_alias_1 }
|
89
132
|
|
133
|
+
/**
|
134
|
+
* Props for the {@link BlockHandleAdd} component.
|
135
|
+
*/
|
136
|
+
declare type BlockHandleAddProps = Partial<CreateProps<BlockHandleAddProps_2, BlockHandleAddEvents>>;
|
137
|
+
export { BlockHandleAddProps }
|
138
|
+
export { BlockHandleAddProps as BlockHandleAddProps_alias_1 }
|
139
|
+
|
90
140
|
declare const BlockHandleDraggable: ForwardRefExoticComponent<Partial<BlockHandleDraggableProps> & RefAttributes<BlockHandleDraggableElement> & HTMLAttributes<BlockHandleDraggableElement>>;
|
91
141
|
export { BlockHandleDraggable }
|
92
142
|
export { BlockHandleDraggable as BlockHandleDraggable_alias_1 }
|
93
143
|
|
144
|
+
/**
|
145
|
+
* Props for the {@link BlockHandleDraggable} component.
|
146
|
+
*/
|
147
|
+
declare type BlockHandleDraggableProps = Partial<CreateProps<BlockHandleDraggableProps_2, BlockHandleDraggableEvents>>;
|
148
|
+
export { BlockHandleDraggableProps }
|
149
|
+
export { BlockHandleDraggableProps as BlockHandleDraggableProps_alias_1 }
|
150
|
+
|
94
151
|
declare const BlockHandlePopover: ForwardRefExoticComponent<Partial<BlockHandlePopoverProps> & RefAttributes<BlockHandlePopoverElement> & HTMLAttributes<BlockHandlePopoverElement>>;
|
95
152
|
export { BlockHandlePopover }
|
96
153
|
export { BlockHandlePopover as BlockHandlePopover_alias_1 }
|
97
154
|
|
98
|
-
|
99
|
-
|
100
|
-
|
155
|
+
/**
|
156
|
+
* Props for the {@link BlockHandlePopover} component.
|
157
|
+
*/
|
158
|
+
declare type BlockHandlePopoverProps = Partial<CreateProps<BlockHandlePopoverProps_2, BlockHandlePopoverEvents>>;
|
159
|
+
export { BlockHandlePopoverProps }
|
160
|
+
export { BlockHandlePopoverProps as BlockHandlePopoverProps_alias_1 }
|
161
|
+
|
162
|
+
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>>;
|
101
163
|
|
102
|
-
|
164
|
+
declare type CreateEventProps<Events extends {
|
165
|
+
[EventName in keyof Events]: CustomEvent;
|
166
|
+
}> = {
|
167
|
+
[EventName in keyof Events as `on${Capitalize<string & EventName>}`]: (event: EventName extends `${string}Change` ? Events[EventName]['detail'] : Events[EventName]) => void;
|
168
|
+
};
|
169
|
+
|
170
|
+
export declare type CreateProps<Props extends {
|
171
|
+
[PropName in keyof Props]: unknown;
|
172
|
+
}, Events extends {
|
173
|
+
[EventName in keyof Events]: CustomEvent;
|
174
|
+
}> = Props & CreateEventProps<Events>;
|
103
175
|
|
104
176
|
export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
105
177
|
|
@@ -114,18 +186,46 @@ declare const InlinePopover: ForwardRefExoticComponent<Partial<InlinePopoverProp
|
|
114
186
|
export { InlinePopover }
|
115
187
|
export { InlinePopover as InlinePopover_alias_1 }
|
116
188
|
|
189
|
+
/**
|
190
|
+
* Props for the {@link InlinePopover} component.
|
191
|
+
*/
|
192
|
+
declare type InlinePopoverProps = Partial<CreateProps<InlinePopoverProps_2, InlinePopoverEvents>>;
|
193
|
+
export { InlinePopoverProps }
|
194
|
+
export { InlinePopoverProps as InlinePopoverProps_alias_1 }
|
195
|
+
|
117
196
|
declare const PopoverContent: ForwardRefExoticComponent<Partial<PopoverContentProps> & RefAttributes<PopoverContentElement> & HTMLAttributes<PopoverContentElement>>;
|
118
197
|
export { PopoverContent }
|
119
198
|
export { PopoverContent as PopoverContent_alias_1 }
|
120
199
|
|
200
|
+
/**
|
201
|
+
* Props for the {@link PopoverContent} component.
|
202
|
+
*/
|
203
|
+
declare type PopoverContentProps = Partial<CreateProps<PopoverContentProps_2, PopoverContentEvents>>;
|
204
|
+
export { PopoverContentProps }
|
205
|
+
export { PopoverContentProps as PopoverContentProps_alias_1 }
|
206
|
+
|
121
207
|
declare const PopoverRoot: ForwardRefExoticComponent<Partial<PopoverRootProps> & RefAttributes<PopoverRootElement> & HTMLAttributes<PopoverRootElement>>;
|
122
208
|
export { PopoverRoot }
|
123
209
|
export { PopoverRoot as PopoverRoot_alias_1 }
|
124
210
|
|
211
|
+
/**
|
212
|
+
* Props for the {@link PopoverRoot} component.
|
213
|
+
*/
|
214
|
+
declare type PopoverRootProps = Partial<CreateProps<PopoverRootProps_2, PopoverRootEvents>>;
|
215
|
+
export { PopoverRootProps }
|
216
|
+
export { PopoverRootProps as PopoverRootProps_alias_1 }
|
217
|
+
|
125
218
|
declare const PopoverTrigger: ForwardRefExoticComponent<Partial<PopoverTriggerProps> & RefAttributes<PopoverTriggerElement> & HTMLAttributes<PopoverTriggerElement>>;
|
126
219
|
export { PopoverTrigger }
|
127
220
|
export { PopoverTrigger as PopoverTrigger_alias_1 }
|
128
221
|
|
222
|
+
/**
|
223
|
+
* Props for the {@link PopoverTrigger} component.
|
224
|
+
*/
|
225
|
+
declare type PopoverTriggerProps = Partial<CreateProps<PopoverTriggerProps_2, PopoverTriggerEvents>>;
|
226
|
+
export { PopoverTriggerProps }
|
227
|
+
export { PopoverTriggerProps as PopoverTriggerProps_alias_1 }
|
228
|
+
|
129
229
|
/**
|
130
230
|
* @internal
|
131
231
|
*/
|
@@ -165,50 +265,134 @@ declare const ResizableHandle: ForwardRefExoticComponent<Partial<ResizableHandle
|
|
165
265
|
export { ResizableHandle }
|
166
266
|
export { ResizableHandle as ResizableHandle_alias_1 }
|
167
267
|
|
268
|
+
/**
|
269
|
+
* Props for the {@link ResizableHandle} component.
|
270
|
+
*/
|
271
|
+
declare type ResizableHandleProps = Partial<CreateProps<ResizableHandleProps_2, ResizableHandleEvents>>;
|
272
|
+
export { ResizableHandleProps }
|
273
|
+
export { ResizableHandleProps as ResizableHandleProps_alias_1 }
|
274
|
+
|
168
275
|
declare const ResizableRoot: ForwardRefExoticComponent<Partial<ResizableRootProps> & RefAttributes<ResizableRootElement> & HTMLAttributes<ResizableRootElement>>;
|
169
276
|
export { ResizableRoot }
|
170
277
|
export { ResizableRoot as ResizableRoot_alias_1 }
|
171
278
|
|
279
|
+
/**
|
280
|
+
* Props for the {@link ResizableRoot} component.
|
281
|
+
*/
|
282
|
+
declare type ResizableRootProps = Partial<CreateProps<ResizableRootProps_2, ResizableRootEvents>>;
|
283
|
+
export { ResizableRootProps }
|
284
|
+
export { ResizableRootProps as ResizableRootProps_alias_1 }
|
285
|
+
|
172
286
|
declare const TableHandleColumnRoot: ForwardRefExoticComponent<Partial<TableHandleColumnRootProps> & RefAttributes<TableHandleColumnRootElement> & HTMLAttributes<TableHandleColumnRootElement>>;
|
173
287
|
export { TableHandleColumnRoot }
|
174
288
|
export { TableHandleColumnRoot as TableHandleColumnRoot_alias_1 }
|
175
289
|
|
290
|
+
/**
|
291
|
+
* Props for the {@link TableHandleColumnRoot} component.
|
292
|
+
*/
|
293
|
+
declare type TableHandleColumnRootProps = Partial<CreateProps<TableHandleColumnRootProps_2, TableHandleColumnRootEvents>>;
|
294
|
+
export { TableHandleColumnRootProps }
|
295
|
+
export { TableHandleColumnRootProps as TableHandleColumnRootProps_alias_1 }
|
296
|
+
|
176
297
|
declare const TableHandleColumnTrigger: ForwardRefExoticComponent<Partial<TableHandleColumnTriggerProps> & RefAttributes<TableHandleColumnTriggerElement> & HTMLAttributes<TableHandleColumnTriggerElement>>;
|
177
298
|
export { TableHandleColumnTrigger }
|
178
299
|
export { TableHandleColumnTrigger as TableHandleColumnTrigger_alias_1 }
|
179
300
|
|
301
|
+
/**
|
302
|
+
* Props for the {@link TableHandleColumnTrigger} component.
|
303
|
+
*/
|
304
|
+
declare type TableHandleColumnTriggerProps = Partial<CreateProps<TableHandleColumnTriggerProps_2, TableHandleColumnTriggerEvents>>;
|
305
|
+
export { TableHandleColumnTriggerProps }
|
306
|
+
export { TableHandleColumnTriggerProps as TableHandleColumnTriggerProps_alias_1 }
|
307
|
+
|
180
308
|
declare const TableHandlePopoverContent: ForwardRefExoticComponent<Partial<TableHandlePopoverContentProps> & RefAttributes<TableHandlePopoverContentElement> & HTMLAttributes<TableHandlePopoverContentElement>>;
|
181
309
|
export { TableHandlePopoverContent }
|
182
310
|
export { TableHandlePopoverContent as TableHandlePopoverContent_alias_1 }
|
183
311
|
|
312
|
+
/**
|
313
|
+
* Props for the {@link TableHandlePopoverContent} component.
|
314
|
+
*/
|
315
|
+
declare type TableHandlePopoverContentProps = Partial<CreateProps<TableHandlePopoverContentProps_2, TableHandlePopoverContentEvents>>;
|
316
|
+
export { TableHandlePopoverContentProps }
|
317
|
+
export { TableHandlePopoverContentProps as TableHandlePopoverContentProps_alias_1 }
|
318
|
+
|
184
319
|
declare const TableHandlePopoverItem: ForwardRefExoticComponent<Partial<TableHandlePopoverItemProps> & RefAttributes<TableHandlePopoverItemElement> & HTMLAttributes<TableHandlePopoverItemElement>>;
|
185
320
|
export { TableHandlePopoverItem }
|
186
321
|
export { TableHandlePopoverItem as TableHandlePopoverItem_alias_1 }
|
187
322
|
|
323
|
+
/**
|
324
|
+
* Props for the {@link TableHandlePopoverItem} component.
|
325
|
+
*/
|
326
|
+
declare type TableHandlePopoverItemProps = Partial<CreateProps<TableHandlePopoverItemProps_2, TableHandlePopoverItemEvents>>;
|
327
|
+
export { TableHandlePopoverItemProps }
|
328
|
+
export { TableHandlePopoverItemProps as TableHandlePopoverItemProps_alias_1 }
|
329
|
+
|
188
330
|
declare const TableHandleRoot: ForwardRefExoticComponent<Partial<TableHandleRootProps> & RefAttributes<TableHandleRootElement> & HTMLAttributes<TableHandleRootElement>>;
|
189
331
|
export { TableHandleRoot }
|
190
332
|
export { TableHandleRoot as TableHandleRoot_alias_1 }
|
191
333
|
|
334
|
+
/**
|
335
|
+
* Props for the {@link TableHandleRoot} component.
|
336
|
+
*/
|
337
|
+
declare type TableHandleRootProps = Partial<CreateProps<TableHandleRootProps_2, TableHandleRootEvents>>;
|
338
|
+
export { TableHandleRootProps }
|
339
|
+
export { TableHandleRootProps as TableHandleRootProps_alias_1 }
|
340
|
+
|
192
341
|
declare const TableHandleRowRoot: ForwardRefExoticComponent<Partial<TableHandleRowRootProps> & RefAttributes<TableHandleRowRootElement> & HTMLAttributes<TableHandleRowRootElement>>;
|
193
342
|
export { TableHandleRowRoot }
|
194
343
|
export { TableHandleRowRoot as TableHandleRowRoot_alias_1 }
|
195
344
|
|
345
|
+
/**
|
346
|
+
* Props for the {@link TableHandleRowRoot} component.
|
347
|
+
*/
|
348
|
+
declare type TableHandleRowRootProps = Partial<CreateProps<TableHandleRowRootProps_2, TableHandleRowRootEvents>>;
|
349
|
+
export { TableHandleRowRootProps }
|
350
|
+
export { TableHandleRowRootProps as TableHandleRowRootProps_alias_1 }
|
351
|
+
|
196
352
|
declare const TableHandleRowTrigger: ForwardRefExoticComponent<Partial<TableHandleRowTriggerProps> & RefAttributes<TableHandleRowTriggerElement> & HTMLAttributes<TableHandleRowTriggerElement>>;
|
197
353
|
export { TableHandleRowTrigger }
|
198
354
|
export { TableHandleRowTrigger as TableHandleRowTrigger_alias_1 }
|
199
355
|
|
356
|
+
/**
|
357
|
+
* Props for the {@link TableHandleRowTrigger} component.
|
358
|
+
*/
|
359
|
+
declare type TableHandleRowTriggerProps = Partial<CreateProps<TableHandleRowTriggerProps_2, TableHandleRowTriggerEvents>>;
|
360
|
+
export { TableHandleRowTriggerProps }
|
361
|
+
export { TableHandleRowTriggerProps as TableHandleRowTriggerProps_alias_1 }
|
362
|
+
|
200
363
|
declare const TooltipContent: ForwardRefExoticComponent<Partial<TooltipContentProps> & RefAttributes<TooltipContentElement> & HTMLAttributes<TooltipContentElement>>;
|
201
364
|
export { TooltipContent }
|
202
365
|
export { TooltipContent as TooltipContent_alias_1 }
|
203
366
|
|
367
|
+
/**
|
368
|
+
* Props for the {@link TooltipContent} component.
|
369
|
+
*/
|
370
|
+
declare type TooltipContentProps = Partial<CreateProps<TooltipContentProps_2, TooltipContentEvents>>;
|
371
|
+
export { TooltipContentProps }
|
372
|
+
export { TooltipContentProps as TooltipContentProps_alias_1 }
|
373
|
+
|
204
374
|
declare const TooltipRoot: ForwardRefExoticComponent<Partial<TooltipRootProps> & RefAttributes<TooltipRootElement> & HTMLAttributes<TooltipRootElement>>;
|
205
375
|
export { TooltipRoot }
|
206
376
|
export { TooltipRoot as TooltipRoot_alias_1 }
|
207
377
|
|
378
|
+
/**
|
379
|
+
* Props for the {@link TooltipRoot} component.
|
380
|
+
*/
|
381
|
+
declare type TooltipRootProps = Partial<CreateProps<TooltipRootProps_2, TooltipRootEvents>>;
|
382
|
+
export { TooltipRootProps }
|
383
|
+
export { TooltipRootProps as TooltipRootProps_alias_1 }
|
384
|
+
|
208
385
|
declare const TooltipTrigger: ForwardRefExoticComponent<Partial<TooltipTriggerProps> & RefAttributes<TooltipTriggerElement> & HTMLAttributes<TooltipTriggerElement>>;
|
209
386
|
export { TooltipTrigger }
|
210
387
|
export { TooltipTrigger as TooltipTrigger_alias_1 }
|
211
388
|
|
389
|
+
/**
|
390
|
+
* Props for the {@link TooltipTrigger} component.
|
391
|
+
*/
|
392
|
+
declare type TooltipTriggerProps = Partial<CreateProps<TooltipTriggerProps_2, TooltipTriggerEvents>>;
|
393
|
+
export { TooltipTriggerProps }
|
394
|
+
export { TooltipTriggerProps as TooltipTriggerProps_alias_1 }
|
395
|
+
|
212
396
|
/**
|
213
397
|
* Calls the given handler whenever the editor document changes.
|
214
398
|
*
|
@@ -0,0 +1,112 @@
|
|
1
|
+
import {
|
2
|
+
useEditorContext
|
3
|
+
} from "./chunk-V253IGNY.js";
|
4
|
+
|
5
|
+
// src/components/create-component.ts
|
6
|
+
import { createElement } from "preact";
|
7
|
+
import {
|
8
|
+
forwardRef
|
9
|
+
} from "preact/compat";
|
10
|
+
import {
|
11
|
+
useEffect,
|
12
|
+
useLayoutEffect,
|
13
|
+
useRef,
|
14
|
+
useState
|
15
|
+
} from "preact/hooks";
|
16
|
+
import { mergeRefs } from "react-merge-refs";
|
17
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
18
|
+
function createComponent(tagName, displayName, propNames, eventNames) {
|
19
|
+
const hasEditor = propNames.includes("editor");
|
20
|
+
const lowerCaseEventNameMap = Object.fromEntries(
|
21
|
+
eventNames.map((name) => [name.toLowerCase(), name])
|
22
|
+
);
|
23
|
+
const Component = forwardRef((props, ref) => {
|
24
|
+
const [el, setEl] = useState(null);
|
25
|
+
const properties = {};
|
26
|
+
const attributes = {};
|
27
|
+
const eventHandlersRef = useRef(
|
28
|
+
Object.fromEntries(eventNames.map((eventName) => [eventName, []]))
|
29
|
+
);
|
30
|
+
const eventHandlers = {};
|
31
|
+
for (const [name, value] of Object.entries(props)) {
|
32
|
+
if (value === void 0) {
|
33
|
+
continue;
|
34
|
+
}
|
35
|
+
if (propNames.includes(name)) {
|
36
|
+
properties[name] = value;
|
37
|
+
continue;
|
38
|
+
}
|
39
|
+
if (name.startsWith("on")) {
|
40
|
+
const lowerCaseEventName = name.slice(2).toLowerCase();
|
41
|
+
const eventName = lowerCaseEventNameMap[lowerCaseEventName];
|
42
|
+
const handler = value;
|
43
|
+
if (eventName && handler) {
|
44
|
+
const extractDetail = eventName.endsWith("Change");
|
45
|
+
const normalizedHandler = extractDetail ? (event) => {
|
46
|
+
handler(event.detail);
|
47
|
+
} : handler;
|
48
|
+
eventHandlers[eventName] = normalizedHandler;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
if (name === "className") {
|
52
|
+
attributes["class"] = value;
|
53
|
+
} else {
|
54
|
+
attributes[name] = value;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
const editor = useEditorContext();
|
58
|
+
if (hasEditor && editor && !properties["editor"]) {
|
59
|
+
properties["editor"] = editor;
|
60
|
+
}
|
61
|
+
useIsomorphicLayoutEffect(() => {
|
62
|
+
if (!el) return;
|
63
|
+
for (const [name, value] of Object.entries(properties)) {
|
64
|
+
if (value !== void 0) {
|
65
|
+
el[name] = value;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}, [el, ...propNames.map((name) => properties[name])]);
|
69
|
+
useIsomorphicLayoutEffect(() => {
|
70
|
+
for (const [eventName, handerArray] of Object.entries(
|
71
|
+
eventHandlersRef.current
|
72
|
+
)) {
|
73
|
+
const handler = eventHandlers[eventName];
|
74
|
+
handerArray.length = 0;
|
75
|
+
if (handler) {
|
76
|
+
handerArray.push(handler);
|
77
|
+
}
|
78
|
+
}
|
79
|
+
});
|
80
|
+
useIsomorphicLayoutEffect(() => {
|
81
|
+
if (!el) {
|
82
|
+
return;
|
83
|
+
}
|
84
|
+
const handlers = {};
|
85
|
+
for (const eventName of eventNames) {
|
86
|
+
handlers[eventName] = (event) => {
|
87
|
+
for (const handler of eventHandlersRef.current[eventName]) {
|
88
|
+
handler(event);
|
89
|
+
}
|
90
|
+
};
|
91
|
+
}
|
92
|
+
for (const [name, handler] of Object.entries(handlers)) {
|
93
|
+
el.addEventListener(name, handler);
|
94
|
+
}
|
95
|
+
return () => {
|
96
|
+
for (const [name, handler] of Object.entries(handlers)) {
|
97
|
+
el.removeEventListener(name, handler);
|
98
|
+
}
|
99
|
+
};
|
100
|
+
}, [el]);
|
101
|
+
return createElement(tagName, {
|
102
|
+
...attributes,
|
103
|
+
ref: mergeRefs([ref, setEl])
|
104
|
+
});
|
105
|
+
});
|
106
|
+
Component.displayName = displayName;
|
107
|
+
return Component;
|
108
|
+
}
|
109
|
+
|
110
|
+
export {
|
111
|
+
createComponent
|
112
|
+
};
|
@@ -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-YDJM74CW.js";
|
4
4
|
import "./chunk-V253IGNY.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-YDJM74CW.js";
|
4
4
|
import "./chunk-V253IGNY.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-YDJM74CW.js";
|
4
4
|
import "./chunk-V253IGNY.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-YDJM74CW.js";
|
4
4
|
import "./chunk-V253IGNY.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-YDJM74CW.js";
|
4
4
|
import "./chunk-V253IGNY.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-YDJM74CW.js";
|
4
4
|
import "./chunk-V253IGNY.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-YDJM74CW.js";
|
4
4
|
import "./chunk-V253IGNY.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/preact",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.4.1",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -71,9 +71,9 @@
|
|
71
71
|
],
|
72
72
|
"dependencies": {
|
73
73
|
"react-merge-refs": "^2.1.1",
|
74
|
-
"@prosekit/core": "^0.7.
|
75
|
-
"@prosekit/
|
76
|
-
"@prosekit/
|
74
|
+
"@prosekit/core": "^0.7.12",
|
75
|
+
"@prosekit/pm": "^0.1.8",
|
76
|
+
"@prosekit/web": "^0.4.1"
|
77
77
|
},
|
78
78
|
"peerDependencies": {
|
79
79
|
"preact": ">= 10.11.0"
|
@@ -84,10 +84,10 @@
|
|
84
84
|
}
|
85
85
|
},
|
86
86
|
"devDependencies": {
|
87
|
-
"preact": "^10.24.
|
87
|
+
"preact": "^10.24.3",
|
88
88
|
"tsup": "^8.3.0",
|
89
|
-
"typescript": "^5.6.
|
90
|
-
"vitest": "^2.1.
|
89
|
+
"typescript": "^5.6.3",
|
90
|
+
"vitest": "^2.1.3",
|
91
91
|
"@prosekit/dev": "0.0.0"
|
92
92
|
},
|
93
93
|
"scripts": {
|
package/dist/chunk-5LWA54E4.js
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
useEditorContext
|
3
|
-
} from "./chunk-V253IGNY.js";
|
4
|
-
|
5
|
-
// src/components/create-component.ts
|
6
|
-
import { createElement } from "preact";
|
7
|
-
import {
|
8
|
-
forwardRef
|
9
|
-
} from "preact/compat";
|
10
|
-
import { useLayoutEffect, useState } from "preact/hooks";
|
11
|
-
import { mergeRefs } from "react-merge-refs";
|
12
|
-
function createComponent(tagName, displayName, defaultProps) {
|
13
|
-
const propertyNames = Object.keys(defaultProps);
|
14
|
-
const hasEditor = Object.hasOwn(defaultProps, "editor");
|
15
|
-
const Component = forwardRef((props, ref) => {
|
16
|
-
const [el, setEl] = useState(null);
|
17
|
-
const properties = {};
|
18
|
-
const attributes = {};
|
19
|
-
for (const [name, value] of Object.entries(props)) {
|
20
|
-
if (propertyNames.includes(name)) {
|
21
|
-
properties[name] = value;
|
22
|
-
} else {
|
23
|
-
attributes[name === "className" ? "class" : name] = value;
|
24
|
-
}
|
25
|
-
}
|
26
|
-
const editor = useEditorContext();
|
27
|
-
if (hasEditor && editor && !properties["editor"]) {
|
28
|
-
properties["editor"] = editor;
|
29
|
-
}
|
30
|
-
useLayoutEffect(() => {
|
31
|
-
if (el) {
|
32
|
-
for (const [name, value] of Object.entries(properties)) {
|
33
|
-
if (value !== void 0) {
|
34
|
-
el[name] = value;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
}
|
38
|
-
}, [el, ...propertyNames.map((name) => properties[name])]);
|
39
|
-
return createElement(tagName, {
|
40
|
-
...attributes,
|
41
|
-
ref: mergeRefs([ref, setEl])
|
42
|
-
});
|
43
|
-
});
|
44
|
-
Component.displayName = displayName;
|
45
|
-
return Component;
|
46
|
-
}
|
47
|
-
|
48
|
-
export {
|
49
|
-
createComponent
|
50
|
-
};
|