@lexical/rich-text 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/LexicalRichText.dev.js +7 -1
- package/{LexicalRichText.dev.esm.js → LexicalRichText.dev.mjs} +7 -1
- package/LexicalRichText.js.flow +9 -2
- package/{LexicalRichText.esm.js → LexicalRichText.mjs} +2 -2
- package/LexicalRichText.node.mjs +16 -0
- package/index.d.ts +0 -1
- package/package.json +27 -9
- /package/{LexicalRichText.prod.esm.js → LexicalRichText.prod.mjs} +0 -0
package/LexicalRichText.dev.js
CHANGED
|
@@ -79,7 +79,13 @@ const IS_CHROME = CAN_USE_DOM && /^(?=.*Chrome).*/i.test(navigator.userAgent);
|
|
|
79
79
|
CAN_USE_DOM && IS_ANDROID && IS_CHROME;
|
|
80
80
|
const IS_APPLE_WEBKIT = CAN_USE_DOM && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !IS_CHROME;
|
|
81
81
|
|
|
82
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the MIT license found in the
|
|
86
|
+
* LICENSE file in the root directory of this source tree.
|
|
87
|
+
*
|
|
88
|
+
*/
|
|
83
89
|
const DRAG_DROP_PASTE = lexical.createCommand('DRAG_DROP_PASTE_FILE');
|
|
84
90
|
/** @noInheritDoc */
|
|
85
91
|
class QuoteNode extends lexical.ElementNode {
|
|
@@ -77,7 +77,13 @@ const IS_CHROME = CAN_USE_DOM && /^(?=.*Chrome).*/i.test(navigator.userAgent);
|
|
|
77
77
|
CAN_USE_DOM && IS_ANDROID && IS_CHROME;
|
|
78
78
|
const IS_APPLE_WEBKIT = CAN_USE_DOM && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !IS_CHROME;
|
|
79
79
|
|
|
80
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the MIT license found in the
|
|
84
|
+
* LICENSE file in the root directory of this source tree.
|
|
85
|
+
*
|
|
86
|
+
*/
|
|
81
87
|
const DRAG_DROP_PASTE = createCommand('DRAG_DROP_PASTE_FILE');
|
|
82
88
|
/** @noInheritDoc */
|
|
83
89
|
class QuoteNode extends ElementNode {
|
package/LexicalRichText.js.flow
CHANGED
|
@@ -15,6 +15,7 @@ import type {
|
|
|
15
15
|
ParagraphNode,
|
|
16
16
|
LexicalEditor,
|
|
17
17
|
LexicalCommand,
|
|
18
|
+
RangeSelection,
|
|
18
19
|
} from 'lexical';
|
|
19
20
|
import {ElementNode} from 'lexical';
|
|
20
21
|
|
|
@@ -25,7 +26,10 @@ declare export class QuoteNode extends ElementNode {
|
|
|
25
26
|
constructor(key?: NodeKey): void;
|
|
26
27
|
createDOM(config: EditorConfig): HTMLElement;
|
|
27
28
|
updateDOM(prevNode: QuoteNode, dom: HTMLElement): boolean;
|
|
28
|
-
insertNewAfter(
|
|
29
|
+
insertNewAfter(
|
|
30
|
+
selection: RangeSelection,
|
|
31
|
+
restoreSelection?: boolean,
|
|
32
|
+
): ParagraphNode;
|
|
29
33
|
collapseAtStart(): true;
|
|
30
34
|
}
|
|
31
35
|
declare export function $createQuoteNode(): QuoteNode;
|
|
@@ -42,7 +46,10 @@ declare export class HeadingNode extends ElementNode {
|
|
|
42
46
|
createDOM(config: EditorConfig): HTMLElement;
|
|
43
47
|
updateDOM(prevNode: HeadingNode, dom: HTMLElement): boolean;
|
|
44
48
|
static importDOM(): DOMConversionMap | null;
|
|
45
|
-
insertNewAfter(
|
|
49
|
+
insertNewAfter(
|
|
50
|
+
selection: RangeSelection,
|
|
51
|
+
restoreSelection?: boolean,
|
|
52
|
+
): ParagraphNode;
|
|
46
53
|
collapseAtStart(): true;
|
|
47
54
|
}
|
|
48
55
|
declare export function $createHeadingNode(
|
|
@@ -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 './LexicalRichText.dev.
|
|
8
|
-
import * as modProd from './LexicalRichText.prod.
|
|
7
|
+
import * as modDev from './LexicalRichText.dev.mjs';
|
|
8
|
+
import * as modProd from './LexicalRichText.prod.mjs';
|
|
9
9
|
const mod = process.env.NODE_ENV === 'development' ? modDev : modProd;
|
|
10
10
|
export const $createHeadingNode = mod.$createHeadingNode;
|
|
11
11
|
export const $createQuoteNode = mod.$createQuoteNode;
|
|
@@ -0,0 +1,16 @@
|
|
|
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('./LexicalRichText.dev.mjs') : import('./LexicalRichText.prod.mjs'));
|
|
8
|
+
export const $createHeadingNode = mod.$createHeadingNode;
|
|
9
|
+
export const $createQuoteNode = mod.$createQuoteNode;
|
|
10
|
+
export const $isHeadingNode = mod.$isHeadingNode;
|
|
11
|
+
export const $isQuoteNode = mod.$isQuoteNode;
|
|
12
|
+
export const DRAG_DROP_PASTE = mod.DRAG_DROP_PASTE;
|
|
13
|
+
export const HeadingNode = mod.HeadingNode;
|
|
14
|
+
export const QuoteNode = mod.QuoteNode;
|
|
15
|
+
export const eventFiles = mod.eventFiles;
|
|
16
|
+
export const registerRichText = mod.registerRichText;
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -7,19 +7,37 @@
|
|
|
7
7
|
"rich-text"
|
|
8
8
|
],
|
|
9
9
|
"license": "MIT",
|
|
10
|
-
"version": "0.14.
|
|
10
|
+
"version": "0.14.4",
|
|
11
11
|
"main": "LexicalRichText.js",
|
|
12
|
-
"
|
|
13
|
-
"lexical": "0.14.2",
|
|
14
|
-
"@lexical/selection": "0.14.2",
|
|
15
|
-
"@lexical/clipboard": "0.14.2",
|
|
16
|
-
"@lexical/utils": "0.14.2"
|
|
17
|
-
},
|
|
12
|
+
"types": "index.d.ts",
|
|
18
13
|
"repository": {
|
|
19
14
|
"type": "git",
|
|
20
15
|
"url": "https://github.com/facebook/lexical",
|
|
21
16
|
"directory": "packages/lexical-rich-text"
|
|
22
17
|
},
|
|
23
|
-
"module": "LexicalRichText.
|
|
24
|
-
"sideEffects": false
|
|
18
|
+
"module": "LexicalRichText.mjs",
|
|
19
|
+
"sideEffects": false,
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"import": {
|
|
23
|
+
"types": "./index.d.ts",
|
|
24
|
+
"development": "./LexicalRichText.dev.mjs",
|
|
25
|
+
"production": "./LexicalRichText.prod.mjs",
|
|
26
|
+
"node": "./LexicalRichText.node.mjs",
|
|
27
|
+
"default": "./LexicalRichText.mjs"
|
|
28
|
+
},
|
|
29
|
+
"require": {
|
|
30
|
+
"types": "./index.d.ts",
|
|
31
|
+
"development": "./LexicalRichText.dev.js",
|
|
32
|
+
"production": "./LexicalRichText.prod.js",
|
|
33
|
+
"default": "./LexicalRichText.js"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@lexical/clipboard": "0.14.4",
|
|
39
|
+
"@lexical/selection": "0.14.4",
|
|
40
|
+
"@lexical/utils": "0.14.4",
|
|
41
|
+
"lexical": "0.14.4"
|
|
42
|
+
}
|
|
25
43
|
}
|
|
File without changes
|