Skip to content

Commit 55e7d09

Browse files
authored
Merge pull request #120 from AdobeDocs/unzela/rename_enum
Use TextLayout instead of TextType
2 parents ed866b6 + 1e5f765 commit 55e7d09

File tree

13 files changed

+88
-57
lines changed

13 files changed

+88
-57
lines changed

gatsby-config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,8 @@ module.exports = {
455455
path: "references/document-sandbox/document-apis/enumerations/TextAlignment.md",
456456
},
457457
{
458-
title: "TextType",
459-
path: "references/document-sandbox/document-apis/enumerations/TextType.md",
458+
title: "TextLayout",
459+
path: "references/document-sandbox/document-apis/enumerations/TextLayout.md",
460460
},
461461
{
462462
title: "VisualEffectType",

src/pages/references/changelog.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ contributors:
2626

2727
### Updated
2828

29-
There are a few notable changes regarding the [Color Picker APIs](../references/addonsdk/addonsdk-app.md#showcolorpicker), which have now moved to stable:
30-
31-
- The `initialColor` parameter now accepts a string in `"#RRGGBB[AA]"` format, in addition to the previous HEX number `0xRRGGBB[AA]`—both with optional alpha channel.
32-
- We fixed the return value of the `ColorPickerEvent.colorChange` event, which now correctly handles the color with or without the alpha channel, depending on the value of the `disableAlphaChannel` parameter.
33-
- **Breaking change**: the `ColorPickerEvents` enum has been renamed to `ColorPickerEvent` (singular).
29+
- There are a few notable changes regarding the [Color Picker APIs](../references/addonsdk/addonsdk-app.md#showcolorpicker), which have now moved to stable:
30+
- The `initialColor` parameter now accepts a string in `"#RRGGBB[AA]"` format, in addition to the previous HEX number `0xRRGGBB[AA]`—both with optional alpha channel.
31+
- We fixed the return value of the `ColorPickerEvent.colorChange` event, which now correctly handles the color with or without the alpha channel, depending on the value of the `disableAlphaChannel` parameter.
32+
- **Breaking change**: the `ColorPickerEvents` enum has been renamed to `ColorPickerEvent` (singular).
33+
- Renamed the TextType enumerable to [`TextLayout`](./document-sandbox/document-apis/enumerations/TextLayout.md) in the Text APIs.
3434

3535
## 2025-04-22
3636

@@ -234,7 +234,7 @@ You must provide trader details by February 16, 2025, to keep your add-on visibl
234234
- Added many new **Text APIs** for improved text management.
235235
- [`TextNode.fullContent`](./document-sandbox/document-apis/classes/TextNode.md#fullcontent) accessor: returns the [`TextContentModel`](./document-sandbox/document-apis/classes/TextContentModel.md) containing the complete text string and its styles associated to the Text Flow (Threaded Text or Overflow Text).
236236
- [`TextNode.nextTextNode`](./document-sandbox/document-apis/classes/TextNode.md#nexttextnode) accessor: gets the next node that overflowing text will spill into.
237-
- [`TextNode.layout`](./document-sandbox/document-apis/classes/TextNode.md#layout) accessor: gets and sets the [`TextType`](./document-sandbox/document-apis/enumerations/TextType.md) of the text node frame.
237+
- [`TextNode.layout`](./document-sandbox/document-apis/classes/TextNode.md#layout) accessor: gets and sets the [`TextLayout`](./document-sandbox/document-apis/enumerations/TextLayout.md) of the text node frame.
238238
- [`TextNode.visualEffects`](./document-sandbox/document-apis/classes/TextNode.md#visualeffects) accessor: list of [`VisualEffectType`](./document-sandbox/document-apis/enumerations/VisualEffectType.md) applied to the text node.
239239
- [`TextContentModel.characterStyleRanges`](./document-sandbox/document-apis/classes/TextContentModel.md#characterstyleranges) accessor: list of [character style](./document-sandbox/document-apis/interfaces/CharacterStyles.md) ranges in the text content, controlling the [`color`](./document-sandbox/document-apis/interfaces/CharacterStyles.md#color), [`font`](./document-sandbox/document-apis/interfaces/CharacterStyles.md) ranges in the text content, controlling the [`color`](./document-sandbox/document-apis/interfaces/CharacterStyles.md#font), [`fontSize`](./document-sandbox/document-apis/interfaces/CharacterStyles.md) ranges in the text content, controlling the [`color`](./document-sandbox/document-apis/interfaces/CharacterStyles.md#fontsize), [`letterSpacing`](./document-sandbox/document-apis/interfaces/CharacterStyles.md) ranges in the text content, controlling the [`color`](./document-sandbox/document-apis/interfaces/CharacterStyles.md#letterSpacing) and [`underline`](./document-sandbox/document-apis/interfaces/CharacterStyles.md) ranges in the text content, controlling the [`color`](./document-sandbox/document-apis/interfaces/CharacterStyles.md#underline) properties.
240240
- [AvailableFont](./document-sandbox/document-apis/classes/AvailableFont.md) and [UnavailableFont](./document-sandbox/document-apis/classes/UnavailableFont.md) classes.

src/pages/references/document-sandbox/document-apis/classes/TextNode.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ layout modes, except for [AreaTextLayout](../interfaces/AreaTextLayout.md), are
164164

165165
#### Throws
166166

167-
if changing text layout to/from [TextType.magicFit](../enumerations/TextType.md#magicfit) or [TextType.circular](../enumerations/TextType.md#circular) layout when the text contains font(s) unavailable to the current user.
167+
if changing text layout to/from [TextLayout.magicFit](../enumerations/TextLayout.md#magicfit) or [TextLayout.circular](../enumerations/TextLayout.md#circular) layout when the text contains font(s) unavailable to the current user.
168168

169169
#### Throws
170170

src/pages/references/document-sandbox/document-apis/enumerations/ArrowHeadType.md

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
_Do not depend on the literal numeric values of these constants_, as they may change. Always reference the enum identifiers in your code.
88

9+
<InlineAlert slots="text" variant="warning"/>
10+
11+
_Additional arrowhead types may be added in the future._ If your code has different branches or cases depending on arrow type,
12+
always have a default/fallback case to handle any unknown values you may encounter.
13+
914
## Enumeration Members
1015

1116
### circleFilled

src/pages/references/document-sandbox/document-apis/enumerations/TextAlignment.md

+11
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
_Do not depend on the literal numeric values of these constants_, as they may change. Always reference the enum identifiers in your code.
88

9+
<InlineAlert slots="text" variant="warning"/>
10+
11+
_Additional alignment types may be added in the future._ If your code has different branches or cases depending on text alignment,
12+
always have a default/fallback case to handle any unknown values you may encounter.
13+
914
## Enumeration Members
1015

1116
### center
@@ -14,6 +19,12 @@ _Do not depend on the literal numeric values of these constants_, as they may ch
1419

1520
---
1621

22+
### justifyLeft
23+
24+
**justifyLeft**: `4`
25+
26+
---
27+
1728
### left
1829

1930
**left**: `1`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
[@express-document-sdk](../overview.md) / TextLayout
2+
3+
# Enumeration: TextLayout
4+
5+
<InlineAlert slots="text" variant="warning"/>
6+
7+
_Do not depend on the literal numeric values of these constants_, as they may change. Always reference the enum identifiers in your code.
8+
9+
<InlineAlert slots="text" variant="warning"/>
10+
11+
_Additional text layout types may be added in the future._ If your code has different branches or cases depending on layout type,
12+
always have a default/fallback case to handle any unknown values you may encounter.
13+
14+
## Enumeration Members
15+
16+
### area
17+
18+
**area**: `1`
19+
20+
Area text: both width and height are explicitly set. If text content is too long to fit, the end of the text will be
21+
clipped. If text content is short, the frame's bounds will occupy extra height that is just blank space.
22+
23+
---
24+
25+
### autoHeight
26+
27+
**autoHeight**: `2`
28+
29+
Auto-height text: Width is explicitly set, and text wraps to use as much vertical space as necessary to display the
30+
full content.
31+
32+
---
33+
34+
### autoWidth
35+
36+
**autoWidth**: `3`
37+
38+
Auto-width, aka point text: both width and height are automatically determined based on the content. There is no
39+
automatic line wrapping, so the text will all be on one line unless the text contains explicit newlines.
40+
41+
---
42+
43+
### circular
44+
45+
**circular**: `4`
46+
47+
Text is arranged in a circle or arc. The API does not yet support setting or reading the details of this layout style.
48+
49+
---
50+
51+
### magicFit
52+
53+
**magicFit**: `5`
54+
55+
Aka "Dynamic" layout in the UI: text size and styles are automatically varied to create an attractive multi-line layout.
56+
The API does not yet support setting or reading the details of this layout style.

src/pages/references/document-sandbox/document-apis/enumerations/TextType.md

-41
This file was deleted.

src/pages/references/document-sandbox/document-apis/interfaces/AreaTextLayout.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The height of the text node in pixels.
1818

1919
### type
2020

21-
**type**: [`area`](../enumerations/TextType.md#area)
21+
**type**: [`area`](../enumerations/TextLayout.md#area)
2222

2323
---
2424

src/pages/references/document-sandbox/document-apis/interfaces/AutoHeightTextLayout.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
### type
1212

13-
**type**: [`autoHeight`](../enumerations/TextType.md#autoheight)
13+
**type**: [`autoHeight`](../enumerations/TextLayout.md#autoheight)
1414

1515
---
1616

src/pages/references/document-sandbox/document-apis/interfaces/PointTextLayout.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010

1111
### type
1212

13-
**type**: [`autoWidth`](../enumerations/TextType.md#autowidth)
13+
**type**: [`autoWidth`](../enumerations/TextLayout.md#autowidth)

src/pages/references/document-sandbox/document-apis/interfaces/UnsupportedTextLayout.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010

1111
### type
1212

13-
**type**: [`magicFit`](../enumerations/TextType.md#magicfit) \| [`circular`](../enumerations/TextType.md#circular)
13+
**type**: [`circular`](../enumerations/TextLayout.md#circular) \| [`magicFit`](../enumerations/TextLayout.md#magicfit)

src/pages/references/document-sandbox/document-apis/namespaces/Constants/overview.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ Re-exports [TextAlignment](../../enumerations/TextAlignment.md)
6969

7070
---
7171

72-
### TextType
72+
### TextLayout
7373

74-
Re-exports [TextType](../../enumerations/TextType.md)
74+
Re-exports [TextLayout](../../enumerations/TextLayout.md)
7575

7676
---
7777

src/pages/references/document-sandbox/document-apis/overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
- [StrokePosition](enumerations/StrokePosition.md)
2020
- [StrokeType](enumerations/StrokeType.md)
2121
- [TextAlignment](enumerations/TextAlignment.md)
22-
- [TextType](enumerations/TextType.md)
22+
- [TextLayout](enumerations/TextLayout.md)
2323
- [VisualEffectType](enumerations/VisualEffectType.md)
2424

2525
## Classes

0 commit comments

Comments
 (0)