@adobe/ccweb-add-on-sdk-types 1.20.0 → 1.21.0
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/package.json +2 -2
- package/sandbox/express-document-sdk.d.ts +7 -0
- package/ui/ui-sdk.d.ts +70 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/ccweb-add-on-sdk-types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0",
|
|
4
4
|
"author": "Adobe",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Type definitions for Adobe Creative Cloud Web Add-on SDK.",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"tslib": "2.7.0",
|
|
42
42
|
"gl-matrix": "3.3.0",
|
|
43
|
-
"@swc/helpers": "0.5.
|
|
43
|
+
"@swc/helpers": "0.5.17"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "18.18.2",
|
|
@@ -1211,6 +1211,11 @@ export declare class MediaContainerNode extends Node {
|
|
|
1211
1211
|
* (as well as its maskShape sibling node).
|
|
1212
1212
|
*/
|
|
1213
1213
|
export declare abstract class MediaRectangleNode extends Node implements Readonly<IRectangularNode> {
|
|
1214
|
+
/**
|
|
1215
|
+
* Get {@link AddOnData} reference for managing private metadata attached to the media resource displayed by this node.
|
|
1216
|
+
* The same media resource may be reused in multiple places in the document, and all share the same AddOnData state.
|
|
1217
|
+
*/
|
|
1218
|
+
get mediaAddOnData(): AddOnData;
|
|
1214
1219
|
/**
|
|
1215
1220
|
* Current width of the "full frame" uncropped media, which may not be fully visible due to cropping/clipping by the
|
|
1216
1221
|
* enclosing media container's maskShape. This size may be different from the original image/video size in pixels, but
|
|
@@ -1785,6 +1790,8 @@ declare enum SceneNodeType {
|
|
|
1785
1790
|
mediaContainer = "MediaContainer",
|
|
1786
1791
|
/** Type of MediaContainerNode's "media rectangle" child when it is holding an image */
|
|
1787
1792
|
imageRectangle = "ImageRectangle",
|
|
1793
|
+
/** Type of MediaContainerNode's "media rectangle" child when it is holding an unknown media type */
|
|
1794
|
+
unknownMediaRectangle = "UnknownMediaRectangle",
|
|
1788
1795
|
/** Type of PageNode */
|
|
1789
1796
|
page = "Page",
|
|
1790
1797
|
/** Type of ComplexShapeNode, representing a complex prepackaged shape with fill and stroke, that appears as a leaf node in the UI */
|
package/ui/ui-sdk.d.ts
CHANGED
|
@@ -151,6 +151,10 @@ export declare enum AppEvent {
|
|
|
151
151
|
* triggered when drag is complete on the currently dragged element.
|
|
152
152
|
*/
|
|
153
153
|
dragend = "dragend",
|
|
154
|
+
/**
|
|
155
|
+
* triggered when drag is cancelled on the currently dragged element.
|
|
156
|
+
*/
|
|
157
|
+
dragcancel = "dragcancel",
|
|
154
158
|
|
|
155
159
|
/**
|
|
156
160
|
* triggered when the document id is available in the application.
|
|
@@ -186,6 +190,7 @@ declare interface AppEventsTypeMap {
|
|
|
186
190
|
[AppEvent.reset]: undefined;
|
|
187
191
|
[AppEvent.dragstart]: AppDragStartEventData;
|
|
188
192
|
[AppEvent.dragend]: AppDragEndEventData;
|
|
193
|
+
[AppEvent.dragcancel]: undefined;
|
|
189
194
|
|
|
190
195
|
[AppEvent.documentIdAvailable]: DocumentIdAvailableEventData;
|
|
191
196
|
[AppEvent.documentLinkAvailable]: DocumentLinkAvailableEventData;
|
|
@@ -215,6 +220,11 @@ export declare interface Application extends ApplicationBase {
|
|
|
215
220
|
* Represents the active document of the host application
|
|
216
221
|
*/
|
|
217
222
|
readonly document: Document_2;
|
|
223
|
+
/**
|
|
224
|
+
* @experimental - Experimental API
|
|
225
|
+
* Invoke command/actions in an add-on and handle response.
|
|
226
|
+
*/
|
|
227
|
+
readonly command: Command;
|
|
218
228
|
/**
|
|
219
229
|
* OAuth 2.0 middleware for handling user authorization.
|
|
220
230
|
*/
|
|
@@ -349,6 +359,12 @@ export declare type AuthorizationRequest = {
|
|
|
349
359
|
* are required in the Authorization URL as query string parameters.
|
|
350
360
|
*/
|
|
351
361
|
additionalParameters?: Map<string, string>;
|
|
362
|
+
/**
|
|
363
|
+
* Additional parameters, specific to an OAuth provider which
|
|
364
|
+
* are required in the Redirect URL as query string parameters.
|
|
365
|
+
* Not applicable for {@link AuthorizeWithOwnRedirectRequest}
|
|
366
|
+
*/
|
|
367
|
+
additionalRedirectParameters?: Map<string, string>;
|
|
352
368
|
};
|
|
353
369
|
|
|
354
370
|
/**
|
|
@@ -655,6 +671,25 @@ export declare enum ColorPickerPlacement {
|
|
|
655
671
|
right = "right"
|
|
656
672
|
}
|
|
657
673
|
|
|
674
|
+
/**
|
|
675
|
+
* @experimental - Experimental API
|
|
676
|
+
* Provides APIs to handle command execution in the add-on.
|
|
677
|
+
*/
|
|
678
|
+
export declare interface Command {
|
|
679
|
+
/**
|
|
680
|
+
* @experimental - Experimental API
|
|
681
|
+
* Register a handler for handling command execution in the add-on.
|
|
682
|
+
*
|
|
683
|
+
* _Note:_ This is similar to a JavaScript event handler.
|
|
684
|
+
* If there are multiple handlers registered for a command,
|
|
685
|
+
* each will be invoked when the host application triggers the command.
|
|
686
|
+
* In most of the cases, one handler per command is the way to go.
|
|
687
|
+
* @param command - Command triggered from the host application.
|
|
688
|
+
* @param handler - Handler for command execution.
|
|
689
|
+
*/
|
|
690
|
+
register(command: string, handler: (params: Record<string, unknown>) => unknown): void;
|
|
691
|
+
}
|
|
692
|
+
|
|
658
693
|
declare namespace Constants {
|
|
659
694
|
export {
|
|
660
695
|
Range_2 as Range,
|
|
@@ -854,15 +889,15 @@ declare interface Document_2 {
|
|
|
854
889
|
/**
|
|
855
890
|
* Add image/Ps/Ai files to the current page
|
|
856
891
|
*/
|
|
857
|
-
addImage(blob: Blob, attributes?: MediaAttributes): Promise<void>;
|
|
892
|
+
addImage(blob: Blob, attributes?: MediaAttributes, importAddOnData?: ImportAddOnData): Promise<void>;
|
|
858
893
|
/**
|
|
859
894
|
* Add GIF files to the current page
|
|
860
895
|
*/
|
|
861
|
-
addAnimatedImage(blob: Blob, attributes?: MediaAttributes): Promise<void>;
|
|
896
|
+
addAnimatedImage(blob: Blob, attributes?: MediaAttributes, importAddOnData?: ImportAddOnData): Promise<void>;
|
|
862
897
|
/**
|
|
863
898
|
* Add video to the current page
|
|
864
899
|
*/
|
|
865
|
-
addVideo(blob: Blob, attributes?: MediaAttributes): Promise<void>;
|
|
900
|
+
addVideo(blob: Blob, attributes?: MediaAttributes, importAddOnData?: ImportAddOnData): Promise<void>;
|
|
866
901
|
/**
|
|
867
902
|
* Add audio to the current page
|
|
868
903
|
*/
|
|
@@ -876,6 +911,11 @@ declare interface Document_2 {
|
|
|
876
911
|
* Get metadata of all or range of pages of the document
|
|
877
912
|
*/
|
|
878
913
|
getPagesMetadata(options: PageMetadataOptions): Promise<PageMetadata[]>;
|
|
914
|
+
/**
|
|
915
|
+
* @experimental - Experimental API
|
|
916
|
+
* Get the currently selected page ids.
|
|
917
|
+
*/
|
|
918
|
+
getSelectedPageIds(): Promise<string[]>;
|
|
879
919
|
/**
|
|
880
920
|
* Get document id
|
|
881
921
|
*/
|
|
@@ -1062,6 +1102,10 @@ export declare enum EntrypointType {
|
|
|
1062
1102
|
* Widget entrypoint type.
|
|
1063
1103
|
*/
|
|
1064
1104
|
WIDGET = "widget",
|
|
1105
|
+
/**
|
|
1106
|
+
* Command entrypoint type.
|
|
1107
|
+
*/
|
|
1108
|
+
COMMAND = "command",
|
|
1065
1109
|
/**
|
|
1066
1110
|
* Script entrypoint type.
|
|
1067
1111
|
* add-ons with script entrypoint type can use only the document sandbox APIs.
|
|
@@ -1182,6 +1226,24 @@ export declare enum FrameRate {
|
|
|
1182
1226
|
fps60 = 60
|
|
1183
1227
|
}
|
|
1184
1228
|
|
|
1229
|
+
/**
|
|
1230
|
+
* Represents the add-on data for a node.
|
|
1231
|
+
* Note: This support is not present for PSD/AI assets.
|
|
1232
|
+
*/
|
|
1233
|
+
export declare interface ImportAddOnData {
|
|
1234
|
+
/**
|
|
1235
|
+
* The node add-on data which will persist on the image frame even if the image content is replaced with a
|
|
1236
|
+
* different one. This data can be accessed later via the MediaContainerNode.addOnData API.
|
|
1237
|
+
*/
|
|
1238
|
+
nodeAddOnData?: Record<string, string>;
|
|
1239
|
+
/**
|
|
1240
|
+
* The media add-on data which will reset if the image is replaced with a different one. All copies of the
|
|
1241
|
+
* same image in the document will share the same mediaAddOnData. This data can be accessed later via the
|
|
1242
|
+
* MediaRectangleNode.mediaAddOnData API.
|
|
1243
|
+
*/
|
|
1244
|
+
mediaAddOnData?: Record<string, string>;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1185
1247
|
/**
|
|
1186
1248
|
* Type of input dialog data passed from the add-on.
|
|
1187
1249
|
*/
|
|
@@ -1906,7 +1968,11 @@ export declare enum RuntimeType {
|
|
|
1906
1968
|
/**
|
|
1907
1969
|
* Add-On's document model sandbox - JS runtime that hosts add-on code that has direct access to the full model.
|
|
1908
1970
|
*/
|
|
1909
|
-
documentSandbox = "documentSandbox"
|
|
1971
|
+
documentSandbox = "documentSandbox",
|
|
1972
|
+
/**
|
|
1973
|
+
* Runtime that hosts the add-on command logic.
|
|
1974
|
+
*/
|
|
1975
|
+
command = "command"
|
|
1910
1976
|
}
|
|
1911
1977
|
|
|
1912
1978
|
/**
|