@prosekit/solid 0.7.0-beta.1 → 0.7.0-beta.2
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/prosekit-solid-autocomplete.d.ts +225 -19
- package/dist/prosekit-solid-autocomplete.d.ts.map +1 -1
- package/dist/prosekit-solid-autocomplete.js +204 -9
- package/dist/prosekit-solid-autocomplete.js.map +1 -1
- package/dist/prosekit-solid-block-handle.d.ts +209 -15
- package/dist/prosekit-solid-block-handle.d.ts.map +1 -1
- package/dist/prosekit-solid-block-handle.js +160 -7
- package/dist/prosekit-solid-block-handle.js.map +1 -1
- package/dist/prosekit-solid-drop-indicator.d.ts +26 -7
- package/dist/prosekit-solid-drop-indicator.d.ts.map +1 -1
- package/dist/prosekit-solid-drop-indicator.js +29 -3
- package/dist/prosekit-solid-drop-indicator.js.map +1 -1
- package/dist/prosekit-solid-inline-popover.d.ts +203 -9
- package/dist/prosekit-solid-inline-popover.d.ts.map +1 -1
- package/dist/prosekit-solid-inline-popover.js +128 -5
- package/dist/prosekit-solid-inline-popover.js.map +1 -1
- package/dist/prosekit-solid-menu.d.ts +287 -0
- package/dist/prosekit-solid-menu.d.ts.map +1 -0
- package/dist/prosekit-solid-menu.js +241 -0
- package/dist/prosekit-solid-menu.js.map +1 -0
- package/dist/prosekit-solid-popover.d.ts +226 -15
- package/dist/prosekit-solid-popover.d.ts.map +1 -1
- package/dist/prosekit-solid-popover.js +165 -7
- package/dist/prosekit-solid-popover.js.map +1 -1
- package/dist/prosekit-solid-resizable.d.ts +55 -13
- package/dist/prosekit-solid-resizable.d.ts.map +1 -1
- package/dist/prosekit-solid-resizable.js +69 -7
- package/dist/prosekit-solid-resizable.js.map +1 -1
- package/dist/prosekit-solid-table-handle.d.ts +446 -39
- package/dist/prosekit-solid-table-handle.d.ts.map +1 -1
- package/dist/prosekit-solid-table-handle.js +334 -19
- package/dist/prosekit-solid-table-handle.js.map +1 -1
- package/dist/prosekit-solid-tooltip.d.ts +210 -15
- package/dist/prosekit-solid-tooltip.d.ts.map +1 -1
- package/dist/prosekit-solid-tooltip.js +149 -7
- package/dist/prosekit-solid-tooltip.js.map +1 -1
- package/dist/prosekit-solid.d.ts +23 -2
- package/dist/prosekit-solid.d.ts.map +1 -1
- package/package.json +26 -18
- package/src/components/autocomplete/autocomplete-empty.gen.ts +22 -24
- package/src/components/autocomplete/autocomplete-item.gen.ts +82 -26
- package/src/components/autocomplete/autocomplete-popup.gen.ts +78 -0
- package/src/components/autocomplete/autocomplete-positioner.gen.ts +167 -0
- package/src/components/autocomplete/autocomplete-root.gen.ts +110 -0
- package/src/components/autocomplete/index.gen.ts +12 -4
- package/src/components/autocomplete/index.ts +27 -0
- package/src/components/block-handle/block-handle-add.gen.ts +54 -26
- package/src/components/block-handle/block-handle-draggable.gen.ts +54 -26
- package/src/components/block-handle/block-handle-popup.gen.ts +27 -0
- package/src/components/block-handle/block-handle-positioner.gen.ts +185 -0
- package/src/components/block-handle/block-handle-root.gen.ts +82 -0
- package/src/components/block-handle/index.gen.ts +13 -3
- package/src/components/block-handle/index.ts +27 -0
- package/src/components/drop-indicator/drop-indicator.gen.ts +60 -26
- package/src/components/drop-indicator/index.gen.ts +5 -1
- package/src/components/drop-indicator/index.ts +14 -0
- package/src/components/inline-popover/index.gen.ts +11 -1
- package/src/components/inline-popover/index.ts +22 -0
- package/src/components/inline-popover/inline-popover-popup.gen.ts +27 -0
- package/src/components/inline-popover/inline-popover-positioner.gen.ts +191 -0
- package/src/components/inline-popover/inline-popover-root.gen.ts +106 -0
- package/src/components/menu/index.gen.ts +19 -0
- package/src/components/menu/index.ts +37 -0
- package/src/components/menu/menu-item.gen.ts +89 -0
- package/src/components/menu/menu-popup.gen.ts +53 -0
- package/src/components/menu/menu-positioner.gen.ts +192 -0
- package/src/components/menu/menu-root.gen.ts +86 -0
- package/src/components/menu/menu-submenu-root.gen.ts +27 -0
- package/src/components/menu/menu-submenu-trigger.gen.ts +27 -0
- package/src/components/menu/menu-trigger.gen.ts +77 -0
- package/src/components/popover/index.gen.ts +11 -3
- package/src/components/popover/index.ts +24 -0
- package/src/components/popover/popover-popup.gen.ts +27 -0
- package/src/components/popover/popover-positioner.gen.ts +192 -0
- package/src/components/popover/popover-root.gen.ts +90 -26
- package/src/components/popover/popover-trigger.gen.ts +90 -26
- package/src/components/resizable/index.gen.ts +8 -2
- package/src/components/resizable/index.ts +20 -0
- package/src/components/resizable/resizable-handle.gen.ts +49 -26
- package/src/components/resizable/resizable-root.gen.ts +89 -26
- package/src/components/table-handle/index.gen.ts +17 -9
- package/src/components/table-handle/index.ts +58 -0
- package/src/components/table-handle/table-handle-column-menu-root.gen.ts +61 -0
- package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +55 -0
- package/src/components/table-handle/table-handle-column-popup.gen.ts +27 -0
- package/src/components/table-handle/table-handle-column-positioner.gen.ts +196 -0
- package/src/components/table-handle/table-handle-drag-preview.gen.ts +52 -26
- package/src/components/table-handle/table-handle-drop-indicator.gen.ts +52 -26
- package/src/components/table-handle/table-handle-root.gen.ts +54 -26
- package/src/components/table-handle/table-handle-row-menu-root.gen.ts +61 -0
- package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +55 -0
- package/src/components/table-handle/table-handle-row-popup.gen.ts +27 -0
- package/src/components/table-handle/table-handle-row-positioner.gen.ts +196 -0
- package/src/components/tooltip/index.gen.ts +11 -3
- package/src/components/tooltip/index.ts +24 -0
- package/src/components/tooltip/tooltip-popup.gen.ts +27 -0
- package/src/components/tooltip/tooltip-positioner.gen.ts +192 -0
- package/src/components/tooltip/tooltip-root.gen.ts +83 -26
- package/src/components/tooltip/tooltip-trigger.gen.ts +58 -26
- package/dist/create-component.js +0 -41
- package/dist/create-component.js.map +0 -1
- package/dist/create-props.d.ts +0 -6
- package/dist/create-props.d.ts.map +0 -1
- package/dist/types.d.ts +0 -26
- package/dist/types.d.ts.map +0 -1
- package/src/components/autocomplete/autocomplete-list.gen.ts +0 -29
- package/src/components/autocomplete/autocomplete-popover.gen.ts +0 -29
- package/src/components/block-handle/block-handle-popover.gen.ts +0 -29
- package/src/components/create-component.ts +0 -60
- package/src/components/create-props.ts +0 -13
- package/src/components/inline-popover/inline-popover.gen.ts +0 -29
- package/src/components/popover/popover-content.gen.ts +0 -29
- package/src/components/table-handle/table-handle-column-root.gen.ts +0 -29
- package/src/components/table-handle/table-handle-column-trigger.gen.ts +0 -29
- package/src/components/table-handle/table-handle-popover-content.gen.ts +0 -29
- package/src/components/table-handle/table-handle-popover-item.gen.ts +0 -29
- package/src/components/table-handle/table-handle-row-root.gen.ts +0 -29
- package/src/components/table-handle/table-handle-row-trigger.gen.ts +0 -29
- package/src/components/tooltip/tooltip-content.gen.ts +0 -29
|
@@ -1,14 +1,208 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Component } from "solid-js";
|
|
4
|
-
import { InlinePopoverElement, InlinePopoverEvents, InlinePopoverProps as InlinePopoverProps$1 } from "@prosekit/web/inline-popover";
|
|
1
|
+
import { Component, JSX } from "solid-js";
|
|
2
|
+
import { InlinePopoverPopupElement, InlinePopoverPositionerElement, InlinePopoverPositionerProps as InlinePopoverPositionerProps$1, InlinePopoverRootElement, InlinePopoverRootEvents, InlinePopoverRootProps as InlinePopoverRootProps$1, OpenChangeEvent } from "@prosekit/web/inline-popover";
|
|
5
3
|
|
|
6
|
-
//#region src/components/inline-popover/inline-popover.gen.d.ts
|
|
4
|
+
//#region src/components/inline-popover/inline-popover-popup.gen.d.ts
|
|
7
5
|
/**
|
|
8
|
-
* Props for the {@link
|
|
6
|
+
* Props for the {@link InlinePopoverPopup} Solid component.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
9
|
*/
|
|
10
|
-
interface
|
|
11
|
-
|
|
10
|
+
interface InlinePopoverPopupProps extends JSX.HTMLAttributes<InlinePopoverPopupElement> {}
|
|
11
|
+
/**
|
|
12
|
+
* A Solid component that renders an `prosekit-inline-popover-popup` custom element.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
declare const InlinePopoverPopup: Component<InlinePopoverPopupProps>;
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/components/inline-popover/inline-popover-positioner.gen.d.ts
|
|
19
|
+
/**
|
|
20
|
+
* Props for the {@link InlinePopoverPositioner} Solid component.
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
interface InlinePopoverPositionerProps extends JSX.HTMLAttributes<InlinePopoverPositionerElement> {
|
|
25
|
+
/**
|
|
26
|
+
* The initial placement of the floating element
|
|
27
|
+
*
|
|
28
|
+
* @default "top"
|
|
29
|
+
*/
|
|
30
|
+
placement?: InlinePopoverPositionerProps$1['placement'];
|
|
31
|
+
/**
|
|
32
|
+
* The distance between the reference and floating element.
|
|
33
|
+
*
|
|
34
|
+
* @default 12
|
|
35
|
+
*/
|
|
36
|
+
offset?: InlinePopoverPositionerProps$1['offset'];
|
|
37
|
+
/**
|
|
38
|
+
* Whether to hide the floating element when the reference element or the
|
|
39
|
+
* floating element is fully clipped.
|
|
40
|
+
*
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
hide?: InlinePopoverPositionerProps$1['hide'];
|
|
44
|
+
/**
|
|
45
|
+
* Whether the floating element can overlap the reference element to keep it
|
|
46
|
+
* in view.
|
|
47
|
+
*
|
|
48
|
+
* @default true
|
|
49
|
+
*/
|
|
50
|
+
overlap?: InlinePopoverPositionerProps$1['overlap'];
|
|
51
|
+
/**
|
|
52
|
+
* Whether to improve positioning for inline reference elements that span over
|
|
53
|
+
* multiple lines.
|
|
54
|
+
*
|
|
55
|
+
* @default true
|
|
56
|
+
*/
|
|
57
|
+
inline?: InlinePopoverPositionerProps$1['inline'];
|
|
58
|
+
/**
|
|
59
|
+
* Describes the virtual padding around the boundary to check for overflow.
|
|
60
|
+
*
|
|
61
|
+
* @default 8
|
|
62
|
+
*/
|
|
63
|
+
overflowPadding?: InlinePopoverPositionerProps$1['overflowPadding'];
|
|
64
|
+
/**
|
|
65
|
+
* The strategy to use for positioning
|
|
66
|
+
*
|
|
67
|
+
* @default "absolute"
|
|
68
|
+
*/
|
|
69
|
+
strategy?: InlinePopoverPositionerProps$1['strategy'];
|
|
70
|
+
/**
|
|
71
|
+
* Options to activate auto-update listeners
|
|
72
|
+
*
|
|
73
|
+
* @see https://floating-ui.com/docs/autoUpdate
|
|
74
|
+
*
|
|
75
|
+
* @default true
|
|
76
|
+
*/
|
|
77
|
+
autoUpdate?: InlinePopoverPositionerProps$1['autoUpdate'];
|
|
78
|
+
/**
|
|
79
|
+
* Whether to use the browser Popover API to place the floating element on
|
|
80
|
+
* top of other page content.
|
|
81
|
+
*
|
|
82
|
+
* @default true
|
|
83
|
+
*/
|
|
84
|
+
hoist?: InlinePopoverPositionerProps$1['hoist'];
|
|
85
|
+
/**
|
|
86
|
+
* Whether to flip the `placement` in order to keep it in view when the
|
|
87
|
+
* preferred placement(s) will overflow the clipping boundary. You can also
|
|
88
|
+
* provide an array of placements to try sequentially if the preferred
|
|
89
|
+
* `placement` does not fit.
|
|
90
|
+
*
|
|
91
|
+
* @default true
|
|
92
|
+
*/
|
|
93
|
+
flip?: InlinePopoverPositionerProps$1['flip'];
|
|
94
|
+
/**
|
|
95
|
+
* Whether the floating element should shift to keep it in view.
|
|
96
|
+
*
|
|
97
|
+
* @default true
|
|
98
|
+
*/
|
|
99
|
+
shift?: InlinePopoverPositionerProps$1['shift'];
|
|
100
|
+
/**
|
|
101
|
+
* Whether to constrain the floating element's width and height to not exceed
|
|
102
|
+
* the viewport.
|
|
103
|
+
*
|
|
104
|
+
* @default false
|
|
105
|
+
*/
|
|
106
|
+
fitViewport?: InlinePopoverPositionerProps$1['fitViewport'];
|
|
107
|
+
/**
|
|
108
|
+
* Whether to constrain the floating element's width so that it matches the
|
|
109
|
+
* reference element.
|
|
110
|
+
*
|
|
111
|
+
* @default false
|
|
112
|
+
*/
|
|
113
|
+
sameWidth?: InlinePopoverPositionerProps$1['sameWidth'];
|
|
114
|
+
/**
|
|
115
|
+
* Whether to constrain the floating element's height so that it matches the
|
|
116
|
+
* reference element.
|
|
117
|
+
*
|
|
118
|
+
* @default false
|
|
119
|
+
*/
|
|
120
|
+
sameHeight?: InlinePopoverPositionerProps$1['sameHeight'];
|
|
121
|
+
/**
|
|
122
|
+
* Describes the clipping element(s) or area that overflow will be checked relative to.
|
|
123
|
+
* Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.
|
|
124
|
+
*
|
|
125
|
+
* @default 'clippingAncestors'
|
|
126
|
+
*/
|
|
127
|
+
boundary?: InlinePopoverPositionerProps$1['boundary'];
|
|
128
|
+
/**
|
|
129
|
+
* Describes the root boundary that the element will be checked for overflow relative to.
|
|
130
|
+
* Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.
|
|
131
|
+
*
|
|
132
|
+
* @default 'viewport'
|
|
133
|
+
*/
|
|
134
|
+
rootBoundary?: InlinePopoverPositionerProps$1['rootBoundary'];
|
|
135
|
+
/**
|
|
136
|
+
* The element that will be used to check for overflow. Please see
|
|
137
|
+
* https://floating-ui.com/docs/detectoverflow#elementcontext for more
|
|
138
|
+
* information.
|
|
139
|
+
*
|
|
140
|
+
* @default 'floating'
|
|
141
|
+
*/
|
|
142
|
+
elementContext?: InlinePopoverPositionerProps$1['elementContext'];
|
|
143
|
+
/**
|
|
144
|
+
* Whether to check the alternate elementContext's boundary. Please see
|
|
145
|
+
* https://floating-ui.com/docs/detectoverflow#altboundary for more
|
|
146
|
+
* information.
|
|
147
|
+
*
|
|
148
|
+
* @default false
|
|
149
|
+
*/
|
|
150
|
+
altBoundary?: InlinePopoverPositionerProps$1['altBoundary'];
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* A Solid component that renders an `prosekit-inline-popover-positioner` custom element.
|
|
154
|
+
*
|
|
155
|
+
* @public
|
|
156
|
+
*/
|
|
157
|
+
declare const InlinePopoverPositioner: Component<InlinePopoverPositionerProps>;
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region src/components/inline-popover/inline-popover-root.gen.d.ts
|
|
160
|
+
/**
|
|
161
|
+
* Props for the {@link InlinePopoverRoot} Solid component.
|
|
162
|
+
*
|
|
163
|
+
* @public
|
|
164
|
+
*/
|
|
165
|
+
interface InlinePopoverRootProps extends JSX.HTMLAttributes<InlinePopoverRootElement> {
|
|
166
|
+
/**
|
|
167
|
+
* The ProseKit editor instance.
|
|
168
|
+
*
|
|
169
|
+
* @default null
|
|
170
|
+
* @hidden
|
|
171
|
+
*/
|
|
172
|
+
editor?: InlinePopoverRootProps$1['editor'];
|
|
173
|
+
/**
|
|
174
|
+
* Whether the popover is open by default when some inline content is
|
|
175
|
+
* selected.
|
|
176
|
+
*
|
|
177
|
+
* @default true
|
|
178
|
+
*/
|
|
179
|
+
defaultOpen?: InlinePopoverRootProps$1['defaultOpen'];
|
|
180
|
+
/**
|
|
181
|
+
* Whether the inline popover should be dismissed when the editor receives an
|
|
182
|
+
* Escape key press.
|
|
183
|
+
*
|
|
184
|
+
* @default true
|
|
185
|
+
*/
|
|
186
|
+
dismissOnEscape?: InlinePopoverRootProps$1['dismissOnEscape'];
|
|
187
|
+
/**
|
|
188
|
+
* Whether the overlay is currently open.
|
|
189
|
+
* @default null
|
|
190
|
+
*/
|
|
191
|
+
open?: InlinePopoverRootProps$1['open'];
|
|
192
|
+
/**
|
|
193
|
+
* Whether the component should ignore user interaction.
|
|
194
|
+
* @default false
|
|
195
|
+
*/
|
|
196
|
+
disabled?: InlinePopoverRootProps$1['disabled'];
|
|
197
|
+
/** */
|
|
198
|
+
onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* A Solid component that renders an `prosekit-inline-popover-root` custom element.
|
|
202
|
+
*
|
|
203
|
+
* @public
|
|
204
|
+
*/
|
|
205
|
+
declare const InlinePopoverRoot: Component<InlinePopoverRootProps>;
|
|
12
206
|
//#endregion
|
|
13
|
-
export {
|
|
207
|
+
export { InlinePopoverPopup, type InlinePopoverPopupProps, InlinePopoverPositioner, type InlinePopoverPositionerProps, InlinePopoverRoot, type InlinePopoverRootEvents, type InlinePopoverRootProps, OpenChangeEvent };
|
|
14
208
|
//# sourceMappingURL=prosekit-solid-inline-popover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-solid-inline-popover.d.ts","names":[],"sources":["../src/components/inline-popover/inline-popover.gen.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"prosekit-solid-inline-popover.d.ts","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"mappings":";;;;;;;;;UAaiB,uBAAA,SAAgC,GAAA,CAAI,cAAA,CAAe,yBAAA;;AAOpE;;;;cAAa,kBAAA,EAAoB,SAAA,CAAU,uBAAA;;;;;;;;UCN1B,4BAAA,SAAqC,GAAA,CAAI,cAAA,CAAe,8BAAA;EDDoB;;AAO7F;;;ECAE,SAAA,GAAY,8BAAA;EDAoD;;;;ACNlE;EAYE,MAAA,GAAS,8BAAA;;;;;;;EAOT,IAAA,GAAO,8BAAA;EAoBW;;;;;;EAblB,OAAA,GAAU,8BAAA;EA+DE;;;;;;EAxDZ,MAAA,GAAS,8BAAA;EAjC6D;;;;;EAuCtE,eAAA,GAAkB,8BAAA;EAjCN;;;;;EAuCZ,QAAA,GAAW,8BAAA;EAnBD;;;;;;;EA2BV,UAAA,GAAa,8BAAA;EAAA;;;;;;EAOb,KAAA,GAAQ,8BAAA;EAsBR;;;;;;;;EAbA,IAAA,GAAO,8BAAA;EAyCQ;;;;;EAnCf,KAAA,GAAQ,8BAAA;EAmDyC;AAQnD;;;;;EApDE,WAAA,GAAc,8BAAA;;;AChFhB;;;;EDuFE,SAAA,GAAY,8BAAA;ECzEE;;;;;;EDgFd,UAAA,GAAa,8BAAA;EC9FmD;;;;;;EDqGhE,QAAA,GAAW,8BAAA;ECvFG;;;;;;ED8Fd,YAAA,GAAe,8BAAA;EC3Ef;;;;;AAQF;;ED2EE,cAAA,GAAiB,8BAAA;EC3Ea;;;;;;;EDmF9B,WAAA,GAAc,8BAAA;AAAA;;;;;;cAQH,uBAAA,EAAyB,SAAA,CAAU,4BAAA;;;;;;;;UCpI/B,sBAAA,SAA+B,GAAA,CAAI,cAAA,CAAe,wBAAA;EFH0B;;AAO7F;;;;EEGE,MAAA,GAAS,wBAAA;;;;ADTX;;;ECgBE,WAAA,GAAc,wBAAA;EDVF;;;;;;ECiBZ,eAAA,GAAkB,wBAAA;ED8BL;;;;ECzBb,IAAA,GAAO,wBAAA;ED6DK;;;;ECxDZ,QAAA,GAAW,wBAAA;ED6FG;EC3Fd,YAAA,IAAgB,KAAA,EAAO,uBAAA;AAAA;;;;;;cAQZ,iBAAA,EAAmB,SAAA,CAAU,sBAAA"}
|
|
@@ -1,8 +1,131 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { n as useEditorContext } from "./editor-context.js";
|
|
2
|
+
import { createEffect, createSignal, mergeProps, splitProps } from "solid-js";
|
|
3
|
+
import h from "solid-js/h";
|
|
4
|
+
import { OpenChangeEvent, registerInlinePopoverPopupElement, registerInlinePopoverPositionerElement, registerInlinePopoverRootElement } from "@prosekit/web/inline-popover";
|
|
5
|
+
//#region src/components/inline-popover/inline-popover-popup.gen.ts
|
|
6
|
+
/**
|
|
7
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* A Solid component that renders an `prosekit-inline-popover-popup` custom element.
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
const InlinePopoverPopup = (props) => {
|
|
15
|
+
registerInlinePopoverPopupElement();
|
|
16
|
+
const restProps = props;
|
|
17
|
+
return () => h("prosekit-inline-popover-popup", restProps);
|
|
18
|
+
};
|
|
5
19
|
//#endregion
|
|
6
|
-
|
|
20
|
+
//#region src/components/inline-popover/inline-popover-positioner.gen.ts
|
|
21
|
+
/**
|
|
22
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* A Solid component that renders an `prosekit-inline-popover-positioner` custom element.
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
const InlinePopoverPositioner = (props) => {
|
|
30
|
+
registerInlinePopoverPositionerElement();
|
|
31
|
+
const [getElement, setElement] = createSignal(null);
|
|
32
|
+
const [elementProps, restProps] = splitProps(props, [
|
|
33
|
+
"altBoundary",
|
|
34
|
+
"autoUpdate",
|
|
35
|
+
"boundary",
|
|
36
|
+
"elementContext",
|
|
37
|
+
"fitViewport",
|
|
38
|
+
"flip",
|
|
39
|
+
"hide",
|
|
40
|
+
"hoist",
|
|
41
|
+
"inline",
|
|
42
|
+
"offset",
|
|
43
|
+
"overflowPadding",
|
|
44
|
+
"overlap",
|
|
45
|
+
"placement",
|
|
46
|
+
"rootBoundary",
|
|
47
|
+
"sameHeight",
|
|
48
|
+
"sameWidth",
|
|
49
|
+
"shift",
|
|
50
|
+
"strategy"
|
|
51
|
+
]);
|
|
52
|
+
createEffect(() => {
|
|
53
|
+
const element = getElement();
|
|
54
|
+
if (!element) return;
|
|
55
|
+
Object.assign(element, {
|
|
56
|
+
altBoundary: elementProps.altBoundary,
|
|
57
|
+
autoUpdate: elementProps.autoUpdate,
|
|
58
|
+
boundary: elementProps.boundary,
|
|
59
|
+
elementContext: elementProps.elementContext,
|
|
60
|
+
fitViewport: elementProps.fitViewport,
|
|
61
|
+
flip: elementProps.flip,
|
|
62
|
+
hide: elementProps.hide,
|
|
63
|
+
hoist: elementProps.hoist,
|
|
64
|
+
inline: elementProps.inline,
|
|
65
|
+
offset: elementProps.offset,
|
|
66
|
+
overflowPadding: elementProps.overflowPadding,
|
|
67
|
+
overlap: elementProps.overlap,
|
|
68
|
+
placement: elementProps.placement,
|
|
69
|
+
rootBoundary: elementProps.rootBoundary,
|
|
70
|
+
sameHeight: elementProps.sameHeight,
|
|
71
|
+
sameWidth: elementProps.sameWidth,
|
|
72
|
+
shift: elementProps.shift,
|
|
73
|
+
strategy: elementProps.strategy
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
return () => h("prosekit-inline-popover-positioner", mergeProps(restProps, { ref: (el) => {
|
|
77
|
+
setElement(el);
|
|
78
|
+
} }));
|
|
79
|
+
};
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/components/inline-popover/inline-popover-root.gen.ts
|
|
82
|
+
/**
|
|
83
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
84
|
+
*/
|
|
85
|
+
/**
|
|
86
|
+
* A Solid component that renders an `prosekit-inline-popover-root` custom element.
|
|
87
|
+
*
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
const InlinePopoverRoot = (props) => {
|
|
91
|
+
registerInlinePopoverRootElement();
|
|
92
|
+
const [getElement, setElement] = createSignal(null);
|
|
93
|
+
const handlers = [];
|
|
94
|
+
const [elementProps, eventHandlers, restProps] = splitProps(props, [
|
|
95
|
+
"defaultOpen",
|
|
96
|
+
"disabled",
|
|
97
|
+
"dismissOnEscape",
|
|
98
|
+
"editor",
|
|
99
|
+
"open"
|
|
100
|
+
], ["onOpenChange"]);
|
|
101
|
+
const p3Fallback = useEditorContext();
|
|
102
|
+
createEffect(() => {
|
|
103
|
+
const element = getElement();
|
|
104
|
+
if (!element) return;
|
|
105
|
+
Object.assign(element, {
|
|
106
|
+
defaultOpen: elementProps.defaultOpen,
|
|
107
|
+
disabled: elementProps.disabled,
|
|
108
|
+
dismissOnEscape: elementProps.dismissOnEscape,
|
|
109
|
+
editor: elementProps.editor ?? p3Fallback,
|
|
110
|
+
open: elementProps.open
|
|
111
|
+
});
|
|
112
|
+
handlers.length = 0;
|
|
113
|
+
handlers.push(eventHandlers.onOpenChange);
|
|
114
|
+
});
|
|
115
|
+
createEffect(() => {
|
|
116
|
+
const element = getElement();
|
|
117
|
+
if (!element) return;
|
|
118
|
+
const ac = new AbortController();
|
|
119
|
+
for (const [index, eventName] of ["openChange"].entries()) element.addEventListener(eventName, (event) => {
|
|
120
|
+
handlers[index]?.(event);
|
|
121
|
+
}, { signal: ac.signal });
|
|
122
|
+
return () => ac.abort();
|
|
123
|
+
});
|
|
124
|
+
return () => h("prosekit-inline-popover-root", mergeProps(restProps, { ref: (el) => {
|
|
125
|
+
setElement(el);
|
|
126
|
+
} }));
|
|
127
|
+
};
|
|
128
|
+
//#endregion
|
|
129
|
+
export { InlinePopoverPopup, InlinePopoverPositioner, InlinePopoverRoot, OpenChangeEvent };
|
|
7
130
|
|
|
8
131
|
//# sourceMappingURL=prosekit-solid-inline-popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-solid-inline-popover.js","names":[],"sources":["../src/components/inline-popover/inline-popover.gen.ts"],"sourcesContent":["import { \n type InlinePopoverElement,\n type InlinePopoverProps as Props,\n type InlinePopoverEvents as Events,\n inlinePopoverProps,\n inlinePopoverEvents,\n} from '@prosekit/web/inline-popover'\nimport type { Component } from 'solid-js'\n\nimport type { PropsWithElement } from '../../types.ts'\nimport { createComponent } from '../create-component.ts'\nimport type { CreateProps } from '../create-props.ts'\n\n/**\n * Props for the {@link InlinePopover} component.\n */\nexport interface InlinePopoverProps extends Partial<CreateProps<Props, Events>> {}\n\nexport const InlinePopover: Component<PropsWithElement<\n InlinePopoverProps,\n InlinePopoverElement\n>> = createComponent<\n InlinePopoverProps,\n InlinePopoverElement\n>(\n 'prosekit-inline-popover', \n Object.keys(inlinePopoverProps),\n Object.keys(inlinePopoverEvents),\n)\n"],"mappings":";;;AAkBA,MAAa,gBAGR,gBAIH,2BACA,OAAO,KAAK,mBAAmB,EAC/B,OAAO,KAAK,oBAAoB,CACjC"}
|
|
1
|
+
{"version":3,"file":"prosekit-solid-inline-popover.js","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerInlinePopoverPopupElement, type InlinePopoverPopupElement } from '@prosekit/web/inline-popover';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/**\n * Props for the {@link InlinePopoverPopup} Solid component.\n *\n * @public\n */\nexport interface InlinePopoverPopupProps extends JSX.HTMLAttributes<InlinePopoverPopupElement> {}\n\n/**\n * A Solid component that renders an `prosekit-inline-popover-popup` custom element.\n *\n * @public\n */\nexport const InlinePopoverPopup: Component<InlinePopoverPopupProps> = (props): any => {\n registerInlinePopoverPopupElement();\n\n const restProps = props;\n\n return () => h('prosekit-inline-popover-popup', restProps);\n};\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerInlinePopoverPositionerElement, type InlinePopoverPositionerElement, type InlinePopoverPositionerProps as InlinePopoverPositionerElementProps } from '@prosekit/web/inline-popover';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/**\n * Props for the {@link InlinePopoverPositioner} Solid component.\n *\n * @public\n */\nexport interface InlinePopoverPositionerProps extends JSX.HTMLAttributes<InlinePopoverPositionerElement> {\n /**\n * The initial placement of the floating element\n *\n * @default \"top\"\n */\n placement?: InlinePopoverPositionerElementProps['placement'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 12\n */\n offset?: InlinePopoverPositionerElementProps['offset'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default true\n */\n hide?: InlinePopoverPositionerElementProps['hide'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default true\n */\n overlap?: InlinePopoverPositionerElementProps['overlap'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default true\n */\n inline?: InlinePopoverPositionerElementProps['inline'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n *\n * @default 8\n */\n overflowPadding?: InlinePopoverPositionerElementProps['overflowPadding'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: InlinePopoverPositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: InlinePopoverPositionerElementProps['autoUpdate'];\n /**\n * Whether to use the browser Popover API to place the floating element on\n * top of other page content.\n *\n * @default true\n */\n hoist?: InlinePopoverPositionerElementProps['hoist'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: InlinePopoverPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: InlinePopoverPositionerElementProps['shift'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: InlinePopoverPositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: InlinePopoverPositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: InlinePopoverPositionerElementProps['sameHeight'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: InlinePopoverPositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: InlinePopoverPositionerElementProps['rootBoundary'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: InlinePopoverPositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: InlinePopoverPositionerElementProps['altBoundary'];\n}\n\n/**\n * A Solid component that renders an `prosekit-inline-popover-positioner` custom element.\n *\n * @public\n */\nexport const InlinePopoverPositioner: Component<InlinePopoverPositionerProps> = (props): any => {\n registerInlinePopoverPositionerElement();\n\n const [getElement, setElement] = createSignal<InlinePopoverPositionerElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, {\n altBoundary: elementProps.altBoundary,\n autoUpdate: elementProps.autoUpdate,\n boundary: elementProps.boundary,\n elementContext: elementProps.elementContext,\n fitViewport: elementProps.fitViewport,\n flip: elementProps.flip,\n hide: elementProps.hide,\n hoist: elementProps.hoist,\n inline: elementProps.inline,\n offset: elementProps.offset,\n overflowPadding: elementProps.overflowPadding,\n overlap: elementProps.overlap,\n placement: elementProps.placement,\n rootBoundary: elementProps.rootBoundary,\n sameHeight: elementProps.sameHeight,\n sameWidth: elementProps.sameWidth,\n shift: elementProps.shift,\n strategy: elementProps.strategy,\n });\n });\n\n return () =>\n h(\n 'prosekit-inline-popover-positioner',\n mergeProps(restProps, {\n ref: (el: InlinePopoverPositionerElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerInlinePopoverRootElement, type InlinePopoverRootElement, type InlinePopoverRootEvents, type InlinePopoverRootProps as InlinePopoverRootElementProps } from '@prosekit/web/inline-popover';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link InlinePopoverRoot} Solid component.\n *\n * @public\n */\nexport interface InlinePopoverRootProps extends JSX.HTMLAttributes<InlinePopoverRootElement> {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: InlinePopoverRootElementProps['editor'];\n /**\n * Whether the popover is open by default when some inline content is\n * selected.\n *\n * @default true\n */\n defaultOpen?: InlinePopoverRootElementProps['defaultOpen'];\n /**\n * Whether the inline popover should be dismissed when the editor receives an\n * Escape key press.\n *\n * @default true\n */\n dismissOnEscape?: InlinePopoverRootElementProps['dismissOnEscape'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: InlinePopoverRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: InlinePopoverRootElementProps['disabled'];\n /** */\n onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;\n}\n\n/**\n * A Solid component that renders an `prosekit-inline-popover-root` custom element.\n *\n * @public\n */\nexport const InlinePopoverRoot: Component<InlinePopoverRootProps> = (props): any => {\n registerInlinePopoverRootElement();\n\n const [getElement, setElement] = createSignal<InlinePopoverRootElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [elementProps, eventHandlers, restProps] = splitProps(props, ['defaultOpen', 'disabled', 'dismissOnEscape', 'editor', 'open'], ['onOpenChange']);\n\n const p3Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { defaultOpen: elementProps.defaultOpen, disabled: elementProps.disabled, dismissOnEscape: elementProps.dismissOnEscape, editor: elementProps.editor ?? p3Fallback, open: elementProps.open });\n\n handlers.length = 0;\n handlers.push(eventHandlers.onOpenChange);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['openChange'].entries()) {\n element.addEventListener(\n eventName,\n (event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () =>\n h(\n 'prosekit-inline-popover-root',\n mergeProps(restProps, {\n ref: (el: InlinePopoverRootElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n\nexport type { InlinePopoverRootEvents };\n"],"mappings":";;;;;;;;;;;;;AAoBA,MAAa,sBAA0D,UAAe;AACpF,oCAAmC;CAEnC,MAAM,YAAY;AAElB,cAAa,EAAE,iCAAiC,UAAU;;;;;;;;;;;;AC2H5D,MAAa,2BAAoE,UAAe;AAC9F,yCAAwC;CAExC,MAAM,CAAC,YAAY,cAAc,aAAoD,KAAK;CAE1F,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO;EAAC;EAAe;EAAc;EAAY;EAAkB;EAAe;EAAQ;EAAQ;EAAS;EAAU;EAAU;EAAmB;EAAW;EAAa;EAAgB;EAAc;EAAa;EAAS;EAAW,CAAC;AAEvR,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS;GACrB,aAAa,aAAa;GAC1B,YAAY,aAAa;GACzB,UAAU,aAAa;GACvB,gBAAgB,aAAa;GAC7B,aAAa,aAAa;GAC1B,MAAM,aAAa;GACnB,MAAM,aAAa;GACnB,OAAO,aAAa;GACpB,QAAQ,aAAa;GACrB,QAAQ,aAAa;GACrB,iBAAiB,aAAa;GAC9B,SAAS,aAAa;GACtB,WAAW,aAAa;GACxB,cAAc,aAAa;GAC3B,YAAY,aAAa;GACzB,WAAW,aAAa;GACxB,OAAO,aAAa;GACpB,UAAU,aAAa;GACxB,CAAC;GACF;AAEF,cACE,EACE,sCACA,WAAW,WAAW,EACpB,MAAM,OAA8C;AAClD,aAAW,GAAG;IAEjB,CAAC,CACH;;;;;;;;;;;;ACpIL,MAAa,qBAAwD,UAAe;AAClF,mCAAkC;CAElC,MAAM,CAAC,YAAY,cAAc,aAA8C,KAAK;CACpF,MAAM,WAAsD,EAAE;CAE9D,MAAM,CAAC,cAAc,eAAe,aAAa,WAAW,OAAO;EAAC;EAAe;EAAY;EAAmB;EAAU;EAAO,EAAE,CAAC,eAAe,CAAC;CAEtJ,MAAM,aAAa,kBAAkB;AAErC,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS;GAAE,aAAa,aAAa;GAAa,UAAU,aAAa;GAAU,iBAAiB,aAAa;GAAiB,QAAQ,aAAa,UAAU;GAAY,MAAM,aAAa;GAAM,CAAC;AAErN,WAAS,SAAS;AAClB,WAAS,KAAK,cAAc,aAAa;GACzC;AAEF,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,CAAC,SAAS,CACvD,SAAQ,iBACN,YACC,UAAU;AACT,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cACE,EACE,gCACA,WAAW,WAAW,EACpB,MAAM,OAAwC;AAC5C,aAAW,GAAG;IAEjB,CAAC,CACH"}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { Component, JSX } from "solid-js";
|
|
2
|
+
import { MenuItemElement, MenuItemEvents, MenuItemProps as MenuItemProps$1, MenuPopupElement, MenuPopupProps as MenuPopupProps$1, MenuPositionerElement, MenuPositionerProps as MenuPositionerProps$1, MenuRootElement, MenuRootEvents, MenuRootProps as MenuRootProps$1, MenuSubmenuRootElement, MenuSubmenuTriggerElement, MenuTriggerElement, MenuTriggerEvents, MenuTriggerProps as MenuTriggerProps$1, OpenChangeEvent, SelectEvent } from "@prosekit/web/menu";
|
|
3
|
+
|
|
4
|
+
//#region src/components/menu/menu-item.gen.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Props for the {@link MenuItem} Solid component.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
interface MenuItemProps extends JSX.HTMLAttributes<MenuItemElement> {
|
|
11
|
+
/**
|
|
12
|
+
* The unique value for this menu item.
|
|
13
|
+
*
|
|
14
|
+
* @default ""
|
|
15
|
+
*/
|
|
16
|
+
value?: MenuItemProps$1['value'];
|
|
17
|
+
/**
|
|
18
|
+
* Whether this menu item is disabled.
|
|
19
|
+
*
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
disabled?: MenuItemProps$1['disabled'];
|
|
23
|
+
/**
|
|
24
|
+
* Whether to close the menu when the item is pressed.
|
|
25
|
+
*
|
|
26
|
+
* @default true
|
|
27
|
+
*/
|
|
28
|
+
closeOnSelect?: MenuItemProps$1['closeOnSelect'];
|
|
29
|
+
/** Emitted when the the item is selected. */
|
|
30
|
+
onSelect?: (event: MenuItemEvents['select']) => void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A Solid component that renders an `prosekit-menu-item` custom element.
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
declare const MenuItem: Component<MenuItemProps>;
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/components/menu/menu-popup.gen.d.ts
|
|
40
|
+
/**
|
|
41
|
+
* Props for the {@link MenuPopup} Solid component.
|
|
42
|
+
*
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
interface MenuPopupProps extends JSX.HTMLAttributes<MenuPopupElement> {
|
|
46
|
+
/**
|
|
47
|
+
* By default, the MenuPopup element will listen for keydown events.
|
|
48
|
+
* You can pass a different element to listen for keydown events.
|
|
49
|
+
*
|
|
50
|
+
* @default null
|
|
51
|
+
*/
|
|
52
|
+
eventTarget?: MenuPopupProps$1['eventTarget'];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A Solid component that renders an `prosekit-menu-popup` custom element.
|
|
56
|
+
*
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
59
|
+
declare const MenuPopup: Component<MenuPopupProps>;
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/components/menu/menu-positioner.gen.d.ts
|
|
62
|
+
/**
|
|
63
|
+
* Props for the {@link MenuPositioner} Solid component.
|
|
64
|
+
*
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
67
|
+
interface MenuPositionerProps extends JSX.HTMLAttributes<MenuPositionerElement> {
|
|
68
|
+
/**
|
|
69
|
+
* The initial placement of the floating element
|
|
70
|
+
*
|
|
71
|
+
* @default "bottom-start"
|
|
72
|
+
*/
|
|
73
|
+
placement?: MenuPositionerProps$1['placement'];
|
|
74
|
+
/**
|
|
75
|
+
* The strategy to use for positioning
|
|
76
|
+
*
|
|
77
|
+
* @default "absolute"
|
|
78
|
+
*/
|
|
79
|
+
strategy?: MenuPositionerProps$1['strategy'];
|
|
80
|
+
/**
|
|
81
|
+
* Options to activate auto-update listeners
|
|
82
|
+
*
|
|
83
|
+
* @see https://floating-ui.com/docs/autoUpdate
|
|
84
|
+
*
|
|
85
|
+
* @default true
|
|
86
|
+
*/
|
|
87
|
+
autoUpdate?: MenuPositionerProps$1['autoUpdate'];
|
|
88
|
+
/**
|
|
89
|
+
* Whether to use the browser Popover API to place the floating element on
|
|
90
|
+
* top of other page content.
|
|
91
|
+
*
|
|
92
|
+
* @default true
|
|
93
|
+
*/
|
|
94
|
+
hoist?: MenuPositionerProps$1['hoist'];
|
|
95
|
+
/**
|
|
96
|
+
* The distance between the reference and floating element.
|
|
97
|
+
*
|
|
98
|
+
* @default 6
|
|
99
|
+
*/
|
|
100
|
+
offset?: MenuPositionerProps$1['offset'];
|
|
101
|
+
/**
|
|
102
|
+
* Whether to flip the `placement` in order to keep it in view when the
|
|
103
|
+
* preferred placement(s) will overflow the clipping boundary. You can also
|
|
104
|
+
* provide an array of placements to try sequentially if the preferred
|
|
105
|
+
* `placement` does not fit.
|
|
106
|
+
*
|
|
107
|
+
* @default true
|
|
108
|
+
*/
|
|
109
|
+
flip?: MenuPositionerProps$1['flip'];
|
|
110
|
+
/**
|
|
111
|
+
* Whether the floating element should shift to keep it in view.
|
|
112
|
+
*
|
|
113
|
+
* @default true
|
|
114
|
+
*/
|
|
115
|
+
shift?: MenuPositionerProps$1['shift'];
|
|
116
|
+
/**
|
|
117
|
+
* Whether the floating element can overlap the reference element to keep it
|
|
118
|
+
* in view.
|
|
119
|
+
*
|
|
120
|
+
* @default false
|
|
121
|
+
*/
|
|
122
|
+
overlap?: MenuPositionerProps$1['overlap'];
|
|
123
|
+
/**
|
|
124
|
+
* Whether to constrain the floating element's width and height to not exceed
|
|
125
|
+
* the viewport.
|
|
126
|
+
*
|
|
127
|
+
* @default false
|
|
128
|
+
*/
|
|
129
|
+
fitViewport?: MenuPositionerProps$1['fitViewport'];
|
|
130
|
+
/**
|
|
131
|
+
* Whether to constrain the floating element's width so that it matches the
|
|
132
|
+
* reference element.
|
|
133
|
+
*
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
sameWidth?: MenuPositionerProps$1['sameWidth'];
|
|
137
|
+
/**
|
|
138
|
+
* Whether to constrain the floating element's height so that it matches the
|
|
139
|
+
* reference element.
|
|
140
|
+
*
|
|
141
|
+
* @default false
|
|
142
|
+
*/
|
|
143
|
+
sameHeight?: MenuPositionerProps$1['sameHeight'];
|
|
144
|
+
/**
|
|
145
|
+
* Whether to improve positioning for inline reference elements that span over
|
|
146
|
+
* multiple lines.
|
|
147
|
+
*
|
|
148
|
+
* @default false
|
|
149
|
+
*/
|
|
150
|
+
inline?: MenuPositionerProps$1['inline'];
|
|
151
|
+
/**
|
|
152
|
+
* Whether to hide the floating element when the reference element or the
|
|
153
|
+
* floating element is fully clipped.
|
|
154
|
+
*
|
|
155
|
+
* @default false
|
|
156
|
+
*/
|
|
157
|
+
hide?: MenuPositionerProps$1['hide'];
|
|
158
|
+
/**
|
|
159
|
+
* Describes the clipping element(s) or area that overflow will be checked relative to.
|
|
160
|
+
* Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.
|
|
161
|
+
*
|
|
162
|
+
* @default 'clippingAncestors'
|
|
163
|
+
*/
|
|
164
|
+
boundary?: MenuPositionerProps$1['boundary'];
|
|
165
|
+
/**
|
|
166
|
+
* Describes the root boundary that the element will be checked for overflow relative to.
|
|
167
|
+
* Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.
|
|
168
|
+
*
|
|
169
|
+
* @default 'viewport'
|
|
170
|
+
*/
|
|
171
|
+
rootBoundary?: MenuPositionerProps$1['rootBoundary'];
|
|
172
|
+
/**
|
|
173
|
+
* Describes the virtual padding around the boundary to check for overflow.
|
|
174
|
+
* Please see https://floating-ui.com/docs/detectoverflow#padding for more information.
|
|
175
|
+
*
|
|
176
|
+
* @default 4
|
|
177
|
+
*/
|
|
178
|
+
overflowPadding?: MenuPositionerProps$1['overflowPadding'];
|
|
179
|
+
/**
|
|
180
|
+
* The element that will be used to check for overflow. Please see
|
|
181
|
+
* https://floating-ui.com/docs/detectoverflow#elementcontext for more
|
|
182
|
+
* information.
|
|
183
|
+
*
|
|
184
|
+
* @default 'floating'
|
|
185
|
+
*/
|
|
186
|
+
elementContext?: MenuPositionerProps$1['elementContext'];
|
|
187
|
+
/**
|
|
188
|
+
* Whether to check the alternate elementContext's boundary. Please see
|
|
189
|
+
* https://floating-ui.com/docs/detectoverflow#altboundary for more
|
|
190
|
+
* information.
|
|
191
|
+
*
|
|
192
|
+
* @default false
|
|
193
|
+
*/
|
|
194
|
+
altBoundary?: MenuPositionerProps$1['altBoundary'];
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* A Solid component that renders an `prosekit-menu-positioner` custom element.
|
|
198
|
+
*
|
|
199
|
+
* @public
|
|
200
|
+
*/
|
|
201
|
+
declare const MenuPositioner: Component<MenuPositionerProps>;
|
|
202
|
+
//#endregion
|
|
203
|
+
//#region src/components/menu/menu-root.gen.d.ts
|
|
204
|
+
/**
|
|
205
|
+
* Props for the {@link MenuRoot} Solid component.
|
|
206
|
+
*
|
|
207
|
+
* @public
|
|
208
|
+
*/
|
|
209
|
+
interface MenuRootProps extends JSX.HTMLAttributes<MenuRootElement> {
|
|
210
|
+
/**
|
|
211
|
+
* Whether the overlay is initially open.
|
|
212
|
+
* @default false
|
|
213
|
+
*/
|
|
214
|
+
defaultOpen?: MenuRootProps$1['defaultOpen'];
|
|
215
|
+
/**
|
|
216
|
+
* Whether the overlay is currently open.
|
|
217
|
+
* @default null
|
|
218
|
+
*/
|
|
219
|
+
open?: MenuRootProps$1['open'];
|
|
220
|
+
/**
|
|
221
|
+
* Whether the component should ignore user interaction.
|
|
222
|
+
* @default false
|
|
223
|
+
*/
|
|
224
|
+
disabled?: MenuRootProps$1['disabled'];
|
|
225
|
+
/** Emitted when the menu is opened or closed. */
|
|
226
|
+
onOpenChange?: (event: MenuRootEvents['openChange']) => void;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* A Solid component that renders an `prosekit-menu-root` custom element.
|
|
230
|
+
*
|
|
231
|
+
* @public
|
|
232
|
+
*/
|
|
233
|
+
declare const MenuRoot: Component<MenuRootProps>;
|
|
234
|
+
//#endregion
|
|
235
|
+
//#region src/components/menu/menu-submenu-root.gen.d.ts
|
|
236
|
+
/**
|
|
237
|
+
* Props for the {@link MenuSubmenuRoot} Solid component.
|
|
238
|
+
*
|
|
239
|
+
* @public
|
|
240
|
+
*/
|
|
241
|
+
interface MenuSubmenuRootProps extends JSX.HTMLAttributes<MenuSubmenuRootElement> {}
|
|
242
|
+
/**
|
|
243
|
+
* A Solid component that renders an `prosekit-menu-submenu-root` custom element.
|
|
244
|
+
*
|
|
245
|
+
* @public
|
|
246
|
+
*/
|
|
247
|
+
declare const MenuSubmenuRoot: Component<MenuSubmenuRootProps>;
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/components/menu/menu-submenu-trigger.gen.d.ts
|
|
250
|
+
/**
|
|
251
|
+
* Props for the {@link MenuSubmenuTrigger} Solid component.
|
|
252
|
+
*
|
|
253
|
+
* @public
|
|
254
|
+
*/
|
|
255
|
+
interface MenuSubmenuTriggerProps extends JSX.HTMLAttributes<MenuSubmenuTriggerElement> {}
|
|
256
|
+
/**
|
|
257
|
+
* A Solid component that renders an `prosekit-menu-submenu-trigger` custom element.
|
|
258
|
+
*
|
|
259
|
+
* @public
|
|
260
|
+
*/
|
|
261
|
+
declare const MenuSubmenuTrigger: Component<MenuSubmenuTriggerProps>;
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region src/components/menu/menu-trigger.gen.d.ts
|
|
264
|
+
/**
|
|
265
|
+
* Props for the {@link MenuTrigger} Solid component.
|
|
266
|
+
*
|
|
267
|
+
* @public
|
|
268
|
+
*/
|
|
269
|
+
interface MenuTriggerProps extends JSX.HTMLAttributes<MenuTriggerElement> {
|
|
270
|
+
/**
|
|
271
|
+
* Whether the component should ignore user interaction.
|
|
272
|
+
*
|
|
273
|
+
* @default false
|
|
274
|
+
*/
|
|
275
|
+
disabled?: MenuTriggerProps$1['disabled'];
|
|
276
|
+
/** Emitted when the menu is opened or closed. */
|
|
277
|
+
onOpenChange?: (event: MenuTriggerEvents['openChange']) => void;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* A Solid component that renders an `prosekit-menu-trigger` custom element.
|
|
281
|
+
*
|
|
282
|
+
* @public
|
|
283
|
+
*/
|
|
284
|
+
declare const MenuTrigger: Component<MenuTriggerProps>;
|
|
285
|
+
//#endregion
|
|
286
|
+
export { MenuItem, type MenuItemEvents, type MenuItemProps, MenuPopup, type MenuPopupProps, MenuPositioner, type MenuPositionerProps, MenuRoot, type MenuRootEvents, type MenuRootProps, MenuSubmenuRoot, type MenuSubmenuRootProps, MenuSubmenuTrigger, type MenuSubmenuTriggerProps, MenuTrigger, type MenuTriggerEvents, type MenuTriggerProps, OpenChangeEvent, SelectEvent };
|
|
287
|
+
//# sourceMappingURL=prosekit-solid-menu.d.ts.map
|