prosekit 0.9.13 → 0.9.15
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 +63 -0
- package/dist/extensions/yjs/style.css +33 -0
- package/dist/prosekit-core.d.ts +6 -0
- package/dist/prosekit-extensions-code-block.d.ts +1 -0
- package/dist/prosekit-extensions-yjs.d.ts +14 -0
- package/dist/prosekit-extensions-yjs.js +2 -0
- package/package.json +40 -19
|
@@ -82,10 +82,12 @@ import { clsx } from '@prosekit/core';
|
|
|
82
82
|
import { CodeBlockAttrs } from '@prosekit/extensions/code-block';
|
|
83
83
|
import { CodeBlockCommandsExtension } from '@prosekit/extensions/code-block';
|
|
84
84
|
import { CodeBlockExtension } from '@prosekit/extensions/code-block';
|
|
85
|
+
import { CodeBlockHighlightOptions } from '@prosekit/extensions/code-block';
|
|
85
86
|
import { CodeBlockSpecExtension } from '@prosekit/extensions/code-block';
|
|
86
87
|
import { CodeCommandsExtension } from '@prosekit/extensions/code';
|
|
87
88
|
import { CodeExtension } from '@prosekit/extensions/code';
|
|
88
89
|
import { CodeSpecExtension } from '@prosekit/extensions/code';
|
|
90
|
+
import { collectChildren } from '@prosekit/core';
|
|
89
91
|
import { collectNodes } from '@prosekit/core';
|
|
90
92
|
import { Command } from '@prosekit/pm/state';
|
|
91
93
|
import { CommandAction } from '@prosekit/core';
|
|
@@ -246,6 +248,12 @@ import { defineUpdateHandler } from '@prosekit/core';
|
|
|
246
248
|
import { defineVirtualSelection } from '@prosekit/extensions/virtual-selection';
|
|
247
249
|
import { defineVueNodeView } from '@prosekit/vue';
|
|
248
250
|
import { defineWrappingInputRule } from '@prosekit/extensions/input-rule';
|
|
251
|
+
import { defineYjs } from '@prosekit/extensions/yjs';
|
|
252
|
+
import { defineYjsCommands } from '@prosekit/extensions/yjs';
|
|
253
|
+
import { defineYjsCursorPlugin } from '@prosekit/extensions/yjs';
|
|
254
|
+
import { defineYjsKeymap } from '@prosekit/extensions/yjs';
|
|
255
|
+
import { defineYjsSyncPlugin } from '@prosekit/extensions/yjs';
|
|
256
|
+
import { defineYjsUndoPlugin } from '@prosekit/extensions/yjs';
|
|
249
257
|
import { deleteSelection } from '@prosekit/pm/commands';
|
|
250
258
|
import { DirectEditorProps } from '@prosekit/pm/view';
|
|
251
259
|
import { DocAttrStep } from '@prosekit/pm/transform';
|
|
@@ -291,6 +299,9 @@ import { ExtractMarks } from '@prosekit/core';
|
|
|
291
299
|
import { ExtractNodeActions } from '@prosekit/core';
|
|
292
300
|
import { ExtractNodes } from '@prosekit/core';
|
|
293
301
|
import { Facet } from '@prosekit/core';
|
|
302
|
+
import { findParentNode } from '@prosekit/core';
|
|
303
|
+
import { findParentNodeOfType } from '@prosekit/core';
|
|
304
|
+
import { FindParentNodeResult } from '@prosekit/core';
|
|
294
305
|
import { findWrapping } from '@prosekit/pm/transform';
|
|
295
306
|
import { FocusChangeHandler } from '@prosekit/core';
|
|
296
307
|
import { Fragment } from '@prosekit/pm/model';
|
|
@@ -331,6 +342,7 @@ import { insertPoint } from '@prosekit/pm/transform';
|
|
|
331
342
|
import { isAllSelection } from '@prosekit/core';
|
|
332
343
|
import { isApple } from '@prosekit/core';
|
|
333
344
|
import { isAtBlockStart } from '@prosekit/core';
|
|
345
|
+
import { isFragment } from '@prosekit/core';
|
|
334
346
|
import { isInCodeBlock } from '@prosekit/core';
|
|
335
347
|
import { isMark } from '@prosekit/core';
|
|
336
348
|
import { isMarkAbsent } from '@prosekit/core';
|
|
@@ -338,6 +350,7 @@ import { isMarkActive } from '@prosekit/core';
|
|
|
338
350
|
import { isNodeSelection } from '@prosekit/core';
|
|
339
351
|
import { isProseMirrorNode } from '@prosekit/core';
|
|
340
352
|
import { isSelection } from '@prosekit/core';
|
|
353
|
+
import { isSlice } from '@prosekit/core';
|
|
341
354
|
import { isTextSelection } from '@prosekit/core';
|
|
342
355
|
import { ItalicCommandsExtension } from '@prosekit/extensions/italic';
|
|
343
356
|
import { ItalicExtension } from '@prosekit/extensions/italic';
|
|
@@ -669,6 +682,14 @@ import { wrapIn } from '@prosekit/pm/commands';
|
|
|
669
682
|
import { WrapInListGetAttrs } from '@prosekit/extensions/list';
|
|
670
683
|
import { WrapOptions } from '@prosekit/core';
|
|
671
684
|
import { wrappingInputRule } from '@prosekit/pm/inputrules';
|
|
685
|
+
import { YjsCursorOptions } from '@prosekit/extensions/yjs';
|
|
686
|
+
import { YjsCursorPluginOptions } from '@prosekit/extensions/yjs';
|
|
687
|
+
import { YjsExtension } from '@prosekit/extensions/yjs';
|
|
688
|
+
import { YjsOptions } from '@prosekit/extensions/yjs';
|
|
689
|
+
import { YjsSyncOptions } from '@prosekit/extensions/yjs';
|
|
690
|
+
import { YjsSyncPluginOptions } from '@prosekit/extensions/yjs';
|
|
691
|
+
import { YjsUndoOptions } from '@prosekit/extensions/yjs';
|
|
692
|
+
import { YjsUndoPluginOptions } from '@prosekit/extensions/yjs';
|
|
672
693
|
|
|
673
694
|
export { addMark }
|
|
674
695
|
|
|
@@ -838,6 +859,8 @@ export { CodeBlockCommandsExtension }
|
|
|
838
859
|
|
|
839
860
|
export { CodeBlockExtension }
|
|
840
861
|
|
|
862
|
+
export { CodeBlockHighlightOptions }
|
|
863
|
+
|
|
841
864
|
export { CodeBlockSpecExtension }
|
|
842
865
|
|
|
843
866
|
export { CodeCommandsExtension }
|
|
@@ -846,6 +869,8 @@ export { CodeExtension }
|
|
|
846
869
|
|
|
847
870
|
export { CodeSpecExtension }
|
|
848
871
|
|
|
872
|
+
export { collectChildren }
|
|
873
|
+
|
|
849
874
|
export { collectNodes }
|
|
850
875
|
|
|
851
876
|
export { Command }
|
|
@@ -1174,6 +1199,18 @@ export { defineVueNodeView }
|
|
|
1174
1199
|
|
|
1175
1200
|
export { defineWrappingInputRule }
|
|
1176
1201
|
|
|
1202
|
+
export { defineYjs }
|
|
1203
|
+
|
|
1204
|
+
export { defineYjsCommands }
|
|
1205
|
+
|
|
1206
|
+
export { defineYjsCursorPlugin }
|
|
1207
|
+
|
|
1208
|
+
export { defineYjsKeymap }
|
|
1209
|
+
|
|
1210
|
+
export { defineYjsSyncPlugin }
|
|
1211
|
+
|
|
1212
|
+
export { defineYjsUndoPlugin }
|
|
1213
|
+
|
|
1177
1214
|
export { deleteSelection }
|
|
1178
1215
|
|
|
1179
1216
|
export { DirectEditorProps }
|
|
@@ -1264,6 +1301,12 @@ export { ExtractNodes }
|
|
|
1264
1301
|
|
|
1265
1302
|
export { Facet }
|
|
1266
1303
|
|
|
1304
|
+
export { findParentNode }
|
|
1305
|
+
|
|
1306
|
+
export { findParentNodeOfType }
|
|
1307
|
+
|
|
1308
|
+
export { FindParentNodeResult }
|
|
1309
|
+
|
|
1267
1310
|
export { findWrapping }
|
|
1268
1311
|
|
|
1269
1312
|
export { FocusChangeHandler }
|
|
@@ -1344,6 +1387,8 @@ export { isApple }
|
|
|
1344
1387
|
|
|
1345
1388
|
export { isAtBlockStart }
|
|
1346
1389
|
|
|
1390
|
+
export { isFragment }
|
|
1391
|
+
|
|
1347
1392
|
export { isInCodeBlock }
|
|
1348
1393
|
|
|
1349
1394
|
export { isMark }
|
|
@@ -1358,6 +1403,8 @@ export { isProseMirrorNode }
|
|
|
1358
1403
|
|
|
1359
1404
|
export { isSelection }
|
|
1360
1405
|
|
|
1406
|
+
export { isSlice }
|
|
1407
|
+
|
|
1361
1408
|
export { isTextSelection }
|
|
1362
1409
|
|
|
1363
1410
|
export { ItalicCommandsExtension }
|
|
@@ -2018,4 +2065,20 @@ export { WrapOptions }
|
|
|
2018
2065
|
|
|
2019
2066
|
export { wrappingInputRule }
|
|
2020
2067
|
|
|
2068
|
+
export { YjsCursorOptions }
|
|
2069
|
+
|
|
2070
|
+
export { YjsCursorPluginOptions }
|
|
2071
|
+
|
|
2072
|
+
export { YjsExtension }
|
|
2073
|
+
|
|
2074
|
+
export { YjsOptions }
|
|
2075
|
+
|
|
2076
|
+
export { YjsSyncOptions }
|
|
2077
|
+
|
|
2078
|
+
export { YjsSyncPluginOptions }
|
|
2079
|
+
|
|
2080
|
+
export { YjsUndoOptions }
|
|
2081
|
+
|
|
2082
|
+
export { YjsUndoPluginOptions }
|
|
2083
|
+
|
|
2021
2084
|
export { }
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* ../extensions/src/yjs/style.css */
|
|
2
|
+
.ProseMirror .ProseMirror-yjs-cursor {
|
|
3
|
+
position: absolute;
|
|
4
|
+
border-left: black;
|
|
5
|
+
border-left-style: solid;
|
|
6
|
+
border-left-width: 2px;
|
|
7
|
+
border-color: orange;
|
|
8
|
+
height: 1em;
|
|
9
|
+
word-break: normal;
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
}
|
|
12
|
+
.ProseMirror .ProseMirror-yjs-cursor > div {
|
|
13
|
+
position: relative;
|
|
14
|
+
top: -1.05em;
|
|
15
|
+
font-size: 13px;
|
|
16
|
+
background-color: rgb(250, 129, 0);
|
|
17
|
+
font-family: serif;
|
|
18
|
+
font-style: normal;
|
|
19
|
+
font-weight: normal;
|
|
20
|
+
line-height: normal;
|
|
21
|
+
-webkit-user-select: none;
|
|
22
|
+
-moz-user-select: none;
|
|
23
|
+
-ms-user-select: none;
|
|
24
|
+
user-select: none;
|
|
25
|
+
color: white;
|
|
26
|
+
padding-left: 2px;
|
|
27
|
+
padding-right: 2px;
|
|
28
|
+
}
|
|
29
|
+
.ProseMirror > .ProseMirror-yjs-cursor:first-child {
|
|
30
|
+
margin-top: 16px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* src/extensions/yjs/style.css */
|
package/dist/prosekit-core.d.ts
CHANGED
|
@@ -142,11 +142,15 @@ export { SimplifyUnion } from './_tsup-dts-rollup';
|
|
|
142
142
|
export { assert } from './_tsup-dts-rollup';
|
|
143
143
|
export { canUseRegexLookbehind } from './_tsup-dts-rollup';
|
|
144
144
|
export { clsx } from './_tsup-dts-rollup';
|
|
145
|
+
export { collectChildren } from './_tsup-dts-rollup';
|
|
145
146
|
export { collectNodes } from './_tsup-dts-rollup';
|
|
146
147
|
export { NodeContent } from './_tsup-dts-rollup';
|
|
147
148
|
export { containsInlineNode } from './_tsup-dts-rollup';
|
|
148
149
|
export { defaultBlockAt } from './_tsup-dts-rollup';
|
|
149
150
|
export { isApple } from './_tsup-dts-rollup';
|
|
151
|
+
export { findParentNode } from './_tsup-dts-rollup';
|
|
152
|
+
export { FindParentNodeResult } from './_tsup-dts-rollup';
|
|
153
|
+
export { findParentNodeOfType } from './_tsup-dts-rollup';
|
|
150
154
|
export { _getId } from './_tsup-dts-rollup';
|
|
151
155
|
export { getMarkType } from './_tsup-dts-rollup';
|
|
152
156
|
export { getNodeType } from './_tsup-dts-rollup';
|
|
@@ -171,10 +175,12 @@ export { DOMParserOptions } from './_tsup-dts-rollup';
|
|
|
171
175
|
export { DOMSerializerOptions } from './_tsup-dts-rollup';
|
|
172
176
|
export { JSONParserOptions } from './_tsup-dts-rollup';
|
|
173
177
|
export { isAllSelection } from './_tsup-dts-rollup';
|
|
178
|
+
export { isFragment } from './_tsup-dts-rollup';
|
|
174
179
|
export { isMark } from './_tsup-dts-rollup';
|
|
175
180
|
export { isNodeSelection } from './_tsup-dts-rollup';
|
|
176
181
|
export { isProseMirrorNode } from './_tsup-dts-rollup';
|
|
177
182
|
export { isSelection } from './_tsup-dts-rollup';
|
|
183
|
+
export { isSlice } from './_tsup-dts-rollup';
|
|
178
184
|
export { isTextSelection } from './_tsup-dts-rollup';
|
|
179
185
|
export { withSkipCodeBlock } from './_tsup-dts-rollup';
|
|
180
186
|
export { OBJECT_REPLACEMENT_CHARACTER } from './_tsup-dts-rollup';
|
|
@@ -3,6 +3,7 @@ export { CodeBlockExtension } from './_tsup-dts-rollup';
|
|
|
3
3
|
export { defineCodeBlockCommands } from './_tsup-dts-rollup';
|
|
4
4
|
export { CodeBlockCommandsExtension } from './_tsup-dts-rollup';
|
|
5
5
|
export { defineCodeBlockHighlight } from './_tsup-dts-rollup';
|
|
6
|
+
export { CodeBlockHighlightOptions } from './_tsup-dts-rollup';
|
|
6
7
|
export { HighlightParser } from './_tsup-dts-rollup';
|
|
7
8
|
export { defineCodeBlockEnterRule } from './_tsup-dts-rollup';
|
|
8
9
|
export { defineCodeBlockInputRule } from './_tsup-dts-rollup';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { defineYjs } from './_tsup-dts-rollup';
|
|
2
|
+
export { YjsOptions } from './_tsup-dts-rollup';
|
|
3
|
+
export { YjsExtension } from './_tsup-dts-rollup';
|
|
4
|
+
export { defineYjsCommands } from './_tsup-dts-rollup';
|
|
5
|
+
export { defineYjsCursorPlugin } from './_tsup-dts-rollup';
|
|
6
|
+
export { defineYjsKeymap } from './_tsup-dts-rollup';
|
|
7
|
+
export { defineYjsSyncPlugin } from './_tsup-dts-rollup';
|
|
8
|
+
export { defineYjsUndoPlugin } from './_tsup-dts-rollup';
|
|
9
|
+
export { YjsCursorOptions } from './_tsup-dts-rollup';
|
|
10
|
+
export { YjsCursorPluginOptions } from './_tsup-dts-rollup';
|
|
11
|
+
export { YjsSyncOptions } from './_tsup-dts-rollup';
|
|
12
|
+
export { YjsSyncPluginOptions } from './_tsup-dts-rollup';
|
|
13
|
+
export { YjsUndoOptions } from './_tsup-dts-rollup';
|
|
14
|
+
export { YjsUndoPluginOptions } from './_tsup-dts-rollup';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prosekit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.15",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "ocavue",
|
|
@@ -207,6 +207,14 @@
|
|
|
207
207
|
"./extensions/virtual-selection/style.css": {
|
|
208
208
|
"default": "./dist/extensions/virtual-selection/style.css"
|
|
209
209
|
},
|
|
210
|
+
"./extensions/yjs": {
|
|
211
|
+
"types": "./dist/prosekit-extensions-yjs.d.ts",
|
|
212
|
+
"import": "./dist/prosekit-extensions-yjs.js",
|
|
213
|
+
"default": "./dist/prosekit-extensions-yjs.js"
|
|
214
|
+
},
|
|
215
|
+
"./extensions/yjs/style.css": {
|
|
216
|
+
"default": "./dist/extensions/yjs/style.css"
|
|
217
|
+
},
|
|
210
218
|
"./lit": {
|
|
211
219
|
"types": "./dist/prosekit-lit.d.ts",
|
|
212
220
|
"import": "./dist/prosekit-lit.js",
|
|
@@ -505,17 +513,17 @@
|
|
|
505
513
|
"dist"
|
|
506
514
|
],
|
|
507
515
|
"dependencies": {
|
|
508
|
-
"@prosekit/
|
|
509
|
-
"@prosekit/
|
|
510
|
-
"@prosekit/lit": "0.3.
|
|
511
|
-
"@prosekit/
|
|
512
|
-
"@prosekit/
|
|
513
|
-
"@prosekit/
|
|
514
|
-
"@prosekit/
|
|
515
|
-
"@prosekit/svelte": "0.4.
|
|
516
|
-
"@prosekit/
|
|
517
|
-
"@prosekit/
|
|
518
|
-
"@prosekit/
|
|
516
|
+
"@prosekit/core": "0.7.8",
|
|
517
|
+
"@prosekit/extensions": "0.7.10",
|
|
518
|
+
"@prosekit/lit": "0.3.18",
|
|
519
|
+
"@prosekit/pm": "0.1.8",
|
|
520
|
+
"@prosekit/preact": "0.3.21",
|
|
521
|
+
"@prosekit/react": "0.3.22",
|
|
522
|
+
"@prosekit/solid": "0.3.20",
|
|
523
|
+
"@prosekit/svelte": "0.4.12",
|
|
524
|
+
"@prosekit/vue": "0.3.21",
|
|
525
|
+
"@prosekit/web": "0.3.10",
|
|
526
|
+
"@prosekit/basic": "0.3.22"
|
|
519
527
|
},
|
|
520
528
|
"peerDependencies": {
|
|
521
529
|
"preact": ">= 10.11.0",
|
|
@@ -523,9 +531,17 @@
|
|
|
523
531
|
"react-dom": ">= 18.2.0",
|
|
524
532
|
"solid-js": ">= 1.7.0",
|
|
525
533
|
"svelte": ">= 3.0.0",
|
|
526
|
-
"vue": ">= 3.0.0"
|
|
534
|
+
"vue": ">= 3.0.0",
|
|
535
|
+
"y-prosemirror": ">= 1.2.9",
|
|
536
|
+
"yjs": ">= 13.6.18"
|
|
527
537
|
},
|
|
528
538
|
"peerDependenciesMeta": {
|
|
539
|
+
"y-prosemirror": {
|
|
540
|
+
"optional": true
|
|
541
|
+
},
|
|
542
|
+
"yjs": {
|
|
543
|
+
"optional": true
|
|
544
|
+
},
|
|
529
545
|
"preact": {
|
|
530
546
|
"optional": true
|
|
531
547
|
},
|
|
@@ -548,16 +564,18 @@
|
|
|
548
564
|
"devDependencies": {
|
|
549
565
|
"@types/react": "^18.3.3",
|
|
550
566
|
"@types/react-dom": "^18.3.0",
|
|
551
|
-
"postcss": "^8.4.
|
|
567
|
+
"postcss": "^8.4.41",
|
|
552
568
|
"postcss-nesting": "^12.1.5",
|
|
553
|
-
"preact": "^10.23.
|
|
569
|
+
"preact": "^10.23.1",
|
|
554
570
|
"react": "^18.3.1",
|
|
555
571
|
"react-dom": "^18.3.1",
|
|
556
|
-
"solid-js": "^1.8.
|
|
572
|
+
"solid-js": "^1.8.19",
|
|
557
573
|
"svelte": "^4.2.18",
|
|
558
|
-
"tsup": "^8.2.
|
|
559
|
-
"typescript": "^5.5.
|
|
560
|
-
"vue": "^3.4.
|
|
574
|
+
"tsup": "^8.2.4",
|
|
575
|
+
"typescript": "^5.5.4",
|
|
576
|
+
"vue": "^3.4.35",
|
|
577
|
+
"y-prosemirror": "^1.2.9",
|
|
578
|
+
"yjs": "^13.6.18",
|
|
561
579
|
"@prosekit/dev": "0.0.0"
|
|
562
580
|
},
|
|
563
581
|
"scripts": {
|
|
@@ -660,6 +678,9 @@
|
|
|
660
678
|
"extensions/virtual-selection": [
|
|
661
679
|
"./dist/prosekit-extensions-virtual-selection.d.ts"
|
|
662
680
|
],
|
|
681
|
+
"extensions/yjs": [
|
|
682
|
+
"./dist/prosekit-extensions-yjs.d.ts"
|
|
683
|
+
],
|
|
663
684
|
"lit": [
|
|
664
685
|
"./dist/prosekit-lit.d.ts"
|
|
665
686
|
],
|