@prosekit/basic 0.0.0-next-20240715062625 → 0.0.0-next-20240724155246
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 +191 -22
- package/dist/style.css +26 -2
- package/package.json +6 -6
@@ -1,19 +1,23 @@
|
|
1
1
|
import { AddMarkOptions } from '@prosekit/core';
|
2
|
+
import { Attrs } from 'prosemirror-model';
|
2
3
|
import { DedentListOptions } from 'prosemirror-flat-list';
|
3
4
|
import { config as default_alias_2 } from '@prosekit/dev/config-vitest';
|
4
5
|
import { Extension } from '@prosekit/core';
|
6
|
+
import { ExtensionTyping } from '@prosekit/core';
|
5
7
|
import { HeadingAttrs } from '@prosekit/extensions/heading';
|
6
8
|
import { ImageAttrs } from '@prosekit/extensions/image';
|
7
9
|
import { IndentListOptions } from 'prosemirror-flat-list';
|
8
10
|
import { InsertNodeOptions } from '@prosekit/core';
|
9
11
|
import { LinkAttrs } from '@prosekit/extensions/link';
|
10
12
|
import { ListAttributes } from 'prosemirror-flat-list';
|
13
|
+
import { ListAttrs } from '@prosekit/extensions/list';
|
11
14
|
import { Options } from 'tsup';
|
12
15
|
import { RemoveMarkOptions } from '@prosekit/core';
|
13
16
|
import { RemoveNodeOptions } from '@prosekit/core';
|
14
17
|
import { SetBlockTypeOptions } from '@prosekit/core';
|
15
18
|
import { SetNodeAttrsOptions } from '@prosekit/core';
|
16
19
|
import { ToggleCollapsedOptions } from 'prosemirror-flat-list';
|
20
|
+
import { UnionExtension } from '@prosekit/core';
|
17
21
|
import { UnsetBlockTypeOptions } from '@prosekit/core';
|
18
22
|
import { UnsetMarkOptions } from '@prosekit/core';
|
19
23
|
import { UnwrapListOptions } from 'prosemirror-flat-list';
|
@@ -40,9 +44,68 @@ export { default_alias_2 }
|
|
40
44
|
* copy this function and customize it to your needs.
|
41
45
|
* @public
|
42
46
|
*/
|
43
|
-
export declare function defineBasicExtension(): Extension< {
|
44
|
-
Nodes:
|
45
|
-
|
47
|
+
export declare function defineBasicExtension(): UnionExtension<readonly [Extension< {
|
48
|
+
Nodes: {
|
49
|
+
doc: Attrs;
|
50
|
+
};
|
51
|
+
Marks: never;
|
52
|
+
Commands: never;
|
53
|
+
}>, Extension< {
|
54
|
+
Nodes: {
|
55
|
+
text: Attrs;
|
56
|
+
};
|
57
|
+
Marks: never;
|
58
|
+
Commands: never;
|
59
|
+
}>, UnionExtension<readonly [Extension< {
|
60
|
+
Nodes: {
|
61
|
+
heading: {
|
62
|
+
level: number;
|
63
|
+
};
|
64
|
+
};
|
65
|
+
Marks: never;
|
66
|
+
Commands: never;
|
67
|
+
}>, Extension<ExtensionTyping<any, any, any>>, Extension<ExtensionTyping<any, any, any>>, Extension< {
|
68
|
+
Commands: {
|
69
|
+
setHeading: [attrs?: HeadingAttrs | undefined];
|
70
|
+
insertHeading: [attrs?: HeadingAttrs | undefined];
|
71
|
+
toggleHeading: [attrs?: HeadingAttrs | undefined];
|
72
|
+
};
|
73
|
+
Nodes: never;
|
74
|
+
Marks: never;
|
75
|
+
}>]>, UnionExtension<readonly [Extension<ExtensionTyping<any, any, any>>, Extension<ExtensionTyping<any, any, any>>, Extension< {
|
76
|
+
Commands: {
|
77
|
+
readonly undo: [];
|
78
|
+
readonly redo: [];
|
79
|
+
};
|
80
|
+
Nodes: never;
|
81
|
+
Marks: never;
|
82
|
+
}>]>, UnionExtension<readonly [Extension< {
|
83
|
+
Nodes: {
|
84
|
+
list: ListAttrs;
|
85
|
+
};
|
86
|
+
Marks: never;
|
87
|
+
Commands: never;
|
88
|
+
}>, Extension<ExtensionTyping<any, any, any>>, Extension<ExtensionTyping<any, any, any>>, Extension<ExtensionTyping<any, any, any>>, Extension< {
|
89
|
+
Commands: {
|
90
|
+
dedentList: [options?: DedentListOptions | undefined];
|
91
|
+
indentList: [options?: IndentListOptions | undefined];
|
92
|
+
moveList: [direction: "up" | "down"];
|
93
|
+
splitList: [];
|
94
|
+
toggleCollapsed: [(ToggleCollapsedOptions | undefined)?];
|
95
|
+
toggleList: [attrs: ListAttributes];
|
96
|
+
unwrapList: [options?: UnwrapListOptions | undefined];
|
97
|
+
wrapInList: [getAttrs: WrapInListGetAttrs<ListAttributes>];
|
98
|
+
insertList: [attrs?: ListAttributes | undefined];
|
99
|
+
};
|
100
|
+
Nodes: never;
|
101
|
+
Marks: never;
|
102
|
+
}>]>, UnionExtension<readonly [Extension< {
|
103
|
+
Nodes: {
|
104
|
+
blockquote: Attrs;
|
105
|
+
};
|
106
|
+
Marks: never;
|
107
|
+
Commands: never;
|
108
|
+
}>, Extension<ExtensionTyping<any, any, any>>]>, Extension<ExtensionTyping<any, any, any>>, Extension< {
|
46
109
|
Commands: {
|
47
110
|
insertText: [{
|
48
111
|
text: string;
|
@@ -59,37 +122,143 @@ addMark: [options: AddMarkOptions];
|
|
59
122
|
removeMark: [options: RemoveMarkOptions];
|
60
123
|
unsetBlockType: [options?: UnsetBlockTypeOptions | undefined];
|
61
124
|
unsetMark: [options?: UnsetMarkOptions | undefined];
|
62
|
-
|
63
|
-
|
125
|
+
};
|
126
|
+
Nodes: never;
|
127
|
+
Marks: never;
|
128
|
+
}>, UnionExtension<readonly [Extension< {
|
129
|
+
Marks: {
|
130
|
+
italic: Attrs;
|
131
|
+
};
|
132
|
+
Nodes: never;
|
133
|
+
Commands: never;
|
134
|
+
}>, Extension< {
|
135
|
+
Commands: {
|
136
|
+
toggleItalic: [];
|
137
|
+
};
|
138
|
+
Nodes: never;
|
139
|
+
Marks: never;
|
140
|
+
}>, Extension<ExtensionTyping<any, any, any>>, Extension<ExtensionTyping<any, any, any>>]>, UnionExtension<readonly [Extension< {
|
141
|
+
Marks: {
|
142
|
+
bold: Attrs;
|
143
|
+
};
|
144
|
+
Nodes: never;
|
145
|
+
Commands: never;
|
146
|
+
}>, Extension< {
|
147
|
+
Commands: {
|
64
148
|
toggleBold: [];
|
149
|
+
};
|
150
|
+
Nodes: never;
|
151
|
+
Marks: never;
|
152
|
+
}>, Extension<ExtensionTyping<any, any, any>>, Extension<ExtensionTyping<any, any, any>>]>, UnionExtension<readonly [Extension< {
|
153
|
+
Marks: {
|
154
|
+
underline: Attrs;
|
155
|
+
};
|
156
|
+
Nodes: never;
|
157
|
+
Commands: never;
|
158
|
+
}>, Extension< {
|
159
|
+
Commands: {
|
160
|
+
toggleUnderline: [];
|
161
|
+
};
|
162
|
+
Nodes: never;
|
163
|
+
Marks: never;
|
164
|
+
}>, Extension<ExtensionTyping<any, any, any>>]>, UnionExtension<readonly [Extension< {
|
165
|
+
Marks: {
|
166
|
+
strike: Attrs;
|
167
|
+
};
|
168
|
+
Nodes: never;
|
169
|
+
Commands: never;
|
170
|
+
}>, Extension< {
|
171
|
+
Commands: {
|
172
|
+
toggleStrike: [];
|
173
|
+
};
|
174
|
+
Nodes: never;
|
175
|
+
Marks: never;
|
176
|
+
}>, Extension<ExtensionTyping<any, any, any>>, Extension<ExtensionTyping<any, any, any>>]>, UnionExtension<readonly [Extension< {
|
177
|
+
Marks: {
|
178
|
+
code: Attrs;
|
179
|
+
};
|
180
|
+
Nodes: never;
|
181
|
+
Commands: never;
|
182
|
+
}>, Extension< {
|
183
|
+
Commands: {
|
65
184
|
toggleCode: [];
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
185
|
+
};
|
186
|
+
Nodes: never;
|
187
|
+
Marks: never;
|
188
|
+
}>, Extension<ExtensionTyping<any, any, any>>, Extension<ExtensionTyping<any, any, any>>]>, UnionExtension<readonly [Extension< {
|
189
|
+
Marks: {
|
190
|
+
link: LinkAttrs;
|
191
|
+
};
|
192
|
+
Nodes: never;
|
193
|
+
Commands: never;
|
194
|
+
}>, Extension< {
|
195
|
+
Commands: {
|
71
196
|
addLink: [attrs: LinkAttrs];
|
72
197
|
removeLink: [];
|
73
198
|
toggleLink: [attrs: LinkAttrs];
|
74
199
|
expandLink: [];
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
200
|
+
};
|
201
|
+
Nodes: never;
|
202
|
+
Marks: never;
|
203
|
+
}>, Extension<ExtensionTyping<any, any, any>>, Extension<ExtensionTyping<any, any, any>>]>, UnionExtension<readonly [Extension< {
|
204
|
+
Nodes: {
|
205
|
+
image: {
|
206
|
+
src: null;
|
207
|
+
};
|
208
|
+
};
|
209
|
+
Marks: never;
|
210
|
+
Commands: never;
|
211
|
+
}>, Extension< {
|
212
|
+
Commands: {
|
213
|
+
insertImage: [attrs?: ImageAttrs | undefined];
|
214
|
+
};
|
215
|
+
Nodes: never;
|
216
|
+
Marks: never;
|
217
|
+
}>]>, Extension< {
|
218
|
+
Nodes: {
|
219
|
+
paragraph: Attrs;
|
220
|
+
};
|
221
|
+
Marks: never;
|
222
|
+
Commands: never;
|
223
|
+
}>, Extension<ExtensionTyping<any, any, any>>, Extension<ExtensionTyping<any, any, any>>, Extension<ExtensionTyping<any, any, any>>, UnionExtension<readonly [Extension< {
|
224
|
+
Nodes: {
|
225
|
+
table: Attrs;
|
226
|
+
};
|
227
|
+
Marks: never;
|
228
|
+
Commands: never;
|
229
|
+
}>, Extension< {
|
230
|
+
Nodes: {
|
231
|
+
tableRow: Attrs;
|
232
|
+
};
|
233
|
+
Marks: never;
|
234
|
+
Commands: never;
|
235
|
+
}>, Extension< {
|
236
|
+
Nodes: {
|
237
|
+
tableCell: {
|
238
|
+
[x: string]: any;
|
239
|
+
};
|
240
|
+
};
|
241
|
+
Marks: never;
|
242
|
+
Commands: never;
|
243
|
+
}>, Extension< {
|
244
|
+
Nodes: {
|
245
|
+
tableHeaderCell: {
|
246
|
+
[x: string]: any;
|
247
|
+
};
|
248
|
+
};
|
249
|
+
Marks: never;
|
250
|
+
Commands: never;
|
251
|
+
}>, Extension<ExtensionTyping<any, any, any>>, Extension< {
|
252
|
+
Commands: {
|
85
253
|
insertTable: [{
|
86
254
|
row: number;
|
87
255
|
col: number;
|
88
256
|
header: boolean;
|
89
257
|
}];
|
90
258
|
exitTable: [];
|
91
|
-
toggleUnderline: [];
|
92
259
|
};
|
93
|
-
|
260
|
+
Nodes: never;
|
261
|
+
Marks: never;
|
262
|
+
}>]>]>;
|
94
263
|
|
95
264
|
export { }
|
package/dist/style.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* ../../node_modules/.pnpm/prosemirror-view@1.33.
|
1
|
+
/* ../../node_modules/.pnpm/prosemirror-view@1.33.9/node_modules/prosemirror-view/style/prosemirror.css */
|
2
2
|
.ProseMirror {
|
3
3
|
position: relative;
|
4
4
|
}
|
@@ -52,7 +52,7 @@ img.ProseMirror-separator {
|
|
52
52
|
|
53
53
|
/* ../pm/src/view/style/prosemirror.css */
|
54
54
|
|
55
|
-
/* ../../node_modules/.pnpm/prosemirror-flat-list@0.5.
|
55
|
+
/* ../../node_modules/.pnpm/prosemirror-flat-list@0.5.4/node_modules/prosemirror-flat-list/dist/style.css */
|
56
56
|
.prosemirror-flat-list {
|
57
57
|
padding: 0;
|
58
58
|
margin-top: 0;
|
@@ -202,4 +202,28 @@ img.ProseMirror-separator {
|
|
202
202
|
background-color: #53e54b80;
|
203
203
|
}
|
204
204
|
|
205
|
+
/* ../extensions/src/gap-cursor/style.css */
|
206
|
+
.ProseMirror-gapcursor {
|
207
|
+
display: none;
|
208
|
+
pointer-events: none;
|
209
|
+
position: relative;
|
210
|
+
}
|
211
|
+
.ProseMirror-gapcursor:after {
|
212
|
+
content: "";
|
213
|
+
display: block;
|
214
|
+
position: absolute;
|
215
|
+
top: -2px;
|
216
|
+
width: 20px;
|
217
|
+
border-top: 1px solid currentColor;
|
218
|
+
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
219
|
+
}
|
220
|
+
@keyframes ProseMirror-cursor-blink {
|
221
|
+
to {
|
222
|
+
visibility: hidden;
|
223
|
+
}
|
224
|
+
}
|
225
|
+
.ProseMirror-focused .ProseMirror-gapcursor {
|
226
|
+
display: block;
|
227
|
+
}
|
228
|
+
|
205
229
|
/* src/style.css */
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosekit/basic",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.0-next-
|
4
|
+
"version": "0.0.0-next-20240724155246",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -41,16 +41,16 @@
|
|
41
41
|
"dist"
|
42
42
|
],
|
43
43
|
"dependencies": {
|
44
|
-
"@prosekit/core": "^0.0.0-next-
|
45
|
-
"@prosekit/
|
46
|
-
"@prosekit/
|
44
|
+
"@prosekit/core": "^0.0.0-next-20240724155246",
|
45
|
+
"@prosekit/pm": "^0.0.0-next-20240724155246",
|
46
|
+
"@prosekit/extensions": "^0.0.0-next-20240724155246"
|
47
47
|
},
|
48
48
|
"devDependencies": {
|
49
49
|
"postcss": "^8.4.39",
|
50
50
|
"postcss-nesting": "^12.1.5",
|
51
|
-
"tsup": "^8.
|
51
|
+
"tsup": "^8.2.2",
|
52
52
|
"typescript": "^5.5.3",
|
53
|
-
"vitest": "^2.0.
|
53
|
+
"vitest": "^2.0.4",
|
54
54
|
"@prosekit/dev": "0.0.0"
|
55
55
|
},
|
56
56
|
"scripts": {
|