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,487 +0,0 @@
1
- import React__default from 'react';
2
- import { F as FileMetadata } from '../../types-CK4We_aI.mjs';
3
- import { M as MMDPlaylistConfig, a as MMDResourceItem, b as MMDPlaylistNode, c as MMDResourceOptions, d as MMDResources } from '../../types-B60F7EZZ.mjs';
4
- export { M as MmdPlaylist, f as MmdPlaylistNode, j as MmdPresetItem, h as MmdResourceOption, N as NewMmdPlaylist, g as NewMmdPlaylistNode, k as NewMmdPresetItem, i as NewMmdResourceOption, a as mmdPlaylistNodes, e as mmdPlaylistNodesRelations, m as mmdPlaylists, d as mmdPlaylistsRelations, c as mmdPresetItems, b as mmdResourceOptions } from '../../drizzle-schema-BNhqj2AZ.mjs';
5
- import 'three';
6
- import 'drizzle-orm';
7
- import 'drizzle-orm/pg-core';
8
-
9
- /**
10
- * MMD 后台管理类型定义
11
- *
12
- * 这个文件定义了MMD后台管理系统的所有TypeScript类型
13
- * 包括前端组件使用的类型和后端API的类型
14
- *
15
- * @package sa2kit/mmd/admin
16
- */
17
-
18
- /**
19
- * 播放列表配置(数据库格式)
20
- */
21
- interface MmdPlaylistDB {
22
- id: string;
23
- name: string;
24
- description?: string;
25
- loop: boolean;
26
- preloadStrategy: 'none' | 'next' | 'all';
27
- autoPlay: boolean;
28
- thumbnailFileId?: string;
29
- status: 'draft' | 'published' | 'archived';
30
- sortOrder: number;
31
- config?: Record<string, any>;
32
- createdBy: string;
33
- createdAt: Date;
34
- updatedAt: Date;
35
- deletedAt?: Date;
36
- }
37
- /**
38
- * 播放节点配置(数据库格式)
39
- */
40
- interface MmdPlaylistNodeDB {
41
- id: string;
42
- playlistId: string;
43
- name: string;
44
- description?: string;
45
- loop: boolean;
46
- duration?: number;
47
- thumbnailFileId?: string;
48
- sortOrder: number;
49
- modelFileId: string;
50
- motionFileId?: string;
51
- cameraFileId?: string;
52
- audioFileId?: string;
53
- stageModelFileId?: string;
54
- additionalMotionFileIds?: string[];
55
- config?: Record<string, any>;
56
- createdAt: Date;
57
- updatedAt: Date;
58
- }
59
- /**
60
- * 资源选项配置(数据库格式)
61
- */
62
- interface MmdResourceOptionDB {
63
- id: string;
64
- name: string;
65
- description?: string;
66
- resourceType: 'model' | 'motion' | 'camera' | 'audio' | 'stage';
67
- fileId: string;
68
- thumbnailFileId?: string;
69
- tags?: string[];
70
- sortOrder: number;
71
- isActive: boolean;
72
- createdBy: string;
73
- createdAt: Date;
74
- updatedAt: Date;
75
- }
76
- /**
77
- * 预设项配置(数据库格式)
78
- */
79
- interface MmdPresetItemDB {
80
- id: string;
81
- name: string;
82
- description?: string;
83
- thumbnailFileId?: string;
84
- modelFileId: string;
85
- motionFileId?: string;
86
- cameraFileId?: string;
87
- audioFileId?: string;
88
- stageModelFileId?: string;
89
- additionalMotionFileIds?: string[];
90
- sortOrder: number;
91
- isActive: boolean;
92
- tags?: string[];
93
- createdBy: string;
94
- createdAt: Date;
95
- updatedAt: Date;
96
- }
97
- /**
98
- * 播放列表配置(包含文件URL映射)
99
- */
100
- interface MmdPlaylistWithFiles extends Omit<MmdPlaylistDB, 'thumbnailFileId'> {
101
- thumbnailUrl?: string;
102
- nodes: MmdPlaylistNodeWithFiles[];
103
- }
104
- /**
105
- * 播放节点配置(包含文件URL映射)
106
- */
107
- interface MmdPlaylistNodeWithFiles extends Omit<MmdPlaylistNodeDB, 'modelFileId' | 'motionFileId' | 'cameraFileId' | 'audioFileId' | 'stageModelFileId' | 'thumbnailFileId' | 'additionalMotionFileIds'> {
108
- thumbnailUrl?: string;
109
- modelUrl: string;
110
- motionUrl?: string;
111
- cameraUrl?: string;
112
- audioUrl?: string;
113
- stageModelUrl?: string;
114
- additionalMotionUrls?: string[];
115
- }
116
- /**
117
- * 资源选项配置(包含文件URL映射)
118
- */
119
- interface MmdResourceOptionWithFile extends Omit<MmdResourceOptionDB, 'fileId' | 'thumbnailFileId'> {
120
- fileUrl: string;
121
- thumbnailUrl?: string;
122
- fileMetadata?: Partial<FileMetadata>;
123
- }
124
- /**
125
- * 预设项配置(包含文件URL映射)
126
- */
127
- interface MmdPresetItemWithFiles extends Omit<MmdPresetItemDB, 'modelFileId' | 'motionFileId' | 'cameraFileId' | 'audioFileId' | 'stageModelFileId' | 'thumbnailFileId' | 'additionalMotionFileIds'> {
128
- thumbnailUrl?: string;
129
- modelUrl: string;
130
- motionUrl?: string;
131
- cameraUrl?: string;
132
- audioUrl?: string;
133
- stageModelUrl?: string;
134
- additionalMotionUrls?: string[];
135
- }
136
- /**
137
- * 创建播放列表请求
138
- */
139
- interface CreatePlaylistRequest {
140
- name: string;
141
- description?: string;
142
- loop?: boolean;
143
- preloadStrategy?: 'none' | 'next' | 'all';
144
- autoPlay?: boolean;
145
- thumbnailFileId?: string;
146
- config?: Record<string, any>;
147
- }
148
- /**
149
- * 更新播放列表请求
150
- */
151
- interface UpdatePlaylistRequest extends Partial<CreatePlaylistRequest> {
152
- status?: 'draft' | 'published' | 'archived';
153
- sortOrder?: number;
154
- }
155
- /**
156
- * 创建播放节点请求
157
- */
158
- interface CreatePlaylistNodeRequest {
159
- playlistId: string;
160
- name: string;
161
- description?: string;
162
- loop?: boolean;
163
- duration?: number;
164
- thumbnailFileId?: string;
165
- sortOrder?: number;
166
- modelFileId: string;
167
- motionFileId?: string;
168
- cameraFileId?: string;
169
- audioFileId?: string;
170
- stageModelFileId?: string;
171
- additionalMotionFileIds?: string[];
172
- config?: Record<string, any>;
173
- }
174
- /**
175
- * 更新播放节点请求
176
- */
177
- interface UpdatePlaylistNodeRequest extends Partial<Omit<CreatePlaylistNodeRequest, 'playlistId'>> {
178
- }
179
- /**
180
- * 创建资源选项请求
181
- */
182
- interface CreateResourceOptionRequest {
183
- name: string;
184
- description?: string;
185
- resourceType: 'model' | 'motion' | 'camera' | 'audio' | 'stage';
186
- fileId: string;
187
- thumbnailFileId?: string;
188
- tags?: string[];
189
- sortOrder?: number;
190
- }
191
- /**
192
- * 更新资源选项请求
193
- */
194
- interface UpdateResourceOptionRequest extends Partial<CreateResourceOptionRequest> {
195
- isActive?: boolean;
196
- }
197
- /**
198
- * 创建预设项请求
199
- */
200
- interface CreatePresetItemRequest {
201
- name: string;
202
- description?: string;
203
- thumbnailFileId?: string;
204
- modelFileId: string;
205
- motionFileId?: string;
206
- cameraFileId?: string;
207
- audioFileId?: string;
208
- stageModelFileId?: string;
209
- additionalMotionFileIds?: string[];
210
- tags?: string[];
211
- sortOrder?: number;
212
- }
213
- /**
214
- * 更新预设项请求
215
- */
216
- interface UpdatePresetItemRequest extends Partial<CreatePresetItemRequest> {
217
- isActive?: boolean;
218
- }
219
- /**
220
- * 分页查询参数
221
- */
222
- interface PaginationQuery {
223
- page?: number;
224
- pageSize?: number;
225
- sortBy?: string;
226
- sortOrder?: 'asc' | 'desc';
227
- }
228
- /**
229
- * 播放列表查询参数
230
- */
231
- interface PlaylistQuery extends PaginationQuery {
232
- status?: 'draft' | 'published' | 'archived';
233
- createdBy?: string;
234
- search?: string;
235
- }
236
- /**
237
- * 资源选项查询参数
238
- */
239
- interface ResourceOptionQuery extends PaginationQuery {
240
- resourceType?: 'model' | 'motion' | 'camera' | 'audio' | 'stage';
241
- tags?: string[];
242
- isActive?: boolean;
243
- search?: string;
244
- }
245
- /**
246
- * 预设项查询参数
247
- */
248
- interface PresetItemQuery extends PaginationQuery {
249
- tags?: string[];
250
- isActive?: boolean;
251
- search?: string;
252
- }
253
- /**
254
- * 分页响应
255
- */
256
- interface PaginationResponse<T> {
257
- items: T[];
258
- total: number;
259
- page: number;
260
- pageSize: number;
261
- totalPages: number;
262
- }
263
- /**
264
- * 文件ID到URL的映射
265
- */
266
- interface FileIdToUrlMap {
267
- [fileId: string]: string;
268
- }
269
- /**
270
- * 批量文件URL查询响应
271
- */
272
- interface BatchFileUrlsResponse {
273
- fileUrls: FileIdToUrlMap;
274
- missingFileIds: string[];
275
- }
276
- /**
277
- * MMD资源文件上传配置
278
- */
279
- interface MmdFileUploadConfig {
280
- /** 模块ID(用于文件分类) */
281
- moduleId: 'mmd-models' | 'mmd-motions' | 'mmd-cameras' | 'mmd-audios' | 'mmd-stages' | 'mmd-thumbnails';
282
- /** 允许的文件类型 */
283
- acceptedTypes: string[];
284
- /** 最大文件大小(MB) */
285
- maxFileSize: number;
286
- /** 文件描述 */
287
- description: string;
288
- /** 额外提示 */
289
- hint?: string;
290
- }
291
- /**
292
- * MMD资源类型配置映射
293
- */
294
- declare const MMD_RESOURCE_TYPE_CONFIGS: Record<string, MmdFileUploadConfig>;
295
- /**
296
- * MMD后台管理器组件属性
297
- */
298
- interface MmdAdminPanelProps {
299
- /** UniversalFile服务实例(用于文件上传) */
300
- fileService: any;
301
- /** 当前用户ID */
302
- userId: string;
303
- /** API基础路径 */
304
- apiBaseUrl?: string;
305
- /** 是否显示高级选项 */
306
- showAdvancedOptions?: boolean;
307
- /** 自定义样式类名 */
308
- className?: string;
309
- }
310
- /**
311
- * 播放列表编辑器组件属性
312
- */
313
- interface PlaylistEditorProps {
314
- /** 播放列表ID(编辑模式)或 undefined(创建模式) */
315
- playlistId?: string;
316
- /** UniversalFile服务实例 */
317
- fileService: any;
318
- /** 当前用户ID */
319
- userId: string;
320
- /** 保存回调 */
321
- onSave?: (playlist: MmdPlaylistWithFiles) => void;
322
- /** 取消回调 */
323
- onCancel?: () => void;
324
- }
325
- /**
326
- * 资源选择器组件属性
327
- */
328
- interface ResourceSelectorProps {
329
- /** 资源类型 */
330
- resourceType: 'model' | 'motion' | 'camera' | 'audio' | 'stage';
331
- /** UniversalFile服务实例 */
332
- fileService: any;
333
- /** 当前用户ID */
334
- userId: string;
335
- /** 当前选中的文件ID */
336
- value?: string;
337
- /** 选择回调 */
338
- onChange: (fileId: string, fileUrl: string) => void;
339
- /** 是否必填 */
340
- required?: boolean;
341
- }
342
- /**
343
- * 播放列表转换为前端格式
344
- */
345
- type PlaylistToFrontendConverter = (playlist: MmdPlaylistDB, nodes: MmdPlaylistNodeDB[], fileUrls: FileIdToUrlMap) => MmdPlaylistWithFiles;
346
- /**
347
- * 播放列表转换为MMD组件格式
348
- */
349
- type PlaylistToMmdConfigConverter = (playlist: MmdPlaylistWithFiles) => MMDPlaylistConfig;
350
- /**
351
- * 资源选项转换为前端格式
352
- */
353
- type ResourceOptionToFrontendConverter = (option: MmdResourceOptionDB, fileUrls: FileIdToUrlMap) => MmdResourceOptionWithFile;
354
- /**
355
- * 预设项转换为前端格式
356
- */
357
- type PresetItemToFrontendConverter = (item: MmdPresetItemDB, fileUrls: FileIdToUrlMap) => MmdPresetItemWithFiles;
358
- /**
359
- * 预设项转换为MMD资源格式
360
- */
361
- type PresetItemToMmdResourceConverter = (item: MmdPresetItemWithFiles) => MMDResourceItem;
362
-
363
- /**
364
- * MMD 后台管理面板 - 主入口组件
365
- *
366
- * 功能:
367
- * - 播放列表管理(列表、创建、编辑、删除)
368
- * - 预设项管理
369
- * - 资源选项管理
370
- * - 统计信息展示
371
- *
372
- * @package sa2kit/mmd/admin
373
- */
374
-
375
- /**
376
- * MMD后台管理面板
377
- */
378
- declare const MmdAdminPanel: React__default.FC<MmdAdminPanelProps>;
379
-
380
- /**
381
- * MMD 播放列表编辑器组件
382
- *
383
- * 功能:
384
- * - 创建/编辑播放列表
385
- * - 添加/删除/排序播放节点
386
- * - 为每个节点配置资源(模型、动作、音频等)
387
- * - 预览配置
388
- *
389
- * @package sa2kit/mmd/admin
390
- */
391
-
392
- /**
393
- * 播放列表编辑器
394
- */
395
- declare const MmdPlaylistEditor: React__default.FC<PlaylistEditorProps>;
396
-
397
- /**
398
- * MMD 资源选择器组件
399
- *
400
- * 集成 UniversalFile 文件上传组件,支持:
401
- * - 文件上传到OSS
402
- * - 文件列表浏览
403
- * - 文件选择
404
- * - 文件预览
405
- *
406
- * @package sa2kit/mmd/admin
407
- */
408
-
409
- /**
410
- * MMD资源选择器
411
- */
412
- declare const MmdResourceSelector: React__default.FC<ResourceSelectorProps>;
413
-
414
- /**
415
- * MMD 后台管理数据转换工具
416
- *
417
- * 提供数据库格式和前端格式之间的转换函数
418
- * 以及文件ID到URL的映射功能
419
- *
420
- * @package sa2kit/mmd/admin
421
- */
422
-
423
- /**
424
- * 从数据库记录中提取所有文件ID
425
- */
426
- declare function extractFileIdsFromPlaylist(playlist: MmdPlaylistDB, nodes: MmdPlaylistNodeDB[]): string[];
427
- /**
428
- * 从资源选项中提取文件ID
429
- */
430
- declare function extractFileIdsFromResourceOptions(options: MmdResourceOptionDB[]): string[];
431
- /**
432
- * 从预设项中提取文件ID
433
- */
434
- declare function extractFileIdsFromPresetItem(item: MmdPresetItemDB): string[];
435
- /**
436
- * 转换播放节点(数据库 -> 前端格式)
437
- */
438
- declare function convertPlaylistNodeToFrontend(node: MmdPlaylistNodeDB, fileUrls: FileIdToUrlMap): MmdPlaylistNodeWithFiles;
439
- /**
440
- * 转换播放列表(数据库 -> 前端格式)
441
- */
442
- declare function convertPlaylistToFrontend(playlist: MmdPlaylistDB, nodes: MmdPlaylistNodeDB[], fileUrls: FileIdToUrlMap): MmdPlaylistWithFiles;
443
- /**
444
- * 转换资源选项(数据库 -> 前端格式)
445
- */
446
- declare function convertResourceOptionToFrontend(option: MmdResourceOptionDB, fileUrls: FileIdToUrlMap): MmdResourceOptionWithFile;
447
- /**
448
- * 转换预设项(数据库 -> 前端格式)
449
- */
450
- declare function convertPresetItemToFrontend(item: MmdPresetItemDB, fileUrls: FileIdToUrlMap): MmdPresetItemWithFiles;
451
- /**
452
- * 转换播放节点(前端格式 -> MMD组件格式)
453
- */
454
- declare function convertNodeToMmdFormat(node: MmdPlaylistNodeWithFiles): MMDPlaylistNode;
455
- /**
456
- * 转换播放列表(前端格式 -> MMD组件格式)
457
- */
458
- declare function convertPlaylistToMmdConfig(playlist: MmdPlaylistWithFiles): MMDPlaylistConfig;
459
- /**
460
- * 转换预设项(前端格式 -> MMD资源项格式)
461
- */
462
- declare function convertPresetItemToMmdResource(item: MmdPresetItemWithFiles): MMDResourceItem;
463
- /**
464
- * 转换资源选项列表(前端格式 -> MMD资源选项格式)
465
- */
466
- declare function convertResourceOptionsToMmdFormat(options: MmdResourceOptionWithFile[]): MMDResourceOptions;
467
- /**
468
- * 验证文件URL映射是否完整
469
- */
470
- declare function validateFileUrls(requiredFileIds: string[], fileUrls: FileIdToUrlMap): {
471
- valid: boolean;
472
- missingIds: string[];
473
- };
474
- /**
475
- * 生成默认文件URL映射(用于开发/测试)
476
- */
477
- declare function generateMockFileUrls(fileIds: string[]): FileIdToUrlMap;
478
- /**
479
- * 合并多个文件URL映射
480
- */
481
- declare function mergeFileUrlMaps(...maps: FileIdToUrlMap[]): FileIdToUrlMap;
482
- /**
483
- * 从MMDResources提取文件路径(用于编辑时反向映射)
484
- */
485
- declare function extractPathsFromMmdResources(resources: MMDResources): string[];
486
-
487
- export { type BatchFileUrlsResponse, type CreatePlaylistNodeRequest, type CreatePlaylistRequest, type CreatePresetItemRequest, type CreateResourceOptionRequest, type FileIdToUrlMap, MMD_RESOURCE_TYPE_CONFIGS, MmdAdminPanel, type MmdAdminPanelProps, type MmdFileUploadConfig, type MmdPlaylistDB, MmdPlaylistEditor, type MmdPlaylistNodeDB, type MmdPlaylistNodeWithFiles, type MmdPlaylistWithFiles, type MmdPresetItemDB, type MmdPresetItemWithFiles, type MmdResourceOptionDB, type MmdResourceOptionWithFile, MmdResourceSelector, type PaginationQuery, type PaginationResponse, type PlaylistEditorProps, type PlaylistQuery, type PlaylistToFrontendConverter, type PlaylistToMmdConfigConverter, type PresetItemQuery, type PresetItemToFrontendConverter, type PresetItemToMmdResourceConverter, type ResourceOptionQuery, type ResourceOptionToFrontendConverter, type ResourceSelectorProps, type UpdatePlaylistNodeRequest, type UpdatePlaylistRequest, type UpdatePresetItemRequest, type UpdateResourceOptionRequest, convertNodeToMmdFormat, convertPlaylistNodeToFrontend, convertPlaylistToFrontend, convertPlaylistToMmdConfig, convertPresetItemToFrontend, convertPresetItemToMmdResource, convertResourceOptionToFrontend, convertResourceOptionsToMmdFormat, extractFileIdsFromPlaylist, extractFileIdsFromPresetItem, extractFileIdsFromResourceOptions, extractPathsFromMmdResources, generateMockFileUrls, mergeFileUrlMaps, validateFileUrls };