@prosekit/preact 0.7.0-beta.2 → 0.7.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/prosekit-preact-autocomplete.d.ts +12 -12
- package/dist/prosekit-preact-autocomplete.d.ts.map +1 -1
- package/dist/prosekit-preact-autocomplete.js +2 -2
- package/dist/prosekit-preact-autocomplete.js.map +1 -1
- package/dist/prosekit-preact-block-handle.d.ts +12 -12
- package/dist/prosekit-preact-block-handle.d.ts.map +1 -1
- package/dist/prosekit-preact-block-handle.js +2 -2
- package/dist/prosekit-preact-block-handle.js.map +1 -1
- package/dist/prosekit-preact-drop-indicator.d.ts +2 -2
- package/dist/prosekit-preact-drop-indicator.d.ts.map +1 -1
- package/dist/prosekit-preact-drop-indicator.js.map +1 -1
- package/dist/prosekit-preact-inline-popover.d.ts +9 -9
- package/dist/prosekit-preact-inline-popover.d.ts.map +1 -1
- package/dist/prosekit-preact-inline-popover.js +2 -2
- package/dist/prosekit-preact-inline-popover.js.map +1 -1
- package/dist/prosekit-preact-menu.d.ts +16 -16
- package/dist/prosekit-preact-menu.d.ts.map +1 -1
- package/dist/prosekit-preact-menu.js +2 -2
- package/dist/prosekit-preact-menu.js.map +1 -1
- package/dist/prosekit-preact-popover.d.ts +10 -10
- package/dist/prosekit-preact-popover.d.ts.map +1 -1
- package/dist/prosekit-preact-popover.js +2 -2
- package/dist/prosekit-preact-popover.js.map +1 -1
- package/dist/prosekit-preact-resizable.d.ts +6 -6
- package/dist/prosekit-preact-resizable.d.ts.map +1 -1
- package/dist/prosekit-preact-resizable.js +2 -2
- package/dist/prosekit-preact-resizable.js.map +1 -1
- package/dist/prosekit-preact-table-handle.d.ts +22 -22
- package/dist/prosekit-preact-table-handle.d.ts.map +1 -1
- package/dist/prosekit-preact-table-handle.js.map +1 -1
- package/dist/prosekit-preact-tooltip.d.ts +10 -10
- package/dist/prosekit-preact-tooltip.d.ts.map +1 -1
- package/dist/prosekit-preact-tooltip.js +2 -2
- package/dist/prosekit-preact-tooltip.js.map +1 -1
- package/package.json +3 -3
- 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/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/drop-indicator/drop-indicator.gen.ts +2 -2
- package/src/components/inline-popover/index.gen.ts +1 -3
- 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/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/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/resizable-handle.gen.ts +2 -2
- package/src/components/resizable/resizable-root.gen.ts +2 -4
- 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/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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from "preact";
|
|
2
2
|
import { ForwardRefExoticComponent, RefAttributes } from "preact/compat";
|
|
3
|
-
import { AutocompleteEmptyElement, AutocompleteItemElement, AutocompleteItemEvents, AutocompleteItemProps as AutocompleteItemProps$1, AutocompletePopupElement, AutocompletePopupEvents, AutocompletePositionerElement, AutocompletePositionerProps as AutocompletePositionerProps$1, AutocompleteRootElement, AutocompleteRootEvents, AutocompleteRootProps as AutocompleteRootProps$1
|
|
3
|
+
import { AutocompleteEmptyElement, AutocompleteItemElement, AutocompleteItemEvents, AutocompleteItemProps as AutocompleteItemProps$1, AutocompletePopupElement, AutocompletePopupEvents, AutocompletePositionerElement, AutocompletePositionerProps as AutocompletePositionerProps$1, AutocompleteRootElement, AutocompleteRootEvents, AutocompleteRootProps as AutocompleteRootProps$1 } from "@prosekit/web/autocomplete";
|
|
4
4
|
|
|
5
5
|
//#region src/components/autocomplete/autocomplete-empty.gen.d.ts
|
|
6
6
|
/**
|
|
@@ -8,13 +8,13 @@ import { AutocompleteEmptyElement, AutocompleteItemElement, AutocompleteItemEven
|
|
|
8
8
|
*
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
interface AutocompleteEmptyProps
|
|
11
|
+
interface AutocompleteEmptyProps {}
|
|
12
12
|
/**
|
|
13
13
|
* A Preact component that renders an `prosekit-autocomplete-empty` custom element.
|
|
14
14
|
*
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
17
|
-
declare const AutocompleteEmpty: ForwardRefExoticComponent<AutocompleteEmptyProps & RefAttributes<AutocompleteEmptyElement>>;
|
|
17
|
+
declare const AutocompleteEmpty: ForwardRefExoticComponent<AutocompleteEmptyProps & HTMLAttributes<AutocompleteEmptyElement> & RefAttributes<AutocompleteEmptyElement>>;
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/components/autocomplete/autocomplete-item.gen.d.ts
|
|
20
20
|
/**
|
|
@@ -22,7 +22,7 @@ declare const AutocompleteEmpty: ForwardRefExoticComponent<AutocompleteEmptyProp
|
|
|
22
22
|
*
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
|
-
interface AutocompleteItemProps
|
|
25
|
+
interface AutocompleteItemProps {
|
|
26
26
|
/**
|
|
27
27
|
* The value of the item, which will be matched against the query.
|
|
28
28
|
*
|
|
@@ -45,7 +45,7 @@ interface AutocompleteItemProps extends Omit<HTMLAttributes<AutocompleteItemElem
|
|
|
45
45
|
*
|
|
46
46
|
* @public
|
|
47
47
|
*/
|
|
48
|
-
declare const AutocompleteItem: ForwardRefExoticComponent<AutocompleteItemProps & RefAttributes<AutocompleteItemElement>>;
|
|
48
|
+
declare const AutocompleteItem: ForwardRefExoticComponent<AutocompleteItemProps & Omit<HTMLAttributes<AutocompleteItemElement>, 'onSelect'> & RefAttributes<AutocompleteItemElement>>;
|
|
49
49
|
//#endregion
|
|
50
50
|
//#region src/components/autocomplete/autocomplete-popup.gen.d.ts
|
|
51
51
|
/**
|
|
@@ -53,7 +53,7 @@ declare const AutocompleteItem: ForwardRefExoticComponent<AutocompleteItemProps
|
|
|
53
53
|
*
|
|
54
54
|
* @public
|
|
55
55
|
*/
|
|
56
|
-
interface AutocompletePopupProps
|
|
56
|
+
interface AutocompletePopupProps {
|
|
57
57
|
/**
|
|
58
58
|
* Emitted when the selected value changes. Only available when multiple is
|
|
59
59
|
* false.
|
|
@@ -70,7 +70,7 @@ interface AutocompletePopupProps extends HTMLAttributes<AutocompletePopupElement
|
|
|
70
70
|
*
|
|
71
71
|
* @public
|
|
72
72
|
*/
|
|
73
|
-
declare const AutocompletePopup: ForwardRefExoticComponent<AutocompletePopupProps & RefAttributes<AutocompletePopupElement>>;
|
|
73
|
+
declare const AutocompletePopup: ForwardRefExoticComponent<AutocompletePopupProps & HTMLAttributes<AutocompletePopupElement> & RefAttributes<AutocompletePopupElement>>;
|
|
74
74
|
//#endregion
|
|
75
75
|
//#region src/components/autocomplete/autocomplete-positioner.gen.d.ts
|
|
76
76
|
/**
|
|
@@ -78,7 +78,7 @@ declare const AutocompletePopup: ForwardRefExoticComponent<AutocompletePopupProp
|
|
|
78
78
|
*
|
|
79
79
|
* @public
|
|
80
80
|
*/
|
|
81
|
-
interface AutocompletePositionerProps
|
|
81
|
+
interface AutocompletePositionerProps {
|
|
82
82
|
/**
|
|
83
83
|
* The placement of the popover, relative to the text cursor.
|
|
84
84
|
*
|
|
@@ -187,7 +187,7 @@ interface AutocompletePositionerProps extends HTMLAttributes<AutocompletePositio
|
|
|
187
187
|
*
|
|
188
188
|
* @public
|
|
189
189
|
*/
|
|
190
|
-
declare const AutocompletePositioner: ForwardRefExoticComponent<AutocompletePositionerProps & RefAttributes<AutocompletePositionerElement>>;
|
|
190
|
+
declare const AutocompletePositioner: ForwardRefExoticComponent<AutocompletePositionerProps & HTMLAttributes<AutocompletePositionerElement> & RefAttributes<AutocompletePositionerElement>>;
|
|
191
191
|
//#endregion
|
|
192
192
|
//#region src/components/autocomplete/autocomplete-root.gen.d.ts
|
|
193
193
|
/**
|
|
@@ -195,7 +195,7 @@ declare const AutocompletePositioner: ForwardRefExoticComponent<AutocompletePosi
|
|
|
195
195
|
*
|
|
196
196
|
* @public
|
|
197
197
|
*/
|
|
198
|
-
interface AutocompleteRootProps
|
|
198
|
+
interface AutocompleteRootProps {
|
|
199
199
|
/**
|
|
200
200
|
* The ProseKit editor instance.
|
|
201
201
|
*
|
|
@@ -236,7 +236,7 @@ interface AutocompleteRootProps extends HTMLAttributes<AutocompleteRootElement>
|
|
|
236
236
|
*
|
|
237
237
|
* @public
|
|
238
238
|
*/
|
|
239
|
-
declare const AutocompleteRoot: ForwardRefExoticComponent<AutocompleteRootProps & RefAttributes<AutocompleteRootElement>>;
|
|
239
|
+
declare const AutocompleteRoot: ForwardRefExoticComponent<AutocompleteRootProps & HTMLAttributes<AutocompleteRootElement> & RefAttributes<AutocompleteRootElement>>;
|
|
240
240
|
//#endregion
|
|
241
|
-
export { AutocompleteEmpty, type AutocompleteEmptyProps, AutocompleteItem, type
|
|
241
|
+
export { AutocompleteEmpty, type AutocompleteEmptyProps, AutocompleteItem, type AutocompleteItemProps, AutocompletePopup, type AutocompletePopupProps, AutocompletePositioner, type AutocompletePositionerProps, AutocompleteRoot, type AutocompleteRootProps };
|
|
242
242
|
//# sourceMappingURL=prosekit-preact-autocomplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-preact-autocomplete.d.ts","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts"],"mappings":";;;;;;;;;AA2CA;UA7BiB,sBAAA
|
|
1
|
+
{"version":3,"file":"prosekit-preact-autocomplete.d.ts","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts"],"mappings":";;;;;;;;;AA2CA;UA7BiB,sBAAA;;;;;;cA6BJ,iBAAA,EAAmB,yBAAA,CAA0B,sBAAA,GAAyB,cAAA,CAAe,wBAAA,IAA4B,aAAA,CAAc,wBAAA;;;;;;;AAA5I;UC7BiB,qBAAA;;;;;;;;EAQf,KAAA,GAAQ,uBAAA;EDqB+C;;;;;ECfvD,QAAA,GAAW,uBAAA;EDe+H;ECb1I,QAAA,IAAY,KAAA,EAAO,sBAAA;AAAA;;;;AAhBrB;;cAsEa,gBAAA,EAAkB,yBAAA,CAA0B,qBAAA,GAAwB,IAAA,CAAK,cAAA,CAAe,uBAAA,iBAAwC,aAAA,CAAc,uBAAA;;;;;;;ADzC3J;UE7BiB,sBAAA;;;;;EAKf,aAAA,IAAiB,KAAA,EAAO,uBAAA;EFwBoG;;;;EEnB5H,cAAA,IAAkB,KAAA,EAAO,uBAAA;AAAA;;;;;;cAqDd,iBAAA,EAAmB,yBAAA,CAA0B,sBAAA,GAAyB,cAAA,CAAe,wBAAA,IAA4B,aAAA,CAAc,wBAAA;;;;;;;AFlC5I;UG7BiB,2BAAA;;;;;;EAMf,SAAA,GAAY,6BAAA;EHuBkB;;;;;EGjB9B,MAAA,GAAS,6BAAA;EHiBuF;EGfhG,MAAA,GAAS,6BAAA;EHeiI;EGb1I,KAAA,GAAQ,6BAAA;EHa0J;EGXlK,WAAA,GAAc,6BAAA;;EAEd,QAAA,GAAW,6BAAA;EFpBI;EEsBf,eAAA,GAAkB,6BAAA;;;;;;EAMlB,QAAA,GAAW,6BAAA;EFpBX;;;;;;;EE4BA,UAAA,GAAa,6BAAA;EFpBsC;AAsDrD;;;;;;;EEzBE,IAAA,GAAO,6BAAA;EFyBoI;;;;;EEnB3I,KAAA,GAAQ,6BAAA;EFmBuE;;;;;;EEZ/E,OAAA,GAAU,6BAAA;;;;AD1DZ;;;ECiEE,SAAA,GAAY,6BAAA;ED5DZ;;;;;;ECmEA,UAAA,GAAa,6BAAA;ED9DmD;AAqDlE;;;;;ECgBE,IAAA,GAAO,6BAAA;EDhBmI;;;;;;ECuB1I,YAAA,GAAe,6BAAA;EDvBkE;;;;;;;EC+BjF,cAAA,GAAiB,6BAAA;;AA9FnB;;;;;;EAsGE,WAAA,GAAc,6BAAA;AAAA;;;;;;cAoCH,sBAAA,EAAwB,yBAAA,CAA0B,2BAAA,GAA8B,cAAA,CAAe,6BAAA,IAAiC,aAAA,CAAc,6BAAA;;;;;;;AH7G3J;UI3BiB,qBAAA;;;;;;;EAOf,MAAA,GAAS,uBAAA;EJoB8C;;;;;EIdvD,KAAA,GAAQ,uBAAA;EJcoH;;;;;;EIP5H,MAAA,GAAS,uBAAA;EHtBM;EGwBf,YAAA,IAAgB,KAAA,EAAO,sBAAA;;EAEvB,aAAA,IAAiB,KAAA,EAAO,sBAAA;EHZb;;;;EGiBX,aAAA,IAAiB,KAAA,EAAO,sBAAA;EHvBhB;;;;EG4BR,cAAA,IAAkB,KAAA,EAAO,sBAAA;AAAA;;;AHkC3B;;;cGsBa,gBAAA,EAAkB,yBAAA,CAA0B,qBAAA,GAAwB,cAAA,CAAe,uBAAA,IAA2B,aAAA,CAAc,uBAAA"}
|
|
@@ -2,7 +2,7 @@ import { n as useEditorContext } from "./editor-context.js";
|
|
|
2
2
|
import { createElement } from "preact";
|
|
3
3
|
import { useCallback, useLayoutEffect, useRef } from "preact/hooks";
|
|
4
4
|
import { forwardRef } from "preact/compat";
|
|
5
|
-
import {
|
|
5
|
+
import { registerAutocompleteEmptyElement, registerAutocompleteItemElement, registerAutocompletePopupElement, registerAutocompletePositionerElement, registerAutocompleteRootElement } from "@prosekit/web/autocomplete";
|
|
6
6
|
//#region src/components/autocomplete/autocomplete-empty.gen.ts
|
|
7
7
|
/**
|
|
8
8
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
@@ -221,6 +221,6 @@ function AutocompleteRootComponent(props, forwardedRef) {
|
|
|
221
221
|
*/
|
|
222
222
|
const AutocompleteRoot = /* @__PURE__ */ forwardRef(AutocompleteRootComponent);
|
|
223
223
|
//#endregion
|
|
224
|
-
export { AutocompleteEmpty, AutocompleteItem, AutocompletePopup, AutocompletePositioner, AutocompleteRoot
|
|
224
|
+
export { AutocompleteEmpty, AutocompleteItem, AutocompletePopup, AutocompletePositioner, AutocompleteRoot };
|
|
225
225
|
|
|
226
226
|
//# sourceMappingURL=prosekit-preact-autocomplete.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-preact-autocomplete.js","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-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 { registerAutocompleteEmptyElement, type AutocompleteEmptyElement } from '@prosekit/web/autocomplete';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef } from 'preact/hooks';\n\n/**\n * Props for the {@link AutocompleteEmpty} Preact component.\n *\n * @public\n */\nexport interface AutocompleteEmptyProps extends HTMLAttributes<AutocompleteEmptyElement> {}\n\nfunction AutocompleteEmptyComponent(props: AutocompleteEmptyProps, forwardedRef: Ref<AutocompleteEmptyElement>) {\n registerAutocompleteEmptyElement();\n\n const elementRef = useRef<AutocompleteEmptyElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: AutocompleteEmptyElement | 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-autocomplete-empty', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-autocomplete-empty` custom element.\n *\n * @public\n */\nexport const AutocompleteEmpty: ForwardRefExoticComponent<AutocompleteEmptyProps & RefAttributes<AutocompleteEmptyElement>> = /* @__PURE__ */ forwardRef(AutocompleteEmptyComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompleteItemElement, type AutocompleteItemElement, type AutocompleteItemProps as AutocompleteItemElementProps, type AutocompleteItemEvents } from '@prosekit/web/autocomplete';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/**\n * Props for the {@link AutocompleteItem} Preact component.\n *\n * @public\n */\nexport interface AutocompleteItemProps extends Omit<HTMLAttributes<AutocompleteItemElement>, 'onSelect'> {\n /**\n * The value of the item, which will be matched against the query.\n *\n * If not provided, the value is the item's text content.\n *\n * @default \"\"\n */\n value?: AutocompleteItemElementProps['value'];\n /**\n * Whether this option is disabled.\n *\n * @default false\n */\n disabled?: AutocompleteItemElementProps['disabled'];\n /** Emitted when the the item is selected. */\n onSelect?: (event: AutocompleteItemEvents['select']) => void;\n}\n\nfunction AutocompleteItemComponent(props: AutocompleteItemProps, forwardedRef: Ref<AutocompleteItemElement>) {\n registerAutocompleteItemElement();\n\n const elementRef = useRef<AutocompleteItemElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { disabled: p0, value: p1, onSelect: e0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { disabled: p0, value: p1 });\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 ['select'].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: AutocompleteItemElement | 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-autocomplete-item', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-autocomplete-item` custom element.\n *\n * @public\n */\nexport const AutocompleteItem: ForwardRefExoticComponent<AutocompleteItemProps & RefAttributes<AutocompleteItemElement>> = /* @__PURE__ */ forwardRef(AutocompleteItemComponent);\n\nexport type { AutocompleteItemEvents };\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompletePopupElement, type AutocompletePopupElement, type AutocompletePopupEvents } from '@prosekit/web/autocomplete';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/**\n * Props for the {@link AutocompletePopup} Preact component.\n *\n * @public\n */\nexport interface AutocompletePopupProps extends HTMLAttributes<AutocompletePopupElement> {\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompletePopupEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompletePopupEvents['valuesChange']) => void;\n}\n\nfunction AutocompletePopupComponent(props: AutocompletePopupProps, forwardedRef: Ref<AutocompletePopupElement>) {\n registerAutocompletePopupElement();\n\n const elementRef = useRef<AutocompletePopupElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { onValueChange: e0, onValuesChange: e1, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n handlersRef.current = [e0, e1] 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 ['valueChange', 'valuesChange'].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: AutocompletePopupElement | 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-autocomplete-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-autocomplete-popup` custom element.\n *\n * @public\n */\nexport const AutocompletePopup: ForwardRefExoticComponent<AutocompletePopupProps & RefAttributes<AutocompletePopupElement>> = /* @__PURE__ */ forwardRef(AutocompletePopupComponent);\n\nexport type { AutocompletePopupEvents };\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompletePositionerElement, type AutocompletePositionerElement, type AutocompletePositionerProps as AutocompletePositionerElementProps } from '@prosekit/web/autocomplete';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/**\n * Props for the {@link AutocompletePositioner} Preact component.\n *\n * @public\n */\nexport interface AutocompletePositionerProps extends HTMLAttributes<AutocompletePositionerElement> {\n /**\n * The placement of the popover, relative to the text cursor.\n *\n * @default \"bottom-start\"\n */\n placement?: AutocompletePositionerElementProps['placement'];\n /**\n * The distance between the popover and the hovered block.\n *\n * @default 4\n */\n offset?: AutocompletePositionerElementProps['offset'];\n /** @default true */\n inline?: AutocompletePositionerElementProps['inline'];\n /** @default true */\n hoist?: AutocompletePositionerElementProps['hoist'];\n /** @default true */\n fitViewport?: AutocompletePositionerElementProps['fitViewport'];\n /** @default \"The body element\" */\n boundary?: AutocompletePositionerElementProps['boundary'];\n /** @default 8 */\n overflowPadding?: AutocompletePositionerElementProps['overflowPadding'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: AutocompletePositionerElementProps['shift'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: AutocompletePositionerElementProps['overlap'];\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?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['sameHeight'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default false\n */\n hide?: AutocompletePositionerElementProps['hide'];\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?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['altBoundary'];\n}\n\nfunction AutocompletePositionerComponent(props: AutocompletePositionerProps, forwardedRef: Ref<AutocompletePositionerElement>) {\n registerAutocompletePositionerElement();\n\n const elementRef = useRef<AutocompletePositionerElement>(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: AutocompletePositionerElement | 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-autocomplete-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-autocomplete-positioner` custom element.\n *\n * @public\n */\nexport const AutocompletePositioner: ForwardRefExoticComponent<AutocompletePositionerProps & RefAttributes<AutocompletePositionerElement>> = /* @__PURE__ */ forwardRef(AutocompletePositionerComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompleteRootElement, type AutocompleteRootElement, type AutocompleteRootProps as AutocompleteRootElementProps, type AutocompleteRootEvents } from '@prosekit/web/autocomplete';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link AutocompleteRoot} Preact component.\n *\n * @public\n */\nexport interface AutocompleteRootProps extends HTMLAttributes<AutocompleteRootElement> {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: AutocompleteRootElementProps['editor'];\n /**\n * The regular expression to match the query text to autocomplete.\n *\n * @default null\n */\n regex?: AutocompleteRootElementProps['regex'];\n /**\n * The filter function to determine if an item should be shown in the\n * listbox.\n *\n * @default defaultItemFilter\n */\n filter?: AutocompleteRootElementProps['filter'];\n /** Fired when the open state changes. */\n onOpenChange?: (event: AutocompleteRootEvents['openChange']) => void;\n /** Fired when the query changes. */\n onQueryChange?: (event: AutocompleteRootEvents['queryChange']) => void;\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompleteRootEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompleteRootEvents['valuesChange']) => void;\n}\n\nfunction AutocompleteRootComponent(props: AutocompleteRootProps, forwardedRef: Ref<AutocompleteRootElement>) {\n registerAutocompleteRootElement();\n\n const elementRef = useRef<AutocompleteRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, filter: p1, regex: p2, onOpenChange: e0, onQueryChange: e1, onValueChange: e2, onValuesChange: e3, ...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, filter: p1, regex: p2 });\n handlersRef.current = [e0, e1, e2, e3] 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', 'queryChange', 'valueChange', 'valuesChange'].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: AutocompleteRootElement | 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-autocomplete-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-autocomplete-root` custom element.\n *\n * @public\n */\nexport const AutocompleteRoot: ForwardRefExoticComponent<AutocompleteRootProps & RefAttributes<AutocompleteRootElement>> = /* @__PURE__ */ forwardRef(AutocompleteRootComponent);\n\nexport type { AutocompleteRootEvents };\n"],"mappings":";;;;;;;;;AAgBA,SAAS,2BAA2B,OAA+B,cAA6C;AAC9G,mCAAkC;CAElC,MAAM,aAAa,OAAiC,KAAK;CAEzD,MAAM,EAAE,GAAG,cAAc;CAEzB,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,+BAA+B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQvH,MAAa,oBAAiI,2BAAW,2BAA2B;;;;;;ACVpL,SAAS,0BAA0B,OAA8B,cAA4C;AAC3G,kCAAiC;CAEjC,MAAM,aAAa,OAAgC,KAAK;CACxD,MAAM,cAAc,OAAoD,EAAE,CAAC;CAE3E,MAAM,EAAE,UAAU,IAAI,OAAO,IAAI,UAAU,IAAI,GAAG,cAAc;AAEh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5H,MAAa,yBAAgJ,2BAAW,gCAAgC;;;;;;ACnGxM,SAAS,0BAA0B,OAA8B,cAA4C;AAC3G,kCAAiC;CAEjC,MAAM,aAAa,OAAgC,KAAK;CACxD,MAAM,cAAc,OAAoD,EAAE,CAAC;CAE3E,MAAM,aAAa,kBAAkB;CAErC,MAAM,EAAE,QAAQ,IAAI,QAAQ,IAAI,OAAO,IAAI,cAAc,IAAI,eAAe,IAAI,eAAe,IAAI,gBAAgB,IAAI,GAAG,cAAc;AAExI,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS;GAAE,QAAQ,MAAM;GAAY,QAAQ;GAAI,OAAO;GAAI,CAAC;AAC3E,cAAY,UAAU;GAAC;GAAI;GAAI;GAAI;GAAG;GACtC;AAEF,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EACd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc;GAAC;GAAc;GAAe;GAAe;GAAe,CAAC,SAAS,CACrG,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,YAA4C;AAC3C,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,8BAA8B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQtH,MAAa,mBAA8H,2BAAW,0BAA0B"}
|
|
1
|
+
{"version":3,"file":"prosekit-preact-autocomplete.js","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-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 { registerAutocompleteEmptyElement, type AutocompleteEmptyElement } from '@prosekit/web/autocomplete';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef } from 'preact/hooks';\n\n/**\n * Props for the {@link AutocompleteEmpty} Preact component.\n *\n * @public\n */\nexport interface AutocompleteEmptyProps {}\n\nfunction AutocompleteEmptyComponent(props: AutocompleteEmptyProps, forwardedRef: Ref<AutocompleteEmptyElement>) {\n registerAutocompleteEmptyElement();\n\n const elementRef = useRef<AutocompleteEmptyElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: AutocompleteEmptyElement | 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-autocomplete-empty', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-autocomplete-empty` custom element.\n *\n * @public\n */\nexport const AutocompleteEmpty: ForwardRefExoticComponent<AutocompleteEmptyProps & HTMLAttributes<AutocompleteEmptyElement> & RefAttributes<AutocompleteEmptyElement>> = /* @__PURE__ */ forwardRef(AutocompleteEmptyComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompleteItemElement, type AutocompleteItemElement, type AutocompleteItemProps as AutocompleteItemElementProps, type AutocompleteItemEvents } from '@prosekit/web/autocomplete';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/**\n * Props for the {@link AutocompleteItem} Preact component.\n *\n * @public\n */\nexport interface AutocompleteItemProps {\n /**\n * The value of the item, which will be matched against the query.\n *\n * If not provided, the value is the item's text content.\n *\n * @default \"\"\n */\n value?: AutocompleteItemElementProps['value'];\n /**\n * Whether this option is disabled.\n *\n * @default false\n */\n disabled?: AutocompleteItemElementProps['disabled'];\n /** Emitted when the the item is selected. */\n onSelect?: (event: AutocompleteItemEvents['select']) => void;\n}\n\nfunction AutocompleteItemComponent(props: AutocompleteItemProps, forwardedRef: Ref<AutocompleteItemElement>) {\n registerAutocompleteItemElement();\n\n const elementRef = useRef<AutocompleteItemElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { disabled: p0, value: p1, onSelect: e0, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n Object.assign(element, { disabled: p0, value: p1 });\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 ['select'].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: AutocompleteItemElement | 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-autocomplete-item', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-autocomplete-item` custom element.\n *\n * @public\n */\nexport const AutocompleteItem: ForwardRefExoticComponent<AutocompleteItemProps & Omit<HTMLAttributes<AutocompleteItemElement>, 'onSelect'> & RefAttributes<AutocompleteItemElement>> = /* @__PURE__ */ forwardRef(AutocompleteItemComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompletePopupElement, type AutocompletePopupElement, type AutocompletePopupEvents } from '@prosekit/web/autocomplete';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/**\n * Props for the {@link AutocompletePopup} Preact component.\n *\n * @public\n */\nexport interface AutocompletePopupProps {\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompletePopupEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompletePopupEvents['valuesChange']) => void;\n}\n\nfunction AutocompletePopupComponent(props: AutocompletePopupProps, forwardedRef: Ref<AutocompletePopupElement>) {\n registerAutocompletePopupElement();\n\n const elementRef = useRef<AutocompletePopupElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const { onValueChange: e0, onValuesChange: e1, ...restProps } = props;\n\n useLayoutEffect(() => {\n const element = elementRef.current as Record<string, unknown> | null;\n if (!element) return;\n handlersRef.current = [e0, e1] 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 ['valueChange', 'valuesChange'].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: AutocompletePopupElement | 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-autocomplete-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-autocomplete-popup` custom element.\n *\n * @public\n */\nexport const AutocompletePopup: ForwardRefExoticComponent<AutocompletePopupProps & HTMLAttributes<AutocompletePopupElement> & RefAttributes<AutocompletePopupElement>> = /* @__PURE__ */ forwardRef(AutocompletePopupComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompletePositionerElement, type AutocompletePositionerElement, type AutocompletePositionerProps as AutocompletePositionerElementProps } from '@prosekit/web/autocomplete';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/**\n * Props for the {@link AutocompletePositioner} Preact component.\n *\n * @public\n */\nexport interface AutocompletePositionerProps {\n /**\n * The placement of the popover, relative to the text cursor.\n *\n * @default \"bottom-start\"\n */\n placement?: AutocompletePositionerElementProps['placement'];\n /**\n * The distance between the popover and the hovered block.\n *\n * @default 4\n */\n offset?: AutocompletePositionerElementProps['offset'];\n /** @default true */\n inline?: AutocompletePositionerElementProps['inline'];\n /** @default true */\n hoist?: AutocompletePositionerElementProps['hoist'];\n /** @default true */\n fitViewport?: AutocompletePositionerElementProps['fitViewport'];\n /** @default \"The body element\" */\n boundary?: AutocompletePositionerElementProps['boundary'];\n /** @default 8 */\n overflowPadding?: AutocompletePositionerElementProps['overflowPadding'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: AutocompletePositionerElementProps['shift'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: AutocompletePositionerElementProps['overlap'];\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?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['sameHeight'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default false\n */\n hide?: AutocompletePositionerElementProps['hide'];\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?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['altBoundary'];\n}\n\nfunction AutocompletePositionerComponent(props: AutocompletePositionerProps, forwardedRef: Ref<AutocompletePositionerElement>) {\n registerAutocompletePositionerElement();\n\n const elementRef = useRef<AutocompletePositionerElement>(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: AutocompletePositionerElement | 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-autocomplete-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-autocomplete-positioner` custom element.\n *\n * @public\n */\nexport const AutocompletePositioner: ForwardRefExoticComponent<AutocompletePositionerProps & HTMLAttributes<AutocompletePositionerElement> & RefAttributes<AutocompletePositionerElement>> = /* @__PURE__ */ forwardRef(AutocompletePositionerComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompleteRootElement, type AutocompleteRootElement, type AutocompleteRootProps as AutocompleteRootElementProps, type AutocompleteRootEvents } from '@prosekit/web/autocomplete';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link AutocompleteRoot} Preact component.\n *\n * @public\n */\nexport interface AutocompleteRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: AutocompleteRootElementProps['editor'];\n /**\n * The regular expression to match the query text to autocomplete.\n *\n * @default null\n */\n regex?: AutocompleteRootElementProps['regex'];\n /**\n * The filter function to determine if an item should be shown in the\n * listbox.\n *\n * @default defaultItemFilter\n */\n filter?: AutocompleteRootElementProps['filter'];\n /** Fired when the open state changes. */\n onOpenChange?: (event: AutocompleteRootEvents['openChange']) => void;\n /** Fired when the query changes. */\n onQueryChange?: (event: AutocompleteRootEvents['queryChange']) => void;\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompleteRootEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompleteRootEvents['valuesChange']) => void;\n}\n\nfunction AutocompleteRootComponent(props: AutocompleteRootProps, forwardedRef: Ref<AutocompleteRootElement>) {\n registerAutocompleteRootElement();\n\n const elementRef = useRef<AutocompleteRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, filter: p1, regex: p2, onOpenChange: e0, onQueryChange: e1, onValueChange: e2, onValuesChange: e3, ...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, filter: p1, regex: p2 });\n handlersRef.current = [e0, e1, e2, e3] 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', 'queryChange', 'valueChange', 'valuesChange'].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: AutocompleteRootElement | 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-autocomplete-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-autocomplete-root` custom element.\n *\n * @public\n */\nexport const AutocompleteRoot: ForwardRefExoticComponent<AutocompleteRootProps & HTMLAttributes<AutocompleteRootElement> & RefAttributes<AutocompleteRootElement>> = /* @__PURE__ */ forwardR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MAAM,CAAC,OAAO,cAAc;GAAC;GAAc;GAAe;GAAe;GAAe,CAAC,SAAS,CACrG,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,YAA4C;AAC3C,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,8BAA8B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQtH,MAAa,mBAAwK,2BAAW,0BAA0B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from "preact";
|
|
2
2
|
import { ForwardRefExoticComponent, RefAttributes } from "preact/compat";
|
|
3
|
-
import { BlockHandleAddElement, BlockHandleAddProps as BlockHandleAddProps$1, BlockHandleDraggableElement, BlockHandleDraggableProps as BlockHandleDraggableProps$1, BlockHandlePopupElement, BlockHandlePositionerElement, BlockHandlePositionerProps as BlockHandlePositionerProps$1, BlockHandleRootElement, BlockHandleRootEvents, BlockHandleRootProps as BlockHandleRootProps$1
|
|
3
|
+
import { BlockHandleAddElement, BlockHandleAddProps as BlockHandleAddProps$1, BlockHandleDraggableElement, BlockHandleDraggableProps as BlockHandleDraggableProps$1, BlockHandlePopupElement, BlockHandlePositionerElement, BlockHandlePositionerProps as BlockHandlePositionerProps$1, BlockHandleRootElement, BlockHandleRootEvents, BlockHandleRootProps as BlockHandleRootProps$1 } from "@prosekit/web/block-handle";
|
|
4
4
|
|
|
5
5
|
//#region src/components/block-handle/block-handle-add.gen.d.ts
|
|
6
6
|
/**
|
|
@@ -8,7 +8,7 @@ import { BlockHandleAddElement, BlockHandleAddProps as BlockHandleAddProps$1, Bl
|
|
|
8
8
|
*
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
interface BlockHandleAddProps
|
|
11
|
+
interface BlockHandleAddProps {
|
|
12
12
|
/**
|
|
13
13
|
* The ProseKit editor instance.
|
|
14
14
|
*
|
|
@@ -22,7 +22,7 @@ interface BlockHandleAddProps extends HTMLAttributes<BlockHandleAddElement> {
|
|
|
22
22
|
*
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
|
-
declare const BlockHandleAdd: ForwardRefExoticComponent<BlockHandleAddProps & RefAttributes<BlockHandleAddElement>>;
|
|
25
|
+
declare const BlockHandleAdd: ForwardRefExoticComponent<BlockHandleAddProps & HTMLAttributes<BlockHandleAddElement> & RefAttributes<BlockHandleAddElement>>;
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/components/block-handle/block-handle-draggable.gen.d.ts
|
|
28
28
|
/**
|
|
@@ -30,7 +30,7 @@ declare const BlockHandleAdd: ForwardRefExoticComponent<BlockHandleAddProps & Re
|
|
|
30
30
|
*
|
|
31
31
|
* @public
|
|
32
32
|
*/
|
|
33
|
-
interface BlockHandleDraggableProps
|
|
33
|
+
interface BlockHandleDraggableProps {
|
|
34
34
|
/**
|
|
35
35
|
* The ProseKit editor instance.
|
|
36
36
|
*
|
|
@@ -44,7 +44,7 @@ interface BlockHandleDraggableProps extends HTMLAttributes<BlockHandleDraggableE
|
|
|
44
44
|
*
|
|
45
45
|
* @public
|
|
46
46
|
*/
|
|
47
|
-
declare const BlockHandleDraggable: ForwardRefExoticComponent<BlockHandleDraggableProps & RefAttributes<BlockHandleDraggableElement>>;
|
|
47
|
+
declare const BlockHandleDraggable: ForwardRefExoticComponent<BlockHandleDraggableProps & HTMLAttributes<BlockHandleDraggableElement> & RefAttributes<BlockHandleDraggableElement>>;
|
|
48
48
|
//#endregion
|
|
49
49
|
//#region src/components/block-handle/block-handle-popup.gen.d.ts
|
|
50
50
|
/**
|
|
@@ -52,13 +52,13 @@ declare const BlockHandleDraggable: ForwardRefExoticComponent<BlockHandleDraggab
|
|
|
52
52
|
*
|
|
53
53
|
* @public
|
|
54
54
|
*/
|
|
55
|
-
interface BlockHandlePopupProps
|
|
55
|
+
interface BlockHandlePopupProps {}
|
|
56
56
|
/**
|
|
57
57
|
* A Preact component that renders an `prosekit-block-handle-popup` custom element.
|
|
58
58
|
*
|
|
59
59
|
* @public
|
|
60
60
|
*/
|
|
61
|
-
declare const BlockHandlePopup: ForwardRefExoticComponent<BlockHandlePopupProps & RefAttributes<BlockHandlePopupElement>>;
|
|
61
|
+
declare const BlockHandlePopup: ForwardRefExoticComponent<BlockHandlePopupProps & HTMLAttributes<BlockHandlePopupElement> & RefAttributes<BlockHandlePopupElement>>;
|
|
62
62
|
//#endregion
|
|
63
63
|
//#region src/components/block-handle/block-handle-positioner.gen.d.ts
|
|
64
64
|
/**
|
|
@@ -66,7 +66,7 @@ declare const BlockHandlePopup: ForwardRefExoticComponent<BlockHandlePopupProps
|
|
|
66
66
|
*
|
|
67
67
|
* @public
|
|
68
68
|
*/
|
|
69
|
-
interface BlockHandlePositionerProps
|
|
69
|
+
interface BlockHandlePositionerProps {
|
|
70
70
|
/**
|
|
71
71
|
* The placement of the popover, relative to the hovered block.
|
|
72
72
|
*
|
|
@@ -193,7 +193,7 @@ interface BlockHandlePositionerProps extends HTMLAttributes<BlockHandlePositione
|
|
|
193
193
|
*
|
|
194
194
|
* @public
|
|
195
195
|
*/
|
|
196
|
-
declare const BlockHandlePositioner: ForwardRefExoticComponent<BlockHandlePositionerProps & RefAttributes<BlockHandlePositionerElement>>;
|
|
196
|
+
declare const BlockHandlePositioner: ForwardRefExoticComponent<BlockHandlePositionerProps & HTMLAttributes<BlockHandlePositionerElement> & RefAttributes<BlockHandlePositionerElement>>;
|
|
197
197
|
//#endregion
|
|
198
198
|
//#region src/components/block-handle/block-handle-root.gen.d.ts
|
|
199
199
|
/**
|
|
@@ -201,7 +201,7 @@ declare const BlockHandlePositioner: ForwardRefExoticComponent<BlockHandlePositi
|
|
|
201
201
|
*
|
|
202
202
|
* @public
|
|
203
203
|
*/
|
|
204
|
-
interface BlockHandleRootProps
|
|
204
|
+
interface BlockHandleRootProps {
|
|
205
205
|
/**
|
|
206
206
|
* The ProseKit editor instance.
|
|
207
207
|
*
|
|
@@ -217,7 +217,7 @@ interface BlockHandleRootProps extends HTMLAttributes<BlockHandleRootElement> {
|
|
|
217
217
|
*
|
|
218
218
|
* @public
|
|
219
219
|
*/
|
|
220
|
-
declare const BlockHandleRoot: ForwardRefExoticComponent<BlockHandleRootProps & RefAttributes<BlockHandleRootElement>>;
|
|
220
|
+
declare const BlockHandleRoot: ForwardRefExoticComponent<BlockHandleRootProps & HTMLAttributes<BlockHandleRootElement> & RefAttributes<BlockHandleRootElement>>;
|
|
221
221
|
//#endregion
|
|
222
|
-
export { BlockHandleAdd, type BlockHandleAddProps, BlockHandleDraggable, type BlockHandleDraggableProps, BlockHandlePopup, type BlockHandlePopupProps, BlockHandlePositioner, type BlockHandlePositionerProps, BlockHandleRoot, type
|
|
222
|
+
export { BlockHandleAdd, type BlockHandleAddProps, BlockHandleDraggable, type BlockHandleDraggableProps, BlockHandlePopup, type BlockHandlePopupProps, BlockHandlePositioner, type BlockHandlePositionerProps, BlockHandleRoot, type BlockHandleRootProps };
|
|
223
223
|
//# sourceMappingURL=prosekit-preact-block-handle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-preact-block-handle.d.ts","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"prosekit-preact-block-handle.d.ts","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/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;EAwET,WAAA,GAAc,4BAAA;AAAA;;;;;;cAoCH,qBAAA,EAAuB,yBAAA,CAA0B,0BAAA,GAA6B,cAAA,CAAe,4BAAA,IAAgC,aAAA,CAAc,4BAAA;;;;;;;AH7GxJ;UI7CiB,oBAAA;;;;;;;EAOf,MAAA,GAAS,sBAAA;EJsC2C;EIpCpD,aAAA,IAAiB,KAAA,EAAO,qBAAA;AAAA;;;;;;cAwDb,eAAA,EAAiB,yBAAA,CAA0B,oBAAA,GAAuB,cAAA,CAAe,sBAAA,IAA0B,aAAA,CAAc,sBAAA"}
|
|
@@ -2,7 +2,7 @@ import { n as useEditorContext } from "./editor-context.js";
|
|
|
2
2
|
import { createElement } from "preact";
|
|
3
3
|
import { useCallback, useLayoutEffect, useRef } from "preact/hooks";
|
|
4
4
|
import { forwardRef } from "preact/compat";
|
|
5
|
-
import {
|
|
5
|
+
import { registerBlockHandleAddElement, registerBlockHandleDraggableElement, registerBlockHandlePopupElement, registerBlockHandlePositionerElement, registerBlockHandleRootElement } from "@prosekit/web/block-handle";
|
|
6
6
|
//#region src/components/block-handle/block-handle-add.gen.ts
|
|
7
7
|
/**
|
|
8
8
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
@@ -186,6 +186,6 @@ function BlockHandleRootComponent(props, forwardedRef) {
|
|
|
186
186
|
*/
|
|
187
187
|
const BlockHandleRoot = /* @__PURE__ */ forwardRef(BlockHandleRootComponent);
|
|
188
188
|
//#endregion
|
|
189
|
-
export { BlockHandleAdd, BlockHandleDraggable, BlockHandlePopup, BlockHandlePositioner, BlockHandleRoot
|
|
189
|
+
export { BlockHandleAdd, BlockHandleDraggable, BlockHandlePopup, BlockHandlePositioner, BlockHandleRoot };
|
|
190
190
|
|
|
191
191
|
//# sourceMappingURL=prosekit-preact-block-handle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-preact-block-handle.js","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-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 { registerBlockHandleAddElement, type BlockHandleAddElement, type BlockHandleAddProps as BlockHandleAddElementProps } from '@prosekit/web/block-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleAdd} Preact component.\n *\n * @public\n */\nexport interface BlockHandleAddProps extends HTMLAttributes<BlockHandleAddElement> {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleAddElementProps['editor'];\n}\n\nfunction BlockHandleAddComponent(props: BlockHandleAddProps, forwardedRef: Ref<BlockHandleAddElement>) {\n registerBlockHandleAddElement();\n\n const elementRef = useRef<BlockHandleAddElement>(null);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, ...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 });\n });\n\n const mergedRef = useCallback(\n (element: BlockHandleAddElement | 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-block-handle-add', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-block-handle-add` custom element.\n *\n * @public\n */\nexport const BlockHandleAdd: ForwardRefExoticComponent<BlockHandleAddProps & RefAttributes<BlockHandleAddElement>> = /* @__PURE__ */ forwardRef(BlockHandleAddComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleDraggableElement, type BlockHandleDraggableElement, type BlockHandleDraggableProps as BlockHandleDraggableElementProps } from '@prosekit/web/block-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleDraggable} Preact component.\n *\n * @public\n */\nexport interface BlockHandleDraggableProps extends HTMLAttributes<BlockHandleDraggableElement> {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleDraggableElementProps['editor'];\n}\n\nfunction BlockHandleDraggableComponent(props: BlockHandleDraggableProps, forwardedRef: Ref<BlockHandleDraggableElement>) {\n registerBlockHandleDraggableElement();\n\n const elementRef = useRef<BlockHandleDraggableElement>(null);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, ...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 });\n });\n\n const mergedRef = useCallback(\n (element: BlockHandleDraggableElement | 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-block-handle-draggable', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-block-handle-draggable` custom element.\n *\n * @public\n */\nexport const BlockHandleDraggable: ForwardRefExoticComponent<BlockHandleDraggableProps & RefAttributes<BlockHandleDraggableElement>> = /* @__PURE__ */ forwardRef(BlockHandleDraggableComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandlePopupElement, type BlockHandlePopupElement } from '@prosekit/web/block-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef } from 'preact/hooks';\n\n/**\n * Props for the {@link BlockHandlePopup} Preact component.\n *\n * @public\n */\nexport interface BlockHandlePopupProps extends HTMLAttributes<BlockHandlePopupElement> {}\n\nfunction BlockHandlePopupComponent(props: BlockHandlePopupProps, forwardedRef: Ref<BlockHandlePopupElement>) {\n registerBlockHandlePopupElement();\n\n const elementRef = useRef<BlockHandlePopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: BlockHandlePopupElement | 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-block-handle-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-block-handle-popup` custom element.\n *\n * @public\n */\nexport const BlockHandlePopup: ForwardRefExoticComponent<BlockHandlePopupProps & RefAttributes<BlockHandlePopupElement>> = /* @__PURE__ */ forwardRef(BlockHandlePopupComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandlePositionerElement, type BlockHandlePositionerElement, type BlockHandlePositionerProps as BlockHandlePositionerElementProps } from '@prosekit/web/block-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/**\n * Props for the {@link BlockHandlePositioner} Preact component.\n *\n * @public\n */\nexport interface BlockHandlePositionerProps extends HTMLAttributes<BlockHandlePositionerElement> {\n /**\n * The placement of the popover, relative to the hovered block.\n *\n * @default \"left\"\n */\n placement?: BlockHandlePositionerElementProps['placement'];\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?: BlockHandlePositionerElementProps['hoist'];\n /**\n * @default false\n * @hidden\n */\n flip?: BlockHandlePositionerElementProps['flip'];\n /**\n * @default false\n * @hidden\n */\n shift?: BlockHandlePositionerElementProps['shift'];\n /**\n * @default true\n * @hidden\n */\n hide?: BlockHandlePositionerElementProps['hide'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['autoUpdate'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: BlockHandlePositionerElementProps['offset'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: BlockHandlePositionerElementProps['overlap'];\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?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: BlockHandlePositionerElementProps['inline'];\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?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['rootBoundary'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.\n *\n * @default 4\n */\n overflowPadding?: BlockHandlePositionerElementProps['overflowPadding'];\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?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['altBoundary'];\n}\n\nfunction BlockHandlePositionerComponent(props: BlockHandlePositionerProps, forwardedRef: Ref<BlockHandlePositionerElement>) {\n registerBlockHandlePositionerElement();\n\n const elementRef = useRef<BlockHandlePositionerElement>(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: BlockHandlePositionerElement | 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-block-handle-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-block-handle-positioner` custom element.\n *\n * @public\n */\nexport const BlockHandlePositioner: ForwardRefExoticComponent<BlockHandlePositionerProps & RefAttributes<BlockHandlePositionerElement>> = /* @__PURE__ */ forwardRef(BlockHandlePositionerComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleRootElement, type BlockHandleRootElement, type BlockHandleRootProps as BlockHandleRootElementProps, type BlockHandleRootEvents } from '@prosekit/web/block-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleRoot} Preact component.\n *\n * @public\n */\nexport interface BlockHandleRootProps extends HTMLAttributes<BlockHandleRootElement> {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleRootElementProps['editor'];\n /** Fired when the hovered block changes. */\n onStateChange?: (event: BlockHandleRootEvents['stateChange']) => void;\n}\n\nfunction BlockHandleRootComponent(props: BlockHandleRootProps, forwardedRef: Ref<BlockHandleRootElement>) {\n registerBlockHandleRootElement();\n\n const elementRef = useRef<BlockHandleRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, onStateChange: e0, ...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 });\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 ['stateChange'].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: BlockHandleRootElement | 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-block-handle-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-block-handle-root` custom element.\n *\n * @public\n */\nexport const BlockHandleRoot: ForwardRefExoticComponent<BlockHandleRootProps & RefAttributes<BlockHandleRootElement>> = /* @__PURE__ */ forwardRef(BlockHandleRootComponent);\n\nexport type { BlockHandleRootEvents };\n"],"mappings":";;;;;;;;;AA0BA,SAAS,wBAAwB,OAA4B,cAA0C;AACrG,gCAA+B;CAE/B,MAAM,aAAa,OAA8B,KAAK;CAEtD,MAAM,aAAa,kBAAkB;CAErC,MAAM,EAAE,QAAQ,IAAI,GAAG,cAAc;AAErC,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS,EAAE,QAAQ,MAAM,YAAY,CAAC;GACpD;CAEF,MAAM,YAAY,aACf,YAA0C;AACzC,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,6BAA6B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQrH,MAAa,iBAAwH,2BAAW,wBAAwB;;;;;;ACnCxK,SAAS,8BAA8B,OAAkC,cAAgD;AACvH,sCAAqC;CAErC,MAAM,aAAa,OAAoC,KAAK;CAE5D,MAAM,aAAa,kBAAkB;CAErC,MAAM,EAAE,QAAQ,IAAI,GAAG,cAAc;AAErC,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS,EAAE,QAAQ,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,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQtH,MAAa,kBAA2H,2BAAW,yBAAyB"}
|
|
1
|
+
{"version":3,"file":"prosekit-preact-block-handle.js","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-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 { registerBlockHandleAddElement, type BlockHandleAddElement, type BlockHandleAddProps as BlockHandleAddElementProps } from '@prosekit/web/block-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleAdd} Preact component.\n *\n * @public\n */\nexport interface BlockHandleAddProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleAddElementProps['editor'];\n}\n\nfunction BlockHandleAddComponent(props: BlockHandleAddProps, forwardedRef: Ref<BlockHandleAddElement>) {\n registerBlockHandleAddElement();\n\n const elementRef = useRef<BlockHandleAddElement>(null);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, ...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 });\n });\n\n const mergedRef = useCallback(\n (element: BlockHandleAddElement | 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-block-handle-add', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-block-handle-add` custom element.\n *\n * @public\n */\nexport const BlockHandleAdd: ForwardRefExoticComponent<BlockHandleAddProps & HTMLAttributes<BlockHandleAddElement> & RefAttributes<BlockHandleAddElement>> = /* @__PURE__ */ forwardRef(BlockHandleAddComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleDraggableElement, type BlockHandleDraggableElement, type BlockHandleDraggableProps as BlockHandleDraggableElementProps } from '@prosekit/web/block-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleDraggable} Preact component.\n *\n * @public\n */\nexport interface BlockHandleDraggableProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleDraggableElementProps['editor'];\n}\n\nfunction BlockHandleDraggableComponent(props: BlockHandleDraggableProps, forwardedRef: Ref<BlockHandleDraggableElement>) {\n registerBlockHandleDraggableElement();\n\n const elementRef = useRef<BlockHandleDraggableElement>(null);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, ...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 });\n });\n\n const mergedRef = useCallback(\n (element: BlockHandleDraggableElement | 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-block-handle-draggable', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-block-handle-draggable` custom element.\n *\n * @public\n */\nexport const BlockHandleDraggable: ForwardRefExoticComponent<BlockHandleDraggableProps & HTMLAttributes<BlockHandleDraggableElement> & RefAttributes<BlockHandleDraggableElement>> = /* @__PURE__ */ forwardRef(BlockHandleDraggableComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandlePopupElement, type BlockHandlePopupElement } from '@prosekit/web/block-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef } from 'preact/hooks';\n\n/**\n * Props for the {@link BlockHandlePopup} Preact component.\n *\n * @public\n */\nexport interface BlockHandlePopupProps {}\n\nfunction BlockHandlePopupComponent(props: BlockHandlePopupProps, forwardedRef: Ref<BlockHandlePopupElement>) {\n registerBlockHandlePopupElement();\n\n const elementRef = useRef<BlockHandlePopupElement>(null);\n\n const { ...restProps } = props;\n\n const mergedRef = useCallback(\n (element: BlockHandlePopupElement | 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-block-handle-popup', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-block-handle-popup` custom element.\n *\n * @public\n */\nexport const BlockHandlePopup: ForwardRefExoticComponent<BlockHandlePopupProps & HTMLAttributes<BlockHandlePopupElement> & RefAttributes<BlockHandlePopupElement>> = /* @__PURE__ */ forwardRef(BlockHandlePopupComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandlePositionerElement, type BlockHandlePositionerElement, type BlockHandlePositionerProps as BlockHandlePositionerElementProps } from '@prosekit/web/block-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\n/**\n * Props for the {@link BlockHandlePositioner} Preact component.\n *\n * @public\n */\nexport interface BlockHandlePositionerProps {\n /**\n * The placement of the popover, relative to the hovered block.\n *\n * @default \"left\"\n */\n placement?: BlockHandlePositionerElementProps['placement'];\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?: BlockHandlePositionerElementProps['hoist'];\n /**\n * @default false\n * @hidden\n */\n flip?: BlockHandlePositionerElementProps['flip'];\n /**\n * @default false\n * @hidden\n */\n shift?: BlockHandlePositionerElementProps['shift'];\n /**\n * @default true\n * @hidden\n */\n hide?: BlockHandlePositionerElementProps['hide'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['autoUpdate'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: BlockHandlePositionerElementProps['offset'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: BlockHandlePositionerElementProps['overlap'];\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?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: BlockHandlePositionerElementProps['inline'];\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?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['rootBoundary'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.\n *\n * @default 4\n */\n overflowPadding?: BlockHandlePositionerElementProps['overflowPadding'];\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?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['altBoundary'];\n}\n\nfunction BlockHandlePositionerComponent(props: BlockHandlePositionerProps, forwardedRef: Ref<BlockHandlePositionerElement>) {\n registerBlockHandlePositionerElement();\n\n const elementRef = useRef<BlockHandlePositionerElement>(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: BlockHandlePositionerElement | 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-block-handle-positioner', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-block-handle-positioner` custom element.\n *\n * @public\n */\nexport const BlockHandlePositioner: ForwardRefExoticComponent<BlockHandlePositionerProps & HTMLAttributes<BlockHandlePositionerElement> & RefAttributes<BlockHandlePositionerElement>> = /* @__PURE__ */ forwardRef(BlockHandlePositionerComponent);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleRootElement, type BlockHandleRootElement, type BlockHandleRootProps as BlockHandleRootElementProps, type BlockHandleRootEvents } from '@prosekit/web/block-handle';\nimport { createElement, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleRoot} Preact component.\n *\n * @public\n */\nexport interface BlockHandleRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleRootElementProps['editor'];\n /** Fired when the hovered block changes. */\n onStateChange?: (event: BlockHandleRootEvents['stateChange']) => void;\n}\n\nfunction BlockHandleRootComponent(props: BlockHandleRootProps, forwardedRef: Ref<BlockHandleRootElement>) {\n registerBlockHandleRootElement();\n\n const elementRef = useRef<BlockHandleRootElement>(null);\n const handlersRef = useRef<Array<((event: Event) => void) | undefined>>([]);\n\n const p0Fallback = useEditorContext();\n\n const { editor: p0, onStateChange: e0, ...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 });\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 ['stateChange'].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: BlockHandleRootElement | 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-block-handle-root', { ...restProps, ref: mergedRef, suppressHydrationWarning: true });\n}\n\n/**\n * A Preact component that renders an `prosekit-block-handle-root` custom element.\n *\n * @public\n */\nexport const BlockHandleRoot: ForwardRefExoticComponent<BlockHandleRootProps & HTMLAttributes<BlockHandleRootElement> & RefAttributes<BlockHandleRootElement>> = /* @__PURE__ */ forwardRef(BlockHandleRootComponent);\n"],"mappings":";;;;;;;;;AA0BA,SAAS,wBAAwB,OAA4B,cAA0C;AACrG,gCAA+B;CAE/B,MAAM,aAAa,OAA8B,KAAK;CAEtD,MAAM,aAAa,kBAAkB;CAErC,MAAM,EAAE,QAAQ,IAAI,GAAG,cAAc;AAErC,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS,EAAE,QAAQ,MAAM,YAAY,CAAC;GACpD;CAEF,MAAM,YAAY,aACf,YAA0C;AACzC,aAAW,UAAU;AACrB,MAAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,6BAA6B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQrH,MAAa,iBAAgK,2BAAW,wBAAwB;;;;;;ACnChN,SAAS,8BAA8B,OAAkC,cAAgD;AACvH,sCAAqC;CAErC,MAAM,aAAa,OAAoC,KAAK;CAE5D,MAAM,aAAa,kBAAkB;CAErC,MAAM,E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AAI,OAAO,iBAAiB,WAC1B,cAAa,QAAQ;WACZ,aACT,cAAa,UAAU;IAG3B,CAAC,aAAa,CACf;AAED,QAAO,cAAc,8BAA8B;EAAE,GAAG;EAAW,KAAK;EAAW,0BAA0B;EAAM,CAAC;;;;;;;AAQtH,MAAa,kBAAoK,2BAAW,yBAAyB"}
|
|
@@ -8,7 +8,7 @@ import { DropIndicatorElement, DropIndicatorProps as DropIndicatorProps$1 } from
|
|
|
8
8
|
*
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
interface DropIndicatorProps
|
|
11
|
+
interface DropIndicatorProps {
|
|
12
12
|
/**
|
|
13
13
|
* The ProseKit editor instance.
|
|
14
14
|
*
|
|
@@ -28,7 +28,7 @@ interface DropIndicatorProps extends HTMLAttributes<DropIndicatorElement> {
|
|
|
28
28
|
*
|
|
29
29
|
* @public
|
|
30
30
|
*/
|
|
31
|
-
declare const DropIndicator: ForwardRefExoticComponent<DropIndicatorProps & RefAttributes<DropIndicatorElement>>;
|
|
31
|
+
declare const DropIndicator: ForwardRefExoticComponent<DropIndicatorProps & HTMLAttributes<DropIndicatorElement> & RefAttributes<DropIndicatorElement>>;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { DropIndicator, type DropIndicatorProps };
|
|
34
34
|
//# sourceMappingURL=prosekit-preact-drop-indicator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-preact-drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":";;;;;;;;;;UAgBiB,kBAAA
|
|
1
|
+
{"version":3,"file":"prosekit-preact-drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":";;;;;;;;;;UAgBiB,kBAAA;EAaP;;;AAsCV;;;EA5CE,MAAA,GAAS,oBAAA;EA4C+E;;;;;EAtCxF,KAAA,GAAQ,oBAAA;AAAA;;;;;;cAsCG,aAAA,EAAe,yBAAA,CAA0B,kBAAA,GAAqB,cAAA,CAAe,oBAAA,IAAwB,aAAA,CAAc,oBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-preact-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, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link DropIndicator} Preact component.\n *\n * @public\n */\nexport interface DropIndicatorProps
|
|
1
|
+
{"version":3,"file":"prosekit-preact-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, type HTMLAttributes, type Ref } from 'preact';\nimport { forwardRef, type ForwardRefExoticComponent, type RefAttributes } from 'preact/compat';\nimport { useCallback, useRef, useLayoutEffect } from 'preact/hooks';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link DropIndicator} Preact 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: Ref<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 Preact 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"],"mappings":";;;;;;;;;AAgCA,SAAS,uBAAuB,OAA2B,cAAyC;AAClG,+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,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from "preact";
|
|
2
2
|
import { ForwardRefExoticComponent, RefAttributes } from "preact/compat";
|
|
3
|
-
import { InlinePopoverPopupElement, InlinePopoverPositionerElement, InlinePopoverPositionerProps as InlinePopoverPositionerProps$1, InlinePopoverRootElement, InlinePopoverRootEvents, InlinePopoverRootProps as InlinePopoverRootProps$1
|
|
3
|
+
import { InlinePopoverPopupElement, InlinePopoverPositionerElement, InlinePopoverPositionerProps as InlinePopoverPositionerProps$1, InlinePopoverRootElement, InlinePopoverRootEvents, InlinePopoverRootProps as InlinePopoverRootProps$1 } from "@prosekit/web/inline-popover";
|
|
4
4
|
|
|
5
5
|
//#region src/components/inline-popover/inline-popover-popup.gen.d.ts
|
|
6
6
|
/**
|
|
@@ -8,13 +8,13 @@ import { InlinePopoverPopupElement, InlinePopoverPositionerElement, InlinePopove
|
|
|
8
8
|
*
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
interface InlinePopoverPopupProps
|
|
11
|
+
interface InlinePopoverPopupProps {}
|
|
12
12
|
/**
|
|
13
13
|
* A Preact component that renders an `prosekit-inline-popover-popup` custom element.
|
|
14
14
|
*
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
17
|
-
declare const InlinePopoverPopup: ForwardRefExoticComponent<InlinePopoverPopupProps & RefAttributes<InlinePopoverPopupElement>>;
|
|
17
|
+
declare const InlinePopoverPopup: ForwardRefExoticComponent<InlinePopoverPopupProps & HTMLAttributes<InlinePopoverPopupElement> & RefAttributes<InlinePopoverPopupElement>>;
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/components/inline-popover/inline-popover-positioner.gen.d.ts
|
|
20
20
|
/**
|
|
@@ -22,7 +22,7 @@ declare const InlinePopoverPopup: ForwardRefExoticComponent<InlinePopoverPopupPr
|
|
|
22
22
|
*
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
|
-
interface InlinePopoverPositionerProps
|
|
25
|
+
interface InlinePopoverPositionerProps {
|
|
26
26
|
/**
|
|
27
27
|
* The initial placement of the floating element
|
|
28
28
|
*
|
|
@@ -155,7 +155,7 @@ interface InlinePopoverPositionerProps extends HTMLAttributes<InlinePopoverPosit
|
|
|
155
155
|
*
|
|
156
156
|
* @public
|
|
157
157
|
*/
|
|
158
|
-
declare const InlinePopoverPositioner: ForwardRefExoticComponent<InlinePopoverPositionerProps & RefAttributes<InlinePopoverPositionerElement>>;
|
|
158
|
+
declare const InlinePopoverPositioner: ForwardRefExoticComponent<InlinePopoverPositionerProps & HTMLAttributes<InlinePopoverPositionerElement> & RefAttributes<InlinePopoverPositionerElement>>;
|
|
159
159
|
//#endregion
|
|
160
160
|
//#region src/components/inline-popover/inline-popover-root.gen.d.ts
|
|
161
161
|
/**
|
|
@@ -163,7 +163,7 @@ declare const InlinePopoverPositioner: ForwardRefExoticComponent<InlinePopoverPo
|
|
|
163
163
|
*
|
|
164
164
|
* @public
|
|
165
165
|
*/
|
|
166
|
-
interface InlinePopoverRootProps
|
|
166
|
+
interface InlinePopoverRootProps {
|
|
167
167
|
/**
|
|
168
168
|
* The ProseKit editor instance.
|
|
169
169
|
*
|
|
@@ -195,7 +195,7 @@ interface InlinePopoverRootProps extends HTMLAttributes<InlinePopoverRootElement
|
|
|
195
195
|
* @default false
|
|
196
196
|
*/
|
|
197
197
|
disabled?: InlinePopoverRootProps$1['disabled'];
|
|
198
|
-
/** */
|
|
198
|
+
/** Emitted when the open state of the popover changes. */
|
|
199
199
|
onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;
|
|
200
200
|
}
|
|
201
201
|
/**
|
|
@@ -203,7 +203,7 @@ interface InlinePopoverRootProps extends HTMLAttributes<InlinePopoverRootElement
|
|
|
203
203
|
*
|
|
204
204
|
* @public
|
|
205
205
|
*/
|
|
206
|
-
declare const InlinePopoverRoot: ForwardRefExoticComponent<InlinePopoverRootProps & RefAttributes<InlinePopoverRootElement>>;
|
|
206
|
+
declare const InlinePopoverRoot: ForwardRefExoticComponent<InlinePopoverRootProps & HTMLAttributes<InlinePopoverRootElement> & RefAttributes<InlinePopoverRootElement>>;
|
|
207
207
|
//#endregion
|
|
208
|
-
export { InlinePopoverPopup, type InlinePopoverPopupProps, InlinePopoverPositioner, type InlinePopoverPositionerProps, InlinePopoverRoot, type
|
|
208
|
+
export { InlinePopoverPopup, type InlinePopoverPopupProps, InlinePopoverPositioner, type InlinePopoverPositionerProps, InlinePopoverRoot, type InlinePopoverRootProps };
|
|
209
209
|
//# sourceMappingURL=prosekit-preact-inline-popover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-preact-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":";;;;;;;;;AA2CA;UA7BiB,uBAAA
|
|
1
|
+
{"version":3,"file":"prosekit-preact-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":";;;;;;;;;AA2CA;UA7BiB,uBAAA;;;;;;cA6BJ,kBAAA,EAAoB,yBAAA,CAA0B,uBAAA,GAA0B,cAAA,CAAe,yBAAA,IAA6B,aAAA,CAAc,yBAAA;;;;;;;AAA/I;UC7BiB,4BAAA;;;;;;EAMf,SAAA,GAAY,8BAAA;EDuBmB;;;;;ECjB/B,MAAA,GAAS,8BAAA;EDiByF;;;;;;ECVlG,IAAA,GAAO,8BAAA;;AAnBT;;;;;EA0BE,KAAA,GAAQ,8BAAA;EAAA;;;;;;EAOR,OAAA,GAAU,8BAAA;EA0CF;;;;;;EAnCR,MAAA,GAAS,8BAAA;EAsFK;;;;;EAhFd,eAAA,GAAkB,8BAAA;EAlCT;;;;;EAwCT,QAAA,GAAW,8BAAA;EAnBD;;;;;;;EA2BV,UAAA,GAAa,8BAAA;EAAA;;;;;;;;EASb,IAAA,GAAO,8BAAA;EA2BP;;;;;EArBA,KAAA,GAAQ,8BAAA;EA2CR;;;;;;EApCA,WAAA,GAAc,8BAAA;EAgF6O;;;;;;EAzE3P,SAAA,GAAY,8BAAA;EAyEwB;;;;;;EAlEpC,UAAA,GAAa,8BAAA;EAkEiI;;;;;;EA3D9I,QAAA,GAAW,8BAAA;ECrGI;;;;;;ED4Gf,YAAA,GAAe,8BAAA;EC7EJ;;;;;;;EDqFX,cAAA,GAAiB,8BAAA;EC/FjB;;;;;;;EDuGA,WAAA,GAAc,8BAAA;AAAA;;;ACnChB;;;cDuEa,uBAAA,EAAyB,yBAAA,CAA0B,4BAAA,GAA+B,cAAA,CAAe,8BAAA,IAAkC,aAAA,CAAc,8BAAA;;;;;;;ADrI9J;UE3BiB,sBAAA;;;;;;;EAOf,MAAA,GAAS,wBAAA;EFoB+C;;;;;;EEbxD,WAAA,GAAc,wBAAA;EFa+H;;;;;;EEN7I,eAAA,GAAkB,wBAAA;EDvByB;;;;EC4B3C,IAAA,GAAO,wBAAA;EDFC;;;;ECOR,QAAA,GAAW,wBAAA;ED2BE;ECzBb,YAAA,IAAgB,KAAA,EAAO,uBAAA;AAAA;;;;;;cAwDZ,iBAAA,EAAmB,yBAAA,CAA0B,sBAAA,GAAyB,cAAA,CAAe,wBAAA,IAA4B,aAAA,CAAc,wBAAA"}
|
|
@@ -2,7 +2,7 @@ import { n as useEditorContext } from "./editor-context.js";
|
|
|
2
2
|
import { createElement } from "preact";
|
|
3
3
|
import { useCallback, useLayoutEffect, useRef } from "preact/hooks";
|
|
4
4
|
import { forwardRef } from "preact/compat";
|
|
5
|
-
import {
|
|
5
|
+
import { registerInlinePopoverPopupElement, registerInlinePopoverPositionerElement, registerInlinePopoverRootElement } from "@prosekit/web/inline-popover";
|
|
6
6
|
//#region src/components/inline-popover/inline-popover-popup.gen.ts
|
|
7
7
|
/**
|
|
8
8
|
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
@@ -128,6 +128,6 @@ function InlinePopoverRootComponent(props, forwardedRef) {
|
|
|
128
128
|
*/
|
|
129
129
|
const InlinePopoverRoot = /* @__PURE__ */ forwardRef(InlinePopoverRootComponent);
|
|
130
130
|
//#endregion
|
|
131
|
-
export { InlinePopoverPopup, InlinePopoverPositioner, InlinePopoverRoot
|
|
131
|
+
export { InlinePopoverPopup, InlinePopoverPositioner, InlinePopoverRoot };
|
|
132
132
|
|
|
133
133
|
//# sourceMappingURL=prosekit-preact-inline-popover.js.map
|