@prosekit/web 0.3.12 → 0.3.14
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 +426 -6
- package/dist/prosekit-web-autocomplete.js +16 -20
- package/dist/prosekit-web-block-handle.d.ts +9 -0
- package/dist/prosekit-web-block-handle.js +139 -45
- package/dist/prosekit-web-table-handle.d.ts +21 -0
- package/dist/prosekit-web-table-handle.js +440 -0
- package/package.json +14 -4
|
@@ -7,14 +7,18 @@ import { defaultPopoverRootProps } from '@aria-ui/popover';
|
|
|
7
7
|
import { defaultPopoverTriggerProps } from '@aria-ui/popover';
|
|
8
8
|
import { defaultTooltipRootProps } from '@aria-ui/tooltip';
|
|
9
9
|
import { defaultTooltipTriggerProps } from '@aria-ui/tooltip';
|
|
10
|
+
import type { defineTableCommands } from '@prosekit/extensions/table';
|
|
10
11
|
import { Editor } from '@prosekit/core';
|
|
11
12
|
import type { EditorView } from '@prosekit/pm/view';
|
|
12
13
|
import type { EmptyObject } from '@aria-ui/core';
|
|
13
14
|
import { Extension } from '@prosekit/core';
|
|
14
15
|
import { ExtensionTyping } from '@prosekit/core';
|
|
15
16
|
import { FocusChangeHandler } from '@prosekit/core';
|
|
17
|
+
import { ItemFilter } from '@aria-ui/collection';
|
|
16
18
|
import { Keymap } from '@prosekit/core';
|
|
17
19
|
import { ListboxProps } from '@aria-ui/listbox';
|
|
20
|
+
import { MenuContentProps } from '@aria-ui/menu';
|
|
21
|
+
import { MenuItemProps } from '@aria-ui/menu';
|
|
18
22
|
import { Options } from 'tsup';
|
|
19
23
|
import { OverlayPositionerProps } from '@aria-ui/overlay';
|
|
20
24
|
import type { Placement } from '@floating-ui/dom';
|
|
@@ -175,6 +179,9 @@ declare const BlockDragHandleElement_base: {
|
|
|
175
179
|
prototype: HTMLElement;
|
|
176
180
|
};
|
|
177
181
|
|
|
182
|
+
/**
|
|
183
|
+
* @deprecated Use `BlockHandleDraggableProps` instead.
|
|
184
|
+
*/
|
|
178
185
|
declare interface BlockDragHandleProps {
|
|
179
186
|
/**
|
|
180
187
|
* The ProseKit editor instance.
|
|
@@ -186,14 +193,67 @@ declare interface BlockDragHandleProps {
|
|
|
186
193
|
export { BlockDragHandleProps }
|
|
187
194
|
export { BlockDragHandleProps as BlockDragHandleProps_alias_1 }
|
|
188
195
|
|
|
196
|
+
declare class BlockHandleAddElement extends BlockHandleAddElement_base {
|
|
197
|
+
}
|
|
198
|
+
export { BlockHandleAddElement }
|
|
199
|
+
export { BlockHandleAddElement as BlockHandleAddElement_alias_1 }
|
|
200
|
+
|
|
201
|
+
declare const BlockHandleAddElement_base: {
|
|
202
|
+
new (): BaseElement & BlockHandleAddProps;
|
|
203
|
+
prototype: HTMLElement;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
declare interface BlockHandleAddProps {
|
|
207
|
+
/**
|
|
208
|
+
* The ProseKit editor instance.
|
|
209
|
+
*
|
|
210
|
+
* @default null
|
|
211
|
+
*/
|
|
212
|
+
editor: Editor | null;
|
|
213
|
+
}
|
|
214
|
+
export { BlockHandleAddProps }
|
|
215
|
+
export { BlockHandleAddProps as BlockHandleAddProps_alias_1 }
|
|
216
|
+
|
|
217
|
+
declare class BlockHandleDraggableElement extends BlockHandleDraggableElement_base {
|
|
218
|
+
}
|
|
219
|
+
export { BlockHandleDraggableElement }
|
|
220
|
+
export { BlockHandleDraggableElement as BlockHandleDraggableElement_alias_1 }
|
|
221
|
+
|
|
222
|
+
declare const BlockHandleDraggableElement_base: {
|
|
223
|
+
new (): BaseElement & BlockHandleDraggableProps;
|
|
224
|
+
prototype: HTMLElement;
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
declare interface BlockHandleDraggableProps {
|
|
228
|
+
/**
|
|
229
|
+
* The ProseKit editor instance.
|
|
230
|
+
*
|
|
231
|
+
* @default null
|
|
232
|
+
*/
|
|
233
|
+
editor: Editor | null;
|
|
234
|
+
}
|
|
235
|
+
export { BlockHandleDraggableProps }
|
|
236
|
+
export { BlockHandleDraggableProps as BlockHandleDraggableProps_alias_1 }
|
|
237
|
+
|
|
238
|
+
declare class BlockHandlePopoverElement extends BlockHandlePopoverElement_base {
|
|
239
|
+
}
|
|
240
|
+
export { BlockHandlePopoverElement }
|
|
241
|
+
export { BlockHandlePopoverElement as BlockHandlePopoverElement_alias_1 }
|
|
242
|
+
|
|
243
|
+
declare const BlockHandlePopoverElement_base: {
|
|
244
|
+
new (): BaseElement & BlockHandlePopoverProps;
|
|
245
|
+
prototype: HTMLElement;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
declare interface BlockHandlePopoverProps extends BlockPopoverProps {
|
|
249
|
+
}
|
|
250
|
+
export { BlockHandlePopoverProps }
|
|
251
|
+
export { BlockHandlePopoverProps as BlockHandlePopoverProps_alias_1 }
|
|
252
|
+
|
|
189
253
|
/**
|
|
190
254
|
* @internal
|
|
191
255
|
*/
|
|
192
|
-
export declare
|
|
193
|
-
pos: number | null;
|
|
194
|
-
node: ProseMirrorNode | null;
|
|
195
|
-
element: HTMLElement | null;
|
|
196
|
-
}
|
|
256
|
+
export declare type BlockPopoverContext = HoverState | null;
|
|
197
257
|
|
|
198
258
|
/**
|
|
199
259
|
* @internal
|
|
@@ -294,6 +354,43 @@ declare const defaultBlockDragHandleProps: Readonly<{
|
|
|
294
354
|
export { defaultBlockDragHandleProps }
|
|
295
355
|
export { defaultBlockDragHandleProps as defaultBlockDragHandleProps_alias_1 }
|
|
296
356
|
|
|
357
|
+
declare const defaultBlockHandleAddProps: Readonly<{
|
|
358
|
+
editor: null;
|
|
359
|
+
}>;
|
|
360
|
+
export { defaultBlockHandleAddProps }
|
|
361
|
+
export { defaultBlockHandleAddProps as defaultBlockHandleAddProps_alias_1 }
|
|
362
|
+
|
|
363
|
+
declare const defaultBlockHandleDraggableProps: Readonly<{
|
|
364
|
+
editor: null;
|
|
365
|
+
}>;
|
|
366
|
+
export { defaultBlockHandleDraggableProps }
|
|
367
|
+
export { defaultBlockHandleDraggableProps as defaultBlockHandleDraggableProps_alias_1 }
|
|
368
|
+
|
|
369
|
+
declare const defaultBlockHandlePopoverProps: Readonly<{
|
|
370
|
+
editor: null;
|
|
371
|
+
placement: "left-start";
|
|
372
|
+
offset: 4;
|
|
373
|
+
strategy: "absolute";
|
|
374
|
+
autoUpdate: true;
|
|
375
|
+
hoist: false;
|
|
376
|
+
transform: false;
|
|
377
|
+
flip: false;
|
|
378
|
+
shift: false;
|
|
379
|
+
overlap: false;
|
|
380
|
+
fitViewport: false;
|
|
381
|
+
sameWidth: false;
|
|
382
|
+
sameHeight: false;
|
|
383
|
+
inline: false;
|
|
384
|
+
hide: false;
|
|
385
|
+
boundary: "clippingAncestors";
|
|
386
|
+
rootBoundary: "viewport";
|
|
387
|
+
overflowPadding: 0;
|
|
388
|
+
elementContext: "floating";
|
|
389
|
+
altBoundary: true;
|
|
390
|
+
}>;
|
|
391
|
+
export { defaultBlockHandlePopoverProps }
|
|
392
|
+
export { defaultBlockHandlePopoverProps as defaultBlockHandlePopoverProps_alias_1 }
|
|
393
|
+
|
|
297
394
|
declare const defaultBlockPopoverProps: Readonly<{
|
|
298
395
|
editor: null;
|
|
299
396
|
placement: "left-start";
|
|
@@ -376,6 +473,117 @@ declare const defaultResizableRootProps: {
|
|
|
376
473
|
export { defaultResizableRootProps }
|
|
377
474
|
export { defaultResizableRootProps as defaultResizableRootProps_alias_1 }
|
|
378
475
|
|
|
476
|
+
declare const defaultTableHandleColumnRootProps: Readonly<{
|
|
477
|
+
editor: null;
|
|
478
|
+
placement: "top";
|
|
479
|
+
strategy: "absolute";
|
|
480
|
+
autoUpdate: true;
|
|
481
|
+
hoist: false;
|
|
482
|
+
transform: false;
|
|
483
|
+
offset: null;
|
|
484
|
+
flip: false;
|
|
485
|
+
shift: false;
|
|
486
|
+
overlap: false;
|
|
487
|
+
fitViewport: false;
|
|
488
|
+
sameWidth: false;
|
|
489
|
+
sameHeight: false;
|
|
490
|
+
inline: false;
|
|
491
|
+
hide: false;
|
|
492
|
+
boundary: "clippingAncestors";
|
|
493
|
+
rootBoundary: "viewport";
|
|
494
|
+
overflowPadding: 0;
|
|
495
|
+
elementContext: "floating";
|
|
496
|
+
altBoundary: true;
|
|
497
|
+
}>;
|
|
498
|
+
export { defaultTableHandleColumnRootProps }
|
|
499
|
+
export { defaultTableHandleColumnRootProps as defaultTableHandleColumnRootProps_alias_1 }
|
|
500
|
+
|
|
501
|
+
declare const defaultTableHandleColumnTriggerProps: Readonly<{
|
|
502
|
+
editor: null;
|
|
503
|
+
}>;
|
|
504
|
+
export { defaultTableHandleColumnTriggerProps }
|
|
505
|
+
export { defaultTableHandleColumnTriggerProps as defaultTableHandleColumnTriggerProps_alias_1 }
|
|
506
|
+
|
|
507
|
+
declare const defaultTableHandlePopoverContentProps: Readonly<{
|
|
508
|
+
placement: "right-start";
|
|
509
|
+
offset: {
|
|
510
|
+
mainAxis: number;
|
|
511
|
+
crossAxis: number;
|
|
512
|
+
};
|
|
513
|
+
editor: null;
|
|
514
|
+
onKeydownHandlerAdd: null;
|
|
515
|
+
hoist: true;
|
|
516
|
+
flip: true;
|
|
517
|
+
shift: true;
|
|
518
|
+
overflowPadding: 4;
|
|
519
|
+
onEscapeKeyDown: null;
|
|
520
|
+
onPointerDownOutside: null;
|
|
521
|
+
onFocusOutside: null;
|
|
522
|
+
onInteractOutside: null;
|
|
523
|
+
strategy: "absolute";
|
|
524
|
+
autoUpdate: true;
|
|
525
|
+
transform: false;
|
|
526
|
+
overlap: false;
|
|
527
|
+
fitViewport: false;
|
|
528
|
+
sameWidth: false;
|
|
529
|
+
sameHeight: false;
|
|
530
|
+
inline: false;
|
|
531
|
+
hide: false;
|
|
532
|
+
boundary: "clippingAncestors";
|
|
533
|
+
rootBoundary: "viewport";
|
|
534
|
+
elementContext: "floating";
|
|
535
|
+
altBoundary: true;
|
|
536
|
+
}>;
|
|
537
|
+
export { defaultTableHandlePopoverContentProps }
|
|
538
|
+
export { defaultTableHandlePopoverContentProps as defaultTableHandlePopoverContentProps_alias_1 }
|
|
539
|
+
|
|
540
|
+
declare const defaultTableHandlePopoverItemProps: Readonly<{
|
|
541
|
+
disabled: false;
|
|
542
|
+
value: "";
|
|
543
|
+
query: "";
|
|
544
|
+
filter: ItemFilter;
|
|
545
|
+
onSelect: null;
|
|
546
|
+
}>;
|
|
547
|
+
export { defaultTableHandlePopoverItemProps }
|
|
548
|
+
export { defaultTableHandlePopoverItemProps as defaultTableHandlePopoverItemProps_alias_1 }
|
|
549
|
+
|
|
550
|
+
declare const defaultTableHandleRootProps: Readonly<{
|
|
551
|
+
editor: null;
|
|
552
|
+
}>;
|
|
553
|
+
export { defaultTableHandleRootProps }
|
|
554
|
+
export { defaultTableHandleRootProps as defaultTableHandleRootProps_alias_1 }
|
|
555
|
+
|
|
556
|
+
declare const defaultTableHandleRowRootProps: Readonly<{
|
|
557
|
+
editor: null;
|
|
558
|
+
placement: "left";
|
|
559
|
+
strategy: "absolute";
|
|
560
|
+
autoUpdate: true;
|
|
561
|
+
hoist: false;
|
|
562
|
+
transform: false;
|
|
563
|
+
offset: null;
|
|
564
|
+
flip: false;
|
|
565
|
+
shift: false;
|
|
566
|
+
overlap: false;
|
|
567
|
+
fitViewport: false;
|
|
568
|
+
sameWidth: false;
|
|
569
|
+
sameHeight: false;
|
|
570
|
+
inline: false;
|
|
571
|
+
hide: false;
|
|
572
|
+
boundary: "clippingAncestors";
|
|
573
|
+
rootBoundary: "viewport";
|
|
574
|
+
overflowPadding: 0;
|
|
575
|
+
elementContext: "floating";
|
|
576
|
+
altBoundary: true;
|
|
577
|
+
}>;
|
|
578
|
+
export { defaultTableHandleRowRootProps }
|
|
579
|
+
export { defaultTableHandleRowRootProps as defaultTableHandleRowRootProps_alias_1 }
|
|
580
|
+
|
|
581
|
+
declare const defaultTableHandleRowTriggerProps: Readonly<{
|
|
582
|
+
editor: null;
|
|
583
|
+
}>;
|
|
584
|
+
export { defaultTableHandleRowTriggerProps }
|
|
585
|
+
export { defaultTableHandleRowTriggerProps as defaultTableHandleRowTriggerProps_alias_1 }
|
|
586
|
+
|
|
379
587
|
declare const defaultTooltipContentProps: {
|
|
380
588
|
shift: true;
|
|
381
589
|
flip: true;
|
|
@@ -406,14 +614,35 @@ export { defaultTooltipRootProps as defaultTooltipRootProps_alias_1 }
|
|
|
406
614
|
export { defaultTooltipTriggerProps }
|
|
407
615
|
export { defaultTooltipTriggerProps as defaultTooltipTriggerProps_alias_1 }
|
|
408
616
|
|
|
617
|
+
export declare function defineCellHoverHandler(handler: (hoveringCell: HoveringCellInfo | null) => void): Extension<ExtensionTyping<any, any, any>>;
|
|
618
|
+
|
|
409
619
|
export declare function defineCustomElement(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void;
|
|
410
620
|
|
|
411
621
|
export declare function defineElementHoverHandler(handler: ElementHoverHandler): Union<readonly [Extension<ExtensionTyping<any, any, any>>, Extension<ExtensionTyping<any, any, any>>, Extension<ExtensionTyping<any, any, any>>]>;
|
|
412
622
|
|
|
413
|
-
export declare type ElementHoverHandler = (reference: VirtualElement | null,
|
|
623
|
+
export declare type ElementHoverHandler = (reference: VirtualElement | null, hoverState: HoverState | null) => void;
|
|
624
|
+
|
|
625
|
+
export declare function getHoveringCell(view: EditorView, event: MouseEvent): HoveringCellInfo | undefined;
|
|
414
626
|
|
|
415
627
|
export declare function getVirtualSelectionElement(view: EditorView): ReferenceElement | undefined;
|
|
416
628
|
|
|
629
|
+
export declare interface HoveringCellInfo {
|
|
630
|
+
rowIndex: number;
|
|
631
|
+
colIndex: number;
|
|
632
|
+
cellPos: number;
|
|
633
|
+
rowFirstCellPos: number;
|
|
634
|
+
colFirstCellPos: number;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* @internal
|
|
639
|
+
*/
|
|
640
|
+
export declare interface HoverState {
|
|
641
|
+
element: HTMLElement;
|
|
642
|
+
node: ProseMirrorNode;
|
|
643
|
+
pos: number;
|
|
644
|
+
}
|
|
645
|
+
|
|
417
646
|
declare class InlinePopoverElement extends InlinePopoverElement_base {
|
|
418
647
|
}
|
|
419
648
|
export { InlinePopoverElement }
|
|
@@ -501,6 +730,8 @@ export { InlinePopoverProps as InlinePopoverProps_alias_1 }
|
|
|
501
730
|
|
|
502
731
|
export declare function isFinitePositiveNumber(value: unknown): value is number;
|
|
503
732
|
|
|
733
|
+
export declare function isHoveringCellInfoEqual(a?: HoveringCellInfo | null, b?: HoveringCellInfo | null): boolean;
|
|
734
|
+
|
|
504
735
|
/**
|
|
505
736
|
* @internal
|
|
506
737
|
*/
|
|
@@ -627,6 +858,167 @@ declare interface ResizableRootProps {
|
|
|
627
858
|
export { ResizableRootProps }
|
|
628
859
|
export { ResizableRootProps as ResizableRootProps_alias_1 }
|
|
629
860
|
|
|
861
|
+
declare type TableCommandsExtension = ReturnType<typeof defineTableCommands>;
|
|
862
|
+
|
|
863
|
+
declare type TableCommandsExtension_2 = ReturnType<typeof defineTableCommands>;
|
|
864
|
+
|
|
865
|
+
declare class TableHandleColumnRootElement extends TableHandleColumnRootElement_base {
|
|
866
|
+
}
|
|
867
|
+
export { TableHandleColumnRootElement }
|
|
868
|
+
export { TableHandleColumnRootElement as TableHandleColumnRootElement_alias_1 }
|
|
869
|
+
|
|
870
|
+
declare const TableHandleColumnRootElement_base: {
|
|
871
|
+
new (): BaseElement & TableHandleColumnRootProps;
|
|
872
|
+
prototype: HTMLElement;
|
|
873
|
+
};
|
|
874
|
+
|
|
875
|
+
declare interface TableHandleColumnRootProps extends Omit<OverlayPositionerProps, 'placement'> {
|
|
876
|
+
/**
|
|
877
|
+
* The ProseKit editor instance.
|
|
878
|
+
*
|
|
879
|
+
* @default null
|
|
880
|
+
*/
|
|
881
|
+
editor: Editor | null;
|
|
882
|
+
/**
|
|
883
|
+
* The placement of the popover, relative to the hovered table cell.
|
|
884
|
+
*
|
|
885
|
+
* @default "top"
|
|
886
|
+
*/
|
|
887
|
+
placement: Placement;
|
|
888
|
+
}
|
|
889
|
+
export { TableHandleColumnRootProps }
|
|
890
|
+
export { TableHandleColumnRootProps as TableHandleColumnRootProps_alias_1 }
|
|
891
|
+
|
|
892
|
+
declare class TableHandleColumnTriggerElement extends TableHandleColumnTriggerElement_base {
|
|
893
|
+
}
|
|
894
|
+
export { TableHandleColumnTriggerElement }
|
|
895
|
+
export { TableHandleColumnTriggerElement as TableHandleColumnTriggerElement_alias_1 }
|
|
896
|
+
|
|
897
|
+
declare const TableHandleColumnTriggerElement_base: {
|
|
898
|
+
new (): BaseElement & TableHandleColumnTriggerProps;
|
|
899
|
+
prototype: HTMLElement;
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
declare interface TableHandleColumnTriggerProps {
|
|
903
|
+
editor: Editor<TableCommandsExtension> | null;
|
|
904
|
+
}
|
|
905
|
+
export { TableHandleColumnTriggerProps }
|
|
906
|
+
export { TableHandleColumnTriggerProps as TableHandleColumnTriggerProps_alias_1 }
|
|
907
|
+
|
|
908
|
+
declare class TableHandlePopoverContentElement extends TableHandlePopoverContentElement_base {
|
|
909
|
+
}
|
|
910
|
+
export { TableHandlePopoverContentElement }
|
|
911
|
+
export { TableHandlePopoverContentElement as TableHandlePopoverContentElement_alias_1 }
|
|
912
|
+
|
|
913
|
+
declare const TableHandlePopoverContentElement_base: {
|
|
914
|
+
new (): BaseElement & TableHandlePopoverContentProps;
|
|
915
|
+
prototype: HTMLElement;
|
|
916
|
+
};
|
|
917
|
+
|
|
918
|
+
declare interface TableHandlePopoverContentProps extends Omit<MenuContentProps, 'placement' | 'offset'> {
|
|
919
|
+
/**
|
|
920
|
+
* @default 'bottom-start'
|
|
921
|
+
*/
|
|
922
|
+
placement: MenuContentProps['placement'];
|
|
923
|
+
/**
|
|
924
|
+
* @default {mainAxis: -4, crossAxis: 4}
|
|
925
|
+
*/
|
|
926
|
+
offset: MenuContentProps['offset'];
|
|
927
|
+
editor: Editor | null;
|
|
928
|
+
}
|
|
929
|
+
export { TableHandlePopoverContentProps }
|
|
930
|
+
export { TableHandlePopoverContentProps as TableHandlePopoverContentProps_alias_1 }
|
|
931
|
+
|
|
932
|
+
declare class TableHandlePopoverItemElement extends TableHandlePopoverItemElement_base {
|
|
933
|
+
}
|
|
934
|
+
export { TableHandlePopoverItemElement }
|
|
935
|
+
export { TableHandlePopoverItemElement as TableHandlePopoverItemElement_alias_1 }
|
|
936
|
+
|
|
937
|
+
declare const TableHandlePopoverItemElement_base: {
|
|
938
|
+
new (): BaseElement & TableHandlePopoverItemProps;
|
|
939
|
+
prototype: HTMLElement;
|
|
940
|
+
};
|
|
941
|
+
|
|
942
|
+
declare interface TableHandlePopoverItemProps extends MenuItemProps {
|
|
943
|
+
disabled?: boolean;
|
|
944
|
+
}
|
|
945
|
+
export { TableHandlePopoverItemProps }
|
|
946
|
+
export { TableHandlePopoverItemProps as TableHandlePopoverItemProps_alias_1 }
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* @internal
|
|
950
|
+
*/
|
|
951
|
+
export declare type TableHandleRootContext = HoveringCellInfo | null;
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* @internal
|
|
955
|
+
*/
|
|
956
|
+
export declare const tableHandleRootContext: Context<TableHandleRootContext>;
|
|
957
|
+
|
|
958
|
+
declare class TableHandleRootElement extends TableHandleRootElement_base {
|
|
959
|
+
}
|
|
960
|
+
export { TableHandleRootElement }
|
|
961
|
+
export { TableHandleRootElement as TableHandleRootElement_alias_1 }
|
|
962
|
+
|
|
963
|
+
declare const TableHandleRootElement_base: {
|
|
964
|
+
new (): BaseElement & TableHandleRootProps;
|
|
965
|
+
prototype: HTMLElement;
|
|
966
|
+
};
|
|
967
|
+
|
|
968
|
+
declare interface TableHandleRootProps {
|
|
969
|
+
/**
|
|
970
|
+
* The ProseKit editor instance.
|
|
971
|
+
*
|
|
972
|
+
* @default null
|
|
973
|
+
*/
|
|
974
|
+
editor: Editor | null;
|
|
975
|
+
}
|
|
976
|
+
export { TableHandleRootProps }
|
|
977
|
+
export { TableHandleRootProps as TableHandleRootProps_alias_1 }
|
|
978
|
+
|
|
979
|
+
declare class TableHandleRowRootElement extends TableHandleRowRootElement_base {
|
|
980
|
+
}
|
|
981
|
+
export { TableHandleRowRootElement }
|
|
982
|
+
export { TableHandleRowRootElement as TableHandleRowRootElement_alias_1 }
|
|
983
|
+
|
|
984
|
+
declare const TableHandleRowRootElement_base: {
|
|
985
|
+
new (): BaseElement & TableHandleRowRootProps;
|
|
986
|
+
prototype: HTMLElement;
|
|
987
|
+
};
|
|
988
|
+
|
|
989
|
+
declare interface TableHandleRowRootProps extends Omit<OverlayPositionerProps, 'placement'> {
|
|
990
|
+
/**
|
|
991
|
+
* The ProseKit editor instance.
|
|
992
|
+
*
|
|
993
|
+
* @default null
|
|
994
|
+
*/
|
|
995
|
+
editor: Editor | null;
|
|
996
|
+
/**
|
|
997
|
+
* The placement of the popover, relative to the hovered table cell.
|
|
998
|
+
*
|
|
999
|
+
* @default "left"
|
|
1000
|
+
*/
|
|
1001
|
+
placement: Placement;
|
|
1002
|
+
}
|
|
1003
|
+
export { TableHandleRowRootProps }
|
|
1004
|
+
export { TableHandleRowRootProps as TableHandleRowRootProps_alias_1 }
|
|
1005
|
+
|
|
1006
|
+
declare class TableHandleRowTriggerElement extends TableHandleRowTriggerElement_base {
|
|
1007
|
+
}
|
|
1008
|
+
export { TableHandleRowTriggerElement }
|
|
1009
|
+
export { TableHandleRowTriggerElement as TableHandleRowTriggerElement_alias_1 }
|
|
1010
|
+
|
|
1011
|
+
declare const TableHandleRowTriggerElement_base: {
|
|
1012
|
+
new (): BaseElement & TableHandleRowTriggerProps;
|
|
1013
|
+
prototype: HTMLElement;
|
|
1014
|
+
};
|
|
1015
|
+
|
|
1016
|
+
declare interface TableHandleRowTriggerProps {
|
|
1017
|
+
editor: Editor<TableCommandsExtension_2> | null;
|
|
1018
|
+
}
|
|
1019
|
+
export { TableHandleRowTriggerProps }
|
|
1020
|
+
export { TableHandleRowTriggerProps as TableHandleRowTriggerProps_alias_1 }
|
|
1021
|
+
|
|
630
1022
|
/**
|
|
631
1023
|
* @internal
|
|
632
1024
|
*/
|
|
@@ -679,8 +1071,20 @@ export declare function useAutocompleteList(element: ConnectableElement, state:
|
|
|
679
1071
|
|
|
680
1072
|
export declare function useAutocompletePopover(host: ConnectableElement, state: SignalState<AutocompletePopoverProps>): void;
|
|
681
1073
|
|
|
1074
|
+
/**
|
|
1075
|
+
* @deprecated Use `useBlockHandleDraggable` instead.
|
|
1076
|
+
*/
|
|
682
1077
|
export declare function useBlockDragHandle(host: ConnectableElement, state: SignalState<BlockDragHandleProps>): void;
|
|
683
1078
|
|
|
1079
|
+
export declare function useBlockHandleAdd(host: ConnectableElement, state: SignalState<BlockHandleAddProps>): void;
|
|
1080
|
+
|
|
1081
|
+
export declare function useBlockHandleDraggable(host: ConnectableElement, state: SignalState<BlockHandleDraggableProps>): void;
|
|
1082
|
+
|
|
1083
|
+
export declare function useBlockHandlePopover(host: ConnectableElement, state: SignalState<BlockHandlePopoverProps>): void;
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* @deprecated Use `useBlockHandlePopover` instead.
|
|
1087
|
+
*/
|
|
684
1088
|
export declare function useBlockPopover(host: ConnectableElement, state: SignalState<BlockPopoverProps>): void;
|
|
685
1089
|
|
|
686
1090
|
export declare function useEditorExtension(host: ConnectableElement, editor: ReadonlySignal<Editor | null>, extension: Extension): void;
|
|
@@ -690,6 +1094,8 @@ export declare function useEditorExtension(host: ConnectableElement, editor: Rea
|
|
|
690
1094
|
*/
|
|
691
1095
|
export declare function useEditorFocusChangeEvent(host: ConnectableElement, editor: ReadonlySignal<Editor | null>, handler: FocusChangeHandler): void;
|
|
692
1096
|
|
|
1097
|
+
export declare function useEditorTyping(host: ConnectableElement, editor: ReadonlySignal<Editor | null>): ReadonlySignal<boolean>;
|
|
1098
|
+
|
|
693
1099
|
/**
|
|
694
1100
|
* @internal
|
|
695
1101
|
*/
|
|
@@ -711,6 +1117,20 @@ export declare function useResizableHandle(host: ConnectableElement, state: Sign
|
|
|
711
1117
|
|
|
712
1118
|
export declare function useResizableRoot(host: ConnectableElement, state: SignalState<ResizableRootProps>): void;
|
|
713
1119
|
|
|
1120
|
+
export declare function useTableHandleColumnRoot(host: ConnectableElement, state: SignalState<TableHandleColumnRootProps>): void;
|
|
1121
|
+
|
|
1122
|
+
export declare function useTableHandleColumnTrigger(host: ConnectableElement, state: SignalState<TableHandleColumnTriggerProps>): void;
|
|
1123
|
+
|
|
1124
|
+
export declare function useTableHandlePopoverContent(host: ConnectableElement, state: SignalState<TableHandlePopoverContentProps>): void;
|
|
1125
|
+
|
|
1126
|
+
export declare function useTableHandlePopoverItem(element: ConnectableElement, state: SignalState<TableHandlePopoverItemProps>): void;
|
|
1127
|
+
|
|
1128
|
+
export declare function useTableHandleRoot(host: ConnectableElement, state: SignalState<TableHandleRootProps>): void;
|
|
1129
|
+
|
|
1130
|
+
export declare function useTableHandleRowRoot(host: ConnectableElement, state: SignalState<TableHandleRowRootProps>): void;
|
|
1131
|
+
|
|
1132
|
+
export declare function useTableHandleRowTrigger(host: ConnectableElement, state: SignalState<TableHandleRowTriggerProps>): void;
|
|
1133
|
+
|
|
714
1134
|
export { useTooltipContent }
|
|
715
1135
|
|
|
716
1136
|
export { useTooltipRoot }
|
|
@@ -82,7 +82,6 @@ var defaultAutocompleteListProps = {
|
|
|
82
82
|
|
|
83
83
|
// src/components/autocomplete/autocomplete-list/state.ts
|
|
84
84
|
import {
|
|
85
|
-
createSignal,
|
|
86
85
|
mapSignals,
|
|
87
86
|
useEffect as useEffect2
|
|
88
87
|
} from "@aria-ui/core";
|
|
@@ -144,14 +143,11 @@ function useAutocompleteList(element, state) {
|
|
|
144
143
|
});
|
|
145
144
|
}
|
|
146
145
|
function useKeyboardHandler(element, open, editor) {
|
|
147
|
-
|
|
148
|
-
null
|
|
149
|
-
);
|
|
146
|
+
let keydownHandler = null;
|
|
150
147
|
let disposeKeydownHandler;
|
|
151
148
|
useEffect2(element, () => {
|
|
152
149
|
const editorValue = editor.get();
|
|
153
|
-
|
|
154
|
-
if (!editorValue || !keydownHandlerValue) {
|
|
150
|
+
if (!editorValue) {
|
|
155
151
|
return;
|
|
156
152
|
}
|
|
157
153
|
const extension = defineDOMEventHandler(
|
|
@@ -160,7 +156,7 @@ function useKeyboardHandler(element, open, editor) {
|
|
|
160
156
|
if (view.composing || event.defaultPrevented || !open.get()) {
|
|
161
157
|
return false;
|
|
162
158
|
}
|
|
163
|
-
|
|
159
|
+
keydownHandler == null ? void 0 : keydownHandler(event);
|
|
164
160
|
return event.defaultPrevented;
|
|
165
161
|
}
|
|
166
162
|
);
|
|
@@ -170,7 +166,7 @@ function useKeyboardHandler(element, open, editor) {
|
|
|
170
166
|
);
|
|
171
167
|
});
|
|
172
168
|
return (keydownHandlerValue) => {
|
|
173
|
-
keydownHandler
|
|
169
|
+
keydownHandler = keydownHandlerValue;
|
|
174
170
|
return () => {
|
|
175
171
|
disposeKeydownHandler == null ? void 0 : disposeKeydownHandler();
|
|
176
172
|
disposeKeydownHandler = void 0;
|
|
@@ -210,7 +206,7 @@ var defaultAutocompletePopoverProps = Object.freeze({
|
|
|
210
206
|
// src/components/autocomplete/autocomplete-popover/state.ts
|
|
211
207
|
import {
|
|
212
208
|
createComputed,
|
|
213
|
-
createSignal as
|
|
209
|
+
createSignal as createSignal2,
|
|
214
210
|
useAnimationFrame,
|
|
215
211
|
useAttribute,
|
|
216
212
|
useEffect as useEffect4
|
|
@@ -229,11 +225,11 @@ import {
|
|
|
229
225
|
|
|
230
226
|
// src/hooks/use-first-rendering.ts
|
|
231
227
|
import {
|
|
232
|
-
createSignal
|
|
228
|
+
createSignal,
|
|
233
229
|
useEffect as useEffect3
|
|
234
230
|
} from "@aria-ui/core";
|
|
235
231
|
function useFirstRendering(host) {
|
|
236
|
-
const firstRendering =
|
|
232
|
+
const firstRendering = createSignal(true);
|
|
237
233
|
useEffect3(host, () => {
|
|
238
234
|
requestAnimationFrame(() => {
|
|
239
235
|
firstRendering.set(false);
|
|
@@ -250,10 +246,10 @@ function defaultQueryBuilder(match) {
|
|
|
250
246
|
// src/components/autocomplete/autocomplete-popover/state.ts
|
|
251
247
|
function useAutocompletePopover(host, state) {
|
|
252
248
|
const { editor, regex, ...overlayState } = state;
|
|
253
|
-
const reference =
|
|
254
|
-
const query =
|
|
255
|
-
const onDismiss =
|
|
256
|
-
const onSubmit =
|
|
249
|
+
const reference = createSignal2(null);
|
|
250
|
+
const query = createSignal2("");
|
|
251
|
+
const onDismiss = createSignal2(null);
|
|
252
|
+
const onSubmit = createSignal2(null);
|
|
257
253
|
const presence = createComputed(() => !!reference.get());
|
|
258
254
|
queryContext.provide(host, query);
|
|
259
255
|
onSubmitContext.provide(host, onSubmit);
|
|
@@ -297,7 +293,7 @@ function useAutocompleteExtension(host, editor, regex, reference, query, onDismi
|
|
|
297
293
|
if (!editorValue || !regexValue) {
|
|
298
294
|
return;
|
|
299
295
|
}
|
|
300
|
-
|
|
296
|
+
const rule = createAutocompleteRule(
|
|
301
297
|
editorValue,
|
|
302
298
|
regexValue,
|
|
303
299
|
reference,
|
|
@@ -305,9 +301,11 @@ function useAutocompleteExtension(host, editor, regex, reference, query, onDismi
|
|
|
305
301
|
onDismiss,
|
|
306
302
|
onSubmit
|
|
307
303
|
);
|
|
304
|
+
const extension = defineAutocomplete(rule);
|
|
305
|
+
return editorValue.use(extension);
|
|
308
306
|
});
|
|
309
307
|
}
|
|
310
|
-
function
|
|
308
|
+
function createAutocompleteRule(editor, regex, reference, query, onDismiss, onSubmit) {
|
|
311
309
|
const handleEnter = (options) => {
|
|
312
310
|
const span = editor.view.dom.querySelector(".prosemirror-prediction-match");
|
|
313
311
|
if (span) {
|
|
@@ -323,13 +321,11 @@ function addAutocompleteExtension(editor, regex, reference, query, onDismiss, on
|
|
|
323
321
|
onDismiss.set(null);
|
|
324
322
|
onSubmit.set(null);
|
|
325
323
|
};
|
|
326
|
-
|
|
324
|
+
return new AutocompleteRule({
|
|
327
325
|
regex,
|
|
328
326
|
onEnter: handleEnter,
|
|
329
327
|
onLeave: handleLeave
|
|
330
328
|
});
|
|
331
|
-
const extension = defineAutocomplete(rule);
|
|
332
|
-
return editor.use(extension);
|
|
333
329
|
}
|
|
334
330
|
function createKeymapHandler(handler, enabled) {
|
|
335
331
|
return () => {
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
export { BlockDragHandleElement } from './_tsup-dts-rollup';
|
|
2
2
|
export { defaultBlockDragHandleProps } from './_tsup-dts-rollup';
|
|
3
3
|
export { BlockDragHandleProps } from './_tsup-dts-rollup';
|
|
4
|
+
export { BlockHandleAddElement } from './_tsup-dts-rollup';
|
|
5
|
+
export { defaultBlockHandleAddProps } from './_tsup-dts-rollup';
|
|
6
|
+
export { BlockHandleAddProps } from './_tsup-dts-rollup';
|
|
7
|
+
export { BlockHandleDraggableElement } from './_tsup-dts-rollup';
|
|
8
|
+
export { defaultBlockHandleDraggableProps } from './_tsup-dts-rollup';
|
|
9
|
+
export { BlockHandleDraggableProps } from './_tsup-dts-rollup';
|
|
10
|
+
export { BlockHandlePopoverElement } from './_tsup-dts-rollup';
|
|
11
|
+
export { defaultBlockHandlePopoverProps } from './_tsup-dts-rollup';
|
|
12
|
+
export { BlockHandlePopoverProps } from './_tsup-dts-rollup';
|
|
4
13
|
export { BlockPopoverElement } from './_tsup-dts-rollup';
|
|
5
14
|
export { defaultBlockPopoverProps } from './_tsup-dts-rollup';
|
|
6
15
|
export { BlockPopoverProps } from './_tsup-dts-rollup';
|