@adobe/ccweb-add-on-sdk-types 1.33.0 → 1.34.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.33.0",
3
+ "version": "1.34.0",
4
4
  "author": "Adobe",
5
5
  "license": "MIT",
6
6
  "description": "Type definitions for Adobe Creative Cloud Web Add-on SDK.",
@@ -24,6 +24,90 @@
24
24
 
25
25
  import { mat2d } from "gl-matrix";
26
26
 
27
+ /**
28
+ * A PageNode represents a page in the document, a child of the root node of the document's "scenegraph" artwork tree
29
+ * (see {@link ExpressRootNode}). A page contains one or more artboards, which in turn contain all the page's visual
30
+ * content. If multiple artboards are present, each represents a keyframe "scene" in the page's animation timeline.
31
+ *
32
+ * ActivePageNode represents a Page that is fully loaded and whose contents are all accessible synchronously. Other
33
+ * pages in the document that are not guaranteed to be accessible are represented by the base class, {@link PageNode}.
34
+ * The entire page encompassing {@link Context.selection} and {@link Context.insertionParent} is always guaranteed to
35
+ * be active.
36
+ *
37
+ * An ActivePageNode may be *unloaded* again in the future after the user navigates to view a different page. It is
38
+ * unsafe to hold onto an ActivePageNode reference across an async period of time, since it might become inaccessible
39
+ * any time after the end of the synchronous execution where you first encountered it. Use {@link Editor.keepContentActiveDuringAsync}
40
+ * if you need to work with a page's content asynchronously.
41
+ *
42
+ * To create new pages, see {@link PageList.addPage}.
43
+ */
44
+ export declare class ActivePageNode extends PageNode {
45
+ /**
46
+ * Returns a read-only list of all children of the node. This list includes all artboards within the page.
47
+ */
48
+ get allChildren(): Readonly<Iterable<ArtboardNode>>;
49
+ /**
50
+ * The artboards or "scenes," which hold the page's visual contents. If multiple artboards are present, this list
51
+ * represents an ordered keyframe sequence in the page's animation timeline.
52
+ * To create new artboards, see {@link ArtboardList.addArtboard}.
53
+ */
54
+ get artboards(): ArtboardList;
55
+ /**
56
+ * <InlineAlert slots="text" variant="warning"/>
57
+ *
58
+ * **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`.
59
+ *
60
+ * @experimental
61
+ * Helper to recursively traverse *all* the exposed scenegraph content within the subtree of this node.
62
+ * Every container node and every leaf node will be visited via a pre-order tree traversal.
63
+ * Although once called the list of direct descendants is static, changes to further descendants may appear while
64
+ * iterating depending on when the operation occurs relative to the parent being yielded.
65
+ * Note that the root node (i.e. what this API was called on) is not visited.
66
+ *
67
+ * Warning: Processing text content via this API can be error-prone. Use {@link VisualNode.allTextContent}
68
+ */
69
+ get allDescendants(): Readonly<Iterable<VisualNode>>;
70
+ /**
71
+ * <InlineAlert slots="text" variant="warning"/>
72
+ *
73
+ * **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`.
74
+ *
75
+ * @experimental
76
+ * Helper to process all text content that is found as part of or within this node. This can be hard to do correctly
77
+ * via manual tree traversal since multiple {@link ThreadedTextNode} can share a single {@link TextContentModel}.
78
+ *
79
+ * This iterator returns a single result per TextContentModel that is at least partially displayed within this node,
80
+ * even if that content is split across several separate TextNode "frames". If this node is or contains some but not
81
+ * all of the display frames of an overall TextContentModel, that model is still included as a result.
82
+ *
83
+ * Note that visibleRanges and visibleText may not be sorted as TextNode "frames" can appear in any order in the scenegraph.
84
+ */
85
+ get allTextContent(): Readonly<Iterable<TextContent>>;
86
+ /**
87
+ * <InlineAlert slots="text" variant="warning"/>
88
+ *
89
+ * **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`.
90
+ *
91
+ * @experimental
92
+ * Returns true if the given node is part of this page's visual content (i.e. within its subtree).
93
+ */
94
+ hasDescendant(node: VisualNode): boolean;
95
+ /**
96
+ * Clones this page, all artboards within it, and all content within those artboards. The cloned page is the same size
97
+ * as the original. Adds the new page immediately after this one in the pages list. The first artboard in the cloned
98
+ * page becomes the default target for newly inserted content ({@link Context.insertionParent}) and the viewport
99
+ * switches to display this artboard.
100
+ *
101
+ * The newly created page starts out already "active" initially as well, so you can immediately access its subtree to
102
+ * modify its content. You should not hold onto this ActivePageNode reference across an async period of time
103
+ * however, since it might become inaccessible at any point after the initial synchronous block of execution where
104
+ * it was created. Use {@link Editor.keepContentActiveDuringAsync} if you need to work with this page's content asynchronously.
105
+ *
106
+ * @returns the cloned page.
107
+ */
108
+ cloneInPlace(): ActivePageNode;
109
+ }
110
+
27
111
  /**
28
112
  * AddOnData class provides APIs to read, write, remove private metadata to a Node.
29
113
  * This metadata is accessible only to the add-on that has set it.
@@ -202,9 +286,12 @@ export declare class ArtboardNode extends VisualNode implements Readonly<IRectan
202
286
  set fill(fill: Fill);
203
287
  get fill(): Readonly<Fill>;
204
288
  /**
205
- * The node's parent. Undefined if the node is an orphan.
289
+ * The node's parent. Undefined if the node is an orphan. If you can access an artboard (or its children) in a given
290
+ * synchronous frame of time, then its parent Page is guaranteed to be an {@link ActivePageNode}, and all other
291
+ * artboards within the page are synchronously accessible as well.
292
+ *
206
293
  */
207
- get parent(): PageNode | undefined;
294
+ get parent(): ActivePageNode | undefined;
208
295
  /**
209
296
  * The width of the artboard.
210
297
  * Shares the same dimensions as the parent {@link PageNode} and other artboards within the parent {@link PageNode}.
@@ -335,6 +422,7 @@ export declare class BaseNode {
335
422
  *
336
423
  * Although BaseNode's allChildren may yield other BaseNodes, the subclasses Node and ArtboardNode override allChildren
337
424
  * to guarantee all their children are full-fledged Node instances.
425
+ * @deprecated This API will be removed after 2026-07-15. Use `ActivePageNode.allChildren` instead.
338
426
  */
339
427
  get allChildren(): Readonly<Iterable<BaseNode>>;
340
428
  /**
@@ -719,41 +807,97 @@ export declare interface CreateRenditionResult {
719
807
  */
720
808
  export declare class Editor {
721
809
  /**
722
- * Enqueues a function to be run at a later time when edits to the user's document may be performed. You can always edit
723
- * the document immediately when invoked in response to your add-on's UI code. However, if you delay to await an
724
- * asynchronous operation such as {@link loadBitmapImage}, any edits following this pause must be scheduled using
725
- * queueAsyncEdit(). This ensures the edit is properly tracked for saving and undo.
726
- *
727
- * The delay before your edit function is executed is typically just a few milliseconds, so it will appear instantaneous
728
- * to users. However, note that queueAsyncEdit() will return *before* your function has been run.
729
- * If you need to trigger any code after the edit has been performed, either include this in the lambda you are enqueuing
730
- * or await the Promise returned by queueAsyncEdit().
810
+ * Legacy API for scheduling an edit after an asynchronous wait, for cases where the edit only targets
811
+ * whatever the current selection or {@link Context.insertionParent} happens to be at the end of the await.
731
812
  *
732
- * Generally, calling any setter or method is treated as an edit; but simple getters may be safely called at any time.
813
+ * New code should use {@link keepContentActiveDuringAsync} instead, which also keeps any pre-designated
814
+ * scenenodes accessible across the async gap and safely runs the follow-up edit.
733
815
  *
734
- * Example of typical usage:
816
+ * @example
817
+ * Load an image from a Blob, then add it to the document using {@link keepContentActiveDuringAsync}:
735
818
  * ```js
736
- * // Assume insertImage() is called from your UI code, and given a Blob containing image data
737
- * async function insertImage(blob) {
738
- * // This function was invoked from the UI iframe, so we can make any edits we want synchronously here.
739
- * // Initially load the bitmap - an async operation
819
+ * async function addImage(blob) {
740
820
  * const bitmapImage = await editor.loadBitmapImage(blob);
741
821
  *
742
- * // Execution doesn't arrive at this line until an async delay, due to the Promise 'await' above
743
- *
744
- * // Further edits need to be queued to run at a safe time
745
- * editor.queueAsyncEdit(() => {
746
- * // Create scenenode to display the image, and add it to the current artboard
747
- * const mediaContainer = editor.createImageContainer(bitmapImage);
748
- * editor.context.insertionParent.children.append(mediaContainer);
749
- * });
822
+ * await editor.keepContentActiveDuringAsync(
823
+ * editor.context.insertionParent,
824
+ * async () => {},
825
+ * () => {
826
+ * const rectangleGeometry = { width: 256, height: 256 };
827
+ * const mediaContainerNode = editor.createImageContainer(bitmapImage, {
828
+ * initialSize: rectangleGeometry
829
+ * });
830
+ * mediaContainerNode.translation = { x: 100, y: 120 };
831
+ * editor.context.insertionParent.children.append(mediaContainerNode);
832
+ * }
833
+ * );
750
834
  * }
751
835
  * ```
752
836
  *
753
837
  * @param lambda - a function which edits the document model.
754
838
  * @returns a Promise that resolves when the lambda has finished running, or rejects if the lambda throws an error.
839
+ * @deprecated This API will be removed after 2026-07-15. Use {@link keepContentActiveDuringAsync} instead.
755
840
  */
756
841
  queueAsyncEdit(lambda: () => void): Promise<void>;
842
+ /**
843
+ * <InlineAlert slots="text" variant="warning"/>
844
+ *
845
+ * **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`.
846
+ *
847
+ * @experimental
848
+ * Allow continued access to a subtree of content over an async span of time. Normally, access to any piece of
849
+ * visual content is only guaranteed during the synchronous execution span where you initially encountered it (e.g.
850
+ * by reading the current selection). After that, it may be unloaded from memory at any time. Use this API if you
851
+ * need to maintain access to specific content after awaiting an async operation (such as a server request).
852
+ *
853
+ * Contrast to {@link queueAsyncEdit}, which you can use after an asynchronous interval to make edits *only* targeting
854
+ * whatever the current selection or {@link Context.insertionParent} is at the end of the interval – *not* any specific
855
+ * content that you predetermined earlier.
856
+ *
857
+ * Example of typical usage:
858
+ * ```js
859
+ * // Assume translateText() is called from your UI code
860
+ * async function translateText() {
861
+ * const textNode = editor.context.selection[0] as TextNode; // for simplicity we blindly assume text is selected
862
+ *
863
+ * // Call this immediately after capturing textNode — do NOT await anything before
864
+ * // calling keepContentActiveDuringAsync, or textNode may become inaccessible.
865
+ * // Edits after awaiting the async lambda need to be queued to run at a safe time, and
866
+ * // with a guarantee that 'textNode' is still accessible
867
+ * await editor.keepContentActiveDuringAsync(
868
+ * textNode,
869
+ * async () => {
870
+ * // All async work belongs here. Use iframe runtime environment to make async network call.
871
+ * // textNode is guaranteed accessible throughout, but do NOT edit the
872
+ * // document inside this lambda — put edits in afterAsyncCallback below.
873
+ * return await uiApis.callTranslationService(textNode.fullContent.text);
874
+ * },
875
+ * (translatedText) => {
876
+ * // This callback runs after the async lambda has resolved.
877
+ * // All document edits belong here. textNode is still accessible.
878
+ * // Replace the text content of textNode with the translation service's results:
879
+ * textNode.fullContent.text = translatedText;
880
+ * }
881
+ * );
882
+ * // Code here runs only after afterAsyncCallback has completed.
883
+ * }
884
+ * ```
885
+ *
886
+ * @param target - Root of the subtree to keep active.
887
+ * @param asyncLambda - Async function representing the async task(s) to perform while the target content is
888
+ * guaranteed to remain accessible. Do not make document edits inside this lambda; use `afterAsyncCallback`
889
+ * instead. The value returned by the lambda is passed to `afterAsyncCallback` for convenience.
890
+ * @param afterAsyncCallback - Callback that is executed after the async lambda has resolved, with the target content
891
+ * still guaranteed to be accessible at the time. It is called when edits to the user's document are allowed (i.e.
892
+ * there is no need to call {@link queueAsyncEdit} as you would after an explicit `await`). After this callback
893
+ * returns, it is no longer safe to read/write the content, since it may become inaccessible at any later time.
894
+ * The callback is passed the value that was yielded by the async lambda, for convenience.
895
+ */
896
+ keepContentActiveDuringAsync<AsyncResultT>(
897
+ target: VisualNode | ActivePageNode,
898
+ asyncLambda: () => Promise<AsyncResultT>,
899
+ afterAsyncCallback: (asyncResult: AsyncResultT) => void
900
+ ): Promise<void>;
757
901
  /**
758
902
  * @returns a text node with default styles. The text content is initially empty, so the text node will be
759
903
  * invisible until its `fullContent` property's `text` is set. Creates auto-width text, so the node's width will
@@ -825,7 +969,7 @@ export declare class Editor {
825
969
  * to create a MediaContainerNode. The same BitmapImage can be used to create multiple MediaContainerNodes.
826
970
  *
827
971
  * Because the resulting BitmapImage is returned asynchronously, to use it you must schedule an edit lambda to run at a
828
- * safe later time in order to call {@link createImageContainer}. See {@link queueAsyncEdit}.
972
+ * safe later time in order to call {@link createImageContainer}. Use {@link Editor.keepContentActiveDuringAsync} if you need to work with this page's content asynchronously.
829
973
  *
830
974
  * Further async steps to upload image resource data may continue in the background after this call's Promise resolves,
831
975
  * but the resulting BitmapImage can be used right away (via the queue API noted above). The local client will act as
@@ -938,10 +1082,10 @@ declare class ExpressColorUtilsWrapper extends ColorUtils {}
938
1082
  */
939
1083
  export declare class ExpressContext extends Context {
940
1084
  /**
941
- * @returns The currently viewed page.
1085
+ * @returns The currently viewed page, which contains {@link Context.selection} and {@link Context.insertionParent}.
942
1086
  * To change the current page, call {@link ExpressViewport.bringIntoView} with an artboard or other content on that page.
943
1087
  */
944
- get currentPage(): PageNode;
1088
+ get currentPage(): ActivePageNode;
945
1089
  }
946
1090
 
947
1091
  /**
@@ -1653,16 +1797,84 @@ export declare interface OrderedListStyleInput extends BaseParagraphListStyle {
1653
1797
  *
1654
1798
  * PageList also provides APIs for adding/removing pages from the document. PageList is never empty: it is illegal to
1655
1799
  * remove the last remaining page from the list.
1800
+ *
1801
+ * Pages outside the current viewport are not guaranteed to be fully loaded, thus the PageNode classes returned from
1802
+ * this list do not allow accessing the page's content directly. The {@link ActivePageNode} subclass represents a
1803
+ * Page that is fully loaded and whose contents are accessible synchronously. The current {@link Context} is always an
1804
+ * an ActivePageNode. To load any other pages for access, use the *asynchronous* {@link visitPages} API.
1656
1805
  */
1657
1806
  export declare class PageList extends RestrictedItemList<PageNode> {
1807
+ /**
1808
+ * <InlineAlert slots="text" variant="warning"/>
1809
+ *
1810
+ * **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`.
1811
+ *
1812
+ * @experimental
1813
+ * Visit the given pages asynchronously: loading each one in turn so its content is accessible, and then invoking
1814
+ * your provided `callback` for the resulting fully-accessible {@link ActivePageNode}.
1815
+ *
1816
+ * The callback receives an {@link ActivePageNode}, which provides full access to the page's content tree (artboards
1817
+ * and all descendants). This access is only guaranteed inside the callback; do not hold onto the reference after the
1818
+ * callback returns.
1819
+ *
1820
+ * Visiting many pages can be slow – up to tens of seconds in larger documents. Any feature which visits all pages
1821
+ * in the entire document should include a progress UI so users understand when the operation is still ongoing.
1822
+ *
1823
+ * There is no guarantee more than one of the Pages will be loaded at the same time – there may only be one page
1824
+ * accessible at a time, each visited with sight delays in between. If your `callback` returns long-running
1825
+ * promises, iteration may pause until some of the promises resolve and free up capacity to load the next page(s)
1826
+ * in the visit list.
1827
+ *
1828
+ * Pages may be visited in a different order than provided for performance reasons, but each callback is still called
1829
+ * exactly once per page.
1830
+ *
1831
+ * Use an `async` callback (or return a promise) so `visitPages` waits for all `await` work on each page before
1832
+ * moving on. Do not start async work without awaiting it as it may make the page inactive before your edits run.
1833
+ *
1834
+ * @example
1835
+ * Call a UI iframe API to translate text on each page, then write the result back to the page (no `keepContentActiveDuringAsync` needed).
1836
+ * `panelUiProxy.translateText` is a method on your add-on's UI iframe proxy:
1837
+ * ```
1838
+ * await pages.visitPages([...pages], async (page) => {
1839
+ * // Assume the first child is a text node for now
1840
+ * const textNode = page.artboards.first.children.item(0) as TextNode;
1841
+ * const translated = await panelUiProxy.translateText(textNode.fullContent.text);
1842
+ * textNode.fullContent.text = translated;
1843
+ * });
1844
+ * ```
1845
+ *
1846
+ * @example
1847
+ * Load an image from the host, then add it to the page:
1848
+ * ```
1849
+ * await pages.visitPages([...pages], async (page) => {
1850
+ * const bitmap = await editor.loadBitmapImage(imageBlob);
1851
+ * const container = editor.createImageContainer(bitmap);
1852
+ * page.artboards.first.children.append(container);
1853
+ * });
1854
+ * ```
1855
+ *
1856
+ * @param pages - Pages to visit.
1857
+ * @param callback - Called once per page while that page is active. Document edits are allowed during the
1858
+ * callback, including after `await` on host APIs (such as `loadBitmapImage`) or UI proxy methods. Use an
1859
+ * `async` callback so `visitPages` waits until your per-page work finishes.
1860
+ */
1861
+ visitPages(pages: PageNode[], callback: (page: ActivePageNode) => void | Promise<void>): Promise<void>;
1862
+
1658
1863
  /**
1659
1864
  * Create a new page containing a single empty artboard, and add it to the end of the list. The artboard is configured
1660
1865
  * with the same defaults as in {@link ArtboardList.addArtboard}. The page's artboard becomes the default target for
1661
1866
  * newly inserted content ({@link Context.insertionParent}) and the viewport switches to display this artboard.
1867
+ *
1868
+ * The newly created page starts out already "active" initially, so you can immediately access its subtree to
1869
+ * populate it with content. You should not hold onto this ActivePageNode reference across an async period of time
1870
+ * however, since it might become inaccessible at any point after the initial synchronous block of execution where
1871
+ * it was created. Use {@link Editor.keepContentActiveDuringAsync} if you need to work with this page's content asynchronously.
1872
+ *
1662
1873
  * @param geometry - The size of the new page.
1874
+ * @returns the newly created page.
1663
1875
  *
1664
1876
  */
1665
- addPage(inputGeometry: RectangleGeometry): PageNode;
1877
+ addPage(inputGeometry: RectangleGeometry): ActivePageNode;
1666
1878
  }
1667
1879
 
1668
1880
  /**
@@ -1677,39 +1889,9 @@ export declare class PageNode extends BaseNode implements IRectangularNode {
1677
1889
  * The artboards or "scenes," which hold the page's visual contents. If multiple artboards are present, this list
1678
1890
  * represents an ordered keyframe sequence in the page's animation timeline.
1679
1891
  * To create new artboards, see {@link ArtboardList.addArtboard}.
1892
+ * @deprecated This API will be removed after 2026-07-15. Use `ActivePageNode.artboards` instead.
1680
1893
  */
1681
1894
  get artboards(): ArtboardList;
1682
- /**
1683
- * <InlineAlert slots="text" variant="warning"/>
1684
- *
1685
- * **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`.
1686
- *
1687
- * @experimental
1688
- * Helper to recursively traverse *all* the exposed scenegraph content within the subtree of this node.
1689
- * Every container node and every leaf node will be visited via a pre-order tree traversal.
1690
- * Although once called the list of direct descendants is static, changes to further descendants may appear while
1691
- * iterating depending on when the operation occurs relative to the parent being yielded.
1692
- * Note that the root node (i.e. what this API was called on) is not visited.
1693
- *
1694
- * Warning: Processing text content via this API can be error-prone. Use {@link VisualNode.allTextContent}
1695
- */
1696
- get allDescendants(): Readonly<Iterable<VisualNode>>;
1697
- /**
1698
- * <InlineAlert slots="text" variant="warning"/>
1699
- *
1700
- * **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`.
1701
- *
1702
- * @experimental
1703
- * Helper to process all text content that is found as part of or within this node. This can be hard to do correctly
1704
- * via manual tree traversal since multiple {@link ThreadedTextNode} can share a single {@link TextContentModel}.
1705
- *
1706
- * This iterator returns a single result per TextContentModel that is at least partially displayed within this node,
1707
- * even if that content is split across several separate TextNode "frames". If this node is or contains some but not
1708
- * all of the display frames of an overall TextContentModel, that model is still included as a result.
1709
- *
1710
- * Note that visibleRanges and visibleText may not be sorted as TextNode "frames" can appear in any order in the scenegraph.
1711
- */
1712
- get allTextContent(): Readonly<Iterable<TextContent>>;
1713
1895
  /**
1714
1896
  * The width of the node.
1715
1897
  *
@@ -1751,7 +1933,7 @@ export declare class PageNode extends BaseNode implements IRectangularNode {
1751
1933
  * page becomes the default target for newly inserted content ({@link Context.insertionParent}) and the viewport
1752
1934
  * switches to display this artboard.
1753
1935
  * @returns the cloned page.
1754
- *
1936
+ * @deprecated This API will be removed after 2026-07-15. Use `ActivePageNode.cloneInPlace` instead.
1755
1937
  */
1756
1938
  cloneInPlace(): PageNode;
1757
1939
  }
@@ -2116,7 +2298,7 @@ declare enum SceneNodeType {
2116
2298
  imageRectangle = "ImageRectangle",
2117
2299
  /** Type of MediaContainerNode's "media rectangle" child when it is holding an unknown media type */
2118
2300
  unknownMediaRectangle = "UnknownMediaRectangle",
2119
- /** Type of PageNode */
2301
+ /** Type of PageNode, or ActivePageNode */
2120
2302
  page = "Page",
2121
2303
  /** Type of ComplexShapeNode, representing a complex prepackaged shape with fill and stroke, that appears as a leaf node in the UI */
2122
2304
  complexShape = "ComplexShape",
@@ -2317,7 +2499,7 @@ declare enum TextAlignment {
2317
2499
  * **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`.
2318
2500
  *
2319
2501
  * @experimental
2320
- * The values yielded by {@link VisualNode.allTextContent} and {@link PageNode.allTextContent}.
2502
+ * The values yielded by {@link VisualNode.allTextContent} and {@link ActivePageNode.allTextContent}.
2321
2503
  */
2322
2504
  export declare interface TextContent {
2323
2505
  textContentModel: TextContentModel;
@@ -2902,6 +3084,16 @@ export declare class VisualNode extends BaseNode implements IVisualNodeBounds {
2902
3084
  * Note that visibleRanges and visibleText may not be sorted as TextNode "frames" can appear in any order in the scenegraph.
2903
3085
  */
2904
3086
  get allTextContent(): Readonly<Iterable<TextContent>>;
3087
+ /**
3088
+ * <InlineAlert slots="text" variant="warning"/>
3089
+ *
3090
+ * **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`.
3091
+ *
3092
+ * @experimental
3093
+ * Returns true if the given node is a descendant (i.e. within the subtree) of this node.
3094
+ * Returns false if passed `this` itself, as a node is not inside its own subtree.
3095
+ */
3096
+ hasDescendant(node: VisualNode): boolean;
2905
3097
  get boundsLocal(): Readonly<Rect>;
2906
3098
  get centerPointLocal(): Readonly<Point>;
2907
3099
  get topLeftLocal(): Readonly<Point>;