@lexical/offset 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.
- package/LexicalOffset.dev.js +7 -1
- package/{LexicalOffset.dev.esm.js → LexicalOffset.dev.mjs} +7 -1
- package/{LexicalOffset.esm.js → LexicalOffset.mjs} +2 -2
- package/LexicalOffset.node.mjs +10 -0
- package/index.d.ts +0 -1
- package/package.json +24 -6
- /package/{LexicalOffset.prod.esm.js → LexicalOffset.prod.mjs} +0 -0
package/LexicalOffset.dev.js
CHANGED
|
@@ -8,7 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
var lexical = require('lexical');
|
|
10
10
|
|
|
11
|
-
/**
|
|
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
|
class OffsetView {
|
|
13
19
|
constructor(offsetMap, firstNode, blockOffsetSize = 1) {
|
|
14
20
|
this._offsetMap = offsetMap;
|
|
@@ -6,7 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { $getNodeByKey, $isTextNode, $createRangeSelection, $isElementNode } from 'lexical';
|
|
8
8
|
|
|
9
|
-
/**
|
|
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
|
class OffsetView {
|
|
11
17
|
constructor(offsetMap, firstNode, blockOffsetSize = 1) {
|
|
12
18
|
this._offsetMap = offsetMap;
|
|
@@ -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 './LexicalOffset.dev.
|
|
8
|
-
import * as modProd from './LexicalOffset.prod.
|
|
7
|
+
import * as modDev from './LexicalOffset.dev.mjs';
|
|
8
|
+
import * as modProd from './LexicalOffset.prod.mjs';
|
|
9
9
|
const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
|
|
10
10
|
export const $createOffsetView = mod.$createOffsetView;
|
|
11
11
|
export const OffsetView = mod.OffsetView;
|
|
@@ -0,0 +1,10 @@
|
|
|
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('./LexicalOffset.dev.mjs') : import('./LexicalOffset.prod.mjs'));
|
|
8
|
+
export const $createOffsetView = mod.$createOffsetView;
|
|
9
|
+
export const OffsetView = mod.OffsetView;
|
|
10
|
+
export const createChildrenArray = mod.createChildrenArray;
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -8,16 +8,34 @@
|
|
|
8
8
|
"offset"
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"version": "0.14.
|
|
11
|
+
"version": "0.14.4",
|
|
12
12
|
"main": "LexicalOffset.js",
|
|
13
|
-
"
|
|
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-offset"
|
|
20
18
|
},
|
|
21
|
-
"module": "LexicalOffset.
|
|
22
|
-
"sideEffects": false
|
|
19
|
+
"module": "LexicalOffset.mjs",
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"import": {
|
|
24
|
+
"types": "./index.d.ts",
|
|
25
|
+
"development": "./LexicalOffset.dev.mjs",
|
|
26
|
+
"production": "./LexicalOffset.prod.mjs",
|
|
27
|
+
"node": "./LexicalOffset.node.mjs",
|
|
28
|
+
"default": "./LexicalOffset.mjs"
|
|
29
|
+
},
|
|
30
|
+
"require": {
|
|
31
|
+
"types": "./index.d.ts",
|
|
32
|
+
"development": "./LexicalOffset.dev.js",
|
|
33
|
+
"production": "./LexicalOffset.prod.js",
|
|
34
|
+
"default": "./LexicalOffset.js"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"lexical": "0.14.4"
|
|
40
|
+
}
|
|
23
41
|
}
|
|
File without changes
|