@prosekit/solid 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-x4Duyu8z.js +2 -1
- package/dist/create-component-x4Duyu8z.js.map +1 -0
- package/dist/{create-props-B3k6ERfv.d.ts → create-props-BwXSSFVp.d.ts} +3 -2
- package/dist/create-props-BwXSSFVp.d.ts.map +1 -0
- package/dist/editor-context-DIj_hnDx.js +2 -1
- package/dist/editor-context-DIj_hnDx.js.map +1 -0
- package/dist/prosekit-solid-autocomplete.d.ts +12 -11
- package/dist/prosekit-solid-autocomplete.d.ts.map +1 -0
- package/dist/prosekit-solid-autocomplete.js +2 -1
- package/dist/prosekit-solid-autocomplete.js.map +1 -0
- package/dist/prosekit-solid-block-handle.d.ts +10 -9
- package/dist/prosekit-solid-block-handle.d.ts.map +1 -0
- package/dist/prosekit-solid-block-handle.js +2 -1
- package/dist/prosekit-solid-block-handle.js.map +1 -0
- package/dist/prosekit-solid-drop-indicator.d.ts +6 -5
- package/dist/prosekit-solid-drop-indicator.d.ts.map +1 -0
- package/dist/prosekit-solid-drop-indicator.js +2 -1
- package/dist/prosekit-solid-drop-indicator.js.map +1 -0
- package/dist/prosekit-solid-inline-popover.d.ts +6 -5
- package/dist/prosekit-solid-inline-popover.d.ts.map +1 -0
- package/dist/prosekit-solid-inline-popover.js +2 -1
- package/dist/prosekit-solid-inline-popover.js.map +1 -0
- package/dist/prosekit-solid-popover.d.ts +10 -9
- package/dist/prosekit-solid-popover.d.ts.map +1 -0
- package/dist/prosekit-solid-popover.js +2 -1
- package/dist/prosekit-solid-popover.js.map +1 -0
- package/dist/prosekit-solid-resizable.d.ts +8 -7
- package/dist/prosekit-solid-resizable.d.ts.map +1 -0
- package/dist/prosekit-solid-resizable.js +2 -1
- package/dist/prosekit-solid-resizable.js.map +1 -0
- package/dist/prosekit-solid-table-handle.d.ts +22 -21
- package/dist/prosekit-solid-table-handle.d.ts.map +1 -0
- package/dist/prosekit-solid-table-handle.js +2 -1
- package/dist/prosekit-solid-table-handle.js.map +1 -0
- package/dist/prosekit-solid-tooltip.d.ts +10 -9
- package/dist/prosekit-solid-tooltip.d.ts.map +1 -0
- package/dist/prosekit-solid-tooltip.js +2 -1
- package/dist/prosekit-solid-tooltip.js.map +1 -0
- package/dist/prosekit-solid.d.ts +69 -63
- package/dist/prosekit-solid.d.ts.map +1 -0
- package/dist/prosekit-solid.js +2 -1
- package/dist/prosekit-solid.js.map +1 -0
- package/dist/{types-DFZJMe9D.d.ts → types-CoG9Vl2B.d.ts} +10 -23
- package/dist/types-CoG9Vl2B.d.ts.map +1 -0
- package/package.json +18 -18
- package/src/components/autocomplete/autocomplete-empty.gen.ts +29 -0
- package/src/components/autocomplete/autocomplete-item.gen.ts +29 -0
- package/src/components/autocomplete/autocomplete-list.gen.ts +29 -0
- package/src/components/autocomplete/autocomplete-popover.gen.ts +29 -0
- package/src/components/autocomplete/index.gen.ts +7 -0
- package/src/components/block-handle/block-handle-add.gen.ts +29 -0
- package/src/components/block-handle/block-handle-draggable.gen.ts +29 -0
- package/src/components/block-handle/block-handle-popover.gen.ts +29 -0
- package/src/components/block-handle/index.gen.ts +5 -0
- package/src/components/create-component.ts +60 -0
- package/src/components/create-props.ts +13 -0
- package/src/components/drop-indicator/drop-indicator.gen.ts +29 -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 +29 -0
- package/src/components/popover/index.gen.ts +5 -0
- package/src/components/popover/popover-content.gen.ts +29 -0
- package/src/components/popover/popover-root.gen.ts +29 -0
- package/src/components/popover/popover-trigger.gen.ts +29 -0
- package/src/components/prosekit.ts +37 -0
- package/src/components/resizable/index.gen.ts +3 -0
- package/src/components/resizable/resizable-handle.gen.ts +29 -0
- package/src/components/resizable/resizable-root.gen.ts +29 -0
- package/src/components/table-handle/index.gen.ts +17 -0
- package/src/components/table-handle/table-handle-column-root.gen.ts +29 -0
- package/src/components/table-handle/table-handle-column-trigger.gen.ts +29 -0
- package/src/components/table-handle/table-handle-drag-preview.gen.ts +29 -0
- package/src/components/table-handle/table-handle-drop-indicator.gen.ts +29 -0
- package/src/components/table-handle/table-handle-popover-content.gen.ts +29 -0
- package/src/components/table-handle/table-handle-popover-item.gen.ts +29 -0
- package/src/components/table-handle/table-handle-root.gen.ts +29 -0
- package/src/components/table-handle/table-handle-row-root.gen.ts +29 -0
- package/src/components/table-handle/table-handle-row-trigger.gen.ts +29 -0
- package/src/components/tooltip/index.gen.ts +5 -0
- package/src/components/tooltip/tooltip-content.gen.ts +29 -0
- package/src/components/tooltip/tooltip-root.gen.ts +29 -0
- package/src/components/tooltip/tooltip-trigger.gen.ts +29 -0
- package/src/contexts/editor-context.ts +23 -0
- package/src/extensions/solid-mark-view.ts +95 -0
- package/src/extensions/solid-node-view.ts +95 -0
- package/src/hooks/use-doc-change.ts +20 -0
- package/src/hooks/use-editor-extension.ts +36 -0
- package/src/hooks/use-editor.ts +59 -0
- package/src/hooks/use-extension.ts +41 -0
- package/src/hooks/use-keymap.ts +14 -0
- package/src/hooks/use-priority-extension.ts +18 -0
- package/src/hooks/use-state-update.ts +20 -0
- package/src/index.ts +30 -0
- package/src/types.ts +29 -0
- package/src/utils/to-value.ts +14 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { AnyFunction } from '@prosekit/core'
|
|
2
|
+
import type { Component } from 'solid-js'
|
|
3
|
+
import h from 'solid-js/h'
|
|
4
|
+
|
|
5
|
+
import { useEditorContext } from '../contexts/editor-context'
|
|
6
|
+
import type { PropsWithElement } from '../types'
|
|
7
|
+
|
|
8
|
+
export function createComponent<
|
|
9
|
+
Props extends object,
|
|
10
|
+
CustomElement extends HTMLElement,
|
|
11
|
+
>(
|
|
12
|
+
tagName: string,
|
|
13
|
+
propNames: string[],
|
|
14
|
+
eventNames: string[],
|
|
15
|
+
): Component<PropsWithElement<Props, CustomElement>> {
|
|
16
|
+
const hasEditor = propNames.includes('editor')
|
|
17
|
+
const lowerCaseEventNameMap = new Map(
|
|
18
|
+
eventNames.map((name) => [name.toLowerCase(), name]),
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
const Component = (props: Record<string, unknown>) => {
|
|
22
|
+
const properties: Record<string, () => unknown> = {}
|
|
23
|
+
const eventHandlers: Record<string, AnyFunction> = {}
|
|
24
|
+
|
|
25
|
+
for (const name of Object.keys(props)) {
|
|
26
|
+
if (propNames.includes(name)) {
|
|
27
|
+
properties['prop:' + name] = () => props[name]
|
|
28
|
+
continue
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (name.startsWith('on')) {
|
|
32
|
+
const lowerCaseEventName = name.slice(2).toLowerCase()
|
|
33
|
+
const eventName = lowerCaseEventNameMap.get(lowerCaseEventName)
|
|
34
|
+
if (eventName) {
|
|
35
|
+
const extractDetail = eventName.endsWith('Change')
|
|
36
|
+
eventHandlers['on:' + eventName] = (event: Event) => {
|
|
37
|
+
const handler = props[name] as AnyFunction | null
|
|
38
|
+
if (typeof handler === 'function') {
|
|
39
|
+
handler(extractDetail ? (event as CustomEvent).detail : event)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
continue
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
properties[name] = () => props[name]
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const editor = useEditorContext()
|
|
50
|
+
|
|
51
|
+
if (hasEditor && editor) {
|
|
52
|
+
properties['prop:editor'] = () => props['editor'] || editor
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return h(tagName, { ...properties, ...eventHandlers })
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
59
|
+
return Component as any
|
|
60
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type CreateProps<
|
|
2
|
+
Props extends { [PropName in keyof Props]: unknown },
|
|
3
|
+
Events extends { [EventName in keyof Events]: CustomEvent },
|
|
4
|
+
> = Props & CreateEventProps<Events>
|
|
5
|
+
|
|
6
|
+
type CreateEventProps<
|
|
7
|
+
Events extends { [EventName in keyof Events]: CustomEvent },
|
|
8
|
+
> = {
|
|
9
|
+
[EventName in keyof Events as `on${Capitalize<string & EventName>}`]: (
|
|
10
|
+
event: EventName extends `${string}Change` ? Events[EventName]['detail']
|
|
11
|
+
: Events[EventName],
|
|
12
|
+
) => void
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link DropIndicator} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface DropIndicatorProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const DropIndicator: Component<PropsWithElement<
|
|
20
|
+
DropIndicatorProps,
|
|
21
|
+
DropIndicatorElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
DropIndicatorProps,
|
|
24
|
+
DropIndicatorElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-drop-indicator',
|
|
27
|
+
Object.keys(dropIndicatorProps),
|
|
28
|
+
Object.keys(dropIndicatorEvents),
|
|
29
|
+
)
|
|
@@ -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,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link InlinePopover} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface InlinePopoverProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const InlinePopover: Component<PropsWithElement<
|
|
20
|
+
InlinePopoverProps,
|
|
21
|
+
InlinePopoverElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
InlinePopoverProps,
|
|
24
|
+
InlinePopoverElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-inline-popover',
|
|
27
|
+
Object.keys(inlinePopoverProps),
|
|
28
|
+
Object.keys(inlinePopoverEvents),
|
|
29
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link PopoverContent} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface PopoverContentProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const PopoverContent: Component<PropsWithElement<
|
|
20
|
+
PopoverContentProps,
|
|
21
|
+
PopoverContentElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
PopoverContentProps,
|
|
24
|
+
PopoverContentElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-popover-content',
|
|
27
|
+
Object.keys(popoverContentProps),
|
|
28
|
+
Object.keys(popoverContentEvents),
|
|
29
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link PopoverRoot} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface PopoverRootProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const PopoverRoot: Component<PropsWithElement<
|
|
20
|
+
PopoverRootProps,
|
|
21
|
+
PopoverRootElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
PopoverRootProps,
|
|
24
|
+
PopoverRootElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-popover-root',
|
|
27
|
+
Object.keys(popoverRootProps),
|
|
28
|
+
Object.keys(popoverRootEvents),
|
|
29
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link PopoverTrigger} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface PopoverTriggerProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const PopoverTrigger: Component<PropsWithElement<
|
|
20
|
+
PopoverTriggerProps,
|
|
21
|
+
PopoverTriggerElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
PopoverTriggerProps,
|
|
24
|
+
PopoverTriggerElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-popover-trigger',
|
|
27
|
+
Object.keys(popoverTriggerProps),
|
|
28
|
+
Object.keys(popoverTriggerEvents),
|
|
29
|
+
)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Editor } from '@prosekit/core'
|
|
2
|
+
import { ProsemirrorAdapterProvider } from '@prosemirror-adapter/solid'
|
|
3
|
+
import {
|
|
4
|
+
createComponent,
|
|
5
|
+
type Component,
|
|
6
|
+
type ParentProps,
|
|
7
|
+
} from 'solid-js'
|
|
8
|
+
|
|
9
|
+
import { EditorContextProvider } from '../contexts/editor-context'
|
|
10
|
+
import { consumeSolidMarkViews } from '../extensions/solid-mark-view'
|
|
11
|
+
import { consumeSolidNodeViews } from '../extensions/solid-node-view'
|
|
12
|
+
|
|
13
|
+
export type ProseKitProps = ParentProps<{
|
|
14
|
+
editor: Editor
|
|
15
|
+
}>
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The root component for a ProseKit editor.
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export const ProseKit: Component<ProseKitProps> = (props) => {
|
|
23
|
+
return createComponent(ProsemirrorAdapterProvider, {
|
|
24
|
+
get children() {
|
|
25
|
+
return createComponent(EditorContextProvider, {
|
|
26
|
+
get value() {
|
|
27
|
+
return props.editor
|
|
28
|
+
},
|
|
29
|
+
get children() {
|
|
30
|
+
consumeSolidNodeViews()
|
|
31
|
+
consumeSolidMarkViews()
|
|
32
|
+
return props.children
|
|
33
|
+
},
|
|
34
|
+
})
|
|
35
|
+
},
|
|
36
|
+
})
|
|
37
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link ResizableHandle} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface ResizableHandleProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const ResizableHandle: Component<PropsWithElement<
|
|
20
|
+
ResizableHandleProps,
|
|
21
|
+
ResizableHandleElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
ResizableHandleProps,
|
|
24
|
+
ResizableHandleElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-resizable-handle',
|
|
27
|
+
Object.keys(resizableHandleProps),
|
|
28
|
+
Object.keys(resizableHandleEvents),
|
|
29
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link ResizableRoot} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface ResizableRootProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const ResizableRoot: Component<PropsWithElement<
|
|
20
|
+
ResizableRootProps,
|
|
21
|
+
ResizableRootElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
ResizableRootProps,
|
|
24
|
+
ResizableRootElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-resizable-root',
|
|
27
|
+
Object.keys(resizableRootProps),
|
|
28
|
+
Object.keys(resizableRootEvents),
|
|
29
|
+
)
|
|
@@ -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,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link TableHandleColumnRoot} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface TableHandleColumnRootProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const TableHandleColumnRoot: Component<PropsWithElement<
|
|
20
|
+
TableHandleColumnRootProps,
|
|
21
|
+
TableHandleColumnRootElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
TableHandleColumnRootProps,
|
|
24
|
+
TableHandleColumnRootElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-table-handle-column-root',
|
|
27
|
+
Object.keys(tableHandleColumnRootProps),
|
|
28
|
+
Object.keys(tableHandleColumnRootEvents),
|
|
29
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link TableHandleColumnTrigger} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface TableHandleColumnTriggerProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const TableHandleColumnTrigger: Component<PropsWithElement<
|
|
20
|
+
TableHandleColumnTriggerProps,
|
|
21
|
+
TableHandleColumnTriggerElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
TableHandleColumnTriggerProps,
|
|
24
|
+
TableHandleColumnTriggerElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-table-handle-column-trigger',
|
|
27
|
+
Object.keys(tableHandleColumnTriggerProps),
|
|
28
|
+
Object.keys(tableHandleColumnTriggerEvents),
|
|
29
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link TableHandleDragPreview} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface TableHandleDragPreviewProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const TableHandleDragPreview: Component<PropsWithElement<
|
|
20
|
+
TableHandleDragPreviewProps,
|
|
21
|
+
TableHandleDragPreviewElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
TableHandleDragPreviewProps,
|
|
24
|
+
TableHandleDragPreviewElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-table-handle-drag-preview',
|
|
27
|
+
Object.keys(tableHandleDragPreviewProps),
|
|
28
|
+
Object.keys(tableHandleDragPreviewEvents),
|
|
29
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link TableHandleDropIndicator} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface TableHandleDropIndicatorProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const TableHandleDropIndicator: Component<PropsWithElement<
|
|
20
|
+
TableHandleDropIndicatorProps,
|
|
21
|
+
TableHandleDropIndicatorElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
TableHandleDropIndicatorProps,
|
|
24
|
+
TableHandleDropIndicatorElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-table-handle-drop-indicator',
|
|
27
|
+
Object.keys(tableHandleDropIndicatorProps),
|
|
28
|
+
Object.keys(tableHandleDropIndicatorEvents),
|
|
29
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link TableHandlePopoverContent} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface TableHandlePopoverContentProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const TableHandlePopoverContent: Component<PropsWithElement<
|
|
20
|
+
TableHandlePopoverContentProps,
|
|
21
|
+
TableHandlePopoverContentElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
TableHandlePopoverContentProps,
|
|
24
|
+
TableHandlePopoverContentElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-table-handle-popover-content',
|
|
27
|
+
Object.keys(tableHandlePopoverContentProps),
|
|
28
|
+
Object.keys(tableHandlePopoverContentEvents),
|
|
29
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link TableHandlePopoverItem} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface TableHandlePopoverItemProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const TableHandlePopoverItem: Component<PropsWithElement<
|
|
20
|
+
TableHandlePopoverItemProps,
|
|
21
|
+
TableHandlePopoverItemElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
TableHandlePopoverItemProps,
|
|
24
|
+
TableHandlePopoverItemElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-table-handle-popover-item',
|
|
27
|
+
Object.keys(tableHandlePopoverItemProps),
|
|
28
|
+
Object.keys(tableHandlePopoverItemEvents),
|
|
29
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link TableHandleRoot} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface TableHandleRootProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const TableHandleRoot: Component<PropsWithElement<
|
|
20
|
+
TableHandleRootProps,
|
|
21
|
+
TableHandleRootElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
TableHandleRootProps,
|
|
24
|
+
TableHandleRootElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-table-handle-root',
|
|
27
|
+
Object.keys(tableHandleRootProps),
|
|
28
|
+
Object.keys(tableHandleRootEvents),
|
|
29
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link TableHandleRowRoot} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface TableHandleRowRootProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const TableHandleRowRoot: Component<PropsWithElement<
|
|
20
|
+
TableHandleRowRootProps,
|
|
21
|
+
TableHandleRowRootElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
TableHandleRowRootProps,
|
|
24
|
+
TableHandleRowRootElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-table-handle-row-root',
|
|
27
|
+
Object.keys(tableHandleRowRootProps),
|
|
28
|
+
Object.keys(tableHandleRowRootEvents),
|
|
29
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link TableHandleRowTrigger} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface TableHandleRowTriggerProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const TableHandleRowTrigger: Component<PropsWithElement<
|
|
20
|
+
TableHandleRowTriggerProps,
|
|
21
|
+
TableHandleRowTriggerElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
TableHandleRowTriggerProps,
|
|
24
|
+
TableHandleRowTriggerElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-table-handle-row-trigger',
|
|
27
|
+
Object.keys(tableHandleRowTriggerProps),
|
|
28
|
+
Object.keys(tableHandleRowTriggerEvents),
|
|
29
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type TooltipContentElement,
|
|
3
|
+
type TooltipContentProps as Props,
|
|
4
|
+
type TooltipContentEvents as Events,
|
|
5
|
+
tooltipContentProps,
|
|
6
|
+
tooltipContentEvents,
|
|
7
|
+
} from '@prosekit/web/tooltip'
|
|
8
|
+
import type { Component } from 'solid-js'
|
|
9
|
+
|
|
10
|
+
import type { PropsWithElement } from '../../types'
|
|
11
|
+
import { createComponent } from '../create-component'
|
|
12
|
+
import type { CreateProps } from '../create-props'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for the {@link TooltipContent} component.
|
|
16
|
+
*/
|
|
17
|
+
export interface TooltipContentProps extends Partial<CreateProps<Props, Events>> {}
|
|
18
|
+
|
|
19
|
+
export const TooltipContent: Component<PropsWithElement<
|
|
20
|
+
TooltipContentProps,
|
|
21
|
+
TooltipContentElement
|
|
22
|
+
>> = createComponent<
|
|
23
|
+
TooltipContentProps,
|
|
24
|
+
TooltipContentElement
|
|
25
|
+
>(
|
|
26
|
+
'prosekit-tooltip-content',
|
|
27
|
+
Object.keys(tooltipContentProps),
|
|
28
|
+
Object.keys(tooltipContentEvents),
|
|
29
|
+
)
|