@lexical/mark 0.3.9 → 0.4.0

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.
@@ -16,7 +16,10 @@ var utils = require('@lexical/utils');
16
16
  * LICENSE file in the root directory of this source tree.
17
17
  *
18
18
  */
19
+
20
+ /** @noInheritDoc */
19
21
  class MarkNode extends lexical.ElementNode {
22
+ /** @internal */
20
23
  static getType() {
21
24
  return 'mark';
22
25
  }
@@ -134,9 +137,9 @@ class MarkNode extends lexical.ElementNode {
134
137
  const element = this.getParentOrThrow().insertNewAfter(selection);
135
138
 
136
139
  if (lexical.$isElementNode(element)) {
137
- const linkNode = $createMarkNode(this.__ids);
138
- element.append(linkNode);
139
- return linkNode;
140
+ const markNode = $createMarkNode(this.__ids);
141
+ element.append(markNode);
142
+ return markNode;
140
143
  }
141
144
 
142
145
  return null;
@@ -184,13 +187,7 @@ function $isMarkNode(node) {
184
187
  return node instanceof MarkNode;
185
188
  }
186
189
 
187
- /**
188
- * Copyright (c) Meta Platforms, Inc. and affiliates.
189
- *
190
- * This source code is licensed under the MIT license found in the
191
- * LICENSE file in the root directory of this source tree.
192
- *
193
- */
190
+ /** @module @lexical/mark */
194
191
  function $unwrapMarkNode(node) {
195
192
  const children = node.getChildren();
196
193
  let target = null;
package/MarkNode.d.ts CHANGED
@@ -12,7 +12,9 @@ export declare type SerializedMarkNode = Spread<{
12
12
  type: 'mark';
13
13
  version: 1;
14
14
  }, SerializedElementNode>;
15
+ /** @noInheritDoc */
15
16
  export declare class MarkNode extends ElementNode {
17
+ /** @internal */
16
18
  __ids: Array<string>;
17
19
  static getType(): string;
18
20
  static clone(node: MarkNode): MarkNode;
package/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /** @module @lexical/mark */
1
2
  /**
2
3
  * Copyright (c) Meta Platforms, Inc. and affiliates.
3
4
  *
@@ -5,9 +6,10 @@
5
6
  * LICENSE file in the root directory of this source tree.
6
7
  *
7
8
  */
9
+ import type { SerializedMarkNode } from './MarkNode';
8
10
  import type { RangeSelection, TextNode } from 'lexical';
9
11
  import { $createMarkNode, $isMarkNode, MarkNode } from './MarkNode';
10
12
  export declare function $unwrapMarkNode(node: MarkNode): void;
11
13
  export declare function $wrapSelectionInMarkNode(selection: RangeSelection, isBackward: boolean, id: string): void;
12
14
  export declare function $getMarkIDs(node: TextNode, offset: number): null | Array<string>;
13
- export { $createMarkNode, $isMarkNode, MarkNode };
15
+ export { $createMarkNode, $isMarkNode, MarkNode, SerializedMarkNode };
package/package.json CHANGED
@@ -8,13 +8,13 @@
8
8
  "mark"
9
9
  ],
10
10
  "license": "MIT",
11
- "version": "0.3.9",
11
+ "version": "0.4.0",
12
12
  "main": "LexicalMark.js",
13
13
  "peerDependencies": {
14
- "lexical": "0.3.9"
14
+ "lexical": "0.4.0"
15
15
  },
16
16
  "dependencies": {
17
- "@lexical/utils": "0.3.9"
17
+ "@lexical/utils": "0.4.0"
18
18
  },
19
19
  "repository": {
20
20
  "type": "git",