@kerebron/extension-yjs 0.0.1 → 0.0.2
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/README.md +8 -4
- package/esm/SyncPlugin.d.ts +3 -2
- package/esm/SyncPlugin.d.ts.map +1 -1
- package/esm/yCursorPlugin.d.ts +2 -1
- package/esm/yCursorPlugin.d.ts.map +1 -1
- package/package.json +9 -1
package/README.md
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
# Kerebron - Prosemirror based online editor kit
|
|
2
2
|
|
|
3
|
-
Using vanilla Prosemirror modules is often impossible because of
|
|
3
|
+
Using vanilla Prosemirror modules is often impossible because of
|
|
4
|
+
incompatibilities.
|
|
4
5
|
|
|
5
|
-
Kerebron forks several prosemirror projects into one monorepo in order to keep
|
|
6
|
+
Kerebron forks several prosemirror projects into one monorepo in order to keep
|
|
7
|
+
them in sync.
|
|
6
8
|
|
|
7
|
-
Project is inspired on https://tiptap.dev/, but instead of building wrapper
|
|
9
|
+
Project is inspired on https://tiptap.dev/, but instead of building wrapper
|
|
10
|
+
around a wrapper it borrows concept of extension and command manager.
|
|
8
11
|
|
|
9
|
-
It has simplified tooling (deno), fewer dependencies and resulting in lower
|
|
12
|
+
It has simplified tooling (deno), fewer dependencies and resulting in lower
|
|
13
|
+
number of output npm modules.
|
|
10
14
|
|
|
11
15
|
**Work in progress**
|
|
12
16
|
|
package/esm/SyncPlugin.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as PModel from 'prosemirror-model';
|
|
2
|
+
import { Plugin } from 'prosemirror-state';
|
|
2
3
|
import * as Y from 'yjs';
|
|
3
4
|
import { mutex } from 'lib0/mutex';
|
|
4
5
|
import { EditorView } from 'prosemirror-view';
|
|
@@ -9,7 +10,7 @@ import { YSyncOpts } from 'y-prosemirror';
|
|
|
9
10
|
* @param {Y.Snapshot} [snapshot]
|
|
10
11
|
*/
|
|
11
12
|
export declare const isVisible: (item: any, snapshot: any) => any;
|
|
12
|
-
export declare const ySyncPlugin: (yXmlFragment: Y.XmlFragment, { colors, colorMapping, permanentUserData, onFirstRender, mapping, }?: YSyncOpts) => any
|
|
13
|
+
export declare const ySyncPlugin: (yXmlFragment: Y.XmlFragment, { colors, colorMapping, permanentUserData, onFirstRender, mapping, }?: YSyncOpts) => Plugin<any>;
|
|
13
14
|
export declare const getRelativeSelection: (pmbinding: any, state: any) => {
|
|
14
15
|
anchor: any;
|
|
15
16
|
head: any;
|
|
@@ -39,7 +40,7 @@ export declare class ProsemirrorBinding {
|
|
|
39
40
|
*
|
|
40
41
|
* @returns
|
|
41
42
|
*/
|
|
42
|
-
get _tr():
|
|
43
|
+
get _tr(): import("prosemirror-state").Transaction | undefined;
|
|
43
44
|
_isLocalCursorInView(): any;
|
|
44
45
|
_isDomSelectionInView(): boolean;
|
|
45
46
|
renderSnapshot(snapshot: Y.Snapshot, prevSnapshot: Y.Snapshot): void;
|
package/esm/SyncPlugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SyncPlugin.d.ts","sourceRoot":"","sources":["../src/SyncPlugin.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SyncPlugin.d.ts","sourceRoot":"","sources":["../src/SyncPlugin.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAiB,MAAM,mBAAmB,CAAC;AAO1D,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAUzB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C;;;GAGG;AACH,eAA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CAOR;AA4BD;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,OAC7B,CAAC,CAAC,UAAU,UACR,GAAG,WACF,kBAAkB,YACjB,CAAC,CAAC,QAAQ,gBACN,CAAC,CAAC,QAAQ,kBACR,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,KAAK,GAAG,KAC7D,MAAM,CAAC,IAAI,GAAG,IAgFhB,CAAC;AAwPF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,yBAEZ,CAAC,CAAC,WAAW,uBAElB,kBAAkB,SA4J5B,CAAC"}
|
package/esm/yCursorPlugin.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as awarenessProtocol from 'y-protocols/awareness';
|
|
2
|
+
import { Plugin } from 'prosemirror-state';
|
|
2
3
|
import { DecorationAttrs } from 'prosemirror-view';
|
|
3
4
|
/**
|
|
4
5
|
* Default awareness state filter
|
|
@@ -38,5 +39,5 @@ export declare const yCursorPlugin: (awareness: awarenessProtocol.Awareness, { a
|
|
|
38
39
|
cursorBuilder?: (user: any, clientId: number) => HTMLElement;
|
|
39
40
|
selectionBuilder?: (user: any, clientId: number) => DecorationAttrs;
|
|
40
41
|
getSelection?: (arg0: any) => any;
|
|
41
|
-
}, cursorStateField?: string) => any
|
|
42
|
+
}, cursorStateField?: string) => Plugin<any>;
|
|
42
43
|
//# sourceMappingURL=yCursorPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yCursorPlugin.d.ts","sourceRoot":"","sources":["../src/yCursorPlugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,iBAAiB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"yCursorPlugin.d.ts","sourceRoot":"","sources":["../src/yCursorPlugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,iBAAiB,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAe,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
1
1
|
{
|
|
2
2
|
"name": "@kerebron/extension-yjs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"module": "./esm/ExtensionYjs.js",
|
|
6
6
|
"exports": {
|
|
@@ -8,6 +8,14 @@
|
|
|
8
8
|
"import": "./esm/ExtensionYjs.js"
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"lib0": "0.2.42",
|
|
13
|
+
"prosemirror-model": "1.24.1",
|
|
14
|
+
"prosemirror-state": "1.4.3",
|
|
15
|
+
"prosemirror-view": "1.33.6",
|
|
16
|
+
"y-protocols": "1.0.6",
|
|
17
|
+
"yjs": "13.6.24"
|
|
18
|
+
},
|
|
11
19
|
"devDependencies": {
|
|
12
20
|
"@types/node": "^20.9.0"
|
|
13
21
|
},
|