sa2kit 1.6.7 → 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 (139) hide show
  1. package/dist/calendar/index.js +334 -399
  2. package/dist/calendar/index.js.map +1 -1
  3. package/dist/calendar/index.mjs +241 -306
  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-4FOBBWXW.mjs +179 -0
  10. package/dist/chunk-4FOBBWXW.mjs.map +1 -0
  11. package/dist/chunk-CDK3DHKM.mjs +634 -0
  12. package/dist/chunk-CDK3DHKM.mjs.map +1 -0
  13. package/dist/chunk-G6WRJ2H2.js +187 -0
  14. package/dist/chunk-G6WRJ2H2.js.map +1 -0
  15. package/dist/{chunk-6WXOA4BE.mjs → chunk-GVVS4IMM.mjs} +2 -2
  16. package/dist/chunk-GVVS4IMM.mjs.map +1 -0
  17. package/dist/chunk-L5PW2YTI.js +647 -0
  18. package/dist/chunk-L5PW2YTI.js.map +1 -0
  19. package/dist/{chunk-AXP7KROR.js → chunk-WC5QFO3T.js} +2 -2
  20. package/dist/chunk-WC5QFO3T.js.map +1 -0
  21. package/dist/index.js +15 -7
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.mjs +6 -6
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/mmd/index.js +2 -2
  26. package/dist/mmd/index.mjs +1 -1
  27. package/dist/music/index.js +14 -6
  28. package/dist/music/index.mjs +1 -1
  29. package/package.json +41 -7
  30. package/dist/ConfigService-BxK06xP6.d.mts +0 -262
  31. package/dist/ConfigService-BxK06xP6.d.ts +0 -262
  32. package/dist/UniversalFileService-BuHN-jrR.d.ts +0 -515
  33. package/dist/UniversalFileService-CGGzYeeF.d.mts +0 -515
  34. package/dist/analytics/index.d.mts +0 -1084
  35. package/dist/analytics/index.d.ts +0 -1084
  36. package/dist/analytics/server/index.d.mts +0 -499
  37. package/dist/analytics/server/index.d.ts +0 -499
  38. package/dist/api/index.d.mts +0 -248
  39. package/dist/api/index.d.ts +0 -248
  40. package/dist/audioDetection/index.d.mts +0 -449
  41. package/dist/audioDetection/index.d.ts +0 -449
  42. package/dist/auth/client/index.d.mts +0 -153
  43. package/dist/auth/client/index.d.ts +0 -153
  44. package/dist/auth/components/index.d.mts +0 -227
  45. package/dist/auth/components/index.d.ts +0 -227
  46. package/dist/auth/hooks/index.d.mts +0 -31
  47. package/dist/auth/hooks/index.d.ts +0 -31
  48. package/dist/auth/index.d.mts +0 -40
  49. package/dist/auth/index.d.ts +0 -40
  50. package/dist/auth/middleware/index.d.mts +0 -75
  51. package/dist/auth/middleware/index.d.ts +0 -75
  52. package/dist/auth/routes/index.d.mts +0 -261
  53. package/dist/auth/routes/index.d.ts +0 -261
  54. package/dist/auth/schema/index.d.mts +0 -789
  55. package/dist/auth/schema/index.d.ts +0 -789
  56. package/dist/auth/services/index.d.mts +0 -48
  57. package/dist/auth/services/index.d.ts +0 -48
  58. package/dist/calendar/index.d.mts +0 -1197
  59. package/dist/calendar/index.d.ts +0 -1197
  60. package/dist/calendar/routes/index.d.mts +0 -118
  61. package/dist/calendar/routes/index.d.ts +0 -118
  62. package/dist/calendar/server.d.mts +0 -1184
  63. package/dist/calendar/server.d.ts +0 -1184
  64. package/dist/chunk-6WXOA4BE.mjs.map +0 -1
  65. package/dist/chunk-AXP7KROR.js.map +0 -1
  66. package/dist/chunk-GAC4J5GX.js +0 -228
  67. package/dist/chunk-GAC4J5GX.js.map +0 -1
  68. package/dist/chunk-IEA55H3G.js +0 -106
  69. package/dist/chunk-IEA55H3G.js.map +0 -1
  70. package/dist/chunk-R2F4BXUU.mjs +0 -100
  71. package/dist/chunk-R2F4BXUU.mjs.map +0 -1
  72. package/dist/chunk-T6TE7GTY.mjs +0 -218
  73. package/dist/chunk-T6TE7GTY.mjs.map +0 -1
  74. package/dist/config/index.d.mts +0 -64
  75. package/dist/config/index.d.ts +0 -64
  76. package/dist/config/server/index.d.mts +0 -1533
  77. package/dist/config/server/index.d.ts +0 -1533
  78. package/dist/drizzle-auth-service-Bxlovhv8.d.ts +0 -145
  79. package/dist/drizzle-auth-service-DZY2F1sv.d.mts +0 -145
  80. package/dist/drizzle-schema-BNhqj2AZ.d.mts +0 -1114
  81. package/dist/drizzle-schema-BNhqj2AZ.d.ts +0 -1114
  82. package/dist/enums-Dume-V5Y.d.mts +0 -16
  83. package/dist/enums-Dume-V5Y.d.ts +0 -16
  84. package/dist/i18n/index.d.mts +0 -417
  85. package/dist/i18n/index.d.ts +0 -417
  86. package/dist/imageCrop/index.d.mts +0 -165
  87. package/dist/imageCrop/index.d.ts +0 -165
  88. package/dist/index-DSel44Ke.d.mts +0 -93
  89. package/dist/index-DSel44Ke.d.ts +0 -93
  90. package/dist/index.d.mts +0 -671
  91. package/dist/index.d.ts +0 -671
  92. package/dist/logger/index.d.mts +0 -125
  93. package/dist/logger/index.d.ts +0 -125
  94. package/dist/mmd/admin/index.d.mts +0 -487
  95. package/dist/mmd/admin/index.d.ts +0 -487
  96. package/dist/mmd/index.d.mts +0 -599
  97. package/dist/mmd/index.d.ts +0 -599
  98. package/dist/mmd/server/index.d.mts +0 -138
  99. package/dist/mmd/server/index.d.ts +0 -138
  100. package/dist/music/index.d.mts +0 -79
  101. package/dist/music/index.d.ts +0 -79
  102. package/dist/music/server/index.d.mts +0 -1
  103. package/dist/music/server/index.d.ts +0 -1
  104. package/dist/request/index.d.mts +0 -51
  105. package/dist/request/index.d.ts +0 -51
  106. package/dist/storage/index.d.mts +0 -75
  107. package/dist/storage/index.d.ts +0 -75
  108. package/dist/testYourself/admin/index.d.mts +0 -58
  109. package/dist/testYourself/admin/index.d.ts +0 -58
  110. package/dist/testYourself/index.d.mts +0 -53
  111. package/dist/testYourself/index.d.ts +0 -53
  112. package/dist/testYourself/server/index.d.mts +0 -1029
  113. package/dist/testYourself/server/index.d.ts +0 -1029
  114. package/dist/types-B60F7EZZ.d.mts +0 -248
  115. package/dist/types-B60F7EZZ.d.ts +0 -248
  116. package/dist/types-BINlP9MK.d.mts +0 -286
  117. package/dist/types-BINlP9MK.d.ts +0 -286
  118. package/dist/types-BaZccpvk.d.mts +0 -48
  119. package/dist/types-BaZccpvk.d.ts +0 -48
  120. package/dist/types-CK4We_aI.d.mts +0 -270
  121. package/dist/types-CK4We_aI.d.ts +0 -270
  122. package/dist/types-CbTsi9CZ.d.mts +0 -31
  123. package/dist/types-CbTsi9CZ.d.ts +0 -31
  124. package/dist/types-CroexXnI.d.ts +0 -99
  125. package/dist/types-DmsXCWvm.d.mts +0 -99
  126. package/dist/types-Dt0oqeFM.d.mts +0 -70
  127. package/dist/types-zK6kDzDQ.d.ts +0 -70
  128. package/dist/universalExport/index.d.mts +0 -235
  129. package/dist/universalExport/index.d.ts +0 -235
  130. package/dist/universalExport/server/index.d.mts +0 -1270
  131. package/dist/universalExport/server/index.d.ts +0 -1270
  132. package/dist/universalFile/index.d.mts +0 -480
  133. package/dist/universalFile/index.d.ts +0 -480
  134. package/dist/universalFile/server/index.d.mts +0 -4516
  135. package/dist/universalFile/server/index.d.ts +0 -4516
  136. package/dist/useElectronStorage-Dj0rcorG.d.mts +0 -65
  137. package/dist/useElectronStorage-DwnNfIhl.d.ts +0 -65
  138. package/dist/utils/index.d.mts +0 -192
  139. 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 };