Skip to content

Commit eb6f575

Browse files
committed
Changes only in document-apis
1 parent fa6cd3b commit eb6f575

File tree

92 files changed

+883
-667
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+883
-667
lines changed

src/pages/references/document-sandbox/document-apis/classes/AddOnData.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
[@express-document-sdk](../overview.md) / AddOnData
2-
32
# Class: AddOnData
43

54
AddOnData class provides APIs to read, write, remove private metadata to a Node.
65
This metadata is accessible only to the add-on that has set it.
76

7+
8+
9+
- `ProxyLiveObject`
10+
11+
812
## Accessors
913

1014
### remainingQuota
@@ -21,6 +25,7 @@ The object contains the following properties:
2125
- sizeInBytes: The remaining quota size in bytes (maximum 3KB).
2226
- numKeys: The remaining quota for the number of keys (maximum 20 keys).
2327

28+
2429
##### numKeys
2530

2631
**numKeys**: `number`

src/pages/references/document-sandbox/document-apis/classes/ArtboardList.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[@express-document-sdk](../overview.md) / ArtboardList
2-
32
# Class: ArtboardList
43

5-
ArtboardList represents an ordered list of ArtboardNodes arranged in a timeline sequence, where they are called "scenes."
6-
All items in the list are children of a single [PageNode](PageNode.md).
4+
ArtboardList represents an ordered list of ArtboardNodes, which are the children of one [PageNode](PageNode.md). If multiple
5+
artboards are present, each represents a keyframe "scene" in the page's animation timeline.
76

87
ArtboardList also provides APIs for adding/removing artboards from the page. ArtboardList is never empty: it is illegal to
98
remove the last remaining artboard from the list.
109

11-
## Extends
1210

13-
- [`RestrictedItemList`](RestrictedItemList.md)<[`ArtboardNode`](ArtboardNode.md)\>
11+
12+
- [`RestrictedItemList`](RestrictedItemList.md)<[`ArtboardNode`](ArtboardNode.md)\>
13+
1414

1515
## Accessors
1616

src/pages/references/document-sandbox/document-apis/classes/ArtboardNode.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
[@express-document-sdk](../overview.md) / ArtboardNode
2-
32
# Class: ArtboardNode
43

5-
An ArtboardNode represents an artboard object in the scenegraph. All user visual content must be contained on an artboard.
6-
Artboards are always contained on a [PageNode](PageNode.md); when a page contains multiple artboards, the artboards represent
7-
"scenes" in a linear timeline sequence.
4+
An ArtboardNode represents the topmost container of visual content within a [PageNode](PageNode.md). When a page contains
5+
multiple artboards, each represents a keyframe "scene" in the page's animation timeline.
86

97
To create a new artboard, see [ArtboardList.addArtboard](ArtboardList.md#addartboard).
108

11-
Please note that creating and deleting an artboard in a single frame will crash the editor.
129

13-
## Extends
1410

15-
- [`VisualNode`](VisualNode.md)
11+
- [`VisualNode`](VisualNode.md)
12+
1613

1714
## Implements
1815

19-
- `Readonly`<[`IRectangularNode`](../interfaces/IRectangularNode.md)\>
20-
- [`ContainerNode`](../interfaces/ContainerNode.md)
16+
17+
- `Readonly`<[`IRectangularNode`](../interfaces/IRectangularNode.md)\>
18+
- [`ContainerNode`](../interfaces/ContainerNode.md)
19+
2120

2221
## Accessors
2322

@@ -42,7 +41,7 @@ GroupNode also provide a mutable [ContainerNode.children](../interfaces/Containe
4241
hold children in various discrete "slots"; this `allChildren` list includes *all* such children and reflects their
4342
overall display z-order.
4443

45-
The children of an Artboard are always other Node classes (never the more minimal BaseNode).
44+
The children of an Artboard are all subclasses of Node (not just the more minimal BaseNode or VisualNode).
4645

4746
#### Returns
4847

@@ -83,7 +82,9 @@ Position of the node's centerpoint in its own local coordinate space, i.e. the c
8382

8483
`get` **children**(): [`ItemList`](ItemList.md)<[`Node`](Node.md)\>
8584

86-
The node's children. Use the methods on this ItemList object to get, add, and remove children.
85+
The artboards's regular children (does not include any "background layer" content if present; use [allChildren](ArtboardNode.md#allchildren)
86+
for a read-only view that includes background content). Use the methods on this `children` ItemList object to get,
87+
add, and remove regular children.
8788

8889
#### Returns
8990

src/pages/references/document-sandbox/document-apis/classes/AvailableFont.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[@express-document-sdk](../overview.md) / AvailableFont
2-
32
# Class: AvailableFont
43

54
Font the current user has access or licensing permissions to create / edit content with.
65

7-
## Extends
86

9-
- [`BaseFont`](BaseFont.md)
7+
8+
- [`BaseFont`](BaseFont.md)
9+
1010

1111
## Accessors
1212

src/pages/references/document-sandbox/document-apis/classes/BaseFont.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
[@express-document-sdk](../overview.md) / BaseFont
2-
32
# Class: `abstract` BaseFont
43

54
Represents a font that is able to be rendered within this document. However, the user may not have edit permissions for
65
all such fonts.
76

7+
8+
9+
- `ProxyLiveObject`
10+
11+
812
## Extended by
913

10-
- [`AvailableFont`](AvailableFont.md)
11-
- [`UnavailableFont`](UnavailableFont.md)
14+
15+
- [`AvailableFont`](AvailableFont.md)
16+
- [`UnavailableFont`](UnavailableFont.md)
17+
1218

1319
## Accessors
1420

src/pages/references/document-sandbox/document-apis/classes/BaseNode.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
[@express-document-sdk](../overview.md) / BaseNode
2-
32
# Class: BaseNode
43

54
A "node" represents an object in the scenegraph, the document's visual content tree. This base class includes only the
65
most fundamental nonvisual properties that even nodes near the top of the document structure share (such as PageNode).
76
The more tangible visual content typically extends the richer Node class which extends BaseNode with additional
87
properties.
98

9+
10+
11+
- `ProxyLiveObject`
12+
13+
1014
## Extended by
1115

12-
- [`ExpressRootNode`](ExpressRootNode.md)
13-
- [`PageNode`](PageNode.md)
14-
- [`VisualNode`](VisualNode.md)
16+
17+
- [`ExpressRootNode`](ExpressRootNode.md)
18+
- [`PageNode`](PageNode.md)
19+
- [`VisualNode`](VisualNode.md)
20+
1521

1622
## Accessors
1723

src/pages/references/document-sandbox/document-apis/classes/BitmapImage.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
[@express-document-sdk](../overview.md) / BitmapImage
2-
32
# Class: BitmapImage
43

54
Represents a bitmap image resource. Use [Editor.loadBitmapImage](Editor.md#loadbitmapimage) to create a BitmapImage, and then [Editor.createImageContainer](Editor.md#createimagecontainer)
65
to display it in the document by creating a MediaContainerNode structure.
76

7+
8+
9+
- `ProxyLiveObject`
10+
11+
812
## Accessors
913

1014
### height

src/pages/references/document-sandbox/document-apis/classes/ColorUtils.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
[@express-document-sdk](../overview.md) / ColorUtils
2-
32
# Class: ColorUtils
43

54
Utility methods for working with color values.
65

6+
7+
8+
- `ProxyLiveObject`
9+
10+
711
## Methods
812

913
### fromHex()

src/pages/references/document-sandbox/document-apis/classes/ComplexShapeNode.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[@express-document-sdk](../overview.md) / ComplexShapeNode
2-
32
# Class: ComplexShapeNode
43

54
A ComplexShapeNode is a complex prepackaged shape that appears as a leaf node in the UI, even if it is composed
65
of multiple separate paths.
76

8-
## Extends
97

10-
- [`FillableNode`](FillableNode.md)
8+
9+
- [`FillableNode`](FillableNode.md)
10+
1111

1212
## Accessors
1313

@@ -338,10 +338,6 @@ relative to one another (the target node need not be an ancestor of this node, n
338338

339339
**cloneInPlace**(): [`ComplexShapeNode`](ComplexShapeNode.md)
340340

341-
<InlineAlert slots="text" variant="warning"/>
342-
343-
**IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`.
344-
345341
Creates a copy of this node and its entire subtree of descendants.
346342

347343
The node must be attached to a page as the copy will be added as a sibling.
@@ -403,6 +399,8 @@ removal. No-op if node is already an orphan.
403399

404400
### rescaleProportionalToHeight()
405401

402+
`Experimental`
403+
406404
**rescaleProportionalToHeight**(`height`): `void`
407405

408406
<InlineAlert slots="text" variant="warning"/>
@@ -428,6 +426,8 @@ preserve its existing aspect ratio. See [rescaleProportionalToWidth](Node.md#res
428426

429427
### rescaleProportionalToWidth()
430428

429+
`Experimental`
430+
431431
**rescaleProportionalToWidth**(`width`): `void`
432432

433433
<InlineAlert slots="text" variant="warning"/>
@@ -460,6 +460,8 @@ a separate, persistent scale factor multiplier).
460460

461461
### resizeToCover()
462462

463+
`Experimental`
464+
463465
**resizeToCover**(`width`, `height`): `void`
464466

465467
<InlineAlert slots="text" variant="warning"/>
@@ -493,6 +495,8 @@ resizeToFitWithin
493495

494496
### resizeToFitWithin()
495497

498+
`Experimental`
499+
496500
**resizeToFitWithin**(`width`, `height`): `void`
497501

498502
<InlineAlert slots="text" variant="warning"/>
@@ -557,8 +561,7 @@ Point in this node's local coordinate space to align with `parentPoint`
557561
#### Example
558562

559563
Center a rectangle within its parent artboard:
560-
561-
```js
564+
```
562565
rectangle.setPositionInParent(
563566
{ x: artboard.width / 2, y: artboard.height / 2 },
564567
{ x: rectangle.width / 2, y: rectangle.height / 2 }
@@ -597,7 +600,6 @@ Point to rotate around, in node's local coordinates.
597600
#### Example
598601

599602
Rotate the rectangle 45 degrees clockwise around its centerpoint:
600-
601-
```js
603+
```
602604
rectangle.setRotationInParent(45, rectangle.centerPointLocal);
603605
```

src/pages/references/document-sandbox/document-apis/classes/Context.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
[@express-document-sdk](../overview.md) / Context
2-
32
# Class: Context
43

54
Contains the user's current selection state, indicating the content they are focused on.
65

6+
7+
8+
- `ProxyLiveObject`
9+
10+
711
## Accessors
812

913
### currentPage
@@ -15,6 +19,7 @@ Contains the user's current selection state, indicating the content they are foc
1519
[`PageNode`](PageNode.md)
1620

1721
The currently viewed page.
22+
To change the current page, call [Viewport.bringIntoView](Viewport.md#bringintoview) with an artboard or other content on that page.
1823

1924
---
2025

@@ -60,6 +65,7 @@ Only node(s) that meet the following criteria can be selected:
6065
- A node cannot be selected if its ancestor is also selected (descendants are filtered out).
6166
- Locked nodes are filtered out (but will still be included in selectionIncludingNonEditable).
6267

68+
6369
#### Parameters
6470

6571
**nodes**: `undefined` \| [`Node`](Node.md) \| readonly [`Node`](Node.md)[]
@@ -68,7 +74,8 @@ Only node(s) that meet the following criteria can be selected:
6874

6975
readonly [`Node`](Node.md)[]
7076

71-
the current selection. Nodes that are locked or otherwise non-editable are never included in the selection.
77+
the current selection. Nodes that are locked or otherwise non-editable are never included in the regular
78+
selection (see [selectionIncludingNonEditable](Context.md#selectionincludingnoneditable) to get any locked nodes the user may have clicked).
7279

7380
---
7481

@@ -80,7 +87,7 @@ the current selection. Nodes that are locked or otherwise non-editable are never
8087

8188
readonly [`Node`](Node.md)[]
8289

83-
the current selection _and_ any locked nodes the user has attempted to select at the same time. This can
90+
the current selection *and* any locked nodes the user has attempted to select at the same time. This can
8491
happen for example if the user clicks on a locked node or if the user drags a selection marquee that overlaps
8592
locked nodes in addition to regular unlocked nodes.
8693

0 commit comments

Comments
 (0)