sa2kit 1.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 (218) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +298 -0
  3. package/dist/AliyunOSSProvider-7JLMJDXK.js +15 -0
  4. package/dist/AliyunOSSProvider-7JLMJDXK.js.map +1 -0
  5. package/dist/AliyunOSSProvider-GQMSDJGZ.mjs +6 -0
  6. package/dist/AliyunOSSProvider-GQMSDJGZ.mjs.map +1 -0
  7. package/dist/LocalStorageProvider-FVLLHBHO.mjs +6 -0
  8. package/dist/LocalStorageProvider-FVLLHBHO.mjs.map +1 -0
  9. package/dist/LocalStorageProvider-NBNHHWLY.js +15 -0
  10. package/dist/LocalStorageProvider-NBNHHWLY.js.map +1 -0
  11. package/dist/analytics/index.d.mts +1084 -0
  12. package/dist/analytics/index.d.ts +1084 -0
  13. package/dist/analytics/index.js +2595 -0
  14. package/dist/analytics/index.js.map +1 -0
  15. package/dist/analytics/index.mjs +2518 -0
  16. package/dist/analytics/index.mjs.map +1 -0
  17. package/dist/analytics/server/index.d.mts +499 -0
  18. package/dist/analytics/server/index.d.ts +499 -0
  19. package/dist/analytics/server/index.js +529 -0
  20. package/dist/analytics/server/index.js.map +1 -0
  21. package/dist/analytics/server/index.mjs +525 -0
  22. package/dist/analytics/server/index.mjs.map +1 -0
  23. package/dist/auth/client/index.d.mts +104 -0
  24. package/dist/auth/client/index.d.ts +104 -0
  25. package/dist/auth/client/index.js +21 -0
  26. package/dist/auth/client/index.js.map +1 -0
  27. package/dist/auth/client/index.mjs +4 -0
  28. package/dist/auth/client/index.mjs.map +1 -0
  29. package/dist/auth/components/index.d.mts +82 -0
  30. package/dist/auth/components/index.d.ts +82 -0
  31. package/dist/auth/components/index.js +93 -0
  32. package/dist/auth/components/index.js.map +1 -0
  33. package/dist/auth/components/index.mjs +86 -0
  34. package/dist/auth/components/index.mjs.map +1 -0
  35. package/dist/auth/hooks/index.d.mts +2 -0
  36. package/dist/auth/hooks/index.d.ts +2 -0
  37. package/dist/auth/hooks/index.js +17 -0
  38. package/dist/auth/hooks/index.js.map +1 -0
  39. package/dist/auth/hooks/index.mjs +4 -0
  40. package/dist/auth/hooks/index.mjs.map +1 -0
  41. package/dist/auth/index.d.mts +15 -0
  42. package/dist/auth/index.d.ts +15 -0
  43. package/dist/auth/index.js +110 -0
  44. package/dist/auth/index.js.map +1 -0
  45. package/dist/auth/index.mjs +9 -0
  46. package/dist/auth/index.mjs.map +1 -0
  47. package/dist/auth/middleware/index.d.mts +75 -0
  48. package/dist/auth/middleware/index.d.ts +75 -0
  49. package/dist/auth/middleware/index.js +15 -0
  50. package/dist/auth/middleware/index.js.map +1 -0
  51. package/dist/auth/middleware/index.mjs +6 -0
  52. package/dist/auth/middleware/index.mjs.map +1 -0
  53. package/dist/auth/routes/index.d.mts +163 -0
  54. package/dist/auth/routes/index.d.ts +163 -0
  55. package/dist/auth/routes/index.js +27 -0
  56. package/dist/auth/routes/index.js.map +1 -0
  57. package/dist/auth/routes/index.mjs +6 -0
  58. package/dist/auth/routes/index.mjs.map +1 -0
  59. package/dist/auth/schema/index.d.mts +789 -0
  60. package/dist/auth/schema/index.d.ts +789 -0
  61. package/dist/auth/schema/index.js +41 -0
  62. package/dist/auth/schema/index.js.map +1 -0
  63. package/dist/auth/schema/index.mjs +4 -0
  64. package/dist/auth/schema/index.mjs.map +1 -0
  65. package/dist/auth/services/index.d.mts +47 -0
  66. package/dist/auth/services/index.d.ts +47 -0
  67. package/dist/auth/services/index.js +34 -0
  68. package/dist/auth/services/index.js.map +1 -0
  69. package/dist/auth/services/index.mjs +5 -0
  70. package/dist/auth/services/index.mjs.map +1 -0
  71. package/dist/chunk-3RFBUDRA.js +507 -0
  72. package/dist/chunk-3RFBUDRA.js.map +1 -0
  73. package/dist/chunk-3XG5OHFD.mjs +37 -0
  74. package/dist/chunk-3XG5OHFD.mjs.map +1 -0
  75. package/dist/chunk-6BL3AZGD.js +285 -0
  76. package/dist/chunk-6BL3AZGD.js.map +1 -0
  77. package/dist/chunk-6FNUWAIV.js +394 -0
  78. package/dist/chunk-6FNUWAIV.js.map +1 -0
  79. package/dist/chunk-6PRFP5EG.js +171 -0
  80. package/dist/chunk-6PRFP5EG.js.map +1 -0
  81. package/dist/chunk-6VHWOPRR.mjs +90 -0
  82. package/dist/chunk-6VHWOPRR.mjs.map +1 -0
  83. package/dist/chunk-AIKEVVDR.mjs +122 -0
  84. package/dist/chunk-AIKEVVDR.mjs.map +1 -0
  85. package/dist/chunk-APY57REU.js +300 -0
  86. package/dist/chunk-APY57REU.js.map +1 -0
  87. package/dist/chunk-BJTO5JO5.mjs +10 -0
  88. package/dist/chunk-BJTO5JO5.mjs.map +1 -0
  89. package/dist/chunk-C64RY2OW.mjs +295 -0
  90. package/dist/chunk-C64RY2OW.mjs.map +1 -0
  91. package/dist/chunk-DGUM43GV.js +12 -0
  92. package/dist/chunk-DGUM43GV.js.map +1 -0
  93. package/dist/chunk-FV3FNHQY.js +92 -0
  94. package/dist/chunk-FV3FNHQY.js.map +1 -0
  95. package/dist/chunk-GSTLV3MB.mjs +316 -0
  96. package/dist/chunk-GSTLV3MB.mjs.map +1 -0
  97. package/dist/chunk-HEMA7SWK.mjs +212 -0
  98. package/dist/chunk-HEMA7SWK.mjs.map +1 -0
  99. package/dist/chunk-HWJ34NL6.js +43 -0
  100. package/dist/chunk-HWJ34NL6.js.map +1 -0
  101. package/dist/chunk-HXFFYNIF.mjs +385 -0
  102. package/dist/chunk-HXFFYNIF.mjs.map +1 -0
  103. package/dist/chunk-KGRQNEIR.mjs +183 -0
  104. package/dist/chunk-KGRQNEIR.mjs.map +1 -0
  105. package/dist/chunk-KH6RQ4J5.js +28 -0
  106. package/dist/chunk-KH6RQ4J5.js.map +1 -0
  107. package/dist/chunk-KQGP6BTS.mjs +165 -0
  108. package/dist/chunk-KQGP6BTS.mjs.map +1 -0
  109. package/dist/chunk-NMF4ANIC.js +365 -0
  110. package/dist/chunk-NMF4ANIC.js.map +1 -0
  111. package/dist/chunk-O26VCNS3.js +216 -0
  112. package/dist/chunk-O26VCNS3.js.map +1 -0
  113. package/dist/chunk-OLHGZXN3.mjs +86 -0
  114. package/dist/chunk-OLHGZXN3.mjs.map +1 -0
  115. package/dist/chunk-QU5OT4DF.js +88 -0
  116. package/dist/chunk-QU5OT4DF.js.map +1 -0
  117. package/dist/chunk-RCNNVNLT.mjs +356 -0
  118. package/dist/chunk-RCNNVNLT.mjs.map +1 -0
  119. package/dist/chunk-ROEYW4A7.js +186 -0
  120. package/dist/chunk-ROEYW4A7.js.map +1 -0
  121. package/dist/chunk-SVWQN2LR.js +131 -0
  122. package/dist/chunk-SVWQN2LR.js.map +1 -0
  123. package/dist/chunk-TKCYPDWU.js +338 -0
  124. package/dist/chunk-TKCYPDWU.js.map +1 -0
  125. package/dist/chunk-U2L6V7KD.mjs +273 -0
  126. package/dist/chunk-U2L6V7KD.mjs.map +1 -0
  127. package/dist/chunk-YVBU7QDJ.mjs +505 -0
  128. package/dist/chunk-YVBU7QDJ.mjs.map +1 -0
  129. package/dist/chunk-ZGVB35L2.mjs +25 -0
  130. package/dist/chunk-ZGVB35L2.mjs.map +1 -0
  131. package/dist/config/index.d.mts +64 -0
  132. package/dist/config/index.d.ts +64 -0
  133. package/dist/config/index.js +136 -0
  134. package/dist/config/index.js.map +1 -0
  135. package/dist/config/index.mjs +128 -0
  136. package/dist/config/index.mjs.map +1 -0
  137. package/dist/drizzle-auth-service-Bxlovhv8.d.ts +145 -0
  138. package/dist/drizzle-auth-service-DZY2F1sv.d.mts +145 -0
  139. package/dist/enums-Dume-V5Y.d.mts +16 -0
  140. package/dist/enums-Dume-V5Y.d.ts +16 -0
  141. package/dist/i18n/index.d.mts +416 -0
  142. package/dist/i18n/index.d.ts +416 -0
  143. package/dist/i18n/index.js +671 -0
  144. package/dist/i18n/index.js.map +1 -0
  145. package/dist/i18n/index.mjs +650 -0
  146. package/dist/i18n/index.mjs.map +1 -0
  147. package/dist/index-8VoHap_4.d.mts +105 -0
  148. package/dist/index-8VoHap_4.d.ts +105 -0
  149. package/dist/index.d.mts +4 -0
  150. package/dist/index.d.ts +4 -0
  151. package/dist/index.js +84 -0
  152. package/dist/index.js.map +1 -0
  153. package/dist/index.mjs +7 -0
  154. package/dist/index.mjs.map +1 -0
  155. package/dist/logger/index.d.mts +125 -0
  156. package/dist/logger/index.d.ts +125 -0
  157. package/dist/logger/index.js +29 -0
  158. package/dist/logger/index.js.map +1 -0
  159. package/dist/logger/index.mjs +4 -0
  160. package/dist/logger/index.mjs.map +1 -0
  161. package/dist/request/index.d.mts +51 -0
  162. package/dist/request/index.d.ts +51 -0
  163. package/dist/request/index.js +85 -0
  164. package/dist/request/index.js.map +1 -0
  165. package/dist/request/index.mjs +82 -0
  166. package/dist/request/index.mjs.map +1 -0
  167. package/dist/storage/index.d.mts +74 -0
  168. package/dist/storage/index.d.ts +74 -0
  169. package/dist/storage/index.js +46 -0
  170. package/dist/storage/index.js.map +1 -0
  171. package/dist/storage/index.mjs +5 -0
  172. package/dist/storage/index.mjs.map +1 -0
  173. package/dist/types-BINlP9MK.d.mts +286 -0
  174. package/dist/types-BINlP9MK.d.ts +286 -0
  175. package/dist/types-BaZccpvk.d.mts +48 -0
  176. package/dist/types-BaZccpvk.d.ts +48 -0
  177. package/dist/types-CbTsi9CZ.d.mts +31 -0
  178. package/dist/types-CbTsi9CZ.d.ts +31 -0
  179. package/dist/types-CoGG1rNV.d.mts +258 -0
  180. package/dist/types-CoGG1rNV.d.ts +258 -0
  181. package/dist/types-DAxQ1MeY.d.ts +70 -0
  182. package/dist/types-DT8LVCvE.d.mts +70 -0
  183. package/dist/types-DW9qar-w.d.mts +52 -0
  184. package/dist/types-DW9qar-w.d.ts +52 -0
  185. package/dist/universalExport/index.d.mts +235 -0
  186. package/dist/universalExport/index.d.ts +235 -0
  187. package/dist/universalExport/index.js +621 -0
  188. package/dist/universalExport/index.js.map +1 -0
  189. package/dist/universalExport/index.mjs +580 -0
  190. package/dist/universalExport/index.mjs.map +1 -0
  191. package/dist/universalExport/server/index.d.mts +429 -0
  192. package/dist/universalExport/server/index.d.ts +429 -0
  193. package/dist/universalExport/server/index.js +263 -0
  194. package/dist/universalExport/server/index.js.map +1 -0
  195. package/dist/universalExport/server/index.mjs +242 -0
  196. package/dist/universalExport/server/index.mjs.map +1 -0
  197. package/dist/universalFile/index.d.mts +310 -0
  198. package/dist/universalFile/index.d.ts +310 -0
  199. package/dist/universalFile/index.js +811 -0
  200. package/dist/universalFile/index.js.map +1 -0
  201. package/dist/universalFile/index.mjs +736 -0
  202. package/dist/universalFile/index.mjs.map +1 -0
  203. package/dist/universalFile/server/index.d.mts +2428 -0
  204. package/dist/universalFile/server/index.d.ts +2428 -0
  205. package/dist/universalFile/server/index.js +4578 -0
  206. package/dist/universalFile/server/index.js.map +1 -0
  207. package/dist/universalFile/server/index.mjs +4518 -0
  208. package/dist/universalFile/server/index.mjs.map +1 -0
  209. package/dist/useElectronStorage-Dj0rcorG.d.mts +65 -0
  210. package/dist/useElectronStorage-DwnNfIhl.d.ts +65 -0
  211. package/dist/utils/index.d.mts +188 -0
  212. package/dist/utils/index.d.ts +188 -0
  213. package/dist/utils/index.js +42 -0
  214. package/dist/utils/index.js.map +1 -0
  215. package/dist/utils/index.mjs +5 -0
  216. package/dist/utils/index.mjs.map +1 -0
  217. package/package.json +220 -0
  218. package/tailwind.animations.js +34 -0
@@ -0,0 +1,416 @@
1
+ import React__default from 'react';
2
+
3
+ /**
4
+ * i18n 类型定义
5
+ */
6
+ type Locale = 'zh-CN' | 'zh-TW' | 'en-US' | 'ja-JP';
7
+ type TranslationKey = string;
8
+ type TranslationValue = string | {
9
+ [key: string]: TranslationValue;
10
+ };
11
+ type Translations = {
12
+ [key: string]: TranslationValue;
13
+ };
14
+ type LocaleResources = {
15
+ [locale in Locale]?: Translations;
16
+ };
17
+ interface TranslateOptions {
18
+ defaultValue?: string;
19
+ count?: number;
20
+ context?: Record<string, any>;
21
+ }
22
+ type InterpolateFunction = (template: string, data: Record<string, any>) => string;
23
+ interface I18nConfig {
24
+ locale: Locale;
25
+ fallbackLocale?: Locale;
26
+ resources: LocaleResources;
27
+ interpolate?: InterpolateFunction;
28
+ }
29
+ interface I18nInstance {
30
+ locale: Locale;
31
+ t: (key: string, options?: TranslateOptions) => string;
32
+ setLocale: (locale: Locale) => void;
33
+ addResources: (locale: Locale, resources: Translations) => void;
34
+ getLocale: () => Locale;
35
+ }
36
+ interface I18nAdapter {
37
+ getSystemLocale: () => Locale;
38
+ saveLocale: (locale: Locale) => Promise<void>;
39
+ loadLocale: () => Promise<Locale | null>;
40
+ }
41
+
42
+ /**
43
+ * 轻量级 i18n 核心实现
44
+ * 支持:翻译、插值、复数、嵌套键、类型安全
45
+ */
46
+
47
+ /**
48
+ * 创建 i18n 实例
49
+ */
50
+ declare function createI18n(config: I18nConfig): I18nInstance;
51
+ /**
52
+ * 初始化全局 i18n
53
+ */
54
+ declare function initI18n(config: I18nConfig): I18nInstance;
55
+ /**
56
+ * 获取全局 i18n 实例
57
+ */
58
+ declare function getI18n(): I18nInstance;
59
+ /**
60
+ * 快捷翻译函数
61
+ */
62
+ declare function t(key: string, options?: TranslateOptions): string;
63
+
64
+ /**
65
+ * React hooks for i18n
66
+ */
67
+
68
+ /**
69
+ * useTranslation Hook
70
+ * React 组件中使用翻译
71
+ */
72
+ declare function useTranslation(): {
73
+ t: (key: string, options?: TranslateOptions) => string;
74
+ locale: Locale;
75
+ setLocale: (newLocale: Locale) => void;
76
+ };
77
+ /**
78
+ * useLocale Hook
79
+ * 只获取和设置语言,不包含翻译函数
80
+ */
81
+ declare function useLocale(): {
82
+ locale: Locale;
83
+ setLocale: (newLocale: Locale) => void;
84
+ };
85
+
86
+ /**
87
+ * 简体中文翻译
88
+ */
89
+ declare const _default$1: {
90
+ readonly app: {
91
+ readonly name: "LyricNote";
92
+ readonly fullName: "LyricNote - 歌词笔记";
93
+ readonly icon: "🎵";
94
+ readonly description: "一个强大的歌词和笔记管理应用";
95
+ readonly author: "LyricNote Team";
96
+ readonly copyright: `\u00A9 ${number} LyricNote`;
97
+ readonly version: "1.0.0";
98
+ };
99
+ readonly titles: {
100
+ readonly main: "🎵 LyricNote";
101
+ readonly admin: "LyricNote 管理后台";
102
+ readonly withVersion: "LyricNote v1.0.0";
103
+ readonly welcome: "欢迎使用 LyricNote";
104
+ readonly about: "关于 LyricNote";
105
+ };
106
+ readonly common: {
107
+ readonly hello: "你好";
108
+ readonly welcome: "欢迎";
109
+ readonly confirm: "确认";
110
+ readonly cancel: "取消";
111
+ readonly save: "保存";
112
+ readonly delete: "删除";
113
+ readonly edit: "编辑";
114
+ readonly back: "返回";
115
+ readonly next: "下一步";
116
+ readonly submit: "提交";
117
+ readonly finish: "完成";
118
+ readonly loading: "加载中...";
119
+ readonly success: "操作成功";
120
+ readonly error: "操作失败";
121
+ readonly retry: "重试";
122
+ readonly empty: "暂无数据";
123
+ };
124
+ readonly nav: {
125
+ readonly home: "首页";
126
+ readonly lyrics: "歌词";
127
+ readonly create: "创作";
128
+ readonly collection: "收藏";
129
+ readonly profile: "我的";
130
+ readonly settings: "设置";
131
+ readonly history: "历史";
132
+ readonly logout: "退出登录";
133
+ };
134
+ readonly user: {
135
+ readonly login: "登录";
136
+ readonly register: "注册";
137
+ readonly username: "用户名";
138
+ readonly password: "密码";
139
+ readonly email: "邮箱";
140
+ readonly phone: "手机号";
141
+ readonly nickname: "昵称";
142
+ };
143
+ readonly pages: {
144
+ readonly home: {
145
+ readonly title: "首页";
146
+ readonly description: "一个强大的歌词和笔记管理应用";
147
+ };
148
+ readonly profile: {
149
+ readonly title: "个人中心";
150
+ readonly description: "管理您的个人信息和偏好设置";
151
+ };
152
+ readonly admin: {
153
+ readonly title: "LyricNote 管理后台";
154
+ readonly description: "系统管理和数据统计";
155
+ };
156
+ readonly login: {
157
+ readonly title: "登录";
158
+ readonly description: "登录到 LyricNote";
159
+ };
160
+ };
161
+ readonly validation: {
162
+ readonly required: "{{field}}不能为空";
163
+ readonly invalid_email: "邮箱格式不正确";
164
+ readonly password_too_short: "密码至少需要{{count}}个字符";
165
+ readonly password_weak: "密码强度不够";
166
+ readonly passwords_not_match: "两次密码不一致";
167
+ };
168
+ readonly status: {
169
+ readonly loading: "加载中...";
170
+ readonly success: "操作成功";
171
+ readonly error: "操作失败";
172
+ readonly empty: "暂无数据";
173
+ readonly network_error: "网络错误,请稍后重试";
174
+ };
175
+ readonly errors: {
176
+ readonly network: "网络错误,请稍后重试";
177
+ readonly server: "服务器错误";
178
+ readonly unauthorized: "未授权,请先登录";
179
+ readonly not_found: "未找到相关内容";
180
+ readonly unknown: "未知错误";
181
+ };
182
+ readonly success: {
183
+ readonly saved: "保存成功";
184
+ readonly deleted: "删除成功";
185
+ readonly updated: "更新成功";
186
+ readonly created: "创建成功";
187
+ };
188
+ readonly language: {
189
+ readonly label: "语言";
190
+ readonly zh_cn: "简体中文";
191
+ readonly zh_tw: "繁體中文";
192
+ readonly en_us: "English";
193
+ readonly ja_jp: "日本語";
194
+ };
195
+ };
196
+
197
+ /**
198
+ * English translations
199
+ */
200
+ declare const _default: {
201
+ readonly app: {
202
+ readonly name: "LyricNote";
203
+ readonly fullName: "LyricNote - Lyrics & Notes";
204
+ readonly icon: "🎵";
205
+ readonly description: "A powerful lyrics and notes management app";
206
+ readonly author: "LyricNote Team";
207
+ readonly copyright: `\u00A9 ${number} LyricNote`;
208
+ readonly version: "1.0.0";
209
+ };
210
+ readonly titles: {
211
+ readonly main: "🎵 LyricNote";
212
+ readonly admin: "LyricNote Admin";
213
+ readonly withVersion: "LyricNote v1.0.0";
214
+ readonly welcome: "Welcome to LyricNote";
215
+ readonly about: "About LyricNote";
216
+ };
217
+ readonly common: {
218
+ readonly hello: "Hello";
219
+ readonly welcome: "Welcome";
220
+ readonly confirm: "Confirm";
221
+ readonly cancel: "Cancel";
222
+ readonly save: "Save";
223
+ readonly delete: "Delete";
224
+ readonly edit: "Edit";
225
+ readonly back: "Back";
226
+ readonly next: "Next";
227
+ readonly submit: "Submit";
228
+ readonly finish: "Finish";
229
+ readonly loading: "Loading...";
230
+ readonly success: "Success";
231
+ readonly error: "Error";
232
+ readonly retry: "Retry";
233
+ readonly empty: "No data";
234
+ };
235
+ readonly nav: {
236
+ readonly home: "Home";
237
+ readonly lyrics: "Lyrics";
238
+ readonly create: "Create";
239
+ readonly collection: "Collection";
240
+ readonly profile: "Profile";
241
+ readonly settings: "Settings";
242
+ readonly history: "History";
243
+ readonly logout: "Logout";
244
+ };
245
+ readonly user: {
246
+ readonly login: "Login";
247
+ readonly register: "Register";
248
+ readonly username: "Username";
249
+ readonly password: "Password";
250
+ readonly email: "Email";
251
+ readonly phone: "Phone";
252
+ readonly nickname: "Nickname";
253
+ };
254
+ readonly pages: {
255
+ readonly home: {
256
+ readonly title: "Home";
257
+ readonly description: "A powerful lyrics and notes management app";
258
+ };
259
+ readonly profile: {
260
+ readonly title: "Profile";
261
+ readonly description: "Manage your personal information and preferences";
262
+ };
263
+ readonly admin: {
264
+ readonly title: "LyricNote Admin";
265
+ readonly description: "System management and data statistics";
266
+ };
267
+ readonly login: {
268
+ readonly title: "Login";
269
+ readonly description: "Login to LyricNote";
270
+ };
271
+ };
272
+ readonly validation: {
273
+ readonly required: "{{field}} is required";
274
+ readonly invalid_email: "Invalid email format";
275
+ readonly password_too_short: "Password must be at least {{count}} characters";
276
+ readonly password_weak: "Password is too weak";
277
+ readonly passwords_not_match: "Passwords do not match";
278
+ };
279
+ readonly status: {
280
+ readonly loading: "Loading...";
281
+ readonly success: "Success";
282
+ readonly error: "Error";
283
+ readonly empty: "No data";
284
+ readonly network_error: "Network error, please try again later";
285
+ };
286
+ readonly errors: {
287
+ readonly network: "Network error, please try again later";
288
+ readonly server: "Server error";
289
+ readonly unauthorized: "Unauthorized, please login first";
290
+ readonly not_found: "Not found";
291
+ readonly unknown: "Unknown error";
292
+ };
293
+ readonly success: {
294
+ readonly saved: "Saved successfully";
295
+ readonly deleted: "Deleted successfully";
296
+ readonly updated: "Updated successfully";
297
+ readonly created: "Created successfully";
298
+ };
299
+ readonly language: {
300
+ readonly label: "Language";
301
+ readonly zh_cn: "简体中文";
302
+ readonly zh_tw: "繁體中文";
303
+ readonly en_us: "English";
304
+ readonly ja_jp: "日本語";
305
+ };
306
+ };
307
+
308
+ /**
309
+ * Web 平台适配器
310
+ * 用于浏览器环境的语言检测和存储
311
+ */
312
+
313
+ /**
314
+ * Web 平台适配器
315
+ * 使用 localStorage 存储语言偏好
316
+ */
317
+ declare class WebI18nAdapter implements I18nAdapter {
318
+ private storageKey;
319
+ getSystemLocale(): Locale;
320
+ saveLocale(locale: Locale): Promise<void>;
321
+ loadLocale(): Promise<Locale | null>;
322
+ private normalizeLocale;
323
+ }
324
+
325
+ /**
326
+ * React Native 平台适配器
327
+ * 用于 React Native 应用的语言检测和存储
328
+ */
329
+
330
+ /**
331
+ * React Native 平台适配器
332
+ * 使用 AsyncStorage 存储语言偏好
333
+ *
334
+ * 注意:需要安装 @react-native-async-storage/async-storage
335
+ */
336
+ declare class ReactNativeI18nAdapter implements I18nAdapter {
337
+ private storageKey;
338
+ getSystemLocale(): Locale;
339
+ saveLocale(locale: Locale): Promise<void>;
340
+ loadLocale(): Promise<Locale | null>;
341
+ private normalizeLocale;
342
+ }
343
+
344
+ /**
345
+ * Taro (小程序) 平台适配器
346
+ * 用于微信小程序、支付宝小程序等通过 Taro 开发的应用
347
+ */
348
+
349
+ /**
350
+ * Taro (小程序) 平台适配器
351
+ * 使用 Taro.storage API 存储语言偏好
352
+ *
353
+ * 注意:需要安装 @tarojs/taro
354
+ */
355
+ declare class TaroI18nAdapter implements I18nAdapter {
356
+ private storageKey;
357
+ getSystemLocale(): Locale;
358
+ saveLocale(locale: Locale): Promise<void>;
359
+ loadLocale(): Promise<Locale | null>;
360
+ private normalizeLocale;
361
+ }
362
+
363
+ /**
364
+ * Electron 平台适配器
365
+ * 用于 Electron 桌面应用的语言检测和存储
366
+ */
367
+
368
+ /**
369
+ * Electron 平台适配器
370
+ * 使用 localStorage 存储语言偏好
371
+ *
372
+ * 注意:Electron 渲染进程支持 Web API
373
+ */
374
+ declare class ElectronI18nAdapter implements I18nAdapter {
375
+ private storageKey;
376
+ getSystemLocale(): Locale;
377
+ saveLocale(locale: Locale): Promise<void>;
378
+ loadLocale(): Promise<Locale | null>;
379
+ private normalizeLocale;
380
+ }
381
+
382
+ /**
383
+ * 语言切换组件
384
+ * 支持多种样式:按钮组、下拉菜单、图标按钮
385
+ * 使用 Tailwind CSS 样式
386
+ */
387
+
388
+ interface LanguageSwitcherProps {
389
+ variant?: 'buttons' | 'dropdown' | 'icon';
390
+ className?: string;
391
+ onLanguageChange?: (locale: Locale) => void;
392
+ }
393
+ interface LanguageOption {
394
+ locale: Locale;
395
+ label: string;
396
+ flag: string;
397
+ }
398
+ /**
399
+ * 按钮组语言切换器
400
+ */
401
+ declare function LanguageSwitcherButtons({ className, onLanguageChange, }: LanguageSwitcherProps): React__default.JSX.Element;
402
+ /**
403
+ * 下拉菜单语言切换器
404
+ */
405
+ declare function LanguageSwitcherDropdown({ className, onLanguageChange, }: LanguageSwitcherProps): React__default.JSX.Element;
406
+ /**
407
+ * 图标按钮语言切换器(带下拉菜单)
408
+ */
409
+ declare function LanguageSwitcherIcon({ className, onLanguageChange }: LanguageSwitcherProps): React__default.JSX.Element;
410
+ /**
411
+ * 语言切换器主组件
412
+ * 根据 variant 自动选择样式
413
+ */
414
+ declare function LanguageSwitcher({ variant, className, onLanguageChange, }: LanguageSwitcherProps): React__default.JSX.Element;
415
+
416
+ export { ElectronI18nAdapter, type I18nAdapter, type I18nConfig, type I18nInstance, type LanguageOption, LanguageSwitcher, LanguageSwitcherButtons, LanguageSwitcherDropdown, LanguageSwitcherIcon, type LanguageSwitcherProps, type Locale, type LocaleResources, ReactNativeI18nAdapter, TaroI18nAdapter, type TranslateOptions, type TranslationKey, type TranslationValue, type Translations, WebI18nAdapter, createI18n, _default as enUS, getI18n, initI18n, t, useLocale, useTranslation, _default$1 as zhCN };