@vef-framework/shared 2.0.11 → 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.
Files changed (115) hide show
  1. package/dist/cjs/_internal/_rolldown/runtime.cjs +1 -0
  2. package/dist/cjs/color/color-ops.cjs +1 -1
  3. package/dist/cjs/color/index.cjs +1 -1
  4. package/dist/cjs/color/name.cjs +1 -1
  5. package/dist/cjs/color/palette.cjs +1 -1
  6. package/dist/cjs/constants/color-names.cjs +1 -1
  7. package/dist/cjs/constants/color-palettes.cjs +1 -1
  8. package/dist/cjs/constants/index.cjs +1 -1
  9. package/dist/cjs/index.cjs +1 -1
  10. package/dist/cjs/types/color.cjs +0 -1
  11. package/dist/cjs/types/common.cjs +0 -1
  12. package/dist/cjs/types/deep-keys.cjs +0 -1
  13. package/dist/cjs/types/index.cjs +0 -1
  14. package/dist/cjs/utils/chrono.cjs +1 -1
  15. package/dist/cjs/utils/equal.cjs +1 -1
  16. package/dist/cjs/utils/error.cjs +2 -3
  17. package/dist/cjs/utils/event.cjs +1 -1
  18. package/dist/cjs/utils/format.cjs +1 -1
  19. package/dist/cjs/utils/function.cjs +1 -1
  20. package/dist/cjs/utils/id.cjs +1 -1
  21. package/dist/cjs/utils/index.cjs +1 -1
  22. package/dist/cjs/utils/key.cjs +1 -1
  23. package/dist/cjs/utils/lib.cjs +1 -1
  24. package/dist/cjs/utils/object.cjs +1 -1
  25. package/dist/cjs/utils/path.cjs +1 -1
  26. package/dist/cjs/utils/pinyin.cjs +1 -1
  27. package/dist/cjs/utils/security.cjs +1 -1
  28. package/dist/cjs/utils/string.cjs +1 -1
  29. package/dist/cjs/utils/table.cjs +1 -1
  30. package/dist/cjs/utils/task.cjs +1 -1
  31. package/dist/cjs/utils/tree.cjs +1 -1
  32. package/dist/cjs/utils/zod.cjs +1 -1
  33. package/dist/es/color/color-ops.js +55 -68
  34. package/dist/es/color/index.js +4 -18
  35. package/dist/es/color/name.js +25 -27
  36. package/dist/es/color/palette.js +70 -82
  37. package/dist/es/constants/color-names.js +1572 -1572
  38. package/dist/es/constants/color-palettes.js +1085 -360
  39. package/dist/es/constants/index.js +3 -8
  40. package/dist/es/index.js +25 -167
  41. package/dist/es/types/color.js +1 -1
  42. package/dist/es/types/common.js +1 -1
  43. package/dist/es/types/deep-keys.js +1 -1
  44. package/dist/es/types/index.js +1 -3
  45. package/dist/es/utils/chrono.js +77 -92
  46. package/dist/es/utils/equal.js +83 -118
  47. package/dist/es/utils/error.js +27 -29
  48. package/dist/es/utils/event.js +27 -51
  49. package/dist/es/utils/format.js +27 -18
  50. package/dist/es/utils/function.js +26 -36
  51. package/dist/es/utils/id.js +21 -21
  52. package/dist/es/utils/index.js +18 -81
  53. package/dist/es/utils/key.js +17 -23
  54. package/dist/es/utils/lib.js +8 -64
  55. package/dist/es/utils/object.js +12 -12
  56. package/dist/es/utils/path.js +37 -58
  57. package/dist/es/utils/pinyin.js +41 -43
  58. package/dist/es/utils/security.js +73 -31
  59. package/dist/es/utils/string.js +19 -7
  60. package/dist/es/utils/table.js +13 -13
  61. package/dist/es/utils/task.js +6 -7
  62. package/dist/es/utils/tree.js +159 -181
  63. package/dist/es/utils/zod.js +7 -7
  64. package/dist/types/constants/color-names.d.ts +2 -2
  65. package/dist/types/constants/color-palettes.d.ts +2 -2
  66. package/dist/types/src/color/color-ops.d.ts +84 -0
  67. package/dist/types/src/color/index.d.ts +3 -0
  68. package/dist/types/src/color/name.d.ts +7 -0
  69. package/dist/types/src/color/palette.d.ts +8 -0
  70. package/dist/types/src/constants/color-names.d.ts +11 -0
  71. package/dist/types/src/constants/color-palettes.d.ts +823 -0
  72. package/dist/types/src/constants/index.d.ts +2 -0
  73. package/dist/types/src/index.d.ts +4 -0
  74. package/dist/types/src/types/color.d.ts +25 -0
  75. package/dist/types/src/types/common.d.ts +29 -0
  76. package/dist/types/src/types/deep-keys.d.ts +37 -0
  77. package/dist/types/src/types/index.d.ts +3 -0
  78. package/dist/types/src/utils/chrono.d.ts +152 -0
  79. package/dist/types/src/utils/equal.d.ts +16 -0
  80. package/dist/types/src/utils/error.d.ts +22 -0
  81. package/dist/types/src/utils/event.d.ts +46 -0
  82. package/dist/types/src/utils/format.d.ts +31 -0
  83. package/dist/types/src/utils/function.d.ts +27 -0
  84. package/dist/types/src/utils/id.d.ts +6 -0
  85. package/dist/types/src/utils/index.d.ts +18 -0
  86. package/dist/types/src/utils/key.d.ts +5 -0
  87. package/dist/types/src/utils/lib.d.ts +5 -0
  88. package/dist/types/src/utils/object.d.ts +9 -0
  89. package/dist/types/src/utils/path.d.ts +13 -0
  90. package/dist/types/src/utils/pinyin.d.ts +40 -0
  91. package/dist/types/src/utils/security.d.ts +60 -0
  92. package/dist/types/src/utils/string.d.ts +15 -0
  93. package/dist/types/src/utils/table.d.ts +25 -0
  94. package/dist/types/src/utils/task.d.ts +4 -0
  95. package/dist/types/src/utils/tree.d.ts +216 -0
  96. package/dist/types/src/utils/zod.d.ts +2 -0
  97. package/dist/types/types/color.d.ts +1 -49
  98. package/dist/types/types/common.d.ts +7 -3
  99. package/dist/types/types/deep-keys.d.ts +28 -0
  100. package/dist/types/utils/chrono.d.ts +3 -13
  101. package/dist/types/utils/error.d.ts +5 -21
  102. package/dist/types/utils/event.d.ts +9 -31
  103. package/dist/types/utils/format.d.ts +0 -2
  104. package/dist/types/utils/function.d.ts +4 -36
  105. package/dist/types/utils/id.d.ts +2 -2
  106. package/dist/types/utils/key.d.ts +2 -4
  107. package/dist/types/utils/path.d.ts +7 -70
  108. package/dist/types/utils/pinyin.d.ts +2 -3
  109. package/dist/types/utils/security.d.ts +44 -2
  110. package/dist/types/utils/string.d.ts +8 -0
  111. package/dist/types/utils/table.d.ts +1 -0
  112. package/dist/types/utils/task.d.ts +1 -3
  113. package/dist/types/utils/tree.d.ts +8 -0
  114. package/dist/types/utils/zod.d.ts +1 -0
  115. package/package.json +13 -13
@@ -1,8 +1,3 @@
1
- import { colorEntries as e, colorNameMap as t } from "./color-names.js";
2
- import { colorPaletteMap as a, colorPalettes as c } from "./color-palettes.js";
3
- export {
4
- e as colorEntries,
5
- t as colorNameMap,
6
- a as colorPaletteMap,
7
- c as colorPalettes
8
- };
1
+ /*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
2
+ import "./color-names.js";
3
+ import "./color-palettes.js";
package/dist/es/index.js CHANGED
@@ -1,167 +1,25 @@
1
- import "./color/index.js";
2
- import "./constants/index.js";
3
- import "./types/index.js";
4
- import "./utils/index.js";
5
- import { convertHslToHex as s, convertTransparentToOpaque as m, getColorDifference as n, isValidColor as l, isWhiteColor as p, mixColor as f, setColorAlpha as c, toHexColor as g, toHslColor as x, toHsvColor as T, toRgbColor as E } from "./color/color-ops.js";
6
- import { getColorName as u } from "./color/name.js";
7
- import { getColorPalette as A } from "./color/palette.js";
8
- import { colorEntries as D, colorNameMap as C } from "./constants/color-names.js";
9
- import { colorPaletteMap as F, colorPalettes as P } from "./constants/color-palettes.js";
10
- import { DEFAULT_DATETIME_FORMAT as I, DEFAULT_DATE_FORMAT as k, DEFAULT_TIME_FORMAT as M, LOCALIZED_DATETIME_FORMAT as b, LOCALIZED_DATE_FORMAT as w, formatDate as v, formatDuration as O, getLocalizedDateTime as R, getNow as _, getNowDateString as L, getNowDateTimeString as U, getNowTimeString as z, getTemporalFormats as B, parseDate as H, tryParseDate as W } from "./utils/chrono.js";
11
- import { isDeepEqual as j, isShallowEqual as K } from "./utils/equal.js";
12
- import { filterUserFrame as Z, getCurrentStack as V, getCurrentStackSync as G, getSanitizedErrorStack as J, parseErrorStack as X } from "./utils/error.js";
13
- import { EventEmitter as $, createEventEmitter as ee } from "./utils/event.js";
14
- import { formatBytes as re, formatNumber as oe } from "./utils/format.js";
15
- import { createThrowNotImplementedFn as ie, identity as se, invokeAwaitableFn as me, isAsyncFunction as ne, throwNotImplemented as le } from "./utils/function.js";
16
- import { generateId as fe } from "./utils/id.js";
17
- import { hashKey as ge } from "./utils/key.js";
18
- import { klona as Te } from "klona";
19
- import { parse as he, stringify as ue } from "qs";
20
- import { always as Ae, assign as de, camel as De, capitalize as Ce, cluster as Se, debounce as Fe, first as Pe, get as Ne, isArray as Ie, isBigInt as ke, isBoolean as Me, isDate as be, isEmpty as we, isError as ve, isFloat as Oe, isFunction as Re, isInt as _e, isIntString as Le, isMap as Ue, isNullish as ze, isNumber as Be, isObject as He, isPlainObject as We, isPrimitive as qe, isPromise as je, isRegExp as Ke, isSet as Qe, isString as Ze, isSymbol as Ve, isUndefined as Ge, isWeakMap as Je, isWeakSet as Xe, dash as Ye, last as $e, max as et, memo as tt, min as rt, noop as ot, omit as at, once as it, pascal as st, pick as mt, set as nt, similarity as lt, snake as pt, sum as ft, template as ct, throttle as gt, toFloat as xt, toInt as Tt, trim as Et, unique as ht } from "radashi";
21
- import { alwaysFalse as yt, alwaysTrue as At } from "./utils/lib.js";
22
- import { mergeWith as Dt } from "./utils/object.js";
23
- import { formatPath as St, getBaseName as Ft, getDirName as Pt, getExtName as Nt, getRelativePath as It, isAbsolutePath as kt, joinPaths as Mt, normalizePath as bt, parsePath as wt, pathSeparator as vt, resolvePath as Ot } from "./utils/path.js";
24
- import { getPinyin as _t, getPinyinInitials as Lt, withPinyin as Ut } from "./utils/pinyin.js";
25
- import { decryptUsingRSA as Bt, encryptUsingRSA as Ht } from "./utils/security.js";
26
- import { constantCase as qt } from "./utils/string.js";
27
- import { shouldUpdateByKeys as Kt } from "./utils/table.js";
28
- import { scheduleMicrotask as Zt } from "./utils/task.js";
29
- import { buildTree as Gt, filterTree as Jt, filterTreeWithAncestors as Xt, findNodeInTree as Yt, flattenTree as $t, mapTree as er, traverseTree as tr } from "./utils/tree.js";
30
- import { z as or } from "zod";
31
- export {
32
- I as DEFAULT_DATETIME_FORMAT,
33
- k as DEFAULT_DATE_FORMAT,
34
- M as DEFAULT_TIME_FORMAT,
35
- $ as EventEmitter,
36
- b as LOCALIZED_DATETIME_FORMAT,
37
- w as LOCALIZED_DATE_FORMAT,
38
- Ae as always,
39
- yt as alwaysFalse,
40
- At as alwaysTrue,
41
- de as assign,
42
- Gt as buildTree,
43
- De as camelCase,
44
- Ce as capitalize,
45
- Te as cloneDeep,
46
- Se as cluster,
47
- D as colorEntries,
48
- C as colorNameMap,
49
- F as colorPaletteMap,
50
- P as colorPalettes,
51
- qt as constantCase,
52
- s as convertHslToHex,
53
- m as convertTransparentToOpaque,
54
- ee as createEventEmitter,
55
- ie as createThrowNotImplementedFn,
56
- Fe as debounce,
57
- he as decodeQueryString,
58
- Bt as decryptUsingRSA,
59
- ue as encodeQueryString,
60
- Ht as encryptUsingRSA,
61
- Jt as filterTree,
62
- Xt as filterTreeWithAncestors,
63
- Z as filterUserFrame,
64
- Yt as findNodeInTree,
65
- Pe as first,
66
- $t as flattenTree,
67
- re as formatBytes,
68
- v as formatDate,
69
- O as formatDuration,
70
- oe as formatNumber,
71
- St as formatPath,
72
- fe as generateId,
73
- Ne as get,
74
- Ft as getBaseName,
75
- n as getColorDifference,
76
- u as getColorName,
77
- A as getColorPalette,
78
- V as getCurrentStack,
79
- G as getCurrentStackSync,
80
- Pt as getDirName,
81
- Nt as getExtName,
82
- R as getLocalizedDateTime,
83
- _ as getNow,
84
- L as getNowDateString,
85
- U as getNowDateTimeString,
86
- z as getNowTimeString,
87
- _t as getPinyin,
88
- Lt as getPinyinInitials,
89
- It as getRelativePath,
90
- J as getSanitizedErrorStack,
91
- B as getTemporalFormats,
92
- ge as hashKey,
93
- se as identity,
94
- me as invokeAwaitableFn,
95
- kt as isAbsolutePath,
96
- Ie as isArray,
97
- ne as isAsyncFunction,
98
- ke as isBigInt,
99
- Me as isBoolean,
100
- be as isDate,
101
- j as isDeepEqual,
102
- we as isEmpty,
103
- ve as isError,
104
- Oe as isFloat,
105
- Re as isFunction,
106
- _e as isInt,
107
- Le as isIntString,
108
- Ue as isMap,
109
- ze as isNullish,
110
- Be as isNumber,
111
- He as isObject,
112
- We as isPlainObject,
113
- qe as isPrimitive,
114
- je as isPromise,
115
- Ke as isRegExp,
116
- Qe as isSet,
117
- K as isShallowEqual,
118
- Ze as isString,
119
- Ve as isSymbol,
120
- Ge as isUndefined,
121
- l as isValidColor,
122
- Je as isWeakMap,
123
- Xe as isWeakSet,
124
- p as isWhiteColor,
125
- Mt as joinPaths,
126
- Ye as kebabCase,
127
- $e as last,
128
- er as mapTree,
129
- et as max,
130
- tt as memoize,
131
- Dt as mergeWith,
132
- rt as min,
133
- f as mixColor,
134
- ot as noop,
135
- bt as normalizePath,
136
- at as omit,
137
- it as once,
138
- H as parseDate,
139
- X as parseErrorStack,
140
- wt as parsePath,
141
- st as pascalCase,
142
- vt as pathSeparator,
143
- mt as pick,
144
- Ot as resolvePath,
145
- Zt as scheduleMicrotask,
146
- nt as set,
147
- c as setColorAlpha,
148
- Kt as shouldUpdateByKeys,
149
- lt as similarity,
150
- pt as snakeCase,
151
- ft as sum,
152
- ct as template,
153
- gt as throttle,
154
- le as throwNotImplemented,
155
- xt as toFloat,
156
- g as toHexColor,
157
- x as toHslColor,
158
- T as toHsvColor,
159
- Tt as toInt,
160
- E as toRgbColor,
161
- tr as traverseTree,
162
- Et as trim,
163
- W as tryParseDate,
164
- ht as unique,
165
- Ut as withPinyin,
166
- or as z
167
- };
1
+ /*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
2
+ import { convertHslToHex as e, convertTransparentToOpaque as t, getColorDifference as n, isValidColor as r, isWhiteColor as i, mixColor as a, setColorAlpha as o, toHexColor as s, toHslColor as c, toHsvColor as l, toRgbColor as u } from "./color/color-ops.js";
3
+ import { colorEntries as d, colorNameMap as f } from "./constants/color-names.js";
4
+ import { DEFAULT_DATETIME_FORMAT as p, DEFAULT_DATE_FORMAT as m, DEFAULT_TIME_FORMAT as h, LOCALIZED_DATETIME_FORMAT as g, LOCALIZED_DATE_FORMAT as _, formatDate as v, formatDuration as y, getLocalizedDateTime as b, getNow as x, getNowDateString as S, getNowDateTimeString as C, getNowTimeString as w, getTemporalFormats as T, parseDate as E, tryParseDate as D } from "./utils/chrono.js";
5
+ import { isDeepEqual as O, isShallowEqual as k } from "./utils/equal.js";
6
+ import { formatPath as A, getBaseName as j, getDirName as M, getExtName as N, getRelativePath as P, isAbsolutePath as F, joinPaths as I, normalizePath as L, parsePath as R, pathSeparator as z, resolvePath as B } from "./utils/path.js";
7
+ import { filterUserFrame as V, getCurrentStack as H, getCurrentStackSync as U, getSanitizedErrorStack as W, parseErrorStack as G } from "./utils/error.js";
8
+ import { EventEmitter as K, createEventEmitter as q } from "./utils/event.js";
9
+ import { formatBytes as J, formatNumber as Y } from "./utils/format.js";
10
+ import { createThrowNotImplementedFn as X, identity as Z, invokeAwaitableFn as Q, isAsyncFunction as $, throwNotImplemented as ee } from "./utils/function.js";
11
+ import { generateId as te } from "./utils/id.js";
12
+ import { always as ne, alwaysFalse as re, alwaysTrue as ie, assign as ae, camelCase as oe, capitalize as se, cloneDeep as ce, cluster as le, debounce as ue, decodeQueryString as de, encodeQueryString as fe, first as pe, get as me, isArray as he, isBigInt as ge, isBoolean as _e, isDate as ve, isEmpty as ye, isError as be, isFloat as xe, isFunction as Se, isInt as Ce, isIntString as we, isMap as Te, isNullish as Ee, isNumber as De, isObject as Oe, isPlainObject as ke, isPrimitive as Ae, isPromise as je, isRegExp as Me, isSet as Ne, isString as Pe, isSymbol as Fe, isUndefined as Ie, isWeakMap as Le, isWeakSet as Re, kebabCase as ze, last as Be, max as Ve, memoize as He, min as Ue, noop as We, omit as Ge, once as Ke, pascalCase as qe, pick as Je, set as Ye, similarity as Xe, snakeCase as Ze, sum as Qe, template as $e, throttle as et, toFloat as tt, toInt as nt, trim as rt, unique as it } from "./utils/lib.js";
13
+ import { hashKey as at } from "./utils/key.js";
14
+ import { mergeWith as ot } from "./utils/object.js";
15
+ import { getPinyin as st, getPinyinInitials as ct, withPinyin as lt } from "./utils/pinyin.js";
16
+ import { decryptUsingRSA as ut, encryptUsingRSA as dt, obfuscateDecode as ft, obfuscateDecodeFromBase64 as pt, obfuscateDecodeFromHex as mt, obfuscateEncode as ht, obfuscateEncodeToBase64 as gt, obfuscateEncodeToHex as _t } from "./utils/security.js";
17
+ import { constantCase as vt, stringify as yt } from "./utils/string.js";
18
+ import { shouldUpdateByKeys as bt } from "./utils/table.js";
19
+ import { scheduleMicrotask as xt } from "./utils/task.js";
20
+ import { buildTree as St, filterTree as Ct, filterTreeWithAncestors as wt, findNodeInTree as Tt, flattenTree as Et, mapTree as Dt, traverseTree as Ot } from "./utils/tree.js";
21
+ import { z as kt } from "./utils/zod.js";
22
+ import { colorPaletteMap as At, colorPalettes as jt } from "./constants/color-palettes.js";
23
+ import { getColorName as Mt } from "./color/name.js";
24
+ import { getColorPalette as Nt } from "./color/palette.js";
25
+ export { p as DEFAULT_DATETIME_FORMAT, m as DEFAULT_DATE_FORMAT, h as DEFAULT_TIME_FORMAT, K as EventEmitter, g as LOCALIZED_DATETIME_FORMAT, _ as LOCALIZED_DATE_FORMAT, ne as always, re as alwaysFalse, ie as alwaysTrue, ae as assign, St as buildTree, oe as camelCase, se as capitalize, ce as cloneDeep, le as cluster, d as colorEntries, f as colorNameMap, At as colorPaletteMap, jt as colorPalettes, vt as constantCase, e as convertHslToHex, t as convertTransparentToOpaque, q as createEventEmitter, X as createThrowNotImplementedFn, ue as debounce, de as decodeQueryString, ut as decryptUsingRSA, fe as encodeQueryString, dt as encryptUsingRSA, Ct as filterTree, wt as filterTreeWithAncestors, V as filterUserFrame, Tt as findNodeInTree, pe as first, Et as flattenTree, J as formatBytes, v as formatDate, y as formatDuration, Y as formatNumber, A as formatPath, te as generateId, me as get, j as getBaseName, n as getColorDifference, Mt as getColorName, Nt as getColorPalette, H as getCurrentStack, U as getCurrentStackSync, M as getDirName, N as getExtName, b as getLocalizedDateTime, x as getNow, S as getNowDateString, C as getNowDateTimeString, w as getNowTimeString, st as getPinyin, ct as getPinyinInitials, P as getRelativePath, W as getSanitizedErrorStack, T as getTemporalFormats, at as hashKey, Z as identity, Q as invokeAwaitableFn, F as isAbsolutePath, he as isArray, $ as isAsyncFunction, ge as isBigInt, _e as isBoolean, ve as isDate, O as isDeepEqual, ye as isEmpty, be as isError, xe as isFloat, Se as isFunction, Ce as isInt, we as isIntString, Te as isMap, Ee as isNullish, De as isNumber, Oe as isObject, ke as isPlainObject, Ae as isPrimitive, je as isPromise, Me as isRegExp, Ne as isSet, k as isShallowEqual, Pe as isString, Fe as isSymbol, Ie as isUndefined, r as isValidColor, Le as isWeakMap, Re as isWeakSet, i as isWhiteColor, I as joinPaths, ze as kebabCase, Be as last, Dt as mapTree, Ve as max, He as memoize, ot as mergeWith, Ue as min, a as mixColor, We as noop, L as normalizePath, ft as obfuscateDecode, pt as obfuscateDecodeFromBase64, mt as obfuscateDecodeFromHex, ht as obfuscateEncode, gt as obfuscateEncodeToBase64, _t as obfuscateEncodeToHex, Ge as omit, Ke as once, E as parseDate, G as parseErrorStack, R as parsePath, qe as pascalCase, z as pathSeparator, Je as pick, B as resolvePath, xt as scheduleMicrotask, Ye as set, o as setColorAlpha, bt as shouldUpdateByKeys, Xe as similarity, Ze as snakeCase, yt as stringify, Qe as sum, $e as template, et as throttle, ee as throwNotImplemented, tt as toFloat, s as toHexColor, c as toHslColor, l as toHsvColor, nt as toInt, u as toRgbColor, Ot as traverseTree, rt as trim, D as tryParseDate, it as unique, lt as withPinyin, kt as z };
@@ -1 +1 @@
1
-
1
+ /*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
@@ -1 +1 @@
1
-
1
+ /*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
@@ -1 +1 @@
1
-
1
+ /*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
@@ -1,3 +1 @@
1
- import "./color.js";
2
- import "./common.js";
3
- import "./deep-keys.js";
1
+ /*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
@@ -1,104 +1,89 @@
1
- import t from "dayjs";
2
- import i from "dayjs/locale/zh-cn";
3
- import a from "dayjs/plugin/customParseFormat";
4
- import u from "dayjs/plugin/duration";
5
- import c from "dayjs/plugin/localizedFormat";
6
- import f from "dayjs/plugin/relativeTime";
7
- t.locale(i);
8
- t.extend(c);
9
- t.extend(a);
10
- t.extend(u);
11
- t.extend(f);
12
- const T = "YYYY-MM-DD", H = "HH:mm:ss", m = "YYYY-MM-DD HH:mm:ss", A = "LLLL", E = "LLdddd", F = ["YYYY"], d = ["YYYY-Q季度"], _ = [
13
- "YYYY-MM",
14
- "YYYY/MM",
15
- "YYYY.MM",
16
- "YYYYMM"
17
- ], O = ["YYYY-wo"], M = [
18
- "YYYY-MM-DD",
19
- "YYYY/MM/DD",
20
- "YYYY.MM.DD",
21
- "YYYYMMDD",
22
- "YY/MM/DD",
23
- "YY.MM.DD",
24
- "YYMMDD"
25
- ], R = ["HH:mm:ss", "HH.mm.ss", "HHmmss"], l = ["HH"], L = ["HH:mm", "HH.mm", "HHmm"], D = [
26
- "YYYY-MM-DD HH:mm:ss",
27
- "YYYY/MM/DD HH:mm:ss",
28
- "YYYY.MM.DD HH.mm.ss",
29
- "YYYYMMDDHHmmss",
30
- "YY/MM/DD HH:mm:ss",
31
- "YY.MM.DD HH:mm:ss",
32
- "YY.MM.DD HH.mm.ss",
33
- "YYMMDDHHmmss"
1
+ /*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
2
+ import e from "dayjs";
3
+ import t from "dayjs/locale/zh-cn";
4
+ import n from "dayjs/plugin/customParseFormat";
5
+ import r from "dayjs/plugin/duration";
6
+ import i from "dayjs/plugin/localizedFormat";
7
+ import a from "dayjs/plugin/relativeTime";
8
+ e.locale(t), e.extend(i), e.extend(n), e.extend(r), e.extend(a);
9
+ var o = "YYYY-MM-DD", s = "HH:mm:ss", c = "YYYY-MM-DD HH:mm:ss", l = "LLLL", u = "LLdddd", d = ["YYYY"], f = ["YYYY-Q季度"], p = [
10
+ "YYYY-MM",
11
+ "YYYY/MM",
12
+ "YYYY.MM",
13
+ "YYYYMM"
14
+ ], m = ["YYYY-wo"], h = [
15
+ "YYYY-MM-DD",
16
+ "YYYY/MM/DD",
17
+ "YYYY.MM.DD",
18
+ "YYYYMMDD",
19
+ "YY/MM/DD",
20
+ "YY.MM.DD",
21
+ "YYMMDD"
22
+ ], g = [
23
+ "HH:mm:ss",
24
+ "HH.mm.ss",
25
+ "HHmmss"
26
+ ], _ = ["HH"], v = [
27
+ "HH:mm",
28
+ "HH.mm",
29
+ "HHmm"
30
+ ], y = [
31
+ "YYYY-MM-DD HH:mm:ss",
32
+ "YYYY/MM/DD HH:mm:ss",
33
+ "YYYY.MM.DD HH.mm.ss",
34
+ "YYYYMMDDHHmmss",
35
+ "YY/MM/DD HH:mm:ss",
36
+ "YY.MM.DD HH:mm:ss",
37
+ "YY.MM.DD HH.mm.ss",
38
+ "YYMMDDHHmmss"
34
39
  ];
35
- function $(o, r = "seconds") {
36
- const n = t.duration(o, r), Y = Math.floor(n.asDays()), s = n.hours(), e = n.minutes();
37
- return Y > 0 ? `${Y}天${s}小时${e}分钟` : s > 0 ? `${s}小时${e}分钟` : `${e}分钟`;
40
+ function b(t, n = "seconds") {
41
+ let r = e.duration(t, n), i = Math.floor(r.asDays()), a = r.hours(), o = r.minutes();
42
+ return i > 0 ? `${i}天${a}小时${o}分钟` : a > 0 ? `${a}小时${o}分钟` : `${o}分钟`;
38
43
  }
39
- function h(o, r = m) {
40
- return o instanceof Date ? t(o) : r ? t(o, r) : t(o);
44
+ function x(t, n = c) {
45
+ return t instanceof Date ? e(t) : n ? e(t, n) : e(t);
41
46
  }
42
- function x(o) {
43
- for (const n of D) {
44
- const Y = t(o, n, !0);
45
- if (Y.isValid())
46
- return Y;
47
- }
48
- for (const n of M) {
49
- const Y = t(o, n, !0);
50
- if (Y.isValid())
51
- return Y;
52
- }
53
- const r = t(o);
54
- return r.isValid() ? r : null;
47
+ function S(t) {
48
+ let n = [...y, ...h];
49
+ for (let r of n) {
50
+ let n = e(t, r, !0);
51
+ if (n.isValid()) return n;
52
+ }
53
+ let r = e(t);
54
+ return r.isValid() ? r : null;
55
55
  }
56
- function y(o, r = m) {
57
- return o.format(r);
56
+ function C(e, t = c) {
57
+ return e.format(t);
58
58
  }
59
- function P() {
60
- return t();
59
+ function w() {
60
+ return e();
61
61
  }
62
- function V() {
63
- return t().format(T);
62
+ function T() {
63
+ return e().format(o);
64
64
  }
65
- function z() {
66
- return t().format(H);
65
+ function E() {
66
+ return e().format(s);
67
67
  }
68
- function C() {
69
- return t().format(m);
68
+ function D() {
69
+ return e().format(c);
70
70
  }
71
- function Q(o = !0) {
72
- return t().format(o ? A : E);
71
+ function O(t = !0) {
72
+ return e().format(t ? l : u);
73
73
  }
74
- const S = {
75
- year: F,
76
- quarter: d,
77
- month: _,
78
- week: O,
79
- date: M,
80
- time: R,
81
- hour: l,
82
- minute: L,
83
- datetime: D
74
+ var k = {
75
+ year: d,
76
+ quarter: f,
77
+ month: p,
78
+ week: m,
79
+ date: h,
80
+ time: g,
81
+ hour: _,
82
+ minute: v,
83
+ datetime: y
84
84
  };
85
- function Z(o) {
86
- return S[o];
85
+ function A(e) {
86
+ return k[e];
87
87
  }
88
- export {
89
- m as DEFAULT_DATETIME_FORMAT,
90
- T as DEFAULT_DATE_FORMAT,
91
- H as DEFAULT_TIME_FORMAT,
92
- A as LOCALIZED_DATETIME_FORMAT,
93
- E as LOCALIZED_DATE_FORMAT,
94
- y as formatDate,
95
- $ as formatDuration,
96
- Q as getLocalizedDateTime,
97
- P as getNow,
98
- V as getNowDateString,
99
- C as getNowDateTimeString,
100
- z as getNowTimeString,
101
- Z as getTemporalFormats,
102
- h as parseDate,
103
- x as tryParseDate
104
- };
88
+ //#endregion
89
+ export { c as DEFAULT_DATETIME_FORMAT, o as DEFAULT_DATE_FORMAT, s as DEFAULT_TIME_FORMAT, l as LOCALIZED_DATETIME_FORMAT, u as LOCALIZED_DATE_FORMAT, C as formatDate, b as formatDuration, O as getLocalizedDateTime, w as getNow, T as getNowDateString, D as getNowDateTimeString, E as getNowTimeString, A as getTemporalFormats, x as parseDate, S as tryParseDate };
@@ -1,120 +1,85 @@
1
- function j(n, o) {
2
- if (Object.is(n, o))
3
- return !0;
4
- if (typeof n != "object" || n === null || typeof o != "object" || o === null)
5
- return !1;
6
- if (n instanceof Map && o instanceof Map) {
7
- if (n.size !== o.size)
8
- return !1;
9
- for (const [r, e] of n)
10
- if (!o.has(r) || !Object.is(e, o.get(r)))
11
- return !1;
12
- return !0;
13
- }
14
- if (n instanceof Set && o instanceof Set) {
15
- if (n.size !== o.size)
16
- return !1;
17
- for (const r of n)
18
- if (!o.has(r))
19
- return !1;
20
- return !0;
21
- }
22
- const O = Array.isArray(n), h = Array.isArray(o);
23
- if (O !== h || n.constructor !== o.constructor)
24
- return !1;
25
- const l = Object.keys(n);
26
- if (l.length !== Object.keys(o).length)
27
- return !1;
28
- for (const r of l)
29
- if (!Object.hasOwn(o, r) || !Object.is(n[r], o[r]))
30
- return !1;
31
- return !0;
1
+ /*! @vef-framework/shared v2.1.0 made by Venus | 2026-03-27T07:12:59.574Z */
2
+ //#region src/utils/equal.ts
3
+ function e(e, t) {
4
+ if (Object.is(e, t)) return !0;
5
+ if (typeof e != "object" || !e || typeof t != "object" || !t) return !1;
6
+ if (e instanceof Map && t instanceof Map) {
7
+ if (e.size !== t.size) return !1;
8
+ for (let [n, r] of e) if (!t.has(n) || !Object.is(r, t.get(n))) return !1;
9
+ return !0;
10
+ }
11
+ if (e instanceof Set && t instanceof Set) {
12
+ if (e.size !== t.size) return !1;
13
+ for (let n of e) if (!t.has(n)) return !1;
14
+ return !0;
15
+ }
16
+ if (Array.isArray(e) !== Array.isArray(t) || e.constructor !== t.constructor) return !1;
17
+ let n = Object.keys(e), r = Object.keys(t);
18
+ if (n.length !== r.length) return !1;
19
+ for (let r of n) if (!Object.hasOwn(t, r) || !Object.is(e[r], t[r])) return !1;
20
+ return !0;
32
21
  }
33
- function A(n, o) {
34
- const { valueOf: O, toString: h } = Object.prototype, l = /* @__PURE__ */ new WeakMap(), r = (e, f) => {
35
- if (e === f)
36
- return !0;
37
- if (typeof e != "object" || typeof f != "object" || !e || !f)
38
- return e !== e && f !== f;
39
- if (Object.getPrototypeOf(e) !== Object.getPrototypeOf(f))
40
- return !1;
41
- const { constructor: a } = e;
42
- if (a === Date)
43
- return e.getTime() === f.getTime();
44
- if (a === RegExp) {
45
- const t = e, s = f;
46
- return t.source === s.source && t.flags === s.flags;
47
- }
48
- if (a === Set) {
49
- const t = e, s = f;
50
- if (t.size !== s.size)
51
- return !1;
52
- for (const i of t) {
53
- let y = !1;
54
- for (const c of s)
55
- if (r(i, c)) {
56
- y = !0;
57
- break;
58
- }
59
- if (!y)
60
- return !1;
61
- }
62
- return !0;
63
- }
64
- if (a === ArrayBuffer) {
65
- const t = new DataView(e), s = new DataView(f);
66
- return r(t, s);
67
- }
68
- if (a === DataView || ArrayBuffer.isView(e)) {
69
- let t, s;
70
- if (a === DataView)
71
- t = e, s = f;
72
- else {
73
- const i = e, y = f;
74
- t = new DataView(i.buffer, i.byteOffset, i.byteLength), s = new DataView(y.buffer, y.byteOffset, y.byteLength);
75
- }
76
- if (t.byteLength !== s.byteLength)
77
- return !1;
78
- for (let i = t.byteLength; i-- !== 0; )
79
- if (t.getUint8(i) !== s.getUint8(i))
80
- return !1;
81
- return !0;
82
- }
83
- if (l.has(e) && l.get(e) === f)
84
- return !0;
85
- if (l.set(e, f), a === Array) {
86
- const t = e, s = f;
87
- if (t.length !== s.length)
88
- return !1;
89
- for (let i = t.length; i-- !== 0; )
90
- if (!r(t[i], s[i]))
91
- return !1;
92
- return !0;
93
- }
94
- if (a === Map) {
95
- const t = e, s = f;
96
- if (t.size !== s.size)
97
- return !1;
98
- for (const [i, y] of t)
99
- if (!s.has(i) || !r(y, s.get(i)))
100
- return !1;
101
- return !0;
102
- }
103
- const g = e, b = f;
104
- if (g.valueOf !== O && typeof g.valueOf == "function" && typeof b.valueOf == "function")
105
- return g.valueOf() === b.valueOf();
106
- if (g.toString !== h && typeof g.toString == "function" && typeof b.toString == "function")
107
- return g.toString() === b.toString();
108
- const w = Object.keys(e);
109
- let p;
110
- for (let t = w.length; t-- !== 0; )
111
- if (p = w[t], !Object.hasOwn(f, p) || !r(g[p], b[p]))
112
- return !1;
113
- return Object.keys(f).length === w.length;
114
- };
115
- return r(n, o);
22
+ function t(e, t) {
23
+ let { valueOf: n, toString: r } = Object.prototype, i = /* @__PURE__ */ new WeakMap(), a = (e, t) => {
24
+ if (e === t) return !0;
25
+ if (typeof e != "object" || typeof t != "object" || !e || !t) return e !== e && t !== t;
26
+ if (Object.getPrototypeOf(e) !== Object.getPrototypeOf(t)) return !1;
27
+ let { constructor: o } = e;
28
+ if (o === Date) return e.getTime() === t.getTime();
29
+ if (o === RegExp) {
30
+ let n = e, r = t;
31
+ return n.source === r.source && n.flags === r.flags;
32
+ }
33
+ if (o === Set) {
34
+ let n = e, r = t;
35
+ if (n.size !== r.size) return !1;
36
+ for (let e of n) {
37
+ let t = !1;
38
+ for (let n of r) if (a(e, n)) {
39
+ t = !0;
40
+ break;
41
+ }
42
+ if (!t) return !1;
43
+ }
44
+ return !0;
45
+ }
46
+ if (o === ArrayBuffer) return a(new DataView(e), new DataView(t));
47
+ if (o === DataView || ArrayBuffer.isView(e)) {
48
+ let n, r;
49
+ if (o === DataView) n = e, r = t;
50
+ else {
51
+ let i = e, a = t;
52
+ n = new DataView(i.buffer, i.byteOffset, i.byteLength), r = new DataView(a.buffer, a.byteOffset, a.byteLength);
53
+ }
54
+ if (n.byteLength !== r.byteLength) return !1;
55
+ for (let e = n.byteLength; e-- !== 0;) if (n.getUint8(e) !== r.getUint8(e)) return !1;
56
+ return !0;
57
+ }
58
+ if (i.has(e) && i.get(e) === t) return !0;
59
+ if (i.set(e, t), o === Array) {
60
+ let n = e, r = t;
61
+ if (n.length !== r.length) return !1;
62
+ for (let e = n.length; e-- !== 0;) if (!a(n[e], r[e])) return !1;
63
+ return !0;
64
+ }
65
+ if (o === Map) {
66
+ let n = e, r = t;
67
+ if (n.size !== r.size) return !1;
68
+ for (let [e, t] of n) if (!r.has(e) || !a(t, r.get(e))) return !1;
69
+ return !0;
70
+ }
71
+ let s = e, c = t;
72
+ if (s.valueOf !== n && typeof s.valueOf == "function" && typeof c.valueOf == "function") return s.valueOf() === c.valueOf();
73
+ if (s.toString !== r && typeof s.toString == "function" && typeof c.toString == "function") return s.toString() === c.toString();
74
+ let l = Object.keys(e), u = Object.keys(t);
75
+ if (l.length !== u.length) return !1;
76
+ for (let e = l.length; e-- !== 0;) {
77
+ let n = l[e];
78
+ if (!Object.hasOwn(t, n) || !a(s[n], c[n])) return !1;
79
+ }
80
+ return !0;
81
+ };
82
+ return a(e, t);
116
83
  }
117
- export {
118
- A as isDeepEqual,
119
- j as isShallowEqual
120
- };
84
+ //#endregion
85
+ export { t as isDeepEqual, e as isShallowEqual };