Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lexical/hashtag

Package Overview
Dependencies
Maintainers
5
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lexical/hashtag - npm Package Compare versions

Comparing version 0.2.9 to 0.3.0

10

LexicalHashtag.d.ts

@@ -9,3 +9,8 @@ /**

import type {EditorConfig, LexicalNode, NodeKey} from 'lexical';
import type {
EditorConfig,
LexicalNode,
NodeKey,
SerializedTextNode,
} from 'lexical';
import {TextNode} from 'lexical';

@@ -20,6 +25,7 @@

isTextEntity(): true;
static importJSON(serializedNode: SerializedTextNode): HashtagNode;
}
export function $createHashtagNode(text?: string): TextNode;
export function $createHashtagNode(text?: string): HashtagNode;
export function $isHashtagNode(
node: LexicalNode | null | undefined,
): node is HashtagNode;

17

LexicalHashtag.dev.js

@@ -18,3 +18,3 @@ /**

*
* @flow strict
*/

@@ -40,2 +40,17 @@ class HashtagNode extends lexical.TextNode {

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;
}
exportJSON() {
return { ...super.exportJSON(),
type: 'hashtag'
};
}
canInsertTextBefore() {

@@ -42,0 +57,0 @@ return false;

@@ -7,2 +7,4 @@ /**

*/
var b=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,c){super(a,c)}createDOM(a){const c=super.createDOM(a);b.addClassNamesToElement(c,a.theme.hashtag);return c}canInsertTextBefore(){return!1}isTextEntity(){return!0}}exports.$createHashtagNode=function(a=""){return new e(a)};exports.$isHashtagNode=function(a){return a instanceof e};exports.HashtagNode=e;
'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}exportJSON(){return{...super.exportJSON(),type:"hashtag"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}}
function f(a=""){return new e(a)}exports.$createHashtagNode=f;exports.$isHashtagNode=function(a){return a instanceof e};exports.HashtagNode=e

@@ -11,9 +11,9 @@ {

"license": "MIT",
"version": "0.2.9",
"version": "0.3.0",
"main": "LexicalHashtag.js",
"peerDependencies": {
"lexical": "0.2.9"
"lexical": "0.3.0"
},
"dependencies": {
"@lexical/utils": "0.2.9"
"@lexical/utils": "0.3.0"
},

@@ -20,0 +20,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc