prosekit 0.9.14 → 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.
@@ -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 { }
@@ -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 */
@@ -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';
@@ -0,0 +1,2 @@
1
+ // src/extensions/yjs.gen.ts
2
+ export * from "@prosekit/extensions/yjs";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prosekit",
3
3
  "type": "module",
4
- "version": "0.9.14",
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/basic": "0.3.21",
509
516
  "@prosekit/core": "0.7.8",
510
- "@prosekit/lit": "0.3.17",
511
- "@prosekit/extensions": "0.7.9",
517
+ "@prosekit/extensions": "0.7.10",
518
+ "@prosekit/lit": "0.3.18",
512
519
  "@prosekit/pm": "0.1.8",
513
- "@prosekit/preact": "0.3.20",
514
- "@prosekit/react": "0.3.21",
515
- "@prosekit/solid": "0.3.19",
516
- "@prosekit/svelte": "0.4.11",
517
- "@prosekit/vue": "0.3.20",
518
- "@prosekit/web": "0.3.9"
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.40",
567
+ "postcss": "^8.4.41",
552
568
  "postcss-nesting": "^12.1.5",
553
569
  "preact": "^10.23.1",
554
570
  "react": "^18.3.1",
555
571
  "react-dom": "^18.3.1",
556
572
  "solid-js": "^1.8.19",
557
573
  "svelte": "^4.2.18",
558
- "tsup": "^8.2.3",
559
- "typescript": "^5.5.3",
560
- "vue": "^3.4.34",
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
  ],