@lexical/selection 0.14.1 → 0.14.3

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.
@@ -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 './LexicalSelection.dev.esm.js';
8
- import * as modProd from './LexicalSelection.prod.esm.js';
7
+ import * as modDev from './LexicalSelection.dev.mjs';
8
+ import * as modProd from './LexicalSelection.prod.mjs';
9
9
  const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
10
10
  export const $addNodeStyle = mod.$addNodeStyle;
11
11
  export const $cloneWithProperties = mod.$cloneWithProperties;
@@ -0,0 +1,24 @@
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('./LexicalSelection.dev.mjs') : import('./LexicalSelection.prod.mjs'));
8
+ export const $addNodeStyle = mod.$addNodeStyle;
9
+ export const $cloneWithProperties = mod.$cloneWithProperties;
10
+ export const $getSelectionStyleValueForProperty = mod.$getSelectionStyleValueForProperty;
11
+ export const $isAtNodeEnd = mod.$isAtNodeEnd;
12
+ export const $isParentElementRTL = mod.$isParentElementRTL;
13
+ export const $moveCaretSelection = mod.$moveCaretSelection;
14
+ export const $moveCharacter = mod.$moveCharacter;
15
+ export const $patchStyleText = mod.$patchStyleText;
16
+ export const $selectAll = mod.$selectAll;
17
+ export const $setBlocksType = mod.$setBlocksType;
18
+ export const $shouldOverrideDefaultCharacterSelection = mod.$shouldOverrideDefaultCharacterSelection;
19
+ export const $sliceSelectedTextNodeContent = mod.$sliceSelectedTextNodeContent;
20
+ export const $wrapNodes = mod.$wrapNodes;
21
+ export const createDOMRange = mod.createDOMRange;
22
+ export const createRectsFromDOMRange = mod.createRectsFromDOMRange;
23
+ export const getStyleObjectFromCSS = mod.getStyleObjectFromCSS;
24
+ export const trimTextContentFromAnchor = mod.trimTextContentFromAnchor;
package/package.json CHANGED
@@ -9,16 +9,30 @@
9
9
  "selection"
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "0.14.1",
12
+ "version": "0.14.3",
13
13
  "main": "LexicalSelection.js",
14
- "peerDependencies": {
15
- "lexical": "0.14.1"
16
- },
14
+ "types": "index.d.ts",
17
15
  "repository": {
18
16
  "type": "git",
19
17
  "url": "https://github.com/facebook/lexical",
20
18
  "directory": "packages/lexical-selection"
21
19
  },
22
- "module": "LexicalSelection.esm.js",
23
- "sideEffects": false
20
+ "module": "LexicalSelection.mjs",
21
+ "sideEffects": false,
22
+ "exports": {
23
+ ".": {
24
+ "import": {
25
+ "types": "./index.d.ts",
26
+ "node": "./LexicalSelection.node.mjs",
27
+ "default": "./LexicalSelection.mjs"
28
+ },
29
+ "require": {
30
+ "types": "./index.d.ts",
31
+ "default": "./LexicalSelection.js"
32
+ }
33
+ }
34
+ },
35
+ "dependencies": {
36
+ "lexical": "0.14.3"
37
+ }
24
38
  }