@prosekit/solid 0.7.0-beta.3 → 0.7.0-beta.5
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/editor-context.js +0 -2
- package/dist/editor-context.js.map +1 -1
- package/dist/prosekit-solid-autocomplete.d.ts +22 -73
- package/dist/prosekit-solid-autocomplete.d.ts.map +1 -1
- package/dist/prosekit-solid-autocomplete.js +7 -52
- package/dist/prosekit-solid-autocomplete.js.map +1 -1
- package/dist/prosekit-solid-block-handle.d.ts +22 -73
- package/dist/prosekit-solid-block-handle.d.ts.map +1 -1
- package/dist/prosekit-solid-block-handle.js +7 -52
- package/dist/prosekit-solid-block-handle.js.map +1 -1
- package/dist/prosekit-solid-drop-indicator.d.ts +4 -15
- package/dist/prosekit-solid-drop-indicator.d.ts.map +1 -1
- package/dist/prosekit-solid-drop-indicator.js +1 -10
- package/dist/prosekit-solid-drop-indicator.js.map +1 -1
- package/dist/prosekit-solid-inline-popover.d.ts +15 -46
- package/dist/prosekit-solid-inline-popover.d.ts.map +1 -1
- package/dist/prosekit-solid-inline-popover.js +5 -32
- package/dist/prosekit-solid-inline-popover.js.map +1 -1
- package/dist/prosekit-solid-menu.d.ts +61 -101
- package/dist/prosekit-solid-menu.d.ts.map +1 -1
- package/dist/prosekit-solid-menu.js +52 -76
- package/dist/prosekit-solid-menu.js.map +1 -1
- package/dist/prosekit-solid-popover.d.ts +18 -59
- package/dist/prosekit-solid-popover.d.ts.map +1 -1
- package/dist/prosekit-solid-popover.js +6 -42
- package/dist/prosekit-solid-popover.js.map +1 -1
- package/dist/prosekit-solid-resizable.d.ts +10 -31
- package/dist/prosekit-solid-resizable.d.ts.map +1 -1
- package/dist/prosekit-solid-resizable.js +4 -22
- package/dist/prosekit-solid-resizable.js.map +1 -1
- package/dist/prosekit-solid-table-handle.d.ts +44 -155
- package/dist/prosekit-solid-table-handle.d.ts.map +1 -1
- package/dist/prosekit-solid-table-handle.js +11 -110
- package/dist/prosekit-solid-table-handle.js.map +1 -1
- package/dist/prosekit-solid-tooltip.d.ts +18 -59
- package/dist/prosekit-solid-tooltip.d.ts.map +1 -1
- package/dist/prosekit-solid-tooltip.js +6 -42
- package/dist/prosekit-solid-tooltip.js.map +1 -1
- package/dist/prosekit-solid.d.ts +0 -21
- package/dist/prosekit-solid.d.ts.map +1 -1
- package/dist/prosekit-solid.js +0 -28
- package/dist/prosekit-solid.js.map +1 -1
- package/package.json +4 -4
- package/src/components/autocomplete/autocomplete-empty.gen.ts +5 -15
- package/src/components/autocomplete/autocomplete-item.gen.ts +5 -17
- package/src/components/autocomplete/autocomplete-popup.gen.ts +5 -17
- package/src/components/autocomplete/autocomplete-positioner.gen.ts +5 -15
- package/src/components/autocomplete/autocomplete-root.gen.ts +5 -17
- package/src/components/autocomplete/index.gen.ts +4 -8
- package/src/components/block-handle/block-handle-add.gen.ts +5 -15
- package/src/components/block-handle/block-handle-draggable.gen.ts +5 -15
- package/src/components/block-handle/block-handle-popup.gen.ts +5 -15
- package/src/components/block-handle/block-handle-positioner.gen.ts +5 -15
- package/src/components/block-handle/block-handle-root.gen.ts +5 -17
- package/src/components/block-handle/index.gen.ts +2 -6
- package/src/components/drop-indicator/drop-indicator.gen.ts +5 -15
- package/src/components/drop-indicator/index.gen.ts +1 -3
- package/src/components/inline-popover/index.gen.ts +2 -6
- package/src/components/inline-popover/inline-popover-popup.gen.ts +5 -15
- package/src/components/inline-popover/inline-popover-positioner.gen.ts +5 -15
- package/src/components/inline-popover/inline-popover-root.gen.ts +6 -18
- package/src/components/menu/index.gen.ts +4 -8
- package/src/components/menu/menu-item.gen.ts +5 -17
- package/src/components/menu/menu-popup.gen.ts +5 -15
- package/src/components/menu/menu-positioner.gen.ts +5 -15
- package/src/components/menu/menu-root.gen.ts +5 -17
- package/src/components/menu/menu-submenu-root.gen.ts +66 -19
- package/src/components/menu/menu-submenu-trigger.gen.ts +40 -19
- package/src/components/menu/menu-trigger.gen.ts +5 -17
- package/src/components/popover/index.gen.ts +3 -7
- package/src/components/popover/popover-popup.gen.ts +5 -15
- package/src/components/popover/popover-positioner.gen.ts +5 -15
- package/src/components/popover/popover-root.gen.ts +5 -17
- package/src/components/popover/popover-trigger.gen.ts +5 -17
- package/src/components/resizable/index.gen.ts +2 -6
- package/src/components/resizable/resizable-handle.gen.ts +5 -15
- package/src/components/resizable/resizable-root.gen.ts +5 -17
- package/src/components/table-handle/index.gen.ts +1 -3
- package/src/components/table-handle/table-handle-column-menu-root.gen.ts +5 -15
- package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +5 -15
- package/src/components/table-handle/table-handle-column-popup.gen.ts +5 -15
- package/src/components/table-handle/table-handle-column-positioner.gen.ts +5 -15
- package/src/components/table-handle/table-handle-drag-preview.gen.ts +5 -15
- package/src/components/table-handle/table-handle-drop-indicator.gen.ts +5 -15
- package/src/components/table-handle/table-handle-root.gen.ts +5 -15
- package/src/components/table-handle/table-handle-row-menu-root.gen.ts +5 -15
- package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +5 -15
- package/src/components/table-handle/table-handle-row-popup.gen.ts +5 -15
- package/src/components/table-handle/table-handle-row-positioner.gen.ts +5 -15
- package/src/components/tooltip/index.gen.ts +2 -6
- package/src/components/tooltip/tooltip-popup.gen.ts +5 -15
- package/src/components/tooltip/tooltip-positioner.gen.ts +5 -15
- package/src/components/tooltip/tooltip-root.gen.ts +5 -17
- package/src/components/tooltip/tooltip-trigger.gen.ts +5 -15
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
3
|
import { registerBlockHandleRootElement, type BlockHandleRootElement, type BlockHandleRootEvents, type BlockHandleRootProps as BlockHandleRootElementProps } from '@prosekit/web/block-handle';
|
|
6
4
|
import { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';
|
|
@@ -9,12 +7,8 @@ import h from 'solid-js/h';
|
|
|
9
7
|
|
|
10
8
|
import { useEditorContext } from '../../contexts/editor-context.ts';
|
|
11
9
|
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
|
-
export interface BlockHandleRootProps extends JSX.HTMLAttributes<BlockHandleRootElement> {
|
|
10
|
+
/** Props for the {@link BlockHandleRoot} Solid component. */
|
|
11
|
+
export interface BlockHandleRootProps {
|
|
18
12
|
/**
|
|
19
13
|
* The ProseKit editor instance.
|
|
20
14
|
*
|
|
@@ -26,12 +20,8 @@ export interface BlockHandleRootProps extends JSX.HTMLAttributes<BlockHandleRoot
|
|
|
26
20
|
onStateChange?: (event: BlockHandleRootEvents['stateChange']) => void;
|
|
27
21
|
}
|
|
28
22
|
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
*
|
|
32
|
-
* @public
|
|
33
|
-
*/
|
|
34
|
-
export const BlockHandleRoot: Component<BlockHandleRootProps> = (props): any => {
|
|
23
|
+
/** A Solid component that renders an `prosekit-block-handle-root` custom element. */
|
|
24
|
+
export const BlockHandleRoot: Component<BlockHandleRootProps & JSX.HTMLAttributes<BlockHandleRootElement>> = (props): any => {
|
|
35
25
|
registerBlockHandleRootElement();
|
|
36
26
|
|
|
37
27
|
const [getElement, setElement] = createSignal<BlockHandleRootElement | null>(null);
|
|
@@ -78,5 +68,3 @@ export const BlockHandleRoot: Component<BlockHandleRootProps> = (props): any =>
|
|
|
78
68
|
}),
|
|
79
69
|
);
|
|
80
70
|
};
|
|
81
|
-
|
|
82
|
-
export type { BlockHandleRootEvents };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
3
|
export { BlockHandleAdd, type BlockHandleAddProps } from './block-handle-add.gen.ts';
|
|
6
4
|
|
|
@@ -10,6 +8,4 @@ export { BlockHandlePopup, type BlockHandlePopupProps } from './block-handle-pop
|
|
|
10
8
|
|
|
11
9
|
export { BlockHandlePositioner, type BlockHandlePositionerProps } from './block-handle-positioner.gen.ts';
|
|
12
10
|
|
|
13
|
-
export { BlockHandleRoot, type BlockHandleRootProps
|
|
14
|
-
|
|
15
|
-
export { BlockHandleStateChangeEvent } from '@prosekit/web/block-handle';
|
|
11
|
+
export { BlockHandleRoot, type BlockHandleRootProps } from './block-handle-root.gen.ts';
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
3
|
import { registerDropIndicatorElement, type DropIndicatorElement, type DropIndicatorProps as DropIndicatorElementProps } from '@prosekit/web/drop-indicator';
|
|
6
4
|
import { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';
|
|
@@ -9,12 +7,8 @@ import h from 'solid-js/h';
|
|
|
9
7
|
|
|
10
8
|
import { useEditorContext } from '../../contexts/editor-context.ts';
|
|
11
9
|
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
|
-
export interface DropIndicatorProps extends JSX.HTMLAttributes<DropIndicatorElement> {
|
|
10
|
+
/** Props for the {@link DropIndicator} Solid component. */
|
|
11
|
+
export interface DropIndicatorProps {
|
|
18
12
|
/**
|
|
19
13
|
* The ProseKit editor instance.
|
|
20
14
|
*
|
|
@@ -30,12 +24,8 @@ export interface DropIndicatorProps extends JSX.HTMLAttributes<DropIndicatorElem
|
|
|
30
24
|
width?: DropIndicatorElementProps['width'];
|
|
31
25
|
}
|
|
32
26
|
|
|
33
|
-
/**
|
|
34
|
-
|
|
35
|
-
*
|
|
36
|
-
* @public
|
|
37
|
-
*/
|
|
38
|
-
export const DropIndicator: Component<DropIndicatorProps> = (props): any => {
|
|
27
|
+
/** A Solid component that renders an `prosekit-drop-indicator` custom element. */
|
|
28
|
+
export const DropIndicator: Component<DropIndicatorProps & JSX.HTMLAttributes<DropIndicatorElement>> = (props): any => {
|
|
39
29
|
registerDropIndicatorElement();
|
|
40
30
|
|
|
41
31
|
const [getElement, setElement] = createSignal<DropIndicatorElement | null>(null);
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
3
|
export { DropIndicator, type DropIndicatorProps } from './drop-indicator.gen.ts';
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
3
|
export { InlinePopoverPopup, type InlinePopoverPopupProps } from './inline-popover-popup.gen.ts';
|
|
6
4
|
|
|
7
5
|
export { InlinePopoverPositioner, type InlinePopoverPositionerProps } from './inline-popover-positioner.gen.ts';
|
|
8
6
|
|
|
9
|
-
export { InlinePopoverRoot, type InlinePopoverRootProps
|
|
10
|
-
|
|
11
|
-
export { OpenChangeEvent } from '@prosekit/web/inline-popover';
|
|
7
|
+
export { InlinePopoverRoot, type InlinePopoverRootProps } from './inline-popover-root.gen.ts';
|
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
3
|
import { registerInlinePopoverPopupElement, type InlinePopoverPopupElement } from '@prosekit/web/inline-popover';
|
|
6
4
|
import type { Component, JSX } from 'solid-js';
|
|
7
5
|
import h from 'solid-js/h';
|
|
8
6
|
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
export interface InlinePopoverPopupProps extends JSX.HTMLAttributes<InlinePopoverPopupElement> {}
|
|
7
|
+
/** Props for the {@link InlinePopoverPopup} Solid component. */
|
|
8
|
+
export interface InlinePopoverPopupProps {}
|
|
15
9
|
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
*
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
export const InlinePopoverPopup: Component<InlinePopoverPopupProps> = (props): any => {
|
|
10
|
+
/** A Solid component that renders an `prosekit-inline-popover-popup` custom element. */
|
|
11
|
+
export const InlinePopoverPopup: Component<InlinePopoverPopupProps & JSX.HTMLAttributes<InlinePopoverPopupElement>> = (props): any => {
|
|
22
12
|
registerInlinePopoverPopupElement();
|
|
23
13
|
|
|
24
14
|
const restProps = props;
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
3
|
import { registerInlinePopoverPositionerElement, type InlinePopoverPositionerElement, type InlinePopoverPositionerProps as InlinePopoverPositionerElementProps } from '@prosekit/web/inline-popover';
|
|
6
4
|
import { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';
|
|
7
5
|
import type { Component, JSX } from 'solid-js';
|
|
8
6
|
import h from 'solid-js/h';
|
|
9
7
|
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export interface InlinePopoverPositionerProps extends JSX.HTMLAttributes<InlinePopoverPositionerElement> {
|
|
8
|
+
/** Props for the {@link InlinePopoverPositioner} Solid component. */
|
|
9
|
+
export interface InlinePopoverPositionerProps {
|
|
16
10
|
/**
|
|
17
11
|
* The initial placement of the floating element
|
|
18
12
|
*
|
|
@@ -141,12 +135,8 @@ export interface InlinePopoverPositionerProps extends JSX.HTMLAttributes<InlineP
|
|
|
141
135
|
altBoundary?: InlinePopoverPositionerElementProps['altBoundary'];
|
|
142
136
|
}
|
|
143
137
|
|
|
144
|
-
/**
|
|
145
|
-
|
|
146
|
-
*
|
|
147
|
-
* @public
|
|
148
|
-
*/
|
|
149
|
-
export const InlinePopoverPositioner: Component<InlinePopoverPositionerProps> = (props): any => {
|
|
138
|
+
/** A Solid component that renders an `prosekit-inline-popover-positioner` custom element. */
|
|
139
|
+
export const InlinePopoverPositioner: Component<InlinePopoverPositionerProps & JSX.HTMLAttributes<InlinePopoverPositionerElement>> = (props): any => {
|
|
150
140
|
registerInlinePopoverPositionerElement();
|
|
151
141
|
|
|
152
142
|
const [getElement, setElement] = createSignal<InlinePopoverPositionerElement | null>(null);
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
3
|
import { registerInlinePopoverRootElement, type InlinePopoverRootElement, type InlinePopoverRootEvents, type InlinePopoverRootProps as InlinePopoverRootElementProps } from '@prosekit/web/inline-popover';
|
|
6
4
|
import { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';
|
|
@@ -9,12 +7,8 @@ import h from 'solid-js/h';
|
|
|
9
7
|
|
|
10
8
|
import { useEditorContext } from '../../contexts/editor-context.ts';
|
|
11
9
|
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
|
-
export interface InlinePopoverRootProps extends JSX.HTMLAttributes<InlinePopoverRootElement> {
|
|
10
|
+
/** Props for the {@link InlinePopoverRoot} Solid component. */
|
|
11
|
+
export interface InlinePopoverRootProps {
|
|
18
12
|
/**
|
|
19
13
|
* The ProseKit editor instance.
|
|
20
14
|
*
|
|
@@ -46,16 +40,12 @@ export interface InlinePopoverRootProps extends JSX.HTMLAttributes<InlinePopover
|
|
|
46
40
|
* @default false
|
|
47
41
|
*/
|
|
48
42
|
disabled?: InlinePopoverRootElementProps['disabled'];
|
|
49
|
-
/** */
|
|
43
|
+
/** Emitted when the open state of the popover changes. */
|
|
50
44
|
onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;
|
|
51
45
|
}
|
|
52
46
|
|
|
53
|
-
/**
|
|
54
|
-
|
|
55
|
-
*
|
|
56
|
-
* @public
|
|
57
|
-
*/
|
|
58
|
-
export const InlinePopoverRoot: Component<InlinePopoverRootProps> = (props): any => {
|
|
47
|
+
/** A Solid component that renders an `prosekit-inline-popover-root` custom element. */
|
|
48
|
+
export const InlinePopoverRoot: Component<InlinePopoverRootProps & JSX.HTMLAttributes<InlinePopoverRootElement>> = (props): any => {
|
|
59
49
|
registerInlinePopoverRootElement();
|
|
60
50
|
|
|
61
51
|
const [getElement, setElement] = createSignal<InlinePopoverRootElement | null>(null);
|
|
@@ -102,5 +92,3 @@ export const InlinePopoverRoot: Component<InlinePopoverRootProps> = (props): any
|
|
|
102
92
|
}),
|
|
103
93
|
);
|
|
104
94
|
};
|
|
105
|
-
|
|
106
|
-
export type { InlinePopoverRootEvents };
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
|
-
export { MenuItem, type MenuItemProps
|
|
3
|
+
export { MenuItem, type MenuItemProps } from './menu-item.gen.ts';
|
|
6
4
|
|
|
7
5
|
export { MenuPopup, type MenuPopupProps } from './menu-popup.gen.ts';
|
|
8
6
|
|
|
9
7
|
export { MenuPositioner, type MenuPositionerProps } from './menu-positioner.gen.ts';
|
|
10
8
|
|
|
11
|
-
export { MenuRoot, type MenuRootProps
|
|
9
|
+
export { MenuRoot, type MenuRootProps } from './menu-root.gen.ts';
|
|
12
10
|
|
|
13
11
|
export { MenuSubmenuRoot, type MenuSubmenuRootProps } from './menu-submenu-root.gen.ts';
|
|
14
12
|
|
|
15
13
|
export { MenuSubmenuTrigger, type MenuSubmenuTriggerProps } from './menu-submenu-trigger.gen.ts';
|
|
16
14
|
|
|
17
|
-
export { MenuTrigger, type MenuTriggerProps
|
|
18
|
-
|
|
19
|
-
export { OpenChangeEvent, SelectEvent } from '@prosekit/web/menu';
|
|
15
|
+
export { MenuTrigger, type MenuTriggerProps } from './menu-trigger.gen.ts';
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
3
|
import { registerMenuItemElement, type MenuItemElement, type MenuItemEvents, type MenuItemProps as MenuItemElementProps } from '@prosekit/web/menu';
|
|
6
4
|
import { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';
|
|
7
5
|
import type { Component, JSX } from 'solid-js';
|
|
8
6
|
import h from 'solid-js/h';
|
|
9
7
|
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export interface MenuItemProps extends JSX.HTMLAttributes<MenuItemElement> {
|
|
8
|
+
/** Props for the {@link MenuItem} Solid component. */
|
|
9
|
+
export interface MenuItemProps {
|
|
16
10
|
/**
|
|
17
11
|
* The unique value for this menu item.
|
|
18
12
|
*
|
|
@@ -35,12 +29,8 @@ export interface MenuItemProps extends JSX.HTMLAttributes<MenuItemElement> {
|
|
|
35
29
|
onSelect?: (event: MenuItemEvents['select']) => void;
|
|
36
30
|
}
|
|
37
31
|
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
*
|
|
41
|
-
* @public
|
|
42
|
-
*/
|
|
43
|
-
export const MenuItem: Component<MenuItemProps> = (props): any => {
|
|
32
|
+
/** A Solid component that renders an `prosekit-menu-item` custom element. */
|
|
33
|
+
export const MenuItem: Component<MenuItemProps & JSX.HTMLAttributes<MenuItemElement>> = (props): any => {
|
|
44
34
|
registerMenuItemElement();
|
|
45
35
|
|
|
46
36
|
const [getElement, setElement] = createSignal<MenuItemElement | null>(null);
|
|
@@ -85,5 +75,3 @@ export const MenuItem: Component<MenuItemProps> = (props): any => {
|
|
|
85
75
|
}),
|
|
86
76
|
);
|
|
87
77
|
};
|
|
88
|
-
|
|
89
|
-
export type { MenuItemEvents };
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
3
|
import { registerMenuPopupElement, type MenuPopupElement, type MenuPopupProps as MenuPopupElementProps } from '@prosekit/web/menu';
|
|
6
4
|
import { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';
|
|
7
5
|
import type { Component, JSX } from 'solid-js';
|
|
8
6
|
import h from 'solid-js/h';
|
|
9
7
|
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export interface MenuPopupProps extends JSX.HTMLAttributes<MenuPopupElement> {
|
|
8
|
+
/** Props for the {@link MenuPopup} Solid component. */
|
|
9
|
+
export interface MenuPopupProps {
|
|
16
10
|
/**
|
|
17
11
|
* By default, the MenuPopup element will listen for keydown events.
|
|
18
12
|
* You can pass a different element to listen for keydown events.
|
|
@@ -22,12 +16,8 @@ export interface MenuPopupProps extends JSX.HTMLAttributes<MenuPopupElement> {
|
|
|
22
16
|
eventTarget?: MenuPopupElementProps['eventTarget'];
|
|
23
17
|
}
|
|
24
18
|
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
*
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
export const MenuPopup: Component<MenuPopupProps> = (props): any => {
|
|
19
|
+
/** A Solid component that renders an `prosekit-menu-popup` custom element. */
|
|
20
|
+
export const MenuPopup: Component<MenuPopupProps & JSX.HTMLAttributes<MenuPopupElement>> = (props): any => {
|
|
31
21
|
registerMenuPopupElement();
|
|
32
22
|
|
|
33
23
|
const [getElement, setElement] = createSignal<MenuPopupElement | null>(null);
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
3
|
import { registerMenuPositionerElement, type MenuPositionerElement, type MenuPositionerProps as MenuPositionerElementProps } from '@prosekit/web/menu';
|
|
6
4
|
import { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';
|
|
7
5
|
import type { Component, JSX } from 'solid-js';
|
|
8
6
|
import h from 'solid-js/h';
|
|
9
7
|
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export interface MenuPositionerProps extends JSX.HTMLAttributes<MenuPositionerElement> {
|
|
8
|
+
/** Props for the {@link MenuPositioner} Solid component. */
|
|
9
|
+
export interface MenuPositionerProps {
|
|
16
10
|
/**
|
|
17
11
|
* The initial placement of the floating element
|
|
18
12
|
*
|
|
@@ -142,12 +136,8 @@ export interface MenuPositionerProps extends JSX.HTMLAttributes<MenuPositionerEl
|
|
|
142
136
|
altBoundary?: MenuPositionerElementProps['altBoundary'];
|
|
143
137
|
}
|
|
144
138
|
|
|
145
|
-
/**
|
|
146
|
-
|
|
147
|
-
*
|
|
148
|
-
* @public
|
|
149
|
-
*/
|
|
150
|
-
export const MenuPositioner: Component<MenuPositionerProps> = (props): any => {
|
|
139
|
+
/** A Solid component that renders an `prosekit-menu-positioner` custom element. */
|
|
140
|
+
export const MenuPositioner: Component<MenuPositionerProps & JSX.HTMLAttributes<MenuPositionerElement>> = (props): any => {
|
|
151
141
|
registerMenuPositionerElement();
|
|
152
142
|
|
|
153
143
|
const [getElement, setElement] = createSignal<MenuPositionerElement | null>(null);
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
3
|
import { registerMenuRootElement, type MenuRootElement, type MenuRootEvents, type MenuRootProps as MenuRootElementProps } from '@prosekit/web/menu';
|
|
6
4
|
import { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';
|
|
7
5
|
import type { Component, JSX } from 'solid-js';
|
|
8
6
|
import h from 'solid-js/h';
|
|
9
7
|
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export interface MenuRootProps extends JSX.HTMLAttributes<MenuRootElement> {
|
|
8
|
+
/** Props for the {@link MenuRoot} Solid component. */
|
|
9
|
+
export interface MenuRootProps {
|
|
16
10
|
/**
|
|
17
11
|
* Whether the overlay is initially open.
|
|
18
12
|
* @default false
|
|
@@ -32,12 +26,8 @@ export interface MenuRootProps extends JSX.HTMLAttributes<MenuRootElement> {
|
|
|
32
26
|
onOpenChange?: (event: MenuRootEvents['openChange']) => void;
|
|
33
27
|
}
|
|
34
28
|
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
*
|
|
38
|
-
* @public
|
|
39
|
-
*/
|
|
40
|
-
export const MenuRoot: Component<MenuRootProps> = (props): any => {
|
|
29
|
+
/** A Solid component that renders an `prosekit-menu-root` custom element. */
|
|
30
|
+
export const MenuRoot: Component<MenuRootProps & JSX.HTMLAttributes<MenuRootElement>> = (props): any => {
|
|
41
31
|
registerMenuRootElement();
|
|
42
32
|
|
|
43
33
|
const [getElement, setElement] = createSignal<MenuRootElement | null>(null);
|
|
@@ -82,5 +72,3 @@ export const MenuRoot: Component<MenuRootProps> = (props): any => {
|
|
|
82
72
|
}),
|
|
83
73
|
);
|
|
84
74
|
};
|
|
85
|
-
|
|
86
|
-
export type { MenuRootEvents };
|
|
@@ -1,27 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
|
-
import { registerMenuSubmenuRootElement, type MenuSubmenuRootElement } from '@prosekit/web/menu';
|
|
3
|
+
import { registerMenuSubmenuRootElement, type MenuSubmenuRootElement, type MenuSubmenuRootEvents, type MenuSubmenuRootProps as MenuSubmenuRootElementProps } from '@prosekit/web/menu';
|
|
4
|
+
import { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';
|
|
6
5
|
import type { Component, JSX } from 'solid-js';
|
|
7
6
|
import h from 'solid-js/h';
|
|
8
7
|
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
/** Props for the {@link MenuSubmenuRoot} Solid component. */
|
|
9
|
+
export interface MenuSubmenuRootProps {
|
|
10
|
+
/**
|
|
11
|
+
* Whether the overlay is initially open.
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
defaultOpen?: MenuSubmenuRootElementProps['defaultOpen'];
|
|
15
|
+
/**
|
|
16
|
+
* Whether the overlay is currently open.
|
|
17
|
+
* @default null
|
|
18
|
+
*/
|
|
19
|
+
open?: MenuSubmenuRootElementProps['open'];
|
|
20
|
+
/**
|
|
21
|
+
* Whether the component should ignore user interaction.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
disabled?: MenuSubmenuRootElementProps['disabled'];
|
|
25
|
+
/** Emitted when the submenu is opened or closed. */
|
|
26
|
+
onOpenChange?: (event: MenuSubmenuRootEvents['openChange']) => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** A Solid component that renders an `prosekit-menu-submenu-root` custom element. */
|
|
30
|
+
export const MenuSubmenuRoot: Component<MenuSubmenuRootProps & JSX.HTMLAttributes<MenuSubmenuRootElement>> = (props): any => {
|
|
22
31
|
registerMenuSubmenuRootElement();
|
|
23
32
|
|
|
24
|
-
const
|
|
33
|
+
const [getElement, setElement] = createSignal<MenuSubmenuRootElement | null>(null);
|
|
34
|
+
const handlers: Array<((event: any) => void) | undefined> = [];
|
|
35
|
+
|
|
36
|
+
const [elementProps, eventHandlers, restProps] = splitProps(props, ['defaultOpen', 'disabled', 'open'], ['onOpenChange']);
|
|
37
|
+
|
|
38
|
+
createEffect(() => {
|
|
39
|
+
const element = getElement();
|
|
40
|
+
if (!element) return;
|
|
41
|
+
|
|
42
|
+
Object.assign(element, { defaultOpen: elementProps.defaultOpen, disabled: elementProps.disabled, open: elementProps.open });
|
|
43
|
+
|
|
44
|
+
handlers.length = 0;
|
|
45
|
+
handlers.push(eventHandlers.onOpenChange);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
createEffect(() => {
|
|
49
|
+
const element = getElement();
|
|
50
|
+
if (!element) return;
|
|
51
|
+
|
|
52
|
+
const ac = new AbortController();
|
|
53
|
+
for (const [index, eventName] of ['openChange'].entries()) {
|
|
54
|
+
element.addEventListener(
|
|
55
|
+
eventName,
|
|
56
|
+
(event) => {
|
|
57
|
+
handlers[index]?.(event);
|
|
58
|
+
},
|
|
59
|
+
{ signal: ac.signal },
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
return () => ac.abort();
|
|
63
|
+
});
|
|
25
64
|
|
|
26
|
-
return () =>
|
|
65
|
+
return () =>
|
|
66
|
+
h(
|
|
67
|
+
'prosekit-menu-submenu-root',
|
|
68
|
+
mergeProps(restProps, {
|
|
69
|
+
ref: (el: MenuSubmenuRootElement | null) => {
|
|
70
|
+
setElement(el);
|
|
71
|
+
},
|
|
72
|
+
}),
|
|
73
|
+
);
|
|
27
74
|
};
|
|
@@ -1,27 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
|
-
import { registerMenuSubmenuTriggerElement, type MenuSubmenuTriggerElement } from '@prosekit/web/menu';
|
|
3
|
+
import { registerMenuSubmenuTriggerElement, type MenuSubmenuTriggerElement, type MenuSubmenuTriggerProps as MenuSubmenuTriggerElementProps } from '@prosekit/web/menu';
|
|
4
|
+
import { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';
|
|
6
5
|
import type { Component, JSX } from 'solid-js';
|
|
7
6
|
import h from 'solid-js/h';
|
|
8
7
|
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
/** Props for the {@link MenuSubmenuTrigger} Solid component. */
|
|
9
|
+
export interface MenuSubmenuTriggerProps {
|
|
10
|
+
/**
|
|
11
|
+
* The unique value for this submenu trigger in the parent menu.
|
|
12
|
+
*
|
|
13
|
+
* @default ""
|
|
14
|
+
*/
|
|
15
|
+
value?: MenuSubmenuTriggerElementProps['value'];
|
|
16
|
+
/**
|
|
17
|
+
* Whether this submenu trigger is disabled.
|
|
18
|
+
*
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
disabled?: MenuSubmenuTriggerElementProps['disabled'];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** A Solid component that renders an `prosekit-menu-submenu-trigger` custom element. */
|
|
25
|
+
export const MenuSubmenuTrigger: Component<MenuSubmenuTriggerProps & JSX.HTMLAttributes<MenuSubmenuTriggerElement>> = (props): any => {
|
|
22
26
|
registerMenuSubmenuTriggerElement();
|
|
23
27
|
|
|
24
|
-
const
|
|
28
|
+
const [getElement, setElement] = createSignal<MenuSubmenuTriggerElement | null>(null);
|
|
29
|
+
|
|
30
|
+
const [elementProps, restProps] = splitProps(props, ['disabled', 'value']);
|
|
31
|
+
|
|
32
|
+
createEffect(() => {
|
|
33
|
+
const element = getElement();
|
|
34
|
+
if (!element) return;
|
|
35
|
+
|
|
36
|
+
Object.assign(element, { disabled: elementProps.disabled, value: elementProps.value });
|
|
37
|
+
});
|
|
25
38
|
|
|
26
|
-
return () =>
|
|
39
|
+
return () =>
|
|
40
|
+
h(
|
|
41
|
+
'prosekit-menu-submenu-trigger',
|
|
42
|
+
mergeProps(restProps, {
|
|
43
|
+
ref: (el: MenuSubmenuTriggerElement | null) => {
|
|
44
|
+
setElement(el);
|
|
45
|
+
},
|
|
46
|
+
}),
|
|
47
|
+
);
|
|
27
48
|
};
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
3
|
import { registerMenuTriggerElement, type MenuTriggerElement, type MenuTriggerEvents, type MenuTriggerProps as MenuTriggerElementProps } from '@prosekit/web/menu';
|
|
6
4
|
import { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';
|
|
7
5
|
import type { Component, JSX } from 'solid-js';
|
|
8
6
|
import h from 'solid-js/h';
|
|
9
7
|
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export interface MenuTriggerProps extends JSX.HTMLAttributes<MenuTriggerElement> {
|
|
8
|
+
/** Props for the {@link MenuTrigger} Solid component. */
|
|
9
|
+
export interface MenuTriggerProps {
|
|
16
10
|
/**
|
|
17
11
|
* Whether the component should ignore user interaction.
|
|
18
12
|
*
|
|
@@ -23,12 +17,8 @@ export interface MenuTriggerProps extends JSX.HTMLAttributes<MenuTriggerElement>
|
|
|
23
17
|
onOpenChange?: (event: MenuTriggerEvents['openChange']) => void;
|
|
24
18
|
}
|
|
25
19
|
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
*
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
|
-
export const MenuTrigger: Component<MenuTriggerProps> = (props): any => {
|
|
20
|
+
/** A Solid component that renders an `prosekit-menu-trigger` custom element. */
|
|
21
|
+
export const MenuTrigger: Component<MenuTriggerProps & JSX.HTMLAttributes<MenuTriggerElement>> = (props): any => {
|
|
32
22
|
registerMenuTriggerElement();
|
|
33
23
|
|
|
34
24
|
const [getElement, setElement] = createSignal<MenuTriggerElement | null>(null);
|
|
@@ -73,5 +63,3 @@ export const MenuTrigger: Component<MenuTriggerProps> = (props): any => {
|
|
|
73
63
|
}),
|
|
74
64
|
);
|
|
75
65
|
};
|
|
76
|
-
|
|
77
|
-
export type { MenuTriggerEvents };
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
3
|
-
*/
|
|
1
|
+
// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
|
|
4
2
|
|
|
5
3
|
export { PopoverPopup, type PopoverPopupProps } from './popover-popup.gen.ts';
|
|
6
4
|
|
|
7
5
|
export { PopoverPositioner, type PopoverPositionerProps } from './popover-positioner.gen.ts';
|
|
8
6
|
|
|
9
|
-
export { PopoverRoot, type PopoverRootProps
|
|
7
|
+
export { PopoverRoot, type PopoverRootProps } from './popover-root.gen.ts';
|
|
10
8
|
|
|
11
|
-
export { PopoverTrigger, type PopoverTriggerProps
|
|
12
|
-
|
|
13
|
-
export { OpenChangeEvent } from '@prosekit/web/popover';
|
|
9
|
+
export { PopoverTrigger, type PopoverTriggerProps } from './popover-trigger.gen.ts';
|