prosekit 0.9.14 → 0.9.16
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 +42 -0
- package/dist/basic/style.css +1 -1
- package/dist/basic/typography.css +14 -14
- package/dist/extensions/yjs/style.css +33 -0
- package/dist/pm/view/style/prosemirror.css +1 -1
- package/dist/prosekit-extensions-heading.d.ts +1 -1
- package/dist/prosekit-extensions-yjs.d.ts +14 -0
- package/dist/prosekit-extensions-yjs.js +2 -0
- package/package.json +40 -19
|
@@ -248,6 +248,12 @@ import { defineUpdateHandler } from '@prosekit/core';
|
|
|
248
248
|
import { defineVirtualSelection } from '@prosekit/extensions/virtual-selection';
|
|
249
249
|
import { defineVueNodeView } from '@prosekit/vue';
|
|
250
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';
|
|
251
257
|
import { deleteSelection } from '@prosekit/pm/commands';
|
|
252
258
|
import { DirectEditorProps } from '@prosekit/pm/view';
|
|
253
259
|
import { DocAttrStep } from '@prosekit/pm/transform';
|
|
@@ -676,6 +682,14 @@ import { wrapIn } from '@prosekit/pm/commands';
|
|
|
676
682
|
import { WrapInListGetAttrs } from '@prosekit/extensions/list';
|
|
677
683
|
import { WrapOptions } from '@prosekit/core';
|
|
678
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';
|
|
679
693
|
|
|
680
694
|
export { addMark }
|
|
681
695
|
|
|
@@ -1185,6 +1199,18 @@ export { defineVueNodeView }
|
|
|
1185
1199
|
|
|
1186
1200
|
export { defineWrappingInputRule }
|
|
1187
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
|
+
|
|
1188
1214
|
export { deleteSelection }
|
|
1189
1215
|
|
|
1190
1216
|
export { DirectEditorProps }
|
|
@@ -2039,4 +2065,20 @@ export { WrapOptions }
|
|
|
2039
2065
|
|
|
2040
2066
|
export { wrappingInputRule }
|
|
2041
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
|
+
|
|
2042
2084
|
export { }
|
package/dist/basic/style.css
CHANGED
|
@@ -105,32 +105,32 @@ div.ProseMirror hr {
|
|
|
105
105
|
div.ProseMirror .prosemirror-flat-list {
|
|
106
106
|
line-height: 1.5;
|
|
107
107
|
}
|
|
108
|
-
div.ProseMirror .prosemirror-flat-list::before,
|
|
109
|
-
div.ProseMirror .prosemirror-flat-list > .list-marker {
|
|
108
|
+
:is(div.ProseMirror .prosemirror-flat-list)::before,
|
|
109
|
+
:is(div.ProseMirror .prosemirror-flat-list) > .list-marker {
|
|
110
110
|
top: 0.5rem;
|
|
111
111
|
}
|
|
112
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h1)::before,
|
|
113
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h1) > .list-marker {
|
|
112
|
+
:is(div.ProseMirror .prosemirror-flat-list):has(> div.list-content > h1)::before,
|
|
113
|
+
:is(div.ProseMirror .prosemirror-flat-list):has(> div.list-content > h1) > .list-marker {
|
|
114
114
|
top: 1em;
|
|
115
115
|
}
|
|
116
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h2)::before,
|
|
117
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h2) > .list-marker {
|
|
116
|
+
:is(div.ProseMirror .prosemirror-flat-list):has(> div.list-content > h2)::before,
|
|
117
|
+
:is(div.ProseMirror .prosemirror-flat-list):has(> div.list-content > h2) > .list-marker {
|
|
118
118
|
top: 0.6em;
|
|
119
119
|
}
|
|
120
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h3)::before,
|
|
121
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h3) > .list-marker {
|
|
120
|
+
:is(div.ProseMirror .prosemirror-flat-list):has(> div.list-content > h3)::before,
|
|
121
|
+
:is(div.ProseMirror .prosemirror-flat-list):has(> div.list-content > h3) > .list-marker {
|
|
122
122
|
top: 0.25em;
|
|
123
123
|
}
|
|
124
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h4)::before,
|
|
125
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h4) > .list-marker {
|
|
124
|
+
:is(div.ProseMirror .prosemirror-flat-list):has(> div.list-content > h4)::before,
|
|
125
|
+
:is(div.ProseMirror .prosemirror-flat-list):has(> div.list-content > h4) > .list-marker {
|
|
126
126
|
top: 0;
|
|
127
127
|
}
|
|
128
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h5)::before,
|
|
129
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h5) > .list-marker {
|
|
128
|
+
:is(div.ProseMirror .prosemirror-flat-list):has(> div.list-content > h5)::before,
|
|
129
|
+
:is(div.ProseMirror .prosemirror-flat-list):has(> div.list-content > h5) > .list-marker {
|
|
130
130
|
top: -0.1em;
|
|
131
131
|
}
|
|
132
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h6)::before,
|
|
133
|
-
div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h6) > .list-marker {
|
|
132
|
+
:is(div.ProseMirror .prosemirror-flat-list):has(> div.list-content > h6)::before,
|
|
133
|
+
:is(div.ProseMirror .prosemirror-flat-list):has(> div.list-content > h6) > .list-marker {
|
|
134
134
|
top: -0.1em;
|
|
135
135
|
}
|
|
136
136
|
div.ProseMirror .ProseMirror-selectednode {
|
|
@@ -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 */
|
|
@@ -4,6 +4,6 @@ export { defineHeadingCommands } from './_tsup-dts-rollup';
|
|
|
4
4
|
export { defineHeadingInputRule } from './_tsup-dts-rollup';
|
|
5
5
|
export { defineHeadingKeymap } from './_tsup-dts-rollup';
|
|
6
6
|
export { defineHeadingSpec } from './_tsup-dts-rollup';
|
|
7
|
+
export { HeadingAttrs } from './_tsup-dts-rollup';
|
|
7
8
|
export { HeadingCommandsExtension } from './_tsup-dts-rollup';
|
|
8
9
|
export { HeadingSpecExtension } from './_tsup-dts-rollup';
|
|
9
|
-
export { HeadingAttrs } 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.16",
|
|
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/basic": "0.3.
|
|
509
|
-
"@prosekit/core": "0.7.
|
|
510
|
-
"@prosekit/
|
|
511
|
-
"@prosekit/
|
|
516
|
+
"@prosekit/basic": "0.3.23",
|
|
517
|
+
"@prosekit/core": "0.7.9",
|
|
518
|
+
"@prosekit/extensions": "0.7.11",
|
|
519
|
+
"@prosekit/lit": "0.3.19",
|
|
520
|
+
"@prosekit/preact": "0.3.22",
|
|
512
521
|
"@prosekit/pm": "0.1.8",
|
|
513
|
-
"@prosekit/
|
|
514
|
-
"@prosekit/react": "0.3.
|
|
515
|
-
"@prosekit/
|
|
516
|
-
"@prosekit/svelte": "0.4.
|
|
517
|
-
"@prosekit/
|
|
518
|
-
"@prosekit/web": "0.3.9"
|
|
522
|
+
"@prosekit/solid": "0.3.21",
|
|
523
|
+
"@prosekit/react": "0.3.23",
|
|
524
|
+
"@prosekit/vue": "0.3.22",
|
|
525
|
+
"@prosekit/svelte": "0.4.13",
|
|
526
|
+
"@prosekit/web": "0.3.11"
|
|
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.
|
|
552
|
-
"postcss-nesting": "^
|
|
553
|
-
"preact": "^10.23.
|
|
567
|
+
"postcss": "^8.4.41",
|
|
568
|
+
"postcss-nesting": "^13.0.0",
|
|
569
|
+
"preact": "^10.23.2",
|
|
554
570
|
"react": "^18.3.1",
|
|
555
571
|
"react-dom": "^18.3.1",
|
|
556
|
-
"solid-js": "^1.8.
|
|
572
|
+
"solid-js": "^1.8.21",
|
|
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.38",
|
|
577
|
+
"y-prosemirror": "^1.2.12",
|
|
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
|
],
|