sa2kit 1.6.8 → 1.6.9

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 (125) hide show
  1. package/dist/calendar/index.js +10 -8
  2. package/dist/calendar/index.js.map +1 -1
  3. package/dist/calendar/index.mjs +3 -1
  4. package/dist/calendar/index.mjs.map +1 -1
  5. package/dist/calendar/routes/index.js +21 -21
  6. package/dist/calendar/routes/index.mjs +1 -1
  7. package/dist/calendar/server.js +13 -13
  8. package/dist/calendar/server.mjs +2 -2
  9. package/dist/{chunk-VHU2YGRQ.mjs → chunk-4FOBBWXW.mjs} +25 -11
  10. package/dist/chunk-4FOBBWXW.mjs.map +1 -0
  11. package/dist/{chunk-ZDRBMSTS.js → chunk-G6WRJ2H2.js} +25 -11
  12. package/dist/chunk-G6WRJ2H2.js.map +1 -0
  13. package/dist/{chunk-6WXOA4BE.mjs → chunk-GVVS4IMM.mjs} +2 -2
  14. package/dist/chunk-GVVS4IMM.mjs.map +1 -0
  15. package/dist/{chunk-AXP7KROR.js → chunk-WC5QFO3T.js} +2 -2
  16. package/dist/chunk-WC5QFO3T.js.map +1 -0
  17. package/dist/index.js +5 -5
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +2 -2
  20. package/dist/index.mjs.map +1 -1
  21. package/package.json +41 -7
  22. package/dist/ConfigService-BxK06xP6.d.mts +0 -262
  23. package/dist/ConfigService-BxK06xP6.d.ts +0 -262
  24. package/dist/UniversalFileService-BuHN-jrR.d.ts +0 -515
  25. package/dist/UniversalFileService-CGGzYeeF.d.mts +0 -515
  26. package/dist/analytics/index.d.mts +0 -1084
  27. package/dist/analytics/index.d.ts +0 -1084
  28. package/dist/analytics/server/index.d.mts +0 -499
  29. package/dist/analytics/server/index.d.ts +0 -499
  30. package/dist/api/index.d.mts +0 -248
  31. package/dist/api/index.d.ts +0 -248
  32. package/dist/audioDetection/index.d.mts +0 -449
  33. package/dist/audioDetection/index.d.ts +0 -449
  34. package/dist/auth/client/index.d.mts +0 -153
  35. package/dist/auth/client/index.d.ts +0 -153
  36. package/dist/auth/components/index.d.mts +0 -227
  37. package/dist/auth/components/index.d.ts +0 -227
  38. package/dist/auth/hooks/index.d.mts +0 -31
  39. package/dist/auth/hooks/index.d.ts +0 -31
  40. package/dist/auth/index.d.mts +0 -40
  41. package/dist/auth/index.d.ts +0 -40
  42. package/dist/auth/middleware/index.d.mts +0 -75
  43. package/dist/auth/middleware/index.d.ts +0 -75
  44. package/dist/auth/routes/index.d.mts +0 -261
  45. package/dist/auth/routes/index.d.ts +0 -261
  46. package/dist/auth/schema/index.d.mts +0 -789
  47. package/dist/auth/schema/index.d.ts +0 -789
  48. package/dist/auth/services/index.d.mts +0 -48
  49. package/dist/auth/services/index.d.ts +0 -48
  50. package/dist/calendar/index.d.mts +0 -1197
  51. package/dist/calendar/index.d.ts +0 -1197
  52. package/dist/calendar/routes/index.d.mts +0 -118
  53. package/dist/calendar/routes/index.d.ts +0 -118
  54. package/dist/calendar/server.d.mts +0 -1184
  55. package/dist/calendar/server.d.ts +0 -1184
  56. package/dist/chunk-6WXOA4BE.mjs.map +0 -1
  57. package/dist/chunk-AXP7KROR.js.map +0 -1
  58. package/dist/chunk-VHU2YGRQ.mjs.map +0 -1
  59. package/dist/chunk-ZDRBMSTS.js.map +0 -1
  60. package/dist/config/index.d.mts +0 -64
  61. package/dist/config/index.d.ts +0 -64
  62. package/dist/config/server/index.d.mts +0 -1533
  63. package/dist/config/server/index.d.ts +0 -1533
  64. package/dist/drizzle-auth-service-Bxlovhv8.d.ts +0 -145
  65. package/dist/drizzle-auth-service-DZY2F1sv.d.mts +0 -145
  66. package/dist/drizzle-schema-BNhqj2AZ.d.mts +0 -1114
  67. package/dist/drizzle-schema-BNhqj2AZ.d.ts +0 -1114
  68. package/dist/enums-Dume-V5Y.d.mts +0 -16
  69. package/dist/enums-Dume-V5Y.d.ts +0 -16
  70. package/dist/i18n/index.d.mts +0 -417
  71. package/dist/i18n/index.d.ts +0 -417
  72. package/dist/imageCrop/index.d.mts +0 -165
  73. package/dist/imageCrop/index.d.ts +0 -165
  74. package/dist/index-DSel44Ke.d.mts +0 -93
  75. package/dist/index-DSel44Ke.d.ts +0 -93
  76. package/dist/index.d.mts +0 -693
  77. package/dist/index.d.ts +0 -693
  78. package/dist/logger/index.d.mts +0 -125
  79. package/dist/logger/index.d.ts +0 -125
  80. package/dist/mmd/admin/index.d.mts +0 -487
  81. package/dist/mmd/admin/index.d.ts +0 -487
  82. package/dist/mmd/index.d.mts +0 -599
  83. package/dist/mmd/index.d.ts +0 -599
  84. package/dist/mmd/server/index.d.mts +0 -138
  85. package/dist/mmd/server/index.d.ts +0 -138
  86. package/dist/music/index.d.mts +0 -74
  87. package/dist/music/index.d.ts +0 -74
  88. package/dist/music/server/index.d.mts +0 -1
  89. package/dist/music/server/index.d.ts +0 -1
  90. package/dist/request/index.d.mts +0 -51
  91. package/dist/request/index.d.ts +0 -51
  92. package/dist/storage/index.d.mts +0 -75
  93. package/dist/storage/index.d.ts +0 -75
  94. package/dist/testYourself/admin/index.d.mts +0 -58
  95. package/dist/testYourself/admin/index.d.ts +0 -58
  96. package/dist/testYourself/index.d.mts +0 -53
  97. package/dist/testYourself/index.d.ts +0 -53
  98. package/dist/testYourself/server/index.d.mts +0 -1029
  99. package/dist/testYourself/server/index.d.ts +0 -1029
  100. package/dist/types-B60F7EZZ.d.mts +0 -248
  101. package/dist/types-B60F7EZZ.d.ts +0 -248
  102. package/dist/types-BINlP9MK.d.mts +0 -286
  103. package/dist/types-BINlP9MK.d.ts +0 -286
  104. package/dist/types-BaZccpvk.d.mts +0 -48
  105. package/dist/types-BaZccpvk.d.ts +0 -48
  106. package/dist/types-CK4We_aI.d.mts +0 -270
  107. package/dist/types-CK4We_aI.d.ts +0 -270
  108. package/dist/types-CbTsi9CZ.d.mts +0 -31
  109. package/dist/types-CbTsi9CZ.d.ts +0 -31
  110. package/dist/types-CroexXnI.d.ts +0 -99
  111. package/dist/types-DmsXCWvm.d.mts +0 -99
  112. package/dist/types-Dt0oqeFM.d.mts +0 -70
  113. package/dist/types-zK6kDzDQ.d.ts +0 -70
  114. package/dist/universalExport/index.d.mts +0 -235
  115. package/dist/universalExport/index.d.ts +0 -235
  116. package/dist/universalExport/server/index.d.mts +0 -1270
  117. package/dist/universalExport/server/index.d.ts +0 -1270
  118. package/dist/universalFile/index.d.mts +0 -480
  119. package/dist/universalFile/index.d.ts +0 -480
  120. package/dist/universalFile/server/index.d.mts +0 -4516
  121. package/dist/universalFile/server/index.d.ts +0 -4516
  122. package/dist/useElectronStorage-Dj0rcorG.d.mts +0 -65
  123. package/dist/useElectronStorage-DwnNfIhl.d.ts +0 -65
  124. package/dist/utils/index.d.mts +0 -192
  125. package/dist/utils/index.d.ts +0 -192
@@ -1,65 +0,0 @@
1
- import { S as StorageAdapter } from './types-BaZccpvk.mjs';
2
-
3
- /**
4
- * 通用存储 Hook
5
- * 支持多平台:Web、React Native、小程序
6
- *
7
- * 优点:
8
- * 1. 异步读取,不阻塞渲染
9
- * 2. 统一的错误处理
10
- * 3. 类型安全
11
- * 4. 跨平台支持
12
- * 5. 自动同步(支持的平台)
13
- */
14
-
15
- declare function useStorage<T>(storage: StorageAdapter, key: string, defaultValue: T): [T, (value: T) => void, () => void, boolean];
16
-
17
- /**
18
- * Web 平台 localStorage Hook
19
- * 基于通用 useStorage 的便捷封装
20
- */
21
- /**
22
- * Web 平台的 localStorage Hook
23
- *
24
- * @param key - 存储键名
25
- * @param defaultValue - 默认值
26
- * @returns [value, setValue, removeValue, isLoading]
27
- */
28
- declare function useLocalStorage<T>(key: string, defaultValue: T): [T, (value: T) => void, () => void, boolean];
29
-
30
- /**
31
- * React Native 的 AsyncStorage Hook
32
- *
33
- * @param key - 存储键名
34
- * @param defaultValue - 默认值
35
- * @returns [value, setValue, removeValue, isLoading]
36
- */
37
- declare function useAsyncStorage<T>(key: string, defaultValue: T): [T, (value: T) => void, () => void, boolean];
38
-
39
- /**
40
- * 小程序的 Taro Storage Hook
41
- *
42
- * @param key - 存储键名
43
- * @param defaultValue - 默认值
44
- * @returns [value, setValue, removeValue, isLoading]
45
- */
46
- declare function useTaroStorage<T>(key: string, defaultValue: T): [T, (value: T) => void, () => void, boolean];
47
-
48
- /**
49
- * Electron 桌面端的 Storage Hook
50
- *
51
- * 在 Electron 渲染进程中使用 localStorage
52
- * 支持跨窗口同步
53
- *
54
- * @param key - 存储键名
55
- * @param defaultValue - 默认值
56
- * @returns [value, setValue, removeValue, isLoading]
57
- *
58
- * @example
59
- * ```tsx
60
- * const [token, setToken, removeToken] = useElectronStorage('auth-token', '')
61
- * ```
62
- */
63
- declare function useElectronStorage<T>(key: string, defaultValue: T): [T, (value: T) => void, () => void, boolean];
64
-
65
- export { useLocalStorage as a, useAsyncStorage as b, useTaroStorage as c, useElectronStorage as d, useStorage as u };
@@ -1,65 +0,0 @@
1
- import { S as StorageAdapter } from './types-BaZccpvk.js';
2
-
3
- /**
4
- * 通用存储 Hook
5
- * 支持多平台:Web、React Native、小程序
6
- *
7
- * 优点:
8
- * 1. 异步读取,不阻塞渲染
9
- * 2. 统一的错误处理
10
- * 3. 类型安全
11
- * 4. 跨平台支持
12
- * 5. 自动同步(支持的平台)
13
- */
14
-
15
- declare function useStorage<T>(storage: StorageAdapter, key: string, defaultValue: T): [T, (value: T) => void, () => void, boolean];
16
-
17
- /**
18
- * Web 平台 localStorage Hook
19
- * 基于通用 useStorage 的便捷封装
20
- */
21
- /**
22
- * Web 平台的 localStorage Hook
23
- *
24
- * @param key - 存储键名
25
- * @param defaultValue - 默认值
26
- * @returns [value, setValue, removeValue, isLoading]
27
- */
28
- declare function useLocalStorage<T>(key: string, defaultValue: T): [T, (value: T) => void, () => void, boolean];
29
-
30
- /**
31
- * React Native 的 AsyncStorage Hook
32
- *
33
- * @param key - 存储键名
34
- * @param defaultValue - 默认值
35
- * @returns [value, setValue, removeValue, isLoading]
36
- */
37
- declare function useAsyncStorage<T>(key: string, defaultValue: T): [T, (value: T) => void, () => void, boolean];
38
-
39
- /**
40
- * 小程序的 Taro Storage Hook
41
- *
42
- * @param key - 存储键名
43
- * @param defaultValue - 默认值
44
- * @returns [value, setValue, removeValue, isLoading]
45
- */
46
- declare function useTaroStorage<T>(key: string, defaultValue: T): [T, (value: T) => void, () => void, boolean];
47
-
48
- /**
49
- * Electron 桌面端的 Storage Hook
50
- *
51
- * 在 Electron 渲染进程中使用 localStorage
52
- * 支持跨窗口同步
53
- *
54
- * @param key - 存储键名
55
- * @param defaultValue - 默认值
56
- * @returns [value, setValue, removeValue, isLoading]
57
- *
58
- * @example
59
- * ```tsx
60
- * const [token, setToken, removeToken] = useElectronStorage('auth-token', '')
61
- * ```
62
- */
63
- declare function useElectronStorage<T>(key: string, defaultValue: T): [T, (value: T) => void, () => void, boolean];
64
-
65
- export { useLocalStorage as a, useAsyncStorage as b, useTaroStorage as c, useElectronStorage as d, useStorage as u };
@@ -1,192 +0,0 @@
1
- import { ClassValue } from 'clsx';
2
-
3
- /**
4
- * 时间格式化工具
5
- */
6
- declare const formatTime: {
7
- /**
8
- * 将秒数转换为 MM:SS 格式
9
- */
10
- toMinutesSeconds(seconds: number): string;
11
- /**
12
- * 将秒数转换为 HH:MM:SS 格式
13
- */
14
- toHoursMinutesSeconds(seconds: number): string;
15
- /**
16
- * 格式化日期为用户友好的格式
17
- */
18
- formatDate(date: string | Date, locale?: string): string;
19
- };
20
-
21
- /**
22
- * 日语文本处理工具
23
- */
24
- declare const japaneseUtils: {
25
- /**
26
- * 提取文本中的汉字
27
- */
28
- extractKanji(text: string): string[];
29
- /**
30
- * 提取文本中的假名
31
- */
32
- extractKana(text: string): string[];
33
- /**
34
- * 清理文本,移除特殊字符但保留日语字符
35
- */
36
- cleanText(text: string): string;
37
- };
38
-
39
- /**
40
- * 验证工具
41
- */
42
- declare const validators: {
43
- /**
44
- * 验证邮箱格式
45
- */
46
- isValidEmail(email: string): boolean;
47
- /**
48
- * 验证密码强度
49
- */
50
- isValidPassword(password: string): {
51
- isValid: boolean;
52
- errors: string[];
53
- };
54
- /**
55
- * 验证用户名格式
56
- */
57
- isValidUsername(username: string): boolean;
58
- /**
59
- * 验证文件大小
60
- */
61
- isValidFileSize(size: number, maxSize: number): boolean;
62
- /**
63
- * 验证文件类型
64
- */
65
- isValidFileType(type: string, supportedTypes: string[]): boolean;
66
- /**
67
- * 验证 URL 格式
68
- */
69
- isValidUrl(url: string): boolean;
70
- };
71
-
72
- /**
73
- * 文件处理工具
74
- */
75
- declare const fileUtils: {
76
- /**
77
- * 格式化文件大小
78
- */
79
- formatFileSize(bytes: number): string;
80
- /**
81
- * 获取文件扩展名
82
- */
83
- getFileExtension(filename: string): string;
84
- /**
85
- * 生成唯一文件名
86
- */
87
- generateUniqueFileName(originalName: string): string;
88
- /**
89
- * 验证文件名是否有效
90
- */
91
- isValidFilename(filename: string): boolean;
92
- };
93
-
94
- /**
95
- * 数组和对象工具
96
- */
97
- declare const arrayUtils: {
98
- /**
99
- * 数组去重
100
- */
101
- unique<T>(array: T[]): T[];
102
- /**
103
- * 数组分组
104
- */
105
- groupBy<T>(array: T[], key: keyof T): Record<string, T[]>;
106
- /**
107
- * 数组分页
108
- */
109
- paginate<T>(array: T[], page: number, limit: number): {
110
- data: T[];
111
- total: number;
112
- page: number;
113
- pages: number;
114
- hasNext: boolean;
115
- hasPrev: boolean;
116
- };
117
- /**
118
- * 数组随机排序
119
- */
120
- shuffle<T>(array: T[]): T[];
121
- };
122
-
123
- /**
124
- * 字符串工具
125
- */
126
- declare const stringUtils: {
127
- /**
128
- * 截断文本
129
- */
130
- truncate(text: string, length: number, suffix?: string): string;
131
- /**
132
- * 首字母大写
133
- */
134
- capitalize(text: string): string;
135
- /**
136
- * 驼峰转下划线
137
- */
138
- camelToSnake(text: string): string;
139
- /**
140
- * 下划线转驼峰
141
- */
142
- snakeToCamel(text: string): string;
143
- /**
144
- * 生成随机字符串
145
- */
146
- generateRandom(length: number): string;
147
- };
148
-
149
- /**
150
- * 调试工具
151
- */
152
- declare const debugUtils: {
153
- /**
154
- * 安全的 JSON 序列化
155
- */
156
- safeStringify(obj: any): string;
157
- /**
158
- * 性能计时器
159
- */
160
- createTimer(label?: string): {
161
- end: () => number;
162
- };
163
- /**
164
- * 内存使用情况(仅在 Node.js 环境)
165
- */
166
- getMemoryUsage(): Record<string, string> | null;
167
- };
168
-
169
- /**
170
- * 错误处理工具
171
- */
172
- declare const errorUtils: {
173
- /**
174
- * 创建标准化的错误对象
175
- */
176
- createError(code: string, message: string, details?: any): Error & {
177
- code: string;
178
- details?: any;
179
- };
180
- /**
181
- * 安全的错误信息提取
182
- */
183
- extractErrorMessage(error: unknown): string;
184
- /**
185
- * 错误重试机制
186
- */
187
- retry<T>(fn: () => Promise<T>, maxAttempts?: number, delay?: number): Promise<T>;
188
- };
189
-
190
- declare function cn(...inputs: ClassValue[]): string;
191
-
192
- export { arrayUtils, cn, debugUtils, errorUtils, fileUtils, formatTime, japaneseUtils, stringUtils, validators };
@@ -1,192 +0,0 @@
1
- import { ClassValue } from 'clsx';
2
-
3
- /**
4
- * 时间格式化工具
5
- */
6
- declare const formatTime: {
7
- /**
8
- * 将秒数转换为 MM:SS 格式
9
- */
10
- toMinutesSeconds(seconds: number): string;
11
- /**
12
- * 将秒数转换为 HH:MM:SS 格式
13
- */
14
- toHoursMinutesSeconds(seconds: number): string;
15
- /**
16
- * 格式化日期为用户友好的格式
17
- */
18
- formatDate(date: string | Date, locale?: string): string;
19
- };
20
-
21
- /**
22
- * 日语文本处理工具
23
- */
24
- declare const japaneseUtils: {
25
- /**
26
- * 提取文本中的汉字
27
- */
28
- extractKanji(text: string): string[];
29
- /**
30
- * 提取文本中的假名
31
- */
32
- extractKana(text: string): string[];
33
- /**
34
- * 清理文本,移除特殊字符但保留日语字符
35
- */
36
- cleanText(text: string): string;
37
- };
38
-
39
- /**
40
- * 验证工具
41
- */
42
- declare const validators: {
43
- /**
44
- * 验证邮箱格式
45
- */
46
- isValidEmail(email: string): boolean;
47
- /**
48
- * 验证密码强度
49
- */
50
- isValidPassword(password: string): {
51
- isValid: boolean;
52
- errors: string[];
53
- };
54
- /**
55
- * 验证用户名格式
56
- */
57
- isValidUsername(username: string): boolean;
58
- /**
59
- * 验证文件大小
60
- */
61
- isValidFileSize(size: number, maxSize: number): boolean;
62
- /**
63
- * 验证文件类型
64
- */
65
- isValidFileType(type: string, supportedTypes: string[]): boolean;
66
- /**
67
- * 验证 URL 格式
68
- */
69
- isValidUrl(url: string): boolean;
70
- };
71
-
72
- /**
73
- * 文件处理工具
74
- */
75
- declare const fileUtils: {
76
- /**
77
- * 格式化文件大小
78
- */
79
- formatFileSize(bytes: number): string;
80
- /**
81
- * 获取文件扩展名
82
- */
83
- getFileExtension(filename: string): string;
84
- /**
85
- * 生成唯一文件名
86
- */
87
- generateUniqueFileName(originalName: string): string;
88
- /**
89
- * 验证文件名是否有效
90
- */
91
- isValidFilename(filename: string): boolean;
92
- };
93
-
94
- /**
95
- * 数组和对象工具
96
- */
97
- declare const arrayUtils: {
98
- /**
99
- * 数组去重
100
- */
101
- unique<T>(array: T[]): T[];
102
- /**
103
- * 数组分组
104
- */
105
- groupBy<T>(array: T[], key: keyof T): Record<string, T[]>;
106
- /**
107
- * 数组分页
108
- */
109
- paginate<T>(array: T[], page: number, limit: number): {
110
- data: T[];
111
- total: number;
112
- page: number;
113
- pages: number;
114
- hasNext: boolean;
115
- hasPrev: boolean;
116
- };
117
- /**
118
- * 数组随机排序
119
- */
120
- shuffle<T>(array: T[]): T[];
121
- };
122
-
123
- /**
124
- * 字符串工具
125
- */
126
- declare const stringUtils: {
127
- /**
128
- * 截断文本
129
- */
130
- truncate(text: string, length: number, suffix?: string): string;
131
- /**
132
- * 首字母大写
133
- */
134
- capitalize(text: string): string;
135
- /**
136
- * 驼峰转下划线
137
- */
138
- camelToSnake(text: string): string;
139
- /**
140
- * 下划线转驼峰
141
- */
142
- snakeToCamel(text: string): string;
143
- /**
144
- * 生成随机字符串
145
- */
146
- generateRandom(length: number): string;
147
- };
148
-
149
- /**
150
- * 调试工具
151
- */
152
- declare const debugUtils: {
153
- /**
154
- * 安全的 JSON 序列化
155
- */
156
- safeStringify(obj: any): string;
157
- /**
158
- * 性能计时器
159
- */
160
- createTimer(label?: string): {
161
- end: () => number;
162
- };
163
- /**
164
- * 内存使用情况(仅在 Node.js 环境)
165
- */
166
- getMemoryUsage(): Record<string, string> | null;
167
- };
168
-
169
- /**
170
- * 错误处理工具
171
- */
172
- declare const errorUtils: {
173
- /**
174
- * 创建标准化的错误对象
175
- */
176
- createError(code: string, message: string, details?: any): Error & {
177
- code: string;
178
- details?: any;
179
- };
180
- /**
181
- * 安全的错误信息提取
182
- */
183
- extractErrorMessage(error: unknown): string;
184
- /**
185
- * 错误重试机制
186
- */
187
- retry<T>(fn: () => Promise<T>, maxAttempts?: number, delay?: number): Promise<T>;
188
- };
189
-
190
- declare function cn(...inputs: ClassValue[]): string;
191
-
192
- export { arrayUtils, cn, debugUtils, errorUtils, fileUtils, formatTime, japaneseUtils, stringUtils, validators };