@vef-framework/shared 1.0.134 → 2.0.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.
Files changed (164) hide show
  1. package/README +15 -0
  2. package/dist/cjs/color/color-ops.cjs +76 -0
  3. package/dist/cjs/color/index.cjs +24 -0
  4. package/dist/cjs/color/name.cjs +49 -0
  5. package/dist/cjs/color/palette.cjs +126 -0
  6. package/dist/cjs/constants/color-names.cjs +1580 -0
  7. package/dist/cjs/constants/color-palettes.cjs +372 -0
  8. package/dist/cjs/constants/index.cjs +14 -0
  9. package/dist/cjs/index.cjs +339 -0
  10. package/dist/cjs/types/color.cjs +3 -0
  11. package/dist/cjs/types/common.cjs +3 -0
  12. package/dist/cjs/types/deep-keys.cjs +3 -0
  13. package/dist/cjs/types/index.cjs +7 -0
  14. package/dist/cjs/utils/chrono.cjs +139 -0
  15. package/dist/cjs/utils/equal.cjs +175 -0
  16. package/dist/cjs/utils/error.cjs +60 -0
  17. package/dist/cjs/utils/event.cjs +62 -0
  18. package/dist/cjs/utils/format.cjs +31 -0
  19. package/dist/cjs/utils/function.cjs +49 -0
  20. package/dist/cjs/utils/id.cjs +38 -0
  21. package/dist/cjs/utils/index.cjs +86 -0
  22. package/dist/cjs/utils/key.cjs +34 -0
  23. package/dist/cjs/utils/lib.cjs +234 -0
  24. package/dist/cjs/utils/object.cjs +20 -0
  25. package/dist/cjs/utils/path.cjs +63 -0
  26. package/dist/cjs/utils/pinyin.cjs +53 -0
  27. package/dist/cjs/utils/security.cjs +44 -0
  28. package/dist/cjs/utils/string.cjs +13 -0
  29. package/dist/cjs/utils/task.cjs +17 -0
  30. package/dist/cjs/utils/tree.cjs +262 -0
  31. package/dist/cjs/utils/zod.cjs +14 -0
  32. package/dist/es/color/color-ops.js +62 -0
  33. package/dist/es/color/index.js +4 -0
  34. package/dist/es/color/name.js +45 -0
  35. package/dist/es/color/palette.js +122 -0
  36. package/dist/es/constants/color-names.js +1575 -0
  37. package/dist/es/constants/color-palettes.js +367 -0
  38. package/dist/es/constants/index.js +3 -0
  39. package/dist/es/index.js +30 -0
  40. package/dist/es/types/color.js +1 -0
  41. package/dist/es/types/common.js +1 -0
  42. package/dist/es/types/deep-keys.js +1 -0
  43. package/dist/es/types/index.js +4 -0
  44. package/dist/es/utils/chrono.js +121 -0
  45. package/dist/es/utils/equal.js +170 -0
  46. package/dist/es/utils/error.js +33 -0
  47. package/dist/es/utils/event.js +57 -0
  48. package/dist/es/utils/format.js +26 -0
  49. package/dist/es/utils/function.js +41 -0
  50. package/dist/es/utils/id.js +34 -0
  51. package/dist/es/utils/index.js +18 -0
  52. package/dist/es/utils/key.js +30 -0
  53. package/dist/es/utils/lib.js +10 -0
  54. package/dist/es/utils/object.js +16 -0
  55. package/dist/es/utils/path.js +49 -0
  56. package/dist/es/utils/pinyin.js +47 -0
  57. package/dist/es/utils/security.js +39 -0
  58. package/dist/es/utils/string.js +9 -0
  59. package/dist/es/utils/task.js +13 -0
  60. package/dist/es/utils/tree.js +252 -0
  61. package/dist/es/utils/zod.js +6 -0
  62. package/dist/types/color/color-ops.d.ts +84 -0
  63. package/dist/types/color/index.d.ts +3 -0
  64. package/dist/types/color/name.d.ts +7 -0
  65. package/dist/types/color/palette.d.ts +8 -0
  66. package/dist/types/constants/color-names.d.ts +11 -0
  67. package/dist/types/constants/color-palettes.d.ts +823 -0
  68. package/dist/types/constants/index.d.ts +2 -0
  69. package/dist/types/index.d.ts +4 -0
  70. package/dist/types/types/color.d.ts +73 -0
  71. package/dist/types/types/common.d.ts +25 -0
  72. package/dist/types/types/deep-keys.d.ts +9 -0
  73. package/dist/types/types/index.d.ts +3 -0
  74. package/dist/types/utils/chrono.d.ts +162 -0
  75. package/dist/types/utils/equal.d.ts +16 -0
  76. package/dist/types/utils/error.d.ts +38 -0
  77. package/dist/types/utils/event.d.ts +68 -0
  78. package/dist/types/utils/format.d.ts +33 -0
  79. package/dist/types/utils/function.d.ts +59 -0
  80. package/{types → dist/types/utils}/id.d.ts +2 -2
  81. package/dist/types/utils/index.d.ts +17 -0
  82. package/dist/types/utils/key.d.ts +7 -0
  83. package/dist/types/utils/lib.d.ts +5 -0
  84. package/dist/types/utils/object.d.ts +9 -0
  85. package/dist/types/utils/path.d.ts +76 -0
  86. package/dist/types/utils/pinyin.d.ts +41 -0
  87. package/dist/types/utils/security.d.ts +18 -0
  88. package/dist/types/utils/string.d.ts +7 -0
  89. package/dist/types/utils/task.d.ts +6 -0
  90. package/dist/types/utils/tree.d.ts +208 -0
  91. package/dist/types/utils/zod.d.ts +1 -0
  92. package/package.json +58 -56
  93. package/README.md +0 -25
  94. package/cjs/color.cjs +0 -2
  95. package/cjs/constants.cjs +0 -2
  96. package/cjs/context.cjs +0 -2
  97. package/cjs/dom.cjs +0 -2
  98. package/cjs/error.cjs +0 -2
  99. package/cjs/event.cjs +0 -2
  100. package/cjs/expression.cjs +0 -2
  101. package/cjs/function.cjs +0 -2
  102. package/cjs/id.cjs +0 -2
  103. package/cjs/index.cjs +0 -2
  104. package/cjs/json.cjs +0 -2
  105. package/cjs/module.cjs +0 -2
  106. package/cjs/path.cjs +0 -2
  107. package/cjs/pinyin.cjs +0 -2
  108. package/cjs/security.cjs +0 -2
  109. package/cjs/store.cjs +0 -2
  110. package/cjs/styles.cjs +0 -2
  111. package/cjs/temporal.cjs +0 -2
  112. package/cjs/theme-variables.cjs +0 -2
  113. package/cjs/types.cjs +0 -2
  114. package/cjs/utils.cjs +0 -2
  115. package/cjs/validation.cjs +0 -2
  116. package/cjs/yaml.cjs +0 -2
  117. package/cjs/zod.cjs +0 -2
  118. package/esm/color.js +0 -2
  119. package/esm/constants.js +0 -2
  120. package/esm/context.js +0 -2
  121. package/esm/dom.js +0 -2
  122. package/esm/error.js +0 -2
  123. package/esm/event.js +0 -2
  124. package/esm/expression.js +0 -2
  125. package/esm/function.js +0 -2
  126. package/esm/id.js +0 -2
  127. package/esm/index.js +0 -2
  128. package/esm/json.js +0 -2
  129. package/esm/module.js +0 -2
  130. package/esm/path.js +0 -2
  131. package/esm/pinyin.js +0 -2
  132. package/esm/security.js +0 -2
  133. package/esm/store.js +0 -2
  134. package/esm/styles.js +0 -2
  135. package/esm/temporal.js +0 -2
  136. package/esm/theme-variables.js +0 -2
  137. package/esm/types.js +0 -2
  138. package/esm/utils.js +0 -2
  139. package/esm/validation.js +0 -2
  140. package/esm/yaml.js +0 -2
  141. package/esm/zod.js +0 -2
  142. package/types/color.d.ts +0 -7
  143. package/types/constants.d.ts +0 -28
  144. package/types/context.d.ts +0 -21
  145. package/types/dom.d.ts +0 -9
  146. package/types/error.d.ts +0 -16
  147. package/types/event.d.ts +0 -6
  148. package/types/expression.d.ts +0 -23
  149. package/types/function.d.ts +0 -8
  150. package/types/index.d.ts +0 -23
  151. package/types/json.d.ts +0 -7
  152. package/types/module.d.ts +0 -7
  153. package/types/path.d.ts +0 -43
  154. package/types/pinyin.d.ts +0 -14
  155. package/types/security.d.ts +0 -16
  156. package/types/store.d.ts +0 -78
  157. package/types/styles.d.ts +0 -21
  158. package/types/temporal.d.ts +0 -18
  159. package/types/theme-variables.d.ts +0 -348
  160. package/types/types.d.ts +0 -905
  161. package/types/utils.d.ts +0 -77
  162. package/types/validation.d.ts +0 -38
  163. package/types/yaml.d.ts +0 -7
  164. package/types/zod.d.ts +0 -6
@@ -0,0 +1,60 @@
1
+ /*! @vef-framework/shared v2.0.0 made with ❤️ by Venus | 2025-11-25T10:06:28.916Z */
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ const stackTrace = require('stacktrace-js');
7
+ const path = require('./path.cjs');
8
+
9
+ function _interopNamespaceDefault(e) {
10
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
11
+ if (e) {
12
+ for (const k in e) {
13
+ if (k !== 'default') {
14
+ const d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: () => e[k]
18
+ });
19
+ }
20
+ }
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ const stackTrace__namespace = /*#__PURE__*/_interopNamespaceDefault(stackTrace);
27
+
28
+ async function parseErrorStack(error, filter) {
29
+ return await stackTrace__namespace.fromError(error, {
30
+ offline: true,
31
+ filter
32
+ });
33
+ }
34
+ function filterUserFrame(stackFrame) {
35
+ return !stackFrame.fileName || !stackFrame.fileName.includes("node_modules");
36
+ }
37
+ async function getSanitizedErrorStack(error) {
38
+ const frames = await parseErrorStack(error, filterUserFrame);
39
+ const cleanStack = frames.map((frame) => ` at ${frame.functionName || "anonymous"} (${frame.fileName ? path.getBaseName(frame.fileName, true) : "unknown"}:${frame.lineNumber}:${frame.columnNumber})`).join("\n");
40
+ return `${error.name}: ${error.message}
41
+ ${cleanStack}`;
42
+ }
43
+ async function getCurrentStack(filter) {
44
+ return await stackTrace__namespace.get({
45
+ offline: true,
46
+ filter
47
+ });
48
+ }
49
+ function getCurrentStackSync(filter) {
50
+ return stackTrace__namespace.getSync({
51
+ offline: true,
52
+ filter
53
+ });
54
+ }
55
+
56
+ exports.filterUserFrame = filterUserFrame;
57
+ exports.getCurrentStack = getCurrentStack;
58
+ exports.getCurrentStackSync = getCurrentStackSync;
59
+ exports.getSanitizedErrorStack = getSanitizedErrorStack;
60
+ exports.parseErrorStack = parseErrorStack;
@@ -0,0 +1,62 @@
1
+ /*! @vef-framework/shared v2.0.0 made with ❤️ by Venus | 2025-11-25T10:06:28.916Z */
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ const mitt = require('mitt');
7
+
8
+ class EventEmitter {
9
+ /** Private mitt instance for handling the actual event operations */
10
+ #bus = mitt();
11
+ /**
12
+ * Subscribe to an event with a listener function.
13
+ * Returns an unsubscribe function for easy cleanup.
14
+ *
15
+ * @param eventType - The type of event to listen for
16
+ * @param eventListener - The function to call when the event is emitted
17
+ * @returns A function that removes this specific listener when called
18
+ */
19
+ on(eventType, eventListener) {
20
+ this.#bus.on(eventType, eventListener);
21
+ return () => {
22
+ this.#bus.off(eventType, eventListener);
23
+ };
24
+ }
25
+ emit(eventType, eventPayload) {
26
+ if (eventPayload) {
27
+ this.#bus.emit(eventType, eventPayload);
28
+ } else {
29
+ this.#bus.emit(eventType);
30
+ }
31
+ }
32
+ /**
33
+ * Remove a specific listener for an event type.
34
+ * If no listener is provided, removes all listeners for that event type.
35
+ *
36
+ * @param eventType - The type of event to remove listeners from
37
+ * @param eventListener - Optional specific listener to remove
38
+ */
39
+ off(eventType, eventListener) {
40
+ this.#bus.off(eventType, eventListener);
41
+ }
42
+ /**
43
+ * Remove all event listeners from all event types.
44
+ * Useful for cleanup when the emitter is no longer needed.
45
+ */
46
+ clear() {
47
+ this.#bus.all.clear();
48
+ }
49
+ /**
50
+ * Get all registered listeners for debugging purposes.
51
+ * Returns a Map of event types to their listener arrays.
52
+ */
53
+ getAllListeners() {
54
+ return this.#bus.all;
55
+ }
56
+ }
57
+ function createEventEmitter() {
58
+ return new EventEmitter();
59
+ }
60
+
61
+ exports.EventEmitter = EventEmitter;
62
+ exports.createEventEmitter = createEventEmitter;
@@ -0,0 +1,31 @@
1
+ /*! @vef-framework/shared v2.0.0 made with ❤️ by Venus | 2025-11-25T10:06:28.916Z */
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ const BYTES_UNIT = 1024;
7
+ const BYTE_SIZES = ["B", "KB", "MB", "GB", "TB", "PB"];
8
+ const NUMBER_UNIT = 1e3;
9
+ const NUMBER_UNITS = ["", "K", "M", "B", "T"];
10
+ function formatBytes(bytes, decimals = 2) {
11
+ if (bytes === 0) {
12
+ return "0 B";
13
+ }
14
+ const dm = Math.max(decimals, 0);
15
+ const i = Math.floor(Math.log(bytes) / Math.log(BYTES_UNIT));
16
+ return `${Number.parseFloat((bytes / BYTES_UNIT ** i).toFixed(dm))} ${BYTE_SIZES[i]}`;
17
+ }
18
+ function formatNumber(num, decimals = 2) {
19
+ if (num === 0) {
20
+ return "0";
21
+ }
22
+ if (num < NUMBER_UNIT) {
23
+ return num.toString();
24
+ }
25
+ const dm = Math.max(decimals, 0);
26
+ const i = Math.floor(Math.log(num) / Math.log(NUMBER_UNIT));
27
+ return `${Number.parseFloat((num / NUMBER_UNIT ** i).toFixed(dm))} ${NUMBER_UNITS[i]}`;
28
+ }
29
+
30
+ exports.formatBytes = formatBytes;
31
+ exports.formatNumber = formatNumber;
@@ -0,0 +1,49 @@
1
+ /*! @vef-framework/shared v2.0.0 made with ❤️ by Venus | 2025-11-25T10:06:28.916Z */
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ function isAsyncFunction(fn) {
7
+ return fn.constructor.name === "AsyncFunction" || Object.prototype.toString.call(fn) === "[object AsyncFunction]" || fn.toString().startsWith("async ");
8
+ }
9
+ async function invokeAwaitableFn(fn, args, options) {
10
+ const {
11
+ onInvoke,
12
+ onSuccess,
13
+ onError,
14
+ onFinally
15
+ } = options;
16
+ const returned = fn(...args);
17
+ if (returned instanceof Promise) {
18
+ let context;
19
+ try {
20
+ context = onInvoke?.();
21
+ const result = await returned;
22
+ onSuccess?.(result, context);
23
+ return result;
24
+ } catch (error) {
25
+ onError?.(error, context);
26
+ throw error;
27
+ } finally {
28
+ onFinally?.(context);
29
+ }
30
+ } else {
31
+ return returned;
32
+ }
33
+ }
34
+ function identity(value) {
35
+ return value;
36
+ }
37
+ function createThrowNotImplementedFn(feature) {
38
+ return () => throwNotImplemented(feature);
39
+ }
40
+ function throwNotImplemented(feature) {
41
+ const label = feature ? `${feature} not implemented` : "Not implemented";
42
+ throw new Error(label);
43
+ }
44
+
45
+ exports.createThrowNotImplementedFn = createThrowNotImplementedFn;
46
+ exports.identity = identity;
47
+ exports.invokeAwaitableFn = invokeAwaitableFn;
48
+ exports.isAsyncFunction = isAsyncFunction;
49
+ exports.throwNotImplemented = throwNotImplemented;
@@ -0,0 +1,38 @@
1
+ /*! @vef-framework/shared v2.0.0 made with ❤️ by Venus | 2025-11-25T10:06:28.916Z */
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ const cuid2 = require('@paralleldrive/cuid2');
7
+ const radashi = require('radashi');
8
+
9
+ function isFingerprintSupported() {
10
+ if (radashi.isNullish(navigator)) {
11
+ return false;
12
+ }
13
+ if (navigator.userAgent.includes("jsdom")) {
14
+ return false;
15
+ }
16
+ return true;
17
+ }
18
+ let createId = cuid2.init({
19
+ length: 16,
20
+ // vef-framework default fingerprint
21
+ fingerprint: "0cd902ccad1f26c27b8db84af2282b7b"
22
+ });
23
+ if (isFingerprintSupported()) {
24
+ import('@fingerprintjs/fingerprintjs').then(({ load }) => load()).then((fp) => fp.get()).then((result) => {
25
+ const fingerprint = result.visitorId;
26
+ createId = cuid2.init({
27
+ length: 16,
28
+ fingerprint
29
+ });
30
+ }).catch((error) => {
31
+ console.error("Failed to initialize fingerprint:", error);
32
+ });
33
+ }
34
+ function generateId() {
35
+ return createId();
36
+ }
37
+
38
+ exports.generateId = generateId;
@@ -0,0 +1,86 @@
1
+ /*! @vef-framework/shared v2.0.0 made with ❤️ by Venus | 2025-11-25T10:06:28.916Z */
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ const chrono = require('./chrono.cjs');
7
+ const equal = require('./equal.cjs');
8
+ const error = require('./error.cjs');
9
+ const event = require('./event.cjs');
10
+ const format = require('./format.cjs');
11
+ const _function = require('./function.cjs');
12
+ const id = require('./id.cjs');
13
+ const key = require('./key.cjs');
14
+ const lib = require('./lib.cjs');
15
+ const object = require('./object.cjs');
16
+ const path = require('./path.cjs');
17
+ const pinyin = require('./pinyin.cjs');
18
+ const security = require('./security.cjs');
19
+ const string = require('./string.cjs');
20
+ const task = require('./task.cjs');
21
+ const tree = require('./tree.cjs');
22
+ require('./zod.cjs');
23
+
24
+
25
+
26
+ exports.DEFAULT_DATETIME_FORMAT = chrono.DEFAULT_DATETIME_FORMAT;
27
+ exports.DEFAULT_DATE_FORMAT = chrono.DEFAULT_DATE_FORMAT;
28
+ exports.DEFAULT_TIME_FORMAT = chrono.DEFAULT_TIME_FORMAT;
29
+ exports.LOCALIZED_DATETIME_FORMAT = chrono.LOCALIZED_DATETIME_FORMAT;
30
+ exports.LOCALIZED_DATE_FORMAT = chrono.LOCALIZED_DATE_FORMAT;
31
+ exports.formatDate = chrono.formatDate;
32
+ exports.formatDuration = chrono.formatDuration;
33
+ exports.getLocalizedDateTime = chrono.getLocalizedDateTime;
34
+ exports.getNow = chrono.getNow;
35
+ exports.getNowDateString = chrono.getNowDateString;
36
+ exports.getNowDateTimeString = chrono.getNowDateTimeString;
37
+ exports.getNowTimeString = chrono.getNowTimeString;
38
+ exports.getTemporalFormats = chrono.getTemporalFormats;
39
+ exports.parseDate = chrono.parseDate;
40
+ exports.tryParseDate = chrono.tryParseDate;
41
+ exports.isDeepEqual = equal.isDeepEqual;
42
+ exports.isShallowEqual = equal.isShallowEqual;
43
+ exports.filterUserFrame = error.filterUserFrame;
44
+ exports.getCurrentStack = error.getCurrentStack;
45
+ exports.getCurrentStackSync = error.getCurrentStackSync;
46
+ exports.getSanitizedErrorStack = error.getSanitizedErrorStack;
47
+ exports.parseErrorStack = error.parseErrorStack;
48
+ exports.EventEmitter = event.EventEmitter;
49
+ exports.createEventEmitter = event.createEventEmitter;
50
+ exports.formatBytes = format.formatBytes;
51
+ exports.formatNumber = format.formatNumber;
52
+ exports.createThrowNotImplementedFn = _function.createThrowNotImplementedFn;
53
+ exports.identity = _function.identity;
54
+ exports.invokeAwaitableFn = _function.invokeAwaitableFn;
55
+ exports.isAsyncFunction = _function.isAsyncFunction;
56
+ exports.throwNotImplemented = _function.throwNotImplemented;
57
+ exports.generateId = id.generateId;
58
+ exports.hashKey = key.hashKey;
59
+ exports.alwaysFalse = lib.alwaysFalse;
60
+ exports.alwaysTrue = lib.alwaysTrue;
61
+ exports.mergeWith = object.mergeWith;
62
+ exports.formatPath = path.formatPath;
63
+ exports.getBaseName = path.getBaseName;
64
+ exports.getDirName = path.getDirName;
65
+ exports.getExtName = path.getExtName;
66
+ exports.getRelativePath = path.getRelativePath;
67
+ exports.isAbsolutePath = path.isAbsolutePath;
68
+ exports.joinPaths = path.joinPaths;
69
+ exports.normalizePath = path.normalizePath;
70
+ exports.parsePath = path.parsePath;
71
+ exports.pathSeparator = path.pathSeparator;
72
+ exports.resolvePath = path.resolvePath;
73
+ exports.getPinyin = pinyin.getPinyin;
74
+ exports.getPinyinInitials = pinyin.getPinyinInitials;
75
+ exports.withPinyin = pinyin.withPinyin;
76
+ exports.decryptUsingRSA = security.decryptUsingRSA;
77
+ exports.encryptUsingRSA = security.encryptUsingRSA;
78
+ exports.constantCase = string.constantCase;
79
+ exports.scheduleMicrotask = task.scheduleMicrotask;
80
+ exports.buildTree = tree.buildTree;
81
+ exports.filterTree = tree.filterTree;
82
+ exports.filterTreeWithAncestors = tree.filterTreeWithAncestors;
83
+ exports.findNodeInTree = tree.findNodeInTree;
84
+ exports.flattenTree = tree.flattenTree;
85
+ exports.mapTree = tree.mapTree;
86
+ exports.traverseTree = tree.traverseTree;
@@ -0,0 +1,34 @@
1
+ /*! @vef-framework/shared v2.0.0 made with ❤️ by Venus | 2025-11-25T10:06:28.916Z */
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ require('./lib.cjs');
7
+ const radashi = require('radashi');
8
+
9
+ function hashKey(key) {
10
+ return JSON.stringify(
11
+ key,
12
+ (_, value) => {
13
+ if (radashi.isPlainObject(value)) {
14
+ const stringKeys = Object.keys(value).toSorted();
15
+ const symbolKeys = Object.getOwnPropertySymbols(value);
16
+ const result = {};
17
+ for (const key2 of stringKeys) {
18
+ result[key2] = value[key2];
19
+ }
20
+ const symbolResult = {};
21
+ for (const sym of symbolKeys) {
22
+ symbolResult[sym.toString()] = value[sym];
23
+ }
24
+ for (const key2 of Object.keys(symbolResult).toSorted()) {
25
+ result[`@@${key2}`] = symbolResult[key2];
26
+ }
27
+ return result;
28
+ }
29
+ return value;
30
+ }
31
+ );
32
+ }
33
+
34
+ exports.hashKey = hashKey;
@@ -0,0 +1,234 @@
1
+ /*! @vef-framework/shared v2.0.0 made with ❤️ by Venus | 2025-11-25T10:06:28.916Z */
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ const radashi = require('radashi');
7
+ const klona = require('klona');
8
+ const qs = require('qs');
9
+
10
+ const alwaysTrue = radashi.always(true);
11
+ const alwaysFalse = radashi.always(false);
12
+
13
+ Object.defineProperty(exports, "always", {
14
+ enumerable: true,
15
+ get: () => radashi.always
16
+ });
17
+ Object.defineProperty(exports, "assign", {
18
+ enumerable: true,
19
+ get: () => radashi.assign
20
+ });
21
+ Object.defineProperty(exports, "camelCase", {
22
+ enumerable: true,
23
+ get: () => radashi.camel
24
+ });
25
+ Object.defineProperty(exports, "capitalize", {
26
+ enumerable: true,
27
+ get: () => radashi.capitalize
28
+ });
29
+ Object.defineProperty(exports, "cluster", {
30
+ enumerable: true,
31
+ get: () => radashi.cluster
32
+ });
33
+ Object.defineProperty(exports, "debounce", {
34
+ enumerable: true,
35
+ get: () => radashi.debounce
36
+ });
37
+ Object.defineProperty(exports, "first", {
38
+ enumerable: true,
39
+ get: () => radashi.first
40
+ });
41
+ Object.defineProperty(exports, "get", {
42
+ enumerable: true,
43
+ get: () => radashi.get
44
+ });
45
+ Object.defineProperty(exports, "isArray", {
46
+ enumerable: true,
47
+ get: () => radashi.isArray
48
+ });
49
+ Object.defineProperty(exports, "isBigInt", {
50
+ enumerable: true,
51
+ get: () => radashi.isBigInt
52
+ });
53
+ Object.defineProperty(exports, "isBoolean", {
54
+ enumerable: true,
55
+ get: () => radashi.isBoolean
56
+ });
57
+ Object.defineProperty(exports, "isDate", {
58
+ enumerable: true,
59
+ get: () => radashi.isDate
60
+ });
61
+ Object.defineProperty(exports, "isEmpty", {
62
+ enumerable: true,
63
+ get: () => radashi.isEmpty
64
+ });
65
+ Object.defineProperty(exports, "isError", {
66
+ enumerable: true,
67
+ get: () => radashi.isError
68
+ });
69
+ Object.defineProperty(exports, "isFloat", {
70
+ enumerable: true,
71
+ get: () => radashi.isFloat
72
+ });
73
+ Object.defineProperty(exports, "isFunction", {
74
+ enumerable: true,
75
+ get: () => radashi.isFunction
76
+ });
77
+ Object.defineProperty(exports, "isInt", {
78
+ enumerable: true,
79
+ get: () => radashi.isInt
80
+ });
81
+ Object.defineProperty(exports, "isIntString", {
82
+ enumerable: true,
83
+ get: () => radashi.isIntString
84
+ });
85
+ Object.defineProperty(exports, "isMap", {
86
+ enumerable: true,
87
+ get: () => radashi.isMap
88
+ });
89
+ Object.defineProperty(exports, "isNullish", {
90
+ enumerable: true,
91
+ get: () => radashi.isNullish
92
+ });
93
+ Object.defineProperty(exports, "isNumber", {
94
+ enumerable: true,
95
+ get: () => radashi.isNumber
96
+ });
97
+ Object.defineProperty(exports, "isObject", {
98
+ enumerable: true,
99
+ get: () => radashi.isObject
100
+ });
101
+ Object.defineProperty(exports, "isPlainObject", {
102
+ enumerable: true,
103
+ get: () => radashi.isPlainObject
104
+ });
105
+ Object.defineProperty(exports, "isPrimitive", {
106
+ enumerable: true,
107
+ get: () => radashi.isPrimitive
108
+ });
109
+ Object.defineProperty(exports, "isPromise", {
110
+ enumerable: true,
111
+ get: () => radashi.isPromise
112
+ });
113
+ Object.defineProperty(exports, "isRegExp", {
114
+ enumerable: true,
115
+ get: () => radashi.isRegExp
116
+ });
117
+ Object.defineProperty(exports, "isSet", {
118
+ enumerable: true,
119
+ get: () => radashi.isSet
120
+ });
121
+ Object.defineProperty(exports, "isString", {
122
+ enumerable: true,
123
+ get: () => radashi.isString
124
+ });
125
+ Object.defineProperty(exports, "isSymbol", {
126
+ enumerable: true,
127
+ get: () => radashi.isSymbol
128
+ });
129
+ Object.defineProperty(exports, "isUndefined", {
130
+ enumerable: true,
131
+ get: () => radashi.isUndefined
132
+ });
133
+ Object.defineProperty(exports, "isWeakMap", {
134
+ enumerable: true,
135
+ get: () => radashi.isWeakMap
136
+ });
137
+ Object.defineProperty(exports, "isWeakSet", {
138
+ enumerable: true,
139
+ get: () => radashi.isWeakSet
140
+ });
141
+ Object.defineProperty(exports, "kebabCase", {
142
+ enumerable: true,
143
+ get: () => radashi.dash
144
+ });
145
+ Object.defineProperty(exports, "last", {
146
+ enumerable: true,
147
+ get: () => radashi.last
148
+ });
149
+ Object.defineProperty(exports, "max", {
150
+ enumerable: true,
151
+ get: () => radashi.max
152
+ });
153
+ Object.defineProperty(exports, "memoize", {
154
+ enumerable: true,
155
+ get: () => radashi.memo
156
+ });
157
+ Object.defineProperty(exports, "min", {
158
+ enumerable: true,
159
+ get: () => radashi.min
160
+ });
161
+ Object.defineProperty(exports, "noop", {
162
+ enumerable: true,
163
+ get: () => radashi.noop
164
+ });
165
+ Object.defineProperty(exports, "omit", {
166
+ enumerable: true,
167
+ get: () => radashi.omit
168
+ });
169
+ Object.defineProperty(exports, "once", {
170
+ enumerable: true,
171
+ get: () => radashi.once
172
+ });
173
+ Object.defineProperty(exports, "pascalCase", {
174
+ enumerable: true,
175
+ get: () => radashi.pascal
176
+ });
177
+ Object.defineProperty(exports, "pick", {
178
+ enumerable: true,
179
+ get: () => radashi.pick
180
+ });
181
+ Object.defineProperty(exports, "set", {
182
+ enumerable: true,
183
+ get: () => radashi.set
184
+ });
185
+ Object.defineProperty(exports, "similarity", {
186
+ enumerable: true,
187
+ get: () => radashi.similarity
188
+ });
189
+ Object.defineProperty(exports, "snakeCase", {
190
+ enumerable: true,
191
+ get: () => radashi.snake
192
+ });
193
+ Object.defineProperty(exports, "sum", {
194
+ enumerable: true,
195
+ get: () => radashi.sum
196
+ });
197
+ Object.defineProperty(exports, "template", {
198
+ enumerable: true,
199
+ get: () => radashi.template
200
+ });
201
+ Object.defineProperty(exports, "throttle", {
202
+ enumerable: true,
203
+ get: () => radashi.throttle
204
+ });
205
+ Object.defineProperty(exports, "toFloat", {
206
+ enumerable: true,
207
+ get: () => radashi.toFloat
208
+ });
209
+ Object.defineProperty(exports, "toInt", {
210
+ enumerable: true,
211
+ get: () => radashi.toInt
212
+ });
213
+ Object.defineProperty(exports, "trim", {
214
+ enumerable: true,
215
+ get: () => radashi.trim
216
+ });
217
+ Object.defineProperty(exports, "unique", {
218
+ enumerable: true,
219
+ get: () => radashi.unique
220
+ });
221
+ Object.defineProperty(exports, "cloneDeep", {
222
+ enumerable: true,
223
+ get: () => klona.klona
224
+ });
225
+ Object.defineProperty(exports, "decodeQueryString", {
226
+ enumerable: true,
227
+ get: () => qs.parse
228
+ });
229
+ Object.defineProperty(exports, "encodeQueryString", {
230
+ enumerable: true,
231
+ get: () => qs.stringify
232
+ });
233
+ exports.alwaysFalse = alwaysFalse;
234
+ exports.alwaysTrue = alwaysTrue;
@@ -0,0 +1,20 @@
1
+ /*! @vef-framework/shared v2.0.0 made with ❤️ by Venus | 2025-11-25T10:06:28.916Z */
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ require('./lib.cjs');
7
+ const radashi = require('radashi');
8
+
9
+ function mergeWith(target, source, overrideExisting = false) {
10
+ const validEntries = Object.entries(source).filter(([_, value]) => !radashi.isUndefined(value));
11
+ for (const [key, value] of validEntries) {
12
+ const targetKey = key;
13
+ if (overrideExisting || radashi.isUndefined(target[targetKey])) {
14
+ target[targetKey] = value;
15
+ }
16
+ }
17
+ return target;
18
+ }
19
+
20
+ exports.mergeWith = mergeWith;
@@ -0,0 +1,63 @@
1
+ /*! @vef-framework/shared v2.0.0 made with ❤️ by Venus | 2025-11-25T10:06:28.916Z */
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ const path = require('path-browserify');
7
+
8
+ const {
9
+ basename,
10
+ dirname,
11
+ extname,
12
+ isAbsolute,
13
+ join,
14
+ normalize,
15
+ parse,
16
+ relative,
17
+ resolve,
18
+ format,
19
+ sep: pathSeparator
20
+ } = path;
21
+ function getBaseName(path2, keepExt = true) {
22
+ const ext = keepExt ? void 0 : extname(path2);
23
+ return basename(path2, ext);
24
+ }
25
+ function getExtName(path2) {
26
+ return extname(path2);
27
+ }
28
+ function getDirName(path2) {
29
+ return dirname(path2);
30
+ }
31
+ function joinPaths(...paths) {
32
+ return join(...paths);
33
+ }
34
+ function isAbsolutePath(path2) {
35
+ return isAbsolute(path2);
36
+ }
37
+ function normalizePath(path2) {
38
+ return normalize(path2);
39
+ }
40
+ function parsePath(path2) {
41
+ return parse(path2);
42
+ }
43
+ function formatPath(pathObject) {
44
+ return format(pathObject);
45
+ }
46
+ function getRelativePath(from, to) {
47
+ return relative(from, to);
48
+ }
49
+ function resolvePath(...pathSegments) {
50
+ return resolve(...pathSegments);
51
+ }
52
+
53
+ exports.formatPath = formatPath;
54
+ exports.getBaseName = getBaseName;
55
+ exports.getDirName = getDirName;
56
+ exports.getExtName = getExtName;
57
+ exports.getRelativePath = getRelativePath;
58
+ exports.isAbsolutePath = isAbsolutePath;
59
+ exports.joinPaths = joinPaths;
60
+ exports.normalizePath = normalizePath;
61
+ exports.parsePath = parsePath;
62
+ exports.pathSeparator = pathSeparator;
63
+ exports.resolvePath = resolvePath;