@@ -81,7 +81,7 @@ declare namespace ApiConstants {
8181 StrokePosition ,
8282 StrokeType ,
8383 TextAlignment ,
84- TextType ,
84+ TextLayout ,
8585 EditorEvent ,
8686 VisualEffectType ,
8787 ParagraphListType ,
@@ -105,7 +105,7 @@ declare interface ApiModuleExport {
105105 * @experimental
106106 */
107107export declare interface AreaTextLayout {
108- type : TextType . area ;
108+ type : TextLayout . area ;
109109 /**
110110 * The width of the text node in pixels.
111111 */
@@ -120,6 +120,11 @@ export declare interface AreaTextLayout {
120120 * <InlineAlert slots="text" variant="warning"/>
121121 *
122122 * *Do not depend on the literal numeric values of these constants*, as they may change. Always reference the enum identifiers in your code.
123+ *
124+ * <InlineAlert slots="text" variant="warning"/>
125+ *
126+ * *Additional arrowhead types may be added in the future.* If your code has different branches or cases depending on arrow type,
127+ * always have a default/fallback case to handle any unknown values you may encounter.
123128 */
124129declare enum ArrowHeadType {
125130 none = 0 ,
@@ -201,7 +206,7 @@ export declare class ArtboardNode extends VisualNode implements IRectangularNode
201206 * @experimental
202207 */
203208export declare interface AutoHeightTextLayout {
204- type : TextType . autoHeight ;
209+ type : TextLayout . autoHeight ;
205210 /**
206211 * The width of the text node in pixels.
207212 */
@@ -1477,7 +1482,7 @@ export declare interface Point {
14771482 * @experimental
14781483 */
14791484export declare interface PointTextLayout {
1480- type : TextType . autoWidth ;
1485+ type : TextLayout . autoWidth ;
14811486}
14821487
14831488/**
@@ -1799,11 +1804,17 @@ declare interface StyleRange {
17991804 * <InlineAlert slots="text" variant="warning"/>
18001805 *
18011806 * *Do not depend on the literal numeric values of these constants*, as they may change. Always reference the enum identifiers in your code.
1807+ *
1808+ * <InlineAlert slots="text" variant="warning"/>
1809+ *
1810+ * *Additional alignment types may be added in the future.* If your code has different branches or cases depending on text alignment,
1811+ * always have a default/fallback case to handle any unknown values you may encounter.
18021812 */
18031813declare enum TextAlignment {
18041814 left = 1 ,
18051815 right = 2 ,
1806- center = 3
1816+ center = 3 ,
1817+ justifyLeft = 4
18071818}
18081819
18091820/**
@@ -1917,6 +1928,43 @@ export declare class TextContentModel {
19171928 hasUnavailableFonts ( ) : boolean ;
19181929}
19191930
1931+ /**
1932+ * <InlineAlert slots="text" variant="warning"/>
1933+ *
1934+ * *Do not depend on the literal numeric values of these constants*, as they may change. Always reference the enum identifiers in your code.
1935+ *
1936+ * <InlineAlert slots="text" variant="warning"/>
1937+ *
1938+ * *Additional text layout types may be added in the future.* If your code has different branches or cases depending on layout type,
1939+ * always have a default/fallback case to handle any unknown values you may encounter.
1940+ */
1941+ declare enum TextLayout {
1942+ /**
1943+ * Area text: both width and height are explicitly set. If text content is too long to fit, the end of the text will be
1944+ * clipped. If text content is short, the frame's bounds will occupy extra height that is just blank space.
1945+ */
1946+ area = 1 ,
1947+ /**
1948+ * Auto-height text: Width is explicitly set, and text wraps to use as much vertical space as necessary to display the
1949+ * full content.
1950+ */
1951+ autoHeight = 2 ,
1952+ /**
1953+ * Auto-width, aka point text: both width and height are automatically determined based on the content. There is no
1954+ * automatic line wrapping, so the text will all be on one line unless the text contains explicit newlines.
1955+ */
1956+ autoWidth = 3 ,
1957+ /**
1958+ * Text is arranged in a circle or arc. The API does not yet support setting or reading the details of this layout style.
1959+ */
1960+ circular = 4 ,
1961+ /**
1962+ * Aka "Dynamic" layout in the UI: text size and styles are automatically varied to create an attractive multi-line layout.
1963+ * The API does not yet support setting or reading the details of this layout style.
1964+ */
1965+ magicFit = 5
1966+ }
1967+
19201968/**
19211969 * A TextNode represents a text display frame in the scenegraph. It may display an entire piece of text, or sometimes just
19221970 * a subset of longer text that flows across multiple TextNode "frames". Because of this, the TextNode does not directly hold
@@ -2006,7 +2054,7 @@ export declare class TextNode extends Node {
20062054 * If this TextNode is part of a multi-frame text content flow, it must be configured to use {@link AreaTextLayout}. Other
20072055 * layout modes, except for {@link AreaTextLayout}, are only available for single-frame text.
20082056 *
2009- * @throws if changing text layout to/from {@link TextType .magicFit} or {@link TextType .circular} layout when the text contains font(s) unavailable to the current user.
2057+ * @throws if changing text layout to/from {@link TextLayout .magicFit} or {@link TextLayout .circular} layout when the text contains font(s) unavailable to the current user.
20102058 * @throws if {@link TextNode} is part of a multi-frame text content flow and the layout is not {@link AreaTextLayout}.
20112059 * @throws if {@link TextNode} is not a part of a multi-frame text content flow and the layout is {@link AreaTextLayout}.
20122060 */
@@ -2021,25 +2069,6 @@ declare interface TextRange {
20212069 length : number ;
20222070}
20232071
2024- /**
2025- * <InlineAlert slots="text" variant="warning"/>
2026- *
2027- * *Do not depend on the literal numeric values of these constants*, as they may change. Always reference the enum identifiers in your code.
2028- */
2029- declare enum TextType {
2030- area = 1 ,
2031- /**
2032- * Soft bottom
2033- */
2034- autoHeight = 2 ,
2035- /**
2036- * Point text
2037- */
2038- autoWidth = 3 ,
2039- circular = 4 ,
2040- magicFit = 5
2041- }
2042-
20432072/**
20442073 * Font the current user does not have access or licensing permissions to create / edit content with.
20452074 */
@@ -2091,7 +2120,7 @@ export declare interface UnorderedListStyleInput extends BaseParagraphListStyle
20912120 * @experimental
20922121 */
20932122export declare interface UnsupportedTextLayout {
2094- type : TextType . magicFit | TextType . circular ;
2123+ type : TextLayout . magicFit | TextLayout . circular ;
20952124}
20962125
20972126/**
0 commit comments