@prosekit/react 0.7.0-beta.2 → 0.7.0-beta.4
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-react-autocomplete.d.ts +12 -23
- package/dist/prosekit-react-autocomplete.d.ts.map +1 -1
- package/dist/prosekit-react-autocomplete.js +28 -12
- package/dist/prosekit-react-autocomplete.js.map +1 -1
- package/dist/prosekit-react-block-handle.d.ts +12 -23
- package/dist/prosekit-react-block-handle.d.ts.map +1 -1
- package/dist/prosekit-react-block-handle.js +28 -12
- package/dist/prosekit-react-block-handle.js.map +1 -1
- package/dist/prosekit-react-drop-indicator.d.ts +2 -5
- package/dist/prosekit-react-drop-indicator.d.ts.map +1 -1
- package/dist/prosekit-react-drop-indicator.js +13 -2
- package/dist/prosekit-react-drop-indicator.js.map +1 -1
- package/dist/prosekit-react-inline-popover.d.ts +9 -16
- package/dist/prosekit-react-inline-popover.d.ts.map +1 -1
- package/dist/prosekit-react-inline-popover.js +23 -8
- package/dist/prosekit-react-inline-popover.js.map +1 -1
- package/dist/prosekit-react-menu.d.ts +16 -31
- package/dist/prosekit-react-menu.d.ts.map +1 -1
- package/dist/prosekit-react-menu.js +38 -16
- package/dist/prosekit-react-menu.js.map +1 -1
- package/dist/prosekit-react-popover.d.ts +10 -19
- package/dist/prosekit-react-popover.d.ts.map +1 -1
- package/dist/prosekit-react-popover.js +25 -10
- package/dist/prosekit-react-popover.js.map +1 -1
- package/dist/prosekit-react-resizable.d.ts +6 -11
- package/dist/prosekit-react-resizable.d.ts.map +1 -1
- package/dist/prosekit-react-resizable.js +21 -6
- package/dist/prosekit-react-resizable.js.map +1 -1
- package/dist/prosekit-react-table-handle.d.ts +22 -45
- package/dist/prosekit-react-table-handle.d.ts.map +1 -1
- package/dist/prosekit-react-table-handle.js +57 -22
- package/dist/prosekit-react-table-handle.js.map +1 -1
- package/dist/prosekit-react-tooltip.d.ts +10 -19
- package/dist/prosekit-react-tooltip.d.ts.map +1 -1
- package/dist/prosekit-react-tooltip.js +25 -10
- package/dist/prosekit-react-tooltip.js.map +1 -1
- package/dist/prosekit-react.d.ts +0 -21
- package/dist/prosekit-react.d.ts.map +1 -1
- package/dist/prosekit-react.js +1 -26
- package/dist/prosekit-react.js.map +1 -1
- package/package.json +4 -4
- package/src/components/autocomplete/autocomplete-empty.gen.ts +2 -2
- package/src/components/autocomplete/autocomplete-item.gen.ts +2 -4
- package/src/components/autocomplete/autocomplete-popup.gen.ts +2 -4
- package/src/components/autocomplete/autocomplete-positioner.gen.ts +2 -2
- package/src/components/autocomplete/autocomplete-root.gen.ts +2 -4
- package/src/components/autocomplete/index.gen.ts +3 -5
- package/src/components/autocomplete/index.ts +2 -0
- package/src/components/block-handle/block-handle-add.gen.ts +2 -2
- package/src/components/block-handle/block-handle-draggable.gen.ts +2 -2
- package/src/components/block-handle/block-handle-popup.gen.ts +2 -2
- package/src/components/block-handle/block-handle-positioner.gen.ts +2 -2
- package/src/components/block-handle/block-handle-root.gen.ts +2 -4
- package/src/components/block-handle/index.gen.ts +1 -3
- package/src/components/block-handle/index.ts +2 -0
- package/src/components/drop-indicator/drop-indicator.gen.ts +2 -2
- package/src/components/drop-indicator/index.ts +2 -0
- package/src/components/inline-popover/index.gen.ts +1 -3
- package/src/components/inline-popover/index.ts +2 -0
- package/src/components/inline-popover/inline-popover-popup.gen.ts +2 -2
- package/src/components/inline-popover/inline-popover-positioner.gen.ts +2 -2
- package/src/components/inline-popover/inline-popover-root.gen.ts +3 -5
- package/src/components/menu/index.gen.ts +3 -5
- package/src/components/menu/index.ts +2 -0
- package/src/components/menu/menu-item.gen.ts +2 -4
- package/src/components/menu/menu-popup.gen.ts +2 -2
- package/src/components/menu/menu-positioner.gen.ts +2 -2
- package/src/components/menu/menu-root.gen.ts +2 -4
- package/src/components/menu/menu-submenu-root.gen.ts +2 -2
- package/src/components/menu/menu-submenu-trigger.gen.ts +2 -2
- package/src/components/menu/menu-trigger.gen.ts +2 -4
- package/src/components/popover/index.gen.ts +2 -4
- package/src/components/popover/index.ts +2 -0
- package/src/components/popover/popover-popup.gen.ts +2 -2
- package/src/components/popover/popover-positioner.gen.ts +2 -2
- package/src/components/popover/popover-root.gen.ts +2 -4
- package/src/components/popover/popover-trigger.gen.ts +2 -4
- package/src/components/resizable/index.gen.ts +1 -3
- package/src/components/resizable/index.ts +2 -0
- package/src/components/resizable/resizable-handle.gen.ts +2 -2
- package/src/components/resizable/resizable-root.gen.ts +2 -4
- package/src/components/table-handle/index.ts +2 -0
- package/src/components/table-handle/table-handle-column-menu-root.gen.ts +2 -2
- package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +2 -2
- package/src/components/table-handle/table-handle-column-popup.gen.ts +2 -2
- package/src/components/table-handle/table-handle-column-positioner.gen.ts +2 -2
- package/src/components/table-handle/table-handle-drag-preview.gen.ts +2 -2
- package/src/components/table-handle/table-handle-drop-indicator.gen.ts +2 -2
- package/src/components/table-handle/table-handle-root.gen.ts +2 -2
- package/src/components/table-handle/table-handle-row-menu-root.gen.ts +2 -2
- package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +2 -2
- package/src/components/table-handle/table-handle-row-popup.gen.ts +2 -2
- package/src/components/table-handle/table-handle-row-positioner.gen.ts +2 -2
- package/src/components/tooltip/index.gen.ts +1 -3
- package/src/components/tooltip/index.ts +2 -0
- package/src/components/tooltip/tooltip-popup.gen.ts +2 -2
- package/src/components/tooltip/tooltip-positioner.gen.ts +2 -2
- package/src/components/tooltip/tooltip-root.gen.ts +2 -4
- package/src/components/tooltip/tooltip-trigger.gen.ts +2 -2
- package/src/index.ts +2 -0
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "react";
|
|
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
3
|
/**
|
|
6
4
|
* Props for the {@link DropIndicator} React component.
|
|
7
5
|
*
|
|
8
6
|
* @public
|
|
9
7
|
*/
|
|
10
|
-
interface DropIndicatorProps
|
|
8
|
+
interface DropIndicatorProps {
|
|
11
9
|
/**
|
|
12
10
|
* The ProseKit editor instance.
|
|
13
11
|
*
|
|
@@ -27,7 +25,6 @@ interface DropIndicatorProps extends HTMLAttributes<DropIndicatorElement> {
|
|
|
27
25
|
*
|
|
28
26
|
* @public
|
|
29
27
|
*/
|
|
30
|
-
declare const DropIndicator: ForwardRefExoticComponent<DropIndicatorProps & RefAttributes<DropIndicatorElement>>;
|
|
31
|
-
//#endregion
|
|
28
|
+
declare const DropIndicator: ForwardRefExoticComponent<DropIndicatorProps & HTMLAttributes<DropIndicatorElement> & RefAttributes<DropIndicatorElement>>;
|
|
32
29
|
export { DropIndicator, type DropIndicatorProps };
|
|
33
30
|
//# sourceMappingURL=prosekit-react-drop-indicator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-react-drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"prosekit-react-drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":";;;;;;;UAciB,kBAAA;EAakB;;AAsCnC;;;;EA5CE,MAAA,GAAS,oBAAA;EA4CgE;;;;;EAtCzE,KAAA,GAAQ,oBAAA;AAAA;;;;;;cAsCG,aAAA,EAAe,yBAAA,CAA0B,kBAAA,GAAqB,cAAA,CAAe,oBAAA,IAAwB,aAAA,CAAc,oBAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { n as useEditorContext } from "./editor-context.js";
|
|
2
3
|
import { createElement, forwardRef, useCallback, useLayoutEffect, useRef } from "react";
|
|
3
4
|
import { registerDropIndicatorElement } from "@prosekit/web/drop-indicator";
|
|
4
|
-
//#region src/components/drop-indicator/drop-indicator.gen.ts
|
|
5
5
|
/**
|
|
6
6
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
7
7
|
*/
|
|
@@ -35,7 +35,18 @@ function DropIndicatorComponent(props, forwardedRef) {
|
|
|
35
35
|
* @public
|
|
36
36
|
*/
|
|
37
37
|
const DropIndicator = /* @__PURE__ */ forwardRef(DropIndicatorComponent);
|
|
38
|
-
|
|
38
|
+
/**
|
|
39
|
+
|
|
40
|
+
@module
|
|
41
|
+
|
|
42
|
+
## Anatomy
|
|
43
|
+
|
|
44
|
+
```jsx
|
|
45
|
+
import { DropIndicator } from 'prosekit/react/drop-indicator'
|
|
46
|
+
|
|
47
|
+
<DropIndicator />
|
|
48
|
+
```
|
|
49
|
+
*/
|
|
39
50
|
export { DropIndicator };
|
|
40
51
|
|
|
41
52
|
//# sourceMappingURL=prosekit-react-drop-indicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-react-drop-indicator.js","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerDropIndicatorElement, type DropIndicatorElement, type DropIndicatorProps as DropIndicatorElementProps } from '@prosekit/web/drop-indicator';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link DropIndicator} React component.\n *\n * @public\n */\nexport interface DropIndicatorProps
|
|
1
|
+
{"version":3,"file":"prosekit-react-drop-indicator.js","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts","../src/components/drop-indicator/index.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerDropIndicatorElement, type DropIndicatorElement, type DropIndicatorProps as DropIndicatorElementProps } from '@prosekit/web/drop-indicator';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link DropIndicator} React component.\n *\n * @public\n */\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\nfunction DropIndicatorComponent(props: DropIndicatorProps, forwardedRef: ForwardedRef<DropIndicatorElement>) {\n registerDropIndicatorElement();\n\n const elementRef = useRef<DropIndicatorElement>(null);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, width: p1, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { editor: p0 ?? p0Fallback, width: p1 });\n });\n\n const mergedRef = useCallback(\n (element: DropIndicatorElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-drop-indicator', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-drop-indicator` custom element.\n *\n * @public\n */\nexport const DropIndicator: ForwardRefExoticComponent<DropIndicatorProps & HTMLAttributes<DropIndicatorElement> & RefAttributes<DropIndicatorElement>> = /* @__PURE__ */ forwardRef(DropIndicatorComponent);\n","/**\n\n@module\n\n## Anatomy\n\n```jsx\nimport { DropIndicator } from 'prosekit/react/drop-indicator'\n\n<DropIndicator />\n```\n*/\n\n'use client'\n\nexport * from './index.gen.ts'\n"],"mappings":";;;;;;;AA8BA,SAAS,uBAAuB,OAA2B,cAAkD;AAC3G,+BAA8B;CAE9B,MAAM,aAAa,OAA6B,KAAK;CAErD,MAAM,aAAa,kBAAkB;CAErC,MAAM,EAAE,QAAQ,IAAI,OAAO,IAAI,GAAG,cAAc;AAEhD,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS;GAAE,QAAQ,MAAM;GAAY,OAAO;GAAI,CAAC;GAC/D;CAEF,MAAM,YAAY,aACf,YAAyC;AACxC,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,2BAA2B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQnH,MAAa,gBAA4J,2BAAW,uBAAuB"}
|
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "react";
|
|
2
|
-
import { InlinePopoverPopupElement, InlinePopoverPositionerElement, InlinePopoverPositionerProps as InlinePopoverPositionerProps$1, InlinePopoverRootElement, InlinePopoverRootEvents, InlinePopoverRootProps as InlinePopoverRootProps$1
|
|
3
|
-
|
|
4
|
-
//#region src/components/inline-popover/inline-popover-popup.gen.d.ts
|
|
2
|
+
import { InlinePopoverPopupElement, InlinePopoverPositionerElement, InlinePopoverPositionerProps as InlinePopoverPositionerProps$1, InlinePopoverRootElement, InlinePopoverRootEvents, InlinePopoverRootProps as InlinePopoverRootProps$1 } from "@prosekit/web/inline-popover";
|
|
5
3
|
/**
|
|
6
4
|
* Props for the {@link InlinePopoverPopup} React component.
|
|
7
5
|
*
|
|
8
6
|
* @public
|
|
9
7
|
*/
|
|
10
|
-
interface InlinePopoverPopupProps
|
|
8
|
+
interface InlinePopoverPopupProps {}
|
|
11
9
|
/**
|
|
12
10
|
* A React component that renders an `prosekit-inline-popover-popup` custom element.
|
|
13
11
|
*
|
|
14
12
|
* @public
|
|
15
13
|
*/
|
|
16
|
-
declare const InlinePopoverPopup: ForwardRefExoticComponent<InlinePopoverPopupProps & RefAttributes<InlinePopoverPopupElement>>;
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/components/inline-popover/inline-popover-positioner.gen.d.ts
|
|
14
|
+
declare const InlinePopoverPopup: ForwardRefExoticComponent<InlinePopoverPopupProps & HTMLAttributes<InlinePopoverPopupElement> & RefAttributes<InlinePopoverPopupElement>>;
|
|
19
15
|
/**
|
|
20
16
|
* Props for the {@link InlinePopoverPositioner} React component.
|
|
21
17
|
*
|
|
22
18
|
* @public
|
|
23
19
|
*/
|
|
24
|
-
interface InlinePopoverPositionerProps
|
|
20
|
+
interface InlinePopoverPositionerProps {
|
|
25
21
|
/**
|
|
26
22
|
* The initial placement of the floating element
|
|
27
23
|
*
|
|
@@ -154,15 +150,13 @@ interface InlinePopoverPositionerProps extends HTMLAttributes<InlinePopoverPosit
|
|
|
154
150
|
*
|
|
155
151
|
* @public
|
|
156
152
|
*/
|
|
157
|
-
declare const InlinePopoverPositioner: ForwardRefExoticComponent<InlinePopoverPositionerProps & RefAttributes<InlinePopoverPositionerElement>>;
|
|
158
|
-
//#endregion
|
|
159
|
-
//#region src/components/inline-popover/inline-popover-root.gen.d.ts
|
|
153
|
+
declare const InlinePopoverPositioner: ForwardRefExoticComponent<InlinePopoverPositionerProps & HTMLAttributes<InlinePopoverPositionerElement> & RefAttributes<InlinePopoverPositionerElement>>;
|
|
160
154
|
/**
|
|
161
155
|
* Props for the {@link InlinePopoverRoot} React component.
|
|
162
156
|
*
|
|
163
157
|
* @public
|
|
164
158
|
*/
|
|
165
|
-
interface InlinePopoverRootProps
|
|
159
|
+
interface InlinePopoverRootProps {
|
|
166
160
|
/**
|
|
167
161
|
* The ProseKit editor instance.
|
|
168
162
|
*
|
|
@@ -194,7 +188,7 @@ interface InlinePopoverRootProps extends HTMLAttributes<InlinePopoverRootElement
|
|
|
194
188
|
* @default false
|
|
195
189
|
*/
|
|
196
190
|
disabled?: InlinePopoverRootProps$1['disabled'];
|
|
197
|
-
/** */
|
|
191
|
+
/** Emitted when the open state of the popover changes. */
|
|
198
192
|
onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;
|
|
199
193
|
}
|
|
200
194
|
/**
|
|
@@ -202,7 +196,6 @@ interface InlinePopoverRootProps extends HTMLAttributes<InlinePopoverRootElement
|
|
|
202
196
|
*
|
|
203
197
|
* @public
|
|
204
198
|
*/
|
|
205
|
-
declare const InlinePopoverRoot: ForwardRefExoticComponent<InlinePopoverRootProps & RefAttributes<InlinePopoverRootElement>>;
|
|
206
|
-
|
|
207
|
-
export { InlinePopoverPopup, type InlinePopoverPopupProps, InlinePopoverPositioner, type InlinePopoverPositionerProps, InlinePopoverRoot, type InlinePopoverRootEvents, type InlinePopoverRootProps, OpenChangeEvent };
|
|
199
|
+
declare const InlinePopoverRoot: ForwardRefExoticComponent<InlinePopoverRootProps & HTMLAttributes<InlinePopoverRootElement> & RefAttributes<InlinePopoverRootElement>>;
|
|
200
|
+
export { InlinePopoverPopup, type InlinePopoverPopupProps, InlinePopoverPositioner, type InlinePopoverPositionerProps, InlinePopoverRoot, type InlinePopoverRootProps };
|
|
208
201
|
//# sourceMappingURL=prosekit-react-inline-popover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-react-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-react-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":";;;;;AAyCA;;UA7BiB,uBAAA;;;;;;cA6BJ,kBAAA,EAAoB,yBAAA,C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;;;cAwDZ,iBAAA,EAAmB,yBAAA,CAA0B,sBAAA,GAAyB,cAAA,CAAe,wBAAA,IAA4B,aAAA,CAAc,wBAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { n as useEditorContext } from "./editor-context.js";
|
|
2
3
|
import { createElement, forwardRef, useCallback, useLayoutEffect, useRef } from "react";
|
|
3
|
-
import {
|
|
4
|
-
//#region src/components/inline-popover/inline-popover-popup.gen.ts
|
|
4
|
+
import { registerInlinePopoverPopupElement, registerInlinePopoverPositionerElement, registerInlinePopoverRootElement } from "@prosekit/web/inline-popover";
|
|
5
5
|
/**
|
|
6
6
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
7
7
|
*/
|
|
@@ -26,8 +26,6 @@ function InlinePopoverPopupComponent(props, forwardedRef) {
|
|
|
26
26
|
* @public
|
|
27
27
|
*/
|
|
28
28
|
const InlinePopoverPopup = /* @__PURE__ */ forwardRef(InlinePopoverPopupComponent);
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/components/inline-popover/inline-popover-positioner.gen.ts
|
|
31
29
|
/**
|
|
32
30
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
33
31
|
*/
|
|
@@ -76,8 +74,6 @@ function InlinePopoverPositionerComponent(props, forwardedRef) {
|
|
|
76
74
|
* @public
|
|
77
75
|
*/
|
|
78
76
|
const InlinePopoverPositioner = /* @__PURE__ */ forwardRef(InlinePopoverPositionerComponent);
|
|
79
|
-
//#endregion
|
|
80
|
-
//#region src/components/inline-popover/inline-popover-root.gen.ts
|
|
81
77
|
/**
|
|
82
78
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
83
79
|
*/
|
|
@@ -125,7 +121,26 @@ function InlinePopoverRootComponent(props, forwardedRef) {
|
|
|
125
121
|
* @public
|
|
126
122
|
*/
|
|
127
123
|
const InlinePopoverRoot = /* @__PURE__ */ forwardRef(InlinePopoverRootComponent);
|
|
128
|
-
|
|
129
|
-
|
|
124
|
+
/**
|
|
125
|
+
|
|
126
|
+
@module
|
|
127
|
+
|
|
128
|
+
## Anatomy
|
|
129
|
+
|
|
130
|
+
```jsx
|
|
131
|
+
import {
|
|
132
|
+
InlinePopoverPopup,
|
|
133
|
+
InlinePopoverPositioner,
|
|
134
|
+
InlinePopoverRoot,
|
|
135
|
+
} from 'prosekit/react/inline-popover'
|
|
136
|
+
|
|
137
|
+
<InlinePopoverRoot>
|
|
138
|
+
<InlinePopoverPositioner>
|
|
139
|
+
<InlinePopoverPopup>...</InlinePopoverPopup>
|
|
140
|
+
</InlinePopoverPositioner>
|
|
141
|
+
</InlinePopoverRoot>
|
|
142
|
+
```
|
|
143
|
+
*/
|
|
144
|
+
export { InlinePopoverPopup, InlinePopoverPositioner, InlinePopoverRoot };
|
|
130
145
|
|
|
131
146
|
//# sourceMappingURL=prosekit-react-inline-popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-react-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 { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes } from 'react';\n\n/**\n * Props for the {@link InlinePopoverPopup} React component.\n *\n * @public\n */\nexport interface InlinePopoverPopupProps extends HTMLAttributes<InlinePopoverPopupElement> {}\n\nfunction InlinePopoverPopupComponent(props: InlinePopoverPopupProps, forwardedRef: ForwardedRef<InlinePopoverPopupElement>) {\n registerInlinePopoverPopupElement();\n\n const elementRef = useRef<InlinePopoverPopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: InlinePopoverPopupElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-inline-popover-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-inline-popover-popup` custom element.\n *\n * @public\n */\nexport const InlinePopoverPopup: ForwardRefExoticComponent<InlinePopoverPopupProps & RefAttributes<InlinePopoverPopupElement>> = /* @__PURE__ */ forwardRef(InlinePopoverPopupComponent);\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 { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/**\n * Props for the {@link InlinePopoverPositioner} React component.\n *\n * @public\n */\nexport interface InlinePopoverPositionerProps extends 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 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\nfunction InlinePopoverPositionerComponent(props: InlinePopoverPositionerProps, forwardedRef: ForwardedRef<InlinePopoverPositionerElement>) {\n registerInlinePopoverPositionerElement();\n\n const elementRef = useRef<InlinePopoverPositionerElement>(null);\n\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n const mergedRef = useCallback(\n (element: InlinePopoverPositionerElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-inline-popover-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-inline-popover-positioner` custom element.\n *\n * @public\n */\nexport const InlinePopoverPositioner: ForwardRefExoticComponent<InlinePopoverPositionerProps & RefAttributes<InlinePopoverPositionerElement>> = /* @__PURE__ */ forwardRef(InlinePopoverPositionerComponent);\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 InlinePopoverRootProps as InlinePopoverRootElementProps, type InlinePopoverRootEvents } from '@prosekit/web/inline-popover';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link InlinePopoverRoot} React component.\n *\n * @public\n */\nexport interface InlinePopoverRootProps extends 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\nfunction InlinePopoverRootComponent(props: InlinePopoverRootProps, forwardedRef: ForwardedRef<InlinePopoverRootElement>) {\n registerInlinePopoverRootElement();\n\n const elementRef = useRef<InlinePopoverRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const p3Fallback = useEditorContext();\n\n const { defaultOpen: p0, disabled: p1, dismissOnEscape: p2, editor: p3, open: p4, onOpenChange: e0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { defaultOpen: p0, disabled: p1, dismissOnEscape: p2, editor: p3 ?? p3Fallback, open: p4 });\n handlersRef.current = [e0] as Array<((event: Event) => void) | undefined>;\n });\n\n useLayoutEffect(() => {\n const element = elementRef.current;\n if (!element) return;\n const ac = new AbortController();\n for (const [index, eventName] of ['openChange'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlersRef.current[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n }, []);\n\n const mergedRef = useCallback(\n (element: InlinePopoverRootElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-inline-popover-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-inline-popover-root` custom element.\n *\n * @public\n */\nexport const InlinePopoverRoot: ForwardRefExoticComponent<InlinePopoverRootProps & RefAttributes<InlinePopoverRootElement>> = /* @__PURE__ */ forwardRef(InlinePopoverRootComponent);\n\nexport type { InlinePopoverRootEvents };\n"],"mappings":";;;;;;;AAcA,SAAS,4BAA4B,OAAgC,cAAuD;AAC1H,oCAAmC;CAEnC,MAAM,aAAa,OAAkC,KAAK;CAE1D,MAAM,EAAE,GAAG,cAAc;CAEzB,MAAM,YAAY,aACf,YAA8C;AAC7C,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,iCAAiC;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQzH,MAAa,qBAAoI,2BAAW,4BAA4B;;;;;;ACoGxL,SAAS,iCAAiC,OAAqC,cAA4D;AACzI,yCAAwC;CAExC,MAAM,aAAa,OAAuC,KAAK;CAE/D,MAAM,EAAE,aAAa,IAAI,YAAY,IAAI,UAAU,IAAI,gBAAgB,IAAI,aAAa,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO,IAAI,QAAQ,IAAI,QAAQ,IAAI,iBAAiB,KAAK,SAAS,KAAK,WAAW,KAAK,cAAc,KAAK,YAAY,KAAK,WAAW,KAAK,OAAO,KAAK,UAAU,KAAK,GA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AAQ,iBACN,YACC,UAAiB;AAChB,eAAY,QAAQ,SAAS,MAAM;KAErC,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;IACtB,EAAE,CAAC;CAEN,MAAM,YAAY,aACf,YAA6C;AAC5C,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,gCAAgC;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQxH,MAAa,oBAAiI,2BAAW,2BAA2B"}
|
|
1
|
+
{"version":3,"file":"prosekit-react-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","../src/components/inline-popover/index.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 { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes } from 'react';\n\n/**\n * Props for the {@link InlinePopoverPopup} React component.\n *\n * @public\n */\nexport interface InlinePopoverPopupProps {}\n\nfunction InlinePopoverPopupComponent(props: InlinePopoverPopupProps, forwardedRef: ForwardedRef<InlinePopoverPopupElement>) {\n registerInlinePopoverPopupElement();\n\n const elementRef = useRef<InlinePopoverPopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: InlinePopoverPopupElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-inline-popover-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-inline-popover-popup` custom element.\n *\n * @public\n */\nexport const InlinePopoverPopup: ForwardRefExoticComponent<InlinePopoverPopupProps & HTMLAttributes<InlinePopoverPopupElement> & RefAttributes<InlinePopoverPopupElement>> = /* @__PURE__ */ forwardRef(InlinePopoverPopupComponent);\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 { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/**\n * Props for the {@link InlinePopoverPositioner} React 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\nfunction InlinePopoverPositionerComponent(props: InlinePopoverPositionerProps, forwardedRef: ForwardedRef<InlinePopoverPositionerElement>) {\n registerInlinePopoverPositionerElement();\n\n const elementRef = useRef<InlinePopoverPositionerElement>(null);\n\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n const mergedRef = useCallback(\n (element: InlinePopoverPositionerElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-inline-popover-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-inline-popover-positioner` custom element.\n *\n * @public\n */\nexport const InlinePopoverPositioner: ForwardRefExoticComponent<InlinePopoverPositionerProps & HTMLAttributes<InlinePopoverPositionerElement> & RefAttributes<InlinePopoverPositionerElement>> = /* @__PURE__ */ forwardRef(InlinePopoverPositionerComponent);\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 InlinePopoverRootProps as InlinePopoverRootElementProps, type InlinePopoverRootEvents } from '@prosekit/web/inline-popover';\nimport { createElement, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link InlinePopoverRoot} React 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\nfunction InlinePopoverRootComponent(props: InlinePopoverRootProps, forwardedRef: ForwardedRef<InlinePopoverRootElement>) {\n registerInlinePopoverRootElement();\n\n const elementRef = useRef<InlinePopoverRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const p3Fallback = useEditorContext();\n\n const { defaultOpen: p0, disabled: p1, dismissOnEscape: p2, editor: p3, open: p4, onOpenChange: e0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { defaultOpen: p0, disabled: p1, dismissOnEscape: p2, editor: p3 ?? p3Fallback, open: p4 });\n handlersRef.current = [e0] as Array<((event: Event) => void) | undefined>;\n });\n\n useLayoutEffect(() => {\n const element = elementRef.current;\n if (!element) return;\n const ac = new AbortController();\n for (const [index, eventName] of ['openChange'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlersRef.current[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n }, []);\n\n const mergedRef = useCallback(\n (element: InlinePopoverRootElement | null) => {\n elementRef.current = element;\n if (typeof forwardedRef === 'function') {\n forwardedRef(element);\n } else if (forwardedRef) {\n forwardedRef.current = element;\n }\n },\n [forwardedRef],\n );\n\n return createElement('prosekit-inline-popover-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A React component that renders an `prosekit-inline-popover-root` custom element.\n *\n * @public\n */\nexport const InlinePopoverRoot: ForwardRefExoticComponent<InlinePopoverRootProps & HTMLAttributes<InlinePopoverRootElement> & RefAttributes<InlinePopoverRootElement>> = /* @__PURE__ */ forwardRef(InlinePopoverRootComponent);\n","/**\n\n@module\n\n## Anatomy\n\n```jsx\nimport {\n InlinePopoverPopup,\n InlinePopoverPositioner,\n InlinePopoverRoot,\n} from 'prosekit/react/inline-popover'\n\n<InlinePopoverRoot>\n <InlinePopoverPositioner>\n <InlinePopoverPopup>...</InlinePopoverPopup>\n </InlinePopoverPositioner>\n</InlinePopoverRoot>\n```\n*/\n\n'use client'\n\nexport * from './index.gen.ts'\n"],"mappings":";;;;;;;AAcA,SAAS,4BAA4B,OAAgC,cAAuD;AAC1H,oCAAmC;CAEnC,MAAM,aAAa,OAAkC,KAAK;CAE1D,MAAM,EAAE,GAAG,cAAc;CAEzB,MAAM,YAAY,aACf,YAA8C;AAC7C,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,iCAAiC;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQzH,MAAa,qBAAgL,2BAAW,4BAA4B;;;;ACoGpO,SAAS,iCAAiC,OAAqC,cAA4D;AACzI,yCAAwC;CAExC,MAAM,aAAa,OAAuC,KAAK;CAE/D,MAAM,EAAE,aAAa,IAAI,YAAY,IAAI,UAAU,IAAI,gBAAgB,IAAI,aAAa,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO,IAAI,QAAQ,IAAI,QAAQ,IAAI,iBAAiB,KAAK,SAAS,KAAK,WAAW,KAAK,cAAc,KAA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CAAC,OAAO,cAAc,CAAC,aAAa,CAAC,SAAS,CACvD,SAAQ,iBACN,YACC,UAAiB;AAChB,eAAY,QAAQ,SAAS,MAAM;KAErC,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;IACtB,EAAE,CAAC;CAEN,MAAM,YAAY,aACf,YAA6C;AAC5C,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,gCAAgC;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQxH,MAAa,oBAA4K,2BAAW,2BAA2B"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "react";
|
|
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
|
|
3
|
-
|
|
4
|
-
//#region src/components/menu/menu-item.gen.d.ts
|
|
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";
|
|
5
3
|
/**
|
|
6
4
|
* Props for the {@link MenuItem} React component.
|
|
7
5
|
*
|
|
8
6
|
* @public
|
|
9
7
|
*/
|
|
10
|
-
interface MenuItemProps
|
|
8
|
+
interface MenuItemProps {
|
|
11
9
|
/**
|
|
12
10
|
* The unique value for this menu item.
|
|
13
11
|
*
|
|
@@ -34,15 +32,13 @@ interface MenuItemProps extends Omit<HTMLAttributes<MenuItemElement>, 'onSelect'
|
|
|
34
32
|
*
|
|
35
33
|
* @public
|
|
36
34
|
*/
|
|
37
|
-
declare const MenuItem: ForwardRefExoticComponent<MenuItemProps & RefAttributes<MenuItemElement>>;
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region src/components/menu/menu-popup.gen.d.ts
|
|
35
|
+
declare const MenuItem: ForwardRefExoticComponent<MenuItemProps & Omit<HTMLAttributes<MenuItemElement>, 'onSelect'> & RefAttributes<MenuItemElement>>;
|
|
40
36
|
/**
|
|
41
37
|
* Props for the {@link MenuPopup} React component.
|
|
42
38
|
*
|
|
43
39
|
* @public
|
|
44
40
|
*/
|
|
45
|
-
interface MenuPopupProps
|
|
41
|
+
interface MenuPopupProps {
|
|
46
42
|
/**
|
|
47
43
|
* By default, the MenuPopup element will listen for keydown events.
|
|
48
44
|
* You can pass a different element to listen for keydown events.
|
|
@@ -56,15 +52,13 @@ interface MenuPopupProps extends HTMLAttributes<MenuPopupElement> {
|
|
|
56
52
|
*
|
|
57
53
|
* @public
|
|
58
54
|
*/
|
|
59
|
-
declare const MenuPopup: ForwardRefExoticComponent<MenuPopupProps & RefAttributes<MenuPopupElement>>;
|
|
60
|
-
//#endregion
|
|
61
|
-
//#region src/components/menu/menu-positioner.gen.d.ts
|
|
55
|
+
declare const MenuPopup: ForwardRefExoticComponent<MenuPopupProps & HTMLAttributes<MenuPopupElement> & RefAttributes<MenuPopupElement>>;
|
|
62
56
|
/**
|
|
63
57
|
* Props for the {@link MenuPositioner} React component.
|
|
64
58
|
*
|
|
65
59
|
* @public
|
|
66
60
|
*/
|
|
67
|
-
interface MenuPositionerProps
|
|
61
|
+
interface MenuPositionerProps {
|
|
68
62
|
/**
|
|
69
63
|
* The initial placement of the floating element
|
|
70
64
|
*
|
|
@@ -198,15 +192,13 @@ interface MenuPositionerProps extends HTMLAttributes<MenuPositionerElement> {
|
|
|
198
192
|
*
|
|
199
193
|
* @public
|
|
200
194
|
*/
|
|
201
|
-
declare const MenuPositioner: ForwardRefExoticComponent<MenuPositionerProps & RefAttributes<MenuPositionerElement>>;
|
|
202
|
-
//#endregion
|
|
203
|
-
//#region src/components/menu/menu-root.gen.d.ts
|
|
195
|
+
declare const MenuPositioner: ForwardRefExoticComponent<MenuPositionerProps & HTMLAttributes<MenuPositionerElement> & RefAttributes<MenuPositionerElement>>;
|
|
204
196
|
/**
|
|
205
197
|
* Props for the {@link MenuRoot} React component.
|
|
206
198
|
*
|
|
207
199
|
* @public
|
|
208
200
|
*/
|
|
209
|
-
interface MenuRootProps
|
|
201
|
+
interface MenuRootProps {
|
|
210
202
|
/**
|
|
211
203
|
* Whether the overlay is initially open.
|
|
212
204
|
* @default false
|
|
@@ -230,43 +222,37 @@ interface MenuRootProps extends HTMLAttributes<MenuRootElement> {
|
|
|
230
222
|
*
|
|
231
223
|
* @public
|
|
232
224
|
*/
|
|
233
|
-
declare const MenuRoot: ForwardRefExoticComponent<MenuRootProps & RefAttributes<MenuRootElement>>;
|
|
234
|
-
//#endregion
|
|
235
|
-
//#region src/components/menu/menu-submenu-root.gen.d.ts
|
|
225
|
+
declare const MenuRoot: ForwardRefExoticComponent<MenuRootProps & HTMLAttributes<MenuRootElement> & RefAttributes<MenuRootElement>>;
|
|
236
226
|
/**
|
|
237
227
|
* Props for the {@link MenuSubmenuRoot} React component.
|
|
238
228
|
*
|
|
239
229
|
* @public
|
|
240
230
|
*/
|
|
241
|
-
interface MenuSubmenuRootProps
|
|
231
|
+
interface MenuSubmenuRootProps {}
|
|
242
232
|
/**
|
|
243
233
|
* A React component that renders an `prosekit-menu-submenu-root` custom element.
|
|
244
234
|
*
|
|
245
235
|
* @public
|
|
246
236
|
*/
|
|
247
|
-
declare const MenuSubmenuRoot: ForwardRefExoticComponent<MenuSubmenuRootProps & RefAttributes<MenuSubmenuRootElement>>;
|
|
248
|
-
//#endregion
|
|
249
|
-
//#region src/components/menu/menu-submenu-trigger.gen.d.ts
|
|
237
|
+
declare const MenuSubmenuRoot: ForwardRefExoticComponent<MenuSubmenuRootProps & HTMLAttributes<MenuSubmenuRootElement> & RefAttributes<MenuSubmenuRootElement>>;
|
|
250
238
|
/**
|
|
251
239
|
* Props for the {@link MenuSubmenuTrigger} React component.
|
|
252
240
|
*
|
|
253
241
|
* @public
|
|
254
242
|
*/
|
|
255
|
-
interface MenuSubmenuTriggerProps
|
|
243
|
+
interface MenuSubmenuTriggerProps {}
|
|
256
244
|
/**
|
|
257
245
|
* A React component that renders an `prosekit-menu-submenu-trigger` custom element.
|
|
258
246
|
*
|
|
259
247
|
* @public
|
|
260
248
|
*/
|
|
261
|
-
declare const MenuSubmenuTrigger: ForwardRefExoticComponent<MenuSubmenuTriggerProps & RefAttributes<MenuSubmenuTriggerElement>>;
|
|
262
|
-
//#endregion
|
|
263
|
-
//#region src/components/menu/menu-trigger.gen.d.ts
|
|
249
|
+
declare const MenuSubmenuTrigger: ForwardRefExoticComponent<MenuSubmenuTriggerProps & HTMLAttributes<MenuSubmenuTriggerElement> & RefAttributes<MenuSubmenuTriggerElement>>;
|
|
264
250
|
/**
|
|
265
251
|
* Props for the {@link MenuTrigger} React component.
|
|
266
252
|
*
|
|
267
253
|
* @public
|
|
268
254
|
*/
|
|
269
|
-
interface MenuTriggerProps
|
|
255
|
+
interface MenuTriggerProps {
|
|
270
256
|
/**
|
|
271
257
|
* Whether the component should ignore user interaction.
|
|
272
258
|
*
|
|
@@ -281,7 +267,6 @@ interface MenuTriggerProps extends HTMLAttributes<MenuTriggerElement> {
|
|
|
281
267
|
*
|
|
282
268
|
* @public
|
|
283
269
|
*/
|
|
284
|
-
declare const MenuTrigger: ForwardRefExoticComponent<MenuTriggerProps & RefAttributes<MenuTriggerElement>>;
|
|
285
|
-
|
|
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 };
|
|
270
|
+
declare const MenuTrigger: ForwardRefExoticComponent<MenuTriggerProps & HTMLAttributes<MenuTriggerElement> & RefAttributes<MenuTriggerElement>>;
|
|
271
|
+
export { MenuItem, type MenuItemProps, MenuPopup, type MenuPopupProps, MenuPositioner, type MenuPositionerProps, MenuRoot, type MenuRootProps, MenuSubmenuRoot, type MenuSubmenuRootProps, MenuSubmenuTrigger, type MenuSubmenuTriggerProps, MenuTrigger, type MenuTriggerProps };
|
|
287
272
|
//# sourceMappingURL=prosekit-react-menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-react-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-react-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":";;;;;;;UAYiB,aAAA;EAoBkB;;;;;EAdjC,KAAA,GAAQ,eAAA;EAYQ;;;;;EANhB,QAAA,GAAW,eAAA;EA8DA;;;;;EAxDX,aAAA,GAAgB,eAAA;EAwD+C;EAtD/D,QAAA,IAAY,KAAA,EAAO,cAAA;AAAA;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O,eAAA;EHUoC;;AAsD7C;;EG3DE,QAAA,GAAW,eAAA;EH2DoC;EGzD/C,YAAA,IAAgB,KAAA,EAAO,cAAA;AAAA;;;;;;cAsDZ,QAAA,EAAU,yBAAA,CAA0B,aAAA,GAAgB,cAAA,CAAe,eAAA,IAAmB,aAAA,CAAc,eAAA;;;;;;UCvEhG,oBAAA;;;;;;cA6BJ,eAAA,EAAiB,yBAAA,CAA0B,oBAAA,GAAuB,cAAA,CAAe,sBAAA,IAA0B,aAAA,CAAc,sBAAA;;;;;;UC7BrH,uBAAA;;;;;;cA6BJ,kBAAA,EAAoB,yBAAA,CAA0B,uBAAA,GAA0B,cAAA,CAAe,yBAAA,IAA6B,aAAA,CAAc,yBAAA;;;;;;UC7B9H,gBAAA;ENoBkB;;;;;EMdjC,QAAA,GAAW,kBAAA;ENYK;EMVhB,YAAA,IAAgB,KAAA,EAAO,iBAAA;AAAA;;;;ANkEzB;;cMZa,WAAA,EAAa,yBAAA,CAA0B,gBAAA,GAAmB,cAAA,CAAe,kBAAA,IAAsB,aAAA,CAAc,kBAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { createElement, forwardRef, useCallback, useLayoutEffect, useRef } from "react";
|
|
2
|
-
import {
|
|
3
|
-
//#region src/components/menu/menu-item.gen.ts
|
|
3
|
+
import { registerMenuItemElement, registerMenuPopupElement, registerMenuPositionerElement, registerMenuRootElement, registerMenuSubmenuRootElement, registerMenuSubmenuTriggerElement, registerMenuTriggerElement } from "@prosekit/web/menu";
|
|
4
4
|
/**
|
|
5
5
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
6
6
|
*/
|
|
@@ -45,8 +45,6 @@ function MenuItemComponent(props, forwardedRef) {
|
|
|
45
45
|
* @public
|
|
46
46
|
*/
|
|
47
47
|
const MenuItem = /* @__PURE__ */ forwardRef(MenuItemComponent);
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region src/components/menu/menu-popup.gen.ts
|
|
50
48
|
/**
|
|
51
49
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
52
50
|
*/
|
|
@@ -76,8 +74,6 @@ function MenuPopupComponent(props, forwardedRef) {
|
|
|
76
74
|
* @public
|
|
77
75
|
*/
|
|
78
76
|
const MenuPopup = /* @__PURE__ */ forwardRef(MenuPopupComponent);
|
|
79
|
-
//#endregion
|
|
80
|
-
//#region src/components/menu/menu-positioner.gen.ts
|
|
81
77
|
/**
|
|
82
78
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
83
79
|
*/
|
|
@@ -126,8 +122,6 @@ function MenuPositionerComponent(props, forwardedRef) {
|
|
|
126
122
|
* @public
|
|
127
123
|
*/
|
|
128
124
|
const MenuPositioner = /* @__PURE__ */ forwardRef(MenuPositionerComponent);
|
|
129
|
-
//#endregion
|
|
130
|
-
//#region src/components/menu/menu-root.gen.ts
|
|
131
125
|
/**
|
|
132
126
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
133
127
|
*/
|
|
@@ -172,8 +166,6 @@ function MenuRootComponent(props, forwardedRef) {
|
|
|
172
166
|
* @public
|
|
173
167
|
*/
|
|
174
168
|
const MenuRoot = /* @__PURE__ */ forwardRef(MenuRootComponent);
|
|
175
|
-
//#endregion
|
|
176
|
-
//#region src/components/menu/menu-submenu-root.gen.ts
|
|
177
169
|
/**
|
|
178
170
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
179
171
|
*/
|
|
@@ -198,8 +190,6 @@ function MenuSubmenuRootComponent(props, forwardedRef) {
|
|
|
198
190
|
* @public
|
|
199
191
|
*/
|
|
200
192
|
const MenuSubmenuRoot = /* @__PURE__ */ forwardRef(MenuSubmenuRootComponent);
|
|
201
|
-
//#endregion
|
|
202
|
-
//#region src/components/menu/menu-submenu-trigger.gen.ts
|
|
203
193
|
/**
|
|
204
194
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
205
195
|
*/
|
|
@@ -224,8 +214,6 @@ function MenuSubmenuTriggerComponent(props, forwardedRef) {
|
|
|
224
214
|
* @public
|
|
225
215
|
*/
|
|
226
216
|
const MenuSubmenuTrigger = /* @__PURE__ */ forwardRef(MenuSubmenuTriggerComponent);
|
|
227
|
-
//#endregion
|
|
228
|
-
//#region src/components/menu/menu-trigger.gen.ts
|
|
229
217
|
/**
|
|
230
218
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
231
219
|
*/
|
|
@@ -266,7 +254,41 @@ function MenuTriggerComponent(props, forwardedRef) {
|
|
|
266
254
|
* @public
|
|
267
255
|
*/
|
|
268
256
|
const MenuTrigger = /* @__PURE__ */ forwardRef(MenuTriggerComponent);
|
|
269
|
-
|
|
270
|
-
|
|
257
|
+
/**
|
|
258
|
+
|
|
259
|
+
@module
|
|
260
|
+
|
|
261
|
+
## Anatomy
|
|
262
|
+
|
|
263
|
+
```jsx
|
|
264
|
+
import {
|
|
265
|
+
MenuItem,
|
|
266
|
+
MenuPopup,
|
|
267
|
+
MenuPositioner,
|
|
268
|
+
MenuRoot,
|
|
269
|
+
MenuSubmenuRoot,
|
|
270
|
+
MenuSubmenuTrigger,
|
|
271
|
+
MenuTrigger,
|
|
272
|
+
} from 'prosekit/react/menu'
|
|
273
|
+
|
|
274
|
+
<MenuRoot>
|
|
275
|
+
<MenuTrigger>...</MenuTrigger>
|
|
276
|
+
<MenuPositioner>
|
|
277
|
+
<MenuPopup>
|
|
278
|
+
<MenuItem>...</MenuItem>
|
|
279
|
+
<MenuSubmenuRoot>
|
|
280
|
+
<MenuSubmenuTrigger>...</MenuSubmenuTrigger>
|
|
281
|
+
<MenuPositioner>
|
|
282
|
+
<MenuPopup>
|
|
283
|
+
<MenuItem>...</MenuItem>
|
|
284
|
+
</MenuPopup>
|
|
285
|
+
</MenuPositioner>
|
|
286
|
+
</MenuSubmenuRoot>
|
|
287
|
+
</MenuPopup>
|
|
288
|
+
</MenuPositioner>
|
|
289
|
+
</MenuRoot>
|
|
290
|
+
```
|
|
291
|
+
*/
|
|
292
|
+
export { MenuItem, MenuPopup, MenuPositioner, MenuRoot, MenuSubmenuRoot, MenuSubmenuTrigger, MenuTrigger };
|
|
271
293
|
|
|
272
294
|
//# sourceMappingURL=prosekit-react-menu.js.map
|