@canva/design 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +24 -16
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -153,7 +153,7 @@ export declare type AudioTrack = {
153
153
  * @remarks
154
154
  * Units are relative to the parent container both in terms of position and size
155
155
  */
156
- declare type Box = Position & (WidthAndHeight | Width | Height);
156
+ export declare type Box = Position & (WidthAndHeight | Width | Height);
157
157
 
158
158
  declare type CommonImageDragConfig = {
159
159
  /**
@@ -498,7 +498,7 @@ export declare type Fill = {
498
498
  * @public
499
499
  * Font weights supported in the SDK.
500
500
  **/
501
- declare type FontWeight =
501
+ export declare type FontWeight =
502
502
  | "normal"
503
503
  | "thin"
504
504
  | "extralight"
@@ -575,7 +575,7 @@ export declare type ImageElementData = DragCallback & {
575
575
  * @public
576
576
  * An image asset that will be used to fill the given path.
577
577
  */
578
- declare type ImageFill = {
578
+ export declare type ImageFill = {
579
579
  /**
580
580
  * Type of an asset that will be used to fill the given path.
581
581
  */
@@ -700,7 +700,7 @@ export declare type NativeGroupElement = {
700
700
  * This type includes properties for controlling the position and dimensions
701
701
  * of the element
702
702
  */
703
- declare type NativeGroupElementWithBox = {
703
+ export declare type NativeGroupElementWithBox = {
704
704
  /**
705
705
  * The type of element.
706
706
  */
@@ -943,7 +943,7 @@ export declare type PageContext = {
943
943
  * @public
944
944
  * Page Dimensions
945
945
  */
946
- declare type PageDimensions = {
946
+ export declare type PageDimensions = {
947
947
  width: number;
948
948
  height: number;
949
949
  };
@@ -1164,7 +1164,7 @@ export declare type ShapeViewBox = {
1164
1164
  * @public
1165
1165
  * Attributes for changing the appearance of text.
1166
1166
  */
1167
- declare type TextAttributes = {
1167
+ export declare type TextAttributes = {
1168
1168
  /**
1169
1169
  * The size of the text.
1170
1170
  *
@@ -1174,7 +1174,8 @@ declare type TextAttributes = {
1174
1174
  */
1175
1175
  fontSize?: number;
1176
1176
  /**
1177
- * The alignment of the text. The default value is 'start'.
1177
+ * The alignment of the text.
1178
+ * @defaultValue 'start'
1178
1179
  */
1179
1180
  textAlign?: "start" | "center" | "end";
1180
1181
  /**
@@ -1187,15 +1188,18 @@ declare type TextAttributes = {
1187
1188
  color?: string;
1188
1189
 
1189
1190
  /**
1190
- * The weight of the font. The default value is 'normal'.
1191
+ * The weight of the font.
1192
+ * @defaultValue 'normal'
1191
1193
  */
1192
1194
  fontWeight?: FontWeight;
1193
1195
  /**
1194
- * The style of the font. The default value is 'normal'.
1196
+ * The style of the font.
1197
+ * @defaultValue 'normal'
1195
1198
  */
1196
1199
  fontStyle?: "normal" | "italic";
1197
1200
  /**
1198
- * The decoration of the font. The default value is 'none'.
1201
+ * The decoration of the font.
1202
+ * @defaultValue 'none'
1199
1203
  */
1200
1204
  decoration?: "none" | "underline";
1201
1205
  };
@@ -1214,19 +1218,23 @@ export declare type TextDragConfig = {
1214
1218
  */
1215
1219
  children?: string[];
1216
1220
  /**
1217
- * The alignment of the text. The default value is 'start'.
1221
+ * The alignment of the text.
1222
+ * @defaultValue 'start'
1218
1223
  */
1219
1224
  textAlign?: "start" | "center" | "end";
1220
1225
  /**
1221
- * The weight of the font. The default value is 'normal'.
1226
+ * The weight of the font.
1227
+ * @defaultValue 'normal'
1222
1228
  */
1223
- fontWeight?: "normal" | "bold";
1229
+ fontWeight?: FontWeight;
1224
1230
  /**
1225
- * The style of the font. The default value is 'normal'.
1231
+ * The style of the font.
1232
+ * @defaultValue 'normal'
1226
1233
  */
1227
1234
  fontStyle?: "normal" | "italic";
1228
1235
  /**
1229
- * The decoration of the font. The default value is 'none'.
1236
+ * The decoration of the font.
1237
+ * @defaultValue 'none'
1230
1238
  */
1231
1239
  decoration?: "none" | "underline";
1232
1240
  };
@@ -1490,7 +1498,7 @@ export declare type VideoDragConfigForElement<E extends Element> =
1490
1498
  * @public
1491
1499
  * A video asset that will be used to fill the given path.
1492
1500
  */
1493
- declare type VideoFill = {
1501
+ export declare type VideoFill = {
1494
1502
  /**
1495
1503
  * Type of an asset that will be used to fill the given path.
1496
1504
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canva/design",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "The Canva Apps SDK design library",
5
5
  "author": "Canva Pty Ltd.",
6
6
  "license": "SEE LICENSE IN LICENSE.md FILE",
@@ -16,4 +16,4 @@
16
16
  }
17
17
  },
18
18
  "typings": "./index.d.ts"
19
- }
19
+ }