@prosekit/solid 0.7.0-beta.4 → 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 +10 -61
- package/dist/prosekit-solid-autocomplete.d.ts.map +1 -1
- package/dist/prosekit-solid-autocomplete.js +5 -50
- package/dist/prosekit-solid-autocomplete.js.map +1 -1
- package/dist/prosekit-solid-block-handle.d.ts +10 -61
- package/dist/prosekit-solid-block-handle.d.ts.map +1 -1
- package/dist/prosekit-solid-block-handle.js +5 -50
- package/dist/prosekit-solid-block-handle.js.map +1 -1
- package/dist/prosekit-solid-drop-indicator.d.ts +2 -13
- 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 +6 -37
- package/dist/prosekit-solid-inline-popover.d.ts.map +1 -1
- package/dist/prosekit-solid-inline-popover.js +3 -30
- package/dist/prosekit-solid-inline-popover.js.map +1 -1
- package/dist/prosekit-solid-menu.d.ts +48 -88
- package/dist/prosekit-solid-menu.d.ts.map +1 -1
- package/dist/prosekit-solid-menu.js +50 -74
- package/dist/prosekit-solid-menu.js.map +1 -1
- package/dist/prosekit-solid-popover.d.ts +8 -49
- package/dist/prosekit-solid-popover.d.ts.map +1 -1
- package/dist/prosekit-solid-popover.js +4 -40
- package/dist/prosekit-solid-popover.js.map +1 -1
- package/dist/prosekit-solid-resizable.d.ts +4 -25
- package/dist/prosekit-solid-resizable.d.ts.map +1 -1
- package/dist/prosekit-solid-resizable.js +2 -20
- package/dist/prosekit-solid-resizable.js.map +1 -1
- package/dist/prosekit-solid-table-handle.d.ts +22 -133
- 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 +8 -49
- package/dist/prosekit-solid-tooltip.d.ts.map +1 -1
- package/dist/prosekit-solid-tooltip.js +4 -40
- 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 +3 -13
- package/src/components/autocomplete/autocomplete-item.gen.ts +3 -13
- package/src/components/autocomplete/autocomplete-popup.gen.ts +3 -13
- package/src/components/autocomplete/autocomplete-positioner.gen.ts +3 -13
- package/src/components/autocomplete/autocomplete-root.gen.ts +3 -13
- package/src/components/autocomplete/index.gen.ts +1 -3
- package/src/components/block-handle/block-handle-add.gen.ts +3 -13
- package/src/components/block-handle/block-handle-draggable.gen.ts +3 -13
- package/src/components/block-handle/block-handle-popup.gen.ts +3 -13
- package/src/components/block-handle/block-handle-positioner.gen.ts +3 -13
- package/src/components/block-handle/block-handle-root.gen.ts +3 -13
- package/src/components/block-handle/index.gen.ts +1 -3
- package/src/components/drop-indicator/drop-indicator.gen.ts +3 -13
- package/src/components/drop-indicator/index.gen.ts +1 -3
- package/src/components/inline-popover/index.gen.ts +1 -3
- package/src/components/inline-popover/inline-popover-popup.gen.ts +3 -13
- package/src/components/inline-popover/inline-popover-positioner.gen.ts +3 -13
- package/src/components/inline-popover/inline-popover-root.gen.ts +3 -13
- package/src/components/menu/index.gen.ts +1 -3
- package/src/components/menu/menu-item.gen.ts +3 -13
- package/src/components/menu/menu-popup.gen.ts +3 -13
- package/src/components/menu/menu-positioner.gen.ts +3 -13
- package/src/components/menu/menu-root.gen.ts +3 -13
- package/src/components/menu/menu-submenu-root.gen.ts +65 -18
- package/src/components/menu/menu-submenu-trigger.gen.ts +39 -18
- package/src/components/menu/menu-trigger.gen.ts +3 -13
- package/src/components/popover/index.gen.ts +1 -3
- package/src/components/popover/popover-popup.gen.ts +3 -13
- package/src/components/popover/popover-positioner.gen.ts +3 -13
- package/src/components/popover/popover-root.gen.ts +3 -13
- package/src/components/popover/popover-trigger.gen.ts +3 -13
- package/src/components/resizable/index.gen.ts +1 -3
- package/src/components/resizable/resizable-handle.gen.ts +3 -13
- package/src/components/resizable/resizable-root.gen.ts +3 -13
- package/src/components/table-handle/index.gen.ts +1 -3
- package/src/components/table-handle/table-handle-column-menu-root.gen.ts +3 -13
- package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +3 -13
- package/src/components/table-handle/table-handle-column-popup.gen.ts +3 -13
- package/src/components/table-handle/table-handle-column-positioner.gen.ts +3 -13
- package/src/components/table-handle/table-handle-drag-preview.gen.ts +3 -13
- package/src/components/table-handle/table-handle-drop-indicator.gen.ts +3 -13
- package/src/components/table-handle/table-handle-root.gen.ts +3 -13
- package/src/components/table-handle/table-handle-row-menu-root.gen.ts +3 -13
- package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +3 -13
- package/src/components/table-handle/table-handle-row-popup.gen.ts +3 -13
- package/src/components/table-handle/table-handle-row-positioner.gen.ts +3 -13
- package/src/components/tooltip/index.gen.ts +1 -3
- package/src/components/tooltip/tooltip-popup.gen.ts +3 -13
- package/src/components/tooltip/tooltip-positioner.gen.ts +3 -13
- package/src/components/tooltip/tooltip-root.gen.ts +3 -13
- package/src/components/tooltip/tooltip-trigger.gen.ts +3 -13
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { Component, JSX } from "solid-js";
|
|
2
2
|
import { DropIndicatorElement, DropIndicatorProps as DropIndicatorProps$1 } from "@prosekit/web/drop-indicator";
|
|
3
|
-
|
|
4
|
-
//#region src/components/drop-indicator/drop-indicator.gen.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Props for the {@link DropIndicator} Solid component.
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
3
|
+
/** Props for the {@link DropIndicator} Solid component. */
|
|
10
4
|
interface DropIndicatorProps {
|
|
11
5
|
/**
|
|
12
6
|
* The ProseKit editor instance.
|
|
@@ -22,12 +16,7 @@ interface DropIndicatorProps {
|
|
|
22
16
|
*/
|
|
23
17
|
width?: DropIndicatorProps$1['width'];
|
|
24
18
|
}
|
|
25
|
-
/**
|
|
26
|
-
* A Solid component that renders an `prosekit-drop-indicator` custom element.
|
|
27
|
-
*
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
19
|
+
/** A Solid component that renders an `prosekit-drop-indicator` custom element. */
|
|
30
20
|
declare const DropIndicator: Component<DropIndicatorProps & JSX.HTMLAttributes<DropIndicatorElement>>;
|
|
31
|
-
//#endregion
|
|
32
21
|
export { DropIndicator, type DropIndicatorProps };
|
|
33
22
|
//# sourceMappingURL=prosekit-solid-drop-indicator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-solid-drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"prosekit-solid-drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":";;;UAUiB,kBAAA;EAAkB;;;;;;EAOjC,MAAA,GAAS,oBAAA;EAMwB;;AAInC;;;EAJE,KAAA,GAAQ,oBAAA;AAAA;;cAIG,aAAA,EAAe,SAAA,CAAU,kBAAA,GAAqB,GAAA,CAAI,cAAA,CAAe,oBAAA"}
|
|
@@ -2,15 +2,7 @@ import { n as useEditorContext } from "./editor-context.js";
|
|
|
2
2
|
import { createEffect, createSignal, mergeProps, splitProps } from "solid-js";
|
|
3
3
|
import h from "solid-js/h";
|
|
4
4
|
import { registerDropIndicatorElement } from "@prosekit/web/drop-indicator";
|
|
5
|
-
|
|
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-drop-indicator` custom element.
|
|
11
|
-
*
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
5
|
+
/** A Solid component that renders an `prosekit-drop-indicator` custom element. */
|
|
14
6
|
const DropIndicator = (props) => {
|
|
15
7
|
registerDropIndicatorElement();
|
|
16
8
|
const [getElement, setElement] = createSignal(null);
|
|
@@ -28,7 +20,6 @@ const DropIndicator = (props) => {
|
|
|
28
20
|
setElement(el);
|
|
29
21
|
} }));
|
|
30
22
|
};
|
|
31
|
-
//#endregion
|
|
32
23
|
export { DropIndicator };
|
|
33
24
|
|
|
34
25
|
//# sourceMappingURL=prosekit-solid-drop-indicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-solid-drop-indicator.js","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"prosekit-solid-drop-indicator.js","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerDropIndicatorElement, type DropIndicatorElement, type DropIndicatorProps as DropIndicatorElementProps } from '@prosekit/web/drop-indicator';\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/** Props for the {@link DropIndicator} Solid component. */\nexport interface DropIndicatorProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: DropIndicatorElementProps['editor'];\n /**\n * The line width in pixels.\n *\n * @default 2\n */\n width?: DropIndicatorElementProps['width'];\n}\n\n/** A Solid component that renders an `prosekit-drop-indicator` custom element. */\nexport const DropIndicator: Component<DropIndicatorProps & JSX.HTMLAttributes<DropIndicatorElement>> = (props): any => {\n registerDropIndicatorElement();\n\n const [getElement, setElement] = createSignal<DropIndicatorElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['editor', 'width']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback, width: elementProps.width });\n });\n\n return () =>\n h(\n 'prosekit-drop-indicator',\n mergeProps(restProps, {\n ref: (el: DropIndicatorElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n"],"mappings":";;;;;AA2BA,MAAa,iBAA2F,UAAe;AACrH,+BAA8B;CAE9B,MAAM,CAAC,YAAY,cAAc,aAA0C,KAAK;CAEhF,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO,CAAC,UAAU,QAAQ,CAAC;CAExE,MAAM,aAAa,kBAAkB;AAErC,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS;GAAE,QAAQ,aAAa,UAAU;GAAY,OAAO,aAAa;GAAO,CAAC;GAChG;AAEF,cACE,EACE,2BACA,WAAW,WAAW,EACpB,MAAM,OAAoC;AACxC,aAAW,GAAG;IAEjB,CAAC,CACH"}
|
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
import { Component, JSX } from "solid-js";
|
|
2
2
|
import { InlinePopoverPopupElement, InlinePopoverPositionerElement, InlinePopoverPositionerProps as InlinePopoverPositionerProps$1, InlinePopoverRootElement, InlinePopoverRootEvents, InlinePopoverRootProps as InlinePopoverRootProps$1 } from "@prosekit/web/inline-popover";
|
|
3
|
-
|
|
4
|
-
//#region src/components/inline-popover/inline-popover-popup.gen.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Props for the {@link InlinePopoverPopup} Solid component.
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
3
|
+
/** Props for the {@link InlinePopoverPopup} Solid component. */
|
|
10
4
|
interface InlinePopoverPopupProps {}
|
|
11
|
-
/**
|
|
12
|
-
* A Solid component that renders an `prosekit-inline-popover-popup` custom element.
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
5
|
+
/** A Solid component that renders an `prosekit-inline-popover-popup` custom element. */
|
|
16
6
|
declare const InlinePopoverPopup: Component<InlinePopoverPopupProps & JSX.HTMLAttributes<InlinePopoverPopupElement>>;
|
|
17
|
-
|
|
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
|
-
*/
|
|
7
|
+
/** Props for the {@link InlinePopoverPositioner} Solid component. */
|
|
24
8
|
interface InlinePopoverPositionerProps {
|
|
25
9
|
/**
|
|
26
10
|
* The initial placement of the floating element
|
|
@@ -149,19 +133,9 @@ interface InlinePopoverPositionerProps {
|
|
|
149
133
|
*/
|
|
150
134
|
altBoundary?: InlinePopoverPositionerProps$1['altBoundary'];
|
|
151
135
|
}
|
|
152
|
-
/**
|
|
153
|
-
* A Solid component that renders an `prosekit-inline-popover-positioner` custom element.
|
|
154
|
-
*
|
|
155
|
-
* @public
|
|
156
|
-
*/
|
|
136
|
+
/** A Solid component that renders an `prosekit-inline-popover-positioner` custom element. */
|
|
157
137
|
declare const InlinePopoverPositioner: Component<InlinePopoverPositionerProps & JSX.HTMLAttributes<InlinePopoverPositionerElement>>;
|
|
158
|
-
|
|
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
|
-
*/
|
|
138
|
+
/** Props for the {@link InlinePopoverRoot} Solid component. */
|
|
165
139
|
interface InlinePopoverRootProps {
|
|
166
140
|
/**
|
|
167
141
|
* The ProseKit editor instance.
|
|
@@ -197,12 +171,7 @@ interface InlinePopoverRootProps {
|
|
|
197
171
|
/** Emitted when the open state of the popover changes. */
|
|
198
172
|
onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;
|
|
199
173
|
}
|
|
200
|
-
/**
|
|
201
|
-
* A Solid component that renders an `prosekit-inline-popover-root` custom element.
|
|
202
|
-
*
|
|
203
|
-
* @public
|
|
204
|
-
*/
|
|
174
|
+
/** A Solid component that renders an `prosekit-inline-popover-root` custom element. */
|
|
205
175
|
declare const InlinePopoverRoot: Component<InlinePopoverRootProps & JSX.HTMLAttributes<InlinePopoverRootElement>>;
|
|
206
|
-
//#endregion
|
|
207
176
|
export { InlinePopoverPopup, type InlinePopoverPopupProps, InlinePopoverPositioner, type InlinePopoverPositionerProps, InlinePopoverRoot, type InlinePopoverRootProps };
|
|
208
177
|
//# 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-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.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":";;;UAOiB,uBAAA;;cAGJ,kBAAA,EAAoB,SAAA,CAAU,uBAAA,GAA0B,GAAA,CAAI,cAAA,CAAe,yBAAA;;UCFvE,4BAAA;EDDuB;;;;AAGxC;ECIE,SAAA,GAAY,8BAAA;;;;;;EAMZ,MAAA,GAAS,8BAAA;EDV+B;;;;;;ECiBxC,IAAA,GAAO,8BAAA;EDjBwG;;ACFjH;;;;EA0BE,KAAA,GAAQ,8BAAA;EAPD;;;;;;EAcP,OAAA,GAAU,8BAAA;EAoCH;;;;;;EA7BP,MAAA,GAAS,8BAAA;EA8EQ;;;;;EAxEjB,eAAA,GAAkB,8BAAA;EAlClB;;;;;EAwCA,QAAA,GAAW,8BAAA;EAnBX;;;;;;;EA2BA,UAAA,GAAa,8BAAA;EAAb;;;;;;;;EASA,IAAA,GAAO,8BAAA;EAoBK;;;;;EAdZ,KAAA,GAAQ,8BAAA;EAmCO;;;;;;EA5Bf,WAAA,GAAc,8BAAA;EAgDH;;;;;;EAzCX,SAAA,GAAY,8BAAA;EAyCiC;;;;;;EAlC7C,UAAA,GAAa,8BAAA;EAkCiH;;;AChIhI;;;EDqGE,QAAA,GAAW,8BAAA;ECvFG;;;;;;ED8Fd,YAAA,GAAe,8BAAA;ECrGf;;;;;;;ED6GA,cAAA,GAAiB,8BAAA;ECrFjB;;;;;;;ED6FA,WAAA,GAAc,8BAAA;AAAA;;cAIH,uBAAA,EAAyB,SAAA,CAAU,4BAAA,GAA+B,GAAA,CAAI,cAAA,CAAe,8BAAA;;UChIjF,sBAAA;EFHuB;;;;AAGxC;;EEOE,MAAA,GAAS,wBAAA;EFPgC;;;;;;EEczC,WAAA,GAAc,wBAAA;EFd2B;;;;;;EEqBzC,eAAA,GAAkB,wBAAA;EDvBH;;;;EC4Bf,IAAA,GAAO,wBAAA;EDTA;;;;ECcP,QAAA,GAAW,wBAAA;EDmBA;ECjBX,YAAA,IAAgB,KAAA,EAAO,uBAAA;AAAA;;cAIZ,iBAAA,EAAmB,SAAA,CAAU,sBAAA,GAAyB,GAAA,CAAI,cAAA,CAAe,wBAAA"}
|
|
@@ -2,30 +2,13 @@ import { n as useEditorContext } from "./editor-context.js";
|
|
|
2
2
|
import { createEffect, createSignal, mergeProps, splitProps } from "solid-js";
|
|
3
3
|
import h from "solid-js/h";
|
|
4
4
|
import { registerInlinePopoverPopupElement, registerInlinePopoverPositionerElement, registerInlinePopoverRootElement } from "@prosekit/web/inline-popover";
|
|
5
|
-
|
|
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
|
-
*/
|
|
5
|
+
/** A Solid component that renders an `prosekit-inline-popover-popup` custom element. */
|
|
14
6
|
const InlinePopoverPopup = (props) => {
|
|
15
7
|
registerInlinePopoverPopupElement();
|
|
16
8
|
const restProps = props;
|
|
17
9
|
return () => h("prosekit-inline-popover-popup", restProps);
|
|
18
10
|
};
|
|
19
|
-
|
|
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
|
-
*/
|
|
11
|
+
/** A Solid component that renders an `prosekit-inline-popover-positioner` custom element. */
|
|
29
12
|
const InlinePopoverPositioner = (props) => {
|
|
30
13
|
registerInlinePopoverPositionerElement();
|
|
31
14
|
const [getElement, setElement] = createSignal(null);
|
|
@@ -77,16 +60,7 @@ const InlinePopoverPositioner = (props) => {
|
|
|
77
60
|
setElement(el);
|
|
78
61
|
} }));
|
|
79
62
|
};
|
|
80
|
-
|
|
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
|
-
*/
|
|
63
|
+
/** A Solid component that renders an `prosekit-inline-popover-root` custom element. */
|
|
90
64
|
const InlinePopoverRoot = (props) => {
|
|
91
65
|
registerInlinePopoverRootElement();
|
|
92
66
|
const [getElement, setElement] = createSignal(null);
|
|
@@ -125,7 +99,6 @@ const InlinePopoverRoot = (props) => {
|
|
|
125
99
|
setElement(el);
|
|
126
100
|
} }));
|
|
127
101
|
};
|
|
128
|
-
//#endregion
|
|
129
102
|
export { InlinePopoverPopup, InlinePopoverPositioner, InlinePopoverRoot };
|
|
130
103
|
|
|
131
104
|
//# 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-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 {}\n\n/**\n * A Solid component that renders an `prosekit-inline-popover-popup` custom element.\n *\n * @public\n */\nexport const InlinePopoverPopup: Component<InlinePopoverPopupProps & JSX.HTMLAttributes<InlinePopoverPopupElement>> = (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 {\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 to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)\n * to place the floating element on top of other page content.\n *\n * @default false\n */\n hoist?: InlinePopoverPositionerElementProps['hoist'];\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 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 & JSX.HTMLAttributes<InlinePopoverPositionerElement>> = (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 {\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 /** Emitted when the open state of the popover changes. */\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 & JSX.HTMLAttributes<InlinePopoverRootElement>> = (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"],"mappings":";;;;;;;;;;;;;AAoBA,MAAa,sBAA0G,UAAe;AACpI,oCAAmC;CAEnC,MAAM,YAAY;AAElB,cAAa,EAAE,iCAAiC,UAAU;;;;;;;;;;;;AC2H5D,MAAa,2BAAyH,UAAe;AACnJ,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,qBAAuG,UAAe;AACjI,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"}
|
|
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":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link InlinePopoverPopup} Solid component. */\nexport interface InlinePopoverPopupProps {}\n\n/** A Solid component that renders an `prosekit-inline-popover-popup` custom element. */\nexport const InlinePopoverPopup: Component<InlinePopoverPopupProps & JSX.HTMLAttributes<InlinePopoverPopupElement>> = (props): any => {\n registerInlinePopoverPopupElement();\n\n const restProps = props;\n\n return () => h('prosekit-inline-popover-popup', restProps);\n};\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link InlinePopoverPositioner} Solid component. */\nexport interface InlinePopoverPositionerProps {\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 to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)\n * to place the floating element on top of other page content.\n *\n * @default false\n */\n hoist?: InlinePopoverPositionerElementProps['hoist'];\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 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/** A Solid component that renders an `prosekit-inline-popover-positioner` custom element. */\nexport const InlinePopoverPositioner: Component<InlinePopoverPositionerProps & JSX.HTMLAttributes<InlinePopoverPositionerElement>> = (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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link InlinePopoverRoot} Solid component. */\nexport interface InlinePopoverRootProps {\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 /** Emitted when the open state of the popover changes. */\n onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;\n}\n\n/** A Solid component that renders an `prosekit-inline-popover-root` custom element. */\nexport const InlinePopoverRoot: Component<InlinePopoverRootProps & JSX.HTMLAttributes<InlinePopoverRootElement>> = (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"],"mappings":";;;;;AAUA,MAAa,sBAA0G,UAAe;AACpI,oCAAmC;CAEnC,MAAM,YAAY;AAElB,cAAa,EAAE,iCAAiC,UAAU;;;AC2H5D,MAAa,2BAAyH,UAAe;AACnJ,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,qBAAuG,UAAe;AACjI,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"}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
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 } 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
|
-
*/
|
|
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, MenuSubmenuRootEvents, MenuSubmenuRootProps as MenuSubmenuRootProps$1, MenuSubmenuTriggerElement, MenuSubmenuTriggerProps as MenuSubmenuTriggerProps$1, MenuTriggerElement, MenuTriggerEvents, MenuTriggerProps as MenuTriggerProps$1 } from "@prosekit/web/menu";
|
|
3
|
+
/** Props for the {@link MenuItem} Solid component. */
|
|
10
4
|
interface MenuItemProps {
|
|
11
5
|
/**
|
|
12
6
|
* The unique value for this menu item.
|
|
@@ -29,19 +23,9 @@ interface MenuItemProps {
|
|
|
29
23
|
/** Emitted when the the item is selected. */
|
|
30
24
|
onSelect?: (event: MenuItemEvents['select']) => void;
|
|
31
25
|
}
|
|
32
|
-
/**
|
|
33
|
-
* A Solid component that renders an `prosekit-menu-item` custom element.
|
|
34
|
-
*
|
|
35
|
-
* @public
|
|
36
|
-
*/
|
|
26
|
+
/** A Solid component that renders an `prosekit-menu-item` custom element. */
|
|
37
27
|
declare const MenuItem: Component<MenuItemProps & JSX.HTMLAttributes<MenuItemElement>>;
|
|
38
|
-
|
|
39
|
-
//#region src/components/menu/menu-popup.gen.d.ts
|
|
40
|
-
/**
|
|
41
|
-
* Props for the {@link MenuPopup} Solid component.
|
|
42
|
-
*
|
|
43
|
-
* @public
|
|
44
|
-
*/
|
|
28
|
+
/** Props for the {@link MenuPopup} Solid component. */
|
|
45
29
|
interface MenuPopupProps {
|
|
46
30
|
/**
|
|
47
31
|
* By default, the MenuPopup element will listen for keydown events.
|
|
@@ -51,19 +35,9 @@ interface MenuPopupProps {
|
|
|
51
35
|
*/
|
|
52
36
|
eventTarget?: MenuPopupProps$1['eventTarget'];
|
|
53
37
|
}
|
|
54
|
-
/**
|
|
55
|
-
* A Solid component that renders an `prosekit-menu-popup` custom element.
|
|
56
|
-
*
|
|
57
|
-
* @public
|
|
58
|
-
*/
|
|
38
|
+
/** A Solid component that renders an `prosekit-menu-popup` custom element. */
|
|
59
39
|
declare const MenuPopup: Component<MenuPopupProps & JSX.HTMLAttributes<MenuPopupElement>>;
|
|
60
|
-
|
|
61
|
-
//#region src/components/menu/menu-positioner.gen.d.ts
|
|
62
|
-
/**
|
|
63
|
-
* Props for the {@link MenuPositioner} Solid component.
|
|
64
|
-
*
|
|
65
|
-
* @public
|
|
66
|
-
*/
|
|
40
|
+
/** Props for the {@link MenuPositioner} Solid component. */
|
|
67
41
|
interface MenuPositionerProps {
|
|
68
42
|
/**
|
|
69
43
|
* The initial placement of the floating element
|
|
@@ -193,19 +167,9 @@ interface MenuPositionerProps {
|
|
|
193
167
|
*/
|
|
194
168
|
altBoundary?: MenuPositionerProps$1['altBoundary'];
|
|
195
169
|
}
|
|
196
|
-
/**
|
|
197
|
-
* A Solid component that renders an `prosekit-menu-positioner` custom element.
|
|
198
|
-
*
|
|
199
|
-
* @public
|
|
200
|
-
*/
|
|
170
|
+
/** A Solid component that renders an `prosekit-menu-positioner` custom element. */
|
|
201
171
|
declare const MenuPositioner: Component<MenuPositionerProps & JSX.HTMLAttributes<MenuPositionerElement>>;
|
|
202
|
-
|
|
203
|
-
//#region src/components/menu/menu-root.gen.d.ts
|
|
204
|
-
/**
|
|
205
|
-
* Props for the {@link MenuRoot} Solid component.
|
|
206
|
-
*
|
|
207
|
-
* @public
|
|
208
|
-
*/
|
|
172
|
+
/** Props for the {@link MenuRoot} Solid component. */
|
|
209
173
|
interface MenuRootProps {
|
|
210
174
|
/**
|
|
211
175
|
* Whether the overlay is initially open.
|
|
@@ -225,47 +189,48 @@ interface MenuRootProps {
|
|
|
225
189
|
/** Emitted when the menu is opened or closed. */
|
|
226
190
|
onOpenChange?: (event: MenuRootEvents['openChange']) => void;
|
|
227
191
|
}
|
|
228
|
-
/**
|
|
229
|
-
* A Solid component that renders an `prosekit-menu-root` custom element.
|
|
230
|
-
*
|
|
231
|
-
* @public
|
|
232
|
-
*/
|
|
192
|
+
/** A Solid component that renders an `prosekit-menu-root` custom element. */
|
|
233
193
|
declare const MenuRoot: Component<MenuRootProps & JSX.HTMLAttributes<MenuRootElement>>;
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
194
|
+
/** Props for the {@link MenuSubmenuRoot} Solid component. */
|
|
195
|
+
interface MenuSubmenuRootProps {
|
|
196
|
+
/**
|
|
197
|
+
* Whether the overlay is initially open.
|
|
198
|
+
* @default false
|
|
199
|
+
*/
|
|
200
|
+
defaultOpen?: MenuSubmenuRootProps$1['defaultOpen'];
|
|
201
|
+
/**
|
|
202
|
+
* Whether the overlay is currently open.
|
|
203
|
+
* @default null
|
|
204
|
+
*/
|
|
205
|
+
open?: MenuSubmenuRootProps$1['open'];
|
|
206
|
+
/**
|
|
207
|
+
* Whether the component should ignore user interaction.
|
|
208
|
+
* @default false
|
|
209
|
+
*/
|
|
210
|
+
disabled?: MenuSubmenuRootProps$1['disabled'];
|
|
211
|
+
/** Emitted when the submenu is opened or closed. */
|
|
212
|
+
onOpenChange?: (event: MenuSubmenuRootEvents['openChange']) => void;
|
|
213
|
+
}
|
|
214
|
+
/** A Solid component that renders an `prosekit-menu-submenu-root` custom element. */
|
|
247
215
|
declare const MenuSubmenuRoot: Component<MenuSubmenuRootProps & JSX.HTMLAttributes<MenuSubmenuRootElement>>;
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
216
|
+
/** Props for the {@link MenuSubmenuTrigger} Solid component. */
|
|
217
|
+
interface MenuSubmenuTriggerProps {
|
|
218
|
+
/**
|
|
219
|
+
* The unique value for this submenu trigger in the parent menu.
|
|
220
|
+
*
|
|
221
|
+
* @default ""
|
|
222
|
+
*/
|
|
223
|
+
value?: MenuSubmenuTriggerProps$1['value'];
|
|
224
|
+
/**
|
|
225
|
+
* Whether this submenu trigger is disabled.
|
|
226
|
+
*
|
|
227
|
+
* @default false
|
|
228
|
+
*/
|
|
229
|
+
disabled?: MenuSubmenuTriggerProps$1['disabled'];
|
|
230
|
+
}
|
|
231
|
+
/** A Solid component that renders an `prosekit-menu-submenu-trigger` custom element. */
|
|
261
232
|
declare const MenuSubmenuTrigger: Component<MenuSubmenuTriggerProps & JSX.HTMLAttributes<MenuSubmenuTriggerElement>>;
|
|
262
|
-
|
|
263
|
-
//#region src/components/menu/menu-trigger.gen.d.ts
|
|
264
|
-
/**
|
|
265
|
-
* Props for the {@link MenuTrigger} Solid component.
|
|
266
|
-
*
|
|
267
|
-
* @public
|
|
268
|
-
*/
|
|
233
|
+
/** Props for the {@link MenuTrigger} Solid component. */
|
|
269
234
|
interface MenuTriggerProps {
|
|
270
235
|
/**
|
|
271
236
|
* Whether the component should ignore user interaction.
|
|
@@ -276,12 +241,7 @@ interface MenuTriggerProps {
|
|
|
276
241
|
/** Emitted when the menu is opened or closed. */
|
|
277
242
|
onOpenChange?: (event: MenuTriggerEvents['openChange']) => void;
|
|
278
243
|
}
|
|
279
|
-
/**
|
|
280
|
-
* A Solid component that renders an `prosekit-menu-trigger` custom element.
|
|
281
|
-
*
|
|
282
|
-
* @public
|
|
283
|
-
*/
|
|
244
|
+
/** A Solid component that renders an `prosekit-menu-trigger` custom element. */
|
|
284
245
|
declare const MenuTrigger: Component<MenuTriggerProps & JSX.HTMLAttributes<MenuTriggerElement>>;
|
|
285
|
-
//#endregion
|
|
286
246
|
export { MenuItem, type MenuItemProps, MenuPopup, type MenuPopupProps, MenuPositioner, type MenuPositionerProps, MenuRoot, type MenuRootProps, MenuSubmenuRoot, type MenuSubmenuRootProps, MenuSubmenuTrigger, type MenuSubmenuTriggerProps, MenuTrigger, type MenuTriggerProps };
|
|
287
247
|
//# sourceMappingURL=prosekit-solid-menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-solid-menu.d.ts","names":[],"sources":["../src/components/menu/menu-item.gen.ts","../src/components/menu/menu-popup.gen.ts","../src/components/menu/menu-positioner.gen.ts","../src/components/menu/menu-root.gen.ts","../src/components/menu/menu-submenu-root.gen.ts","../src/components/menu/menu-submenu-trigger.gen.ts","../src/components/menu/menu-trigger.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"prosekit-solid-menu.d.ts","names":[],"sources":["../src/components/menu/menu-item.gen.ts","../src/components/menu/menu-popup.gen.ts","../src/components/menu/menu-positioner.gen.ts","../src/components/menu/menu-root.gen.ts","../src/components/menu/menu-submenu-root.gen.ts","../src/components/menu/menu-submenu-trigger.gen.ts","../src/components/menu/menu-trigger.gen.ts"],"mappings":";;;UAQiB,aAAA;EAAa;;;;;EAM5B,KAAA,GAAQ,eAAA;EAcyB;;;;;EARjC,QAAA,GAAW,eAAA;EAMX;;;;;EAAA,aAAA,GAAgB,eAAA;EAE2B;EAA3C,QAAA,IAAY,KAAA,EAAO,cAAA;AAAA;;cAIR,QAAA,EAAU,SAAA,CAAU,aAAA,GAAgB,GAAA,CAAI,cAAA,CAAe,eAAA;;UCxBnD,cAAA;EDAa;;;;;;ECO5B,WAAA,GAAc,gBAAA;AAAA;;cAIH,SAAA,EAAW,SAAA,CAAU,cAAA,GAAiB,GAAA,CAAI,cAAA,CAAe,gBAAA;;UCXrD,mBAAA;EFAa;;;;;EEM5B,SAAA,GAAY,qBAAA;EFcqB;;;;;EERjC,QAAA,GAAW,qBAAA;EFMX;;;;;;;EEEA,UAAA,GAAa,qBAAA;EFgDd;;;;;;EEzCC,KAAA,GAAQ,qBAAA;EFHsB;;;;;EES9B,MAAA,GAAS,qBAAA;EFTwE;;;ACxBnF;;;;;EC0CE,IAAA,GAAO,qBAAA;EDRR;;;;;ECcC,KAAA,GAAQ,qBAAA;EDrCuB;;;;;;EC4C/B,OAAA,GAAU,qBAAA;ED5C0E;;;ACXtF;;;EA8DE,WAAA,GAAc,qBAAA;EAlDH;;;;;;EAyDX,SAAA,GAAY,qBAAA;EAPE;;;;;;EAcd,UAAA,GAAa,qBAAA;EAmCK;;;;;;EA5BlB,MAAA,GAAS,qBAAA;EAvET;;;;;;EA8EA,IAAA,GAAO,qBAAA;EAzDE;;;;;;EAgET,QAAA,GAAW,qBAAA;EAnCX;;;;;;EA0CA,YAAA,GAAe,qBAAA;EArBN;;;;;;EA4BT,eAAA,GAAkB,qBAAA;EAAlB;;;;;;;EAQA,cAAA,GAAiB,qBAAA;EAYN;;;;;;;EAJX,WAAA,GAAc,qBAAA;AAAA;;cAIH,cAAA,EAAgB,SAAA,CAAU,mBAAA,GAAsB,GAAA,CAAI,cAAA,CAAe,qBAAA;;UCnI/D,aAAA;EHAa;;;;EGK5B,WAAA,GAAc,eAAA;EHeK;;;;EGVnB,IAAA,GAAO,eAAA;EHEP;;;;EGGA,QAAA,GAAW,eAAA;EHKQ;EGHnB,YAAA,IAAgB,KAAA,EAAO,cAAA;AAAA;;cAIZ,QAAA,EAAU,SAAA,CAAU,aAAA,GAAgB,GAAA,CAAI,cAAA,CAAe,eAAA;;UCrBnD,oBAAA;EJAa;;;;EIK5B,WAAA,GAAc,sBAAA;EJeK;;;;EIVnB,IAAA,GAAO,sBAAA;EJEP;;;;EIGA,QAAA,GAAW,sBAAA;EJKQ;EIHnB,YAAA,IAAgB,KAAA,EAAO,qBAAA;AAAA;;cAIZ,eAAA,EAAiB,SAAA,CAAU,oBAAA,GAAuB,GAAA,CAAI,cAAA,CAAe,sBAAA;;UCrBjE,uBAAA;ELAa;;;;;EKM5B,KAAA,GAAQ,yBAAA;ELcyB;;;;;EKRjC,QAAA,GAAW,yBAAA;AAAA;;cAIA,kBAAA,EAAoB,SAAA,CAAU,uBAAA,GAA0B,GAAA,CAAI,cAAA,CAAe,yBAAA;;UChBvE,gBAAA;ENAa;;;;;EMM5B,QAAA,GAAW,kBAAA;ENcsB;EMZjC,YAAA,IAAgB,KAAA,EAAO,iBAAA;AAAA;;cAIZ,WAAA,EAAa,SAAA,CAAU,gBAAA,GAAmB,GAAA,CAAI,cAAA,CAAe,kBAAA"}
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { createEffect, createSignal, mergeProps, splitProps } from "solid-js";
|
|
2
2
|
import h from "solid-js/h";
|
|
3
3
|
import { registerMenuItemElement, registerMenuPopupElement, registerMenuPositionerElement, registerMenuRootElement, registerMenuSubmenuRootElement, registerMenuSubmenuTriggerElement, registerMenuTriggerElement } from "@prosekit/web/menu";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* A Solid component that renders an `prosekit-menu-item` custom element.
|
|
10
|
-
*
|
|
11
|
-
* @public
|
|
12
|
-
*/
|
|
4
|
+
/** A Solid component that renders an `prosekit-menu-item` custom element. */
|
|
13
5
|
const MenuItem = (props) => {
|
|
14
6
|
registerMenuItemElement();
|
|
15
7
|
const [getElement, setElement] = createSignal(null);
|
|
@@ -43,16 +35,7 @@ const MenuItem = (props) => {
|
|
|
43
35
|
setElement(el);
|
|
44
36
|
} }));
|
|
45
37
|
};
|
|
46
|
-
|
|
47
|
-
//#region src/components/menu/menu-popup.gen.ts
|
|
48
|
-
/**
|
|
49
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
50
|
-
*/
|
|
51
|
-
/**
|
|
52
|
-
* A Solid component that renders an `prosekit-menu-popup` custom element.
|
|
53
|
-
*
|
|
54
|
-
* @public
|
|
55
|
-
*/
|
|
38
|
+
/** A Solid component that renders an `prosekit-menu-popup` custom element. */
|
|
56
39
|
const MenuPopup = (props) => {
|
|
57
40
|
registerMenuPopupElement();
|
|
58
41
|
const [getElement, setElement] = createSignal(null);
|
|
@@ -66,16 +49,7 @@ const MenuPopup = (props) => {
|
|
|
66
49
|
setElement(el);
|
|
67
50
|
} }));
|
|
68
51
|
};
|
|
69
|
-
|
|
70
|
-
//#region src/components/menu/menu-positioner.gen.ts
|
|
71
|
-
/**
|
|
72
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
73
|
-
*/
|
|
74
|
-
/**
|
|
75
|
-
* A Solid component that renders an `prosekit-menu-positioner` custom element.
|
|
76
|
-
*
|
|
77
|
-
* @public
|
|
78
|
-
*/
|
|
52
|
+
/** A Solid component that renders an `prosekit-menu-positioner` custom element. */
|
|
79
53
|
const MenuPositioner = (props) => {
|
|
80
54
|
registerMenuPositionerElement();
|
|
81
55
|
const [getElement, setElement] = createSignal(null);
|
|
@@ -127,16 +101,7 @@ const MenuPositioner = (props) => {
|
|
|
127
101
|
setElement(el);
|
|
128
102
|
} }));
|
|
129
103
|
};
|
|
130
|
-
|
|
131
|
-
//#region src/components/menu/menu-root.gen.ts
|
|
132
|
-
/**
|
|
133
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
134
|
-
*/
|
|
135
|
-
/**
|
|
136
|
-
* A Solid component that renders an `prosekit-menu-root` custom element.
|
|
137
|
-
*
|
|
138
|
-
* @public
|
|
139
|
-
*/
|
|
104
|
+
/** A Solid component that renders an `prosekit-menu-root` custom element. */
|
|
140
105
|
const MenuRoot = (props) => {
|
|
141
106
|
registerMenuRootElement();
|
|
142
107
|
const [getElement, setElement] = createSignal(null);
|
|
@@ -170,46 +135,58 @@ const MenuRoot = (props) => {
|
|
|
170
135
|
setElement(el);
|
|
171
136
|
} }));
|
|
172
137
|
};
|
|
173
|
-
|
|
174
|
-
//#region src/components/menu/menu-submenu-root.gen.ts
|
|
175
|
-
/**
|
|
176
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
177
|
-
*/
|
|
178
|
-
/**
|
|
179
|
-
* A Solid component that renders an `prosekit-menu-submenu-root` custom element.
|
|
180
|
-
*
|
|
181
|
-
* @public
|
|
182
|
-
*/
|
|
138
|
+
/** A Solid component that renders an `prosekit-menu-submenu-root` custom element. */
|
|
183
139
|
const MenuSubmenuRoot = (props) => {
|
|
184
140
|
registerMenuSubmenuRootElement();
|
|
185
|
-
const
|
|
186
|
-
|
|
141
|
+
const [getElement, setElement] = createSignal(null);
|
|
142
|
+
const handlers = [];
|
|
143
|
+
const [elementProps, eventHandlers, restProps] = splitProps(props, [
|
|
144
|
+
"defaultOpen",
|
|
145
|
+
"disabled",
|
|
146
|
+
"open"
|
|
147
|
+
], ["onOpenChange"]);
|
|
148
|
+
createEffect(() => {
|
|
149
|
+
const element = getElement();
|
|
150
|
+
if (!element) return;
|
|
151
|
+
Object.assign(element, {
|
|
152
|
+
defaultOpen: elementProps.defaultOpen,
|
|
153
|
+
disabled: elementProps.disabled,
|
|
154
|
+
open: elementProps.open
|
|
155
|
+
});
|
|
156
|
+
handlers.length = 0;
|
|
157
|
+
handlers.push(eventHandlers.onOpenChange);
|
|
158
|
+
});
|
|
159
|
+
createEffect(() => {
|
|
160
|
+
const element = getElement();
|
|
161
|
+
if (!element) return;
|
|
162
|
+
const ac = new AbortController();
|
|
163
|
+
for (const [index, eventName] of ["openChange"].entries()) element.addEventListener(eventName, (event) => {
|
|
164
|
+
handlers[index]?.(event);
|
|
165
|
+
}, { signal: ac.signal });
|
|
166
|
+
return () => ac.abort();
|
|
167
|
+
});
|
|
168
|
+
return () => h("prosekit-menu-submenu-root", mergeProps(restProps, { ref: (el) => {
|
|
169
|
+
setElement(el);
|
|
170
|
+
} }));
|
|
187
171
|
};
|
|
188
|
-
|
|
189
|
-
//#region src/components/menu/menu-submenu-trigger.gen.ts
|
|
190
|
-
/**
|
|
191
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
192
|
-
*/
|
|
193
|
-
/**
|
|
194
|
-
* A Solid component that renders an `prosekit-menu-submenu-trigger` custom element.
|
|
195
|
-
*
|
|
196
|
-
* @public
|
|
197
|
-
*/
|
|
172
|
+
/** A Solid component that renders an `prosekit-menu-submenu-trigger` custom element. */
|
|
198
173
|
const MenuSubmenuTrigger = (props) => {
|
|
199
174
|
registerMenuSubmenuTriggerElement();
|
|
200
|
-
const
|
|
201
|
-
|
|
175
|
+
const [getElement, setElement] = createSignal(null);
|
|
176
|
+
const [elementProps, restProps] = splitProps(props, ["disabled", "value"]);
|
|
177
|
+
createEffect(() => {
|
|
178
|
+
const element = getElement();
|
|
179
|
+
if (!element) return;
|
|
180
|
+
Object.assign(element, {
|
|
181
|
+
disabled: elementProps.disabled,
|
|
182
|
+
value: elementProps.value
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
return () => h("prosekit-menu-submenu-trigger", mergeProps(restProps, { ref: (el) => {
|
|
186
|
+
setElement(el);
|
|
187
|
+
} }));
|
|
202
188
|
};
|
|
203
|
-
|
|
204
|
-
//#region src/components/menu/menu-trigger.gen.ts
|
|
205
|
-
/**
|
|
206
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
207
|
-
*/
|
|
208
|
-
/**
|
|
209
|
-
* A Solid component that renders an `prosekit-menu-trigger` custom element.
|
|
210
|
-
*
|
|
211
|
-
* @public
|
|
212
|
-
*/
|
|
189
|
+
/** A Solid component that renders an `prosekit-menu-trigger` custom element. */
|
|
213
190
|
const MenuTrigger = (props) => {
|
|
214
191
|
registerMenuTriggerElement();
|
|
215
192
|
const [getElement, setElement] = createSignal(null);
|
|
@@ -235,7 +212,6 @@ const MenuTrigger = (props) => {
|
|
|
235
212
|
setElement(el);
|
|
236
213
|
} }));
|
|
237
214
|
};
|
|
238
|
-
//#endregion
|
|
239
215
|
export { MenuItem, MenuPopup, MenuPositioner, MenuRoot, MenuSubmenuRoot, MenuSubmenuTrigger, MenuTrigger };
|
|
240
216
|
|
|
241
217
|
//# sourceMappingURL=prosekit-solid-menu.js.map
|