@prosekit/react 0.4.11 → 0.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/create-component-DATBjvTG.js +67 -0
- package/dist/create-props-B_K0wKYy.d.ts +6 -0
- package/dist/editor-context-Cci4uqN_.js +17 -0
- package/dist/prosekit-react-autocomplete.d.ts +40 -8
- package/dist/prosekit-react-autocomplete.js +17 -54
- package/dist/prosekit-react-block-handle.d.ts +32 -6
- package/dist/prosekit-react-block-handle.js +14 -42
- package/dist/prosekit-react-inline-popover.d.ts +16 -2
- package/dist/prosekit-react-inline-popover.js +8 -18
- package/dist/prosekit-react-popover.d.ts +32 -6
- package/dist/prosekit-react-popover.js +14 -42
- package/dist/prosekit-react-resizable.d.ts +24 -4
- package/dist/prosekit-react-resizable.js +11 -30
- package/dist/prosekit-react-table-handle.d.ts +64 -14
- package/dist/prosekit-react-table-handle.js +26 -90
- package/dist/prosekit-react-tooltip.d.ts +32 -6
- package/dist/prosekit-react-tooltip.js +14 -42
- package/dist/prosekit-react.d.ts +151 -17
- package/dist/prosekit-react.js +152 -195
- package/package.json +31 -22
- package/dist/_tsup-dts-rollup.d.ts +0 -574
- package/dist/chunk-BV2MZRRU.js +0 -15
- package/dist/chunk-VASCWPBI.js +0 -98
@@ -0,0 +1,67 @@
|
|
1
|
+
import { useEditorContext } from "./editor-context-Cci4uqN_.js";
|
2
|
+
import { createElement, forwardRef, useEffect, useLayoutEffect, useRef, useState } from "react";
|
3
|
+
import { mergeRefs } from "react-merge-refs";
|
4
|
+
|
5
|
+
//#region src/components/create-component.ts
|
6
|
+
const useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
7
|
+
function createComponent(tagName, displayName, propNames, eventNames) {
|
8
|
+
const hasEditor = propNames.includes("editor");
|
9
|
+
const lowerCaseEventNameMap = Object.fromEntries(eventNames.map((name) => [name.toLowerCase(), name]));
|
10
|
+
const Component = forwardRef((props, ref) => {
|
11
|
+
const [el, setEl] = useState(null);
|
12
|
+
const properties = {};
|
13
|
+
const attributes = {};
|
14
|
+
const eventHandlersRef = useRef({});
|
15
|
+
const eventHandlers = {};
|
16
|
+
for (const [name, value] of Object.entries(props)) {
|
17
|
+
if (value === void 0) continue;
|
18
|
+
if (propNames.includes(name)) {
|
19
|
+
properties[name] = value;
|
20
|
+
continue;
|
21
|
+
}
|
22
|
+
if (name.startsWith("on")) {
|
23
|
+
const lowerCaseEventName = name.slice(2).toLowerCase();
|
24
|
+
const eventName = lowerCaseEventNameMap[lowerCaseEventName];
|
25
|
+
const handler = value;
|
26
|
+
if (eventName && handler) {
|
27
|
+
const extractDetail = eventName.endsWith("Change");
|
28
|
+
const normalizedHandler = extractDetail ? (event) => {
|
29
|
+
handler(event.detail);
|
30
|
+
} : handler;
|
31
|
+
eventHandlers[eventName] = normalizedHandler;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
if (name === "className") attributes["class"] = value;
|
35
|
+
else attributes[name] = value;
|
36
|
+
}
|
37
|
+
const editor = useEditorContext();
|
38
|
+
if (hasEditor && editor && !properties["editor"]) properties["editor"] = editor;
|
39
|
+
useIsomorphicLayoutEffect(() => {
|
40
|
+
if (!el) return;
|
41
|
+
for (const [name, value] of Object.entries(properties)) if (value !== void 0) el[name] = value;
|
42
|
+
}, [el, ...propNames.map((name) => properties[name])]);
|
43
|
+
useIsomorphicLayoutEffect(() => {
|
44
|
+
eventHandlersRef.current = eventHandlers;
|
45
|
+
});
|
46
|
+
useIsomorphicLayoutEffect(() => {
|
47
|
+
if (!el) return;
|
48
|
+
const fixedEventHandlers = {};
|
49
|
+
for (const eventName of eventNames) fixedEventHandlers[eventName] = (event) => {
|
50
|
+
eventHandlersRef.current[eventName]?.(event);
|
51
|
+
};
|
52
|
+
for (const [name, handler] of Object.entries(fixedEventHandlers)) el.addEventListener(name, handler);
|
53
|
+
return () => {
|
54
|
+
for (const [name, handler] of Object.entries(fixedEventHandlers)) el.removeEventListener(name, handler);
|
55
|
+
};
|
56
|
+
}, [el]);
|
57
|
+
return createElement(tagName, {
|
58
|
+
...attributes,
|
59
|
+
ref: mergeRefs([ref, setEl])
|
60
|
+
});
|
61
|
+
});
|
62
|
+
Component.displayName = displayName;
|
63
|
+
return Component;
|
64
|
+
}
|
65
|
+
|
66
|
+
//#endregion
|
67
|
+
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,17 @@
|
|
1
|
+
import { createContext, useContext } from "react";
|
2
|
+
|
3
|
+
//#region src/contexts/editor-context.ts
|
4
|
+
const editorContext = createContext(null);
|
5
|
+
/**
|
6
|
+
* @internal
|
7
|
+
*/
|
8
|
+
function useEditorContext() {
|
9
|
+
return useContext(editorContext);
|
10
|
+
}
|
11
|
+
/**
|
12
|
+
* @internal
|
13
|
+
*/
|
14
|
+
const EditorContextProvider = editorContext.Provider;
|
15
|
+
|
16
|
+
//#endregion
|
17
|
+
export { EditorContextProvider, useEditorContext };
|
@@ -1,8 +1,40 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
import { CreateProps } from "./create-props-B_K0wKYy.js";
|
2
|
+
import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "react";
|
3
|
+
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";
|
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<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<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<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<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
|
-
|
3
|
-
} from "
|
4
|
-
import "./chunk-BV2MZRRU.js";
|
1
|
+
import "./editor-context-Cci4uqN_.js";
|
2
|
+
import { createComponent } from "./create-component-DATBjvTG.js";
|
3
|
+
import { autocompleteEmptyEvents, autocompleteEmptyProps, autocompleteItemEvents, autocompleteItemProps, autocompleteListEvents, autocompleteListProps, autocompletePopoverEvents, autocompletePopoverProps } from "@prosekit/web/autocomplete";
|
5
4
|
|
6
|
-
|
7
|
-
|
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
|
-
|
19
|
-
|
20
|
-
|
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
|
-
|
31
|
-
|
32
|
-
|
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
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
import { CreateProps } from "./create-props-B_K0wKYy.js";
|
2
|
+
import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "react";
|
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<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<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<BlockHandlePopoverProps & RefAttributes<BlockHandlePopoverElement> & HTMLAttributes<BlockHandlePopoverElement>>;
|
30
|
+
|
31
|
+
//#endregion
|
32
|
+
export { BlockHandleAdd, BlockHandleAddProps, BlockHandleDraggable, BlockHandleDraggableProps, BlockHandlePopover, BlockHandlePopoverProps };
|
@@ -1,45 +1,17 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
} from "
|
4
|
-
import "./chunk-BV2MZRRU.js";
|
1
|
+
import "./editor-context-Cci4uqN_.js";
|
2
|
+
import { createComponent } from "./create-component-DATBjvTG.js";
|
3
|
+
import { blockHandleAddEvents, blockHandleAddProps, blockHandleDraggableEvents, blockHandleDraggableProps, blockHandlePopoverEvents, blockHandlePopoverProps } from "@prosekit/web/block-handle";
|
5
4
|
|
6
|
-
|
7
|
-
|
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
|
-
|
19
|
-
|
20
|
-
|
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
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
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
|
-
|
2
|
-
|
1
|
+
import { CreateProps } from "./create-props-B_K0wKYy.js";
|
2
|
+
import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "react";
|
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<InlinePopoverProps & RefAttributes<InlinePopoverElement> & HTMLAttributes<InlinePopoverElement>>;
|
14
|
+
|
15
|
+
//#endregion
|
16
|
+
export { InlinePopover, InlinePopoverProps };
|
@@ -1,19 +1,9 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
} from "
|
4
|
-
import "./chunk-BV2MZRRU.js";
|
1
|
+
import "./editor-context-Cci4uqN_.js";
|
2
|
+
import { createComponent } from "./create-component-DATBjvTG.js";
|
3
|
+
import { inlinePopoverEvents, inlinePopoverProps } from "@prosekit/web/inline-popover";
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
import { CreateProps } from "./create-props-B_K0wKYy.js";
|
2
|
+
import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "react";
|
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<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<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<PopoverTriggerProps & RefAttributes<PopoverTriggerElement> & HTMLAttributes<PopoverTriggerElement>>;
|
30
|
+
|
31
|
+
//#endregion
|
32
|
+
export { PopoverContent, PopoverContentProps, PopoverRoot, PopoverRootProps, PopoverTrigger, PopoverTriggerProps };
|
@@ -1,45 +1,17 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
} from "
|
4
|
-
import "./chunk-BV2MZRRU.js";
|
1
|
+
import "./editor-context-Cci4uqN_.js";
|
2
|
+
import { createComponent } from "./create-component-DATBjvTG.js";
|
3
|
+
import { popoverContentEvents, popoverContentProps, popoverRootEvents, popoverRootProps, popoverTriggerEvents, popoverTriggerProps } from "@prosekit/web/popover";
|
5
4
|
|
6
|
-
|
7
|
-
|
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
|
-
|
19
|
-
|
20
|
-
|
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
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
import { CreateProps } from "./create-props-B_K0wKYy.js";
|
2
|
+
import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "react";
|
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<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<ResizableRootProps & RefAttributes<ResizableRootElement> & HTMLAttributes<ResizableRootElement>>;
|
22
|
+
|
23
|
+
//#endregion
|
24
|
+
export { ResizableHandle, ResizableHandleProps, ResizableRoot, ResizableRootProps };
|
@@ -1,32 +1,13 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
} from "
|
4
|
-
import "./chunk-BV2MZRRU.js";
|
1
|
+
import "./editor-context-Cci4uqN_.js";
|
2
|
+
import { createComponent } from "./create-component-DATBjvTG.js";
|
3
|
+
import { resizableHandleEvents, resizableHandleProps, resizableRootEvents, resizableRootProps } from "@prosekit/web/resizable";
|
5
4
|
|
6
|
-
|
7
|
-
|
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
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
import { CreateProps } from "./create-props-B_K0wKYy.js";
|
2
|
+
import { ForwardRefExoticComponent, HTMLAttributes, RefAttributes } from "react";
|
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<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<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<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<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<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<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<TableHandleRowTriggerProps & RefAttributes<TableHandleRowTriggerElement> & HTMLAttributes<TableHandleRowTriggerElement>>;
|
62
|
+
|
63
|
+
//#endregion
|
64
|
+
export { TableHandleColumnRoot, TableHandleColumnRootProps, TableHandleColumnTrigger, TableHandleColumnTriggerProps, TableHandlePopoverContent, TableHandlePopoverContentProps, TableHandlePopoverItem, TableHandlePopoverItemProps, TableHandleRoot, TableHandleRootProps, TableHandleRowRoot, TableHandleRowRootProps, TableHandleRowTrigger, TableHandleRowTriggerProps };
|