@lexical/hashtag
Advanced tools
Comparing version 0.22.1-nightly.20250101.0 to 0.22.1-nightly.20250102.0
@@ -31,5 +31,2 @@ /** | ||
} | ||
constructor(text, key) { | ||
super(text, key); | ||
} | ||
createDOM(config) { | ||
@@ -41,8 +38,3 @@ const element = super.createDOM(config); | ||
static importJSON(serializedNode) { | ||
const node = $createHashtagNode(serializedNode.text); | ||
node.setFormat(serializedNode.format); | ||
node.setDetail(serializedNode.detail); | ||
node.setMode(serializedNode.mode); | ||
node.setStyle(serializedNode.style); | ||
return node; | ||
return $createHashtagNode().updateFromJSON(serializedNode); | ||
} | ||
@@ -49,0 +41,0 @@ canInsertTextBefore() { |
@@ -9,3 +9,3 @@ /** | ||
'use strict';var c=require("@lexical/utils"),d=require("lexical");class e extends d.TextNode{static getType(){return"hashtag"}static clone(a){return new e(a.__text,a.__key)}constructor(a,b){super(a,b)}createDOM(a){let b=super.createDOM(a);c.addClassNamesToElement(b,a.theme.hashtag);return b}static importJSON(a){let b=f(a.text);b.setFormat(a.format);b.setDetail(a.detail);b.setMode(a.mode);b.setStyle(a.style);return b}canInsertTextBefore(){return!1}isTextEntity(){return!0}} | ||
function f(a=""){return d.$applyNodeReplacement(new e(a))}exports.$createHashtagNode=f;exports.$isHashtagNode=function(a){return a instanceof e};exports.HashtagNode=e | ||
'use strict';var b=require("@lexical/utils"),c=require("lexical");class e extends c.TextNode{static getType(){return"hashtag"}static clone(a){return new e(a.__text,a.__key)}createDOM(a){let d=super.createDOM(a);b.addClassNamesToElement(d,a.theme.hashtag);return d}static importJSON(a){return f().updateFromJSON(a)}canInsertTextBefore(){return!1}isTextEntity(){return!0}}function f(a=""){return c.$applyNodeReplacement(new e(a))}exports.$createHashtagNode=f; | ||
exports.$isHashtagNode=function(a){return a instanceof e};exports.HashtagNode=e |
@@ -8,3 +8,3 @@ /** | ||
*/ | ||
import type { EditorConfig, LexicalNode, NodeKey, SerializedTextNode } from 'lexical'; | ||
import type { EditorConfig, LexicalNode, SerializedTextNode } from 'lexical'; | ||
import { TextNode } from 'lexical'; | ||
@@ -15,3 +15,2 @@ /** @noInheritDoc */ | ||
static clone(node: HashtagNode): HashtagNode; | ||
constructor(text: string, key?: NodeKey); | ||
createDOM(config: EditorConfig): HTMLElement; | ||
@@ -18,0 +17,0 @@ static importJSON(serializedNode: SerializedTextNode): HashtagNode; |
@@ -11,8 +11,8 @@ { | ||
"license": "MIT", | ||
"version": "0.22.1-nightly.20250101.0", | ||
"version": "0.22.1-nightly.20250102.0", | ||
"main": "LexicalHashtag.js", | ||
"types": "index.d.ts", | ||
"dependencies": { | ||
"@lexical/utils": "0.22.1-nightly.20250101.0", | ||
"lexical": "0.22.1-nightly.20250101.0" | ||
"@lexical/utils": "0.22.1-nightly.20250102.0", | ||
"lexical": "0.22.1-nightly.20250102.0" | ||
}, | ||
@@ -19,0 +19,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
11099
204
+ Added@lexical/clipboard@0.22.1-nightly.20250102.0(transitive)
+ Added@lexical/html@0.22.1-nightly.20250102.0(transitive)
+ Added@lexical/list@0.22.1-nightly.20250102.0(transitive)
+ Added@lexical/selection@0.22.1-nightly.20250102.0(transitive)
+ Added@lexical/table@0.22.1-nightly.20250102.0(transitive)
+ Added@lexical/utils@0.22.1-nightly.20250102.0(transitive)
+ Addedlexical@0.22.1-nightly.20250102.0(transitive)
- Removed@lexical/clipboard@0.22.1-nightly.20250101.0(transitive)
- Removed@lexical/html@0.22.1-nightly.20250101.0(transitive)
- Removed@lexical/list@0.22.1-nightly.20250101.0(transitive)
- Removed@lexical/selection@0.22.1-nightly.20250101.0(transitive)
- Removed@lexical/table@0.22.1-nightly.20250101.0(transitive)
- Removed@lexical/utils@0.22.1-nightly.20250101.0(transitive)
- Removedlexical@0.22.1-nightly.20250101.0(transitive)