@lexical/link 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.
@@ -9,7 +9,13 @@
9
9
  var utils = require('@lexical/utils');
10
10
  var lexical = require('lexical');
11
11
 
12
- /** @module @lexical/link */
12
+ /**
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ *
18
+ */
13
19
  const SUPPORTED_URL_PROTOCOLS = new Set(['http:', 'https:', 'mailto:', 'sms:', 'tel:']);
14
20
 
15
21
  /** @noInheritDoc */
@@ -7,7 +7,13 @@
7
7
  import { addClassNamesToElement, isHTMLAnchorElement } from '@lexical/utils';
8
8
  import { createCommand, ElementNode, $applyNodeReplacement, $isRangeSelection, $isElementNode, $getSelection } from 'lexical';
9
9
 
10
- /** @module @lexical/link */
10
+ /**
11
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
12
+ *
13
+ * This source code is licensed under the MIT license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ *
16
+ */
11
17
  const SUPPORTED_URL_PROTOCOLS = new Set(['http:', 'https:', 'mailto:', 'sms:', 'tel:']);
12
18
 
13
19
  /** @noInheritDoc */
@@ -4,8 +4,8 @@
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 './LexicalLink.dev.esm.js';
8
- import * as modProd from './LexicalLink.prod.esm.js';
7
+ import * as modDev from './LexicalLink.dev.mjs';
8
+ import * as modProd from './LexicalLink.prod.mjs';
9
9
  const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
10
  export const $createAutoLinkNode = mod.$createAutoLinkNode;
11
11
  export const $createLinkNode = mod.$createLinkNode;
@@ -0,0 +1,15 @@
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('./LexicalLink.dev.mjs') : import('./LexicalLink.prod.mjs'));
8
+ export const $createAutoLinkNode = mod.$createAutoLinkNode;
9
+ export const $createLinkNode = mod.$createLinkNode;
10
+ export const $isAutoLinkNode = mod.$isAutoLinkNode;
11
+ export const $isLinkNode = mod.$isLinkNode;
12
+ export const AutoLinkNode = mod.AutoLinkNode;
13
+ export const LinkNode = mod.LinkNode;
14
+ export const TOGGLE_LINK_COMMAND = mod.TOGGLE_LINK_COMMAND;
15
+ export const toggleLink = mod.toggleLink;
package/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /** @module @lexical/link */
2
1
  /**
3
2
  * Copyright (c) Meta Platforms, Inc. and affiliates.
4
3
  *
package/package.json CHANGED
@@ -8,19 +8,35 @@
8
8
  "link"
9
9
  ],
10
10
  "license": "MIT",
11
- "version": "0.14.2",
11
+ "version": "0.14.4",
12
12
  "main": "LexicalLink.js",
13
- "peerDependencies": {
14
- "lexical": "0.14.2"
15
- },
13
+ "types": "index.d.ts",
16
14
  "dependencies": {
17
- "@lexical/utils": "0.14.2"
15
+ "@lexical/utils": "0.14.4",
16
+ "lexical": "0.14.4"
18
17
  },
19
18
  "repository": {
20
19
  "type": "git",
21
20
  "url": "https://github.com/facebook/lexical",
22
21
  "directory": "packages/lexical-link"
23
22
  },
24
- "module": "LexicalLink.esm.js",
25
- "sideEffects": false
23
+ "module": "LexicalLink.mjs",
24
+ "sideEffects": false,
25
+ "exports": {
26
+ ".": {
27
+ "import": {
28
+ "types": "./index.d.ts",
29
+ "development": "./LexicalLink.dev.mjs",
30
+ "production": "./LexicalLink.prod.mjs",
31
+ "node": "./LexicalLink.node.mjs",
32
+ "default": "./LexicalLink.mjs"
33
+ },
34
+ "require": {
35
+ "types": "./index.d.ts",
36
+ "development": "./LexicalLink.dev.js",
37
+ "production": "./LexicalLink.prod.js",
38
+ "default": "./LexicalLink.js"
39
+ }
40
+ }
41
+ }
26
42
  }