dlzn-ui 1.3.0 → 1.5.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.
@@ -0,0 +1,8 @@
1
+ import { __commonJSMin as e } from "./_rolldown/runtime.mjs";
2
+ //#region __vite-browser-external
3
+ var t = /* @__PURE__ */ e(((e, t) => {
4
+ t.exports = {};
5
+ }));
6
+ //#endregion
7
+ export default t();
8
+ export { t as require___vite_browser_external };
@@ -0,0 +1,16 @@
1
+ //#region \0rolldown/runtime.js
2
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
3
+ if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
4
+ get: ((e) => i[e]).bind(null, d),
5
+ enumerable: !(s = n(i, d)) || s.enumerable
6
+ });
7
+ return e;
8
+ }, c = (n, r, o) => (o = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
9
+ value: n,
10
+ enumerable: !0
11
+ }) : o, n)), l = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
12
+ if (typeof require < "u") return require.apply(this, arguments);
13
+ throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
14
+ });
15
+ //#endregion
16
+ export { o as __commonJSMin, l as __require, c as __toESM };
@@ -0,0 +1 @@
1
+ export * from './others';
@@ -0,0 +1,2 @@
1
+ import { passwordReg as e, passwordRegMessage as t, validNumberStringReg as n } from "./others.mjs";
2
+ export { e as passwordReg, t as passwordRegMessage, n as validNumberStringReg };
@@ -0,0 +1,3 @@
1
+ export declare const passwordReg: RegExp;
2
+ export declare const passwordRegMessage = "\u5BC6\u78018\u4F4D\u53CA\u4EE5\u4E0A\uFF0C\u542B\u5927\u5199\u5B57\u6BCD\u3001\u5C0F\u5199\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u7279\u6B8A\u5B57\u7B26\u4E2D\u81F3\u5C11\u4E09\u7C7B";
3
+ export declare const validNumberStringReg: RegExp;
@@ -0,0 +1,4 @@
1
+ //#region src/const/others.ts
2
+ var e = /^(?=[!-~]{8,}$)(?:(?=.*[A-Z])(?=.*[a-z])(?=.*\d)|(?=.*[A-Z])(?=.*[a-z])(?=.*[^A-Za-z0-9])|(?=.*[A-Z])(?=.*\d)(?=.*[^A-Za-z0-9])|(?=.*[a-z])(?=.*\d)(?=.*[^A-Za-z0-9])).+$/, t = "密码8位及以上,含大写字母、小写字母、数字、特殊字符中至少三类", n = /^-?(?:0|[1-9]\d*)(?:\.\d+)?$/;
3
+ //#endregion
4
+ export { e as passwordReg, t as passwordRegMessage, n as validNumberStringReg };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dlzn-ui",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -16,7 +16,14 @@
16
16
  }
17
17
  },
18
18
  "peerDependencies": {
19
- "vue": "^3.5.0"
19
+ "@tsconfig/node-lts": "^24.0.0",
20
+ "@types/node": "^26.1.2",
21
+ "@vitejs/plugin-vue": "^6.0.8",
22
+ "@vue/tsconfig": "^0.9.1",
23
+ "typescript": "^6.0.3",
24
+ "vite": "^8.2.0",
25
+ "vue": "^3.5.41",
26
+ "vue-tsc": "^3.3.9"
20
27
  },
21
28
  "sideEffects": [
22
29
  "**/*.css"
package/utils/index.d.ts CHANGED
@@ -1 +1,3 @@
1
1
  export * from './string';
2
+ export * from './tool';
3
+ export * from './number';
package/utils/index.mjs CHANGED
@@ -1,2 +1,4 @@
1
1
  import { getFilenameFromUrl as e, queryStringToObject as t } from "./string.mjs";
2
- export { e as getFilenameFromUrl, t as queryStringToObject };
2
+ import { aesDecrypt as n, aesEncrypt as r, saveAs as i } from "./tool.mjs";
3
+ import { formatSecondsToChinese as a } from "./number.mjs";
4
+ export { n as aesDecrypt, r as aesEncrypt, a as formatSecondsToChinese, e as getFilenameFromUrl, t as queryStringToObject, i as saveAs };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @description: 将秒数转换为中文
3
+ * @param {number} seconds
4
+ * @return {string}
5
+ */
6
+ declare function formatSecondsToChinese(seconds: number): string;
7
+ export { formatSecondsToChinese };
@@ -0,0 +1,11 @@
1
+ //#region src/utils/number.ts
2
+ function e(e) {
3
+ let t = "", n = Math.floor(e / 3600);
4
+ n > 0 && (t += `${n}时`);
5
+ let r = Math.floor(e % 3600 / 60);
6
+ r > 0 && (t += `${r}分`);
7
+ let i = e % 60;
8
+ return i > 0 && (t += `${i}秒`), t;
9
+ }
10
+ //#endregion
11
+ export { e as formatSecondsToChinese };
@@ -0,0 +1,5 @@
1
+ import { default as FileSaver } from 'file-saver';
2
+ declare function aesDecrypt(word: string, keyWord: string): Promise<string>;
3
+ declare function aesEncrypt(word: string, keyWord: string): Promise<string>;
4
+ declare function saveAs(arg1: Parameters<typeof FileSaver.saveAs>[0], arg2?: Parameters<typeof FileSaver.saveAs>[1], arg3?: FileSaver.FileSaverOptions): Promise<void>;
5
+ export { aesDecrypt, aesEncrypt, saveAs };
package/utils/tool.mjs ADDED
@@ -0,0 +1,22 @@
1
+ import { __toESM as e } from "../_virtual/_rolldown/runtime.mjs";
2
+ //#region src/utils/tool.ts
3
+ async function t(t, n) {
4
+ let { default: r } = await import("../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.mjs").then((t) => /* @__PURE__ */ e(t.default, 1)), i = r.enc.Utf8.parse(n);
5
+ return r.AES.decrypt(t, i, {
6
+ mode: r.mode.ECB,
7
+ padding: r.pad.Pkcs7
8
+ }).toString(r.enc.Utf8);
9
+ }
10
+ async function n(t, n) {
11
+ let { default: r } = await import("../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.mjs").then((t) => /* @__PURE__ */ e(t.default, 1)), i = r.enc.Utf8.parse(n), a = r.enc.Utf8.parse(t);
12
+ return r.AES.encrypt(a, i, {
13
+ mode: r.mode.ECB,
14
+ padding: r.pad.Pkcs7
15
+ }).toString();
16
+ }
17
+ async function r(t, n, r) {
18
+ let { default: i } = await import("../node_modules/.pnpm/file-saver@2.0.5/node_modules/file-saver/dist/FileSaver.min.mjs").then((t) => /* @__PURE__ */ e(t.default, 1));
19
+ i(t, n, r);
20
+ }
21
+ //#endregion
22
+ export { t as aesDecrypt, n as aesEncrypt, r as saveAs };