@prosekit/solid 0.7.0-beta.4 → 0.7.0-beta.6

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 (94) hide show
  1. package/dist/editor-context.js +0 -2
  2. package/dist/editor-context.js.map +1 -1
  3. package/dist/prosekit-solid-autocomplete.d.ts +10 -61
  4. package/dist/prosekit-solid-autocomplete.d.ts.map +1 -1
  5. package/dist/prosekit-solid-autocomplete.js +5 -50
  6. package/dist/prosekit-solid-autocomplete.js.map +1 -1
  7. package/dist/prosekit-solid-block-handle.d.ts +10 -61
  8. package/dist/prosekit-solid-block-handle.d.ts.map +1 -1
  9. package/dist/prosekit-solid-block-handle.js +5 -50
  10. package/dist/prosekit-solid-block-handle.js.map +1 -1
  11. package/dist/prosekit-solid-drop-indicator.d.ts +2 -13
  12. package/dist/prosekit-solid-drop-indicator.d.ts.map +1 -1
  13. package/dist/prosekit-solid-drop-indicator.js +1 -10
  14. package/dist/prosekit-solid-drop-indicator.js.map +1 -1
  15. package/dist/prosekit-solid-inline-popover.d.ts +6 -37
  16. package/dist/prosekit-solid-inline-popover.d.ts.map +1 -1
  17. package/dist/prosekit-solid-inline-popover.js +3 -30
  18. package/dist/prosekit-solid-inline-popover.js.map +1 -1
  19. package/dist/prosekit-solid-menu.d.ts +48 -88
  20. package/dist/prosekit-solid-menu.d.ts.map +1 -1
  21. package/dist/prosekit-solid-menu.js +50 -74
  22. package/dist/prosekit-solid-menu.js.map +1 -1
  23. package/dist/prosekit-solid-popover.d.ts +8 -49
  24. package/dist/prosekit-solid-popover.d.ts.map +1 -1
  25. package/dist/prosekit-solid-popover.js +4 -40
  26. package/dist/prosekit-solid-popover.js.map +1 -1
  27. package/dist/prosekit-solid-resizable.d.ts +4 -25
  28. package/dist/prosekit-solid-resizable.d.ts.map +1 -1
  29. package/dist/prosekit-solid-resizable.js +2 -20
  30. package/dist/prosekit-solid-resizable.js.map +1 -1
  31. package/dist/prosekit-solid-table-handle.d.ts +22 -133
  32. package/dist/prosekit-solid-table-handle.d.ts.map +1 -1
  33. package/dist/prosekit-solid-table-handle.js +11 -110
  34. package/dist/prosekit-solid-table-handle.js.map +1 -1
  35. package/dist/prosekit-solid-tooltip.d.ts +8 -49
  36. package/dist/prosekit-solid-tooltip.d.ts.map +1 -1
  37. package/dist/prosekit-solid-tooltip.js +4 -40
  38. package/dist/prosekit-solid-tooltip.js.map +1 -1
  39. package/dist/prosekit-solid.d.ts +0 -21
  40. package/dist/prosekit-solid.d.ts.map +1 -1
  41. package/dist/prosekit-solid.js +0 -28
  42. package/dist/prosekit-solid.js.map +1 -1
  43. package/package.json +5 -5
  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/block-handle/block-handle-add.gen.ts +3 -13
  51. package/src/components/block-handle/block-handle-draggable.gen.ts +3 -13
  52. package/src/components/block-handle/block-handle-popup.gen.ts +3 -13
  53. package/src/components/block-handle/block-handle-positioner.gen.ts +3 -13
  54. package/src/components/block-handle/block-handle-root.gen.ts +3 -13
  55. package/src/components/block-handle/index.gen.ts +1 -3
  56. package/src/components/drop-indicator/drop-indicator.gen.ts +3 -13
  57. package/src/components/drop-indicator/index.gen.ts +1 -3
  58. package/src/components/inline-popover/index.gen.ts +1 -3
  59. package/src/components/inline-popover/inline-popover-popup.gen.ts +3 -13
  60. package/src/components/inline-popover/inline-popover-positioner.gen.ts +3 -13
  61. package/src/components/inline-popover/inline-popover-root.gen.ts +3 -13
  62. package/src/components/menu/index.gen.ts +1 -3
  63. package/src/components/menu/menu-item.gen.ts +3 -13
  64. package/src/components/menu/menu-popup.gen.ts +3 -13
  65. package/src/components/menu/menu-positioner.gen.ts +3 -13
  66. package/src/components/menu/menu-root.gen.ts +3 -13
  67. package/src/components/menu/menu-submenu-root.gen.ts +65 -18
  68. package/src/components/menu/menu-submenu-trigger.gen.ts +39 -18
  69. package/src/components/menu/menu-trigger.gen.ts +3 -13
  70. package/src/components/popover/index.gen.ts +1 -3
  71. package/src/components/popover/popover-popup.gen.ts +3 -13
  72. package/src/components/popover/popover-positioner.gen.ts +3 -13
  73. package/src/components/popover/popover-root.gen.ts +3 -13
  74. package/src/components/popover/popover-trigger.gen.ts +3 -13
  75. package/src/components/resizable/index.gen.ts +1 -3
  76. package/src/components/resizable/resizable-handle.gen.ts +3 -13
  77. package/src/components/resizable/resizable-root.gen.ts +3 -13
  78. package/src/components/table-handle/index.gen.ts +1 -3
  79. package/src/components/table-handle/table-handle-column-menu-root.gen.ts +3 -13
  80. package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +3 -13
  81. package/src/components/table-handle/table-handle-column-popup.gen.ts +3 -13
  82. package/src/components/table-handle/table-handle-column-positioner.gen.ts +3 -13
  83. package/src/components/table-handle/table-handle-drag-preview.gen.ts +3 -13
  84. package/src/components/table-handle/table-handle-drop-indicator.gen.ts +3 -13
  85. package/src/components/table-handle/table-handle-root.gen.ts +3 -13
  86. package/src/components/table-handle/table-handle-row-menu-root.gen.ts +3 -13
  87. package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +3 -13
  88. package/src/components/table-handle/table-handle-row-popup.gen.ts +3 -13
  89. package/src/components/table-handle/table-handle-row-positioner.gen.ts +3 -13
  90. package/src/components/tooltip/index.gen.ts +1 -3
  91. package/src/components/tooltip/tooltip-popup.gen.ts +3 -13
  92. package/src/components/tooltip/tooltip-positioner.gen.ts +3 -13
  93. package/src/components/tooltip/tooltip-root.gen.ts +3 -13
  94. package/src/components/tooltip/tooltip-trigger.gen.ts +3 -13
@@ -1,5 +1,4 @@
1
1
  import { createContext, useContext } from "solid-js";
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 ContextProviderComponent } from 'solid-js'\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: ContextProviderComponent<Editor | null> = editorContext.Provider\n"],"mappings":";;AAGA,MAAM,gBAAgB,cAA6B,KAAK;;;;AAKxD,SAAgB,mBAA0D;AACxE,QAAO,WAAW,cAAc;;;;;AAMlC,MAAa,wBAAiE,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 ContextProviderComponent } from 'solid-js'\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: ContextProviderComponent<Editor | null> = editorContext.Provider\n"],"mappings":";AAGA,MAAM,gBAAgB,cAA6B,KAAK;;;;AAKxD,SAAgB,mBAA0D;AACxE,QAAO,WAAW,cAAc;;;;;AAMlC,MAAa,wBAAiE,cAAc"}
@@ -1,26 +1,10 @@
1
1
  import { Component, JSX } from "solid-js";
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} Solid component.
7
- *
8
- * @public
9
- */
3
+ /** Props for the {@link AutocompleteEmpty} Solid component. */
10
4
  interface AutocompleteEmptyProps {}
11
- /**
12
- * A Solid component that renders an `prosekit-autocomplete-empty` custom element.
13
- *
14
- * @public
15
- */
5
+ /** A Solid component that renders an `prosekit-autocomplete-empty` custom element. */
16
6
  declare const AutocompleteEmpty: Component<AutocompleteEmptyProps & JSX.HTMLAttributes<AutocompleteEmptyElement>>;
17
- //#endregion
18
- //#region src/components/autocomplete/autocomplete-item.gen.d.ts
19
- /**
20
- * Props for the {@link AutocompleteItem} Solid component.
21
- *
22
- * @public
23
- */
7
+ /** Props for the {@link AutocompleteItem} Solid 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 Solid component that renders an `prosekit-autocomplete-item` custom element.
44
- *
45
- * @public
46
- */
26
+ /** A Solid component that renders an `prosekit-autocomplete-item` custom element. */
47
27
  declare const AutocompleteItem: Component<AutocompleteItemProps & JSX.HTMLAttributes<AutocompleteItemElement>>;
48
- //#endregion
49
- //#region src/components/autocomplete/autocomplete-popup.gen.d.ts
50
- /**
51
- * Props for the {@link AutocompletePopup} Solid component.
52
- *
53
- * @public
54
- */
28
+ /** Props for the {@link AutocompletePopup} Solid 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 Solid component that renders an `prosekit-autocomplete-popup` custom element.
69
- *
70
- * @public
71
- */
41
+ /** A Solid component that renders an `prosekit-autocomplete-popup` custom element. */
72
42
  declare const AutocompletePopup: Component<AutocompletePopupProps & JSX.HTMLAttributes<AutocompletePopupElement>>;
73
- //#endregion
74
- //#region src/components/autocomplete/autocomplete-positioner.gen.d.ts
75
- /**
76
- * Props for the {@link AutocompletePositioner} Solid component.
77
- *
78
- * @public
79
- */
43
+ /** Props for the {@link AutocompletePositioner} Solid 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 Solid component that renders an `prosekit-autocomplete-positioner` custom element.
186
- *
187
- * @public
188
- */
148
+ /** A Solid component that renders an `prosekit-autocomplete-positioner` custom element. */
189
149
  declare const AutocompletePositioner: Component<AutocompletePositionerProps & JSX.HTMLAttributes<AutocompletePositionerElement>>;
190
- //#endregion
191
- //#region src/components/autocomplete/autocomplete-root.gen.d.ts
192
- /**
193
- * Props for the {@link AutocompleteRoot} Solid component.
194
- *
195
- * @public
196
- */
150
+ /** Props for the {@link AutocompleteRoot} Solid 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 Solid component that renders an `prosekit-autocomplete-root` custom element.
235
- *
236
- * @public
237
- */
187
+ /** A Solid component that renders an `prosekit-autocomplete-root` custom element. */
238
188
  declare const AutocompleteRoot: Component<AutocompleteRootProps & JSX.HTMLAttributes<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-solid-autocomplete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-solid-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":";;;;;;;;AAoBA;UAPiB,sBAAA;;;;;;cAOJ,iBAAA,EAAmB,SAAA,CAAU,sBAAA,GAAyB,GAAA,CAAI,cAAA,CAAe,wBAAA;;;;;;;AAAtF;UCNiB,qBAAA;;;;;;;;EAQf,KAAA,GAAQ,uBAAA;EDFgC;;;;;ECQxC,QAAA,GAAW,uBAAA;;EAEX,QAAA,IAAY,KAAA,EAAO,sBAAA;AAAA;AAhBrB;;;;;AAAA,cAwBa,gBAAA,EAAkB,SAAA,CAAU,qBAAA,GAAwB,GAAA,CAAI,cAAA,CAAe,uBAAA;;;;;;;ADlBpF;UENiB,sBAAA;;;;;EAKf,aAAA,IAAiB,KAAA,EAAO,uBAAA;EFCe;;;;EEIvC,cAAA,IAAkB,KAAA,EAAO,uBAAA;AAAA;;;;;;cAQd,iBAAA,EAAmB,SAAA,CAAU,sBAAA,GAAyB,GAAA,CAAI,cAAA,CAAe,wBAAA;;;;;;;AFZtF;UGNiB,2BAAA;;;;;;EAMf,SAAA,GAAY,6BAAA;EHA2B;;;;;EGMvC,MAAA,GAAS,6BAAA;EHNmG;EGQ5G,MAAA,GAAS,6BAAA;;EAET,KAAA,GAAQ,6BAAA;;EAER,WAAA,GAAc,6BAAA;EFlBsB;EEoBpC,QAAA,GAAW,6BAAA;EFZH;EEcR,eAAA,GAAkB,6BAAA;EFNC;;;;;EEYnB,QAAA,GAAW,6BAAA;EFdA;;;;;;AAUb;EEYE,UAAA,GAAa,6BAAA;;;;;;;;;EASb,IAAA,GAAO,6BAAA;EFrBwD;;;;;EE2B/D,KAAA,GAAQ,6BAAA;;;ADnDV;;;;EC0DE,OAAA,GAAU,6BAAA;EDrDc;;;;;;EC4DxB,SAAA,GAAY,6BAAA;ED/CD;;;;;;ECsDX,UAAA,GAAa,6BAAA;EDtD0B;;;;;;EC6DvC,IAAA,GAAO,6BAAA;ED7DqG;;;;;AClB9G;EAsFE,YAAA,GAAe,6BAAA;;;;;;;;EAQf,cAAA,GAAiB,6BAAA;EAlEN;;;;;;;EA0EX,WAAA,GAAc,6BAAA;AAAA;;;;;;cAQH,sBAAA,EAAwB,SAAA,CAAU,2BAAA,GAA8B,GAAA,CAAI,cAAA,CAAe,6BAAA;;;;;;;AHxGhG;UIJiB,qBAAA;;;;;;;EAOf,MAAA,GAAS,uBAAA;EJHqB;;;;;EIS9B,KAAA,GAAQ,uBAAA;EJToG;;;;ACN9G;;EGsBE,MAAA,GAAS,uBAAA;EHdD;EGgBR,YAAA,IAAgB,KAAA,EAAO,sBAAA;EHRJ;EGUnB,aAAA,IAAiB,KAAA,EAAO,sBAAA;EHViB;;;;EGezC,aAAA,IAAiB,KAAA,EAAO,sBAAA;EHfxB;;;;EGoBA,cAAA,IAAkB,KAAA,EAAO,sBAAA;AAAA;;;;;;cAQd,gBAAA,EAAkB,SAAA,CAAU,qBAAA,GAAwB,GAAA,CAAI,cAAA,CAAe,uBAAA"}
1
+ {"version":3,"file":"prosekit-solid-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":";;;UAOiB,sBAAA;;cAGJ,iBAAA,EAAmB,SAAA,CAAU,sBAAA,GAAyB,GAAA,CAAI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BAAA,GAA8B,GAAA,CAAI,cAAA,CAAe,6BAAA;;UCxG/E,qBAAA;EJHsB;;;;AAGvC;;EIOE,MAAA,GAAS,uBAAA;EJP+B;;;;;EIaxC,KAAA,GAAQ,uBAAA;EJbsB;;;;;;EIoB9B,MAAA,GAAS,uBAAA;;EAET,YAAA,IAAgB,KAAA,EAAO,sBAAA;EHxBa;EG0BpC,aAAA,IAAiB,KAAA,EAAO,sBAAA;EHlBhB;;;;EGuBR,aAAA,IAAiB,KAAA,EAAO,sBAAA;EHvBxB;;;;EG4BA,cAAA,IAAkB,KAAA,EAAO,sBAAA;AAAA;;cAId,gBAAA,EAAkB,SAAA,CAAU,qBAAA,GAAwB,GAAA,CAAI,cAAA,CAAe,uBAAA"}
@@ -2,30 +2,13 @@ import { n as useEditorContext } from "./editor-context.js";
2
2
  import { createEffect, createSignal, mergeProps, splitProps } from "solid-js";
3
3
  import { registerAutocompleteEmptyElement, registerAutocompleteItemElement, registerAutocompletePopupElement, registerAutocompletePositionerElement, registerAutocompleteRootElement } from "@prosekit/web/autocomplete";
4
4
  import h from "solid-js/h";
5
- //#region src/components/autocomplete/autocomplete-empty.gen.ts
6
- /**
7
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
8
- */
9
- /**
10
- * A Solid component that renders an `prosekit-autocomplete-empty` custom element.
11
- *
12
- * @public
13
- */
5
+ /** A Solid component that renders an `prosekit-autocomplete-empty` custom element. */
14
6
  const AutocompleteEmpty = (props) => {
15
7
  registerAutocompleteEmptyElement();
16
8
  const restProps = props;
17
9
  return () => h("prosekit-autocomplete-empty", restProps);
18
10
  };
19
- //#endregion
20
- //#region src/components/autocomplete/autocomplete-item.gen.ts
21
- /**
22
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
23
- */
24
- /**
25
- * A Solid component that renders an `prosekit-autocomplete-item` custom element.
26
- *
27
- * @public
28
- */
11
+ /** A Solid component that renders an `prosekit-autocomplete-item` custom element. */
29
12
  const AutocompleteItem = (props) => {
30
13
  registerAutocompleteItemElement();
31
14
  const [getElement, setElement] = createSignal(null);
@@ -54,16 +37,7 @@ const AutocompleteItem = (props) => {
54
37
  setElement(el);
55
38
  } }));
56
39
  };
57
- //#endregion
58
- //#region src/components/autocomplete/autocomplete-popup.gen.ts
59
- /**
60
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
61
- */
62
- /**
63
- * A Solid component that renders an `prosekit-autocomplete-popup` custom element.
64
- *
65
- * @public
66
- */
40
+ /** A Solid component that renders an `prosekit-autocomplete-popup` custom element. */
67
41
  const AutocompletePopup = (props) => {
68
42
  registerAutocompletePopupElement();
69
43
  const [getElement, setElement] = createSignal(null);
@@ -88,16 +62,7 @@ const AutocompletePopup = (props) => {
88
62
  setElement(el);
89
63
  } }));
90
64
  };
91
- //#endregion
92
- //#region src/components/autocomplete/autocomplete-positioner.gen.ts
93
- /**
94
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
95
- */
96
- /**
97
- * A Solid component that renders an `prosekit-autocomplete-positioner` custom element.
98
- *
99
- * @public
100
- */
65
+ /** A Solid component that renders an `prosekit-autocomplete-positioner` custom element. */
101
66
  const AutocompletePositioner = (props) => {
102
67
  registerAutocompletePositionerElement();
103
68
  const [getElement, setElement] = createSignal(null);
@@ -149,16 +114,7 @@ const AutocompletePositioner = (props) => {
149
114
  setElement(el);
150
115
  } }));
151
116
  };
152
- //#endregion
153
- //#region src/components/autocomplete/autocomplete-root.gen.ts
154
- /**
155
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
156
- */
157
- /**
158
- * A Solid component that renders an `prosekit-autocomplete-root` custom element.
159
- *
160
- * @public
161
- */
117
+ /** A Solid component that renders an `prosekit-autocomplete-root` custom element. */
162
118
  const AutocompleteRoot = (props) => {
163
119
  registerAutocompleteRootElement();
164
120
  const [getElement, setElement] = createSignal(null);
@@ -206,7 +162,6 @@ const AutocompleteRoot = (props) => {
206
162
  setElement(el);
207
163
  } }));
208
164
  };
209
- //#endregion
210
165
  export { AutocompleteEmpty, AutocompleteItem, AutocompletePopup, AutocompletePositioner, AutocompleteRoot };
211
166
 
212
167
  //# sourceMappingURL=prosekit-solid-autocomplete.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-solid-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 type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/**\n * Props for the {@link AutocompleteEmpty} Solid component.\n *\n * @public\n */\nexport interface AutocompleteEmptyProps {}\n\n/**\n * A Solid component that renders an `prosekit-autocomplete-empty` custom element.\n *\n * @public\n */\nexport const AutocompleteEmpty: Component<AutocompleteEmptyProps & JSX.HTMLAttributes<AutocompleteEmptyElement>> = (props): any => {\n registerAutocompleteEmptyElement();\n\n const restProps = props;\n\n return () => h('prosekit-autocomplete-empty', restProps);\n};\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 AutocompleteItemEvents, type AutocompleteItemProps as AutocompleteItemElementProps } from '@prosekit/web/autocomplete';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/**\n * Props for the {@link AutocompleteItem} Solid 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\n/**\n * A Solid component that renders an `prosekit-autocomplete-item` custom element.\n *\n * @public\n */\nexport const AutocompleteItem: Component<AutocompleteItemProps & JSX.HTMLAttributes<AutocompleteItemElement>> = (props): any => {\n registerAutocompleteItemElement();\n\n const [getElement, setElement] = createSignal<AutocompleteItemElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [elementProps, eventHandlers, restProps] = splitProps(props, ['disabled', 'value'], ['onSelect']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { disabled: elementProps.disabled, value: elementProps.value });\n\n handlers.length = 0;\n handlers.push(eventHandlers.onSelect);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['select'].entries()) {\n element.addEventListener(\n eventName,\n (event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () =>\n h(\n 'prosekit-autocomplete-item',\n mergeProps(restProps, {\n ref: (el: AutocompleteItemElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompletePopupElement, type AutocompletePopupElement, type AutocompletePopupEvents } from '@prosekit/web/autocomplete';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/**\n * Props for the {@link AutocompletePopup} Solid 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\n/**\n * A Solid component that renders an `prosekit-autocomplete-popup` custom element.\n *\n * @public\n */\nexport const AutocompletePopup: Component<AutocompletePopupProps & JSX.HTMLAttributes<AutocompletePopupElement>> = (props): any => {\n registerAutocompletePopupElement();\n\n const [getElement, setElement] = createSignal<AutocompletePopupElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [eventHandlers, restProps] = splitProps(props, ['onValueChange', 'onValuesChange']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n handlers.length = 0;\n handlers.push(eventHandlers.onValueChange);\n handlers.push(eventHandlers.onValuesChange);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['valueChange', 'valuesChange'].entries()) {\n element.addEventListener(\n eventName,\n (event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () =>\n h(\n 'prosekit-autocomplete-popup',\n mergeProps(restProps, {\n ref: (el: AutocompletePopupElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompletePositionerElement, type AutocompletePositionerElement, type AutocompletePositionerProps as AutocompletePositionerElementProps } from '@prosekit/web/autocomplete';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/**\n * Props for the {@link AutocompletePositioner} Solid 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\n/**\n * A Solid component that renders an `prosekit-autocomplete-positioner` custom element.\n *\n * @public\n */\nexport const AutocompletePositioner: Component<AutocompletePositionerProps & JSX.HTMLAttributes<AutocompletePositionerElement>> = (props): any => {\n registerAutocompletePositionerElement();\n\n const [getElement, setElement] = createSignal<AutocompletePositionerElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, {\n altBoundary: elementProps.altBoundary,\n autoUpdate: elementProps.autoUpdate,\n boundary: elementProps.boundary,\n elementContext: elementProps.elementContext,\n fitViewport: elementProps.fitViewport,\n flip: elementProps.flip,\n hide: elementProps.hide,\n hoist: elementProps.hoist,\n inline: elementProps.inline,\n offset: elementProps.offset,\n overflowPadding: elementProps.overflowPadding,\n overlap: elementProps.overlap,\n placement: elementProps.placement,\n rootBoundary: elementProps.rootBoundary,\n sameHeight: elementProps.sameHeight,\n sameWidth: elementProps.sameWidth,\n shift: elementProps.shift,\n strategy: elementProps.strategy,\n });\n });\n\n return () =>\n h(\n 'prosekit-autocomplete-positioner',\n mergeProps(restProps, {\n ref: (el: AutocompletePositionerElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompleteRootElement, type AutocompleteRootElement, type AutocompleteRootEvents, type AutocompleteRootProps as AutocompleteRootElementProps } from '@prosekit/web/autocomplete';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link AutocompleteRoot} Solid 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\n/**\n * A Solid component that renders an `prosekit-autocomplete-root` custom element.\n *\n * @public\n */\nexport const AutocompleteRoot: Component<AutocompleteRootProps & JSX.HTMLAttributes<AutocompleteRootElement>> = (props): any => {\n registerAutocompleteRootElement();\n\n const [getElement, setElement] = createSignal<AutocompleteRootElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [elementProps, eventHandlers, restProps] = splitProps(props, ['editor', 'filter', 'regex'], ['onOpenChange', 'onQueryChange', 'onValueChange', 'onValuesChange']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback, filter: elementProps.filter, regex: elementProps.regex });\n\n handlers.length = 0;\n handlers.push(eventHandlers.onOpenChange);\n handlers.push(eventHandlers.onQueryChange);\n handlers.push(eventHandlers.onValueChange);\n handlers.push(eventHandlers.onValuesChange);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['openChange', 'queryChange', 'valueChange', 'valuesChange'].entries()) {\n element.addEventListener(\n eventName,\n (event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () =>\n h(\n 'prosekit-autocomplete-root',\n mergeProps(restProps, {\n ref: (el: AutocompleteRootElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAoBA,MAAa,qBAAuG,UAAe;AACjI,mCAAkC;CAElC,MAAM,YAAY;AAElB,cAAa,EAAE,+BAA+B,UAAU;;;;;;;;;;;;ACa1D,MAAa,oBAAoG,UAAe;AAC9H,kCAAiC;CAEjC,MAAM,CAAC,YAAY,cAAc,aAA6C,KAAK;CACnF,MAAM,WAAsD,EAAE;CAE9D,MAAM,CAAC,cAAc,eAAe,aAAa,WAAW,OAAO,CAAC,YAAY,QAAQ,EAAE,CAAC,WAAW,CAAC;AAEvG,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS;GAAE,UAAU,aAAa;GAAU,OAAO,aAAa;GAAO,CAAC;AAEtF,WAAS,SAAS;AAClB,WAAS,KAAK,cAAc,SAAS;GACrC;AAEF,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,SAAS,CAAC,SAAS,CACnD,SAAQ,iBACN,YACC,UAAU;AACT,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cACE,EACE,8BACA,WAAW,WAAW,EACpB,MAAM,OAAuC;AAC3C,aAAW,GAAG;IAEjB,CAAC,CACH;;;;;;;;;;;;ACjDL,MAAa,qBAAuG,UAAe;AACjI,mCAAkC;CAElC,MAAM,CAAC,YAAY,cAAc,aAA8C,KAAK;CACpF,MAAM,WAAsD,EAAE;CAE9D,MAAM,CAAC,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,aAAa;GACpB,UAAU,aAAa;GACxB,CAAC;GACF;AAEF,cACE,EACE,oCACA,WAAW,WAAW,EACpB,MAAM,OAA6C;AACjD,aAAW,GAAG;IAEjB,CAAC,CACH;;;;;;;;;;;;AC3GL,MAAa,oBAAoG,UAAe;AAC9H,kCAAiC;CAEjC,MAAM,CAAC,YAAY,cAAc,aAA6C,KAAK;CACnF,MAAM,WAAsD,EAAE;CAE9D,MAAM,CAAC,cAAc,eAAe,aAAa,WAAW,OAAO;EAAC;EAAU;EAAU;EAAQ,EAAE;EAAC;EAAgB;EAAiB;EAAiB;EAAiB,CAAC;CAEvK,MAAM,aAAa,kBAAkB;AAErC,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS;GAAE,QAAQ,aAAa,UAAU;GAAY,QAAQ,aAAa;GAAQ,OAAO,aAAa;GAAO,CAAC;AAE7H,WAAS,SAAS;AAClB,WAAS,KAAK,cAAc,aAAa;AACzC,WAAS,KAAK,cAAc,cAAc;AAC1C,WAAS,KAAK,cAAc,cAAc;AAC1C,WAAS,KAAK,cAAc,eAAe;GAC3C;AAEF,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc;GAAC;GAAc;GAAe;GAAe;GAAe,CAAC,SAAS,CACrG,SAAQ,iBACN,YACC,UAAU;AACT,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cACE,EACE,8BACA,WAAW,WAAW,EACpB,MAAM,OAAuC;AAC3C,aAAW,GAAG;IAEjB,CAAC,CACH"}
1
+ {"version":3,"file":"prosekit-solid-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 type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/** Props for the {@link AutocompleteEmpty} Solid component. */\nexport interface AutocompleteEmptyProps {}\n\n/** A Solid component that renders an `prosekit-autocomplete-empty` custom element. */\nexport const AutocompleteEmpty: Component<AutocompleteEmptyProps & JSX.HTMLAttributes<AutocompleteEmptyElement>> = (props): any => {\n registerAutocompleteEmptyElement();\n\n const restProps = props;\n\n return () => h('prosekit-autocomplete-empty', restProps);\n};\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompleteItemElement, type AutocompleteItemElement, type AutocompleteItemEvents, type AutocompleteItemProps as AutocompleteItemElementProps } from '@prosekit/web/autocomplete';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/** Props for the {@link AutocompleteItem} Solid 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\n/** A Solid component that renders an `prosekit-autocomplete-item` custom element. */\nexport const AutocompleteItem: Component<AutocompleteItemProps & JSX.HTMLAttributes<AutocompleteItemElement>> = (props): any => {\n registerAutocompleteItemElement();\n\n const [getElement, setElement] = createSignal<AutocompleteItemElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [elementProps, eventHandlers, restProps] = splitProps(props, ['disabled', 'value'], ['onSelect']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { disabled: elementProps.disabled, value: elementProps.value });\n\n handlers.length = 0;\n handlers.push(eventHandlers.onSelect);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['select'].entries()) {\n element.addEventListener(\n eventName,\n (event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () =>\n h(\n 'prosekit-autocomplete-item',\n mergeProps(restProps, {\n ref: (el: AutocompleteItemElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompletePopupElement, type AutocompletePopupElement, type AutocompletePopupEvents } from '@prosekit/web/autocomplete';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/** Props for the {@link AutocompletePopup} Solid 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\n/** A Solid component that renders an `prosekit-autocomplete-popup` custom element. */\nexport const AutocompletePopup: Component<AutocompletePopupProps & JSX.HTMLAttributes<AutocompletePopupElement>> = (props): any => {\n registerAutocompletePopupElement();\n\n const [getElement, setElement] = createSignal<AutocompletePopupElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [eventHandlers, restProps] = splitProps(props, ['onValueChange', 'onValuesChange']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n handlers.length = 0;\n handlers.push(eventHandlers.onValueChange);\n handlers.push(eventHandlers.onValuesChange);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['valueChange', 'valuesChange'].entries()) {\n element.addEventListener(\n eventName,\n (event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () =>\n h(\n 'prosekit-autocomplete-popup',\n mergeProps(restProps, {\n ref: (el: AutocompletePopupElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompletePositionerElement, type AutocompletePositionerElement, type AutocompletePositionerProps as AutocompletePositionerElementProps } from '@prosekit/web/autocomplete';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/** Props for the {@link AutocompletePositioner} Solid 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\n/** A Solid component that renders an `prosekit-autocomplete-positioner` custom element. */\nexport const AutocompletePositioner: Component<AutocompletePositionerProps & JSX.HTMLAttributes<AutocompletePositionerElement>> = (props): any => {\n registerAutocompletePositionerElement();\n\n const [getElement, setElement] = createSignal<AutocompletePositionerElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, {\n altBoundary: elementProps.altBoundary,\n autoUpdate: elementProps.autoUpdate,\n boundary: elementProps.boundary,\n elementContext: elementProps.elementContext,\n fitViewport: elementProps.fitViewport,\n flip: elementProps.flip,\n hide: elementProps.hide,\n hoist: elementProps.hoist,\n inline: elementProps.inline,\n offset: elementProps.offset,\n overflowPadding: elementProps.overflowPadding,\n overlap: elementProps.overlap,\n placement: elementProps.placement,\n rootBoundary: elementProps.rootBoundary,\n sameHeight: elementProps.sameHeight,\n sameWidth: elementProps.sameWidth,\n shift: elementProps.shift,\n strategy: elementProps.strategy,\n });\n });\n\n return () =>\n h(\n 'prosekit-autocomplete-positioner',\n mergeProps(restProps, {\n ref: (el: AutocompletePositionerElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerAutocompleteRootElement, type AutocompleteRootElement, type AutocompleteRootEvents, type AutocompleteRootProps as AutocompleteRootElementProps } from '@prosekit/web/autocomplete';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link AutocompleteRoot} Solid 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\n/** A Solid component that renders an `prosekit-autocomplete-root` custom element. */\nexport const AutocompleteRoot: Component<AutocompleteRootProps & JSX.HTMLAttributes<AutocompleteRootElement>> = (props): any => {\n registerAutocompleteRootElement();\n\n const [getElement, setElement] = createSignal<AutocompleteRootElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [elementProps, eventHandlers, restProps] = splitProps(props, ['editor', 'filter', 'regex'], ['onOpenChange', 'onQueryChange', 'onValueChange', 'onValuesChange']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback, filter: elementProps.filter, regex: elementProps.regex });\n\n handlers.length = 0;\n handlers.push(eventHandlers.onOpenChange);\n handlers.push(eventHandlers.onQueryChange);\n handlers.push(eventHandlers.onValueChange);\n handlers.push(eventHandlers.onValuesChange);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['openChange', 'queryChange', 'valueChange', 'valuesChange'].entries()) {\n element.addEventListener(\n eventName,\n (event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () =>\n h(\n 'prosekit-autocomplete-root',\n mergeProps(restProps, {\n ref: (el: AutocompleteRootElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n"],"mappings":";;;;;AAUA,MAAa,qBAAuG,UAAe;AACjI,mCAAkC;CAElC,MAAM,YAAY;AAElB,cAAa,EAAE,+BAA+B,UAAU;;;ACa1D,MAAa,oBAAoG,UAAe;AAC9H,kCAAiC;CAEjC,MAAM,CAAC,YAAY,cAAc,aAA6C,KAAK;CACnF,MAAM,WAAsD,EAAE;CAE9D,MAAM,CAAC,cAAc,eAAe,aAAa,WAAW,OAAO,CAAC,YAAY,QAAQ,EAAE,CAAC,WAAW,C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Aa;GAAO,CAAC;AAE7H,WAAS,SAAS;AAClB,WAAS,KAAK,cAAc,aAAa;AACzC,WAAS,KAAK,cAAc,cAAc;AAC1C,WAAS,KAAK,cAAc,cAAc;AAC1C,WAAS,KAAK,cAAc,eAAe;GAC3C;AAEF,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc;GAAC;GAAc;GAAe;GAAe;GAAe,CAAC,SAAS,CACrG,SAAQ,iBACN,YACC,UAAU;AACT,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cACE,EACE,8BACA,WAAW,WAAW,EACpB,MAAM,OAAuC;AAC3C,aAAW,GAAG;IAEjB,CAAC,CACH"}
@@ -1,12 +1,6 @@
1
1
  import { Component, JSX } from "solid-js";
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} Solid component.
7
- *
8
- * @public
9
- */
3
+ /** Props for the {@link BlockHandleAdd} Solid 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 Solid component that renders an `prosekit-block-handle-add` custom element.
21
- *
22
- * @public
23
- */
13
+ /** A Solid component that renders an `prosekit-block-handle-add` custom element. */
24
14
  declare const BlockHandleAdd: Component<BlockHandleAddProps & JSX.HTMLAttributes<BlockHandleAddElement>>;
25
- //#endregion
26
- //#region src/components/block-handle/block-handle-draggable.gen.d.ts
27
- /**
28
- * Props for the {@link BlockHandleDraggable} Solid component.
29
- *
30
- * @public
31
- */
15
+ /** Props for the {@link BlockHandleDraggable} Solid 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 Solid component that renders an `prosekit-block-handle-draggable` custom element.
43
- *
44
- * @public
45
- */
25
+ /** A Solid component that renders an `prosekit-block-handle-draggable` custom element. */
46
26
  declare const BlockHandleDraggable: Component<BlockHandleDraggableProps & JSX.HTMLAttributes<BlockHandleDraggableElement>>;
47
- //#endregion
48
- //#region src/components/block-handle/block-handle-popup.gen.d.ts
49
- /**
50
- * Props for the {@link BlockHandlePopup} Solid component.
51
- *
52
- * @public
53
- */
27
+ /** Props for the {@link BlockHandlePopup} Solid component. */
54
28
  interface BlockHandlePopupProps {}
55
- /**
56
- * A Solid component that renders an `prosekit-block-handle-popup` custom element.
57
- *
58
- * @public
59
- */
29
+ /** A Solid component that renders an `prosekit-block-handle-popup` custom element. */
60
30
  declare const BlockHandlePopup: Component<BlockHandlePopupProps & JSX.HTMLAttributes<BlockHandlePopupElement>>;
61
- //#endregion
62
- //#region src/components/block-handle/block-handle-positioner.gen.d.ts
63
- /**
64
- * Props for the {@link BlockHandlePositioner} Solid component.
65
- *
66
- * @public
67
- */
31
+ /** Props for the {@link BlockHandlePositioner} Solid 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 Solid component that renders an `prosekit-block-handle-positioner` custom element.
192
- *
193
- * @public
194
- */
154
+ /** A Solid component that renders an `prosekit-block-handle-positioner` custom element. */
195
155
  declare const BlockHandlePositioner: Component<BlockHandlePositionerProps & JSX.HTMLAttributes<BlockHandlePositionerElement>>;
196
- //#endregion
197
- //#region src/components/block-handle/block-handle-root.gen.d.ts
198
- /**
199
- * Props for the {@link BlockHandleRoot} Solid component.
200
- *
201
- * @public
202
- */
156
+ /** Props for the {@link BlockHandleRoot} Solid 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 Solid component that renders an `prosekit-block-handle-root` custom element.
216
- *
217
- * @public
218
- */
168
+ /** A Solid component that renders an `prosekit-block-handle-root` custom element. */
219
169
  declare const BlockHandleRoot: Component<BlockHandleRootProps & JSX.HTMLAttributes<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-solid-block-handle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-solid-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":";;;;;;;;AA+BA;UAfiB,mBAAA;;;;;;;EAOf,MAAA,GAAS,qBAAA;AAAA;;;;;;cAQE,cAAA,EAAgB,SAAA,CAAU,mBAAA,GAAsB,GAAA,CAAI,cAAA,CAAe,qBAAA;;;;;;;AAA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AA,CAAU,oBAAA,GAAuB,GAAA,CAAI,cAAA,CAAe,sBAAA"}
1
+ {"version":3,"file":"prosekit-solid-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;;;;AAWpC;;EAJE,MAAA,GAAS,qBAAA;AAAA;;cAIE,cAAA,EAAgB,SAAA,CAAU,mBAAA,GAAsB,GAAA,CAAI,cAAA,CAAe,qBAAA;;UCX/D,yBAAA;EDAmB;;;;AAWpC;;ECJE,MAAA,GAAS,2BAAA;AAAA;;cAIE,oBAAA,EAAsB,SAAA,CAAU,yBAAA,GAA4B,GAAA,CAAI,cAAA,CAAe,2BAAA;;UCd3E,qBAAA;;cAGJ,gBAAA,EAAkB,SAAA,CAAU,qBAAA,GAAwB,GAAA,CAAI,cAAA,CAAe,uBAAA;;UCFnE,0BAAA;EHEmB;;;;AAWpC;EGPE,SAAA,GAAY,4BAAA;;;;;;;EAOZ,KAAA,GAAQ,4BAAA;EHAmB;;;;EGK3B,IAAA,GAAO,4BAAA;EHL4F;;;ACXrG;EEqBE,KAAA,GAAQ,4BAAA;;;;AFVV;EEeE,IAAA,GAAO,4BAAA;;;;;;EAMP,QAAA,GAAW,4BAAA;EFrB+B;;;;;;;EE6B1C,UAAA,GAAa,4BAAA;;AD3Cf;;;;ECiDE,MAAA,GAAS,4BAAA;ED9CE;;;;;;ECqDX,OAAA,GAAU,4BAAA;EDrD4B;;;;;;EC4DtC,WAAA,GAAc,4BAAA;ED5D2F;;;ACF3G;;;EAqEE,SAAA,GAAY,4BAAA;EAxDJ;;;;;;EA+DR,UAAA,GAAa,4BAAA;EArBH;;;;;;EA4BV,MAAA,GAAS,4BAAA;EAqBS;;;;;;EAdlB,QAAA,GAAW,4BAAA;EA7EX;;;;;;EAoFA,YAAA,GAAe,4BAAA;EArER;;;;;;EA4EP,eAAA,GAAkB,4BAAA;EAjDlB;;;;;;;EAyDA,cAAA,GAAiB,4BAAA;EA7BjB;;;;;;;EAqCA,WAAA,GAAc,4BAAA;AAAA;;cAIH,qBAAA,EAAuB,SAAA,CAAU,0BAAA,GAA6B,GAAA,CAAI,cAAA,CAAe,4BAAA;;UC1H7E,oBAAA;EJAmB;;;;AAWpC;;EIJE,MAAA,GAAS,sBAAA;EJI4B;EIFrC,aAAA,IAAiB,KAAA,EAAO,qBAAA;AAAA;;cAIb,eAAA,EAAiB,SAAA,CAAU,oBAAA,GAAuB,GAAA,CAAI,cAAA,CAAe,sBAAA"}
@@ -2,15 +2,7 @@ import { n as useEditorContext } from "./editor-context.js";
2
2
  import { createEffect, createSignal, mergeProps, splitProps } from "solid-js";
3
3
  import h from "solid-js/h";
4
4
  import { registerBlockHandleAddElement, registerBlockHandleDraggableElement, registerBlockHandlePopupElement, registerBlockHandlePositionerElement, registerBlockHandleRootElement } from "@prosekit/web/block-handle";
5
- //#region src/components/block-handle/block-handle-add.gen.ts
6
- /**
7
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
8
- */
9
- /**
10
- * A Solid component that renders an `prosekit-block-handle-add` custom element.
11
- *
12
- * @public
13
- */
5
+ /** A Solid component that renders an `prosekit-block-handle-add` custom element. */
14
6
  const BlockHandleAdd = (props) => {
15
7
  registerBlockHandleAddElement();
16
8
  const [getElement, setElement] = createSignal(null);
@@ -25,16 +17,7 @@ const BlockHandleAdd = (props) => {
25
17
  setElement(el);
26
18
  } }));
27
19
  };
28
- //#endregion
29
- //#region src/components/block-handle/block-handle-draggable.gen.ts
30
- /**
31
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
32
- */
33
- /**
34
- * A Solid component that renders an `prosekit-block-handle-draggable` custom element.
35
- *
36
- * @public
37
- */
20
+ /** A Solid component that renders an `prosekit-block-handle-draggable` custom element. */
38
21
  const BlockHandleDraggable = (props) => {
39
22
  registerBlockHandleDraggableElement();
40
23
  const [getElement, setElement] = createSignal(null);
@@ -49,31 +32,13 @@ const BlockHandleDraggable = (props) => {
49
32
  setElement(el);
50
33
  } }));
51
34
  };
52
- //#endregion
53
- //#region src/components/block-handle/block-handle-popup.gen.ts
54
- /**
55
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
56
- */
57
- /**
58
- * A Solid component that renders an `prosekit-block-handle-popup` custom element.
59
- *
60
- * @public
61
- */
35
+ /** A Solid component that renders an `prosekit-block-handle-popup` custom element. */
62
36
  const BlockHandlePopup = (props) => {
63
37
  registerBlockHandlePopupElement();
64
38
  const restProps = props;
65
39
  return () => h("prosekit-block-handle-popup", restProps);
66
40
  };
67
- //#endregion
68
- //#region src/components/block-handle/block-handle-positioner.gen.ts
69
- /**
70
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
71
- */
72
- /**
73
- * A Solid component that renders an `prosekit-block-handle-positioner` custom element.
74
- *
75
- * @public
76
- */
41
+ /** A Solid component that renders an `prosekit-block-handle-positioner` custom element. */
77
42
  const BlockHandlePositioner = (props) => {
78
43
  registerBlockHandlePositionerElement();
79
44
  const [getElement, setElement] = createSignal(null);
@@ -125,16 +90,7 @@ const BlockHandlePositioner = (props) => {
125
90
  setElement(el);
126
91
  } }));
127
92
  };
128
- //#endregion
129
- //#region src/components/block-handle/block-handle-root.gen.ts
130
- /**
131
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
132
- */
133
- /**
134
- * A Solid component that renders an `prosekit-block-handle-root` custom element.
135
- *
136
- * @public
137
- */
93
+ /** A Solid component that renders an `prosekit-block-handle-root` custom element. */
138
94
  const BlockHandleRoot = (props) => {
139
95
  registerBlockHandleRootElement();
140
96
  const [getElement, setElement] = createSignal(null);
@@ -161,7 +117,6 @@ const BlockHandleRoot = (props) => {
161
117
  setElement(el);
162
118
  } }));
163
119
  };
164
- //#endregion
165
120
  export { BlockHandleAdd, BlockHandleDraggable, BlockHandlePopup, BlockHandlePositioner, BlockHandleRoot };
166
121
 
167
122
  //# sourceMappingURL=prosekit-solid-block-handle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prosekit-solid-block-handle.js","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleAddElement, type BlockHandleAddElement, type BlockHandleAddProps as BlockHandleAddElementProps } from '@prosekit/web/block-handle';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleAdd} Solid component.\n *\n * @public\n */\nexport interface BlockHandleAddProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleAddElementProps['editor'];\n}\n\n/**\n * A Solid component that renders an `prosekit-block-handle-add` custom element.\n *\n * @public\n */\nexport const BlockHandleAdd: Component<BlockHandleAddProps & JSX.HTMLAttributes<BlockHandleAddElement>> = (props): any => {\n registerBlockHandleAddElement();\n\n const [getElement, setElement] = createSignal<BlockHandleAddElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['editor']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback });\n });\n\n return () =>\n h(\n 'prosekit-block-handle-add',\n mergeProps(restProps, {\n ref: (el: BlockHandleAddElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleDraggableElement, type BlockHandleDraggableElement, type BlockHandleDraggableProps as BlockHandleDraggableElementProps } from '@prosekit/web/block-handle';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleDraggable} Solid component.\n *\n * @public\n */\nexport interface BlockHandleDraggableProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleDraggableElementProps['editor'];\n}\n\n/**\n * A Solid component that renders an `prosekit-block-handle-draggable` custom element.\n *\n * @public\n */\nexport const BlockHandleDraggable: Component<BlockHandleDraggableProps & JSX.HTMLAttributes<BlockHandleDraggableElement>> = (props): any => {\n registerBlockHandleDraggableElement();\n\n const [getElement, setElement] = createSignal<BlockHandleDraggableElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['editor']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback });\n });\n\n return () =>\n h(\n 'prosekit-block-handle-draggable',\n mergeProps(restProps, {\n ref: (el: BlockHandleDraggableElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandlePopupElement, type BlockHandlePopupElement } from '@prosekit/web/block-handle';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/**\n * Props for the {@link BlockHandlePopup} Solid component.\n *\n * @public\n */\nexport interface BlockHandlePopupProps {}\n\n/**\n * A Solid component that renders an `prosekit-block-handle-popup` custom element.\n *\n * @public\n */\nexport const BlockHandlePopup: Component<BlockHandlePopupProps & JSX.HTMLAttributes<BlockHandlePopupElement>> = (props): any => {\n registerBlockHandlePopupElement();\n\n const restProps = props;\n\n return () => h('prosekit-block-handle-popup', restProps);\n};\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandlePositionerElement, type BlockHandlePositionerElement, type BlockHandlePositionerProps as BlockHandlePositionerElementProps } from '@prosekit/web/block-handle';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/**\n * Props for the {@link BlockHandlePositioner} Solid component.\n *\n * @public\n */\nexport interface BlockHandlePositionerProps {\n /**\n * The placement of the popover, relative to the hovered block.\n *\n * @default \"left\"\n */\n placement?: BlockHandlePositionerElementProps['placement'];\n /**\n * Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)\n * to place the floating element on top of other page content.\n *\n * @default false\n */\n hoist?: BlockHandlePositionerElementProps['hoist'];\n /**\n * @default false\n * @hidden\n */\n flip?: BlockHandlePositionerElementProps['flip'];\n /**\n * @default false\n * @hidden\n */\n shift?: BlockHandlePositionerElementProps['shift'];\n /**\n * @default true\n * @hidden\n */\n hide?: BlockHandlePositionerElementProps['hide'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: BlockHandlePositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: BlockHandlePositionerElementProps['autoUpdate'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: BlockHandlePositionerElementProps['offset'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: BlockHandlePositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: BlockHandlePositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: BlockHandlePositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: BlockHandlePositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: BlockHandlePositionerElementProps['inline'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: BlockHandlePositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: BlockHandlePositionerElementProps['rootBoundary'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.\n *\n * @default 4\n */\n overflowPadding?: BlockHandlePositionerElementProps['overflowPadding'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: BlockHandlePositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: BlockHandlePositionerElementProps['altBoundary'];\n}\n\n/**\n * A Solid component that renders an `prosekit-block-handle-positioner` custom element.\n *\n * @public\n */\nexport const BlockHandlePositioner: Component<BlockHandlePositionerProps & JSX.HTMLAttributes<BlockHandlePositionerElement>> = (props): any => {\n registerBlockHandlePositionerElement();\n\n const [getElement, setElement] = createSignal<BlockHandlePositionerElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, {\n altBoundary: elementProps.altBoundary,\n autoUpdate: elementProps.autoUpdate,\n boundary: elementProps.boundary,\n elementContext: elementProps.elementContext,\n fitViewport: elementProps.fitViewport,\n flip: elementProps.flip,\n hide: elementProps.hide,\n hoist: elementProps.hoist,\n inline: elementProps.inline,\n offset: elementProps.offset,\n overflowPadding: elementProps.overflowPadding,\n overlap: elementProps.overlap,\n placement: elementProps.placement,\n rootBoundary: elementProps.rootBoundary,\n sameHeight: elementProps.sameHeight,\n sameWidth: elementProps.sameWidth,\n shift: elementProps.shift,\n strategy: elementProps.strategy,\n });\n });\n\n return () =>\n h(\n 'prosekit-block-handle-positioner',\n mergeProps(restProps, {\n ref: (el: BlockHandlePositionerElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleRootElement, type BlockHandleRootElement, type BlockHandleRootEvents, type BlockHandleRootProps as BlockHandleRootElementProps } from '@prosekit/web/block-handle';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/**\n * Props for the {@link BlockHandleRoot} Solid component.\n *\n * @public\n */\nexport interface BlockHandleRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleRootElementProps['editor'];\n /** Fired when the hovered block changes. */\n onStateChange?: (event: BlockHandleRootEvents['stateChange']) => void;\n}\n\n/**\n * A Solid component that renders an `prosekit-block-handle-root` custom element.\n *\n * @public\n */\nexport const BlockHandleRoot: Component<BlockHandleRootProps & JSX.HTMLAttributes<BlockHandleRootElement>> = (props): any => {\n registerBlockHandleRootElement();\n\n const [getElement, setElement] = createSignal<BlockHandleRootElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [elementProps, eventHandlers, restProps] = splitProps(props, ['editor'], ['onStateChange']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback });\n\n handlers.length = 0;\n handlers.push(eventHandlers.onStateChange);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['stateChange'].entries()) {\n element.addEventListener(\n eventName,\n (event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () =>\n h(\n 'prosekit-block-handle-root',\n mergeProps(restProps, {\n ref: (el: BlockHandleRootElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n"],"mappings":";;;;;;;;;;;;;AA+BA,MAAa,kBAA8F,UAAe;AACxH,gCAA+B;CAE/B,MAAM,CAAC,YAAY,cAAc,aAA2C,KAAK;CAEjF,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO,CAAC,SAAS,CAAC;CAE/D,MAAM,aAAa,kBAAkB;AAErC,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS,EAAE,QAAQ,aAAa,UAAU,YAAY,CAAC;GACrE;AAEF,cACE,EACE,6BACA,WAAW,WAAW,EACpB,MAAM,OAAqC;AACzC,aAAW,GAAG;IAEjB,CAAC,CACH;;;;;;;;;;;;ACxBL,MAAa,wBAAgH,UAAe;AAC1I,sCAAqC;CAErC,MAAM,CAAC,YAAY,cAAc,aAAiD,KAAK;CAEvF,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO,CAAC,SAAS,CAAC;CAE/D,MAAM,aAAa,kBAAkB;AAErC,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS,EAAE,QAAQ,aAAa,UAAU,YAAY,CAAC;GACrE;AAEF,cACE,EACE,mCACA,WAAW,WAAW,EACpB,MAAM,OAA2C;AAC/C,aAAW,GAAG;IAEjB,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d,SAAO,OAAO,SAAS,EAAE,QAAQ,aAAa,UAAU,YAAY,CAAC;AAErE,WAAS,SAAS;AAClB,WAAS,KAAK,cAAc,cAAc;GAC1C;AAEF,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,cAAc,CAAC,SAAS,CACxD,SAAQ,iBACN,YACC,UAAU;AACT,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cACE,EACE,8BACA,WAAW,WAAW,EACpB,MAAM,OAAsC;AAC1C,aAAW,GAAG;IAEjB,CAAC,CACH"}
1
+ {"version":3,"file":"prosekit-solid-block-handle.js","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts"],"sourcesContent":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandleAddElement, type BlockHandleAddElement, type BlockHandleAddProps as BlockHandleAddElementProps } from '@prosekit/web/block-handle';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link BlockHandleAdd} Solid component. */\nexport interface BlockHandleAddProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleAddElementProps['editor'];\n}\n\n/** A Solid component that renders an `prosekit-block-handle-add` custom element. */\nexport const BlockHandleAdd: Component<BlockHandleAddProps & JSX.HTMLAttributes<BlockHandleAddElement>> = (props): any => {\n registerBlockHandleAddElement();\n\n const [getElement, setElement] = createSignal<BlockHandleAddElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['editor']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback });\n });\n\n return () =>\n h(\n 'prosekit-block-handle-add',\n mergeProps(restProps, {\n ref: (el: BlockHandleAddElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandleDraggableElement, type BlockHandleDraggableElement, type BlockHandleDraggableProps as BlockHandleDraggableElementProps } from '@prosekit/web/block-handle';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link BlockHandleDraggable} Solid component. */\nexport interface BlockHandleDraggableProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleDraggableElementProps['editor'];\n}\n\n/** A Solid component that renders an `prosekit-block-handle-draggable` custom element. */\nexport const BlockHandleDraggable: Component<BlockHandleDraggableProps & JSX.HTMLAttributes<BlockHandleDraggableElement>> = (props): any => {\n registerBlockHandleDraggableElement();\n\n const [getElement, setElement] = createSignal<BlockHandleDraggableElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['editor']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback });\n });\n\n return () =>\n h(\n 'prosekit-block-handle-draggable',\n mergeProps(restProps, {\n ref: (el: BlockHandleDraggableElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandlePopupElement, type BlockHandlePopupElement } from '@prosekit/web/block-handle';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/** Props for the {@link BlockHandlePopup} Solid component. */\nexport interface BlockHandlePopupProps {}\n\n/** A Solid component that renders an `prosekit-block-handle-popup` custom element. */\nexport const BlockHandlePopup: Component<BlockHandlePopupProps & JSX.HTMLAttributes<BlockHandlePopupElement>> = (props): any => {\n registerBlockHandlePopupElement();\n\n const restProps = props;\n\n return () => h('prosekit-block-handle-popup', restProps);\n};\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandlePositionerElement, type BlockHandlePositionerElement, type BlockHandlePositionerProps as BlockHandlePositionerElementProps } from '@prosekit/web/block-handle';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\n/** Props for the {@link BlockHandlePositioner} Solid component. */\nexport interface BlockHandlePositionerProps {\n /**\n * The placement of the popover, relative to the hovered block.\n *\n * @default \"left\"\n */\n placement?: BlockHandlePositionerElementProps['placement'];\n /**\n * Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)\n * to place the floating element on top of other page content.\n *\n * @default false\n */\n hoist?: BlockHandlePositionerElementProps['hoist'];\n /**\n * @default false\n * @hidden\n */\n flip?: BlockHandlePositionerElementProps['flip'];\n /**\n * @default false\n * @hidden\n */\n shift?: BlockHandlePositionerElementProps['shift'];\n /**\n * @default true\n * @hidden\n */\n hide?: BlockHandlePositionerElementProps['hide'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: BlockHandlePositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: BlockHandlePositionerElementProps['autoUpdate'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: BlockHandlePositionerElementProps['offset'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: BlockHandlePositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: BlockHandlePositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: BlockHandlePositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: BlockHandlePositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: BlockHandlePositionerElementProps['inline'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: BlockHandlePositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: BlockHandlePositionerElementProps['rootBoundary'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.\n *\n * @default 4\n */\n overflowPadding?: BlockHandlePositionerElementProps['overflowPadding'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: BlockHandlePositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: BlockHandlePositionerElementProps['altBoundary'];\n}\n\n/** A Solid component that renders an `prosekit-block-handle-positioner` custom element. */\nexport const BlockHandlePositioner: Component<BlockHandlePositionerProps & JSX.HTMLAttributes<BlockHandlePositionerElement>> = (props): any => {\n registerBlockHandlePositionerElement();\n\n const [getElement, setElement] = createSignal<BlockHandlePositionerElement | null>(null);\n\n const [elementProps, restProps] = splitProps(props, ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy']);\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, {\n altBoundary: elementProps.altBoundary,\n autoUpdate: elementProps.autoUpdate,\n boundary: elementProps.boundary,\n elementContext: elementProps.elementContext,\n fitViewport: elementProps.fitViewport,\n flip: elementProps.flip,\n hide: elementProps.hide,\n hoist: elementProps.hoist,\n inline: elementProps.inline,\n offset: elementProps.offset,\n overflowPadding: elementProps.overflowPadding,\n overlap: elementProps.overlap,\n placement: elementProps.placement,\n rootBoundary: elementProps.rootBoundary,\n sameHeight: elementProps.sameHeight,\n sameWidth: elementProps.sameWidth,\n shift: elementProps.shift,\n strategy: elementProps.strategy,\n });\n });\n\n return () =>\n h(\n 'prosekit-block-handle-positioner',\n mergeProps(restProps, {\n ref: (el: BlockHandlePositionerElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerBlockHandleRootElement, type BlockHandleRootElement, type BlockHandleRootEvents, type BlockHandleRootProps as BlockHandleRootElementProps } from '@prosekit/web/block-handle';\nimport { createEffect, createSignal, mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX } from 'solid-js';\nimport h from 'solid-js/h';\n\nimport { useEditorContext } from '../../contexts/editor-context.ts';\n\n/** Props for the {@link BlockHandleRoot} Solid component. */\nexport interface BlockHandleRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleRootElementProps['editor'];\n /** Fired when the hovered block changes. */\n onStateChange?: (event: BlockHandleRootEvents['stateChange']) => void;\n}\n\n/** A Solid component that renders an `prosekit-block-handle-root` custom element. */\nexport const BlockHandleRoot: Component<BlockHandleRootProps & JSX.HTMLAttributes<BlockHandleRootElement>> = (props): any => {\n registerBlockHandleRootElement();\n\n const [getElement, setElement] = createSignal<BlockHandleRootElement | null>(null);\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n const [elementProps, eventHandlers, restProps] = splitProps(props, ['editor'], ['onStateChange']);\n\n const p0Fallback = useEditorContext();\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n Object.assign(element, { editor: elementProps.editor ?? p0Fallback });\n\n handlers.length = 0;\n handlers.push(eventHandlers.onStateChange);\n });\n\n createEffect(() => {\n const element = getElement();\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['stateChange'].entries()) {\n element.addEventListener(\n eventName,\n (event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () =>\n h(\n 'prosekit-block-handle-root',\n mergeProps(restProps, {\n ref: (el: BlockHandleRootElement | null) => {\n setElement(el);\n },\n }),\n );\n};\n"],"mappings":";;;;;AAqBA,MAAa,kBAA8F,UAAe;AACxH,gCAA+B;CAE/B,MAAM,CAAC,YAAY,cAAc,aAA2C,KAAK;CAEjF,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO,CAAC,SAAS,CAAC;CAE/D,MAAM,aAAa,kBAAkB;AAErC,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAAS,EAAE,QAAQ,aAAa,UAAU,YAAY,CAAC;GACrE;AAEF,cACE,EACE,6BACA,WAAW,WAAW,EACpB,MAAM,OAAqC;AACzC,aAAW,GAAG;IAEjB,CAAC,CACH;;;ACxBL,MAAa,wBAAgH,UAAe;AAC1I,sCAAqC;CAErC,MAAM,CAAC,YAAY,cAAc,aAAiD,KAAK;CAEvF,MAAM,CAAC,cAAc,aAAa,WAAW,OAAO,CAAC,SAAS,CAAC;CAE/D,MAAM,aAAa,kBAAkB;AAErC,oBAAmB;EACjB,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;AAEd,SAAO,OAAO,SAA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