@vvfx/sdk 0.0.0-alpha.46 → 0.0.0-alpha.48
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/dist/index.cjs +1 -1
- package/dist/index.d.cts +37 -2
- package/dist/index.d.ts +37 -2
- package/dist/index.global.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -339,6 +339,29 @@ declare class Box2 {
|
|
|
339
339
|
rotate(angle: number, center?: Vector2): this;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
+
type CreateOperation = {
|
|
343
|
+
type: 'create';
|
|
344
|
+
newData: ItemCreateInfo;
|
|
345
|
+
};
|
|
346
|
+
type DeleteOperation = {
|
|
347
|
+
type: 'delete';
|
|
348
|
+
oldData: ItemCreateInfo;
|
|
349
|
+
};
|
|
350
|
+
type UpdateOperation = {
|
|
351
|
+
type: 'update';
|
|
352
|
+
newData: ItemCreateInfo;
|
|
353
|
+
oldData: ItemCreateInfo;
|
|
354
|
+
};
|
|
355
|
+
type Operation = CreateOperation | UpdateOperation | DeleteOperation;
|
|
356
|
+
declare class UndoRedo {
|
|
357
|
+
private index;
|
|
358
|
+
private operations;
|
|
359
|
+
push(operation: Operation): void;
|
|
360
|
+
undo(): Operation | undefined;
|
|
361
|
+
redo(): Operation | undefined;
|
|
362
|
+
clear(): void;
|
|
363
|
+
}
|
|
364
|
+
|
|
342
365
|
declare const MEDIA_TYPE: {
|
|
343
366
|
readonly APNG: "APNG";
|
|
344
367
|
readonly MP4: "MP4";
|
|
@@ -965,6 +988,11 @@ type SDKEvents = {
|
|
|
965
988
|
text: string;
|
|
966
989
|
fontFamily: string;
|
|
967
990
|
}];
|
|
991
|
+
'canvasChange': [Operation];
|
|
992
|
+
'viewportTransform': [{
|
|
993
|
+
zoom: number;
|
|
994
|
+
translatoion: [number, number];
|
|
995
|
+
}];
|
|
968
996
|
};
|
|
969
997
|
declare class SDK {
|
|
970
998
|
static config: SDKConfig;
|
|
@@ -977,6 +1005,7 @@ declare class SDK {
|
|
|
977
1005
|
private _gestureHandler;
|
|
978
1006
|
private disposables;
|
|
979
1007
|
private _isSwitchScene;
|
|
1008
|
+
private _canvasUndoRedo;
|
|
980
1009
|
player: Player;
|
|
981
1010
|
_container: HTMLElement;
|
|
982
1011
|
private _playerContainer;
|
|
@@ -984,9 +1013,10 @@ declare class SDK {
|
|
|
984
1013
|
get container(): HTMLElement;
|
|
985
1014
|
get pageData(): PageData | undefined;
|
|
986
1015
|
get exportStatus(): string | undefined;
|
|
1016
|
+
get canvasUndoRedo(): UndoRedo;
|
|
987
1017
|
private get exportOptions();
|
|
988
1018
|
dispose(): void;
|
|
989
|
-
on: <E extends "progress" | "loadingItemChange" | "selectedItemChange" | "preSelectedItemChange" | "selectedViewChange" | "pageDataChange" | "zoomChange" | "itemPropertyChange" | "exportProgress" | "exportDone" | "exportComplete" | "sdkConfigChange" | "cutBoxChange" | "expandBoxChange" | "textInput">(eventName: E, listener: _galacean_effects.EventEmitterListener<SDKEvents[E]>, options?: _galacean_effects.EventEmitterOptions) => () => void;
|
|
1019
|
+
on: <E extends "progress" | "loadingItemChange" | "selectedItemChange" | "preSelectedItemChange" | "selectedViewChange" | "pageDataChange" | "zoomChange" | "itemPropertyChange" | "exportProgress" | "exportDone" | "exportComplete" | "sdkConfigChange" | "cutBoxChange" | "expandBoxChange" | "textInput" | "canvasChange" | "viewportTransform">(eventName: E, listener: _galacean_effects.EventEmitterListener<SDKEvents[E]>, options?: _galacean_effects.EventEmitterOptions) => () => void;
|
|
990
1020
|
private getInitParam;
|
|
991
1021
|
/**
|
|
992
1022
|
* 检测导出是否需要重新初始化
|
|
@@ -1204,6 +1234,11 @@ declare class SDK {
|
|
|
1204
1234
|
getViewBoxById(id: string): Box2;
|
|
1205
1235
|
getViewItemById(id: string): ViewItem | undefined;
|
|
1206
1236
|
getViewProperty(id: number): ViewProperty | undefined;
|
|
1237
|
+
pageMove(shift: [number, number]): void;
|
|
1238
|
+
pageZoom(shift: number, center?: [number, number]): void;
|
|
1239
|
+
setPictureCutGizmoLockScale(state: boolean): void;
|
|
1240
|
+
setPictureExpandGizmoLockScale(state: boolean): void;
|
|
1241
|
+
viewportFit(): void;
|
|
1207
1242
|
}
|
|
1208
1243
|
|
|
1209
1244
|
type SizeAdaptDirection = 'x' | 'y';
|
|
@@ -1683,4 +1718,4 @@ declare enum ItemOrderAction {
|
|
|
1683
1718
|
SendBackward = 3
|
|
1684
1719
|
}
|
|
1685
1720
|
|
|
1686
|
-
export { type ActiveData, type BaseFormProperty, Box2, ItemOrderAction, type NullCreateInfo, type PageData, type PageFormTypedProperty, type PageProperty, SDK, type SDKEvents, type SDKInputParam, type SDKOptions, type SpecificPageFormProps, type SpriteCreateInfo, type SpriteFormProperty, type TextCreateInfo, type TextFormProperty, Vector2, type ViewItem, type ViewItemTypedProperty, type ViewParam, type ViewProperty };
|
|
1721
|
+
export { type ActiveData, type BaseFormProperty, Box2, type CreateOperation, type DeleteOperation, type ItemCreateInfo, ItemOrderAction, type NullCreateInfo, type Operation, type PageData, type PageFormTypedProperty, type PageProperty, SDK, type SDKEvents, type SDKInputParam, type SDKOptions, type SpecificPageFormProps, type SpriteCreateInfo, type SpriteFormProperty, type TextCreateInfo, type TextFormProperty, type UpdateOperation, Vector2, type ViewItem, type ViewItemTypedProperty, type ViewParam, type ViewProperty };
|
package/dist/index.d.ts
CHANGED
|
@@ -339,6 +339,29 @@ declare class Box2 {
|
|
|
339
339
|
rotate(angle: number, center?: Vector2): this;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
+
type CreateOperation = {
|
|
343
|
+
type: 'create';
|
|
344
|
+
newData: ItemCreateInfo;
|
|
345
|
+
};
|
|
346
|
+
type DeleteOperation = {
|
|
347
|
+
type: 'delete';
|
|
348
|
+
oldData: ItemCreateInfo;
|
|
349
|
+
};
|
|
350
|
+
type UpdateOperation = {
|
|
351
|
+
type: 'update';
|
|
352
|
+
newData: ItemCreateInfo;
|
|
353
|
+
oldData: ItemCreateInfo;
|
|
354
|
+
};
|
|
355
|
+
type Operation = CreateOperation | UpdateOperation | DeleteOperation;
|
|
356
|
+
declare class UndoRedo {
|
|
357
|
+
private index;
|
|
358
|
+
private operations;
|
|
359
|
+
push(operation: Operation): void;
|
|
360
|
+
undo(): Operation | undefined;
|
|
361
|
+
redo(): Operation | undefined;
|
|
362
|
+
clear(): void;
|
|
363
|
+
}
|
|
364
|
+
|
|
342
365
|
declare const MEDIA_TYPE: {
|
|
343
366
|
readonly APNG: "APNG";
|
|
344
367
|
readonly MP4: "MP4";
|
|
@@ -965,6 +988,11 @@ type SDKEvents = {
|
|
|
965
988
|
text: string;
|
|
966
989
|
fontFamily: string;
|
|
967
990
|
}];
|
|
991
|
+
'canvasChange': [Operation];
|
|
992
|
+
'viewportTransform': [{
|
|
993
|
+
zoom: number;
|
|
994
|
+
translatoion: [number, number];
|
|
995
|
+
}];
|
|
968
996
|
};
|
|
969
997
|
declare class SDK {
|
|
970
998
|
static config: SDKConfig;
|
|
@@ -977,6 +1005,7 @@ declare class SDK {
|
|
|
977
1005
|
private _gestureHandler;
|
|
978
1006
|
private disposables;
|
|
979
1007
|
private _isSwitchScene;
|
|
1008
|
+
private _canvasUndoRedo;
|
|
980
1009
|
player: Player;
|
|
981
1010
|
_container: HTMLElement;
|
|
982
1011
|
private _playerContainer;
|
|
@@ -984,9 +1013,10 @@ declare class SDK {
|
|
|
984
1013
|
get container(): HTMLElement;
|
|
985
1014
|
get pageData(): PageData | undefined;
|
|
986
1015
|
get exportStatus(): string | undefined;
|
|
1016
|
+
get canvasUndoRedo(): UndoRedo;
|
|
987
1017
|
private get exportOptions();
|
|
988
1018
|
dispose(): void;
|
|
989
|
-
on: <E extends "progress" | "loadingItemChange" | "selectedItemChange" | "preSelectedItemChange" | "selectedViewChange" | "pageDataChange" | "zoomChange" | "itemPropertyChange" | "exportProgress" | "exportDone" | "exportComplete" | "sdkConfigChange" | "cutBoxChange" | "expandBoxChange" | "textInput">(eventName: E, listener: _galacean_effects.EventEmitterListener<SDKEvents[E]>, options?: _galacean_effects.EventEmitterOptions) => () => void;
|
|
1019
|
+
on: <E extends "progress" | "loadingItemChange" | "selectedItemChange" | "preSelectedItemChange" | "selectedViewChange" | "pageDataChange" | "zoomChange" | "itemPropertyChange" | "exportProgress" | "exportDone" | "exportComplete" | "sdkConfigChange" | "cutBoxChange" | "expandBoxChange" | "textInput" | "canvasChange" | "viewportTransform">(eventName: E, listener: _galacean_effects.EventEmitterListener<SDKEvents[E]>, options?: _galacean_effects.EventEmitterOptions) => () => void;
|
|
990
1020
|
private getInitParam;
|
|
991
1021
|
/**
|
|
992
1022
|
* 检测导出是否需要重新初始化
|
|
@@ -1204,6 +1234,11 @@ declare class SDK {
|
|
|
1204
1234
|
getViewBoxById(id: string): Box2;
|
|
1205
1235
|
getViewItemById(id: string): ViewItem | undefined;
|
|
1206
1236
|
getViewProperty(id: number): ViewProperty | undefined;
|
|
1237
|
+
pageMove(shift: [number, number]): void;
|
|
1238
|
+
pageZoom(shift: number, center?: [number, number]): void;
|
|
1239
|
+
setPictureCutGizmoLockScale(state: boolean): void;
|
|
1240
|
+
setPictureExpandGizmoLockScale(state: boolean): void;
|
|
1241
|
+
viewportFit(): void;
|
|
1207
1242
|
}
|
|
1208
1243
|
|
|
1209
1244
|
type SizeAdaptDirection = 'x' | 'y';
|
|
@@ -1683,4 +1718,4 @@ declare enum ItemOrderAction {
|
|
|
1683
1718
|
SendBackward = 3
|
|
1684
1719
|
}
|
|
1685
1720
|
|
|
1686
|
-
export { type ActiveData, type BaseFormProperty, Box2, ItemOrderAction, type NullCreateInfo, type PageData, type PageFormTypedProperty, type PageProperty, SDK, type SDKEvents, type SDKInputParam, type SDKOptions, type SpecificPageFormProps, type SpriteCreateInfo, type SpriteFormProperty, type TextCreateInfo, type TextFormProperty, Vector2, type ViewItem, type ViewItemTypedProperty, type ViewParam, type ViewProperty };
|
|
1721
|
+
export { type ActiveData, type BaseFormProperty, Box2, type CreateOperation, type DeleteOperation, type ItemCreateInfo, ItemOrderAction, type NullCreateInfo, type Operation, type PageData, type PageFormTypedProperty, type PageProperty, SDK, type SDKEvents, type SDKInputParam, type SDKOptions, type SpecificPageFormProps, type SpriteCreateInfo, type SpriteFormProperty, type TextCreateInfo, type TextFormProperty, type UpdateOperation, Vector2, type ViewItem, type ViewItemTypedProperty, type ViewParam, type ViewProperty };
|