@sybz-components/utils 1.0.20 → 1.0.21
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/base.cjs +1 -1
- package/dist/base.mjs +1 -1
- package/dist/format.cjs +1 -1
- package/dist/format.mjs +1 -1
- package/dist/http.cjs +1 -1
- package/dist/http.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/{utils.C6u5wfj0.mjs → utils.D0Voi5F1.mjs} +13 -3
- package/dist/shared/{utils.CpSVN1vj.cjs → utils.nuyKxZXX.cjs} +13 -3
- package/package.json +8 -4
package/dist/base.cjs
CHANGED
package/dist/base.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'vue';
|
|
2
2
|
import 'consola';
|
|
3
3
|
import 'es-toolkit';
|
|
4
|
-
export { $ as $toast, c as clearStorage, a as clone, b as configureUtils, d as confirm, e as copy, f as debounce, g as delay, h as getStorage, i as getType, j as getUtilsBuildTime, k as getVariable, l as isEmpty, m as log, n as merge, o as mockValue, p as processWidth, r as random, s as setStorage, t as test, q as throttle, u as toLine, v as tryCatch, w as validate, x as validateForm, y as validateOnSubmit } from './shared/utils.
|
|
4
|
+
export { $ as $toast, c as clearStorage, a as clone, b as configureUtils, d as confirm, e as copy, f as debounce, g as delay, h as getStorage, i as getType, j as getUtilsBuildTime, k as getVariable, l as isEmpty, m as log, n as merge, o as mockValue, p as processWidth, r as random, s as setStorage, t as test, q as throttle, u as toLine, v as tryCatch, w as validate, x as validateForm, y as validateOnSubmit } from './shared/utils.D0Voi5F1.mjs';
|
|
5
5
|
import './confirmSemantic.mjs';
|
|
6
6
|
import 'element-plus';
|
|
7
7
|
import 'axios';
|
package/dist/format.cjs
CHANGED
package/dist/format.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { z as formatBytes, A as formatBytesConvert, B as formatDurationTime, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed } from './shared/utils.
|
|
1
|
+
export { z as formatBytes, A as formatBytesConvert, B as formatDurationTime, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed } from './shared/utils.D0Voi5F1.mjs';
|
|
2
2
|
import './is.mjs';
|
|
3
3
|
import 'consola';
|
|
4
4
|
import 'vue';
|
package/dist/http.cjs
CHANGED
package/dist/http.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'axios';
|
|
2
|
-
export { H as HttpError, G as configureHttp, I as createHttp, J as http } from './shared/utils.
|
|
2
|
+
export { H as HttpError, G as configureHttp, I as createHttp, J as http } from './shared/utils.D0Voi5F1.mjs';
|
|
3
3
|
import 'vue';
|
|
4
4
|
import 'consola';
|
|
5
5
|
import 'es-toolkit';
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { $ as $toast, H as HttpError, c as clearStorage, a as clone, G as configureHttp, b as configureUtils, d as confirm, e as copy, I as createHttp, f as debounce, g as delay, z as formatBytes, A as formatBytesConvert, B as formatDurationTime, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed, h as getStorage, i as getType, j as getUtilsBuildTime, k as getVariable, J as http, l as isEmpty, m as log, n as merge, o as mockValue, p as processWidth, r as random, s as setStorage, t as test, q as throttle, u as toLine, v as tryCatch, w as validate, x as validateForm, y as validateOnSubmit } from './shared/utils.
|
|
1
|
+
export { $ as $toast, H as HttpError, c as clearStorage, a as clone, G as configureHttp, b as configureUtils, d as confirm, e as copy, I as createHttp, f as debounce, g as delay, z as formatBytes, A as formatBytesConvert, B as formatDurationTime, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed, h as getStorage, i as getType, j as getUtilsBuildTime, k as getVariable, J as http, l as isEmpty, m as log, n as merge, o as mockValue, p as processWidth, r as random, s as setStorage, t as test, q as throttle, u as toLine, v as tryCatch, w as validate, x as validateForm, y as validateOnSubmit } from './shared/utils.D0Voi5F1.mjs';
|
|
2
2
|
export { resolveConfirmSemantic } from './confirmSemantic.mjs';
|
|
3
3
|
export { isArray, isBoolean, isComponent, isDate, isEmptyObject, isFunction, isIOS, isMap, isNumber, isObject, isPlainObject, isPromise, isRegExp, isSVGElement, isSet, isString, isStringNumber, isSymbol, isUrl, objectToString, toRawType, toTypeString } from './is.mjs';
|
|
4
4
|
export { SYBZ_THEME_PREFIX, isSybzTheme, resolveSybzComponentTheme } from './theme.mjs';
|
|
@@ -1243,8 +1243,18 @@ function _resolveAppContext(appContext) {
|
|
|
1243
1243
|
if (typeof document === "undefined") {
|
|
1244
1244
|
return elementPlusContext;
|
|
1245
1245
|
}
|
|
1246
|
-
|
|
1247
|
-
|
|
1246
|
+
return elementPlusContext || _mountedAppContext();
|
|
1247
|
+
}
|
|
1248
|
+
function _mountedAppContext() {
|
|
1249
|
+
const roots = [document.querySelector("#app"), document.querySelector("[data-v-app]")];
|
|
1250
|
+
for (const root of roots) {
|
|
1251
|
+
const element = root;
|
|
1252
|
+
const context = element?.__vue_app__?._context ?? element?._vue_app?._context;
|
|
1253
|
+
if (context) {
|
|
1254
|
+
return context;
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
return null;
|
|
1248
1258
|
}
|
|
1249
1259
|
function getVariable(propertyName, fallback = "") {
|
|
1250
1260
|
if (typeof document === "undefined") {
|
|
@@ -1256,7 +1266,7 @@ function getVariable(propertyName, fallback = "") {
|
|
|
1256
1266
|
const DEFAULT_BUILD_TIME_FALLBACK = "\u672A\u6CE8\u5165";
|
|
1257
1267
|
function getUtilsBuildTime(fallback = DEFAULT_BUILD_TIME_FALLBACK) {
|
|
1258
1268
|
{
|
|
1259
|
-
return "2026-11-20
|
|
1269
|
+
return "2026-11-22 20:04:30";
|
|
1260
1270
|
}
|
|
1261
1271
|
}
|
|
1262
1272
|
function test() {
|
|
@@ -1249,8 +1249,18 @@ function _resolveAppContext(appContext) {
|
|
|
1249
1249
|
if (typeof document === "undefined") {
|
|
1250
1250
|
return elementPlusContext;
|
|
1251
1251
|
}
|
|
1252
|
-
|
|
1253
|
-
|
|
1252
|
+
return elementPlusContext || _mountedAppContext();
|
|
1253
|
+
}
|
|
1254
|
+
function _mountedAppContext() {
|
|
1255
|
+
const roots = [document.querySelector("#app"), document.querySelector("[data-v-app]")];
|
|
1256
|
+
for (const root of roots) {
|
|
1257
|
+
const element = root;
|
|
1258
|
+
const context = element?.__vue_app__?._context ?? element?._vue_app?._context;
|
|
1259
|
+
if (context) {
|
|
1260
|
+
return context;
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
return null;
|
|
1254
1264
|
}
|
|
1255
1265
|
function getVariable(propertyName, fallback = "") {
|
|
1256
1266
|
if (typeof document === "undefined") {
|
|
@@ -1262,7 +1272,7 @@ function getVariable(propertyName, fallback = "") {
|
|
|
1262
1272
|
const DEFAULT_BUILD_TIME_FALLBACK = "\u672A\u6CE8\u5165";
|
|
1263
1273
|
function getUtilsBuildTime(fallback = DEFAULT_BUILD_TIME_FALLBACK) {
|
|
1264
1274
|
{
|
|
1265
|
-
return "2026-11-20
|
|
1275
|
+
return "2026-11-22 20:04:30";
|
|
1266
1276
|
}
|
|
1267
1277
|
}
|
|
1268
1278
|
function test() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sybz-components/utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"description": "utils of sybz-components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -64,7 +64,6 @@
|
|
|
64
64
|
"axios": "^1.19.0",
|
|
65
65
|
"code-inspector-plugin": "^2.0.9",
|
|
66
66
|
"consola": "^3.4.2",
|
|
67
|
-
"element-plus": "^2.11.5",
|
|
68
67
|
"es-toolkit": "^1.39.10",
|
|
69
68
|
"eslint": "9.39.4",
|
|
70
69
|
"eslint-config-prettier": "9.1.2",
|
|
@@ -75,10 +74,15 @@
|
|
|
75
74
|
"lodash-es": "^4.17.21",
|
|
76
75
|
"prettier": "3.8.4",
|
|
77
76
|
"tailwindcss": "^4.3.3",
|
|
78
|
-
"vue": "3.4.15",
|
|
79
77
|
"vue-eslint-parser": "10.4.1"
|
|
80
78
|
},
|
|
79
|
+
"devDependencies": {
|
|
80
|
+
"element-plus": "^2.11.5",
|
|
81
|
+
"vue": "3.4.15"
|
|
82
|
+
},
|
|
81
83
|
"peerDependencies": {
|
|
82
|
-
"
|
|
84
|
+
"element-plus": ">=2.3.0 <3",
|
|
85
|
+
"vite": ">=5 <7",
|
|
86
|
+
"vue": ">=3.4.0 <4"
|
|
83
87
|
}
|
|
84
88
|
}
|