@adobe/ccweb-add-on-sdk-types 1.6.0 → 1.7.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/ccweb-add-on-sdk-types",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "author": "Adobe",
5
5
  "license": "MIT",
6
6
  "description": "Type definitions for Adobe Creative Cloud Web Add-on SDK.",
@@ -38,14 +38,14 @@
38
38
  "url": "https://github.com/adobe/create-ccweb-add-on"
39
39
  },
40
40
  "dependencies": {
41
- "tslib": "2.4.0",
41
+ "tslib": "2.6.2",
42
42
  "gl-matrix": "3.3.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@types/node": "16.11.62",
45
+ "@types/node": "16.18.36",
46
46
  "prettier": "2.8.0",
47
- "ts-node": "10.9.1",
48
- "typescript": "4.8.4"
47
+ "ts-node": "10.9.2",
48
+ "typescript": "5.4.5"
49
49
  },
50
50
  "scripts": {
51
51
  "clean": "",
@@ -22,6 +22,8 @@
22
22
  * SOFTWARE.
23
23
  ********************************************************************************/
24
24
 
25
+ /// <reference types="gl-matrix/index.js" />
26
+
25
27
  import { mat2d } from "gl-matrix";
26
28
 
27
29
  declare namespace ApiConstants {
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(element: HTMLElement, dragCallbacks: DragCallbacks): DisableDragToDocument;
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.
@@ -621,6 +638,7 @@ declare interface Document_2 {
621
638
  * Add audio to the current page
622
639
  */
623
640
  addAudio(blob: Blob, attributes: MediaAttributes): Promise<void>;
641
+
624
642
  /**
625
643
  * Create renditions
626
644
  */
@@ -684,6 +702,16 @@ export declare interface DragCompletionData {
684
702
  attributes?: MediaAttributes;
685
703
  }
686
704
 
705
+ /**
706
+ * Interface to provide drag options which can be passed to enableDragToDocument to change the drag behavior.
707
+ */
708
+ declare interface DragOptions {
709
+ /**
710
+ * Use preview size for the drag image instead of the element size
711
+ */
712
+ usePreviewSizeForDragImage?: boolean;
713
+ }
714
+
687
715
  export declare type DragPreviewCallback = (element: HTMLElement) => URL;
688
716
 
689
717
  /**
@@ -906,6 +934,10 @@ export declare interface MediaAttributes {
906
934
  * Media title
907
935
  */
908
936
  title: string;
937
+ /**
938
+ * Media author
939
+ */
940
+ author?: string;
909
941
  }
910
942
 
911
943
  /**
@@ -1408,6 +1440,10 @@ export declare interface UI {
1408
1440
  * Current locale of the application
1409
1441
  */
1410
1442
  readonly locale: string;
1443
+ /**
1444
+ * Current regional format of the application
1445
+ */
1446
+ readonly format: string;
1411
1447
  /**
1412
1448
  * Supported locales of the application
1413
1449
  */
@@ -1499,4 +1535,3 @@ export declare enum VideoResolution {
1499
1535
  }
1500
1536
 
1501
1537
  export {};
1502
-