@cocos/cocos-cli-types 0.0.1-alpha.22.1 → 0.0.1-alpha.23.1

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/assets.d.ts CHANGED
@@ -403,6 +403,11 @@ declare interface FontDefDictionary {
403
403
  [charId: number]: FontDef;
404
404
  }
405
405
 
406
+ /**
407
+ * Generate Thumbnail // 生成资源缩略图
408
+ */
409
+ export declare function generateThumbnail(urlOrUUIDOrPath: string, size?: ThumbnailSize): Promise<ThumbnailInfo | null>;
410
+
406
411
  /** glTF 动画资源的 userData */
407
412
  declare interface GltfAnimationAssetUserData {
408
413
  gltfIndex: number;
@@ -589,7 +594,6 @@ export declare interface IAssetConfig {
589
594
  description?: string;
590
595
  docURL?: string;
591
596
  userDataConfig?: Record<string, IUerDataConfigItem>;
592
- iconInfo?: ThumbnailInfo;
593
597
  }
594
598
 
595
599
  export declare interface IAssetDBInfo extends AssetDBOptions_2 {
@@ -636,6 +640,7 @@ export declare interface IAssetInfo {
636
640
  mtime?: number; // 资源文件的 mtime
637
641
  depends?: string[]; // 依赖的资源 uuid 信息
638
642
  dependeds?: string[]; // 被依赖的资源 uuid 信息
643
+ temp?: string; // 资源临时文件目录
639
644
  }
640
645
 
641
646
  export declare interface IAssetMeta<T extends ISupportCreateType | 'unknown' = 'unknown'> {
@@ -1205,6 +1210,11 @@ export declare function queryPath(urlOrUuid: string): Promise<string>;
1205
1210
  */
1206
1211
  export declare function querySortedPlugins(filterOptions?: FilterPluginOptions): Promise<IPluginScriptInfo[]>;
1207
1212
 
1213
+ /**
1214
+ * Query Thumbnail Handlers // 查询支持缩略图生成的资源处理器列表
1215
+ */
1216
+ export declare function queryThumbnailHandlers(): string[];
1217
+
1208
1218
  /**
1209
1219
  * Query Asset URL // 查询资源 URL
1210
1220
  */
@@ -1402,6 +1412,8 @@ declare interface ThumbnailInfo {
1402
1412
  value: string; // 具体 icon 名字或者 image 路径,image 路径支持绝对路径、 db:// 、 project:// 、和 packages:// 下的路径
1403
1413
  }
1404
1414
 
1415
+ declare type ThumbnailSize = 'large' | 'small' | 'middle' | 'origin';
1416
+
1405
1417
  /**
1406
1418
  * Update Asset User Data // 更新资源用户数据
1407
1419
  */
package/builder.d.ts CHANGED
@@ -1751,6 +1751,7 @@ declare interface IAssetInfo_2 {
1751
1751
  mtime?: number; // 资源文件的 mtime
1752
1752
  depends?: string[]; // 依赖的资源 uuid 信息
1753
1753
  dependeds?: string[]; // 被依赖的资源 uuid 信息
1754
+ temp?: string; // 资源临时文件目录
1754
1755
  }
1755
1756
 
1756
1757
  export declare type IAssetInfoMap = Record<UUID, IAssetInfo>;