@adobe/ccweb-add-on-sdk-types 1.27.0 → 1.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/ccweb-add-on-sdk-types",
3
- "version": "1.27.0",
3
+ "version": "1.29.0",
4
4
  "author": "Adobe",
5
5
  "license": "MIT",
6
6
  "description": "Type definitions for Adobe Creative Cloud Web Add-on SDK.",
@@ -84,10 +84,12 @@ declare namespace ApiConstants {
84
84
  TextLayout,
85
85
  TextScriptStyle,
86
86
  EditorEvent,
87
+ ResizeBehavior,
87
88
  VisualEffectType,
88
89
  TextStyleSource,
89
90
  ParagraphListType,
90
- OrderedListNumbering
91
+ OrderedListNumbering,
92
+ CreateRenditionFormat
91
93
  };
92
94
  }
93
95
 
@@ -170,6 +172,23 @@ export declare class ArtboardNode extends VisualNode implements Readonly<IRectan
170
172
  * The children of an Artboard are all subclasses of Node (not just the more minimal BaseNode or VisualNode).
171
173
  */
172
174
  get allChildren(): Readonly<Iterable<Node>>;
175
+ /**
176
+ * <InlineAlert slots="text" variant="warning"/>
177
+ *
178
+ * **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`.
179
+ *
180
+ * @experimental
181
+ * Helper to recursively traverse *all* the exposed scenegraph content within the subtree of this node.
182
+ * Every container node and every leaf node will be visited via a pre-order tree traversal.
183
+ * Although once called the list of direct descendants is static, changes to further descendants may appear while
184
+ * iterating depending on when the operation occurs relative to the parent being yielded.
185
+ * Note that the root node (i.e. what this API was called on) is not visited.
186
+ *
187
+ * The descendants of an Artboard are all subclasses of Node (not just the more minimal BaseNode or VisualNode).
188
+ *
189
+ * Warning: Processing text content via this API can be error-prone. Use {@link VisualNode.allTextContent}
190
+ */
191
+ get allDescendants(): Readonly<Iterable<Node>>;
173
192
  /**
174
193
  * The artboards's regular children (does not include any "background layer" content if present; use {@link allChildren}
175
194
  * for a read-only view that includes background content). Use the methods on this `children` ItemList object to get,
@@ -392,7 +411,7 @@ export declare class BitmapImage {
392
411
  * **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`.
393
412
  *
394
413
  * @experimental
395
- * Fetches the bitmap data as a Blob. This will wait for the bitmap to be available if necessary.
414
+ * Fetches the bitmap data as a Blob. Waits up to 1 minute for the bitmap to be available if necessary.
396
415
  */
397
416
  data(): Promise<Blob>;
398
417
  }
@@ -553,6 +572,22 @@ export declare class ColorUtils {
553
572
 
554
573
  export declare const colorUtils: ExpressColorUtilsWrapper;
555
574
 
575
+ /**
576
+ * <InlineAlert slots="text" variant="warning"/>
577
+ *
578
+ * **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`.
579
+ *
580
+ * @experimental
581
+ * An interface for arbitrary resize operations regardless of whether given a width or height when using {@link Node.resize}.
582
+ */
583
+ declare interface CommonResizeOptions {
584
+ /**
585
+ * Whether to try to avoid scaling the content's visual styling (e.g. stroke width, corner detailing, etc.).
586
+ * Note that some kinds of content may not be able to avoid rescaling in some scenarios.
587
+ */
588
+ avoidScalingVisualDetailsIfPossible: boolean;
589
+ }
590
+
556
591
  /**
557
592
  * A ComplexShapeNode is a complex prepackaged shape that appears as a leaf node in the UI, even if it is composed
558
593
  * of multiple separate paths.
@@ -630,6 +665,60 @@ export declare class Context {
630
665
  get insertionParent(): ContainerNode;
631
666
  }
632
667
 
668
+ /**
669
+ * <InlineAlert slots="text" variant="warning"/>
670
+ *
671
+ * **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`.
672
+ *
673
+ * @experimental
674
+ * The format of the rendition output.
675
+ */
676
+ export declare enum CreateRenditionFormat {
677
+ png = "png",
678
+ jpeg = "jpeg"
679
+ }
680
+
681
+ /**
682
+ * <InlineAlert slots="text" variant="warning"/>
683
+ *
684
+ * **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`.
685
+ *
686
+ * @experimental
687
+ * An interface for configuring {@link VisualNode.createRendition}.
688
+ */
689
+ export declare interface CreateRenditionOptions {
690
+ /**
691
+ * Whether to output in PNG or JPEG format. Defaults to PNG.
692
+ */
693
+ format?: CreateRenditionFormat;
694
+ /**
695
+ * The scale factor to apply to the content before it is rendered.
696
+ */
697
+ scale?: number;
698
+ }
699
+
700
+ /**
701
+ * <InlineAlert slots="text" variant="warning"/>
702
+ *
703
+ * **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`.
704
+ *
705
+ * @experimental
706
+ * An interface for the result of {@link VisualNode.createRendition}.
707
+ */
708
+ export declare interface CreateRenditionResult {
709
+ /**
710
+ * The PNG or JPEG data for the rendition.
711
+ */
712
+ blob?: Blob;
713
+ /**
714
+ * The bounds of the rendition in the global coordinate space.
715
+ * This may be larger than the {@link VisualNode.boundsLocal} due to rotations, borders, filters, or other effects.
716
+ * Only provided if the {@link VisualNode} is not orphaned.
717
+ *
718
+ */
719
+ drawBoundsGlobal?: Rect;
720
+ }
721
+
633
722
  /**
634
723
  * Entry point for APIs that read or modify the document's content.
635
724
  */
@@ -771,6 +860,25 @@ export declare class Editor {
771
860
  * @returns a stroke configured with the given options.
772
861
  */
773
862
  makeStroke(options?: Partial<SolidColorStroke>): SolidColorStroke;
863
+ /**
864
+ * <InlineAlert slots="text" variant="warning"/>
865
+ *
866
+ * **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`.
867
+ *
868
+ * @experimental
869
+ * @param parentNode - The parent node that will contain the threaded text node. This must be a container node (e.g., ArtboardNode, GroupNode) that is attached to the document.
870
+ * @param textContent - The initial text content for the threaded text node.
871
+ * @param geometry - The geometry of the threaded text node.
872
+ * @returns A new ThreadedTextNode that is part of a threaded text flow.
873
+ *
874
+ * @throws if parentNode is not provided or is not a valid container node.
875
+ * @throws if textContent is empty or invalid.
876
+ */
877
+ createThreadedText(
878
+ parentNode: ContainerNode,
879
+ textContent: string,
880
+ geometry?: TextFrameAreaGeometry
881
+ ): ThreadedTextNode;
774
882
  /**
775
883
  * @returns a path node with a default stroke and no initial fill.
776
884
  * @param path - a string representing any [SVG path element](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths).
@@ -849,13 +957,7 @@ export declare class ExpressContext extends Context {
849
957
  * Entry point for Express specific APIs that read or modify the document's content.
850
958
  */
851
959
  export declare class ExpressEditor extends Editor {
852
- /**
853
- * User's current selection context
854
- */
855
960
  get context(): ExpressContext;
856
- /**
857
- * @returns the root of the document.
858
- */
859
961
  get documentRoot(): ExpressRootNode;
860
962
  }
861
963
 
@@ -980,6 +1082,17 @@ export declare const fonts: ExpressFontsWrapper;
980
1082
  * media rectangle child when those actions are applied.
981
1083
  */
982
1084
  export declare class GridCellNode extends Node implements IMediaContainerNode {
1085
+ /**
1086
+ * <InlineAlert slots="text" variant="warning"/>
1087
+ *
1088
+ * **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`.
1089
+ *
1090
+ * @experimental
1091
+ * Proxy resizing of the MediaRectangleNode *inside* this grid cell. The enclosing grid layout keeps
1092
+ * the crop window (and thus the overall GridCellNode/MediaContainerNode bounds) fixed in position.
1093
+ * *Warning:* This will not change the bounds reported by this GridCellNode itself.
1094
+ */
1095
+ resize(options: ResizeOptions): void;
983
1096
  /**
984
1097
  * Always throws as it's not possible to clone a single grid slot.
985
1098
  * Use the parent grid container instead.
@@ -1387,6 +1500,23 @@ declare class Node extends VisualNode implements INodeBounds {
1387
1500
  * The children of a Node are always other Node classes (never the more minimal BaseNode).
1388
1501
  */
1389
1502
  get allChildren(): Readonly<Iterable<Node>>;
1503
+ /**
1504
+ * <InlineAlert slots="text" variant="warning"/>
1505
+ *
1506
+ * **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`.
1507
+ *
1508
+ * @experimental
1509
+ * Helper to recursively traverse *all* the exposed scenegraph content within the subtree of this node.
1510
+ * Every container node and every leaf node will be visited via a pre-order tree traversal.
1511
+ * Although once called the list of direct descendants is static, changes to further descendants may appear while
1512
+ * iterating depending on when the operation occurs relative to the parent being yielded.
1513
+ * Note that the root node (i.e. what this API was called on) is not visited.
1514
+ *
1515
+ * The descendants of a Node are always other Node classes (never the more minimal BaseNode).
1516
+ *
1517
+ * Warning: Processing text content via this API can be error-prone. Use {@link VisualNode.allTextContent}
1518
+ */
1519
+ get allDescendants(): Readonly<Iterable<Node>>;
1390
1520
  get boundsInParent(): Readonly<Rect>;
1391
1521
  boundsInNode(targetNode: VisualNode): Readonly<Rect>;
1392
1522
  get translation(): Readonly<Point>;
@@ -1449,60 +1579,9 @@ declare class Node extends VisualNode implements INodeBounds {
1449
1579
  * **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`.
1450
1580
  *
1451
1581
  * @experimental
1452
- * Changes the width to the given value by visually *scaling* the entire content larger or smaller on both axes to
1453
- * preserve its existing aspect ratio, keeping its top-left corner ({@link topLeftLocal}) at a fixed location.
1454
- *
1455
- * Scaling changes the size of visual styling elements such as stroke width, corner detailing, and font size.
1456
- * Contrast this to *resizing* operations (such as {@link resizeToFitWithin}), which adjust the bounding box of an
1457
- * element while trying to preserve the existing size of visual detailing such as strokes, corners, and fonts.
1458
- *
1459
- * Rescaling becomes baked into the updated values of fields such as stroke weight, rectangle width, etc. (it is not
1460
- * a separate, persistent scale factor multiplier).
1461
- */
1462
- rescaleProportionalToWidth(width: number): void;
1463
- /**
1464
- * <InlineAlert slots="text" variant="warning"/>
1465
- *
1466
- * **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`.
1467
- *
1468
- * @experimental
1469
- * Changes the height to the given value by visually *scaling* the entire content larger or smaller on both axes to
1470
- * preserve its existing aspect ratio. See {@link rescaleProportionalToWidth} documentation for additional explanation.
1582
+ * Resizes this node based on the given {@link ResizeOptions}.
1471
1583
  */
1472
- rescaleProportionalToHeight(height: number): void;
1473
- /**
1474
- * <InlineAlert slots="text" variant="warning"/>
1475
- *
1476
- * **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`.
1477
- *
1478
- * @experimental
1479
- * Resizes the node to fit entirely *within* a box of the given dimensions, keeping its top-left corner ({@link topLeftLocal})
1480
- * at a fixed location. Nodes with a fixed aspect ratio may leave unused space on one axis as a result, but nodes
1481
- * with flexible aspect ratio will be resized to the exact box size specified.
1482
- *
1483
- * Resizing attempts to preserve the existing size of visual styling elements such as stroke width, corner detailing,
1484
- * and font size as much as possible. Contrast with *rescaling* (such as {@link rescaleProportionalToWidth}), which
1485
- * always changes the size of visual detailing in exact proportion to the change in overall bounding box size. This
1486
- * API may still produce *some* degree of rescaling if necessary for certain shapes with fixed corner/edge detailing
1487
- * to fit the box better.
1488
- *
1489
- * @see resizeToCover
1490
- */
1491
- resizeToFitWithin(width: number, height: number): void;
1492
- /**
1493
- * <InlineAlert slots="text" variant="warning"/>
1494
- *
1495
- * **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`.
1496
- *
1497
- * @experimental
1498
- * Resizes the node to completely *cover* a box of the given dimensions, keeping its top-left corner ({@link topLeftLocal})
1499
- * at a fixed location. Nodes with a fixed aspect ratio may extend outside the box on one axis as a result, but
1500
- * nodes with flexible aspect ratio will be resized to the exact box size specified. See {@link resizeToFitWithin}
1501
- * documentation for additional explanation.
1502
- *
1503
- * @see resizeToFitWithin
1504
- */
1505
- resizeToCover(width: number, height: number): void;
1584
+ resize(options: ResizeOptions): void;
1506
1585
  /**
1507
1586
  * Creates a copy of this node and its entire subtree of descendants.
1508
1587
  *
@@ -1582,6 +1661,37 @@ export declare class PageNode extends BaseNode implements IRectangularNode {
1582
1661
  * To create new artboards, see {@link ArtboardList.addArtboard}.
1583
1662
  */
1584
1663
  get artboards(): ArtboardList;
1664
+ /**
1665
+ * <InlineAlert slots="text" variant="warning"/>
1666
+ *
1667
+ * **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`.
1668
+ *
1669
+ * @experimental
1670
+ * Helper to recursively traverse *all* the exposed scenegraph content within the subtree of this node.
1671
+ * Every container node and every leaf node will be visited via a pre-order tree traversal.
1672
+ * Although once called the list of direct descendants is static, changes to further descendants may appear while
1673
+ * iterating depending on when the operation occurs relative to the parent being yielded.
1674
+ * Note that the root node (i.e. what this API was called on) is not visited.
1675
+ *
1676
+ * Warning: Processing text content via this API can be error-prone. Use {@link VisualNode.allTextContent}
1677
+ */
1678
+ get allDescendants(): Readonly<Iterable<VisualNode>>;
1679
+ /**
1680
+ * <InlineAlert slots="text" variant="warning"/>
1681
+ *
1682
+ * **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`.
1683
+ *
1684
+ * @experimental
1685
+ * Helper to process all text content that is found as part of or within this node. This can be hard to do correctly
1686
+ * via manual tree traversal since multiple {@link ThreadedTextNode} can share a single {@link TextContentModel}.
1687
+ *
1688
+ * This iterator returns a single result per TextContentModel that is at least partially displayed within this node,
1689
+ * even if that content is split across several separate TextNode "frames". If this node is or contains some but not
1690
+ * all of the display frames of an overall TextContentModel, that model is still included as a result.
1691
+ *
1692
+ * Note that visibleRanges and visibleText may not be sorted as TextNode "frames" can appear in any order in the scenegraph.
1693
+ */
1694
+ get allTextContent(): Readonly<Iterable<TextContent>>;
1585
1695
  /**
1586
1696
  * The width of the node.
1587
1697
  *
@@ -1845,6 +1955,111 @@ declare interface RemoveListStyleInput extends BaseParagraphListStyle {
1845
1955
  type: ParagraphListType.none;
1846
1956
  }
1847
1957
 
1958
+ /**
1959
+ * <InlineAlert slots="text" variant="warning"/>
1960
+ *
1961
+ * **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`.
1962
+ *
1963
+ * @experimental
1964
+ * An interface for rescaling the node based on a given height when using {@link Node.resize}.
1965
+ */
1966
+ declare interface RescaleProportionalToHeightOptions extends CommonResizeOptions {
1967
+ behavior: ResizeBehavior.proportional;
1968
+ height: number;
1969
+ /** Instead of providing a width, it will be calculated by multiplying the given height by the current aspect ratio. */
1970
+ width?: never;
1971
+ }
1972
+
1973
+ /**
1974
+ * <InlineAlert slots="text" variant="warning"/>
1975
+ *
1976
+ * **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`.
1977
+ *
1978
+ * @experimental
1979
+ * An interface for rescaling the node based on a given width when using {@link Node.resize}.
1980
+ */
1981
+ declare interface RescaleProportionalToWidthOptions extends CommonResizeOptions {
1982
+ behavior: ResizeBehavior.proportional;
1983
+ width: number;
1984
+ /** Instead of providing a height, it will be calculated by multiplying the given width by the current aspect ratio. */
1985
+ height?: never;
1986
+ }
1987
+
1988
+ /**
1989
+ * <InlineAlert slots="text" variant="warning"/>
1990
+ *
1991
+ * **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`.
1992
+ *
1993
+ * @experimental
1994
+ * An enum for controlling the behavior of {@link Node.resize}.
1995
+ */
1996
+ export declare enum ResizeBehavior {
1997
+ /**
1998
+ * Resizes the node to fit entirely *within* a box of the given dimensions, keeping its {@link topLeftLocal}
1999
+ * at a fixed location. Nodes with a fixed aspect ratio may leave unused space on one axis as a result,
2000
+ * but nodes with flexible aspect ratio will be resized to the exact box size specified.
2001
+ */
2002
+ contain = "contain",
2003
+ /**
2004
+ * Resizes the node to completely *cover* a box of the given dimensions, keeping its {@link topLeftLocal}
2005
+ * at a fixed location. Nodes with a fixed aspect ratio may extend outside the box on one axis as a result,
2006
+ * but nodes with flexible aspect ratio will be resized to the exact box size specified.
2007
+ */
2008
+ cover = "cover",
2009
+ /**
2010
+ * Resizes the node to the given width or height while preserving its current aspect ratio, keeping its
2011
+ * {@link topLeftLocal} at a fixed location.
2012
+ */
2013
+ proportional = "proportional"
2014
+ }
2015
+
2016
+ /**
2017
+ * <InlineAlert slots="text" variant="warning"/>
2018
+ *
2019
+ * **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`.
2020
+ *
2021
+ * @experimental
2022
+ * A type union for providing the necessary arguments to {@link Node.resize}.
2023
+ *
2024
+ * Note that some nodes only support proportional resizing. In some cases this is always true (e.g. images) while in
2025
+ * other cases it is due to the current visual details (e.g. the stroke being too thick to shrink the size of a shape).
2026
+ */
2027
+ export declare type ResizeOptions =
2028
+ | RescaleProportionalToWidthOptions
2029
+ | RescaleProportionalToHeightOptions
2030
+ | ResizeUsingWidthOptions
2031
+ | ResizeUsingHeightOptions;
2032
+
2033
+ /**
2034
+ * <InlineAlert slots="text" variant="warning"/>
2035
+ *
2036
+ * **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`.
2037
+ *
2038
+ * @experimental
2039
+ * An interface for resizing the node based on a given height when using {@link Node.resize}.
2040
+ */
2041
+ declare interface ResizeUsingHeightOptions extends CommonResizeOptions {
2042
+ behavior: ResizeBehavior.contain | ResizeBehavior.cover;
2043
+ height: number;
2044
+ /** If a width is not provided, it will be calculated by multiplying the given height by the current aspect ratio. */
2045
+ width?: number;
2046
+ }
2047
+
2048
+ /**
2049
+ * <InlineAlert slots="text" variant="warning"/>
2050
+ *
2051
+ * **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`.
2052
+ *
2053
+ * @experimental
2054
+ * An interface for resizing the node based on a given width when using {@link Node.resize}.
2055
+ */
2056
+ declare interface ResizeUsingWidthOptions extends CommonResizeOptions {
2057
+ behavior: ResizeBehavior.contain | ResizeBehavior.cover;
2058
+ width: number;
2059
+ /** If a height is not provided, it will be calculated by multiplying the given width by the current aspect ratio. */
2060
+ height?: number;
2061
+ }
2062
+
1848
2063
  /**
1849
2064
  * Base for ItemLists that restrict how items are added to the list, but freely allow items to be removed and
1850
2065
  * reordered. The {@link ItemList} subclass adds more capabilities, however.
@@ -2095,6 +2310,32 @@ declare enum TextAlignment {
2095
2310
  justifyLeft = 4
2096
2311
  }
2097
2312
 
2313
+ /**
2314
+ * <InlineAlert slots="text" variant="warning"/>
2315
+ *
2316
+ * **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`.
2317
+ *
2318
+ * @experimental
2319
+ * The values yielded by {@link VisualNode.allTextContent} and {@link PageNode.allTextContent}.
2320
+ */
2321
+ export declare interface TextContent {
2322
+ textContentModel: TextContentModel;
2323
+ /**
2324
+ * An unsorted list of the subranges of the related text content model that are visible within the node.
2325
+ *
2326
+ * Since a single text content model can be displayed across multiple TextNode "frames", any of which could be
2327
+ * outside of the node, the union of all the subranges in this value may still be a subset of the total range.
2328
+ */
2329
+ visibleRanges: TextRange[];
2330
+ /**
2331
+ * An unsorted list of the parts of the related text content model that are visible within the node.
2332
+ *
2333
+ * Since a single text content model can be displayed across multiple TextNode "frames", any of which could be
2334
+ * outside of the node, the union of all the text in this value may still be a subset of the total text.
2335
+ */
2336
+ visibleText: string[];
2337
+ }
2338
+
2098
2339
  /**
2099
2340
  * TextContentModel is an abstract base class representing a complete piece of text content.
2100
2341
  * Use this model to get or modify the text string and the style ranges applied to it.
@@ -2258,6 +2499,15 @@ export declare abstract class TextContentModel {
2258
2499
  hasUnavailableFonts(): boolean;
2259
2500
  }
2260
2501
 
2502
+ /**
2503
+ * Geometry for an area text frame in pixels.
2504
+ * @experimental
2505
+ */
2506
+ export declare interface TextFrameAreaGeometry {
2507
+ width: number;
2508
+ height: number;
2509
+ }
2510
+
2261
2511
  /**
2262
2512
  * <InlineAlert slots="text" variant="warning"/>
2263
2513
  *
@@ -2482,12 +2732,23 @@ export declare enum TextStyleSource {
2482
2732
  * ThreadedTextContentModel represents a complete piece of text content that is split across multiple
2483
2733
  * {@link ThreadedTextNode} frames for display. This subclass provides a mutable {@link allFrames} list
2484
2734
  * that supports adding, removing, and reordering text frames.
2485
- *
2486
- * The append and insert operations will automatically parent the new frame to the same parent as the
2487
- * reference frame and place it in the correct z-order.
2488
2735
  */
2489
2736
  export declare class ThreadedTextContentModel extends TextNodeContentModel {
2490
2737
  get allTextNodes(): Readonly<Iterable<ThreadedTextNode>>;
2738
+ get frames(): ThreadedTextList;
2739
+ }
2740
+
2741
+ export declare class ThreadedTextList extends ReadOnlyItemList<ThreadedTextNode> {
2742
+ /**
2743
+ * <InlineAlert slots="text" variant="warning"/>
2744
+ *
2745
+ * **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`.
2746
+ *
2747
+ * @experimental
2748
+ * @param geometry - The geometry of the threaded text node in pixels (width and height).
2749
+ * @returns A new ThreadedTextNode that is part of a threaded text flow.
2750
+ */
2751
+ addFrame(geometry?: TextFrameAreaGeometry): ThreadedTextNode;
2491
2752
  }
2492
2753
 
2493
2754
  /**
@@ -2496,8 +2757,6 @@ export declare class ThreadedTextContentModel extends TextNodeContentModel {
2496
2757
  * instead it refers to a {@link TextNodeContentModel}, which may be shared across multiple ThreadedTextNode frames.
2497
2758
  *
2498
2759
  * All linked ThreadedTextNodes that share a single TextContentModel must remain together within the same artboard.
2499
- *
2500
- * APIs are not yet available to create multi-frame text flows. To create *non*-threaded text, use {@link Editor.createText}.
2501
2760
  */
2502
2761
  export declare class ThreadedTextNode extends TextNode {
2503
2762
  /**
@@ -2593,6 +2852,15 @@ declare enum VisualEffectType {
2593
2852
  * Some VisualNodes might have a non-visual parent such as a PageNode.
2594
2853
  */
2595
2854
  export declare class VisualNode extends BaseNode implements IVisualNodeBounds {
2855
+ /**
2856
+ * Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or
2857
+ * GroupNode also provide a mutable {@link ContainerNode.children} list. Other nodes with a more specific structure can
2858
+ * hold children in various discrete "slots"; this `allChildren` list includes *all* such children and reflects their
2859
+ * overall display z-order.
2860
+ *
2861
+ * The children of a VisualNode are always other VisualNode classes (never the more minimal BaseNode).
2862
+ */
2863
+ get allChildren(): Readonly<Iterable<VisualNode>>;
2596
2864
  /**
2597
2865
  * The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned
2598
2866
  * content, it will be the root of the deleted content (which might be this node itself).
@@ -2602,10 +2870,54 @@ export declare class VisualNode extends BaseNode implements IVisualNodeBounds {
2602
2870
  * meaningful comparison or conversion between the bounds or coordinate spaces of such nodes.
2603
2871
  */
2604
2872
  get visualRoot(): VisualNode;
2873
+ /**
2874
+ * <InlineAlert slots="text" variant="warning"/>
2875
+ *
2876
+ * **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`.
2877
+ *
2878
+ * @experimental
2879
+ * Helper to recursively traverse *all* the exposed scenegraph content within the subtree of this node.
2880
+ * Every container node and every leaf node will be visited via a pre-order tree traversal.
2881
+ * Although once called the list of direct descendants is static, changes to further descendants may appear while
2882
+ * iterating depending on when the operation occurs relative to the parent being yielded.
2883
+ * Note that the root node (i.e. what this API was called on) is not visited.
2884
+ *
2885
+ * Warning: Processing text content via this API can be error-prone. Use {@link VisualNode.allTextContent}
2886
+ */
2887
+ get allDescendants(): Readonly<Iterable<VisualNode>>;
2888
+ /**
2889
+ * <InlineAlert slots="text" variant="warning"/>
2890
+ *
2891
+ * **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`.
2892
+ *
2893
+ * @experimental
2894
+ * Helper to process all text content that is found as part of or within this node. This can be hard to do correctly
2895
+ * via manual tree traversal since multiple {@link ThreadedTextNode} can share a single {@link TextContentModel}.
2896
+ *
2897
+ * This iterator returns a single result per TextContentModel that is at least partially displayed within this node,
2898
+ * even if that content is split across several separate TextNode "frames". If this node is or contains some but not
2899
+ * all of the display frames of an overall TextContentModel, that model is still included as a result.
2900
+ *
2901
+ * Note that visibleRanges and visibleText may not be sorted as TextNode "frames" can appear in any order in the scenegraph.
2902
+ */
2903
+ get allTextContent(): Readonly<Iterable<TextContent>>;
2605
2904
  get boundsLocal(): Readonly<Rect>;
2606
2905
  get centerPointLocal(): Readonly<Point>;
2607
2906
  get topLeftLocal(): Readonly<Point>;
2608
2907
  localPointInNode(localPoint: Point, targetNode: VisualNode): Readonly<Point>;
2908
+ /**
2909
+ * <InlineAlert slots="text" variant="warning"/>
2910
+ *
2911
+ * **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`.
2912
+ *
2913
+ * @experimental
2914
+ * Generates a rendition of this node and its descendants.
2915
+ *
2916
+ * If this node contains images, it will wait for the best quality to be available before capturing.
2917
+ * As such, there is a 20s timeout before an error is thrown to prevent indefinite waiting.
2918
+ *
2919
+ */
2920
+ createRendition(options?: CreateRenditionOptions): Promise<CreateRenditionResult>;
2609
2921
  }
2610
2922
 
2611
2923
  export {};
package/ui/ui-sdk.d.ts CHANGED
@@ -945,6 +945,11 @@ declare interface Document_2 {
945
945
  * Run print quality check
946
946
  */
947
947
  runPrintQualityCheck(options: PrintQualityCheckOptions): void;
948
+ /**
949
+ * @experimental - Experimental API
950
+ * @returns true if the document is a presentation document.
951
+ */
952
+ isPresentation(): Promise<boolean>;
948
953
  }
949
954
  export { Document_2 as Document };
950
955
 
@@ -1315,7 +1320,8 @@ export declare interface JpgRenditionOptions extends RenditionOptions {
1315
1320
  */
1316
1321
  quality?: number;
1317
1322
  /**
1318
- * Requested size
1323
+ * The desired dimensions for the image rendition.
1324
+ * NOTE: Only downscaling is supported on mobile and chrome OS devices.
1319
1325
  */
1320
1326
  requestedSize?: {
1321
1327
  width?: number;
@@ -1750,7 +1756,8 @@ export declare interface PngRenditionOptions extends RenditionOptions {
1750
1756
  */
1751
1757
  backgroundColor?: number;
1752
1758
  /**
1753
- * Requested size
1759
+ * The desired dimensions for the image rendition.
1760
+ * NOTE: Only downscaling is supported on mobile and chrome OS devices.
1754
1761
  */
1755
1762
  requestedSize?: {
1756
1763
  width?: number;