@prosekit/preact 0.7.0-beta.2 → 0.7.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor-context.js +0 -2
- package/dist/editor-context.js.map +1 -1
- package/dist/prosekit-preact-autocomplete.d.ts +22 -73
- package/dist/prosekit-preact-autocomplete.d.ts.map +1 -1
- package/dist/prosekit-preact-autocomplete.js +7 -52
- package/dist/prosekit-preact-autocomplete.js.map +1 -1
- package/dist/prosekit-preact-block-handle.d.ts +22 -73
- package/dist/prosekit-preact-block-handle.d.ts.map +1 -1
- package/dist/prosekit-preact-block-handle.js +7 -52
- package/dist/prosekit-preact-block-handle.js.map +1 -1
- package/dist/prosekit-preact-drop-indicator.d.ts +4 -15
- package/dist/prosekit-preact-drop-indicator.d.ts.map +1 -1
- package/dist/prosekit-preact-drop-indicator.js +1 -10
- package/dist/prosekit-preact-drop-indicator.js.map +1 -1
- package/dist/prosekit-preact-inline-popover.d.ts +15 -46
- package/dist/prosekit-preact-inline-popover.d.ts.map +1 -1
- package/dist/prosekit-preact-inline-popover.js +5 -32
- package/dist/prosekit-preact-inline-popover.js.map +1 -1
- package/dist/prosekit-preact-menu.d.ts +61 -101
- package/dist/prosekit-preact-menu.d.ts.map +1 -1
- package/dist/prosekit-preact-menu.js +39 -74
- package/dist/prosekit-preact-menu.js.map +1 -1
- package/dist/prosekit-preact-popover.d.ts +18 -59
- package/dist/prosekit-preact-popover.d.ts.map +1 -1
- package/dist/prosekit-preact-popover.js +6 -42
- package/dist/prosekit-preact-popover.js.map +1 -1
- package/dist/prosekit-preact-resizable.d.ts +10 -31
- package/dist/prosekit-preact-resizable.d.ts.map +1 -1
- package/dist/prosekit-preact-resizable.js +4 -22
- package/dist/prosekit-preact-resizable.js.map +1 -1
- package/dist/prosekit-preact-table-handle.d.ts +44 -155
- package/dist/prosekit-preact-table-handle.d.ts.map +1 -1
- package/dist/prosekit-preact-table-handle.js +11 -110
- package/dist/prosekit-preact-table-handle.js.map +1 -1
- package/dist/prosekit-preact-tooltip.d.ts +18 -59
- package/dist/prosekit-preact-tooltip.d.ts.map +1 -1
- package/dist/prosekit-preact-tooltip.js +6 -42
- package/dist/prosekit-preact-tooltip.js.map +1 -1
- package/dist/prosekit-preact.d.ts +0 -21
- package/dist/prosekit-preact.d.ts.map +1 -1
- package/dist/prosekit-preact.js +0 -26
- package/dist/prosekit-preact.js.map +1 -1
- package/package.json +5 -5
- package/src/components/autocomplete/autocomplete-empty.gen.ts +5 -15
- package/src/components/autocomplete/autocomplete-item.gen.ts +5 -17
- package/src/components/autocomplete/autocomplete-popup.gen.ts +5 -17
- package/src/components/autocomplete/autocomplete-positioner.gen.ts +5 -15
- package/src/components/autocomplete/autocomplete-root.gen.ts +5 -17
- package/src/components/autocomplete/index.gen.ts +4 -8
- package/src/components/block-handle/block-handle-add.gen.ts +5 -15
- package/src/components/block-handle/block-handle-draggable.gen.ts +5 -15
- package/src/components/block-handle/block-handle-popup.gen.ts +5 -15
- package/src/components/block-handle/block-handle-positioner.gen.ts +5 -15
- package/src/components/block-handle/block-handle-root.gen.ts +5 -17
- package/src/components/block-handle/index.gen.ts +2 -6
- package/src/components/drop-indicator/drop-indicator.gen.ts +5 -15
- package/src/components/drop-indicator/index.gen.ts +1 -3
- package/src/components/inline-popover/index.gen.ts +2 -6
- package/src/components/inline-popover/inline-popover-popup.gen.ts +5 -15
- package/src/components/inline-popover/inline-popover-positioner.gen.ts +5 -15
- package/src/components/inline-popover/inline-popover-root.gen.ts +6 -18
- package/src/components/menu/index.gen.ts +4 -8
- package/src/components/menu/menu-item.gen.ts +5 -17
- package/src/components/menu/menu-popup.gen.ts +5 -15
- package/src/components/menu/menu-positioner.gen.ts +5 -15
- package/src/components/menu/menu-root.gen.ts +5 -17
- package/src/components/menu/menu-submenu-root.gen.ts +50 -18
- package/src/components/menu/menu-submenu-trigger.gen.ts +28 -19
- package/src/components/menu/menu-trigger.gen.ts +5 -17
- package/src/components/popover/index.gen.ts +3 -7
- package/src/components/popover/popover-popup.gen.ts +5 -15
- package/src/components/popover/popover-positioner.gen.ts +5 -15
- package/src/components/popover/popover-root.gen.ts +5 -17
- package/src/components/popover/popover-trigger.gen.ts +5 -17
- package/src/components/resizable/index.gen.ts +2 -6
- package/src/components/resizable/resizable-handle.gen.ts +5 -15
- package/src/components/resizable/resizable-root.gen.ts +5 -17
- package/src/components/table-handle/index.gen.ts +1 -3
- package/src/components/table-handle/table-handle-column-menu-root.gen.ts +5 -15
- package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +5 -15
- package/src/components/table-handle/table-handle-column-popup.gen.ts +5 -15
- package/src/components/table-handle/table-handle-column-positioner.gen.ts +5 -15
- package/src/components/table-handle/table-handle-drag-preview.gen.ts +5 -15
- package/src/components/table-handle/table-handle-drop-indicator.gen.ts +5 -15
- package/src/components/table-handle/table-handle-root.gen.ts +5 -15
- package/src/components/table-handle/table-handle-row-menu-root.gen.ts +5 -15
- package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +5 -15
- package/src/components/table-handle/table-handle-row-popup.gen.ts +5 -15
- package/src/components/table-handle/table-handle-row-positioner.gen.ts +5 -15
- package/src/components/tooltip/index.gen.ts +2 -6
- package/src/components/tooltip/tooltip-popup.gen.ts +5 -15
- package/src/components/tooltip/tooltip-positioner.gen.ts +5 -15
- package/src/components/tooltip/tooltip-root.gen.ts +5 -17
- package/src/components/tooltip/tooltip-trigger.gen.ts +5 -15
package/dist/editor-context.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createContext } from "preact";
|
|
2
2
|
import { useContext } from "preact/hooks";
|
|
3
|
-
//#region src/contexts/editor-context.ts
|
|
4
3
|
const EditorContext = createContext(null);
|
|
5
4
|
/**
|
|
6
5
|
* @internal
|
|
@@ -12,7 +11,6 @@ function useEditorContext() {
|
|
|
12
11
|
* @internal
|
|
13
12
|
*/
|
|
14
13
|
const EditorContextProvider = EditorContext.Provider;
|
|
15
|
-
//#endregion
|
|
16
14
|
export { useEditorContext as n, EditorContextProvider as t };
|
|
17
15
|
|
|
18
16
|
//# sourceMappingURL=editor-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-context.js","names":[],"sources":["../src/contexts/editor-context.ts"],"sourcesContent":["import type { Editor, Extension } from '@prosekit/core'\nimport { createContext, type Provider } from 'preact'\nimport { useContext } from 'preact/hooks'\n\nconst EditorContext = createContext<Editor | null>(null)\n\n/**\n * @internal\n */\nexport function useEditorContext<E extends Extension>(): Editor<E> | null {\n return useContext(EditorContext)\n}\n\n/**\n * @internal\n */\nexport const EditorContextProvider: Provider<Editor | null> = EditorContext.Provider\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor-context.js","names":[],"sources":["../src/contexts/editor-context.ts"],"sourcesContent":["import type { Editor, Extension } from '@prosekit/core'\nimport { createContext, type Provider } from 'preact'\nimport { useContext } from 'preact/hooks'\n\nconst EditorContext = createContext<Editor | null>(null)\n\n/**\n * @internal\n */\nexport function useEditorContext<E extends Extension>(): Editor<E> | null {\n return useContext(EditorContext)\n}\n\n/**\n * @internal\n */\nexport const EditorContextProvider: Provider<Editor | null> = EditorContext.Provider\n"],"mappings":";;AAIA,MAAM,gBAAgB,cAA6B,KAAK;;;;AAKxD,SAAgB,mBAA0D;AACxE,QAAO,WAAW,cAAc;;;;;AAMlC,MAAa,wBAAiD,cAAc"}
|
|
@@ -1,28 +1,12 @@
|
|
|
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
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
interface AutocompleteEmptyProps extends HTMLAttributes<AutocompleteEmptyElement> {}
|
|
12
|
-
/**
|
|
13
|
-
* A Preact component that renders an `prosekit-autocomplete-empty` custom element.
|
|
14
|
-
*
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
|
-
declare const AutocompleteEmpty: ForwardRefExoticComponent<AutocompleteEmptyProps & RefAttributes<AutocompleteEmptyElement>>;
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region src/components/autocomplete/autocomplete-item.gen.d.ts
|
|
20
|
-
/**
|
|
21
|
-
* Props for the {@link AutocompleteItem} Preact component.
|
|
22
|
-
*
|
|
23
|
-
* @public
|
|
24
|
-
*/
|
|
25
|
-
interface AutocompleteItemProps extends Omit<HTMLAttributes<AutocompleteItemElement>, 'onSelect'> {
|
|
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
|
+
/** Props for the {@link AutocompleteEmpty} Preact component. */
|
|
5
|
+
interface AutocompleteEmptyProps {}
|
|
6
|
+
/** A Preact component that renders an `prosekit-autocomplete-empty` custom element. */
|
|
7
|
+
declare const AutocompleteEmpty: ForwardRefExoticComponent<AutocompleteEmptyProps & HTMLAttributes<AutocompleteEmptyElement> & RefAttributes<AutocompleteEmptyElement>>;
|
|
8
|
+
/** Props for the {@link AutocompleteItem} Preact component. */
|
|
9
|
+
interface AutocompleteItemProps {
|
|
26
10
|
/**
|
|
27
11
|
* The value of the item, which will be matched against the query.
|
|
28
12
|
*
|
|
@@ -40,20 +24,10 @@ interface AutocompleteItemProps extends Omit<HTMLAttributes<AutocompleteItemElem
|
|
|
40
24
|
/** Emitted when the the item is selected. */
|
|
41
25
|
onSelect?: (event: AutocompleteItemEvents['select']) => void;
|
|
42
26
|
}
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
*/
|
|
48
|
-
declare const AutocompleteItem: ForwardRefExoticComponent<AutocompleteItemProps & RefAttributes<AutocompleteItemElement>>;
|
|
49
|
-
//#endregion
|
|
50
|
-
//#region src/components/autocomplete/autocomplete-popup.gen.d.ts
|
|
51
|
-
/**
|
|
52
|
-
* Props for the {@link AutocompletePopup} Preact component.
|
|
53
|
-
*
|
|
54
|
-
* @public
|
|
55
|
-
*/
|
|
56
|
-
interface AutocompletePopupProps extends HTMLAttributes<AutocompletePopupElement> {
|
|
27
|
+
/** A Preact component that renders an `prosekit-autocomplete-item` custom element. */
|
|
28
|
+
declare const AutocompleteItem: ForwardRefExoticComponent<AutocompleteItemProps & Omit<HTMLAttributes<AutocompleteItemElement>, 'onSelect'> & RefAttributes<AutocompleteItemElement>>;
|
|
29
|
+
/** Props for the {@link AutocompletePopup} Preact component. */
|
|
30
|
+
interface AutocompletePopupProps {
|
|
57
31
|
/**
|
|
58
32
|
* Emitted when the selected value changes. Only available when multiple is
|
|
59
33
|
* false.
|
|
@@ -65,20 +39,10 @@ interface AutocompletePopupProps extends HTMLAttributes<AutocompletePopupElement
|
|
|
65
39
|
*/
|
|
66
40
|
onValuesChange?: (event: AutocompletePopupEvents['valuesChange']) => void;
|
|
67
41
|
}
|
|
68
|
-
/**
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
*/
|
|
73
|
-
declare const AutocompletePopup: ForwardRefExoticComponent<AutocompletePopupProps & RefAttributes<AutocompletePopupElement>>;
|
|
74
|
-
//#endregion
|
|
75
|
-
//#region src/components/autocomplete/autocomplete-positioner.gen.d.ts
|
|
76
|
-
/**
|
|
77
|
-
* Props for the {@link AutocompletePositioner} Preact component.
|
|
78
|
-
*
|
|
79
|
-
* @public
|
|
80
|
-
*/
|
|
81
|
-
interface AutocompletePositionerProps extends HTMLAttributes<AutocompletePositionerElement> {
|
|
42
|
+
/** A Preact component that renders an `prosekit-autocomplete-popup` custom element. */
|
|
43
|
+
declare const AutocompletePopup: ForwardRefExoticComponent<AutocompletePopupProps & HTMLAttributes<AutocompletePopupElement> & RefAttributes<AutocompletePopupElement>>;
|
|
44
|
+
/** Props for the {@link AutocompletePositioner} Preact component. */
|
|
45
|
+
interface AutocompletePositionerProps {
|
|
82
46
|
/**
|
|
83
47
|
* The placement of the popover, relative to the text cursor.
|
|
84
48
|
*
|
|
@@ -182,20 +146,10 @@ interface AutocompletePositionerProps extends HTMLAttributes<AutocompletePositio
|
|
|
182
146
|
*/
|
|
183
147
|
altBoundary?: AutocompletePositionerProps$1['altBoundary'];
|
|
184
148
|
}
|
|
185
|
-
/**
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
*/
|
|
190
|
-
declare const AutocompletePositioner: ForwardRefExoticComponent<AutocompletePositionerProps & RefAttributes<AutocompletePositionerElement>>;
|
|
191
|
-
//#endregion
|
|
192
|
-
//#region src/components/autocomplete/autocomplete-root.gen.d.ts
|
|
193
|
-
/**
|
|
194
|
-
* Props for the {@link AutocompleteRoot} Preact component.
|
|
195
|
-
*
|
|
196
|
-
* @public
|
|
197
|
-
*/
|
|
198
|
-
interface AutocompleteRootProps extends HTMLAttributes<AutocompleteRootElement> {
|
|
149
|
+
/** A Preact component that renders an `prosekit-autocomplete-positioner` custom element. */
|
|
150
|
+
declare const AutocompletePositioner: ForwardRefExoticComponent<AutocompletePositionerProps & HTMLAttributes<AutocompletePositionerElement> & RefAttributes<AutocompletePositionerElement>>;
|
|
151
|
+
/** Props for the {@link AutocompleteRoot} Preact component. */
|
|
152
|
+
interface AutocompleteRootProps {
|
|
199
153
|
/**
|
|
200
154
|
* The ProseKit editor instance.
|
|
201
155
|
*
|
|
@@ -231,12 +185,7 @@ interface AutocompleteRootProps extends HTMLAttributes<AutocompleteRootElement>
|
|
|
231
185
|
*/
|
|
232
186
|
onValuesChange?: (event: AutocompleteRootEvents['valuesChange']) => void;
|
|
233
187
|
}
|
|
234
|
-
/**
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
* @public
|
|
238
|
-
*/
|
|
239
|
-
declare const AutocompleteRoot: ForwardRefExoticComponent<AutocompleteRootProps & RefAttributes<AutocompleteRootElement>>;
|
|
240
|
-
//#endregion
|
|
241
|
-
export { AutocompleteEmpty, type AutocompleteEmptyProps, AutocompleteItem, type AutocompleteItemEvents, type AutocompleteItemProps, AutocompletePopup, type AutocompletePopupEvents, type AutocompletePopupProps, AutocompletePositioner, type AutocompletePositionerProps, AutocompleteRoot, type AutocompleteRootEvents, type AutocompleteRootProps, OpenChangeEvent, QueryChangeEvent, SelectEvent, ValueChangeEvent, ValuesChangeEvent };
|
|
188
|
+
/** A Preact component that renders an `prosekit-autocomplete-root` custom element. */
|
|
189
|
+
declare const AutocompleteRoot: ForwardRefExoticComponent<AutocompleteRootProps & HTMLAttributes<AutocompleteRootElement> & RefAttributes<AutocompleteRootElement>>;
|
|
190
|
+
export { AutocompleteEmpty, type AutocompleteEmptyProps, AutocompleteItem, type AutocompleteItemProps, AutocompletePopup, type AutocompletePopupProps, AutocompletePositioner, type AutocompletePositionerProps, AutocompleteRoot, type AutocompleteRootProps };
|
|
242
191
|
//# 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":"
|
|
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":";;;;UAQiB,sBAAA;;cAyBJ,iBAAA,EAAmB,yBAAA,CAA0B,sBAAA,GAAyB,cAAA,CAAe,wBAAA,IAA4B,aAAA,CAAc,wBAAA;;UCzB3H,qBAAA;EDAsB;;;;AAyBvC;;;ECjBE,KAAA,GAAQ,uBAAA;EDiBwF;;;;;ECXhG,QAAA,GAAW,uBAAA;EDW4C;ECTvD,QAAA,IAAY,KAAA,EAAO,sBAAA;AAAA;;cAkDR,gBAAA,EAAkB,yBAAA,CAA0B,qBAAA,GAAwB,IAAA,CAAK,cAAA,CAAe,uBAAA,iBAAwC,aAAA,CAAc,uBAAA;;UClE1I,sBAAA;EFAsB;;;;EEKrC,aAAA,IAAiB,KAAA,EAAO,uBAAA;EFoBqM;;;;EEf7N,cAAA,IAAkB,KAAA,EAAO,uBAAA;AAAA;;cAiDd,iBAAA,EAAmB,yBAAA,CAA0B,sBAAA,GAAyB,cAAA,CAAe,wBAAA,IAA4B,aAAA,CAAc,wBAAA;;UC3D3H,2BAAA;EHAsB;;;;AAyBvC;EGnBE,SAAA,GAAY,6BAAA;;;;;;EAMZ,MAAA,GAAS,6BAAA;EHaqB;EGX9B,MAAA,GAAS,6BAAA;EHW8C;EGTvD,KAAA,GAAQ,6BAAA;EHSgD;EGPxD,WAAA,GAAc,6BAAA;EHOkF;EGLhG,QAAA,GAAW,6BAAA;EHK+H;EGH1I,eAAA,GAAkB,6BAAA;EHGgJ;;ACzBpK;;;EE4BE,QAAA,GAAW,6BAAA;EFdA;;;;;;;EEsBX,UAAA,GAAa,6BAAA;EFpBb;;;;;AAkDF;;;EErBE,IAAA,GAAO,6BAAA;EFqB4F;;;;;EEfnG,KAAA,GAAQ,6BAAA;EFe8C;;;;;;EERtD,OAAA,GAAU,6BAAA;EFQiI;;;;;AClE7I;ECiEE,SAAA,GAAY,6BAAA;;;;;;;EAOZ,UAAA,GAAa,6BAAA;ED9DK;;;AAiDpB;;;ECoBE,IAAA,GAAO,6BAAA;EDpByF;;;;;;EC2BhG,YAAA,GAAe,6BAAA;ED3Be;;;;;;;ECmC9B,cAAA,GAAiB,6BAAA;;AA9FnB;;;;;;EAsGE,WAAA,GAAc,6BAAA;AAAA;;cAgCH,sBAAA,EAAwB,yBAAA,CAA0B,2BAAA,GAA8B,cAAA,CAAe,6BAAA,IAAiC,aAAA,CAAc,6BAAA;;UCpI1I,qBAAA;EJFsB;;;;AAyBvC;;EIhBE,MAAA,GAAS,uBAAA;EJgB+C;;;;;EIVxD,KAAA,GAAQ,uBAAA;EJU+C;;;;;;EIHvD,MAAA,GAAS,uBAAA;EJGiI;EID1I,YAAA,IAAgB,KAAA,EAAO,sBAAA;EJC2I;EIClK,aAAA,IAAiB,KAAA,EAAO,sBAAA;EH1BT;;;;EG+Bf,aAAA,IAAiB,KAAA,EAAO,sBAAA;EHfL;;;;EGoBnB,cAAA,IAAkB,KAAA,EAAO,sBAAA;AAAA;;cAoDd,gBAAA,EAAkB,yBAAA,CAA0B,qBAAA,GAAwB,cAAA,CAAe,uBAAA,IAA2B,aAAA,CAAc,uBAAA"}
|
|
@@ -2,11 +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 {
|
|
6
|
-
//#region src/components/autocomplete/autocomplete-empty.gen.ts
|
|
7
|
-
/**
|
|
8
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
9
|
-
*/
|
|
5
|
+
import { registerAutocompleteEmptyElement, registerAutocompleteItemElement, registerAutocompletePopupElement, registerAutocompletePositionerElement, registerAutocompleteRootElement } from "@prosekit/web/autocomplete";
|
|
10
6
|
function AutocompleteEmptyComponent(props, forwardedRef) {
|
|
11
7
|
registerAutocompleteEmptyElement();
|
|
12
8
|
const elementRef = useRef(null);
|
|
@@ -22,17 +18,8 @@ function AutocompleteEmptyComponent(props, forwardedRef) {
|
|
|
22
18
|
suppressHydrationWarning: true
|
|
23
19
|
});
|
|
24
20
|
}
|
|
25
|
-
/**
|
|
26
|
-
* A Preact component that renders an `prosekit-autocomplete-empty` custom element.
|
|
27
|
-
*
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
21
|
+
/** A Preact component that renders an `prosekit-autocomplete-empty` custom element. */
|
|
30
22
|
const AutocompleteEmpty = /* @__PURE__ */ forwardRef(AutocompleteEmptyComponent);
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/components/autocomplete/autocomplete-item.gen.ts
|
|
33
|
-
/**
|
|
34
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
35
|
-
*/
|
|
36
23
|
function AutocompleteItemComponent(props, forwardedRef) {
|
|
37
24
|
registerAutocompleteItemElement();
|
|
38
25
|
const elementRef = useRef(null);
|
|
@@ -67,17 +54,8 @@ function AutocompleteItemComponent(props, forwardedRef) {
|
|
|
67
54
|
suppressHydrationWarning: true
|
|
68
55
|
});
|
|
69
56
|
}
|
|
70
|
-
/**
|
|
71
|
-
* A Preact component that renders an `prosekit-autocomplete-item` custom element.
|
|
72
|
-
*
|
|
73
|
-
* @public
|
|
74
|
-
*/
|
|
57
|
+
/** A Preact component that renders an `prosekit-autocomplete-item` custom element. */
|
|
75
58
|
const AutocompleteItem = /* @__PURE__ */ forwardRef(AutocompleteItemComponent);
|
|
76
|
-
//#endregion
|
|
77
|
-
//#region src/components/autocomplete/autocomplete-popup.gen.ts
|
|
78
|
-
/**
|
|
79
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
80
|
-
*/
|
|
81
59
|
function AutocompletePopupComponent(props, forwardedRef) {
|
|
82
60
|
registerAutocompletePopupElement();
|
|
83
61
|
const elementRef = useRef(null);
|
|
@@ -107,17 +85,8 @@ function AutocompletePopupComponent(props, forwardedRef) {
|
|
|
107
85
|
suppressHydrationWarning: true
|
|
108
86
|
});
|
|
109
87
|
}
|
|
110
|
-
/**
|
|
111
|
-
* A Preact component that renders an `prosekit-autocomplete-popup` custom element.
|
|
112
|
-
*
|
|
113
|
-
* @public
|
|
114
|
-
*/
|
|
88
|
+
/** A Preact component that renders an `prosekit-autocomplete-popup` custom element. */
|
|
115
89
|
const AutocompletePopup = /* @__PURE__ */ forwardRef(AutocompletePopupComponent);
|
|
116
|
-
//#endregion
|
|
117
|
-
//#region src/components/autocomplete/autocomplete-positioner.gen.ts
|
|
118
|
-
/**
|
|
119
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
120
|
-
*/
|
|
121
90
|
function AutocompletePositionerComponent(props, forwardedRef) {
|
|
122
91
|
registerAutocompletePositionerElement();
|
|
123
92
|
const elementRef = useRef(null);
|
|
@@ -157,17 +126,8 @@ function AutocompletePositionerComponent(props, forwardedRef) {
|
|
|
157
126
|
suppressHydrationWarning: true
|
|
158
127
|
});
|
|
159
128
|
}
|
|
160
|
-
/**
|
|
161
|
-
* A Preact component that renders an `prosekit-autocomplete-positioner` custom element.
|
|
162
|
-
*
|
|
163
|
-
* @public
|
|
164
|
-
*/
|
|
129
|
+
/** A Preact component that renders an `prosekit-autocomplete-positioner` custom element. */
|
|
165
130
|
const AutocompletePositioner = /* @__PURE__ */ forwardRef(AutocompletePositionerComponent);
|
|
166
|
-
//#endregion
|
|
167
|
-
//#region src/components/autocomplete/autocomplete-root.gen.ts
|
|
168
|
-
/**
|
|
169
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
170
|
-
*/
|
|
171
131
|
function AutocompleteRootComponent(props, forwardedRef) {
|
|
172
132
|
registerAutocompleteRootElement();
|
|
173
133
|
const elementRef = useRef(null);
|
|
@@ -214,13 +174,8 @@ function AutocompleteRootComponent(props, forwardedRef) {
|
|
|
214
174
|
suppressHydrationWarning: true
|
|
215
175
|
});
|
|
216
176
|
}
|
|
217
|
-
/**
|
|
218
|
-
* A Preact component that renders an `prosekit-autocomplete-root` custom element.
|
|
219
|
-
*
|
|
220
|
-
* @public
|
|
221
|
-
*/
|
|
177
|
+
/** A Preact component that renders an `prosekit-autocomplete-root` custom element. */
|
|
222
178
|
const AutocompleteRoot = /* @__PURE__ */ forwardRef(AutocompleteRootComponent);
|
|
223
|
-
|
|
224
|
-
export { AutocompleteEmpty, AutocompleteItem, AutocompletePopup, AutocompletePositioner, AutocompleteRoot, OpenChangeEvent, QueryChangeEvent, SelectEvent, ValueChangeEvent, ValuesChangeEvent };
|
|
179
|
+
export { AutocompleteEmpty, AutocompleteItem, AutocompletePopup, AutocompletePositioner, AutocompleteRoot };
|
|
225
180
|
|
|
226
181
|
//# 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;;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AAM,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":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link AutocompleteEmpty} Preact component. */\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/** A Preact component that renders an `prosekit-autocomplete-empty` custom element. */\nexport const AutocompleteEmpty: ForwardRefExoticComponent<AutocompleteEmptyProps & HTMLAttributes<AutocompleteEmptyElement> & RefAttributes<AutocompleteEmptyElement>> = /* @__PURE__ */ forwardRef(AutocompleteEmptyComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link AutocompleteItem} Preact component. */\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/** A Preact component that renders an `prosekit-autocomplete-item` custom element. */\nexport const AutocompleteItem: ForwardRefExoticComponent<AutocompleteItemProps & Omit<HTMLAttributes<AutocompleteItemElement>, 'onSelect'> & RefAttributes<AutocompleteItemElement>> = /* @__PURE__ */ forwardRef(AutocompleteItemComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link AutocompletePopup} Preact component. */\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/** A Preact component that renders an `prosekit-autocomplete-popup` custom element. */\nexport const AutocompletePopup: ForwardRefExoticComponent<AutocompletePopupProps & HTMLAttributes<AutocompletePopupElement> & RefAttributes<AutocompletePopupElement>> = /* @__PURE__ */ forwardRef(AutocompletePopupComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link AutocompletePositioner} Preact component. */\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/** A Preact component that renders an `prosekit-autocomplete-positioner` custom element. */\nexport const AutocompletePositioner: ForwardRefExoticComponent<AutocompletePositionerProps & HTMLAttributes<AutocompletePositionerElement> & RefAttributes<AutocompletePositionerElement>> = /* @__PURE__ */ forwardRef(AutocompletePositionerComponent);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link AutocompleteRoot} Preact component. */\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/** A Preact component that renders an `prosekit-autocomplete-root` custom element. */\nexport const AutocompleteRoot: ForwardRefExoticComponent<AutocompleteRootProps & HTMLAttributes<AutocompleteRootElement> & RefAttributes<AutocompleteRootElement>> = /* @__PURE__ */ forwardRef(AutocompleteRootComponent);\n"],"m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Q,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;;;AAItH,MAAa,mBAAwK,2BAAW,0BAA0B"}
|
|
@@ -1,14 +1,8 @@
|
|
|
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
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Props for the {@link BlockHandleAdd} Preact component.
|
|
8
|
-
*
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
interface BlockHandleAddProps extends HTMLAttributes<BlockHandleAddElement> {
|
|
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
|
+
/** Props for the {@link BlockHandleAdd} Preact component. */
|
|
5
|
+
interface BlockHandleAddProps {
|
|
12
6
|
/**
|
|
13
7
|
* The ProseKit editor instance.
|
|
14
8
|
*
|
|
@@ -17,20 +11,10 @@ interface BlockHandleAddProps extends HTMLAttributes<BlockHandleAddElement> {
|
|
|
17
11
|
*/
|
|
18
12
|
editor?: BlockHandleAddProps$1['editor'];
|
|
19
13
|
}
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*/
|
|
25
|
-
declare const BlockHandleAdd: ForwardRefExoticComponent<BlockHandleAddProps & RefAttributes<BlockHandleAddElement>>;
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region src/components/block-handle/block-handle-draggable.gen.d.ts
|
|
28
|
-
/**
|
|
29
|
-
* Props for the {@link BlockHandleDraggable} Preact component.
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
|
-
*/
|
|
33
|
-
interface BlockHandleDraggableProps extends HTMLAttributes<BlockHandleDraggableElement> {
|
|
14
|
+
/** A Preact component that renders an `prosekit-block-handle-add` custom element. */
|
|
15
|
+
declare const BlockHandleAdd: ForwardRefExoticComponent<BlockHandleAddProps & HTMLAttributes<BlockHandleAddElement> & RefAttributes<BlockHandleAddElement>>;
|
|
16
|
+
/** Props for the {@link BlockHandleDraggable} Preact component. */
|
|
17
|
+
interface BlockHandleDraggableProps {
|
|
34
18
|
/**
|
|
35
19
|
* The ProseKit editor instance.
|
|
36
20
|
*
|
|
@@ -39,34 +23,14 @@ interface BlockHandleDraggableProps extends HTMLAttributes<BlockHandleDraggableE
|
|
|
39
23
|
*/
|
|
40
24
|
editor?: BlockHandleDraggableProps$1['editor'];
|
|
41
25
|
}
|
|
42
|
-
/**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
*/
|
|
47
|
-
declare const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Props for the {@link BlockHandlePopup} Preact component.
|
|
52
|
-
*
|
|
53
|
-
* @public
|
|
54
|
-
*/
|
|
55
|
-
interface BlockHandlePopupProps extends HTMLAttributes<BlockHandlePopupElement> {}
|
|
56
|
-
/**
|
|
57
|
-
* A Preact component that renders an `prosekit-block-handle-popup` custom element.
|
|
58
|
-
*
|
|
59
|
-
* @public
|
|
60
|
-
*/
|
|
61
|
-
declare const BlockHandlePopup: ForwardRefExoticComponent<BlockHandlePopupProps & RefAttributes<BlockHandlePopupElement>>;
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region src/components/block-handle/block-handle-positioner.gen.d.ts
|
|
64
|
-
/**
|
|
65
|
-
* Props for the {@link BlockHandlePositioner} Preact component.
|
|
66
|
-
*
|
|
67
|
-
* @public
|
|
68
|
-
*/
|
|
69
|
-
interface BlockHandlePositionerProps extends HTMLAttributes<BlockHandlePositionerElement> {
|
|
26
|
+
/** A Preact component that renders an `prosekit-block-handle-draggable` custom element. */
|
|
27
|
+
declare const BlockHandleDraggable: ForwardRefExoticComponent<BlockHandleDraggableProps & HTMLAttributes<BlockHandleDraggableElement> & RefAttributes<BlockHandleDraggableElement>>;
|
|
28
|
+
/** Props for the {@link BlockHandlePopup} Preact component. */
|
|
29
|
+
interface BlockHandlePopupProps {}
|
|
30
|
+
/** A Preact component that renders an `prosekit-block-handle-popup` custom element. */
|
|
31
|
+
declare const BlockHandlePopup: ForwardRefExoticComponent<BlockHandlePopupProps & HTMLAttributes<BlockHandlePopupElement> & RefAttributes<BlockHandlePopupElement>>;
|
|
32
|
+
/** Props for the {@link BlockHandlePositioner} Preact component. */
|
|
33
|
+
interface BlockHandlePositionerProps {
|
|
70
34
|
/**
|
|
71
35
|
* The placement of the popover, relative to the hovered block.
|
|
72
36
|
*
|
|
@@ -188,20 +152,10 @@ interface BlockHandlePositionerProps extends HTMLAttributes<BlockHandlePositione
|
|
|
188
152
|
*/
|
|
189
153
|
altBoundary?: BlockHandlePositionerProps$1['altBoundary'];
|
|
190
154
|
}
|
|
191
|
-
/**
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
*/
|
|
196
|
-
declare const BlockHandlePositioner: ForwardRefExoticComponent<BlockHandlePositionerProps & RefAttributes<BlockHandlePositionerElement>>;
|
|
197
|
-
//#endregion
|
|
198
|
-
//#region src/components/block-handle/block-handle-root.gen.d.ts
|
|
199
|
-
/**
|
|
200
|
-
* Props for the {@link BlockHandleRoot} Preact component.
|
|
201
|
-
*
|
|
202
|
-
* @public
|
|
203
|
-
*/
|
|
204
|
-
interface BlockHandleRootProps extends HTMLAttributes<BlockHandleRootElement> {
|
|
155
|
+
/** A Preact component that renders an `prosekit-block-handle-positioner` custom element. */
|
|
156
|
+
declare const BlockHandlePositioner: ForwardRefExoticComponent<BlockHandlePositionerProps & HTMLAttributes<BlockHandlePositionerElement> & RefAttributes<BlockHandlePositionerElement>>;
|
|
157
|
+
/** Props for the {@link BlockHandleRoot} Preact component. */
|
|
158
|
+
interface BlockHandleRootProps {
|
|
205
159
|
/**
|
|
206
160
|
* The ProseKit editor instance.
|
|
207
161
|
*
|
|
@@ -212,12 +166,7 @@ interface BlockHandleRootProps extends HTMLAttributes<BlockHandleRootElement> {
|
|
|
212
166
|
/** Fired when the hovered block changes. */
|
|
213
167
|
onStateChange?: (event: BlockHandleRootEvents['stateChange']) => void;
|
|
214
168
|
}
|
|
215
|
-
/**
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
* @public
|
|
219
|
-
*/
|
|
220
|
-
declare const BlockHandleRoot: ForwardRefExoticComponent<BlockHandleRootProps & RefAttributes<BlockHandleRootElement>>;
|
|
221
|
-
//#endregion
|
|
222
|
-
export { BlockHandleAdd, type BlockHandleAddProps, BlockHandleDraggable, type BlockHandleDraggableProps, BlockHandlePopup, type BlockHandlePopupProps, BlockHandlePositioner, type BlockHandlePositionerProps, BlockHandleRoot, type BlockHandleRootEvents, type BlockHandleRootProps, BlockHandleStateChangeEvent };
|
|
169
|
+
/** A Preact component that renders an `prosekit-block-handle-root` custom element. */
|
|
170
|
+
declare const BlockHandleRoot: ForwardRefExoticComponent<BlockHandleRootProps & HTMLAttributes<BlockHandleRootElement> & RefAttributes<BlockHandleRootElement>>;
|
|
171
|
+
export { BlockHandleAdd, type BlockHandleAddProps, BlockHandleDraggable, type BlockHandleDraggableProps, BlockHandlePopup, type BlockHandlePopupProps, BlockHandlePositioner, type BlockHandlePositionerProps, BlockHandleRoot, type BlockHandleRootProps };
|
|
223
172
|
//# 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/block-handle-root.gen.ts"],"mappings":";;;;UAUiB,mBAAA;EAAmB;;;;AAyCpC;;EAlCE,MAAA,GAAS,qBAAA;AAAA;;cAkCE,cAAA,EAAgB,yBAAA,CAA0B,mBAAA,GAAsB,cAAA,CAAe,qBAAA,IAAyB,aAAA,CAAc,qBAAA;;UCzClH,yBAAA;EDAmB;;;;AAyCpC;;EClCE,MAAA,GAAS,2BAAA;AAAA;;cAkCE,oBAAA,EAAsB,yBAAA,CAA0B,yBAAA,GAA4B,cAAA,CAAe,2BAAA,IAA+B,aAAA,CAAc,2BAAA;;UC3CpI,qBAAA;;cAyBJ,gBAAA,EAAkB,yBAAA,CAA0B,qBAAA,GAAwB,cAAA,CAAe,uBAAA,IAA2B,aAAA,CAAc,uBAAA;;UCzBxH,0BAAA;EHEmB;;;;AAyCpC;EGrCE,SAAA,GAAY,4BAAA;;;;;;;EAOZ,KAAA,GAAQ,4BAAA;EH8B4C;;;;EGzBpD,IAAA,GAAO,4BAAA;EHyBmF;;;;EGpB1F,KAAA,GAAQ,4BAAA;;AFrBV;;;EE0BE,IAAA,GAAO,4BAAA;EFnBkC;AAkC3C;;;;EETE,QAAA,GAAW,4BAAA;EFS4E;;;;;;;EEDvF,UAAA,GAAa,4BAAA;EFC0E;;;;;EEKvF,MAAA,GAAS,4BAAA;;ADhDX;;;;;ECuDE,OAAA,GAAU,4BAAA;ED9B8M;;;;;;ECqCxN,WAAA,GAAc,4BAAA;EDrCe;;;;;;EC4C7B,SAAA,GAAY,4BAAA;ED5C6G;;;;;ACzB3H;EA4EE,UAAA,GAAa,4BAAA;;;;;;;EAOb,MAAA,GAAS,4BAAA;EAzCI;;;;;;EAgDb,QAAA,GAAW,4BAAA;EAAA;;;;;;EAOX,YAAA,GAAe,4BAAA;EA3Ff;;;;;;EAkGA,eAAA,GAAkB,4BAAA;EAjFV;;;;;;;EAyFR,cAAA,GAAiB,4BAAA;EAhER;;;;;;;EAwET,WAAA,GAAc,4BAAA;AAAA;;cAgCH,qBAAA,EAAuB,yBAAA,CAA0B,0BAAA,GAA6B,cAAA,CAAe,4BAAA,IAAgC,aAAA,CAAc,4BAAA;;UCtJvI,oBAAA;EJAmB;;;;AAyCpC;;EIlCE,MAAA,GAAS,sBAAA;EJkC4C;EIhCrD,aAAA,IAAiB,KAAA,EAAO,qBAAA;AAAA;;cAoDb,eAAA,EAAiB,yBAAA,CAA0B,oBAAA,GAAuB,cAAA,CAAe,sBAAA,IAA0B,aAAA,CAAc,sBAAA"}
|
|
@@ -2,11 +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 {
|
|
6
|
-
//#region src/components/block-handle/block-handle-add.gen.ts
|
|
7
|
-
/**
|
|
8
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
9
|
-
*/
|
|
5
|
+
import { registerBlockHandleAddElement, registerBlockHandleDraggableElement, registerBlockHandlePopupElement, registerBlockHandlePositionerElement, registerBlockHandleRootElement } from "@prosekit/web/block-handle";
|
|
10
6
|
function BlockHandleAddComponent(props, forwardedRef) {
|
|
11
7
|
registerBlockHandleAddElement();
|
|
12
8
|
const elementRef = useRef(null);
|
|
@@ -28,17 +24,8 @@ function BlockHandleAddComponent(props, forwardedRef) {
|
|
|
28
24
|
suppressHydrationWarning: true
|
|
29
25
|
});
|
|
30
26
|
}
|
|
31
|
-
/**
|
|
32
|
-
* A Preact component that renders an `prosekit-block-handle-add` custom element.
|
|
33
|
-
*
|
|
34
|
-
* @public
|
|
35
|
-
*/
|
|
27
|
+
/** A Preact component that renders an `prosekit-block-handle-add` custom element. */
|
|
36
28
|
const BlockHandleAdd = /* @__PURE__ */ forwardRef(BlockHandleAddComponent);
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region src/components/block-handle/block-handle-draggable.gen.ts
|
|
39
|
-
/**
|
|
40
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
41
|
-
*/
|
|
42
29
|
function BlockHandleDraggableComponent(props, forwardedRef) {
|
|
43
30
|
registerBlockHandleDraggableElement();
|
|
44
31
|
const elementRef = useRef(null);
|
|
@@ -60,17 +47,8 @@ function BlockHandleDraggableComponent(props, forwardedRef) {
|
|
|
60
47
|
suppressHydrationWarning: true
|
|
61
48
|
});
|
|
62
49
|
}
|
|
63
|
-
/**
|
|
64
|
-
* A Preact component that renders an `prosekit-block-handle-draggable` custom element.
|
|
65
|
-
*
|
|
66
|
-
* @public
|
|
67
|
-
*/
|
|
50
|
+
/** A Preact component that renders an `prosekit-block-handle-draggable` custom element. */
|
|
68
51
|
const BlockHandleDraggable = /* @__PURE__ */ forwardRef(BlockHandleDraggableComponent);
|
|
69
|
-
//#endregion
|
|
70
|
-
//#region src/components/block-handle/block-handle-popup.gen.ts
|
|
71
|
-
/**
|
|
72
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
73
|
-
*/
|
|
74
52
|
function BlockHandlePopupComponent(props, forwardedRef) {
|
|
75
53
|
registerBlockHandlePopupElement();
|
|
76
54
|
const elementRef = useRef(null);
|
|
@@ -86,17 +64,8 @@ function BlockHandlePopupComponent(props, forwardedRef) {
|
|
|
86
64
|
suppressHydrationWarning: true
|
|
87
65
|
});
|
|
88
66
|
}
|
|
89
|
-
/**
|
|
90
|
-
* A Preact component that renders an `prosekit-block-handle-popup` custom element.
|
|
91
|
-
*
|
|
92
|
-
* @public
|
|
93
|
-
*/
|
|
67
|
+
/** A Preact component that renders an `prosekit-block-handle-popup` custom element. */
|
|
94
68
|
const BlockHandlePopup = /* @__PURE__ */ forwardRef(BlockHandlePopupComponent);
|
|
95
|
-
//#endregion
|
|
96
|
-
//#region src/components/block-handle/block-handle-positioner.gen.ts
|
|
97
|
-
/**
|
|
98
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
99
|
-
*/
|
|
100
69
|
function BlockHandlePositionerComponent(props, forwardedRef) {
|
|
101
70
|
registerBlockHandlePositionerElement();
|
|
102
71
|
const elementRef = useRef(null);
|
|
@@ -136,17 +105,8 @@ function BlockHandlePositionerComponent(props, forwardedRef) {
|
|
|
136
105
|
suppressHydrationWarning: true
|
|
137
106
|
});
|
|
138
107
|
}
|
|
139
|
-
/**
|
|
140
|
-
* A Preact component that renders an `prosekit-block-handle-positioner` custom element.
|
|
141
|
-
*
|
|
142
|
-
* @public
|
|
143
|
-
*/
|
|
108
|
+
/** A Preact component that renders an `prosekit-block-handle-positioner` custom element. */
|
|
144
109
|
const BlockHandlePositioner = /* @__PURE__ */ forwardRef(BlockHandlePositionerComponent);
|
|
145
|
-
//#endregion
|
|
146
|
-
//#region src/components/block-handle/block-handle-root.gen.ts
|
|
147
|
-
/**
|
|
148
|
-
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
149
|
-
*/
|
|
150
110
|
function BlockHandleRootComponent(props, forwardedRef) {
|
|
151
111
|
registerBlockHandleRootElement();
|
|
152
112
|
const elementRef = useRef(null);
|
|
@@ -179,13 +139,8 @@ function BlockHandleRootComponent(props, forwardedRef) {
|
|
|
179
139
|
suppressHydrationWarning: true
|
|
180
140
|
});
|
|
181
141
|
}
|
|
182
|
-
/**
|
|
183
|
-
* A Preact component that renders an `prosekit-block-handle-root` custom element.
|
|
184
|
-
*
|
|
185
|
-
* @public
|
|
186
|
-
*/
|
|
142
|
+
/** A Preact component that renders an `prosekit-block-handle-root` custom element. */
|
|
187
143
|
const BlockHandleRoot = /* @__PURE__ */ forwardRef(BlockHandleRootComponent);
|
|
188
|
-
|
|
189
|
-
export { BlockHandleAdd, BlockHandleDraggable, BlockHandlePopup, BlockHandlePositioner, BlockHandleRoot, BlockHandleStateChangeEvent };
|
|
144
|
+
export { BlockHandleAdd, BlockHandleDraggable, BlockHandlePopup, BlockHandlePositioner, BlockHandleRoot };
|
|
190
145
|
|
|
191
146
|
//# sourceMappingURL=prosekit-preact-block-handle.js.map
|