Skip to content

Commit 9d24c71

Browse files
authored
Merge pull request #31 from adobe/release-20250305
Release 20250305
2 parents 5f9d679 + 4e1ee03 commit 9d24c71

File tree

3 files changed

+45
-89
lines changed

3 files changed

+45
-89
lines changed
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": "Stabilized CharacterStyles, Fonts, TextNode API's",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@adobe/ccweb-add-on-sdk-types"
10+
}

packages/wxp-sdk-types/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adobe/ccweb-add-on-sdk-types",
3-
"version": "1.12.0",
3+
"version": "1.13.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

+34-88
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ declare namespace ApiConstants {
8383
TextAlignment,
8484
TextType,
8585
EditorEvent,
86-
VisualEffectType
86+
VisualEffectType,
87+
ParagraphListType,
88+
OrderedListNumbering
8789
};
8890
}
8991

@@ -104,7 +106,13 @@ declare interface ApiModuleExport {
104106
*/
105107
export declare interface AreaTextLayout {
106108
type: TextType.area;
109+
/**
110+
* The width of the text node in pixels.
111+
*/
107112
width: number;
113+
/**
114+
* The height of the text node in pixels.
115+
*/
108116
height: number;
109117
}
110118

@@ -193,6 +201,9 @@ export declare class ArtboardNode extends VisualNode implements IRectangularNode
193201
*/
194202
export declare interface AutoHeightTextLayout {
195203
type: TextType.autoHeight;
204+
/**
205+
* The width of the text node in pixels.
206+
*/
196207
width: number;
197208
}
198209

@@ -201,23 +212,13 @@ export declare interface AutoHeightTextLayout {
201212
*/
202213
export declare class AvailableFont extends BaseFont {
203214
/**
204-
* <InlineAlert slots="text" variant="warning"/>
205-
*
206-
* **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`.
207-
*
208-
* @experimental
209215
* Whether the font is a premium Adobe font.
210216
*/
211217
get isPremium(): boolean;
212218
get availableForEditing(): true;
213219
}
214220

215221
/**
216-
* <InlineAlert slots="text" variant="warning"/>
217-
*
218-
* **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`.
219-
*
220-
* @experimental
221222
* Base character styles that can be applied to any range of characters.
222223
* Excludes font style, which differs between the getter-oriented {@link CharacterStyles} interface and the
223224
* setter-oriented {@link CharacterStylesInput}.
@@ -249,29 +250,14 @@ declare interface BaseCharacterStyles {
249250
*/
250251
declare abstract class BaseFont {
251252
/**
252-
* <InlineAlert slots="text" variant="warning"/>
253-
*
254-
* **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`.
255-
*
256-
* @experimental
257253
* The PostScript name of the font.
258254
*/
259255
get postscriptName(): string;
260256
/**
261-
* <InlineAlert slots="text" variant="warning"/>
262-
*
263-
* **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`.
264-
*
265-
* @experimental
266257
* The font family containing the font.
267258
*/
268259
get family(): string;
269260
/**
270-
* <InlineAlert slots="text" variant="warning"/>
271-
*
272-
* **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`.
273-
*
274-
* @experimental
275261
* The style of the font within the family.
276262
*/
277263
get style(): string;
@@ -434,11 +420,6 @@ declare enum BlendMode {
434420
}
435421

436422
/**
437-
* <InlineAlert slots="text" variant="warning"/>
438-
*
439-
* **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`.
440-
*
441-
* @experimental
442423
* Text styles that can be applied to any range of characters, even a short span like a single word. (Contrast with
443424
* ParagraphStyles, which must be applied to an entire paragraph atomically).
444425
*/
@@ -447,11 +428,6 @@ export declare interface CharacterStyles extends BaseCharacterStyles {
447428
}
448429

449430
/**
450-
* <InlineAlert slots="text" variant="warning"/>
451-
*
452-
* **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`.
453-
*
454-
* @experimental
455431
* Variant of {@link CharacterStyles} with all style fields optional, used for applyCharacterStyles(). When using that API,
456432
* any fields not specified are left unchanged, preserving the text's existing styles.
457433
*
@@ -463,11 +439,6 @@ export declare interface CharacterStylesInput extends Partial<BaseCharacterStyle
463439
}
464440

465441
/**
466-
* <InlineAlert slots="text" variant="warning"/>
467-
*
468-
* **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`.
469-
*
470-
* @experimental
471442
* A set of {@link CharacterStyles} along with the range of characters they apply to. Seen in the characterStyleRanges getter.
472443
*
473444
* Note that fonts returned by the getter are *not* guaranteed to be ones the user has rights to edit with, even though they
@@ -476,11 +447,6 @@ export declare interface CharacterStylesInput extends Partial<BaseCharacterStyle
476447
export declare interface CharacterStylesRange extends CharacterStyles, StyleRange {}
477448

478449
/**
479-
* <InlineAlert slots="text" variant="warning"/>
480-
*
481-
* **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`.
482-
*
483-
* @experimental
484450
* Variant of {@link CharacterStylesRange} with all style fields optional, along with the range of characters they apply to.
485451
* Used for the characterStyleRanges setter. When invoking the setter, any fields not specified are reset to their defaults.
486452
*
@@ -910,11 +876,6 @@ declare enum FillType {
910876
}
911877

912878
/**
913-
* <InlineAlert slots="text" variant="warning"/>
914-
*
915-
* **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`.
916-
*
917-
* @experimental
918879
* Represents a font in the document.
919880
*
920881
* Note: not every font encountered in the existing content is available for editing.
@@ -927,11 +888,6 @@ export declare type Font = AvailableFont | UnavailableFont;
927888
*/
928889
export declare class Fonts {
929890
/**
930-
* <InlineAlert slots="text" variant="warning"/>
931-
*
932-
* **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`.
933-
*
934-
* @experimental
935891
* Get an {@link AvailableFont} that exactly matches the given PostScript name, if any. Only fonts that the user has permission to use
936892
* for editing content are returned, so the result of this call is always safe to apply to a {@link TextContentModel}'s styles.
937893
*
@@ -1003,6 +959,9 @@ export declare class GroupNode extends Node implements ContainerNode {
1003959
*/
1004960
set maskShape(mask: FillableNode | undefined);
1005961
/**
962+
* {@inheritDoc VisualNode.boundsLocal}
963+
*
964+
* @returns
1006965
* Note: If this group has a maskShape, group's bounds are always identical to the maskShape's, regardless of the
1007966
* group's other content.
1008967
*/
@@ -1866,11 +1825,6 @@ export declare class TextContentModel {
18661825
*/
18671826
get id(): string;
18681827
/**
1869-
* <InlineAlert slots="text" variant="warning"/>
1870-
*
1871-
* **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`.
1872-
*
1873-
* @experimental
18741828
* Get ordered list of all {@link TextNode}s that display this text content in the scenegraph. The text content
18751829
* starts in the first {@link TextNode} "frame", and then flows into the second node once it has filled the first one. The ending of the
18761830
* text content may not be visible at all, if the last {@link TextNode} "frame" is not large enough to accommodate it.
@@ -1884,11 +1838,6 @@ export declare class TextContentModel {
18841838
get text(): string;
18851839
set text(textContent: string);
18861840
/**
1887-
* <InlineAlert slots="text" variant="warning"/>
1888-
*
1889-
* **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`.
1890-
*
1891-
* @experimental
18921841
* The character styles are applied to different ranges of this text content. When setting character styles, any style
18931842
* properties that are not provided are reset to their defaults (contrast to {@link applyCharacterStyles} which
18941843
* preserves the text's existing styles for any fields not specified). When *getting* styles, all fields are always
@@ -1925,11 +1874,6 @@ export declare class TextContentModel {
19251874
*/
19261875
set paragraphStyleRanges(styles: readonly ParagraphStylesRangeInput[]);
19271876
/**
1928-
* <InlineAlert slots="text" variant="warning"/>
1929-
*
1930-
* **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`.
1931-
*
1932-
* @experimental
19331877
* Apply one or more styles to the characters in the given range, leaving any style properties that were not specified
19341878
* unchanged. Does not modify any styles in the text outside this range. Contrast to the {@link characterStyleRanges}
19351879
* setter, which specifies new style range(s) for the entire text at once, and resets any unspecified properties back to
@@ -1981,6 +1925,24 @@ export declare class TextContentModel {
19811925
* multi-frame text flows.
19821926
*/
19831927
export declare class TextNode extends Node {
1928+
/**
1929+
* {@inheritDoc VisualNode.centerPointLocal}
1930+
*
1931+
* @returns
1932+
* Note: The center of the orphaned TextNode may be different from the center of the node placed on a page. It is
1933+
* recommended to use this property only when the node is placed on a page.
1934+
*
1935+
*/
1936+
get centerPointLocal(): Readonly<Point>;
1937+
/**
1938+
* {@inheritDoc VisualNode.topLeftLocal}
1939+
*
1940+
* @returns
1941+
* Note: The top-left of the orphaned TextNode may be different from the top-left of the node placed on a
1942+
* page. It is recommended to use this property only when the node is placed on a page.
1943+
*
1944+
*/
1945+
get topLeftLocal(): Readonly<Point>;
19841946
/**
19851947
* The model containing the complete text string and its styles, only part of which may be visible within the bounds of
19861948
* this specific TextNode "frame." The full text content flow may be split across multiple frames, and/or it may be clipped if a
@@ -1994,11 +1956,6 @@ export declare class TextNode extends Node {
19941956
*/
19951957
get fullContent(): TextContentModel;
19961958
/**
1997-
* <InlineAlert slots="text" variant="warning"/>
1998-
*
1999-
* **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`.
2000-
*
2001-
* @experimental
20021959
* The next TextNode that text overflowing this node will spill into, if any. If undefined and this TextNode is fixed size
20031960
* ({@link AreaTextLayout}), any text content that does not fit within this node's area will be clipped.
20041961
*
@@ -2025,11 +1982,6 @@ export declare class TextNode extends Node {
20251982
get textAlignment(): TextAlignment;
20261983
set textAlignment(alignment: TextAlignment);
20271984
/**
2028-
* <InlineAlert slots="text" variant="warning"/>
2029-
*
2030-
* **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`.
2031-
*
2032-
* @experimental
20331985
* @returns The list of visual effects applied to the TextNode.
20341986
*/
20351987
get visualEffects(): readonly VisualEffectType[];
@@ -2156,11 +2108,6 @@ export declare class Viewport {
21562108
export declare const viewport: ExpressViewport;
21572109

21582110
/**
2159-
* <InlineAlert slots="text" variant="warning"/>
2160-
*
2161-
* **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`.
2162-
*
2163-
* @experimental
21642111
* Visual effects that can be applied to a text node.
21652112
*/
21662113
declare enum VisualEffectType {
@@ -2198,8 +2145,7 @@ export declare class VisualNode extends BaseNode {
21982145
*/
21992146
get boundsLocal(): Readonly<Rect>;
22002147
/**
2201-
* Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal
2202-
* box.
2148+
* Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box.
22032149
*/
22042150
get centerPointLocal(): Readonly<Point>;
22052151
/**

0 commit comments

Comments
 (0)