@adobe/ccweb-add-on-sdk-types 1.6.1 → 1.8.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 -1
- package/ui/ui-sdk.d.ts +145 -1
- package/tsconfig.json +0 -28
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.8.0",
|
|
4
4
|
"author": "Adobe",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Type definitions for Adobe Creative Cloud Web Add-on SDK.",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"tslib": "2.6.2",
|
|
42
|
+
"@swc/helpers": "0.5.12",
|
|
42
43
|
"gl-matrix": "3.3.0"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
package/ui/ui-sdk.d.ts
CHANGED
|
@@ -130,6 +130,10 @@ export declare enum AppEvent {
|
|
|
130
130
|
* triggered when the locale is changed in the application.
|
|
131
131
|
*/
|
|
132
132
|
localechange = "localechange",
|
|
133
|
+
/**
|
|
134
|
+
* triggered when the regional format is changed in the application.
|
|
135
|
+
*/
|
|
136
|
+
formatchange = "formatchange",
|
|
133
137
|
/**
|
|
134
138
|
* triggered when drag is started on the currently dragged element.
|
|
135
139
|
*/
|
|
@@ -157,6 +161,7 @@ export declare type AppEventHandlerType<Event extends AppEventType> = (data: App
|
|
|
157
161
|
declare interface AppEventsTypeMap {
|
|
158
162
|
[AppEvent.themechange]: AppThemeChangeEventData;
|
|
159
163
|
[AppEvent.localechange]: AppLocaleChangeEventData;
|
|
164
|
+
[AppEvent.formatchange]: AppFormatChangeEventData;
|
|
160
165
|
[AppEvent.dragstart]: AppDragStartEventData;
|
|
161
166
|
[AppEvent.dragend]: AppDragEndEventData;
|
|
162
167
|
|
|
@@ -166,6 +171,13 @@ declare interface AppEventsTypeMap {
|
|
|
166
171
|
|
|
167
172
|
export declare type AppEventType = keyof AppEventsTypeMap & string;
|
|
168
173
|
|
|
174
|
+
/**
|
|
175
|
+
* The payload data sent to the App FormatChange event handler.
|
|
176
|
+
*/
|
|
177
|
+
export declare interface AppFormatChangeEventData {
|
|
178
|
+
format: string;
|
|
179
|
+
}
|
|
180
|
+
|
|
169
181
|
/**
|
|
170
182
|
* Interface that represents the underlying Application.
|
|
171
183
|
*/
|
|
@@ -212,9 +224,14 @@ declare interface ApplicationBase {
|
|
|
212
224
|
* Enable drag to document on the given element
|
|
213
225
|
* @param element - Element to enable drag on.
|
|
214
226
|
* @param dragCallbacks - Interface to pass all drag realated callbacks (previewCallback & completionCallback).
|
|
227
|
+
* @param dragOptions - Interface to pass all drag related options.
|
|
215
228
|
* @returns DisableDragToDocument - Callback to undo the changes made by enableDragToDocument
|
|
216
229
|
*/
|
|
217
|
-
enableDragToDocument(
|
|
230
|
+
enableDragToDocument(
|
|
231
|
+
element: HTMLElement,
|
|
232
|
+
dragCallbacks: DragCallbacks,
|
|
233
|
+
dragOptions?: DragOptions
|
|
234
|
+
): DisableDragToDocument;
|
|
218
235
|
/**
|
|
219
236
|
* @experimental - Experimental API
|
|
220
237
|
* Register iframe with the add-on SDK.
|
|
@@ -236,6 +253,12 @@ declare interface ApplicationBase {
|
|
|
236
253
|
* @returns if the user is premium user or not
|
|
237
254
|
*/
|
|
238
255
|
startPremiumUpgradeIfFreeUser(): Promise<boolean>;
|
|
256
|
+
/**
|
|
257
|
+
* @experimental - Experimental API
|
|
258
|
+
* Get information regarding current platform.
|
|
259
|
+
* @returns the details regarding the current platform.
|
|
260
|
+
*/
|
|
261
|
+
getCurrentPlatform(): Promise<CurrentPlatformPayload>;
|
|
239
262
|
}
|
|
240
263
|
|
|
241
264
|
/**
|
|
@@ -482,11 +505,37 @@ declare namespace Constants {
|
|
|
482
505
|
MediaTabs,
|
|
483
506
|
ElementsTabs,
|
|
484
507
|
PanelActionType,
|
|
508
|
+
PlatformEnvironment,
|
|
509
|
+
DeviceClass,
|
|
510
|
+
PlatformType,
|
|
485
511
|
AuthorizationStatus
|
|
486
512
|
};
|
|
487
513
|
}
|
|
488
514
|
export { Constants };
|
|
489
515
|
|
|
516
|
+
/**
|
|
517
|
+
* @experimental - Experimental API
|
|
518
|
+
* Interface for the current platform
|
|
519
|
+
*/
|
|
520
|
+
export declare interface CurrentPlatformPayload {
|
|
521
|
+
/**
|
|
522
|
+
* Purchases are NOT allowed in the {@link PlatformEnvironment.app} as of now
|
|
523
|
+
*/
|
|
524
|
+
inAppPurchaseAllowed: boolean;
|
|
525
|
+
/**
|
|
526
|
+
* Denotes the platform type
|
|
527
|
+
*/
|
|
528
|
+
platform: PlatformType;
|
|
529
|
+
/**
|
|
530
|
+
* Denotes the current environment
|
|
531
|
+
*/
|
|
532
|
+
environment: PlatformEnvironment;
|
|
533
|
+
/**
|
|
534
|
+
* Denotes the device class
|
|
535
|
+
*/
|
|
536
|
+
deviceClass: DeviceClass;
|
|
537
|
+
}
|
|
538
|
+
|
|
490
539
|
/**
|
|
491
540
|
* Represents the current logged-in user accessing the host application
|
|
492
541
|
*/
|
|
@@ -544,6 +593,25 @@ export declare interface DevFlags {
|
|
|
544
593
|
simulateFreeUser: boolean;
|
|
545
594
|
}
|
|
546
595
|
|
|
596
|
+
/**
|
|
597
|
+
* @experimental - Experimental API
|
|
598
|
+
* Denotes the device class
|
|
599
|
+
*/
|
|
600
|
+
export declare enum DeviceClass {
|
|
601
|
+
/**
|
|
602
|
+
* Mobile Device
|
|
603
|
+
*/
|
|
604
|
+
mobile = "mobile",
|
|
605
|
+
/**
|
|
606
|
+
* Tablet Device
|
|
607
|
+
*/
|
|
608
|
+
tablet = "tablet",
|
|
609
|
+
/**
|
|
610
|
+
* Desktop
|
|
611
|
+
*/
|
|
612
|
+
desktop = "desktop"
|
|
613
|
+
}
|
|
614
|
+
|
|
547
615
|
/**
|
|
548
616
|
* Represents the Modal Dialog that the add-on has presented to the user.
|
|
549
617
|
*/
|
|
@@ -685,6 +753,16 @@ export declare interface DragCompletionData {
|
|
|
685
753
|
attributes?: MediaAttributes;
|
|
686
754
|
}
|
|
687
755
|
|
|
756
|
+
/**
|
|
757
|
+
* Interface to provide drag options which can be passed to enableDragToDocument to change the drag behavior.
|
|
758
|
+
*/
|
|
759
|
+
declare interface DragOptions {
|
|
760
|
+
/**
|
|
761
|
+
* Use preview size for the drag image instead of the element size
|
|
762
|
+
*/
|
|
763
|
+
usePreviewSizeForDragImage?: boolean;
|
|
764
|
+
}
|
|
765
|
+
|
|
688
766
|
export declare type DragPreviewCallback = (element: HTMLElement) => URL;
|
|
689
767
|
|
|
690
768
|
/**
|
|
@@ -1147,6 +1225,68 @@ export declare interface PdfRenditionOptions extends RenditionOptions {
|
|
|
1147
1225
|
pageBoxes?: PdfPageBoxes;
|
|
1148
1226
|
}
|
|
1149
1227
|
|
|
1228
|
+
/**
|
|
1229
|
+
* @experimental - Experimental API
|
|
1230
|
+
* Denotes the enum for current environment
|
|
1231
|
+
*/
|
|
1232
|
+
export declare enum PlatformEnvironment {
|
|
1233
|
+
/**
|
|
1234
|
+
* App Environment
|
|
1235
|
+
*/
|
|
1236
|
+
app = "app",
|
|
1237
|
+
/**
|
|
1238
|
+
* Web Environment
|
|
1239
|
+
*/
|
|
1240
|
+
web = "web"
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
/**
|
|
1244
|
+
* @experimental - Experimental API
|
|
1245
|
+
* Denotes the type of platform
|
|
1246
|
+
*/
|
|
1247
|
+
export declare enum PlatformType {
|
|
1248
|
+
/**
|
|
1249
|
+
* iOS
|
|
1250
|
+
*/
|
|
1251
|
+
iOS = "ios",
|
|
1252
|
+
/**
|
|
1253
|
+
* iPad
|
|
1254
|
+
*/
|
|
1255
|
+
iPadOS = "ipad",
|
|
1256
|
+
/**
|
|
1257
|
+
* Chrome OS
|
|
1258
|
+
*/
|
|
1259
|
+
chromeOS = "chromeOS",
|
|
1260
|
+
/**
|
|
1261
|
+
* Android
|
|
1262
|
+
*/
|
|
1263
|
+
android = "android",
|
|
1264
|
+
/**
|
|
1265
|
+
* Chrome Browser
|
|
1266
|
+
*/
|
|
1267
|
+
chromeBrowser = "chromeBrowser",
|
|
1268
|
+
/**
|
|
1269
|
+
* Firefox Browser
|
|
1270
|
+
*/
|
|
1271
|
+
fireforxBrowser = "firefoxBrowser",
|
|
1272
|
+
/**
|
|
1273
|
+
* Edge Browser
|
|
1274
|
+
*/
|
|
1275
|
+
edgeBrowser = "edgeBrowser",
|
|
1276
|
+
/**
|
|
1277
|
+
* Samsung Browser
|
|
1278
|
+
*/
|
|
1279
|
+
samsungBrowser = "samsumgBrowser",
|
|
1280
|
+
/**
|
|
1281
|
+
* Safari Browser
|
|
1282
|
+
*/
|
|
1283
|
+
safariBrowser = "safariBrowser",
|
|
1284
|
+
/**
|
|
1285
|
+
* Unknown Platform
|
|
1286
|
+
*/
|
|
1287
|
+
unknown = "unknown"
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1150
1290
|
export declare interface PngRenditionOptions extends RenditionOptions {
|
|
1151
1291
|
/**
|
|
1152
1292
|
* PNG rendition format
|
|
@@ -1413,6 +1553,10 @@ export declare interface UI {
|
|
|
1413
1553
|
* Current locale of the application
|
|
1414
1554
|
*/
|
|
1415
1555
|
readonly locale: string;
|
|
1556
|
+
/**
|
|
1557
|
+
* Current regional format of the application
|
|
1558
|
+
*/
|
|
1559
|
+
readonly format: string;
|
|
1416
1560
|
/**
|
|
1417
1561
|
* Supported locales of the application
|
|
1418
1562
|
*/
|
package/tsconfig.json
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"allowSyntheticDefaultImports": true,
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"declarationMap": true,
|
|
6
|
-
"emitDecoratorMetadata": true,
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"experimentalDecorators": true,
|
|
9
|
-
"forceConsistentCasingInFileNames": true,
|
|
10
|
-
"importHelpers": true,
|
|
11
|
-
"incremental": true,
|
|
12
|
-
"isolatedModules": true,
|
|
13
|
-
"module": "ESNext",
|
|
14
|
-
"moduleResolution": "node",
|
|
15
|
-
"noImplicitOverride": false,
|
|
16
|
-
"noUnusedLocals": true,
|
|
17
|
-
"outDir": "dist",
|
|
18
|
-
"preserveConstEnums": true,
|
|
19
|
-
"sourceMap": true,
|
|
20
|
-
"strict": true,
|
|
21
|
-
"target": "ESNext",
|
|
22
|
-
"useUnknownInCatchVariables": false
|
|
23
|
-
},
|
|
24
|
-
"exclude": ["node_modules"],
|
|
25
|
-
"ts-node": {
|
|
26
|
-
"files": true
|
|
27
|
-
}
|
|
28
|
-
}
|