@prosekit/web 0.5.7 → 0.5.8
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/get-default-state-CIEy7xrl.js +11 -0
- package/dist/prosekit-web-autocomplete.d.ts +135 -20
- package/dist/prosekit-web-autocomplete.js +240 -349
- package/dist/prosekit-web-block-handle.d.ts +88 -15
- package/dist/prosekit-web-block-handle.js +422 -394
- package/dist/prosekit-web-inline-popover.d.ts +81 -5
- package/dist/prosekit-web-inline-popover.js +114 -155
- package/dist/prosekit-web-popover.d.ts +34 -15
- package/dist/prosekit-web-popover.js +31 -70
- package/dist/prosekit-web-resizable.d.ts +52 -10
- package/dist/prosekit-web-resizable.js +210 -238
- package/dist/prosekit-web-table-handle.d.ts +165 -35
- package/dist/prosekit-web-table-handle.js +364 -491
- package/dist/prosekit-web-tooltip.d.ts +34 -15
- package/dist/prosekit-web-tooltip.js +31 -70
- package/dist/prosekit-web.d.ts +1 -1
- package/dist/use-editor-extension-Cc7ZG7uj.js +11 -0
- package/package.json +29 -14
- package/dist/_tsup-dts-rollup.d.ts +0 -1100
- package/dist/chunk-WTW6FOH3.js +0 -13
- package/dist/chunk-ZGQ225UP.js +0 -17
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createSignal } from "@aria-ui/core";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/get-default-state.ts
|
|
4
|
+
function getStateWithDefaults(state, props) {
|
|
5
|
+
const merged = { ...state };
|
|
6
|
+
for (const key of Object.keys(props)) if (!merged[key]) merged[key] = createSignal(props[key].default);
|
|
7
|
+
return merged;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { getStateWithDefaults };
|
|
@@ -1,20 +1,135 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { BaseElementConstructor, EventDeclarations, PropDeclarations } from "@aria-ui/core";
|
|
2
|
+
import { ListboxEvents, ListboxItemEvents, ListboxProps } from "@aria-ui/listbox";
|
|
3
|
+
import { Editor } from "@prosekit/core";
|
|
4
|
+
import { OverlayPositionerEvents, OverlayPositionerProps } from "@aria-ui/overlay/elements";
|
|
5
|
+
|
|
6
|
+
//#region src/components/autocomplete/autocomplete-empty/types.d.ts
|
|
7
|
+
/** @internal */
|
|
8
|
+
/** @internal */
|
|
9
|
+
interface AutocompleteEmptyProps {}
|
|
10
|
+
/** @internal */
|
|
11
|
+
declare const autocompleteEmptyProps: PropDeclarations<AutocompleteEmptyProps>;
|
|
12
|
+
/** @internal */
|
|
13
|
+
interface AutocompleteEmptyEvents {}
|
|
14
|
+
/** @internal */
|
|
15
|
+
declare const autocompleteEmptyEvents: EventDeclarations<AutocompleteEmptyEvents>;
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/components/autocomplete/autocomplete-empty/element.gen.d.ts
|
|
19
|
+
declare const AutocompleteEmptyElementBase: BaseElementConstructor<AutocompleteEmptyProps>;
|
|
20
|
+
declare class AutocompleteEmptyElement extends AutocompleteEmptyElementBase {}
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/components/autocomplete/autocomplete-item/types.d.ts
|
|
24
|
+
interface AutocompleteItemProps {
|
|
25
|
+
/**
|
|
26
|
+
* The value of the item, which will be matched against the query.
|
|
27
|
+
*
|
|
28
|
+
* If not provided, the value is the item's text content.
|
|
29
|
+
*
|
|
30
|
+
* @default ""
|
|
31
|
+
*/
|
|
32
|
+
value: string;
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
declare const autocompleteItemProps: PropDeclarations<AutocompleteItemProps>;
|
|
36
|
+
interface AutocompleteItemEvents extends ListboxItemEvents {}
|
|
37
|
+
/** @internal */
|
|
38
|
+
declare const autocompleteItemEvents: EventDeclarations<AutocompleteItemEvents>;
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/components/autocomplete/autocomplete-item/element.gen.d.ts
|
|
42
|
+
declare const AutocompleteItemElementBase: BaseElementConstructor<AutocompleteItemProps>;
|
|
43
|
+
declare class AutocompleteItemElement extends AutocompleteItemElementBase {}
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/components/autocomplete/autocomplete-list/types.d.ts
|
|
47
|
+
interface AutocompleteListProps extends Pick<ListboxProps, "filter"> {
|
|
48
|
+
/**
|
|
49
|
+
* The ProseKit editor instance.
|
|
50
|
+
*
|
|
51
|
+
* @default null
|
|
52
|
+
* @hidden
|
|
53
|
+
*/
|
|
54
|
+
editor: Editor | null;
|
|
55
|
+
}
|
|
56
|
+
declare const autocompleteListProps: PropDeclarations<AutocompleteListProps>;
|
|
57
|
+
interface AutocompleteListEvents extends ListboxEvents {}
|
|
58
|
+
declare const autocompleteListEvents: EventDeclarations<AutocompleteListEvents>;
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/components/autocomplete/autocomplete-list/element.gen.d.ts
|
|
62
|
+
declare const AutocompleteListElementBase: BaseElementConstructor<AutocompleteListProps>;
|
|
63
|
+
declare class AutocompleteListElement extends AutocompleteListElementBase {}
|
|
64
|
+
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/components/autocomplete/autocomplete-popover/types.d.ts
|
|
67
|
+
interface AutocompletePopoverProps extends OverlayPositionerProps {
|
|
68
|
+
/**
|
|
69
|
+
* The ProseKit editor instance.
|
|
70
|
+
*
|
|
71
|
+
* @default null
|
|
72
|
+
* @hidden
|
|
73
|
+
*/
|
|
74
|
+
editor: Editor | null;
|
|
75
|
+
/**
|
|
76
|
+
* The regular expression to match the query text to autocomplete.
|
|
77
|
+
*
|
|
78
|
+
* @default null
|
|
79
|
+
*/
|
|
80
|
+
regex: RegExp | null;
|
|
81
|
+
/**
|
|
82
|
+
* The placement of the popover, relative to the text cursor.
|
|
83
|
+
*
|
|
84
|
+
* @default "bottom-start"
|
|
85
|
+
*/
|
|
86
|
+
placement: OverlayPositionerProps["placement"];
|
|
87
|
+
/**
|
|
88
|
+
* The distance between the popover and the hovered block.
|
|
89
|
+
*
|
|
90
|
+
* @default 4
|
|
91
|
+
*/
|
|
92
|
+
offset: OverlayPositionerProps["offset"];
|
|
93
|
+
/**
|
|
94
|
+
* @default true
|
|
95
|
+
*/
|
|
96
|
+
inline: OverlayPositionerProps["inline"];
|
|
97
|
+
/**
|
|
98
|
+
* @default true
|
|
99
|
+
*/
|
|
100
|
+
hoist: OverlayPositionerProps["hoist"];
|
|
101
|
+
/**
|
|
102
|
+
* @default true
|
|
103
|
+
*/
|
|
104
|
+
fitViewport: OverlayPositionerProps["fitViewport"];
|
|
105
|
+
/**
|
|
106
|
+
* @default "The body element"
|
|
107
|
+
*/
|
|
108
|
+
boundary: OverlayPositionerProps["boundary"];
|
|
109
|
+
/**
|
|
110
|
+
* @default 8
|
|
111
|
+
*/
|
|
112
|
+
overflowPadding: OverlayPositionerProps["overflowPadding"];
|
|
113
|
+
}
|
|
114
|
+
/** @internal */
|
|
115
|
+
declare const autocompletePopoverProps: PropDeclarations<AutocompletePopoverProps>;
|
|
116
|
+
interface AutocompletePopoverEvents extends OverlayPositionerEvents {
|
|
117
|
+
/**
|
|
118
|
+
* Fired when the open state changes.
|
|
119
|
+
*/
|
|
120
|
+
openChange: CustomEvent<boolean>;
|
|
121
|
+
/**
|
|
122
|
+
* Fired when the query changes.
|
|
123
|
+
*/
|
|
124
|
+
queryChange: CustomEvent<string>;
|
|
125
|
+
}
|
|
126
|
+
/** @internal */
|
|
127
|
+
declare const autocompletePopoverEvents: EventDeclarations<AutocompletePopoverEvents>;
|
|
128
|
+
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region src/components/autocomplete/autocomplete-popover/element.gen.d.ts
|
|
131
|
+
declare const AutocompletePopoverElementBase: BaseElementConstructor<AutocompletePopoverProps>;
|
|
132
|
+
declare class AutocompletePopoverElement extends AutocompletePopoverElementBase {}
|
|
133
|
+
|
|
134
|
+
//#endregion
|
|
135
|
+
export { AutocompleteEmptyElement, AutocompleteEmptyEvents, AutocompleteEmptyProps, AutocompleteItemElement, AutocompleteItemEvents, AutocompleteItemProps, AutocompleteListElement, AutocompleteListEvents, AutocompleteListProps, AutocompletePopoverElement, AutocompletePopoverEvents, AutocompletePopoverProps, autocompleteEmptyEvents, autocompleteEmptyProps, autocompleteItemEvents, autocompleteItemProps, autocompleteListEvents, autocompleteListProps, autocompletePopoverEvents, autocompletePopoverProps };
|