@prosekit/react 0.7.0-beta.3 → 0.7.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/editor-context.js +0 -2
  2. package/dist/editor-context.js.map +1 -1
  3. package/dist/prosekit-react-autocomplete.d.ts +10 -61
  4. package/dist/prosekit-react-autocomplete.d.ts.map +1 -1
  5. package/dist/prosekit-react-autocomplete.js +30 -49
  6. package/dist/prosekit-react-autocomplete.js.map +1 -1
  7. package/dist/prosekit-react-block-handle.d.ts +10 -61
  8. package/dist/prosekit-react-block-handle.d.ts.map +1 -1
  9. package/dist/prosekit-react-block-handle.js +30 -49
  10. package/dist/prosekit-react-block-handle.js.map +1 -1
  11. package/dist/prosekit-react-drop-indicator.d.ts +2 -13
  12. package/dist/prosekit-react-drop-indicator.d.ts.map +1 -1
  13. package/dist/prosekit-react-drop-indicator.js +13 -9
  14. package/dist/prosekit-react-drop-indicator.js.map +1 -1
  15. package/dist/prosekit-react-inline-popover.d.ts +6 -37
  16. package/dist/prosekit-react-inline-popover.d.ts.map +1 -1
  17. package/dist/prosekit-react-inline-popover.js +23 -29
  18. package/dist/prosekit-react-inline-popover.js.map +1 -1
  19. package/dist/prosekit-react-menu.d.ts +48 -88
  20. package/dist/prosekit-react-menu.d.ts.map +1 -1
  21. package/dist/prosekit-react-menu.js +72 -71
  22. package/dist/prosekit-react-menu.js.map +1 -1
  23. package/dist/prosekit-react-popover.d.ts +8 -49
  24. package/dist/prosekit-react-popover.d.ts.map +1 -1
  25. package/dist/prosekit-react-popover.js +26 -39
  26. package/dist/prosekit-react-popover.js.map +1 -1
  27. package/dist/prosekit-react-resizable.d.ts +4 -25
  28. package/dist/prosekit-react-resizable.d.ts.map +1 -1
  29. package/dist/prosekit-react-resizable.js +20 -19
  30. package/dist/prosekit-react-resizable.js.map +1 -1
  31. package/dist/prosekit-react-table-handle.d.ts +22 -133
  32. package/dist/prosekit-react-table-handle.d.ts.map +1 -1
  33. package/dist/prosekit-react-table-handle.js +67 -109
  34. package/dist/prosekit-react-table-handle.js.map +1 -1
  35. package/dist/prosekit-react-tooltip.d.ts +8 -49
  36. package/dist/prosekit-react-tooltip.d.ts.map +1 -1
  37. package/dist/prosekit-react-tooltip.js +26 -39
  38. package/dist/prosekit-react-tooltip.js.map +1 -1
  39. package/dist/prosekit-react.d.ts +0 -21
  40. package/dist/prosekit-react.d.ts.map +1 -1
  41. package/dist/prosekit-react.js +1 -26
  42. package/dist/prosekit-react.js.map +1 -1
  43. package/package.json +4 -4
  44. package/src/components/autocomplete/autocomplete-empty.gen.ts +3 -13
  45. package/src/components/autocomplete/autocomplete-item.gen.ts +3 -13
  46. package/src/components/autocomplete/autocomplete-popup.gen.ts +3 -13
  47. package/src/components/autocomplete/autocomplete-positioner.gen.ts +3 -13
  48. package/src/components/autocomplete/autocomplete-root.gen.ts +3 -13
  49. package/src/components/autocomplete/index.gen.ts +1 -3
  50. package/src/components/autocomplete/index.ts +2 -0
  51. package/src/components/block-handle/block-handle-add.gen.ts +3 -13
  52. package/src/components/block-handle/block-handle-draggable.gen.ts +3 -13
  53. package/src/components/block-handle/block-handle-popup.gen.ts +3 -13
  54. package/src/components/block-handle/block-handle-positioner.gen.ts +3 -13
  55. package/src/components/block-handle/block-handle-root.gen.ts +3 -13
  56. package/src/components/block-handle/index.gen.ts +1 -3
  57. package/src/components/block-handle/index.ts +2 -0
  58. package/src/components/drop-indicator/drop-indicator.gen.ts +3 -13
  59. package/src/components/drop-indicator/index.gen.ts +1 -3
  60. package/src/components/drop-indicator/index.ts +2 -0
  61. package/src/components/inline-popover/index.gen.ts +1 -3
  62. package/src/components/inline-popover/index.ts +2 -0
  63. package/src/components/inline-popover/inline-popover-popup.gen.ts +3 -13
  64. package/src/components/inline-popover/inline-popover-positioner.gen.ts +3 -13
  65. package/src/components/inline-popover/inline-popover-root.gen.ts +3 -13
  66. package/src/components/menu/index.gen.ts +1 -3
  67. package/src/components/menu/index.ts +2 -0
  68. package/src/components/menu/menu-item.gen.ts +3 -13
  69. package/src/components/menu/menu-popup.gen.ts +3 -13
  70. package/src/components/menu/menu-positioner.gen.ts +3 -13
  71. package/src/components/menu/menu-root.gen.ts +3 -13
  72. package/src/components/menu/menu-submenu-root.gen.ts +49 -17
  73. package/src/components/menu/menu-submenu-trigger.gen.ts +28 -19
  74. package/src/components/menu/menu-trigger.gen.ts +3 -13
  75. package/src/components/popover/index.gen.ts +1 -3
  76. package/src/components/popover/index.ts +2 -0
  77. package/src/components/popover/popover-popup.gen.ts +3 -13
  78. package/src/components/popover/popover-positioner.gen.ts +3 -13
  79. package/src/components/popover/popover-root.gen.ts +3 -13
  80. package/src/components/popover/popover-trigger.gen.ts +3 -13
  81. package/src/components/resizable/index.gen.ts +1 -3
  82. package/src/components/resizable/index.ts +2 -0
  83. package/src/components/resizable/resizable-handle.gen.ts +3 -13
  84. package/src/components/resizable/resizable-root.gen.ts +3 -13
  85. package/src/components/table-handle/index.gen.ts +1 -3
  86. package/src/components/table-handle/index.ts +2 -0
  87. package/src/components/table-handle/table-handle-column-menu-root.gen.ts +3 -13
  88. package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +3 -13
  89. package/src/components/table-handle/table-handle-column-popup.gen.ts +3 -13
  90. package/src/components/table-handle/table-handle-column-positioner.gen.ts +3 -13
  91. package/src/components/table-handle/table-handle-drag-preview.gen.ts +3 -13
  92. package/src/components/table-handle/table-handle-drop-indicator.gen.ts +3 -13
  93. package/src/components/table-handle/table-handle-root.gen.ts +3 -13
  94. package/src/components/table-handle/table-handle-row-menu-root.gen.ts +3 -13
  95. package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +3 -13
  96. package/src/components/table-handle/table-handle-row-popup.gen.ts +3 -13
  97. package/src/components/table-handle/table-handle-row-positioner.gen.ts +3 -13
  98. package/src/components/tooltip/index.gen.ts +1 -3
  99. package/src/components/tooltip/index.ts +2 -0
  100. package/src/components/tooltip/tooltip-popup.gen.ts +3 -13
  101. package/src/components/tooltip/tooltip-positioner.gen.ts +3 -13
  102. package/src/components/tooltip/tooltip-root.gen.ts +3 -13
  103. package/src/components/tooltip/tooltip-trigger.gen.ts +3 -13
  104. package/src/index.ts +2 -0
@@ -1,5 +1,4 @@
1
1
  import { createContext, useContext } from "react";
2
- //#region src/contexts/editor-context.ts
3
2
  const EditorContext = createContext(null);
4
3
  /**
5
4
  * @internal
@@ -11,7 +10,6 @@ function useEditorContext() {
11
10
  * @internal
12
11
  */
13
12
  const EditorContextProvider = EditorContext.Provider;
14
- //#endregion
15
13
  export { useEditorContext as n, EditorContextProvider as t };
16
14
 
17
15
  //# 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, useContext, type Provider } from 'react'\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":";;AAGA,MAAM,gBAAgB,cAA6B,KAAK;;;;AAKxD,SAAgB,mBAA0D;AACxE,QAAO,WAAW,cAAc;;;;;AAMlC,MAAa,wBAAiD,cAAc"}
1
+ {"version":3,"file":"editor-context.js","names":[],"sources":["../src/contexts/editor-context.ts"],"sourcesContent":["import type { Editor, Extension } from '@prosekit/core'\nimport { createContext, useContext, type Provider } from 'react'\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":";AAGA,MAAM,gBAAgB,cAA6B,KAAK;;;;AAKxD,SAAgB,mBAA0D;AACxE,QAAO,WAAW,cAAc;;;;;AAMlC,MAAa,wBAAiD,cAAc"}
@@ -1,26 +1,10 @@
1
1
  import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "react";
2
2
  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";
3
-
4
- //#region src/components/autocomplete/autocomplete-empty.gen.d.ts
5
- /**
6
- * Props for the {@link AutocompleteEmpty} React component.
7
- *
8
- * @public
9
- */
3
+ /** Props for the {@link AutocompleteEmpty} React component. */
10
4
  interface AutocompleteEmptyProps {}
11
- /**
12
- * A React component that renders an `prosekit-autocomplete-empty` custom element.
13
- *
14
- * @public
15
- */
5
+ /** A React component that renders an `prosekit-autocomplete-empty` custom element. */
16
6
  declare const AutocompleteEmpty: ForwardRefExoticComponent<AutocompleteEmptyProps & HTMLAttributes<AutocompleteEmptyElement> & RefAttributes<AutocompleteEmptyElement>>;
17
- //#endregion
18
- //#region src/components/autocomplete/autocomplete-item.gen.d.ts
19
- /**
20
- * Props for the {@link AutocompleteItem} React component.
21
- *
22
- * @public
23
- */
7
+ /** Props for the {@link AutocompleteItem} React component. */
24
8
  interface AutocompleteItemProps {
25
9
  /**
26
10
  * The value of the item, which will be matched against the query.
@@ -39,19 +23,9 @@ interface AutocompleteItemProps {
39
23
  /** Emitted when the the item is selected. */
40
24
  onSelect?: (event: AutocompleteItemEvents['select']) => void;
41
25
  }
42
- /**
43
- * A React component that renders an `prosekit-autocomplete-item` custom element.
44
- *
45
- * @public
46
- */
26
+ /** A React component that renders an `prosekit-autocomplete-item` custom element. */
47
27
  declare const AutocompleteItem: ForwardRefExoticComponent<AutocompleteItemProps & Omit<HTMLAttributes<AutocompleteItemElement>, 'onSelect'> & RefAttributes<AutocompleteItemElement>>;
48
- //#endregion
49
- //#region src/components/autocomplete/autocomplete-popup.gen.d.ts
50
- /**
51
- * Props for the {@link AutocompletePopup} React component.
52
- *
53
- * @public
54
- */
28
+ /** Props for the {@link AutocompletePopup} React component. */
55
29
  interface AutocompletePopupProps {
56
30
  /**
57
31
  * Emitted when the selected value changes. Only available when multiple is
@@ -64,19 +38,9 @@ interface AutocompletePopupProps {
64
38
  */
65
39
  onValuesChange?: (event: AutocompletePopupEvents['valuesChange']) => void;
66
40
  }
67
- /**
68
- * A React component that renders an `prosekit-autocomplete-popup` custom element.
69
- *
70
- * @public
71
- */
41
+ /** A React component that renders an `prosekit-autocomplete-popup` custom element. */
72
42
  declare const AutocompletePopup: ForwardRefExoticComponent<AutocompletePopupProps & HTMLAttributes<AutocompletePopupElement> & RefAttributes<AutocompletePopupElement>>;
73
- //#endregion
74
- //#region src/components/autocomplete/autocomplete-positioner.gen.d.ts
75
- /**
76
- * Props for the {@link AutocompletePositioner} React component.
77
- *
78
- * @public
79
- */
43
+ /** Props for the {@link AutocompletePositioner} React component. */
80
44
  interface AutocompletePositionerProps {
81
45
  /**
82
46
  * The placement of the popover, relative to the text cursor.
@@ -181,19 +145,9 @@ interface AutocompletePositionerProps {
181
145
  */
182
146
  altBoundary?: AutocompletePositionerProps$1['altBoundary'];
183
147
  }
184
- /**
185
- * A React component that renders an `prosekit-autocomplete-positioner` custom element.
186
- *
187
- * @public
188
- */
148
+ /** A React component that renders an `prosekit-autocomplete-positioner` custom element. */
189
149
  declare const AutocompletePositioner: ForwardRefExoticComponent<AutocompletePositionerProps & HTMLAttributes<AutocompletePositionerElement> & RefAttributes<AutocompletePositionerElement>>;
190
- //#endregion
191
- //#region src/components/autocomplete/autocomplete-root.gen.d.ts
192
- /**
193
- * Props for the {@link AutocompleteRoot} React component.
194
- *
195
- * @public
196
- */
150
+ /** Props for the {@link AutocompleteRoot} React component. */
197
151
  interface AutocompleteRootProps {
198
152
  /**
199
153
  * The ProseKit editor instance.
@@ -230,12 +184,7 @@ interface AutocompleteRootProps {
230
184
  */
231
185
  onValuesChange?: (event: AutocompleteRootEvents['valuesChange']) => void;
232
186
  }
233
- /**
234
- * A React component that renders an `prosekit-autocomplete-root` custom element.
235
- *
236
- * @public
237
- */
187
+ /** A React component that renders an `prosekit-autocomplete-root` custom element. */
238
188
  declare const AutocompleteRoot: ForwardRefExoticComponent<AutocompleteRootProps & HTMLAttributes<AutocompleteRootElement> & RefAttributes<AutocompleteRootElement>>;
239
- //#endregion
240
189
  export { AutocompleteEmpty, type AutocompleteEmptyProps, AutocompleteItem, type AutocompleteItemProps, AutocompletePopup, type AutocompletePopupProps, AutocompletePositioner, type AutocompletePositionerProps, AutocompleteRoot, type AutocompleteRootProps };
241
190
  //# sourceMappingURL=prosekit-react-autocomplete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-react-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":";;;;;;;;AAyCA;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;;;;EEnB5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BX,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"}
1
+ {"version":3,"file":"prosekit-react-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":";;;UAMiB,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"}
@@ -1,10 +1,7 @@
1
+ "use client";
1
2
  import { n as useEditorContext } from "./editor-context.js";
2
3
  import { createElement, forwardRef, useCallback, useLayoutEffect, useRef } from "react";
3
4
  import { registerAutocompleteEmptyElement, registerAutocompleteItemElement, registerAutocompletePopupElement, registerAutocompletePositionerElement, registerAutocompleteRootElement } from "@prosekit/web/autocomplete";
4
- //#region src/components/autocomplete/autocomplete-empty.gen.ts
5
- /**
6
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
7
- */
8
5
  function AutocompleteEmptyComponent(props, forwardedRef) {
9
6
  registerAutocompleteEmptyElement();
10
7
  const elementRef = useRef(null);
@@ -20,17 +17,8 @@ function AutocompleteEmptyComponent(props, forwardedRef) {
20
17
  suppressHydrationWarning: true
21
18
  });
22
19
  }
23
- /**
24
- * A React component that renders an `prosekit-autocomplete-empty` custom element.
25
- *
26
- * @public
27
- */
20
+ /** A React component that renders an `prosekit-autocomplete-empty` custom element. */
28
21
  const AutocompleteEmpty = /* @__PURE__ */ forwardRef(AutocompleteEmptyComponent);
29
- //#endregion
30
- //#region src/components/autocomplete/autocomplete-item.gen.ts
31
- /**
32
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
33
- */
34
22
  function AutocompleteItemComponent(props, forwardedRef) {
35
23
  registerAutocompleteItemElement();
36
24
  const elementRef = useRef(null);
@@ -65,17 +53,8 @@ function AutocompleteItemComponent(props, forwardedRef) {
65
53
  suppressHydrationWarning: true
66
54
  });
67
55
  }
68
- /**
69
- * A React component that renders an `prosekit-autocomplete-item` custom element.
70
- *
71
- * @public
72
- */
56
+ /** A React component that renders an `prosekit-autocomplete-item` custom element. */
73
57
  const AutocompleteItem = /* @__PURE__ */ forwardRef(AutocompleteItemComponent);
74
- //#endregion
75
- //#region src/components/autocomplete/autocomplete-popup.gen.ts
76
- /**
77
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
78
- */
79
58
  function AutocompletePopupComponent(props, forwardedRef) {
80
59
  registerAutocompletePopupElement();
81
60
  const elementRef = useRef(null);
@@ -105,17 +84,8 @@ function AutocompletePopupComponent(props, forwardedRef) {
105
84
  suppressHydrationWarning: true
106
85
  });
107
86
  }
108
- /**
109
- * A React component that renders an `prosekit-autocomplete-popup` custom element.
110
- *
111
- * @public
112
- */
87
+ /** A React component that renders an `prosekit-autocomplete-popup` custom element. */
113
88
  const AutocompletePopup = /* @__PURE__ */ forwardRef(AutocompletePopupComponent);
114
- //#endregion
115
- //#region src/components/autocomplete/autocomplete-positioner.gen.ts
116
- /**
117
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
118
- */
119
89
  function AutocompletePositionerComponent(props, forwardedRef) {
120
90
  registerAutocompletePositionerElement();
121
91
  const elementRef = useRef(null);
@@ -155,17 +125,8 @@ function AutocompletePositionerComponent(props, forwardedRef) {
155
125
  suppressHydrationWarning: true
156
126
  });
157
127
  }
158
- /**
159
- * A React component that renders an `prosekit-autocomplete-positioner` custom element.
160
- *
161
- * @public
162
- */
128
+ /** A React component that renders an `prosekit-autocomplete-positioner` custom element. */
163
129
  const AutocompletePositioner = /* @__PURE__ */ forwardRef(AutocompletePositionerComponent);
164
- //#endregion
165
- //#region src/components/autocomplete/autocomplete-root.gen.ts
166
- /**
167
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
168
- */
169
130
  function AutocompleteRootComponent(props, forwardedRef) {
170
131
  registerAutocompleteRootElement();
171
132
  const elementRef = useRef(null);
@@ -212,13 +173,33 @@ function AutocompleteRootComponent(props, forwardedRef) {
212
173
  suppressHydrationWarning: true
213
174
  });
214
175
  }
176
+ /** A React component that renders an `prosekit-autocomplete-root` custom element. */
177
+ const AutocompleteRoot = /* @__PURE__ */ forwardRef(AutocompleteRootComponent);
215
178
  /**
216
- * A React component that renders an `prosekit-autocomplete-root` custom element.
217
- *
218
- * @public
179
+
180
+ @module
181
+
182
+ ## Anatomy
183
+
184
+ ```jsx
185
+ import {
186
+ AutocompleteEmpty,
187
+ AutocompleteItem,
188
+ AutocompletePopup,
189
+ AutocompletePositioner,
190
+ AutocompleteRoot,
191
+ } from 'prosekit/react/autocomplete'
192
+
193
+ <AutocompleteRoot>
194
+ <AutocompletePositioner>
195
+ <AutocompletePopup>
196
+ <AutocompleteItem>...</AutocompleteItem>
197
+ <AutocompleteEmpty>...</AutocompleteEmpty>
198
+ </AutocompletePopup>
199
+ </AutocompletePositioner>
200
+ </AutocompleteRoot>
201
+ ```
219
202
  */
220
- const AutocompleteRoot = /* @__PURE__ */ forwardRef(AutocompleteRootComponent);
221
- //#endregion
222
203
  export { AutocompleteEmpty, AutocompleteItem, AutocompletePopup, AutocompletePositioner, AutocompleteRoot };
223
204
 
224
205
  //# sourceMappingURL=prosekit-react-autocomplete.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-react-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, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes } from 'react';\n\n/**\n * Props for the {@link AutocompleteEmpty} React component.\n *\n * @public\n */\nexport interface AutocompleteEmptyProps {}\n\nfunction AutocompleteEmptyComponent(props: AutocompleteEmptyProps, forwardedRef: ForwardedRef<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 React 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, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/**\n * Props for the {@link AutocompleteItem} React 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: ForwardedRef<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 React 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, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/**\n * Props for the {@link AutocompletePopup} React 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: ForwardedRef<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 React 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, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/**\n * Props for the {@link AutocompletePositioner} React 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: ForwardedRef<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 React 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, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link AutocompleteRoot} React 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: ForwardedRef<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 React component that renders an `prosekit-autocomplete-root` custom element.\n *\n * @public\n */\nexport const AutocompleteRoot: ForwardRefExoticComponent<AutocompleteRootProps & HTMLAttributes<AutocompleteRootElement> & RefAttributes<AutocompleteRootElement>> = /* @__PURE__ */ forwardRef(AutocompleteRootComponent);\n"],"mappings":";;;;;;;AAcA,SAAS,2BAA2B,OAA+B,cAAsD;AACvH,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,oBAA4K,2BAAW,2BAA2B;;;;;;ACV/N,SAAS,0BAA0B,OAA8B,cAAqD;AACpH,kCAAiC;CAEjC,MAAM,aAAa,OAAgC,KAAK;CACxD,MAAM,cAAc,OAAoD,EAAE,CAAC;CAE3E,MAAM,EAAE,UAAU,IAAI,OAAO,IAAI,UAAU,IAAI,GAAG,cAAc;AAEhE,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AACd,SAAO,OAAO,SAAS;GAAE,UAAU;GAAI,OAAO;GAAI,CAAC;AACnD,cAAY,UAAU,CAAC,GAAG;GAC1B;AAEF,uBAAsB;EACpB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EACd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,SAAS,CAAC,SAA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I,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,mBAAwK,2BAAW,0BAA0B"}
1
+ {"version":3,"file":"prosekit-react-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","../src/components/autocomplete/index.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, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes } from 'react';\n\n/** Props for the {@link AutocompleteEmpty} React component. */\nexport interface AutocompleteEmptyProps {}\n\nfunction AutocompleteEmptyComponent(props: AutocompleteEmptyProps, forwardedRef: ForwardedRef<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 React 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, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/** Props for the {@link AutocompleteItem} React 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: ForwardedRef<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 React 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, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/** Props for the {@link AutocompletePopup} React 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: ForwardedRef<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 React 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, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\n/** Props for the {@link AutocompletePositioner} React 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: ForwardedRef<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 React 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, forwardRef, useCallback, useRef, type ForwardedRef, type ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes, useLayoutEffect } from 'react';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link AutocompleteRoot} React 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: ForwardedRef<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 React component that renders an `prosekit-autocomplete-root` custom element. */\nexport const AutocompleteRoot: ForwardRefExoticComponent<AutocompleteRootProps & HTMLAttributes<AutocompleteRootElement> & RefAttributes<AutocompleteRootElement>> = /* @__PURE__ */ forwardRef(AutocompleteRootComponent);\n","/**\n\n@module\n\n## Anatomy\n\n```jsx\nimport {\n AutocompleteEmpty,\n AutocompleteItem,\n AutocompletePopup,\n AutocompletePositioner,\n AutocompleteRoot,\n} from 'prosekit/react/autocomplete'\n\n<AutocompleteRoot>\n <AutocompletePositioner>\n <AutocompletePopup>\n <AutocompleteItem>...</AutocompleteItem>\n <AutocompleteEmpty>...</AutocompleteEmpty>\n </AutocompletePopup>\n </AutocompletePositioner>\n</AutocompleteRoot>\n```\n*/\n\n'use client'\n\nexport * from './index.gen.ts'\n"],"mappings":";;;;AAQA,SAAS,2BAA2B,OAA+B,cAAsD;AACvH,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;EA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B;EAAM,CAAC;;;AAItH,MAAa,mBAAwK,2BAAW,0BAA0B"}
@@ -1,12 +1,6 @@
1
1
  import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "react";
2
2
  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";
3
-
4
- //#region src/components/block-handle/block-handle-add.gen.d.ts
5
- /**
6
- * Props for the {@link BlockHandleAdd} React component.
7
- *
8
- * @public
9
- */
3
+ /** Props for the {@link BlockHandleAdd} React component. */
10
4
  interface BlockHandleAddProps {
11
5
  /**
12
6
  * The ProseKit editor instance.
@@ -16,19 +10,9 @@ interface BlockHandleAddProps {
16
10
  */
17
11
  editor?: BlockHandleAddProps$1['editor'];
18
12
  }
19
- /**
20
- * A React component that renders an `prosekit-block-handle-add` custom element.
21
- *
22
- * @public
23
- */
13
+ /** A React component that renders an `prosekit-block-handle-add` custom element. */
24
14
  declare const BlockHandleAdd: ForwardRefExoticComponent<BlockHandleAddProps & HTMLAttributes<BlockHandleAddElement> & RefAttributes<BlockHandleAddElement>>;
25
- //#endregion
26
- //#region src/components/block-handle/block-handle-draggable.gen.d.ts
27
- /**
28
- * Props for the {@link BlockHandleDraggable} React component.
29
- *
30
- * @public
31
- */
15
+ /** Props for the {@link BlockHandleDraggable} React component. */
32
16
  interface BlockHandleDraggableProps {
33
17
  /**
34
18
  * The ProseKit editor instance.
@@ -38,33 +22,13 @@ interface BlockHandleDraggableProps {
38
22
  */
39
23
  editor?: BlockHandleDraggableProps$1['editor'];
40
24
  }
41
- /**
42
- * A React component that renders an `prosekit-block-handle-draggable` custom element.
43
- *
44
- * @public
45
- */
25
+ /** A React component that renders an `prosekit-block-handle-draggable` custom element. */
46
26
  declare const BlockHandleDraggable: ForwardRefExoticComponent<BlockHandleDraggableProps & HTMLAttributes<BlockHandleDraggableElement> & RefAttributes<BlockHandleDraggableElement>>;
47
- //#endregion
48
- //#region src/components/block-handle/block-handle-popup.gen.d.ts
49
- /**
50
- * Props for the {@link BlockHandlePopup} React component.
51
- *
52
- * @public
53
- */
27
+ /** Props for the {@link BlockHandlePopup} React component. */
54
28
  interface BlockHandlePopupProps {}
55
- /**
56
- * A React component that renders an `prosekit-block-handle-popup` custom element.
57
- *
58
- * @public
59
- */
29
+ /** A React component that renders an `prosekit-block-handle-popup` custom element. */
60
30
  declare const BlockHandlePopup: ForwardRefExoticComponent<BlockHandlePopupProps & HTMLAttributes<BlockHandlePopupElement> & RefAttributes<BlockHandlePopupElement>>;
61
- //#endregion
62
- //#region src/components/block-handle/block-handle-positioner.gen.d.ts
63
- /**
64
- * Props for the {@link BlockHandlePositioner} React component.
65
- *
66
- * @public
67
- */
31
+ /** Props for the {@link BlockHandlePositioner} React component. */
68
32
  interface BlockHandlePositionerProps {
69
33
  /**
70
34
  * The placement of the popover, relative to the hovered block.
@@ -187,19 +151,9 @@ interface BlockHandlePositionerProps {
187
151
  */
188
152
  altBoundary?: BlockHandlePositionerProps$1['altBoundary'];
189
153
  }
190
- /**
191
- * A React component that renders an `prosekit-block-handle-positioner` custom element.
192
- *
193
- * @public
194
- */
154
+ /** A React component that renders an `prosekit-block-handle-positioner` custom element. */
195
155
  declare const BlockHandlePositioner: ForwardRefExoticComponent<BlockHandlePositionerProps & HTMLAttributes<BlockHandlePositionerElement> & RefAttributes<BlockHandlePositionerElement>>;
196
- //#endregion
197
- //#region src/components/block-handle/block-handle-root.gen.d.ts
198
- /**
199
- * Props for the {@link BlockHandleRoot} React component.
200
- *
201
- * @public
202
- */
156
+ /** Props for the {@link BlockHandleRoot} React component. */
203
157
  interface BlockHandleRootProps {
204
158
  /**
205
159
  * The ProseKit editor instance.
@@ -211,12 +165,7 @@ interface BlockHandleRootProps {
211
165
  /** Fired when the hovered block changes. */
212
166
  onStateChange?: (event: BlockHandleRootEvents['stateChange']) => void;
213
167
  }
214
- /**
215
- * A React component that renders an `prosekit-block-handle-root` custom element.
216
- *
217
- * @public
218
- */
168
+ /** A React component that renders an `prosekit-block-handle-root` custom element. */
219
169
  declare const BlockHandleRoot: ForwardRefExoticComponent<BlockHandleRootProps & HTMLAttributes<BlockHandleRootElement> & RefAttributes<BlockHandleRootElement>>;
220
- //#endregion
221
170
  export { BlockHandleAdd, type BlockHandleAddProps, BlockHandleDraggable, type BlockHandleDraggableProps, BlockHandlePopup, type BlockHandlePopupProps, BlockHandlePositioner, type BlockHandlePositionerProps, BlockHandleRoot, type BlockHandleRootProps };
222
171
  //# sourceMappingURL=prosekit-react-block-handle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-react-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":";;;;;;;;AA2DA;UA7CiB,mBAAA;;;;;;;EAOf,MAAA,GAAS,qBAAA;AAAA;;;;;;cAsCE,cAAA,EAAgB,yBAAA,CAA0B,mBAAA,GAAsB,cAAA,CAAe,qBAAA,IAAyB,aAAA,CAAc,qBAAA;;;;;;;AAAnI;UC7CiB,yBAAA;;;;;;;EAOf,MAAA,GAAS,2BAAA;AAAA;;;;;;cAsCE,oBAAA,EAAsB,yBAAA,CAA0B,yBAAA,GAA4B,cAAA,CAAe,2BAAA,IAA+B,aAAA,CAAc,2BAAA;;;;;;;ADArJ;UE/CiB,qBAAA;;;;;;cA6BJ,gBAAA,EAAkB,yBAAA,CAA0B,qBAAA,GAAwB,cAAA,CAAe,uBAAA,IAA2B,aAAA,CAAc,uBAAA;;;;;;;AFkBzI;UG/CiB,0BAAA;;;;;;EAMf,SAAA,GAAY,4BAAA;EHyCe;;;;;;EGlC3B,KAAA,GAAQ,4BAAA;EHkC2G;;;;EG7BnH,IAAA,GAAO,4BAAA;;;AFhBT;;EEqBE,KAAA,GAAQ,4BAAA;EFdR;;AAsCF;;EEnBE,IAAA,GAAO,4BAAA;EFmBoD;;;;;EEb3D,QAAA,GAAW,4BAAA;EFa+C;;;;;;;EEL1D,UAAA,GAAa,4BAAA;EFKiK;;;;;EEC9K,MAAA,GAAS,4BAAA;EDhD2B;;;;AA6BtC;;EC0BE,OAAA,GAAU,4BAAA;ED1B6C;;;;;;ECiCvD,WAAA,GAAc,4BAAA;EDjCwC;;;;;;ECwCtD,SAAA,GAAY,4BAAA;EDxCkJ;;;;;AC7BhK;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;;;;;;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"}
1
+ {"version":3,"file":"prosekit-react-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":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,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"}
@@ -1,10 +1,7 @@
1
+ "use client";
1
2
  import { n as useEditorContext } from "./editor-context.js";
2
3
  import { createElement, forwardRef, useCallback, useLayoutEffect, useRef } from "react";
3
4
  import { registerBlockHandleAddElement, registerBlockHandleDraggableElement, registerBlockHandlePopupElement, registerBlockHandlePositionerElement, registerBlockHandleRootElement } from "@prosekit/web/block-handle";
4
- //#region src/components/block-handle/block-handle-add.gen.ts
5
- /**
6
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
7
- */
8
5
  function BlockHandleAddComponent(props, forwardedRef) {
9
6
  registerBlockHandleAddElement();
10
7
  const elementRef = useRef(null);
@@ -26,17 +23,8 @@ function BlockHandleAddComponent(props, forwardedRef) {
26
23
  suppressHydrationWarning: true
27
24
  });
28
25
  }
29
- /**
30
- * A React component that renders an `prosekit-block-handle-add` custom element.
31
- *
32
- * @public
33
- */
26
+ /** A React component that renders an `prosekit-block-handle-add` custom element. */
34
27
  const BlockHandleAdd = /* @__PURE__ */ forwardRef(BlockHandleAddComponent);
35
- //#endregion
36
- //#region src/components/block-handle/block-handle-draggable.gen.ts
37
- /**
38
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
39
- */
40
28
  function BlockHandleDraggableComponent(props, forwardedRef) {
41
29
  registerBlockHandleDraggableElement();
42
30
  const elementRef = useRef(null);
@@ -58,17 +46,8 @@ function BlockHandleDraggableComponent(props, forwardedRef) {
58
46
  suppressHydrationWarning: true
59
47
  });
60
48
  }
61
- /**
62
- * A React component that renders an `prosekit-block-handle-draggable` custom element.
63
- *
64
- * @public
65
- */
49
+ /** A React component that renders an `prosekit-block-handle-draggable` custom element. */
66
50
  const BlockHandleDraggable = /* @__PURE__ */ forwardRef(BlockHandleDraggableComponent);
67
- //#endregion
68
- //#region src/components/block-handle/block-handle-popup.gen.ts
69
- /**
70
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
71
- */
72
51
  function BlockHandlePopupComponent(props, forwardedRef) {
73
52
  registerBlockHandlePopupElement();
74
53
  const elementRef = useRef(null);
@@ -84,17 +63,8 @@ function BlockHandlePopupComponent(props, forwardedRef) {
84
63
  suppressHydrationWarning: true
85
64
  });
86
65
  }
87
- /**
88
- * A React component that renders an `prosekit-block-handle-popup` custom element.
89
- *
90
- * @public
91
- */
66
+ /** A React component that renders an `prosekit-block-handle-popup` custom element. */
92
67
  const BlockHandlePopup = /* @__PURE__ */ forwardRef(BlockHandlePopupComponent);
93
- //#endregion
94
- //#region src/components/block-handle/block-handle-positioner.gen.ts
95
- /**
96
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
97
- */
98
68
  function BlockHandlePositionerComponent(props, forwardedRef) {
99
69
  registerBlockHandlePositionerElement();
100
70
  const elementRef = useRef(null);
@@ -134,17 +104,8 @@ function BlockHandlePositionerComponent(props, forwardedRef) {
134
104
  suppressHydrationWarning: true
135
105
  });
136
106
  }
137
- /**
138
- * A React component that renders an `prosekit-block-handle-positioner` custom element.
139
- *
140
- * @public
141
- */
107
+ /** A React component that renders an `prosekit-block-handle-positioner` custom element. */
142
108
  const BlockHandlePositioner = /* @__PURE__ */ forwardRef(BlockHandlePositionerComponent);
143
- //#endregion
144
- //#region src/components/block-handle/block-handle-root.gen.ts
145
- /**
146
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
147
- */
148
109
  function BlockHandleRootComponent(props, forwardedRef) {
149
110
  registerBlockHandleRootElement();
150
111
  const elementRef = useRef(null);
@@ -177,13 +138,33 @@ function BlockHandleRootComponent(props, forwardedRef) {
177
138
  suppressHydrationWarning: true
178
139
  });
179
140
  }
141
+ /** A React component that renders an `prosekit-block-handle-root` custom element. */
142
+ const BlockHandleRoot = /* @__PURE__ */ forwardRef(BlockHandleRootComponent);
180
143
  /**
181
- * A React component that renders an `prosekit-block-handle-root` custom element.
182
- *
183
- * @public
144
+
145
+ @module
146
+
147
+ ## Anatomy
148
+
149
+ ```jsx
150
+ import {
151
+ BlockHandleAdd,
152
+ BlockHandleDraggable,
153
+ BlockHandlePopup,
154
+ BlockHandlePositioner,
155
+ BlockHandleRoot,
156
+ } from 'prosekit/react/block-handle'
157
+
158
+ <BlockHandleRoot>
159
+ <BlockHandlePositioner>
160
+ <BlockHandlePopup>
161
+ <BlockHandleAdd>...</BlockHandleAdd>
162
+ <BlockHandleDraggable>...</BlockHandleDraggable>
163
+ </BlockHandlePopup>
164
+ </BlockHandlePositioner>
165
+ </BlockHandleRoot>
166
+ ```
184
167
  */
185
- const BlockHandleRoot = /* @__PURE__ */ forwardRef(BlockHandleRootComponent);
186
- //#endregion
187
168
  export { BlockHandleAdd, BlockHandleDraggable, BlockHandlePopup, BlockHandlePositioner, BlockHandleRoot };
188
169
 
189
170
  //# sourceMappingURL=prosekit-react-block-handle.js.map