@vvfx/sdk 0.2.2-alpha.0 → 0.2.2-alpha.2

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.
@@ -16,6 +16,8 @@ export declare class TextItem extends BaseItem {
16
16
  */
17
17
  property: TextItemProperty;
18
18
  constructor(options: TextItemOptions);
19
+ get pixelWidth(): number;
20
+ get pixelHeight(): number;
19
21
  /**
20
22
  * @description 文本内容
21
23
  */
package/dist/sdk.d.ts CHANGED
@@ -308,9 +308,9 @@ export declare class SDK {
308
308
  setMaskGizmoConfig(config: Partial<MaskGizmoConfig>): void;
309
309
  /**
310
310
  * @description 设置蒙版工具模式
311
- * @param mode 模式类型:'paint' 表示涂抹,'erase' 表示擦除
311
+ * @param mode 模式类型:'paint' 笔刷涂抹、'erase' 笔刷逐笔擦除、'box-erase' 框选擦除、'box-paint' 框选涂抹
312
312
  */
313
- setMaskGizmoMode(mode: 'paint' | 'erase'): void;
313
+ setMaskGizmoMode(mode: 'paint' | 'erase' | 'box-erase' | 'box-paint'): void;
314
314
  /**
315
315
  * 撤销蒙版操作
316
316
  * @returns 是否成功撤销
package/dist/types.d.ts CHANGED
@@ -468,6 +468,10 @@ export type PageAutoLayoutParam = {
468
468
  * @description 自动布局间隔
469
469
  */
470
470
  gap?: number;
471
+ /**
472
+ * 视图自适应偏移参数
473
+ */
474
+ shift?: ViewportFitShiftParam;
471
475
  };
472
476
  /**
473
477
  * @description 页面配置
@@ -284,6 +284,15 @@ export declare class PageDataUtils {
284
284
  setItemFontFamily(id: string, fontFamilyName: string, url: string): Promise<void>;
285
285
  changeItemPropertyByCreateInfo(itemCreateInfo: ItemCreateInfo | ItemCreateInfo[]): Promise<void>;
286
286
  getViewBoxByBox(box: Box2): Box2;
287
+ /**
288
+ * @description 快照当前所有视频元素的播放状态(播放/暂停 + 当前播放进度),用于属性刷新后恢复,
289
+ * 避免设置属性导致全量视频被自动播放或进度被重置回 0s
290
+ */
291
+ private snapshotVideoPlayStates;
292
+ /**
293
+ * @description 按快照恢复视频元素的播放状态(先 pause 再 seek,最后按原状态 play/pause,避免进度抖动)
294
+ */
295
+ private restoreVideoPlayStates;
287
296
  playVideoItem(id?: string): void;
288
297
  pauseVideoItem(id?: string): void;
289
298
  playEffectsItem(id?: string): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vvfx/sdk",
3
3
  "description": "TODO",
4
- "version": "0.2.2-alpha.0",
4
+ "version": "0.2.2-alpha.2",
5
5
  "main": "./dist/index.mjs",
6
6
  "module": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -15,15 +15,6 @@
15
15
  "require": "./dist/index.mjs"
16
16
  }
17
17
  },
18
- "scripts": {
19
- "prebuild": "pnpm clean",
20
- "build": "pnpm build:declaration && pnpm build:module",
21
- "build:module": "rollup -c --bundleConfigAsCjs",
22
- "build:declaration": "tsc -d --emitDeclarationOnly",
23
- "clean": "rimraf dist *.tsbuildinfo",
24
- "test": "vitest run",
25
- "prepublishOnly": "pnpm build"
26
- },
27
18
  "dependencies": {
28
19
  "@ffmpeg/ffmpeg": "0.12.15",
29
20
  "@ffmpeg/util": "0.12.2",
@@ -72,5 +63,13 @@
72
63
  "publishConfig": {
73
64
  "access": "public",
74
65
  "registry": "https://registry.npmjs.org"
66
+ },
67
+ "scripts": {
68
+ "prebuild": "pnpm clean",
69
+ "build": "pnpm build:declaration && pnpm build:module",
70
+ "build:module": "rollup -c --bundleConfigAsCjs",
71
+ "build:declaration": "tsc -d --emitDeclarationOnly",
72
+ "clean": "rimraf dist *.tsbuildinfo",
73
+ "test": "vitest run"
75
74
  }
76
- }
75
+ }