@adobe/ccweb-add-on-sdk-types 1.24.0 → 1.27.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 +135 -42
- package/ui/ui-sdk.d.ts +10 -3
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.27.0",
|
|
4
4
|
"author": "Adobe",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Type definitions for Adobe Creative Cloud Web Add-on SDK.",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@types/node": "18.18.2",
|
|
47
47
|
"prettier": "2.8.0",
|
|
48
48
|
"ts-node": "10.9.2",
|
|
49
|
-
"typescript": "5.
|
|
49
|
+
"typescript": "5.9.3"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"clean": "",
|
|
@@ -92,11 +92,11 @@ declare namespace ApiConstants {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
declare interface ApiModuleExport {
|
|
95
|
-
editor:
|
|
95
|
+
editor: ExpressEditorWrapper;
|
|
96
96
|
constants: unknown;
|
|
97
|
-
colorUtils:
|
|
98
|
-
fonts:
|
|
99
|
-
viewport:
|
|
97
|
+
colorUtils: ExpressColorUtilsWrapper;
|
|
98
|
+
fonts: ExpressFontsWrapper;
|
|
99
|
+
viewport: ExpressViewportWrapper;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/**
|
|
@@ -386,6 +386,15 @@ export declare class BitmapImage {
|
|
|
386
386
|
* Original height of the bitmap in pixels.
|
|
387
387
|
*/
|
|
388
388
|
get height(): number;
|
|
389
|
+
/**
|
|
390
|
+
* <InlineAlert slots="text" variant="warning"/>
|
|
391
|
+
*
|
|
392
|
+
* **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`.
|
|
393
|
+
*
|
|
394
|
+
* @experimental
|
|
395
|
+
* Fetches the bitmap data as a Blob. This will wait for the bitmap to be available if necessary.
|
|
396
|
+
*/
|
|
397
|
+
data(): Promise<Blob>;
|
|
389
398
|
}
|
|
390
399
|
|
|
391
400
|
/**
|
|
@@ -542,7 +551,7 @@ export declare class ColorUtils {
|
|
|
542
551
|
toHex(color: Color): string;
|
|
543
552
|
}
|
|
544
553
|
|
|
545
|
-
export declare const colorUtils:
|
|
554
|
+
export declare const colorUtils: ExpressColorUtilsWrapper;
|
|
546
555
|
|
|
547
556
|
/**
|
|
548
557
|
* A ComplexShapeNode is a complex prepackaged shape that appears as a leaf node in the UI, even if it is composed
|
|
@@ -619,11 +628,6 @@ export declare class Context {
|
|
|
619
628
|
* other UI state.
|
|
620
629
|
*/
|
|
621
630
|
get insertionParent(): ContainerNode;
|
|
622
|
-
/**
|
|
623
|
-
* @returns The currently viewed page.
|
|
624
|
-
* To change the current page, call {@link Viewport.bringIntoView} with an artboard or other content on that page.
|
|
625
|
-
*/
|
|
626
|
-
get currentPage(): PageNode;
|
|
627
631
|
}
|
|
628
632
|
|
|
629
633
|
/**
|
|
@@ -689,7 +693,7 @@ export declare class Editor {
|
|
|
689
693
|
/**
|
|
690
694
|
* @returns the root of the document.
|
|
691
695
|
*/
|
|
692
|
-
get documentRoot():
|
|
696
|
+
get documentRoot(): BaseNode;
|
|
693
697
|
/**
|
|
694
698
|
* @returns an ellipse node with default x/y radii, a black fill, and no initial stroke.
|
|
695
699
|
* Transform values default to 0.
|
|
@@ -780,7 +784,7 @@ export declare class Editor {
|
|
|
780
784
|
createPath(path: string): PathNode;
|
|
781
785
|
}
|
|
782
786
|
|
|
783
|
-
export declare const editor:
|
|
787
|
+
export declare const editor: ExpressEditorWrapper;
|
|
784
788
|
|
|
785
789
|
/**
|
|
786
790
|
* This enum represents the supported editor events.
|
|
@@ -828,11 +832,36 @@ export declare type EventHandlerId = string;
|
|
|
828
832
|
declare const expressApiModule: ApiModuleExport;
|
|
829
833
|
export default expressApiModule;
|
|
830
834
|
|
|
831
|
-
declare class
|
|
835
|
+
declare class ExpressColorUtilsWrapper extends ColorUtils {}
|
|
832
836
|
|
|
833
|
-
|
|
837
|
+
/**
|
|
838
|
+
* Contains The Express specific APIs related to the current selection state.
|
|
839
|
+
*/
|
|
840
|
+
export declare class ExpressContext extends Context {
|
|
841
|
+
/**
|
|
842
|
+
* @returns The currently viewed page.
|
|
843
|
+
* To change the current page, call {@link ExpressViewport.bringIntoView} with an artboard or other content on that page.
|
|
844
|
+
*/
|
|
845
|
+
get currentPage(): PageNode;
|
|
846
|
+
}
|
|
834
847
|
|
|
835
|
-
|
|
848
|
+
/**
|
|
849
|
+
* Entry point for Express specific APIs that read or modify the document's content.
|
|
850
|
+
*/
|
|
851
|
+
export declare class ExpressEditor extends Editor {
|
|
852
|
+
/**
|
|
853
|
+
* User's current selection context
|
|
854
|
+
*/
|
|
855
|
+
get context(): ExpressContext;
|
|
856
|
+
/**
|
|
857
|
+
* @returns the root of the document.
|
|
858
|
+
*/
|
|
859
|
+
get documentRoot(): ExpressRootNode;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
declare class ExpressEditorWrapper extends ExpressEditor {}
|
|
863
|
+
|
|
864
|
+
declare class ExpressFontsWrapper extends Fonts {}
|
|
836
865
|
|
|
837
866
|
/**
|
|
838
867
|
* An ExpressRootNode represents the root node of the document's "scenegraph" artwork tree. The root contains a collection
|
|
@@ -848,7 +877,27 @@ export declare class ExpressRootNode extends BaseNode {
|
|
|
848
877
|
get pages(): PageList;
|
|
849
878
|
}
|
|
850
879
|
|
|
851
|
-
|
|
880
|
+
/**
|
|
881
|
+
* Represents the area of the canvas that is currently visible on-screen.
|
|
882
|
+
*/
|
|
883
|
+
export declare class ExpressViewport {
|
|
884
|
+
/**
|
|
885
|
+
* Adjusts the viewport to make the node's bounds visible on-screen, assuming all bounds are within the artboard bounds.
|
|
886
|
+
* Makes the node's {@link ArtboardNode} or {@link PageNode} visible if they were not already visible
|
|
887
|
+
* (which may result in {@link Context.selection} being cleared). It is strongly recommended
|
|
888
|
+
* to further draw user's attention to the node, set it as the {@link Context.selection} following this call.
|
|
889
|
+
*
|
|
890
|
+
* After this call, the value of {@link Context.insertionParent} will always be the node containing {@link ArtboardNode}.
|
|
891
|
+
*
|
|
892
|
+
* Note that the node might still not appear visible if:
|
|
893
|
+
* - Its animation settings make it invisible at the beginning of the {@link ArtboardNode} "scene".
|
|
894
|
+
* - It is obscured underneath other artwork in the z-order.
|
|
895
|
+
* - It is hidden by a {@link GroupNode}'s mask or similar cropping.
|
|
896
|
+
*/
|
|
897
|
+
bringIntoView(node: VisualNode): void;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
declare class ExpressViewportWrapper extends ExpressViewport {}
|
|
852
901
|
|
|
853
902
|
/**
|
|
854
903
|
* Base interface representing any fill in the scenegraph. See {@link FillableNode}.
|
|
@@ -923,7 +972,7 @@ export declare class Fonts {
|
|
|
923
972
|
fromPostscriptName(postscriptName: string): Promise<AvailableFont | undefined>;
|
|
924
973
|
}
|
|
925
974
|
|
|
926
|
-
export declare const fonts:
|
|
975
|
+
export declare const fonts: ExpressFontsWrapper;
|
|
927
976
|
|
|
928
977
|
/**
|
|
929
978
|
* A GridCellNode represents the media aspect of a grid cell. Unlike MediaContainerNodes, grid cells cannot be
|
|
@@ -1024,7 +1073,26 @@ declare interface IFillableNode {
|
|
|
1024
1073
|
* ImageRectangleNodes cannot be created directly; use {@link Editor.createImageContainer} to create the entire
|
|
1025
1074
|
* container structure together.
|
|
1026
1075
|
*/
|
|
1027
|
-
export declare class ImageRectangleNode extends MediaRectangleNode {
|
|
1076
|
+
export declare class ImageRectangleNode extends MediaRectangleNode {
|
|
1077
|
+
/**
|
|
1078
|
+
* <InlineAlert slots="text" variant="warning"/>
|
|
1079
|
+
*
|
|
1080
|
+
* **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`.
|
|
1081
|
+
*
|
|
1082
|
+
* @experimental
|
|
1083
|
+
* Fetches the bitmap image resource used by this node. Waits up to a minute for the bitmap to be available if necessary.
|
|
1084
|
+
*/
|
|
1085
|
+
fetchBitmapImage(): Promise<BitmapImage>;
|
|
1086
|
+
/**
|
|
1087
|
+
* <InlineAlert slots="text" variant="warning"/>
|
|
1088
|
+
*
|
|
1089
|
+
* **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`.
|
|
1090
|
+
*
|
|
1091
|
+
* @experimental
|
|
1092
|
+
* Returns true if the media can be exported based on the user's entitlements.
|
|
1093
|
+
*/
|
|
1094
|
+
canExportMedia(): boolean;
|
|
1095
|
+
}
|
|
1028
1096
|
|
|
1029
1097
|
/**
|
|
1030
1098
|
* Interface for nodes that contain media.
|
|
@@ -1902,6 +1970,13 @@ export declare interface SolidColorStroke extends Stroke {
|
|
|
1902
1970
|
export declare type SolidColorStrokeWithOptionalType = Omit<SolidColorStroke, "type"> &
|
|
1903
1971
|
Partial<Pick<SolidColorStroke, "type">>;
|
|
1904
1972
|
|
|
1973
|
+
/**
|
|
1974
|
+
* StandaloneTextContentModel represents a complete piece of text content contained within a single {@link StandaloneTextNode}.
|
|
1975
|
+
*/
|
|
1976
|
+
export declare class StandaloneTextContentModel extends TextNodeContentModel {
|
|
1977
|
+
get allTextNodes(): Readonly<Iterable<StandaloneTextNode>>;
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1905
1980
|
/**
|
|
1906
1981
|
* A StandaloneTextNode represents text that is displayed *entirely* within one single frame in the scenegraph (in
|
|
1907
1982
|
* contrast to {@link ThreadedTextNode}, where text may flow across several separate display "frames").
|
|
@@ -1910,6 +1985,16 @@ export declare type SolidColorStrokeWithOptionalType = Omit<SolidColorStroke, "t
|
|
|
1910
1985
|
* To create a new StandaloneTextNode, see {@link Editor.createText}.
|
|
1911
1986
|
*/
|
|
1912
1987
|
export declare class StandaloneTextNode extends TextNode {
|
|
1988
|
+
/**
|
|
1989
|
+
* Always returns true for this StandaloneTextNode, indicating that it is not part of a multi-frame text flow.
|
|
1990
|
+
*/
|
|
1991
|
+
isStandaloneText(): this is StandaloneTextNode;
|
|
1992
|
+
/**
|
|
1993
|
+
* The model containing the complete text string and its styles, all which will be visible within the bounds of
|
|
1994
|
+
* this specific StandaloneTextNode.
|
|
1995
|
+
*
|
|
1996
|
+
*/
|
|
1997
|
+
get fullContent(): StandaloneTextContentModel;
|
|
1913
1998
|
get nextTextNode(): undefined;
|
|
1914
1999
|
get layout(): Readonly<AutoWidthTextLayout | AutoHeightTextLayout | UnsupportedTextLayout>;
|
|
1915
2000
|
/**
|
|
@@ -2279,7 +2364,7 @@ export declare abstract class TextNode extends Node {
|
|
|
2279
2364
|
* encountered before.
|
|
2280
2365
|
*
|
|
2281
2366
|
*/
|
|
2282
|
-
get fullContent(): TextNodeContentModel;
|
|
2367
|
+
abstract get fullContent(): TextNodeContentModel;
|
|
2283
2368
|
/**
|
|
2284
2369
|
* Helper method to determine if the text is standalone.
|
|
2285
2370
|
*/
|
|
@@ -2329,7 +2414,7 @@ export declare abstract class TextNode extends Node {
|
|
|
2329
2414
|
* split across multiple {@link ThreadedTextNode} frames for display.
|
|
2330
2415
|
* Use this model to get or modify the text string and the style ranges applied to it.
|
|
2331
2416
|
*/
|
|
2332
|
-
export declare class TextNodeContentModel extends TextContentModel {
|
|
2417
|
+
export declare abstract class TextNodeContentModel extends TextContentModel {
|
|
2333
2418
|
/**
|
|
2334
2419
|
* Get ordered list of all {@link TextNode}s that display this text content in the scenegraph. This might be a single
|
|
2335
2420
|
* {@link StandaloneTextNode} *or* a list of one or more {@link ThreadedTextNode}s. In the case of threaded text, the
|
|
@@ -2339,7 +2424,7 @@ export declare class TextNodeContentModel extends TextContentModel {
|
|
|
2339
2424
|
*
|
|
2340
2425
|
* All linked ThreadedTextNodes that share a single TextContentModel must remain together within the same artboard.
|
|
2341
2426
|
*/
|
|
2342
|
-
get allTextNodes(): Readonly<Iterable<TextNode>>;
|
|
2427
|
+
abstract get allTextNodes(): Readonly<Iterable<TextNode>>;
|
|
2343
2428
|
}
|
|
2344
2429
|
|
|
2345
2430
|
/**
|
|
@@ -2393,6 +2478,18 @@ export declare enum TextStyleSource {
|
|
|
2393
2478
|
firstReplacedCharacter = 2
|
|
2394
2479
|
}
|
|
2395
2480
|
|
|
2481
|
+
/**
|
|
2482
|
+
* ThreadedTextContentModel represents a complete piece of text content that is split across multiple
|
|
2483
|
+
* {@link ThreadedTextNode} frames for display. This subclass provides a mutable {@link allFrames} list
|
|
2484
|
+
* that supports adding, removing, and reordering text frames.
|
|
2485
|
+
*
|
|
2486
|
+
* The append and insert operations will automatically parent the new frame to the same parent as the
|
|
2487
|
+
* reference frame and place it in the correct z-order.
|
|
2488
|
+
*/
|
|
2489
|
+
export declare class ThreadedTextContentModel extends TextNodeContentModel {
|
|
2490
|
+
get allTextNodes(): Readonly<Iterable<ThreadedTextNode>>;
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2396
2493
|
/**
|
|
2397
2494
|
* A ThreadedTextNode represents a text display frame in the scenegraph which is a subset of longer text that flows across
|
|
2398
2495
|
* multiple such "frames". Because of this, the TextNode does not directly hold the text content and styles –
|
|
@@ -2403,6 +2500,22 @@ export declare enum TextStyleSource {
|
|
|
2403
2500
|
* APIs are not yet available to create multi-frame text flows. To create *non*-threaded text, use {@link Editor.createText}.
|
|
2404
2501
|
*/
|
|
2405
2502
|
export declare class ThreadedTextNode extends TextNode {
|
|
2503
|
+
/**
|
|
2504
|
+
* Always returns true for this ThreadedTextNode, indicating that it is part of a multi-frame text flow.
|
|
2505
|
+
*/
|
|
2506
|
+
isThreadedText(): this is ThreadedTextNode;
|
|
2507
|
+
/**
|
|
2508
|
+
* The model containing the complete text string and its styles, only part of which may be visible within the bounds of
|
|
2509
|
+
* this specific ThreadedTextNode "frame." The full text content flow may be split across multiple frames, and/or it may be clipped if a
|
|
2510
|
+
* fixed-size frame using {@link AreaTextLayout} does not fit all the (remaining) text.
|
|
2511
|
+
*
|
|
2512
|
+
* Note: When traversing the scenegraph in search of text content, bear in mind that multiple ThreadedTextNodes may refer to the
|
|
2513
|
+
* same single {@link ThreadedTextContentModel}; this can give the impression that the same text is duplicated multiple times when it is
|
|
2514
|
+
* not. Use {@link ThreadedTextContentModel}.id to determine whether a given piece of text content is unique or if it's already been
|
|
2515
|
+
* encountered before.
|
|
2516
|
+
*
|
|
2517
|
+
*/
|
|
2518
|
+
get fullContent(): ThreadedTextContentModel;
|
|
2406
2519
|
get nextTextNode(): ThreadedTextNode | undefined;
|
|
2407
2520
|
get layout(): Readonly<AreaTextLayout>;
|
|
2408
2521
|
/**
|
|
@@ -2459,27 +2572,7 @@ export declare interface UnsupportedTextLayout {
|
|
|
2459
2572
|
type: TextLayout.magicFit | TextLayout.circular;
|
|
2460
2573
|
}
|
|
2461
2574
|
|
|
2462
|
-
|
|
2463
|
-
* Represents the area of the canvas that is currently visible on-screen.
|
|
2464
|
-
*/
|
|
2465
|
-
export declare class Viewport {
|
|
2466
|
-
/**
|
|
2467
|
-
* Adjusts the viewport to make the node's bounds visible on-screen, assuming all bounds are within the artboard bounds.
|
|
2468
|
-
* Makes the node's {@link ArtboardNode} or {@link PageNode} visible if they were not already visible
|
|
2469
|
-
* (which may result in {@link Context.selection} being cleared). It is strongly recommended
|
|
2470
|
-
* to further draw user's attention to the node, set it as the {@link Context.selection} following this call.
|
|
2471
|
-
*
|
|
2472
|
-
* After this call, the value of {@link Context.insertionParent} will always be the node containing {@link ArtboardNode}.
|
|
2473
|
-
*
|
|
2474
|
-
* Note that the node might still not appear visible if:
|
|
2475
|
-
* - Its animation settings make it invisible at the beginning of the {@link ArtboardNode} "scene".
|
|
2476
|
-
* - It is obscured underneath other artwork in the z-order.
|
|
2477
|
-
* - It is hidden by a {@link GroupNode}'s mask or similar cropping.
|
|
2478
|
-
*/
|
|
2479
|
-
bringIntoView(node: VisualNode): void;
|
|
2480
|
-
}
|
|
2481
|
-
|
|
2482
|
-
export declare const viewport: ExpressViewport;
|
|
2575
|
+
export declare const viewport: ExpressViewportWrapper;
|
|
2483
2576
|
|
|
2484
2577
|
/**
|
|
2485
2578
|
* Visual effects that can be applied to a text node.
|
package/ui/ui-sdk.d.ts
CHANGED
|
@@ -887,7 +887,7 @@ export declare type DisableDragToDocument = () => void;
|
|
|
887
887
|
*/
|
|
888
888
|
declare interface Document_2 {
|
|
889
889
|
/**
|
|
890
|
-
* Add image/PSD/AI assets to the current page
|
|
890
|
+
* Add image/PSD/AI/SVG assets to the current page
|
|
891
891
|
*/
|
|
892
892
|
addImage(blob: Blob, attributes?: MediaAttributes, importAddOnData?: ImportAddOnData): Promise<void>;
|
|
893
893
|
/**
|
|
@@ -912,7 +912,6 @@ declare interface Document_2 {
|
|
|
912
912
|
*/
|
|
913
913
|
getPagesMetadata(options: PageMetadataOptions): Promise<PageMetadata[]>;
|
|
914
914
|
/**
|
|
915
|
-
* @experimental - Experimental API
|
|
916
915
|
* Get the currently selected page ids.
|
|
917
916
|
*/
|
|
918
917
|
getSelectedPageIds(): Promise<string[]>;
|
|
@@ -1139,6 +1138,10 @@ export declare enum EntrypointType {
|
|
|
1139
1138
|
* Mobile more entrypoint type.
|
|
1140
1139
|
*/
|
|
1141
1140
|
MOBILE_MORE = "mobile.more",
|
|
1141
|
+
/**
|
|
1142
|
+
* Mobile share entrypoint type.
|
|
1143
|
+
*/
|
|
1144
|
+
MOBILE_SHARE = "mobile.share",
|
|
1142
1145
|
/**
|
|
1143
1146
|
* Schedule entrypoint type.
|
|
1144
1147
|
*/
|
|
@@ -1162,7 +1165,11 @@ export declare enum EntrypointType {
|
|
|
1162
1165
|
/**
|
|
1163
1166
|
* Quick action entrypoint type.
|
|
1164
1167
|
*/
|
|
1165
|
-
QUICK_ACTION = "quick-action"
|
|
1168
|
+
QUICK_ACTION = "quick-action",
|
|
1169
|
+
/**
|
|
1170
|
+
* Content hub home (L1) entrypoint type.
|
|
1171
|
+
*/
|
|
1172
|
+
CONTENT_HUB_HOME = "content-hub-home"
|
|
1166
1173
|
}
|
|
1167
1174
|
|
|
1168
1175
|
export declare interface Field {
|