lexical 0.1.8 → 0.1.9
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/Lexical.dev.js +383 -226
- package/Lexical.prod.js +144 -142
- package/LexicalAutoLinkNode.prod.js +1 -1
- package/LexicalCodeHighlightNode.prod.js +1 -1
- package/LexicalCodeNode.prod.js +1 -1
- package/LexicalExtendedNodes.dev.js +2 -4
- package/LexicalExtendedNodes.prod.js +2 -2
- package/LexicalHashtagNode.prod.js +1 -1
- package/LexicalHeadingNode.prod.js +1 -1
- package/LexicalLinkNode.prod.js +1 -1
- package/LexicalOverflowNode.prod.js +1 -1
- package/LexicalQuoteNode.prod.js +1 -1
- package/package.json +1 -1
- package/LexicalTableCellNode.dev.js +0 -81
- package/LexicalTableCellNode.prod.js +0 -9
- package/LexicalTableNode.dev.js +0 -638
- package/LexicalTableNode.prod.js +0 -21
- package/LexicalTableRowNode.dev.js +0 -76
- package/LexicalTableRowNode.prod.js +0 -8
- package/TableCellNode.js +0 -9
- package/TableNode.js +0 -9
- package/TableRowNode.js +0 -9
|
@@ -1,76 +0,0 @@
|
|
|
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
|
-
'use strict';
|
|
8
|
-
|
|
9
|
-
var lexical = require('lexical');
|
|
10
|
-
|
|
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
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
function addClassNamesToElement(element, ...classNames) {
|
|
20
|
-
classNames.forEach(className => {
|
|
21
|
-
if (className != null && typeof className === 'string') {
|
|
22
|
-
element.classList.add(...className.split(' '));
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the MIT license found in the
|
|
31
|
-
* LICENSE file in the root directory of this source tree.
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
class TableRowNode extends lexical.ElementNode {
|
|
36
|
-
static getType() {
|
|
37
|
-
return 'table-row';
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
static clone(node) {
|
|
41
|
-
return new TableRowNode(node.__key);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
constructor(key) {
|
|
45
|
-
super(key);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
createDOM(config) {
|
|
49
|
-
const element = document.createElement('tr');
|
|
50
|
-
addClassNamesToElement(element, config.theme.tableRow);
|
|
51
|
-
return element;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
updateDOM() {
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
canBeEmpty() {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
canSelectionRemove() {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
function $createTableRowNode() {
|
|
68
|
-
return new TableRowNode();
|
|
69
|
-
}
|
|
70
|
-
function $isTableRowNode(node) {
|
|
71
|
-
return node instanceof TableRowNode;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
exports.$createTableRowNode = $createTableRowNode;
|
|
75
|
-
exports.$isTableRowNode = $isTableRowNode;
|
|
76
|
-
exports.TableRowNode = TableRowNode;
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
'use strict';var c=require("lexical");function e(a,...b){b.forEach(d=>{null!=d&&"string"===typeof d&&a.classList.add(...d.split(" "))})}class f extends c.ElementNode{static getType(){return"table-row"}static clone(a){return new f(a.__key)}constructor(a){super(a)}createDOM(a){const b=document.createElement("tr");e(b,a.theme.tableRow);return b}updateDOM(){return!1}canBeEmpty(){return!1}canSelectionRemove(){return!1}}exports.$createTableRowNode=function(){return new f};
|
|
8
|
-
exports.$isTableRowNode=function(a){return a instanceof f};exports.TableRowNode=f;
|
package/TableCellNode.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
'use strict'
|
|
8
|
-
const LexicalTableCellNode = process.env.NODE_ENV === 'development' ? require('./LexicalTableCellNode.dev.js') : require('./LexicalTableCellNode.prod.js')
|
|
9
|
-
module.exports = LexicalTableCellNode;
|
package/TableNode.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
'use strict'
|
|
8
|
-
const LexicalTableNode = process.env.NODE_ENV === 'development' ? require('./LexicalTableNode.dev.js') : require('./LexicalTableNode.prod.js')
|
|
9
|
-
module.exports = LexicalTableNode;
|
package/TableRowNode.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
'use strict'
|
|
8
|
-
const LexicalTableRowNode = process.env.NODE_ENV === 'development' ? require('./LexicalTableRowNode.dev.js') : require('./LexicalTableRowNode.prod.js')
|
|
9
|
-
module.exports = LexicalTableRowNode;
|