@prosekit/solid 0.2.6 → 0.3.0
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/_tsup-dts-rollup.d.ts +71 -67
- package/dist/chunk-XXXIBXNC.js +12 -0
- package/dist/chunk-Z3TWLQOI.js +26 -0
- package/dist/prosekit-solid-autocomplete.d.ts +4 -0
- package/dist/prosekit-solid-autocomplete.js +46 -0
- package/dist/prosekit-solid-block-handle.d.ts +2 -0
- package/dist/prosekit-solid-block-handle.js +26 -0
- package/dist/prosekit-solid-inline-popover.d.ts +0 -1
- package/dist/prosekit-solid-inline-popover.js +11 -8
- package/dist/prosekit-solid-popover.d.ts +3 -2
- package/dist/prosekit-solid-popover.js +32 -9
- package/dist/prosekit-solid-resizable.d.ts +2 -2
- package/dist/prosekit-solid-resizable.js +22 -9
- package/dist/prosekit-solid-tooltip.d.ts +3 -0
- package/dist/prosekit-solid-tooltip.js +36 -0
- package/dist/prosekit-solid.js +7 -12
- package/package.json +25 -88
- package/dist/chunk-RLHZTH3K.js +0 -16
- package/dist/prosekit-solid-autocomplete-empty.d.ts +0 -2
- package/dist/prosekit-solid-autocomplete-empty.js +0 -13
- package/dist/prosekit-solid-autocomplete-item.d.ts +0 -2
- package/dist/prosekit-solid-autocomplete-item.js +0 -13
- package/dist/prosekit-solid-autocomplete-list.d.ts +0 -2
- package/dist/prosekit-solid-autocomplete-list.js +0 -13
- package/dist/prosekit-solid-autocomplete-popover.d.ts +0 -3
- package/dist/prosekit-solid-autocomplete-popover.js +0 -13
- package/dist/prosekit-solid-block-popover.d.ts +0 -2
- package/dist/prosekit-solid-block-popover.js +0 -13
- package/dist/prosekit-solid-combo-box-input.d.ts +0 -2
- package/dist/prosekit-solid-combo-box-input.js +0 -13
- package/dist/prosekit-solid-combo-box-item.d.ts +0 -2
- package/dist/prosekit-solid-combo-box-item.js +0 -13
- package/dist/prosekit-solid-combo-box-list.d.ts +0 -2
- package/dist/prosekit-solid-combo-box-list.js +0 -13
- package/dist/prosekit-solid-combo-box.d.ts +0 -2
- package/dist/prosekit-solid-combo-box.js +0 -13
- package/dist/prosekit-solid-drag-handle.d.ts +0 -2
- package/dist/prosekit-solid-drag-handle.js +0 -13
- package/dist/prosekit-solid-resizable-handle.d.ts +0 -2
- package/dist/prosekit-solid-resizable-handle.js +0 -13
@@ -1,82 +1,72 @@
|
|
1
1
|
import { Accessor } from 'solid-js';
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
2
|
+
import { AutocompleteEmptyElement } from '@prosekit/web/autocomplete';
|
3
|
+
import { AutocompleteEmptyProps } from '@prosekit/web/autocomplete';
|
4
|
+
import { AutocompleteItemElement } from '@prosekit/web/autocomplete';
|
5
|
+
import { AutocompleteItemProps } from '@prosekit/web/autocomplete';
|
6
|
+
import { AutocompleteListElement } from '@prosekit/web/autocomplete';
|
7
|
+
import { AutocompleteListProps } from '@prosekit/web/autocomplete';
|
8
|
+
import { AutocompletePopoverElement } from '@prosekit/web/autocomplete';
|
9
|
+
import { AutocompletePopoverProps } from '@prosekit/web/autocomplete';
|
10
|
+
import { BlockDragHandleElement } from '@prosekit/web/block-handle';
|
11
|
+
import { BlockDragHandleProps } from '@prosekit/web/block-handle';
|
12
|
+
import { BlockPopoverElement } from '@prosekit/web/block-handle';
|
13
|
+
import { BlockPopoverProps } from '@prosekit/web/block-handle';
|
11
14
|
import { Component } from 'solid-js';
|
12
15
|
import { ContextProviderComponent } from 'solid-js';
|
13
|
-
import type { DragHandleProps as DragHandleProps_2 } from '@prosekit/lit/drag-handle';
|
14
16
|
import { Editor } from '@prosekit/core';
|
15
17
|
import type { EditorState } from '@prosekit/pm/state';
|
16
18
|
import { Extension } from '@prosekit/core';
|
17
|
-
import
|
19
|
+
import { InlinePopoverElement } from '@prosekit/web/inline-popover';
|
20
|
+
import { InlinePopoverProps } from '@prosekit/web/inline-popover';
|
21
|
+
import { JSX } from 'solid-js';
|
18
22
|
import type { JSXElement } from 'solid-js';
|
19
23
|
import { Keymap } from '@prosekit/core';
|
20
24
|
import { Options } from 'tsup';
|
21
25
|
import { ParentProps } from 'solid-js';
|
22
|
-
import
|
23
|
-
import {
|
26
|
+
import { PopoverContentElement } from '@prosekit/web/popover';
|
27
|
+
import { PopoverContentProps } from '@prosekit/web/popover';
|
28
|
+
import { PopoverRootElement } from '@prosekit/web/popover';
|
29
|
+
import { PopoverRootProps } from '@prosekit/web/popover';
|
30
|
+
import { PopoverTriggerElement } from '@prosekit/web/popover';
|
31
|
+
import { PopoverTriggerProps } from '@prosekit/web/popover';
|
24
32
|
import { Priority } from '@prosekit/core';
|
25
33
|
import type { ProseMirrorNode } from '@prosekit/pm/model';
|
26
|
-
import
|
27
|
-
import
|
28
|
-
|
29
|
-
|
34
|
+
import { ResizableHandleElement } from '@prosekit/web/resizable';
|
35
|
+
import { ResizableHandleProps } from '@prosekit/web/resizable';
|
36
|
+
import { ResizableRootElement } from '@prosekit/web/resizable';
|
37
|
+
import { ResizableRootProps } from '@prosekit/web/resizable';
|
38
|
+
import { TooltipContentElement } from '@prosekit/web/tooltip';
|
39
|
+
import { TooltipContentProps } from '@prosekit/web/tooltip';
|
40
|
+
import { TooltipRootElement } from '@prosekit/web/tooltip';
|
41
|
+
import { TooltipRootProps } from '@prosekit/web/tooltip';
|
42
|
+
import { TooltipTriggerElement } from '@prosekit/web/tooltip';
|
43
|
+
import { TooltipTriggerProps } from '@prosekit/web/tooltip';
|
44
|
+
|
45
|
+
declare const AutocompleteEmpty: Component<Partial<AutocompleteEmptyProps> & JSX<AutocompleteEmptyElement>>;
|
30
46
|
export { AutocompleteEmpty }
|
31
47
|
export { AutocompleteEmpty as AutocompleteEmpty_alias_1 }
|
32
48
|
|
33
|
-
declare
|
34
|
-
export { AutocompleteEmptyProps }
|
35
|
-
export { AutocompleteEmptyProps as AutocompleteEmptyProps_alias_1 }
|
36
|
-
|
37
|
-
declare const AutocompleteItem: Component<AutocompleteItemProps>;
|
49
|
+
declare const AutocompleteItem: Component<Partial<AutocompleteItemProps> & JSX<AutocompleteItemElement>>;
|
38
50
|
export { AutocompleteItem }
|
39
51
|
export { AutocompleteItem as AutocompleteItem_alias_1 }
|
40
52
|
|
41
|
-
declare
|
42
|
-
export { AutocompleteItemProps }
|
43
|
-
export { AutocompleteItemProps as AutocompleteItemProps_alias_1 }
|
44
|
-
|
45
|
-
declare const AutocompleteList: Component<AutocompleteListProps>;
|
53
|
+
declare const AutocompleteList: Component<Partial<AutocompleteListProps> & JSX<AutocompleteListElement>>;
|
46
54
|
export { AutocompleteList }
|
47
55
|
export { AutocompleteList as AutocompleteList_alias_1 }
|
48
56
|
|
49
|
-
declare
|
50
|
-
export { AutocompleteListProps }
|
51
|
-
export { AutocompleteListProps as AutocompleteListProps_alias_1 }
|
52
|
-
|
53
|
-
declare const AutocompletePopover: Component<AutocompletePopoverProps>;
|
57
|
+
declare const AutocompletePopover: Component<Partial<AutocompletePopoverProps> & JSX<AutocompletePopoverElement>>;
|
54
58
|
export { AutocompletePopover }
|
55
59
|
export { AutocompletePopover as AutocompletePopover_alias_1 }
|
56
60
|
|
57
|
-
declare
|
58
|
-
export {
|
59
|
-
export {
|
60
|
-
|
61
|
-
export declare const BlockPopover: Component<BlockPopoverProps>;
|
62
|
-
|
63
|
-
export declare type BlockPopoverProps = PropsWithChildren<PropsWithClass<BlockPopoverProps_2>>;
|
64
|
-
|
65
|
-
export declare const ComboBox: Component<ComboBoxProps>;
|
66
|
-
|
67
|
-
export declare const ComboBoxInput: Component<ComboBoxInputProps>;
|
61
|
+
declare const BlockDragHandle: Component<Partial<BlockDragHandleProps> & JSX<BlockDragHandleElement>>;
|
62
|
+
export { BlockDragHandle }
|
63
|
+
export { BlockDragHandle as BlockDragHandle_alias_1 }
|
68
64
|
|
69
|
-
|
65
|
+
declare const BlockPopover: Component<Partial<BlockPopoverProps> & JSX<BlockPopoverElement>>;
|
66
|
+
export { BlockPopover }
|
67
|
+
export { BlockPopover as BlockPopover_alias_1 }
|
70
68
|
|
71
|
-
export declare
|
72
|
-
|
73
|
-
export declare type ComboBoxItemProps = PropsWithChildren<PropsWithClass<ComboBoxItemProps_2>>;
|
74
|
-
|
75
|
-
export declare const ComboBoxList: Component<ComboBoxListProps>;
|
76
|
-
|
77
|
-
export declare type ComboBoxListProps = PropsWithChildren<PropsWithClass<ComboBoxListProps_2>>;
|
78
|
-
|
79
|
-
export declare type ComboBoxProps = PropsWithChildren<PropsWithClass<ComboBoxProps_2>>;
|
69
|
+
export declare function createComponent<Props extends object, CustomElement extends HTMLElement>(tagName: string, defaultProps: Props): Component<Partial<Props> & JSX.HTMLAttributes<CustomElement>>;
|
80
70
|
|
81
71
|
export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
82
72
|
|
@@ -86,10 +76,6 @@ export declare const default_alias_1: {
|
|
86
76
|
};
|
87
77
|
};
|
88
78
|
|
89
|
-
export declare const DragHandle: Component<DragHandleProps>;
|
90
|
-
|
91
|
-
export declare type DragHandleProps = PropsWithChildren<PropsWithClass<DragHandleProps_2>>;
|
92
|
-
|
93
79
|
/**
|
94
80
|
* @internal
|
95
81
|
*/
|
@@ -97,9 +83,9 @@ export declare const EditorContextProvider: ContextProviderComponent<Editor<any>
|
|
97
83
|
|
98
84
|
export declare function forceProps<T extends Record<string, any>>(props: T): T;
|
99
85
|
|
100
|
-
|
101
|
-
|
102
|
-
export
|
86
|
+
declare const InlinePopover: Component<Partial<InlinePopoverProps> & JSX<InlinePopoverElement>>;
|
87
|
+
export { InlinePopover }
|
88
|
+
export { InlinePopover as InlinePopover_alias_1 }
|
103
89
|
|
104
90
|
/**
|
105
91
|
* T or a reactive/non-reactive function returning T
|
@@ -124,11 +110,17 @@ export { MaybeAccessor as MaybeAccessor_alias_1 }
|
|
124
110
|
*/
|
125
111
|
export declare type MaybeAccessorValue<T extends MaybeAccessor<any>> = T extends () => any ? ReturnType<T> : T;
|
126
112
|
|
127
|
-
|
113
|
+
declare const PopoverContent: Component<Partial<PopoverContentProps> & JSX<PopoverContentElement>>;
|
114
|
+
export { PopoverContent }
|
115
|
+
export { PopoverContent as PopoverContent_alias_1 }
|
128
116
|
|
129
|
-
|
117
|
+
declare const PopoverRoot: Component<Partial<PopoverRootProps> & JSX<PopoverRootElement>>;
|
118
|
+
export { PopoverRoot }
|
119
|
+
export { PopoverRoot as PopoverRoot_alias_1 }
|
130
120
|
|
131
|
-
|
121
|
+
declare const PopoverTrigger: Component<Partial<PopoverTriggerProps> & JSX<PopoverTriggerElement>>;
|
122
|
+
export { PopoverTrigger }
|
123
|
+
export { PopoverTrigger as PopoverTrigger_alias_1 }
|
132
124
|
|
133
125
|
/**
|
134
126
|
* @internal
|
@@ -163,13 +155,25 @@ declare type ProseKitProps = ParentProps<{
|
|
163
155
|
export { ProseKitProps }
|
164
156
|
export { ProseKitProps as ProseKitProps_alias_1 }
|
165
157
|
|
166
|
-
|
158
|
+
declare const ResizableHandle: Component<Partial<ResizableHandleProps> & JSX<ResizableHandleElement>>;
|
159
|
+
export { ResizableHandle }
|
160
|
+
export { ResizableHandle as ResizableHandle_alias_1 }
|
161
|
+
|
162
|
+
declare const ResizableRoot: Component<Partial<ResizableRootProps> & JSX<ResizableRootElement>>;
|
163
|
+
export { ResizableRoot }
|
164
|
+
export { ResizableRoot as ResizableRoot_alias_1 }
|
167
165
|
|
168
|
-
|
166
|
+
declare const TooltipContent: Component<Partial<TooltipContentProps> & JSX<TooltipContentElement>>;
|
167
|
+
export { TooltipContent }
|
168
|
+
export { TooltipContent as TooltipContent_alias_1 }
|
169
169
|
|
170
|
-
|
170
|
+
declare const TooltipRoot: Component<Partial<TooltipRootProps> & JSX<TooltipRootElement>>;
|
171
|
+
export { TooltipRoot }
|
172
|
+
export { TooltipRoot as TooltipRoot_alias_1 }
|
171
173
|
|
172
|
-
|
174
|
+
declare const TooltipTrigger: Component<Partial<TooltipTriggerProps> & JSX<TooltipTriggerElement>>;
|
175
|
+
export { TooltipTrigger }
|
176
|
+
export { TooltipTrigger as TooltipTrigger_alias_1 }
|
173
177
|
|
174
178
|
/**
|
175
179
|
* Accesses the value of a MaybeAccessor
|
@@ -0,0 +1,12 @@
|
|
1
|
+
// src/contexts/editor-context.ts
|
2
|
+
import { createContext, useContext } from "solid-js";
|
3
|
+
var editorContext = createContext(null);
|
4
|
+
function useEditorContext() {
|
5
|
+
return useContext(editorContext);
|
6
|
+
}
|
7
|
+
var EditorContextProvider = editorContext.Provider;
|
8
|
+
|
9
|
+
export {
|
10
|
+
useEditorContext,
|
11
|
+
EditorContextProvider
|
12
|
+
};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import {
|
2
|
+
useEditorContext
|
3
|
+
} from "./chunk-XXXIBXNC.js";
|
4
|
+
|
5
|
+
// src/components/create-component.ts
|
6
|
+
import h from "solid-js/h";
|
7
|
+
function createComponent(tagName, defaultProps) {
|
8
|
+
const propertyNames = Object.keys(defaultProps);
|
9
|
+
const hasEditor = Object.hasOwn(defaultProps, "editor");
|
10
|
+
const Component = (props) => {
|
11
|
+
const p = {};
|
12
|
+
for (const key of Object.keys(props)) {
|
13
|
+
p[propertyNames.includes(key) ? "prop:" + key : key] = () => props[key];
|
14
|
+
}
|
15
|
+
const editor = useEditorContext();
|
16
|
+
if (hasEditor && editor) {
|
17
|
+
p["prop:editor"] = () => props["editor"] || editor;
|
18
|
+
}
|
19
|
+
return h(tagName, p);
|
20
|
+
};
|
21
|
+
return Component;
|
22
|
+
}
|
23
|
+
|
24
|
+
export {
|
25
|
+
createComponent
|
26
|
+
};
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export { AutocompleteEmpty_alias_1 as AutocompleteEmpty } from './_tsup-dts-rollup';
|
2
|
+
export { AutocompleteItem_alias_1 as AutocompleteItem } from './_tsup-dts-rollup';
|
3
|
+
export { AutocompleteList_alias_1 as AutocompleteList } from './_tsup-dts-rollup';
|
4
|
+
export { AutocompletePopover_alias_1 as AutocompletePopover } from './_tsup-dts-rollup';
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import {
|
2
|
+
createComponent
|
3
|
+
} from "./chunk-Z3TWLQOI.js";
|
4
|
+
import "./chunk-XXXIBXNC.js";
|
5
|
+
|
6
|
+
// src/components/autocomplete/autocomplete-empty.gen.ts
|
7
|
+
import {
|
8
|
+
defaultAutocompleteEmptyProps
|
9
|
+
} from "@prosekit/web/autocomplete";
|
10
|
+
var AutocompleteEmpty = createComponent(
|
11
|
+
"prosekit-autocomplete-empty",
|
12
|
+
defaultAutocompleteEmptyProps
|
13
|
+
);
|
14
|
+
|
15
|
+
// src/components/autocomplete/autocomplete-item.gen.ts
|
16
|
+
import {
|
17
|
+
defaultAutocompleteItemProps
|
18
|
+
} from "@prosekit/web/autocomplete";
|
19
|
+
var AutocompleteItem = createComponent(
|
20
|
+
"prosekit-autocomplete-item",
|
21
|
+
defaultAutocompleteItemProps
|
22
|
+
);
|
23
|
+
|
24
|
+
// src/components/autocomplete/autocomplete-list.gen.ts
|
25
|
+
import {
|
26
|
+
defaultAutocompleteListProps
|
27
|
+
} from "@prosekit/web/autocomplete";
|
28
|
+
var AutocompleteList = createComponent(
|
29
|
+
"prosekit-autocomplete-list",
|
30
|
+
defaultAutocompleteListProps
|
31
|
+
);
|
32
|
+
|
33
|
+
// src/components/autocomplete/autocomplete-popover.gen.ts
|
34
|
+
import {
|
35
|
+
defaultAutocompletePopoverProps
|
36
|
+
} from "@prosekit/web/autocomplete";
|
37
|
+
var AutocompletePopover = createComponent(
|
38
|
+
"prosekit-autocomplete-popover",
|
39
|
+
defaultAutocompletePopoverProps
|
40
|
+
);
|
41
|
+
export {
|
42
|
+
AutocompleteEmpty,
|
43
|
+
AutocompleteItem,
|
44
|
+
AutocompleteList,
|
45
|
+
AutocompletePopover
|
46
|
+
};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import {
|
2
|
+
createComponent
|
3
|
+
} from "./chunk-Z3TWLQOI.js";
|
4
|
+
import "./chunk-XXXIBXNC.js";
|
5
|
+
|
6
|
+
// src/components/block-handle/block-drag-handle.gen.ts
|
7
|
+
import {
|
8
|
+
defaultBlockDragHandleProps
|
9
|
+
} from "@prosekit/web/block-handle";
|
10
|
+
var BlockDragHandle = createComponent(
|
11
|
+
"prosekit-block-drag-handle",
|
12
|
+
defaultBlockDragHandleProps
|
13
|
+
);
|
14
|
+
|
15
|
+
// src/components/block-handle/block-popover.gen.ts
|
16
|
+
import {
|
17
|
+
defaultBlockPopoverProps
|
18
|
+
} from "@prosekit/web/block-handle";
|
19
|
+
var BlockPopover = createComponent(
|
20
|
+
"prosekit-block-popover",
|
21
|
+
defaultBlockPopoverProps
|
22
|
+
);
|
23
|
+
export {
|
24
|
+
BlockDragHandle,
|
25
|
+
BlockPopover
|
26
|
+
};
|
@@ -1,13 +1,16 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "./chunk-
|
2
|
+
createComponent
|
3
|
+
} from "./chunk-Z3TWLQOI.js";
|
4
|
+
import "./chunk-XXXIBXNC.js";
|
4
5
|
|
5
|
-
// src/components/inline-popover.gen.ts
|
6
|
-
import
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
// src/components/inline-popover/inline-popover.gen.ts
|
7
|
+
import {
|
8
|
+
defaultInlinePopoverProps
|
9
|
+
} from "@prosekit/web/inline-popover";
|
10
|
+
var InlinePopover = createComponent(
|
11
|
+
"prosekit-inline-popover",
|
12
|
+
defaultInlinePopoverProps
|
13
|
+
);
|
11
14
|
export {
|
12
15
|
InlinePopover
|
13
16
|
};
|
@@ -1,2 +1,3 @@
|
|
1
|
-
export {
|
2
|
-
export {
|
1
|
+
export { PopoverContent } from './_tsup-dts-rollup';
|
2
|
+
export { PopoverRoot } from './_tsup-dts-rollup';
|
3
|
+
export { PopoverTrigger } from './_tsup-dts-rollup';
|
@@ -1,13 +1,36 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "./chunk-
|
2
|
+
createComponent
|
3
|
+
} from "./chunk-Z3TWLQOI.js";
|
4
|
+
import "./chunk-XXXIBXNC.js";
|
4
5
|
|
5
|
-
// src/components/popover.gen.ts
|
6
|
-
import
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
// src/components/popover/popover-content.gen.ts
|
7
|
+
import {
|
8
|
+
defaultPopoverContentProps
|
9
|
+
} from "@prosekit/web/popover";
|
10
|
+
var PopoverContent = createComponent(
|
11
|
+
"prosekit-popover-content",
|
12
|
+
defaultPopoverContentProps
|
13
|
+
);
|
14
|
+
|
15
|
+
// src/components/popover/popover-root.gen.ts
|
16
|
+
import {
|
17
|
+
defaultPopoverRootProps
|
18
|
+
} from "@prosekit/web/popover";
|
19
|
+
var PopoverRoot = createComponent(
|
20
|
+
"prosekit-popover-root",
|
21
|
+
defaultPopoverRootProps
|
22
|
+
);
|
23
|
+
|
24
|
+
// src/components/popover/popover-trigger.gen.ts
|
25
|
+
import {
|
26
|
+
defaultPopoverTriggerProps
|
27
|
+
} from "@prosekit/web/popover";
|
28
|
+
var PopoverTrigger = createComponent(
|
29
|
+
"prosekit-popover-trigger",
|
30
|
+
defaultPopoverTriggerProps
|
31
|
+
);
|
11
32
|
export {
|
12
|
-
|
33
|
+
PopoverContent,
|
34
|
+
PopoverRoot,
|
35
|
+
PopoverTrigger
|
13
36
|
};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export {
|
2
|
-
export {
|
1
|
+
export { ResizableHandle } from './_tsup-dts-rollup';
|
2
|
+
export { ResizableRoot } from './_tsup-dts-rollup';
|
@@ -1,13 +1,26 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "./chunk-
|
2
|
+
createComponent
|
3
|
+
} from "./chunk-Z3TWLQOI.js";
|
4
|
+
import "./chunk-XXXIBXNC.js";
|
4
5
|
|
5
|
-
// src/components/resizable.gen.ts
|
6
|
-
import
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
// src/components/resizable/resizable-handle.gen.ts
|
7
|
+
import {
|
8
|
+
defaultResizableHandleProps
|
9
|
+
} from "@prosekit/web/resizable";
|
10
|
+
var ResizableHandle = createComponent(
|
11
|
+
"prosekit-resizable-handle",
|
12
|
+
defaultResizableHandleProps
|
13
|
+
);
|
14
|
+
|
15
|
+
// src/components/resizable/resizable-root.gen.ts
|
16
|
+
import {
|
17
|
+
defaultResizableRootProps
|
18
|
+
} from "@prosekit/web/resizable";
|
19
|
+
var ResizableRoot = createComponent(
|
20
|
+
"prosekit-resizable-root",
|
21
|
+
defaultResizableRootProps
|
22
|
+
);
|
11
23
|
export {
|
12
|
-
|
24
|
+
ResizableHandle,
|
25
|
+
ResizableRoot
|
13
26
|
};
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import {
|
2
|
+
createComponent
|
3
|
+
} from "./chunk-Z3TWLQOI.js";
|
4
|
+
import "./chunk-XXXIBXNC.js";
|
5
|
+
|
6
|
+
// src/components/tooltip/tooltip-content.gen.ts
|
7
|
+
import {
|
8
|
+
defaultTooltipContentProps
|
9
|
+
} from "@prosekit/web/tooltip";
|
10
|
+
var TooltipContent = createComponent(
|
11
|
+
"prosekit-tooltip-content",
|
12
|
+
defaultTooltipContentProps
|
13
|
+
);
|
14
|
+
|
15
|
+
// src/components/tooltip/tooltip-root.gen.ts
|
16
|
+
import {
|
17
|
+
defaultTooltipRootProps
|
18
|
+
} from "@prosekit/web/tooltip";
|
19
|
+
var TooltipRoot = createComponent(
|
20
|
+
"prosekit-tooltip-root",
|
21
|
+
defaultTooltipRootProps
|
22
|
+
);
|
23
|
+
|
24
|
+
// src/components/tooltip/tooltip-trigger.gen.ts
|
25
|
+
import {
|
26
|
+
defaultTooltipTriggerProps
|
27
|
+
} from "@prosekit/web/tooltip";
|
28
|
+
var TooltipTrigger = createComponent(
|
29
|
+
"prosekit-tooltip-trigger",
|
30
|
+
defaultTooltipTriggerProps
|
31
|
+
);
|
32
|
+
export {
|
33
|
+
TooltipContent,
|
34
|
+
TooltipRoot,
|
35
|
+
TooltipTrigger
|
36
|
+
};
|
package/dist/prosekit-solid.js
CHANGED
@@ -1,15 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
import { createContext, useContext } from "solid-js";
|
6
|
-
var editorContext = createContext(null);
|
7
|
-
function useEditorContext() {
|
8
|
-
return useContext(editorContext);
|
9
|
-
}
|
10
|
-
var EditorContextProvider = editorContext.Provider;
|
1
|
+
import {
|
2
|
+
EditorContextProvider,
|
3
|
+
useEditorContext
|
4
|
+
} from "./chunk-XXXIBXNC.js";
|
11
5
|
|
12
6
|
// src/components/prosekit.ts
|
7
|
+
import { createComponent } from "solid-js";
|
13
8
|
var ProseKit = (props) => {
|
14
9
|
return createComponent(EditorContextProvider, {
|
15
10
|
get value() {
|
@@ -72,9 +67,9 @@ function toValue(v) {
|
|
72
67
|
|
73
68
|
// src/hooks/use-editor-extension.ts
|
74
69
|
function useEditorExtension(editorAccessor, extensionAccessor) {
|
75
|
-
const
|
70
|
+
const editorContext = useEditorContext();
|
76
71
|
createEffect2(() => {
|
77
|
-
const editor = toValue(editorAccessor) || toValue(
|
72
|
+
const editor = toValue(editorAccessor) || toValue(editorContext);
|
78
73
|
const extension = extensionAccessor();
|
79
74
|
if (!editor) {
|
80
75
|
throw new EditorNotFoundError();
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosekit/solid",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.3.0",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -30,55 +30,15 @@
|
|
30
30
|
"import": "./dist/prosekit-solid.js",
|
31
31
|
"default": "./dist/prosekit-solid.js"
|
32
32
|
},
|
33
|
-
"./autocomplete
|
34
|
-
"types": "./dist/prosekit-solid-autocomplete
|
35
|
-
"import": "./dist/prosekit-solid-autocomplete
|
36
|
-
"default": "./dist/prosekit-solid-autocomplete
|
33
|
+
"./autocomplete": {
|
34
|
+
"types": "./dist/prosekit-solid-autocomplete.d.ts",
|
35
|
+
"import": "./dist/prosekit-solid-autocomplete.js",
|
36
|
+
"default": "./dist/prosekit-solid-autocomplete.js"
|
37
37
|
},
|
38
|
-
"./
|
39
|
-
"types": "./dist/prosekit-solid-
|
40
|
-
"import": "./dist/prosekit-solid-
|
41
|
-
"default": "./dist/prosekit-solid-
|
42
|
-
},
|
43
|
-
"./autocomplete-list": {
|
44
|
-
"types": "./dist/prosekit-solid-autocomplete-list.d.ts",
|
45
|
-
"import": "./dist/prosekit-solid-autocomplete-list.js",
|
46
|
-
"default": "./dist/prosekit-solid-autocomplete-list.js"
|
47
|
-
},
|
48
|
-
"./autocomplete-popover": {
|
49
|
-
"types": "./dist/prosekit-solid-autocomplete-popover.d.ts",
|
50
|
-
"import": "./dist/prosekit-solid-autocomplete-popover.js",
|
51
|
-
"default": "./dist/prosekit-solid-autocomplete-popover.js"
|
52
|
-
},
|
53
|
-
"./block-popover": {
|
54
|
-
"types": "./dist/prosekit-solid-block-popover.d.ts",
|
55
|
-
"import": "./dist/prosekit-solid-block-popover.js",
|
56
|
-
"default": "./dist/prosekit-solid-block-popover.js"
|
57
|
-
},
|
58
|
-
"./combo-box": {
|
59
|
-
"types": "./dist/prosekit-solid-combo-box.d.ts",
|
60
|
-
"import": "./dist/prosekit-solid-combo-box.js",
|
61
|
-
"default": "./dist/prosekit-solid-combo-box.js"
|
62
|
-
},
|
63
|
-
"./combo-box-input": {
|
64
|
-
"types": "./dist/prosekit-solid-combo-box-input.d.ts",
|
65
|
-
"import": "./dist/prosekit-solid-combo-box-input.js",
|
66
|
-
"default": "./dist/prosekit-solid-combo-box-input.js"
|
67
|
-
},
|
68
|
-
"./combo-box-item": {
|
69
|
-
"types": "./dist/prosekit-solid-combo-box-item.d.ts",
|
70
|
-
"import": "./dist/prosekit-solid-combo-box-item.js",
|
71
|
-
"default": "./dist/prosekit-solid-combo-box-item.js"
|
72
|
-
},
|
73
|
-
"./combo-box-list": {
|
74
|
-
"types": "./dist/prosekit-solid-combo-box-list.d.ts",
|
75
|
-
"import": "./dist/prosekit-solid-combo-box-list.js",
|
76
|
-
"default": "./dist/prosekit-solid-combo-box-list.js"
|
77
|
-
},
|
78
|
-
"./drag-handle": {
|
79
|
-
"types": "./dist/prosekit-solid-drag-handle.d.ts",
|
80
|
-
"import": "./dist/prosekit-solid-drag-handle.js",
|
81
|
-
"default": "./dist/prosekit-solid-drag-handle.js"
|
38
|
+
"./block-handle": {
|
39
|
+
"types": "./dist/prosekit-solid-block-handle.d.ts",
|
40
|
+
"import": "./dist/prosekit-solid-block-handle.js",
|
41
|
+
"default": "./dist/prosekit-solid-block-handle.js"
|
82
42
|
},
|
83
43
|
"./inline-popover": {
|
84
44
|
"types": "./dist/prosekit-solid-inline-popover.d.ts",
|
@@ -95,10 +55,10 @@
|
|
95
55
|
"import": "./dist/prosekit-solid-resizable.js",
|
96
56
|
"default": "./dist/prosekit-solid-resizable.js"
|
97
57
|
},
|
98
|
-
"./
|
99
|
-
"types": "./dist/prosekit-solid-
|
100
|
-
"import": "./dist/prosekit-solid-
|
101
|
-
"default": "./dist/prosekit-solid-
|
58
|
+
"./tooltip": {
|
59
|
+
"types": "./dist/prosekit-solid-tooltip.d.ts",
|
60
|
+
"import": "./dist/prosekit-solid-tooltip.js",
|
61
|
+
"default": "./dist/prosekit-solid-tooltip.js"
|
102
62
|
}
|
103
63
|
},
|
104
64
|
"files": [
|
@@ -106,8 +66,9 @@
|
|
106
66
|
],
|
107
67
|
"dependencies": {
|
108
68
|
"@prosekit/core": "^0.4.0",
|
109
|
-
"@prosekit/lit": "^0.
|
110
|
-
"@prosekit/pm": "^0.1.
|
69
|
+
"@prosekit/lit": "^0.3.0",
|
70
|
+
"@prosekit/pm": "^0.1.2",
|
71
|
+
"@prosekit/web": "^0.1.0"
|
111
72
|
},
|
112
73
|
"peerDependencies": {
|
113
74
|
"solid-js": ">= 1.7.0"
|
@@ -119,10 +80,10 @@
|
|
119
80
|
},
|
120
81
|
"devDependencies": {
|
121
82
|
"@prosekit/dev": "*",
|
122
|
-
"solid-js": "^1.8.
|
83
|
+
"solid-js": "^1.8.16",
|
123
84
|
"tsup": "^8.0.2",
|
124
|
-
"typescript": "^5.
|
125
|
-
"vitest": "^1.
|
85
|
+
"typescript": "^5.4.5",
|
86
|
+
"vitest": "^1.5.0"
|
126
87
|
},
|
127
88
|
"scripts": {
|
128
89
|
"build:tsup": "tsup",
|
@@ -134,35 +95,11 @@
|
|
134
95
|
".": [
|
135
96
|
"./dist/prosekit-solid.d.ts"
|
136
97
|
],
|
137
|
-
"autocomplete
|
138
|
-
"./dist/prosekit-solid-autocomplete
|
139
|
-
],
|
140
|
-
"autocomplete-item": [
|
141
|
-
"./dist/prosekit-solid-autocomplete-item.d.ts"
|
142
|
-
],
|
143
|
-
"autocomplete-list": [
|
144
|
-
"./dist/prosekit-solid-autocomplete-list.d.ts"
|
145
|
-
],
|
146
|
-
"autocomplete-popover": [
|
147
|
-
"./dist/prosekit-solid-autocomplete-popover.d.ts"
|
148
|
-
],
|
149
|
-
"block-popover": [
|
150
|
-
"./dist/prosekit-solid-block-popover.d.ts"
|
151
|
-
],
|
152
|
-
"combo-box": [
|
153
|
-
"./dist/prosekit-solid-combo-box.d.ts"
|
154
|
-
],
|
155
|
-
"combo-box-input": [
|
156
|
-
"./dist/prosekit-solid-combo-box-input.d.ts"
|
157
|
-
],
|
158
|
-
"combo-box-item": [
|
159
|
-
"./dist/prosekit-solid-combo-box-item.d.ts"
|
160
|
-
],
|
161
|
-
"combo-box-list": [
|
162
|
-
"./dist/prosekit-solid-combo-box-list.d.ts"
|
98
|
+
"autocomplete": [
|
99
|
+
"./dist/prosekit-solid-autocomplete.d.ts"
|
163
100
|
],
|
164
|
-
"
|
165
|
-
"./dist/prosekit-solid-
|
101
|
+
"block-handle": [
|
102
|
+
"./dist/prosekit-solid-block-handle.d.ts"
|
166
103
|
],
|
167
104
|
"inline-popover": [
|
168
105
|
"./dist/prosekit-solid-inline-popover.d.ts"
|
@@ -173,8 +110,8 @@
|
|
173
110
|
"resizable": [
|
174
111
|
"./dist/prosekit-solid-resizable.d.ts"
|
175
112
|
],
|
176
|
-
"
|
177
|
-
"./dist/prosekit-solid-
|
113
|
+
"tooltip": [
|
114
|
+
"./dist/prosekit-solid-tooltip.d.ts"
|
178
115
|
]
|
179
116
|
}
|
180
117
|
}
|
package/dist/chunk-RLHZTH3K.js
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
// src/utils/force-props.ts
|
2
|
-
function forceProps(props) {
|
3
|
-
return Object.fromEntries(
|
4
|
-
Object.entries(props).map(([key, value]) => {
|
5
|
-
if (key === "children" || key === "ref" || key.includes(":")) {
|
6
|
-
return [key, value];
|
7
|
-
} else {
|
8
|
-
return [`prop:${key}`, value];
|
9
|
-
}
|
10
|
-
})
|
11
|
-
);
|
12
|
-
}
|
13
|
-
|
14
|
-
export {
|
15
|
-
forceProps
|
16
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
forceProps
|
3
|
-
} from "./chunk-RLHZTH3K.js";
|
4
|
-
|
5
|
-
// src/components/autocomplete-empty.gen.ts
|
6
|
-
import "@prosekit/lit/autocomplete-empty";
|
7
|
-
import html from "solid-js/html";
|
8
|
-
var AutocompleteEmpty = (props) => {
|
9
|
-
return html`<prosekit-autocomplete-empty ...${forceProps(props)} />`;
|
10
|
-
};
|
11
|
-
export {
|
12
|
-
AutocompleteEmpty
|
13
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
forceProps
|
3
|
-
} from "./chunk-RLHZTH3K.js";
|
4
|
-
|
5
|
-
// src/components/autocomplete-item.gen.ts
|
6
|
-
import "@prosekit/lit/autocomplete-item";
|
7
|
-
import html from "solid-js/html";
|
8
|
-
var AutocompleteItem = (props) => {
|
9
|
-
return html`<prosekit-autocomplete-item ...${forceProps(props)} />`;
|
10
|
-
};
|
11
|
-
export {
|
12
|
-
AutocompleteItem
|
13
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
forceProps
|
3
|
-
} from "./chunk-RLHZTH3K.js";
|
4
|
-
|
5
|
-
// src/components/autocomplete-list.gen.ts
|
6
|
-
import "@prosekit/lit/autocomplete-list";
|
7
|
-
import html from "solid-js/html";
|
8
|
-
var AutocompleteList = (props) => {
|
9
|
-
return html`<prosekit-autocomplete-list ...${forceProps(props)} />`;
|
10
|
-
};
|
11
|
-
export {
|
12
|
-
AutocompleteList
|
13
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
forceProps
|
3
|
-
} from "./chunk-RLHZTH3K.js";
|
4
|
-
|
5
|
-
// src/components/autocomplete-popover.gen.ts
|
6
|
-
import "@prosekit/lit/autocomplete-popover";
|
7
|
-
import html from "solid-js/html";
|
8
|
-
var AutocompletePopover = (props) => {
|
9
|
-
return html`<prosekit-autocomplete-popover ...${forceProps(props)} />`;
|
10
|
-
};
|
11
|
-
export {
|
12
|
-
AutocompletePopover
|
13
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
forceProps
|
3
|
-
} from "./chunk-RLHZTH3K.js";
|
4
|
-
|
5
|
-
// src/components/block-popover.gen.ts
|
6
|
-
import "@prosekit/lit/block-popover";
|
7
|
-
import html from "solid-js/html";
|
8
|
-
var BlockPopover = (props) => {
|
9
|
-
return html`<prosekit-block-popover ...${forceProps(props)} />`;
|
10
|
-
};
|
11
|
-
export {
|
12
|
-
BlockPopover
|
13
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
forceProps
|
3
|
-
} from "./chunk-RLHZTH3K.js";
|
4
|
-
|
5
|
-
// src/components/combo-box-input.gen.ts
|
6
|
-
import "@prosekit/lit/combo-box-input";
|
7
|
-
import html from "solid-js/html";
|
8
|
-
var ComboBoxInput = (props) => {
|
9
|
-
return html`<prosekit-combo-box-input ...${forceProps(props)} />`;
|
10
|
-
};
|
11
|
-
export {
|
12
|
-
ComboBoxInput
|
13
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
forceProps
|
3
|
-
} from "./chunk-RLHZTH3K.js";
|
4
|
-
|
5
|
-
// src/components/combo-box-item.gen.ts
|
6
|
-
import "@prosekit/lit/combo-box-item";
|
7
|
-
import html from "solid-js/html";
|
8
|
-
var ComboBoxItem = (props) => {
|
9
|
-
return html`<prosekit-combo-box-item ...${forceProps(props)} />`;
|
10
|
-
};
|
11
|
-
export {
|
12
|
-
ComboBoxItem
|
13
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
forceProps
|
3
|
-
} from "./chunk-RLHZTH3K.js";
|
4
|
-
|
5
|
-
// src/components/combo-box-list.gen.ts
|
6
|
-
import "@prosekit/lit/combo-box-list";
|
7
|
-
import html from "solid-js/html";
|
8
|
-
var ComboBoxList = (props) => {
|
9
|
-
return html`<prosekit-combo-box-list ...${forceProps(props)} />`;
|
10
|
-
};
|
11
|
-
export {
|
12
|
-
ComboBoxList
|
13
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
forceProps
|
3
|
-
} from "./chunk-RLHZTH3K.js";
|
4
|
-
|
5
|
-
// src/components/combo-box.gen.ts
|
6
|
-
import "@prosekit/lit/combo-box";
|
7
|
-
import html from "solid-js/html";
|
8
|
-
var ComboBox = (props) => {
|
9
|
-
return html`<prosekit-combo-box ...${forceProps(props)} />`;
|
10
|
-
};
|
11
|
-
export {
|
12
|
-
ComboBox
|
13
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
forceProps
|
3
|
-
} from "./chunk-RLHZTH3K.js";
|
4
|
-
|
5
|
-
// src/components/drag-handle.gen.ts
|
6
|
-
import "@prosekit/lit/drag-handle";
|
7
|
-
import html from "solid-js/html";
|
8
|
-
var DragHandle = (props) => {
|
9
|
-
return html`<prosekit-drag-handle ...${forceProps(props)} />`;
|
10
|
-
};
|
11
|
-
export {
|
12
|
-
DragHandle
|
13
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
forceProps
|
3
|
-
} from "./chunk-RLHZTH3K.js";
|
4
|
-
|
5
|
-
// src/components/resizable-handle.gen.ts
|
6
|
-
import "@prosekit/lit/resizable-handle";
|
7
|
-
import html from "solid-js/html";
|
8
|
-
var ResizableHandle = (props) => {
|
9
|
-
return html`<prosekit-resizable-handle ...${forceProps(props)} />`;
|
10
|
-
};
|
11
|
-
export {
|
12
|
-
ResizableHandle
|
13
|
-
};
|