@lexical/headless 0.9.0 → 0.9.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.
@@ -9,6 +9,13 @@
9
9
  var lexical = require('lexical');
10
10
 
11
11
  /** @module @lexical/headless */
12
+ /**
13
+ * Generates a headless editor that allows lexical to be used without the need for a DOM, eg in Node.js.
14
+ * Throws an error when unsupported metehods are used.
15
+ * @param editorConfig - The optional lexical editor configuration.
16
+ * @returns - The configured headless editor.
17
+ */
18
+
12
19
  function createHeadlessEditor(editorConfig) {
13
20
  const editor = lexical.createEditor(editorConfig);
14
21
  editor._headless = true;
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # `@lexical/headless`
2
2
 
3
- This package allows you to use interact with Lexical in a headless environment (one that does not rely on DOM, e.g. for Node.js environment), and use its
3
+ This package allows you to interact with Lexical in a headless environment (one that does not rely on DOM, e.g. for Node.js environment), and use its
4
4
  main features like editor.update(), editor.registerNodeTransform(), editor.registerUpdateListener()
5
5
  to create, update or traverse state.
6
6
 
package/index.d.ts CHANGED
@@ -7,4 +7,10 @@
7
7
  *
8
8
  */
9
9
  import type { CreateEditorArgs, LexicalEditor } from 'lexical';
10
+ /**
11
+ * Generates a headless editor that allows lexical to be used without the need for a DOM, eg in Node.js.
12
+ * Throws an error when unsupported metehods are used.
13
+ * @param editorConfig - The optional lexical editor configuration.
14
+ * @returns - The configured headless editor.
15
+ */
10
16
  export declare function createHeadlessEditor(editorConfig?: CreateEditorArgs): LexicalEditor;
package/package.json CHANGED
@@ -8,10 +8,10 @@
8
8
  "headless"
9
9
  ],
10
10
  "license": "MIT",
11
- "version": "0.9.0",
11
+ "version": "0.9.2",
12
12
  "main": "LexicalHeadless.js",
13
13
  "peerDependencies": {
14
- "lexical": "0.9.0"
14
+ "lexical": "0.9.2"
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",