@qwanyx/stack 0.2.60 → 0.2.61
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/dist/components/QRCodeNode.d.ts +33 -0
- package/dist/index.cjs.js +39 -39
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +1636 -1530
- package/dist/stack-BDMct_Gn.mjs +4 -0
- package/dist/stack-CDTLCo61.js +1 -0
- package/package.json +14 -7
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QRCodeNode for Lexical
|
|
3
|
+
* Renders QR codes directly using React - no data URL conversion needed
|
|
4
|
+
* Requires qrcode.react as a peer dependency
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { DecoratorNode, DOMConversionMap, DOMExportOutput, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical';
|
|
8
|
+
export interface QRCodePayload {
|
|
9
|
+
data: string;
|
|
10
|
+
size?: number;
|
|
11
|
+
}
|
|
12
|
+
export type SerializedQRCodeNode = Spread<{
|
|
13
|
+
data: string;
|
|
14
|
+
size?: number;
|
|
15
|
+
}, SerializedLexicalNode>;
|
|
16
|
+
export declare class QRCodeNode extends DecoratorNode<React.ReactElement> {
|
|
17
|
+
__data: string;
|
|
18
|
+
__size: number;
|
|
19
|
+
static getType(): string;
|
|
20
|
+
static clone(node: QRCodeNode): QRCodeNode;
|
|
21
|
+
constructor(data: string, size?: number, key?: NodeKey);
|
|
22
|
+
static importJSON(serializedNode: SerializedQRCodeNode): QRCodeNode;
|
|
23
|
+
exportJSON(): SerializedQRCodeNode;
|
|
24
|
+
static importDOM(): DOMConversionMap | null;
|
|
25
|
+
exportDOM(): DOMExportOutput;
|
|
26
|
+
createDOM(): HTMLElement;
|
|
27
|
+
updateDOM(): boolean;
|
|
28
|
+
decorate(): React.ReactElement;
|
|
29
|
+
getData(): string;
|
|
30
|
+
getSize(): number;
|
|
31
|
+
}
|
|
32
|
+
export declare function $createQRCodeNode(payload: QRCodePayload): QRCodeNode;
|
|
33
|
+
export declare function $isQRCodeNode(node: LexicalNode | null | undefined): node is QRCodeNode;
|