@vef-framework/shared 2.0.10 → 2.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/dist/cjs/_internal/_rolldown/runtime.cjs +1 -0
- package/dist/cjs/color/color-ops.cjs +1 -1
- package/dist/cjs/color/index.cjs +1 -1
- package/dist/cjs/color/name.cjs +1 -1
- package/dist/cjs/color/palette.cjs +1 -1
- package/dist/cjs/constants/color-names.cjs +1 -1
- package/dist/cjs/constants/color-palettes.cjs +1 -1
- package/dist/cjs/constants/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/types/color.cjs +0 -1
- package/dist/cjs/types/common.cjs +0 -1
- package/dist/cjs/types/deep-keys.cjs +0 -1
- package/dist/cjs/types/index.cjs +0 -1
- package/dist/cjs/utils/chrono.cjs +1 -1
- package/dist/cjs/utils/equal.cjs +1 -1
- package/dist/cjs/utils/error.cjs +2 -3
- package/dist/cjs/utils/event.cjs +1 -1
- package/dist/cjs/utils/format.cjs +1 -1
- package/dist/cjs/utils/function.cjs +1 -1
- package/dist/cjs/utils/id.cjs +1 -1
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/cjs/utils/key.cjs +1 -1
- package/dist/cjs/utils/lib.cjs +1 -1
- package/dist/cjs/utils/object.cjs +1 -1
- package/dist/cjs/utils/path.cjs +1 -1
- package/dist/cjs/utils/pinyin.cjs +1 -1
- package/dist/cjs/utils/security.cjs +1 -1
- package/dist/cjs/utils/string.cjs +1 -1
- package/dist/cjs/utils/table.cjs +1 -0
- package/dist/cjs/utils/task.cjs +1 -1
- package/dist/cjs/utils/tree.cjs +1 -1
- package/dist/cjs/utils/zod.cjs +1 -1
- package/dist/es/color/color-ops.js +55 -68
- package/dist/es/color/index.js +4 -18
- package/dist/es/color/name.js +25 -27
- package/dist/es/color/palette.js +70 -82
- package/dist/es/constants/color-names.js +1572 -1572
- package/dist/es/constants/color-palettes.js +1085 -360
- package/dist/es/constants/index.js +3 -8
- package/dist/es/index.js +25 -165
- package/dist/es/types/color.js +1 -1
- package/dist/es/types/common.js +1 -1
- package/dist/es/types/deep-keys.js +1 -1
- package/dist/es/types/index.js +1 -3
- package/dist/es/utils/chrono.js +77 -92
- package/dist/es/utils/equal.js +83 -118
- package/dist/es/utils/error.js +27 -29
- package/dist/es/utils/event.js +27 -51
- package/dist/es/utils/format.js +27 -18
- package/dist/es/utils/function.js +26 -36
- package/dist/es/utils/id.js +21 -21
- package/dist/es/utils/index.js +18 -79
- package/dist/es/utils/key.js +17 -23
- package/dist/es/utils/lib.js +8 -64
- package/dist/es/utils/object.js +12 -12
- package/dist/es/utils/path.js +37 -58
- package/dist/es/utils/pinyin.js +41 -43
- package/dist/es/utils/security.js +73 -31
- package/dist/es/utils/string.js +19 -7
- package/dist/es/utils/table.js +15 -0
- package/dist/es/utils/task.js +6 -7
- package/dist/es/utils/tree.js +159 -181
- package/dist/es/utils/zod.js +7 -7
- package/dist/types/constants/color-names.d.ts +2 -2
- package/dist/types/constants/color-palettes.d.ts +2 -2
- package/dist/types/src/color/color-ops.d.ts +84 -0
- package/dist/types/src/color/index.d.ts +3 -0
- package/dist/types/src/color/name.d.ts +7 -0
- package/dist/types/src/color/palette.d.ts +8 -0
- package/dist/types/src/constants/color-names.d.ts +11 -0
- package/dist/types/src/constants/color-palettes.d.ts +823 -0
- package/dist/types/src/constants/index.d.ts +2 -0
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/types/color.d.ts +25 -0
- package/dist/types/src/types/common.d.ts +29 -0
- package/dist/types/src/types/deep-keys.d.ts +37 -0
- package/dist/types/src/types/index.d.ts +3 -0
- package/dist/types/src/utils/chrono.d.ts +152 -0
- package/dist/types/src/utils/equal.d.ts +16 -0
- package/dist/types/src/utils/error.d.ts +22 -0
- package/dist/types/src/utils/event.d.ts +46 -0
- package/dist/types/src/utils/format.d.ts +31 -0
- package/dist/types/src/utils/function.d.ts +27 -0
- package/dist/types/src/utils/id.d.ts +6 -0
- package/dist/types/src/utils/index.d.ts +18 -0
- package/dist/types/src/utils/key.d.ts +5 -0
- package/dist/types/src/utils/lib.d.ts +5 -0
- package/dist/types/src/utils/object.d.ts +9 -0
- package/dist/types/src/utils/path.d.ts +13 -0
- package/dist/types/src/utils/pinyin.d.ts +40 -0
- package/dist/types/src/utils/security.d.ts +60 -0
- package/dist/types/src/utils/string.d.ts +15 -0
- package/dist/types/src/utils/table.d.ts +25 -0
- package/dist/types/src/utils/task.d.ts +4 -0
- package/dist/types/src/utils/tree.d.ts +216 -0
- package/dist/types/src/utils/zod.d.ts +2 -0
- package/dist/types/types/color.d.ts +1 -49
- package/dist/types/types/common.d.ts +7 -3
- package/dist/types/types/deep-keys.d.ts +28 -0
- package/dist/types/utils/chrono.d.ts +3 -13
- package/dist/types/utils/error.d.ts +5 -21
- package/dist/types/utils/event.d.ts +9 -31
- package/dist/types/utils/format.d.ts +0 -2
- package/dist/types/utils/function.d.ts +4 -36
- package/dist/types/utils/id.d.ts +2 -2
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/key.d.ts +2 -4
- package/dist/types/utils/path.d.ts +7 -70
- package/dist/types/utils/pinyin.d.ts +2 -3
- package/dist/types/utils/security.d.ts +44 -2
- package/dist/types/utils/string.d.ts +8 -0
- package/dist/types/utils/table.d.ts +25 -0
- package/dist/types/utils/task.d.ts +1 -3
- package/dist/types/utils/tree.d.ts +8 -0
- package/dist/types/utils/zod.d.ts +1 -0
- package/package.json +13 -13
package/dist/es/utils/error.js
CHANGED
|
@@ -1,36 +1,34 @@
|
|
|
1
|
+
/*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
|
|
2
|
+
import { getBaseName as e } from "./path.js";
|
|
1
3
|
import * as t from "stacktrace-js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
//#region src/utils/error.ts
|
|
5
|
+
function n(e, n) {
|
|
6
|
+
return t.fromError(e, {
|
|
7
|
+
offline: !0,
|
|
8
|
+
filter: n
|
|
9
|
+
});
|
|
8
10
|
}
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
+
function r(e) {
|
|
12
|
+
return !e.fileName || !e.fileName.includes("node_modules");
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
`);
|
|
15
|
-
return `${e.name}: ${e.message}
|
|
16
|
-
${a}`;
|
|
14
|
+
function i(t) {
|
|
15
|
+
return ` at ${t.functionName || "anonymous"} (${`${t.fileName ? e(t.fileName, !0) : "unknown"}:${t.lineNumber}:${t.columnNumber}`})`;
|
|
17
16
|
}
|
|
18
|
-
async function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
async function a(e) {
|
|
18
|
+
let t = (await n(e, r)).map((e) => i(e)).join("\n");
|
|
19
|
+
return `${e.name}: ${e.message}\n${t}`;
|
|
20
|
+
}
|
|
21
|
+
function o(e) {
|
|
22
|
+
return t.get({
|
|
23
|
+
offline: !0,
|
|
24
|
+
filter: e
|
|
25
|
+
});
|
|
23
26
|
}
|
|
24
27
|
function s(e) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
return t.getSync({
|
|
29
|
+
offline: !0,
|
|
30
|
+
filter: e
|
|
31
|
+
});
|
|
29
32
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
m as getCurrentStack,
|
|
33
|
-
s as getCurrentStackSync,
|
|
34
|
-
f as getSanitizedErrorStack,
|
|
35
|
-
i as parseErrorStack
|
|
36
|
-
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { r as filterUserFrame, o as getCurrentStack, s as getCurrentStackSync, a as getSanitizedErrorStack, n as parseErrorStack };
|
package/dist/es/utils/event.js
CHANGED
|
@@ -1,52 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
* If no listener is provided, removes all listeners for that event type.
|
|
24
|
-
*
|
|
25
|
-
* @param eventType - The type of event to remove listeners from
|
|
26
|
-
* @param eventListener - Optional specific listener to remove
|
|
27
|
-
*/
|
|
28
|
-
off(t, i) {
|
|
29
|
-
this.#t.off(t, i);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Remove all event listeners from all event types.
|
|
33
|
-
* Useful for cleanup when the emitter is no longer needed.
|
|
34
|
-
*/
|
|
35
|
-
clear() {
|
|
36
|
-
this.#t.all.clear();
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Get all registered listeners for debugging purposes.
|
|
40
|
-
* Returns a Map of event types to their listener arrays.
|
|
41
|
-
*/
|
|
42
|
-
getAllListeners() {
|
|
43
|
-
return this.#t.all;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function l() {
|
|
47
|
-
return new s();
|
|
48
|
-
}
|
|
49
|
-
export {
|
|
50
|
-
s as EventEmitter,
|
|
51
|
-
l as createEventEmitter
|
|
1
|
+
/*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
|
|
2
|
+
import e from "mitt";
|
|
3
|
+
//#region src/utils/event.ts
|
|
4
|
+
var t = class {
|
|
5
|
+
#e = e();
|
|
6
|
+
on(e, t) {
|
|
7
|
+
return this.#e.on(e, t), () => {
|
|
8
|
+
this.#e.off(e, t);
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
emit(e, t) {
|
|
12
|
+
t === void 0 ? this.#e.emit(e) : this.#e.emit(e, t);
|
|
13
|
+
}
|
|
14
|
+
off(e, t) {
|
|
15
|
+
this.#e.off(e, t);
|
|
16
|
+
}
|
|
17
|
+
clear() {
|
|
18
|
+
this.#e.all.clear();
|
|
19
|
+
}
|
|
20
|
+
getAllListeners() {
|
|
21
|
+
return this.#e.all;
|
|
22
|
+
}
|
|
52
23
|
};
|
|
24
|
+
function n() {
|
|
25
|
+
return new t();
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { t as EventEmitter, n as createEventEmitter };
|
package/dist/es/utils/format.js
CHANGED
|
@@ -1,20 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
|
|
2
|
+
//#region src/utils/format.ts
|
|
3
|
+
var e = 1024, t = [
|
|
4
|
+
"B",
|
|
5
|
+
"KB",
|
|
6
|
+
"MB",
|
|
7
|
+
"GB",
|
|
8
|
+
"TB",
|
|
9
|
+
"PB"
|
|
10
|
+
], n = 1e3, r = [
|
|
11
|
+
"",
|
|
12
|
+
"K",
|
|
13
|
+
"M",
|
|
14
|
+
"B",
|
|
15
|
+
"T"
|
|
16
|
+
], i = Math.log(e), a = Math.log(n);
|
|
17
|
+
function o(n, r = 2) {
|
|
18
|
+
if (n === 0) return "0 B";
|
|
19
|
+
let a = Math.max(r, 0), o = Math.floor(Math.log(n) / i);
|
|
20
|
+
return `${Number.parseFloat((n / e ** o).toFixed(a))} ${t[o]}`;
|
|
8
21
|
}
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const B = Math.max(r, 0), o = Math.floor(Math.log(t) / Math.log(1e3));
|
|
15
|
-
return `${Number.parseFloat((t / 1e3 ** o).toFixed(B))} ${N[o]}`;
|
|
22
|
+
function s(e, t = 2) {
|
|
23
|
+
if (e === 0) return "0";
|
|
24
|
+
if (e < n) return e.toString();
|
|
25
|
+
let i = Math.max(t, 0), o = Math.floor(Math.log(e) / a);
|
|
26
|
+
return `${Number.parseFloat((e / n ** o).toFixed(i))} ${r[o]}`;
|
|
16
27
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
n as formatNumber
|
|
20
|
-
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { o as formatBytes, s as formatNumber };
|
|
@@ -1,41 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
|
|
2
|
+
//#region src/utils/function.ts
|
|
3
|
+
function e(e) {
|
|
4
|
+
let t = e.constructor.name;
|
|
5
|
+
return t === "AsyncFunction" || t === "AsyncGeneratorFunction";
|
|
3
6
|
}
|
|
4
|
-
async function
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return s?.(n, o), n;
|
|
17
|
-
} catch (n) {
|
|
18
|
-
throw l?.(n, o), n;
|
|
19
|
-
} finally {
|
|
20
|
-
u?.(o);
|
|
21
|
-
}
|
|
22
|
-
} else
|
|
23
|
-
return r;
|
|
7
|
+
async function t(e, t, n) {
|
|
8
|
+
let { onInvoke: r, onSuccess: i, onError: a, onFinally: o } = n, s = e(...t);
|
|
9
|
+
if (!(s instanceof Promise)) return s;
|
|
10
|
+
let c = r?.();
|
|
11
|
+
try {
|
|
12
|
+
let e = await s;
|
|
13
|
+
return i?.(e, c), e;
|
|
14
|
+
} catch (e) {
|
|
15
|
+
throw a?.(e, c), e;
|
|
16
|
+
} finally {
|
|
17
|
+
o?.(c);
|
|
18
|
+
}
|
|
24
19
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
20
|
+
function n(e) {
|
|
21
|
+
return e;
|
|
27
22
|
}
|
|
28
|
-
function
|
|
29
|
-
|
|
23
|
+
function r(e) {
|
|
24
|
+
return () => i(e);
|
|
30
25
|
}
|
|
31
|
-
function
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
function i(e) {
|
|
27
|
+
let t = e ? `${e} not implemented` : "Not implemented";
|
|
28
|
+
throw Error(t);
|
|
34
29
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
p as identity,
|
|
38
|
-
y as invokeAwaitableFn,
|
|
39
|
-
m as isAsyncFunction,
|
|
40
|
-
a as throwNotImplemented
|
|
41
|
-
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { r as createThrowNotImplementedFn, n as identity, t as invokeAwaitableFn, e as isAsyncFunction, i as throwNotImplemented };
|
package/dist/es/utils/id.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
|
|
2
|
+
import { init as e } from "@paralleldrive/cuid2";
|
|
3
|
+
import { isNullish as t } from "radashi";
|
|
4
|
+
//#region src/utils/id.ts
|
|
5
|
+
var n = "0cd902ccad1f26c27b8db84af2282b7b", r = 16;
|
|
6
|
+
function i() {
|
|
7
|
+
return !t(navigator) && !navigator.userAgent.includes("jsdom");
|
|
5
8
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
fingerprint: "0cd902ccad1f26c27b8db84af2282b7b"
|
|
9
|
+
var a = e({
|
|
10
|
+
length: r,
|
|
11
|
+
fingerprint: n
|
|
10
12
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
console.error("Failed to initialize fingerprint:", t);
|
|
13
|
+
i() && import("@fingerprintjs/fingerprintjs").then(({ load: e }) => e()).then((e) => e.get()).then((t) => {
|
|
14
|
+
a = e({
|
|
15
|
+
length: r,
|
|
16
|
+
fingerprint: t.visitorId
|
|
17
|
+
});
|
|
18
|
+
}).catch((e) => {
|
|
19
|
+
console.error("Failed to initialize fingerprint:", e);
|
|
19
20
|
});
|
|
20
|
-
function
|
|
21
|
-
|
|
21
|
+
function o() {
|
|
22
|
+
return a();
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { o as generateId };
|
package/dist/es/utils/index.js
CHANGED
|
@@ -1,80 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
1
|
+
/*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
|
|
2
|
+
import "./chrono.js";
|
|
3
|
+
import "./equal.js";
|
|
4
|
+
import "./path.js";
|
|
5
|
+
import "./error.js";
|
|
6
|
+
import "./event.js";
|
|
7
|
+
import "./format.js";
|
|
8
|
+
import "./function.js";
|
|
9
|
+
import "./id.js";
|
|
10
|
+
import "./lib.js";
|
|
11
|
+
import "./key.js";
|
|
12
|
+
import "./object.js";
|
|
13
|
+
import "./pinyin.js";
|
|
14
|
+
import "./security.js";
|
|
15
|
+
import "./string.js";
|
|
16
|
+
import "./table.js";
|
|
17
|
+
import "./task.js";
|
|
18
|
+
import "./tree.js";
|
|
17
19
|
import "./zod.js";
|
|
18
|
-
export {
|
|
19
|
-
o as DEFAULT_DATETIME_FORMAT,
|
|
20
|
-
a as DEFAULT_DATE_FORMAT,
|
|
21
|
-
i as DEFAULT_TIME_FORMAT,
|
|
22
|
-
I as EventEmitter,
|
|
23
|
-
m as LOCALIZED_DATETIME_FORMAT,
|
|
24
|
-
n as LOCALIZED_DATE_FORMAT,
|
|
25
|
-
j as alwaysFalse,
|
|
26
|
-
K as alwaysTrue,
|
|
27
|
-
xe as buildTree,
|
|
28
|
-
Ee as constantCase,
|
|
29
|
-
_ as createEventEmitter,
|
|
30
|
-
k as createThrowNotImplementedFn,
|
|
31
|
-
fe as decryptUsingRSA,
|
|
32
|
-
le as encryptUsingRSA,
|
|
33
|
-
ce as filterTree,
|
|
34
|
-
Fe as filterTreeWithAncestors,
|
|
35
|
-
S as filterUserFrame,
|
|
36
|
-
ye as findNodeInTree,
|
|
37
|
-
Se as flattenTree,
|
|
38
|
-
L as formatBytes,
|
|
39
|
-
s as formatDate,
|
|
40
|
-
p as formatDuration,
|
|
41
|
-
R as formatNumber,
|
|
42
|
-
Q as formatPath,
|
|
43
|
-
q as generateId,
|
|
44
|
-
V as getBaseName,
|
|
45
|
-
d as getCurrentStack,
|
|
46
|
-
u as getCurrentStackSync,
|
|
47
|
-
X as getDirName,
|
|
48
|
-
Y as getExtName,
|
|
49
|
-
T as getLocalizedDateTime,
|
|
50
|
-
f as getNow,
|
|
51
|
-
l as getNowDateString,
|
|
52
|
-
g as getNowDateTimeString,
|
|
53
|
-
E as getNowTimeString,
|
|
54
|
-
ne as getPinyin,
|
|
55
|
-
se as getPinyinInitials,
|
|
56
|
-
$ as getRelativePath,
|
|
57
|
-
w as getSanitizedErrorStack,
|
|
58
|
-
A as getTemporalFormats,
|
|
59
|
-
W as hashKey,
|
|
60
|
-
v as identity,
|
|
61
|
-
U as invokeAwaitableFn,
|
|
62
|
-
ee as isAbsolutePath,
|
|
63
|
-
C as isAsyncFunction,
|
|
64
|
-
c as isDeepEqual,
|
|
65
|
-
F as isShallowEqual,
|
|
66
|
-
te as joinPaths,
|
|
67
|
-
de as mapTree,
|
|
68
|
-
H as mergeWith,
|
|
69
|
-
re as normalizePath,
|
|
70
|
-
D as parseDate,
|
|
71
|
-
N as parseErrorStack,
|
|
72
|
-
oe as parsePath,
|
|
73
|
-
ae as pathSeparator,
|
|
74
|
-
ie as resolvePath,
|
|
75
|
-
De as scheduleMicrotask,
|
|
76
|
-
b as throwNotImplemented,
|
|
77
|
-
ue as traverseTree,
|
|
78
|
-
h as tryParseDate,
|
|
79
|
-
pe as withPinyin
|
|
80
|
-
};
|
package/dist/es/utils/key.js
CHANGED
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import { isPlainObject as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
s[t.toString()] = o[t];
|
|
14
|
-
for (const t of Object.keys(s).toSorted())
|
|
15
|
-
r[`@@${t}`] = s[t];
|
|
16
|
-
return r;
|
|
17
|
-
}
|
|
18
|
-
return o;
|
|
19
|
-
}
|
|
20
|
-
);
|
|
1
|
+
/*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
|
|
2
|
+
import { isPlainObject as e } from "./lib.js";
|
|
3
|
+
//#region src/utils/key.ts
|
|
4
|
+
function t(e) {
|
|
5
|
+
let t = {}, n = Object.keys(e).toSorted(), r = Object.getOwnPropertySymbols(e);
|
|
6
|
+
for (let r of n) t[r] = e[r];
|
|
7
|
+
let i = r.map((t) => ({
|
|
8
|
+
key: t.toString(),
|
|
9
|
+
value: e[t]
|
|
10
|
+
})).toSorted((e, t) => e.key.localeCompare(t.key));
|
|
11
|
+
for (let { key: e, value: n } of i) t[`@@${e}`] = n;
|
|
12
|
+
return t;
|
|
21
13
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
14
|
+
function n(n) {
|
|
15
|
+
return JSON.stringify(n, (n, r) => e(r) ? t(r) : r);
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { n as hashKey };
|
package/dist/es/utils/lib.js
CHANGED
|
@@ -1,64 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import { always as
|
|
3
|
-
import { klona as
|
|
4
|
-
import { parse as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
i as alwaysTrue,
|
|
10
|
-
n as assign,
|
|
11
|
-
l as camelCase,
|
|
12
|
-
m as capitalize,
|
|
13
|
-
os as cloneDeep,
|
|
14
|
-
c as cluster,
|
|
15
|
-
p as debounce,
|
|
16
|
-
ns as decodeQueryString,
|
|
17
|
-
ls as encodeQueryString,
|
|
18
|
-
u as first,
|
|
19
|
-
y as get,
|
|
20
|
-
g as isArray,
|
|
21
|
-
f as isBigInt,
|
|
22
|
-
b as isBoolean,
|
|
23
|
-
d as isDate,
|
|
24
|
-
k as isEmpty,
|
|
25
|
-
S as isError,
|
|
26
|
-
x as isFloat,
|
|
27
|
-
w as isFunction,
|
|
28
|
-
C as isInt,
|
|
29
|
-
F as isIntString,
|
|
30
|
-
I as isMap,
|
|
31
|
-
h as isNullish,
|
|
32
|
-
E as isNumber,
|
|
33
|
-
P as isObject,
|
|
34
|
-
j as isPlainObject,
|
|
35
|
-
z as isPrimitive,
|
|
36
|
-
B as isPromise,
|
|
37
|
-
D as isRegExp,
|
|
38
|
-
M as isSet,
|
|
39
|
-
N as isString,
|
|
40
|
-
O as isSymbol,
|
|
41
|
-
Q as isUndefined,
|
|
42
|
-
W as isWeakMap,
|
|
43
|
-
q as isWeakSet,
|
|
44
|
-
v as kebabCase,
|
|
45
|
-
A as last,
|
|
46
|
-
R as max,
|
|
47
|
-
T as memoize,
|
|
48
|
-
U as min,
|
|
49
|
-
G as noop,
|
|
50
|
-
H as omit,
|
|
51
|
-
J as once,
|
|
52
|
-
K as pascalCase,
|
|
53
|
-
L as pick,
|
|
54
|
-
V as set,
|
|
55
|
-
X as similarity,
|
|
56
|
-
Y as snakeCase,
|
|
57
|
-
Z as sum,
|
|
58
|
-
_ as template,
|
|
59
|
-
$ as throttle,
|
|
60
|
-
ss as toFloat,
|
|
61
|
-
es as toInt,
|
|
62
|
-
is as trim,
|
|
63
|
-
as as unique
|
|
64
|
-
};
|
|
1
|
+
/*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
|
|
2
|
+
import { always as e, always as t, assign as n, camel as r, capitalize as i, cluster as a, dash as o, debounce as s, first as c, get as l, isArray as u, isBigInt as d, isBoolean as f, isDate as p, isEmpty as m, isError as h, isFloat as g, isFunction as _, isInt as v, isIntString as y, isMap as b, isNullish as x, isNumber as S, isObject as C, isPlainObject as w, isPrimitive as T, isPromise as E, isRegExp as D, isSet as O, isString as k, isSymbol as A, isUndefined as j, isWeakMap as M, isWeakSet as N, last as P, max as F, memo as I, min as L, noop as R, omit as z, once as B, pascal as V, pick as H, set as U, similarity as W, snake as G, sum as K, template as q, throttle as J, toFloat as Y, toInt as X, trim as Z, unique as Q } from "radashi";
|
|
3
|
+
import { klona as $ } from "klona";
|
|
4
|
+
import { parse as ee, stringify as te } from "qs";
|
|
5
|
+
//#region src/utils/lib.ts
|
|
6
|
+
var ne = e(!0), re = e(!1);
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as always, re as alwaysFalse, ne as alwaysTrue, n as assign, r as camelCase, i as capitalize, $ as cloneDeep, a as cluster, s as debounce, ee as decodeQueryString, te as encodeQueryString, c as first, l as get, u as isArray, d as isBigInt, f as isBoolean, p as isDate, m as isEmpty, h as isError, g as isFloat, _ as isFunction, v as isInt, y as isIntString, b as isMap, x as isNullish, S as isNumber, C as isObject, w as isPlainObject, T as isPrimitive, E as isPromise, D as isRegExp, O as isSet, k as isString, A as isSymbol, j as isUndefined, M as isWeakMap, N as isWeakSet, o as kebabCase, P as last, F as max, I as memoize, L as min, R as noop, z as omit, B as once, V as pascalCase, H as pick, U as set, W as similarity, G as snakeCase, K as sum, q as template, J as throttle, Y as toFloat, X as toInt, Z as trim, Q as unique };
|
package/dist/es/utils/object.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
import { isUndefined as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
/*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
|
|
2
|
+
import { isUndefined as e } from "./lib.js";
|
|
3
|
+
//#region src/utils/object.ts
|
|
4
|
+
function t(t, n, r = !1) {
|
|
5
|
+
for (let [i, a] of Object.entries(n)) {
|
|
6
|
+
if (e(a)) continue;
|
|
7
|
+
let n = i;
|
|
8
|
+
(r || e(t[n])) && (t[n] = a);
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as mergeWith };
|
package/dist/es/utils/path.js
CHANGED
|
@@ -1,58 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return l(t);
|
|
39
|
-
}
|
|
40
|
-
function A(t, e) {
|
|
41
|
-
return m(t, e);
|
|
42
|
-
}
|
|
43
|
-
function B(...t) {
|
|
44
|
-
return h(...t);
|
|
45
|
-
}
|
|
46
|
-
export {
|
|
47
|
-
z as formatPath,
|
|
48
|
-
v as getBaseName,
|
|
49
|
-
x as getDirName,
|
|
50
|
-
g as getExtName,
|
|
51
|
-
A as getRelativePath,
|
|
52
|
-
N as isAbsolutePath,
|
|
53
|
-
b as joinPaths,
|
|
54
|
-
d as normalizePath,
|
|
55
|
-
j as parsePath,
|
|
56
|
-
P as pathSeparator,
|
|
57
|
-
B as resolvePath
|
|
58
|
-
};
|
|
1
|
+
/*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
|
|
2
|
+
import e from "path-browserify";
|
|
3
|
+
//#region src/utils/path.ts
|
|
4
|
+
function t(t, n = !0) {
|
|
5
|
+
let r = n ? void 0 : e.extname(t);
|
|
6
|
+
return e.basename(t, r);
|
|
7
|
+
}
|
|
8
|
+
function n(t) {
|
|
9
|
+
return e.extname(t);
|
|
10
|
+
}
|
|
11
|
+
function r(t) {
|
|
12
|
+
return e.dirname(t);
|
|
13
|
+
}
|
|
14
|
+
function i(...t) {
|
|
15
|
+
return e.join(...t);
|
|
16
|
+
}
|
|
17
|
+
function a(t) {
|
|
18
|
+
return e.isAbsolute(t);
|
|
19
|
+
}
|
|
20
|
+
function o(t) {
|
|
21
|
+
return e.normalize(t);
|
|
22
|
+
}
|
|
23
|
+
function s(t) {
|
|
24
|
+
return e.parse(t);
|
|
25
|
+
}
|
|
26
|
+
function c(t) {
|
|
27
|
+
return e.format(t);
|
|
28
|
+
}
|
|
29
|
+
function l(t, n) {
|
|
30
|
+
return e.relative(t, n);
|
|
31
|
+
}
|
|
32
|
+
function u(...t) {
|
|
33
|
+
return e.resolve(...t);
|
|
34
|
+
}
|
|
35
|
+
var d = e.sep;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { c as formatPath, t as getBaseName, r as getDirName, n as getExtName, l as getRelativePath, a as isAbsolutePath, i as joinPaths, o as normalizePath, s as parsePath, d as pathSeparator, u as resolvePath };
|