@whitesev/utils 2.8.1 → 2.8.2

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/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { Utils } from "./src/Utils";
2
+
3
+ export default Utils;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@whitesev/utils",
4
- "version": "2.8.1",
4
+ "version": "2.8.2",
5
5
  "type": "module",
6
6
  "description": "一个常用的工具库",
7
7
  "main": "dist/index.cjs.js",
@@ -19,7 +19,8 @@
19
19
  },
20
20
  "files": [
21
21
  "dist",
22
- "src"
22
+ "src",
23
+ "./index.ts"
23
24
  ],
24
25
  "publishConfig": {
25
26
  "registry": "https://registry.npmjs.org/"
@@ -40,6 +41,7 @@
40
41
  "devDependencies": {
41
42
  "@eslint/js": "^9.35.0",
42
43
  "@rollup/plugin-commonjs": "^28.0.6",
44
+ "@rollup/plugin-json": "^6.1.0",
43
45
  "@rollup/plugin-node-resolve": "^16.0.1",
44
46
  "@rollup/plugin-typescript": "^12.1.2",
45
47
  "browserslist": "^4.26.2",
package/src/Utils.ts CHANGED
@@ -29,6 +29,7 @@ import { ModuleRaid } from "./ModuleRaid";
29
29
  import { domUtils } from "./DOMUtils";
30
30
  import { CommonUtil } from "./CommonUtil";
31
31
  import type { ReactInstance } from "./types/React";
32
+ import { version } from "./../package.json";
32
33
 
33
34
  class Utils {
34
35
  private windowApi: typeof WindowApi.prototype;
@@ -36,7 +37,7 @@ class Utils {
36
37
  this.windowApi = new WindowApi(option);
37
38
  }
38
39
  /** 版本号 */
39
- version = "2025.9.14";
40
+ version = version;
40
41
  /**
41
42
  * 在页面中增加style元素,如果html节点存在子节点,添加子节点第一个,反之,添加到html节点的子节点最后一个
42
43
  * @param cssText css字符串