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
- import { default as React } from 'react';
5
- interface AutomergeChangePluginProps {
6
- registerSync(editor: LexicalEditor, handle: DocHandle<any>, updateSpansConfig?: UpdateSpansConfig): () => void;
7
- handle: DocHandle<any>;
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 const AutomergeChangePlugin: React.FC<AutomergeChangePluginProps>;
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
- var A = ({ registerSync: e, handle: t }) => {
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 };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "automerge-lexical",
3
3
  "private": false,
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "type": "module",
6
6
  "main": "./dist/automerge-lexical-plugin.es.js",
7
7
  "module": "./dist/automerge-lexical-plugin.es.js",