Skip to content

Commit 86a7645

Browse files
authored
Merge pull request #36 from adobe/release-20250408
Release 20250408
2 parents 057a466 + 7d36f7d commit 86a7645

File tree

4 files changed

+70
-22
lines changed

4 files changed

+70
-22
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@adobe/ccweb-add-on-sdk-types",
5+
"comment": "Added new Document link iframe API and exposed hasUnavailableFonts methods",
6+
"type": "major"
7+
}
8+
],
9+
"packageName": "@adobe/ccweb-add-on-sdk-types"
10+
}

packages/wxp-sdk-types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adobe/ccweb-add-on-sdk-types",
3-
"version": "1.14.0",
3+
"version": "1.15.0",
44
"author": "Adobe",
55
"license": "MIT",
66
"description": "Type definitions for Adobe Creative Cloud Web Add-on SDK.",

packages/wxp-sdk-types/sandbox/express-document-sdk.d.ts

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ export declare class ArtboardNode extends VisualNode implements IRectangularNode
175175
get children(): ItemList<Node>;
176176
/**
177177
* The background fill of the artboard. Artboards must always have a fill.
178+
*
178179
*/
179180
set fill(fill: Fill);
180181
get fill(): Readonly<Fill>;
@@ -1885,13 +1886,7 @@ export declare class TextContentModel {
18851886
* If the specified range doesn't align well with the paragraph boundaries, the range will be expanded to cover the
18861887
* entire paragraphs, it overlaps.
18871888
*/
1888-
applyCharacterStyles(
1889-
styles: CharacterStylesInput,
1890-
range?: {
1891-
start: number;
1892-
length: number;
1893-
}
1894-
): void;
1889+
applyCharacterStyles(styles: CharacterStylesInput, range?: TextRange): void;
18951890
/**
18961891
* <InlineAlert slots="text" variant="warning"/>
18971892
*
@@ -1907,13 +1902,19 @@ export declare class TextContentModel {
19071902
* @param range - The start and length of character sequence to which the styles should be applied.
19081903
* If not specified the styles will be applied to the entire piece of text content flow.
19091904
*/
1910-
applyParagraphStyles(
1911-
styles: ParagraphStylesInput,
1912-
range?: {
1913-
start: number;
1914-
length: number;
1915-
}
1916-
): void;
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;
19171918
}
19181919

19191920
/**
@@ -2012,23 +2013,31 @@ export declare class TextNode extends Node {
20122013
set layout(layout: PointTextLayout | AutoHeightTextLayout | AreaTextLayout);
20132014
}
20142015

2016+
/**
2017+
* A range of text in a {@link TextContentModel}.
2018+
*/
2019+
declare interface TextRange {
2020+
start: number;
2021+
length: number;
2022+
}
2023+
20152024
/**
20162025
* <InlineAlert slots="text" variant="warning"/>
20172026
*
20182027
* *Do not depend on the literal numeric values of these constants*, as they may change. Always reference the enum identifiers in your code.
20192028
*/
20202029
declare enum TextType {
2030+
area = 1,
20212031
/**
2022-
* Point text
2032+
* Soft bottom
20232033
*/
2024-
autoWidth = 0,
2034+
autoHeight = 2,
20252035
/**
2026-
* Soft bottom
2036+
* Point text
20272037
*/
2028-
autoHeight = 1,
2029-
area = 2,
2030-
magicFit = 3,
2031-
circular = 4
2038+
autoWidth = 3,
2039+
circular = 4,
2040+
magicFit = 5
20322041
}
20332042

20342043
/**

packages/wxp-sdk-types/ui/ui-sdk.d.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ export declare enum AppEvent {
151151
* triggered when the document id is available in the application.
152152
*/
153153
documentIdAvailable = "documentIdAvailable",
154+
/**
155+
* triggered when the document link is available in the application.
156+
*/
157+
documentLinkAvailable = "documentLinkAvailable",
154158
/**
155159
* triggered when the document title is changed in the application.
156160
*/
@@ -171,6 +175,7 @@ declare interface AppEventsTypeMap {
171175
[AppEvent.dragend]: AppDragEndEventData;
172176

173177
[AppEvent.documentIdAvailable]: DocumentIdAvailableEventData;
178+
[AppEvent.documentLinkAvailable]: DocumentLinkAvailableEventData;
174179
[AppEvent.documentTitleChange]: DocumentTitleChangeEventData;
175180
}
176181

@@ -607,6 +612,7 @@ export declare enum ColorPickerPlacement {
607612
declare namespace Constants {
608613
export {
609614
Range_2 as Range,
615+
LinkOptions,
610616
RenditionFormat,
611617
RenditionType,
612618
RenditionIntent,
@@ -822,6 +828,11 @@ declare interface Document_2 {
822828
* Get document id
823829
*/
824830
id(): Promise<string | undefined>;
831+
/**
832+
* @experimental - Experimental API
833+
* Get document Link
834+
*/
835+
link(options: LinkOptions): Promise<string | undefined>;
825836
/**
826837
* Get document name/title
827838
*/
@@ -849,6 +860,13 @@ declare interface DocumentIdAvailableEventData {
849860
documentId: string | undefined;
850861
}
851862

863+
/**
864+
* The payload data sent to the document link available event handler.
865+
*/
866+
declare interface DocumentLinkAvailableEventData {
867+
documentLink: string | undefined;
868+
}
869+
852870
/**
853871
* The payload data sent to the document title change event handler.
854872
*/
@@ -1052,6 +1070,17 @@ export declare interface JpgRenditionOptions extends RenditionOptions {
10521070
};
10531071
}
10541072

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+
10551084
/**
10561085
* Takes the raw type of a remote object or function as a remote thread would see it through a proxy (e.g. when
10571086
* passed in as a function argument) and returns the type the local thread has to supply.

0 commit comments

Comments
 (0)