@zero-library/common 3.1.4 → 3.1.6

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/index.d.ts CHANGED
@@ -4,6 +4,8 @@ export { default as microApp } from '@micro-zoe/micro-app';
4
4
  import * as react from 'react';
5
5
  import { ReactNode } from 'react';
6
6
  import { Editor, FocusPosition, Content, InsertContentOptions, InsertContentAtOptions } from '@tiptap/core';
7
+ import * as react_i18next from 'react-i18next';
8
+ import { i18n } from 'i18next';
7
9
  import dayjs from 'dayjs';
8
10
  import Decimal from 'decimal.js';
9
11
  import { RuleObject } from 'antd/es/form';
@@ -98,26 +100,6 @@ interface FilePreviewProps$1 {
98
100
  */
99
101
  declare const _default$r: ({ suffix, fileUrl, pdfParams, password, searchValue, emptyProps, onSetPassword }: FilePreviewProps$1) => react_jsx_runtime.JSX.Element;
100
102
 
101
- /**
102
- * 文件预览组件属性接口
103
- */
104
- interface FilePreviewProps {
105
- /** 空状态组件属性 */
106
- emptyProps?: EmptyProps;
107
- /** 文件URL地址 */
108
- fileUrl: string;
109
- /** 文件后缀名 */
110
- suffix?: string;
111
- /** 文件名称 */
112
- fileName?: string;
113
- }
114
- /**
115
- * 文件预览组件
116
- * 支持图片、PDF、视频、音频、Markdown等文件格式的预览
117
- * @param props - 组件属性
118
- */
119
- declare const _default$q: ({ suffix, fileUrl, emptyProps, fileName }: FilePreviewProps) => react_jsx_runtime.JSX.Element;
120
-
121
103
  /**
122
104
  * 文件预览抽屉组件属性接口
123
105
  */
@@ -146,7 +128,27 @@ interface FilePreviewDrawerProps extends FilePreviewProps$1 {
146
128
  * @param props - 组件属性
147
129
  * @returns 文件预览抽屉组件
148
130
  */
149
- declare const _default$p: ({ open, title, onClose, ...props }: FilePreviewDrawerProps) => react_jsx_runtime.JSX.Element;
131
+ declare const _default$q: ({ open, title, onClose, ...props }: FilePreviewDrawerProps) => react_jsx_runtime.JSX.Element;
132
+
133
+ /**
134
+ * 文件预览组件属性接口
135
+ */
136
+ interface FilePreviewProps {
137
+ /** 空状态组件属性 */
138
+ emptyProps?: EmptyProps;
139
+ /** 文件URL地址 */
140
+ fileUrl: string;
141
+ /** 文件后缀名 */
142
+ suffix?: string;
143
+ /** 文件名称 */
144
+ fileName?: string;
145
+ }
146
+ /**
147
+ * 文件预览组件
148
+ * 支持图片、PDF、视频、音频、Markdown等文件格式的预览
149
+ * @param props - 组件属性
150
+ */
151
+ declare const _default$p: ({ suffix, fileUrl, emptyProps, fileName }: FilePreviewProps) => react_jsx_runtime.JSX.Element;
150
152
 
151
153
  /**
152
154
  * Markdown | txt 预览组件属性接口
@@ -317,7 +319,7 @@ interface LazyComponentProps {
317
319
  * 使用示例:<LazyComponent type="renderMarkdown" data={{}} loading={true} />
318
320
  * @param props - 组件属性
319
321
  */
320
- declare const _default$g: ({ type, customComponents, unknownContent, ...rest }: LazyComponentProps) => string | number | true | react_jsx_runtime.JSX.Element | Iterable<react.ReactNode>;
322
+ declare const _default$g: ({ type, customComponents, unknownContent, ...rest }: LazyComponentProps) => string | number | true | Iterable<react.ReactNode> | react_jsx_runtime.JSX.Element;
321
323
 
322
324
  declare const ANNOTATION_ATTRS: readonly ["annotation-id", "user-name", "user-id", "update-time", "content"];
323
325
  /**
@@ -919,6 +921,588 @@ interface WebSocketType {
919
921
  */
920
922
  declare const _default: ({ url, onMessage, onClose, heartbeatInterval, heartbeatMessage, clientHeartbeat, reconnectInterval, maxReconnectAttempts, isReconnect }: WebSocketProps) => WebSocketType;
921
923
 
924
+ /**
925
+ * common 包命名空间常量
926
+ *
927
+ * 命名空间在每个包内是固定值,统一使用常量引用,避免散落字符串字面量。
928
+ * 注意:须与 i18n 实例的 defaultNS 保持一致。
929
+ */
930
+ declare const NS_COMMON = "common";
931
+
932
+ /**
933
+ * common 包英文翻译资源(namespace: common)
934
+ *
935
+ * 纯数据导出,不含 side-effect。
936
+ * 词条按组件/模块分级组织,调用时使用点号路径,如 t('filePreview.zoomIn')。
937
+ */
938
+ declare const commonEnUS: {
939
+ common: {
940
+ copySuccess: string;
941
+ confirm: string;
942
+ cancel: string;
943
+ download: string;
944
+ save: string;
945
+ defaultFileName: string;
946
+ defaultTitle: string;
947
+ loading: string;
948
+ };
949
+ request: {
950
+ networkError: string;
951
+ requestError: string;
952
+ };
953
+ pattern: {
954
+ mobileInvalid: string;
955
+ phoneInvalid: string;
956
+ taxNoInvalid: string;
957
+ bankCardInvalid: string;
958
+ idCardInvalid: string;
959
+ numberInvalid: string;
960
+ smsCodeInvalid: string;
961
+ emailInvalid: string;
962
+ addressInvalid: string;
963
+ passwordInvalid: string;
964
+ phoneOrMobileInvalid: string;
965
+ lessThan: string;
966
+ lessThanOrEqual: string;
967
+ greaterThan: string;
968
+ greaterThanOrEqual: string;
969
+ totalLengthExceed: string;
970
+ integerLengthExceed: string;
971
+ decimalLengthExceed: string;
972
+ maxEmailsExceed: string;
973
+ };
974
+ date: {
975
+ yearMonthFormat: string;
976
+ yearMonthDayFormat: string;
977
+ };
978
+ speechButton: {
979
+ notSupported: string;
980
+ permissionDenied: string;
981
+ stop: string;
982
+ start: string;
983
+ };
984
+ microApp: {
985
+ loading: string;
986
+ };
987
+ iframe: {
988
+ loading: string;
989
+ };
990
+ lazyComponent: {
991
+ unknownType: string;
992
+ componentLoading: string;
993
+ };
994
+ filePreview: {
995
+ title: string;
996
+ closePreview: string;
997
+ previewImageAlt: string;
998
+ previewNotSupported: string;
999
+ previewNotSupportedDownload: string;
1000
+ previewGenerating: string;
1001
+ audioNotSupported: string;
1002
+ videoNotSupported: string;
1003
+ requestFailedWithStatus: string;
1004
+ emptyResponse: string;
1005
+ loadFileFailed: string;
1006
+ fileParseFailed: string;
1007
+ fileUrlInvalid: string;
1008
+ htmlParseFailed: string;
1009
+ docLoadFailed: string;
1010
+ pdfLoadFailed: string;
1011
+ pdfParseFailed: string;
1012
+ pdfUrlInvalid: string;
1013
+ pdfPasswordInvalid: string;
1014
+ pdfPasswordPlaceholder: string;
1015
+ pdfSubmit: string;
1016
+ pdfInvalidOrDamaged: string;
1017
+ pdfFileNotFound: string;
1018
+ pdfUnexpectedResponse: string;
1019
+ pdfLoadDocumentFailed: string;
1020
+ zoomOut: string;
1021
+ zoomIn: string;
1022
+ zoomReset: string;
1023
+ fitWidth: string;
1024
+ };
1025
+ markdownEditor: {
1026
+ mainArea: string;
1027
+ unknown: string;
1028
+ toolbar: {
1029
+ quote: string;
1030
+ annotation: string;
1031
+ excerpt: string;
1032
+ undo: string;
1033
+ redo: string;
1034
+ alignLeft: string;
1035
+ alignCenter: string;
1036
+ alignRight: string;
1037
+ alignJustify: string;
1038
+ bold: string;
1039
+ italic: string;
1040
+ underline: string;
1041
+ strike: string;
1042
+ code: string;
1043
+ superscript: string;
1044
+ subscript: string;
1045
+ bulletList: string;
1046
+ orderedList: string;
1047
+ taskList: string;
1048
+ listOptions: string;
1049
+ list: string;
1050
+ blockquote: string;
1051
+ codeBlock: string;
1052
+ heading: string;
1053
+ headingLevel: string;
1054
+ addImage: string;
1055
+ link: string;
1056
+ linkPlaceholder: string;
1057
+ applyLink: string;
1058
+ openInNewWindow: string;
1059
+ removeLink: string;
1060
+ };
1061
+ highlight: {
1062
+ toggle: string;
1063
+ label: string;
1064
+ textLabel: string;
1065
+ removeBackground: string;
1066
+ removeHighlight: string;
1067
+ default: string;
1068
+ gray: string;
1069
+ brown: string;
1070
+ orange: string;
1071
+ yellow: string;
1072
+ green: string;
1073
+ blue: string;
1074
+ purple: string;
1075
+ pink: string;
1076
+ red: string;
1077
+ };
1078
+ annotation: {
1079
+ title: string;
1080
+ list: string;
1081
+ add: string;
1082
+ content: string;
1083
+ required: string;
1084
+ maxLength: string;
1085
+ placeholder: string;
1086
+ edit: string;
1087
+ delete: string;
1088
+ confirmDelete: string;
1089
+ empty: string;
1090
+ };
1091
+ collection: {
1092
+ title: string;
1093
+ list: string;
1094
+ delete: string;
1095
+ confirmDelete: string;
1096
+ empty: string;
1097
+ };
1098
+ upload: {
1099
+ noFile: string;
1100
+ canceled: string;
1101
+ fileSizeExceeded: string;
1102
+ undefined: string;
1103
+ failedNoUrl: string;
1104
+ failed: string;
1105
+ noFileToUpload: string;
1106
+ maxFileCount: string;
1107
+ };
1108
+ };
1109
+ };
1110
+
1111
+ /**
1112
+ * common 包日本語翻訳リソース(namespace: common)
1113
+ *
1114
+ * 純データ出口、side-effect を含まない。
1115
+ * 用語はコンポーネント/モジュールごとに階層化されており、ドットパスで呼び出す(例: t('filePreview.zoomIn'))。
1116
+ */
1117
+ declare const commonJaJP: {
1118
+ common: {
1119
+ copySuccess: string;
1120
+ confirm: string;
1121
+ cancel: string;
1122
+ download: string;
1123
+ save: string;
1124
+ defaultFileName: string;
1125
+ defaultTitle: string;
1126
+ loading: string;
1127
+ };
1128
+ request: {
1129
+ networkError: string;
1130
+ requestError: string;
1131
+ };
1132
+ pattern: {
1133
+ mobileInvalid: string;
1134
+ phoneInvalid: string;
1135
+ taxNoInvalid: string;
1136
+ bankCardInvalid: string;
1137
+ idCardInvalid: string;
1138
+ numberInvalid: string;
1139
+ smsCodeInvalid: string;
1140
+ emailInvalid: string;
1141
+ addressInvalid: string;
1142
+ passwordInvalid: string;
1143
+ phoneOrMobileInvalid: string;
1144
+ lessThan: string;
1145
+ lessThanOrEqual: string;
1146
+ greaterThan: string;
1147
+ greaterThanOrEqual: string;
1148
+ totalLengthExceed: string;
1149
+ integerLengthExceed: string;
1150
+ decimalLengthExceed: string;
1151
+ maxEmailsExceed: string;
1152
+ };
1153
+ date: {
1154
+ yearMonthFormat: string;
1155
+ yearMonthDayFormat: string;
1156
+ };
1157
+ speechButton: {
1158
+ notSupported: string;
1159
+ permissionDenied: string;
1160
+ stop: string;
1161
+ start: string;
1162
+ };
1163
+ microApp: {
1164
+ loading: string;
1165
+ };
1166
+ iframe: {
1167
+ loading: string;
1168
+ };
1169
+ lazyComponent: {
1170
+ unknownType: string;
1171
+ componentLoading: string;
1172
+ };
1173
+ filePreview: {
1174
+ title: string;
1175
+ closePreview: string;
1176
+ previewImageAlt: string;
1177
+ previewNotSupported: string;
1178
+ previewNotSupportedDownload: string;
1179
+ previewGenerating: string;
1180
+ audioNotSupported: string;
1181
+ videoNotSupported: string;
1182
+ requestFailedWithStatus: string;
1183
+ emptyResponse: string;
1184
+ loadFileFailed: string;
1185
+ fileParseFailed: string;
1186
+ fileUrlInvalid: string;
1187
+ htmlParseFailed: string;
1188
+ docLoadFailed: string;
1189
+ pdfLoadFailed: string;
1190
+ pdfParseFailed: string;
1191
+ pdfUrlInvalid: string;
1192
+ pdfPasswordInvalid: string;
1193
+ pdfPasswordPlaceholder: string;
1194
+ pdfSubmit: string;
1195
+ pdfInvalidOrDamaged: string;
1196
+ pdfFileNotFound: string;
1197
+ pdfUnexpectedResponse: string;
1198
+ pdfLoadDocumentFailed: string;
1199
+ zoomOut: string;
1200
+ zoomIn: string;
1201
+ zoomReset: string;
1202
+ fitWidth: string;
1203
+ };
1204
+ markdownEditor: {
1205
+ mainArea: string;
1206
+ unknown: string;
1207
+ toolbar: {
1208
+ quote: string;
1209
+ annotation: string;
1210
+ excerpt: string;
1211
+ undo: string;
1212
+ redo: string;
1213
+ alignLeft: string;
1214
+ alignCenter: string;
1215
+ alignRight: string;
1216
+ alignJustify: string;
1217
+ bold: string;
1218
+ italic: string;
1219
+ underline: string;
1220
+ strike: string;
1221
+ code: string;
1222
+ superscript: string;
1223
+ subscript: string;
1224
+ bulletList: string;
1225
+ orderedList: string;
1226
+ taskList: string;
1227
+ listOptions: string;
1228
+ list: string;
1229
+ blockquote: string;
1230
+ codeBlock: string;
1231
+ heading: string;
1232
+ headingLevel: string;
1233
+ addImage: string;
1234
+ link: string;
1235
+ linkPlaceholder: string;
1236
+ applyLink: string;
1237
+ openInNewWindow: string;
1238
+ removeLink: string;
1239
+ };
1240
+ highlight: {
1241
+ toggle: string;
1242
+ label: string;
1243
+ textLabel: string;
1244
+ removeBackground: string;
1245
+ removeHighlight: string;
1246
+ default: string;
1247
+ gray: string;
1248
+ brown: string;
1249
+ orange: string;
1250
+ yellow: string;
1251
+ green: string;
1252
+ blue: string;
1253
+ purple: string;
1254
+ pink: string;
1255
+ red: string;
1256
+ };
1257
+ annotation: {
1258
+ title: string;
1259
+ list: string;
1260
+ add: string;
1261
+ content: string;
1262
+ required: string;
1263
+ maxLength: string;
1264
+ placeholder: string;
1265
+ edit: string;
1266
+ delete: string;
1267
+ confirmDelete: string;
1268
+ empty: string;
1269
+ };
1270
+ collection: {
1271
+ title: string;
1272
+ list: string;
1273
+ delete: string;
1274
+ confirmDelete: string;
1275
+ empty: string;
1276
+ };
1277
+ upload: {
1278
+ noFile: string;
1279
+ canceled: string;
1280
+ fileSizeExceeded: string;
1281
+ undefined: string;
1282
+ failedNoUrl: string;
1283
+ failed: string;
1284
+ noFileToUpload: string;
1285
+ maxFileCount: string;
1286
+ };
1287
+ };
1288
+ };
1289
+
1290
+ /**
1291
+ * common 包中文翻译资源(namespace: common)
1292
+ *
1293
+ * 纯数据导出,不含 side-effect。
1294
+ * 词条按组件/模块分级组织,调用时使用点号路径,如 t('filePreview.zoomIn')。
1295
+ */
1296
+ declare const commonZhCN: {
1297
+ readonly common: {
1298
+ readonly copySuccess: "复制成功";
1299
+ readonly confirm: "确定";
1300
+ readonly cancel: "取消";
1301
+ readonly download: "下载";
1302
+ readonly save: "保存";
1303
+ readonly defaultFileName: "文件";
1304
+ readonly defaultTitle: "提示";
1305
+ readonly loading: "加载中...";
1306
+ };
1307
+ readonly request: {
1308
+ readonly networkError: "网络异常,请检查网络";
1309
+ readonly requestError: "请求错误!";
1310
+ };
1311
+ readonly pattern: {
1312
+ readonly mobileInvalid: "手机号格式不正确!";
1313
+ readonly phoneInvalid: "电话号码格式不正确!";
1314
+ readonly taxNoInvalid: "税号格式有误!";
1315
+ readonly bankCardInvalid: "银行卡号格式有误!";
1316
+ readonly idCardInvalid: "身份证号格式有误!";
1317
+ readonly numberInvalid: "格式有误,请重新输入!";
1318
+ readonly smsCodeInvalid: "验证码为6位数字";
1319
+ readonly emailInvalid: "邮箱格式有误!";
1320
+ readonly addressInvalid: "必须包含\"街、路、村、乡、镇、道、巷、号\"等关键词之一";
1321
+ readonly passwordInvalid: "密码为8到26位之间数字与字母组合";
1322
+ readonly phoneOrMobileInvalid: "联系电话格式不正确";
1323
+ readonly lessThan: "不能小于{{value}}";
1324
+ readonly lessThanOrEqual: "不能小于等于{{value}}";
1325
+ readonly greaterThan: "不能大于{{value}}";
1326
+ readonly greaterThanOrEqual: "不能大于等于{{value}}";
1327
+ readonly totalLengthExceed: "总位数不能超过{{length}}位";
1328
+ readonly integerLengthExceed: "整数位不能超过{{length}}位";
1329
+ readonly decimalLengthExceed: "小数位不能超过{{length}}位";
1330
+ readonly maxEmailsExceed: "最多输入{{max}}个邮箱";
1331
+ };
1332
+ readonly date: {
1333
+ readonly yearMonthFormat: "YYYY年MM月";
1334
+ readonly yearMonthDayFormat: "YYYY年MM月DD日";
1335
+ };
1336
+ readonly speechButton: {
1337
+ readonly notSupported: "当前浏览器不支持语音识别";
1338
+ readonly permissionDenied: "麦克风权限已拒绝";
1339
+ readonly stop: "停止录音";
1340
+ readonly start: "点击开始录音";
1341
+ };
1342
+ readonly microApp: {
1343
+ readonly loading: "加载中...";
1344
+ };
1345
+ readonly iframe: {
1346
+ readonly loading: "加载中...";
1347
+ };
1348
+ readonly lazyComponent: {
1349
+ readonly unknownType: "未知类型:{{type}}";
1350
+ readonly componentLoading: "组件加载中...";
1351
+ };
1352
+ readonly filePreview: {
1353
+ readonly title: "文件预览";
1354
+ readonly closePreview: "关闭预览";
1355
+ readonly previewImageAlt: "预览图片";
1356
+ readonly previewNotSupported: "暂不支持 {{suffix}} 文件的预览";
1357
+ readonly previewNotSupportedDownload: "{{suffix}} 文件暂不支持在线预览,请下载打开";
1358
+ readonly previewGenerating: "预览文件正在生成中...";
1359
+ readonly audioNotSupported: "您的浏览器不支持 audio 标签。";
1360
+ readonly videoNotSupported: "您的浏览器不支持 video 标签。";
1361
+ readonly requestFailedWithStatus: "请求失败,状态码: {{status}}";
1362
+ readonly emptyResponse: "返回内容为空";
1363
+ readonly loadFileFailed: "加载文件失败";
1364
+ readonly fileParseFailed: "加载或解析文件失败";
1365
+ readonly fileUrlInvalid: "文件地址错误";
1366
+ readonly htmlParseFailed: "加载或解析 HTML 失败";
1367
+ readonly docLoadFailed: "文档加载失败";
1368
+ readonly pdfLoadFailed: "PDF 加载失败";
1369
+ readonly pdfParseFailed: "加载或解析 pdf 失败";
1370
+ readonly pdfUrlInvalid: "pdf地址错误";
1371
+ readonly pdfPasswordInvalid: "密码无效。请再试一次!";
1372
+ readonly pdfPasswordPlaceholder: "请输入密码";
1373
+ readonly pdfSubmit: "提 交";
1374
+ readonly pdfInvalidOrDamaged: "文件无效或已损坏";
1375
+ readonly pdfFileNotFound: "文件不存在";
1376
+ readonly pdfUnexpectedResponse: "意外的服务器响应";
1377
+ readonly pdfLoadDocumentFailed: "无法加载文档";
1378
+ readonly zoomOut: "缩小";
1379
+ readonly zoomIn: "放大";
1380
+ readonly zoomReset: "还原";
1381
+ readonly fitWidth: "适应宽度";
1382
+ };
1383
+ readonly markdownEditor: {
1384
+ readonly mainArea: "主内容区域,开始输入文本...";
1385
+ readonly unknown: "未知";
1386
+ readonly toolbar: {
1387
+ readonly quote: "引用选中文本";
1388
+ readonly annotation: "批注";
1389
+ readonly excerpt: "摘录笔记";
1390
+ readonly undo: "撤销";
1391
+ readonly redo: "重做";
1392
+ readonly alignLeft: "左对齐";
1393
+ readonly alignCenter: "居中对齐";
1394
+ readonly alignRight: "右对齐";
1395
+ readonly alignJustify: "两端对齐";
1396
+ readonly bold: "粗体";
1397
+ readonly italic: "斜体";
1398
+ readonly underline: "下划线";
1399
+ readonly strike: "删除线";
1400
+ readonly code: "代码";
1401
+ readonly superscript: "上角标";
1402
+ readonly subscript: "下角标";
1403
+ readonly bulletList: "无序列表";
1404
+ readonly orderedList: "有序列表";
1405
+ readonly taskList: "任务列表";
1406
+ readonly listOptions: "列表选项";
1407
+ readonly list: "列表";
1408
+ readonly blockquote: "引用块";
1409
+ readonly codeBlock: "代码块";
1410
+ readonly heading: "标题";
1411
+ readonly headingLevel: "标题 {{level}}";
1412
+ readonly addImage: "添加图片";
1413
+ readonly link: "链接";
1414
+ readonly linkPlaceholder: "粘贴链接...";
1415
+ readonly applyLink: "应用链接";
1416
+ readonly openInNewWindow: "在新窗口中打开";
1417
+ readonly removeLink: "移除链接";
1418
+ };
1419
+ readonly highlight: {
1420
+ readonly toggle: "切换高亮显示 ({{color}})";
1421
+ readonly label: "背景色";
1422
+ readonly textLabel: "文本背景色";
1423
+ readonly removeBackground: "移除背景";
1424
+ readonly removeHighlight: "移除高亮";
1425
+ readonly default: "默认背景";
1426
+ readonly gray: "灰色背景";
1427
+ readonly brown: "棕色背景";
1428
+ readonly orange: "橙色背景";
1429
+ readonly yellow: "黄色背景";
1430
+ readonly green: "绿色背景";
1431
+ readonly blue: "蓝色背景";
1432
+ readonly purple: "紫色背景";
1433
+ readonly pink: "粉色背景";
1434
+ readonly red: "红色背景";
1435
+ };
1436
+ readonly annotation: {
1437
+ readonly title: "批注";
1438
+ readonly list: "批注列表";
1439
+ readonly add: "添加批注";
1440
+ readonly content: "批注内容";
1441
+ readonly required: "请输入批注内容";
1442
+ readonly maxLength: "批注内容不能超过500个字符";
1443
+ readonly placeholder: "请输入您的批注内容...";
1444
+ readonly edit: "编辑批注";
1445
+ readonly delete: "删除批注";
1446
+ readonly confirmDelete: "确认删除当前批注吗?";
1447
+ readonly empty: "暂无批注";
1448
+ };
1449
+ readonly collection: {
1450
+ readonly title: "摘录";
1451
+ readonly list: "摘录列表";
1452
+ readonly delete: "删除摘录";
1453
+ readonly confirmDelete: "确认删除当前摘录吗?";
1454
+ readonly empty: "暂无摘录";
1455
+ };
1456
+ readonly upload: {
1457
+ readonly noFile: "未提供文件";
1458
+ readonly canceled: "上传已取消";
1459
+ readonly fileSizeExceeded: "文件大小超过最大限制 ({{max}}MB)";
1460
+ readonly undefined: "上传功能未定义";
1461
+ readonly failedNoUrl: "上传失败:未返回URL";
1462
+ readonly failed: "上传失败";
1463
+ readonly noFileToUpload: "没有文件可上传";
1464
+ readonly maxFileCount: "最多允许上传 {{limit}} 个文件";
1465
+ };
1466
+ };
1467
+ };
1468
+
1469
+ /** 单个 namespace 的翻译资源,支持嵌套结构 */
1470
+ type NamespaceResource = {
1471
+ [key: string]: string | NamespaceResource;
1472
+ };
1473
+ type I18nResources = Record<string, Record<string, NamespaceResource>>;
1474
+ /** 语言存储键 */
1475
+ declare const LANG_KEY = "ns-lang";
1476
+ /**
1477
+ * 按优先级获取语言:URL 参数 → localStorage → 默认 zh-CN
1478
+ * 命中 URL 参数时顺带持久化,避免跳转后语言回退
1479
+ */
1480
+ declare function getLang(): string;
1481
+ /**
1482
+ * 注册包内嵌兜底资源(直接挂到实例上,任意时机调用均安全)
1483
+ */
1484
+ declare function addBundledResource(lng: string, ns: string, res: NamespaceResource): void;
1485
+ /**
1486
+ * 宿主初始化:注入翻译资源并设置当前语言。
1487
+ * 在宿主模块顶层(如 global.tsx / locales 入口)调用一次即可,不依赖渲染树。
1488
+ */
1489
+ declare function initI18n(options?: {
1490
+ lng?: string;
1491
+ resources?: I18nResources;
1492
+ }): i18n;
1493
+ /**
1494
+ * 切换语言:持久化 + 响应式切换
1495
+ * @param lng 语言,如 zh-CN
1496
+ * @param reload 是否刷新页面
1497
+ */
1498
+ declare function switchLang(lng: string, reload?: boolean): void;
1499
+ /** 组件场景:语言变化时自动重渲染(useSuspense: false,宿主无需 Suspense 边界) */
1500
+ declare function useTranslation(namespace?: string | string[]): react_i18next.UseTranslationResponse<string | string[], undefined>;
1501
+ /** 获取全局实例(极少直接使用,优先用 t / useTranslation) */
1502
+ declare function getI18n(): i18n;
1503
+ /** 纯函数 / 非组件场景 */
1504
+ declare function t(key: string, options?: Record<string, unknown>): string;
1505
+
922
1506
  /**
923
1507
  * 深拷贝函数
924
1508
  *
@@ -2238,7 +2822,7 @@ declare const cachedMessage: ({ title, content, type, duration, onClose, isCache
2238
2822
  */
2239
2823
  declare const RegMobile: {
2240
2824
  pattern: RegExp;
2241
- message: string;
2825
+ readonly message: string;
2242
2826
  };
2243
2827
  /**
2244
2828
  * 固定电话验证规则
@@ -2246,7 +2830,7 @@ declare const RegMobile: {
2246
2830
  */
2247
2831
  declare const RegFixedTelePhone: {
2248
2832
  pattern: RegExp;
2249
- message: string;
2833
+ readonly message: string;
2250
2834
  };
2251
2835
  /**
2252
2836
  * 通用电话号码验证规则
@@ -2254,7 +2838,7 @@ declare const RegFixedTelePhone: {
2254
2838
  */
2255
2839
  declare const RegTelePhone: {
2256
2840
  pattern: RegExp;
2257
- message: string;
2841
+ readonly message: string;
2258
2842
  };
2259
2843
  /**
2260
2844
  * 税号验证规则
@@ -2262,7 +2846,7 @@ declare const RegTelePhone: {
2262
2846
  */
2263
2847
  declare const RegTaxNo: {
2264
2848
  pattern: RegExp;
2265
- message: string;
2849
+ readonly message: string;
2266
2850
  };
2267
2851
  /**
2268
2852
  * 银行卡号验证规则
@@ -2270,7 +2854,7 @@ declare const RegTaxNo: {
2270
2854
  */
2271
2855
  declare const RegBankCardNo: {
2272
2856
  pattern: RegExp;
2273
- message: string;
2857
+ readonly message: string;
2274
2858
  };
2275
2859
  /**
2276
2860
  * 身份证号验证规则
@@ -2278,7 +2862,7 @@ declare const RegBankCardNo: {
2278
2862
  */
2279
2863
  declare const RegIdentityCardNo: {
2280
2864
  pattern: RegExp;
2281
- message: string;
2865
+ readonly message: string;
2282
2866
  };
2283
2867
  /**
2284
2868
  * 数字验证规则
@@ -2286,7 +2870,7 @@ declare const RegIdentityCardNo: {
2286
2870
  */
2287
2871
  declare const RegNumNo: {
2288
2872
  pattern: RegExp;
2289
- message: string;
2873
+ readonly message: string;
2290
2874
  };
2291
2875
  /**
2292
2876
  * 短信验证码验证规则
@@ -2294,7 +2878,7 @@ declare const RegNumNo: {
2294
2878
  */
2295
2879
  declare const RegSmsCode: {
2296
2880
  pattern: RegExp;
2297
- message: string;
2881
+ readonly message: string;
2298
2882
  };
2299
2883
  /**
2300
2884
  * 邮箱验证规则
@@ -2302,7 +2886,7 @@ declare const RegSmsCode: {
2302
2886
  */
2303
2887
  declare const RegEmail: {
2304
2888
  pattern: RegExp;
2305
- message: string;
2889
+ readonly message: string;
2306
2890
  };
2307
2891
  /**
2308
2892
  * 详细地址验证规则
@@ -2310,7 +2894,7 @@ declare const RegEmail: {
2310
2894
  */
2311
2895
  declare const RegDetailAddress: {
2312
2896
  pattern: RegExp;
2313
- message: string;
2897
+ readonly message: string;
2314
2898
  };
2315
2899
  /**
2316
2900
  * 密码强度验证规则
@@ -2323,7 +2907,7 @@ declare const RegDetailAddress: {
2323
2907
  */
2324
2908
  declare const RegPassword: {
2325
2909
  pattern: RegExp;
2326
- message: string;
2910
+ readonly message: string;
2327
2911
  };
2328
2912
  /**
2329
2913
  * 手机号或固定电话验证器
@@ -2641,4 +3225,4 @@ declare function createTokenManager({ key, storage }: TokenManagerProps): {
2641
3225
  clear: () => void;
2642
3226
  };
2643
3227
 
2644
- export { type AnnotationConfig, type AnnotationType, _default$u as AudioPlayer, type AudioPlayerProps, BusinessCode, type CacheMessage, type CollectionConfig, type CollectionType, type ComponentMapType, DEFAULT_DATE_FORMAT, DEFAULT_DATE_TIME_FORMAT, DEFAULT_YEAR_MONTH_DAY_FORMAT, DEFAULT_YEAR_MONTH_FORMAT, _default$t as DocxPreview, type DocxPreviewProps, _default$s as FileIcon, type FileIconProps, _default$r as FilePreview, _default$p as FilePreviewDrawer, type FilePreviewDrawerProps, type FilePreviewProps$1 as FilePreviewProps, type FindTreeNodesOptions, type FormatSizeOptions, HttpStatus, _default$h as Iframe, type IframeProps, _default$g as LazyComponent, type LazyComponentProps, _default$q as LuyaFilePreview, _default$e as MarkDrawing, type MarkDrawingProps, _default$f as MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, _default$o as MarkdownPreview, type MarkdownPreviewProps, _default$k as MicroApp, _default$j as MicroAppDrawer, type MicroAppProps, _default$i as MicroAppWindow, MultiEmailValidator, type PageNoConfig, _default$n as PdfImagePreview, type PdfImagePreviewProps, _default$m as PdfPreview, type PdfPreviewProps, PhoneOrMobileValidator, type PodOpenProps, RegBankCardNo, RegDetailAddress, RegEmail, RegFixedTelePhone, RegIdentityCardNo, RegMobile, RegNumNo, RegPassword, RegSmsCode, RegTaxNo, RegTelePhone, type RenderControl, _default$d as RenderMarkdown, type RenderMarkdownProps, _default$c as RenderWrapper, type RenderWrapperProps, type RequestConfig, type SafeParseJsonOptions, type SecureManagerProps, type SetIntervalType, type SizeUnit, ThanNumLengthValidator, ThanNumValidator, type TokenManagerProps, _default$b as UserAvatar, type UserAvatarProps, _default$l as VideoPlayer, type VideoPlayerProps, type WebSocketProps, type WebSocketType, type WindowOpenProps, absVal, addUrlLastSlash, aesDecrypt, aesEncrypt, arrToObj, buildUrlParams, cachedMessage, calculate, compareNum, convertCurrency, convertNewlineToBr, copyText, createRequest, createSecureManager, createTokenManager, decimalPlaces, deepCopy, deepEqual, deepMerge, dividedBy, downloadFile, emit, emitToChild, executeScript, findTreeNodesByIds, formatDate, formatNumberWithCommas, formatSize, genNonDuplicateID, generateRandomNumbers, getAllUrlParams, getDeviceId, getEndOfTimestamp, getFileName, getFileSuffixName, getRowSpanCount, getStartOfTimestamp, getTimestamp, getWebSocketUrl, htmlToMarkdown, htmlToText, importThirdPartyFile, is, isArray, isBlob, isBoolean, isDate, isDef, isElement, isEmpty, isEmptyObj, isExpire, isExternal, isFunction, isInteger, isJson, isLocalhost, isMap, isNegative, isNull, isNullOrUnDef, isNumber, isNumberNoNaN, isObject, isPromise, isReferenceType, isRegExp, isScriptSafe, isSet, isString, isUnDef, isWindow, markdownToText, minus, objToOptions, plus, precision, processItemList, propsMerge, safeParseJson, setInterval, setUrlMainSource, shouldRender, times, toFixed, transform, transforms, _default$9 as useAsyncQueue, _default$8 as useAutoRefresh, _default$7 as useCountDown, _default$6 as useCreateValtioContext, _default$5 as useDebounce, _default$4 as useDeepEffect, _default$a as useIframeRelayBridge, _default$3 as useRefState, _default$2 as useSyncInput, _default$1 as useThrottle, _default as useWebSocket };
3228
+ export { type AnnotationConfig, type AnnotationType, _default$u as AudioPlayer, type AudioPlayerProps, BusinessCode, type CacheMessage, type CollectionConfig, type CollectionType, type ComponentMapType, DEFAULT_DATE_FORMAT, DEFAULT_DATE_TIME_FORMAT, DEFAULT_YEAR_MONTH_DAY_FORMAT, DEFAULT_YEAR_MONTH_FORMAT, _default$t as DocxPreview, type DocxPreviewProps, _default$s as FileIcon, type FileIconProps, _default$r as FilePreview, _default$q as FilePreviewDrawer, type FilePreviewDrawerProps, type FilePreviewProps$1 as FilePreviewProps, type FindTreeNodesOptions, type FormatSizeOptions, HttpStatus, type I18nResources, _default$h as Iframe, type IframeProps, LANG_KEY, _default$g as LazyComponent, type LazyComponentProps, _default$p as LuyaFilePreview, _default$e as MarkDrawing, type MarkDrawingProps, _default$f as MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, _default$o as MarkdownPreview, type MarkdownPreviewProps, _default$k as MicroApp, _default$j as MicroAppDrawer, type MicroAppProps, _default$i as MicroAppWindow, MultiEmailValidator, NS_COMMON, type NamespaceResource, type PageNoConfig, _default$n as PdfImagePreview, type PdfImagePreviewProps, _default$m as PdfPreview, type PdfPreviewProps, PhoneOrMobileValidator, type PodOpenProps, RegBankCardNo, RegDetailAddress, RegEmail, RegFixedTelePhone, RegIdentityCardNo, RegMobile, RegNumNo, RegPassword, RegSmsCode, RegTaxNo, RegTelePhone, type RenderControl, _default$d as RenderMarkdown, type RenderMarkdownProps, _default$c as RenderWrapper, type RenderWrapperProps, type RequestConfig, type SafeParseJsonOptions, type SecureManagerProps, type SetIntervalType, type SizeUnit, ThanNumLengthValidator, ThanNumValidator, type TokenManagerProps, _default$b as UserAvatar, type UserAvatarProps, _default$l as VideoPlayer, type VideoPlayerProps, type WebSocketProps, type WebSocketType, type WindowOpenProps, absVal, addBundledResource, addUrlLastSlash, aesDecrypt, aesEncrypt, arrToObj, buildUrlParams, cachedMessage, calculate, commonEnUS, commonJaJP, commonZhCN, compareNum, convertCurrency, convertNewlineToBr, copyText, createRequest, createSecureManager, createTokenManager, decimalPlaces, deepCopy, deepEqual, deepMerge, dividedBy, downloadFile, emit, emitToChild, executeScript, findTreeNodesByIds, formatDate, formatNumberWithCommas, formatSize, genNonDuplicateID, generateRandomNumbers, getAllUrlParams, getDeviceId, getEndOfTimestamp, getFileName, getFileSuffixName, getI18n, getLang, getRowSpanCount, getStartOfTimestamp, getTimestamp, getWebSocketUrl, htmlToMarkdown, htmlToText, importThirdPartyFile, initI18n, is, isArray, isBlob, isBoolean, isDate, isDef, isElement, isEmpty, isEmptyObj, isExpire, isExternal, isFunction, isInteger, isJson, isLocalhost, isMap, isNegative, isNull, isNullOrUnDef, isNumber, isNumberNoNaN, isObject, isPromise, isReferenceType, isRegExp, isScriptSafe, isSet, isString, isUnDef, isWindow, markdownToText, minus, objToOptions, plus, precision, processItemList, propsMerge, safeParseJson, setInterval, setUrlMainSource, shouldRender, switchLang, t, times, toFixed, transform, transforms, _default$9 as useAsyncQueue, _default$8 as useAutoRefresh, _default$7 as useCountDown, _default$6 as useCreateValtioContext, _default$5 as useDebounce, _default$4 as useDeepEffect, _default$a as useIframeRelayBridge, _default$3 as useRefState, _default$2 as useSyncInput, _default$1 as useThrottle, useTranslation, _default as useWebSocket };