@tiny-codes/react-easy 1.3.1 → 1.4.1
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 +16 -0
- package/es/components/FormItemControl/index.d.ts +7 -7
- package/es/components/FormItemControl/index.js +6 -6
- package/es/components/FormItemControl/index.js.map +1 -1
- package/es/components/Lexical/helpers/index.d.ts +73 -0
- package/es/components/Lexical/helpers/index.js +286 -0
- package/es/components/Lexical/helpers/index.js.map +1 -0
- package/es/components/Lexical/index.d.ts +6 -0
- package/es/components/Lexical/index.js +7 -0
- package/es/components/Lexical/index.js.map +1 -0
- package/es/components/Lexical/nodes/CloseIcon.d.ts +71 -0
- package/es/components/Lexical/nodes/CloseIcon.js +176 -0
- package/es/components/Lexical/nodes/CloseIcon.js.map +1 -0
- package/es/components/Lexical/nodes/DivNode.d.ts +45 -0
- package/es/components/Lexical/nodes/DivNode.js +191 -0
- package/es/components/Lexical/nodes/DivNode.js.map +1 -0
- package/es/components/Lexical/nodes/ExtendTextNode.d.ts +46 -0
- package/es/components/Lexical/nodes/ExtendTextNode.js +134 -0
- package/es/components/Lexical/nodes/ExtendTextNode.js.map +1 -0
- package/es/components/Lexical/nodes/SelectNode.d.ts +74 -0
- package/es/components/Lexical/nodes/SelectNode.js +239 -0
- package/es/components/Lexical/nodes/SelectNode.js.map +1 -0
- package/es/components/Lexical/nodes/base.d.ts +102 -0
- package/es/components/Lexical/nodes/base.js +217 -0
- package/es/components/Lexical/nodes/base.js.map +1 -0
- package/es/hooks/useRefValue.d.ts +2 -2
- package/es/hooks/useRefValue.js.map +1 -1
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +1 -0
- package/es/utils/index.js.map +1 -1
- package/es/utils/string.d.ts +7 -0
- package/es/utils/string.js +15 -0
- package/es/utils/string.js.map +1 -0
- package/lib/components/FormItemControl/index.d.ts +7 -7
- package/lib/components/FormItemControl/index.js.map +1 -1
- package/lib/components/Lexical/helpers/index.d.ts +73 -0
- package/lib/components/Lexical/helpers/index.js +222 -0
- package/lib/components/Lexical/helpers/index.js.map +7 -0
- package/lib/components/Lexical/index.d.ts +6 -0
- package/lib/components/Lexical/index.js +34 -0
- package/lib/components/Lexical/index.js.map +7 -0
- package/lib/components/Lexical/nodes/CloseIcon.d.ts +71 -0
- package/lib/components/Lexical/nodes/CloseIcon.js +149 -0
- package/lib/components/Lexical/nodes/CloseIcon.js.map +7 -0
- package/lib/components/Lexical/nodes/DivNode.d.ts +45 -0
- package/lib/components/Lexical/nodes/DivNode.js +139 -0
- package/lib/components/Lexical/nodes/DivNode.js.map +7 -0
- package/lib/components/Lexical/nodes/ExtendTextNode.d.ts +46 -0
- package/lib/components/Lexical/nodes/ExtendTextNode.js +95 -0
- package/lib/components/Lexical/nodes/ExtendTextNode.js.map +7 -0
- package/lib/components/Lexical/nodes/SelectNode.d.ts +74 -0
- package/lib/components/Lexical/nodes/SelectNode.js +156 -0
- package/lib/components/Lexical/nodes/SelectNode.js.map +7 -0
- package/lib/components/Lexical/nodes/base.d.ts +102 -0
- package/lib/components/Lexical/nodes/base.js +134 -0
- package/lib/components/Lexical/nodes/base.js.map +7 -0
- package/lib/hooks/useRefValue.d.ts +2 -2
- package/lib/hooks/useRefValue.js.map +2 -2
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +3 -1
- package/lib/utils/index.js.map +2 -2
- package/lib/utils/string.d.ts +7 -0
- package/lib/utils/string.js +37 -0
- package/lib/utils/string.js.map +7 -0
- package/package.json +20 -1
package/lib/utils/index.js
CHANGED
|
@@ -18,9 +18,11 @@ var utils_exports = {};
|
|
|
18
18
|
module.exports = __toCommonJS(utils_exports);
|
|
19
19
|
__reExport(utils_exports, require("./color"), module.exports);
|
|
20
20
|
__reExport(utils_exports, require("./math"), module.exports);
|
|
21
|
+
__reExport(utils_exports, require("./string"), module.exports);
|
|
21
22
|
// Annotate the CommonJS export names for ESM import in node:
|
|
22
23
|
0 && (module.exports = {
|
|
23
24
|
...require("./color"),
|
|
24
|
-
...require("./math")
|
|
25
|
+
...require("./math"),
|
|
26
|
+
...require("./string")
|
|
25
27
|
});
|
|
26
28
|
//# 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';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,oBAAd;AACA,0BAAc,mBADd;",
|
|
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;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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/string.ts
|
|
20
|
+
var string_exports = {};
|
|
21
|
+
__export(string_exports, {
|
|
22
|
+
randomChars: () => randomChars
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(string_exports);
|
|
25
|
+
function randomChars(length) {
|
|
26
|
+
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
27
|
+
let result = "";
|
|
28
|
+
for (let i = 0; i < length; i++) {
|
|
29
|
+
result += chars.charAt(Math.floor(Math.random() * chars.length));
|
|
30
|
+
}
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
35
|
+
randomChars
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=string.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/string.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * - EN: Generate a random string of alphanumeric characters.\n * - CN: 生成一个随机的字母数字字符串。\n *\n * @param length Length of the random string | 随机字符串的长度\n */\nexport function randomChars(length: number): string {\n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n let result = '';\n for (let i = 0; i < length; i++) {\n result += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n return result;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,SAAS,YAAY,QAAwB;AAClD,QAAM,QAAQ;AACd,MAAI,SAAS;AACb,WAAS,IAAI,GAAG,IAAI,QAAQ,KAAK;AAC/B,cAAU,MAAM,OAAO,KAAK,MAAM,KAAK,OAAO,IAAI,MAAM,MAAM,CAAC;AAAA,EACjE;AACA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiny-codes/react-easy",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Simplify React and AntDesign development with practical components and hooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -20,6 +20,23 @@
|
|
|
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
|
+
},
|
|
23
40
|
"main": "lib/index.js",
|
|
24
41
|
"module": "es/index.js",
|
|
25
42
|
"types": "lib/index.d.ts",
|
|
@@ -36,7 +53,9 @@
|
|
|
36
53
|
"prepublishOnly": "npm run build"
|
|
37
54
|
},
|
|
38
55
|
"dependencies": {
|
|
56
|
+
"@lexical/react": "^0.33.1",
|
|
39
57
|
"i18next": "^24.2.3",
|
|
58
|
+
"lexical": "^0.33.1",
|
|
40
59
|
"react-contexify": "^6.0.0"
|
|
41
60
|
},
|
|
42
61
|
"devDependencies": {
|