prosekit 0.9.16 → 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.
@@ -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 }
@@ -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 */
@@ -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';
@@ -0,0 +1,2 @@
1
+ // src/extensions/loro.gen.ts
2
+ export * from "@prosekit/extensions/loro";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prosekit",
3
3
  "type": "module",
4
- "version": "0.9.16",
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/basic": "0.3.23",
524
+ "@prosekit/basic": "0.3.24",
517
525
  "@prosekit/core": "0.7.9",
518
- "@prosekit/extensions": "0.7.11",
519
- "@prosekit/lit": "0.3.19",
520
- "@prosekit/preact": "0.3.22",
526
+ "@prosekit/extensions": "0.7.12",
527
+ "@prosekit/lit": "0.3.20",
521
528
  "@prosekit/pm": "0.1.8",
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"
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,6 +580,8 @@
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
586
  "postcss-nesting": "^13.0.0",
569
587
  "preact": "^10.23.2",
@@ -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
  ],