@lexical/headless 0.14.2 → 0.14.4

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.
@@ -8,7 +8,13 @@
8
8
 
9
9
  var lexical = require('lexical');
10
10
 
11
- /** @module @lexical/headless */
11
+ /**
12
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
13
+ *
14
+ * This source code is licensed under the MIT license found in the
15
+ * LICENSE file in the root directory of this source tree.
16
+ *
17
+ */
12
18
 
13
19
  /**
14
20
  * Generates a headless editor that allows lexical to be used without the need for a DOM, eg in Node.js.
@@ -6,7 +6,13 @@
6
6
  */
7
7
  import { createEditor } from 'lexical';
8
8
 
9
- /** @module @lexical/headless */
9
+ /**
10
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
11
+ *
12
+ * This source code is licensed under the MIT license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ *
15
+ */
10
16
 
11
17
  /**
12
18
  * Generates a headless editor that allows lexical to be used without the need for a DOM, eg in Node.js.
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import * as modDev from './LexicalHeadless.dev.esm.js';
8
- import * as modProd from './LexicalHeadless.prod.esm.js';
7
+ import * as modDev from './LexicalHeadless.dev.mjs';
8
+ import * as modProd from './LexicalHeadless.prod.mjs';
9
9
  const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
10
  export const createHeadlessEditor = mod.createHeadlessEditor;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ const mod = await (process.env.NODE_ENV === 'development' ? import('./LexicalHeadless.dev.mjs') : import('./LexicalHeadless.prod.mjs'));
8
+ export const createHeadlessEditor = mod.createHeadlessEditor;
package/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /** @module @lexical/headless */
2
1
  /**
3
2
  * Copyright (c) Meta Platforms, Inc. and affiliates.
4
3
  *
package/package.json CHANGED
@@ -8,16 +8,34 @@
8
8
  "headless"
9
9
  ],
10
10
  "license": "MIT",
11
- "version": "0.14.2",
11
+ "version": "0.14.4",
12
12
  "main": "LexicalHeadless.js",
13
- "peerDependencies": {
14
- "lexical": "0.14.2"
15
- },
13
+ "types": "index.d.ts",
16
14
  "repository": {
17
15
  "type": "git",
18
16
  "url": "https://github.com/facebook/lexical",
19
17
  "directory": "packages/lexical-headless"
20
18
  },
21
- "module": "LexicalHeadless.esm.js",
22
- "sideEffects": false
19
+ "module": "LexicalHeadless.mjs",
20
+ "sideEffects": false,
21
+ "exports": {
22
+ ".": {
23
+ "import": {
24
+ "types": "./index.d.ts",
25
+ "development": "./LexicalHeadless.dev.mjs",
26
+ "production": "./LexicalHeadless.prod.mjs",
27
+ "node": "./LexicalHeadless.node.mjs",
28
+ "default": "./LexicalHeadless.mjs"
29
+ },
30
+ "require": {
31
+ "types": "./index.d.ts",
32
+ "development": "./LexicalHeadless.dev.js",
33
+ "production": "./LexicalHeadless.prod.js",
34
+ "default": "./LexicalHeadless.js"
35
+ }
36
+ }
37
+ },
38
+ "dependencies": {
39
+ "lexical": "0.14.4"
40
+ }
23
41
  }