From 795d3a9f5669c9a5c0bcb0da0e06f92dd544f36e Mon Sep 17 00:00:00 2001 From: Abhishek Das Date: Mon, 9 Sep 2024 20:55:01 +0530 Subject: [PATCH 1/8] Stroke refactorings and new replaceMedia() API --- README.md | 71 +- src/pages/references/changelog.md | 743 +++++++++--------- .../document-apis/classes/ArtboardList.md | 140 ++-- .../document-apis/classes/ArtboardNode.md | 191 ++--- .../document-apis/classes/BaseNode.md | 40 +- .../document-apis/classes/ColorUtils.md | 93 ++- .../document-apis/classes/ComplexShapeNode.md | 381 +++------ .../document-apis/classes/Context.md | 48 +- .../document-apis/classes/Editor.md | 158 ++-- .../document-apis/classes/EllipseNode.md | 413 ++++------ .../document-apis/classes/ExpressRootNode.md | 54 +- .../document-apis/classes/FillableNode.md | 394 ++++------ .../document-apis/classes/GridLayoutNode.md | 365 +++------ .../document-apis/classes/GroupNode.md | 399 +++------- .../classes/ImageRectangleNode.md | 349 +++----- .../document-apis/classes/ItemList.md | 207 +++-- .../document-apis/classes/LineNode.md | 456 ++++------- .../classes/MediaContainerNode.md | 361 ++++----- .../document-apis/classes/Node.md | 298 +++---- .../document-apis/classes/PageList.md | 148 ++-- .../document-apis/classes/PageNode.md | 96 +-- .../document-apis/classes/PathNode.md | 401 ++++------ .../document-apis/classes/ReadOnlyItemList.md | 62 +- .../document-apis/classes/RectangleNode.md | 527 ++++--------- .../classes/RestrictedItemList.md | 144 ++-- .../classes/SolidColorShapeNode.md | 347 +++----- .../document-apis/classes/StrokableNode.md | 367 +++------ .../document-apis/classes/StrokeShapeNode.md | 357 +++------ .../document-apis/classes/TextNode.md | 365 +++------ .../document-apis/classes/UnknownNode.md | 331 +++----- .../document-apis/classes/VisualNode.md | 97 +-- .../document-apis/concepts/index.md | 692 ++++++++-------- .../{enums => enumerations}/ArrowHeadType.md | 32 +- .../{enums => enumerations}/BlendMode.md | 70 +- .../{enums => enumerations}/FillRule.md | 8 +- .../{enums => enumerations}/FillType.md | 6 +- .../{enums => enumerations}/SceneNodeType.md | 70 +- .../enumerations/StrokePosition.md | 27 + .../document-apis/enumerations/StrokeType.md | 20 + .../{enums => enumerations}/TextAlignment.md | 12 +- .../document-apis/enums/StrokePosition.md | 27 - .../document-apis/interfaces/BitmapImage.md | 8 +- .../document-apis/interfaces/Color.md | 14 +- .../document-apis/interfaces/ColorFill.md | 14 +- .../document-apis/interfaces/ContainerNode.md | 124 +-- .../document-apis/interfaces/Fill.md | 11 +- .../document-apis/interfaces/IFillableNode.md | 8 +- .../interfaces/IRectangularNode.md | 13 +- .../interfaces/IStrokableNode.md | 8 +- .../document-apis/interfaces/Point.md | 6 +- .../interfaces/RectangleGeometry.md | 6 +- .../interfaces/SolidColorStroke.md | 67 ++ .../document-apis/interfaces/Stroke.md | 50 +- .../document-apis/modules/Constants.md | 45 -- .../namespaces/Constants/overview.md | 49 ++ .../document-apis/overview.md | 108 +-- .../SolidColorStrokeWithOptionalType.md | 7 + 57 files changed, 3882 insertions(+), 6023 deletions(-) rename src/pages/references/document-sandbox/document-apis/{enums => enumerations}/ArrowHeadType.md (54%) rename src/pages/references/document-sandbox/document-apis/{enums => enumerations}/BlendMode.md (70%) rename src/pages/references/document-sandbox/document-apis/{enums => enumerations}/FillRule.md (78%) rename src/pages/references/document-sandbox/document-apis/{enums => enumerations}/FillType.md (73%) rename src/pages/references/document-sandbox/document-apis/{enums => enumerations}/SceneNodeType.md (63%) create mode 100644 src/pages/references/document-sandbox/document-apis/enumerations/StrokePosition.md create mode 100644 src/pages/references/document-sandbox/document-apis/enumerations/StrokeType.md rename src/pages/references/document-sandbox/document-apis/{enums => enumerations}/TextAlignment.md (66%) delete mode 100644 src/pages/references/document-sandbox/document-apis/enums/StrokePosition.md create mode 100644 src/pages/references/document-sandbox/document-apis/interfaces/SolidColorStroke.md delete mode 100644 src/pages/references/document-sandbox/document-apis/modules/Constants.md create mode 100644 src/pages/references/document-sandbox/document-apis/namespaces/Constants/overview.md create mode 100644 src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md diff --git a/README.md b/README.md index 2f7164603..19139ac8b 100644 --- a/README.md +++ b/README.md @@ -10,16 +10,37 @@ This section outlines the steps that should be taken to format the generated Doc **Recommended pre-req:** Install [this extension](https://marketplace.visualstudio.com/items?itemName=jakearl.search-editor-apply-changes) in VS Code to make it easier to apply transformations across many files. -1. **Search** and **Replace** again across files to change the auto-generated HLAPI docs headings from `@add-on-hlapi-sdk` –> to `@express-document-sdk`. -2. Fix any `[iterator]` links to remove the brackets from the link references to ensure they work. For instance: `ArtboardList.md#[iterator]` should be `ArtboardList.md#iterator`. To fix, use Search again with a regex string of `.md#\[iterator\]` and replace with `.md#iterator`. -3. Add a blank line after any `InlineAlerts` in the Enums to render them properly. *(This can be easily fixed in the hz repo)* -4. Ensure any lists are be surrounded by one blank line so the linter in the PR job doesn't complain. See **Context**, **Editor** classes specifically such as the `createStroke` method which has a list. (Note: you can check the PR validation job to see if you missed any). *(This can be easily fixed in the hz repo)* +1. **Search** and **Replace** again across files to change the auto-generated HLAPI docs headings from `@express-document-sdk` –> to `@express-document-sdk`. + +2. Replace all \`mat2d\` --> \[\`mat2d\`\]\(https://glmatrix.net/docs/module-mat2d.html\) + +3. Fix any `[iterator]` links to remove the brackets from the link references to ensure they work. For instance: `ArtboardList.md#%5Biterator%5D` should be `ArtboardList.md#iterator`. To fix, use Search again with a regex string of `.md#%5Biterator%5D` and replace with `.md#iterator`. + +4. Find and remove all ocurrences of `TemplatizedProxyLiveObject`. An example is of `ReadOnlyItemList.md`, where you should remove the following section: + +``` +## Extends + +- `TemplatizedProxyLiveObject`\<`HzApiInputType`\> +``` + +5. Find and remove all ocurrences of `ProxyLiveObject`. An example is of `BaseNode.md`, where you should remove the following section: + +``` +## Extends + +- `ProxyLiveObject` +``` + +6. Add a blank line after any `InlineAlert` in the Enums to render them properly. _(This can be easily fixed in the hz repo)_ + +7. Ensure any lists are surrounded by one blank line so the linter in the PR job doesn't complain. See **Context**, **Editor** classes specifically such as the `makeStroke` method which has a list. (Note: you can check the PR validation job to see if you missed any). _(This can be easily fixed in the hz repo)_ ## Adobe I/O Documentation Template Info This is a site template built with the [Adobe I/O Theme](https://github.com/adobe/aio-theme). -View the [demo](https://adobedocs.github.io/dev-site-documentation-template/) running on Github Pages. +View the [demo](https://adobedocs.github.io/dev-site-documentation-template/) running on Github Pages. ## Where to ask for help @@ -36,37 +57,37 @@ $ yarn dev For the developer documentation, read the following sections on how to: -- [Arrange the structure content of your docs](https://github.com/adobe/aio-theme#content-structure) -- [Link to pages](https://github.com/adobe/aio-theme#links) -- [Use assets](https://github.com/adobe/aio-theme#assets) -- [Set global Navigation](https://github.com/adobe/aio-theme#global-navigation) -- [Set side navigation](https://github.com/adobe/aio-theme#side-navigation) -- [Use content blocks](https://github.com/adobe/aio-theme#jsx-blocks) -- [Use Markdown](https://github.com/adobe/aio-theme#writing-enhanced-markdown) +- [Arrange the structure content of your docs](https://github.com/adobe/aio-theme#content-structure) +- [Link to pages](https://github.com/adobe/aio-theme#links) +- [Use assets](https://github.com/adobe/aio-theme#assets) +- [Set global Navigation](https://github.com/adobe/aio-theme#global-navigation) +- [Set side navigation](https://github.com/adobe/aio-theme#side-navigation) +- [Use content blocks](https://github.com/adobe/aio-theme#jsx-blocks) +- [Use Markdown](https://github.com/adobe/aio-theme#writing-enhanced-markdown) For more in-depth [instructions](https://github.com/adobe/aio-theme#getting-started). ## How to test -- To run the configured linters locally (requires [Docker](https://www.docker.com/)): +- To run the configured linters locally (requires [Docker](https://www.docker.com/)): - ```shell - yarn lint - ``` + ```shell + yarn lint + ``` - > NOTE If you cannot use Docker, you can install the linters separately. In `.github/super-linter.env`, see which linters are enabled, and find the tools being used for linting in [Supported Linters](https://github.com/github/super-linter#supported-linters). + > NOTE If you cannot use Docker, you can install the linters separately. In `.github/super-linter.env`, see which linters are enabled, and find the tools being used for linting in [Supported Linters](https://github.com/github/super-linter#supported-linters). -- To check internal links locally +- To check internal links locally - ```shell - yarn test:links - ``` + ```shell + yarn test:links + ``` -- To build and preview locally: +- To build and preview locally: - ```shell - yarn start - ``` + ```shell + yarn start + ``` ## How to deploy diff --git a/src/pages/references/changelog.md b/src/pages/references/changelog.md index 38e1735c3..8aca3199f 100644 --- a/src/pages/references/changelog.md +++ b/src/pages/references/changelog.md @@ -1,94 +1,96 @@ --- keywords: - - Adobe Express - - Express Add-on SDK - - Express Editor - - Adobe Express - - Add-on SDK - - SDK - - JavaScript - - Extend - - Extensibility - - API - - Add-on Manifest - - AddOnSdk + - Adobe Express + - Express Add-on SDK + - Express Editor + - Adobe Express + - Add-on SDK + - SDK + - JavaScript + - Extend + - Extensibility + - API + - Add-on Manifest + - AddOnSdk title: Changelog -description: Contains a running log of changes to the add-on documentation, SDK, CLI, etc. +description: Contains a running log of changes to the add-on documentation, SDK, CLI, etc. contributors: - - https://github.com/hollyschinsky - - https://github.com/undavide + - https://github.com/hollyschinsky + - https://github.com/undavide --- # Changelog ## 2024-07-22 -- Added a new [`format`](../references/addonsdk/app-ui.md#format) property to the `addOnUISdk.app.ui` object that reflects the format used to display dates, times, numbers, etc. in the user's environment. It supports a [`"formatchange"`](../references/addonsdk/app-ui.md#formatchange) event triggered when the format changes—see an example in the [Locale, Supported Locales, and Format](../guides/develop/use_cases/environment_settings.md#detecting-locale-supported-locales-and-format) section. -- Removed `mobile` and `app` as [`supportedDeviceClass`](../references/manifest/index.md#requirementsappssupporteddeviceclass) values in the Manifest's `requirements.apps` object. +- Added a new [`format`](../references/addonsdk/app-ui.md#format) property to the `addOnUISdk.app.ui` object that reflects the format used to display dates, times, numbers, etc. in the user's environment. It supports a [`"formatchange"`](../references/addonsdk/app-ui.md#formatchange) event triggered when the format changes—see an example in the [Locale, Supported Locales, and Format](../guides/develop/use_cases/environment_settings.md#detecting-locale-supported-locales-and-format) section. +- Removed `mobile` and `app` as [`supportedDeviceClass`](../references/manifest/index.md#requirementsappssupporteddeviceclass) values in the Manifest's `requirements.apps` object. ## 2024-05-28 -- Added a new *experimental* [`openEditorPanel()`](../references/addonsdk/app-ui.md#openeditorpanel) API to programmatically open and interact with the Editor panel. This method of the `addOnUISdk.app.ui` allows navigation to specific tabs and collections, as well as performing content searches. The [Constants](../references/addonsdk/addonsdk-constants.md) page has been updated accordingly. -- Added a new [`Cross-Origin-Embedder-Policy`](../guides/faq.md#how-do-i-prevent-my-iframe-content-from-being-blocked-due-to-cross-origin-issues) FAQ. +- Added a new _experimental_ [`openEditorPanel()`](../references/addonsdk/app-ui.md#openeditorpanel) API to programmatically open and interact with the Editor panel. This method of the `addOnUISdk.app.ui` allows navigation to specific tabs and collections, as well as performing content searches. The [Constants](../references/addonsdk/addonsdk-constants.md) page has been updated accordingly. +- Added a new [`Cross-Origin-Embedder-Policy`](../guides/faq.md#how-do-i-prevent-my-iframe-content-from-being-blocked-due-to-cross-origin-issues) FAQ. ## 2024-05-21 -- The [Quickstart](../guides/getting_started/quickstart.md) and [Distribute](../guides/distribute/index.md) guides have been updated to reflect major UI/UX improvements for in-app workflows, particularly around distribution and listing management. -- The Add-ons tab is now active also in the Adobe Express home page, regardless of whether a project is open or not. -- A new section on Marketplace [rejections](/guides/distribute/rejections.md) has been added, highlighting the most common problems found during the add-on review process and how to avoid them. -- The [Manifest Reference](./manifest/index.md) has been updated with two new permission properties: `microphone` and `camera`. +- The [Quickstart](../guides/getting_started/quickstart.md) and [Distribute](../guides/distribute/index.md) guides have been updated to reflect major UI/UX improvements for in-app workflows, particularly around distribution and listing management. +- The Add-ons tab is now active also in the Adobe Express home page, regardless of whether a project is open or not. +- A new section on Marketplace [rejections](/guides/distribute/rejections.md) has been added, highlighting the most common problems found during the add-on review process and how to avoid them. +- The [Manifest Reference](./manifest/index.md) has been updated with two new permission properties: `microphone` and `camera`. ## 2024-04-10 -- A new [`VisualNode`](./document-sandbox/document-apis/classes/VisualNode.md) class has been added to the Document APIs, and represents any node that can be visually perceived in the content. -- New Document APIs have been added: - - [`currentPage`](./document-sandbox/document-apis/classes/Context.md#currentpage) Context accessor: returns the active page. - - [`visualRoot`](./document-sandbox/document-apis/classes/VisualNode.md#visualroot) accessor: the highest ancestor that still has visual presence in the document—typically, an Artboard. - - [`cloneInPlace()`](./document-sandbox/document-apis/classes/PageNode.md#cloneinplace) method: clones a Page, all artboards within it, and all content within those artboards. - - Support to Bounds has been added in several classes: [`boundsInParent`](./document-sandbox/document-apis/classes/Node.md#boundsinparent); `boundsLocal` (for both [GroupNode](./document-sandbox/document-apis/classes/GroupNode.md#boundslocal) and [VisualNode](./document-sandbox/document-apis/classes/VisualNode.md#boundslocal)); [`centerPointLocal`](./document-sandbox/document-apis/classes/VisualNode.md#centerpointlocal); [`topLeftLocal`](./document-sandbox/document-apis/classes/VisualNode.md#topleftlocal); [`boundsInNode()`](./document-sandbox/document-apis/classes/Node.md#boundsinnode); [`localPointInNode()`](./document-sandbox/document-apis/classes/VisualNode.md#localpointinnode); -- The CLI has been updated to release version `2.0.0`, and includes the following: - - Periodic login and EULA consent are no longer required. - - Two new templates for creating add-ons with built-in support to Spectrum Web Components have been added and documented: `swc-javascript` and `swc-javascript-with-document-sandbox`. Typescript templates have been renamed to `swc-typescript` and `swc-typescript-with-document-sandbox`. See [this page](/guides/getting_started/dev_tooling.md#templates) for details on all the available templates. - - Typings have been updated to include the latest SDK changes, and other internal packages are now at version `2.0.0`. - - **NOTE:** The new version should be installed by default when you create a new add-on. If, for any reason, it doesn't, you can force it to install by clearing the `npx` cache first with `npx clear-npx-cache` or by specifying the version in the command, i.e.: `npx @adobe/create-ccweb-add-on@2.0.0 my-add-on`. - - - The [Samples](../samples.md) page has been updated to document the existing add-ons in the [`express-add-on-samples`](https://github.com/AdobeDocs/express-add-on-samples) repository, including a newly added [`audio-recording-addon`](../samples.md#audio-recording-addon). - - The [Common Use Cases](/guides/develop/use_cases) section has been refactored as a sub-menu, grouping similar topics into individual pages. A new [Login and Logout flows](/guides/develop/use_cases/authentication_authorization.md#login-and-logout-flows) section has been added. Other minor fixes and improvements have been made to the documentation. - +- A new [`VisualNode`](./document-sandbox/document-apis/classes/VisualNode.md) class has been added to the Document APIs, and represents any node that can be visually perceived in the content. +- New Document APIs have been added: + - [`currentPage`](./document-sandbox/document-apis/classes/Context.md#currentpage) Context accessor: returns the active page. + - [`visualRoot`](./document-sandbox/document-apis/classes/VisualNode.md#visualroot) accessor: the highest ancestor that still has visual presence in the document—typically, an Artboard. + - [`cloneInPlace()`](./document-sandbox/document-apis/classes/PageNode.md#cloneinplace) method: clones a Page, all artboards within it, and all content within those artboards. + - Support to Bounds has been added in several classes: [`boundsInParent`](./document-sandbox/document-apis/classes/Node.md#boundsinparent); `boundsLocal` (for both [GroupNode](./document-sandbox/document-apis/classes/GroupNode.md#boundslocal) and [VisualNode](./document-sandbox/document-apis/classes/VisualNode.md#boundslocal)); [`centerPointLocal`](./document-sandbox/document-apis/classes/VisualNode.md#centerpointlocal); [`topLeftLocal`](./document-sandbox/document-apis/classes/VisualNode.md#topleftlocal); [`boundsInNode()`](./document-sandbox/document-apis/classes/Node.md#boundsinnode); [`localPointInNode()`](./document-sandbox/document-apis/classes/VisualNode.md#localpointinnode); +- The CLI has been updated to release version `2.0.0`, and includes the following: + + - Periodic login and EULA consent are no longer required. + - Two new templates for creating add-ons with built-in support to Spectrum Web Components have been added and documented: `swc-javascript` and `swc-javascript-with-document-sandbox`. Typescript templates have been renamed to `swc-typescript` and `swc-typescript-with-document-sandbox`. See [this page](/guides/getting_started/dev_tooling.md#templates) for details on all the available templates. + - Typings have been updated to include the latest SDK changes, and other internal packages are now at version `2.0.0`. + + **NOTE:** The new version should be installed by default when you create a new add-on. If, for any reason, it doesn't, you can force it to install by clearing the `npx` cache first with `npx clear-npx-cache` or by specifying the version in the command, i.e.: `npx @adobe/create-ccweb-add-on@2.0.0 my-add-on`. + +- The [Samples](../samples.md) page has been updated to document the existing add-ons in the [`express-add-on-samples`](https://github.com/AdobeDocs/express-add-on-samples) repository, including a newly added [`audio-recording-addon`](../samples.md#audio-recording-addon). +- The [Common Use Cases](/guides/develop/use_cases) section has been refactored as a sub-menu, grouping similar topics into individual pages. A new [Login and Logout flows](/guides/develop/use_cases/authentication_authorization.md#login-and-logout-flows) section has been added. Other minor fixes and improvements have been made to the documentation. + ## 2024-03-19 -- Support for Ps and Ai files to be added to the page via the [`addImage()`](../references/addonsdk/app-document.md#addimage) method. (Note: there were no changes to the drag-n-drop APIs). -- Adds new `MediaAttributes` parameter to the [`addImage()`](../references/addonsdk/app-document.md#addimage) method for Ps/Ai file types to pass media attributes like `title`. -- Adds new [`Mp4RenditionOptions`](../references/addonsdk/app-document.md#mp4renditionoptions) object to support `mp4` renditions. -- Adds new [`VideoResolution`](../references/addonsdk/addonsdk-constants.md) constant to set video resolution options. -- Adds [`registerIframe()`](../references/addonsdk/addonsdk-app.md#registeriframe) method and [`unregisterIframe`](../references/addonsdk/addonsdk-app.md#unregisteriframe-type-definition) type definition with example usage. **NOTE:** These APIs are currently experimental. +- Support for Ps and Ai files to be added to the page via the [`addImage()`](../references/addonsdk/app-document.md#addimage) method. (Note: there were no changes to the drag-n-drop APIs). +- Adds new `MediaAttributes` parameter to the [`addImage()`](../references/addonsdk/app-document.md#addimage) method for Ps/Ai file types to pass media attributes like `title`. +- Adds new [`Mp4RenditionOptions`](../references/addonsdk/app-document.md#mp4renditionoptions) object to support `mp4` renditions. +- Adds new [`VideoResolution`](../references/addonsdk/addonsdk-constants.md) constant to set video resolution options. +- Adds [`registerIframe()`](../references/addonsdk/addonsdk-app.md#registeriframe) method and [`unregisterIframe`](../references/addonsdk/addonsdk-app.md#unregisteriframe-type-definition) type definition with example usage. **NOTE:** These APIs are currently experimental. ## 2024-03-08 -- [`getPagesMetadata()`](../references/addonsdk/app-document.md#getpagesmetadata), [`startPremiumUpgradeIfFreeUser`](../references/addonsdk/addonsdk-app.md#startpremiumupgradeiffreeuser) and [`isPremiumUser`](../references/addonsdk/app-currentUser.md#ispremiumuser) have been moved to stable and no longer require the `experimentalApis` flag to be set. -- New examples have been added to the [use cases guide](../guides/develop/use_cases/content_management.md#premium-content) for handling premium content. -- A new video has been added to the [grids tutorial](../guides/tutorials/grids-addon.md) to help guide developers in building the grids add-on. +- [`getPagesMetadata()`](../references/addonsdk/app-document.md#getpagesmetadata), [`startPremiumUpgradeIfFreeUser`](../references/addonsdk/addonsdk-app.md#startpremiumupgradeiffreeuser) and [`isPremiumUser`](../references/addonsdk/app-currentUser.md#ispremiumuser) have been moved to stable and no longer require the `experimentalApis` flag to be set. +- New examples have been added to the [use cases guide](../guides/develop/use_cases/content_management.md#premium-content) for handling premium content. +- A new video has been added to the [grids tutorial](../guides/tutorials/grids-addon.md) to help guide developers in building the grids add-on. ## 2024-02-21 -- New support for [monetization details](../guides/distribute/public-dist.md#step-8-enter-the-monetization-details) has been added to the public distribution flow and allows you to [provide details around monetization options](../guides/distribute/public-dist.md#step-8-enter-the-monetization-details) your add-on supports. A selection will now be required when you submit a new add-on to the marketplace or update an existing one. The options include *free*, *one-time payment*, *recurring subscription*, *micro-transactions*, and *other*. +- New support for [monetization details](../guides/distribute/public-dist.md#step-8-enter-the-monetization-details) has been added to the public distribution flow and allows you to [provide details around monetization options](../guides/distribute/public-dist.md#step-8-enter-the-monetization-details) your add-on supports. A selection will now be required when you submit a new add-on to the marketplace or update an existing one. The options include _free_, _one-time payment_, _recurring subscription_, _micro-transactions_, and _other_. - In addition, the [monetization guidelines](../guides/distribute/guidelines/monetization.md) were updated with details to help guide you in communicating your monetization strategy, and include new branding [badges](../guides/distribute/guidelines/monetization.md#branding-assets-for-monetization) you can use to visually indicate when content or features require a purchase or when they are paid and unlocked. Please ensure you review the [updated monetization guidelines](../guides/distribute/guidelines/monetization.md) carefully for specific details. **NOTE:** Adobe does not currently provide a specific monetization feature, but with this update, provides a way for developers to communicate the monetization details of their add-ons. -- The first phase of add-on analytics support has been released, and allows developers to [download insights data](../guides/distribute/public-dist.md#post-submission-details-and-insights) for their published add-ons via the [Download insights](../guides/distribute/public-dist.md#post-submission-details-and-insights) button in the in-app distribution modal. -- A new [Concepts guide](../references/document-sandbox/document-apis/concepts/index.md) was added to the [Document APIs](../references/document-sandbox/document-apis/) section to provide a deep-dive into the architecture and key elements of the Adobe Express Document Object Model (DOM). + In addition, the [monetization guidelines](../guides/distribute/guidelines/monetization.md) were updated with details to help guide you in communicating your monetization strategy, and include new branding [badges](../guides/distribute/guidelines/monetization.md#branding-assets-for-monetization) you can use to visually indicate when content or features require a purchase or when they are paid and unlocked. Please ensure you review the [updated monetization guidelines](../guides/distribute/guidelines/monetization.md) carefully for specific details. **NOTE:** Adobe does not currently provide a specific monetization feature, but with this update, provides a way for developers to communicate the monetization details of their add-ons. + +- The first phase of add-on analytics support has been released, and allows developers to [download insights data](../guides/distribute/public-dist.md#post-submission-details-and-insights) for their published add-ons via the [Download insights](../guides/distribute/public-dist.md#post-submission-details-and-insights) button in the in-app distribution modal. +- A new [Concepts guide](../references/document-sandbox/document-apis/concepts/index.md) was added to the [Document APIs](../references/document-sandbox/document-apis/) section to provide a deep-dive into the architecture and key elements of the Adobe Express Document Object Model (DOM). ## 2024-02-14 -- A new `id` accessor has been added to the [`BaseNode`](../references/document-sandbox/document-apis/classes/BaseNode.md) class in the Document APIs and is inherited by all classes that extend it. The `id` represents a unique identifier that stays the same when the file is closed and reopened, or if the node is moved to a different part of the document. +- A new `id` accessor has been added to the [`BaseNode`](../references/document-sandbox/document-apis/classes/BaseNode.md) class in the Document APIs and is inherited by all classes that extend it. The `id` represents a unique identifier that stays the same when the file is closed and reopened, or if the node is moved to a different part of the document. ## 2024-02-07 -- A new [`createPath`](../references/document-sandbox/document-apis/classes/Editor.md#createpath) method is now available for allowing you to create a path with the Document APIs. -- Updates descriptions in various methods and classes in the [Document APIs](../references/document-sandbox/document-apis/). -- Updates to the [`createRenditions`](../references/addonsdk/app-document.md#createrenditions) API, including a new [`print`](../references/addonsdk/addonsdk-constants.md) option for `RenditionIntent` to be be used for generating a print optimized pdf, and an update to [`PdfRenditionOptions`](../references/addonsdk/app-document.md#pdfrenditionoptions) which exposes the ability to customize each PDF Page Box's (`MediaBox`, `BleedBox`, `CropBox`, `TrimBox`) dimensions using a `pageBoxes` property. -- Updates to the [Using Adobe Spectrum tutorial](https://developer.adobe.com/express/add-ons/docs/guides/tutorials/spectrum-workshop/) with additional details on [why you should use Spectrum CSS variables](../guides/tutorials/spectrum-workshop/part3.md#styling-with-spectrum-css) to style your add-ons, and [additional helpful guidelines for locating and using them](../guides/tutorials/spectrum-workshop/part3.md#layout-and-typography-styling). -- The table of contents in each Document API class/interface/constant has been removed since it was a duplicate of the right side navigation menu. +- A new [`createPath`](../references/document-sandbox/document-apis/classes/Editor.md#createpath) method is now available for allowing you to create a path with the Document APIs. +- Updates descriptions in various methods and classes in the [Document APIs](../references/document-sandbox/document-apis/). +- Updates to the [`createRenditions`](../references/addonsdk/app-document.md#createrenditions) API, including a new [`print`](../references/addonsdk/addonsdk-constants.md) option for `RenditionIntent` to be be used for generating a print optimized pdf, and an update to [`PdfRenditionOptions`](../references/addonsdk/app-document.md#pdfrenditionoptions) which exposes the ability to customize each PDF Page Box's (`MediaBox`, `BleedBox`, `CropBox`, `TrimBox`) dimensions using a `pageBoxes` property. +- Updates to the [Using Adobe Spectrum tutorial](https://developer.adobe.com/express/add-ons/docs/guides/tutorials/spectrum-workshop/) with additional details on [why you should use Spectrum CSS variables](../guides/tutorials/spectrum-workshop/part3.md#styling-with-spectrum-css) to style your add-ons, and [additional helpful guidelines for locating and using them](../guides/tutorials/spectrum-workshop/part3.md#layout-and-typography-styling). +- The table of contents in each Document API class/interface/constant has been removed since it was a duplicate of the right side navigation menu. ## 2024-01-31 @@ -98,19 +100,19 @@ Added a new tutorial - [Building UIs using Adobe's Spectrum Design System](https ### New Experimental APIs -- [`startPremiumUpgradeIfFreeUser()`](../references/addonsdk/addonsdk-app.md#startpremiumupgradeiffreeuser) experimental API has been added to the [addOnUISdk.app](../references/addonsdk/addonsdk-app.md) object to display the in-app monetization upgrade flow and returns a value indicating whether the user upgraded to premium or not. +- [`startPremiumUpgradeIfFreeUser()`](../references/addonsdk/addonsdk-app.md#startpremiumupgradeiffreeuser) experimental API has been added to the [addOnUISdk.app](../references/addonsdk/addonsdk-app.md) object to display the in-app monetization upgrade flow and returns a value indicating whether the user upgraded to premium or not. -- [`isPremiumUser()`](../references/addonsdk/app-currentUser.md#ispremiumuser) experimental API has been added to the [addOnUISdk.app.currentUser](../references/addonsdk/app-currentUser.md) object to determine if the current user is a premium or free user. +- [`isPremiumUser()`](../references/addonsdk/app-currentUser.md#ispremiumuser) experimental API has been added to the [addOnUISdk.app.currentUser](../references/addonsdk/app-currentUser.md) object to determine if the current user is a premium or free user. -**IMPORTANT:** The above new APIs are currently ***experimental only*** and should not be used in any add-ons you will be distributing until declared stable. To use these APIs, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../references/manifest/index.md#requirements) section of the `manifest.json`. +**IMPORTANT:** The above new APIs are currently **_experimental only_** and should not be used in any add-ons you will be distributing until declared stable. To use these APIs, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../references/manifest/index.md#requirements) section of the `manifest.json`. ### Additional Updates -- A new [`PdfRenditionOptions`](../references/addonsdk/app-document.md#pdfrenditionoptions) object is now available to be used with the the [`createRenditions()` export API](../references/addonsdk/app-document.md#createrenditions) and allows a user to specify an optional [bleed](../references/addonsdk/app-document.md#bleed) object (for printing). -- A new [`isPrintReady`](../references/addonsdk/app-document.md#pagemetadata) property has been added to the [`PageMetadata` API](../references/addonsdk/app-document.md#pagemetadata) to indicate if the page is ready to print. -- Updated the [FAQ](../guides/faq.md#what-mime-type-is-returned-from-a-pdf-that-was-exported-with-the-createrenditions-method) regarding the mime type for exported PDF files. It will now return `application/pdf` (as opposed to `text/plain` from an earlier update). +- A new [`PdfRenditionOptions`](../references/addonsdk/app-document.md#pdfrenditionoptions) object is now available to be used with the the [`createRenditions()` export API](../references/addonsdk/app-document.md#createrenditions) and allows a user to specify an optional [bleed](../references/addonsdk/app-document.md#bleed) object (for printing). +- A new [`isPrintReady`](../references/addonsdk/app-document.md#pagemetadata) property has been added to the [`PageMetadata` API](../references/addonsdk/app-document.md#pagemetadata) to indicate if the page is ready to print. +- Updated the [FAQ](../guides/faq.md#what-mime-type-is-returned-from-a-pdf-that-was-exported-with-the-createrenditions-method) regarding the mime type for exported PDF files. It will now return `application/pdf` (as opposed to `text/plain` from an earlier update). ## 2023-12-07 @@ -122,10 +124,10 @@ Added a new tutorial - [Building UIs using Adobe's Spectrum Design System](https Some items in the following list of changes may have been mentioned in recent updates but are being listed in this summary again to serve as a reminder. -- The methods in the [Document API Editor class](../references/document-sandbox/document-apis/classes/Editor.md) to create a color fill and stroke have been renamed to [`makeColorFill`](../references/document-sandbox/document-apis/classes/Editor.md#makecolorfill) and [`makeStroke`](../references/document-sandbox/document-apis/classes/Editor.md#makestroke) respectively. -- `strokes` and `fills` have been renamed to their singular counterpart. (Express does not support multiple strokes or fills). You should use `stroke` and `fill` going forward to access them, and they will no longer be `ItemList` objects, since they represent only a single stroke or fill. +- The methods in the [Document API Editor class](../references/document-sandbox/document-apis/classes/Editor.md) to create a color fill and stroke have been renamed to [`makeColorFill`](../references/document-sandbox/document-apis/classes/Editor.md#makecolorfill) and [`makeStroke`](../references/document-sandbox/document-apis/classes/Editor.md#makestroke) respectively. +- `strokes` and `fills` have been renamed to their singular counterpart. (Express does not support multiple strokes or fills). You should use `stroke` and `fill` going forward to access them, and they will no longer be `ItemList` objects, since they represent only a single stroke or fill. - ```js + ```js // Before rectangle.fills.append(rectFill); ellipse.fills.append(ellipseFill); @@ -133,176 +135,178 @@ Some items in the following list of changes may have been mentioned in recent up // After rectangle.fill = rectFill; ellipse.fill = ellipseFill; - ``` + ``` - - `fill` and `stroke.color` are just a [color object](../references/document-sandbox/document-apis/interfaces/Color.md) of the form `{ red, green, blue, alpha }`. - - `stroke` is an object of the form `{ color, width, dashPattern, dashOffset }` -- Color utilities have moved to [`colorUtils`](../references/document-sandbox/document-apis/classes/ColorUtils.md) instead of `utils`. + - `fill` and `stroke.color` are just a [color object](../references/document-sandbox/document-apis/interfaces/Color.md) of the form `{ red, green, blue, alpha }`. + - `stroke` is an object of the form `{ color, width, dashPattern, dashOffset }` - **Old**
- +- Color utilities have moved to [`colorUtils`](../references/document-sandbox/document-apis/classes/ColorUtils.md) instead of `utils`. - ```js - import { utils } from "express-document-sdk"; - const color = utils.createColor(1, 0, 0); - ``` - - - - **New**
- - ```js - import { colorUtils } from "express-document-sdk"; + **Old**
+ - // any of: - const color = colorUtils.fromRGB(1, 0, 0); // optional alpha - const color = colorUtils.fromRGB({ red: 1 , green: 0, blue: 0 };); // optional alpha - const color = colorUtils.fromHex("#ff0000"); - const color = { red: 1, green: 0, blue: 0, alpha: 1 }; // mandatory alpha - ``` + ```js + import { utils } from "express-document-sdk"; + const color = utils.createColor(1, 0, 0); + ``` - - `fromHex` returns a color from a Hex string -- e.g., `colorUtils.fromHex("#FF8040")` or `colorUtils.fromHex("#FF8040FF")` (including the optional alpha); - - `fromRGB` returns a color from a set of RGB(A) values (0-1) -- e.g., `colorUtils.fromRGB(1,0.5,0.25,1)`. - - `toHex` converts a color object to a Hex string -- e.g., `colorUtils.toHex(aColor)`. -- `allChildren` returns an `iterator`, not an `Array`. However if you want to use array methods (ie: `Array#map`), you can use `Array.from` to convert it to an array. -- Strokes and fills will no longer *move* if you add an existing `stroke`/`fill` to another shape (previously the original shape would lose the corresponding `stroke` or `fill`). For example: + - ```js - // Old way - const greenFill = editor.createColorFill(colorUtils.fromRGB(0,0,1)); - someRect.fills.append(greenFill); - anotherRect.fills.append(greenFill); - /* oops, someRect no longer has a green fill, because anotherRect is its parent */ - ``` + **New**
- versus: + ```js + import { colorUtils } from "express-document-sdk"; - ```js - // New way - const greenFill = editor.makeColorFill(colorUtils.fromRGB(0,0,1)); - someRect.fill = greenFill; - anotherRect.fill = greenFill; - /* both rectangles have a green fill */ - ``` + // any of: + const color = colorUtils.fromRGB(1, 0, 0); // optional alpha + const color = colorUtils.fromRGB({ red: 1 , green: 0, blue: 0 };); // optional alpha + const color = colorUtils.fromHex("#ff0000"); + const color = { red: 1, green: 0, blue: 0, alpha: 1 }; // mandatory alpha + ``` -- Some things that previously didn't make sense will now cause compile errors in typescript, or throw in javascript: - - Do not assume a node's parent is movable — e.g., an artboard can't be repositioned. - - Not all shapes support setting `opacity` or `locking` (e.g, the document root or an artboard). -- The `translateX` and `translateY` properties have been replaced by a single translation object. + - `fromHex` returns a color from a Hex string -- e.g., `colorUtils.fromHex("#FF8040")` or `colorUtils.fromHex("#FF8040FF")` (including the optional alpha); + - `fromRGB` returns a color from a set of RGB(A) values (0-1) -- e.g., `colorUtils.fromRGB(1,0.5,0.25,1)`. + - `toHex` converts a color object to a Hex string -- e.g., `colorUtils.toHex(aColor)`. - ```js - // old - rectangle.translateX = 100; - rectangle.translateY = 20; +- `allChildren` returns an `iterator`, not an `Array`. However if you want to use array methods (ie: `Array#map`), you can use `Array.from` to convert it to an array. +- Strokes and fills will no longer _move_ if you add an existing `stroke`/`fill` to another shape (previously the original shape would lose the corresponding `stroke` or `fill`). For example: - // new - rectangle.translation = { x: 100, y: 20}; // both x,y properties are required - ``` + ```js + // Old way + const greenFill = editor.createColorFill(colorUtils.fromRGB(0, 0, 1)); + someRect.fills.append(greenFill); + anotherRect.fills.append(greenFill); + /* oops, someRect no longer has a green fill, because anotherRect is its parent */ + ``` -- A new [`BaseNode`](../references/document-sandbox/document-apis/classes/BaseNode.md) class has been introduced, and [`ContainerNode`](../references/document-sandbox/document-apis/interfaces/ContainerNode.md) has been moved from a class to an interface. -- The key to load APIs that use the Document APIs has changed, as well as the module names you import APIs from in the [Document Sandbox](../references/document-sandbox/). The old ones will still work, but the CLI and templates have all been updated to use the new names. Please update your add-ons to use the new ones shown below: + versus: - **Adobe Express Document APIs SDK import**
- For access to the [Express document and content authoring APIs](../references/document-sandbox/document-apis/): + ```js + // New way + const greenFill = editor.makeColorFill(colorUtils.fromRGB(0, 0, 1)); + someRect.fill = greenFill; + anotherRect.fill = greenFill; + /* both rectangles have a green fill */ + ``` - +- Some things that previously didn't make sense will now cause compile errors in typescript, or throw in javascript: + - Do not assume a node's parent is movable — e.g., an artboard can't be repositioned. + - Not all shapes support setting `opacity` or `locking` (e.g, the document root or an artboard). +- The `translateX` and `translateY` properties have been replaced by a single translation object. - ```js - // Old - import { editor } from "express"; - ``` + ```js + // old + rectangle.translateX = 100; + rectangle.translateY = 20; - + // new + rectangle.translation = { x: 100, y: 20 }; // both x,y properties are required + ``` - ```js - // New - import { editor } from "express-document-sdk"; - ``` +- A new [`BaseNode`](../references/document-sandbox/document-apis/classes/BaseNode.md) class has been introduced, and [`ContainerNode`](../references/document-sandbox/document-apis/interfaces/ContainerNode.md) has been moved from a class to an interface. +- The key to load APIs that use the Document APIs has changed, as well as the module names you import APIs from in the [Document Sandbox](../references/document-sandbox/). The old ones will still work, but the CLI and templates have all been updated to use the new names. Please update your add-ons to use the new ones shown below: - **Document Sandbox SDK import**
- For access to the [document sandbox runtime APIs](../references/document-sandbox/): + **Adobe Express Document APIs SDK import**
+ For access to the [Express document and content authoring APIs](../references/document-sandbox/document-apis/): - + - ```js - // Old - import AddOnScriptSdk from "AddOnScriptSdk"; - ``` + ```js + // Old + import { editor } from "express"; + ``` - + - ```js - // New - import addOnSandboxSdk from "add-on-sdk-document-sandbox"; - ``` + ```js + // New + import { editor } from "express-document-sdk"; + ``` -- The [`manifest.json` entry point](../references/manifest/index.md#entrypoints) for the document sandbox script code reference was renamed from `script` to `documentSandbox`, as shown below: + **Document Sandbox SDK import**
+ For access to the [document sandbox runtime APIs](../references/document-sandbox/): - ```json - "entryPoints": [ - { - "type": "panel", - "id": "panel1", - "main": "index.html", - "documentSandbox": "code.js" // used to be "script": "code.js" - } - ] - ``` + -- The [`apiProxy()`](./addonsdk/instance-runtime.md#apiproxy) method in the [`addOnSandboxSdk.instance.runtime`](./addonsdk/addonsdk-instance.md#objects) object now accepts `"documentSandbox"` as a parameter when referring to the entry point in the manifest where your document sandbox code resides, instead of `"script"`. -- The [`RuntimeType`](../references/addonsdk/addonsdk-constants.md) constant now uses the value of `"documentSandbox"` in lieu of `"script"`. + ```js + // Old + import AddOnScriptSdk from "AddOnScriptSdk"; + ``` + + - **IMPORTANT:** The above updates should be considered breaking changes, so any add-ons in development that relied on the experimental APIs may not work correctly until you make changes to use the new/updated ones above. The intention was to ensure these important changes were made prior to marking the APIs stable to 1) make them more intuitive for developers, 2) significantly improve the process of working with colors, strokes and fills, and 3) prevent certain operations from corrupting the document. + ```js + // New + import addOnSandboxSdk from "add-on-sdk-document-sandbox"; + ``` -- The CLI has been updated to release version `1.1.1`, and includes the following: +- The [`manifest.json` entry point](../references/manifest/index.md#entrypoints) for the document sandbox script code reference was renamed from `script` to `documentSandbox`, as shown below: + + ```json + "entryPoints": [ + { + "type": "panel", + "id": "panel1", + "main": "index.html", + "documentSandbox": "code.js" // used to be "script": "code.js" + } + ] + ``` - - The document sandbox templates have been updated to reflect all of the latest changes to the [Document Sandbox APIs](../references/document-sandbox/), and the `experimentalApis` flag has been removed. Please review the updated [references](../references/document-sandbox/) and changelog entries thoroughly for details on all of the recent changes. You may also want to refer to the [document sandbox code samples](https://github.com/AdobeDocs/express-add-on-samples/tree/main/document-sandbox-samples) for additional help on how to use them. - - Typings support has been added to the `javascript` templates to enable intellisense features. - - Manifest property additions. - - General improvements and bug fixes. +- The [`apiProxy()`](./addonsdk/instance-runtime.md#apiproxy) method in the [`addOnSandboxSdk.instance.runtime`](./addonsdk/addonsdk-instance.md#objects) object now accepts `"documentSandbox"` as a parameter when referring to the entry point in the manifest where your document sandbox code resides, instead of `"script"`. +- The [`RuntimeType`](../references/addonsdk/addonsdk-constants.md) constant now uses the value of `"documentSandbox"` in lieu of `"script"`. - **NOTE:** The new version should be installed by default when you create a new add-on. If, for any reason, it doesn't, you can force it to install by clearing the npx cache first with `npx clear-npx-cache` or by specifying the version in the command, i.e.: `npx @adobe/create-ccweb-add-on@1.1.1 my-add-on`. You can update any existing add-ons to use this new version by updating the version of the `ccweb-add-on-scripts` in the `package.json` to `1.1.1`. + **IMPORTANT:** The above updates should be considered breaking changes, so any add-ons in development that relied on the experimental APIs may not work correctly until you make changes to use the new/updated ones above. The intention was to ensure these important changes were made prior to marking the APIs stable to 1) make them more intuitive for developers, 2) significantly improve the process of working with colors, strokes and fills, and 3) prevent certain operations from corrupting the document. -- All [code samples](https://github.com/AdobeDocs/express-add-on-samples/tree/main/document-sandbox-samples) and the [Document API tutorial](../guides/tutorials/grids-addon.md) have also been updated to reflect all of the latest changes to the [Adobe Express Document Sandbox APIs](../references/document-sandbox/document-apis/) listed here. -- Removed all experimental APIs notes/warnings around the **Document Sandbox** since they **are now stable**. +- The CLI has been updated to release version `1.1.1`, and includes the following: + + - The document sandbox templates have been updated to reflect all of the latest changes to the [Document Sandbox APIs](../references/document-sandbox/), and the `experimentalApis` flag has been removed. Please review the updated [references](../references/document-sandbox/) and changelog entries thoroughly for details on all of the recent changes. You may also want to refer to the [document sandbox code samples](https://github.com/AdobeDocs/express-add-on-samples/tree/main/document-sandbox-samples) for additional help on how to use them. + - Typings support has been added to the `javascript` templates to enable intellisense features. + - Manifest property additions. + - General improvements and bug fixes. + + **NOTE:** The new version should be installed by default when you create a new add-on. If, for any reason, it doesn't, you can force it to install by clearing the npx cache first with `npx clear-npx-cache` or by specifying the version in the command, i.e.: `npx @adobe/create-ccweb-add-on@1.1.1 my-add-on`. You can update any existing add-ons to use this new version by updating the version of the `ccweb-add-on-scripts` in the `package.json` to `1.1.1`. + +- All [code samples](https://github.com/AdobeDocs/express-add-on-samples/tree/main/document-sandbox-samples) and the [Document API tutorial](../guides/tutorials/grids-addon.md) have also been updated to reflect all of the latest changes to the [Adobe Express Document Sandbox APIs](../references/document-sandbox/document-apis/) listed here. +- Removed all experimental APIs notes/warnings around the **Document Sandbox** since they **are now stable**. - **Known Issue:** Please note, there is an edge case where **removing a page with your add-on** could potentially cause a problem where the UI needs to be reloaded. This will be resolved in the very near future, but please take caution and be aware that it would be best to avoid page removal in the short-term until it's resolved. +**Known Issue:** Please note, there is an edge case where **removing a page with your add-on** could potentially cause a problem where the UI needs to be reloaded. This will be resolved in the very near future, but please take caution and be aware that it would be best to avoid page removal in the short-term until it's resolved. ### Additional Updates -- A new `getPagesMetadata()` method is now available in the [Add-on UI SDK `document`](../references/addonsdk/app-document.md#getpagesmetadata) object and includes an example code snippet. **NOTE:** This method is still considered ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use this method, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../references/manifest/index.md#requirements) section of the `manifest.json`. -- The [`createRenditions()` export API](../references/addonsdk/app-document.md#createrenditions) was updated with the following changes: - - You can now choose to generate renditions of specific pages via a new [`Range.specificPages`](../references/addonsdk/addonsdk-constants.md) constant value. - - The returned type now also includes page metadata (see [`PageMetadata`](../references/addonsdk/app-document.md#pagemetadata)) including useful information such as the id, page size, pixels per inch, and whether the page has premium or temporal (timeline) content or not, (in addition to the existing blob and title). An example is provided in the reference as well as in [the use cases](../guides/develop/use_cases/content_authoring.md#retrieving-page-metadata). -- A new [document metadata use case example](../guides/develop/use_cases/content_authoring.md#document-and-page-metadata) has been added to show how to retrieve the [document id](./addonsdk/app-document.md#id) and [title (ie: name)](./addonsdk/app-document.md#title), including how to listen for the [associated events](../references/addonsdk/addonsdk-app.md#events). -- New tables have been added to the [Communication API reference](../references/document-sandbox/communication/index.md) denoting the [supported](../references/document-sandbox/communication/index.md#supported-data-types) and [unsupported data types](../references/document-sandbox/communication/index.md#unsupported-data-types) that can be used across the [Communication API](../references/document-sandbox/communication/index.md) layer. +- A new `getPagesMetadata()` method is now available in the [Add-on UI SDK `document`](../references/addonsdk/app-document.md#getpagesmetadata) object and includes an example code snippet. **NOTE:** This method is still considered **_experimental only_** and should not be used in any add-ons you will be distributing until it has been declared stable. To use this method, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../references/manifest/index.md#requirements) section of the `manifest.json`. +- The [`createRenditions()` export API](../references/addonsdk/app-document.md#createrenditions) was updated with the following changes: + - You can now choose to generate renditions of specific pages via a new [`Range.specificPages`](../references/addonsdk/addonsdk-constants.md) constant value. + - The returned type now also includes page metadata (see [`PageMetadata`](../references/addonsdk/app-document.md#pagemetadata)) including useful information such as the id, page size, pixels per inch, and whether the page has premium or temporal (timeline) content or not, (in addition to the existing blob and title). An example is provided in the reference as well as in [the use cases](../guides/develop/use_cases/content_authoring.md#retrieving-page-metadata). +- A new [document metadata use case example](../guides/develop/use_cases/content_authoring.md#document-and-page-metadata) has been added to show how to retrieve the [document id](./addonsdk/app-document.md#id) and [title (ie: name)](./addonsdk/app-document.md#title), including how to listen for the [associated events](../references/addonsdk/addonsdk-app.md#events). +- New tables have been added to the [Communication API reference](../references/document-sandbox/communication/index.md) denoting the [supported](../references/document-sandbox/communication/index.md#supported-data-types) and [unsupported data types](../references/document-sandbox/communication/index.md#unsupported-data-types) that can be used across the [Communication API](../references/document-sandbox/communication/index.md) layer. ## 2023-12-04 ### Updates -- The [Document API's](./document-sandbox/document-apis/) were updated to add a new [`ColorUtils`](./document-sandbox/document-apis/classes/ColorUtils.md) class, which replaces the previous `utils` module that was used as a color helper with a more enhanced utlility. If you've used the old `utils` module in your add-ons, it will require you to update them to use the new named import of `colorUtils` instead of `utils`. Color creation should now be done using the new [`colorUtils` module](./document-sandbox/document-apis/classes/ColorUtils.md). An example of the old way and new way to create a color are shown below for reference: +- The [Document API's](./document-sandbox/document-apis/) were updated to add a new [`ColorUtils`](./document-sandbox/document-apis/classes/ColorUtils.md) class, which replaces the previous `utils` module that was used as a color helper with a more enhanced utlility. If you've used the old `utils` module in your add-ons, it will require you to update them to use the new named import of `colorUtils` instead of `utils`. Color creation should now be done using the new [`colorUtils` module](./document-sandbox/document-apis/classes/ColorUtils.md). An example of the old way and new way to create a color are shown below for reference: - ```js - // Before - import { utils } from "express-document-sdk"; - const color = utils.createColor(1, 0, 0); + ```js + // Before + import { utils } from "express-document-sdk"; + const color = utils.createColor(1, 0, 0); - // After - import { colorUtils } from "express-document-sdk"; + // After + import { colorUtils } from "express-document-sdk"; - // any of: - const color = colorUtils.fromRGB(1, 0, 0); // optional alpha - const color = colorUtils.fromRGB({ red: 1 , green: 0, blue: 0 }); // optional alpha - const color = colorUtils.fromHex("#ff0000"); - const color = { red: 1, green: 0, blue: 0, alpha: 1 }; // mandatory alpha - ``` + // any of: + const color = colorUtils.fromRGB(1, 0, 0); // optional alpha + const color = colorUtils.fromRGB({ red: 1, green: 0, blue: 0 }); // optional alpha + const color = colorUtils.fromHex("#ff0000"); + const color = { red: 1, green: 0, blue: 0, alpha: 1 }; // mandatory alpha + ``` - The [code samples](https://github.com/AdobeDocs/express-add-on-samples/tree/main/document-sandbox-samples) have also been updated, so please also refer to those for further details on how to use it. Please note, the [example code snippets](../references/document-sandbox/document-apis/index.md#example-code-snippet) and samples using `fills` or `strokes` off a node class were also updated to use a singular `Fill` or `Stroke` object instead of as an `ItemList` object. + The [code samples](https://github.com/AdobeDocs/express-add-on-samples/tree/main/document-sandbox-samples) have also been updated, so please also refer to those for further details on how to use it. Please note, the [example code snippets](../references/document-sandbox/document-apis/index.md#example-code-snippet) and samples using `fills` or `strokes` off a node class were also updated to use a singular `Fill` or `Stroke` object instead of as an `ItemList` object. - ```js + ```js // Before rectangle.fills.append(rectFill); ellipse.fills.append(ellipseFill); @@ -310,71 +314,72 @@ Some items in the following list of changes may have been mentioned in recent up // After rectangle.fill = rectFill; ellipse.fill = ellipseFill; - ``` + ``` + +- A new release has landed for the [**In-App Developer Submission experience**](../guides/distribute/) in Express. Some highlights from the release: -- A new release has landed for the [**In-App Developer Submission experience**](../guides/distribute/) in Express. Some highlights from the release: + **Create Add-on flow:** You can now create [an add-on "container"](../guides/distribute/public-dist.md#step-2-add-on-listing-settings) as your first step in building add-ons within the existing in-app distribution workflow. Creating the container gets you access to a few important settings and data (for instance your unique subdomain, see below) before you continue the development process in the CLI. All existing add-ons will automatically receive a parent container with the associated additional features today. - **Create Add-on flow:** You can now create [an add-on "container"](../guides/distribute/public-dist.md#step-2-add-on-listing-settings) as your first step in building add-ons within the existing in-app distribution workflow. Creating the container gets you access to a few important settings and data (for instance your unique subdomain, see below) before you continue the development process in the CLI. All existing add-ons will automatically receive a parent container with the associated additional features today. + **Unique Subdomain retrieval:** As part of your add-on container, you will now be able to easily retrieve a unique subdomain for your add-on. Simply choose one of your add-ons in the distribution workflow and navigate to the new "Settings" tab and copy the Add-on URL. This URL is handy for addressing issues with CORS by adding the URL as an allowed origin. See [our CORS guide](../guides/develop/context.md#cors) for more details. - **Unique Subdomain retrieval:** As part of your add-on container, you will now be able to easily retrieve a unique subdomain for your add-on. Simply choose one of your add-ons in the distribution workflow and navigate to the new "Settings" tab and copy the Add-on URL. This URL is handy for addressing issues with CORS by adding the URL as an allowed origin. See [our CORS guide](../guides/develop/context.md#cors) for more details. + **Delete Add-ons:** The "container" concept allowed us to offer better management and cleanup of your add-ons. You will now find the option to delete an add-on container entirely from the new "Settings" tab of a given add-on. - **Delete Add-ons:** The "container" concept allowed us to offer better management and cleanup of your add-ons. You will now find the option to delete an add-on container entirely from the new "Settings" tab of a given add-on. + **NOTE:** You can only delete add-ons that have not been published publicly or submitted to our Review team. Please contact us if you need to un-publish an add-on. - **NOTE:** You can only delete add-ons that have not been published publicly or submitted to our Review team. Please contact us if you need to un-publish an add-on. + **Supported Languages:** The [version details step](../guides/distribute/public-dist.md#step-4-enter-listing-details) for publishing add-ons publicly now includes fields to indicate which languages are supported by your add-ons (beyond the required English). You can choose from any of the languages Express supports, and your designation will be shown to users when they browse your listing details. See [our sample for detecting a user's locale to localize your add-on](../guides/develop/use_cases/environment_settings.md#detecting-locale-supported-locales-and-format). - **Supported Languages:** The [version details step](../guides/distribute/public-dist.md#step-4-enter-listing-details) for publishing add-ons publicly now includes fields to indicate which languages are supported by your add-ons (beyond the required English). You can choose from any of the languages Express supports, and your designation will be shown to users when they browse your listing details. See [our sample for detecting a user's locale to localize your add-on](../guides/develop/use_cases/environment_settings.md#detecting-locale-supported-locales-and-format). -- Updated list of templates and details to include the [Document Sandbox template options](../guides/getting_started/dev_tooling.md#templates), and how to still scaffold from one when the [`--template` parameter is not explicitly supplied](../guides/getting_started/dev_tooling.md#no-template-parameter). -- New FAQ item regarding the mime type for exported PDF files. This is due to an unexpected change made in Adobe Express core to the mime type returned when you generate a PDF using the export [`createRenditions`](../references/addonsdk/app-document.md#createrenditions) method. In the past it would return `application/pdf`, but currently it returns `text/plain`. This is something to be aware of if you are inspecting the mime type in the response and failing if it's anything other than `application/pdf`. -- Removed NPS survey. +- Updated list of templates and details to include the [Document Sandbox template options](../guides/getting_started/dev_tooling.md#templates), and how to still scaffold from one when the [`--template` parameter is not explicitly supplied](../guides/getting_started/dev_tooling.md#no-template-parameter). +- New FAQ item regarding the mime type for exported PDF files. This is due to an unexpected change made in Adobe Express core to the mime type returned when you generate a PDF using the export [`createRenditions`](../references/addonsdk/app-document.md#createrenditions) method. In the past it would return `application/pdf`, but currently it returns `text/plain`. This is something to be aware of if you are inspecting the mime type in the response and failing if it's anything other than `application/pdf`. +- Removed NPS survey. ## 2023-11-30 ### Updates -- Adds support to the [Add-on UI SDK](./addonsdk/index.md) for retrieving the [document id](./addonsdk/app-document.md#id) and [title](./addonsdk/app-document.md#title), as well as the ability for the add-on to be notified of the [associated events](../references/addonsdk/addonsdk-app.md#events). -- Updates the names of the SDK imports for the [Document Sandbox](../references/document-sandbox/communication/index.md) and the [Document API's SDK](./document-sandbox/document-apis/): +- Adds support to the [Add-on UI SDK](./addonsdk/index.md) for retrieving the [document id](./addonsdk/app-document.md#id) and [title](./addonsdk/app-document.md#title), as well as the ability for the add-on to be notified of the [associated events](../references/addonsdk/addonsdk-app.md#events). +- Updates the names of the SDK imports for the [Document Sandbox](../references/document-sandbox/communication/index.md) and the [Document API's SDK](./document-sandbox/document-apis/): + + **Document Sandbox SDK import**
+ + from: + + `import AddOnScriptSdk from "AddOnScriptSdk";` - **Document Sandbox SDK import**
+ to: - from: + `import addOnSandboxSdk from "add-on-sdk-document-sandbox";` - `import AddOnScriptSdk from "AddOnScriptSdk";` - - to: - - `import addOnSandboxSdk from "add-on-sdk-document-sandbox";` + which also requires the following line to change in the example code to use the new reference: - which also requires the following line to change in the example code to use the new reference: + `const { runtime } = addOnSandboxSdk.instance; // runtime object provides direct access to the comm methods` - `const { runtime } = addOnSandboxSdk.instance; // runtime object provides direct access to the comm methods` + **Express Document SDK Import (for accessing the Document APIs**
- **Express Document SDK Import (for accessing the Document APIs**
+ from: - from: - - `import { editor } from "express";` + `import { editor } from "express";` - to: + to: - `import { editor } from "express-document-sdk";` + `import { editor } from "express-document-sdk";` - **NOTE:** This includes the named imports for `utils` and `constants` modules as well if needed (ie: `import { editor, utils, constants } from "express-document-sdk"`). + **NOTE:** This includes the named imports for `utils` and `constants` modules as well if needed (ie: `import { editor, utils, constants } from "express-document-sdk"`). -- Updates the [`manifest.json` entry for the document sandbox script code reference](../references/manifest/index.md#entrypoints) from `script` to `documentSandbox`, as shown below: +- Updates the [`manifest.json` entry for the document sandbox script code reference](../references/manifest/index.md#entrypoints) from `script` to `documentSandbox`, as shown below: - ```json - "entryPoints": [ - { - "type": "panel", - "id": "panel1", - "main": "index.html", - "documentSandbox": "code.js" - } - ] - ``` + ```json + "entryPoints": [ + { + "type": "panel", + "id": "panel1", + "main": "index.html", + "documentSandbox": "code.js" + } + ] + ``` -- [`apiProxy()`](./addonsdk/instance-runtime.md#apiproxy) now accepts `"documentSandbox"` as a parameter when referring to the entry point in the manifest where your document sandbox code resides, instead of `"script"`. -- The [`RuntimeType`](../references/addonsdk/addonsdk-constants.md) constant can now have a value of `"documentSandbox"` in lieu of `"script"`. +- [`apiProxy()`](./addonsdk/instance-runtime.md#apiproxy) now accepts `"documentSandbox"` as a parameter when referring to the entry point in the manifest where your document sandbox code resides, instead of `"script"`. +- The [`RuntimeType`](../references/addonsdk/addonsdk-constants.md) constant can now have a value of `"documentSandbox"` in lieu of `"script"`. @@ -384,49 +389,49 @@ Some items in the following list of changes may have been mentioned in recent up ### Updates -- The [Web API's in the Document Sandbox Reference](./document-sandbox/web/index.md) were updated to remove the timer methods which are no longer supported (ie: `setTimeout()`, `clearTimeout` and `setInterval()`, `clearInterval`). -- The [Document API References](./document-sandbox/document-apis/) were updated with the following additions and changes: +- The [Web API's in the Document Sandbox Reference](./document-sandbox/web/index.md) were updated to remove the timer methods which are no longer supported (ie: `setTimeout()`, `clearTimeout` and `setInterval()`, `clearInterval`). +- The [Document API References](./document-sandbox/document-apis/) were updated with the following additions and changes: - **New Classes/Interfaces**
+ **New Classes/Interfaces**
- - New [RestrictedItemList class](./document-sandbox/document-apis/classes/RestrictedItemList.md) - - New [UnknownNode class](./document-sandbox/document-apis/classes/UnknownNode.md) - - New [SolidColorShapeNode class](./document-sandbox/document-apis/classes/SolidColorShapeNode.md) - - New [Point interface](./document-sandbox/document-apis/interfaces/Point.md) - - New `queueAsyncEdit` method added to the [Editor](./document-sandbox/document-apis/classes/Editor.md) class. - - Renames the [Constants](../references/document-sandbox/document-apis/enums/) to remove the `Value` suffix. + - New [RestrictedItemList class](./document-sandbox/document-apis/classes/RestrictedItemList.md) + - New [UnknownNode class](./document-sandbox/document-apis/classes/UnknownNode.md) + - New [SolidColorShapeNode class](./document-sandbox/document-apis/classes/SolidColorShapeNode.md) + - New [Point interface](./document-sandbox/document-apis/interfaces/Point.md) + - New `queueAsyncEdit` method added to the [Editor](./document-sandbox/document-apis/classes/Editor.md) class. + - Renames the [Constants](../references/document-sandbox/document-apis/enumerations/) to remove the `Value` suffix. - **Updates to Node Classes**
+ **Updates to Node Classes**
- The accessors and methods below were removed or replaced with new names in the [`Node` class](./document-sandbox/document-apis/classes/Node.md) and classes that extend it. Please refer to the [Document API References](./document-sandbox/document-apis/) specifically to learn more about each. +The accessors and methods below were removed or replaced with new names in the [`Node` class](./document-sandbox/document-apis/classes/Node.md) and classes that extend it. Please refer to the [Document API References](./document-sandbox/document-apis/) specifically to learn more about each. - - Removes `absoluteRotation` accessor - - Removes `absoluteTransform` accessor - - Removes `relativeRotation` accessor - - Removes `relativeTransform` accessor - - Removes `translateX` accessor - - Removes `translateY` accessor - - Adds `rotation` accessor - - Adds `rotationInScreen` accessor - - Adds `transformMatrix` accessor - - Adds `translation` accessor - - Adds `setPositionInParent` method - - Adds `setRotationInParent` method +- Removes `absoluteRotation` accessor +- Removes `absoluteTransform` accessor +- Removes `relativeRotation` accessor +- Removes `relativeTransform` accessor +- Removes `translateX` accessor +- Removes `translateY` accessor +- Adds `rotation` accessor +- Adds `rotationInScreen` accessor +- Adds `transformMatrix` accessor +- Adds `translation` accessor +- Adds `setPositionInParent` method +- Adds `setRotationInParent` method ## 2023-11-27 Updated [Document API references](./document-sandbox/document-apis/) to include: -- [ComplexShapeNode class](./document-sandbox/document-apis/classes/ComplexShapeNode.md) -- [GridLayoutNode class](./document-sandbox/document-apis/classes/GridLayoutNode.md) -- [IStrokableNode interface](./document-sandbox/document-apis/interfaces/IStrokableNode.md) -- [FillRule constant](./document-sandbox/document-apis/enums/FillRule.md) +- [ComplexShapeNode class](./document-sandbox/document-apis/classes/ComplexShapeNode.md) +- [GridLayoutNode class](./document-sandbox/document-apis/classes/GridLayoutNode.md) +- [IStrokableNode interface](./document-sandbox/document-apis/interfaces/IStrokableNode.md) +- [FillRule constant](./document-sandbox/document-apis/enumerations/FillRule.md) ## 2023-11-6 -- Added a [new tutorial section](../guides/tutorials/) to the Getting Started guides, including a new ["Building your first add-on with the Document API" tutorial](../guides/tutorials/grids-addon.md) by Davide Barranca. -- Updated the naming conventions from Script Runtime to Document Sandbox and Editor APIs to Adobe Express Document APIs. The Document Sandbox now includes the Communication APIs, Web APIs and the Document APIs. -- Updated sample code snippets to use the `addOnUISdk` import name (vs `AddOnSDK`) similar to what's generated in the templates for consistency. +- Added a [new tutorial section](../guides/tutorials/) to the Getting Started guides, including a new ["Building your first add-on with the Document API" tutorial](../guides/tutorials/grids-addon.md) by Davide Barranca. +- Updated the naming conventions from Script Runtime to Document Sandbox and Editor APIs to Adobe Express Document APIs. The Document Sandbox now includes the Communication APIs, Web APIs and the Document APIs. +- Updated sample code snippets to use the `addOnUISdk` import name (vs `AddOnSDK`) similar to what's generated in the templates for consistency. ## 2023-10-26 @@ -452,44 +457,44 @@ Published new [Guidelines and requirements section](../guides/distribute/guideli New versions of the CLI packages: - ```json - "@adobe-ccwebext/ccweb-add-on-manifest": "1.5.0" - "@adobe-ccwebext/ccweb-add-on-core": "1.5.0" - "@adobe-ccwebext/ccweb-add-on-ssl": "1.5.0" - "@adobe-ccwebext/ccweb-add-on-analytics": "1.5.0" - "@adobe-ccwebext/ccweb-add-on-developer-terms": "1.5.0" - "@adobe-ccwebext/create-ccweb-add-on": "1.5.0" - "@adobe-ccwebext/ccweb-add-on-scaffolder": "1.5.0" - "@adobe-ccwebext/ccweb-add-on-scripts": "1.5.0" - "@adobe-ccwebext/ccweb-add-on-sdk-types": "0.3.0" - ``` +```json + "@adobe-ccwebext/ccweb-add-on-manifest": "1.5.0" + "@adobe-ccwebext/ccweb-add-on-core": "1.5.0" + "@adobe-ccwebext/ccweb-add-on-ssl": "1.5.0" + "@adobe-ccwebext/ccweb-add-on-analytics": "1.5.0" + "@adobe-ccwebext/ccweb-add-on-developer-terms": "1.5.0" + "@adobe-ccwebext/create-ccweb-add-on": "1.5.0" + "@adobe-ccwebext/ccweb-add-on-scaffolder": "1.5.0" + "@adobe-ccwebext/ccweb-add-on-scripts": "1.5.0" + "@adobe-ccwebext/ccweb-add-on-sdk-types": "0.3.0" +``` which include: -- Updated templates for both iframe and document sandbox add-ons: +- Updated templates for both iframe and document sandbox add-ons: + + - All new add-ons created (other than those based on javascript) use `spectrum-web-components` with the Express theme pre-set. + - React-based templates include [`swc-react`](https://opensource.adobe.com/spectrum-web-components/using-swc-react/) setup. + - The `javascript-with-editor-apis` template has been removed from the initial template selection in this version but replaced with the option from the CLI to [include the document sandbox](https://developer.adobe.com/express/add-ons/docs/references/document-sandbox/#cli-generated-script-runtime-add-on) when creating a new add-on. - - All new add-ons created (other than those based on javascript) use `spectrum-web-components` with the Express theme pre-set. - - React-based templates include [`swc-react`](https://opensource.adobe.com/spectrum-web-components/using-swc-react/) setup. - - The `javascript-with-editor-apis` template has been removed from the initial template selection in this version but replaced with the option from the CLI to [include the document sandbox](https://developer.adobe.com/express/add-ons/docs/references/document-sandbox/#cli-generated-script-runtime-add-on) when creating a new add-on. - -- New type support for typescript based add-ons. -- Ability to recreate your SSL certificates. +- New type support for typescript based add-ons. +- Ability to recreate your SSL certificates. #### Documentation updates -- Updated [document sandbox Reference docs](https://developer.adobe.com/express/add-ons/docs/references/document-sandbox/#cli-generated-script-runtime-add-on) to reflect the new CLI prompt to include document sandbox (vs the specific template). -- Updated [Getting Started guides](../guides/getting_started/) documentation and screenshots to reflect the **new Add-on Launchpad panel update** to the new **two-tab view** for "Discover" and "Your Add-ons". +- Updated [document sandbox Reference docs](https://developer.adobe.com/express/add-ons/docs/references/document-sandbox/#cli-generated-script-runtime-add-on) to reflect the new CLI prompt to include document sandbox (vs the specific template). +- Updated [Getting Started guides](../guides/getting_started/) documentation and screenshots to reflect the **new Add-on Launchpad panel update** to the new **two-tab view** for "Discover" and "Your Add-ons". ## 2023-09-26 ### Removed -- Removed the experimental APIs notes/warnings around the **Audio APIs and User APIs** since they **are now stable**. -- Removed references to the Dropbox sample since the [import-images-from-oauth](https://developer.adobe.com/express/add-ons/docs/samples/#import-images-using-oauth) contains the same functionality. +- Removed the experimental APIs notes/warnings around the **Audio APIs and User APIs** since they **are now stable**. +- Removed references to the Dropbox sample since the [import-images-from-oauth](https://developer.adobe.com/express/add-ons/docs/samples/#import-images-using-oauth) contains the same functionality. ### Updated -- Updated the Express add-ons [introduction video](https://developer.adobe.com/express/add-ons/docs/guides/) with a newly created version. +- Updated the Express add-ons [introduction video](https://developer.adobe.com/express/add-ons/docs/guides/) with a newly created version. ## 2023-09-25 @@ -497,9 +502,9 @@ which include: The [Editor API references](https://developer.adobe.com/express-add-on-apis/docs/api/classes/Editor/) have been updated with additional descriptions and details as well as some new and modified APIs: -- Artboard now has a single fill only. **Note:** it's possible that all node types will move to this model in the near future. -- The `name` property is now only available on `PageNode`, not all node types. -- New `Node.locked` & `Context.selectionIncludingNonEditable` properties were added for the locking feature that recently shipped in Express. +- Artboard now has a single fill only. **Note:** it's possible that all node types will move to this model in the near future. +- The `name` property is now only available on `PageNode`, not all node types. +- New `Node.locked` & `Context.selectionIncludingNonEditable` properties were added for the locking feature that recently shipped in Express. @@ -509,28 +514,29 @@ If you're using the experimental Document Sandbox APIs in any add-ons currently, ### Added -- New [iframe Sandbox Context guide](../guides/develop/context.md) with details on the new `subdomain` support and CORS handling. -- How-to videos embedded in various guides to help visually show how to use the information in those sections. +- New [iframe Sandbox Context guide](../guides/develop/context.md) with details on the new `subdomain` support and CORS handling. +- How-to videos embedded in various guides to help visually show how to use the information in those sections. ### Updates -- **New Types Package Versions Released**
- - A new version `0.1.6` of the `@adobe-ccwebext/ccweb-add-on-sdk-types` package with the latest typings for the [`AddOnSDK` (iframe)](https://developer.adobe.com/express/add-ons/docs/references/addonsdk/), including new experimental APIs, as well as general improvements and bug fixes. - - A new version `0.2.0` of the `@adobe-ccwebext/ccweb-add-on-sdk-types` package with the latest typings for the **document sandbox/Editor APIs**. - - **IMPORTANT**: - Developers who are **NOT** using the [document sandbox/Editor APIs](https://developer.adobe.com/express/add-ons/docs/references/document-sandbox/) should update to their types package to `0.1.6` at minimum by changing the version of it to `@adobe-ccwebext/ccweb-add-on-sdk-types@0.1.6` in the `package.json`. - - The new types `0.2.0` types package will be used automatically for any new add-ons created. If you would like to update an existing add-on to the `0.2.0` version, you will need to update the `ccweb-add-on-sdk-typings.d.ts` file in your add-on with the content [here](https://github.com/adobe-ccwebext/ccweb-add-on-cli/blob/main/packages/wxp-sdk-typings/ccweb-add-on-sdk-typings.d.ts). +- **New Types Package Versions Released**
+ + - A new version `0.1.6` of the `@adobe-ccwebext/ccweb-add-on-sdk-types` package with the latest typings for the [`AddOnSDK` (iframe)](https://developer.adobe.com/express/add-ons/docs/references/addonsdk/), including new experimental APIs, as well as general improvements and bug fixes. + - A new version `0.2.0` of the `@adobe-ccwebext/ccweb-add-on-sdk-types` package with the latest typings for the **document sandbox/Editor APIs**. + + **IMPORTANT**: + Developers who are **NOT** using the [document sandbox/Editor APIs](https://developer.adobe.com/express/add-ons/docs/references/document-sandbox/) should update to their types package to `0.1.6` at minimum by changing the version of it to `@adobe-ccwebext/ccweb-add-on-sdk-types@0.1.6` in the `package.json`. -- [Performance guide](../guides/develop/performance.md) updates to include [**Task Manager**](https://developer.adobe.com/express/add-ons/docs/guides/develop/performance.md#task-manager) and [**Memory Consumption**](https://developer.adobe.com/express/add-ons/docs/guides/develop/performance.md#memory-consumption-monitoring) details for add-ons. -- [FAQ update](../guides/faq.md) for [`SharedArrayBuffer`](https://developer.adobe.com/express/add-ons/docs/guides/faq/#is-sharedarraybuffer-supported). + The new types `0.2.0` types package will be used automatically for any new add-ons created. If you would like to update an existing add-on to the `0.2.0` version, you will need to update the `ccweb-add-on-sdk-typings.d.ts` file in your add-on with the content [here](https://github.com/adobe-ccwebext/ccweb-add-on-cli/blob/main/packages/wxp-sdk-typings/ccweb-add-on-sdk-typings.d.ts). + +- [Performance guide](../guides/develop/performance.md) updates to include [**Task Manager**](https://developer.adobe.com/express/add-ons/docs/guides/develop/performance.md#task-manager) and [**Memory Consumption**](https://developer.adobe.com/express/add-ons/docs/guides/develop/performance.md#memory-consumption-monitoring) details for add-ons. +- [FAQ update](../guides/faq.md) for [`SharedArrayBuffer`](https://developer.adobe.com/express/add-ons/docs/guides/faq/#is-sharedarraybuffer-supported). ## 2023-09-12 ### Updates -- Added supported file types for import and export to the [FAQ](../guides/faq.md). +- Added supported file types for import and export to the [FAQ](../guides/faq.md). ## 2023-09-07 @@ -538,33 +544,33 @@ If you're using the experimental Document Sandbox APIs in any add-ons currently, -- The Communication API in the document sandbox reference section was updated to change the example code importing the SDK to a default import rather than a named import as it was previously: +- The Communication API in the document sandbox reference section was updated to change the example code importing the SDK to a default import rather than a named import as it was previously: + + from: + + `import { AddOnSdkApi } from "AddOnSdkApi";` - from: + to: - `import { AddOnSdkApi } from "AddOnSdkApi";` - - to: - - `import AddOnScriptSdk from "AddOnScriptSdk";` - - Note that you can now name the imported module whatever you'd like, but for simplicity in the examples, the name is kept the same. **Since these APIs are currently experimental, this change will not impact any in-production add-ons, *however*, it will require you to update any existing usage of these APIs in progress**. + `import AddOnScriptSdk from "AddOnScriptSdk";` + + Note that you can now name the imported module whatever you'd like, but for simplicity in the examples, the name is kept the same. **Since these APIs are currently experimental, this change will not impact any in-production add-ons, _however_, it will require you to update any existing usage of these APIs in progress**. -- A **new 1.4.2 version of the CLI** was also released with an updated [`javascript-with-editor-apis` template](../references/document-sandbox/index.md) reflecting the default SDK import noted in the first bullet above. The new CLI version will install automatically when you create a new add-on, or you can update existing add-ons by changing the version of the `ccweb-add-on-scripts` in the `package.json` to `1.4.2`. -- Updated the [FAQ](../guides/faq.md) with details on Experimental APIs and suppported file types for exported content. +- A **new 1.4.2 version of the CLI** was also released with an updated [`javascript-with-editor-apis` template](../references/document-sandbox/index.md) reflecting the default SDK import noted in the first bullet above. The new CLI version will install automatically when you create a new add-on, or you can update existing add-ons by changing the version of the `ccweb-add-on-scripts` in the `package.json` to `1.4.2`. +- Updated the [FAQ](../guides/faq.md) with details on Experimental APIs and suppported file types for exported content. ## 2023-09-05 ### Added Added new **Audio API** documentation. You can now import audio to the current Adobe Express document in two different methods: - - 1. Using the new [`addAudio()`](https://developer.adobe.com/express/add-ons/docs/references/addonsdk/app-document/#addaudio) method, which requires a [`MediaAttributes`](https://developer.adobe.com/express/add-ons/docs/references/addonsdk/app-document/#mediaattributes) object containing the `title` of the audio content. - 2. Using [drag and drop](https://developer.adobe.com/express/add-ons/docs/references/addonsdk/addonsdk-app/#enabledragtodocument), and supplying the [`MediaAttributes`](https://developer.adobe.com/express/add-ons/docs/references/addonsdk/addonsdk-app/#mediaattributes) object in the [`DragCompletionData`](https://developer.adobe.com/express/add-ons/docs/references/addonsdk/addonsdk-app/#dragcompletiondata). - Please note, in both cases, the `MediaAttributes` object is required for audio content, but optional for video and image content. A new code sample will be supplied in the near future, but in the meantime, please refer to the example usage snippets provided in the [SDK Reference](https://developer.adobe.com/express/add-ons/docs/references/addonsdk/app-document/#addaudio) and [Implementing Common Use Cases Guide](https://developer.adobe.com/express/add-ons/docs/guides/develop/). +1. Using the new [`addAudio()`](https://developer.adobe.com/express/add-ons/docs/references/addonsdk/app-document/#addaudio) method, which requires a [`MediaAttributes`](https://developer.adobe.com/express/add-ons/docs/references/addonsdk/app-document/#mediaattributes) object containing the `title` of the audio content. +2. Using [drag and drop](https://developer.adobe.com/express/add-ons/docs/references/addonsdk/addonsdk-app/#enabledragtodocument), and supplying the [`MediaAttributes`](https://developer.adobe.com/express/add-ons/docs/references/addonsdk/addonsdk-app/#mediaattributes) object in the [`DragCompletionData`](https://developer.adobe.com/express/add-ons/docs/references/addonsdk/addonsdk-app/#dragcompletiondata). + +Please note, in both cases, the `MediaAttributes` object is required for audio content, but optional for video and image content. A new code sample will be supplied in the near future, but in the meantime, please refer to the example usage snippets provided in the [SDK Reference](https://developer.adobe.com/express/add-ons/docs/references/addonsdk/app-document/#addaudio) and [Implementing Common Use Cases Guide](https://developer.adobe.com/express/add-ons/docs/guides/develop/). - - + + + ``` @@ -520,13 +519,13 @@ rowsColorSwatch.color = "#ccccff"; // The click triggers the click rowsColorSwatch.addEventListener("click", function () { - rowsColorPicker.click(); + rowsColorPicker.click(); }); // The click changes the fill with the picked color. rowsColorPicker.addEventListener("input", function (event) { - const selectedColor = event.target.value; - rowsColorSwatch.setAttribute("color", selectedColor); + const selectedColor = event.target.value; + rowsColorSwatch.setAttribute("color", selectedColor); }); ``` @@ -547,37 +546,44 @@ Let's finish the UI, completing the code for `ui/index.js`. As you can see, it i ```html - -

Design Grid creator

-
-
-
- Rows - - + +

Design Grid creator

+
+
+
+ Rows + +
+ + +
+
+
+ Columns + +
+ + +
- - -
-
-
- Columns - - +
+
- - -
-
-
- -
- - Delete - Create - - + + Delete + Create + + ``` @@ -589,80 +595,80 @@ Let's finish the UI, completing the code for `ui/index.js`. As you can see, it i import addOnUISdk from "https://new.express.adobe.com/static/add-on-sdk/sdk.js"; addOnUISdk.ready.then(async () => { - console.log("addOnUISdk is ready for use."); - - // Get the Document Sandbox. - const { runtime } = addOnUISdk.instance; - const sandboxProxy = await runtime.apiProxy("documentSandbox"); + console.log("addOnUISdk is ready for use."); - // Input fields ------------------------------------------- + // Get the Document Sandbox. + const { runtime } = addOnUISdk.instance; + const sandboxProxy = await runtime.apiProxy("documentSandbox"); - const rowsInput = document.getElementById("rows"); - const colsInput = document.getElementById("cols"); - const gutterInput = document.getElementById("gutter"); + // Input fields ------------------------------------------- - rowsInput.value = 4; - colsInput.value = 6; - gutterInput.value = 10; + const rowsInput = document.getElementById("rows"); + const colsInput = document.getElementById("cols"); + const gutterInput = document.getElementById("gutter"); - // Color pickers ------------------------------------------ + rowsInput.value = 4; + colsInput.value = 6; + gutterInput.value = 10; - const colsColorPicker = document.getElementById("colsColorPicker"); - const colsColorSwatch = document.getElementById("colsColorSwatch"); - const rowsColorPicker = document.getElementById("rowsColorPicker"); - const rowsColorSwatch = document.getElementById("rowsColorSwatch"); + // Color pickers ------------------------------------------ - colsColorPicker.value = "#ffcccc"; - colsColorSwatch.color = "#ffcccc"; - rowsColorPicker.value = "#ccccff"; - rowsColorSwatch.color = "#ccccff"; + const colsColorPicker = document.getElementById("colsColorPicker"); + const colsColorSwatch = document.getElementById("colsColorSwatch"); + const rowsColorPicker = document.getElementById("rowsColorPicker"); + const rowsColorSwatch = document.getElementById("rowsColorSwatch"); - colsColorSwatch.addEventListener("click", function () { - colsColorPicker.click(); - }); - colsColorPicker.addEventListener("input", function (event) { - const selectedColor = event.target.value; - colsColorSwatch.setAttribute("color", selectedColor); - }); + colsColorPicker.value = "#ffcccc"; + colsColorSwatch.color = "#ffcccc"; + rowsColorPicker.value = "#ccccff"; + rowsColorSwatch.color = "#ccccff"; - rowsColorSwatch.addEventListener("click", function () { - rowsColorPicker.click(); - }); - rowsColorPicker.addEventListener("input", function (event) { - const selectedColor = event.target.value; - rowsColorSwatch.setAttribute("color", selectedColor); - }); + colsColorSwatch.addEventListener("click", function () { + colsColorPicker.click(); + }); + colsColorPicker.addEventListener("input", function (event) { + const selectedColor = event.target.value; + colsColorSwatch.setAttribute("color", selectedColor); + }); - // CTA Buttons -------------------------------------------- + rowsColorSwatch.addEventListener("click", function () { + rowsColorPicker.click(); + }); + rowsColorPicker.addEventListener("input", function (event) { + const selectedColor = event.target.value; + rowsColorSwatch.setAttribute("color", selectedColor); + }); - const createGridBtn = document.getElementById("createGrid"); - const deleteGridBtn = document.getElementById("deleteGrid"); + // CTA Buttons -------------------------------------------- - deleteGridBtn.onclick = async (event) => { - const res = await sandboxProxy.deleteGrid(); - if (res) { - // When there's been an error deleting the grid, you may want to handle it here - } - deleteGridBtn.disabled = true; - }; - - createGridBtn.onclick = async (event) => { - await sandboxProxy.addGrid({ - columns: colsInput.value, - rows: rowsInput.value, - gutter: gutterInput.value, - columnColor: colsColorPicker.value, - rowColor: rowsColorPicker.value, - }); - deleteGridBtn.disabled = false; - }; + const createGridBtn = document.getElementById("createGrid"); + const deleteGridBtn = document.getElementById("deleteGrid"); - // Only now it is safe to enable the button - createGridBtn.disabled = false; + deleteGridBtn.onclick = async (event) => { + const res = await sandboxProxy.deleteGrid(); + if (res) { + // When there's been an error deleting the grid, you may want to handle it here + } + deleteGridBtn.disabled = true; + }; + + createGridBtn.onclick = async (event) => { + await sandboxProxy.addGrid({ + columns: colsInput.value, + rows: rowsInput.value, + gutter: gutterInput.value, + columnColor: colsColorPicker.value, + rowColor: rowsColorPicker.value, + }); + deleteGridBtn.disabled = false; + }; + + // Only now it is safe to enable the button + createGridBtn.disabled = false; }); ``` -Eventually, the two buttons (Delete and Create) invoke methods exposed by the Document API, respectively `deleteGrid()` and `createGrid()`. The latter expects an options object with `rows`, `columns`, `gutter`, `columnColor`, and `rowColor` properties. +Eventually, the two buttons (Delete and Create) invoke methods exposed by the Document API, respectively `deleteGrid()` and `createGrid()`. The latter expects an options object with `rows`, `columns`, `gutter`, `columnColor`, and `rowColor` properties. ### Validation and Error Handling @@ -687,11 +693,11 @@ const { runtime } = addOnSandboxSdk.instance; import { editor, colorUtils, constants } from "express-document-sdk"; function start() { - runtime.exposeApi({ - addGrid({ columns, rows, gutter, columnColor, rowColor }) { - console.log("addGrid", columns, rows, gutter, columnColor, rowColor); - }, - }); + runtime.exposeApi({ + addGrid({ columns, rows, gutter, columnColor, rowColor }) { + console.log("addGrid", columns, rows, gutter, columnColor, rowColor); + }, + }); } start(); @@ -716,12 +722,12 @@ We must get hold of the [Document](/references/document-sandbox/document-apis/cl ```js // ... runtime.exposeApi({ - addGrid({ columns, rows, gutter, columnColor, rowColor }) { - const doc = editor.documentRoot; - const page = doc.pages.first; - const rowWidth = page.width; - const rowHeight = (page.height - (rowsNumber + 1) * gutter) / rowsNumber; - }, + addGrid({ columns, rows, gutter, columnColor, rowColor }) { + const doc = editor.documentRoot; + const page = doc.pages.first; + const rowWidth = page.width; + const rowHeight = (page.height - (rowsNumber + 1) * gutter) / rowsNumber; + }, }); ``` @@ -747,18 +753,18 @@ addGrid({ columns, rows, gutter, columnColor, rowColor }) { To draw all four (or any number coming from the UI) rectangles at once, a loop is in order. ```js - // ... - var rowsRect = []; - for (let i = 0; i < rows; i++) { - let r = editor.createRectangle(); - r.width = page.width; - r.height = rowHeight; - // moving the row in place +// ... +var rowsRect = []; +for (let i = 0; i < rows; i++) { + let r = editor.createRectangle(); + r.width = page.width; + r.height = rowHeight; + // moving the row in place r.translation = { x: 0, y: gutter + (gutter + rowHeight) * i }; rowsRect.push(r); - } - // adding the rows to the page - rowsRect.forEach((rect) => page.artboards.first.children.append(rect)); +} +// adding the rows to the page +rowsRect.forEach((rect) => page.artboards.first.children.append(rect)); ``` We've created all the needed rectangles, shifting them on the Y-axis according to their number and gutter, collecting them in a `rowsRect` array; which, in turn, we've looped through to append them all to the first `artboard` in the page. @@ -776,11 +782,11 @@ const page = doc.pages.first; var colsRect = []; const colWidth = (page.width - (cols + 1) * gutter) / cols; for (let i = 0; i < cols; i++) { - let r = editor.createRectangle(); - r.width = colWidth; - r.height = page.height; + let r = editor.createRectangle(); + r.width = colWidth; + r.height = page.height; r.translation = { x: gutter + (gutter + colWidth) * i, y: 0 }; - cols.push(r); + cols.push(r); } cols.forEach((rect) => page.artboards.first.children.append(rect)); ``` @@ -791,10 +797,10 @@ We now have most of what is needed to complete the Grids add-on; we're in dire n The Grid creation process can be split into **smaller, separate steps**—we can take this chance to think about how to structure the entire project. -- Creating a rectangle is best handled using a dedicated `createRect()` function. -- Rows and Columns can be separate processes, too. -- `code.js` doesn't need to expose anything else but the `addGrid()` and `deleteGrid()` methods. -- `addRows()` and `addColumns()` can belong to the `shapeUtils.js` module and imported in `documentSandbox/code.js`, while `createRect()` will be kept as private. +- Creating a rectangle is best handled using a dedicated `createRect()` function. +- Rows and Columns can be separate processes, too. +- `code.js` doesn't need to expose anything else but the `addGrid()` and `deleteGrid()` methods. +- `addRows()` and `addColumns()` can belong to the `shapeUtils.js` module and imported in `documentSandbox/code.js`, while `createRect()` will be kept as private. @@ -810,17 +816,17 @@ import { addColumns, addRows } from "./shapeUtils"; const { runtime } = addOnSandboxSdk.instance; function start() { - const sandboxProxy = { - addGrid({ columns, rows, gutter, columnColor, rowColor }) { - addRows(rows, gutter, rowColor); - addColumns(columns, gutter, columnColor); - // ... - }, - deleteGrid() { - // ... - }, - }; - runtime.exposeApi(sandboxProxy); + const sandboxProxy = { + addGrid({ columns, rows, gutter, columnColor, rowColor }) { + addRows(rows, gutter, rowColor); + addColumns(columns, gutter, columnColor); + // ... + }, + deleteGrid() { + // ... + }, + }; + runtime.exposeApi(sandboxProxy); } start(); ``` @@ -832,37 +838,37 @@ import { editor, colorUtils, constants } from "express-document-sdk"; // Utility to create a rectangle and fill it with a color. const createRect = (width, height, color) => { - const rect = editor.createRectangle(); - rect.width = width; - rect.height = height; - // Fill the rectangle with the color. - const rectangleFill = editor.makeColorFill(colorUtils.fromHex(color)); - rect.fill = rectangleFill; - return rect; + const rect = editor.createRectangle(); + rect.width = width; + rect.height = height; + // Fill the rectangle with the color. + const rectangleFill = editor.makeColorFill(colorUtils.fromHex(color)); + rect.fill = rectangleFill; + return rect; }; const addRows = (rowsNumber, gutter, color) => { - const page = editor.documentRoot.pages.first; - var rows = []; - const rowHeight = (page.height - (rowsNumber + 1) * gutter) / rowsNumber; - for (let i = 0; i < rowsNumber; i++) { - let r = createRect(page.width, rowHeight, color); - r.translation = { x: 0, y: gutter + (gutter + rowHeight) * i }; - rows.push(r); - } - rows.forEach((row) => page.artboards.first.children.append(row)); + const page = editor.documentRoot.pages.first; + var rows = []; + const rowHeight = (page.height - (rowsNumber + 1) * gutter) / rowsNumber; + for (let i = 0; i < rowsNumber; i++) { + let r = createRect(page.width, rowHeight, color); + r.translation = { x: 0, y: gutter + (gutter + rowHeight) * i }; + rows.push(r); + } + rows.forEach((row) => page.artboards.first.children.append(row)); }; const addColumns = (columNumber, gutter, color) => { - const page = editor.documentRoot.pages.first; - var cols = []; - const colWidth = (page.width - (columNumber + 1) * gutter) / columNumber; - for (let i = 0; i < columNumber; i++) { - let r = createRect(colWidth, page.height, color); - r.translation = { x: gutter + (gutter + colWidth) * i, y: 0 }; - cols.push(r); - } - cols.forEach((col) => page.artboards.first.children.append(col)); + const page = editor.documentRoot.pages.first; + var cols = []; + const colWidth = (page.width - (columNumber + 1) * gutter) / columNumber; + for (let i = 0; i < columNumber; i++) { + let r = createRect(colWidth, page.height, color); + r.translation = { x: gutter + (gutter + colWidth) * i, y: 0 }; + cols.push(r); + } + cols.forEach((col) => page.artboards.first.children.append(col)); }; export { addColumns, addRows }; @@ -874,13 +880,13 @@ It'd be nice to group rows and columns. The Editor class provides a [`createGrou ```js const addRows = (rowsNumber, gutter, color) => { - // ... - var rows = []; - // ... + // ... + var rows = []; + // ... - const rowsGroup = editor.createGroup(); // creating a group - page.artboards.first.children.append(rowsGroup); // appending to the page - rowsGroup.children.append(...rows); // appending rectangles + const rowsGroup = editor.createGroup(); // creating a group + page.artboards.first.children.append(rowsGroup); // appending to the page + rowsGroup.children.append(...rows); // appending rectangles }; // 👆 same in addColumns() ``` @@ -895,7 +901,7 @@ rowsGroup.children.append(...rows); rowsGroup.locked = true; ``` -The Reference also shows an interesting [`blendMode`](/references/document-sandbox/document-apis/classes/GroupNode.md#blendmode): setting it to [`multiply`](/references/document-sandbox/document-apis/enums/BlendMode/#multiply) will produce a visually nicer overlay effect ([opacity](/references/document-sandbox/document-apis/classes/GroupNode.md#opacity) can be an alternative). +The Reference also shows an interesting [`blendMode`](/references/document-sandbox/document-apis/classes/GroupNode.md#blendmode): setting it to [`multiply`](/references/document-sandbox/document-apis/enumerations/BlendMode/#multiply) will produce a visually nicer overlay effect ([opacity](/references/document-sandbox/document-apis/classes/GroupNode.md#opacity) can be an alternative). ```js // ... @@ -913,16 +919,16 @@ It would be preferable if a single group contained Rows and Columns; we must edi ```js const addRows = (rowsNumber, gutter, color) => { - // ... - rowsGroup.locked = true; - return rowsGroup; // 👈 returning the group -} + // ... + rowsGroup.locked = true; + return rowsGroup; // 👈 returning the group +}; const addColumns = (columNumber, gutter, color) => { - // ... - columnsGroup.locked = true; - return columnsGroup;// 👈 -} + // ... + columnsGroup.locked = true; + return columnsGroup; // 👈 +}; ``` They can be referenced in `addGrid()`, appending them as children of this new group. @@ -956,25 +962,25 @@ Curb your enthusiasm: if you think about it, there might be an issue lurking her let gridRef = null; // 👈 Grids group reference function start() { - runtime.exposeApi({ - addGrid({ columns, rows, gutter, columnColor, rowColor }) { - // ... - const gridGroup = editor.createGroup(); - // ... - gridRef = gridGroup; // 👈 storing the group for later - }, - deleteGrid() { - if (gridRef) { - try { - gridRef.removeFromParent(); // 👈 removing from the document - gridRef = null; // clearing the reference - } catch (error) { - console.error(error); - return "Error: the Grid could not be deleted." - } - } - }, - }); + runtime.exposeApi({ + addGrid({ columns, rows, gutter, columnColor, rowColor }) { + // ... + const gridGroup = editor.createGroup(); + // ... + gridRef = gridGroup; // 👈 storing the group for later + }, + deleteGrid() { + if (gridRef) { + try { + gridRef.removeFromParent(); // 👈 removing from the document + gridRef = null; // clearing the reference + } catch (error) { + console.error(error); + return "Error: the Grid could not be deleted."; + } + } + }, + }); } start(); ``` @@ -985,19 +991,19 @@ Although not exposed through the Communication API, the `gridRef` variable is pr Congratulations! You've coded from scratch the Grids Design System add-on. This proof-of-concept may be extended to make it even more useful as a product; you may implement the following features as an exercise. -- **Page margins**: we're using the gutter for this purpose, but a proper `` can be added to allow users to set margins. -- **Visibility toggle**: Use a ``to control the grid's opacity, or add a `` to toggle them on and off. -- **Presets**: a dropdown menu might store commonly used grid sets—use a `` and the [Client Storage API](/references/addonsdk/instance-clientStorage/). +- **Page margins**: we're using the gutter for this purpose, but a proper `` can be added to allow users to set margins. +- **Visibility toggle**: Use a ``to control the grid's opacity, or add a `` to toggle them on and off. +- **Presets**: a dropdown menu might store commonly used grid sets—use a `` and the [Client Storage API](/references/addonsdk/instance-clientStorage/). ## Lessons Learned Let's review the concepts covered in this tutorial and how they've been implemented in the Grids add-on. -- The **iframe** and the **Document Sandbox** are two distinct entities able to share contexts via the Communication API. We've used the `exposeApi()` method of the `runtime` object to allow the iframe to invoke functions in the Document API domain. -- The **Document API** provides access to Adobe Express' Document Object Model, which defines containment structures and inheritance hierarchies. We've retrieved the document, its pages, and artboards; created, moved and assigned blending modes to shapes; created, populated and locked groups. -- Nodes (elements) in Adobe Express documents can be added to the document in a position relative to the currently active selection or targeting a container as the **insertion point**; we've seen how `ContainerNode` elements have a `children` collection to `append()` elements to. -- The Document API **context is permanent** in between iframe calls. We've seen that it's possible to store a reference to a Node within the exposed methods' closure and act upon it after its creation. -- **Spectrum Web Components** are crucial to UI building, but sometimes they require customization; in this project, we've linked a `` to a traditional `` element to create an Adobe Express' native-looking color picker. +- The **iframe** and the **Document Sandbox** are two distinct entities able to share contexts via the Communication API. We've used the `exposeApi()` method of the `runtime` object to allow the iframe to invoke functions in the Document API domain. +- The **Document API** provides access to Adobe Express' Document Object Model, which defines containment structures and inheritance hierarchies. We've retrieved the document, its pages, and artboards; created, moved and assigned blending modes to shapes; created, populated and locked groups. +- Nodes (elements) in Adobe Express documents can be added to the document in a position relative to the currently active selection or targeting a container as the **insertion point**; we've seen how `ContainerNode` elements have a `children` collection to `append()` elements to. +- The Document API **context is permanent** in between iframe calls. We've seen that it's possible to store a reference to a Node within the exposed methods' closure and act upon it after its creation. +- **Spectrum Web Components** are crucial to UI building, but sometimes they require customization; in this project, we've linked a `` to a traditional `` element to create an Adobe Express' native-looking color picker. ## Final Project @@ -1011,50 +1017,58 @@ The code for this project can be downloaded [here](https://github.com/AdobeDocs/ ```html - - - - - - - Grids add-on - - - - - -

Design Grid creator

-
-
-
- Rows - - -
- - -
-
-
- Columns - - -
- - -
-
-
- -
- - Delete - Create - -
- - + + + + + + Grids add-on + + + + + +

Design Grid creator

+
+
+
+ Rows + +
+ + +
+
+
+ Columns + +
+ + +
+
+
+ +
+ + Delete + Create + +
+ ``` @@ -1079,76 +1093,76 @@ import "@spectrum-web-components/swatch/sp-swatch.js"; import addOnUISdk from "https://new.express.adobe.com/static/add-on-sdk/sdk.js"; addOnUISdk.ready.then(async () => { - console.log("addOnUISdk is ready for use."); + console.log("addOnUISdk is ready for use."); - // Get the Document Sandbox. - const { runtime } = addOnUISdk.instance; - const sandboxProxy = await runtime.apiProxy("documentSandbox"); + // Get the Document Sandbox. + const { runtime } = addOnUISdk.instance; + const sandboxProxy = await runtime.apiProxy("documentSandbox"); - // Input fields ------------------------------------------- + // Input fields ------------------------------------------- - const rowsInput = document.getElementById("rows"); - const colsInput = document.getElementById("cols"); - const gutterInput = document.getElementById("gutter"); + const rowsInput = document.getElementById("rows"); + const colsInput = document.getElementById("cols"); + const gutterInput = document.getElementById("gutter"); - rowsInput.value = 4; - colsInput.value = 6; - gutterInput.value = 10; + rowsInput.value = 4; + colsInput.value = 6; + gutterInput.value = 10; - // Color pickers ------------------------------------------ + // Color pickers ------------------------------------------ - const colsColorPicker = document.getElementById("colsColorPicker"); - const colsColorSwatch = document.getElementById("colsColorSwatch"); - const rowsColorPicker = document.getElementById("rowsColorPicker"); - const rowsColorSwatch = document.getElementById("rowsColorSwatch"); + const colsColorPicker = document.getElementById("colsColorPicker"); + const colsColorSwatch = document.getElementById("colsColorSwatch"); + const rowsColorPicker = document.getElementById("rowsColorPicker"); + const rowsColorSwatch = document.getElementById("rowsColorSwatch"); - colsColorPicker.value = "#ffcccc"; - colsColorSwatch.color = "#ffcccc"; - rowsColorPicker.value = "#ccccff"; - rowsColorSwatch.color = "#ccccff"; + colsColorPicker.value = "#ffcccc"; + colsColorSwatch.color = "#ffcccc"; + rowsColorPicker.value = "#ccccff"; + rowsColorSwatch.color = "#ccccff"; - colsColorSwatch.addEventListener("click", function () { - colsColorPicker.click(); - }); - colsColorPicker.addEventListener("input", function (event) { - const selectedColor = event.target.value; - colsColorSwatch.setAttribute("color", selectedColor); - }); - - rowsColorSwatch.addEventListener("click", function () { - rowsColorPicker.click(); - }); - rowsColorPicker.addEventListener("input", function (event) { - const selectedColor = event.target.value; - rowsColorSwatch.setAttribute("color", selectedColor); - }); + colsColorSwatch.addEventListener("click", function () { + colsColorPicker.click(); + }); + colsColorPicker.addEventListener("input", function (event) { + const selectedColor = event.target.value; + colsColorSwatch.setAttribute("color", selectedColor); + }); - // CTA Buttons -------------------------------------------- + rowsColorSwatch.addEventListener("click", function () { + rowsColorPicker.click(); + }); + rowsColorPicker.addEventListener("input", function (event) { + const selectedColor = event.target.value; + rowsColorSwatch.setAttribute("color", selectedColor); + }); - const createGridBtn = document.getElementById("createGrid"); - const deleteGridBtn = document.getElementById("deleteGrid"); + // CTA Buttons -------------------------------------------- - deleteGridBtn.onclick = async (event) => { - const res = await sandboxProxy.deleteGrid(); - if (res) { - // When there's been an error deleting the grid, you may want to handle it here - } - deleteGridBtn.disabled = true; - }; - - createGridBtn.onclick = async (event) => { - await sandboxProxy.addGrid({ - columns: colsInput.value, - rows: rowsInput.value, - gutter: gutterInput.value, - columnColor: colsColorPicker.value, - rowColor: rowsColorPicker.value, - }); - deleteGridBtn.disabled = false; - }; + const createGridBtn = document.getElementById("createGrid"); + const deleteGridBtn = document.getElementById("deleteGrid"); - // Only now it is safe to enable the button - createGridBtn.disabled = false; + deleteGridBtn.onclick = async (event) => { + const res = await sandboxProxy.deleteGrid(); + if (res) { + // When there's been an error deleting the grid, you may want to handle it here + } + deleteGridBtn.disabled = true; + }; + + createGridBtn.onclick = async (event) => { + await sandboxProxy.addGrid({ + columns: colsInput.value, + rows: rowsInput.value, + gutter: gutterInput.value, + columnColor: colsColorPicker.value, + rowColor: rowsColorPicker.value, + }); + deleteGridBtn.disabled = false; + }; + + // Only now it is safe to enable the button + createGridBtn.disabled = false; }); ``` @@ -1156,76 +1170,74 @@ addOnUISdk.ready.then(async () => { ```css body { - margin: 0; - padding: 0; - overflow-x: hidden; + margin: 0; + padding: 0; + overflow-x: hidden; } sp-theme { - margin: 0 var(--spectrum-global-dimension-static-size-300); - display: grid; + margin: 0 var(--spectrum-global-dimension-static-size-300); + display: grid; } .row { - display: flex; - flex-direction: row; - justify-content: space-between; - width: 100%; - align-items: flex-end; + display: flex; + flex-direction: row; + justify-content: space-between; + width: 100%; + align-items: flex-end; } .gap-20 { - gap: var(--spectrum-global-dimension-static-size-250); + gap: var(--spectrum-global-dimension-static-size-250); } .gutter-row { - display: flex; - flex-direction: row; - justify-content: flex-end; - width: 100%; - align-items: flex-start; - border: 1px solid black; - margin-bottom: var(--spectrum-global-dimension-static-size-150); + display: flex; + flex-direction: row; + justify-content: flex-end; + width: 100%; + align-items: flex-start; + border: 1px solid black; + margin-bottom: var(--spectrum-global-dimension-static-size-150); } .column { - display: flex; - flex-direction: column; - padding-right: var(--spectrum-global-dimension-static-size-100); - width: var(--spectrum-global-dimension-static-size-1000); + display: flex; + flex-direction: column; + padding-right: var(--spectrum-global-dimension-static-size-100); + width: var(--spectrum-global-dimension-static-size-1000); } h2 { - font-weight: var(--spectrum-global-font-weight-black); + font-weight: var(--spectrum-global-font-weight-black); } sp-swatch { - width: var(--spectrum-swatch-size-medium); + width: var(--spectrum-swatch-size-medium); } .color-well { - cursor: pointer; - --mod-swatch-border-thickness: var(--spectrum-divider-thickness-small); - --mod-swatch-border-color: var(--spectrum-transparent-black-500); + cursor: pointer; + --mod-swatch-border-thickness: var(--spectrum-divider-thickness-small); + --mod-swatch-border-color: var(--spectrum-transparent-black-500); } sp-button { - flex: 1; - max-width: calc( - (100% - var(--spectrum-global-dimension-static-size-250)) / 2 - ); + flex: 1; + max-width: calc((100% - var(--spectrum-global-dimension-static-size-250)) / 2); } sp-number-field, sp-slider { - width: 100%; + width: 100%; } sp-button-group { - margin-top: var(--spectrum-global-dimension-static-size-300); - width: 100%; - display: flex; - justify-content: space-between; + margin-top: var(--spectrum-global-dimension-static-size-300); + width: 100%; + display: flex; + justify-content: space-between; } ``` @@ -1242,57 +1254,56 @@ const { runtime } = addOnSandboxSdk.instance; let gridRef = null; function start() { - // APIs to be exposed to the UI runtime - runtime.exposeApi({ - /** - * Add a grid to the document. - * - * @param {Object} options - The options for the grid. - * @param {number} options.columns - The number of columns in the grid. - * @param {number} options.rows - The number of rows in the grid. - * @param {number} options.gutter - The size of the gutter between columns and rows. - * @param {string} options.columnColor - The color of the columns. - * @param {string} options.rowColor - The color of the rows. - * @returns {Group} The group containing the grid. - */ - addGrid({ columns, rows, gutter, columnColor, rowColor }) { - // Get the document and page. - const doc = editor.documentRoot; - const page = doc.pages.first; - // Create the grid. - const rowGroup = addRows(rows, gutter, rowColor); - const columnGroup = addColumns(columns, gutter, columnColor); - - // Create the grid's group. - const gridGroup = editor.createGroup(); - page.artboards.first.children.append(gridGroup); - gridGroup.children.append(rowGroup, columnGroup); - gridGroup.locked = true; - - // Save the grid reference. - gridRef = gridGroup; - }, - - /** - * Delete the grid from the document. - * @returns {void} - */ - deleteGrid() { - if (gridRef) { - try { - gridRef.removeFromParent(); - gridRef = null; - } catch (error) { - console.error(error); - return "Error: the Grid could not be deleted."; - } - } - }, - }); + // APIs to be exposed to the UI runtime + runtime.exposeApi({ + /** + * Add a grid to the document. + * + * @param {Object} options - The options for the grid. + * @param {number} options.columns - The number of columns in the grid. + * @param {number} options.rows - The number of rows in the grid. + * @param {number} options.gutter - The size of the gutter between columns and rows. + * @param {string} options.columnColor - The color of the columns. + * @param {string} options.rowColor - The color of the rows. + * @returns {Group} The group containing the grid. + */ + addGrid({ columns, rows, gutter, columnColor, rowColor }) { + // Get the document and page. + const doc = editor.documentRoot; + const page = doc.pages.first; + // Create the grid. + const rowGroup = addRows(rows, gutter, rowColor); + const columnGroup = addColumns(columns, gutter, columnColor); + + // Create the grid's group. + const gridGroup = editor.createGroup(); + page.artboards.first.children.append(gridGroup); + gridGroup.children.append(rowGroup, columnGroup); + gridGroup.locked = true; + + // Save the grid reference. + gridRef = gridGroup; + }, + + /** + * Delete the grid from the document. + * @returns {void} + */ + deleteGrid() { + if (gridRef) { + try { + gridRef.removeFromParent(); + gridRef = null; + } catch (error) { + console.error(error); + return "Error: the Grid could not be deleted."; + } + } + }, + }); } start(); - ``` #### Document API @@ -1310,12 +1321,12 @@ import { editor, colorUtils, constants } from "express-document-sdk"; * @returns {RectangleNode} The created rectangle. */ const createRect = (width, height, color) => { - const rect = editor.createRectangle(); - rect.width = width; - rect.height = height; - const rectangleFill = editor.makeColorFill(colorUtils.fromHex(color)); - rect.fill = rectangleFill; - return rect; + const rect = editor.createRectangle(); + rect.width = width; + rect.height = height; + const rectangleFill = editor.makeColorFill(colorUtils.fromHex(color)); + rect.fill = rectangleFill; + return rect; }; /** @@ -1327,29 +1338,29 @@ const createRect = (width, height, color) => { * @returns {GroupNode} A group containing the created rows. */ const addRows = (rowsNumber, gutter, color) => { - const doc = editor.documentRoot; - const page = doc.pages.first; - - var rows = []; - const rowHeight = (page.height - (rowsNumber + 1) * gutter) / rowsNumber; - // Create the rectangles - for (let i = 0; i < rowsNumber; i++) { - let r = createRect(page.width, rowHeight, color); - r.translation = { x: 0, y: gutter + (gutter + rowHeight) * i }; - rows.push(r); - } - // Append the rectangles to the document - rows.forEach((row) => page.artboards.first.children.append(row)); - // Create the group - const rowsGroup = editor.createGroup(); - // Append the group to the document - page.artboards.first.children.append(rowsGroup); - // Populate the group with the rectangles - rowsGroup.children.append(...rows); - // Edit the group's properties - rowsGroup.blendMode = constants.BlendMode.multiply; - rowsGroup.locked = true; - return rowsGroup; + const doc = editor.documentRoot; + const page = doc.pages.first; + + var rows = []; + const rowHeight = (page.height - (rowsNumber + 1) * gutter) / rowsNumber; + // Create the rectangles + for (let i = 0; i < rowsNumber; i++) { + let r = createRect(page.width, rowHeight, color); + r.translation = { x: 0, y: gutter + (gutter + rowHeight) * i }; + rows.push(r); + } + // Append the rectangles to the document + rows.forEach((row) => page.artboards.first.children.append(row)); + // Create the group + const rowsGroup = editor.createGroup(); + // Append the group to the document + page.artboards.first.children.append(rowsGroup); + // Populate the group with the rectangles + rowsGroup.children.append(...rows); + // Edit the group's properties + rowsGroup.blendMode = constants.BlendMode.multiply; + rowsGroup.locked = true; + return rowsGroup; }; /** @@ -1361,44 +1372,38 @@ const addRows = (rowsNumber, gutter, color) => { * @returns {GroupNode} A group containing the created columns. */ const addColumns = (columsNumber, gutter, color) => { - const doc = editor.documentRoot; - const page = doc.pages.first; - var cols = []; - const colWidth = (page.width - (columsNumber + 1) * gutter) / columsNumber; - // Create the rectangles - for (let i = 0; i < columsNumber; i++) { - let r = createRect(colWidth, page.height, color); - r.translation = { x: gutter + (gutter + colWidth) * i, y: 0 }; - cols.push(r); - } - // Append the rectangles to the document - cols.forEach((col) => page.artboards.first.children.append(col)); - // Create the group - const columnsGroup = editor.createGroup(); - // Append the group to the document - page.artboards.first.children.append(columnsGroup); - // Populate the group with the rectangles - columnsGroup.children.append(...cols); - // Edit the group's properties - columnsGroup.blendMode = constants.BlendMode.multiply; - columnsGroup.locked = true; - return columnsGroup; + const doc = editor.documentRoot; + const page = doc.pages.first; + var cols = []; + const colWidth = (page.width - (columsNumber + 1) * gutter) / columsNumber; + // Create the rectangles + for (let i = 0; i < columsNumber; i++) { + let r = createRect(colWidth, page.height, color); + r.translation = { x: gutter + (gutter + colWidth) * i, y: 0 }; + cols.push(r); + } + // Append the rectangles to the document + cols.forEach((col) => page.artboards.first.children.append(col)); + // Create the group + const columnsGroup = editor.createGroup(); + // Append the group to the document + page.artboards.first.children.append(columnsGroup); + // Populate the group with the rectangles + columnsGroup.children.append(...cols); + // Edit the group's properties + columnsGroup.blendMode = constants.BlendMode.multiply; + columnsGroup.locked = true; + return columnsGroup; }; export { addColumns, addRows }; - ``` [^1]: Alternatively, you can use this [blank template](https://github.com/AdobeDocs/express-add-on-samples/tree/main/document-sandbox-samples/express-addon-document-api-template) and start from scratch, but you'd need to manually add the `documentSandbox/shapeUtils.js` file and the various Spectrum imports. - [^2]: The quotes are from the Documentation Reference of each element. - [^3]: The terms "list" is used in the Adobe Express reference documentation, while "collection" may be more familiar to CEP/UXP developers; they are used interchangeably here. - [^4]: It could have been another ``, but a slider played well with the overall design. - [^5]: For example, you may want to retrieve the page's `width` and `height` properties at the beginning, and use them in the rest of the code. - -[^6]: Future versions of the Document API may provide more deliberate ways to refer to elements. +[^6]: Future versions of the Document API may provide more deliberate ways to refer to elements. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md b/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md index 9d92adb63..07c7eec0d 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md @@ -10,7 +10,7 @@ remove the last remaining artboard from the list. ## Extends -- [`RestrictedItemList`](RestrictedItemList.md)\<[`ArtboardNode`](ArtboardNode.md)\> +- [`RestrictedItemList`](RestrictedItemList.md)<[`ArtboardNode`](ArtboardNode.md)\> ## Accessors @@ -52,13 +52,13 @@ Number of items in this list. ### `[iterator]`() -> **\[iterator\]**(): `Iterator`\<[`ArtboardNode`](ArtboardNode.md), `any`, `undefined`\> +> **\[iterator\]**(): `Iterator`<[`ArtboardNode`](ArtboardNode.md), `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. #### Returns -`Iterator`\<[`ArtboardNode`](ArtboardNode.md), `any`, `undefined`\> +`Iterator`<[`ArtboardNode`](ArtboardNode.md), `any`, `undefined`\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md b/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md index 495d97cc9..cdccefce1 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md @@ -19,7 +19,7 @@ When multiple artboards exist on a page, the artboards represent "scenes" in a l ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -30,13 +30,13 @@ The children of an Artboard are always other Node classes (never the more minima #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -47,38 +47,38 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- ### children -> `get` **children**(): [`ItemList`](ItemList.md)\<[`Node`](Node.md)\> +> `get` **children**(): [`ItemList`](ItemList.md)<[`Node`](Node.md)\> The node's children. Use the methods on this ItemList object to get, add, and remove children. #### Returns -[`ItemList`](ItemList.md)\<[`Node`](Node.md)\> +[`ItemList`](ItemList.md)<[`Node`](Node.md)\> --- ### fill -> `get` **fill**(): `Readonly`\<[`Fill`](../interfaces/Fill.md)\> +> `get` **fill**(): `Readonly`<[`Fill`](../interfaces/Fill.md)\> > `set` **fill**(`fill`): `void` @@ -90,7 +90,7 @@ The background fill of the artboard. Artboards must always have a fill. #### Returns -`Readonly`\<[`Fill`](../interfaces/Fill.md)\> +`Readonly`<[`Fill`](../interfaces/Fill.md)\> --- @@ -133,7 +133,7 @@ The node's parent. Undefined if the node is an orphan. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -141,7 +141,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -188,7 +188,7 @@ The width of the artboard. ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -202,7 +202,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Implementation of diff --git a/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md b/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md index a2cb1f970..f4e80cbcd 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md @@ -17,7 +17,7 @@ properties. ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`BaseNode`](BaseNode.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -29,7 +29,7 @@ to guarantee all their children are full-fledged Node instances. #### Returns -`Readonly`\<`Iterable`\<[`BaseNode`](BaseNode.md)\>\> +`Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> --- diff --git a/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md b/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md index 9b17eb607..de02cbf6a 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md @@ -13,7 +13,7 @@ of multiple separate paths. ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -24,7 +24,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -59,13 +59,13 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -76,26 +76,26 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- ### fill -> `get` **fill**(): `undefined` \| `Readonly`\<[`Fill`](../interfaces/Fill.md)\> +> `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> > `set` **fill**(`fill`): `void` @@ -107,7 +107,7 @@ The fill applied to the shape, if any. #### Returns -`undefined` \| `Readonly`\<[`Fill`](../interfaces/Fill.md)\> +`undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> --- @@ -206,7 +206,7 @@ cumulative rotation from the node's parent containers. ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> > `set` **stroke**(`stroke`): `void` @@ -220,13 +220,13 @@ for backward compatibility. Throws if another type is provided. #### Returns -`undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +`undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> --- ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -234,7 +234,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -252,7 +252,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -266,7 +266,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -301,7 +301,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -313,7 +313,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> #### Inherited from @@ -323,7 +323,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -337,7 +337,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/Editor.md b/src/pages/references/document-sandbox/document-apis/classes/Editor.md index 596fbaf18..8e9f27db6 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/Editor.md +++ b/src/pages/references/document-sandbox/document-apis/classes/Editor.md @@ -152,7 +152,7 @@ adjust to accommodate whatever text is set. ### loadBitmapImage() -> **loadBitmapImage**(`bitmapData`): `Promise`\<[`BitmapImage`](../interfaces/BitmapImage.md)\> +> **loadBitmapImage**(`bitmapData`): `Promise`<[`BitmapImage`](../interfaces/BitmapImage.md)\> Creates a bitmap image resource in the document, which can be displayed in the scenegraph by passing it to [createImageContainer](Editor.md#createimagecontainer) to create a MediaContainerNode. The same BitmapImage can be used to create multiple MediaContainerNodes. @@ -172,7 +172,7 @@ Encoded image data in PNG or JPEG format. #### Returns -`Promise`\<[`BitmapImage`](../interfaces/BitmapImage.md)\> +`Promise`<[`BitmapImage`](../interfaces/BitmapImage.md)\> --- @@ -214,7 +214,7 @@ See [SolidColorStroke](../interfaces/SolidColorStroke.md) for more details on th #### Parameters -• **options?**: `Partial`\<[`SolidColorStroke`](../interfaces/SolidColorStroke.md)\> +• **options?**: `Partial`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md)\> #### Returns @@ -226,7 +226,7 @@ a stroke configured with the given options. ### queueAsyncEdit() -> **queueAsyncEdit**(`lambda`): `Promise`\<`void`\> +> **queueAsyncEdit**(`lambda`): `Promise`<`void`\> Enqueues a function to be run at a later time when edits to the user's document may be performed. You can always edit the document immediately when invoked in response to your add-on's UI code. However, if you delay to await an @@ -268,6 +268,6 @@ a function which edits the document model. #### Returns -`Promise`\<`void`\> +`Promise`<`void`\> a Promise that resolves when the lambda has finished running, or rejects if the lambda throws an error. diff --git a/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md b/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md index c0e9de24a..c0f814164 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md @@ -12,7 +12,7 @@ An EllipseNode represents an ellipse object in the scenegraph. ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -23,7 +23,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -48,7 +48,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -58,13 +58,13 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -75,26 +75,26 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- ### fill -> `get` **fill**(): `undefined` \| `Readonly`\<[`Fill`](../interfaces/Fill.md)\> +> `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> > `set` **fill**(`fill`): `void` @@ -106,7 +106,7 @@ The fill applied to the shape, if any. #### Returns -`undefined` \| `Readonly`\<[`Fill`](../interfaces/Fill.md)\> +`undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> --- @@ -247,7 +247,7 @@ Must be at least MIN_DIMENSION / 2. ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> > `set` **stroke**(`stroke`): `void` @@ -261,13 +261,13 @@ for backward compatibility. Throws if another type is provided. #### Returns -`undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +`undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> --- ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -275,7 +275,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -293,7 +293,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -307,7 +307,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -342,7 +342,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -354,7 +354,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> #### Inherited from @@ -364,7 +364,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -378,7 +378,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md b/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md index 9c4898a9d..939de6049 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md @@ -16,7 +16,7 @@ The parent of ExpressRootNode is undefined, since it is the root of the document ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`BaseNode`](BaseNode.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -28,7 +28,7 @@ to guarantee all their children are full-fledged Node instances. #### Returns -`Readonly`\<`Iterable`\<[`BaseNode`](BaseNode.md)\>\> +`Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> --- diff --git a/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md b/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md index dfe7bf188..001822825 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md @@ -23,7 +23,7 @@ Base class for a Node that can have its own fill and stroke. ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -34,7 +34,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -59,7 +59,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -69,13 +69,13 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -86,26 +86,26 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- ### fill -> `get` **fill**(): `undefined` \| `Readonly`\<[`Fill`](../interfaces/Fill.md)\> +> `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> > `set` **fill**(`fill`): `void` @@ -117,7 +117,7 @@ The fill applied to the shape, if any. #### Returns -`undefined` \| `Readonly`\<[`Fill`](../interfaces/Fill.md)\> +`undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> --- @@ -216,7 +216,7 @@ cumulative rotation from the node's parent containers. ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> > `set` **stroke**(`stroke`): `void` @@ -230,13 +230,13 @@ for backward compatibility. Throws if another type is provided. #### Returns -`undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +`undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> --- ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -244,7 +244,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -262,7 +262,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -276,7 +276,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -311,7 +311,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -323,7 +323,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> #### Inherited from @@ -333,7 +333,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -347,7 +347,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md b/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md index b6cd58cb5..51648d408 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md @@ -11,13 +11,13 @@ a layout grid that other content can be placed into. ## Implements -- `Readonly`\<[`IRectangularNode`](../interfaces/IRectangularNode.md)\> +- `Readonly`<[`IRectangularNode`](../interfaces/IRectangularNode.md)\> ## Accessors ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -28,7 +28,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -53,7 +53,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -63,13 +63,13 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -80,26 +80,26 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- ### fill -> `get` **fill**(): `Readonly`\<[`Fill`](../interfaces/Fill.md)\> +> `get` **fill**(): `Readonly`<[`Fill`](../interfaces/Fill.md)\> > `set` **fill**(`fill`): `void` @@ -111,7 +111,7 @@ The background fill of the GridLayout. #### Returns -`Readonly`\<[`Fill`](../interfaces/Fill.md)\> +`Readonly`<[`Fill`](../interfaces/Fill.md)\> --- @@ -222,7 +222,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -230,7 +230,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -248,7 +248,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -262,7 +262,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -309,7 +309,7 @@ The width of the node. ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -321,7 +321,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> #### Inherited from @@ -331,7 +331,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -345,7 +345,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md b/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md index 004a6c545..be5c45de3 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md @@ -17,7 +17,7 @@ optional vector mask child. ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -28,7 +28,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -53,7 +53,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -63,46 +63,46 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> Note: If this group has a maskShape, group's bounds are always identical to the maskShape's, regardless of the group's other content. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- ### children -> `get` **children**(): [`ItemList`](ItemList.md)\<[`Node`](Node.md)\> +> `get` **children**(): [`ItemList`](ItemList.md)<[`Node`](Node.md)\> The Group's regular children. Does not include the maskShape if one is present. Use the methods on this ItemList object to get, add, and remove children. #### Returns -[`ItemList`](ItemList.md)\<[`Node`](Node.md)\> +[`ItemList`](ItemList.md)<[`Node`](Node.md)\> --- @@ -229,7 +229,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -237,7 +237,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -255,7 +255,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -269,7 +269,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -304,7 +304,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -316,7 +316,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> #### Inherited from @@ -326,7 +326,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -340,7 +340,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Implementation of diff --git a/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md b/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md index 62f9edd21..37cdf25d5 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md @@ -12,13 +12,13 @@ shape sibling node). ## Implements -- `Readonly`\<[`IRectangularNode`](../interfaces/IRectangularNode.md)\> +- `Readonly`<[`IRectangularNode`](../interfaces/IRectangularNode.md)\> ## Accessors ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -29,7 +29,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -54,7 +54,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -64,13 +64,13 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -81,20 +81,20 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -207,7 +207,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -215,7 +215,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -233,7 +233,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -247,7 +247,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -296,7 +296,7 @@ will always match its aspect ratio. ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -308,7 +308,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> #### Inherited from @@ -318,7 +318,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -332,7 +332,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/ItemList.md b/src/pages/references/document-sandbox/document-apis/classes/ItemList.md index 98796fc3a..2f8310090 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ItemList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ItemList.md @@ -1,6 +1,6 @@ [@express-document-sdk](../overview.md) / ItemList -# Class: ItemList\ +# Class: ItemList ItemList represents an ordered list of API objects, representing items that are all children of the same parent node. (The reverse is not necessarily true, however: this list might not include all @@ -12,7 +12,7 @@ This class is used in different places for various types of items, including Nod ## Extends -- [`RestrictedItemList`](RestrictedItemList.md)\<`T`\> +- [`RestrictedItemList`](RestrictedItemList.md)<`T`\> ## Type parameters @@ -58,13 +58,13 @@ Number of items in this list. ### `[iterator]`() -> **\[iterator\]**(): `Iterator`\<`T`, `any`, `undefined`\> +> **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. #### Returns -`Iterator`\<`T`, `any`, `undefined`\> +`Iterator`<`T`, `any`, `undefined`\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/LineNode.md b/src/pages/references/document-sandbox/document-apis/classes/LineNode.md index 5f51ae324..9937fbafc 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/LineNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/LineNode.md @@ -36,7 +36,7 @@ A LineNode represents a simple line object in the scenegraph – a single straig ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -47,7 +47,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -72,7 +72,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -82,13 +82,13 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -99,20 +99,20 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -313,7 +313,7 @@ The start point on the y-axis in the parent's coordinate system. Modify using `s ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> > `set` **stroke**(`stroke`): `void` @@ -327,13 +327,13 @@ for backward compatibility. Throws if another type is provided. #### Returns -`undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +`undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> --- ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -341,7 +341,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -359,7 +359,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -373,7 +373,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -408,7 +408,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -420,7 +420,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> #### Inherited from @@ -430,7 +430,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -444,7 +444,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md b/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md index 079db7509..fab916a3d 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md @@ -14,7 +14,7 @@ determined by the maskShape which is not necessarily a rectangle. ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -25,7 +25,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -50,7 +50,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -60,13 +60,13 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -77,20 +77,20 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -217,7 +217,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -225,7 +225,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -243,7 +243,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -257,7 +257,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -292,7 +292,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -304,7 +304,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> #### Inherited from @@ -314,7 +314,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -328,7 +328,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/Node.md b/src/pages/references/document-sandbox/document-apis/classes/Node.md index cb6e7973e..29459f91e 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/Node.md +++ b/src/pages/references/document-sandbox/document-apis/classes/Node.md @@ -28,7 +28,7 @@ A Node’s parent is always a VisualContentNode but may not be another Node (e.g ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -39,7 +39,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -64,7 +64,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -74,13 +74,13 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -91,20 +91,20 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -203,7 +203,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -211,7 +211,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -229,7 +229,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -243,7 +243,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -278,7 +278,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -290,13 +290,13 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -310,7 +310,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/PageList.md b/src/pages/references/document-sandbox/document-apis/classes/PageList.md index c182bfa80..ff8cc452a 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/PageList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/PageList.md @@ -11,7 +11,7 @@ remove the last remaining page from the list. ## Extends -- [`RestrictedItemList`](RestrictedItemList.md)\<[`PageNode`](PageNode.md)\> +- [`RestrictedItemList`](RestrictedItemList.md)<[`PageNode`](PageNode.md)\> ## Accessors @@ -53,13 +53,13 @@ Number of items in this list. ### `[iterator]`() -> **\[iterator\]**(): `Iterator`\<[`PageNode`](PageNode.md), `any`, `undefined`\> +> **\[iterator\]**(): `Iterator`<[`PageNode`](PageNode.md), `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. #### Returns -`Iterator`\<[`PageNode`](PageNode.md), `any`, `undefined`\> +`Iterator`<[`PageNode`](PageNode.md), `any`, `undefined`\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/PageNode.md b/src/pages/references/document-sandbox/document-apis/classes/PageNode.md index 6b42c85b9..816379d35 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/PageNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/PageNode.md @@ -11,13 +11,13 @@ timeline sequence. Those artboards in turn contain all the visual content of the ## Implements -- `Readonly`\<[`IRectangularNode`](../interfaces/IRectangularNode.md)\> +- `Readonly`<[`IRectangularNode`](../interfaces/IRectangularNode.md)\> ## Accessors ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`BaseNode`](BaseNode.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -29,7 +29,7 @@ to guarantee all their children are full-fledged Node instances. #### Returns -`Readonly`\<`Iterable`\<[`BaseNode`](BaseNode.md)\>\> +`Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> --- diff --git a/src/pages/references/document-sandbox/document-apis/classes/PathNode.md b/src/pages/references/document-sandbox/document-apis/classes/PathNode.md index 744feac3d..412caad4a 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/PathNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/PathNode.md @@ -13,7 +13,7 @@ yet, only read. ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -24,7 +24,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -59,13 +59,13 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -76,26 +76,26 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- ### fill -> `get` **fill**(): `undefined` \| `Readonly`\<[`Fill`](../interfaces/Fill.md)\> +> `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> > `set` **fill**(`fill`): `void` @@ -107,7 +107,7 @@ The fill applied to the shape, if any. #### Returns -`undefined` \| `Readonly`\<[`Fill`](../interfaces/Fill.md)\> +`undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> --- @@ -239,7 +239,7 @@ cumulative rotation from the node's parent containers. ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> > `set` **stroke**(`stroke`): `void` @@ -253,13 +253,13 @@ for backward compatibility. Throws if another type is provided. #### Returns -`undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +`undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> --- ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -267,7 +267,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -285,7 +285,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -299,7 +299,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -334,7 +334,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -346,7 +346,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> #### Inherited from @@ -356,7 +356,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -370,7 +370,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md b/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md index 9e408b98a..1addae0f8 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md @@ -1,6 +1,6 @@ [@express-document-sdk](../overview.md) / ReadOnlyItemList -# Class: ReadOnlyItemList\ +# Class: ReadOnlyItemList ReadOnlyItemList represents an ordered list of API objects, representing items that are all children of the same parent node. (The reverse is not necessarily true, however: this list might not include all @@ -56,13 +56,13 @@ Number of items in this list. ### `[iterator]`() -> **\[iterator\]**(): `Iterator`\<`T`, `any`, `undefined`\> +> **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. #### Returns -`Iterator`\<`T`, `any`, `undefined`\> +`Iterator`<`T`, `any`, `undefined`\> --- diff --git a/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md b/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md index 8a69bc376..8f4fb2fd0 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md @@ -16,7 +16,7 @@ A RectangleNode represents a rectangle object in the scenegraph. ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -27,7 +27,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -98,7 +98,7 @@ even if the radius value set here is higher. ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -108,13 +108,13 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -125,26 +125,26 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- ### fill -> `get` **fill**(): `undefined` \| `Readonly`\<[`Fill`](../interfaces/Fill.md)\> +> `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> > `set` **fill**(`fill`): `void` @@ -156,7 +156,7 @@ The fill applied to the shape, if any. #### Returns -`undefined` \| `Readonly`\<[`Fill`](../interfaces/Fill.md)\> +`undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> --- @@ -274,7 +274,7 @@ cumulative rotation from the node's parent containers. ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> > `set` **stroke**(`stroke`): `void` @@ -288,13 +288,13 @@ for backward compatibility. Throws if another type is provided. #### Returns -`undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +`undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> --- ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -302,7 +302,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -366,7 +366,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -380,7 +380,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -434,7 +434,7 @@ Must be at least MIN_DIMENSION. ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -446,7 +446,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> #### Inherited from @@ -469,7 +469,7 @@ If the corner radii differ, returns undefined. ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -483,7 +483,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md b/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md index 76a72ea88..f7ac21ee7 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md @@ -1,6 +1,6 @@ [@express-document-sdk](../overview.md) / RestrictedItemList -# Class: RestrictedItemList\ +# Class: RestrictedItemList Base for ItemLists that have restricted behavior on how items are added to the list, but allow items to be removed and reordered. Subclasses like ItemList may add more @@ -8,7 +8,7 @@ capabilities, however. ## Extends -- [`ReadOnlyItemList`](ReadOnlyItemList.md)\<`T`\> +- [`ReadOnlyItemList`](ReadOnlyItemList.md)<`T`\> ## Extended by @@ -60,13 +60,13 @@ Number of items in this list. ### `[iterator]`() -> **\[iterator\]**(): `Iterator`\<`T`, `any`, `undefined`\> +> **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. #### Returns -`Iterator`\<`T`, `any`, `undefined`\> +`Iterator`<`T`, `any`, `undefined`\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md b/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md index 287226ce9..877f9556f 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md @@ -13,7 +13,7 @@ is composed of multiple separate paths. ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -24,7 +24,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -59,13 +59,13 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -76,26 +76,26 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- ### color -> `get` **color**(): `undefined` \| `Readonly`\<[`Color`](../interfaces/Color.md)\> +> `get` **color**(): `undefined` \| `Readonly`<[`Color`](../interfaces/Color.md)\> The color of the single color shape. @@ -107,7 +107,7 @@ The color of the single color shape. #### Returns -`undefined` \| `Readonly`\<[`Color`](../interfaces/Color.md)\> +`undefined` \| `Readonly`<[`Color`](../interfaces/Color.md)\> --- @@ -206,7 +206,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -214,7 +214,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -232,7 +232,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -246,7 +246,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -281,7 +281,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -293,7 +293,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> #### Inherited from @@ -303,7 +303,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -317,7 +317,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md b/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md index e96e4119e..8ac1fdd34 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md @@ -22,7 +22,7 @@ Base class for a Node that can have its own stroke. ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -33,7 +33,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -58,7 +58,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -68,13 +68,13 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -85,20 +85,20 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -197,7 +197,7 @@ cumulative rotation from the node's parent containers. ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> > `set` **stroke**(`stroke`): `void` @@ -211,13 +211,13 @@ for backward compatibility. Throws if another type is provided. #### Returns -`undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +`undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> --- ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -225,7 +225,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -243,7 +243,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -257,7 +257,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -292,7 +292,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -304,7 +304,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> #### Inherited from @@ -314,7 +314,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -328,7 +328,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md b/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md index d5a5174f5..4d2fa5e97 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md @@ -13,7 +13,7 @@ if it is composed of multiple separate paths. ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -24,7 +24,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -59,13 +59,13 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -76,20 +76,20 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -188,7 +188,7 @@ cumulative rotation from the node's parent containers. ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> > `set` **stroke**(`stroke`): `void` @@ -202,13 +202,13 @@ for backward compatibility. Throws if another type is provided. #### Returns -`undefined` \| `Readonly`\<[`Stroke`](../interfaces/Stroke.md)\> +`undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> --- ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -216,7 +216,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -234,7 +234,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -248,7 +248,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -283,7 +283,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -295,7 +295,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> #### Inherited from @@ -305,7 +305,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -319,7 +319,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Inherited from 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 71bb1b284..dfc68ae20 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/TextNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/TextNode.md @@ -12,7 +12,7 @@ A TextNode represents a text object in the scenegraph. ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -23,7 +23,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -48,7 +48,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -58,13 +58,13 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -75,20 +75,20 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -225,7 +225,7 @@ The horizontal text alignment of the text node. Alignment is always the same acr ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -233,7 +233,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -251,7 +251,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -265,7 +265,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -300,7 +300,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -312,7 +312,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> #### Inherited from @@ -322,7 +322,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -336,7 +336,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md b/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md index 99acfd2fc..1ae1046f2 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md @@ -12,7 +12,7 @@ An UnknownNode is a node with limited support and therefore treated as a leaf no ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -23,7 +23,7 @@ The children of a Node are always other Node classes (never the more minimal Bas #### Returns -`Readonly`\<`Iterable`\<[`Node`](Node.md)\>\> +`Readonly`<`Iterable`<[`Node`](Node.md)\>\> --- @@ -48,7 +48,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`\<`Rect`\> +> `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -58,13 +58,13 @@ even for an orphan node with no parent. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -75,20 +75,20 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -187,7 +187,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -195,7 +195,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -213,7 +213,7 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by @@ -227,7 +227,7 @@ setting translation directly. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -262,7 +262,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`\<`Rect`\> +> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -274,7 +274,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> #### Inherited from @@ -284,7 +284,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -298,7 +298,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> #### Inherited from diff --git a/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md b/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md index dc7c54493..75a0ae34a 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md @@ -23,7 +23,7 @@ Some VisualNodes might have a non-visual parent such as a PageNode. ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`BaseNode`](BaseNode.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -35,13 +35,13 @@ to guarantee all their children are full-fledged Node instances. #### Returns -`Readonly`\<`Iterable`\<[`BaseNode`](BaseNode.md)\>\> +`Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -52,20 +52,20 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -101,7 +101,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -109,7 +109,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- @@ -144,7 +144,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](../interfaces/Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -158,7 +158,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](../interfaces/Point.md)\> +`Readonly`<[`Point`](../interfaces/Point.md)\> --- diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md b/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md index 829e455ea..7a436ed20 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md @@ -17,7 +17,7 @@ more minimal VisualNode (such as Artboard). ### allChildren -> `get` **allChildren**(): `Readonly`\<`Iterable`\<[`BaseNode`](../classes/BaseNode.md)\>\> +> `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](../classes/BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -29,13 +29,13 @@ to guarantee all their children are full-fledged Node instances. #### Returns -`Readonly`\<`Iterable`\<[`BaseNode`](../classes/BaseNode.md)\>\> +`Readonly`<`Iterable`<[`BaseNode`](../classes/BaseNode.md)\>\> --- ### boundsLocal -> `get` **boundsLocal**(): `Readonly`\<`Rect`\> +> `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -46,32 +46,32 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. #### Returns -`Readonly`\<`Rect`\> +`Readonly`<`Rect`\> --- ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`\<[`Point`](Point.md)\> +> `get` **centerPointLocal**(): `Readonly`<[`Point`](Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. #### Returns -`Readonly`\<[`Point`](Point.md)\> +`Readonly`<[`Point`](Point.md)\> --- ### children -> `get` **children**(): [`ItemList`](../classes/ItemList.md)\<[`Node`](../classes/Node.md)\> +> `get` **children**(): [`ItemList`](../classes/ItemList.md)<[`Node`](../classes/Node.md)\> The node's children. Use the methods on this ItemList object to get, add, and remove children. #### Returns -[`ItemList`](../classes/ItemList.md)\<[`Node`](../classes/Node.md)\> +[`ItemList`](../classes/ItemList.md)<[`Node`](../classes/Node.md)\> --- @@ -107,7 +107,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`\<[`Point`](Point.md)\> +> `get` **topLeftLocal**(): `Readonly`<[`Point`](Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -115,7 +115,7 @@ boundsInParent. #### Returns -`Readonly`\<[`Point`](Point.md)\> +`Readonly`<[`Point`](Point.md)\> --- @@ -150,7 +150,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`\<[`Point`](Point.md)\> +> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](../classes/VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -164,7 +164,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Returns -`Readonly`\<[`Point`](Point.md)\> +`Readonly`<[`Point`](Point.md)\> #### Inherited from 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 2154ae0ae..9b0cf1628 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 @@ -44,6 +44,12 @@ Re-exports [StrokePosition](../../enumerations/StrokePosition.md) --- +### StrokeType + +Re-exports [StrokeType](../../enumerations/StrokeType.md) + +--- + ### TextAlignment Re-exports [TextAlignment](../../enumerations/TextAlignment.md) diff --git a/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md b/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md index 64cc91ee7..1afe19393 100644 --- a/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md +++ b/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md @@ -2,6 +2,6 @@ # Type alias: SolidColorStrokeWithOptionalType -> **SolidColorStrokeWithOptionalType**: `Omit`\<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\> & `Partial`\<`Pick`\<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\>\> +> **SolidColorStrokeWithOptionalType**: `Omit`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\> & `Partial`<`Pick`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\>\> SolidColorStroke with 'type' property as optional. From 95c5368db68cbc576cc76d7b523a5aded0e6a632 Mon Sep 17 00:00:00 2001 From: Abhishek Das Date: Tue, 10 Sep 2024 08:43:21 +0530 Subject: [PATCH 4/8] Revert indentation in API signatures --- README.md | 24 ++++-- gatsby-config.js | 10 +++ .../document-apis/classes/ArtboardList.md | 22 ++--- .../document-apis/classes/ArtboardNode.md | 30 +++---- .../document-apis/classes/BaseNode.md | 10 +-- .../document-apis/classes/ColorUtils.md | 8 +- .../document-apis/classes/ComplexShapeNode.md | 58 ++++++------- .../document-apis/classes/Context.md | 12 +-- .../document-apis/classes/Editor.md | 28 +++--- .../document-apis/classes/EllipseNode.md | 66 +++++++------- .../document-apis/classes/ExpressRootNode.md | 12 +-- .../document-apis/classes/FillableNode.md | 58 ++++++------- .../document-apis/classes/GridLayoutNode.md | 58 ++++++------- .../document-apis/classes/GroupNode.md | 56 ++++++------ .../classes/ImageRectangleNode.md | 54 ++++++------ .../document-apis/classes/ItemList.md | 30 +++---- .../document-apis/classes/LineNode.md | 80 ++++++++--------- .../classes/MediaContainerNode.md | 56 ++++++------ .../document-apis/classes/Node.md | 50 +++++------ .../document-apis/classes/PageList.md | 22 ++--- .../document-apis/classes/PageNode.md | 22 ++--- .../document-apis/classes/PathNode.md | 64 +++++++------- .../document-apis/classes/ReadOnlyItemList.md | 14 +-- .../document-apis/classes/RectangleNode.md | 86 +++++++++---------- .../classes/RestrictedItemList.md | 20 ++--- .../classes/SolidColorShapeNode.md | 54 ++++++------ .../document-apis/classes/StrokableNode.md | 54 ++++++------ .../document-apis/classes/StrokeShapeNode.md | 54 ++++++------ .../document-apis/classes/TextNode.md | 58 ++++++------- .../document-apis/classes/UnknownNode.md | 50 +++++------ .../document-apis/classes/VisualNode.md | 20 ++--- .../enumerations/ArrowHeadType.md | 16 ++-- .../document-apis/enumerations/BlendMode.md | 34 ++++---- .../document-apis/enumerations/FillRule.md | 4 +- .../document-apis/enumerations/FillType.md | 2 +- .../enumerations/SceneNodeType.md | 34 ++++---- .../enumerations/StrokePosition.md | 6 +- .../document-apis/enumerations/StrokeType.md | 2 +- .../enumerations/TextAlignment.md | 6 +- .../document-apis/interfaces/BitmapImage.md | 4 +- .../document-apis/interfaces/Color.md | 8 +- .../document-apis/interfaces/ColorFill.md | 4 +- .../document-apis/interfaces/ContainerNode.md | 22 ++--- .../document-apis/interfaces/Fill.md | 2 +- .../document-apis/interfaces/IFillableNode.md | 2 +- .../interfaces/IRectangularNode.md | 4 +- .../interfaces/IStrokableNode.md | 2 +- .../document-apis/interfaces/Point.md | 4 +- .../interfaces/RectangleGeometry.md | 4 +- .../interfaces/SolidColorStroke.md | 12 +-- .../document-apis/interfaces/Stroke.md | 2 +- .../SolidColorStrokeWithOptionalType.md | 2 +- 52 files changed, 718 insertions(+), 698 deletions(-) diff --git a/README.md b/README.md index 1c1ba742d..93954abb3 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,21 @@ This section outlines the steps that should be taken to format the generated Doc 1. **Search** and **Replace** again across files to change the auto-generated HLAPI docs headings from `@express-document-sdk` –> to `@express-document-sdk`. -2. Replace all \`mat2d\` --> \[\`mat2d\`\]\(https://glmatrix.net/docs/module-mat2d.html\) +2. The heading in the generated `classes`, `enumerations`, `interfaces`, `namespaces`, and `type-aliases` is not required. So, find and remove all occurrences of: -3. Fix any `[iterator]` links to remove the brackets from the link references to ensure they work. For instance: `ArtboardList.md#%5Biterator%5D` should be `ArtboardList.md#iterator`. To fix, use Search again with a regex string of `.md#%5Biterator%5D` and replace with `.md#iterator`. + ```md + [**@express-document-sdk**](../overview.md) • **Docs** + + --- + ``` + +3. The API signatures generated in `classes`, `enumerations`, `interfaces`, `namespaces`, and `type-aliases` is indented. In these directories, find and replace all occurrences of `>` + space with `•` + space. + +4. Find and replace all \`mat2d\` --> \[\`mat2d\`\]\(https://glmatrix.net/docs/module-mat2d.html\) + +5. Fix any `[iterator]` links to remove the brackets from the link references to ensure they work. For instance: `ArtboardList.md#%5Biterator%5D` should be `ArtboardList.md#iterator`. To fix, use Search again with a regex string of `.md#%5Biterator%5D` and replace with `.md#iterator`. -4. Find and remove all ocurrences of `TemplatizedProxyLiveObject`. An example is of `ReadOnlyItemList.md`, where you should remove the following section: +6. Find and remove all occurrences of `TemplatizedProxyLiveObject`. An example is of `ReadOnlyItemList.md`, where you should remove the following section: ```md ## Extends @@ -24,7 +34,7 @@ This section outlines the steps that should be taken to format the generated Doc - `TemplatizedProxyLiveObject`<`HzApiInputType`\> ``` -5. Find and remove all ocurrences of `ProxyLiveObject`. An example is of `BaseNode.md`, where you should remove the following section: +7. Find and remove all occurrences of `ProxyLiveObject`. An example is of `BaseNode.md`, where you should remove the following section: ```md ## Extends @@ -32,11 +42,11 @@ This section outlines the steps that should be taken to format the generated Doc - `ProxyLiveObject` ``` -6. Add a blank line after any `InlineAlert` in the Enums to render them properly. _(This can be easily fixed in the hz repo)_ +8. Add a blank line after any `InlineAlert` in the Enums to render them properly. _(This can be easily fixed in the hz repo)_ -7. Ensure any lists are surrounded by one blank line so the linter in the PR job doesn't complain. See **Context**, **Editor** classes specifically such as the `makeStroke` method which has a list. (Note: you can check the PR validation job to see if you missed any). _(This can be easily fixed in the hz repo)_ +9. Ensure any lists are surrounded by one blank line so the linter in the PR job doesn't complain. See **Context**, **Editor** classes specifically such as the `makeStroke` method which has a list. (Note: you can check the PR validation job to see if you missed any). _(This can be easily fixed in the hz repo)_ -8. Find and replace `\<` with `<` for all `.md` files. +10. Find and replace `\<` with `<` for all `.md` files. ## Adobe I/O Documentation Template Info diff --git a/gatsby-config.js b/gatsby-config.js index fd70f12e2..2ab7dee74 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -338,6 +338,16 @@ module.exports = { }, ], }, + { + title: "Types", + path: "references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md", + pages: [ + { + title: "SolidColorStrokeWithOptionalType", + path: "references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md", + }, + ], + }, { title: "Concepts", path: "references/document-sandbox/document-apis/concepts/index.md", diff --git a/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md b/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md index 07c7eec0d..21ee0c187 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md @@ -16,7 +16,7 @@ remove the last remaining artboard from the list. ### first -> `get` **first**(): `undefined` \| `T` +• `get` **first**(): `undefined` \| `T` First item in this list, or undefined if list is empty. @@ -28,7 +28,7 @@ First item in this list, or undefined if list is empty. ### last -> `get` **last**(): `undefined` \| `T` +• `get` **last**(): `undefined` \| `T` Last item in this list, or undefined if list is empty. @@ -40,7 +40,7 @@ Last item in this list, or undefined if list is empty. ### length -> `get` **length**(): `number` +• `get` **length**(): `number` Number of items in this list. @@ -52,7 +52,7 @@ Number of items in this list. ### `[iterator]`() -> **\[iterator\]**(): `Iterator`<[`ArtboardNode`](ArtboardNode.md), `any`, `undefined`\> +• **\[iterator\]**(): `Iterator`<[`ArtboardNode`](ArtboardNode.md), `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. @@ -68,7 +68,7 @@ Iterates over all the items in this list. Mutations that occur mid-iteration are ### addArtboard() -> **addArtboard**(): [`ArtboardNode`](ArtboardNode.md) +• **addArtboard**(): [`ArtboardNode`](ArtboardNode.md) Create a new artboard and add it to the end of the list. The artboard size is the same as others on this page. The artboard background is set to default fill color DEFAULT_ARTBOARD_FILL_COLOR. The new artboard becomes the @@ -85,7 +85,7 @@ the newly added artboard. ### indexOf() -> **indexOf**(`item`): `number` +• **indexOf**(`item`): `number` Get index of item in list. @@ -107,7 +107,7 @@ index number, or -1 if item isn't in this list. ### item() -> **item**(`index`): `undefined` \| [`ArtboardNode`](ArtboardNode.md) +• **item**(`index`): `undefined` \| [`ArtboardNode`](ArtboardNode.md) Returns item at the given index, or undefined if index is out of range. @@ -129,7 +129,7 @@ Zero-based index ### moveAfter() -> **moveAfter**(`item`, `after`): `void` +• **moveAfter**(`item`, `after`): `void` Move `item` so it is immediately after `after` in this list: places `item` at the index one higher than `after`. Depending on the position in the list `item` originally occupied, some other items in the list may shift to higher @@ -157,7 +157,7 @@ An error if either argument is not contained in this list. ### moveBefore() -> **moveBefore**(`item`, `before`): `void` +• **moveBefore**(`item`, `before`): `void` Move `item` so it is immediately before `before` in this list: places `item` at the index that `before` used to occupy. Depending on the position in the list `item` originally occupied, some other items in the list may @@ -185,7 +185,7 @@ An error if either argument is not contained in this list. ### remove() -> **remove**(...`items`): `void` +• **remove**(...`items`): `void` Remove the items from the list. The items need not be contiguous. @@ -209,7 +209,7 @@ If any of the items are not in the list, or if it is illegal to remove any of th ### toArray() -> **toArray**(): readonly [`ArtboardNode`](ArtboardNode.md)[] +• **toArray**(): readonly [`ArtboardNode`](ArtboardNode.md)[] All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md b/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md index cdccefce1..115d3a5f0 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md @@ -19,7 +19,7 @@ When multiple artboards exist on a page, the artboards represent "scenes" in a l ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -36,7 +36,7 @@ The children of an Artboard are always other Node classes (never the more minima ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -53,7 +53,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -66,7 +66,7 @@ box. ### children -> `get` **children**(): [`ItemList`](ItemList.md)<[`Node`](Node.md)\> +• `get` **children**(): [`ItemList`](ItemList.md)<[`Node`](Node.md)\> The node's children. Use the methods on this ItemList object to get, add, and remove children. @@ -78,9 +78,9 @@ The node's children. Use the methods on this ItemList object to get, add, and re ### fill -> `get` **fill**(): `Readonly`<[`Fill`](../interfaces/Fill.md)\> +• `get` **fill**(): `Readonly`<[`Fill`](../interfaces/Fill.md)\> -> `set` **fill**(`fill`): `void` +• `set` **fill**(`fill`): `void` The background fill of the artboard. Artboards must always have a fill. @@ -96,7 +96,7 @@ The background fill of the artboard. Artboards must always have a fill. ### height -> `get` **height**(): `number` +• `get` **height**(): `number` The height of the artboard. @@ -108,7 +108,7 @@ The height of the artboard. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -121,7 +121,7 @@ moved to a different part of the document. ### parent -> `get` **parent**(): `undefined` \| [`PageNode`](PageNode.md) +• `get` **parent**(): `undefined` \| [`PageNode`](PageNode.md) The node's parent. Undefined if the node is an orphan. @@ -133,7 +133,7 @@ The node's parent. Undefined if the node is an orphan. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -147,7 +147,7 @@ boundsInParent. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -159,7 +159,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -176,7 +176,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### width -> `get` **width**(): `number` +• `get` **width**(): `number` The width of the artboard. @@ -188,7 +188,7 @@ The width of the artboard. ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -216,7 +216,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. diff --git a/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md b/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md index f4e80cbcd..fcd723f7c 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md @@ -17,7 +17,7 @@ properties. ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -35,7 +35,7 @@ to guarantee all their children are full-fledged Node instances. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -48,7 +48,7 @@ moved to a different part of the document. ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -65,7 +65,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -77,7 +77,7 @@ The node's type. ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ColorUtils.md b/src/pages/references/document-sandbox/document-apis/classes/ColorUtils.md index 60c6cbf20..b2201ef80 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ColorUtils.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ColorUtils.md @@ -8,7 +8,7 @@ Utility methods for working with color values. ### fromHex() -> **fromHex**(`hex`): [`Color`](../interfaces/Color.md) +• **fromHex**(`hex`): [`Color`](../interfaces/Color.md) Create a new color from its equivalent RGBA hex representation. Can specify in 6 digits (RRGGBB) or 8 digits (RRGGBBAA), uppercase or lowercase, with or without leading "#". Alpha defaults to FF (100% opaque) if ommitted. @@ -35,7 +35,7 @@ if the hex string cannot be parsed. #### fromRGB(red, green, blue, alpha) -> **fromRGB**(`red`, `green`, `blue`, `alpha`?): [`Color`](../interfaces/Color.md) +• **fromRGB**(`red`, `green`, `blue`, `alpha`?): [`Color`](../interfaces/Color.md) Create a new color object with the given RGBA values. @@ -65,7 +65,7 @@ A new color object. #### fromRGB(color) -> **fromRGB**(`color`): [`Color`](../interfaces/Color.md) +• **fromRGB**(`color`): [`Color`](../interfaces/Color.md) Create a new color object given a partial color object where the alpha field may be missing. @@ -93,7 +93,7 @@ A new color object with all fields present. ### toHex() -> **toHex**(`color`): `string` +• **toHex**(`color`): `string` Get the color in 8-digit hex "#RRGGBBAA" format. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md b/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md index de02cbf6a..43fab8276 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md @@ -13,7 +13,7 @@ of multiple separate paths. ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -30,12 +30,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -65,7 +65,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -82,7 +82,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -95,9 +95,9 @@ box. ### fill -> `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> +• `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> -> `set` **fill**(`fill`): `void` +• `set` **fill**(`fill`): `void` The fill applied to the shape, if any. @@ -113,7 +113,7 @@ The fill applied to the shape, if any. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -126,12 +126,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -145,11 +145,11 @@ cannot be edited by the user unless they are unlocked first. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -163,7 +163,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -180,7 +180,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -193,7 +193,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -206,9 +206,9 @@ cumulative rotation from the node's parent containers. ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -> `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -226,7 +226,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -240,7 +240,7 @@ boundsInParent. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -252,13 +252,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -272,7 +272,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -284,7 +284,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -301,7 +301,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -323,7 +323,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -347,7 +347,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -368,7 +368,7 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -406,7 +406,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already diff --git a/src/pages/references/document-sandbox/document-apis/classes/Context.md b/src/pages/references/document-sandbox/document-apis/classes/Context.md index 962e38d91..3f1cb4565 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/Context.md +++ b/src/pages/references/document-sandbox/document-apis/classes/Context.md @@ -8,7 +8,7 @@ Contains the user's current selection state, indicating the content they are foc ### currentPage -> `get` **currentPage**(): [`PageNode`](PageNode.md) +• `get` **currentPage**(): [`PageNode`](PageNode.md) #### Returns @@ -20,7 +20,7 @@ The currently viewed page. ### hasSelection -> `get` **hasSelection**(): `boolean` +• `get` **hasSelection**(): `boolean` #### Returns @@ -32,7 +32,7 @@ false if the current editable selection does not contain any nodes, otherwise tr ### insertionParent -> `get` **insertionParent**(): [`ContainerNode`](../interfaces/ContainerNode.md) +• `get` **insertionParent**(): [`ContainerNode`](../interfaces/ContainerNode.md) #### Returns @@ -46,9 +46,9 @@ other UI state. ### selection -> `get` **selection**(): readonly [`Node`](Node.md)[] +• `get` **selection**(): readonly [`Node`](Node.md)[] -> `set` **selection**(`nodes`): `void` +• `set` **selection**(`nodes`): `void` Sets the current selection, automatically ensuring these rules are met: @@ -70,7 +70,7 @@ the current selection. Nodes that are locked or otherwise non-editable are never ### selectionIncludingNonEditable -> `get` **selectionIncludingNonEditable**(): readonly [`Node`](Node.md)[] +• `get` **selectionIncludingNonEditable**(): readonly [`Node`](Node.md)[] #### Returns diff --git a/src/pages/references/document-sandbox/document-apis/classes/Editor.md b/src/pages/references/document-sandbox/document-apis/classes/Editor.md index 8e9f27db6..5bb53e016 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/Editor.md +++ b/src/pages/references/document-sandbox/document-apis/classes/Editor.md @@ -8,7 +8,7 @@ Entry point for APIs that read or modify the document's content. ### context -> `get` **context**(): [`Context`](Context.md) +• `get` **context**(): [`Context`](Context.md) User's current selection context @@ -20,7 +20,7 @@ User's current selection context ### documentRoot -> `get` **documentRoot**(): [`ExpressRootNode`](ExpressRootNode.md) +• `get` **documentRoot**(): [`ExpressRootNode`](ExpressRootNode.md) #### Returns @@ -32,7 +32,7 @@ the root of the document. ### createEllipse() -> **createEllipse**(): [`EllipseNode`](EllipseNode.md) +• **createEllipse**(): [`EllipseNode`](EllipseNode.md) #### Returns @@ -45,7 +45,7 @@ Transform values default to 0. ### createGroup() -> **createGroup**(): [`GroupNode`](GroupNode.md) +• **createGroup**(): [`GroupNode`](GroupNode.md) #### Returns @@ -57,7 +57,7 @@ a group node. ### createImageContainer() -> **createImageContainer**(`bitmapData`, `options`): [`MediaContainerNode`](MediaContainerNode.md) +• **createImageContainer**(`bitmapData`, `options`): [`MediaContainerNode`](MediaContainerNode.md) Creates a bitmap image, represented as a multi-node MediaContainerNode structure. Always creates a "full-frame," uncropped image initially, but cropping can be changed after it is created by modifying the properties of the @@ -91,7 +91,7 @@ MediaContainerNode representing the top container node of the multi-node structu ### createLine() -> **createLine**(): [`LineNode`](LineNode.md) +• **createLine**(): [`LineNode`](LineNode.md) #### Returns @@ -104,7 +104,7 @@ Transform values default to 0. ### createPath() -> **createPath**(`path`): [`PathNode`](PathNode.md) +• **createPath**(`path`): [`PathNode`](PathNode.md) #### Parameters @@ -125,7 +125,7 @@ a path node with a default stroke and no initial fill. ### createRectangle() -> **createRectangle**(): [`RectangleNode`](RectangleNode.md) +• **createRectangle**(): [`RectangleNode`](RectangleNode.md) #### Returns @@ -138,7 +138,7 @@ Transform values default to 0. ### createText() -> **createText**(): [`TextNode`](TextNode.md) +• **createText**(): [`TextNode`](TextNode.md) #### Returns @@ -152,7 +152,7 @@ adjust to accommodate whatever text is set. ### loadBitmapImage() -> **loadBitmapImage**(`bitmapData`): `Promise`<[`BitmapImage`](../interfaces/BitmapImage.md)\> +• **loadBitmapImage**(`bitmapData`): `Promise`<[`BitmapImage`](../interfaces/BitmapImage.md)\> Creates a bitmap image resource in the document, which can be displayed in the scenegraph by passing it to [createImageContainer](Editor.md#createimagecontainer) to create a MediaContainerNode. The same BitmapImage can be used to create multiple MediaContainerNodes. @@ -178,7 +178,7 @@ Encoded image data in PNG or JPEG format. ### makeColorFill() -> **makeColorFill**(`color`): [`ColorFill`](../interfaces/ColorFill.md) +• **makeColorFill**(`color`): [`ColorFill`](../interfaces/ColorFill.md) Convenience helper to create a complete ColorFill value given just its color. @@ -196,7 +196,7 @@ The color to use for the fill. ### makeStroke() -> **makeStroke**(`options`?): [`SolidColorStroke`](../interfaces/SolidColorStroke.md) +• **makeStroke**(`options`?): [`SolidColorStroke`](../interfaces/SolidColorStroke.md) Convenience helper to create a complete SolidColorStroke value given just a subset of its fields. All other fields are populated with default values. @@ -226,7 +226,7 @@ a stroke configured with the given options. ### queueAsyncEdit() -> **queueAsyncEdit**(`lambda`): `Promise`<`void`\> +• **queueAsyncEdit**(`lambda`): `Promise`<`void`\> Enqueues a function to be run at a later time when edits to the user's document may be performed. You can always edit the document immediately when invoked in response to your add-on's UI code. However, if you delay to await an @@ -252,7 +252,7 @@ async function insertImage(blob) { // Execution doesn't arrive at this line until an async delay, due to the Promise 'await' above // Further edits need to be queued to run at a safe time - editor.queueAsyncEdit(() => { + editor.queueAsyncEdit(() =• { // Create scenenode to display the image, and add it to the current artboard const mediaContainer = editor.createImageContainer(bitmapImage); editor.context.insertionParent.children.append(mediaContainer); diff --git a/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md b/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md index c0f814164..4444dbd6a 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md @@ -12,7 +12,7 @@ An EllipseNode represents an ellipse object in the scenegraph. ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -29,12 +29,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -48,7 +48,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -64,7 +64,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -81,7 +81,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -94,9 +94,9 @@ box. ### fill -> `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> +• `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> -> `set` **fill**(`fill`): `void` +• `set` **fill**(`fill`): `void` The fill applied to the shape, if any. @@ -112,7 +112,7 @@ The fill applied to the shape, if any. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -125,12 +125,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -144,11 +144,11 @@ cannot be edited by the user unless they are unlocked first. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -162,7 +162,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -179,7 +179,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -192,7 +192,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -205,11 +205,11 @@ cumulative rotation from the node's parent containers. ### rx -> `get` **rx**(): `number` +• `get` **rx**(): `number` The radius of the ellipse on the x-axis. -> `set` **rx**(`value`): `void` +• `set` **rx**(`value`): `void` Set the ellipse radius on the x-axis. Must be at least MIN_DIMENSION / 2. @@ -226,11 +226,11 @@ Must be at least MIN_DIMENSION / 2. ### ry -> `get` **ry**(): `number` +• `get` **ry**(): `number` The radius of the ellipse on the y-axis. -> `set` **ry**(`value`): `void` +• `set` **ry**(`value`): `void` Set the ellipse radius on the y-axis. Must be at least MIN_DIMENSION / 2. @@ -247,9 +247,9 @@ Must be at least MIN_DIMENSION / 2. ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -> `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -267,7 +267,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -281,7 +281,7 @@ boundsInParent. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -293,13 +293,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -313,7 +313,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -325,7 +325,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -342,7 +342,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -364,7 +364,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -388,7 +388,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -409,7 +409,7 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -447,7 +447,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already diff --git a/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md b/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md index 939de6049..a3d8be043 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md @@ -16,7 +16,7 @@ The parent of ExpressRootNode is undefined, since it is the root of the document ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -34,7 +34,7 @@ to guarantee all their children are full-fledged Node instances. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -47,7 +47,7 @@ moved to a different part of the document. ### pages -> `get` **pages**(): [`PageList`](PageList.md) +• `get` **pages**(): [`PageList`](PageList.md) The pages of the document. All visual content is contained on artboards within the pages. @@ -59,7 +59,7 @@ The pages of the document. All visual content is contained on artboards within t ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -76,7 +76,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -88,7 +88,7 @@ The node's type. ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. diff --git a/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md b/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md index 001822825..69e18546a 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md @@ -23,7 +23,7 @@ Base class for a Node that can have its own fill and stroke. ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -40,12 +40,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -59,7 +59,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -75,7 +75,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -92,7 +92,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -105,9 +105,9 @@ box. ### fill -> `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> +• `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> -> `set` **fill**(`fill`): `void` +• `set` **fill**(`fill`): `void` The fill applied to the shape, if any. @@ -123,7 +123,7 @@ The fill applied to the shape, if any. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -136,12 +136,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -155,11 +155,11 @@ cannot be edited by the user unless they are unlocked first. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -173,7 +173,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -190,7 +190,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -203,7 +203,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -216,9 +216,9 @@ cumulative rotation from the node's parent containers. ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -> `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -236,7 +236,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -250,7 +250,7 @@ boundsInParent. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -262,13 +262,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -282,7 +282,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -294,7 +294,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -311,7 +311,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -333,7 +333,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -357,7 +357,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -378,7 +378,7 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -416,7 +416,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already diff --git a/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md b/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md index 51648d408..430cbdba4 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md @@ -17,7 +17,7 @@ a layout grid that other content can be placed into. ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -34,12 +34,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -53,7 +53,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -69,7 +69,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -86,7 +86,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -99,9 +99,9 @@ box. ### fill -> `get` **fill**(): `Readonly`<[`Fill`](../interfaces/Fill.md)\> +• `get` **fill**(): `Readonly`<[`Fill`](../interfaces/Fill.md)\> -> `set` **fill**(`fill`): `void` +• `set` **fill**(`fill`): `void` The background fill of the GridLayout. @@ -117,7 +117,7 @@ The background fill of the GridLayout. ### height -> `get` **height**(): `number` +• `get` **height**(): `number` The height of the node. @@ -129,7 +129,7 @@ The height of the node. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -142,12 +142,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -161,11 +161,11 @@ cannot be edited by the user unless they are unlocked first. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -179,7 +179,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -196,7 +196,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -209,7 +209,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -222,7 +222,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -236,7 +236,7 @@ boundsInParent. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -248,13 +248,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -268,7 +268,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -280,7 +280,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -297,7 +297,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### width -> `get` **width**(): `number` +• `get` **width**(): `number` The width of the node. @@ -309,7 +309,7 @@ The width of the node. ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -331,7 +331,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -355,7 +355,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -376,7 +376,7 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -414,7 +414,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already diff --git a/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md b/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md index be5c45de3..29e08a3e9 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md @@ -17,7 +17,7 @@ optional vector mask child. ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -34,12 +34,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -53,7 +53,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -69,7 +69,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> Note: If this group has a maskShape, group's bounds are always identical to the maskShape's, regardless of the group's other content. @@ -82,7 +82,7 @@ group's other content. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -95,7 +95,7 @@ box. ### children -> `get` **children**(): [`ItemList`](ItemList.md)<[`Node`](Node.md)\> +• `get` **children**(): [`ItemList`](ItemList.md)<[`Node`](Node.md)\> The Group's regular children. Does not include the maskShape if one is present. Use the methods on this ItemList object to get, add, and remove children. @@ -108,7 +108,7 @@ Use the methods on this ItemList object to get, add, and remove children. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -121,12 +121,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -140,12 +140,12 @@ cannot be edited by the user unless they are unlocked first. ### maskShape -> `get` **maskShape**(): `undefined` \| [`FillableNode`](FillableNode.md) +• `get` **maskShape**(): `undefined` \| [`FillableNode`](FillableNode.md) A vector shape that acts as a clipping mask for the content of this group. The mask node is separate from the Group's generic 'children' collection, though both are part of the overall 'allChildren' of this Group. -> `set` **maskShape**(`mask`): `void` +• `set` **maskShape**(`mask`): `void` If set to a vector shape, adds a mask or replaces the existing mask on this Group. If set to undefined, removes any mask that was previously set on this Group. @@ -168,11 +168,11 @@ undefined if no mask is set on this group. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -186,7 +186,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -203,7 +203,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -216,7 +216,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -229,7 +229,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -243,7 +243,7 @@ boundsInParent. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -255,13 +255,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -275,7 +275,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -287,7 +287,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -304,7 +304,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -326,7 +326,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -354,7 +354,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -379,7 +379,7 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -417,7 +417,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already diff --git a/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md b/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md index 37cdf25d5..7885828a7 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md @@ -18,7 +18,7 @@ shape sibling node). ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -35,12 +35,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -54,7 +54,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -70,7 +70,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -87,7 +87,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -100,7 +100,7 @@ box. ### height -> `get` **height**(): `number` +• `get` **height**(): `number` Current height of the "full frame" image rectangle, which may not be fully visible due to cropping/clipping by the enclosing media container's maskShape. This size may be different from the original bitmap's size in pixels, but @@ -114,7 +114,7 @@ will always match its aspect ratio. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -127,12 +127,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -146,11 +146,11 @@ cannot be edited by the user unless they are unlocked first. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -164,7 +164,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -181,7 +181,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -194,7 +194,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -207,7 +207,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -221,7 +221,7 @@ boundsInParent. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -233,13 +233,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -253,7 +253,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -265,7 +265,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -282,7 +282,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### width -> `get` **width**(): `number` +• `get` **width**(): `number` Current width of the "full frame" image rectangle, which may not be fully visible due to cropping/clipping by the enclosing media container's maskShape. This size may be different from the original bitmap's size in pixels, but @@ -296,7 +296,7 @@ will always match its aspect ratio. ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -318,7 +318,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -342,7 +342,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -363,7 +363,7 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -401,7 +401,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already diff --git a/src/pages/references/document-sandbox/document-apis/classes/ItemList.md b/src/pages/references/document-sandbox/document-apis/classes/ItemList.md index 2f8310090..35cd1449f 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ItemList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ItemList.md @@ -22,7 +22,7 @@ This class is used in different places for various types of items, including Nod ### first -> `get` **first**(): `undefined` \| `T` +• `get` **first**(): `undefined` \| `T` First item in this list, or undefined if list is empty. @@ -34,7 +34,7 @@ First item in this list, or undefined if list is empty. ### last -> `get` **last**(): `undefined` \| `T` +• `get` **last**(): `undefined` \| `T` Last item in this list, or undefined if list is empty. @@ -46,7 +46,7 @@ Last item in this list, or undefined if list is empty. ### length -> `get` **length**(): `number` +• `get` **length**(): `number` Number of items in this list. @@ -58,7 +58,7 @@ Number of items in this list. ### `[iterator]`() -> **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> +• **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. @@ -74,7 +74,7 @@ Iterates over all the items in this list. Mutations that occur mid-iteration are ### append() -> **append**(...`items`): `void` +• **append**(...`items`): `void` Add one or more items to the end of the list. The last argument will become the last item in this list. Items are removed from their previous parent, if any – or if an item is already in _this_ list, its index is simply changed. @@ -91,7 +91,7 @@ removed from their previous parent, if any – or if an item is already in _this ### clear() -> **clear**(): `void` +• **clear**(): `void` Remove all items from this list. No-op if list is already empty. @@ -103,7 +103,7 @@ Remove all items from this list. No-op if list is already empty. ### indexOf() -> **indexOf**(`item`): `number` +• **indexOf**(`item`): `number` Get index of item in list. @@ -125,7 +125,7 @@ index number, or -1 if item isn't in this list. ### insertAfter() -> **insertAfter**(`newItem`, `after`): `void` +• **insertAfter**(`newItem`, `after`): `void` Insert `newItem` so it is immediately after `after` in this list: places `newItem` at the index one higher than `after`, shifting all later items to higher indices (the index of `after` remains unchanged). `newItem` is removed from its previous parent, @@ -145,7 +145,7 @@ if any – or if it's already in _this_ list, its index is simply changed. No-op ### insertBefore() -> **insertBefore**(`newItem`, `before`): `void` +• **insertBefore**(`newItem`, `before`): `void` Insert `newItem` so it is immediately before `before` in this list: places `newItem` at the index that `before` used to occupy, shifting `before` and all later items to higher indices. `newItem` is removed from its previous parent, @@ -165,7 +165,7 @@ if any – or if it's already in _this_ list, its index is simply changed. No-op ### item() -> **item**(`index`): `undefined` \| `T` +• **item**(`index`): `undefined` \| `T` Returns item at the given index, or undefined if index is out of range. @@ -187,7 +187,7 @@ Zero-based index ### moveAfter() -> **moveAfter**(`item`, `after`): `void` +• **moveAfter**(`item`, `after`): `void` Move `item` so it is immediately after `after` in this list: places `item` at the index one higher than `after`. Depending on the position in the list `item` originally occupied, some other items in the list may shift to higher @@ -215,7 +215,7 @@ An error if either argument is not contained in this list. ### moveBefore() -> **moveBefore**(`item`, `before`): `void` +• **moveBefore**(`item`, `before`): `void` Move `item` so it is immediately before `before` in this list: places `item` at the index that `before` used to occupy. Depending on the position in the list `item` originally occupied, some other items in the list may @@ -243,7 +243,7 @@ An error if either argument is not contained in this list. ### remove() -> **remove**(...`items`): `void` +• **remove**(...`items`): `void` Remove the items from the list. The items need not be contiguous. @@ -267,7 +267,7 @@ If any of the items are not in the list, or if it is illegal to remove any of th ### replace() -> **replace**(`oldItem`, `newItem`): `void` +• **replace**(`oldItem`, `newItem`): `void` Replace `oldItem` with `newItem` in this list. Throws if `oldItem` is not a member of this list. `newItem` is removed from its previous parent, if any – or if it's already in _this_ list, its index is simply @@ -287,7 +287,7 @@ changed. No-op if both arguments are the same item. ### toArray() -> **toArray**(): readonly `T`[] +• **toArray**(): readonly `T`[] All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. diff --git a/src/pages/references/document-sandbox/document-apis/classes/LineNode.md b/src/pages/references/document-sandbox/document-apis/classes/LineNode.md index 9937fbafc..fdf23a26b 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/LineNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/LineNode.md @@ -12,31 +12,31 @@ A LineNode represents a simple line object in the scenegraph – a single straig ### DEFAULT_END_X -> `static` `readonly` **DEFAULT_END_X**: `100` = `100` +• `static` `readonly` **DEFAULT_END_X**: `100` = `100` --- ### DEFAULT_END_Y -> `static` `readonly` **DEFAULT_END_Y**: `100` = `100` +• `static` `readonly` **DEFAULT_END_Y**: `100` = `100` --- ### DEFAULT_START_X -> `static` `readonly` **DEFAULT_START_X**: `0` = `0` +• `static` `readonly` **DEFAULT_START_X**: `0` = `0` --- ### DEFAULT_START_Y -> `static` `readonly` **DEFAULT_START_Y**: `0` = `0` +• `static` `readonly` **DEFAULT_START_Y**: `0` = `0` ## Accessors ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -53,12 +53,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -72,7 +72,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -88,7 +88,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -105,7 +105,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -118,13 +118,13 @@ box. ### endArrowHeadType -> `get` **endArrowHeadType**(): [`ArrowHeadType`](../enumerations/ArrowHeadType.md) +• `get` **endArrowHeadType**(): [`ArrowHeadType`](../enumerations/ArrowHeadType.md) The shape encapsulating the end of a line. Returns [ArrowHeadType.none](../enumerations/ArrowHeadType.md#none) if there is no stroke on the line. -> `set` **endArrowHeadType**(`type`): `void` +• `set` **endArrowHeadType**(`type`): `void` The setter sets a default stroke on the line if it did not have one. @@ -145,7 +145,7 @@ More complex stroke types do not support arrowheads. ### endX -> `get` **endX**(): `number` +• `get` **endX**(): `number` The end point on the x-axis in the parent's coordinate system. Modify using `setEndPoints()`. @@ -157,7 +157,7 @@ The end point on the x-axis in the parent's coordinate system. Modify using `set ### endY -> `get` **endY**(): `number` +• `get` **endY**(): `number` The end point on the y-axis in the parent's coordinate system. Modify using `setEndPoints()`. @@ -169,7 +169,7 @@ The end point on the y-axis in the parent's coordinate system. Modify using `set ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -182,12 +182,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -201,11 +201,11 @@ cannot be edited by the user unless they are unlocked first. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -219,7 +219,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -236,7 +236,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -249,7 +249,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -262,13 +262,13 @@ cumulative rotation from the node's parent containers. ### startArrowHeadType -> `get` **startArrowHeadType**(): [`ArrowHeadType`](../enumerations/ArrowHeadType.md) +• `get` **startArrowHeadType**(): [`ArrowHeadType`](../enumerations/ArrowHeadType.md) The shape encapsulating the start of a line. Returns [ArrowHeadType.none](../enumerations/ArrowHeadType.md#none) if there is no stroke on the line. -> `set` **startArrowHeadType**(`type`): `void` +• `set` **startArrowHeadType**(`type`): `void` The setter sets a default stroke on the line if it did not have one. @@ -289,7 +289,7 @@ More complex stroke types do not support arrowheads. ### startX -> `get` **startX**(): `number` +• `get` **startX**(): `number` The start point on the x-axis in the parent's coordinate system. Modify using `setEndPoints()`. @@ -301,7 +301,7 @@ The start point on the x-axis in the parent's coordinate system. Modify using `s ### startY -> `get` **startY**(): `number` +• `get` **startY**(): `number` The start point on the y-axis in the parent's coordinate system. Modify using `setEndPoints()`. @@ -313,9 +313,9 @@ The start point on the y-axis in the parent's coordinate system. Modify using `s ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -> `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -333,7 +333,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -347,7 +347,7 @@ boundsInParent. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -359,13 +359,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -379,7 +379,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -391,7 +391,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -408,7 +408,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -430,7 +430,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -454,7 +454,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -475,7 +475,7 @@ removal. No-op if node is already an orphan. ### setEndPoints() -> **setEndPoints**(`startX`, `startY`, `endX`, `endY`): `void` +• **setEndPoints**(`startX`, `startY`, `endX`, `endY`): `void` Set the start and end points of the line in its local coordinate space (which may differ from its parent's coordinate space based on `transformMatrix`, i.e. @@ -503,7 +503,7 @@ the same. Rotation is preserved. ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -541,7 +541,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already diff --git a/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md b/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md index fab916a3d..b3751749c 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md @@ -14,7 +14,7 @@ determined by the maskShape which is not necessarily a rectangle. ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -31,12 +31,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -50,7 +50,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -66,7 +66,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -83,7 +83,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -96,7 +96,7 @@ box. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -109,12 +109,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -128,7 +128,7 @@ cannot be edited by the user unless they are unlocked first. ### maskShape -> `get` **maskShape**(): [`FillableNode`](FillableNode.md) +• `get` **maskShape**(): [`FillableNode`](FillableNode.md) The mask used for cropping/clipping the media. The bounds of this shape are entire visible bounds of the container. The shape's geometric properties (position, rotation, size, etc.) can be changed, but it cannot be replaced by a @@ -142,7 +142,7 @@ different shape via this API. ### mediaRectangle -> `get` **mediaRectangle**(): [`Node`](Node.md) \| [`ImageRectangleNode`](ImageRectangleNode.md) +• `get` **mediaRectangle**(): [`Node`](Node.md) \| [`ImageRectangleNode`](ImageRectangleNode.md) The rectangular node representing the entire, uncropped bounds of the media (e.g. image, GIFs, or video). The media's position and rotation can be changed, but it cannot be resized yet via this API. Media types other than images will yield a plain Node object @@ -156,11 +156,11 @@ for now. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -174,7 +174,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -191,7 +191,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -204,7 +204,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -217,7 +217,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -231,7 +231,7 @@ boundsInParent. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -243,13 +243,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -263,7 +263,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -275,7 +275,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -292,7 +292,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -314,7 +314,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -338,7 +338,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -359,7 +359,7 @@ removal. No-op if node is already an orphan. ### replaceMedia() -> **replaceMedia**(`media`): `void` +• **replaceMedia**(`media`): `void` Replace existing media inline. The new media is sized to completely fill the bounds of the existing maskShape; if the media's aspect ratio differs from the maskShape's, the media will be cropped by the maskShape on either the left/right @@ -379,7 +379,7 @@ New content to display. Currently must be a [BitmapImage](../interfaces/BitmapIm ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -417,7 +417,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already diff --git a/src/pages/references/document-sandbox/document-apis/classes/Node.md b/src/pages/references/document-sandbox/document-apis/classes/Node.md index 29459f91e..b0a4f121f 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/Node.md +++ b/src/pages/references/document-sandbox/document-apis/classes/Node.md @@ -28,7 +28,7 @@ A Node’s parent is always a VisualContentNode but may not be another Node (e.g ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -45,12 +45,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -64,7 +64,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -80,7 +80,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -97,7 +97,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -110,7 +110,7 @@ box. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -123,12 +123,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -142,11 +142,11 @@ cannot be edited by the user unless they are unlocked first. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -160,7 +160,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -177,7 +177,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -190,7 +190,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -203,7 +203,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -217,7 +217,7 @@ boundsInParent. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -229,13 +229,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -249,7 +249,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -261,7 +261,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -278,7 +278,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -296,7 +296,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -320,7 +320,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -341,7 +341,7 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -375,7 +375,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already diff --git a/src/pages/references/document-sandbox/document-apis/classes/PageList.md b/src/pages/references/document-sandbox/document-apis/classes/PageList.md index ff8cc452a..ffd2111bd 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/PageList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/PageList.md @@ -17,7 +17,7 @@ remove the last remaining page from the list. ### first -> `get` **first**(): `undefined` \| `T` +• `get` **first**(): `undefined` \| `T` First item in this list, or undefined if list is empty. @@ -29,7 +29,7 @@ First item in this list, or undefined if list is empty. ### last -> `get` **last**(): `undefined` \| `T` +• `get` **last**(): `undefined` \| `T` Last item in this list, or undefined if list is empty. @@ -41,7 +41,7 @@ Last item in this list, or undefined if list is empty. ### length -> `get` **length**(): `number` +• `get` **length**(): `number` Number of items in this list. @@ -53,7 +53,7 @@ Number of items in this list. ### `[iterator]`() -> **\[iterator\]**(): `Iterator`<[`PageNode`](PageNode.md), `any`, `undefined`\> +• **\[iterator\]**(): `Iterator`<[`PageNode`](PageNode.md), `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. @@ -69,7 +69,7 @@ Iterates over all the items in this list. Mutations that occur mid-iteration are ### addPage() -> **addPage**(`inputGeometry`): [`PageNode`](PageNode.md) +• **addPage**(`inputGeometry`): [`PageNode`](PageNode.md) Create a new page containing a single empty artboard, and add it to the end of the list. The artboard is configured with the same defaults as in [ArtboardList.addArtboard](ArtboardList.md#addartboard). The page's artboard becomes the default target for @@ -87,7 +87,7 @@ newly inserted content ([Context.insertionParent](Context.md#insertionparent)) a ### indexOf() -> **indexOf**(`item`): `number` +• **indexOf**(`item`): `number` Get index of item in list. @@ -109,7 +109,7 @@ index number, or -1 if item isn't in this list. ### item() -> **item**(`index`): `undefined` \| [`PageNode`](PageNode.md) +• **item**(`index`): `undefined` \| [`PageNode`](PageNode.md) Returns item at the given index, or undefined if index is out of range. @@ -131,7 +131,7 @@ Zero-based index ### moveAfter() -> **moveAfter**(`item`, `after`): `void` +• **moveAfter**(`item`, `after`): `void` Move `item` so it is immediately after `after` in this list: places `item` at the index one higher than `after`. Depending on the position in the list `item` originally occupied, some other items in the list may shift to higher @@ -159,7 +159,7 @@ An error if either argument is not contained in this list. ### moveBefore() -> **moveBefore**(`item`, `before`): `void` +• **moveBefore**(`item`, `before`): `void` Move `item` so it is immediately before `before` in this list: places `item` at the index that `before` used to occupy. Depending on the position in the list `item` originally occupied, some other items in the list may @@ -187,7 +187,7 @@ An error if either argument is not contained in this list. ### remove() -> **remove**(...`items`): `void` +• **remove**(...`items`): `void` Remove the items from the list. The items need not be contiguous. @@ -211,7 +211,7 @@ If any of the items are not in the list, or if it is illegal to remove any of th ### toArray() -> **toArray**(): readonly [`PageNode`](PageNode.md)[] +• **toArray**(): readonly [`PageNode`](PageNode.md)[] All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. diff --git a/src/pages/references/document-sandbox/document-apis/classes/PageNode.md b/src/pages/references/document-sandbox/document-apis/classes/PageNode.md index 816379d35..b923577e6 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/PageNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/PageNode.md @@ -17,7 +17,7 @@ timeline sequence. Those artboards in turn contain all the visual content of the ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -35,7 +35,7 @@ to guarantee all their children are full-fledged Node instances. ### artboards -> `get` **artboards**(): [`ArtboardList`](ArtboardList.md) +• `get` **artboards**(): [`ArtboardList`](ArtboardList.md) The artboards or "scenes" of a page, ordered by timeline sequence. @@ -47,7 +47,7 @@ The artboards or "scenes" of a page, ordered by timeline sequence. ### height -> `get` **height**(): `number` +• `get` **height**(): `number` The height of the node. All Artboards within a page share the same dimensions. @@ -60,7 +60,7 @@ All Artboards within a page share the same dimensions. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -73,11 +73,11 @@ moved to a different part of the document. ### name -> `get` **name**(): `undefined` \| `string` +• `get` **name**(): `undefined` \| `string` The page's name. Displayed as a user-editable label above the current artboard in the UI. -> `set` **name**(`name`): `void` +• `set` **name**(`name`): `void` #### Parameters @@ -91,7 +91,7 @@ The page's name. Displayed as a user-editable label above the current artboard i ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -108,7 +108,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -120,7 +120,7 @@ The node's type. ### width -> `get` **width**(): `number` +• `get` **width**(): `number` The width of the node. All Artboards within a page share the same dimensions. @@ -133,7 +133,7 @@ All Artboards within a page share the same dimensions. ### cloneInPlace() -> **cloneInPlace**(): [`PageNode`](PageNode.md) +• **cloneInPlace**(): [`PageNode`](PageNode.md) Clones this page, all artboards within it, and all content within those artboards. The cloned page is the same size as the original. Adds the new page immediately after this one in the pages list. The first artboard in the cloned @@ -150,7 +150,7 @@ the cloned page. ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. diff --git a/src/pages/references/document-sandbox/document-apis/classes/PathNode.md b/src/pages/references/document-sandbox/document-apis/classes/PathNode.md index 412caad4a..abd9b269a 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/PathNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/PathNode.md @@ -13,7 +13,7 @@ yet, only read. ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -30,12 +30,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -65,7 +65,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -82,7 +82,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -95,9 +95,9 @@ box. ### fill -> `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> +• `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> -> `set` **fill**(`fill`): `void` +• `set` **fill**(`fill`): `void` The fill applied to the shape, if any. @@ -113,12 +113,12 @@ The fill applied to the shape, if any. ### fillRule -> `get` **fillRule**(): [`FillRule`](../enumerations/FillRule.md) +• `get` **fillRule**(): [`FillRule`](../enumerations/FillRule.md) The fill rule specifies how the interior area of a path is determined in cases where the path is self-intersecting or has multiple disjoint parts. The default value is nonZero. -> `set` **fillRule**(`rule`): `void` +• `set` **fillRule**(`rule`): `void` #### Parameters @@ -132,7 +132,7 @@ has multiple disjoint parts. The default value is nonZero. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -145,12 +145,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -164,11 +164,11 @@ cannot be edited by the user unless they are unlocked first. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -182,7 +182,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -199,7 +199,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### path -> `get` **path**(): `string` +• `get` **path**(): `string` The path definition as an SVG string. The path data is read-only and cannot be modified via this API yet. Note that the path data will be normalized, and therefore the `path` getter may return a different SVG string from the path creation input. @@ -213,7 +213,7 @@ For example, "M 10 80 Q 52.5 10, 95 80 T 180 80" becomes "M 10 80 C 38.33 33.33 ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -226,7 +226,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -239,9 +239,9 @@ cumulative rotation from the node's parent containers. ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -> `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -259,7 +259,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -273,7 +273,7 @@ boundsInParent. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -285,13 +285,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -305,7 +305,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -317,7 +317,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -334,7 +334,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -356,7 +356,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -380,7 +380,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -401,7 +401,7 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -439,7 +439,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already diff --git a/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md b/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md index 1addae0f8..c75f977f1 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md @@ -20,7 +20,7 @@ Items in a bare ReadOnlyItemList cannot be added, removed, or reordered. Subclas ### first -> `get` **first**(): `undefined` \| `T` +• `get` **first**(): `undefined` \| `T` First item in this list, or undefined if list is empty. @@ -32,7 +32,7 @@ First item in this list, or undefined if list is empty. ### last -> `get` **last**(): `undefined` \| `T` +• `get` **last**(): `undefined` \| `T` Last item in this list, or undefined if list is empty. @@ -44,7 +44,7 @@ Last item in this list, or undefined if list is empty. ### length -> `get` **length**(): `number` +• `get` **length**(): `number` Number of items in this list. @@ -56,7 +56,7 @@ Number of items in this list. ### `[iterator]`() -> **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> +• **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. @@ -68,7 +68,7 @@ Iterates over all the items in this list. Mutations that occur mid-iteration are ### indexOf() -> **indexOf**(`item`): `number` +• **indexOf**(`item`): `number` Get index of item in list. @@ -86,7 +86,7 @@ index number, or -1 if item isn't in this list. ### item() -> **item**(`index`): `undefined` \| `T` +• **item**(`index`): `undefined` \| `T` Returns item at the given index, or undefined if index is out of range. @@ -104,7 +104,7 @@ Zero-based index ### toArray() -> **toArray**(): readonly `T`[] +• **toArray**(): readonly `T`[] All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. diff --git a/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md b/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md index 8f4fb2fd0..dbcef7209 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md @@ -16,7 +16,7 @@ A RectangleNode represents a rectangle object in the scenegraph. ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -33,12 +33,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -52,7 +52,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### bottomLeftRadius -> `get` **bottomLeftRadius**(): `number` +• `get` **bottomLeftRadius**(): `number` The radius of the bottom left corner, or 0 if the corner is not rounded. @@ -61,7 +61,7 @@ The radius of the bottom left corner, or 0 if the corner is not rounded. The actual corner radius that is rendered is capped based on the size of the rectangle even if the radius value set here is higher. -> `set` **bottomLeftRadius**(`value`): `void` +• `set` **bottomLeftRadius**(`value`): `void` #### Parameters @@ -75,7 +75,7 @@ even if the radius value set here is higher. ### bottomRightRadius -> `get` **bottomRightRadius**(): `number` +• `get` **bottomRightRadius**(): `number` The radius of the bottom right corner, or 0 if the corner is not rounded. @@ -84,7 +84,7 @@ The radius of the bottom right corner, or 0 if the corner is not rounded. The actual corner radius that is rendered is capped based on the size of the rectangle even if the radius value set here is higher. -> `set` **bottomRightRadius**(`value`): `void` +• `set` **bottomRightRadius**(`value`): `void` #### Parameters @@ -98,7 +98,7 @@ even if the radius value set here is higher. ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -114,7 +114,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -131,7 +131,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -144,9 +144,9 @@ box. ### fill -> `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> +• `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> -> `set` **fill**(`fill`): `void` +• `set` **fill**(`fill`): `void` The fill applied to the shape, if any. @@ -162,12 +162,12 @@ The fill applied to the shape, if any. ### height -> `get` **height**(): `number` +• `get` **height**(): `number` The height of the node. Must be at least MIN_DIMENSION. -> `set` **height**(`value`): `void` +• `set` **height**(`value`): `void` #### Parameters @@ -181,7 +181,7 @@ Must be at least MIN_DIMENSION. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -194,12 +194,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -213,11 +213,11 @@ cannot be edited by the user unless they are unlocked first. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -231,7 +231,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -248,7 +248,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -261,7 +261,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -274,9 +274,9 @@ cumulative rotation from the node's parent containers. ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -> `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -294,7 +294,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -308,7 +308,7 @@ boundsInParent. ### topLeftRadius -> `get` **topLeftRadius**(): `number` +• `get` **topLeftRadius**(): `number` The radius of the top left corner, or 0 if the corner is not rounded. @@ -317,7 +317,7 @@ The radius of the top left corner, or 0 if the corner is not rounded. The actual corner radius that is rendered is capped based on the size of the rectangle even if the radius value set here is higher. -> `set` **topLeftRadius**(`value`): `void` +• `set` **topLeftRadius**(`value`): `void` #### Parameters @@ -331,7 +331,7 @@ even if the radius value set here is higher. ### topRightRadius -> `get` **topRightRadius**(): `number` +• `get` **topRightRadius**(): `number` The radius of the top right corner, or 0 if the corner is not rounded. @@ -340,7 +340,7 @@ The radius of the top right corner, or 0 if the corner is not rounded. The actual corner radius that is rendered is capped based on the size of the rectangle even if the radius value set here is higher. -> `set` **topRightRadius**(`value`): `void` +• `set` **topRightRadius**(`value`): `void` #### Parameters @@ -354,7 +354,7 @@ even if the radius value set here is higher. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -366,13 +366,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -386,7 +386,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -398,7 +398,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -415,12 +415,12 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### width -> `get` **width**(): `number` +• `get` **width**(): `number` The width of the node. Must be at least MIN_DIMENSION. -> `set` **width**(`value`): `void` +• `set` **width**(`value`): `void` #### Parameters @@ -434,7 +434,7 @@ Must be at least MIN_DIMENSION. ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -456,7 +456,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### getUniformCornerRadius() -> **getUniformCornerRadius**(): `undefined` \| `number` +• **getUniformCornerRadius**(): `undefined` \| `number` If all corners have the same rounding radius value, returns that value (or 0 if all corners are not rounded). If the corner radii differ, returns undefined. @@ -469,7 +469,7 @@ If the corner radii differ, returns undefined. ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -493,7 +493,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -514,7 +514,7 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -552,7 +552,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -589,7 +589,7 @@ rectangle.setRotationInParent(45, { x: rectangle.width / 2, y: rectangle.height ### setUniformCornerRadius() -> **setUniformCornerRadius**(`radius`): `void` +• **setUniformCornerRadius**(`radius`): `void` Set all corner radii to the same value. Set to 0 to make the corners non-rounded. diff --git a/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md b/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md index f7ac21ee7..81042c779 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md @@ -24,7 +24,7 @@ capabilities, however. ### first -> `get` **first**(): `undefined` \| `T` +• `get` **first**(): `undefined` \| `T` First item in this list, or undefined if list is empty. @@ -36,7 +36,7 @@ First item in this list, or undefined if list is empty. ### last -> `get` **last**(): `undefined` \| `T` +• `get` **last**(): `undefined` \| `T` Last item in this list, or undefined if list is empty. @@ -48,7 +48,7 @@ Last item in this list, or undefined if list is empty. ### length -> `get` **length**(): `number` +• `get` **length**(): `number` Number of items in this list. @@ -60,7 +60,7 @@ Number of items in this list. ### `[iterator]`() -> **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> +• **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. @@ -76,7 +76,7 @@ Iterates over all the items in this list. Mutations that occur mid-iteration are ### indexOf() -> **indexOf**(`item`): `number` +• **indexOf**(`item`): `number` Get index of item in list. @@ -98,7 +98,7 @@ index number, or -1 if item isn't in this list. ### item() -> **item**(`index`): `undefined` \| `T` +• **item**(`index`): `undefined` \| `T` Returns item at the given index, or undefined if index is out of range. @@ -120,7 +120,7 @@ Zero-based index ### moveAfter() -> **moveAfter**(`item`, `after`): `void` +• **moveAfter**(`item`, `after`): `void` Move `item` so it is immediately after `after` in this list: places `item` at the index one higher than `after`. Depending on the position in the list `item` originally occupied, some other items in the list may shift to higher @@ -144,7 +144,7 @@ An error if either argument is not contained in this list. ### moveBefore() -> **moveBefore**(`item`, `before`): `void` +• **moveBefore**(`item`, `before`): `void` Move `item` so it is immediately before `before` in this list: places `item` at the index that `before` used to occupy. Depending on the position in the list `item` originally occupied, some other items in the list may @@ -168,7 +168,7 @@ An error if either argument is not contained in this list. ### remove() -> **remove**(...`items`): `void` +• **remove**(...`items`): `void` Remove the items from the list. The items need not be contiguous. @@ -188,7 +188,7 @@ If any of the items are not in the list, or if it is illegal to remove any of th ### toArray() -> **toArray**(): readonly `T`[] +• **toArray**(): readonly `T`[] All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. diff --git a/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md b/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md index 877f9556f..7c45172d3 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md @@ -13,7 +13,7 @@ is composed of multiple separate paths. ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -30,12 +30,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -65,7 +65,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -82,7 +82,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -95,11 +95,11 @@ box. ### color -> `get` **color**(): `undefined` \| `Readonly`<[`Color`](../interfaces/Color.md)\> +• `get` **color**(): `undefined` \| `Readonly`<[`Color`](../interfaces/Color.md)\> The color of the single color shape. -> `set` **color**(`color`): `void` +• `set` **color**(`color`): `void` #### Parameters @@ -113,7 +113,7 @@ The color of the single color shape. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -126,12 +126,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -145,11 +145,11 @@ cannot be edited by the user unless they are unlocked first. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -163,7 +163,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -180,7 +180,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -193,7 +193,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -206,7 +206,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -220,7 +220,7 @@ boundsInParent. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -232,13 +232,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -252,7 +252,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -264,7 +264,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -281,7 +281,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -303,7 +303,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -327,7 +327,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -348,7 +348,7 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -386,7 +386,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already diff --git a/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md b/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md index 8ac1fdd34..cc5d0bf3f 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md @@ -22,7 +22,7 @@ Base class for a Node that can have its own stroke. ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -39,12 +39,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -58,7 +58,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -74,7 +74,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -91,7 +91,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -104,7 +104,7 @@ box. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -117,12 +117,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -136,11 +136,11 @@ cannot be edited by the user unless they are unlocked first. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -154,7 +154,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -171,7 +171,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -184,7 +184,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -197,9 +197,9 @@ cumulative rotation from the node's parent containers. ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -> `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -217,7 +217,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -231,7 +231,7 @@ boundsInParent. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -243,13 +243,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -263,7 +263,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -275,7 +275,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -292,7 +292,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -314,7 +314,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -338,7 +338,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -359,7 +359,7 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -397,7 +397,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already diff --git a/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md b/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md index 4d2fa5e97..25d2b261b 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md @@ -13,7 +13,7 @@ if it is composed of multiple separate paths. ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -30,12 +30,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -65,7 +65,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -82,7 +82,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -95,7 +95,7 @@ box. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -108,12 +108,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -127,11 +127,11 @@ cannot be edited by the user unless they are unlocked first. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -145,7 +145,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -162,7 +162,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -175,7 +175,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -188,9 +188,9 @@ cumulative rotation from the node's parent containers. ### stroke -> `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -> `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -208,7 +208,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -222,7 +222,7 @@ boundsInParent. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -234,13 +234,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -254,7 +254,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -266,7 +266,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -283,7 +283,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -305,7 +305,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -329,7 +329,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -350,7 +350,7 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -388,7 +388,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already 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 dfc68ae20..d73b07474 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/TextNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/TextNode.md @@ -12,7 +12,7 @@ A TextNode represents a text object in the scenegraph. ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -29,12 +29,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -48,7 +48,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -64,7 +64,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -81,7 +81,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -94,7 +94,7 @@ box. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -107,12 +107,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -126,11 +126,11 @@ cannot be edited by the user unless they are unlocked first. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -144,7 +144,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -161,7 +161,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -174,7 +174,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -187,11 +187,11 @@ cumulative rotation from the node's parent containers. ### text -> `get` **text**(): `string` +• `get` **text**(): `string` The text string of the node. -> `set` **text**(`textContent`): `void` +• `set` **text**(`textContent`): `void` Sets the text content of the text node. @@ -207,11 +207,11 @@ Sets the text content of the text node. ### textAlignment -> `get` **textAlignment**(): [`TextAlignment`](../enumerations/TextAlignment.md) +• `get` **textAlignment**(): [`TextAlignment`](../enumerations/TextAlignment.md) The horizontal text alignment of the text node. Alignment is always the same across this node's entire text content. -> `set` **textAlignment**(`alignment`): `void` +• `set` **textAlignment**(`alignment`): `void` #### Parameters @@ -225,7 +225,7 @@ The horizontal text alignment of the text node. Alignment is always the same acr ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -239,7 +239,7 @@ boundsInParent. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -251,13 +251,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -271,7 +271,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -283,7 +283,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -300,7 +300,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -322,7 +322,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -346,7 +346,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -367,7 +367,7 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -405,7 +405,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already diff --git a/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md b/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md index 1ae1046f2..d18e9b28b 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md @@ -12,7 +12,7 @@ An UnknownNode is a node with limited support and therefore treated as a leaf no ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -29,12 +29,12 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -> `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -> `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters @@ -48,7 +48,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -> `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -64,7 +64,7 @@ even for an orphan node with no parent. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -81,7 +81,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -94,7 +94,7 @@ box. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -107,12 +107,12 @@ moved to a different part of the document. ### locked -> `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -> `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters @@ -126,11 +126,11 @@ cannot be edited by the user unless they are unlocked first. ### opacity -> `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -> `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters @@ -144,7 +144,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -161,7 +161,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -> `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -174,7 +174,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -> `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -187,7 +187,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -201,7 +201,7 @@ boundsInParent. ### transformMatrix -> `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -213,13 +213,13 @@ The node's transform matrix relative to its parent. ### translation -> `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -> `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters @@ -233,7 +233,7 @@ setting translation directly. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -245,7 +245,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -262,7 +262,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -> **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -284,7 +284,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -308,7 +308,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -329,7 +329,7 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -> **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). @@ -367,7 +367,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -> **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already diff --git a/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md b/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md index 75a0ae34a..5976caf69 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md @@ -23,7 +23,7 @@ Some VisualNodes might have a non-visual parent such as a PageNode. ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -41,7 +41,7 @@ to guarantee all their children are full-fledged Node instances. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -58,7 +58,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -71,7 +71,7 @@ box. ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -84,7 +84,7 @@ moved to a different part of the document. ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -101,7 +101,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -115,7 +115,7 @@ boundsInParent. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -127,7 +127,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -144,7 +144,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -164,7 +164,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. 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 503cbdb2f..a07a8e8f1 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/ArrowHeadType.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/ArrowHeadType.md @@ -10,46 +10,46 @@ _Do not depend on the literal numeric values of these constants_, as they may ch ### circleFilled -> **circleFilled**: `21` +• **circleFilled**: `21` --- ### circleHollow -> **circleHollow**: `24` +• **circleHollow**: `24` --- ### none -> **none**: `0` +• **none**: `0` --- ### openTriangular -> **openTriangular**: `11` +• **openTriangular**: `11` --- ### squareFilled -> **squareFilled**: `22` +• **squareFilled**: `22` --- ### squareHollow -> **squareHollow**: `25` +• **squareHollow**: `25` --- ### triangularFilled -> **triangularFilled**: `7` +• **triangularFilled**: `7` --- ### verticalLine -> **verticalLine**: `27` +• **verticalLine**: `27` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/BlendMode.md b/src/pages/references/document-sandbox/document-apis/enumerations/BlendMode.md index f32cf13ef..14568e4f7 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/BlendMode.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/BlendMode.md @@ -15,73 +15,73 @@ interacts with other siblings within the same container. See documentation below ### color -> **color**: `16` +• **color**: `16` --- ### colorBurn -> **colorBurn**: `5` +• **colorBurn**: `5` --- ### colorDodge -> **colorDodge**: `8` +• **colorDodge**: `8` --- ### darken -> **darken**: `4` +• **darken**: `4` --- ### difference -> **difference**: `12` +• **difference**: `12` --- ### exclusion -> **exclusion**: `13` +• **exclusion**: `13` --- ### hardLight -> **hardLight**: `11` +• **hardLight**: `11` --- ### hue -> **hue**: `14` +• **hue**: `14` --- ### lighten -> **lighten**: `6` +• **lighten**: `6` --- ### luminosity -> **luminosity**: `17` +• **luminosity**: `17` --- ### multiply -> **multiply**: `3` +• **multiply**: `3` --- ### normal -> **normal**: `2` +• **normal**: `2` The normal, default blend mode for leaf nodes. @@ -91,13 +91,13 @@ Note: Group nodes default to using `passThrough` blend mode instead. See below. ### overlay -> **overlay**: `9` +• **overlay**: `9` --- ### passThrough -> **passThrough**: `1` +• **passThrough**: `1` This blend mode only applies to container nodes with children; for leaf nodes, it is treated the same as `normal`. @@ -112,16 +112,16 @@ Group nodes are set to `passThrough` by default. ### saturation -> **saturation**: `15` +• **saturation**: `15` --- ### screen -> **screen**: `7` +• **screen**: `7` --- ### softLight -> **softLight**: `10` +• **softLight**: `10` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/FillRule.md b/src/pages/references/document-sandbox/document-apis/enumerations/FillRule.md index 40b2745ee..deaaf1a2d 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/FillRule.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/FillRule.md @@ -13,10 +13,10 @@ self-intersecting or contains separate, nested closed loops. ### evenOdd -> **evenOdd**: `1` +• **evenOdd**: `1` --- ### nonZero -> **nonZero**: `0` +• **nonZero**: `0` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/FillType.md b/src/pages/references/document-sandbox/document-apis/enumerations/FillType.md index 488a77e1b..e1016165c 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/FillType.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/FillType.md @@ -15,6 +15,6 @@ always have a default/fallback case to handle any unknown values you may encount ### color -> **color**: `"Color"` +• **color**: `"Color"` A solid color fill. diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/SceneNodeType.md b/src/pages/references/document-sandbox/document-apis/enumerations/SceneNodeType.md index ca5436179..16a70c5b7 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/SceneNodeType.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/SceneNodeType.md @@ -15,19 +15,19 @@ always have a default/fallback case to handle any unknown values you may encount ### artboard -> **artboard**: `"ab:Artboard"` +• **artboard**: `"ab:Artboard"` --- ### artworkRoot -> **artworkRoot**: `"ArtworkRoot"` +• **artworkRoot**: `"ArtworkRoot"` --- ### complexShape -> **complexShape**: `"ComplexShape"` +• **complexShape**: `"ComplexShape"` Type of ComplexShapeNode, representing a complex prepackaged shape with fill and stroke, that appears as a leaf node in the UI @@ -35,13 +35,13 @@ Type of ComplexShapeNode, representing a complex prepackaged shape with fill and ### ellipse -> **ellipse**: `"Ellipse"` +• **ellipse**: `"Ellipse"` --- ### gridLayout -> **gridLayout**: `"GridLayout"` +• **gridLayout**: `"GridLayout"` Type of GridLayoutNode represents a grid layout in the scenegraph used to create a layout grid that other content can be placed into @@ -49,13 +49,13 @@ Type of GridLayoutNode represents a grid layout in the scenegraph used to create ### group -> **group**: `"Group"` +• **group**: `"Group"` --- ### imageRectangle -> **imageRectangle**: `"ImageRectangle"` +• **imageRectangle**: `"ImageRectangle"` Type of MediaContainerNode's "media rectangle" child when it is holding an image @@ -63,19 +63,19 @@ Type of MediaContainerNode's "media rectangle" child when it is holding an image ### line -> **line**: `"Line"` +• **line**: `"Line"` --- ### linkedAsset -> **linkedAsset**: `"LinkedAsset"` +• **linkedAsset**: `"LinkedAsset"` --- ### mediaContainer -> **mediaContainer**: `"MediaContainer"` +• **mediaContainer**: `"MediaContainer"` Type of MediaContainerNode, representing the top-level container of the multi-node construct used to display images or video. @@ -83,7 +83,7 @@ Type of MediaContainerNode, representing the top-level container of the multi-no ### page -> **page**: `"Page"` +• **page**: `"Page"` Type of PageNode @@ -91,25 +91,25 @@ Type of PageNode ### path -> **path**: `"Path"` +• **path**: `"Path"` --- ### polygon -> **polygon**: `"artgr:Polygon"` +• **polygon**: `"artgr:Polygon"` --- ### rectangle -> **rectangle**: `"Rectangle"` +• **rectangle**: `"Rectangle"` --- ### solidColorShape -> **solidColorShape**: `"SolidColorShape"` +• **solidColorShape**: `"SolidColorShape"` Type of SolidColorShapeNode, representing a solid-color prepackaged shape that appears as a leaf node in the UI @@ -117,7 +117,7 @@ Type of SolidColorShapeNode, representing a solid-color prepackaged shape that a ### strokeShape -> **strokeShape**: `"StrokeShape"` +• **strokeShape**: `"StrokeShape"` Type of StrokeShapeNode, representing a stroke-only prepackaged shape that appears as a leaf node in the UI @@ -125,4 +125,4 @@ Type of StrokeShapeNode, representing a stroke-only prepackaged shape that appea ### text -> **text**: `"Text"` +• **text**: `"Text"` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/StrokePosition.md b/src/pages/references/document-sandbox/document-apis/enumerations/StrokePosition.md index 848b1dafd..6c93ded08 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/StrokePosition.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/StrokePosition.md @@ -12,16 +12,16 @@ A stroke's Stroke.position determines how the thickness of the stroke is aligned ### center -> **center**: `0` +• **center**: `0` --- ### inside -> **inside**: `1` +• **inside**: `1` --- ### outside -> **outside**: `2` +• **outside**: `2` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/StrokeType.md b/src/pages/references/document-sandbox/document-apis/enumerations/StrokeType.md index 46ce9a960..b64ba64d0 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/StrokeType.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/StrokeType.md @@ -15,6 +15,6 @@ always have a default/fallback case to handle any unknown values you may encount ### color -> **color**: `"Color"` +• **color**: `"Color"` A solid-color stroke, with optional dashes. 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 f2e172bb7..1e7e67574 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/TextAlignment.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/TextAlignment.md @@ -10,16 +10,16 @@ _Do not depend on the literal numeric values of these constants_, as they may ch ### center -> **center**: `3` +• **center**: `3` --- ### left -> **left**: `1` +• **left**: `1` --- ### right -> **right**: `2` +• **right**: `2` diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/BitmapImage.md b/src/pages/references/document-sandbox/document-apis/interfaces/BitmapImage.md index 0568ed2b5..4dfb6d09c 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/BitmapImage.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/BitmapImage.md @@ -9,7 +9,7 @@ to display it in the document by creating a MediaContainerNode structure. ### height -> `readonly` **height**: `number` +• `readonly` **height**: `number` Original height of the bitmap in pixels. @@ -17,6 +17,6 @@ Original height of the bitmap in pixels. ### width -> `readonly` **width**: `number` +• `readonly` **width**: `number` Original width of the bitmap in pixels. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/Color.md b/src/pages/references/document-sandbox/document-apis/interfaces/Color.md index 1c09e882e..73bd281d8 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/Color.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/Color.md @@ -8,7 +8,7 @@ Represents an RGBA color value. ### alpha -> **alpha**: `number` +• **alpha**: `number` The alpha channel in range from 0 - 1. @@ -16,7 +16,7 @@ The alpha channel in range from 0 - 1. ### blue -> **blue**: `number` +• **blue**: `number` The blue channel in range from 0 - 1. @@ -24,7 +24,7 @@ The blue channel in range from 0 - 1. ### green -> **green**: `number` +• **green**: `number` The green channel in range from 0 - 1. @@ -32,6 +32,6 @@ The green channel in range from 0 - 1. ### red -> **red**: `number` +• **red**: `number` The red channel in range from 0 - 1. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/ColorFill.md b/src/pages/references/document-sandbox/document-apis/interfaces/ColorFill.md index dba02ff04..ea5aa57b7 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/ColorFill.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/ColorFill.md @@ -14,7 +14,7 @@ The most convenient way to create a fill is via `Editor.makeColorFill()`. ### color -> **color**: [`Color`](Color.md) +• **color**: [`Color`](Color.md) The fill color. @@ -22,7 +22,7 @@ The fill color. ### type -> `readonly` **type**: [`color`](../enumerations/FillType.md#color) +• `readonly` **type**: [`color`](../enumerations/FillType.md#color) The fill type. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md b/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md index 7a436ed20..2a46d304a 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md @@ -17,7 +17,7 @@ more minimal VisualNode (such as Artboard). ### allChildren -> `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](../classes/BaseNode.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](../classes/BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -35,7 +35,7 @@ to guarantee all their children are full-fledged Node instances. ### boundsLocal -> `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -52,7 +52,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -> `get` **centerPointLocal**(): `Readonly`<[`Point`](Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -65,7 +65,7 @@ box. ### children -> `get` **children**(): [`ItemList`](../classes/ItemList.md)<[`Node`](../classes/Node.md)\> +• `get` **children**(): [`ItemList`](../classes/ItemList.md)<[`Node`](../classes/Node.md)\> The node's children. Use the methods on this ItemList object to get, add, and remove children. @@ -77,7 +77,7 @@ The node's children. Use the methods on this ItemList object to get, add, and re ### id -> `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -90,7 +90,7 @@ moved to a different part of the document. ### parent -> `get` **parent**(): `undefined` \| [`BaseNode`](../classes/BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](../classes/BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -107,7 +107,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### topLeftLocal -> `get` **topLeftLocal**(): `Readonly`<[`Point`](Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -121,7 +121,7 @@ boundsInParent. ### type -> `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -133,7 +133,7 @@ The node's type. ### visualRoot -> `get` **visualRoot**(): [`VisualNode`](../classes/VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](../classes/VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -150,7 +150,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### localPointInNode() -> **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](../classes/VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -174,7 +174,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -> **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/Fill.md b/src/pages/references/document-sandbox/document-apis/interfaces/Fill.md index 99e1fdbc3..beb2edcd8 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/Fill.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/Fill.md @@ -14,6 +14,6 @@ other fill types when reading scenegraph content. ### type -> `readonly` **type**: [`color`](../enumerations/FillType.md#color) +• `readonly` **type**: [`color`](../enumerations/FillType.md#color) The fill type. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/IFillableNode.md b/src/pages/references/document-sandbox/document-apis/interfaces/IFillableNode.md index c1c5a7a96..99b93447a 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/IFillableNode.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/IFillableNode.md @@ -9,4 +9,4 @@ the FillableNode class. ### fill -> **fill**: `undefined` \| [`Fill`](Fill.md) +• **fill**: `undefined` \| [`Fill`](Fill.md) diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/IRectangularNode.md b/src/pages/references/document-sandbox/document-apis/interfaces/IRectangularNode.md index 4e193a584..26478e2c8 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/IRectangularNode.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/IRectangularNode.md @@ -8,10 +8,10 @@ Interface for nodes with width and height properties. ### height -> **height**: `number` +• **height**: `number` --- ### width -> **width**: `number` +• **width**: `number` diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/IStrokableNode.md b/src/pages/references/document-sandbox/document-apis/interfaces/IStrokableNode.md index c73e7288d..ea9487218 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/IStrokableNode.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/IStrokableNode.md @@ -9,4 +9,4 @@ from the StrokableNode class. (See [ArtboardNode](../classes/ArtboardNode.md), f ### stroke -> **stroke**: `undefined` \| [`Stroke`](Stroke.md) +• **stroke**: `undefined` \| [`Stroke`](Stroke.md) diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/Point.md b/src/pages/references/document-sandbox/document-apis/interfaces/Point.md index 22fe70224..22d439056 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/Point.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/Point.md @@ -8,10 +8,10 @@ Represents a 2D position. ### x -> **x**: `number` +• **x**: `number` --- ### y -> **y**: `number` +• **y**: `number` diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/RectangleGeometry.md b/src/pages/references/document-sandbox/document-apis/interfaces/RectangleGeometry.md index 7c51273ce..fe8f89010 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/RectangleGeometry.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/RectangleGeometry.md @@ -6,10 +6,10 @@ ### height -> **height**: `number` +• **height**: `number` --- ### width -> **width**: `number` +• **width**: `number` diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/SolidColorStroke.md b/src/pages/references/document-sandbox/document-apis/interfaces/SolidColorStroke.md index b05de1d8f..b846ef4d1 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/SolidColorStroke.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/SolidColorStroke.md @@ -15,7 +15,7 @@ your code in case any other required fields are added to the Stroke descriptor i ### color -> **color**: [`Color`](Color.md) +• **color**: [`Color`](Color.md) The color of a stroke. @@ -23,7 +23,7 @@ The color of a stroke. ### dashOffset -> **dashOffset**: `number` +• **dashOffset**: `number` Number of pixels the beginning of dash pattern should be offset along the stroke. @@ -31,7 +31,7 @@ Number of pixels the beginning of dash pattern should be offset along the stroke ### dashPattern -> **dashPattern**: `number`[] +• **dashPattern**: `number`[] If empty, this is a solid stroke. If non-empty, the values alternate between length of a rendered and blank segment, @@ -42,7 +42,7 @@ Array must be of even length. Values cannot be negative. ### position -> **position**: [`StrokePosition`](../enumerations/StrokePosition.md) +• **position**: [`StrokePosition`](../enumerations/StrokePosition.md) The position of the stroke relative to the outline of the shape. @@ -50,7 +50,7 @@ The position of the stroke relative to the outline of the shape. ### type -> `readonly` **type**: [`color`](../enumerations/StrokeType.md#color) +• `readonly` **type**: [`color`](../enumerations/StrokeType.md#color) The stroke type. @@ -62,6 +62,6 @@ The stroke type. ### width -> **width**: `number` +• **width**: `number` The thickness of a stroke. Must be from MIN_STROKE_WIDTH to MAX_STROKE_WIDTH. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/Stroke.md b/src/pages/references/document-sandbox/document-apis/interfaces/Stroke.md index b8a14d2a1..907300f68 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/Stroke.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/Stroke.md @@ -14,4 +14,4 @@ other stroke types when reading from scenegraph content. ### type -> `readonly` **type**: [`color`](../enumerations/StrokeType.md#color) +• `readonly` **type**: [`color`](../enumerations/StrokeType.md#color) diff --git a/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md b/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md index 1afe19393..21fd66d06 100644 --- a/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md +++ b/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md @@ -2,6 +2,6 @@ # Type alias: SolidColorStrokeWithOptionalType -> **SolidColorStrokeWithOptionalType**: `Omit`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\> & `Partial`<`Pick`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\>\> +• **SolidColorStrokeWithOptionalType**: `Omit`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\• & `Partial`<`Pick`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\>\> SolidColorStroke with 'type' property as optional. From a0629c498400fc91c809c636acea85984248966a Mon Sep 17 00:00:00 2001 From: Abhishek Das Date: Tue, 10 Sep 2024 09:17:28 +0530 Subject: [PATCH 5/8] Use old bullet for API signatures --- README.md | 2 +- .../document-apis/classes/ArtboardList.md | 36 ++--- .../document-apis/classes/ArtboardNode.md | 36 ++--- .../document-apis/classes/BaseNode.md | 10 +- .../document-apis/classes/ColorUtils.md | 30 ++--- .../document-apis/classes/ComplexShapeNode.md | 84 ++++++------ .../document-apis/classes/Context.md | 14 +- .../document-apis/classes/Editor.md | 44 +++--- .../document-apis/classes/EllipseNode.md | 96 ++++++------- .../document-apis/classes/ExpressRootNode.md | 12 +- .../document-apis/classes/FillableNode.md | 84 ++++++------ .../document-apis/classes/GridLayoutNode.md | 82 ++++++------ .../document-apis/classes/GroupNode.md | 80 +++++------ .../classes/ImageRectangleNode.md | 76 +++++------ .../document-apis/classes/ItemList.md | 60 ++++----- .../document-apis/classes/LineNode.md | 116 ++++++++-------- .../classes/MediaContainerNode.md | 80 +++++------ .../document-apis/classes/Node.md | 72 +++++----- .../document-apis/classes/PageList.md | 38 +++--- .../document-apis/classes/PageNode.md | 24 ++-- .../document-apis/classes/PathNode.md | 92 ++++++------- .../document-apis/classes/ReadOnlyItemList.md | 20 +-- .../document-apis/classes/RectangleNode.md | 126 +++++++++--------- .../classes/RestrictedItemList.md | 36 ++--- .../classes/SolidColorShapeNode.md | 78 +++++------ .../document-apis/classes/StrokableNode.md | 78 +++++------ .../document-apis/classes/StrokeShapeNode.md | 78 +++++------ .../document-apis/classes/TextNode.md | 84 ++++++------ .../document-apis/classes/UnknownNode.md | 72 +++++----- .../document-apis/classes/VisualNode.md | 24 ++-- .../enumerations/ArrowHeadType.md | 16 +-- .../document-apis/enumerations/BlendMode.md | 34 ++--- .../document-apis/enumerations/FillRule.md | 4 +- .../document-apis/enumerations/FillType.md | 2 +- .../enumerations/SceneNodeType.md | 34 ++--- .../enumerations/StrokePosition.md | 6 +- .../document-apis/enumerations/StrokeType.md | 2 +- .../enumerations/TextAlignment.md | 6 +- .../document-apis/interfaces/BitmapImage.md | 4 +- .../document-apis/interfaces/Color.md | 8 +- .../document-apis/interfaces/ColorFill.md | 4 +- .../document-apis/interfaces/ContainerNode.md | 26 ++-- .../document-apis/interfaces/Fill.md | 2 +- .../document-apis/interfaces/IFillableNode.md | 2 +- .../interfaces/IRectangularNode.md | 4 +- .../interfaces/IStrokableNode.md | 2 +- .../document-apis/interfaces/Point.md | 4 +- .../interfaces/RectangleGeometry.md | 4 +- .../interfaces/SolidColorStroke.md | 12 +- .../document-apis/interfaces/Stroke.md | 2 +- .../SolidColorStrokeWithOptionalType.md | 2 +- 51 files changed, 972 insertions(+), 972 deletions(-) diff --git a/README.md b/README.md index 93954abb3..df7c7aba2 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ This section outlines the steps that should be taken to format the generated Doc --- ``` -3. The API signatures generated in `classes`, `enumerations`, `interfaces`, `namespaces`, and `type-aliases` is indented. In these directories, find and replace all occurrences of `>` + space with `•` + space. +3. The API signatures generated in `classes`, `enumerations`, `interfaces`, `namespaces`, and `type-aliases` is indented. In these directories, find and replace all occurrences of `newline + > + space` with `newline + • + space`, ensuring no code example or closing tag is replaced. 4. Find and replace all \`mat2d\` --> \[\`mat2d\`\]\(https://glmatrix.net/docs/module-mat2d.html\) diff --git a/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md b/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md index 21ee0c187..034209a41 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md @@ -16,7 +16,7 @@ remove the last remaining artboard from the list. ### first -• `get` **first**(): `undefined` \| `T` +▸ `get` **first**(): `undefined` \| `T` First item in this list, or undefined if list is empty. @@ -28,7 +28,7 @@ First item in this list, or undefined if list is empty. ### last -• `get` **last**(): `undefined` \| `T` +▸ `get` **last**(): `undefined` \| `T` Last item in this list, or undefined if list is empty. @@ -40,7 +40,7 @@ Last item in this list, or undefined if list is empty. ### length -• `get` **length**(): `number` +▸ `get` **length**(): `number` Number of items in this list. @@ -52,7 +52,7 @@ Number of items in this list. ### `[iterator]`() -• **\[iterator\]**(): `Iterator`<[`ArtboardNode`](ArtboardNode.md), `any`, `undefined`\> +▸ **\[iterator\]**(): `Iterator`<[`ArtboardNode`](ArtboardNode.md), `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. @@ -68,7 +68,7 @@ Iterates over all the items in this list. Mutations that occur mid-iteration are ### addArtboard() -• **addArtboard**(): [`ArtboardNode`](ArtboardNode.md) +▸ **addArtboard**(): [`ArtboardNode`](ArtboardNode.md) Create a new artboard and add it to the end of the list. The artboard size is the same as others on this page. The artboard background is set to default fill color DEFAULT_ARTBOARD_FILL_COLOR. The new artboard becomes the @@ -85,13 +85,13 @@ the newly added artboard. ### indexOf() -• **indexOf**(`item`): `number` +▸ **indexOf**(`item`): `number` Get index of item in list. #### Parameters -• **item**: [`ArtboardNode`](ArtboardNode.md) +▸ **item**: [`ArtboardNode`](ArtboardNode.md) #### Returns @@ -107,13 +107,13 @@ index number, or -1 if item isn't in this list. ### item() -• **item**(`index`): `undefined` \| [`ArtboardNode`](ArtboardNode.md) +▸ **item**(`index`): `undefined` \| [`ArtboardNode`](ArtboardNode.md) Returns item at the given index, or undefined if index is out of range. #### Parameters -• **index**: `number` +▸ **index**: `number` Zero-based index @@ -129,7 +129,7 @@ Zero-based index ### moveAfter() -• **moveAfter**(`item`, `after`): `void` +▸ **moveAfter**(`item`, `after`): `void` Move `item` so it is immediately after `after` in this list: places `item` at the index one higher than `after`. Depending on the position in the list `item` originally occupied, some other items in the list may shift to higher @@ -137,9 +137,9 @@ or lower indices as a result. No-op if both arguments are the same item. #### Parameters -• **item**: [`ArtboardNode`](ArtboardNode.md) +▸ **item**: [`ArtboardNode`](ArtboardNode.md) -• **after**: [`ArtboardNode`](ArtboardNode.md) +▸ **after**: [`ArtboardNode`](ArtboardNode.md) #### Returns @@ -157,7 +157,7 @@ An error if either argument is not contained in this list. ### moveBefore() -• **moveBefore**(`item`, `before`): `void` +▸ **moveBefore**(`item`, `before`): `void` Move `item` so it is immediately before `before` in this list: places `item` at the index that `before` used to occupy. Depending on the position in the list `item` originally occupied, some other items in the list may @@ -165,9 +165,9 @@ shift to higher or lower indices as a result. No-op if both arguments are the sa #### Parameters -• **item**: [`ArtboardNode`](ArtboardNode.md) +▸ **item**: [`ArtboardNode`](ArtboardNode.md) -• **before**: [`ArtboardNode`](ArtboardNode.md) +▸ **before**: [`ArtboardNode`](ArtboardNode.md) #### Returns @@ -185,13 +185,13 @@ An error if either argument is not contained in this list. ### remove() -• **remove**(...`items`): `void` +▸ **remove**(...`items`): `void` Remove the items from the list. The items need not be contiguous. #### Parameters -• ...**items**: [`ArtboardNode`](ArtboardNode.md)[] +▸ ...**items**: [`ArtboardNode`](ArtboardNode.md)[] #### Returns @@ -209,7 +209,7 @@ If any of the items are not in the list, or if it is illegal to remove any of th ### toArray() -• **toArray**(): readonly [`ArtboardNode`](ArtboardNode.md)[] +▸ **toArray**(): readonly [`ArtboardNode`](ArtboardNode.md)[] All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md b/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md index 115d3a5f0..d2dad00f6 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md @@ -19,7 +19,7 @@ When multiple artboards exist on a page, the artboards represent "scenes" in a l ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -36,7 +36,7 @@ The children of an Artboard are always other Node classes (never the more minima ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -53,7 +53,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -66,7 +66,7 @@ box. ### children -• `get` **children**(): [`ItemList`](ItemList.md)<[`Node`](Node.md)\> +▸ `get` **children**(): [`ItemList`](ItemList.md)<[`Node`](Node.md)\> The node's children. Use the methods on this ItemList object to get, add, and remove children. @@ -78,15 +78,15 @@ The node's children. Use the methods on this ItemList object to get, add, and re ### fill -• `get` **fill**(): `Readonly`<[`Fill`](../interfaces/Fill.md)\> +▸ `get` **fill**(): `Readonly`<[`Fill`](../interfaces/Fill.md)\> -• `set` **fill**(`fill`): `void` +▸ `set` **fill**(`fill`): `void` The background fill of the artboard. Artboards must always have a fill. #### Parameters -• **fill**: [`Fill`](../interfaces/Fill.md) +▸ **fill**: [`Fill`](../interfaces/Fill.md) #### Returns @@ -96,7 +96,7 @@ The background fill of the artboard. Artboards must always have a fill. ### height -• `get` **height**(): `number` +▸ `get` **height**(): `number` The height of the artboard. @@ -108,7 +108,7 @@ The height of the artboard. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -121,7 +121,7 @@ moved to a different part of the document. ### parent -• `get` **parent**(): `undefined` \| [`PageNode`](PageNode.md) +▸ `get` **parent**(): `undefined` \| [`PageNode`](PageNode.md) The node's parent. Undefined if the node is an orphan. @@ -133,7 +133,7 @@ The node's parent. Undefined if the node is an orphan. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -147,7 +147,7 @@ boundsInParent. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -159,7 +159,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -176,7 +176,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### width -• `get` **width**(): `number` +▸ `get` **width**(): `number` The width of the artboard. @@ -188,7 +188,7 @@ The width of the artboard. ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -196,9 +196,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -216,7 +216,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. diff --git a/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md b/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md index fcd723f7c..4ef61d53e 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md @@ -17,7 +17,7 @@ properties. ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -35,7 +35,7 @@ to guarantee all their children are full-fledged Node instances. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -48,7 +48,7 @@ moved to a different part of the document. ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -65,7 +65,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -77,7 +77,7 @@ The node's type. ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ColorUtils.md b/src/pages/references/document-sandbox/document-apis/classes/ColorUtils.md index b2201ef80..dd0a81477 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ColorUtils.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ColorUtils.md @@ -8,14 +8,14 @@ Utility methods for working with color values. ### fromHex() -• **fromHex**(`hex`): [`Color`](../interfaces/Color.md) +▸ **fromHex**(`hex`): [`Color`](../interfaces/Color.md) Create a new color from its equivalent RGBA hex representation. Can specify in 6 digits (RRGGBB) or 8 digits (RRGGBBAA), uppercase or lowercase, with or without leading "#". Alpha defaults to FF (100% opaque) if ommitted. #### Parameters -• **hex**: `string` +▸ **hex**: `string` The color represented as a hexadecimal string. @@ -35,25 +35,25 @@ if the hex string cannot be parsed. #### fromRGB(red, green, blue, alpha) -• **fromRGB**(`red`, `green`, `blue`, `alpha`?): [`Color`](../interfaces/Color.md) +▸ **fromRGB**(`red`, `green`, `blue`, `alpha`?): [`Color`](../interfaces/Color.md) Create a new color object with the given RGBA values. ##### Parameters -• **red**: `number` +▸ **red**: `number` The red channel, from 0 - 1. -• **green**: `number` +▸ **green**: `number` The green channel, from 0 - 1. -• **blue**: `number` +▸ **blue**: `number` The blue channel, from 0 - 1. -• **alpha?**: `number` +▸ **alpha?**: `number` Optional alpha channel, from 0 - 1. Defaults to 1 (opaque). @@ -65,23 +65,23 @@ A new color object. #### fromRGB(color) -• **fromRGB**(`color`): [`Color`](../interfaces/Color.md) +▸ **fromRGB**(`color`): [`Color`](../interfaces/Color.md) Create a new color object given a partial color object where the alpha field may be missing. ##### Parameters -• **color** +▸ **color** Partial color object. Alpha defaults to 1 (opaque). -• **color.alpha?**: `number` +▸ **color.alpha?**: `number` -• **color.blue**: `number` +▸ **color.blue**: `number` -• **color.green**: `number` +▸ **color.green**: `number` -• **color.red**: `number` +▸ **color.red**: `number` ##### Returns @@ -93,13 +93,13 @@ A new color object with all fields present. ### toHex() -• **toHex**(`color`): `string` +▸ **toHex**(`color`): `string` Get the color in 8-digit hex "#RRGGBBAA" format. #### Parameters -• **color**: [`Color`](../interfaces/Color.md) +▸ **color**: [`Color`](../interfaces/Color.md) #### Returns diff --git a/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md b/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md index 43fab8276..36574afe3 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md @@ -13,7 +13,7 @@ of multiple separate paths. ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -30,16 +30,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -65,7 +65,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -82,7 +82,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -95,15 +95,15 @@ box. ### fill -• `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> +▸ `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> -• `set` **fill**(`fill`): `void` +▸ `set` **fill**(`fill`): `void` The fill applied to the shape, if any. #### Parameters -• **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) +▸ **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) #### Returns @@ -113,7 +113,7 @@ The fill applied to the shape, if any. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -126,16 +126,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -145,15 +145,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -163,7 +163,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -180,7 +180,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -193,7 +193,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -206,9 +206,9 @@ cumulative rotation from the node's parent containers. ### stroke -• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -• `set` **stroke**(`stroke`): `void` +▸ `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -216,7 +216,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -226,7 +226,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -240,7 +240,7 @@ boundsInParent. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -252,17 +252,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -272,7 +272,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -284,7 +284,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -301,7 +301,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -309,7 +309,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -323,7 +323,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -331,9 +331,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -347,7 +347,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -368,18 +368,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -406,7 +406,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -415,11 +415,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/Context.md b/src/pages/references/document-sandbox/document-apis/classes/Context.md index 3f1cb4565..3c5009114 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/Context.md +++ b/src/pages/references/document-sandbox/document-apis/classes/Context.md @@ -8,7 +8,7 @@ Contains the user's current selection state, indicating the content they are foc ### currentPage -• `get` **currentPage**(): [`PageNode`](PageNode.md) +▸ `get` **currentPage**(): [`PageNode`](PageNode.md) #### Returns @@ -20,7 +20,7 @@ The currently viewed page. ### hasSelection -• `get` **hasSelection**(): `boolean` +▸ `get` **hasSelection**(): `boolean` #### Returns @@ -32,7 +32,7 @@ false if the current editable selection does not contain any nodes, otherwise tr ### insertionParent -• `get` **insertionParent**(): [`ContainerNode`](../interfaces/ContainerNode.md) +▸ `get` **insertionParent**(): [`ContainerNode`](../interfaces/ContainerNode.md) #### Returns @@ -46,9 +46,9 @@ other UI state. ### selection -• `get` **selection**(): readonly [`Node`](Node.md)[] +▸ `get` **selection**(): readonly [`Node`](Node.md)[] -• `set` **selection**(`nodes`): `void` +▸ `set` **selection**(`nodes`): `void` Sets the current selection, automatically ensuring these rules are met: @@ -58,7 +58,7 @@ Sets the current selection, automatically ensuring these rules are met: #### Parameters -• **nodes**: `undefined` \| [`Node`](Node.md) \| readonly [`Node`](Node.md)[] +▸ **nodes**: `undefined` \| [`Node`](Node.md) \| readonly [`Node`](Node.md)[] #### Returns @@ -70,7 +70,7 @@ the current selection. Nodes that are locked or otherwise non-editable are never ### selectionIncludingNonEditable -• `get` **selectionIncludingNonEditable**(): readonly [`Node`](Node.md)[] +▸ `get` **selectionIncludingNonEditable**(): readonly [`Node`](Node.md)[] #### Returns diff --git a/src/pages/references/document-sandbox/document-apis/classes/Editor.md b/src/pages/references/document-sandbox/document-apis/classes/Editor.md index 5bb53e016..892eba361 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/Editor.md +++ b/src/pages/references/document-sandbox/document-apis/classes/Editor.md @@ -8,7 +8,7 @@ Entry point for APIs that read or modify the document's content. ### context -• `get` **context**(): [`Context`](Context.md) +▸ `get` **context**(): [`Context`](Context.md) User's current selection context @@ -20,7 +20,7 @@ User's current selection context ### documentRoot -• `get` **documentRoot**(): [`ExpressRootNode`](ExpressRootNode.md) +▸ `get` **documentRoot**(): [`ExpressRootNode`](ExpressRootNode.md) #### Returns @@ -32,7 +32,7 @@ the root of the document. ### createEllipse() -• **createEllipse**(): [`EllipseNode`](EllipseNode.md) +▸ **createEllipse**(): [`EllipseNode`](EllipseNode.md) #### Returns @@ -45,7 +45,7 @@ Transform values default to 0. ### createGroup() -• **createGroup**(): [`GroupNode`](GroupNode.md) +▸ **createGroup**(): [`GroupNode`](GroupNode.md) #### Returns @@ -57,7 +57,7 @@ a group node. ### createImageContainer() -• **createImageContainer**(`bitmapData`, `options`): [`MediaContainerNode`](MediaContainerNode.md) +▸ **createImageContainer**(`bitmapData`, `options`): [`MediaContainerNode`](MediaContainerNode.md) Creates a bitmap image, represented as a multi-node MediaContainerNode structure. Always creates a "full-frame," uncropped image initially, but cropping can be changed after it is created by modifying the properties of the @@ -69,17 +69,17 @@ This local client will act as having unsaved changes until the upload has finish #### Parameters -• **bitmapData**: [`BitmapImage`](../interfaces/BitmapImage.md) +▸ **bitmapData**: [`BitmapImage`](../interfaces/BitmapImage.md) BitmapImage resource (e.g. returned from loadBitmapImage()). -• **options**= `{}` +▸ **options**= `{}` Additional configuration: - initialSize - Size the image is displayed at. Must have the same aspect ratio as bitmapData. Defaults to the size the image would be created at by a UI drag-drop gesture (typically the image's full size, but scaled down if needed to stay below an application-defined size cap). -• **options.initialSize?**: [`RectangleGeometry`](../interfaces/RectangleGeometry.md) +▸ **options.initialSize?**: [`RectangleGeometry`](../interfaces/RectangleGeometry.md) #### Returns @@ -91,7 +91,7 @@ MediaContainerNode representing the top container node of the multi-node structu ### createLine() -• **createLine**(): [`LineNode`](LineNode.md) +▸ **createLine**(): [`LineNode`](LineNode.md) #### Returns @@ -104,11 +104,11 @@ Transform values default to 0. ### createPath() -• **createPath**(`path`): [`PathNode`](PathNode.md) +▸ **createPath**(`path`): [`PathNode`](PathNode.md) #### Parameters -• **path**: `string` +▸ **path**: `string` a string representing any [SVG path element](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths). Note that the path data will be normalized, and therefore the `path` getter may return a different SVG string from the path creation input. @@ -125,7 +125,7 @@ a path node with a default stroke and no initial fill. ### createRectangle() -• **createRectangle**(): [`RectangleNode`](RectangleNode.md) +▸ **createRectangle**(): [`RectangleNode`](RectangleNode.md) #### Returns @@ -138,7 +138,7 @@ Transform values default to 0. ### createText() -• **createText**(): [`TextNode`](TextNode.md) +▸ **createText**(): [`TextNode`](TextNode.md) #### Returns @@ -152,7 +152,7 @@ adjust to accommodate whatever text is set. ### loadBitmapImage() -• **loadBitmapImage**(`bitmapData`): `Promise`<[`BitmapImage`](../interfaces/BitmapImage.md)\> +▸ **loadBitmapImage**(`bitmapData`): `Promise`<[`BitmapImage`](../interfaces/BitmapImage.md)\> Creates a bitmap image resource in the document, which can be displayed in the scenegraph by passing it to [createImageContainer](Editor.md#createimagecontainer) to create a MediaContainerNode. The same BitmapImage can be used to create multiple MediaContainerNodes. @@ -166,7 +166,7 @@ having unsaved changes until all the upload steps have finished. #### Parameters -• **bitmapData**: `Blob` +▸ **bitmapData**: `Blob` Encoded image data in PNG or JPEG format. @@ -178,13 +178,13 @@ Encoded image data in PNG or JPEG format. ### makeColorFill() -• **makeColorFill**(`color`): [`ColorFill`](../interfaces/ColorFill.md) +▸ **makeColorFill**(`color`): [`ColorFill`](../interfaces/ColorFill.md) Convenience helper to create a complete ColorFill value given just its color. #### Parameters -• **color**: [`Color`](../interfaces/Color.md) +▸ **color**: [`Color`](../interfaces/Color.md) The color to use for the fill. @@ -196,7 +196,7 @@ The color to use for the fill. ### makeStroke() -• **makeStroke**(`options`?): [`SolidColorStroke`](../interfaces/SolidColorStroke.md) +▸ **makeStroke**(`options`?): [`SolidColorStroke`](../interfaces/SolidColorStroke.md) Convenience helper to create a complete SolidColorStroke value given just a subset of its fields. All other fields are populated with default values. @@ -214,7 +214,7 @@ See [SolidColorStroke](../interfaces/SolidColorStroke.md) for more details on th #### Parameters -• **options?**: `Partial`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md)\> +▸ **options?**: `Partial`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md)\> #### Returns @@ -226,7 +226,7 @@ a stroke configured with the given options. ### queueAsyncEdit() -• **queueAsyncEdit**(`lambda`): `Promise`<`void`\> +▸ **queueAsyncEdit**(`lambda`): `Promise`<`void`\> Enqueues a function to be run at a later time when edits to the user's document may be performed. You can always edit the document immediately when invoked in response to your add-on's UI code. However, if you delay to await an @@ -252,7 +252,7 @@ async function insertImage(blob) { // Execution doesn't arrive at this line until an async delay, due to the Promise 'await' above // Further edits need to be queued to run at a safe time - editor.queueAsyncEdit(() =• { + editor.queueAsyncEdit(() => { // Create scenenode to display the image, and add it to the current artboard const mediaContainer = editor.createImageContainer(bitmapImage); editor.context.insertionParent.children.append(mediaContainer); @@ -262,7 +262,7 @@ async function insertImage(blob) { #### Parameters -• **lambda** +▸ **lambda** a function which edits the document model. diff --git a/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md b/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md index 4444dbd6a..494868201 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md @@ -12,7 +12,7 @@ An EllipseNode represents an ellipse object in the scenegraph. ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -29,16 +29,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -48,7 +48,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -64,7 +64,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -81,7 +81,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -94,15 +94,15 @@ box. ### fill -• `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> +▸ `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> -• `set` **fill**(`fill`): `void` +▸ `set` **fill**(`fill`): `void` The fill applied to the shape, if any. #### Parameters -• **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) +▸ **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) #### Returns @@ -112,7 +112,7 @@ The fill applied to the shape, if any. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -125,16 +125,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -144,15 +144,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -162,7 +162,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -179,7 +179,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -192,7 +192,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -205,18 +205,18 @@ cumulative rotation from the node's parent containers. ### rx -• `get` **rx**(): `number` +▸ `get` **rx**(): `number` The radius of the ellipse on the x-axis. -• `set` **rx**(`value`): `void` +▸ `set` **rx**(`value`): `void` Set the ellipse radius on the x-axis. Must be at least MIN_DIMENSION / 2. #### Parameters -• **value**: `number` +▸ **value**: `number` #### Returns @@ -226,18 +226,18 @@ Must be at least MIN_DIMENSION / 2. ### ry -• `get` **ry**(): `number` +▸ `get` **ry**(): `number` The radius of the ellipse on the y-axis. -• `set` **ry**(`value`): `void` +▸ `set` **ry**(`value`): `void` Set the ellipse radius on the y-axis. Must be at least MIN_DIMENSION / 2. #### Parameters -• **value**: `number` +▸ **value**: `number` #### Returns @@ -247,9 +247,9 @@ Must be at least MIN_DIMENSION / 2. ### stroke -• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -• `set` **stroke**(`stroke`): `void` +▸ `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -257,7 +257,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -267,7 +267,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -281,7 +281,7 @@ boundsInParent. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -293,17 +293,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -313,7 +313,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -325,7 +325,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -342,7 +342,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -350,7 +350,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -364,7 +364,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -372,9 +372,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -388,7 +388,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -409,18 +409,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -447,7 +447,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -456,11 +456,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md b/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md index a3d8be043..3b227bfe0 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md @@ -16,7 +16,7 @@ The parent of ExpressRootNode is undefined, since it is the root of the document ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -34,7 +34,7 @@ to guarantee all their children are full-fledged Node instances. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -47,7 +47,7 @@ moved to a different part of the document. ### pages -• `get` **pages**(): [`PageList`](PageList.md) +▸ `get` **pages**(): [`PageList`](PageList.md) The pages of the document. All visual content is contained on artboards within the pages. @@ -59,7 +59,7 @@ The pages of the document. All visual content is contained on artboards within t ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -76,7 +76,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -88,7 +88,7 @@ The node's type. ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. diff --git a/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md b/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md index 69e18546a..9e5579bf4 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md @@ -23,7 +23,7 @@ Base class for a Node that can have its own fill and stroke. ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -40,16 +40,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -59,7 +59,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -75,7 +75,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -92,7 +92,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -105,15 +105,15 @@ box. ### fill -• `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> +▸ `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> -• `set` **fill**(`fill`): `void` +▸ `set` **fill**(`fill`): `void` The fill applied to the shape, if any. #### Parameters -• **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) +▸ **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) #### Returns @@ -123,7 +123,7 @@ The fill applied to the shape, if any. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -136,16 +136,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -155,15 +155,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -173,7 +173,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -190,7 +190,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -203,7 +203,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -216,9 +216,9 @@ cumulative rotation from the node's parent containers. ### stroke -• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -• `set` **stroke**(`stroke`): `void` +▸ `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -226,7 +226,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -236,7 +236,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -250,7 +250,7 @@ boundsInParent. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -262,17 +262,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -282,7 +282,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -294,7 +294,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -311,7 +311,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -319,7 +319,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -333,7 +333,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -341,9 +341,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -357,7 +357,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -378,18 +378,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -416,7 +416,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -425,11 +425,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md b/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md index 430cbdba4..987a2aabb 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md @@ -17,7 +17,7 @@ a layout grid that other content can be placed into. ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -34,16 +34,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -53,7 +53,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -69,7 +69,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -86,7 +86,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -99,15 +99,15 @@ box. ### fill -• `get` **fill**(): `Readonly`<[`Fill`](../interfaces/Fill.md)\> +▸ `get` **fill**(): `Readonly`<[`Fill`](../interfaces/Fill.md)\> -• `set` **fill**(`fill`): `void` +▸ `set` **fill**(`fill`): `void` The background fill of the GridLayout. #### Parameters -• **fill**: [`Fill`](../interfaces/Fill.md) +▸ **fill**: [`Fill`](../interfaces/Fill.md) #### Returns @@ -117,7 +117,7 @@ The background fill of the GridLayout. ### height -• `get` **height**(): `number` +▸ `get` **height**(): `number` The height of the node. @@ -129,7 +129,7 @@ The height of the node. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -142,16 +142,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -161,15 +161,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -179,7 +179,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -196,7 +196,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -209,7 +209,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -222,7 +222,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -236,7 +236,7 @@ boundsInParent. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -248,17 +248,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -268,7 +268,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -280,7 +280,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -297,7 +297,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### width -• `get` **width**(): `number` +▸ `get` **width**(): `number` The width of the node. @@ -309,7 +309,7 @@ The width of the node. ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -317,7 +317,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -331,7 +331,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -339,9 +339,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -355,7 +355,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -376,18 +376,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -414,7 +414,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -423,11 +423,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md b/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md index 29e08a3e9..92e9244fd 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md @@ -17,7 +17,7 @@ optional vector mask child. ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -34,16 +34,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -53,7 +53,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -69,7 +69,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> Note: If this group has a maskShape, group's bounds are always identical to the maskShape's, regardless of the group's other content. @@ -82,7 +82,7 @@ group's other content. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -95,7 +95,7 @@ box. ### children -• `get` **children**(): [`ItemList`](ItemList.md)<[`Node`](Node.md)\> +▸ `get` **children**(): [`ItemList`](ItemList.md)<[`Node`](Node.md)\> The Group's regular children. Does not include the maskShape if one is present. Use the methods on this ItemList object to get, add, and remove children. @@ -108,7 +108,7 @@ Use the methods on this ItemList object to get, add, and remove children. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -121,16 +121,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -140,12 +140,12 @@ cannot be edited by the user unless they are unlocked first. ### maskShape -• `get` **maskShape**(): `undefined` \| [`FillableNode`](FillableNode.md) +▸ `get` **maskShape**(): `undefined` \| [`FillableNode`](FillableNode.md) A vector shape that acts as a clipping mask for the content of this group. The mask node is separate from the Group's generic 'children' collection, though both are part of the overall 'allChildren' of this Group. -• `set` **maskShape**(`mask`): `void` +▸ `set` **maskShape**(`mask`): `void` If set to a vector shape, adds a mask or replaces the existing mask on this Group. If set to undefined, removes any mask that was previously set on this Group. @@ -156,7 +156,7 @@ if the given node type cannot be used as a vector mask. #### Parameters -• **mask**: `undefined` \| [`FillableNode`](FillableNode.md) +▸ **mask**: `undefined` \| [`FillableNode`](FillableNode.md) #### Returns @@ -168,15 +168,15 @@ undefined if no mask is set on this group. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -186,7 +186,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -203,7 +203,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -216,7 +216,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -229,7 +229,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -243,7 +243,7 @@ boundsInParent. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -255,17 +255,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -275,7 +275,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -287,7 +287,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -304,7 +304,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -312,7 +312,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -326,7 +326,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -334,9 +334,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -354,7 +354,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -379,18 +379,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -417,7 +417,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -426,11 +426,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md b/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md index 7885828a7..15f1e645b 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md @@ -18,7 +18,7 @@ shape sibling node). ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -35,16 +35,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -54,7 +54,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -70,7 +70,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -87,7 +87,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -100,7 +100,7 @@ box. ### height -• `get` **height**(): `number` +▸ `get` **height**(): `number` Current height of the "full frame" image rectangle, which may not be fully visible due to cropping/clipping by the enclosing media container's maskShape. This size may be different from the original bitmap's size in pixels, but @@ -114,7 +114,7 @@ will always match its aspect ratio. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -127,16 +127,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -146,15 +146,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -164,7 +164,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -181,7 +181,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -194,7 +194,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -207,7 +207,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -221,7 +221,7 @@ boundsInParent. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -233,17 +233,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -253,7 +253,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -265,7 +265,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -282,7 +282,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### width -• `get` **width**(): `number` +▸ `get` **width**(): `number` Current width of the "full frame" image rectangle, which may not be fully visible due to cropping/clipping by the enclosing media container's maskShape. This size may be different from the original bitmap's size in pixels, but @@ -296,7 +296,7 @@ will always match its aspect ratio. ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -304,7 +304,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -318,7 +318,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -326,9 +326,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -342,7 +342,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -363,18 +363,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -401,7 +401,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -410,11 +410,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ItemList.md b/src/pages/references/document-sandbox/document-apis/classes/ItemList.md index 35cd1449f..7255d069f 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ItemList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ItemList.md @@ -16,13 +16,13 @@ This class is used in different places for various types of items, including Nod ## Type parameters -• **T** _extends_ [`ListItem`](../interfaces/ListItem.md) +▸ **T** _extends_ [`ListItem`](../interfaces/ListItem.md) ## Accessors ### first -• `get` **first**(): `undefined` \| `T` +▸ `get` **first**(): `undefined` \| `T` First item in this list, or undefined if list is empty. @@ -34,7 +34,7 @@ First item in this list, or undefined if list is empty. ### last -• `get` **last**(): `undefined` \| `T` +▸ `get` **last**(): `undefined` \| `T` Last item in this list, or undefined if list is empty. @@ -46,7 +46,7 @@ Last item in this list, or undefined if list is empty. ### length -• `get` **length**(): `number` +▸ `get` **length**(): `number` Number of items in this list. @@ -58,7 +58,7 @@ Number of items in this list. ### `[iterator]`() -• **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> +▸ **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. @@ -74,14 +74,14 @@ Iterates over all the items in this list. Mutations that occur mid-iteration are ### append() -• **append**(...`items`): `void` +▸ **append**(...`items`): `void` Add one or more items to the end of the list. The last argument will become the last item in this list. Items are removed from their previous parent, if any – or if an item is already in _this_ list, its index is simply changed. #### Parameters -• ...**items**: `T`[] +▸ ...**items**: `T`[] #### Returns @@ -91,7 +91,7 @@ removed from their previous parent, if any – or if an item is already in _this ### clear() -• **clear**(): `void` +▸ **clear**(): `void` Remove all items from this list. No-op if list is already empty. @@ -103,13 +103,13 @@ Remove all items from this list. No-op if list is already empty. ### indexOf() -• **indexOf**(`item`): `number` +▸ **indexOf**(`item`): `number` Get index of item in list. #### Parameters -• **item**: `T` +▸ **item**: `T` #### Returns @@ -125,7 +125,7 @@ index number, or -1 if item isn't in this list. ### insertAfter() -• **insertAfter**(`newItem`, `after`): `void` +▸ **insertAfter**(`newItem`, `after`): `void` Insert `newItem` so it is immediately after `after` in this list: places `newItem` at the index one higher than `after`, shifting all later items to higher indices (the index of `after` remains unchanged). `newItem` is removed from its previous parent, @@ -133,9 +133,9 @@ if any – or if it's already in _this_ list, its index is simply changed. No-op #### Parameters -• **newItem**: `T` +▸ **newItem**: `T` -• **after**: `T` +▸ **after**: `T` #### Returns @@ -145,7 +145,7 @@ if any – or if it's already in _this_ list, its index is simply changed. No-op ### insertBefore() -• **insertBefore**(`newItem`, `before`): `void` +▸ **insertBefore**(`newItem`, `before`): `void` Insert `newItem` so it is immediately before `before` in this list: places `newItem` at the index that `before` used to occupy, shifting `before` and all later items to higher indices. `newItem` is removed from its previous parent, @@ -153,9 +153,9 @@ if any – or if it's already in _this_ list, its index is simply changed. No-op #### Parameters -• **newItem**: `T` +▸ **newItem**: `T` -• **before**: `T` +▸ **before**: `T` #### Returns @@ -165,13 +165,13 @@ if any – or if it's already in _this_ list, its index is simply changed. No-op ### item() -• **item**(`index`): `undefined` \| `T` +▸ **item**(`index`): `undefined` \| `T` Returns item at the given index, or undefined if index is out of range. #### Parameters -• **index**: `number` +▸ **index**: `number` Zero-based index @@ -187,7 +187,7 @@ Zero-based index ### moveAfter() -• **moveAfter**(`item`, `after`): `void` +▸ **moveAfter**(`item`, `after`): `void` Move `item` so it is immediately after `after` in this list: places `item` at the index one higher than `after`. Depending on the position in the list `item` originally occupied, some other items in the list may shift to higher @@ -195,9 +195,9 @@ or lower indices as a result. No-op if both arguments are the same item. #### Parameters -• **item**: `T` +▸ **item**: `T` -• **after**: `T` +▸ **after**: `T` #### Returns @@ -215,7 +215,7 @@ An error if either argument is not contained in this list. ### moveBefore() -• **moveBefore**(`item`, `before`): `void` +▸ **moveBefore**(`item`, `before`): `void` Move `item` so it is immediately before `before` in this list: places `item` at the index that `before` used to occupy. Depending on the position in the list `item` originally occupied, some other items in the list may @@ -223,9 +223,9 @@ shift to higher or lower indices as a result. No-op if both arguments are the sa #### Parameters -• **item**: `T` +▸ **item**: `T` -• **before**: `T` +▸ **before**: `T` #### Returns @@ -243,13 +243,13 @@ An error if either argument is not contained in this list. ### remove() -• **remove**(...`items`): `void` +▸ **remove**(...`items`): `void` Remove the items from the list. The items need not be contiguous. #### Parameters -• ...**items**: `T`[] +▸ ...**items**: `T`[] #### Returns @@ -267,7 +267,7 @@ If any of the items are not in the list, or if it is illegal to remove any of th ### replace() -• **replace**(`oldItem`, `newItem`): `void` +▸ **replace**(`oldItem`, `newItem`): `void` Replace `oldItem` with `newItem` in this list. Throws if `oldItem` is not a member of this list. `newItem` is removed from its previous parent, if any – or if it's already in _this_ list, its index is simply @@ -275,9 +275,9 @@ changed. No-op if both arguments are the same item. #### Parameters -• **oldItem**: `T` +▸ **oldItem**: `T` -• **newItem**: `T` +▸ **newItem**: `T` #### Returns @@ -287,7 +287,7 @@ changed. No-op if both arguments are the same item. ### toArray() -• **toArray**(): readonly `T`[] +▸ **toArray**(): readonly `T`[] All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. diff --git a/src/pages/references/document-sandbox/document-apis/classes/LineNode.md b/src/pages/references/document-sandbox/document-apis/classes/LineNode.md index fdf23a26b..e5daaf81a 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/LineNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/LineNode.md @@ -12,31 +12,31 @@ A LineNode represents a simple line object in the scenegraph – a single straig ### DEFAULT_END_X -• `static` `readonly` **DEFAULT_END_X**: `100` = `100` +▸ `static` `readonly` **DEFAULT_END_X**: `100` = `100` --- ### DEFAULT_END_Y -• `static` `readonly` **DEFAULT_END_Y**: `100` = `100` +▸ `static` `readonly` **DEFAULT_END_Y**: `100` = `100` --- ### DEFAULT_START_X -• `static` `readonly` **DEFAULT_START_X**: `0` = `0` +▸ `static` `readonly` **DEFAULT_START_X**: `0` = `0` --- ### DEFAULT_START_Y -• `static` `readonly` **DEFAULT_START_Y**: `0` = `0` +▸ `static` `readonly` **DEFAULT_START_Y**: `0` = `0` ## Accessors ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -53,16 +53,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -72,7 +72,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -88,7 +88,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -105,7 +105,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -118,13 +118,13 @@ box. ### endArrowHeadType -• `get` **endArrowHeadType**(): [`ArrowHeadType`](../enumerations/ArrowHeadType.md) +▸ `get` **endArrowHeadType**(): [`ArrowHeadType`](../enumerations/ArrowHeadType.md) The shape encapsulating the end of a line. Returns [ArrowHeadType.none](../enumerations/ArrowHeadType.md#none) if there is no stroke on the line. -• `set` **endArrowHeadType**(`type`): `void` +▸ `set` **endArrowHeadType**(`type`): `void` The setter sets a default stroke on the line if it did not have one. @@ -135,7 +135,7 @@ More complex stroke types do not support arrowheads. #### Parameters -• **type**: [`ArrowHeadType`](../enumerations/ArrowHeadType.md) +▸ **type**: [`ArrowHeadType`](../enumerations/ArrowHeadType.md) #### Returns @@ -145,7 +145,7 @@ More complex stroke types do not support arrowheads. ### endX -• `get` **endX**(): `number` +▸ `get` **endX**(): `number` The end point on the x-axis in the parent's coordinate system. Modify using `setEndPoints()`. @@ -157,7 +157,7 @@ The end point on the x-axis in the parent's coordinate system. Modify using `set ### endY -• `get` **endY**(): `number` +▸ `get` **endY**(): `number` The end point on the y-axis in the parent's coordinate system. Modify using `setEndPoints()`. @@ -169,7 +169,7 @@ The end point on the y-axis in the parent's coordinate system. Modify using `set ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -182,16 +182,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -201,15 +201,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -219,7 +219,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -236,7 +236,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -249,7 +249,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -262,13 +262,13 @@ cumulative rotation from the node's parent containers. ### startArrowHeadType -• `get` **startArrowHeadType**(): [`ArrowHeadType`](../enumerations/ArrowHeadType.md) +▸ `get` **startArrowHeadType**(): [`ArrowHeadType`](../enumerations/ArrowHeadType.md) The shape encapsulating the start of a line. Returns [ArrowHeadType.none](../enumerations/ArrowHeadType.md#none) if there is no stroke on the line. -• `set` **startArrowHeadType**(`type`): `void` +▸ `set` **startArrowHeadType**(`type`): `void` The setter sets a default stroke on the line if it did not have one. @@ -279,7 +279,7 @@ More complex stroke types do not support arrowheads. #### Parameters -• **type**: [`ArrowHeadType`](../enumerations/ArrowHeadType.md) +▸ **type**: [`ArrowHeadType`](../enumerations/ArrowHeadType.md) #### Returns @@ -289,7 +289,7 @@ More complex stroke types do not support arrowheads. ### startX -• `get` **startX**(): `number` +▸ `get` **startX**(): `number` The start point on the x-axis in the parent's coordinate system. Modify using `setEndPoints()`. @@ -301,7 +301,7 @@ The start point on the x-axis in the parent's coordinate system. Modify using `s ### startY -• `get` **startY**(): `number` +▸ `get` **startY**(): `number` The start point on the y-axis in the parent's coordinate system. Modify using `setEndPoints()`. @@ -313,9 +313,9 @@ The start point on the y-axis in the parent's coordinate system. Modify using `s ### stroke -• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -• `set` **stroke**(`stroke`): `void` +▸ `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -323,7 +323,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -333,7 +333,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -347,7 +347,7 @@ boundsInParent. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -359,17 +359,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -379,7 +379,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -391,7 +391,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -408,7 +408,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -416,7 +416,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -430,7 +430,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -438,9 +438,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -454,7 +454,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -475,7 +475,7 @@ removal. No-op if node is already an orphan. ### setEndPoints() -• **setEndPoints**(`startX`, `startY`, `endX`, `endY`): `void` +▸ **setEndPoints**(`startX`, `startY`, `endX`, `endY`): `void` Set the start and end points of the line in its local coordinate space (which may differ from its parent's coordinate space based on `transformMatrix`, i.e. @@ -487,13 +487,13 @@ the same. Rotation is preserved. #### Parameters -• **startX**: `number` +▸ **startX**: `number` -• **startY**: `number` +▸ **startY**: `number` -• **endX**: `number` +▸ **endX**: `number` -• **endY**: `number` +▸ **endY**: `number` #### Returns @@ -503,18 +503,18 @@ the same. Rotation is preserved. ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -541,7 +541,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -550,11 +550,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md b/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md index b3751749c..716e146e5 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md @@ -14,7 +14,7 @@ determined by the maskShape which is not necessarily a rectangle. ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -31,16 +31,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -50,7 +50,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -66,7 +66,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -83,7 +83,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -96,7 +96,7 @@ box. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -109,16 +109,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -128,7 +128,7 @@ cannot be edited by the user unless they are unlocked first. ### maskShape -• `get` **maskShape**(): [`FillableNode`](FillableNode.md) +▸ `get` **maskShape**(): [`FillableNode`](FillableNode.md) The mask used for cropping/clipping the media. The bounds of this shape are entire visible bounds of the container. The shape's geometric properties (position, rotation, size, etc.) can be changed, but it cannot be replaced by a @@ -142,7 +142,7 @@ different shape via this API. ### mediaRectangle -• `get` **mediaRectangle**(): [`Node`](Node.md) \| [`ImageRectangleNode`](ImageRectangleNode.md) +▸ `get` **mediaRectangle**(): [`Node`](Node.md) \| [`ImageRectangleNode`](ImageRectangleNode.md) The rectangular node representing the entire, uncropped bounds of the media (e.g. image, GIFs, or video). The media's position and rotation can be changed, but it cannot be resized yet via this API. Media types other than images will yield a plain Node object @@ -156,15 +156,15 @@ for now. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -174,7 +174,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -191,7 +191,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -204,7 +204,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -217,7 +217,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -231,7 +231,7 @@ boundsInParent. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -243,17 +243,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -263,7 +263,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -275,7 +275,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -292,7 +292,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -300,7 +300,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -314,7 +314,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -322,9 +322,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -338,7 +338,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -359,7 +359,7 @@ removal. No-op if node is already an orphan. ### replaceMedia() -• **replaceMedia**(`media`): `void` +▸ **replaceMedia**(`media`): `void` Replace existing media inline. The new media is sized to completely fill the bounds of the existing maskShape; if the media's aspect ratio differs from the maskShape's, the media will be cropped by the maskShape on either the left/right @@ -367,7 +367,7 @@ or top/bottom edges. Currently only supports images as the new media, but previo #### Parameters -• **media**: [`BitmapImage`](../interfaces/BitmapImage.md) +▸ **media**: [`BitmapImage`](../interfaces/BitmapImage.md) New content to display. Currently must be a [BitmapImage](../interfaces/BitmapImage.md). @@ -379,18 +379,18 @@ New content to display. Currently must be a [BitmapImage](../interfaces/BitmapIm ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -417,7 +417,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -426,11 +426,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/Node.md b/src/pages/references/document-sandbox/document-apis/classes/Node.md index b0a4f121f..37b63187b 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/Node.md +++ b/src/pages/references/document-sandbox/document-apis/classes/Node.md @@ -28,7 +28,7 @@ A Node’s parent is always a VisualContentNode but may not be another Node (e.g ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -45,16 +45,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -64,7 +64,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -80,7 +80,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -97,7 +97,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -110,7 +110,7 @@ box. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -123,16 +123,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -142,15 +142,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -160,7 +160,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -177,7 +177,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -190,7 +190,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -203,7 +203,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -217,7 +217,7 @@ boundsInParent. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -229,17 +229,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -249,7 +249,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -261,7 +261,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -278,7 +278,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -286,7 +286,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -296,7 +296,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -304,9 +304,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -320,7 +320,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -341,18 +341,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -375,7 +375,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -384,11 +384,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/PageList.md b/src/pages/references/document-sandbox/document-apis/classes/PageList.md index ffd2111bd..49a601e49 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/PageList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/PageList.md @@ -17,7 +17,7 @@ remove the last remaining page from the list. ### first -• `get` **first**(): `undefined` \| `T` +▸ `get` **first**(): `undefined` \| `T` First item in this list, or undefined if list is empty. @@ -29,7 +29,7 @@ First item in this list, or undefined if list is empty. ### last -• `get` **last**(): `undefined` \| `T` +▸ `get` **last**(): `undefined` \| `T` Last item in this list, or undefined if list is empty. @@ -41,7 +41,7 @@ Last item in this list, or undefined if list is empty. ### length -• `get` **length**(): `number` +▸ `get` **length**(): `number` Number of items in this list. @@ -53,7 +53,7 @@ Number of items in this list. ### `[iterator]`() -• **\[iterator\]**(): `Iterator`<[`PageNode`](PageNode.md), `any`, `undefined`\> +▸ **\[iterator\]**(): `Iterator`<[`PageNode`](PageNode.md), `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. @@ -69,7 +69,7 @@ Iterates over all the items in this list. Mutations that occur mid-iteration are ### addPage() -• **addPage**(`inputGeometry`): [`PageNode`](PageNode.md) +▸ **addPage**(`inputGeometry`): [`PageNode`](PageNode.md) Create a new page containing a single empty artboard, and add it to the end of the list. The artboard is configured with the same defaults as in [ArtboardList.addArtboard](ArtboardList.md#addartboard). The page's artboard becomes the default target for @@ -77,7 +77,7 @@ newly inserted content ([Context.insertionParent](Context.md#insertionparent)) a #### Parameters -• **inputGeometry**: [`RectangleGeometry`](../interfaces/RectangleGeometry.md) +▸ **inputGeometry**: [`RectangleGeometry`](../interfaces/RectangleGeometry.md) #### Returns @@ -87,13 +87,13 @@ newly inserted content ([Context.insertionParent](Context.md#insertionparent)) a ### indexOf() -• **indexOf**(`item`): `number` +▸ **indexOf**(`item`): `number` Get index of item in list. #### Parameters -• **item**: [`PageNode`](PageNode.md) +▸ **item**: [`PageNode`](PageNode.md) #### Returns @@ -109,13 +109,13 @@ index number, or -1 if item isn't in this list. ### item() -• **item**(`index`): `undefined` \| [`PageNode`](PageNode.md) +▸ **item**(`index`): `undefined` \| [`PageNode`](PageNode.md) Returns item at the given index, or undefined if index is out of range. #### Parameters -• **index**: `number` +▸ **index**: `number` Zero-based index @@ -131,7 +131,7 @@ Zero-based index ### moveAfter() -• **moveAfter**(`item`, `after`): `void` +▸ **moveAfter**(`item`, `after`): `void` Move `item` so it is immediately after `after` in this list: places `item` at the index one higher than `after`. Depending on the position in the list `item` originally occupied, some other items in the list may shift to higher @@ -139,9 +139,9 @@ or lower indices as a result. No-op if both arguments are the same item. #### Parameters -• **item**: [`PageNode`](PageNode.md) +▸ **item**: [`PageNode`](PageNode.md) -• **after**: [`PageNode`](PageNode.md) +▸ **after**: [`PageNode`](PageNode.md) #### Returns @@ -159,7 +159,7 @@ An error if either argument is not contained in this list. ### moveBefore() -• **moveBefore**(`item`, `before`): `void` +▸ **moveBefore**(`item`, `before`): `void` Move `item` so it is immediately before `before` in this list: places `item` at the index that `before` used to occupy. Depending on the position in the list `item` originally occupied, some other items in the list may @@ -167,9 +167,9 @@ shift to higher or lower indices as a result. No-op if both arguments are the sa #### Parameters -• **item**: [`PageNode`](PageNode.md) +▸ **item**: [`PageNode`](PageNode.md) -• **before**: [`PageNode`](PageNode.md) +▸ **before**: [`PageNode`](PageNode.md) #### Returns @@ -187,13 +187,13 @@ An error if either argument is not contained in this list. ### remove() -• **remove**(...`items`): `void` +▸ **remove**(...`items`): `void` Remove the items from the list. The items need not be contiguous. #### Parameters -• ...**items**: [`PageNode`](PageNode.md)[] +▸ ...**items**: [`PageNode`](PageNode.md)[] #### Returns @@ -211,7 +211,7 @@ If any of the items are not in the list, or if it is illegal to remove any of th ### toArray() -• **toArray**(): readonly [`PageNode`](PageNode.md)[] +▸ **toArray**(): readonly [`PageNode`](PageNode.md)[] All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. diff --git a/src/pages/references/document-sandbox/document-apis/classes/PageNode.md b/src/pages/references/document-sandbox/document-apis/classes/PageNode.md index b923577e6..83830bd69 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/PageNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/PageNode.md @@ -17,7 +17,7 @@ timeline sequence. Those artboards in turn contain all the visual content of the ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -35,7 +35,7 @@ to guarantee all their children are full-fledged Node instances. ### artboards -• `get` **artboards**(): [`ArtboardList`](ArtboardList.md) +▸ `get` **artboards**(): [`ArtboardList`](ArtboardList.md) The artboards or "scenes" of a page, ordered by timeline sequence. @@ -47,7 +47,7 @@ The artboards or "scenes" of a page, ordered by timeline sequence. ### height -• `get` **height**(): `number` +▸ `get` **height**(): `number` The height of the node. All Artboards within a page share the same dimensions. @@ -60,7 +60,7 @@ All Artboards within a page share the same dimensions. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -73,15 +73,15 @@ moved to a different part of the document. ### name -• `get` **name**(): `undefined` \| `string` +▸ `get` **name**(): `undefined` \| `string` The page's name. Displayed as a user-editable label above the current artboard in the UI. -• `set` **name**(`name`): `void` +▸ `set` **name**(`name`): `void` #### Parameters -• **name**: `undefined` \| `string` +▸ **name**: `undefined` \| `string` #### Returns @@ -91,7 +91,7 @@ The page's name. Displayed as a user-editable label above the current artboard i ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -108,7 +108,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -120,7 +120,7 @@ The node's type. ### width -• `get` **width**(): `number` +▸ `get` **width**(): `number` The width of the node. All Artboards within a page share the same dimensions. @@ -133,7 +133,7 @@ All Artboards within a page share the same dimensions. ### cloneInPlace() -• **cloneInPlace**(): [`PageNode`](PageNode.md) +▸ **cloneInPlace**(): [`PageNode`](PageNode.md) Clones this page, all artboards within it, and all content within those artboards. The cloned page is the same size as the original. Adds the new page immediately after this one in the pages list. The first artboard in the cloned @@ -150,7 +150,7 @@ the cloned page. ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. diff --git a/src/pages/references/document-sandbox/document-apis/classes/PathNode.md b/src/pages/references/document-sandbox/document-apis/classes/PathNode.md index abd9b269a..61cd6ed17 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/PathNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/PathNode.md @@ -13,7 +13,7 @@ yet, only read. ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -30,16 +30,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -65,7 +65,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -82,7 +82,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -95,15 +95,15 @@ box. ### fill -• `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> +▸ `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> -• `set` **fill**(`fill`): `void` +▸ `set` **fill**(`fill`): `void` The fill applied to the shape, if any. #### Parameters -• **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) +▸ **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) #### Returns @@ -113,16 +113,16 @@ The fill applied to the shape, if any. ### fillRule -• `get` **fillRule**(): [`FillRule`](../enumerations/FillRule.md) +▸ `get` **fillRule**(): [`FillRule`](../enumerations/FillRule.md) The fill rule specifies how the interior area of a path is determined in cases where the path is self-intersecting or has multiple disjoint parts. The default value is nonZero. -• `set` **fillRule**(`rule`): `void` +▸ `set` **fillRule**(`rule`): `void` #### Parameters -• **rule**: [`FillRule`](../enumerations/FillRule.md) +▸ **rule**: [`FillRule`](../enumerations/FillRule.md) #### Returns @@ -132,7 +132,7 @@ has multiple disjoint parts. The default value is nonZero. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -145,16 +145,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -164,15 +164,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -182,7 +182,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -199,7 +199,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### path -• `get` **path**(): `string` +▸ `get` **path**(): `string` The path definition as an SVG string. The path data is read-only and cannot be modified via this API yet. Note that the path data will be normalized, and therefore the `path` getter may return a different SVG string from the path creation input. @@ -213,7 +213,7 @@ For example, "M 10 80 Q 52.5 10, 95 80 T 180 80" becomes "M 10 80 C 38.33 33.33 ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -226,7 +226,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -239,9 +239,9 @@ cumulative rotation from the node's parent containers. ### stroke -• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -• `set` **stroke**(`stroke`): `void` +▸ `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -249,7 +249,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -259,7 +259,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -273,7 +273,7 @@ boundsInParent. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -285,17 +285,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -305,7 +305,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -317,7 +317,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -334,7 +334,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -342,7 +342,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -356,7 +356,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -364,9 +364,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -380,7 +380,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -401,18 +401,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -439,7 +439,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -448,11 +448,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md b/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md index c75f977f1..25f9f6518 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md @@ -14,13 +14,13 @@ Items in a bare ReadOnlyItemList cannot be added, removed, or reordered. Subclas ## Type parameters -• **T** _extends_ [`ListItem`](../interfaces/ListItem.md) +▸ **T** _extends_ [`ListItem`](../interfaces/ListItem.md) ## Accessors ### first -• `get` **first**(): `undefined` \| `T` +▸ `get` **first**(): `undefined` \| `T` First item in this list, or undefined if list is empty. @@ -32,7 +32,7 @@ First item in this list, or undefined if list is empty. ### last -• `get` **last**(): `undefined` \| `T` +▸ `get` **last**(): `undefined` \| `T` Last item in this list, or undefined if list is empty. @@ -44,7 +44,7 @@ Last item in this list, or undefined if list is empty. ### length -• `get` **length**(): `number` +▸ `get` **length**(): `number` Number of items in this list. @@ -56,7 +56,7 @@ Number of items in this list. ### `[iterator]`() -• **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> +▸ **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. @@ -68,13 +68,13 @@ Iterates over all the items in this list. Mutations that occur mid-iteration are ### indexOf() -• **indexOf**(`item`): `number` +▸ **indexOf**(`item`): `number` Get index of item in list. #### Parameters -• **item**: `T` +▸ **item**: `T` #### Returns @@ -86,13 +86,13 @@ index number, or -1 if item isn't in this list. ### item() -• **item**(`index`): `undefined` \| `T` +▸ **item**(`index`): `undefined` \| `T` Returns item at the given index, or undefined if index is out of range. #### Parameters -• **index**: `number` +▸ **index**: `number` Zero-based index @@ -104,7 +104,7 @@ Zero-based index ### toArray() -• **toArray**(): readonly `T`[] +▸ **toArray**(): readonly `T`[] All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. diff --git a/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md b/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md index dbcef7209..69ca38bf3 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md @@ -16,7 +16,7 @@ A RectangleNode represents a rectangle object in the scenegraph. ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -33,16 +33,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -52,7 +52,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### bottomLeftRadius -• `get` **bottomLeftRadius**(): `number` +▸ `get` **bottomLeftRadius**(): `number` The radius of the bottom left corner, or 0 if the corner is not rounded. @@ -61,11 +61,11 @@ The radius of the bottom left corner, or 0 if the corner is not rounded. The actual corner radius that is rendered is capped based on the size of the rectangle even if the radius value set here is higher. -• `set` **bottomLeftRadius**(`value`): `void` +▸ `set` **bottomLeftRadius**(`value`): `void` #### Parameters -• **value**: `number` +▸ **value**: `number` #### Returns @@ -75,7 +75,7 @@ even if the radius value set here is higher. ### bottomRightRadius -• `get` **bottomRightRadius**(): `number` +▸ `get` **bottomRightRadius**(): `number` The radius of the bottom right corner, or 0 if the corner is not rounded. @@ -84,11 +84,11 @@ The radius of the bottom right corner, or 0 if the corner is not rounded. The actual corner radius that is rendered is capped based on the size of the rectangle even if the radius value set here is higher. -• `set` **bottomRightRadius**(`value`): `void` +▸ `set` **bottomRightRadius**(`value`): `void` #### Parameters -• **value**: `number` +▸ **value**: `number` #### Returns @@ -98,7 +98,7 @@ even if the radius value set here is higher. ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -114,7 +114,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -131,7 +131,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -144,15 +144,15 @@ box. ### fill -• `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> +▸ `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> -• `set` **fill**(`fill`): `void` +▸ `set` **fill**(`fill`): `void` The fill applied to the shape, if any. #### Parameters -• **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) +▸ **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) #### Returns @@ -162,16 +162,16 @@ The fill applied to the shape, if any. ### height -• `get` **height**(): `number` +▸ `get` **height**(): `number` The height of the node. Must be at least MIN_DIMENSION. -• `set` **height**(`value`): `void` +▸ `set` **height**(`value`): `void` #### Parameters -• **value**: `number` +▸ **value**: `number` #### Returns @@ -181,7 +181,7 @@ Must be at least MIN_DIMENSION. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -194,16 +194,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -213,15 +213,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -231,7 +231,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -248,7 +248,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -261,7 +261,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -274,9 +274,9 @@ cumulative rotation from the node's parent containers. ### stroke -• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -• `set` **stroke**(`stroke`): `void` +▸ `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -284,7 +284,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -294,7 +294,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -308,7 +308,7 @@ boundsInParent. ### topLeftRadius -• `get` **topLeftRadius**(): `number` +▸ `get` **topLeftRadius**(): `number` The radius of the top left corner, or 0 if the corner is not rounded. @@ -317,11 +317,11 @@ The radius of the top left corner, or 0 if the corner is not rounded. The actual corner radius that is rendered is capped based on the size of the rectangle even if the radius value set here is higher. -• `set` **topLeftRadius**(`value`): `void` +▸ `set` **topLeftRadius**(`value`): `void` #### Parameters -• **value**: `number` +▸ **value**: `number` #### Returns @@ -331,7 +331,7 @@ even if the radius value set here is higher. ### topRightRadius -• `get` **topRightRadius**(): `number` +▸ `get` **topRightRadius**(): `number` The radius of the top right corner, or 0 if the corner is not rounded. @@ -340,11 +340,11 @@ The radius of the top right corner, or 0 if the corner is not rounded. The actual corner radius that is rendered is capped based on the size of the rectangle even if the radius value set here is higher. -• `set` **topRightRadius**(`value`): `void` +▸ `set` **topRightRadius**(`value`): `void` #### Parameters -• **value**: `number` +▸ **value**: `number` #### Returns @@ -354,7 +354,7 @@ even if the radius value set here is higher. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -366,17 +366,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -386,7 +386,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -398,7 +398,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -415,16 +415,16 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### width -• `get` **width**(): `number` +▸ `get` **width**(): `number` The width of the node. Must be at least MIN_DIMENSION. -• `set` **width**(`value`): `void` +▸ `set` **width**(`value`): `void` #### Parameters -• **value**: `number` +▸ **value**: `number` #### Returns @@ -434,7 +434,7 @@ Must be at least MIN_DIMENSION. ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -442,7 +442,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -456,7 +456,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### getUniformCornerRadius() -• **getUniformCornerRadius**(): `undefined` \| `number` +▸ **getUniformCornerRadius**(): `undefined` \| `number` If all corners have the same rounding radius value, returns that value (or 0 if all corners are not rounded). If the corner radii differ, returns undefined. @@ -469,7 +469,7 @@ If the corner radii differ, returns undefined. ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -477,9 +477,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -493,7 +493,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -514,18 +514,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -552,7 +552,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -561,11 +561,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. @@ -589,13 +589,13 @@ rectangle.setRotationInParent(45, { x: rectangle.width / 2, y: rectangle.height ### setUniformCornerRadius() -• **setUniformCornerRadius**(`radius`): `void` +▸ **setUniformCornerRadius**(`radius`): `void` Set all corner radii to the same value. Set to 0 to make the corners non-rounded. #### Parameters -• **radius**: `number` +▸ **radius**: `number` #### Returns diff --git a/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md b/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md index 81042c779..464106d90 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md @@ -18,13 +18,13 @@ capabilities, however. ## Type parameters -• **T** _extends_ [`ListItem`](../interfaces/ListItem.md) +▸ **T** _extends_ [`ListItem`](../interfaces/ListItem.md) ## Accessors ### first -• `get` **first**(): `undefined` \| `T` +▸ `get` **first**(): `undefined` \| `T` First item in this list, or undefined if list is empty. @@ -36,7 +36,7 @@ First item in this list, or undefined if list is empty. ### last -• `get` **last**(): `undefined` \| `T` +▸ `get` **last**(): `undefined` \| `T` Last item in this list, or undefined if list is empty. @@ -48,7 +48,7 @@ Last item in this list, or undefined if list is empty. ### length -• `get` **length**(): `number` +▸ `get` **length**(): `number` Number of items in this list. @@ -60,7 +60,7 @@ Number of items in this list. ### `[iterator]`() -• **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> +▸ **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. @@ -76,13 +76,13 @@ Iterates over all the items in this list. Mutations that occur mid-iteration are ### indexOf() -• **indexOf**(`item`): `number` +▸ **indexOf**(`item`): `number` Get index of item in list. #### Parameters -• **item**: `T` +▸ **item**: `T` #### Returns @@ -98,13 +98,13 @@ index number, or -1 if item isn't in this list. ### item() -• **item**(`index`): `undefined` \| `T` +▸ **item**(`index`): `undefined` \| `T` Returns item at the given index, or undefined if index is out of range. #### Parameters -• **index**: `number` +▸ **index**: `number` Zero-based index @@ -120,7 +120,7 @@ Zero-based index ### moveAfter() -• **moveAfter**(`item`, `after`): `void` +▸ **moveAfter**(`item`, `after`): `void` Move `item` so it is immediately after `after` in this list: places `item` at the index one higher than `after`. Depending on the position in the list `item` originally occupied, some other items in the list may shift to higher @@ -128,9 +128,9 @@ or lower indices as a result. No-op if both arguments are the same item. #### Parameters -• **item**: `T` +▸ **item**: `T` -• **after**: `T` +▸ **after**: `T` #### Returns @@ -144,7 +144,7 @@ An error if either argument is not contained in this list. ### moveBefore() -• **moveBefore**(`item`, `before`): `void` +▸ **moveBefore**(`item`, `before`): `void` Move `item` so it is immediately before `before` in this list: places `item` at the index that `before` used to occupy. Depending on the position in the list `item` originally occupied, some other items in the list may @@ -152,9 +152,9 @@ shift to higher or lower indices as a result. No-op if both arguments are the sa #### Parameters -• **item**: `T` +▸ **item**: `T` -• **before**: `T` +▸ **before**: `T` #### Returns @@ -168,13 +168,13 @@ An error if either argument is not contained in this list. ### remove() -• **remove**(...`items`): `void` +▸ **remove**(...`items`): `void` Remove the items from the list. The items need not be contiguous. #### Parameters -• ...**items**: `T`[] +▸ ...**items**: `T`[] #### Returns @@ -188,7 +188,7 @@ If any of the items are not in the list, or if it is illegal to remove any of th ### toArray() -• **toArray**(): readonly `T`[] +▸ **toArray**(): readonly `T`[] All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. diff --git a/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md b/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md index 7c45172d3..2e717695c 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md @@ -13,7 +13,7 @@ is composed of multiple separate paths. ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -30,16 +30,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -65,7 +65,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -82,7 +82,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -95,15 +95,15 @@ box. ### color -• `get` **color**(): `undefined` \| `Readonly`<[`Color`](../interfaces/Color.md)\> +▸ `get` **color**(): `undefined` \| `Readonly`<[`Color`](../interfaces/Color.md)\> The color of the single color shape. -• `set` **color**(`color`): `void` +▸ `set` **color**(`color`): `void` #### Parameters -• **color**: `undefined` \| [`Color`](../interfaces/Color.md) +▸ **color**: `undefined` \| [`Color`](../interfaces/Color.md) #### Returns @@ -113,7 +113,7 @@ The color of the single color shape. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -126,16 +126,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -145,15 +145,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -163,7 +163,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -180,7 +180,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -193,7 +193,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -206,7 +206,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -220,7 +220,7 @@ boundsInParent. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -232,17 +232,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -252,7 +252,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -264,7 +264,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -281,7 +281,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -289,7 +289,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -303,7 +303,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -311,9 +311,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -327,7 +327,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -348,18 +348,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -386,7 +386,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -395,11 +395,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md b/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md index cc5d0bf3f..457b9f21c 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md @@ -22,7 +22,7 @@ Base class for a Node that can have its own stroke. ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -39,16 +39,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -58,7 +58,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -74,7 +74,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -91,7 +91,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -104,7 +104,7 @@ box. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -117,16 +117,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -136,15 +136,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -154,7 +154,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -171,7 +171,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -184,7 +184,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -197,9 +197,9 @@ cumulative rotation from the node's parent containers. ### stroke -• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -• `set` **stroke**(`stroke`): `void` +▸ `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -207,7 +207,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -217,7 +217,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -231,7 +231,7 @@ boundsInParent. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -243,17 +243,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -263,7 +263,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -275,7 +275,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -292,7 +292,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -300,7 +300,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -314,7 +314,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -322,9 +322,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -338,7 +338,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -359,18 +359,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -397,7 +397,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -406,11 +406,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md b/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md index 25d2b261b..22c04af5c 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md @@ -13,7 +13,7 @@ if it is composed of multiple separate paths. ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -30,16 +30,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -65,7 +65,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -82,7 +82,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -95,7 +95,7 @@ box. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -108,16 +108,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -127,15 +127,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -145,7 +145,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -162,7 +162,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -175,7 +175,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -188,9 +188,9 @@ cumulative rotation from the node's parent containers. ### stroke -• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -• `set` **stroke**(`stroke`): `void` +▸ `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -198,7 +198,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -208,7 +208,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -222,7 +222,7 @@ boundsInParent. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -234,17 +234,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -254,7 +254,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -266,7 +266,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -283,7 +283,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -291,7 +291,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -305,7 +305,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -313,9 +313,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -329,7 +329,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -350,18 +350,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -388,7 +388,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -397,11 +397,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. 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 d73b07474..5ee2d174e 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/TextNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/TextNode.md @@ -12,7 +12,7 @@ A TextNode represents a text object in the scenegraph. ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -29,16 +29,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -48,7 +48,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -64,7 +64,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -81,7 +81,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -94,7 +94,7 @@ box. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -107,16 +107,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -126,15 +126,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -144,7 +144,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -161,7 +161,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -174,7 +174,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -187,17 +187,17 @@ cumulative rotation from the node's parent containers. ### text -• `get` **text**(): `string` +▸ `get` **text**(): `string` The text string of the node. -• `set` **text**(`textContent`): `void` +▸ `set` **text**(`textContent`): `void` Sets the text content of the text node. #### Parameters -• **textContent**: `string` +▸ **textContent**: `string` #### Returns @@ -207,15 +207,15 @@ Sets the text content of the text node. ### textAlignment -• `get` **textAlignment**(): [`TextAlignment`](../enumerations/TextAlignment.md) +▸ `get` **textAlignment**(): [`TextAlignment`](../enumerations/TextAlignment.md) The horizontal text alignment of the text node. Alignment is always the same across this node's entire text content. -• `set` **textAlignment**(`alignment`): `void` +▸ `set` **textAlignment**(`alignment`): `void` #### Parameters -• **alignment**: [`TextAlignment`](../enumerations/TextAlignment.md) +▸ **alignment**: [`TextAlignment`](../enumerations/TextAlignment.md) #### Returns @@ -225,7 +225,7 @@ The horizontal text alignment of the text node. Alignment is always the same acr ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -239,7 +239,7 @@ boundsInParent. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -251,17 +251,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -271,7 +271,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -283,7 +283,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -300,7 +300,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -308,7 +308,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -322,7 +322,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -330,9 +330,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -346,7 +346,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -367,18 +367,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -405,7 +405,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -414,11 +414,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md b/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md index d18e9b28b..3b8da1a69 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md @@ -12,7 +12,7 @@ An UnknownNode is a node with limited support and therefore treated as a leaf no ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -29,16 +29,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -• `set` **blendMode**(`value`): `void` +▸ `set` **blendMode**(`value`): `void` #### Parameters -• **value**: [`BlendMode`](../enumerations/BlendMode.md) +▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -48,7 +48,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -• `get` **boundsInParent**(): `Readonly`<`Rect`\> +▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -64,7 +64,7 @@ even for an orphan node with no parent. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -81,7 +81,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -94,7 +94,7 @@ box. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -107,16 +107,16 @@ moved to a different part of the document. ### locked -• `get` **locked**(): `boolean` +▸ `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -• `set` **locked**(`locked`): `void` +▸ `set` **locked**(`locked`): `void` #### Parameters -• **locked**: `boolean` +▸ **locked**: `boolean` #### Returns @@ -126,15 +126,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -• `get` **opacity**(): `number` +▸ `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -• `set` **opacity**(`opacity`): `void` +▸ `set` **opacity**(`opacity`): `void` #### Parameters -• **opacity**: `number` +▸ **opacity**: `number` #### Returns @@ -144,7 +144,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -161,7 +161,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -• `get` **rotation**(): `number` +▸ `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -174,7 +174,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -• `get` **rotationInScreen**(): `number` +▸ `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -187,7 +187,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -201,7 +201,7 @@ boundsInParent. ### transformMatrix -• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -213,17 +213,17 @@ The node's transform matrix relative to its parent. ### translation -• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -• `set` **translation**(`value`): `void` +▸ `set` **translation**(`value`): `void` #### Parameters -• **value**: [`Point`](../interfaces/Point.md) +▸ **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -233,7 +233,7 @@ setting translation directly. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -245,7 +245,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -262,7 +262,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -270,7 +270,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -284,7 +284,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -292,9 +292,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -308,7 +308,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -329,18 +329,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -• **parentPoint**: [`Point`](../interfaces/Point.md) +▸ **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -367,7 +367,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -376,11 +376,11 @@ ancestors also have rotation of their own. #### Parameters -• **angleInDegrees**: `number` +▸ **angleInDegrees**: `number` Angle in degrees. -• **localRotationPoint**: [`Point`](../interfaces/Point.md) +▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md b/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md index 5976caf69..7472a063f 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md @@ -23,7 +23,7 @@ Some VisualNodes might have a non-visual parent such as a PageNode. ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -41,7 +41,7 @@ to guarantee all their children are full-fledged Node instances. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -58,7 +58,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -71,7 +71,7 @@ box. ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -84,7 +84,7 @@ moved to a different part of the document. ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -101,7 +101,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -115,7 +115,7 @@ boundsInParent. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -127,7 +127,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -144,7 +144,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -152,9 +152,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](../interfaces/Point.md) +▸ **localPoint**: [`Point`](../interfaces/Point.md) -• **targetNode**: [`VisualNode`](VisualNode.md) +▸ **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -164,7 +164,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. 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..0c56e7690 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/ArrowHeadType.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/ArrowHeadType.md @@ -10,46 +10,46 @@ _Do not depend on the literal numeric values of these constants_, as they may ch ### circleFilled -• **circleFilled**: `21` +▸ **circleFilled**: `21` --- ### circleHollow -• **circleHollow**: `24` +▸ **circleHollow**: `24` --- ### none -• **none**: `0` +▸ **none**: `0` --- ### openTriangular -• **openTriangular**: `11` +▸ **openTriangular**: `11` --- ### squareFilled -• **squareFilled**: `22` +▸ **squareFilled**: `22` --- ### squareHollow -• **squareHollow**: `25` +▸ **squareHollow**: `25` --- ### triangularFilled -• **triangularFilled**: `7` +▸ **triangularFilled**: `7` --- ### verticalLine -• **verticalLine**: `27` +▸ **verticalLine**: `27` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/BlendMode.md b/src/pages/references/document-sandbox/document-apis/enumerations/BlendMode.md index 14568e4f7..a8270973d 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/BlendMode.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/BlendMode.md @@ -15,73 +15,73 @@ interacts with other siblings within the same container. See documentation below ### color -• **color**: `16` +▸ **color**: `16` --- ### colorBurn -• **colorBurn**: `5` +▸ **colorBurn**: `5` --- ### colorDodge -• **colorDodge**: `8` +▸ **colorDodge**: `8` --- ### darken -• **darken**: `4` +▸ **darken**: `4` --- ### difference -• **difference**: `12` +▸ **difference**: `12` --- ### exclusion -• **exclusion**: `13` +▸ **exclusion**: `13` --- ### hardLight -• **hardLight**: `11` +▸ **hardLight**: `11` --- ### hue -• **hue**: `14` +▸ **hue**: `14` --- ### lighten -• **lighten**: `6` +▸ **lighten**: `6` --- ### luminosity -• **luminosity**: `17` +▸ **luminosity**: `17` --- ### multiply -• **multiply**: `3` +▸ **multiply**: `3` --- ### normal -• **normal**: `2` +▸ **normal**: `2` The normal, default blend mode for leaf nodes. @@ -91,13 +91,13 @@ Note: Group nodes default to using `passThrough` blend mode instead. See below. ### overlay -• **overlay**: `9` +▸ **overlay**: `9` --- ### passThrough -• **passThrough**: `1` +▸ **passThrough**: `1` This blend mode only applies to container nodes with children; for leaf nodes, it is treated the same as `normal`. @@ -112,16 +112,16 @@ Group nodes are set to `passThrough` by default. ### saturation -• **saturation**: `15` +▸ **saturation**: `15` --- ### screen -• **screen**: `7` +▸ **screen**: `7` --- ### softLight -• **softLight**: `10` +▸ **softLight**: `10` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/FillRule.md b/src/pages/references/document-sandbox/document-apis/enumerations/FillRule.md index deaaf1a2d..333852cae 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/FillRule.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/FillRule.md @@ -13,10 +13,10 @@ self-intersecting or contains separate, nested closed loops. ### evenOdd -• **evenOdd**: `1` +▸ **evenOdd**: `1` --- ### nonZero -• **nonZero**: `0` +▸ **nonZero**: `0` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/FillType.md b/src/pages/references/document-sandbox/document-apis/enumerations/FillType.md index e1016165c..c57774f15 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/FillType.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/FillType.md @@ -15,6 +15,6 @@ always have a default/fallback case to handle any unknown values you may encount ### color -• **color**: `"Color"` +▸ **color**: `"Color"` A solid color fill. diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/SceneNodeType.md b/src/pages/references/document-sandbox/document-apis/enumerations/SceneNodeType.md index 16a70c5b7..5ba78c3f7 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/SceneNodeType.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/SceneNodeType.md @@ -15,19 +15,19 @@ always have a default/fallback case to handle any unknown values you may encount ### artboard -• **artboard**: `"ab:Artboard"` +▸ **artboard**: `"ab:Artboard"` --- ### artworkRoot -• **artworkRoot**: `"ArtworkRoot"` +▸ **artworkRoot**: `"ArtworkRoot"` --- ### complexShape -• **complexShape**: `"ComplexShape"` +▸ **complexShape**: `"ComplexShape"` Type of ComplexShapeNode, representing a complex prepackaged shape with fill and stroke, that appears as a leaf node in the UI @@ -35,13 +35,13 @@ Type of ComplexShapeNode, representing a complex prepackaged shape with fill and ### ellipse -• **ellipse**: `"Ellipse"` +▸ **ellipse**: `"Ellipse"` --- ### gridLayout -• **gridLayout**: `"GridLayout"` +▸ **gridLayout**: `"GridLayout"` Type of GridLayoutNode represents a grid layout in the scenegraph used to create a layout grid that other content can be placed into @@ -49,13 +49,13 @@ Type of GridLayoutNode represents a grid layout in the scenegraph used to create ### group -• **group**: `"Group"` +▸ **group**: `"Group"` --- ### imageRectangle -• **imageRectangle**: `"ImageRectangle"` +▸ **imageRectangle**: `"ImageRectangle"` Type of MediaContainerNode's "media rectangle" child when it is holding an image @@ -63,19 +63,19 @@ Type of MediaContainerNode's "media rectangle" child when it is holding an image ### line -• **line**: `"Line"` +▸ **line**: `"Line"` --- ### linkedAsset -• **linkedAsset**: `"LinkedAsset"` +▸ **linkedAsset**: `"LinkedAsset"` --- ### mediaContainer -• **mediaContainer**: `"MediaContainer"` +▸ **mediaContainer**: `"MediaContainer"` Type of MediaContainerNode, representing the top-level container of the multi-node construct used to display images or video. @@ -83,7 +83,7 @@ Type of MediaContainerNode, representing the top-level container of the multi-no ### page -• **page**: `"Page"` +▸ **page**: `"Page"` Type of PageNode @@ -91,25 +91,25 @@ Type of PageNode ### path -• **path**: `"Path"` +▸ **path**: `"Path"` --- ### polygon -• **polygon**: `"artgr:Polygon"` +▸ **polygon**: `"artgr:Polygon"` --- ### rectangle -• **rectangle**: `"Rectangle"` +▸ **rectangle**: `"Rectangle"` --- ### solidColorShape -• **solidColorShape**: `"SolidColorShape"` +▸ **solidColorShape**: `"SolidColorShape"` Type of SolidColorShapeNode, representing a solid-color prepackaged shape that appears as a leaf node in the UI @@ -117,7 +117,7 @@ Type of SolidColorShapeNode, representing a solid-color prepackaged shape that a ### strokeShape -• **strokeShape**: `"StrokeShape"` +▸ **strokeShape**: `"StrokeShape"` Type of StrokeShapeNode, representing a stroke-only prepackaged shape that appears as a leaf node in the UI @@ -125,4 +125,4 @@ Type of StrokeShapeNode, representing a stroke-only prepackaged shape that appea ### text -• **text**: `"Text"` +▸ **text**: `"Text"` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/StrokePosition.md b/src/pages/references/document-sandbox/document-apis/enumerations/StrokePosition.md index 6c93ded08..2a050f3c5 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/StrokePosition.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/StrokePosition.md @@ -12,16 +12,16 @@ A stroke's Stroke.position determines how the thickness of the stroke is aligned ### center -• **center**: `0` +▸ **center**: `0` --- ### inside -• **inside**: `1` +▸ **inside**: `1` --- ### outside -• **outside**: `2` +▸ **outside**: `2` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/StrokeType.md b/src/pages/references/document-sandbox/document-apis/enumerations/StrokeType.md index b64ba64d0..583fcd4c4 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/StrokeType.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/StrokeType.md @@ -15,6 +15,6 @@ always have a default/fallback case to handle any unknown values you may encount ### color -• **color**: `"Color"` +▸ **color**: `"Color"` A solid-color stroke, with optional dashes. 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..87bebb774 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/TextAlignment.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/TextAlignment.md @@ -10,16 +10,16 @@ _Do not depend on the literal numeric values of these constants_, as they may ch ### center -• **center**: `3` +▸ **center**: `3` --- ### left -• **left**: `1` +▸ **left**: `1` --- ### right -• **right**: `2` +▸ **right**: `2` diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/BitmapImage.md b/src/pages/references/document-sandbox/document-apis/interfaces/BitmapImage.md index 4dfb6d09c..f169cd912 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/BitmapImage.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/BitmapImage.md @@ -9,7 +9,7 @@ to display it in the document by creating a MediaContainerNode structure. ### height -• `readonly` **height**: `number` +▸ `readonly` **height**: `number` Original height of the bitmap in pixels. @@ -17,6 +17,6 @@ Original height of the bitmap in pixels. ### width -• `readonly` **width**: `number` +▸ `readonly` **width**: `number` Original width of the bitmap in pixels. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/Color.md b/src/pages/references/document-sandbox/document-apis/interfaces/Color.md index 73bd281d8..6aa79eee1 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/Color.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/Color.md @@ -8,7 +8,7 @@ Represents an RGBA color value. ### alpha -• **alpha**: `number` +▸ **alpha**: `number` The alpha channel in range from 0 - 1. @@ -16,7 +16,7 @@ The alpha channel in range from 0 - 1. ### blue -• **blue**: `number` +▸ **blue**: `number` The blue channel in range from 0 - 1. @@ -24,7 +24,7 @@ The blue channel in range from 0 - 1. ### green -• **green**: `number` +▸ **green**: `number` The green channel in range from 0 - 1. @@ -32,6 +32,6 @@ The green channel in range from 0 - 1. ### red -• **red**: `number` +▸ **red**: `number` The red channel in range from 0 - 1. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/ColorFill.md b/src/pages/references/document-sandbox/document-apis/interfaces/ColorFill.md index ea5aa57b7..f69dda0ae 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/ColorFill.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/ColorFill.md @@ -14,7 +14,7 @@ The most convenient way to create a fill is via `Editor.makeColorFill()`. ### color -• **color**: [`Color`](Color.md) +▸ **color**: [`Color`](Color.md) The fill color. @@ -22,7 +22,7 @@ The fill color. ### type -• `readonly` **type**: [`color`](../enumerations/FillType.md#color) +▸ `readonly` **type**: [`color`](../enumerations/FillType.md#color) The fill type. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md b/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md index 2a46d304a..373141910 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md @@ -17,7 +17,7 @@ more minimal VisualNode (such as Artboard). ### allChildren -• `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](../classes/BaseNode.md)\>\> +▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](../classes/BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -35,7 +35,7 @@ to guarantee all their children are full-fledged Node instances. ### boundsLocal -• `get` **boundsLocal**(): `Readonly`<`Rect`\> +▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -52,7 +52,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -• `get` **centerPointLocal**(): `Readonly`<[`Point`](Point.md)\> +▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -65,7 +65,7 @@ box. ### children -• `get` **children**(): [`ItemList`](../classes/ItemList.md)<[`Node`](../classes/Node.md)\> +▸ `get` **children**(): [`ItemList`](../classes/ItemList.md)<[`Node`](../classes/Node.md)\> The node's children. Use the methods on this ItemList object to get, add, and remove children. @@ -77,7 +77,7 @@ The node's children. Use the methods on this ItemList object to get, add, and re ### id -• `get` **id**(): `string` +▸ `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -90,7 +90,7 @@ moved to a different part of the document. ### parent -• `get` **parent**(): `undefined` \| [`BaseNode`](../classes/BaseNode.md) +▸ `get` **parent**(): `undefined` \| [`BaseNode`](../classes/BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -107,7 +107,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### topLeftLocal -• `get` **topLeftLocal**(): `Readonly`<[`Point`](Point.md)\> +▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -121,7 +121,7 @@ boundsInParent. ### type -• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -133,7 +133,7 @@ The node's type. ### visualRoot -• `get` **visualRoot**(): [`VisualNode`](../classes/VisualNode.md) +▸ `get` **visualRoot**(): [`VisualNode`](../classes/VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -150,7 +150,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### localPointInNode() -• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](Point.md)\> +▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](../classes/VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -158,9 +158,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -• **localPoint**: [`Point`](Point.md) +▸ **localPoint**: [`Point`](Point.md) -• **targetNode**: [`VisualNode`](../classes/VisualNode.md) +▸ **targetNode**: [`VisualNode`](../classes/VisualNode.md) #### Returns @@ -174,7 +174,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -• **removeFromParent**(): `void` +▸ **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/Fill.md b/src/pages/references/document-sandbox/document-apis/interfaces/Fill.md index beb2edcd8..3cf039227 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/Fill.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/Fill.md @@ -14,6 +14,6 @@ other fill types when reading scenegraph content. ### type -• `readonly` **type**: [`color`](../enumerations/FillType.md#color) +▸ `readonly` **type**: [`color`](../enumerations/FillType.md#color) The fill type. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/IFillableNode.md b/src/pages/references/document-sandbox/document-apis/interfaces/IFillableNode.md index 99b93447a..b1af5fe95 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/IFillableNode.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/IFillableNode.md @@ -9,4 +9,4 @@ the FillableNode class. ### fill -• **fill**: `undefined` \| [`Fill`](Fill.md) +▸ **fill**: `undefined` \| [`Fill`](Fill.md) diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/IRectangularNode.md b/src/pages/references/document-sandbox/document-apis/interfaces/IRectangularNode.md index 26478e2c8..73e84cfe1 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/IRectangularNode.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/IRectangularNode.md @@ -8,10 +8,10 @@ Interface for nodes with width and height properties. ### height -• **height**: `number` +▸ **height**: `number` --- ### width -• **width**: `number` +▸ **width**: `number` diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/IStrokableNode.md b/src/pages/references/document-sandbox/document-apis/interfaces/IStrokableNode.md index ea9487218..5786aae99 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/IStrokableNode.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/IStrokableNode.md @@ -9,4 +9,4 @@ from the StrokableNode class. (See [ArtboardNode](../classes/ArtboardNode.md), f ### stroke -• **stroke**: `undefined` \| [`Stroke`](Stroke.md) +▸ **stroke**: `undefined` \| [`Stroke`](Stroke.md) diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/Point.md b/src/pages/references/document-sandbox/document-apis/interfaces/Point.md index 22d439056..57f8ee5ac 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/Point.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/Point.md @@ -8,10 +8,10 @@ Represents a 2D position. ### x -• **x**: `number` +▸ **x**: `number` --- ### y -• **y**: `number` +▸ **y**: `number` diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/RectangleGeometry.md b/src/pages/references/document-sandbox/document-apis/interfaces/RectangleGeometry.md index fe8f89010..b77711726 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/RectangleGeometry.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/RectangleGeometry.md @@ -6,10 +6,10 @@ ### height -• **height**: `number` +▸ **height**: `number` --- ### width -• **width**: `number` +▸ **width**: `number` diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/SolidColorStroke.md b/src/pages/references/document-sandbox/document-apis/interfaces/SolidColorStroke.md index b846ef4d1..c1457dea7 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/SolidColorStroke.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/SolidColorStroke.md @@ -15,7 +15,7 @@ your code in case any other required fields are added to the Stroke descriptor i ### color -• **color**: [`Color`](Color.md) +▸ **color**: [`Color`](Color.md) The color of a stroke. @@ -23,7 +23,7 @@ The color of a stroke. ### dashOffset -• **dashOffset**: `number` +▸ **dashOffset**: `number` Number of pixels the beginning of dash pattern should be offset along the stroke. @@ -31,7 +31,7 @@ Number of pixels the beginning of dash pattern should be offset along the stroke ### dashPattern -• **dashPattern**: `number`[] +▸ **dashPattern**: `number`[] If empty, this is a solid stroke. If non-empty, the values alternate between length of a rendered and blank segment, @@ -42,7 +42,7 @@ Array must be of even length. Values cannot be negative. ### position -• **position**: [`StrokePosition`](../enumerations/StrokePosition.md) +▸ **position**: [`StrokePosition`](../enumerations/StrokePosition.md) The position of the stroke relative to the outline of the shape. @@ -50,7 +50,7 @@ The position of the stroke relative to the outline of the shape. ### type -• `readonly` **type**: [`color`](../enumerations/StrokeType.md#color) +▸ `readonly` **type**: [`color`](../enumerations/StrokeType.md#color) The stroke type. @@ -62,6 +62,6 @@ The stroke type. ### width -• **width**: `number` +▸ **width**: `number` The thickness of a stroke. Must be from MIN_STROKE_WIDTH to MAX_STROKE_WIDTH. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/Stroke.md b/src/pages/references/document-sandbox/document-apis/interfaces/Stroke.md index 907300f68..fdf63f3f9 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/Stroke.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/Stroke.md @@ -14,4 +14,4 @@ other stroke types when reading from scenegraph content. ### type -• `readonly` **type**: [`color`](../enumerations/StrokeType.md#color) +▸ `readonly` **type**: [`color`](../enumerations/StrokeType.md#color) diff --git a/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md b/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md index 21fd66d06..35e0fbbc8 100644 --- a/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md +++ b/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md @@ -2,6 +2,6 @@ # Type alias: SolidColorStrokeWithOptionalType -• **SolidColorStrokeWithOptionalType**: `Omit`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\• & `Partial`<`Pick`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\>\> +▸ **SolidColorStrokeWithOptionalType**: `Omit`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\> & `Partial`<`Pick`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\>\> SolidColorStroke with 'type' property as optional. From 7c525380138e1f6b33111ad8f90fcada73d30f99 Mon Sep 17 00:00:00 2001 From: Abhishek Das Date: Tue, 10 Sep 2024 09:26:38 +0530 Subject: [PATCH 6/8] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df7c7aba2..c92416af4 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ This section outlines the steps that should be taken to format the generated Doc --- ``` -3. The API signatures generated in `classes`, `enumerations`, `interfaces`, `namespaces`, and `type-aliases` is indented. In these directories, find and replace all occurrences of `newline + > + space` with `newline + • + space`, ensuring no code example or closing tag is replaced. +3. The API signatures generated in `classes`, `enumerations`, `interfaces`, `namespaces`, and `type-aliases` is indented. In these directories, find and replace all occurrences of `newline + > + space` with `newline + ▸ + space`, ensuring no code example or closing tag is replaced. 4. Find and replace all \`mat2d\` --> \[\`mat2d\`\]\(https://glmatrix.net/docs/module-mat2d.html\) From cf63bf8dbd95e3b637967c47d1b2a2e72fc7a791 Mon Sep 17 00:00:00 2001 From: Abhishek Das Date: Tue, 10 Sep 2024 09:35:39 +0530 Subject: [PATCH 7/8] Use old bullet for signatures --- README.md | 2 +- .../document-apis/classes/ArtboardList.md | 36 ++--- .../document-apis/classes/ArtboardNode.md | 36 ++--- .../document-apis/classes/BaseNode.md | 10 +- .../document-apis/classes/ColorUtils.md | 30 ++--- .../document-apis/classes/ComplexShapeNode.md | 84 ++++++------ .../document-apis/classes/Context.md | 14 +- .../document-apis/classes/Editor.md | 42 +++--- .../document-apis/classes/EllipseNode.md | 96 ++++++------- .../document-apis/classes/ExpressRootNode.md | 12 +- .../document-apis/classes/FillableNode.md | 84 ++++++------ .../document-apis/classes/GridLayoutNode.md | 82 ++++++------ .../document-apis/classes/GroupNode.md | 80 +++++------ .../classes/ImageRectangleNode.md | 76 +++++------ .../document-apis/classes/ItemList.md | 60 ++++----- .../document-apis/classes/LineNode.md | 116 ++++++++-------- .../classes/MediaContainerNode.md | 80 +++++------ .../document-apis/classes/Node.md | 72 +++++----- .../document-apis/classes/PageList.md | 38 +++--- .../document-apis/classes/PageNode.md | 24 ++-- .../document-apis/classes/PathNode.md | 92 ++++++------- .../document-apis/classes/ReadOnlyItemList.md | 20 +-- .../document-apis/classes/RectangleNode.md | 126 +++++++++--------- .../classes/RestrictedItemList.md | 36 ++--- .../classes/SolidColorShapeNode.md | 78 +++++------ .../document-apis/classes/StrokableNode.md | 78 +++++------ .../document-apis/classes/StrokeShapeNode.md | 78 +++++------ .../document-apis/classes/TextNode.md | 84 ++++++------ .../document-apis/classes/UnknownNode.md | 72 +++++----- .../document-apis/classes/VisualNode.md | 24 ++-- .../enumerations/ArrowHeadType.md | 16 +-- .../document-apis/enumerations/BlendMode.md | 34 ++--- .../document-apis/enumerations/FillRule.md | 4 +- .../document-apis/enumerations/FillType.md | 2 +- .../enumerations/SceneNodeType.md | 34 ++--- .../enumerations/StrokePosition.md | 6 +- .../document-apis/enumerations/StrokeType.md | 2 +- .../enumerations/TextAlignment.md | 6 +- .../document-apis/interfaces/BitmapImage.md | 4 +- .../document-apis/interfaces/Color.md | 8 +- .../document-apis/interfaces/ColorFill.md | 4 +- .../document-apis/interfaces/ContainerNode.md | 26 ++-- .../document-apis/interfaces/Fill.md | 2 +- .../document-apis/interfaces/IFillableNode.md | 2 +- .../interfaces/IRectangularNode.md | 4 +- .../interfaces/IStrokableNode.md | 2 +- .../document-apis/interfaces/Point.md | 4 +- .../interfaces/RectangleGeometry.md | 4 +- .../interfaces/SolidColorStroke.md | 12 +- .../document-apis/interfaces/Stroke.md | 2 +- .../SolidColorStrokeWithOptionalType.md | 2 +- 51 files changed, 971 insertions(+), 971 deletions(-) diff --git a/README.md b/README.md index c92416af4..df7c7aba2 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ This section outlines the steps that should be taken to format the generated Doc --- ``` -3. The API signatures generated in `classes`, `enumerations`, `interfaces`, `namespaces`, and `type-aliases` is indented. In these directories, find and replace all occurrences of `newline + > + space` with `newline + ▸ + space`, ensuring no code example or closing tag is replaced. +3. The API signatures generated in `classes`, `enumerations`, `interfaces`, `namespaces`, and `type-aliases` is indented. In these directories, find and replace all occurrences of `newline + > + space` with `newline + • + space`, ensuring no code example or closing tag is replaced. 4. Find and replace all \`mat2d\` --> \[\`mat2d\`\]\(https://glmatrix.net/docs/module-mat2d.html\) diff --git a/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md b/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md index 034209a41..21ee0c187 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md @@ -16,7 +16,7 @@ remove the last remaining artboard from the list. ### first -▸ `get` **first**(): `undefined` \| `T` +• `get` **first**(): `undefined` \| `T` First item in this list, or undefined if list is empty. @@ -28,7 +28,7 @@ First item in this list, or undefined if list is empty. ### last -▸ `get` **last**(): `undefined` \| `T` +• `get` **last**(): `undefined` \| `T` Last item in this list, or undefined if list is empty. @@ -40,7 +40,7 @@ Last item in this list, or undefined if list is empty. ### length -▸ `get` **length**(): `number` +• `get` **length**(): `number` Number of items in this list. @@ -52,7 +52,7 @@ Number of items in this list. ### `[iterator]`() -▸ **\[iterator\]**(): `Iterator`<[`ArtboardNode`](ArtboardNode.md), `any`, `undefined`\> +• **\[iterator\]**(): `Iterator`<[`ArtboardNode`](ArtboardNode.md), `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. @@ -68,7 +68,7 @@ Iterates over all the items in this list. Mutations that occur mid-iteration are ### addArtboard() -▸ **addArtboard**(): [`ArtboardNode`](ArtboardNode.md) +• **addArtboard**(): [`ArtboardNode`](ArtboardNode.md) Create a new artboard and add it to the end of the list. The artboard size is the same as others on this page. The artboard background is set to default fill color DEFAULT_ARTBOARD_FILL_COLOR. The new artboard becomes the @@ -85,13 +85,13 @@ the newly added artboard. ### indexOf() -▸ **indexOf**(`item`): `number` +• **indexOf**(`item`): `number` Get index of item in list. #### Parameters -▸ **item**: [`ArtboardNode`](ArtboardNode.md) +• **item**: [`ArtboardNode`](ArtboardNode.md) #### Returns @@ -107,13 +107,13 @@ index number, or -1 if item isn't in this list. ### item() -▸ **item**(`index`): `undefined` \| [`ArtboardNode`](ArtboardNode.md) +• **item**(`index`): `undefined` \| [`ArtboardNode`](ArtboardNode.md) Returns item at the given index, or undefined if index is out of range. #### Parameters -▸ **index**: `number` +• **index**: `number` Zero-based index @@ -129,7 +129,7 @@ Zero-based index ### moveAfter() -▸ **moveAfter**(`item`, `after`): `void` +• **moveAfter**(`item`, `after`): `void` Move `item` so it is immediately after `after` in this list: places `item` at the index one higher than `after`. Depending on the position in the list `item` originally occupied, some other items in the list may shift to higher @@ -137,9 +137,9 @@ or lower indices as a result. No-op if both arguments are the same item. #### Parameters -▸ **item**: [`ArtboardNode`](ArtboardNode.md) +• **item**: [`ArtboardNode`](ArtboardNode.md) -▸ **after**: [`ArtboardNode`](ArtboardNode.md) +• **after**: [`ArtboardNode`](ArtboardNode.md) #### Returns @@ -157,7 +157,7 @@ An error if either argument is not contained in this list. ### moveBefore() -▸ **moveBefore**(`item`, `before`): `void` +• **moveBefore**(`item`, `before`): `void` Move `item` so it is immediately before `before` in this list: places `item` at the index that `before` used to occupy. Depending on the position in the list `item` originally occupied, some other items in the list may @@ -165,9 +165,9 @@ shift to higher or lower indices as a result. No-op if both arguments are the sa #### Parameters -▸ **item**: [`ArtboardNode`](ArtboardNode.md) +• **item**: [`ArtboardNode`](ArtboardNode.md) -▸ **before**: [`ArtboardNode`](ArtboardNode.md) +• **before**: [`ArtboardNode`](ArtboardNode.md) #### Returns @@ -185,13 +185,13 @@ An error if either argument is not contained in this list. ### remove() -▸ **remove**(...`items`): `void` +• **remove**(...`items`): `void` Remove the items from the list. The items need not be contiguous. #### Parameters -▸ ...**items**: [`ArtboardNode`](ArtboardNode.md)[] +• ...**items**: [`ArtboardNode`](ArtboardNode.md)[] #### Returns @@ -209,7 +209,7 @@ If any of the items are not in the list, or if it is illegal to remove any of th ### toArray() -▸ **toArray**(): readonly [`ArtboardNode`](ArtboardNode.md)[] +• **toArray**(): readonly [`ArtboardNode`](ArtboardNode.md)[] All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md b/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md index d2dad00f6..115d3a5f0 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md @@ -19,7 +19,7 @@ When multiple artboards exist on a page, the artboards represent "scenes" in a l ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -36,7 +36,7 @@ The children of an Artboard are always other Node classes (never the more minima ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -53,7 +53,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -66,7 +66,7 @@ box. ### children -▸ `get` **children**(): [`ItemList`](ItemList.md)<[`Node`](Node.md)\> +• `get` **children**(): [`ItemList`](ItemList.md)<[`Node`](Node.md)\> The node's children. Use the methods on this ItemList object to get, add, and remove children. @@ -78,15 +78,15 @@ The node's children. Use the methods on this ItemList object to get, add, and re ### fill -▸ `get` **fill**(): `Readonly`<[`Fill`](../interfaces/Fill.md)\> +• `get` **fill**(): `Readonly`<[`Fill`](../interfaces/Fill.md)\> -▸ `set` **fill**(`fill`): `void` +• `set` **fill**(`fill`): `void` The background fill of the artboard. Artboards must always have a fill. #### Parameters -▸ **fill**: [`Fill`](../interfaces/Fill.md) +• **fill**: [`Fill`](../interfaces/Fill.md) #### Returns @@ -96,7 +96,7 @@ The background fill of the artboard. Artboards must always have a fill. ### height -▸ `get` **height**(): `number` +• `get` **height**(): `number` The height of the artboard. @@ -108,7 +108,7 @@ The height of the artboard. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -121,7 +121,7 @@ moved to a different part of the document. ### parent -▸ `get` **parent**(): `undefined` \| [`PageNode`](PageNode.md) +• `get` **parent**(): `undefined` \| [`PageNode`](PageNode.md) The node's parent. Undefined if the node is an orphan. @@ -133,7 +133,7 @@ The node's parent. Undefined if the node is an orphan. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -147,7 +147,7 @@ boundsInParent. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -159,7 +159,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -176,7 +176,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### width -▸ `get` **width**(): `number` +• `get` **width**(): `number` The width of the artboard. @@ -188,7 +188,7 @@ The width of the artboard. ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -196,9 +196,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -216,7 +216,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. diff --git a/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md b/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md index 4ef61d53e..fcd723f7c 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/BaseNode.md @@ -17,7 +17,7 @@ properties. ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -35,7 +35,7 @@ to guarantee all their children are full-fledged Node instances. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -48,7 +48,7 @@ moved to a different part of the document. ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -65,7 +65,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -77,7 +77,7 @@ The node's type. ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ColorUtils.md b/src/pages/references/document-sandbox/document-apis/classes/ColorUtils.md index dd0a81477..b2201ef80 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ColorUtils.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ColorUtils.md @@ -8,14 +8,14 @@ Utility methods for working with color values. ### fromHex() -▸ **fromHex**(`hex`): [`Color`](../interfaces/Color.md) +• **fromHex**(`hex`): [`Color`](../interfaces/Color.md) Create a new color from its equivalent RGBA hex representation. Can specify in 6 digits (RRGGBB) or 8 digits (RRGGBBAA), uppercase or lowercase, with or without leading "#". Alpha defaults to FF (100% opaque) if ommitted. #### Parameters -▸ **hex**: `string` +• **hex**: `string` The color represented as a hexadecimal string. @@ -35,25 +35,25 @@ if the hex string cannot be parsed. #### fromRGB(red, green, blue, alpha) -▸ **fromRGB**(`red`, `green`, `blue`, `alpha`?): [`Color`](../interfaces/Color.md) +• **fromRGB**(`red`, `green`, `blue`, `alpha`?): [`Color`](../interfaces/Color.md) Create a new color object with the given RGBA values. ##### Parameters -▸ **red**: `number` +• **red**: `number` The red channel, from 0 - 1. -▸ **green**: `number` +• **green**: `number` The green channel, from 0 - 1. -▸ **blue**: `number` +• **blue**: `number` The blue channel, from 0 - 1. -▸ **alpha?**: `number` +• **alpha?**: `number` Optional alpha channel, from 0 - 1. Defaults to 1 (opaque). @@ -65,23 +65,23 @@ A new color object. #### fromRGB(color) -▸ **fromRGB**(`color`): [`Color`](../interfaces/Color.md) +• **fromRGB**(`color`): [`Color`](../interfaces/Color.md) Create a new color object given a partial color object where the alpha field may be missing. ##### Parameters -▸ **color** +• **color** Partial color object. Alpha defaults to 1 (opaque). -▸ **color.alpha?**: `number` +• **color.alpha?**: `number` -▸ **color.blue**: `number` +• **color.blue**: `number` -▸ **color.green**: `number` +• **color.green**: `number` -▸ **color.red**: `number` +• **color.red**: `number` ##### Returns @@ -93,13 +93,13 @@ A new color object with all fields present. ### toHex() -▸ **toHex**(`color`): `string` +• **toHex**(`color`): `string` Get the color in 8-digit hex "#RRGGBBAA" format. #### Parameters -▸ **color**: [`Color`](../interfaces/Color.md) +• **color**: [`Color`](../interfaces/Color.md) #### Returns diff --git a/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md b/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md index 36574afe3..43fab8276 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md @@ -13,7 +13,7 @@ of multiple separate paths. ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -30,16 +30,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -65,7 +65,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -82,7 +82,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -95,15 +95,15 @@ box. ### fill -▸ `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> +• `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> -▸ `set` **fill**(`fill`): `void` +• `set` **fill**(`fill`): `void` The fill applied to the shape, if any. #### Parameters -▸ **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) +• **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) #### Returns @@ -113,7 +113,7 @@ The fill applied to the shape, if any. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -126,16 +126,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -145,15 +145,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -163,7 +163,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -180,7 +180,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -193,7 +193,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -206,9 +206,9 @@ cumulative rotation from the node's parent containers. ### stroke -▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -▸ `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -216,7 +216,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -226,7 +226,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -240,7 +240,7 @@ boundsInParent. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -252,17 +252,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -272,7 +272,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -284,7 +284,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -301,7 +301,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -309,7 +309,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -323,7 +323,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -331,9 +331,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -347,7 +347,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -368,18 +368,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -406,7 +406,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -415,11 +415,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/Context.md b/src/pages/references/document-sandbox/document-apis/classes/Context.md index 3c5009114..3f1cb4565 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/Context.md +++ b/src/pages/references/document-sandbox/document-apis/classes/Context.md @@ -8,7 +8,7 @@ Contains the user's current selection state, indicating the content they are foc ### currentPage -▸ `get` **currentPage**(): [`PageNode`](PageNode.md) +• `get` **currentPage**(): [`PageNode`](PageNode.md) #### Returns @@ -20,7 +20,7 @@ The currently viewed page. ### hasSelection -▸ `get` **hasSelection**(): `boolean` +• `get` **hasSelection**(): `boolean` #### Returns @@ -32,7 +32,7 @@ false if the current editable selection does not contain any nodes, otherwise tr ### insertionParent -▸ `get` **insertionParent**(): [`ContainerNode`](../interfaces/ContainerNode.md) +• `get` **insertionParent**(): [`ContainerNode`](../interfaces/ContainerNode.md) #### Returns @@ -46,9 +46,9 @@ other UI state. ### selection -▸ `get` **selection**(): readonly [`Node`](Node.md)[] +• `get` **selection**(): readonly [`Node`](Node.md)[] -▸ `set` **selection**(`nodes`): `void` +• `set` **selection**(`nodes`): `void` Sets the current selection, automatically ensuring these rules are met: @@ -58,7 +58,7 @@ Sets the current selection, automatically ensuring these rules are met: #### Parameters -▸ **nodes**: `undefined` \| [`Node`](Node.md) \| readonly [`Node`](Node.md)[] +• **nodes**: `undefined` \| [`Node`](Node.md) \| readonly [`Node`](Node.md)[] #### Returns @@ -70,7 +70,7 @@ the current selection. Nodes that are locked or otherwise non-editable are never ### selectionIncludingNonEditable -▸ `get` **selectionIncludingNonEditable**(): readonly [`Node`](Node.md)[] +• `get` **selectionIncludingNonEditable**(): readonly [`Node`](Node.md)[] #### Returns diff --git a/src/pages/references/document-sandbox/document-apis/classes/Editor.md b/src/pages/references/document-sandbox/document-apis/classes/Editor.md index 892eba361..402338fb4 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/Editor.md +++ b/src/pages/references/document-sandbox/document-apis/classes/Editor.md @@ -8,7 +8,7 @@ Entry point for APIs that read or modify the document's content. ### context -▸ `get` **context**(): [`Context`](Context.md) +• `get` **context**(): [`Context`](Context.md) User's current selection context @@ -20,7 +20,7 @@ User's current selection context ### documentRoot -▸ `get` **documentRoot**(): [`ExpressRootNode`](ExpressRootNode.md) +• `get` **documentRoot**(): [`ExpressRootNode`](ExpressRootNode.md) #### Returns @@ -32,7 +32,7 @@ the root of the document. ### createEllipse() -▸ **createEllipse**(): [`EllipseNode`](EllipseNode.md) +• **createEllipse**(): [`EllipseNode`](EllipseNode.md) #### Returns @@ -45,7 +45,7 @@ Transform values default to 0. ### createGroup() -▸ **createGroup**(): [`GroupNode`](GroupNode.md) +• **createGroup**(): [`GroupNode`](GroupNode.md) #### Returns @@ -57,7 +57,7 @@ a group node. ### createImageContainer() -▸ **createImageContainer**(`bitmapData`, `options`): [`MediaContainerNode`](MediaContainerNode.md) +• **createImageContainer**(`bitmapData`, `options`): [`MediaContainerNode`](MediaContainerNode.md) Creates a bitmap image, represented as a multi-node MediaContainerNode structure. Always creates a "full-frame," uncropped image initially, but cropping can be changed after it is created by modifying the properties of the @@ -69,17 +69,17 @@ This local client will act as having unsaved changes until the upload has finish #### Parameters -▸ **bitmapData**: [`BitmapImage`](../interfaces/BitmapImage.md) +• **bitmapData**: [`BitmapImage`](../interfaces/BitmapImage.md) BitmapImage resource (e.g. returned from loadBitmapImage()). -▸ **options**= `{}` +• **options**= `{}` Additional configuration: - initialSize - Size the image is displayed at. Must have the same aspect ratio as bitmapData. Defaults to the size the image would be created at by a UI drag-drop gesture (typically the image's full size, but scaled down if needed to stay below an application-defined size cap). -▸ **options.initialSize?**: [`RectangleGeometry`](../interfaces/RectangleGeometry.md) +• **options.initialSize?**: [`RectangleGeometry`](../interfaces/RectangleGeometry.md) #### Returns @@ -91,7 +91,7 @@ MediaContainerNode representing the top container node of the multi-node structu ### createLine() -▸ **createLine**(): [`LineNode`](LineNode.md) +• **createLine**(): [`LineNode`](LineNode.md) #### Returns @@ -104,11 +104,11 @@ Transform values default to 0. ### createPath() -▸ **createPath**(`path`): [`PathNode`](PathNode.md) +• **createPath**(`path`): [`PathNode`](PathNode.md) #### Parameters -▸ **path**: `string` +• **path**: `string` a string representing any [SVG path element](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths). Note that the path data will be normalized, and therefore the `path` getter may return a different SVG string from the path creation input. @@ -125,7 +125,7 @@ a path node with a default stroke and no initial fill. ### createRectangle() -▸ **createRectangle**(): [`RectangleNode`](RectangleNode.md) +• **createRectangle**(): [`RectangleNode`](RectangleNode.md) #### Returns @@ -138,7 +138,7 @@ Transform values default to 0. ### createText() -▸ **createText**(): [`TextNode`](TextNode.md) +• **createText**(): [`TextNode`](TextNode.md) #### Returns @@ -152,7 +152,7 @@ adjust to accommodate whatever text is set. ### loadBitmapImage() -▸ **loadBitmapImage**(`bitmapData`): `Promise`<[`BitmapImage`](../interfaces/BitmapImage.md)\> +• **loadBitmapImage**(`bitmapData`): `Promise`<[`BitmapImage`](../interfaces/BitmapImage.md)\> Creates a bitmap image resource in the document, which can be displayed in the scenegraph by passing it to [createImageContainer](Editor.md#createimagecontainer) to create a MediaContainerNode. The same BitmapImage can be used to create multiple MediaContainerNodes. @@ -166,7 +166,7 @@ having unsaved changes until all the upload steps have finished. #### Parameters -▸ **bitmapData**: `Blob` +• **bitmapData**: `Blob` Encoded image data in PNG or JPEG format. @@ -178,13 +178,13 @@ Encoded image data in PNG or JPEG format. ### makeColorFill() -▸ **makeColorFill**(`color`): [`ColorFill`](../interfaces/ColorFill.md) +• **makeColorFill**(`color`): [`ColorFill`](../interfaces/ColorFill.md) Convenience helper to create a complete ColorFill value given just its color. #### Parameters -▸ **color**: [`Color`](../interfaces/Color.md) +• **color**: [`Color`](../interfaces/Color.md) The color to use for the fill. @@ -196,7 +196,7 @@ The color to use for the fill. ### makeStroke() -▸ **makeStroke**(`options`?): [`SolidColorStroke`](../interfaces/SolidColorStroke.md) +• **makeStroke**(`options`?): [`SolidColorStroke`](../interfaces/SolidColorStroke.md) Convenience helper to create a complete SolidColorStroke value given just a subset of its fields. All other fields are populated with default values. @@ -214,7 +214,7 @@ See [SolidColorStroke](../interfaces/SolidColorStroke.md) for more details on th #### Parameters -▸ **options?**: `Partial`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md)\> +• **options?**: `Partial`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md)\> #### Returns @@ -226,7 +226,7 @@ a stroke configured with the given options. ### queueAsyncEdit() -▸ **queueAsyncEdit**(`lambda`): `Promise`<`void`\> +• **queueAsyncEdit**(`lambda`): `Promise`<`void`\> Enqueues a function to be run at a later time when edits to the user's document may be performed. You can always edit the document immediately when invoked in response to your add-on's UI code. However, if you delay to await an @@ -262,7 +262,7 @@ async function insertImage(blob) { #### Parameters -▸ **lambda** +• **lambda** a function which edits the document model. diff --git a/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md b/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md index 494868201..4444dbd6a 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/EllipseNode.md @@ -12,7 +12,7 @@ An EllipseNode represents an ellipse object in the scenegraph. ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -29,16 +29,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -48,7 +48,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -64,7 +64,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -81,7 +81,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -94,15 +94,15 @@ box. ### fill -▸ `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> +• `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> -▸ `set` **fill**(`fill`): `void` +• `set` **fill**(`fill`): `void` The fill applied to the shape, if any. #### Parameters -▸ **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) +• **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) #### Returns @@ -112,7 +112,7 @@ The fill applied to the shape, if any. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -125,16 +125,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -144,15 +144,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -162,7 +162,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -179,7 +179,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -192,7 +192,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -205,18 +205,18 @@ cumulative rotation from the node's parent containers. ### rx -▸ `get` **rx**(): `number` +• `get` **rx**(): `number` The radius of the ellipse on the x-axis. -▸ `set` **rx**(`value`): `void` +• `set` **rx**(`value`): `void` Set the ellipse radius on the x-axis. Must be at least MIN_DIMENSION / 2. #### Parameters -▸ **value**: `number` +• **value**: `number` #### Returns @@ -226,18 +226,18 @@ Must be at least MIN_DIMENSION / 2. ### ry -▸ `get` **ry**(): `number` +• `get` **ry**(): `number` The radius of the ellipse on the y-axis. -▸ `set` **ry**(`value`): `void` +• `set` **ry**(`value`): `void` Set the ellipse radius on the y-axis. Must be at least MIN_DIMENSION / 2. #### Parameters -▸ **value**: `number` +• **value**: `number` #### Returns @@ -247,9 +247,9 @@ Must be at least MIN_DIMENSION / 2. ### stroke -▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -▸ `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -257,7 +257,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -267,7 +267,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -281,7 +281,7 @@ boundsInParent. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -293,17 +293,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -313,7 +313,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -325,7 +325,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -342,7 +342,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -350,7 +350,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -364,7 +364,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -372,9 +372,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -388,7 +388,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -409,18 +409,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -447,7 +447,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -456,11 +456,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md b/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md index 3b227bfe0..a3d8be043 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ExpressRootNode.md @@ -16,7 +16,7 @@ The parent of ExpressRootNode is undefined, since it is the root of the document ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -34,7 +34,7 @@ to guarantee all their children are full-fledged Node instances. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -47,7 +47,7 @@ moved to a different part of the document. ### pages -▸ `get` **pages**(): [`PageList`](PageList.md) +• `get` **pages**(): [`PageList`](PageList.md) The pages of the document. All visual content is contained on artboards within the pages. @@ -59,7 +59,7 @@ The pages of the document. All visual content is contained on artboards within t ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -76,7 +76,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -88,7 +88,7 @@ The node's type. ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. diff --git a/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md b/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md index 9e5579bf4..69e18546a 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/FillableNode.md @@ -23,7 +23,7 @@ Base class for a Node that can have its own fill and stroke. ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -40,16 +40,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -59,7 +59,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -75,7 +75,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -92,7 +92,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -105,15 +105,15 @@ box. ### fill -▸ `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> +• `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> -▸ `set` **fill**(`fill`): `void` +• `set` **fill**(`fill`): `void` The fill applied to the shape, if any. #### Parameters -▸ **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) +• **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) #### Returns @@ -123,7 +123,7 @@ The fill applied to the shape, if any. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -136,16 +136,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -155,15 +155,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -173,7 +173,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -190,7 +190,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -203,7 +203,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -216,9 +216,9 @@ cumulative rotation from the node's parent containers. ### stroke -▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -▸ `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -226,7 +226,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -236,7 +236,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -250,7 +250,7 @@ boundsInParent. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -262,17 +262,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -282,7 +282,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -294,7 +294,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -311,7 +311,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -319,7 +319,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -333,7 +333,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -341,9 +341,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -357,7 +357,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -378,18 +378,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -416,7 +416,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -425,11 +425,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md b/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md index 987a2aabb..430cbdba4 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/GridLayoutNode.md @@ -17,7 +17,7 @@ a layout grid that other content can be placed into. ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -34,16 +34,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -53,7 +53,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -69,7 +69,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -86,7 +86,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -99,15 +99,15 @@ box. ### fill -▸ `get` **fill**(): `Readonly`<[`Fill`](../interfaces/Fill.md)\> +• `get` **fill**(): `Readonly`<[`Fill`](../interfaces/Fill.md)\> -▸ `set` **fill**(`fill`): `void` +• `set` **fill**(`fill`): `void` The background fill of the GridLayout. #### Parameters -▸ **fill**: [`Fill`](../interfaces/Fill.md) +• **fill**: [`Fill`](../interfaces/Fill.md) #### Returns @@ -117,7 +117,7 @@ The background fill of the GridLayout. ### height -▸ `get` **height**(): `number` +• `get` **height**(): `number` The height of the node. @@ -129,7 +129,7 @@ The height of the node. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -142,16 +142,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -161,15 +161,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -179,7 +179,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -196,7 +196,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -209,7 +209,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -222,7 +222,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -236,7 +236,7 @@ boundsInParent. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -248,17 +248,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -268,7 +268,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -280,7 +280,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -297,7 +297,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### width -▸ `get` **width**(): `number` +• `get` **width**(): `number` The width of the node. @@ -309,7 +309,7 @@ The width of the node. ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -317,7 +317,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -331,7 +331,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -339,9 +339,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -355,7 +355,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -376,18 +376,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -414,7 +414,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -423,11 +423,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md b/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md index 92e9244fd..29e08a3e9 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/GroupNode.md @@ -17,7 +17,7 @@ optional vector mask child. ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -34,16 +34,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -53,7 +53,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -69,7 +69,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> Note: If this group has a maskShape, group's bounds are always identical to the maskShape's, regardless of the group's other content. @@ -82,7 +82,7 @@ group's other content. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -95,7 +95,7 @@ box. ### children -▸ `get` **children**(): [`ItemList`](ItemList.md)<[`Node`](Node.md)\> +• `get` **children**(): [`ItemList`](ItemList.md)<[`Node`](Node.md)\> The Group's regular children. Does not include the maskShape if one is present. Use the methods on this ItemList object to get, add, and remove children. @@ -108,7 +108,7 @@ Use the methods on this ItemList object to get, add, and remove children. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -121,16 +121,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -140,12 +140,12 @@ cannot be edited by the user unless they are unlocked first. ### maskShape -▸ `get` **maskShape**(): `undefined` \| [`FillableNode`](FillableNode.md) +• `get` **maskShape**(): `undefined` \| [`FillableNode`](FillableNode.md) A vector shape that acts as a clipping mask for the content of this group. The mask node is separate from the Group's generic 'children' collection, though both are part of the overall 'allChildren' of this Group. -▸ `set` **maskShape**(`mask`): `void` +• `set` **maskShape**(`mask`): `void` If set to a vector shape, adds a mask or replaces the existing mask on this Group. If set to undefined, removes any mask that was previously set on this Group. @@ -156,7 +156,7 @@ if the given node type cannot be used as a vector mask. #### Parameters -▸ **mask**: `undefined` \| [`FillableNode`](FillableNode.md) +• **mask**: `undefined` \| [`FillableNode`](FillableNode.md) #### Returns @@ -168,15 +168,15 @@ undefined if no mask is set on this group. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -186,7 +186,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -203,7 +203,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -216,7 +216,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -229,7 +229,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -243,7 +243,7 @@ boundsInParent. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -255,17 +255,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -275,7 +275,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -287,7 +287,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -304,7 +304,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -312,7 +312,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -326,7 +326,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -334,9 +334,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -354,7 +354,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -379,18 +379,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -417,7 +417,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -426,11 +426,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md b/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md index 15f1e645b..7885828a7 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ImageRectangleNode.md @@ -18,7 +18,7 @@ shape sibling node). ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -35,16 +35,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -54,7 +54,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -70,7 +70,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -87,7 +87,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -100,7 +100,7 @@ box. ### height -▸ `get` **height**(): `number` +• `get` **height**(): `number` Current height of the "full frame" image rectangle, which may not be fully visible due to cropping/clipping by the enclosing media container's maskShape. This size may be different from the original bitmap's size in pixels, but @@ -114,7 +114,7 @@ will always match its aspect ratio. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -127,16 +127,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -146,15 +146,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -164,7 +164,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -181,7 +181,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -194,7 +194,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -207,7 +207,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -221,7 +221,7 @@ boundsInParent. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -233,17 +233,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -253,7 +253,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -265,7 +265,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -282,7 +282,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### width -▸ `get` **width**(): `number` +• `get` **width**(): `number` Current width of the "full frame" image rectangle, which may not be fully visible due to cropping/clipping by the enclosing media container's maskShape. This size may be different from the original bitmap's size in pixels, but @@ -296,7 +296,7 @@ will always match its aspect ratio. ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -304,7 +304,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -318,7 +318,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -326,9 +326,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -342,7 +342,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -363,18 +363,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -401,7 +401,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -410,11 +410,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ItemList.md b/src/pages/references/document-sandbox/document-apis/classes/ItemList.md index 7255d069f..35cd1449f 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ItemList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ItemList.md @@ -16,13 +16,13 @@ This class is used in different places for various types of items, including Nod ## Type parameters -▸ **T** _extends_ [`ListItem`](../interfaces/ListItem.md) +• **T** _extends_ [`ListItem`](../interfaces/ListItem.md) ## Accessors ### first -▸ `get` **first**(): `undefined` \| `T` +• `get` **first**(): `undefined` \| `T` First item in this list, or undefined if list is empty. @@ -34,7 +34,7 @@ First item in this list, or undefined if list is empty. ### last -▸ `get` **last**(): `undefined` \| `T` +• `get` **last**(): `undefined` \| `T` Last item in this list, or undefined if list is empty. @@ -46,7 +46,7 @@ Last item in this list, or undefined if list is empty. ### length -▸ `get` **length**(): `number` +• `get` **length**(): `number` Number of items in this list. @@ -58,7 +58,7 @@ Number of items in this list. ### `[iterator]`() -▸ **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> +• **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. @@ -74,14 +74,14 @@ Iterates over all the items in this list. Mutations that occur mid-iteration are ### append() -▸ **append**(...`items`): `void` +• **append**(...`items`): `void` Add one or more items to the end of the list. The last argument will become the last item in this list. Items are removed from their previous parent, if any – or if an item is already in _this_ list, its index is simply changed. #### Parameters -▸ ...**items**: `T`[] +• ...**items**: `T`[] #### Returns @@ -91,7 +91,7 @@ removed from their previous parent, if any – or if an item is already in _this ### clear() -▸ **clear**(): `void` +• **clear**(): `void` Remove all items from this list. No-op if list is already empty. @@ -103,13 +103,13 @@ Remove all items from this list. No-op if list is already empty. ### indexOf() -▸ **indexOf**(`item`): `number` +• **indexOf**(`item`): `number` Get index of item in list. #### Parameters -▸ **item**: `T` +• **item**: `T` #### Returns @@ -125,7 +125,7 @@ index number, or -1 if item isn't in this list. ### insertAfter() -▸ **insertAfter**(`newItem`, `after`): `void` +• **insertAfter**(`newItem`, `after`): `void` Insert `newItem` so it is immediately after `after` in this list: places `newItem` at the index one higher than `after`, shifting all later items to higher indices (the index of `after` remains unchanged). `newItem` is removed from its previous parent, @@ -133,9 +133,9 @@ if any – or if it's already in _this_ list, its index is simply changed. No-op #### Parameters -▸ **newItem**: `T` +• **newItem**: `T` -▸ **after**: `T` +• **after**: `T` #### Returns @@ -145,7 +145,7 @@ if any – or if it's already in _this_ list, its index is simply changed. No-op ### insertBefore() -▸ **insertBefore**(`newItem`, `before`): `void` +• **insertBefore**(`newItem`, `before`): `void` Insert `newItem` so it is immediately before `before` in this list: places `newItem` at the index that `before` used to occupy, shifting `before` and all later items to higher indices. `newItem` is removed from its previous parent, @@ -153,9 +153,9 @@ if any – or if it's already in _this_ list, its index is simply changed. No-op #### Parameters -▸ **newItem**: `T` +• **newItem**: `T` -▸ **before**: `T` +• **before**: `T` #### Returns @@ -165,13 +165,13 @@ if any – or if it's already in _this_ list, its index is simply changed. No-op ### item() -▸ **item**(`index`): `undefined` \| `T` +• **item**(`index`): `undefined` \| `T` Returns item at the given index, or undefined if index is out of range. #### Parameters -▸ **index**: `number` +• **index**: `number` Zero-based index @@ -187,7 +187,7 @@ Zero-based index ### moveAfter() -▸ **moveAfter**(`item`, `after`): `void` +• **moveAfter**(`item`, `after`): `void` Move `item` so it is immediately after `after` in this list: places `item` at the index one higher than `after`. Depending on the position in the list `item` originally occupied, some other items in the list may shift to higher @@ -195,9 +195,9 @@ or lower indices as a result. No-op if both arguments are the same item. #### Parameters -▸ **item**: `T` +• **item**: `T` -▸ **after**: `T` +• **after**: `T` #### Returns @@ -215,7 +215,7 @@ An error if either argument is not contained in this list. ### moveBefore() -▸ **moveBefore**(`item`, `before`): `void` +• **moveBefore**(`item`, `before`): `void` Move `item` so it is immediately before `before` in this list: places `item` at the index that `before` used to occupy. Depending on the position in the list `item` originally occupied, some other items in the list may @@ -223,9 +223,9 @@ shift to higher or lower indices as a result. No-op if both arguments are the sa #### Parameters -▸ **item**: `T` +• **item**: `T` -▸ **before**: `T` +• **before**: `T` #### Returns @@ -243,13 +243,13 @@ An error if either argument is not contained in this list. ### remove() -▸ **remove**(...`items`): `void` +• **remove**(...`items`): `void` Remove the items from the list. The items need not be contiguous. #### Parameters -▸ ...**items**: `T`[] +• ...**items**: `T`[] #### Returns @@ -267,7 +267,7 @@ If any of the items are not in the list, or if it is illegal to remove any of th ### replace() -▸ **replace**(`oldItem`, `newItem`): `void` +• **replace**(`oldItem`, `newItem`): `void` Replace `oldItem` with `newItem` in this list. Throws if `oldItem` is not a member of this list. `newItem` is removed from its previous parent, if any – or if it's already in _this_ list, its index is simply @@ -275,9 +275,9 @@ changed. No-op if both arguments are the same item. #### Parameters -▸ **oldItem**: `T` +• **oldItem**: `T` -▸ **newItem**: `T` +• **newItem**: `T` #### Returns @@ -287,7 +287,7 @@ changed. No-op if both arguments are the same item. ### toArray() -▸ **toArray**(): readonly `T`[] +• **toArray**(): readonly `T`[] All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. diff --git a/src/pages/references/document-sandbox/document-apis/classes/LineNode.md b/src/pages/references/document-sandbox/document-apis/classes/LineNode.md index e5daaf81a..fdf23a26b 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/LineNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/LineNode.md @@ -12,31 +12,31 @@ A LineNode represents a simple line object in the scenegraph – a single straig ### DEFAULT_END_X -▸ `static` `readonly` **DEFAULT_END_X**: `100` = `100` +• `static` `readonly` **DEFAULT_END_X**: `100` = `100` --- ### DEFAULT_END_Y -▸ `static` `readonly` **DEFAULT_END_Y**: `100` = `100` +• `static` `readonly` **DEFAULT_END_Y**: `100` = `100` --- ### DEFAULT_START_X -▸ `static` `readonly` **DEFAULT_START_X**: `0` = `0` +• `static` `readonly` **DEFAULT_START_X**: `0` = `0` --- ### DEFAULT_START_Y -▸ `static` `readonly` **DEFAULT_START_Y**: `0` = `0` +• `static` `readonly` **DEFAULT_START_Y**: `0` = `0` ## Accessors ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -53,16 +53,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -72,7 +72,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -88,7 +88,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -105,7 +105,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -118,13 +118,13 @@ box. ### endArrowHeadType -▸ `get` **endArrowHeadType**(): [`ArrowHeadType`](../enumerations/ArrowHeadType.md) +• `get` **endArrowHeadType**(): [`ArrowHeadType`](../enumerations/ArrowHeadType.md) The shape encapsulating the end of a line. Returns [ArrowHeadType.none](../enumerations/ArrowHeadType.md#none) if there is no stroke on the line. -▸ `set` **endArrowHeadType**(`type`): `void` +• `set` **endArrowHeadType**(`type`): `void` The setter sets a default stroke on the line if it did not have one. @@ -135,7 +135,7 @@ More complex stroke types do not support arrowheads. #### Parameters -▸ **type**: [`ArrowHeadType`](../enumerations/ArrowHeadType.md) +• **type**: [`ArrowHeadType`](../enumerations/ArrowHeadType.md) #### Returns @@ -145,7 +145,7 @@ More complex stroke types do not support arrowheads. ### endX -▸ `get` **endX**(): `number` +• `get` **endX**(): `number` The end point on the x-axis in the parent's coordinate system. Modify using `setEndPoints()`. @@ -157,7 +157,7 @@ The end point on the x-axis in the parent's coordinate system. Modify using `set ### endY -▸ `get` **endY**(): `number` +• `get` **endY**(): `number` The end point on the y-axis in the parent's coordinate system. Modify using `setEndPoints()`. @@ -169,7 +169,7 @@ The end point on the y-axis in the parent's coordinate system. Modify using `set ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -182,16 +182,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -201,15 +201,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -219,7 +219,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -236,7 +236,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -249,7 +249,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -262,13 +262,13 @@ cumulative rotation from the node's parent containers. ### startArrowHeadType -▸ `get` **startArrowHeadType**(): [`ArrowHeadType`](../enumerations/ArrowHeadType.md) +• `get` **startArrowHeadType**(): [`ArrowHeadType`](../enumerations/ArrowHeadType.md) The shape encapsulating the start of a line. Returns [ArrowHeadType.none](../enumerations/ArrowHeadType.md#none) if there is no stroke on the line. -▸ `set` **startArrowHeadType**(`type`): `void` +• `set` **startArrowHeadType**(`type`): `void` The setter sets a default stroke on the line if it did not have one. @@ -279,7 +279,7 @@ More complex stroke types do not support arrowheads. #### Parameters -▸ **type**: [`ArrowHeadType`](../enumerations/ArrowHeadType.md) +• **type**: [`ArrowHeadType`](../enumerations/ArrowHeadType.md) #### Returns @@ -289,7 +289,7 @@ More complex stroke types do not support arrowheads. ### startX -▸ `get` **startX**(): `number` +• `get` **startX**(): `number` The start point on the x-axis in the parent's coordinate system. Modify using `setEndPoints()`. @@ -301,7 +301,7 @@ The start point on the x-axis in the parent's coordinate system. Modify using `s ### startY -▸ `get` **startY**(): `number` +• `get` **startY**(): `number` The start point on the y-axis in the parent's coordinate system. Modify using `setEndPoints()`. @@ -313,9 +313,9 @@ The start point on the y-axis in the parent's coordinate system. Modify using `s ### stroke -▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -▸ `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -323,7 +323,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -333,7 +333,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -347,7 +347,7 @@ boundsInParent. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -359,17 +359,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -379,7 +379,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -391,7 +391,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -408,7 +408,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -416,7 +416,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -430,7 +430,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -438,9 +438,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -454,7 +454,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -475,7 +475,7 @@ removal. No-op if node is already an orphan. ### setEndPoints() -▸ **setEndPoints**(`startX`, `startY`, `endX`, `endY`): `void` +• **setEndPoints**(`startX`, `startY`, `endX`, `endY`): `void` Set the start and end points of the line in its local coordinate space (which may differ from its parent's coordinate space based on `transformMatrix`, i.e. @@ -487,13 +487,13 @@ the same. Rotation is preserved. #### Parameters -▸ **startX**: `number` +• **startX**: `number` -▸ **startY**: `number` +• **startY**: `number` -▸ **endX**: `number` +• **endX**: `number` -▸ **endY**: `number` +• **endY**: `number` #### Returns @@ -503,18 +503,18 @@ the same. Rotation is preserved. ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -541,7 +541,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -550,11 +550,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md b/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md index 716e146e5..b3751749c 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/MediaContainerNode.md @@ -14,7 +14,7 @@ determined by the maskShape which is not necessarily a rectangle. ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -31,16 +31,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -50,7 +50,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -66,7 +66,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -83,7 +83,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -96,7 +96,7 @@ box. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -109,16 +109,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -128,7 +128,7 @@ cannot be edited by the user unless they are unlocked first. ### maskShape -▸ `get` **maskShape**(): [`FillableNode`](FillableNode.md) +• `get` **maskShape**(): [`FillableNode`](FillableNode.md) The mask used for cropping/clipping the media. The bounds of this shape are entire visible bounds of the container. The shape's geometric properties (position, rotation, size, etc.) can be changed, but it cannot be replaced by a @@ -142,7 +142,7 @@ different shape via this API. ### mediaRectangle -▸ `get` **mediaRectangle**(): [`Node`](Node.md) \| [`ImageRectangleNode`](ImageRectangleNode.md) +• `get` **mediaRectangle**(): [`Node`](Node.md) \| [`ImageRectangleNode`](ImageRectangleNode.md) The rectangular node representing the entire, uncropped bounds of the media (e.g. image, GIFs, or video). The media's position and rotation can be changed, but it cannot be resized yet via this API. Media types other than images will yield a plain Node object @@ -156,15 +156,15 @@ for now. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -174,7 +174,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -191,7 +191,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -204,7 +204,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -217,7 +217,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -231,7 +231,7 @@ boundsInParent. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -243,17 +243,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -263,7 +263,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -275,7 +275,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -292,7 +292,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -300,7 +300,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -314,7 +314,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -322,9 +322,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -338,7 +338,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -359,7 +359,7 @@ removal. No-op if node is already an orphan. ### replaceMedia() -▸ **replaceMedia**(`media`): `void` +• **replaceMedia**(`media`): `void` Replace existing media inline. The new media is sized to completely fill the bounds of the existing maskShape; if the media's aspect ratio differs from the maskShape's, the media will be cropped by the maskShape on either the left/right @@ -367,7 +367,7 @@ or top/bottom edges. Currently only supports images as the new media, but previo #### Parameters -▸ **media**: [`BitmapImage`](../interfaces/BitmapImage.md) +• **media**: [`BitmapImage`](../interfaces/BitmapImage.md) New content to display. Currently must be a [BitmapImage](../interfaces/BitmapImage.md). @@ -379,18 +379,18 @@ New content to display. Currently must be a [BitmapImage](../interfaces/BitmapIm ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -417,7 +417,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -426,11 +426,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/Node.md b/src/pages/references/document-sandbox/document-apis/classes/Node.md index 37b63187b..b0a4f121f 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/Node.md +++ b/src/pages/references/document-sandbox/document-apis/classes/Node.md @@ -28,7 +28,7 @@ A Node’s parent is always a VisualContentNode but may not be another Node (e.g ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -45,16 +45,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -64,7 +64,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -80,7 +80,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -97,7 +97,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -110,7 +110,7 @@ box. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -123,16 +123,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -142,15 +142,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -160,7 +160,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -177,7 +177,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -190,7 +190,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -203,7 +203,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -217,7 +217,7 @@ boundsInParent. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -229,17 +229,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -249,7 +249,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -261,7 +261,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -278,7 +278,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -286,7 +286,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -296,7 +296,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -304,9 +304,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -320,7 +320,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -341,18 +341,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -375,7 +375,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -384,11 +384,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/PageList.md b/src/pages/references/document-sandbox/document-apis/classes/PageList.md index 49a601e49..ffd2111bd 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/PageList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/PageList.md @@ -17,7 +17,7 @@ remove the last remaining page from the list. ### first -▸ `get` **first**(): `undefined` \| `T` +• `get` **first**(): `undefined` \| `T` First item in this list, or undefined if list is empty. @@ -29,7 +29,7 @@ First item in this list, or undefined if list is empty. ### last -▸ `get` **last**(): `undefined` \| `T` +• `get` **last**(): `undefined` \| `T` Last item in this list, or undefined if list is empty. @@ -41,7 +41,7 @@ Last item in this list, or undefined if list is empty. ### length -▸ `get` **length**(): `number` +• `get` **length**(): `number` Number of items in this list. @@ -53,7 +53,7 @@ Number of items in this list. ### `[iterator]`() -▸ **\[iterator\]**(): `Iterator`<[`PageNode`](PageNode.md), `any`, `undefined`\> +• **\[iterator\]**(): `Iterator`<[`PageNode`](PageNode.md), `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. @@ -69,7 +69,7 @@ Iterates over all the items in this list. Mutations that occur mid-iteration are ### addPage() -▸ **addPage**(`inputGeometry`): [`PageNode`](PageNode.md) +• **addPage**(`inputGeometry`): [`PageNode`](PageNode.md) Create a new page containing a single empty artboard, and add it to the end of the list. The artboard is configured with the same defaults as in [ArtboardList.addArtboard](ArtboardList.md#addartboard). The page's artboard becomes the default target for @@ -77,7 +77,7 @@ newly inserted content ([Context.insertionParent](Context.md#insertionparent)) a #### Parameters -▸ **inputGeometry**: [`RectangleGeometry`](../interfaces/RectangleGeometry.md) +• **inputGeometry**: [`RectangleGeometry`](../interfaces/RectangleGeometry.md) #### Returns @@ -87,13 +87,13 @@ newly inserted content ([Context.insertionParent](Context.md#insertionparent)) a ### indexOf() -▸ **indexOf**(`item`): `number` +• **indexOf**(`item`): `number` Get index of item in list. #### Parameters -▸ **item**: [`PageNode`](PageNode.md) +• **item**: [`PageNode`](PageNode.md) #### Returns @@ -109,13 +109,13 @@ index number, or -1 if item isn't in this list. ### item() -▸ **item**(`index`): `undefined` \| [`PageNode`](PageNode.md) +• **item**(`index`): `undefined` \| [`PageNode`](PageNode.md) Returns item at the given index, or undefined if index is out of range. #### Parameters -▸ **index**: `number` +• **index**: `number` Zero-based index @@ -131,7 +131,7 @@ Zero-based index ### moveAfter() -▸ **moveAfter**(`item`, `after`): `void` +• **moveAfter**(`item`, `after`): `void` Move `item` so it is immediately after `after` in this list: places `item` at the index one higher than `after`. Depending on the position in the list `item` originally occupied, some other items in the list may shift to higher @@ -139,9 +139,9 @@ or lower indices as a result. No-op if both arguments are the same item. #### Parameters -▸ **item**: [`PageNode`](PageNode.md) +• **item**: [`PageNode`](PageNode.md) -▸ **after**: [`PageNode`](PageNode.md) +• **after**: [`PageNode`](PageNode.md) #### Returns @@ -159,7 +159,7 @@ An error if either argument is not contained in this list. ### moveBefore() -▸ **moveBefore**(`item`, `before`): `void` +• **moveBefore**(`item`, `before`): `void` Move `item` so it is immediately before `before` in this list: places `item` at the index that `before` used to occupy. Depending on the position in the list `item` originally occupied, some other items in the list may @@ -167,9 +167,9 @@ shift to higher or lower indices as a result. No-op if both arguments are the sa #### Parameters -▸ **item**: [`PageNode`](PageNode.md) +• **item**: [`PageNode`](PageNode.md) -▸ **before**: [`PageNode`](PageNode.md) +• **before**: [`PageNode`](PageNode.md) #### Returns @@ -187,13 +187,13 @@ An error if either argument is not contained in this list. ### remove() -▸ **remove**(...`items`): `void` +• **remove**(...`items`): `void` Remove the items from the list. The items need not be contiguous. #### Parameters -▸ ...**items**: [`PageNode`](PageNode.md)[] +• ...**items**: [`PageNode`](PageNode.md)[] #### Returns @@ -211,7 +211,7 @@ If any of the items are not in the list, or if it is illegal to remove any of th ### toArray() -▸ **toArray**(): readonly [`PageNode`](PageNode.md)[] +• **toArray**(): readonly [`PageNode`](PageNode.md)[] All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. diff --git a/src/pages/references/document-sandbox/document-apis/classes/PageNode.md b/src/pages/references/document-sandbox/document-apis/classes/PageNode.md index 83830bd69..b923577e6 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/PageNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/PageNode.md @@ -17,7 +17,7 @@ timeline sequence. Those artboards in turn contain all the visual content of the ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -35,7 +35,7 @@ to guarantee all their children are full-fledged Node instances. ### artboards -▸ `get` **artboards**(): [`ArtboardList`](ArtboardList.md) +• `get` **artboards**(): [`ArtboardList`](ArtboardList.md) The artboards or "scenes" of a page, ordered by timeline sequence. @@ -47,7 +47,7 @@ The artboards or "scenes" of a page, ordered by timeline sequence. ### height -▸ `get` **height**(): `number` +• `get` **height**(): `number` The height of the node. All Artboards within a page share the same dimensions. @@ -60,7 +60,7 @@ All Artboards within a page share the same dimensions. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -73,15 +73,15 @@ moved to a different part of the document. ### name -▸ `get` **name**(): `undefined` \| `string` +• `get` **name**(): `undefined` \| `string` The page's name. Displayed as a user-editable label above the current artboard in the UI. -▸ `set` **name**(`name`): `void` +• `set` **name**(`name`): `void` #### Parameters -▸ **name**: `undefined` \| `string` +• **name**: `undefined` \| `string` #### Returns @@ -91,7 +91,7 @@ The page's name. Displayed as a user-editable label above the current artboard i ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -108,7 +108,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -120,7 +120,7 @@ The node's type. ### width -▸ `get` **width**(): `number` +• `get` **width**(): `number` The width of the node. All Artboards within a page share the same dimensions. @@ -133,7 +133,7 @@ All Artboards within a page share the same dimensions. ### cloneInPlace() -▸ **cloneInPlace**(): [`PageNode`](PageNode.md) +• **cloneInPlace**(): [`PageNode`](PageNode.md) Clones this page, all artboards within it, and all content within those artboards. The cloned page is the same size as the original. Adds the new page immediately after this one in the pages list. The first artboard in the cloned @@ -150,7 +150,7 @@ the cloned page. ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. diff --git a/src/pages/references/document-sandbox/document-apis/classes/PathNode.md b/src/pages/references/document-sandbox/document-apis/classes/PathNode.md index 61cd6ed17..abd9b269a 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/PathNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/PathNode.md @@ -13,7 +13,7 @@ yet, only read. ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -30,16 +30,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -65,7 +65,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -82,7 +82,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -95,15 +95,15 @@ box. ### fill -▸ `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> +• `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> -▸ `set` **fill**(`fill`): `void` +• `set` **fill**(`fill`): `void` The fill applied to the shape, if any. #### Parameters -▸ **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) +• **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) #### Returns @@ -113,16 +113,16 @@ The fill applied to the shape, if any. ### fillRule -▸ `get` **fillRule**(): [`FillRule`](../enumerations/FillRule.md) +• `get` **fillRule**(): [`FillRule`](../enumerations/FillRule.md) The fill rule specifies how the interior area of a path is determined in cases where the path is self-intersecting or has multiple disjoint parts. The default value is nonZero. -▸ `set` **fillRule**(`rule`): `void` +• `set` **fillRule**(`rule`): `void` #### Parameters -▸ **rule**: [`FillRule`](../enumerations/FillRule.md) +• **rule**: [`FillRule`](../enumerations/FillRule.md) #### Returns @@ -132,7 +132,7 @@ has multiple disjoint parts. The default value is nonZero. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -145,16 +145,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -164,15 +164,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -182,7 +182,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -199,7 +199,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### path -▸ `get` **path**(): `string` +• `get` **path**(): `string` The path definition as an SVG string. The path data is read-only and cannot be modified via this API yet. Note that the path data will be normalized, and therefore the `path` getter may return a different SVG string from the path creation input. @@ -213,7 +213,7 @@ For example, "M 10 80 Q 52.5 10, 95 80 T 180 80" becomes "M 10 80 C 38.33 33.33 ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -226,7 +226,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -239,9 +239,9 @@ cumulative rotation from the node's parent containers. ### stroke -▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -▸ `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -249,7 +249,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -259,7 +259,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -273,7 +273,7 @@ boundsInParent. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -285,17 +285,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -305,7 +305,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -317,7 +317,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -334,7 +334,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -342,7 +342,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -356,7 +356,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -364,9 +364,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -380,7 +380,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -401,18 +401,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -439,7 +439,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -448,11 +448,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md b/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md index 25f9f6518..c75f977f1 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/ReadOnlyItemList.md @@ -14,13 +14,13 @@ Items in a bare ReadOnlyItemList cannot be added, removed, or reordered. Subclas ## Type parameters -▸ **T** _extends_ [`ListItem`](../interfaces/ListItem.md) +• **T** _extends_ [`ListItem`](../interfaces/ListItem.md) ## Accessors ### first -▸ `get` **first**(): `undefined` \| `T` +• `get` **first**(): `undefined` \| `T` First item in this list, or undefined if list is empty. @@ -32,7 +32,7 @@ First item in this list, or undefined if list is empty. ### last -▸ `get` **last**(): `undefined` \| `T` +• `get` **last**(): `undefined` \| `T` Last item in this list, or undefined if list is empty. @@ -44,7 +44,7 @@ Last item in this list, or undefined if list is empty. ### length -▸ `get` **length**(): `number` +• `get` **length**(): `number` Number of items in this list. @@ -56,7 +56,7 @@ Number of items in this list. ### `[iterator]`() -▸ **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> +• **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. @@ -68,13 +68,13 @@ Iterates over all the items in this list. Mutations that occur mid-iteration are ### indexOf() -▸ **indexOf**(`item`): `number` +• **indexOf**(`item`): `number` Get index of item in list. #### Parameters -▸ **item**: `T` +• **item**: `T` #### Returns @@ -86,13 +86,13 @@ index number, or -1 if item isn't in this list. ### item() -▸ **item**(`index`): `undefined` \| `T` +• **item**(`index`): `undefined` \| `T` Returns item at the given index, or undefined if index is out of range. #### Parameters -▸ **index**: `number` +• **index**: `number` Zero-based index @@ -104,7 +104,7 @@ Zero-based index ### toArray() -▸ **toArray**(): readonly `T`[] +• **toArray**(): readonly `T`[] All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. diff --git a/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md b/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md index 69ca38bf3..dbcef7209 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/RectangleNode.md @@ -16,7 +16,7 @@ A RectangleNode represents a rectangle object in the scenegraph. ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -33,16 +33,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -52,7 +52,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### bottomLeftRadius -▸ `get` **bottomLeftRadius**(): `number` +• `get` **bottomLeftRadius**(): `number` The radius of the bottom left corner, or 0 if the corner is not rounded. @@ -61,11 +61,11 @@ The radius of the bottom left corner, or 0 if the corner is not rounded. The actual corner radius that is rendered is capped based on the size of the rectangle even if the radius value set here is higher. -▸ `set` **bottomLeftRadius**(`value`): `void` +• `set` **bottomLeftRadius**(`value`): `void` #### Parameters -▸ **value**: `number` +• **value**: `number` #### Returns @@ -75,7 +75,7 @@ even if the radius value set here is higher. ### bottomRightRadius -▸ `get` **bottomRightRadius**(): `number` +• `get` **bottomRightRadius**(): `number` The radius of the bottom right corner, or 0 if the corner is not rounded. @@ -84,11 +84,11 @@ The radius of the bottom right corner, or 0 if the corner is not rounded. The actual corner radius that is rendered is capped based on the size of the rectangle even if the radius value set here is higher. -▸ `set` **bottomRightRadius**(`value`): `void` +• `set` **bottomRightRadius**(`value`): `void` #### Parameters -▸ **value**: `number` +• **value**: `number` #### Returns @@ -98,7 +98,7 @@ even if the radius value set here is higher. ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -114,7 +114,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -131,7 +131,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -144,15 +144,15 @@ box. ### fill -▸ `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> +• `get` **fill**(): `undefined` \| `Readonly`<[`Fill`](../interfaces/Fill.md)\> -▸ `set` **fill**(`fill`): `void` +• `set` **fill**(`fill`): `void` The fill applied to the shape, if any. #### Parameters -▸ **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) +• **fill**: `undefined` \| [`Fill`](../interfaces/Fill.md) #### Returns @@ -162,16 +162,16 @@ The fill applied to the shape, if any. ### height -▸ `get` **height**(): `number` +• `get` **height**(): `number` The height of the node. Must be at least MIN_DIMENSION. -▸ `set` **height**(`value`): `void` +• `set` **height**(`value`): `void` #### Parameters -▸ **value**: `number` +• **value**: `number` #### Returns @@ -181,7 +181,7 @@ Must be at least MIN_DIMENSION. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -194,16 +194,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -213,15 +213,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -231,7 +231,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -248,7 +248,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -261,7 +261,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -274,9 +274,9 @@ cumulative rotation from the node's parent containers. ### stroke -▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -▸ `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -284,7 +284,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -294,7 +294,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -308,7 +308,7 @@ boundsInParent. ### topLeftRadius -▸ `get` **topLeftRadius**(): `number` +• `get` **topLeftRadius**(): `number` The radius of the top left corner, or 0 if the corner is not rounded. @@ -317,11 +317,11 @@ The radius of the top left corner, or 0 if the corner is not rounded. The actual corner radius that is rendered is capped based on the size of the rectangle even if the radius value set here is higher. -▸ `set` **topLeftRadius**(`value`): `void` +• `set` **topLeftRadius**(`value`): `void` #### Parameters -▸ **value**: `number` +• **value**: `number` #### Returns @@ -331,7 +331,7 @@ even if the radius value set here is higher. ### topRightRadius -▸ `get` **topRightRadius**(): `number` +• `get` **topRightRadius**(): `number` The radius of the top right corner, or 0 if the corner is not rounded. @@ -340,11 +340,11 @@ The radius of the top right corner, or 0 if the corner is not rounded. The actual corner radius that is rendered is capped based on the size of the rectangle even if the radius value set here is higher. -▸ `set` **topRightRadius**(`value`): `void` +• `set` **topRightRadius**(`value`): `void` #### Parameters -▸ **value**: `number` +• **value**: `number` #### Returns @@ -354,7 +354,7 @@ even if the radius value set here is higher. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -366,17 +366,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -386,7 +386,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -398,7 +398,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -415,16 +415,16 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### width -▸ `get` **width**(): `number` +• `get` **width**(): `number` The width of the node. Must be at least MIN_DIMENSION. -▸ `set` **width**(`value`): `void` +• `set` **width**(`value`): `void` #### Parameters -▸ **value**: `number` +• **value**: `number` #### Returns @@ -434,7 +434,7 @@ Must be at least MIN_DIMENSION. ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -442,7 +442,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -456,7 +456,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### getUniformCornerRadius() -▸ **getUniformCornerRadius**(): `undefined` \| `number` +• **getUniformCornerRadius**(): `undefined` \| `number` If all corners have the same rounding radius value, returns that value (or 0 if all corners are not rounded). If the corner radii differ, returns undefined. @@ -469,7 +469,7 @@ If the corner radii differ, returns undefined. ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -477,9 +477,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -493,7 +493,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -514,18 +514,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -552,7 +552,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -561,11 +561,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. @@ -589,13 +589,13 @@ rectangle.setRotationInParent(45, { x: rectangle.width / 2, y: rectangle.height ### setUniformCornerRadius() -▸ **setUniformCornerRadius**(`radius`): `void` +• **setUniformCornerRadius**(`radius`): `void` Set all corner radii to the same value. Set to 0 to make the corners non-rounded. #### Parameters -▸ **radius**: `number` +• **radius**: `number` #### Returns diff --git a/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md b/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md index 464106d90..81042c779 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md +++ b/src/pages/references/document-sandbox/document-apis/classes/RestrictedItemList.md @@ -18,13 +18,13 @@ capabilities, however. ## Type parameters -▸ **T** _extends_ [`ListItem`](../interfaces/ListItem.md) +• **T** _extends_ [`ListItem`](../interfaces/ListItem.md) ## Accessors ### first -▸ `get` **first**(): `undefined` \| `T` +• `get` **first**(): `undefined` \| `T` First item in this list, or undefined if list is empty. @@ -36,7 +36,7 @@ First item in this list, or undefined if list is empty. ### last -▸ `get` **last**(): `undefined` \| `T` +• `get` **last**(): `undefined` \| `T` Last item in this list, or undefined if list is empty. @@ -48,7 +48,7 @@ Last item in this list, or undefined if list is empty. ### length -▸ `get` **length**(): `number` +• `get` **length**(): `number` Number of items in this list. @@ -60,7 +60,7 @@ Number of items in this list. ### `[iterator]`() -▸ **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> +• **\[iterator\]**(): `Iterator`<`T`, `any`, `undefined`\> Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator. @@ -76,13 +76,13 @@ Iterates over all the items in this list. Mutations that occur mid-iteration are ### indexOf() -▸ **indexOf**(`item`): `number` +• **indexOf**(`item`): `number` Get index of item in list. #### Parameters -▸ **item**: `T` +• **item**: `T` #### Returns @@ -98,13 +98,13 @@ index number, or -1 if item isn't in this list. ### item() -▸ **item**(`index`): `undefined` \| `T` +• **item**(`index`): `undefined` \| `T` Returns item at the given index, or undefined if index is out of range. #### Parameters -▸ **index**: `number` +• **index**: `number` Zero-based index @@ -120,7 +120,7 @@ Zero-based index ### moveAfter() -▸ **moveAfter**(`item`, `after`): `void` +• **moveAfter**(`item`, `after`): `void` Move `item` so it is immediately after `after` in this list: places `item` at the index one higher than `after`. Depending on the position in the list `item` originally occupied, some other items in the list may shift to higher @@ -128,9 +128,9 @@ or lower indices as a result. No-op if both arguments are the same item. #### Parameters -▸ **item**: `T` +• **item**: `T` -▸ **after**: `T` +• **after**: `T` #### Returns @@ -144,7 +144,7 @@ An error if either argument is not contained in this list. ### moveBefore() -▸ **moveBefore**(`item`, `before`): `void` +• **moveBefore**(`item`, `before`): `void` Move `item` so it is immediately before `before` in this list: places `item` at the index that `before` used to occupy. Depending on the position in the list `item` originally occupied, some other items in the list may @@ -152,9 +152,9 @@ shift to higher or lower indices as a result. No-op if both arguments are the sa #### Parameters -▸ **item**: `T` +• **item**: `T` -▸ **before**: `T` +• **before**: `T` #### Returns @@ -168,13 +168,13 @@ An error if either argument is not contained in this list. ### remove() -▸ **remove**(...`items`): `void` +• **remove**(...`items`): `void` Remove the items from the list. The items need not be contiguous. #### Parameters -▸ ...**items**: `T`[] +• ...**items**: `T`[] #### Returns @@ -188,7 +188,7 @@ If any of the items are not in the list, or if it is illegal to remove any of th ### toArray() -▸ **toArray**(): readonly `T`[] +• **toArray**(): readonly `T`[] All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. diff --git a/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md b/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md index 2e717695c..7c45172d3 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/SolidColorShapeNode.md @@ -13,7 +13,7 @@ is composed of multiple separate paths. ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -30,16 +30,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -65,7 +65,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -82,7 +82,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -95,15 +95,15 @@ box. ### color -▸ `get` **color**(): `undefined` \| `Readonly`<[`Color`](../interfaces/Color.md)\> +• `get` **color**(): `undefined` \| `Readonly`<[`Color`](../interfaces/Color.md)\> The color of the single color shape. -▸ `set` **color**(`color`): `void` +• `set` **color**(`color`): `void` #### Parameters -▸ **color**: `undefined` \| [`Color`](../interfaces/Color.md) +• **color**: `undefined` \| [`Color`](../interfaces/Color.md) #### Returns @@ -113,7 +113,7 @@ The color of the single color shape. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -126,16 +126,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -145,15 +145,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -163,7 +163,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -180,7 +180,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -193,7 +193,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -206,7 +206,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -220,7 +220,7 @@ boundsInParent. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -232,17 +232,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -252,7 +252,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -264,7 +264,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -281,7 +281,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -289,7 +289,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -303,7 +303,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -311,9 +311,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -327,7 +327,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -348,18 +348,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -386,7 +386,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -395,11 +395,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md b/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md index 457b9f21c..cc5d0bf3f 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/StrokableNode.md @@ -22,7 +22,7 @@ Base class for a Node that can have its own stroke. ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -39,16 +39,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -58,7 +58,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -74,7 +74,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -91,7 +91,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -104,7 +104,7 @@ box. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -117,16 +117,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -136,15 +136,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -154,7 +154,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -171,7 +171,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -184,7 +184,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -197,9 +197,9 @@ cumulative rotation from the node's parent containers. ### stroke -▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -▸ `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -207,7 +207,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -217,7 +217,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -231,7 +231,7 @@ boundsInParent. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -243,17 +243,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -263,7 +263,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -275,7 +275,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -292,7 +292,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -300,7 +300,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -314,7 +314,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -322,9 +322,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -338,7 +338,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -359,18 +359,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -397,7 +397,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -406,11 +406,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md b/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md index 22c04af5c..25d2b261b 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/StrokeShapeNode.md @@ -13,7 +13,7 @@ if it is composed of multiple separate paths. ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -30,16 +30,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -49,7 +49,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -65,7 +65,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -82,7 +82,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -95,7 +95,7 @@ box. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -108,16 +108,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -127,15 +127,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -145,7 +145,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -162,7 +162,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -175,7 +175,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -188,9 +188,9 @@ cumulative rotation from the node's parent containers. ### stroke -▸ `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> +• `get` **stroke**(): `undefined` \| `Readonly`<[`Stroke`](../interfaces/Stroke.md)\> -▸ `set` **stroke**(`stroke`): `void` +• `set` **stroke**(`stroke`): `void` The stroke applied to the shape, if any. Only [SolidColorStroke](../interfaces/SolidColorStroke.md) values are supported by the setter, but the "type" field is optional @@ -198,7 +198,7 @@ for backward compatibility. Throws if another type is provided. #### Parameters -▸ **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) +• **stroke**: `undefined` \| [`SolidColorStrokeWithOptionalType`](../type-aliases/SolidColorStrokeWithOptionalType.md) #### Returns @@ -208,7 +208,7 @@ for backward compatibility. Throws if another type is provided. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -222,7 +222,7 @@ boundsInParent. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -234,17 +234,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -254,7 +254,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -266,7 +266,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -283,7 +283,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -291,7 +291,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -305,7 +305,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -313,9 +313,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -329,7 +329,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -350,18 +350,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -388,7 +388,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -397,11 +397,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. 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 5ee2d174e..d73b07474 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/TextNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/TextNode.md @@ -12,7 +12,7 @@ A TextNode represents a text object in the scenegraph. ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -29,16 +29,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -48,7 +48,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -64,7 +64,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -81,7 +81,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -94,7 +94,7 @@ box. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -107,16 +107,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -126,15 +126,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -144,7 +144,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -161,7 +161,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -174,7 +174,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -187,17 +187,17 @@ cumulative rotation from the node's parent containers. ### text -▸ `get` **text**(): `string` +• `get` **text**(): `string` The text string of the node. -▸ `set` **text**(`textContent`): `void` +• `set` **text**(`textContent`): `void` Sets the text content of the text node. #### Parameters -▸ **textContent**: `string` +• **textContent**: `string` #### Returns @@ -207,15 +207,15 @@ Sets the text content of the text node. ### textAlignment -▸ `get` **textAlignment**(): [`TextAlignment`](../enumerations/TextAlignment.md) +• `get` **textAlignment**(): [`TextAlignment`](../enumerations/TextAlignment.md) The horizontal text alignment of the text node. Alignment is always the same across this node's entire text content. -▸ `set` **textAlignment**(`alignment`): `void` +• `set` **textAlignment**(`alignment`): `void` #### Parameters -▸ **alignment**: [`TextAlignment`](../enumerations/TextAlignment.md) +• **alignment**: [`TextAlignment`](../enumerations/TextAlignment.md) #### Returns @@ -225,7 +225,7 @@ The horizontal text alignment of the text node. Alignment is always the same acr ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -239,7 +239,7 @@ boundsInParent. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -251,17 +251,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -271,7 +271,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -283,7 +283,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -300,7 +300,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -308,7 +308,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -322,7 +322,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -330,9 +330,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -346,7 +346,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -367,18 +367,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -405,7 +405,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -414,11 +414,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md b/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md index 3b8da1a69..d18e9b28b 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/UnknownNode.md @@ -12,7 +12,7 @@ An UnknownNode is a node with limited support and therefore treated as a leaf no ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`Node`](Node.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -29,16 +29,16 @@ The children of a Node are always other Node classes (never the more minimal Bas ### blendMode -▸ `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) +• `get` **blendMode**(): [`BlendMode`](../enumerations/BlendMode.md) Blend mode determines how a node is composited onto the content below it. The default value is [BlendMode.normal](../enumerations/BlendMode.md#normal) for most nodes, and [BlendMode.passThrough](../enumerations/BlendMode.md#passthrough) for GroupNodes. -▸ `set` **blendMode**(`value`): `void` +• `set` **blendMode**(`value`): `void` #### Parameters -▸ **value**: [`BlendMode`](../enumerations/BlendMode.md) +• **value**: [`BlendMode`](../enumerations/BlendMode.md) #### Returns @@ -48,7 +48,7 @@ Blend mode determines how a node is composited onto the content below it. The de ### boundsInParent -▸ `get` **boundsInParent**(): `Readonly`<`Rect`\> +• `get` **boundsInParent**(): `Readonly`<`Rect`\> An axis-aligned box in the parent’s coordinate space encompassing the node’s layout bounds (its [boundsLocal](VisualNode.md#boundslocal), as transformed by its position and rotation relative to the parent). If the node has @@ -64,7 +64,7 @@ even for an orphan node with no parent. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -81,7 +81,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -94,7 +94,7 @@ box. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -107,16 +107,16 @@ moved to a different part of the document. ### locked -▸ `get` **locked**(): `boolean` +• `get` **locked**(): `boolean` The node's lock/unlock state. Locked nodes are excluded from the selection (see [Context.selection](Context.md#selection)), and cannot be edited by the user unless they are unlocked first. -▸ `set` **locked**(`locked`): `void` +• `set` **locked**(`locked`): `void` #### Parameters -▸ **locked**: `boolean` +• **locked**: `boolean` #### Returns @@ -126,15 +126,15 @@ cannot be edited by the user unless they are unlocked first. ### opacity -▸ `get` **opacity**(): `number` +• `get` **opacity**(): `number` The node's opacity, from 0.0 to 1.0 -▸ `set` **opacity**(`opacity`): `void` +• `set` **opacity**(`opacity`): `void` #### Parameters -▸ **opacity**: `number` +• **opacity**: `number` #### Returns @@ -144,7 +144,7 @@ The node's opacity, from 0.0 to 1.0 ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -161,7 +161,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### rotation -▸ `get` **rotation**(): `number` +• `get` **rotation**(): `number` The node's local rotation angle in degrees, relative to its parent's axes. Use `setRotationInParent` to change rotation by rotating around a defined centerpoint. @@ -174,7 +174,7 @@ change rotation by rotating around a defined centerpoint. ### rotationInScreen -▸ `get` **rotationInScreen**(): `number` +• `get` **rotationInScreen**(): `number` The node's total rotation angle in degrees, relative to the overall global view of the document – including any cumulative rotation from the node's parent containers. @@ -187,7 +187,7 @@ cumulative rotation from the node's parent containers. ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -201,7 +201,7 @@ boundsInParent. ### transformMatrix -▸ `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) +• `get` **transformMatrix**(): [`mat2d`](https://glmatrix.net/docs/module-mat2d.html) The node's transform matrix relative to its parent. @@ -213,17 +213,17 @@ The node's transform matrix relative to its parent. ### translation -▸ `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **translation**(): `Readonly`<[`Point`](../interfaces/Point.md)\> The translation of the node along its parent's axes. This is identical to the translation component of `transformMatrix`. It is often simpler to set a node's position using `setPositionInParent` than by setting translation directly. -▸ `set` **translation**(`value`): `void` +• `set` **translation**(`value`): `void` #### Parameters -▸ **value**: [`Point`](../interfaces/Point.md) +• **value**: [`Point`](../interfaces/Point.md) #### Returns @@ -233,7 +233,7 @@ setting translation directly. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -245,7 +245,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -262,7 +262,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### boundsInNode() -▸ **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> +• **boundsInNode**(`targetNode`): `Readonly`<`Rect`\> Convert the node's [boundsLocal](VisualNode.md#boundslocal) to an axis-aligned bounding box in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree @@ -270,7 +270,7 @@ relative to one another (the target node need not be an ancestor of this node, n #### Parameters -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -284,7 +284,7 @@ relative to one another (the target node need not be an ancestor of this node, n ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -292,9 +292,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -308,7 +308,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. @@ -329,18 +329,18 @@ removal. No-op if node is already an orphan. ### setPositionInParent() -▸ **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` +• **setPositionInParent**(`parentPoint`, `localRegistrationPoint`): `void` Move the node so the given `localRegistrationPoint` in its local coordinates is placed at the given `parentPoint` in its parent's coordinates (taking into account any rotation on this node, etc.). #### Parameters -▸ **parentPoint**: [`Point`](../interfaces/Point.md) +• **parentPoint**: [`Point`](../interfaces/Point.md) Point in this node's parent's coordinate space to move `localRegistrationPoint` to -▸ **localRegistrationPoint**: [`Point`](../interfaces/Point.md) +• **localRegistrationPoint**: [`Point`](../interfaces/Point.md) Point in this node's local coordinate space to align with `parentPoint` @@ -367,7 +367,7 @@ rectangle.setPositionInParent( ### setRotationInParent() -▸ **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` +• **setRotationInParent**(`angleInDegrees`, `localRotationPoint`): `void` Set the node’s rotation angle relative to its parent to exactly the given value, keeping the given point in the node’s local coordinate space at a fixed location within the parent. Disregards any rotation the node may already @@ -376,11 +376,11 @@ ancestors also have rotation of their own. #### Parameters -▸ **angleInDegrees**: `number` +• **angleInDegrees**: `number` Angle in degrees. -▸ **localRotationPoint**: [`Point`](../interfaces/Point.md) +• **localRotationPoint**: [`Point`](../interfaces/Point.md) Point to rotate around, in node's local coordinates. diff --git a/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md b/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md index 7472a063f..5976caf69 100644 --- a/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md +++ b/src/pages/references/document-sandbox/document-apis/classes/VisualNode.md @@ -23,7 +23,7 @@ Some VisualNodes might have a non-visual parent such as a PageNode. ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](../interfaces/ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -41,7 +41,7 @@ to guarantee all their children are full-fledged Node instances. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -58,7 +58,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -71,7 +71,7 @@ box. ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -84,7 +84,7 @@ moved to a different part of the document. ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -101,7 +101,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](../interfaces/Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -115,7 +115,7 @@ boundsInParent. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -127,7 +127,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -144,7 +144,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](../interfaces/Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -152,9 +152,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](../interfaces/Point.md) +• **localPoint**: [`Point`](../interfaces/Point.md) -▸ **targetNode**: [`VisualNode`](VisualNode.md) +• **targetNode**: [`VisualNode`](VisualNode.md) #### Returns @@ -164,7 +164,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. 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 0c56e7690..a07a8e8f1 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/ArrowHeadType.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/ArrowHeadType.md @@ -10,46 +10,46 @@ _Do not depend on the literal numeric values of these constants_, as they may ch ### circleFilled -▸ **circleFilled**: `21` +• **circleFilled**: `21` --- ### circleHollow -▸ **circleHollow**: `24` +• **circleHollow**: `24` --- ### none -▸ **none**: `0` +• **none**: `0` --- ### openTriangular -▸ **openTriangular**: `11` +• **openTriangular**: `11` --- ### squareFilled -▸ **squareFilled**: `22` +• **squareFilled**: `22` --- ### squareHollow -▸ **squareHollow**: `25` +• **squareHollow**: `25` --- ### triangularFilled -▸ **triangularFilled**: `7` +• **triangularFilled**: `7` --- ### verticalLine -▸ **verticalLine**: `27` +• **verticalLine**: `27` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/BlendMode.md b/src/pages/references/document-sandbox/document-apis/enumerations/BlendMode.md index a8270973d..14568e4f7 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/BlendMode.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/BlendMode.md @@ -15,73 +15,73 @@ interacts with other siblings within the same container. See documentation below ### color -▸ **color**: `16` +• **color**: `16` --- ### colorBurn -▸ **colorBurn**: `5` +• **colorBurn**: `5` --- ### colorDodge -▸ **colorDodge**: `8` +• **colorDodge**: `8` --- ### darken -▸ **darken**: `4` +• **darken**: `4` --- ### difference -▸ **difference**: `12` +• **difference**: `12` --- ### exclusion -▸ **exclusion**: `13` +• **exclusion**: `13` --- ### hardLight -▸ **hardLight**: `11` +• **hardLight**: `11` --- ### hue -▸ **hue**: `14` +• **hue**: `14` --- ### lighten -▸ **lighten**: `6` +• **lighten**: `6` --- ### luminosity -▸ **luminosity**: `17` +• **luminosity**: `17` --- ### multiply -▸ **multiply**: `3` +• **multiply**: `3` --- ### normal -▸ **normal**: `2` +• **normal**: `2` The normal, default blend mode for leaf nodes. @@ -91,13 +91,13 @@ Note: Group nodes default to using `passThrough` blend mode instead. See below. ### overlay -▸ **overlay**: `9` +• **overlay**: `9` --- ### passThrough -▸ **passThrough**: `1` +• **passThrough**: `1` This blend mode only applies to container nodes with children; for leaf nodes, it is treated the same as `normal`. @@ -112,16 +112,16 @@ Group nodes are set to `passThrough` by default. ### saturation -▸ **saturation**: `15` +• **saturation**: `15` --- ### screen -▸ **screen**: `7` +• **screen**: `7` --- ### softLight -▸ **softLight**: `10` +• **softLight**: `10` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/FillRule.md b/src/pages/references/document-sandbox/document-apis/enumerations/FillRule.md index 333852cae..deaaf1a2d 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/FillRule.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/FillRule.md @@ -13,10 +13,10 @@ self-intersecting or contains separate, nested closed loops. ### evenOdd -▸ **evenOdd**: `1` +• **evenOdd**: `1` --- ### nonZero -▸ **nonZero**: `0` +• **nonZero**: `0` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/FillType.md b/src/pages/references/document-sandbox/document-apis/enumerations/FillType.md index c57774f15..e1016165c 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/FillType.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/FillType.md @@ -15,6 +15,6 @@ always have a default/fallback case to handle any unknown values you may encount ### color -▸ **color**: `"Color"` +• **color**: `"Color"` A solid color fill. diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/SceneNodeType.md b/src/pages/references/document-sandbox/document-apis/enumerations/SceneNodeType.md index 5ba78c3f7..16a70c5b7 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/SceneNodeType.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/SceneNodeType.md @@ -15,19 +15,19 @@ always have a default/fallback case to handle any unknown values you may encount ### artboard -▸ **artboard**: `"ab:Artboard"` +• **artboard**: `"ab:Artboard"` --- ### artworkRoot -▸ **artworkRoot**: `"ArtworkRoot"` +• **artworkRoot**: `"ArtworkRoot"` --- ### complexShape -▸ **complexShape**: `"ComplexShape"` +• **complexShape**: `"ComplexShape"` Type of ComplexShapeNode, representing a complex prepackaged shape with fill and stroke, that appears as a leaf node in the UI @@ -35,13 +35,13 @@ Type of ComplexShapeNode, representing a complex prepackaged shape with fill and ### ellipse -▸ **ellipse**: `"Ellipse"` +• **ellipse**: `"Ellipse"` --- ### gridLayout -▸ **gridLayout**: `"GridLayout"` +• **gridLayout**: `"GridLayout"` Type of GridLayoutNode represents a grid layout in the scenegraph used to create a layout grid that other content can be placed into @@ -49,13 +49,13 @@ Type of GridLayoutNode represents a grid layout in the scenegraph used to create ### group -▸ **group**: `"Group"` +• **group**: `"Group"` --- ### imageRectangle -▸ **imageRectangle**: `"ImageRectangle"` +• **imageRectangle**: `"ImageRectangle"` Type of MediaContainerNode's "media rectangle" child when it is holding an image @@ -63,19 +63,19 @@ Type of MediaContainerNode's "media rectangle" child when it is holding an image ### line -▸ **line**: `"Line"` +• **line**: `"Line"` --- ### linkedAsset -▸ **linkedAsset**: `"LinkedAsset"` +• **linkedAsset**: `"LinkedAsset"` --- ### mediaContainer -▸ **mediaContainer**: `"MediaContainer"` +• **mediaContainer**: `"MediaContainer"` Type of MediaContainerNode, representing the top-level container of the multi-node construct used to display images or video. @@ -83,7 +83,7 @@ Type of MediaContainerNode, representing the top-level container of the multi-no ### page -▸ **page**: `"Page"` +• **page**: `"Page"` Type of PageNode @@ -91,25 +91,25 @@ Type of PageNode ### path -▸ **path**: `"Path"` +• **path**: `"Path"` --- ### polygon -▸ **polygon**: `"artgr:Polygon"` +• **polygon**: `"artgr:Polygon"` --- ### rectangle -▸ **rectangle**: `"Rectangle"` +• **rectangle**: `"Rectangle"` --- ### solidColorShape -▸ **solidColorShape**: `"SolidColorShape"` +• **solidColorShape**: `"SolidColorShape"` Type of SolidColorShapeNode, representing a solid-color prepackaged shape that appears as a leaf node in the UI @@ -117,7 +117,7 @@ Type of SolidColorShapeNode, representing a solid-color prepackaged shape that a ### strokeShape -▸ **strokeShape**: `"StrokeShape"` +• **strokeShape**: `"StrokeShape"` Type of StrokeShapeNode, representing a stroke-only prepackaged shape that appears as a leaf node in the UI @@ -125,4 +125,4 @@ Type of StrokeShapeNode, representing a stroke-only prepackaged shape that appea ### text -▸ **text**: `"Text"` +• **text**: `"Text"` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/StrokePosition.md b/src/pages/references/document-sandbox/document-apis/enumerations/StrokePosition.md index 2a050f3c5..6c93ded08 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/StrokePosition.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/StrokePosition.md @@ -12,16 +12,16 @@ A stroke's Stroke.position determines how the thickness of the stroke is aligned ### center -▸ **center**: `0` +• **center**: `0` --- ### inside -▸ **inside**: `1` +• **inside**: `1` --- ### outside -▸ **outside**: `2` +• **outside**: `2` diff --git a/src/pages/references/document-sandbox/document-apis/enumerations/StrokeType.md b/src/pages/references/document-sandbox/document-apis/enumerations/StrokeType.md index 583fcd4c4..b64ba64d0 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/StrokeType.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/StrokeType.md @@ -15,6 +15,6 @@ always have a default/fallback case to handle any unknown values you may encount ### color -▸ **color**: `"Color"` +• **color**: `"Color"` A solid-color stroke, with optional dashes. 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 87bebb774..1e7e67574 100644 --- a/src/pages/references/document-sandbox/document-apis/enumerations/TextAlignment.md +++ b/src/pages/references/document-sandbox/document-apis/enumerations/TextAlignment.md @@ -10,16 +10,16 @@ _Do not depend on the literal numeric values of these constants_, as they may ch ### center -▸ **center**: `3` +• **center**: `3` --- ### left -▸ **left**: `1` +• **left**: `1` --- ### right -▸ **right**: `2` +• **right**: `2` diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/BitmapImage.md b/src/pages/references/document-sandbox/document-apis/interfaces/BitmapImage.md index f169cd912..4dfb6d09c 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/BitmapImage.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/BitmapImage.md @@ -9,7 +9,7 @@ to display it in the document by creating a MediaContainerNode structure. ### height -▸ `readonly` **height**: `number` +• `readonly` **height**: `number` Original height of the bitmap in pixels. @@ -17,6 +17,6 @@ Original height of the bitmap in pixels. ### width -▸ `readonly` **width**: `number` +• `readonly` **width**: `number` Original width of the bitmap in pixels. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/Color.md b/src/pages/references/document-sandbox/document-apis/interfaces/Color.md index 6aa79eee1..73bd281d8 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/Color.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/Color.md @@ -8,7 +8,7 @@ Represents an RGBA color value. ### alpha -▸ **alpha**: `number` +• **alpha**: `number` The alpha channel in range from 0 - 1. @@ -16,7 +16,7 @@ The alpha channel in range from 0 - 1. ### blue -▸ **blue**: `number` +• **blue**: `number` The blue channel in range from 0 - 1. @@ -24,7 +24,7 @@ The blue channel in range from 0 - 1. ### green -▸ **green**: `number` +• **green**: `number` The green channel in range from 0 - 1. @@ -32,6 +32,6 @@ The green channel in range from 0 - 1. ### red -▸ **red**: `number` +• **red**: `number` The red channel in range from 0 - 1. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/ColorFill.md b/src/pages/references/document-sandbox/document-apis/interfaces/ColorFill.md index f69dda0ae..ea5aa57b7 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/ColorFill.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/ColorFill.md @@ -14,7 +14,7 @@ The most convenient way to create a fill is via `Editor.makeColorFill()`. ### color -▸ **color**: [`Color`](Color.md) +• **color**: [`Color`](Color.md) The fill color. @@ -22,7 +22,7 @@ The fill color. ### type -▸ `readonly` **type**: [`color`](../enumerations/FillType.md#color) +• `readonly` **type**: [`color`](../enumerations/FillType.md#color) The fill type. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md b/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md index 373141910..2a46d304a 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/ContainerNode.md @@ -17,7 +17,7 @@ more minimal VisualNode (such as Artboard). ### allChildren -▸ `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](../classes/BaseNode.md)\>\> +• `get` **allChildren**(): `Readonly`<`Iterable`<[`BaseNode`](../classes/BaseNode.md)\>\> Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or GroupNode also provide a mutable [ContainerNode.children](ContainerNode.md#children) list. Other nodes with a more specific structure can @@ -35,7 +35,7 @@ to guarantee all their children are full-fledged Node instances. ### boundsLocal -▸ `get` **boundsLocal**(): `Readonly`<`Rect`\> +• `get` **boundsLocal**(): `Readonly`<`Rect`\> The bounding box of the node, expressed in the node's local coordinate space (which may be shifted or rotated relative to its parent). Generally matches the selection outline seen in the UI, encompassing the vector path @@ -52,7 +52,7 @@ _not_ necessarily (0,0) – this is especially true for Text and Path nodes. ### centerPointLocal -▸ `get` **centerPointLocal**(): `Readonly`<[`Point`](Point.md)\> +• `get` **centerPointLocal**(): `Readonly`<[`Point`](Point.md)\> Position of the node's centerpoint in its own local coordinate space, i.e. the center of the boundsLocal box. @@ -65,7 +65,7 @@ box. ### children -▸ `get` **children**(): [`ItemList`](../classes/ItemList.md)<[`Node`](../classes/Node.md)\> +• `get` **children**(): [`ItemList`](../classes/ItemList.md)<[`Node`](../classes/Node.md)\> The node's children. Use the methods on this ItemList object to get, add, and remove children. @@ -77,7 +77,7 @@ The node's children. Use the methods on this ItemList object to get, add, and re ### id -▸ `get` **id**(): `string` +• `get` **id**(): `string` A unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. @@ -90,7 +90,7 @@ moved to a different part of the document. ### parent -▸ `get` **parent**(): `undefined` \| [`BaseNode`](../classes/BaseNode.md) +• `get` **parent**(): `undefined` \| [`BaseNode`](../classes/BaseNode.md) The node's parent. The parent chain will eventually reach ExpressRootNode for all nodes that are part of the document content. @@ -107,7 +107,7 @@ that was part of the document content earlier. Deleted nodes can be reattached t ### topLeftLocal -▸ `get` **topLeftLocal**(): `Readonly`<[`Point`](Point.md)\> +• `get` **topLeftLocal**(): `Readonly`<[`Point`](Point.md)\> Position of the node's top-left corner in its own local coordinate space, equal to (boundsLocal.x, boundsLocal.y). If the node is rotated, this is not the same as the top-left corner of @@ -121,7 +121,7 @@ boundsInParent. ### type -▸ `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) +• `get` **type**(): [`SceneNodeType`](../enumerations/SceneNodeType.md) The node's type. @@ -133,7 +133,7 @@ The node's type. ### visualRoot -▸ `get` **visualRoot**(): [`VisualNode`](../classes/VisualNode.md) +• `get` **visualRoot**(): [`VisualNode`](../classes/VisualNode.md) The highest ancestor that still has visual presence in the document. Typically an Artboard, but for orphaned content, it will be the root of the deleted content (which might be this node itself). @@ -150,7 +150,7 @@ meaningful comparison or conversion between the bounds or coordinate spaces of s ### localPointInNode() -▸ **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](Point.md)\> +• **localPointInNode**(`localPoint`, `targetNode`): `Readonly`<[`Point`](Point.md)\> Convert a point given in the node’s local coordinate space to a point in the coordinate space of the target node. Both nodes must share the same [visualRoot](../classes/VisualNode.md#visualroot), but can lie anywhere within that subtree relative to one @@ -158,9 +158,9 @@ another (the target node need not be an ancestor of this node, nor vice versa). #### Parameters -▸ **localPoint**: [`Point`](Point.md) +• **localPoint**: [`Point`](Point.md) -▸ **targetNode**: [`VisualNode`](../classes/VisualNode.md) +• **targetNode**: [`VisualNode`](../classes/VisualNode.md) #### Returns @@ -174,7 +174,7 @@ another (the target node need not be an ancestor of this node, nor vice versa). ### removeFromParent() -▸ **removeFromParent**(): `void` +• **removeFromParent**(): `void` Removes the node from its parent - effectively deleting it, if the node is not re-added to another parent before the document is closed. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/Fill.md b/src/pages/references/document-sandbox/document-apis/interfaces/Fill.md index 3cf039227..beb2edcd8 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/Fill.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/Fill.md @@ -14,6 +14,6 @@ other fill types when reading scenegraph content. ### type -▸ `readonly` **type**: [`color`](../enumerations/FillType.md#color) +• `readonly` **type**: [`color`](../enumerations/FillType.md#color) The fill type. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/IFillableNode.md b/src/pages/references/document-sandbox/document-apis/interfaces/IFillableNode.md index b1af5fe95..99b93447a 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/IFillableNode.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/IFillableNode.md @@ -9,4 +9,4 @@ the FillableNode class. ### fill -▸ **fill**: `undefined` \| [`Fill`](Fill.md) +• **fill**: `undefined` \| [`Fill`](Fill.md) diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/IRectangularNode.md b/src/pages/references/document-sandbox/document-apis/interfaces/IRectangularNode.md index 73e84cfe1..26478e2c8 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/IRectangularNode.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/IRectangularNode.md @@ -8,10 +8,10 @@ Interface for nodes with width and height properties. ### height -▸ **height**: `number` +• **height**: `number` --- ### width -▸ **width**: `number` +• **width**: `number` diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/IStrokableNode.md b/src/pages/references/document-sandbox/document-apis/interfaces/IStrokableNode.md index 5786aae99..ea9487218 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/IStrokableNode.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/IStrokableNode.md @@ -9,4 +9,4 @@ from the StrokableNode class. (See [ArtboardNode](../classes/ArtboardNode.md), f ### stroke -▸ **stroke**: `undefined` \| [`Stroke`](Stroke.md) +• **stroke**: `undefined` \| [`Stroke`](Stroke.md) diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/Point.md b/src/pages/references/document-sandbox/document-apis/interfaces/Point.md index 57f8ee5ac..22d439056 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/Point.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/Point.md @@ -8,10 +8,10 @@ Represents a 2D position. ### x -▸ **x**: `number` +• **x**: `number` --- ### y -▸ **y**: `number` +• **y**: `number` diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/RectangleGeometry.md b/src/pages/references/document-sandbox/document-apis/interfaces/RectangleGeometry.md index b77711726..fe8f89010 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/RectangleGeometry.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/RectangleGeometry.md @@ -6,10 +6,10 @@ ### height -▸ **height**: `number` +• **height**: `number` --- ### width -▸ **width**: `number` +• **width**: `number` diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/SolidColorStroke.md b/src/pages/references/document-sandbox/document-apis/interfaces/SolidColorStroke.md index c1457dea7..b846ef4d1 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/SolidColorStroke.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/SolidColorStroke.md @@ -15,7 +15,7 @@ your code in case any other required fields are added to the Stroke descriptor i ### color -▸ **color**: [`Color`](Color.md) +• **color**: [`Color`](Color.md) The color of a stroke. @@ -23,7 +23,7 @@ The color of a stroke. ### dashOffset -▸ **dashOffset**: `number` +• **dashOffset**: `number` Number of pixels the beginning of dash pattern should be offset along the stroke. @@ -31,7 +31,7 @@ Number of pixels the beginning of dash pattern should be offset along the stroke ### dashPattern -▸ **dashPattern**: `number`[] +• **dashPattern**: `number`[] If empty, this is a solid stroke. If non-empty, the values alternate between length of a rendered and blank segment, @@ -42,7 +42,7 @@ Array must be of even length. Values cannot be negative. ### position -▸ **position**: [`StrokePosition`](../enumerations/StrokePosition.md) +• **position**: [`StrokePosition`](../enumerations/StrokePosition.md) The position of the stroke relative to the outline of the shape. @@ -50,7 +50,7 @@ The position of the stroke relative to the outline of the shape. ### type -▸ `readonly` **type**: [`color`](../enumerations/StrokeType.md#color) +• `readonly` **type**: [`color`](../enumerations/StrokeType.md#color) The stroke type. @@ -62,6 +62,6 @@ The stroke type. ### width -▸ **width**: `number` +• **width**: `number` The thickness of a stroke. Must be from MIN_STROKE_WIDTH to MAX_STROKE_WIDTH. diff --git a/src/pages/references/document-sandbox/document-apis/interfaces/Stroke.md b/src/pages/references/document-sandbox/document-apis/interfaces/Stroke.md index fdf63f3f9..907300f68 100644 --- a/src/pages/references/document-sandbox/document-apis/interfaces/Stroke.md +++ b/src/pages/references/document-sandbox/document-apis/interfaces/Stroke.md @@ -14,4 +14,4 @@ other stroke types when reading from scenegraph content. ### type -▸ `readonly` **type**: [`color`](../enumerations/StrokeType.md#color) +• `readonly` **type**: [`color`](../enumerations/StrokeType.md#color) diff --git a/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md b/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md index 35e0fbbc8..bef7e9fe8 100644 --- a/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md +++ b/src/pages/references/document-sandbox/document-apis/type-aliases/SolidColorStrokeWithOptionalType.md @@ -2,6 +2,6 @@ # Type alias: SolidColorStrokeWithOptionalType -▸ **SolidColorStrokeWithOptionalType**: `Omit`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\> & `Partial`<`Pick`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\>\> +• **SolidColorStrokeWithOptionalType**: `Omit`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\> & `Partial`<`Pick`<[`SolidColorStroke`](../interfaces/SolidColorStroke.md), `"type"`\>\> SolidColorStroke with 'type' property as optional. From 459e7db8c188722b53b41354d3eb46833073d9d9 Mon Sep 17 00:00:00 2001 From: Holly Schinsky Date: Tue, 10 Sep 2024 09:55:51 -0400 Subject: [PATCH 8/8] Adds entry to changelog for new doc api updates --- src/pages/references/changelog.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pages/references/changelog.md b/src/pages/references/changelog.md index 8aca3199f..df017cbcd 100644 --- a/src/pages/references/changelog.md +++ b/src/pages/references/changelog.md @@ -21,6 +21,11 @@ contributors: # Changelog +## 2024-09-10 + +- Added a new [`replaceMedia()`](./document-sandbox/document-apis/classes/MediaContainerNode.md#replacemedia) method to the `MediaContainerNode` class that can be used to replace existing media inline. +- Refactoring done to the [`Stroke`](./document-sandbox/document-apis/interfaces/Stroke.md) APIs. + ## 2024-07-22 - Added a new [`format`](../references/addonsdk/app-ui.md#format) property to the `addOnUISdk.app.ui` object that reflects the format used to display dates, times, numbers, etc. in the user's environment. It supports a [`"formatchange"`](../references/addonsdk/app-ui.md#formatchange) event triggered when the format changes—see an example in the [Locale, Supported Locales, and Format](../guides/develop/use_cases/environment_settings.md#detecting-locale-supported-locales-and-format) section.