@etrepum/lexical-emoji-plan 0.0.32-nightly.20240809.0 → 0.0.33-nightly.20240812.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/EmojiNode.d.ts +2 -1
- package/dist/EmojiNode.d.ts.map +1 -1
- package/dist/EmojiPlan.d.ts.map +1 -1
- package/dist/{_textNodeTransform-JUH2dtPZ.js → _textNodeTransform-DL6bK1YR.js} +6 -6
- package/dist/findEmoji-BUW3hKf8.js +1953 -0
- package/dist/index.js +68 -1986
- package/dist/loadTextNodeTransform.d.ts +6 -0
- package/dist/loadTextNodeTransform.d.ts.map +1 -0
- package/dist/loadTextNodeTransform.js +7 -0
- package/dist/loadTextNodeTransform.node.d.ts +4 -0
- package/dist/loadTextNodeTransform.node.d.ts.map +1 -0
- package/dist/loadTextNodeTransform.node.js +7 -0
- package/package.json +10 -3
package/dist/EmojiNode.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedTextNode, Spread, TextNode } from 'lexical';
|
1
|
+
import { DOMConversionMap, EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedTextNode, Spread, TextNode } from 'lexical';
|
2
2
|
|
3
3
|
export type SerializedEmojiNode = Spread<{
|
4
4
|
type: ReturnType<typeof EmojiNode.getType>;
|
@@ -22,6 +22,7 @@ export declare class EmojiNode extends TextNode {
|
|
22
22
|
static getType(): "emoji";
|
23
23
|
static clone(node: EmojiNode): EmojiNode;
|
24
24
|
static importJSON(serializedNode: SerializedEmojiNode): EmojiNode;
|
25
|
+
static importDOM(): DOMConversionMap | null;
|
25
26
|
updateDOM(prevNode: this, dom: HTMLElement, config: EditorConfig): boolean;
|
26
27
|
createDOM(config: EditorConfig, editor?: LexicalEditor | undefined): HTMLElement;
|
27
28
|
getShortcode(): string | undefined;
|
package/dist/EmojiNode.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EmojiNode.d.ts","sourceRoot":"","sources":["../src/Emoj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BAAa,SAAU,SAAQ,QAAQ;IACrC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAErB,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,CAAC,EAAE,OAAO;IAKvE,MAAM,CAAC,OAAO,IAAI,OAAO;IAIzB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS;IAIxC,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,mBAAmB,GAAG,SAAS;WAIjD,SAAS,IAAI,gBAAgB,GAAG,IAAI;IAsBpD,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO;IAY1E,SAAS,CACP,MAAM,EAAE,YAAY,EACpB,MAAM,CAAC,EAAE,aAAa,GAAG,SAAS,GACjC,WAAW;IAoBd,YAAY,IAAI,MAAM,GAAG,SAAS;IAIlC,YAAY,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAMlD,UAAU,IAAI,mBAAmB;CAOlC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,GAC7B,SAAS,CAMX;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACnC,IAAI,IAAI,SAAS,CAEnB"}
|
package/dist/EmojiPlan.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EmojiPlan.d.ts","sourceRoot":"","sources":["../src/EmojiPlan.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
1
|
+
{"version":3,"file":"EmojiPlan.d.ts","sourceRoot":"","sources":["../src/EmojiPlan.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,eAAO,MAAM,eAAe,EAAE,MAAwC,CAAC;AAEvE,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAiBD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS,wHAoFpB,CAAC"}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import {
|
2
|
-
function
|
1
|
+
import { f as r, a as n } from "./findEmoji-BUW3hKf8.js";
|
2
|
+
function a(o) {
|
3
3
|
if (!o.isSimpleText() || o.hasFormat("code"))
|
4
4
|
return;
|
5
|
-
const i = o.getTextContent(), t =
|
5
|
+
const i = o.getTextContent(), t = r(i);
|
6
6
|
if (t === null)
|
7
7
|
return;
|
8
8
|
let e;
|
@@ -12,10 +12,10 @@ function l(o) {
|
|
12
12
|
t.position,
|
13
13
|
t.position + t.shortcode.length
|
14
14
|
), e !== void 0) {
|
15
|
-
const
|
16
|
-
e.replace(
|
15
|
+
const s = n(t.emoji, t.shortcode);
|
16
|
+
e.replace(s);
|
17
17
|
}
|
18
18
|
}
|
19
19
|
export {
|
20
|
-
|
20
|
+
a as $textNodeTransform
|
21
21
|
};
|