@lexical/mark 0.2.6
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/LICENSE +21 -0
- package/LexicalMark.d.ts +33 -0
- package/LexicalMark.dev.js +279 -0
- package/LexicalMark.js +9 -0
- package/LexicalMark.js.flow +45 -0
- package/LexicalMark.prod.js +13 -0
- package/README.md +3 -0
- package/package.json +24 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/LexicalMark.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its 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
|
+
*/
|
|
8
|
+
import type {NodeKey, RangeSelection, TextNode} from 'lexical';
|
|
9
|
+
import {ElementNode, LexicalNode} from 'lexical';
|
|
10
|
+
export declare class MarkNode extends ElementNode {
|
|
11
|
+
__ids: Array<string>;
|
|
12
|
+
clone(node: MarkNode): MarkNode;
|
|
13
|
+
constructor(ids: Array<string>, key?: NodeKey): void;
|
|
14
|
+
hasID(id: string): boolean;
|
|
15
|
+
getIDs(): Array<string>;
|
|
16
|
+
addID(id: string): void;
|
|
17
|
+
deleteID(id: string): void;
|
|
18
|
+
canInsertTextBefore(): false;
|
|
19
|
+
canInsertTextAfter(): false;
|
|
20
|
+
isInline(): true;
|
|
21
|
+
}
|
|
22
|
+
export function $isMarkNode(node: LexicalNode | null | undefined): boolean;
|
|
23
|
+
export function $createMarkNode(ids: Array<string>): MarkNode;
|
|
24
|
+
export function $getMarkIDs(
|
|
25
|
+
node: TextNode,
|
|
26
|
+
offset: number,
|
|
27
|
+
): null | Array<string>;
|
|
28
|
+
export function $wrapSelectionInMarkNode(
|
|
29
|
+
selection: RangeSelection,
|
|
30
|
+
isBackward: boolean,
|
|
31
|
+
id: string,
|
|
32
|
+
): void;
|
|
33
|
+
export function $unwrapMarkNode(node: MarkNode): void;
|
|
@@ -0,0 +1,279 @@
|
|
|
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
|
+
var utils = require('@lexical/utils');
|
|
11
|
+
|
|
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
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
class MarkNode extends lexical.ElementNode {
|
|
21
|
+
static getType() {
|
|
22
|
+
return 'mark';
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static clone(node) {
|
|
26
|
+
return new MarkNode(Array.from(node.__ids), node.__key);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
constructor(ids, key) {
|
|
30
|
+
super(key);
|
|
31
|
+
this.__ids = ids || [];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
createDOM(config) {
|
|
35
|
+
const element = document.createElement('mark');
|
|
36
|
+
utils.addClassNamesToElement(element, config.theme.mark);
|
|
37
|
+
|
|
38
|
+
if (this.__ids.length > 1) {
|
|
39
|
+
utils.addClassNamesToElement(element, config.theme.markOverlap);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return element;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
updateDOM(prevNode, element, config) {
|
|
46
|
+
const prevIDs = prevNode.__ids;
|
|
47
|
+
const nextIDs = this.__ids;
|
|
48
|
+
const prevIDsCount = prevIDs.length;
|
|
49
|
+
const nextIDsCount = nextIDs.length;
|
|
50
|
+
const overlapTheme = config.theme.markOverlap;
|
|
51
|
+
|
|
52
|
+
if (prevIDsCount !== nextIDsCount) {
|
|
53
|
+
if (prevIDsCount === 1) {
|
|
54
|
+
if (nextIDsCount === 2) {
|
|
55
|
+
utils.addClassNamesToElement(element, overlapTheme);
|
|
56
|
+
}
|
|
57
|
+
} else if (nextIDsCount === 1) {
|
|
58
|
+
utils.removeClassNamesFromElement(element, overlapTheme);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
hasID(id) {
|
|
66
|
+
const ids = this.getIDs();
|
|
67
|
+
|
|
68
|
+
for (let i = 0; i < ids.length; i++) {
|
|
69
|
+
if (id === ids[i]) {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
getIDs() {
|
|
78
|
+
const self = this.getLatest();
|
|
79
|
+
return self.__ids;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
addID(id) {
|
|
83
|
+
const self = this.getWritable();
|
|
84
|
+
const ids = self.__ids;
|
|
85
|
+
self.__ids = ids;
|
|
86
|
+
|
|
87
|
+
for (let i = 0; i < ids.length; i++) {
|
|
88
|
+
// If we already have it, don't add again
|
|
89
|
+
if (id === ids[i]) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
ids.push(id);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
deleteID(id) {
|
|
98
|
+
const self = this.getWritable();
|
|
99
|
+
const ids = self.__ids;
|
|
100
|
+
self.__ids = ids;
|
|
101
|
+
|
|
102
|
+
for (let i = 0; i < ids.length; i++) {
|
|
103
|
+
if (id === ids[i]) {
|
|
104
|
+
ids.splice(i, 1);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
insertNewAfter(selection) {
|
|
111
|
+
const element = this.getParentOrThrow().insertNewAfter(selection);
|
|
112
|
+
|
|
113
|
+
if (lexical.$isElementNode(element)) {
|
|
114
|
+
const linkNode = $createMarkNode(this.__ids);
|
|
115
|
+
element.append(linkNode);
|
|
116
|
+
return linkNode;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
canInsertTextBefore() {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
canInsertTextAfter() {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
canBeEmpty() {
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
isInline() {
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
extractWithChild(child, selection, destination) {
|
|
139
|
+
if (!lexical.$isRangeSelection(selection) || destination === 'html') {
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const anchor = selection.anchor;
|
|
144
|
+
const focus = selection.focus;
|
|
145
|
+
const anchorNode = anchor.getNode();
|
|
146
|
+
const focusNode = focus.getNode();
|
|
147
|
+
const isBackward = selection.isBackward();
|
|
148
|
+
const selectionLength = isBackward ? anchor.offset - focus.offset : focus.offset - anchor.offset;
|
|
149
|
+
return this.isParentOf(anchorNode) && this.isParentOf(focusNode) && this.getTextContent().length === selectionLength;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
excludeFromCopy(destination) {
|
|
153
|
+
return destination !== 'clone';
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
}
|
|
157
|
+
function $createMarkNode(ids) {
|
|
158
|
+
return new MarkNode(ids);
|
|
159
|
+
}
|
|
160
|
+
function $isMarkNode(node) {
|
|
161
|
+
return node instanceof MarkNode;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the MIT license found in the
|
|
168
|
+
* LICENSE file in the root directory of this source tree.
|
|
169
|
+
*
|
|
170
|
+
*
|
|
171
|
+
*/
|
|
172
|
+
function $unwrapMarkNode(node) {
|
|
173
|
+
const children = node.getChildren();
|
|
174
|
+
let target = null;
|
|
175
|
+
|
|
176
|
+
for (let i = 0; i < children.length; i++) {
|
|
177
|
+
const child = children[i];
|
|
178
|
+
|
|
179
|
+
if (target === null) {
|
|
180
|
+
node.insertBefore(child);
|
|
181
|
+
} else {
|
|
182
|
+
target.insertAfter(child);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
target = child;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
node.remove();
|
|
189
|
+
}
|
|
190
|
+
function $wrapSelectionInMarkNode(selection, isBackward, id) {
|
|
191
|
+
const nodes = selection.getNodes();
|
|
192
|
+
const anchorOffset = selection.anchor.offset;
|
|
193
|
+
const focusOffset = selection.focus.offset;
|
|
194
|
+
const nodesLength = nodes.length;
|
|
195
|
+
const startOffset = isBackward ? focusOffset : anchorOffset;
|
|
196
|
+
const endOffset = isBackward ? anchorOffset : focusOffset;
|
|
197
|
+
let currentNodeParent;
|
|
198
|
+
let currentMarkNode; // We only want wrap adjacent text nodes, line break nodes
|
|
199
|
+
// and inline element nodes. For decorator nodes and block
|
|
200
|
+
// element nodes, we stop out their boundary and start again
|
|
201
|
+
// after, if there are more nodes.
|
|
202
|
+
|
|
203
|
+
for (let i = 0; i < nodesLength; i++) {
|
|
204
|
+
const node = nodes[i];
|
|
205
|
+
|
|
206
|
+
if (lexical.$isElementNode(currentMarkNode) && currentMarkNode.isParentOf(node)) {
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const isFirstNode = i === 0;
|
|
211
|
+
const isLastNode = i === nodesLength - 1;
|
|
212
|
+
let targetNode;
|
|
213
|
+
|
|
214
|
+
if (lexical.$isTextNode(node)) {
|
|
215
|
+
const textContentSize = node.getTextContentSize();
|
|
216
|
+
const startTextOffset = isFirstNode ? startOffset : 0;
|
|
217
|
+
const endTextOffset = isLastNode ? endOffset : textContentSize;
|
|
218
|
+
|
|
219
|
+
if (startTextOffset === 0 && endTextOffset === 0) {
|
|
220
|
+
continue;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const splitNodes = node.splitText(startTextOffset, endTextOffset);
|
|
224
|
+
targetNode = splitNodes.length > 1 && (splitNodes.length === 3 || isFirstNode && !isLastNode || endTextOffset === textContentSize) ? splitNodes[1] : splitNodes[0];
|
|
225
|
+
} else if (lexical.$isElementNode(node) && node.isInline()) {
|
|
226
|
+
targetNode = node;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
if (targetNode !== undefined) {
|
|
230
|
+
if (targetNode && targetNode.is(currentNodeParent)) {
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const parentNode = targetNode.getParent();
|
|
235
|
+
|
|
236
|
+
if (parentNode == null || !parentNode.is(currentNodeParent)) {
|
|
237
|
+
currentMarkNode = undefined;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
currentNodeParent = parentNode;
|
|
241
|
+
|
|
242
|
+
if (currentMarkNode === undefined) {
|
|
243
|
+
currentMarkNode = $createMarkNode([id]);
|
|
244
|
+
targetNode.insertBefore(currentMarkNode);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
currentMarkNode.append(targetNode);
|
|
248
|
+
} else {
|
|
249
|
+
currentNodeParent = undefined;
|
|
250
|
+
currentMarkNode = undefined;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
function $getMarkIDs(node, offset) {
|
|
255
|
+
let currentNode = node;
|
|
256
|
+
|
|
257
|
+
while (currentNode !== null) {
|
|
258
|
+
if ($isMarkNode(currentNode)) {
|
|
259
|
+
return currentNode.getIDs();
|
|
260
|
+
} else if (lexical.$isTextNode(currentNode) && offset === currentNode.getTextContentSize()) {
|
|
261
|
+
const nextSibling = currentNode.getNextSibling();
|
|
262
|
+
|
|
263
|
+
if ($isMarkNode(nextSibling)) {
|
|
264
|
+
return nextSibling.getIDs();
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
currentNode = currentNode.getParent();
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
exports.$createMarkNode = $createMarkNode;
|
|
275
|
+
exports.$getMarkIDs = $getMarkIDs;
|
|
276
|
+
exports.$isMarkNode = $isMarkNode;
|
|
277
|
+
exports.$unwrapMarkNode = $unwrapMarkNode;
|
|
278
|
+
exports.$wrapSelectionInMarkNode = $wrapSelectionInMarkNode;
|
|
279
|
+
exports.MarkNode = MarkNode;
|
package/LexicalMark.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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 LexicalMark = process.env.NODE_ENV === 'development' ? require('./LexicalMark.dev.js') : require('./LexicalMark.prod.js')
|
|
9
|
+
module.exports = LexicalMark;
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
* @flow strict
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type {NodeKey, RangeSelection, TextNode} from 'lexical';
|
|
11
|
+
import {ElementNode, LexicalNode} from 'lexical';
|
|
12
|
+
|
|
13
|
+
declare export class MarkNode extends ElementNode {
|
|
14
|
+
__ids: Array<string>;
|
|
15
|
+
|
|
16
|
+
static clone(node: MarkNode): MarkNode;
|
|
17
|
+
constructor(ids: Array<string>, key?: NodeKey): void;
|
|
18
|
+
|
|
19
|
+
hasID(id: string): boolean;
|
|
20
|
+
getIDs(): Array<string>;
|
|
21
|
+
addID(id: string): void;
|
|
22
|
+
deleteID(id: string): void;
|
|
23
|
+
canInsertTextBefore(): false;
|
|
24
|
+
canInsertTextAfter(): false;
|
|
25
|
+
isInline(): true;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare export function $isMarkNode(
|
|
29
|
+
node: ?LexicalNode,
|
|
30
|
+
): boolean %checks(node instanceof MarkNode);
|
|
31
|
+
|
|
32
|
+
declare export function $createMarkNode(ids: Array<string>): MarkNode;
|
|
33
|
+
|
|
34
|
+
declare export function $getMarkIDs(
|
|
35
|
+
node: TextNode,
|
|
36
|
+
offset: number,
|
|
37
|
+
): null | Array<string>;
|
|
38
|
+
|
|
39
|
+
declare export function $wrapSelectionInMarkNode(
|
|
40
|
+
selection: RangeSelection,
|
|
41
|
+
isBackward: boolean,
|
|
42
|
+
id: string,
|
|
43
|
+
): void;
|
|
44
|
+
|
|
45
|
+
declare export function $unwrapMarkNode(node: MarkNode): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
var k=require("lexical"),m=require("@lexical/utils");
|
|
8
|
+
class n extends k.ElementNode{static getType(){return"mark"}static clone(a){return new n(Array.from(a.__ids),a.__key)}constructor(a,b){super(b);this.__ids=a||[]}createDOM(a){const b=document.createElement("mark");m.addClassNamesToElement(b,a.theme.mark);1<this.__ids.length&&m.addClassNamesToElement(b,a.theme.markOverlap);return b}updateDOM(a,b,c){a=a.__ids.length;const e=this.__ids.length;c=c.theme.markOverlap;a!==e&&(1===a?2===e&&m.addClassNamesToElement(b,c):1===e&&m.removeClassNamesFromElement(b,
|
|
9
|
+
c));return!1}hasID(a){const b=this.getIDs();for(let c=0;c<b.length;c++)if(a===b[c])return!0;return!1}getIDs(){return this.getLatest().__ids}addID(a){var b=this.getWritable();const c=b.__ids;b.__ids=c;for(b=0;b<c.length;b++)if(a===c[b])return;c.push(a)}deleteID(a){var b=this.getWritable();const c=b.__ids;b.__ids=c;for(b=0;b<c.length;b++)if(a===c[b]){c.splice(b,1);break}}insertNewAfter(a){a=this.getParentOrThrow().insertNewAfter(a);if(k.$isElementNode(a)){const b=q(this.__ids);a.append(b);return b}return null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(a,
|
|
10
|
+
b,c){if(!k.$isRangeSelection(b)||"html"===c)return!1;const e=b.anchor,d=b.focus;a=e.getNode();c=d.getNode();b=b.isBackward()?e.offset-d.offset:d.offset-e.offset;return this.isParentOf(a)&&this.isParentOf(c)&&this.getTextContent().length===b}excludeFromCopy(a){return"clone"!==a}}function q(a){return new n(a)}function r(a){return a instanceof n}exports.$createMarkNode=q;
|
|
11
|
+
exports.$getMarkIDs=function(a,b){for(;null!==a;){if(r(a))return a.getIDs();if(k.$isTextNode(a)&&b===a.getTextContentSize()){const c=a.getNextSibling();if(r(c))return c.getIDs()}a=a.getParent()}return null};exports.$isMarkNode=r;exports.$unwrapMarkNode=function(a){const b=a.getChildren();let c=null;for(let e=0;e<b.length;e++){const d=b[e];null===c?a.insertBefore(d):c.insertAfter(d);c=d}a.remove()};
|
|
12
|
+
exports.$wrapSelectionInMarkNode=function(a,b,c){const e=a.getNodes();var d=a.anchor.offset,g=a.focus.offset;a=e.length;const x=b?g:d;b=b?d:g;let p,h;for(d=0;d<a;d++){const l=e[d];if(k.$isElementNode(h)&&h.isParentOf(l))continue;g=0===d;const u=d===a-1;var f=void 0;if(k.$isTextNode(l)){const v=l.getTextContentSize(),w=g?x:0,t=u?b:v;if(0===w&&0===t)continue;f=l.splitText(w,t);f=1<f.length&&(3===f.length||g&&!u||t===v)?f[1]:f[0]}else k.$isElementNode(l)&&l.isInline()&&(f=l);void 0!==f?f&&f.is(p)||(g=
|
|
13
|
+
f.getParent(),null!=g&&g.is(p)||(h=void 0),p=g,void 0===h&&(h=q([c]),f.insertBefore(h)),h.append(f)):h=p=void 0}};exports.MarkNode=n;
|
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lexical/mark",
|
|
3
|
+
"description": "This package contains helpers and nodes for wrapping content in marks for Lexical.",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"lexical",
|
|
6
|
+
"editor",
|
|
7
|
+
"rich-text",
|
|
8
|
+
"mark"
|
|
9
|
+
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"version": "0.2.6",
|
|
12
|
+
"main": "LexicalMark.js",
|
|
13
|
+
"peerDependencies": {
|
|
14
|
+
"lexical": "0.2.6"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@lexical/utils": "0.2.6"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/facebook/lexical",
|
|
22
|
+
"directory": "packages/lexical-mark"
|
|
23
|
+
}
|
|
24
|
+
}
|