automerge-lexical 0.1.0 → 0.1.1
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.
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { UpdateSpansConfig } from '@automerge/automerge';
|
|
2
2
|
import { DocHandle } from '@automerge/automerge-repo';
|
|
3
3
|
import { LexicalEditor } from 'lexical';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
interface AutomergeChangePluginProps<T> {
|
|
5
|
+
/**
|
|
6
|
+
* Registers synchronization between a Lexical editor and an Automerge document.
|
|
7
|
+
*/
|
|
8
|
+
registerSync(editor: LexicalEditor, handle: DocHandle<T>, updateSpansConfig?: UpdateSpansConfig): () => void;
|
|
9
|
+
/**
|
|
10
|
+
* The Automerge document handle to synchronize with.
|
|
11
|
+
*/
|
|
12
|
+
handle: DocHandle<T>;
|
|
8
13
|
}
|
|
9
|
-
export declare
|
|
14
|
+
export declare function AutomergeChangePlugin<T>({ registerSync, handle }: AutomergeChangePluginProps<T>): null;
|
|
10
15
|
export {};
|
|
@@ -357,12 +357,12 @@ function k(t, n, r, i = O) {
|
|
|
357
357
|
}
|
|
358
358
|
//#endregion
|
|
359
359
|
//#region src/AutomergeChangePlugin.tsx
|
|
360
|
-
|
|
360
|
+
function A({ registerSync: e, handle: t }) {
|
|
361
361
|
let [n] = S();
|
|
362
362
|
return m(() => {
|
|
363
363
|
let r = e(n, t);
|
|
364
364
|
return () => r();
|
|
365
365
|
}, [n]), null;
|
|
366
|
-
}
|
|
366
|
+
}
|
|
367
367
|
//#endregion
|
|
368
368
|
export { A as AutomergeChangePlugin, E as AutomergeLexical, k as automergeConfig };
|