@prosekit/preact 0.5.0 → 0.5.1
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-D7yDR5ux.js +2 -1
- package/dist/create-component-D7yDR5ux.js.map +1 -0
- package/dist/{create-props-CkTwd_m_.d.ts → create-props-EGV61dJR.d.ts} +3 -2
- package/dist/create-props-EGV61dJR.d.ts.map +1 -0
- package/dist/editor-context-imq7MdJr.js +2 -1
- package/dist/editor-context-imq7MdJr.js.map +1 -0
- package/dist/prosekit-preact-autocomplete.d.ts +11 -10
- package/dist/prosekit-preact-autocomplete.d.ts.map +1 -0
- package/dist/prosekit-preact-autocomplete.js +2 -1
- package/dist/prosekit-preact-autocomplete.js.map +1 -0
- package/dist/prosekit-preact-block-handle.d.ts +9 -8
- package/dist/prosekit-preact-block-handle.d.ts.map +1 -0
- package/dist/prosekit-preact-block-handle.js +2 -1
- package/dist/prosekit-preact-block-handle.js.map +1 -0
- package/dist/prosekit-preact-drop-indicator.d.ts +5 -4
- package/dist/prosekit-preact-drop-indicator.d.ts.map +1 -0
- package/dist/prosekit-preact-drop-indicator.js +2 -1
- package/dist/prosekit-preact-drop-indicator.js.map +1 -0
- package/dist/prosekit-preact-inline-popover.d.ts +5 -4
- package/dist/prosekit-preact-inline-popover.d.ts.map +1 -0
- package/dist/prosekit-preact-inline-popover.js +2 -1
- package/dist/prosekit-preact-inline-popover.js.map +1 -0
- package/dist/prosekit-preact-popover.d.ts +9 -8
- package/dist/prosekit-preact-popover.d.ts.map +1 -0
- package/dist/prosekit-preact-popover.js +2 -1
- package/dist/prosekit-preact-popover.js.map +1 -0
- package/dist/prosekit-preact-resizable.d.ts +7 -6
- package/dist/prosekit-preact-resizable.d.ts.map +1 -0
- package/dist/prosekit-preact-resizable.js +2 -1
- package/dist/prosekit-preact-resizable.js.map +1 -0
- package/dist/prosekit-preact-table-handle.d.ts +21 -20
- package/dist/prosekit-preact-table-handle.d.ts.map +1 -0
- package/dist/prosekit-preact-table-handle.js +2 -1
- package/dist/prosekit-preact-table-handle.js.map +1 -0
- package/dist/prosekit-preact-tooltip.d.ts +9 -8
- package/dist/prosekit-preact-tooltip.d.ts.map +1 -0
- package/dist/prosekit-preact-tooltip.js +2 -1
- package/dist/prosekit-preact-tooltip.js.map +1 -0
- package/dist/prosekit-preact.d.ts +40 -34
- package/dist/prosekit-preact.d.ts.map +1 -0
- package/dist/prosekit-preact.js +2 -1
- package/dist/prosekit-preact.js.map +1 -0
- package/package.json +14 -14
- package/src/components/autocomplete/autocomplete-empty.gen.ts +34 -0
- package/src/components/autocomplete/autocomplete-item.gen.ts +34 -0
- package/src/components/autocomplete/autocomplete-list.gen.ts +34 -0
- package/src/components/autocomplete/autocomplete-popover.gen.ts +34 -0
- package/src/components/autocomplete/index.gen.ts +7 -0
- package/src/components/block-handle/block-handle-add.gen.ts +34 -0
- package/src/components/block-handle/block-handle-draggable.gen.ts +34 -0
- package/src/components/block-handle/block-handle-popover.gen.ts +34 -0
- package/src/components/block-handle/index.gen.ts +5 -0
- package/src/components/create-component.ts +135 -0
- package/src/components/create-props.ts +13 -0
- package/src/components/drop-indicator/drop-indicator.gen.ts +34 -0
- package/src/components/drop-indicator/index.gen.ts +1 -0
- package/src/components/inline-popover/index.gen.ts +1 -0
- package/src/components/inline-popover/inline-popover.gen.ts +34 -0
- package/src/components/merge-refs.ts +35 -0
- package/src/components/popover/index.gen.ts +5 -0
- package/src/components/popover/popover-content.gen.ts +34 -0
- package/src/components/popover/popover-root.gen.ts +34 -0
- package/src/components/popover/popover-trigger.gen.ts +34 -0
- package/src/components/prosekit.ts +24 -0
- package/src/components/resizable/index.gen.ts +3 -0
- package/src/components/resizable/resizable-handle.gen.ts +34 -0
- package/src/components/resizable/resizable-root.gen.ts +34 -0
- package/src/components/table-handle/index.gen.ts +17 -0
- package/src/components/table-handle/table-handle-column-root.gen.ts +34 -0
- package/src/components/table-handle/table-handle-column-trigger.gen.ts +34 -0
- package/src/components/table-handle/table-handle-drag-preview.gen.ts +34 -0
- package/src/components/table-handle/table-handle-drop-indicator.gen.ts +34 -0
- package/src/components/table-handle/table-handle-popover-content.gen.ts +34 -0
- package/src/components/table-handle/table-handle-popover-item.gen.ts +34 -0
- package/src/components/table-handle/table-handle-root.gen.ts +34 -0
- package/src/components/table-handle/table-handle-row-root.gen.ts +34 -0
- package/src/components/table-handle/table-handle-row-trigger.gen.ts +34 -0
- package/src/components/tooltip/index.gen.ts +5 -0
- package/src/components/tooltip/tooltip-content.gen.ts +34 -0
- package/src/components/tooltip/tooltip-root.gen.ts +34 -0
- package/src/components/tooltip/tooltip-trigger.gen.ts +34 -0
- package/src/contexts/editor-context.ts +23 -0
- package/src/hooks/use-doc-change.ts +24 -0
- package/src/hooks/use-editor-extension.ts +24 -0
- package/src/hooks/use-editor.ts +57 -0
- package/src/hooks/use-extension.ts +41 -0
- package/src/hooks/use-keymap.ts +15 -0
- package/src/hooks/use-priority-extension.ts +18 -0
- package/src/hooks/use-state-update.ts +24 -0
- package/src/index.ts +16 -0
- package/src/types.ts +16 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type DropIndicatorElement,
|
|
3
|
+
type DropIndicatorProps as Props,
|
|
4
|
+
type DropIndicatorEvents as Events,
|
|
5
|
+
dropIndicatorProps,
|
|
6
|
+
dropIndicatorEvents,
|
|
7
|
+
} from '@prosekit/web/drop-indicator'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link DropIndicator} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface DropIndicatorProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const DropIndicator: ForwardRefExoticComponent<
|
|
23
|
+
Partial<DropIndicatorProps> &
|
|
24
|
+
RefAttributes<DropIndicatorElement> &
|
|
25
|
+
HTMLAttributes<DropIndicatorElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
DropIndicatorProps,
|
|
28
|
+
DropIndicatorElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-drop-indicator',
|
|
31
|
+
'DropIndicator',
|
|
32
|
+
Object.keys(dropIndicatorProps),
|
|
33
|
+
Object.keys(dropIndicatorEvents),
|
|
34
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropIndicator, type DropIndicatorProps } from './drop-indicator.gen'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InlinePopover, type InlinePopoverProps } from './inline-popover.gen'
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type InlinePopoverElement,
|
|
3
|
+
type InlinePopoverProps as Props,
|
|
4
|
+
type InlinePopoverEvents as Events,
|
|
5
|
+
inlinePopoverProps,
|
|
6
|
+
inlinePopoverEvents,
|
|
7
|
+
} from '@prosekit/web/inline-popover'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link InlinePopover} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface InlinePopoverProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const InlinePopover: ForwardRefExoticComponent<
|
|
23
|
+
Partial<InlinePopoverProps> &
|
|
24
|
+
RefAttributes<InlinePopoverElement> &
|
|
25
|
+
HTMLAttributes<InlinePopoverElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
InlinePopoverProps,
|
|
28
|
+
InlinePopoverElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-inline-popover',
|
|
31
|
+
'InlinePopover',
|
|
32
|
+
Object.keys(inlinePopoverProps),
|
|
33
|
+
Object.keys(inlinePopoverEvents),
|
|
34
|
+
)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Ref } from 'preact'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Assigns a value to a ref.
|
|
5
|
+
* @returns The ref cleanup callback, if any.
|
|
6
|
+
*/
|
|
7
|
+
function assignRef<T>(
|
|
8
|
+
ref: Ref<T> | undefined,
|
|
9
|
+
value: T | null,
|
|
10
|
+
): VoidFunction | undefined | void {
|
|
11
|
+
if (typeof ref === 'function') {
|
|
12
|
+
return ref(value)
|
|
13
|
+
} else if (ref) {
|
|
14
|
+
ref.current = value
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Merges multiple refs into a single one.
|
|
20
|
+
*/
|
|
21
|
+
export function mergeRefs<T>(refs: (Ref<T> | undefined)[]): Ref<T> {
|
|
22
|
+
return (value: T | null) => {
|
|
23
|
+
const cleanups: VoidFunction[] = []
|
|
24
|
+
|
|
25
|
+
for (const ref of refs) {
|
|
26
|
+
const cleanup = assignRef(ref, value)
|
|
27
|
+
const isCleanup = typeof cleanup === 'function'
|
|
28
|
+
cleanups.push(isCleanup ? cleanup : () => assignRef(ref, null))
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return () => {
|
|
32
|
+
for (const cleanup of cleanups) cleanup()
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type PopoverContentElement,
|
|
3
|
+
type PopoverContentProps as Props,
|
|
4
|
+
type PopoverContentEvents as Events,
|
|
5
|
+
popoverContentProps,
|
|
6
|
+
popoverContentEvents,
|
|
7
|
+
} from '@prosekit/web/popover'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link PopoverContent} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface PopoverContentProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const PopoverContent: ForwardRefExoticComponent<
|
|
23
|
+
Partial<PopoverContentProps> &
|
|
24
|
+
RefAttributes<PopoverContentElement> &
|
|
25
|
+
HTMLAttributes<PopoverContentElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
PopoverContentProps,
|
|
28
|
+
PopoverContentElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-popover-content',
|
|
31
|
+
'PopoverContent',
|
|
32
|
+
Object.keys(popoverContentProps),
|
|
33
|
+
Object.keys(popoverContentEvents),
|
|
34
|
+
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type PopoverRootElement,
|
|
3
|
+
type PopoverRootProps as Props,
|
|
4
|
+
type PopoverRootEvents as Events,
|
|
5
|
+
popoverRootProps,
|
|
6
|
+
popoverRootEvents,
|
|
7
|
+
} from '@prosekit/web/popover'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link PopoverRoot} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface PopoverRootProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const PopoverRoot: ForwardRefExoticComponent<
|
|
23
|
+
Partial<PopoverRootProps> &
|
|
24
|
+
RefAttributes<PopoverRootElement> &
|
|
25
|
+
HTMLAttributes<PopoverRootElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
PopoverRootProps,
|
|
28
|
+
PopoverRootElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-popover-root',
|
|
31
|
+
'PopoverRoot',
|
|
32
|
+
Object.keys(popoverRootProps),
|
|
33
|
+
Object.keys(popoverRootEvents),
|
|
34
|
+
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type PopoverTriggerElement,
|
|
3
|
+
type PopoverTriggerProps as Props,
|
|
4
|
+
type PopoverTriggerEvents as Events,
|
|
5
|
+
popoverTriggerProps,
|
|
6
|
+
popoverTriggerEvents,
|
|
7
|
+
} from '@prosekit/web/popover'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link PopoverTrigger} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface PopoverTriggerProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const PopoverTrigger: ForwardRefExoticComponent<
|
|
23
|
+
Partial<PopoverTriggerProps> &
|
|
24
|
+
RefAttributes<PopoverTriggerElement> &
|
|
25
|
+
HTMLAttributes<PopoverTriggerElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
PopoverTriggerProps,
|
|
28
|
+
PopoverTriggerElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-popover-trigger',
|
|
31
|
+
'PopoverTrigger',
|
|
32
|
+
Object.keys(popoverTriggerProps),
|
|
33
|
+
Object.keys(popoverTriggerEvents),
|
|
34
|
+
)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Editor } from '@prosekit/core'
|
|
2
|
+
import {
|
|
3
|
+
h,
|
|
4
|
+
type ComponentChildren,
|
|
5
|
+
type ComponentType,
|
|
6
|
+
} from 'preact'
|
|
7
|
+
|
|
8
|
+
import { EditorContextProvider } from '../contexts/editor-context'
|
|
9
|
+
|
|
10
|
+
export interface ProseKitProps {
|
|
11
|
+
editor: Editor
|
|
12
|
+
children?: ComponentChildren
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The root component for a ProseKit editor.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export const ProseKit: ComponentType<ProseKitProps> = (props) => {
|
|
21
|
+
const { editor, children } = props
|
|
22
|
+
|
|
23
|
+
return h(EditorContextProvider, { value: editor, children })
|
|
24
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ResizableHandleElement,
|
|
3
|
+
type ResizableHandleProps as Props,
|
|
4
|
+
type ResizableHandleEvents as Events,
|
|
5
|
+
resizableHandleProps,
|
|
6
|
+
resizableHandleEvents,
|
|
7
|
+
} from '@prosekit/web/resizable'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link ResizableHandle} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface ResizableHandleProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const ResizableHandle: ForwardRefExoticComponent<
|
|
23
|
+
Partial<ResizableHandleProps> &
|
|
24
|
+
RefAttributes<ResizableHandleElement> &
|
|
25
|
+
HTMLAttributes<ResizableHandleElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
ResizableHandleProps,
|
|
28
|
+
ResizableHandleElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-resizable-handle',
|
|
31
|
+
'ResizableHandle',
|
|
32
|
+
Object.keys(resizableHandleProps),
|
|
33
|
+
Object.keys(resizableHandleEvents),
|
|
34
|
+
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ResizableRootElement,
|
|
3
|
+
type ResizableRootProps as Props,
|
|
4
|
+
type ResizableRootEvents as Events,
|
|
5
|
+
resizableRootProps,
|
|
6
|
+
resizableRootEvents,
|
|
7
|
+
} from '@prosekit/web/resizable'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link ResizableRoot} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface ResizableRootProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const ResizableRoot: ForwardRefExoticComponent<
|
|
23
|
+
Partial<ResizableRootProps> &
|
|
24
|
+
RefAttributes<ResizableRootElement> &
|
|
25
|
+
HTMLAttributes<ResizableRootElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
ResizableRootProps,
|
|
28
|
+
ResizableRootElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-resizable-root',
|
|
31
|
+
'ResizableRoot',
|
|
32
|
+
Object.keys(resizableRootProps),
|
|
33
|
+
Object.keys(resizableRootEvents),
|
|
34
|
+
)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { TableHandleColumnRoot, type TableHandleColumnRootProps } from './table-handle-column-root.gen'
|
|
2
|
+
|
|
3
|
+
export { TableHandleColumnTrigger, type TableHandleColumnTriggerProps } from './table-handle-column-trigger.gen'
|
|
4
|
+
|
|
5
|
+
export { TableHandleDragPreview, type TableHandleDragPreviewProps } from './table-handle-drag-preview.gen'
|
|
6
|
+
|
|
7
|
+
export { TableHandleDropIndicator, type TableHandleDropIndicatorProps } from './table-handle-drop-indicator.gen'
|
|
8
|
+
|
|
9
|
+
export { TableHandlePopoverContent, type TableHandlePopoverContentProps } from './table-handle-popover-content.gen'
|
|
10
|
+
|
|
11
|
+
export { TableHandlePopoverItem, type TableHandlePopoverItemProps } from './table-handle-popover-item.gen'
|
|
12
|
+
|
|
13
|
+
export { TableHandleRoot, type TableHandleRootProps } from './table-handle-root.gen'
|
|
14
|
+
|
|
15
|
+
export { TableHandleRowRoot, type TableHandleRowRootProps } from './table-handle-row-root.gen'
|
|
16
|
+
|
|
17
|
+
export { TableHandleRowTrigger, type TableHandleRowTriggerProps } from './table-handle-row-trigger.gen'
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type TableHandleColumnRootElement,
|
|
3
|
+
type TableHandleColumnRootProps as Props,
|
|
4
|
+
type TableHandleColumnRootEvents as Events,
|
|
5
|
+
tableHandleColumnRootProps,
|
|
6
|
+
tableHandleColumnRootEvents,
|
|
7
|
+
} from '@prosekit/web/table-handle'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link TableHandleColumnRoot} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface TableHandleColumnRootProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const TableHandleColumnRoot: ForwardRefExoticComponent<
|
|
23
|
+
Partial<TableHandleColumnRootProps> &
|
|
24
|
+
RefAttributes<TableHandleColumnRootElement> &
|
|
25
|
+
HTMLAttributes<TableHandleColumnRootElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
TableHandleColumnRootProps,
|
|
28
|
+
TableHandleColumnRootElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-table-handle-column-root',
|
|
31
|
+
'TableHandleColumnRoot',
|
|
32
|
+
Object.keys(tableHandleColumnRootProps),
|
|
33
|
+
Object.keys(tableHandleColumnRootEvents),
|
|
34
|
+
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type TableHandleColumnTriggerElement,
|
|
3
|
+
type TableHandleColumnTriggerProps as Props,
|
|
4
|
+
type TableHandleColumnTriggerEvents as Events,
|
|
5
|
+
tableHandleColumnTriggerProps,
|
|
6
|
+
tableHandleColumnTriggerEvents,
|
|
7
|
+
} from '@prosekit/web/table-handle'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link TableHandleColumnTrigger} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface TableHandleColumnTriggerProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const TableHandleColumnTrigger: ForwardRefExoticComponent<
|
|
23
|
+
Partial<TableHandleColumnTriggerProps> &
|
|
24
|
+
RefAttributes<TableHandleColumnTriggerElement> &
|
|
25
|
+
HTMLAttributes<TableHandleColumnTriggerElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
TableHandleColumnTriggerProps,
|
|
28
|
+
TableHandleColumnTriggerElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-table-handle-column-trigger',
|
|
31
|
+
'TableHandleColumnTrigger',
|
|
32
|
+
Object.keys(tableHandleColumnTriggerProps),
|
|
33
|
+
Object.keys(tableHandleColumnTriggerEvents),
|
|
34
|
+
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type TableHandleDragPreviewElement,
|
|
3
|
+
type TableHandleDragPreviewProps as Props,
|
|
4
|
+
type TableHandleDragPreviewEvents as Events,
|
|
5
|
+
tableHandleDragPreviewProps,
|
|
6
|
+
tableHandleDragPreviewEvents,
|
|
7
|
+
} from '@prosekit/web/table-handle'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link TableHandleDragPreview} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface TableHandleDragPreviewProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const TableHandleDragPreview: ForwardRefExoticComponent<
|
|
23
|
+
Partial<TableHandleDragPreviewProps> &
|
|
24
|
+
RefAttributes<TableHandleDragPreviewElement> &
|
|
25
|
+
HTMLAttributes<TableHandleDragPreviewElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
TableHandleDragPreviewProps,
|
|
28
|
+
TableHandleDragPreviewElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-table-handle-drag-preview',
|
|
31
|
+
'TableHandleDragPreview',
|
|
32
|
+
Object.keys(tableHandleDragPreviewProps),
|
|
33
|
+
Object.keys(tableHandleDragPreviewEvents),
|
|
34
|
+
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type TableHandleDropIndicatorElement,
|
|
3
|
+
type TableHandleDropIndicatorProps as Props,
|
|
4
|
+
type TableHandleDropIndicatorEvents as Events,
|
|
5
|
+
tableHandleDropIndicatorProps,
|
|
6
|
+
tableHandleDropIndicatorEvents,
|
|
7
|
+
} from '@prosekit/web/table-handle'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link TableHandleDropIndicator} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface TableHandleDropIndicatorProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const TableHandleDropIndicator: ForwardRefExoticComponent<
|
|
23
|
+
Partial<TableHandleDropIndicatorProps> &
|
|
24
|
+
RefAttributes<TableHandleDropIndicatorElement> &
|
|
25
|
+
HTMLAttributes<TableHandleDropIndicatorElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
TableHandleDropIndicatorProps,
|
|
28
|
+
TableHandleDropIndicatorElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-table-handle-drop-indicator',
|
|
31
|
+
'TableHandleDropIndicator',
|
|
32
|
+
Object.keys(tableHandleDropIndicatorProps),
|
|
33
|
+
Object.keys(tableHandleDropIndicatorEvents),
|
|
34
|
+
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type TableHandlePopoverContentElement,
|
|
3
|
+
type TableHandlePopoverContentProps as Props,
|
|
4
|
+
type TableHandlePopoverContentEvents as Events,
|
|
5
|
+
tableHandlePopoverContentProps,
|
|
6
|
+
tableHandlePopoverContentEvents,
|
|
7
|
+
} from '@prosekit/web/table-handle'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link TableHandlePopoverContent} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface TableHandlePopoverContentProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const TableHandlePopoverContent: ForwardRefExoticComponent<
|
|
23
|
+
Partial<TableHandlePopoverContentProps> &
|
|
24
|
+
RefAttributes<TableHandlePopoverContentElement> &
|
|
25
|
+
HTMLAttributes<TableHandlePopoverContentElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
TableHandlePopoverContentProps,
|
|
28
|
+
TableHandlePopoverContentElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-table-handle-popover-content',
|
|
31
|
+
'TableHandlePopoverContent',
|
|
32
|
+
Object.keys(tableHandlePopoverContentProps),
|
|
33
|
+
Object.keys(tableHandlePopoverContentEvents),
|
|
34
|
+
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type TableHandlePopoverItemElement,
|
|
3
|
+
type TableHandlePopoverItemProps as Props,
|
|
4
|
+
type TableHandlePopoverItemEvents as Events,
|
|
5
|
+
tableHandlePopoverItemProps,
|
|
6
|
+
tableHandlePopoverItemEvents,
|
|
7
|
+
} from '@prosekit/web/table-handle'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link TableHandlePopoverItem} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface TableHandlePopoverItemProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const TableHandlePopoverItem: ForwardRefExoticComponent<
|
|
23
|
+
Partial<TableHandlePopoverItemProps> &
|
|
24
|
+
RefAttributes<TableHandlePopoverItemElement> &
|
|
25
|
+
HTMLAttributes<TableHandlePopoverItemElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
TableHandlePopoverItemProps,
|
|
28
|
+
TableHandlePopoverItemElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-table-handle-popover-item',
|
|
31
|
+
'TableHandlePopoverItem',
|
|
32
|
+
Object.keys(tableHandlePopoverItemProps),
|
|
33
|
+
Object.keys(tableHandlePopoverItemEvents),
|
|
34
|
+
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type TableHandleRootElement,
|
|
3
|
+
type TableHandleRootProps as Props,
|
|
4
|
+
type TableHandleRootEvents as Events,
|
|
5
|
+
tableHandleRootProps,
|
|
6
|
+
tableHandleRootEvents,
|
|
7
|
+
} from '@prosekit/web/table-handle'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link TableHandleRoot} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface TableHandleRootProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const TableHandleRoot: ForwardRefExoticComponent<
|
|
23
|
+
Partial<TableHandleRootProps> &
|
|
24
|
+
RefAttributes<TableHandleRootElement> &
|
|
25
|
+
HTMLAttributes<TableHandleRootElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
TableHandleRootProps,
|
|
28
|
+
TableHandleRootElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-table-handle-root',
|
|
31
|
+
'TableHandleRoot',
|
|
32
|
+
Object.keys(tableHandleRootProps),
|
|
33
|
+
Object.keys(tableHandleRootEvents),
|
|
34
|
+
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type TableHandleRowRootElement,
|
|
3
|
+
type TableHandleRowRootProps as Props,
|
|
4
|
+
type TableHandleRowRootEvents as Events,
|
|
5
|
+
tableHandleRowRootProps,
|
|
6
|
+
tableHandleRowRootEvents,
|
|
7
|
+
} from '@prosekit/web/table-handle'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link TableHandleRowRoot} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface TableHandleRowRootProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const TableHandleRowRoot: ForwardRefExoticComponent<
|
|
23
|
+
Partial<TableHandleRowRootProps> &
|
|
24
|
+
RefAttributes<TableHandleRowRootElement> &
|
|
25
|
+
HTMLAttributes<TableHandleRowRootElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
TableHandleRowRootProps,
|
|
28
|
+
TableHandleRowRootElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-table-handle-row-root',
|
|
31
|
+
'TableHandleRowRoot',
|
|
32
|
+
Object.keys(tableHandleRowRootProps),
|
|
33
|
+
Object.keys(tableHandleRowRootEvents),
|
|
34
|
+
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type TableHandleRowTriggerElement,
|
|
3
|
+
type TableHandleRowTriggerProps as Props,
|
|
4
|
+
type TableHandleRowTriggerEvents as Events,
|
|
5
|
+
tableHandleRowTriggerProps,
|
|
6
|
+
tableHandleRowTriggerEvents,
|
|
7
|
+
} from '@prosekit/web/table-handle'
|
|
8
|
+
import type {
|
|
9
|
+
ForwardRefExoticComponent,
|
|
10
|
+
HTMLAttributes,
|
|
11
|
+
RefAttributes,
|
|
12
|
+
} from 'preact/compat'
|
|
13
|
+
|
|
14
|
+
import { createComponent } from '../create-component'
|
|
15
|
+
import type { CreateProps } from '../create-props'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for the {@link TableHandleRowTrigger} component.
|
|
19
|
+
*/
|
|
20
|
+
export interface TableHandleRowTriggerProps extends Partial<CreateProps<Props, Events>> {}
|
|
21
|
+
|
|
22
|
+
export const TableHandleRowTrigger: ForwardRefExoticComponent<
|
|
23
|
+
Partial<TableHandleRowTriggerProps> &
|
|
24
|
+
RefAttributes<TableHandleRowTriggerElement> &
|
|
25
|
+
HTMLAttributes<TableHandleRowTriggerElement>
|
|
26
|
+
> = createComponent<
|
|
27
|
+
TableHandleRowTriggerProps,
|
|
28
|
+
TableHandleRowTriggerElement
|
|
29
|
+
>(
|
|
30
|
+
'prosekit-table-handle-row-trigger',
|
|
31
|
+
'TableHandleRowTrigger',
|
|
32
|
+
Object.keys(tableHandleRowTriggerProps),
|
|
33
|
+
Object.keys(tableHandleRowTriggerEvents),
|
|
34
|
+
)
|