@prosekit/solid 0.4.11 → 0.4.13

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.
@@ -1,615 +0,0 @@
1
- import { Accessor } from 'solid-js';
2
- import { AutocompleteEmptyElement } from '@prosekit/web/autocomplete';
3
- import { AutocompleteEmptyEvents } from '@prosekit/web/autocomplete';
4
- import { AutocompleteEmptyProps as AutocompleteEmptyProps_2 } from '@prosekit/web/autocomplete';
5
- import { AutocompleteItemElement } from '@prosekit/web/autocomplete';
6
- import { AutocompleteItemEvents } from '@prosekit/web/autocomplete';
7
- import { AutocompleteItemProps as AutocompleteItemProps_2 } from '@prosekit/web/autocomplete';
8
- import { AutocompleteListElement } from '@prosekit/web/autocomplete';
9
- import { AutocompleteListEvents } from '@prosekit/web/autocomplete';
10
- import { AutocompleteListProps as AutocompleteListProps_2 } from '@prosekit/web/autocomplete';
11
- import { AutocompletePopoverElement } from '@prosekit/web/autocomplete';
12
- import { AutocompletePopoverEvents } from '@prosekit/web/autocomplete';
13
- import { AutocompletePopoverProps as AutocompletePopoverProps_2 } from '@prosekit/web/autocomplete';
14
- import { BlockHandleAddElement } from '@prosekit/web/block-handle';
15
- import { BlockHandleAddEvents } from '@prosekit/web/block-handle';
16
- import { BlockHandleAddProps as BlockHandleAddProps_2 } from '@prosekit/web/block-handle';
17
- import { BlockHandleDraggableElement } from '@prosekit/web/block-handle';
18
- import { BlockHandleDraggableEvents } from '@prosekit/web/block-handle';
19
- import { BlockHandleDraggableProps as BlockHandleDraggableProps_2 } from '@prosekit/web/block-handle';
20
- import { BlockHandlePopoverElement } from '@prosekit/web/block-handle';
21
- import { BlockHandlePopoverEvents } from '@prosekit/web/block-handle';
22
- import { BlockHandlePopoverProps as BlockHandlePopoverProps_2 } from '@prosekit/web/block-handle';
23
- import { Component } from 'solid-js';
24
- import { ContextProviderComponent } from 'solid-js';
25
- import type { CoreMarkViewUserOptions } from '@prosemirror-adapter/core';
26
- import type { CoreNodeViewUserOptions } from '@prosemirror-adapter/core';
27
- import { Editor } from '@prosekit/core';
28
- import type { EditorState } from '@prosekit/pm/state';
29
- import { Extension } from '@prosekit/core';
30
- import { InlinePopoverElement } from '@prosekit/web/inline-popover';
31
- import { InlinePopoverEvents } from '@prosekit/web/inline-popover';
32
- import { InlinePopoverProps as InlinePopoverProps_2 } from '@prosekit/web/inline-popover';
33
- import { JSX } from 'solid-js';
34
- import type { JSXElement } from 'solid-js';
35
- import { Keymap } from '@prosekit/core';
36
- import { MarkViewContextProps } from '@prosemirror-adapter/solid';
37
- import { NodeViewContextProps } from '@prosemirror-adapter/solid';
38
- import { ParentProps } from 'solid-js';
39
- import { PopoverContentElement } from '@prosekit/web/popover';
40
- import { PopoverContentEvents } from '@prosekit/web/popover';
41
- import { PopoverContentProps as PopoverContentProps_2 } from '@prosekit/web/popover';
42
- import { PopoverRootElement } from '@prosekit/web/popover';
43
- import { PopoverRootEvents } from '@prosekit/web/popover';
44
- import { PopoverRootProps as PopoverRootProps_2 } from '@prosekit/web/popover';
45
- import { PopoverTriggerElement } from '@prosekit/web/popover';
46
- import { PopoverTriggerEvents } from '@prosekit/web/popover';
47
- import { PopoverTriggerProps as PopoverTriggerProps_2 } from '@prosekit/web/popover';
48
- import { Priority } from '@prosekit/core';
49
- import type { ProseMirrorNode } from '@prosekit/pm/model';
50
- import { ResizableHandleElement } from '@prosekit/web/resizable';
51
- import { ResizableHandleEvents } from '@prosekit/web/resizable';
52
- import { ResizableHandleProps as ResizableHandleProps_2 } from '@prosekit/web/resizable';
53
- import { ResizableRootElement } from '@prosekit/web/resizable';
54
- import { ResizableRootEvents } from '@prosekit/web/resizable';
55
- import { ResizableRootProps as ResizableRootProps_2 } from '@prosekit/web/resizable';
56
- import { TableHandleColumnRootElement } from '@prosekit/web/table-handle';
57
- import { TableHandleColumnRootEvents } from '@prosekit/web/table-handle';
58
- import { TableHandleColumnRootProps as TableHandleColumnRootProps_2 } from '@prosekit/web/table-handle';
59
- import { TableHandleColumnTriggerElement } from '@prosekit/web/table-handle';
60
- import { TableHandleColumnTriggerEvents } from '@prosekit/web/table-handle';
61
- import { TableHandleColumnTriggerProps as TableHandleColumnTriggerProps_2 } from '@prosekit/web/table-handle';
62
- import { TableHandlePopoverContentElement } from '@prosekit/web/table-handle';
63
- import { TableHandlePopoverContentEvents } from '@prosekit/web/table-handle';
64
- import { TableHandlePopoverContentProps as TableHandlePopoverContentProps_2 } from '@prosekit/web/table-handle';
65
- import { TableHandlePopoverItemElement } from '@prosekit/web/table-handle';
66
- import { TableHandlePopoverItemEvents } from '@prosekit/web/table-handle';
67
- import { TableHandlePopoverItemProps as TableHandlePopoverItemProps_2 } from '@prosekit/web/table-handle';
68
- import { TableHandleRootElement } from '@prosekit/web/table-handle';
69
- import { TableHandleRootEvents } from '@prosekit/web/table-handle';
70
- import { TableHandleRootProps as TableHandleRootProps_2 } from '@prosekit/web/table-handle';
71
- import { TableHandleRowRootElement } from '@prosekit/web/table-handle';
72
- import { TableHandleRowRootEvents } from '@prosekit/web/table-handle';
73
- import { TableHandleRowRootProps as TableHandleRowRootProps_2 } from '@prosekit/web/table-handle';
74
- import { TableHandleRowTriggerElement } from '@prosekit/web/table-handle';
75
- import { TableHandleRowTriggerEvents } from '@prosekit/web/table-handle';
76
- import { TableHandleRowTriggerProps as TableHandleRowTriggerProps_2 } from '@prosekit/web/table-handle';
77
- import { TooltipContentElement } from '@prosekit/web/tooltip';
78
- import { TooltipContentEvents } from '@prosekit/web/tooltip';
79
- import { TooltipContentProps as TooltipContentProps_2 } from '@prosekit/web/tooltip';
80
- import { TooltipRootElement } from '@prosekit/web/tooltip';
81
- import { TooltipRootEvents } from '@prosekit/web/tooltip';
82
- import { TooltipRootProps as TooltipRootProps_2 } from '@prosekit/web/tooltip';
83
- import { TooltipTriggerElement } from '@prosekit/web/tooltip';
84
- import { TooltipTriggerEvents } from '@prosekit/web/tooltip';
85
- import { TooltipTriggerProps as TooltipTriggerProps_2 } from '@prosekit/web/tooltip';
86
-
87
- declare const AutocompleteEmpty: Component<Partial<AutocompleteEmptyProps> & JSX<AutocompleteEmptyElement>>;
88
- export { AutocompleteEmpty }
89
- export { AutocompleteEmpty as AutocompleteEmpty_alias_1 }
90
-
91
- /**
92
- * Props for the {@link AutocompleteEmpty} component.
93
- */
94
- declare interface AutocompleteEmptyProps extends Partial<CreateProps<AutocompleteEmptyProps_2, AutocompleteEmptyEvents>> {
95
- }
96
- export { AutocompleteEmptyProps }
97
- export { AutocompleteEmptyProps as AutocompleteEmptyProps_alias_1 }
98
-
99
- declare const AutocompleteItem: Component<Partial<AutocompleteItemProps> & JSX<AutocompleteItemElement>>;
100
- export { AutocompleteItem }
101
- export { AutocompleteItem as AutocompleteItem_alias_1 }
102
-
103
- /**
104
- * Props for the {@link AutocompleteItem} component.
105
- */
106
- declare interface AutocompleteItemProps extends Partial<CreateProps<AutocompleteItemProps_2, AutocompleteItemEvents>> {
107
- }
108
- export { AutocompleteItemProps }
109
- export { AutocompleteItemProps as AutocompleteItemProps_alias_1 }
110
-
111
- declare const AutocompleteList: Component<Partial<AutocompleteListProps> & JSX<AutocompleteListElement>>;
112
- export { AutocompleteList }
113
- export { AutocompleteList as AutocompleteList_alias_1 }
114
-
115
- /**
116
- * Props for the {@link AutocompleteList} component.
117
- */
118
- declare interface AutocompleteListProps extends Partial<CreateProps<AutocompleteListProps_2, AutocompleteListEvents>> {
119
- }
120
- export { AutocompleteListProps }
121
- export { AutocompleteListProps as AutocompleteListProps_alias_1 }
122
-
123
- declare const AutocompletePopover: Component<Partial<AutocompletePopoverProps> & JSX<AutocompletePopoverElement>>;
124
- export { AutocompletePopover }
125
- export { AutocompletePopover as AutocompletePopover_alias_1 }
126
-
127
- /**
128
- * Props for the {@link AutocompletePopover} component.
129
- */
130
- declare interface AutocompletePopoverProps extends Partial<CreateProps<AutocompletePopoverProps_2, AutocompletePopoverEvents>> {
131
- }
132
- export { AutocompletePopoverProps }
133
- export { AutocompletePopoverProps as AutocompletePopoverProps_alias_1 }
134
-
135
- declare const BlockHandleAdd: Component<Partial<BlockHandleAddProps> & JSX<BlockHandleAddElement>>;
136
- export { BlockHandleAdd }
137
- export { BlockHandleAdd as BlockHandleAdd_alias_1 }
138
-
139
- /**
140
- * Props for the {@link BlockHandleAdd} component.
141
- */
142
- declare interface BlockHandleAddProps extends Partial<CreateProps<BlockHandleAddProps_2, BlockHandleAddEvents>> {
143
- }
144
- export { BlockHandleAddProps }
145
- export { BlockHandleAddProps as BlockHandleAddProps_alias_1 }
146
-
147
- declare const BlockHandleDraggable: Component<Partial<BlockHandleDraggableProps> & JSX<BlockHandleDraggableElement>>;
148
- export { BlockHandleDraggable }
149
- export { BlockHandleDraggable as BlockHandleDraggable_alias_1 }
150
-
151
- /**
152
- * Props for the {@link BlockHandleDraggable} component.
153
- */
154
- declare interface BlockHandleDraggableProps extends Partial<CreateProps<BlockHandleDraggableProps_2, BlockHandleDraggableEvents>> {
155
- }
156
- export { BlockHandleDraggableProps }
157
- export { BlockHandleDraggableProps as BlockHandleDraggableProps_alias_1 }
158
-
159
- declare const BlockHandlePopover: Component<Partial<BlockHandlePopoverProps> & JSX<BlockHandlePopoverElement>>;
160
- export { BlockHandlePopover }
161
- export { BlockHandlePopover as BlockHandlePopover_alias_1 }
162
-
163
- /**
164
- * Props for the {@link BlockHandlePopover} component.
165
- */
166
- declare interface BlockHandlePopoverProps extends Partial<CreateProps<BlockHandlePopoverProps_2, BlockHandlePopoverEvents>> {
167
- }
168
- export { BlockHandlePopoverProps }
169
- export { BlockHandlePopoverProps as BlockHandlePopoverProps_alias_1 }
170
-
171
- /**
172
- * @internal
173
- */
174
- export declare function consumeSolidMarkViews(): void;
175
-
176
- /**
177
- * @internal
178
- */
179
- export declare function consumeSolidNodeViews(): void;
180
-
181
- export declare function createComponent<Props extends object, CustomElement extends HTMLElement>(tagName: string, propNames: string[], eventNames: string[]): Component<Partial<Props> & JSX.HTMLAttributes<CustomElement>>;
182
-
183
- declare type CreateEventProps<Events extends {
184
- [EventName in keyof Events]: CustomEvent;
185
- }> = {
186
- [EventName in keyof Events as `on${Capitalize<string & EventName>}`]: (event: EventName extends `${string}Change` ? Events[EventName]['detail'] : Events[EventName]) => void;
187
- };
188
-
189
- export declare type CreateProps<Props extends {
190
- [PropName in keyof Props]: unknown;
191
- }, Events extends {
192
- [EventName in keyof Events]: CustomEvent;
193
- }> = Props & CreateEventProps<Events>;
194
-
195
- /**
196
- * Defines a mark view using a Solid component.
197
- *
198
- * @public
199
- */
200
- declare function defineSolidMarkView(options: SolidMarkViewOptions): Extension;
201
- export { defineSolidMarkView }
202
- export { defineSolidMarkView as defineSolidMarkView_alias_1 }
203
-
204
- /**
205
- * Defines a node view using a Solid component.
206
- *
207
- * @public
208
- */
209
- declare function defineSolidNodeView(options: SolidNodeViewOptions): Extension;
210
- export { defineSolidNodeView }
211
- export { defineSolidNodeView as defineSolidNodeView_alias_1 }
212
-
213
- /**
214
- * @internal
215
- */
216
- export declare const EditorContextProvider: ContextProviderComponent<Editor<any> | null>;
217
-
218
- declare const InlinePopover: Component<Partial<InlinePopoverProps> & JSX<InlinePopoverElement>>;
219
- export { InlinePopover }
220
- export { InlinePopover as InlinePopover_alias_1 }
221
-
222
- /**
223
- * Props for the {@link InlinePopover} component.
224
- */
225
- declare interface InlinePopoverProps extends Partial<CreateProps<InlinePopoverProps_2, InlinePopoverEvents>> {
226
- }
227
- export { InlinePopoverProps }
228
- export { InlinePopoverProps as InlinePopoverProps_alias_1 }
229
-
230
- /**
231
- * T or a reactive/non-reactive function returning T
232
- */
233
- declare type MaybeAccessor<T> = T | Accessor<T>;
234
- export { MaybeAccessor }
235
- export { MaybeAccessor as MaybeAccessor_alias_1 }
236
-
237
- /**
238
- * Accessed value of a MaybeAccessor
239
- *
240
- * @example
241
- *
242
- * ```ts
243
- * MaybeAccessorValue<MaybeAccessor<string>>
244
- * // => string
245
- * MaybeAccessorValue<MaybeAccessor<() => string>>
246
- * // => string | (() => string)
247
- * MaybeAccessorValue<MaybeAccessor<string> | Function>
248
- * // => string | void
249
- * ```
250
- */
251
- export declare type MaybeAccessorValue<T extends MaybeAccessor<any>> = T extends () => any ? ReturnType<T> : T;
252
-
253
- declare const PopoverContent: Component<Partial<PopoverContentProps> & JSX<PopoverContentElement>>;
254
- export { PopoverContent }
255
- export { PopoverContent as PopoverContent_alias_1 }
256
-
257
- /**
258
- * Props for the {@link PopoverContent} component.
259
- */
260
- declare interface PopoverContentProps extends Partial<CreateProps<PopoverContentProps_2, PopoverContentEvents>> {
261
- }
262
- export { PopoverContentProps }
263
- export { PopoverContentProps as PopoverContentProps_alias_1 }
264
-
265
- declare const PopoverRoot: Component<Partial<PopoverRootProps> & JSX<PopoverRootElement>>;
266
- export { PopoverRoot }
267
- export { PopoverRoot as PopoverRoot_alias_1 }
268
-
269
- /**
270
- * Props for the {@link PopoverRoot} component.
271
- */
272
- declare interface PopoverRootProps extends Partial<CreateProps<PopoverRootProps_2, PopoverRootEvents>> {
273
- }
274
- export { PopoverRootProps }
275
- export { PopoverRootProps as PopoverRootProps_alias_1 }
276
-
277
- declare const PopoverTrigger: Component<Partial<PopoverTriggerProps> & JSX<PopoverTriggerElement>>;
278
- export { PopoverTrigger }
279
- export { PopoverTrigger as PopoverTrigger_alias_1 }
280
-
281
- /**
282
- * Props for the {@link PopoverTrigger} component.
283
- */
284
- declare interface PopoverTriggerProps extends Partial<CreateProps<PopoverTriggerProps_2, PopoverTriggerEvents>> {
285
- }
286
- export { PopoverTriggerProps }
287
- export { PopoverTriggerProps as PopoverTriggerProps_alias_1 }
288
-
289
- /**
290
- * @internal
291
- */
292
- declare type PropsWithChildren<P = unknown> = P & {
293
- children?: JSXElement | undefined;
294
- };
295
- export { PropsWithChildren }
296
- export { PropsWithChildren as PropsWithChildren_alias_1 }
297
-
298
- /**
299
- * @internal
300
- */
301
- declare type PropsWithClass<P = unknown> = P & {
302
- class?: string | undefined;
303
- };
304
- export { PropsWithClass }
305
- export { PropsWithClass as PropsWithClass_alias_1 }
306
-
307
- /**
308
- * The root component for a ProseKit editor.
309
- *
310
- * @public
311
- */
312
- declare const ProseKit: Component<ProseKitProps>;
313
- export { ProseKit }
314
- export { ProseKit as ProseKit_alias_1 }
315
-
316
- declare type ProseKitProps = ParentProps<{
317
- editor: Editor;
318
- }>;
319
- export { ProseKitProps }
320
- export { ProseKitProps as ProseKitProps_alias_1 }
321
-
322
- declare const ResizableHandle: Component<Partial<ResizableHandleProps> & JSX<ResizableHandleElement>>;
323
- export { ResizableHandle }
324
- export { ResizableHandle as ResizableHandle_alias_1 }
325
-
326
- /**
327
- * Props for the {@link ResizableHandle} component.
328
- */
329
- declare interface ResizableHandleProps extends Partial<CreateProps<ResizableHandleProps_2, ResizableHandleEvents>> {
330
- }
331
- export { ResizableHandleProps }
332
- export { ResizableHandleProps as ResizableHandleProps_alias_1 }
333
-
334
- declare const ResizableRoot: Component<Partial<ResizableRootProps> & JSX<ResizableRootElement>>;
335
- export { ResizableRoot }
336
- export { ResizableRoot as ResizableRoot_alias_1 }
337
-
338
- /**
339
- * Props for the {@link ResizableRoot} component.
340
- */
341
- declare interface ResizableRootProps extends Partial<CreateProps<ResizableRootProps_2, ResizableRootEvents>> {
342
- }
343
- export { ResizableRootProps }
344
- export { ResizableRootProps as ResizableRootProps_alias_1 }
345
-
346
- /**
347
- * @public
348
- */
349
- declare type SolidMarkViewComponent = Component<SolidMarkViewProps>;
350
- export { SolidMarkViewComponent }
351
- export { SolidMarkViewComponent as SolidMarkViewComponent_alias_1 }
352
-
353
- /**
354
- * Options for {@link defineSolidMarkView}.
355
- *
356
- * @public
357
- */
358
- declare interface SolidMarkViewOptions extends CoreMarkViewUserOptions<SolidMarkViewComponent> {
359
- /**
360
- * The name of the mark type.
361
- */
362
- name: string;
363
- }
364
- export { SolidMarkViewOptions }
365
- export { SolidMarkViewOptions as SolidMarkViewOptions_alias_1 }
366
-
367
- /**
368
- * @public
369
- */
370
- declare interface SolidMarkViewProps extends MarkViewContextProps {
371
- }
372
- export { SolidMarkViewProps }
373
- export { SolidMarkViewProps as SolidMarkViewProps_alias_1 }
374
-
375
- /**
376
- * @public
377
- */
378
- declare type SolidNodeViewComponent = Component<SolidNodeViewProps>;
379
- export { SolidNodeViewComponent }
380
- export { SolidNodeViewComponent as SolidNodeViewComponent_alias_1 }
381
-
382
- /**
383
- * Options for {@link defineSolidNodeView}.
384
- *
385
- * @public
386
- */
387
- declare interface SolidNodeViewOptions extends CoreNodeViewUserOptions<SolidNodeViewComponent> {
388
- /**
389
- * The name of the node type.
390
- */
391
- name: string;
392
- }
393
- export { SolidNodeViewOptions }
394
- export { SolidNodeViewOptions as SolidNodeViewOptions_alias_1 }
395
-
396
- /**
397
- * @public
398
- */
399
- declare interface SolidNodeViewProps extends NodeViewContextProps {
400
- }
401
- export { SolidNodeViewProps }
402
- export { SolidNodeViewProps as SolidNodeViewProps_alias_1 }
403
-
404
- declare const TableHandleColumnRoot: Component<Partial<TableHandleColumnRootProps> & JSX<TableHandleColumnRootElement>>;
405
- export { TableHandleColumnRoot }
406
- export { TableHandleColumnRoot as TableHandleColumnRoot_alias_1 }
407
-
408
- /**
409
- * Props for the {@link TableHandleColumnRoot} component.
410
- */
411
- declare interface TableHandleColumnRootProps extends Partial<CreateProps<TableHandleColumnRootProps_2, TableHandleColumnRootEvents>> {
412
- }
413
- export { TableHandleColumnRootProps }
414
- export { TableHandleColumnRootProps as TableHandleColumnRootProps_alias_1 }
415
-
416
- declare const TableHandleColumnTrigger: Component<Partial<TableHandleColumnTriggerProps> & JSX<TableHandleColumnTriggerElement>>;
417
- export { TableHandleColumnTrigger }
418
- export { TableHandleColumnTrigger as TableHandleColumnTrigger_alias_1 }
419
-
420
- /**
421
- * Props for the {@link TableHandleColumnTrigger} component.
422
- */
423
- declare interface TableHandleColumnTriggerProps extends Partial<CreateProps<TableHandleColumnTriggerProps_2, TableHandleColumnTriggerEvents>> {
424
- }
425
- export { TableHandleColumnTriggerProps }
426
- export { TableHandleColumnTriggerProps as TableHandleColumnTriggerProps_alias_1 }
427
-
428
- declare const TableHandlePopoverContent: Component<Partial<TableHandlePopoverContentProps> & JSX<TableHandlePopoverContentElement>>;
429
- export { TableHandlePopoverContent }
430
- export { TableHandlePopoverContent as TableHandlePopoverContent_alias_1 }
431
-
432
- /**
433
- * Props for the {@link TableHandlePopoverContent} component.
434
- */
435
- declare interface TableHandlePopoverContentProps extends Partial<CreateProps<TableHandlePopoverContentProps_2, TableHandlePopoverContentEvents>> {
436
- }
437
- export { TableHandlePopoverContentProps }
438
- export { TableHandlePopoverContentProps as TableHandlePopoverContentProps_alias_1 }
439
-
440
- declare const TableHandlePopoverItem: Component<Partial<TableHandlePopoverItemProps> & JSX<TableHandlePopoverItemElement>>;
441
- export { TableHandlePopoverItem }
442
- export { TableHandlePopoverItem as TableHandlePopoverItem_alias_1 }
443
-
444
- /**
445
- * Props for the {@link TableHandlePopoverItem} component.
446
- */
447
- declare interface TableHandlePopoverItemProps extends Partial<CreateProps<TableHandlePopoverItemProps_2, TableHandlePopoverItemEvents>> {
448
- }
449
- export { TableHandlePopoverItemProps }
450
- export { TableHandlePopoverItemProps as TableHandlePopoverItemProps_alias_1 }
451
-
452
- declare const TableHandleRoot: Component<Partial<TableHandleRootProps> & JSX<TableHandleRootElement>>;
453
- export { TableHandleRoot }
454
- export { TableHandleRoot as TableHandleRoot_alias_1 }
455
-
456
- /**
457
- * Props for the {@link TableHandleRoot} component.
458
- */
459
- declare interface TableHandleRootProps extends Partial<CreateProps<TableHandleRootProps_2, TableHandleRootEvents>> {
460
- }
461
- export { TableHandleRootProps }
462
- export { TableHandleRootProps as TableHandleRootProps_alias_1 }
463
-
464
- declare const TableHandleRowRoot: Component<Partial<TableHandleRowRootProps> & JSX<TableHandleRowRootElement>>;
465
- export { TableHandleRowRoot }
466
- export { TableHandleRowRoot as TableHandleRowRoot_alias_1 }
467
-
468
- /**
469
- * Props for the {@link TableHandleRowRoot} component.
470
- */
471
- declare interface TableHandleRowRootProps extends Partial<CreateProps<TableHandleRowRootProps_2, TableHandleRowRootEvents>> {
472
- }
473
- export { TableHandleRowRootProps }
474
- export { TableHandleRowRootProps as TableHandleRowRootProps_alias_1 }
475
-
476
- declare const TableHandleRowTrigger: Component<Partial<TableHandleRowTriggerProps> & JSX<TableHandleRowTriggerElement>>;
477
- export { TableHandleRowTrigger }
478
- export { TableHandleRowTrigger as TableHandleRowTrigger_alias_1 }
479
-
480
- /**
481
- * Props for the {@link TableHandleRowTrigger} component.
482
- */
483
- declare interface TableHandleRowTriggerProps extends Partial<CreateProps<TableHandleRowTriggerProps_2, TableHandleRowTriggerEvents>> {
484
- }
485
- export { TableHandleRowTriggerProps }
486
- export { TableHandleRowTriggerProps as TableHandleRowTriggerProps_alias_1 }
487
-
488
- declare const TooltipContent: Component<Partial<TooltipContentProps> & JSX<TooltipContentElement>>;
489
- export { TooltipContent }
490
- export { TooltipContent as TooltipContent_alias_1 }
491
-
492
- /**
493
- * Props for the {@link TooltipContent} component.
494
- */
495
- declare interface TooltipContentProps extends Partial<CreateProps<TooltipContentProps_2, TooltipContentEvents>> {
496
- }
497
- export { TooltipContentProps }
498
- export { TooltipContentProps as TooltipContentProps_alias_1 }
499
-
500
- declare const TooltipRoot: Component<Partial<TooltipRootProps> & JSX<TooltipRootElement>>;
501
- export { TooltipRoot }
502
- export { TooltipRoot as TooltipRoot_alias_1 }
503
-
504
- /**
505
- * Props for the {@link TooltipRoot} component.
506
- */
507
- declare interface TooltipRootProps extends Partial<CreateProps<TooltipRootProps_2, TooltipRootEvents>> {
508
- }
509
- export { TooltipRootProps }
510
- export { TooltipRootProps as TooltipRootProps_alias_1 }
511
-
512
- declare const TooltipTrigger: Component<Partial<TooltipTriggerProps> & JSX<TooltipTriggerElement>>;
513
- export { TooltipTrigger }
514
- export { TooltipTrigger as TooltipTrigger_alias_1 }
515
-
516
- /**
517
- * Props for the {@link TooltipTrigger} component.
518
- */
519
- declare interface TooltipTriggerProps extends Partial<CreateProps<TooltipTriggerProps_2, TooltipTriggerEvents>> {
520
- }
521
- export { TooltipTriggerProps }
522
- export { TooltipTriggerProps as TooltipTriggerProps_alias_1 }
523
-
524
- /**
525
- * Accesses the value of a MaybeAccessor
526
- *
527
- * @example
528
- * ```ts
529
- * access("foo") // => "foo"
530
- * access(() => "foo") // => "foo"
531
- * ```
532
- */
533
- export declare function toValue<T extends MaybeAccessor<any>>(v: T): MaybeAccessorValue<T>;
534
-
535
- /**
536
- * Calls the given handler whenever the editor document changes.
537
- *
538
- * @public
539
- */
540
- declare function useDocChange(handler: (doc: ProseMirrorNode) => void, options?: UseExtensionOptions): void;
541
- export { useDocChange }
542
- export { useDocChange as useDocChange_alias_1 }
543
-
544
- /**
545
- * Retrieves the editor instance from the nearest ProseKit component.
546
- *
547
- * @public
548
- */
549
- declare function useEditor<E extends Extension = any>(options?: {
550
- /**
551
- * Whether to update the component when the editor is mounted or editor state
552
- * is updated.
553
- *
554
- * @default false
555
- */
556
- update?: boolean;
557
- }): () => Editor<E>;
558
- export { useEditor }
559
- export { useEditor as useEditor_alias_1 }
560
-
561
- /**
562
- * @internal
563
- */
564
- export declare function useEditorContext<E extends Extension>(): Editor<E> | null;
565
-
566
- /**
567
- * @internal
568
- */
569
- export declare function useEditorExtension(editorAccessor: MaybeAccessor<Editor> | undefined | null, extensionAccessor: Accessor<Extension | null>): void;
570
-
571
- /**
572
- * Add an extension to the editor.
573
- */
574
- declare function useExtension(
575
- /**
576
- * The accessor to an extension to add to the editor. If it changes, the previous
577
- * extension will be removed and the new one (if not null) will be added.
578
- */
579
- extension: Accessor<Extension | null>, options?: UseExtensionOptions): void;
580
- export { useExtension }
581
- export { useExtension as useExtension_alias_1 }
582
-
583
- declare interface UseExtensionOptions {
584
- /**
585
- * The editor to add the extension to. If not provided, it will use the
586
- * editor from the nearest `ProseKit` component.
587
- */
588
- editor?: MaybeAccessor<Editor>;
589
- /**
590
- * Optional priority to add the extension with.
591
- */
592
- priority?: Priority;
593
- }
594
- export { UseExtensionOptions }
595
- export { UseExtensionOptions as UseExtensionOptions_alias_1 }
596
-
597
- declare function useKeymap(keymap: () => Keymap, options?: UseExtensionOptions): void;
598
- export { useKeymap }
599
- export { useKeymap as useKeymap_alias_1 }
600
-
601
- /**
602
- * @internal
603
- */
604
- export declare function usePriorityExtension<T extends Extension = Extension>(extension: () => T | null, priority?: Priority | null): () => T | null;
605
-
606
- /**
607
- * Calls the given handler whenever the editor state changes.
608
- *
609
- * @public
610
- */
611
- declare function useStateUpdate(handler: (state: EditorState) => void, options?: UseExtensionOptions): void;
612
- export { useStateUpdate }
613
- export { useStateUpdate as useStateUpdate_alias_1 }
614
-
615
- export { }
@@ -1,45 +0,0 @@
1
- import {
2
- useEditorContext
3
- } from "./chunk-XDDJIQ4M.js";
4
-
5
- // src/components/create-component.ts
6
- import h from "solid-js/h";
7
- function createComponent(tagName, propNames, eventNames) {
8
- const hasEditor = propNames.includes("editor");
9
- const lowerCaseEventNameMap = Object.fromEntries(
10
- eventNames.map((name) => [name.toLowerCase(), name])
11
- );
12
- const Component = (props) => {
13
- const properties = {};
14
- const eventHandlers = {};
15
- for (const name of Object.keys(props)) {
16
- if (propNames.includes(name)) {
17
- properties["prop:" + name] = () => props[name];
18
- continue;
19
- }
20
- if (name.startsWith("on")) {
21
- const lowerCaseEventName = name.slice(2).toLowerCase();
22
- const eventName = lowerCaseEventNameMap[lowerCaseEventName];
23
- if (eventName) {
24
- const extractDetail = eventName.endsWith("Change");
25
- eventHandlers["on:" + eventName] = (event) => {
26
- const handler = props[name];
27
- handler(extractDetail ? event.detail : event);
28
- };
29
- continue;
30
- }
31
- }
32
- properties[name] = () => props[name];
33
- }
34
- const editor = useEditorContext();
35
- if (hasEditor && editor) {
36
- properties["prop:editor"] = () => props["editor"] || editor;
37
- }
38
- return h(tagName, { ...properties, ...eventHandlers });
39
- };
40
- return Component;
41
- }
42
-
43
- export {
44
- createComponent
45
- };
@@ -1,15 +0,0 @@
1
- // src/contexts/editor-context.ts
2
- import {
3
- createContext,
4
- useContext
5
- } from "solid-js";
6
- var editorContext = createContext(null);
7
- function useEditorContext() {
8
- return useContext(editorContext);
9
- }
10
- var EditorContextProvider = editorContext.Provider;
11
-
12
- export {
13
- useEditorContext,
14
- EditorContextProvider
15
- };