@adobe/ccweb-add-on-sdk-types 1.13.0 → 1.15.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 +6 -5
- package/sandbox/express-document-sdk.d.ts +30 -21
- package/ui/ui-sdk.d.ts +119 -0
- package/.mocharc.json +0 -5
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.15.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,15 @@
|
|
|
38
38
|
"url": "https://github.com/adobe/create-ccweb-add-on"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"tslib": "2.
|
|
42
|
-
"gl-matrix": "3.3.0"
|
|
41
|
+
"tslib": "2.7.0",
|
|
42
|
+
"gl-matrix": "3.3.0",
|
|
43
|
+
"@swc/helpers": "0.5.12"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@types/node": "
|
|
46
|
+
"@types/node": "18.18.2",
|
|
46
47
|
"prettier": "2.8.0",
|
|
47
48
|
"ts-node": "10.9.2",
|
|
48
|
-
"typescript": "5.
|
|
49
|
+
"typescript": "5.7.3"
|
|
49
50
|
},
|
|
50
51
|
"scripts": {
|
|
51
52
|
"clean": "",
|
|
@@ -175,6 +175,7 @@ export declare class ArtboardNode extends VisualNode implements IRectangularNode
|
|
|
175
175
|
get children(): ItemList<Node>;
|
|
176
176
|
/**
|
|
177
177
|
* The background fill of the artboard. Artboards must always have a fill.
|
|
178
|
+
*
|
|
178
179
|
*/
|
|
179
180
|
set fill(fill: Fill);
|
|
180
181
|
get fill(): Readonly<Fill>;
|
|
@@ -1885,13 +1886,7 @@ export declare class TextContentModel {
|
|
|
1885
1886
|
* If the specified range doesn't align well with the paragraph boundaries, the range will be expanded to cover the
|
|
1886
1887
|
* entire paragraphs, it overlaps.
|
|
1887
1888
|
*/
|
|
1888
|
-
applyCharacterStyles(
|
|
1889
|
-
styles: CharacterStylesInput,
|
|
1890
|
-
range?: {
|
|
1891
|
-
start: number;
|
|
1892
|
-
length: number;
|
|
1893
|
-
}
|
|
1894
|
-
): void;
|
|
1889
|
+
applyCharacterStyles(styles: CharacterStylesInput, range?: TextRange): void;
|
|
1895
1890
|
/**
|
|
1896
1891
|
* <InlineAlert slots="text" variant="warning"/>
|
|
1897
1892
|
*
|
|
@@ -1907,13 +1902,19 @@ export declare class TextContentModel {
|
|
|
1907
1902
|
* @param range - The start and length of character sequence to which the styles should be applied.
|
|
1908
1903
|
* If not specified the styles will be applied to the entire piece of text content flow.
|
|
1909
1904
|
*/
|
|
1910
|
-
applyParagraphStyles(
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1905
|
+
applyParagraphStyles(styles: ParagraphStylesInput, range?: TextRange): void;
|
|
1906
|
+
/**
|
|
1907
|
+
* <InlineAlert slots="text" variant="warning"/>
|
|
1908
|
+
*
|
|
1909
|
+
* **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`.
|
|
1910
|
+
*
|
|
1911
|
+
* @experimental
|
|
1912
|
+
* Returns true if this text contains any fonts unavailable to the current user.
|
|
1913
|
+
* Currently, if any unavailable fonts are present, the text content cannot be modified and
|
|
1914
|
+
* certain styling changes are limited as well. To remove these restrictions, you must modify
|
|
1915
|
+
* the character styles to use only AvailableFonts.
|
|
1916
|
+
*/
|
|
1917
|
+
hasUnavailableFonts(): boolean;
|
|
1917
1918
|
}
|
|
1918
1919
|
|
|
1919
1920
|
/**
|
|
@@ -2012,23 +2013,31 @@ export declare class TextNode extends Node {
|
|
|
2012
2013
|
set layout(layout: PointTextLayout | AutoHeightTextLayout | AreaTextLayout);
|
|
2013
2014
|
}
|
|
2014
2015
|
|
|
2016
|
+
/**
|
|
2017
|
+
* A range of text in a {@link TextContentModel}.
|
|
2018
|
+
*/
|
|
2019
|
+
declare interface TextRange {
|
|
2020
|
+
start: number;
|
|
2021
|
+
length: number;
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2015
2024
|
/**
|
|
2016
2025
|
* <InlineAlert slots="text" variant="warning"/>
|
|
2017
2026
|
*
|
|
2018
2027
|
* *Do not depend on the literal numeric values of these constants*, as they may change. Always reference the enum identifiers in your code.
|
|
2019
2028
|
*/
|
|
2020
2029
|
declare enum TextType {
|
|
2030
|
+
area = 1,
|
|
2021
2031
|
/**
|
|
2022
|
-
*
|
|
2032
|
+
* Soft bottom
|
|
2023
2033
|
*/
|
|
2024
|
-
|
|
2034
|
+
autoHeight = 2,
|
|
2025
2035
|
/**
|
|
2026
|
-
*
|
|
2036
|
+
* Point text
|
|
2027
2037
|
*/
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
magicFit =
|
|
2031
|
-
circular = 4
|
|
2038
|
+
autoWidth = 3,
|
|
2039
|
+
circular = 4,
|
|
2040
|
+
magicFit = 5
|
|
2032
2041
|
}
|
|
2033
2042
|
|
|
2034
2043
|
/**
|
package/ui/ui-sdk.d.ts
CHANGED
|
@@ -151,6 +151,10 @@ export declare enum AppEvent {
|
|
|
151
151
|
* triggered when the document id is available in the application.
|
|
152
152
|
*/
|
|
153
153
|
documentIdAvailable = "documentIdAvailable",
|
|
154
|
+
/**
|
|
155
|
+
* triggered when the document link is available in the application.
|
|
156
|
+
*/
|
|
157
|
+
documentLinkAvailable = "documentLinkAvailable",
|
|
154
158
|
/**
|
|
155
159
|
* triggered when the document title is changed in the application.
|
|
156
160
|
*/
|
|
@@ -171,6 +175,7 @@ declare interface AppEventsTypeMap {
|
|
|
171
175
|
[AppEvent.dragend]: AppDragEndEventData;
|
|
172
176
|
|
|
173
177
|
[AppEvent.documentIdAvailable]: DocumentIdAvailableEventData;
|
|
178
|
+
[AppEvent.documentLinkAvailable]: DocumentLinkAvailableEventData;
|
|
174
179
|
[AppEvent.documentTitleChange]: DocumentTitleChangeEventData;
|
|
175
180
|
}
|
|
176
181
|
|
|
@@ -252,6 +257,22 @@ declare interface ApplicationBase {
|
|
|
252
257
|
showModalDialog(dialogOptions: InputDialogOptions): Promise<InputDialogResult>;
|
|
253
258
|
showModalDialog(dialogOptions: CustomDialogOptions): Promise<CustomDialogResult>;
|
|
254
259
|
|
|
260
|
+
/**
|
|
261
|
+
* @experimental - Experimental API
|
|
262
|
+
* Shows a color picker popover anchored to the specified element.
|
|
263
|
+
* The anchor element must be an instance of HTMLElement.
|
|
264
|
+
* Custom DOM events are dispatched on the anchor element when the color changes or the color picker closes.
|
|
265
|
+
* See {@link ColorPickerEvents} for more details.
|
|
266
|
+
* @param anchorElement - The HTML element to anchor the color picker to.
|
|
267
|
+
* @param options - Optional configuration options for customizing the color picker behavior and appearance.
|
|
268
|
+
*/
|
|
269
|
+
showColorPicker(anchorElement: HTMLElement, options?: ColorPickerOptions): Promise<void>;
|
|
270
|
+
/**
|
|
271
|
+
* @experimental - Experimental API
|
|
272
|
+
* Hides the color picker popover if it is currently visible.
|
|
273
|
+
*/
|
|
274
|
+
hideColorPicker(): Promise<void>;
|
|
275
|
+
|
|
255
276
|
/**
|
|
256
277
|
* Triggers/Starts the in-app monetization upgrade flow
|
|
257
278
|
* @returns if the user is premium user or not
|
|
@@ -516,9 +537,82 @@ export declare interface ClientStorage {
|
|
|
516
537
|
clear(): Promise<void>;
|
|
517
538
|
}
|
|
518
539
|
|
|
540
|
+
/**
|
|
541
|
+
* @experimental - Experimental API
|
|
542
|
+
* Custom DOM events dispatched on the anchor element passed to `showColorPicker()` API.
|
|
543
|
+
*/
|
|
544
|
+
export declare enum ColorPickerEvents {
|
|
545
|
+
/**
|
|
546
|
+
* Color change event dispatched when a color is selected.
|
|
547
|
+
* The event detail will contain a 'color' property of type string.
|
|
548
|
+
*/
|
|
549
|
+
colorChange = "colorpicker-color-change",
|
|
550
|
+
/**
|
|
551
|
+
* Color picker closed event dispatched when the color picker is closed.
|
|
552
|
+
*/
|
|
553
|
+
close = "colorpicker-close"
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* @experimental - Experimental API
|
|
558
|
+
* Options that can be passed to the `showColorPicker` API to customize the color picker's behavior and appearance.
|
|
559
|
+
*/
|
|
560
|
+
export declare interface ColorPickerOptions {
|
|
561
|
+
/**
|
|
562
|
+
* Title text displayed in the color picker popover header.
|
|
563
|
+
* Default title is an empty string.
|
|
564
|
+
*/
|
|
565
|
+
title?: string;
|
|
566
|
+
/**
|
|
567
|
+
* Initial color for the color picker, in 0xRRGGBB format.
|
|
568
|
+
* Default color is 0xFFFFFF (white).
|
|
569
|
+
*/
|
|
570
|
+
initialColor?: number;
|
|
571
|
+
/**
|
|
572
|
+
* Placement of the color picker popover relative to the anchor element.
|
|
573
|
+
* Default placement is ColorPickerPlacement.left.
|
|
574
|
+
*/
|
|
575
|
+
placement?: ColorPickerPlacement;
|
|
576
|
+
/**
|
|
577
|
+
* Controls whether the color picker popover should be temporarily hidden while using the EyeDropper tool.
|
|
578
|
+
* Default value is false.
|
|
579
|
+
*/
|
|
580
|
+
eyedropperHidesPicker?: boolean;
|
|
581
|
+
/**
|
|
582
|
+
* Controls whether the transparency/alpha slider is shown in the color picker.
|
|
583
|
+
* Default value is false.
|
|
584
|
+
*/
|
|
585
|
+
disableAlphaChannel?: boolean;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* @experimental - Experimental API
|
|
590
|
+
* Denotes the placement of the color picker popover relative to its anchor element.
|
|
591
|
+
* Used in the placement option of `showColorPicker()` API.
|
|
592
|
+
*/
|
|
593
|
+
export declare enum ColorPickerPlacement {
|
|
594
|
+
/**
|
|
595
|
+
* The color picker popover will be positioned above the anchor element.
|
|
596
|
+
*/
|
|
597
|
+
top = "top",
|
|
598
|
+
/**
|
|
599
|
+
* The color picker popover will be positioned below the anchor element.
|
|
600
|
+
*/
|
|
601
|
+
bottom = "bottom",
|
|
602
|
+
/**
|
|
603
|
+
* The color picker popover will be positioned to the left of the anchor element.
|
|
604
|
+
*/
|
|
605
|
+
left = "left",
|
|
606
|
+
/**
|
|
607
|
+
* The color picker popover will be positioned to the right of the anchor element.
|
|
608
|
+
*/
|
|
609
|
+
right = "right"
|
|
610
|
+
}
|
|
611
|
+
|
|
519
612
|
declare namespace Constants {
|
|
520
613
|
export {
|
|
521
614
|
Range_2 as Range,
|
|
615
|
+
LinkOptions,
|
|
522
616
|
RenditionFormat,
|
|
523
617
|
RenditionType,
|
|
524
618
|
RenditionIntent,
|
|
@@ -536,6 +630,8 @@ declare namespace Constants {
|
|
|
536
630
|
PlatformEnvironment,
|
|
537
631
|
DeviceClass,
|
|
538
632
|
PlatformType,
|
|
633
|
+
ColorPickerPlacement,
|
|
634
|
+
ColorPickerEvents,
|
|
539
635
|
AuthorizationStatus
|
|
540
636
|
};
|
|
541
637
|
}
|
|
@@ -732,6 +828,11 @@ declare interface Document_2 {
|
|
|
732
828
|
* Get document id
|
|
733
829
|
*/
|
|
734
830
|
id(): Promise<string | undefined>;
|
|
831
|
+
/**
|
|
832
|
+
* @experimental - Experimental API
|
|
833
|
+
* Get document Link
|
|
834
|
+
*/
|
|
835
|
+
link(options: LinkOptions): Promise<string | undefined>;
|
|
735
836
|
/**
|
|
736
837
|
* Get document name/title
|
|
737
838
|
*/
|
|
@@ -759,6 +860,13 @@ declare interface DocumentIdAvailableEventData {
|
|
|
759
860
|
documentId: string | undefined;
|
|
760
861
|
}
|
|
761
862
|
|
|
863
|
+
/**
|
|
864
|
+
* The payload data sent to the document link available event handler.
|
|
865
|
+
*/
|
|
866
|
+
declare interface DocumentLinkAvailableEventData {
|
|
867
|
+
documentLink: string | undefined;
|
|
868
|
+
}
|
|
869
|
+
|
|
762
870
|
/**
|
|
763
871
|
* The payload data sent to the document title change event handler.
|
|
764
872
|
*/
|
|
@@ -962,6 +1070,17 @@ export declare interface JpgRenditionOptions extends RenditionOptions {
|
|
|
962
1070
|
};
|
|
963
1071
|
}
|
|
964
1072
|
|
|
1073
|
+
/**
|
|
1074
|
+
* @experimental - Experimental API
|
|
1075
|
+
* Link options for document link
|
|
1076
|
+
*/
|
|
1077
|
+
export declare enum LinkOptions {
|
|
1078
|
+
/**
|
|
1079
|
+
* Link to the current document
|
|
1080
|
+
*/
|
|
1081
|
+
document = "document"
|
|
1082
|
+
}
|
|
1083
|
+
|
|
965
1084
|
/**
|
|
966
1085
|
* Takes the raw type of a remote object or function as a remote thread would see it through a proxy (e.g. when
|
|
967
1086
|
* passed in as a function argument) and returns the type the local thread has to supply.
|