From 303c0d5d56d95acc1ca5ace8f35939e7eeb690cf Mon Sep 17 00:00:00 2001 From: Unzela Inamdar Date: Thu, 24 Apr 2025 13:34:34 +0530 Subject: [PATCH 1/4] Renamed enum --- gatsby-config.js | 4 +- src/pages/references/changelog.md | 6 ++ .../document-apis/classes/TextNode.md | 2 +- .../enumerations/ArrowHeadType.md | 5 ++ .../enumerations/TextAlignment.md | 11 ++++ .../document-apis/enumerations/TextLayout.md | 56 +++++++++++++++++++ .../document-apis/enumerations/TextType.md | 41 -------------- .../interfaces/AreaTextLayout.md | 2 +- .../interfaces/AutoHeightTextLayout.md | 2 +- .../interfaces/PointTextLayout.md | 2 +- .../interfaces/UnsupportedTextLayout.md | 2 +- .../namespaces/Constants/overview.md | 4 +- .../document-apis/overview.md | 2 +- 13 files changed, 88 insertions(+), 51 deletions(-) create mode 100644 src/pages/references/document-sandbox/document-apis/enumerations/TextLayout.md delete mode 100644 src/pages/references/document-sandbox/document-apis/enumerations/TextType.md diff --git a/gatsby-config.js b/gatsby-config.js index 2ff703774..3829f1d32 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -455,8 +455,8 @@ module.exports = { path: "references/document-sandbox/document-apis/enumerations/TextAlignment.md", }, { - title: "TextType", - path: "references/document-sandbox/document-apis/enumerations/TextType.md", + title: "TextLayout", + path: "references/document-sandbox/document-apis/enumerations/TextLayout.md", }, { title: "VisualEffectType", diff --git a/src/pages/references/changelog.md b/src/pages/references/changelog.md index bb52e1550..b568312ef 100644 --- a/src/pages/references/changelog.md +++ b/src/pages/references/changelog.md @@ -22,6 +22,12 @@ contributors: # Changelog +## 2025-04-24 + +### Updated + +- Renamed enum TextType to [`TextLayout`](./document-sandbox/document-apis/enumerations/TextLayout.md) in the Text APIs. + ## 2025-04-22 ### Updated diff --git a/src/pages/references/document-sandbox/document-apis/classes/TextNode.md b/src/pages/references/document-sandbox/document-apis/classes/TextNode.md index f5cc3271d..31a51cb2a 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/TextNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/TextNode.md @@ -164,7 +164,7 @@ layout modes, except for [AreaTextLayout](../interfaces/AreaTextLayout.md), are #### Throws -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. +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. #### Throws diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/ArrowHeadType.md b/src/pages/references/document-sandbox/document-apis/enumerations/ArrowHeadType.md index a07a8e8f1..d3b256ce5 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/ArrowHeadType.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/ArrowHeadType.md @@ -6,6 +6,11 @@ _Do not depend on the literal numeric values of these constants_, as they may change. Always reference the enum identifiers in your code. + + +_Additional arrowhead types may be added in the future._ If your code has different branches or cases depending on arrow type, +always have a default/fallback case to handle any unknown values you may encounter. + ## Enumeration Members ### circleFilled diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/TextAlignment.md b/src/pages/references/document-sandbox/document-apis/enumerations/TextAlignment.md index 1e7e67574..16bc3286e 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/TextAlignment.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/TextAlignment.md @@ -6,6 +6,11 @@ _Do not depend on the literal numeric values of these constants_, as they may change. Always reference the enum identifiers in your code. + + +_Additional alignment types may be added in the future._ If your code has different branches or cases depending on text alignment, +always have a default/fallback case to handle any unknown values you may encounter. + ## Enumeration Members ### center @@ -14,6 +19,12 @@ _Do not depend on the literal numeric values of these constants_, as they may ch --- +### justifyLeft + +• **justifyLeft**: `4` + +--- + ### left • **left**: `1` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/TextLayout.md b/src/pages/references/document-sandbox/document-apis/enumerations/TextLayout.md new file mode 100644 index 000000000..fe5443189 --- /dev/null +++ b/src/pages/references/document-sandbox/document-apis/enumerations/TextLayout.md @@ -0,0 +1,56 @@ +[@express-document-sdk](../overview.md) / TextLayout + +# Enumeration: TextLayout + + + +_Do not depend on the literal numeric values of these constants_, as they may change. Always reference the enum identifiers in your code. + + + +_Additional text layout types may be added in the future._ If your code has different branches or cases depending on layout type, +always have a default/fallback case to handle any unknown values you may encounter. + +## Enumeration Members + +### area + +• **area**: `1` + +Area text: both width and height are explicitly set. If text content is too long to fit, the end of the text will be +clipped. If text content is short, the frame's bounds will occupy extra height that is just blank space. + +--- + +### autoHeight + +• **autoHeight**: `2` + +Auto-height text: Width is explicitly set, and text wraps to use as much vertical space as necessary to display the +full content. + +--- + +### autoWidth + +• **autoWidth**: `3` + +Auto-width, aka point text: both width and height are automatically determined based on the content. There is no +automatic line wrapping, so the text will all be on one line unless the text contains explicit newlines. + +--- + +### circular + +• **circular**: `4` + +Text is arranged in a circle or arc. The API does not yet support setting or reading the details of this layout style. + +--- + +### magicFit + +• **magicFit**: `5` + +Aka "Dynamic" layout in the UI: text size and styles are automatically varied to create an attractive multi-line layout. +The API does not yet support setting or reading the details of this layout style. diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/TextType.md b/src/pages/references/document-sandbox/document-apis/enumerations/TextType.md deleted file mode 100644 index e92f95060..000000000 --- a/src/pages/references/document-sandbox/document-apis/enumerations/TextType.md +++ /dev/null @@ -1,41 +0,0 @@ -[@express-document-sdk](../overview.md) / TextType - -# Enumeration: TextType - - - -_Do not depend on the literal numeric values of these constants_, as they may change. Always reference the enum identifiers in your code. - -## Enumeration Members - -### area - -• **area**: `1` - ---- - -### autoHeight - -• **autoHeight**: `2` - -Soft bottom - ---- - -### autoWidth - -• **autoWidth**: `3` - -Point text - ---- - -### circular - -• **circular**: `4` - ---- - -### magicFit - -• **magicFit**: `5` diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/AreaTextLayout.md b/src/pages/references/document-sandbox/document-apis/interfaces/AreaTextLayout.md index ac2f80e78..38da176cf 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/AreaTextLayout.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/AreaTextLayout.md @@ -18,7 +18,7 @@ The height of the text node in pixels. ### type -• **type**: [`area`](../enumerations/TextType.md#area) +• **type**: [`area`](../enumerations/TextLayout.md#area) --- diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/AutoHeightTextLayout.md b/src/pages/references/document-sandbox/document-apis/interfaces/AutoHeightTextLayout.md index 0af324222..d0777669c 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/AutoHeightTextLayout.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/AutoHeightTextLayout.md @@ -10,7 +10,7 @@ ### type -• **type**: [`autoHeight`](../enumerations/TextType.md#autoheight) +• **type**: [`autoHeight`](../enumerations/TextLayout.md#autoheight) --- diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/PointTextLayout.md b/src/pages/references/document-sandbox/document-apis/interfaces/PointTextLayout.md index 8e432de68..aeabd021f 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/PointTextLayout.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/PointTextLayout.md @@ -10,4 +10,4 @@ ### type -• **type**: [`autoWidth`](../enumerations/TextType.md#autowidth) +• **type**: [`autoWidth`](../enumerations/TextLayout.md#autowidth) diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/UnsupportedTextLayout.md b/src/pages/references/document-sandbox/document-apis/interfaces/UnsupportedTextLayout.md index 90cdb53cd..88d0fef2e 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/UnsupportedTextLayout.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/UnsupportedTextLayout.md @@ -10,4 +10,4 @@ ### type -• **type**: [`magicFit`](../enumerations/TextType.md#magicfit) \| [`circular`](../enumerations/TextType.md#circular) +• **type**: [`circular`](../enumerations/TextLayout.md#circular) \| [`magicFit`](../enumerations/TextLayout.md#magicfit) diff --git a/src/pages/references/document-sandbox/document-apis/namespaces/Constants/overview.md b/src/pages/references/document-sandbox/document-apis/namespaces/Constants/overview.md index 1754cd2a9..f7d85681c 100644 --- a/src/pages/references/document-sandbox/document-apis/namespaces/Constants/overview.md +++ b/src/pages/references/document-sandbox/document-apis/namespaces/Constants/overview.md @@ -69,9 +69,9 @@ Re-exports [TextAlignment](../../enumerations/TextAlignment.md) --- -### TextType +### TextLayout -Re-exports [TextType](../../enumerations/TextType.md) +Re-exports [TextLayout](../../enumerations/TextLayout.md) --- diff --git a/src/pages/references/document-sandbox/document-apis/overview.md b/src/pages/references/document-sandbox/document-apis/overview.md index a6dc5d153..05b0d38ce 100644 --- a/src/pages/references/document-sandbox/document-apis/overview.md +++ b/src/pages/references/document-sandbox/document-apis/overview.md @@ -19,7 +19,7 @@ - [StrokePosition](enumerations/StrokePosition.md) - [StrokeType](enumerations/StrokeType.md) - [TextAlignment](enumerations/TextAlignment.md) -- [TextType](enumerations/TextType.md) +- [TextLayout](enumerations/TextLayout.md) - [VisualEffectType](enumerations/VisualEffectType.md) ## Classes From 98fe002b8c9bdddea953c066dd3c25aa86a367d0 Mon Sep 17 00:00:00 2001 From: Unzela Inamdar Date: Thu, 24 Apr 2025 14:41:12 +0530 Subject: [PATCH 2/4] Fixed lint issue --- src/pages/references/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/references/changelog.md b/src/pages/references/changelog.md index b568312ef..baafd8975 100644 --- a/src/pages/references/changelog.md +++ b/src/pages/references/changelog.md @@ -230,7 +230,7 @@ You must provide trader details by February 16, 2025, to keep your add-on visibl - Added many new **Text APIs** for improved text management. - [`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). - [`TextNode.nextTextNode`](./document-sandbox/document-apis/classes/TextNode.md#nexttextnode) accessor: gets the next node that overflowing text will spill into. - - [`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. + - [`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. - [`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. - [`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. - [AvailableFont](./document-sandbox/document-apis/classes/AvailableFont.md) and [UnavailableFont](./document-sandbox/document-apis/classes/UnavailableFont.md) classes. From 895fcc2ea43adabb05985878c52e2e9d141019ea Mon Sep 17 00:00:00 2001 From: Unzela Inamdar Date: Tue, 29 Apr 2025 10:54:49 +0530 Subject: [PATCH 3/4] Updated date in changelog --- src/pages/references/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/references/changelog.md b/src/pages/references/changelog.md index baafd8975..073a9f49e 100644 --- a/src/pages/references/changelog.md +++ b/src/pages/references/changelog.md @@ -22,7 +22,7 @@ contributors: # Changelog -## 2025-04-24 +## 2025-04-29 ### Updated From 5d8618680b6b580da8eb632343ee153de92f8c3a Mon Sep 17 00:00:00 2001 From: Unzela Inamdar Date: Wed, 30 Apr 2025 14:34:00 +0530 Subject: [PATCH 4/4] Updated changelog date --- src/pages/references/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/references/changelog.md b/src/pages/references/changelog.md index 073a9f49e..b4c1d5d98 100644 --- a/src/pages/references/changelog.md +++ b/src/pages/references/changelog.md @@ -22,7 +22,7 @@ contributors: # Changelog -## 2025-04-29 +## 2025-04-30 ### Updated