prosekit 0.9.15 → 0.9.17
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 +33 -0
- package/dist/basic/style.css +1 -1
- package/dist/basic/typography.css +14 -14
- package/dist/extensions/loro/style.css +32 -0
- package/dist/pm/view/style/prosemirror.css +1 -1
- package/dist/prosekit-extensions-heading.d.ts +1 -1
- package/dist/prosekit-extensions-loro.d.ts +11 -0
- package/dist/prosekit-extensions-loro.js +2 -0
- package/package.json +37 -16
|
@@ -194,6 +194,12 @@ import { defineListInputRules } from '@prosekit/extensions/list';
|
|
|
194
194
|
import { defineListKeymap } from '@prosekit/extensions/list';
|
|
195
195
|
import { defineListPlugins } from '@prosekit/extensions/list';
|
|
196
196
|
import { defineListSpec } from '@prosekit/extensions/list';
|
|
197
|
+
import { defineLoro } from '@prosekit/extensions/loro';
|
|
198
|
+
import { defineLoroCommands } from '@prosekit/extensions/loro';
|
|
199
|
+
import { defineLoroCursorPlugin } from '@prosekit/extensions/loro';
|
|
200
|
+
import { defineLoroKeymap } from '@prosekit/extensions/loro';
|
|
201
|
+
import { defineLoroSyncPlugin } from '@prosekit/extensions/loro';
|
|
202
|
+
import { defineLoroUndoPlugin } from '@prosekit/extensions/loro';
|
|
197
203
|
import { defineMarkAttr } from '@prosekit/core';
|
|
198
204
|
import { defineMarkInputRule } from '@prosekit/extensions/input-rule';
|
|
199
205
|
import { defineMarkRule } from '@prosekit/extensions/mark-rule';
|
|
@@ -385,6 +391,11 @@ import { ListCommandsExtension } from '@prosekit/extensions/list';
|
|
|
385
391
|
import { ListDOMSerializer } from '@prosekit/extensions/list';
|
|
386
392
|
import { ListExtension } from '@prosekit/extensions/list';
|
|
387
393
|
import { ListSpecExtension } from '@prosekit/extensions/list';
|
|
394
|
+
import { LoroCursorOptions } from '@prosekit/extensions/loro';
|
|
395
|
+
import { LoroExtension } from '@prosekit/extensions/loro';
|
|
396
|
+
import { LoroOptions } from '@prosekit/extensions/loro';
|
|
397
|
+
import { LoroSyncPluginProps } from '@prosekit/extensions/loro';
|
|
398
|
+
import { LoroUndoPluginProps } from '@prosekit/extensions/loro';
|
|
388
399
|
import { macBaseKeymap } from '@prosekit/pm/commands';
|
|
389
400
|
import { Mappable } from '@prosekit/pm/transform';
|
|
390
401
|
import { Mapping } from '@prosekit/pm/transform';
|
|
@@ -1091,6 +1102,18 @@ export { defineListPlugins }
|
|
|
1091
1102
|
|
|
1092
1103
|
export { defineListSpec }
|
|
1093
1104
|
|
|
1105
|
+
export { defineLoro }
|
|
1106
|
+
|
|
1107
|
+
export { defineLoroCommands }
|
|
1108
|
+
|
|
1109
|
+
export { defineLoroCursorPlugin }
|
|
1110
|
+
|
|
1111
|
+
export { defineLoroKeymap }
|
|
1112
|
+
|
|
1113
|
+
export { defineLoroSyncPlugin }
|
|
1114
|
+
|
|
1115
|
+
export { defineLoroUndoPlugin }
|
|
1116
|
+
|
|
1094
1117
|
export { defineMarkAttr }
|
|
1095
1118
|
|
|
1096
1119
|
export { defineMarkInputRule }
|
|
@@ -1473,6 +1496,16 @@ export { ListExtension }
|
|
|
1473
1496
|
|
|
1474
1497
|
export { ListSpecExtension }
|
|
1475
1498
|
|
|
1499
|
+
export { LoroCursorOptions }
|
|
1500
|
+
|
|
1501
|
+
export { LoroExtension }
|
|
1502
|
+
|
|
1503
|
+
export { LoroOptions }
|
|
1504
|
+
|
|
1505
|
+
export { LoroSyncPluginProps }
|
|
1506
|
+
|
|
1507
|
+
export { LoroUndoPluginProps }
|
|
1508
|
+
|
|
1476
1509
|
export { macBaseKeymap }
|
|
1477
1510
|
|
|
1478
1511
|
export { Mappable }
|
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,32 @@
|
|
|
1
|
+
/* ../extensions/src/loro/style.css */
|
|
2
|
+
.ProseMirror-loro-cursor:first-child {
|
|
3
|
+
margin-top: 16px;
|
|
4
|
+
}
|
|
5
|
+
.ProseMirror-loro-cursor {
|
|
6
|
+
position: relative;
|
|
7
|
+
margin-left: -1px;
|
|
8
|
+
margin-right: -1px;
|
|
9
|
+
border-left: 1px solid black;
|
|
10
|
+
border-right: 1px solid black;
|
|
11
|
+
border-color: orange;
|
|
12
|
+
word-break: normal;
|
|
13
|
+
pointer-events: none;
|
|
14
|
+
}
|
|
15
|
+
.ProseMirror-loro-cursor > div {
|
|
16
|
+
position: absolute;
|
|
17
|
+
top: -1.05em;
|
|
18
|
+
left: -1px;
|
|
19
|
+
font-size: 13px;
|
|
20
|
+
background-color: rgb(250, 129, 0);
|
|
21
|
+
font-family: serif;
|
|
22
|
+
font-style: normal;
|
|
23
|
+
font-weight: normal;
|
|
24
|
+
line-height: normal;
|
|
25
|
+
user-select: none;
|
|
26
|
+
color: white;
|
|
27
|
+
padding-left: 2px;
|
|
28
|
+
padding-right: 2px;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* src/extensions/loro/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,11 @@
|
|
|
1
|
+
export { defineLoro } from './_tsup-dts-rollup';
|
|
2
|
+
export { LoroOptions } from './_tsup-dts-rollup';
|
|
3
|
+
export { LoroExtension } from './_tsup-dts-rollup';
|
|
4
|
+
export { defineLoroCommands } from './_tsup-dts-rollup';
|
|
5
|
+
export { defineLoroCursorPlugin } from './_tsup-dts-rollup';
|
|
6
|
+
export { defineLoroKeymap } from './_tsup-dts-rollup';
|
|
7
|
+
export { defineLoroSyncPlugin } from './_tsup-dts-rollup';
|
|
8
|
+
export { defineLoroUndoPlugin } from './_tsup-dts-rollup';
|
|
9
|
+
export { LoroCursorOptions } from './_tsup-dts-rollup';
|
|
10
|
+
export { LoroSyncPluginProps } from './_tsup-dts-rollup';
|
|
11
|
+
export { LoroUndoPluginProps } 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.17",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "ocavue",
|
|
@@ -140,6 +140,14 @@
|
|
|
140
140
|
"./extensions/list/style.css": {
|
|
141
141
|
"default": "./dist/extensions/list/style.css"
|
|
142
142
|
},
|
|
143
|
+
"./extensions/loro": {
|
|
144
|
+
"types": "./dist/prosekit-extensions-loro.d.ts",
|
|
145
|
+
"import": "./dist/prosekit-extensions-loro.js",
|
|
146
|
+
"default": "./dist/prosekit-extensions-loro.js"
|
|
147
|
+
},
|
|
148
|
+
"./extensions/loro/style.css": {
|
|
149
|
+
"default": "./dist/extensions/loro/style.css"
|
|
150
|
+
},
|
|
143
151
|
"./extensions/mark-rule": {
|
|
144
152
|
"types": "./dist/prosekit-extensions-mark-rule.d.ts",
|
|
145
153
|
"import": "./dist/prosekit-extensions-mark-rule.js",
|
|
@@ -513,19 +521,21 @@
|
|
|
513
521
|
"dist"
|
|
514
522
|
],
|
|
515
523
|
"dependencies": {
|
|
516
|
-
"@prosekit/
|
|
517
|
-
"@prosekit/
|
|
518
|
-
"@prosekit/
|
|
524
|
+
"@prosekit/basic": "0.3.24",
|
|
525
|
+
"@prosekit/core": "0.7.9",
|
|
526
|
+
"@prosekit/extensions": "0.7.12",
|
|
527
|
+
"@prosekit/lit": "0.3.20",
|
|
519
528
|
"@prosekit/pm": "0.1.8",
|
|
520
|
-
"@prosekit/preact": "0.3.
|
|
521
|
-
"@prosekit/react": "0.3.
|
|
522
|
-
"@prosekit/solid": "0.3.
|
|
523
|
-
"@prosekit/svelte": "0.4.
|
|
524
|
-
"@prosekit/vue": "0.3.
|
|
525
|
-
"@prosekit/web": "0.3.
|
|
526
|
-
"@prosekit/basic": "0.3.22"
|
|
529
|
+
"@prosekit/preact": "0.3.23",
|
|
530
|
+
"@prosekit/react": "0.3.24",
|
|
531
|
+
"@prosekit/solid": "0.3.22",
|
|
532
|
+
"@prosekit/svelte": "0.4.14",
|
|
533
|
+
"@prosekit/vue": "0.3.23",
|
|
534
|
+
"@prosekit/web": "0.3.12"
|
|
527
535
|
},
|
|
528
536
|
"peerDependencies": {
|
|
537
|
+
"loro-crdt": ">= 0.16.7",
|
|
538
|
+
"loro-prosemirror": ">= 0.0.7",
|
|
529
539
|
"preact": ">= 10.11.0",
|
|
530
540
|
"react": ">= 18.2.0",
|
|
531
541
|
"react-dom": ">= 18.2.0",
|
|
@@ -536,6 +546,12 @@
|
|
|
536
546
|
"yjs": ">= 13.6.18"
|
|
537
547
|
},
|
|
538
548
|
"peerDependenciesMeta": {
|
|
549
|
+
"loro-crdt": {
|
|
550
|
+
"optional": true
|
|
551
|
+
},
|
|
552
|
+
"loro-prosemirror": {
|
|
553
|
+
"optional": true
|
|
554
|
+
},
|
|
539
555
|
"y-prosemirror": {
|
|
540
556
|
"optional": true
|
|
541
557
|
},
|
|
@@ -564,17 +580,19 @@
|
|
|
564
580
|
"devDependencies": {
|
|
565
581
|
"@types/react": "^18.3.3",
|
|
566
582
|
"@types/react-dom": "^18.3.0",
|
|
583
|
+
"loro-crdt": "^0.16.7",
|
|
584
|
+
"loro-prosemirror": "^0.0.7",
|
|
567
585
|
"postcss": "^8.4.41",
|
|
568
|
-
"postcss-nesting": "^
|
|
569
|
-
"preact": "^10.23.
|
|
586
|
+
"postcss-nesting": "^13.0.0",
|
|
587
|
+
"preact": "^10.23.2",
|
|
570
588
|
"react": "^18.3.1",
|
|
571
589
|
"react-dom": "^18.3.1",
|
|
572
|
-
"solid-js": "^1.8.
|
|
590
|
+
"solid-js": "^1.8.21",
|
|
573
591
|
"svelte": "^4.2.18",
|
|
574
592
|
"tsup": "^8.2.4",
|
|
575
593
|
"typescript": "^5.5.4",
|
|
576
|
-
"vue": "^3.4.
|
|
577
|
-
"y-prosemirror": "^1.2.
|
|
594
|
+
"vue": "^3.4.38",
|
|
595
|
+
"y-prosemirror": "^1.2.12",
|
|
578
596
|
"yjs": "^13.6.18",
|
|
579
597
|
"@prosekit/dev": "0.0.0"
|
|
580
598
|
},
|
|
@@ -645,6 +663,9 @@
|
|
|
645
663
|
"extensions/list": [
|
|
646
664
|
"./dist/prosekit-extensions-list.d.ts"
|
|
647
665
|
],
|
|
666
|
+
"extensions/loro": [
|
|
667
|
+
"./dist/prosekit-extensions-loro.d.ts"
|
|
668
|
+
],
|
|
648
669
|
"extensions/mark-rule": [
|
|
649
670
|
"./dist/prosekit-extensions-mark-rule.d.ts"
|
|
650
671
|
],
|