@minto-ai/tools 1.0.63 → 1.0.66
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/core/index.d.ts +2 -1
- package/dist/core/is-boolean.d.ts +8 -0
- package/dist/i18n/index.d.ts +2 -1
- package/dist/i18n/locales/vi.d.ts +13 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.js +19 -3
- package/package.json +1 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -5,9 +5,10 @@ import { default as checkEmpty } from './check-empty';
|
|
|
5
5
|
import { default as checkEmptyNotZero } from './check-empty-not-zero';
|
|
6
6
|
import { default as checkObjectEmpty } from './check-object-empty';
|
|
7
7
|
import { default as isArray } from './is-array';
|
|
8
|
+
import { default as isBoolean } from './is-boolean';
|
|
8
9
|
import { default as isNullOrUndefined } from './is-null-or-undefined';
|
|
9
10
|
import { default as isNumber } from './is-number';
|
|
10
11
|
import { default as isObject } from './is-object';
|
|
11
12
|
import { default as isString } from './is-string';
|
|
12
13
|
import { default as isUndefined } from './is-undefined';
|
|
13
|
-
export { beParsedAsNumber, canBeParsedAsNumber, checkArrayEmpty, checkEmpty, checkEmptyNotZero, checkObjectEmpty, isArray, isNullOrUndefined, isNumber, isObject, isString, isUndefined, };
|
|
14
|
+
export { beParsedAsNumber, canBeParsedAsNumber, checkArrayEmpty, checkEmpty, checkEmptyNotZero, checkObjectEmpty, isArray, isBoolean, isNullOrUndefined, isNumber, isObject, isString, isUndefined, };
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare class I18n {
|
|
|
6
6
|
private messages;
|
|
7
7
|
/**
|
|
8
8
|
* 设置当前语言
|
|
9
|
-
* @param locale - 语言代码,如 'zh-cn', 'en', 'ms', 'ar', 'zh-tw', 'th'
|
|
9
|
+
* @param locale - 语言代码,如 'zh-cn', 'en', 'ms', 'ar', 'zh-tw', 'th', 'vi'
|
|
10
10
|
*/
|
|
11
11
|
setLocale(locale: string): void;
|
|
12
12
|
/**
|
|
@@ -29,3 +29,4 @@ export declare class I18n {
|
|
|
29
29
|
t(key: string, fallback?: string): string;
|
|
30
30
|
}
|
|
31
31
|
export declare const i18n: I18n;
|
|
32
|
+
export type Locale = 'zh-cn' | 'zh-tw' | 'en' | 'ms' | 'ar' | 'th' | 'vi';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 越南语语言包
|
|
3
|
+
*/
|
|
4
|
+
export declare const vi: {
|
|
5
|
+
'audio.permission.no_user_interaction': string;
|
|
6
|
+
'audio.permission.autoplay_blocked': string;
|
|
7
|
+
'audio.permission.autoplay_unknown_error': string;
|
|
8
|
+
'audio.permission.secure_context_error': string;
|
|
9
|
+
'audio.permission.permission_denied_permanently': string;
|
|
10
|
+
'audio.permission.media_devices_api_unavailable': string;
|
|
11
|
+
'audio.permission.not_allowed_error': string;
|
|
12
|
+
'audio.permission.not_readable_error': string;
|
|
13
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Locale } from './i18n';
|
|
1
2
|
export * from './array';
|
|
2
3
|
export * from './browser';
|
|
3
4
|
export * from './core';
|
|
@@ -14,13 +15,13 @@ export * from './wrker';
|
|
|
14
15
|
declare const _default: {
|
|
15
16
|
/**
|
|
16
17
|
* 设置语言
|
|
17
|
-
* @param locale - 语言代码,支持 'zh-cn', 'zh-tw', 'en', 'ms', 'ar', 'th'
|
|
18
|
+
* @param locale - 语言代码,支持 'zh-cn', 'zh-tw', 'en', 'ms', 'ar', 'th'、'vi'
|
|
18
19
|
*/
|
|
19
|
-
locale(locale:
|
|
20
|
+
locale(locale: Locale): void;
|
|
20
21
|
/**
|
|
21
22
|
* 获取当前语言
|
|
22
23
|
* @returns 当前语言代码
|
|
23
24
|
*/
|
|
24
|
-
getLocale():
|
|
25
|
+
getLocale(): Locale;
|
|
25
26
|
};
|
|
26
27
|
export default _default;
|
package/dist/index.js
CHANGED
|
@@ -13094,7 +13094,7 @@ var I18n = /* @__PURE__ */ function() {
|
|
|
13094
13094
|
value: (
|
|
13095
13095
|
/**
|
|
13096
13096
|
* 设置当前语言
|
|
13097
|
-
* @param locale - 语言代码,如 'zh-cn', 'en', 'ms', 'ar', 'zh-tw', 'th'
|
|
13097
|
+
* @param locale - 语言代码,如 'zh-cn', 'en', 'ms', 'ar', 'zh-tw', 'th', 'vi'
|
|
13098
13098
|
*/
|
|
13099
13099
|
function setLocale(locale2) {
|
|
13100
13100
|
this.currentLocale = locale2;
|
|
@@ -13204,6 +13204,17 @@ var th = {
|
|
|
13204
13204
|
"audio.permission.microphone_unknown_error": "ข้อผิดพลาดการอนุญาตไมโครโฟนที่ไม่ทราบสาเหตุ",
|
|
13205
13205
|
"audio.permission.microphone_timeout_error": "การอนุญาตไมโครโฟนหมดเวลา กรุณาตรวจสอบการตั้งค่าการอนุญาตอุปกรณ์หรือลองใหม่อีกครั้ง"
|
|
13206
13206
|
};
|
|
13207
|
+
var vi = {
|
|
13208
|
+
// 音频权限错误消息
|
|
13209
|
+
"audio.permission.no_user_interaction": "Yêu cầu tương tác người dùng để phát âm thanh",
|
|
13210
|
+
"audio.permission.autoplay_blocked": "Tự động phát bị khóa bởi trình duyệt",
|
|
13211
|
+
"audio.permission.autoplay_unknown_error": "Lỗi phát âm thanh tự động không rõ nguyên nhân",
|
|
13212
|
+
"audio.permission.secure_context_error": "Yêu cầu không thể thực hiện trong môi trường không an toàn (HTTPS)",
|
|
13213
|
+
"audio.permission.permission_denied_permanently": "Yêu cầu quyền âm thanh bị từ chối vĩnh viễn. Vui lòng kích hoạt quyền âm thanh trong cài đặt trình duyệt.",
|
|
13214
|
+
"audio.permission.media_devices_api_unavailable": "API MediaDevices không khả dụng",
|
|
13215
|
+
"audio.permission.not_allowed_error": "Yêu cầu quyền âm thanh bị từ chối",
|
|
13216
|
+
"audio.permission.not_readable_error": "Trình phát âm thanh đang được sử dụng bởi ứng dụng khác"
|
|
13217
|
+
};
|
|
13207
13218
|
var zhCn = {
|
|
13208
13219
|
// 音频权限错误消息
|
|
13209
13220
|
"audio.permission.no_user_interaction": "需要用户交互才能播放音频",
|
|
@@ -13243,9 +13254,10 @@ function setupI18n() {
|
|
|
13243
13254
|
i18n.registerMessages("ms", ms);
|
|
13244
13255
|
i18n.registerMessages("ar", ar);
|
|
13245
13256
|
i18n.registerMessages("th", th);
|
|
13257
|
+
i18n.registerMessages("vi", vi);
|
|
13246
13258
|
if (typeof navigator !== "undefined") {
|
|
13247
13259
|
var browserLang = navigator.language || "zh-cn";
|
|
13248
|
-
var supportedLangs = ["zh-cn", "zh-tw", "en", "ms", "ar", "th"];
|
|
13260
|
+
var supportedLangs = ["zh-cn", "zh-tw", "en", "ms", "ar", "th", "vi"];
|
|
13249
13261
|
var matchedLang = supportedLangs.find(function(lang) {
|
|
13250
13262
|
return browserLang.toLowerCase().startsWith(lang.toLowerCase());
|
|
13251
13263
|
});
|
|
@@ -13792,6 +13804,9 @@ function checkEmpty(value) {
|
|
|
13792
13804
|
function checkEmptyNotZero(value) {
|
|
13793
13805
|
return checkEmpty(value) && value !== 0;
|
|
13794
13806
|
}
|
|
13807
|
+
function isBoolean(value) {
|
|
13808
|
+
return typeof value === "boolean";
|
|
13809
|
+
}
|
|
13795
13810
|
function isNullOrUndefined2(value) {
|
|
13796
13811
|
return value === null || value === void 0;
|
|
13797
13812
|
}
|
|
@@ -16634,7 +16649,7 @@ setupI18n();
|
|
|
16634
16649
|
const index = {
|
|
16635
16650
|
/**
|
|
16636
16651
|
* 设置语言
|
|
16637
|
-
* @param locale - 语言代码,支持 'zh-cn', 'zh-tw', 'en', 'ms', 'ar', 'th'
|
|
16652
|
+
* @param locale - 语言代码,支持 'zh-cn', 'zh-tw', 'en', 'ms', 'ar', 'th'、'vi'
|
|
16638
16653
|
*/
|
|
16639
16654
|
locale: function locale(_locale) {
|
|
16640
16655
|
i18n.setLocale(_locale);
|
|
@@ -16686,6 +16701,7 @@ export {
|
|
|
16686
16701
|
getUuid,
|
|
16687
16702
|
isAndroid,
|
|
16688
16703
|
isArray$1 as isArray,
|
|
16704
|
+
isBoolean,
|
|
16689
16705
|
isCompressFilePath,
|
|
16690
16706
|
isDocumentFilePath,
|
|
16691
16707
|
isFilePath,
|