Skip to content

Commit 2c7a8b4

Browse files
committed
update plugin typings
1 parent 75b77a1 commit 2c7a8b4

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

plugin-api-standalone.d.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6840,15 +6840,17 @@ interface AutoLayoutMixin {
68406840
*/
68416841
interface GridTrackSize {
68426842
/**
6843-
* Applicable only on FIXED grid tracks. The size of the track in pixels.
6843+
* Applicable only on FIXED or FLEX grid tracks. In FIXED tracks, the size of the track in pixels. In FlEX tracks, the fractional unit value (equivalent to the [`fr` unit](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Basic_concepts_of_grid_layout#the_fr_unit) in CSS)
68446844
* Optional for `FLEX` tracks.
6845-
* If the setter for this value is called on a `FLEX` track, the track will be converted to a `FIXED` track.
68466845
*/
68476846
value?: number
68486847
/**
6849-
* The type of the grid track. `FLEX` indicates that the track will grow to fill the available space in the container (evenly divided among all flex tracks in the grid), while `FIXED` indicates that the track will have a fixed size.
6848+
* The type of the grid track. `FLEX` indicates that the track behaves like the CSS grid [`fr` unit](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Basic_concepts_of_grid_layout#the_fr_unit).
6849+
* `FIXED` indicates that the track will have a fixed pixel size.
6850+
* `HUG` indicates that the track will size to fit its content, equivalent to a CSS setting of `fit-content(100%)`.
6851+
* It is not a valid state for 'FLEX' tracks to be set on a grid when the container is set to layoutSizingHorizonal/layoutSizingVertical 'HUG'
68506852
**/
6851-
type: 'FLEX' | 'FIXED'
6853+
type: 'FLEX' | 'FIXED' | 'HUG'
68526854
}
68536855
/**
68546856
* @see https://developers.figma.com/docs/plugins/api/node-properties
@@ -6914,6 +6916,7 @@ interface GridLayoutMixin {
69146916
*
69156917
* // Change the first row to be a fixed size of 100px
69166918
* parentFrame.gridRowSizes[0].type // 'FLEX'
6919+
* parentFrame.gridRowSizes[0].type = 'FIXED'
69176920
* parentFrame.gridRowSizes[0].value = 100
69186921
* parentFrame.gridRowSizes[0].type // 'FIXED'
69196922
* // Grid with one fixed row and one flexible rows
@@ -9518,8 +9521,13 @@ interface InstanceNode extends DefaultFrameMixin, VariantMixin {
95189521
}[]
95199522
/**
95209523
* Resets all direct overrides on this instance.
9524+
* @deprecated Use `removeOverrides` instead.
95219525
*/
95229526
resetOverrides(): void
9527+
/**
9528+
* Removes all direct overrides on this instance.
9529+
*/
9530+
removeOverrides(): void
95239531
}
95249532
interface BooleanOperationNode
95259533
extends DefaultShapeMixin,

plugin-api.d.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6836,15 +6836,17 @@ interface AutoLayoutMixin {
68366836
*/
68376837
interface GridTrackSize {
68386838
/**
6839-
* Applicable only on FIXED grid tracks. The size of the track in pixels.
6839+
* Applicable only on FIXED or FLEX grid tracks. In FIXED tracks, the size of the track in pixels. In FlEX tracks, the fractional unit value (equivalent to the [`fr` unit](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Basic_concepts_of_grid_layout#the_fr_unit) in CSS)
68406840
* Optional for `FLEX` tracks.
6841-
* If the setter for this value is called on a `FLEX` track, the track will be converted to a `FIXED` track.
68426841
*/
68436842
value?: number
68446843
/**
6845-
* The type of the grid track. `FLEX` indicates that the track will grow to fill the available space in the container (evenly divided among all flex tracks in the grid), while `FIXED` indicates that the track will have a fixed size.
6844+
* The type of the grid track. `FLEX` indicates that the track behaves like the CSS grid [`fr` unit](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Basic_concepts_of_grid_layout#the_fr_unit).
6845+
* `FIXED` indicates that the track will have a fixed pixel size.
6846+
* `HUG` indicates that the track will size to fit its content, equivalent to a CSS setting of `fit-content(100%)`.
6847+
* It is not a valid state for 'FLEX' tracks to be set on a grid when the container is set to layoutSizingHorizonal/layoutSizingVertical 'HUG'
68466848
**/
6847-
type: 'FLEX' | 'FIXED'
6849+
type: 'FLEX' | 'FIXED' | 'HUG'
68486850
}
68496851
/**
68506852
* @see https://developers.figma.com/docs/plugins/api/node-properties
@@ -6910,6 +6912,7 @@ interface GridLayoutMixin {
69106912
*
69116913
* // Change the first row to be a fixed size of 100px
69126914
* parentFrame.gridRowSizes[0].type // 'FLEX'
6915+
* parentFrame.gridRowSizes[0].type = 'FIXED'
69136916
* parentFrame.gridRowSizes[0].value = 100
69146917
* parentFrame.gridRowSizes[0].type // 'FIXED'
69156918
* // Grid with one fixed row and one flexible rows
@@ -9514,8 +9517,13 @@ interface InstanceNode extends DefaultFrameMixin, VariantMixin {
95149517
}[]
95159518
/**
95169519
* Resets all direct overrides on this instance.
9520+
* @deprecated Use `removeOverrides` instead.
95179521
*/
95189522
resetOverrides(): void
9523+
/**
9524+
* Removes all direct overrides on this instance.
9525+
*/
9526+
removeOverrides(): void
95199527
}
95209528
interface BooleanOperationNode
95219529
extends DefaultShapeMixin,

0 commit comments

Comments
 (0)