@tiny-codes/react-easy 1.0.11 → 1.1.0
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/README.md +2 -2
- package/es/components/ConfirmAction/index.js +16 -12
- package/es/components/ConfirmAction/index.js.map +1 -1
- package/es/components/FloatDrawer/index.d.ts +1 -1
- package/es/components/FloatDrawer/index.js.map +1 -1
- package/es/components/OverflowTags/index.d.ts +52 -0
- package/es/components/OverflowTags/index.js +91 -0
- package/es/components/OverflowTags/index.js.map +1 -0
- package/es/components/OverflowTags/style/index.d.ts +3 -0
- package/es/components/OverflowTags/style/index.js +18 -0
- package/es/components/OverflowTags/style/index.js.map +1 -0
- package/es/components/index.d.ts +2 -0
- package/es/components/index.js +1 -2
- package/es/components/index.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/math.d.ts +11 -0
- package/es/utils/math.js +17 -0
- package/es/utils/math.js.map +1 -0
- package/lib/components/ConfirmAction/index.js +17 -8
- package/lib/components/ConfirmAction/index.js.map +2 -2
- package/lib/components/FloatDrawer/index.d.ts +1 -1
- package/lib/components/FloatDrawer/index.js.map +2 -2
- package/lib/components/OverflowTags/index.d.ts +52 -0
- package/lib/components/OverflowTags/index.js +107 -0
- package/lib/components/OverflowTags/index.js.map +7 -0
- package/lib/components/OverflowTags/style/index.d.ts +3 -0
- package/lib/components/OverflowTags/style/index.js +38 -0
- package/lib/components/OverflowTags/style/index.js.map +7 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +3 -0
- package/lib/components/index.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/math.d.ts +11 -0
- package/lib/utils/math.js +35 -0
- package/lib/utils/math.js.map +7 -0
- package/package.json +4 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/index.tsx"],
|
|
4
|
-
"sourcesContent": ["export type { BreakLinesProps } from './BreakLines';\nexport { default as BreakLines } from './BreakLines';\n\nexport type { ConfigProviderProps } from './ConfigProvider';\nexport { default as ConfigProvider } from './ConfigProvider';\nexport type { ReactEasyContextProps } from './ConfigProvider/context';\nexport { default as ReactEasyContext } from './ConfigProvider/context';\n\nexport type { ConfirmActionProps, ConfirmActionTrigger, ConfirmActionRef } from './ConfirmAction';\nexport { withDefaultConfirmActionProps } from './ConfirmAction';\nexport { default as ConfirmAction } from './ConfirmAction';\n\n// export * from './DeleteConfirmAction';\nexport { default as DeleteConfirmAction } from './DeleteConfirmAction';\n\nexport type { FloatDrawerProps } from './FloatDrawer';\nexport { default as FloatDrawer } from './FloatDrawer';\n\nexport type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';\nexport { withDefaultModalActionProps, withModalAction } from './ModalAction';\nexport { default as ModalAction } from './ModalAction';\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAAsC;AAGtC,4BAA0C;AAE1C,qBAA4C;AAG5C,2BAA8C;AAC9C,IAAAA,wBAAyC;AAGzC,iCAA+C;AAG/C,yBAAuC;AAGvC,yBAA6D;AAC7D,IAAAC,sBAAuC;",
|
|
4
|
+
"sourcesContent": ["export type { BreakLinesProps } from './BreakLines';\nexport { default as BreakLines } from './BreakLines';\n\nexport type { ConfigProviderProps } from './ConfigProvider';\nexport { default as ConfigProvider } from './ConfigProvider';\nexport type { ReactEasyContextProps } from './ConfigProvider/context';\nexport { default as ReactEasyContext } from './ConfigProvider/context';\n\nexport type { ConfirmActionProps, ConfirmActionTrigger, ConfirmActionRef } from './ConfirmAction';\nexport { withDefaultConfirmActionProps } from './ConfirmAction';\nexport { default as ConfirmAction } from './ConfirmAction';\n\n// export * from './DeleteConfirmAction';\nexport { default as DeleteConfirmAction } from './DeleteConfirmAction';\n\nexport type { FloatDrawerProps } from './FloatDrawer';\nexport { default as FloatDrawer } from './FloatDrawer';\n\nexport type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';\nexport { withDefaultModalActionProps, withModalAction } from './ModalAction';\nexport { default as ModalAction } from './ModalAction';\n\nexport type { OverflowTagsProps } from './OverflowTags';\nexport { default as OverflowTags } from './OverflowTags';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAAsC;AAGtC,4BAA0C;AAE1C,qBAA4C;AAG5C,2BAA8C;AAC9C,IAAAA,wBAAyC;AAGzC,iCAA+C;AAG/C,yBAAuC;AAGvC,yBAA6D;AAC7D,IAAAC,sBAAuC;AAGvC,0BAAwC;",
|
|
6
6
|
"names": ["import_ConfirmAction", "import_ModalAction"]
|
|
7
7
|
}
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.js
CHANGED
|
@@ -17,8 +17,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
17
17
|
var utils_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(utils_exports);
|
|
19
19
|
__reExport(utils_exports, require("./color"), module.exports);
|
|
20
|
+
__reExport(utils_exports, require("./math"), module.exports);
|
|
20
21
|
// Annotate the CommonJS export names for ESM import in node:
|
|
21
22
|
0 && (module.exports = {
|
|
22
|
-
...require("./color")
|
|
23
|
+
...require("./color"),
|
|
24
|
+
...require("./math")
|
|
23
25
|
});
|
|
24
26
|
//# 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';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,oBAAd;",
|
|
4
|
+
"sourcesContent": ["export * from './color';\nexport * from './math';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,oBAAd;AACA,0BAAc,mBADd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **EN**: Generate a random number within a specified range (inclusive on both ends)
|
|
3
|
+
*
|
|
4
|
+
* **CN**: 生成指定范围(两端包含)内的随机数
|
|
5
|
+
*
|
|
6
|
+
* @param min The minimum value (inclusive) | 最小值(包含)
|
|
7
|
+
* @param max The maximum value (inclusive) | 最大值(包含)
|
|
8
|
+
*
|
|
9
|
+
* @returns The generated random number | 生成的随机数
|
|
10
|
+
*/
|
|
11
|
+
export declare function random(min: number, max: number): number;
|
|
@@ -0,0 +1,35 @@
|
|
|
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/math.ts
|
|
20
|
+
var math_exports = {};
|
|
21
|
+
__export(math_exports, {
|
|
22
|
+
random: () => random
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(math_exports);
|
|
25
|
+
function random(min, max) {
|
|
26
|
+
const array = new Uint32Array(1);
|
|
27
|
+
globalThis.crypto.getRandomValues(array);
|
|
28
|
+
const randomValue = array[0] / (4294967295 + 1);
|
|
29
|
+
return Math.floor(randomValue * (max - min + 1)) + min;
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
random
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=math.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/math.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * **EN**: Generate a random number within a specified range (inclusive on both ends)\n *\n * **CN**: 生成指定范围(两端包含)内的随机数\n *\n * @param min The minimum value (inclusive) | 最小值(包含)\n * @param max The maximum value (inclusive) | 最大值(包含)\n *\n * @returns The generated random number | 生成的随机数\n */\nexport function random(min: number, max: number): number {\n const array = new Uint32Array(1);\n globalThis.crypto.getRandomValues(array);\n const randomValue = array[0] / (0xffffffff + 1);\n return Math.floor(randomValue * (max - min + 1)) + min;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,SAAS,OAAO,KAAa,KAAqB;AACvD,QAAM,QAAQ,IAAI,YAAY,CAAC;AAC/B,aAAW,OAAO,gBAAgB,KAAK;AACvC,QAAM,cAAc,MAAM,CAAC,KAAK,aAAa;AAC7C,SAAO,KAAK,MAAM,eAAe,MAAM,MAAM,EAAE,IAAI;AACrD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiny-codes/react-easy",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Simplify React and AntDesign development with practical components and hooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
7
7
|
"antd",
|
|
8
8
|
"ant-design",
|
|
9
9
|
"hoc",
|
|
10
|
-
"hooks"
|
|
10
|
+
"hooks",
|
|
11
|
+
"utils"
|
|
11
12
|
],
|
|
12
13
|
"homepage": "https://github.com/shijistar/react-easy#readme",
|
|
13
14
|
"bugs": {
|