@prosekit/preact 0.4.11 → 0.4.12

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.
@@ -0,0 +1,69 @@
1
+ import { useEditorContext } from "./editor-context-imq7MdJr.js";
2
+ import { createElement } from "preact";
3
+ import { useEffect, useLayoutEffect, useRef, useState } from "preact/hooks";
4
+ import { forwardRef } from "preact/compat";
5
+ import { mergeRefs } from "react-merge-refs";
6
+
7
+ //#region src/components/create-component.ts
8
+ const useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
9
+ function createComponent(tagName, displayName, propNames, eventNames) {
10
+ const hasEditor = propNames.includes("editor");
11
+ const lowerCaseEventNameMap = Object.fromEntries(eventNames.map((name) => [name.toLowerCase(), name]));
12
+ const Component = forwardRef((props, ref) => {
13
+ const [el, setEl] = useState(null);
14
+ const properties = {};
15
+ const attributes = {};
16
+ const eventHandlersRef = useRef({});
17
+ const eventHandlers = {};
18
+ for (const [name, value] of Object.entries(props)) {
19
+ if (value === void 0) continue;
20
+ if (propNames.includes(name)) {
21
+ properties[name] = value;
22
+ continue;
23
+ }
24
+ if (name.startsWith("on")) {
25
+ const lowerCaseEventName = name.slice(2).toLowerCase();
26
+ const eventName = lowerCaseEventNameMap[lowerCaseEventName];
27
+ const handler = value;
28
+ if (eventName && handler) {
29
+ const extractDetail = eventName.endsWith("Change");
30
+ const normalizedHandler = extractDetail ? (event) => {
31
+ handler(event.detail);
32
+ } : handler;
33
+ eventHandlers[eventName] = normalizedHandler;
34
+ }
35
+ }
36
+ if (name === "className") attributes["class"] = value;
37
+ else attributes[name] = value;
38
+ }
39
+ const editor = useEditorContext();
40
+ if (hasEditor && editor && !properties["editor"]) properties["editor"] = editor;
41
+ useIsomorphicLayoutEffect(() => {
42
+ if (!el) return;
43
+ for (const [name, value] of Object.entries(properties)) if (value !== void 0) el[name] = value;
44
+ }, [el, ...propNames.map((name) => properties[name])]);
45
+ useIsomorphicLayoutEffect(() => {
46
+ eventHandlersRef.current = eventHandlers;
47
+ });
48
+ useIsomorphicLayoutEffect(() => {
49
+ if (!el) return;
50
+ const fixedEventHandlers = {};
51
+ for (const eventName of eventNames) fixedEventHandlers[eventName] = (event) => {
52
+ eventHandlersRef.current[eventName]?.(event);
53
+ };
54
+ for (const [name, handler] of Object.entries(fixedEventHandlers)) el.addEventListener(name, handler);
55
+ return () => {
56
+ for (const [name, handler] of Object.entries(fixedEventHandlers)) el.removeEventListener(name, handler);
57
+ };
58
+ }, [el]);
59
+ return createElement(tagName, {
60
+ ...attributes,
61
+ ref: mergeRefs([ref, setEl])
62
+ });
63
+ });
64
+ Component.displayName = displayName;
65
+ return Component;
66
+ }
67
+
68
+ //#endregion
69
+ export { createComponent };
@@ -0,0 +1,6 @@
1
+ //#region src/components/create-props.d.ts
2
+ type CreateProps<Props extends { [PropName in keyof Props]: unknown }, Events extends { [EventName in keyof Events]: CustomEvent }> = Props & CreateEventProps<Events>;
3
+ type CreateEventProps<Events extends { [EventName in keyof Events]: CustomEvent }> = { [EventName in keyof Events as `on${Capitalize<string & EventName>}`]: (event: EventName extends `${string}Change` ? Events[EventName]["detail"] : Events[EventName]) => void };
4
+
5
+ //#endregion
6
+ export { CreateProps };
@@ -0,0 +1,18 @@
1
+ import { createContext } from "preact";
2
+ import { useContext } from "preact/hooks";
3
+
4
+ //#region src/contexts/editor-context.ts
5
+ const editorContext = createContext(null);
6
+ /**
7
+ * @internal
8
+ */
9
+ function useEditorContext() {
10
+ return useContext(editorContext);
11
+ }
12
+ /**
13
+ * @internal
14
+ */
15
+ const EditorContextProvider = editorContext.Provider;
16
+
17
+ //#endregion
18
+ export { EditorContextProvider, useEditorContext };
@@ -1,8 +1,40 @@
1
- export { AutocompleteEmpty_alias_1 as AutocompleteEmpty } from './_tsup-dts-rollup.js';
2
- export { AutocompleteEmptyProps_alias_1 as AutocompleteEmptyProps } from './_tsup-dts-rollup.js';
3
- export { AutocompleteItem_alias_1 as AutocompleteItem } from './_tsup-dts-rollup.js';
4
- export { AutocompleteItemProps_alias_1 as AutocompleteItemProps } from './_tsup-dts-rollup.js';
5
- export { AutocompleteList_alias_1 as AutocompleteList } from './_tsup-dts-rollup.js';
6
- export { AutocompleteListProps_alias_1 as AutocompleteListProps } from './_tsup-dts-rollup.js';
7
- export { AutocompletePopover_alias_1 as AutocompletePopover } from './_tsup-dts-rollup.js';
8
- export { AutocompletePopoverProps_alias_1 as AutocompletePopoverProps } from './_tsup-dts-rollup.js';
1
+ import { CreateProps } from "./create-props-B_K0wKYy.js";
2
+ import { AutocompleteEmptyElement, AutocompleteEmptyEvents, AutocompleteEmptyProps as AutocompleteEmptyProps$1, AutocompleteItemElement, AutocompleteItemEvents, AutocompleteItemProps as AutocompleteItemProps$1, AutocompleteListElement, AutocompleteListEvents, AutocompleteListProps as AutocompleteListProps$1, AutocompletePopoverElement, AutocompletePopoverEvents, AutocompletePopoverProps as AutocompletePopoverProps$1 } from "@prosekit/web/autocomplete";
3
+ import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "preact/compat";
4
+
5
+ //#region src/components/autocomplete/autocomplete-empty.gen.d.ts
6
+ /**
7
+ * Props for the {@link AutocompleteEmpty} component.
8
+ */
9
+ /**
10
+ * Props for the {@link AutocompleteEmpty} component.
11
+ */
12
+ interface AutocompleteEmptyProps extends Partial<CreateProps<AutocompleteEmptyProps$1, AutocompleteEmptyEvents>> {}
13
+ declare const AutocompleteEmpty: ForwardRefExoticComponent<Partial<AutocompleteEmptyProps> & RefAttributes<AutocompleteEmptyElement> & HTMLAttributes<AutocompleteEmptyElement>>;
14
+
15
+ //#endregion
16
+ //#region src/components/autocomplete/autocomplete-item.gen.d.ts
17
+ /**
18
+ * Props for the {@link AutocompleteItem} component.
19
+ */
20
+ interface AutocompleteItemProps extends Partial<CreateProps<AutocompleteItemProps$1, AutocompleteItemEvents>> {}
21
+ declare const AutocompleteItem: ForwardRefExoticComponent<Partial<AutocompleteItemProps> & RefAttributes<AutocompleteItemElement> & HTMLAttributes<AutocompleteItemElement>>;
22
+
23
+ //#endregion
24
+ //#region src/components/autocomplete/autocomplete-list.gen.d.ts
25
+ /**
26
+ * Props for the {@link AutocompleteList} component.
27
+ */
28
+ interface AutocompleteListProps extends Partial<CreateProps<AutocompleteListProps$1, AutocompleteListEvents>> {}
29
+ declare const AutocompleteList: ForwardRefExoticComponent<Partial<AutocompleteListProps> & RefAttributes<AutocompleteListElement> & HTMLAttributes<AutocompleteListElement>>;
30
+
31
+ //#endregion
32
+ //#region src/components/autocomplete/autocomplete-popover.gen.d.ts
33
+ /**
34
+ * Props for the {@link AutocompletePopover} component.
35
+ */
36
+ interface AutocompletePopoverProps extends Partial<CreateProps<AutocompletePopoverProps$1, AutocompletePopoverEvents>> {}
37
+ declare const AutocompletePopover: ForwardRefExoticComponent<Partial<AutocompletePopoverProps> & RefAttributes<AutocompletePopoverElement> & HTMLAttributes<AutocompletePopoverElement>>;
38
+
39
+ //#endregion
40
+ export { AutocompleteEmpty, AutocompleteEmptyProps, AutocompleteItem, AutocompleteItemProps, AutocompleteList, AutocompleteListProps, AutocompletePopover, AutocompletePopoverProps };
@@ -1,58 +1,21 @@
1
- import {
2
- createComponent
3
- } from "./chunk-YJQWSMJE.js";
4
- import "./chunk-V253IGNY.js";
1
+ import "./editor-context-imq7MdJr.js";
2
+ import { createComponent } from "./create-component-BW93u26s.js";
3
+ import { autocompleteEmptyEvents, autocompleteEmptyProps, autocompleteItemEvents, autocompleteItemProps, autocompleteListEvents, autocompleteListProps, autocompletePopoverEvents, autocompletePopoverProps } from "@prosekit/web/autocomplete";
5
4
 
6
- // src/components/autocomplete/autocomplete-empty.gen.ts
7
- import {
8
- autocompleteEmptyProps,
9
- autocompleteEmptyEvents
10
- } from "@prosekit/web/autocomplete";
11
- var AutocompleteEmpty = createComponent(
12
- "prosekit-autocomplete-empty",
13
- "AutocompleteEmpty",
14
- Object.keys(autocompleteEmptyProps),
15
- Object.keys(autocompleteEmptyEvents)
16
- );
5
+ //#region src/components/autocomplete/autocomplete-empty.gen.ts
6
+ const AutocompleteEmpty = createComponent("prosekit-autocomplete-empty", "AutocompleteEmpty", Object.keys(autocompleteEmptyProps), Object.keys(autocompleteEmptyEvents));
17
7
 
18
- // src/components/autocomplete/autocomplete-item.gen.ts
19
- import {
20
- autocompleteItemProps,
21
- autocompleteItemEvents
22
- } from "@prosekit/web/autocomplete";
23
- var AutocompleteItem = createComponent(
24
- "prosekit-autocomplete-item",
25
- "AutocompleteItem",
26
- Object.keys(autocompleteItemProps),
27
- Object.keys(autocompleteItemEvents)
28
- );
8
+ //#endregion
9
+ //#region src/components/autocomplete/autocomplete-item.gen.ts
10
+ const AutocompleteItem = createComponent("prosekit-autocomplete-item", "AutocompleteItem", Object.keys(autocompleteItemProps), Object.keys(autocompleteItemEvents));
29
11
 
30
- // src/components/autocomplete/autocomplete-list.gen.ts
31
- import {
32
- autocompleteListProps,
33
- autocompleteListEvents
34
- } from "@prosekit/web/autocomplete";
35
- var AutocompleteList = createComponent(
36
- "prosekit-autocomplete-list",
37
- "AutocompleteList",
38
- Object.keys(autocompleteListProps),
39
- Object.keys(autocompleteListEvents)
40
- );
12
+ //#endregion
13
+ //#region src/components/autocomplete/autocomplete-list.gen.ts
14
+ const AutocompleteList = createComponent("prosekit-autocomplete-list", "AutocompleteList", Object.keys(autocompleteListProps), Object.keys(autocompleteListEvents));
41
15
 
42
- // src/components/autocomplete/autocomplete-popover.gen.ts
43
- import {
44
- autocompletePopoverProps,
45
- autocompletePopoverEvents
46
- } from "@prosekit/web/autocomplete";
47
- var AutocompletePopover = createComponent(
48
- "prosekit-autocomplete-popover",
49
- "AutocompletePopover",
50
- Object.keys(autocompletePopoverProps),
51
- Object.keys(autocompletePopoverEvents)
52
- );
53
- export {
54
- AutocompleteEmpty,
55
- AutocompleteItem,
56
- AutocompleteList,
57
- AutocompletePopover
58
- };
16
+ //#endregion
17
+ //#region src/components/autocomplete/autocomplete-popover.gen.ts
18
+ const AutocompletePopover = createComponent("prosekit-autocomplete-popover", "AutocompletePopover", Object.keys(autocompletePopoverProps), Object.keys(autocompletePopoverEvents));
19
+
20
+ //#endregion
21
+ export { AutocompleteEmpty, AutocompleteItem, AutocompleteList, AutocompletePopover };
@@ -1,6 +1,32 @@
1
- export { BlockHandleAdd_alias_1 as BlockHandleAdd } from './_tsup-dts-rollup.js';
2
- export { BlockHandleAddProps_alias_1 as BlockHandleAddProps } from './_tsup-dts-rollup.js';
3
- export { BlockHandleDraggable_alias_1 as BlockHandleDraggable } from './_tsup-dts-rollup.js';
4
- export { BlockHandleDraggableProps_alias_1 as BlockHandleDraggableProps } from './_tsup-dts-rollup.js';
5
- export { BlockHandlePopover_alias_1 as BlockHandlePopover } from './_tsup-dts-rollup.js';
6
- export { BlockHandlePopoverProps_alias_1 as BlockHandlePopoverProps } from './_tsup-dts-rollup.js';
1
+ import { CreateProps } from "./create-props-B_K0wKYy.js";
2
+ import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "preact/compat";
3
+ import { BlockHandleAddElement, BlockHandleAddEvents, BlockHandleAddProps as BlockHandleAddProps$1, BlockHandleDraggableElement, BlockHandleDraggableEvents, BlockHandleDraggableProps as BlockHandleDraggableProps$1, BlockHandlePopoverElement, BlockHandlePopoverEvents, BlockHandlePopoverProps as BlockHandlePopoverProps$1 } from "@prosekit/web/block-handle";
4
+
5
+ //#region src/components/block-handle/block-handle-add.gen.d.ts
6
+ /**
7
+ * Props for the {@link BlockHandleAdd} component.
8
+ */
9
+ /**
10
+ * Props for the {@link BlockHandleAdd} component.
11
+ */
12
+ interface BlockHandleAddProps extends Partial<CreateProps<BlockHandleAddProps$1, BlockHandleAddEvents>> {}
13
+ declare const BlockHandleAdd: ForwardRefExoticComponent<Partial<BlockHandleAddProps> & RefAttributes<BlockHandleAddElement> & HTMLAttributes<BlockHandleAddElement>>;
14
+
15
+ //#endregion
16
+ //#region src/components/block-handle/block-handle-draggable.gen.d.ts
17
+ /**
18
+ * Props for the {@link BlockHandleDraggable} component.
19
+ */
20
+ interface BlockHandleDraggableProps extends Partial<CreateProps<BlockHandleDraggableProps$1, BlockHandleDraggableEvents>> {}
21
+ declare const BlockHandleDraggable: ForwardRefExoticComponent<Partial<BlockHandleDraggableProps> & RefAttributes<BlockHandleDraggableElement> & HTMLAttributes<BlockHandleDraggableElement>>;
22
+
23
+ //#endregion
24
+ //#region src/components/block-handle/block-handle-popover.gen.d.ts
25
+ /**
26
+ * Props for the {@link BlockHandlePopover} component.
27
+ */
28
+ interface BlockHandlePopoverProps extends Partial<CreateProps<BlockHandlePopoverProps$1, BlockHandlePopoverEvents>> {}
29
+ declare const BlockHandlePopover: ForwardRefExoticComponent<Partial<BlockHandlePopoverProps> & RefAttributes<BlockHandlePopoverElement> & HTMLAttributes<BlockHandlePopoverElement>>;
30
+
31
+ //#endregion
32
+ export { BlockHandleAdd, BlockHandleAddProps, BlockHandleDraggable, BlockHandleDraggableProps, BlockHandlePopover, BlockHandlePopoverProps };
@@ -1,45 +1,17 @@
1
- import {
2
- createComponent
3
- } from "./chunk-YJQWSMJE.js";
4
- import "./chunk-V253IGNY.js";
1
+ import "./editor-context-imq7MdJr.js";
2
+ import { createComponent } from "./create-component-BW93u26s.js";
3
+ import { blockHandleAddEvents, blockHandleAddProps, blockHandleDraggableEvents, blockHandleDraggableProps, blockHandlePopoverEvents, blockHandlePopoverProps } from "@prosekit/web/block-handle";
5
4
 
6
- // src/components/block-handle/block-handle-add.gen.ts
7
- import {
8
- blockHandleAddProps,
9
- blockHandleAddEvents
10
- } from "@prosekit/web/block-handle";
11
- var BlockHandleAdd = createComponent(
12
- "prosekit-block-handle-add",
13
- "BlockHandleAdd",
14
- Object.keys(blockHandleAddProps),
15
- Object.keys(blockHandleAddEvents)
16
- );
5
+ //#region src/components/block-handle/block-handle-add.gen.ts
6
+ const BlockHandleAdd = createComponent("prosekit-block-handle-add", "BlockHandleAdd", Object.keys(blockHandleAddProps), Object.keys(blockHandleAddEvents));
17
7
 
18
- // src/components/block-handle/block-handle-draggable.gen.ts
19
- import {
20
- blockHandleDraggableProps,
21
- blockHandleDraggableEvents
22
- } from "@prosekit/web/block-handle";
23
- var BlockHandleDraggable = createComponent(
24
- "prosekit-block-handle-draggable",
25
- "BlockHandleDraggable",
26
- Object.keys(blockHandleDraggableProps),
27
- Object.keys(blockHandleDraggableEvents)
28
- );
8
+ //#endregion
9
+ //#region src/components/block-handle/block-handle-draggable.gen.ts
10
+ const BlockHandleDraggable = createComponent("prosekit-block-handle-draggable", "BlockHandleDraggable", Object.keys(blockHandleDraggableProps), Object.keys(blockHandleDraggableEvents));
29
11
 
30
- // src/components/block-handle/block-handle-popover.gen.ts
31
- import {
32
- blockHandlePopoverProps,
33
- blockHandlePopoverEvents
34
- } from "@prosekit/web/block-handle";
35
- var BlockHandlePopover = createComponent(
36
- "prosekit-block-handle-popover",
37
- "BlockHandlePopover",
38
- Object.keys(blockHandlePopoverProps),
39
- Object.keys(blockHandlePopoverEvents)
40
- );
41
- export {
42
- BlockHandleAdd,
43
- BlockHandleDraggable,
44
- BlockHandlePopover
45
- };
12
+ //#endregion
13
+ //#region src/components/block-handle/block-handle-popover.gen.ts
14
+ const BlockHandlePopover = createComponent("prosekit-block-handle-popover", "BlockHandlePopover", Object.keys(blockHandlePopoverProps), Object.keys(blockHandlePopoverEvents));
15
+
16
+ //#endregion
17
+ export { BlockHandleAdd, BlockHandleDraggable, BlockHandlePopover };
@@ -1,2 +1,16 @@
1
- export { InlinePopover } from './_tsup-dts-rollup.js';
2
- export { InlinePopoverProps } from './_tsup-dts-rollup.js';
1
+ import { CreateProps } from "./create-props-B_K0wKYy.js";
2
+ import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "preact/compat";
3
+ import { InlinePopoverElement, InlinePopoverEvents, InlinePopoverProps as InlinePopoverProps$1 } from "@prosekit/web/inline-popover";
4
+
5
+ //#region src/components/inline-popover/inline-popover.gen.d.ts
6
+ /**
7
+ * Props for the {@link InlinePopover} component.
8
+ */
9
+ /**
10
+ * Props for the {@link InlinePopover} component.
11
+ */
12
+ interface InlinePopoverProps extends Partial<CreateProps<InlinePopoverProps$1, InlinePopoverEvents>> {}
13
+ declare const InlinePopover: ForwardRefExoticComponent<Partial<InlinePopoverProps> & RefAttributes<InlinePopoverElement> & HTMLAttributes<InlinePopoverElement>>;
14
+
15
+ //#endregion
16
+ export { InlinePopover, InlinePopoverProps };
@@ -1,19 +1,9 @@
1
- import {
2
- createComponent
3
- } from "./chunk-YJQWSMJE.js";
4
- import "./chunk-V253IGNY.js";
1
+ import "./editor-context-imq7MdJr.js";
2
+ import { createComponent } from "./create-component-BW93u26s.js";
3
+ import { inlinePopoverEvents, inlinePopoverProps } from "@prosekit/web/inline-popover";
5
4
 
6
- // src/components/inline-popover/inline-popover.gen.ts
7
- import {
8
- inlinePopoverProps,
9
- inlinePopoverEvents
10
- } from "@prosekit/web/inline-popover";
11
- var InlinePopover = createComponent(
12
- "prosekit-inline-popover",
13
- "InlinePopover",
14
- Object.keys(inlinePopoverProps),
15
- Object.keys(inlinePopoverEvents)
16
- );
17
- export {
18
- InlinePopover
19
- };
5
+ //#region src/components/inline-popover/inline-popover.gen.ts
6
+ const InlinePopover = createComponent("prosekit-inline-popover", "InlinePopover", Object.keys(inlinePopoverProps), Object.keys(inlinePopoverEvents));
7
+
8
+ //#endregion
9
+ export { InlinePopover };
@@ -1,6 +1,32 @@
1
- export { PopoverContent } from './_tsup-dts-rollup.js';
2
- export { PopoverContentProps } from './_tsup-dts-rollup.js';
3
- export { PopoverRoot } from './_tsup-dts-rollup.js';
4
- export { PopoverRootProps } from './_tsup-dts-rollup.js';
5
- export { PopoverTrigger } from './_tsup-dts-rollup.js';
6
- export { PopoverTriggerProps } from './_tsup-dts-rollup.js';
1
+ import { CreateProps } from "./create-props-B_K0wKYy.js";
2
+ import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "preact/compat";
3
+ import { PopoverContentElement, PopoverContentEvents, PopoverContentProps as PopoverContentProps$1, PopoverRootElement, PopoverRootEvents, PopoverRootProps as PopoverRootProps$1, PopoverTriggerElement, PopoverTriggerEvents, PopoverTriggerProps as PopoverTriggerProps$1 } from "@prosekit/web/popover";
4
+
5
+ //#region src/components/popover/popover-content.gen.d.ts
6
+ /**
7
+ * Props for the {@link PopoverContent} component.
8
+ */
9
+ /**
10
+ * Props for the {@link PopoverContent} component.
11
+ */
12
+ interface PopoverContentProps extends Partial<CreateProps<PopoverContentProps$1, PopoverContentEvents>> {}
13
+ declare const PopoverContent: ForwardRefExoticComponent<Partial<PopoverContentProps> & RefAttributes<PopoverContentElement> & HTMLAttributes<PopoverContentElement>>;
14
+
15
+ //#endregion
16
+ //#region src/components/popover/popover-root.gen.d.ts
17
+ /**
18
+ * Props for the {@link PopoverRoot} component.
19
+ */
20
+ interface PopoverRootProps extends Partial<CreateProps<PopoverRootProps$1, PopoverRootEvents>> {}
21
+ declare const PopoverRoot: ForwardRefExoticComponent<Partial<PopoverRootProps> & RefAttributes<PopoverRootElement> & HTMLAttributes<PopoverRootElement>>;
22
+
23
+ //#endregion
24
+ //#region src/components/popover/popover-trigger.gen.d.ts
25
+ /**
26
+ * Props for the {@link PopoverTrigger} component.
27
+ */
28
+ interface PopoverTriggerProps extends Partial<CreateProps<PopoverTriggerProps$1, PopoverTriggerEvents>> {}
29
+ declare const PopoverTrigger: ForwardRefExoticComponent<Partial<PopoverTriggerProps> & RefAttributes<PopoverTriggerElement> & HTMLAttributes<PopoverTriggerElement>>;
30
+
31
+ //#endregion
32
+ export { PopoverContent, PopoverContentProps, PopoverRoot, PopoverRootProps, PopoverTrigger, PopoverTriggerProps };
@@ -1,45 +1,17 @@
1
- import {
2
- createComponent
3
- } from "./chunk-YJQWSMJE.js";
4
- import "./chunk-V253IGNY.js";
1
+ import "./editor-context-imq7MdJr.js";
2
+ import { createComponent } from "./create-component-BW93u26s.js";
3
+ import { popoverContentEvents, popoverContentProps, popoverRootEvents, popoverRootProps, popoverTriggerEvents, popoverTriggerProps } from "@prosekit/web/popover";
5
4
 
6
- // src/components/popover/popover-content.gen.ts
7
- import {
8
- popoverContentProps,
9
- popoverContentEvents
10
- } from "@prosekit/web/popover";
11
- var PopoverContent = createComponent(
12
- "prosekit-popover-content",
13
- "PopoverContent",
14
- Object.keys(popoverContentProps),
15
- Object.keys(popoverContentEvents)
16
- );
5
+ //#region src/components/popover/popover-content.gen.ts
6
+ const PopoverContent = createComponent("prosekit-popover-content", "PopoverContent", Object.keys(popoverContentProps), Object.keys(popoverContentEvents));
17
7
 
18
- // src/components/popover/popover-root.gen.ts
19
- import {
20
- popoverRootProps,
21
- popoverRootEvents
22
- } from "@prosekit/web/popover";
23
- var PopoverRoot = createComponent(
24
- "prosekit-popover-root",
25
- "PopoverRoot",
26
- Object.keys(popoverRootProps),
27
- Object.keys(popoverRootEvents)
28
- );
8
+ //#endregion
9
+ //#region src/components/popover/popover-root.gen.ts
10
+ const PopoverRoot = createComponent("prosekit-popover-root", "PopoverRoot", Object.keys(popoverRootProps), Object.keys(popoverRootEvents));
29
11
 
30
- // src/components/popover/popover-trigger.gen.ts
31
- import {
32
- popoverTriggerProps,
33
- popoverTriggerEvents
34
- } from "@prosekit/web/popover";
35
- var PopoverTrigger = createComponent(
36
- "prosekit-popover-trigger",
37
- "PopoverTrigger",
38
- Object.keys(popoverTriggerProps),
39
- Object.keys(popoverTriggerEvents)
40
- );
41
- export {
42
- PopoverContent,
43
- PopoverRoot,
44
- PopoverTrigger
45
- };
12
+ //#endregion
13
+ //#region src/components/popover/popover-trigger.gen.ts
14
+ const PopoverTrigger = createComponent("prosekit-popover-trigger", "PopoverTrigger", Object.keys(popoverTriggerProps), Object.keys(popoverTriggerEvents));
15
+
16
+ //#endregion
17
+ export { PopoverContent, PopoverRoot, PopoverTrigger };
@@ -1,4 +1,24 @@
1
- export { ResizableHandle } from './_tsup-dts-rollup.js';
2
- export { ResizableHandleProps } from './_tsup-dts-rollup.js';
3
- export { ResizableRoot } from './_tsup-dts-rollup.js';
4
- export { ResizableRootProps } from './_tsup-dts-rollup.js';
1
+ import { CreateProps } from "./create-props-B_K0wKYy.js";
2
+ import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "preact/compat";
3
+ import { ResizableHandleElement, ResizableHandleEvents, ResizableHandleProps as ResizableHandleProps$1, ResizableRootElement, ResizableRootEvents, ResizableRootProps as ResizableRootProps$1 } from "@prosekit/web/resizable";
4
+
5
+ //#region src/components/resizable/resizable-handle.gen.d.ts
6
+ /**
7
+ * Props for the {@link ResizableHandle} component.
8
+ */
9
+ /**
10
+ * Props for the {@link ResizableHandle} component.
11
+ */
12
+ interface ResizableHandleProps extends Partial<CreateProps<ResizableHandleProps$1, ResizableHandleEvents>> {}
13
+ declare const ResizableHandle: ForwardRefExoticComponent<Partial<ResizableHandleProps> & RefAttributes<ResizableHandleElement> & HTMLAttributes<ResizableHandleElement>>;
14
+
15
+ //#endregion
16
+ //#region src/components/resizable/resizable-root.gen.d.ts
17
+ /**
18
+ * Props for the {@link ResizableRoot} component.
19
+ */
20
+ interface ResizableRootProps extends Partial<CreateProps<ResizableRootProps$1, ResizableRootEvents>> {}
21
+ declare const ResizableRoot: ForwardRefExoticComponent<Partial<ResizableRootProps> & RefAttributes<ResizableRootElement> & HTMLAttributes<ResizableRootElement>>;
22
+
23
+ //#endregion
24
+ export { ResizableHandle, ResizableHandleProps, ResizableRoot, ResizableRootProps };
@@ -1,32 +1,13 @@
1
- import {
2
- createComponent
3
- } from "./chunk-YJQWSMJE.js";
4
- import "./chunk-V253IGNY.js";
1
+ import "./editor-context-imq7MdJr.js";
2
+ import { createComponent } from "./create-component-BW93u26s.js";
3
+ import { resizableHandleEvents, resizableHandleProps, resizableRootEvents, resizableRootProps } from "@prosekit/web/resizable";
5
4
 
6
- // src/components/resizable/resizable-handle.gen.ts
7
- import {
8
- resizableHandleProps,
9
- resizableHandleEvents
10
- } from "@prosekit/web/resizable";
11
- var ResizableHandle = createComponent(
12
- "prosekit-resizable-handle",
13
- "ResizableHandle",
14
- Object.keys(resizableHandleProps),
15
- Object.keys(resizableHandleEvents)
16
- );
5
+ //#region src/components/resizable/resizable-handle.gen.ts
6
+ const ResizableHandle = createComponent("prosekit-resizable-handle", "ResizableHandle", Object.keys(resizableHandleProps), Object.keys(resizableHandleEvents));
17
7
 
18
- // src/components/resizable/resizable-root.gen.ts
19
- import {
20
- resizableRootProps,
21
- resizableRootEvents
22
- } from "@prosekit/web/resizable";
23
- var ResizableRoot = createComponent(
24
- "prosekit-resizable-root",
25
- "ResizableRoot",
26
- Object.keys(resizableRootProps),
27
- Object.keys(resizableRootEvents)
28
- );
29
- export {
30
- ResizableHandle,
31
- ResizableRoot
32
- };
8
+ //#endregion
9
+ //#region src/components/resizable/resizable-root.gen.ts
10
+ const ResizableRoot = createComponent("prosekit-resizable-root", "ResizableRoot", Object.keys(resizableRootProps), Object.keys(resizableRootEvents));
11
+
12
+ //#endregion
13
+ export { ResizableHandle, ResizableRoot };
@@ -1,14 +1,64 @@
1
- export { TableHandleColumnRoot } from './_tsup-dts-rollup.js';
2
- export { TableHandleColumnRootProps } from './_tsup-dts-rollup.js';
3
- export { TableHandleColumnTrigger } from './_tsup-dts-rollup.js';
4
- export { TableHandleColumnTriggerProps } from './_tsup-dts-rollup.js';
5
- export { TableHandlePopoverContent } from './_tsup-dts-rollup.js';
6
- export { TableHandlePopoverContentProps } from './_tsup-dts-rollup.js';
7
- export { TableHandlePopoverItem } from './_tsup-dts-rollup.js';
8
- export { TableHandlePopoverItemProps } from './_tsup-dts-rollup.js';
9
- export { TableHandleRoot } from './_tsup-dts-rollup.js';
10
- export { TableHandleRootProps } from './_tsup-dts-rollup.js';
11
- export { TableHandleRowRoot } from './_tsup-dts-rollup.js';
12
- export { TableHandleRowRootProps } from './_tsup-dts-rollup.js';
13
- export { TableHandleRowTrigger } from './_tsup-dts-rollup.js';
14
- export { TableHandleRowTriggerProps } from './_tsup-dts-rollup.js';
1
+ import { CreateProps } from "./create-props-B_K0wKYy.js";
2
+ import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "preact/compat";
3
+ import { TableHandleColumnRootElement, TableHandleColumnRootEvents, TableHandleColumnRootProps as TableHandleColumnRootProps$1, TableHandleColumnTriggerElement, TableHandleColumnTriggerEvents, TableHandleColumnTriggerProps as TableHandleColumnTriggerProps$1, TableHandlePopoverContentElement, TableHandlePopoverContentEvents, TableHandlePopoverContentProps as TableHandlePopoverContentProps$1, TableHandlePopoverItemElement, TableHandlePopoverItemEvents, TableHandlePopoverItemProps as TableHandlePopoverItemProps$1, TableHandleRootElement, TableHandleRootEvents, TableHandleRootProps as TableHandleRootProps$1, TableHandleRowRootElement, TableHandleRowRootEvents, TableHandleRowRootProps as TableHandleRowRootProps$1, TableHandleRowTriggerElement, TableHandleRowTriggerEvents, TableHandleRowTriggerProps as TableHandleRowTriggerProps$1 } from "@prosekit/web/table-handle";
4
+
5
+ //#region src/components/table-handle/table-handle-column-root.gen.d.ts
6
+ /**
7
+ * Props for the {@link TableHandleColumnRoot} component.
8
+ */
9
+ /**
10
+ * Props for the {@link TableHandleColumnRoot} component.
11
+ */
12
+ interface TableHandleColumnRootProps extends Partial<CreateProps<TableHandleColumnRootProps$1, TableHandleColumnRootEvents>> {}
13
+ declare const TableHandleColumnRoot: ForwardRefExoticComponent<Partial<TableHandleColumnRootProps> & RefAttributes<TableHandleColumnRootElement> & HTMLAttributes<TableHandleColumnRootElement>>;
14
+
15
+ //#endregion
16
+ //#region src/components/table-handle/table-handle-column-trigger.gen.d.ts
17
+ /**
18
+ * Props for the {@link TableHandleColumnTrigger} component.
19
+ */
20
+ interface TableHandleColumnTriggerProps extends Partial<CreateProps<TableHandleColumnTriggerProps$1, TableHandleColumnTriggerEvents>> {}
21
+ declare const TableHandleColumnTrigger: ForwardRefExoticComponent<Partial<TableHandleColumnTriggerProps> & RefAttributes<TableHandleColumnTriggerElement> & HTMLAttributes<TableHandleColumnTriggerElement>>;
22
+
23
+ //#endregion
24
+ //#region src/components/table-handle/table-handle-popover-content.gen.d.ts
25
+ /**
26
+ * Props for the {@link TableHandlePopoverContent} component.
27
+ */
28
+ interface TableHandlePopoverContentProps extends Partial<CreateProps<TableHandlePopoverContentProps$1, TableHandlePopoverContentEvents>> {}
29
+ declare const TableHandlePopoverContent: ForwardRefExoticComponent<Partial<TableHandlePopoverContentProps> & RefAttributes<TableHandlePopoverContentElement> & HTMLAttributes<TableHandlePopoverContentElement>>;
30
+
31
+ //#endregion
32
+ //#region src/components/table-handle/table-handle-popover-item.gen.d.ts
33
+ /**
34
+ * Props for the {@link TableHandlePopoverItem} component.
35
+ */
36
+ interface TableHandlePopoverItemProps extends Partial<CreateProps<TableHandlePopoverItemProps$1, TableHandlePopoverItemEvents>> {}
37
+ declare const TableHandlePopoverItem: ForwardRefExoticComponent<Partial<TableHandlePopoverItemProps> & RefAttributes<TableHandlePopoverItemElement> & HTMLAttributes<TableHandlePopoverItemElement>>;
38
+
39
+ //#endregion
40
+ //#region src/components/table-handle/table-handle-root.gen.d.ts
41
+ /**
42
+ * Props for the {@link TableHandleRoot} component.
43
+ */
44
+ interface TableHandleRootProps extends Partial<CreateProps<TableHandleRootProps$1, TableHandleRootEvents>> {}
45
+ declare const TableHandleRoot: ForwardRefExoticComponent<Partial<TableHandleRootProps> & RefAttributes<TableHandleRootElement> & HTMLAttributes<TableHandleRootElement>>;
46
+
47
+ //#endregion
48
+ //#region src/components/table-handle/table-handle-row-root.gen.d.ts
49
+ /**
50
+ * Props for the {@link TableHandleRowRoot} component.
51
+ */
52
+ interface TableHandleRowRootProps extends Partial<CreateProps<TableHandleRowRootProps$1, TableHandleRowRootEvents>> {}
53
+ declare const TableHandleRowRoot: ForwardRefExoticComponent<Partial<TableHandleRowRootProps> & RefAttributes<TableHandleRowRootElement> & HTMLAttributes<TableHandleRowRootElement>>;
54
+
55
+ //#endregion
56
+ //#region src/components/table-handle/table-handle-row-trigger.gen.d.ts
57
+ /**
58
+ * Props for the {@link TableHandleRowTrigger} component.
59
+ */
60
+ interface TableHandleRowTriggerProps extends Partial<CreateProps<TableHandleRowTriggerProps$1, TableHandleRowTriggerEvents>> {}
61
+ declare const TableHandleRowTrigger: ForwardRefExoticComponent<Partial<TableHandleRowTriggerProps> & RefAttributes<TableHandleRowTriggerElement> & HTMLAttributes<TableHandleRowTriggerElement>>;
62
+
63
+ //#endregion
64
+ export { TableHandleColumnRoot, TableHandleColumnRootProps, TableHandleColumnTrigger, TableHandleColumnTriggerProps, TableHandlePopoverContent, TableHandlePopoverContentProps, TableHandlePopoverItem, TableHandlePopoverItemProps, TableHandleRoot, TableHandleRootProps, TableHandleRowRoot, TableHandleRowRootProps, TableHandleRowTrigger, TableHandleRowTriggerProps };