@tiny-codes/react-easy 1.4.2 → 1.4.5
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/CHANGELOG.md +37 -0
- package/es/components/Lexical/helpers/index.d.ts +1 -0
- package/es/components/Lexical/helpers/index.js +20 -0
- package/es/components/Lexical/helpers/index.js.map +1 -1
- package/es/components/Lexical/nodes/CloseIcon.d.ts +0 -2
- package/es/components/Lexical/nodes/CloseIcon.js +0 -12
- package/es/components/Lexical/nodes/CloseIcon.js.map +1 -1
- package/es/components/Lexical/nodes/DivNode.d.ts +1 -3
- package/es/components/Lexical/nodes/DivNode.js +4 -32
- package/es/components/Lexical/nodes/DivNode.js.map +1 -1
- package/es/components/Lexical/nodes/SelectNode.d.ts +3 -3
- package/es/components/Lexical/nodes/SelectNode.js +8 -7
- package/es/components/Lexical/nodes/SelectNode.js.map +1 -1
- package/es/components/Lexical/nodes/base.d.ts +4 -0
- package/es/components/Lexical/nodes/base.js +33 -7
- package/es/components/Lexical/nodes/base.js.map +1 -1
- package/es/utils/crypto.d.ts +56 -0
- package/es/utils/crypto.js +322 -0
- package/es/utils/crypto.js.map +1 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +1 -0
- package/es/utils/index.js.map +1 -1
- package/lib/components/Lexical/helpers/index.d.ts +1 -0
- package/lib/components/Lexical/helpers/index.js +21 -0
- package/lib/components/Lexical/helpers/index.js.map +2 -2
- package/lib/components/Lexical/nodes/CloseIcon.d.ts +0 -2
- package/lib/components/Lexical/nodes/CloseIcon.js +0 -11
- package/lib/components/Lexical/nodes/CloseIcon.js.map +2 -2
- package/lib/components/Lexical/nodes/DivNode.d.ts +1 -3
- package/lib/components/Lexical/nodes/DivNode.js +2 -26
- package/lib/components/Lexical/nodes/DivNode.js.map +2 -2
- package/lib/components/Lexical/nodes/SelectNode.d.ts +3 -3
- package/lib/components/Lexical/nodes/SelectNode.js +5 -4
- package/lib/components/Lexical/nodes/SelectNode.js.map +2 -2
- package/lib/components/Lexical/nodes/base.d.ts +4 -0
- package/lib/components/Lexical/nodes/base.js +22 -0
- package/lib/components/Lexical/nodes/base.js.map +2 -2
- package/lib/utils/crypto.d.ts +56 -0
- package/lib/utils/crypto.js +175 -0
- package/lib/utils/crypto.js.map +7 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +3 -1
- package/lib/utils/index.js.map +2 -2
- package/package.json +1 -18
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/utils/crypto.ts
|
|
20
|
+
var crypto_exports = {};
|
|
21
|
+
__export(crypto_exports, {
|
|
22
|
+
advancedDecrypt: () => advancedDecrypt,
|
|
23
|
+
advancedEncrypt: () => advancedEncrypt,
|
|
24
|
+
decryptAES: () => decryptAES,
|
|
25
|
+
encryptAES: () => encryptAES,
|
|
26
|
+
fromBase64: () => fromBase64,
|
|
27
|
+
toBase64: () => toBase64
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(crypto_exports);
|
|
30
|
+
var import_math = require("./math");
|
|
31
|
+
var import_string = require("./string");
|
|
32
|
+
async function advancedEncrypt(plainText, key) {
|
|
33
|
+
const k1 = (0, import_string.randomChars)(36);
|
|
34
|
+
let e = await encryptAES(plainText, k1);
|
|
35
|
+
const b = toBase64(k1);
|
|
36
|
+
const l = b.length;
|
|
37
|
+
const s = (0, import_math.random)(0, e.length);
|
|
38
|
+
e = e.substring(0, s) + b + e.substring(s);
|
|
39
|
+
const r = toBase64(`${s}-${l}`);
|
|
40
|
+
const t = `${e}.${r}`;
|
|
41
|
+
return encryptAES(t, key);
|
|
42
|
+
}
|
|
43
|
+
async function advancedDecrypt(encryptedText, key) {
|
|
44
|
+
const decrypted = await decryptAES(encryptedText, key);
|
|
45
|
+
const [e, r] = decrypted.split(".");
|
|
46
|
+
const [s, l] = fromBase64(r).split("-").map(Number);
|
|
47
|
+
const k1 = fromBase64(e.substring(s, s + l));
|
|
48
|
+
return decryptAES(e.substring(0, s) + e.substring(s + l), k1);
|
|
49
|
+
}
|
|
50
|
+
async function encryptAES(text, key) {
|
|
51
|
+
const isNode = typeof process !== "undefined" && process.versions != null && process.versions.node != null;
|
|
52
|
+
if (isNode) {
|
|
53
|
+
const crypto2 = require("crypto");
|
|
54
|
+
const derivedKey = crypto2.createHash("sha256").update(key).digest();
|
|
55
|
+
const iv = crypto2.randomBytes(16);
|
|
56
|
+
const cipher = crypto2.createCipheriv("aes-256-cbc", derivedKey, iv);
|
|
57
|
+
let encrypted = cipher.update(text, "utf8", "base64");
|
|
58
|
+
encrypted += cipher.final("base64");
|
|
59
|
+
return `${iv.toString("base64")}:${encrypted}`;
|
|
60
|
+
} else {
|
|
61
|
+
try {
|
|
62
|
+
const iv = crypto.getRandomValues(new Uint8Array(16));
|
|
63
|
+
const encoder = new TextEncoder();
|
|
64
|
+
const keyData = encoder.encode(key);
|
|
65
|
+
const hashBuffer = await crypto.subtle.digest("SHA-256", keyData);
|
|
66
|
+
const cryptoKey = await crypto.subtle.importKey("raw", hashBuffer, { name: "AES-CBC" }, false, ["encrypt"]);
|
|
67
|
+
const textBytes = encoder.encode(text);
|
|
68
|
+
const encryptedBuffer = await crypto.subtle.encrypt({ name: "AES-CBC", iv }, cryptoKey, textBytes);
|
|
69
|
+
const ivBase64 = btoa(String.fromCharCode(...iv));
|
|
70
|
+
const encryptedBase64 = btoa(String.fromCharCode(...new Uint8Array(encryptedBuffer)));
|
|
71
|
+
return `${ivBase64}:${encryptedBase64}`;
|
|
72
|
+
} catch (error) {
|
|
73
|
+
console.error("Encryption error:", error);
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
async function decryptAES(encryptedText, key) {
|
|
79
|
+
const isNode = typeof process !== "undefined" && process.versions != null && process.versions.node != null;
|
|
80
|
+
try {
|
|
81
|
+
const [ivBase64, encryptedBase64] = encryptedText.split(":");
|
|
82
|
+
if (!ivBase64 || !encryptedBase64) {
|
|
83
|
+
throw new Error("Invalid encrypted format");
|
|
84
|
+
}
|
|
85
|
+
if (isNode) {
|
|
86
|
+
const crypto2 = require("crypto");
|
|
87
|
+
const iv = Buffer.from(ivBase64, "base64");
|
|
88
|
+
const encryptedBuffer = Buffer.from(encryptedBase64, "base64");
|
|
89
|
+
const derivedKey = crypto2.createHash("sha256").update(key).digest();
|
|
90
|
+
const decipher = crypto2.createDecipheriv("aes-256-cbc", derivedKey, iv);
|
|
91
|
+
let decrypted = decipher.update(encryptedBuffer);
|
|
92
|
+
decrypted = Buffer.concat([decrypted, decipher.final()]);
|
|
93
|
+
return decrypted.toString("utf8");
|
|
94
|
+
} else {
|
|
95
|
+
const iv = Uint8Array.from(atob(ivBase64), (c) => c.charCodeAt(0));
|
|
96
|
+
const encryptedData = Uint8Array.from(atob(encryptedBase64), (c) => c.charCodeAt(0));
|
|
97
|
+
const encoder = new TextEncoder();
|
|
98
|
+
const keyData = encoder.encode(key);
|
|
99
|
+
const hashBuffer = await crypto.subtle.digest("SHA-256", keyData);
|
|
100
|
+
const cryptoKey = await crypto.subtle.importKey("raw", hashBuffer, { name: "AES-CBC" }, false, ["decrypt"]);
|
|
101
|
+
const decryptedBuffer = await crypto.subtle.decrypt({ name: "AES-CBC", iv }, cryptoKey, encryptedData);
|
|
102
|
+
const decoder = new TextDecoder();
|
|
103
|
+
return decoder.decode(decryptedBuffer);
|
|
104
|
+
}
|
|
105
|
+
} catch (error) {
|
|
106
|
+
console.error("Decryption error:", error);
|
|
107
|
+
return "";
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function toBase64(content, opts = {}) {
|
|
111
|
+
const { urlSafe = false } = opts;
|
|
112
|
+
if (content == null || content === "")
|
|
113
|
+
return "";
|
|
114
|
+
let base64;
|
|
115
|
+
const hasBuffer = typeof Buffer !== "undefined" && typeof Buffer.from === "function";
|
|
116
|
+
if (hasBuffer) {
|
|
117
|
+
base64 = Buffer.from(content, "utf8").toString("base64");
|
|
118
|
+
} else {
|
|
119
|
+
const encoder = new TextEncoder();
|
|
120
|
+
const bytes = encoder.encode(content);
|
|
121
|
+
let binary = "";
|
|
122
|
+
for (const i of bytes) {
|
|
123
|
+
binary += String.fromCharCode(i);
|
|
124
|
+
}
|
|
125
|
+
base64 = btoa(binary);
|
|
126
|
+
}
|
|
127
|
+
if (urlSafe) {
|
|
128
|
+
base64 = base64.replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/u, "");
|
|
129
|
+
}
|
|
130
|
+
return base64;
|
|
131
|
+
}
|
|
132
|
+
function fromBase64(content, opts = {}) {
|
|
133
|
+
const { urlSafe = false } = opts;
|
|
134
|
+
if (content == null || content === "")
|
|
135
|
+
return "";
|
|
136
|
+
let normalized = content;
|
|
137
|
+
if (urlSafe) {
|
|
138
|
+
normalized = normalized.replace(/-/g, "+").replace(/_/g, "/");
|
|
139
|
+
}
|
|
140
|
+
const padNeeded = normalized.length % 4;
|
|
141
|
+
if (padNeeded === 2)
|
|
142
|
+
normalized += "==";
|
|
143
|
+
else if (padNeeded === 3)
|
|
144
|
+
normalized += "=";
|
|
145
|
+
else if (padNeeded === 1) {
|
|
146
|
+
throw new Error("Invalid Base64 string length");
|
|
147
|
+
}
|
|
148
|
+
const hasBuffer = typeof Buffer !== "undefined" && typeof Buffer.from === "function";
|
|
149
|
+
try {
|
|
150
|
+
if (hasBuffer) {
|
|
151
|
+
return Buffer.from(normalized, "base64").toString("utf8");
|
|
152
|
+
} else {
|
|
153
|
+
const binary = atob(normalized);
|
|
154
|
+
const len = binary.length;
|
|
155
|
+
const bytes = new Uint8Array(len);
|
|
156
|
+
for (let i = 0; i < len; i++) {
|
|
157
|
+
bytes[i] = binary.charCodeAt(i);
|
|
158
|
+
}
|
|
159
|
+
const decoder = new TextDecoder();
|
|
160
|
+
return decoder.decode(bytes);
|
|
161
|
+
}
|
|
162
|
+
} catch (e) {
|
|
163
|
+
throw new Error("Failed to decode Base64: " + (e instanceof Error ? e.message : String(e)));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
167
|
+
0 && (module.exports = {
|
|
168
|
+
advancedDecrypt,
|
|
169
|
+
advancedEncrypt,
|
|
170
|
+
decryptAES,
|
|
171
|
+
encryptAES,
|
|
172
|
+
fromBase64,
|
|
173
|
+
toBase64
|
|
174
|
+
});
|
|
175
|
+
//# sourceMappingURL=crypto.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/crypto.ts"],
|
|
4
|
+
"sourcesContent": ["import { random } from './math';\nimport { randomChars } from './string';\n\n/** Secret. No description provided */\nexport async function advancedEncrypt(plainText: string, key: string) {\n const k1 = randomChars(36);\n let e = await encryptAES(plainText, k1);\n const b = toBase64(k1);\n const l = b.length;\n const s = random(0, e.length);\n e = e.substring(0, s) + b + e.substring(s);\n const r = toBase64(`${s}-${l}`);\n const t = `${e}.${r}`;\n return encryptAES(t, key);\n}\n\n/** Secret. No description provided */\nexport async function advancedDecrypt(encryptedText: string, key: string) {\n const decrypted = await decryptAES(encryptedText, key);\n const [e, r] = decrypted.split('.');\n const [s, l] = fromBase64(r).split('-').map(Number);\n const k1 = fromBase64(e.substring(s, s + l));\n return decryptAES(e.substring(0, s) + e.substring(s + l), k1);\n}\n\n/**\n * **EN**: General AES encryption function - supports both Node.js and browser environments\n *\n * **CN**: 通用 AES 加密函数 - 同时支持 Node.js 和浏览器环境\n *\n * @param {string} text The text to be encrypted | 要加密的文本\n * @param {string} key The encryption key | 加密密钥\n *\n * @returns {Promise<string>} The encrypted text | 加密后的文本\n */\nexport async function encryptAES(text: string, key: string): Promise<string> {\n const isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null;\n\n if (isNode) {\n // Node.js\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const crypto = require('crypto');\n const derivedKey = crypto.createHash('sha256').update(key).digest();\n const iv = crypto.randomBytes(16);\n const cipher = crypto.createCipheriv('aes-256-cbc', derivedKey, iv);\n let encrypted = cipher.update(text, 'utf8', 'base64');\n encrypted += cipher.final('base64');\n return `${iv.toString('base64')}:${encrypted}`;\n } else {\n // Browsers\n try {\n const iv = crypto.getRandomValues(new Uint8Array(16));\n const encoder = new TextEncoder();\n const keyData = encoder.encode(key);\n const hashBuffer = await crypto.subtle.digest('SHA-256', keyData);\n const cryptoKey = await crypto.subtle.importKey('raw', hashBuffer, { name: 'AES-CBC' }, false, ['encrypt']);\n const textBytes = encoder.encode(text);\n const encryptedBuffer = await crypto.subtle.encrypt({ name: 'AES-CBC', iv }, cryptoKey, textBytes);\n const ivBase64 = btoa(String.fromCharCode(...iv));\n const encryptedBase64 = btoa(String.fromCharCode(...new Uint8Array(encryptedBuffer)));\n return `${ivBase64}:${encryptedBase64}`;\n } catch (error) {\n console.error('Encryption error:', error);\n throw error;\n }\n }\n}\n\n/**\n * **EN**: General AES decryption function - supports both Node.js and browser environments\n *\n * **CN**: 通用 AES 解密函数 - 同时支持 Node.js 和浏览器环境\n *\n * @param encryptedText The encrypted text (format: iv:encryptedContent, base64 encoded)\n * @param key The decryption key\n *\n * @returns The decrypted text\n */\nexport async function decryptAES(encryptedText: string, key: string): Promise<string> {\n const isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null;\n try {\n const [ivBase64, encryptedBase64] = encryptedText.split(':');\n if (!ivBase64 || !encryptedBase64) {\n throw new Error('Invalid encrypted format');\n }\n if (isNode) {\n // Node.js\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const crypto = require('crypto');\n const iv = Buffer.from(ivBase64, 'base64');\n const encryptedBuffer = Buffer.from(encryptedBase64, 'base64');\n const derivedKey = crypto.createHash('sha256').update(key).digest();\n const decipher = crypto.createDecipheriv('aes-256-cbc', derivedKey, iv);\n let decrypted = decipher.update(encryptedBuffer);\n decrypted = Buffer.concat([decrypted, decipher.final()]);\n return decrypted.toString('utf8');\n } else {\n // Browsers\n const iv = Uint8Array.from(atob(ivBase64), (c) => c.charCodeAt(0));\n const encryptedData = Uint8Array.from(atob(encryptedBase64), (c) => c.charCodeAt(0));\n const encoder = new TextEncoder();\n const keyData = encoder.encode(key);\n const hashBuffer = await crypto.subtle.digest('SHA-256', keyData);\n const cryptoKey = await crypto.subtle.importKey('raw', hashBuffer, { name: 'AES-CBC' }, false, ['decrypt']);\n const decryptedBuffer = await crypto.subtle.decrypt({ name: 'AES-CBC', iv }, cryptoKey, encryptedData);\n const decoder = new TextDecoder();\n return decoder.decode(decryptedBuffer);\n }\n } catch (error) {\n console.error('Decryption error:', error);\n return '';\n }\n}\n\n/**\n * - **EN:** Encode a UTF-8 string into Base64 (standard or URL-safe).\n * - **CN:** 将 UTF-8 字符串编码为 Base64(标准或 URL 安全格式)。\n *\n * @param content Input text to encode | 要编码的输入文本\n *\n * @returns Base64 encoded string | Base64 编码后的字符串\n */\nexport function toBase64(\n content: string,\n opts: {\n /**\n * - **EN:** Use URL-safe Base64 if true (replace +/ with -_ and strip =)\n * - **CN:** 为 true 时使用 URL 安全 Base64(将 +/ 替换为 -_ 并去掉 =)\n */\n urlSafe?: boolean;\n } = {}\n): string {\n const { urlSafe = false } = opts;\n if (content == null || content === '') return '';\n\n let base64: string;\n const hasBuffer = typeof Buffer !== 'undefined' && typeof Buffer.from === 'function';\n if (hasBuffer) {\n // Node.js\n base64 = Buffer.from(content, 'utf8').toString('base64');\n } else {\n // Browser\n const encoder = new TextEncoder();\n const bytes = encoder.encode(content);\n let binary = '';\n for (const i of bytes) {\n binary += String.fromCharCode(i);\n }\n base64 = btoa(binary);\n }\n\n if (urlSafe) {\n // Replace chars and strip padding for URL-safe variant\n base64 = base64.replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/u, '');\n }\n return base64;\n}\n\n/**\n * - EN: Decode a Base64 (standard or URL-safe) string into UTF-8 text.\n * - CN: 将(标准或 URL 安全)Base64 字符串解码为 UTF-8 文本。\n *\n * @param content Base64 encoded string | Base64 编码字符串\n *\n * @returns Decoded UTF-8 string | 解码后的 UTF-8 字符串\n */\nexport function fromBase64(\n content: string,\n opts: {\n /**\n * - **EN:** Use URL-safe Base64 if true (replace +/ with -_ and strip =)\n * - **CN:** 为 true 时使用 URL 安全 Base64(将 +/ 替换为 -_ 并去掉 =)\n */\n urlSafe?: boolean;\n } = {}\n): string {\n const { urlSafe = false } = opts;\n if (content == null || content === '') return '';\n\n let normalized = content;\n if (urlSafe) {\n normalized = normalized.replace(/-/g, '+').replace(/_/g, '/');\n }\n // Restore padding if stripped\n const padNeeded = normalized.length % 4;\n if (padNeeded === 2) normalized += '==';\n else if (padNeeded === 3) normalized += '=';\n else if (padNeeded === 1) {\n throw new Error('Invalid Base64 string length');\n }\n\n const hasBuffer = typeof Buffer !== 'undefined' && typeof Buffer.from === 'function';\n try {\n if (hasBuffer) {\n return Buffer.from(normalized, 'base64').toString('utf8');\n } else {\n const binary = atob(normalized);\n const len = binary.length;\n const bytes = new Uint8Array(len);\n for (let i = 0; i < len; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n const decoder = new TextDecoder();\n return decoder.decode(bytes);\n }\n } catch (e) {\n throw new Error('Failed to decode Base64: ' + (e instanceof Error ? e.message : String(e)));\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuB;AACvB,oBAA4B;AAG5B,eAAsB,gBAAgB,WAAmB,KAAa;AACpE,QAAM,SAAK,2BAAY,EAAE;AACzB,MAAI,IAAI,MAAM,WAAW,WAAW,EAAE;AACtC,QAAM,IAAI,SAAS,EAAE;AACrB,QAAM,IAAI,EAAE;AACZ,QAAM,QAAI,oBAAO,GAAG,EAAE,MAAM;AAC5B,MAAI,EAAE,UAAU,GAAG,CAAC,IAAI,IAAI,EAAE,UAAU,CAAC;AACzC,QAAM,IAAI,SAAS,GAAG,KAAK,GAAG;AAC9B,QAAM,IAAI,GAAG,KAAK;AAClB,SAAO,WAAW,GAAG,GAAG;AAC1B;AAGA,eAAsB,gBAAgB,eAAuB,KAAa;AACxE,QAAM,YAAY,MAAM,WAAW,eAAe,GAAG;AACrD,QAAM,CAAC,GAAG,CAAC,IAAI,UAAU,MAAM,GAAG;AAClC,QAAM,CAAC,GAAG,CAAC,IAAI,WAAW,CAAC,EAAE,MAAM,GAAG,EAAE,IAAI,MAAM;AAClD,QAAM,KAAK,WAAW,EAAE,UAAU,GAAG,IAAI,CAAC,CAAC;AAC3C,SAAO,WAAW,EAAE,UAAU,GAAG,CAAC,IAAI,EAAE,UAAU,IAAI,CAAC,GAAG,EAAE;AAC9D;AAYA,eAAsB,WAAW,MAAc,KAA8B;AAC3E,QAAM,SAAS,OAAO,YAAY,eAAe,QAAQ,YAAY,QAAQ,QAAQ,SAAS,QAAQ;AAEtG,MAAI,QAAQ;AAGV,UAAMA,UAAS,QAAQ,QAAQ;AAC/B,UAAM,aAAaA,QAAO,WAAW,QAAQ,EAAE,OAAO,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B,aAAa,QAAQ,EAAE,UAAU,OAAO,CAAC,EAAE;AAAA,EAC5F;AACF;",
|
|
6
|
+
"names": ["crypto"]
|
|
7
|
+
}
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.js
CHANGED
|
@@ -19,10 +19,12 @@ module.exports = __toCommonJS(utils_exports);
|
|
|
19
19
|
__reExport(utils_exports, require("./color"), module.exports);
|
|
20
20
|
__reExport(utils_exports, require("./math"), module.exports);
|
|
21
21
|
__reExport(utils_exports, require("./string"), module.exports);
|
|
22
|
+
__reExport(utils_exports, require("./crypto"), module.exports);
|
|
22
23
|
// Annotate the CommonJS export names for ESM import in node:
|
|
23
24
|
0 && (module.exports = {
|
|
24
25
|
...require("./color"),
|
|
25
26
|
...require("./math"),
|
|
26
|
-
...require("./string")
|
|
27
|
+
...require("./string"),
|
|
28
|
+
...require("./crypto")
|
|
27
29
|
});
|
|
28
30
|
//# sourceMappingURL=index.js.map
|
package/lib/utils/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './color';\nexport * from './math';\nexport * from './string';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,oBAAd;AACA,0BAAc,mBADd;AAEA,0BAAc,qBAFd;",
|
|
4
|
+
"sourcesContent": ["export * from './color';\nexport * from './math';\nexport * from './string';\nexport * from './crypto';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,oBAAd;AACA,0BAAc,mBADd;AAEA,0BAAc,qBAFd;AAGA,0BAAc,qBAHd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiny-codes/react-easy",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"description": "Simplify React and AntDesign development with practical components and hooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -20,23 +20,6 @@
|
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"author": "李凤宝(Leo) <shijistar@gmail.com>",
|
|
23
|
-
"exports": {
|
|
24
|
-
".": {
|
|
25
|
-
"import": "./es/index.js",
|
|
26
|
-
"require": "./lib/index.js",
|
|
27
|
-
"default": "./lib/index.js",
|
|
28
|
-
"node": "./lib/index.js",
|
|
29
|
-
"types": "./lib/index.d.ts"
|
|
30
|
-
},
|
|
31
|
-
"./lexical": {
|
|
32
|
-
"import": "./es/components/Lexical/index.js",
|
|
33
|
-
"require": "./lib/components/Lexical/index.js",
|
|
34
|
-
"default": "./lib/components/Lexical/index.js",
|
|
35
|
-
"node": "./lib/components/Lexical/index.js",
|
|
36
|
-
"types": "./lib/components/Lexical/index.d.ts"
|
|
37
|
-
},
|
|
38
|
-
"./package.json": "./package.json"
|
|
39
|
-
},
|
|
40
23
|
"main": "lib/index.js",
|
|
41
24
|
"module": "es/index.js",
|
|
42
25
|
"types": "lib/index.d.ts",
|