@canva/design 2.7.4-beta.2 → 2.7.5-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/beta.d.ts CHANGED
@@ -133,7 +133,7 @@ export declare const addElementAtCursor: (
133
133
  ) => Promise<void>;
134
134
 
135
135
  /**
136
- * @public
136
+ * @beta
137
137
  * Add element to fixed designs, which use a coordinate-based positioning system.
138
138
  *
139
139
  * @example Insert an image at specific coordinates
@@ -245,7 +245,7 @@ export declare const addNativeElement: (
245
245
  ) => Promise<void>;
246
246
 
247
247
  /**
248
- * @public
248
+ * @beta
249
249
  * Adds a new page immediately after the currently selected page.
250
250
  * @param opts - Configuration for the new page to be added.
251
251
  *
@@ -352,7 +352,7 @@ export declare const addPage: (opts?: {
352
352
  * @public
353
353
  * Alternative text for a11y compliance.
354
354
  */
355
- export declare type AltText = {
355
+ declare type AltText = {
356
356
  /**
357
357
  * The text content.
358
358
  */
@@ -438,7 +438,7 @@ export declare type AltText = {
438
438
  * });
439
439
  * ```
440
440
  */
441
- export declare type AppElementChangeHandler<A extends AppElementData> = (
441
+ declare type AppElementChangeHandler<A extends AppElementData> = (
442
442
  appElement:
443
443
  | {
444
444
  /**
@@ -510,7 +510,7 @@ export declare type AppElementChangeHandler<A extends AppElementData> = (
510
510
  * @public
511
511
  * A client that provides methods for creating and managing the lifecycle of an app element.
512
512
  */
513
- export declare interface AppElementClient<A extends AppElementData> {
513
+ declare interface AppElementClient<A extends AppElementData> {
514
514
  /**
515
515
  * @deprecated This type has been superseded, use `addElement` or `registerOnElementChange` instead.
516
516
  * If an app element is selected, the element's data is overwritten and the element is re-rendered.
@@ -744,7 +744,7 @@ export declare interface AppElementClient<A extends AppElementData> {
744
744
  }
745
745
 
746
746
  /**
747
- * @public
747
+ * @beta
748
748
  * Options for creating an app element client.
749
749
  */
750
750
  export declare type AppElementClientConfiguration<A extends AppElementData> = {
@@ -758,14 +758,14 @@ export declare type AppElementClientConfiguration<A extends AppElementData> = {
758
758
  * @public
759
759
  * The data associated with an app element.
760
760
  */
761
- export declare type AppElementData = Record<string, Value>;
761
+ declare type AppElementData = Record<string, Value>;
762
762
 
763
763
  /**
764
764
  * @public
765
765
  * Used to add or update an app element to the design.
766
766
  * The update function is provided in the AppElementChangeHandler callback (registerOnElementChange).
767
767
  */
768
- export declare type AppElementOptions<A extends AppElementData> = {
768
+ declare type AppElementOptions<A extends AppElementData> = {
769
769
  /**
770
770
  * The data to attach to the app element.
771
771
  */
@@ -777,7 +777,7 @@ export declare type AppElementOptions<A extends AppElementData> = {
777
777
  };
778
778
 
779
779
  /**
780
- * @public
780
+ * @beta
781
781
  * A callback function that renders an app element based on the data it receives.
782
782
  * @param appElementData - The data the callback must use to render the app element.
783
783
  */
@@ -786,7 +786,7 @@ export declare type AppElementRenderer<A extends AppElementData> = (
786
786
  ) => AppElementRendererOutput;
787
787
 
788
788
  /**
789
- * @public
789
+ * @beta
790
790
  * An array of one or more elements to render as output of an app element.
791
791
  */
792
792
  export declare type AppElementRendererOutput = GroupContentAtPoint[];
@@ -795,7 +795,7 @@ export declare type AppElementRendererOutput = GroupContentAtPoint[];
795
795
  * @public
796
796
  * A unique identifier that references an app runtime process
797
797
  */
798
- export declare type AppProcessId = string & {
798
+ declare type AppProcessId = string & {
799
799
  __appProcessId: never;
800
800
  };
801
801
 
@@ -803,7 +803,7 @@ export declare type AppProcessId = string & {
803
803
  * @public
804
804
  * Audio track to be added to the design at the end of a drag event.
805
805
  */
806
- export declare type AudioDragConfig = {
806
+ declare type AudioDragConfig = {
807
807
  /**
808
808
  * The type of element.
809
809
  */
@@ -828,7 +828,7 @@ export declare type AudioDragConfig = {
828
828
  * @public
829
829
  * A unique identifier that references an audio asset in Canva's backend.
830
830
  */
831
- export declare type AudioRef = string & {
831
+ declare type AudioRef = string & {
832
832
  __audioRef: never;
833
833
  };
834
834
 
@@ -836,7 +836,7 @@ export declare type AudioRef = string & {
836
836
  * @public
837
837
  * An audio track that can be added to a design.
838
838
  */
839
- export declare type AudioTrack = {
839
+ declare type AudioTrack = {
840
840
  /**
841
841
  * A unique identifier that points to an audio asset in Canva's backend.
842
842
  */
@@ -847,7 +847,7 @@ export declare type AudioTrack = {
847
847
  * @public
848
848
  * A segment of a richtext range.
849
849
  */
850
- export declare type Bounds = {
850
+ declare type Bounds = {
851
851
  /**
852
852
  * The starting position of the segment.
853
853
  *
@@ -861,21 +861,11 @@ export declare type Bounds = {
861
861
  length: number;
862
862
  };
863
863
 
864
- /**
865
- * @deprecated
866
- * @public
867
- * A position, rotation, and set of dimensions.
868
- *
869
- * @remarks
870
- * The position and dimensions are relative to the container.
871
- */
872
- export declare type Box = Point & (WidthAndHeight | Width | Height);
873
-
874
864
  /**
875
865
  * @public
876
866
  * An individual cell in a table element.
877
867
  */
878
- export declare type Cell = {
868
+ declare type Cell = {
879
869
  /**
880
870
  * The attributes of the cell.
881
871
  */
@@ -945,7 +935,7 @@ declare type CommonImageDragConfig = {
945
935
  * @public
946
936
  * A snapshot of content from a user's design.
947
937
  */
948
- export declare interface ContentDraft<T> {
938
+ declare interface ContentDraft<T> {
949
939
  /**
950
940
  * The individual content items that exist within the snapshot.
951
941
  *
@@ -1020,16 +1010,10 @@ export declare interface ContentDraft<T> {
1020
1010
  */
1021
1011
  export declare type ContentType = "richtext" | "fill";
1022
1012
 
1023
- /**
1024
- * @public
1025
- * A type of content that can be read from a user's design.
1026
- */
1027
- declare type ContentType_2 = "richtext";
1028
-
1029
1013
  /**
1030
1014
  * @beta
1031
1015
  */
1032
- export declare type ContentTypeMap = {
1016
+ declare type ContentTypeMap = {
1033
1017
  richtext: RichtextContentSession;
1034
1018
  fill: FillContentSession;
1035
1019
  };
@@ -1038,25 +1022,10 @@ export declare type ContentTypeMap = {
1038
1022
  * @public
1039
1023
  * Options for configuring where content in a design should be queried from.
1040
1024
  */
1041
- export declare type ContextOptions = {
1025
+ declare type ContextOptions = {
1042
1026
  target: "current_page";
1043
1027
  };
1044
1028
 
1045
- /**
1046
- * @public
1047
- * A set of X and Y coordinates.
1048
- */
1049
- export declare type Coordinates = {
1050
- /**
1051
- * X coordinate, in pixels.
1052
- */
1053
- x: number;
1054
- /**
1055
- * Y coordinate, in pixels.
1056
- */
1057
- y: number;
1058
- };
1059
-
1060
1029
  /**
1061
1030
  * @public
1062
1031
  * Creates a new RichtextRange object, which contains methods to manipulate text.
@@ -2775,7 +2744,7 @@ export declare namespace DesignEditing {
2775
2744
  }
2776
2745
 
2777
2746
  /**
2778
- * @public
2747
+ * @beta
2779
2748
  * An element that's natively supported by the Canva editor.
2780
2749
  */
2781
2750
  export declare type DesignElement =
@@ -2792,7 +2761,7 @@ export declare type DesignElement =
2792
2761
  * @public
2793
2762
  * Information about the design.
2794
2763
  */
2795
- export declare type DesignMetadata = {
2764
+ declare type DesignMetadata = {
2796
2765
  /**
2797
2766
  * The title of the user's design.
2798
2767
  * @remarks
@@ -2906,7 +2875,7 @@ export declare type DesignOpenPageCallback<
2906
2875
  * @public
2907
2876
  * Provides methods for managing the lifecycle of overlays, such as selected image overlays.
2908
2877
  */
2909
- export declare type DesignOverlay = {
2878
+ declare type DesignOverlay = {
2910
2879
  /**
2911
2880
  * Registers a callback that runs when the `canOpen` state of an overlay target changes.
2912
2881
  * @param opts - Options for configuring the callback.
@@ -3006,7 +2975,7 @@ export declare type DesignOverlay = {
3006
2975
  * @public
3007
2976
  * Provides methods for interacting with selected content.
3008
2977
  */
3009
- export declare type DesignSelection = {
2978
+ declare type DesignSelection = {
3010
2979
  /**
3011
2980
  * Registers a callback that runs when the specified type of content is selected.
3012
2981
  *
@@ -3093,7 +3062,7 @@ export declare type DesignSelection = {
3093
3062
  * @public
3094
3063
  * JWT that contains the Design ID and App ID.
3095
3064
  */
3096
- export declare type DesignToken = {
3065
+ declare type DesignToken = {
3097
3066
  token: string;
3098
3067
  };
3099
3068
 
@@ -3101,7 +3070,7 @@ export declare type DesignToken = {
3101
3070
  * @public
3102
3071
  * A set of dimensions.
3103
3072
  */
3104
- export declare type Dimensions = {
3073
+ declare type Dimensions = {
3105
3074
  /**
3106
3075
  * A width, in pixels.
3107
3076
  */
@@ -3116,7 +3085,7 @@ export declare type Dimensions = {
3116
3085
  * @public
3117
3086
  * An event that occurs when a user starts dragging an HTML element.
3118
3087
  */
3119
- export declare type DragStartEvent<E extends Element> = Pick<
3088
+ declare type DragStartEvent<E extends Element> = Pick<
3120
3089
  DragEvent,
3121
3090
  "dataTransfer" | "currentTarget" | "preventDefault" | "clientX" | "clientY"
3122
3091
  > & {
@@ -3174,15 +3143,6 @@ export declare type EditContentCallback = (
3174
3143
  session: RichtextContentSession | FillContentSession,
3175
3144
  ) => Promise<void> | void;
3176
3145
 
3177
- /**
3178
- * @public
3179
- * A callback for reading and updating the requested design content.
3180
- * @param session - The result of reading the content in the design.
3181
- */
3182
- declare type EditContentCallback_2 = (
3183
- session: RichtextContentSession,
3184
- ) => Promise<void> | void;
3185
-
3186
3146
  /**
3187
3147
  * @beta
3188
3148
  * Options for configuring how the design content is read.
@@ -3194,31 +3154,20 @@ export declare type EditContentOptions = {
3194
3154
  contentType: ContentType;
3195
3155
  } & ContextOptions;
3196
3156
 
3197
- /**
3198
- * @public
3199
- * Options for configuring how the design content is read.
3200
- */
3201
- declare type EditContentOptions_2 = {
3202
- /**
3203
- * The type of content to edit from the user's design
3204
- */
3205
- contentType: ContentType_2;
3206
- } & ContextOptions;
3207
-
3208
3157
  /**
3209
3158
  * @public
3210
3159
  * Elements targeting a cursor are a subset of the base Element
3211
3160
  **/
3212
- export declare type ElementAtCursor =
3161
+ declare type ElementAtCursor =
3213
3162
  | ImageElement
3214
- | VideoElement
3163
+ | VideoElement_2
3215
3164
  | EmbedElement
3216
3165
  | TextElement
3217
3166
  | RichtextElement
3218
3167
  | TableElement;
3219
3168
 
3220
3169
  /**
3221
- * @public
3170
+ * @beta
3222
3171
  * An element that's natively supported by the Canva editor and has positional properties.
3223
3172
  */
3224
3173
  export declare type ElementAtPoint =
@@ -3230,11 +3179,24 @@ export declare type ElementAtPoint =
3230
3179
  | GroupElementAtPoint
3231
3180
  | RichtextElementAtPoint;
3232
3181
 
3182
+ /**
3183
+ * @public
3184
+ * An element that's natively supported by the Canva editor and has positional properties.
3185
+ */
3186
+ declare type ElementAtPoint_2 =
3187
+ | ImageElementAtPoint
3188
+ | VideoElementAtPoint_2
3189
+ | EmbedElementAtPoint
3190
+ | TextElementAtPoint
3191
+ | ShapeElementAtPoint
3192
+ | GroupElementAtPoint
3193
+ | RichtextElementAtPoint;
3194
+
3233
3195
  /**
3234
3196
  * @public
3235
3197
  * Embed element to be added to the design at the end of a drag event.
3236
3198
  */
3237
- export declare type EmbedDragConfig = {
3199
+ declare type EmbedDragConfig = {
3238
3200
  /**
3239
3201
  * The type of element.
3240
3202
  */
@@ -3260,7 +3222,7 @@ export declare type EmbedDragConfig = {
3260
3222
  * @public
3261
3223
  * An element that renders rich media, such as a YouTube video.
3262
3224
  */
3263
- export declare type EmbedElement = {
3225
+ declare type EmbedElement = {
3264
3226
  /**
3265
3227
  * The type of element.
3266
3228
  */
@@ -3278,7 +3240,7 @@ export declare type EmbedElement = {
3278
3240
  * @public
3279
3241
  * An element that renders rich media, such as a YouTube video, and has positional properties.
3280
3242
  */
3281
- export declare type EmbedElementAtPoint = EmbedElement &
3243
+ declare type EmbedElementAtPoint = EmbedElement &
3282
3244
  Point &
3283
3245
  (WidthAndHeight | Width | Height);
3284
3246
 
@@ -3286,7 +3248,7 @@ export declare type EmbedElementAtPoint = EmbedElement &
3286
3248
  * @public
3287
3249
  * The result when a user abandons the export flow, such as by closing the export menu.
3288
3250
  */
3289
- export declare type ExportAborted = {
3251
+ declare type ExportAborted = {
3290
3252
  /**
3291
3253
  * The status of the export flow.
3292
3254
  */
@@ -3297,47 +3259,13 @@ export declare type ExportAborted = {
3297
3259
  * @public
3298
3260
  * The exported file.
3299
3261
  */
3300
- export declare type ExportBlob = {
3262
+ declare type ExportBlob = {
3301
3263
  /**
3302
3264
  * The URL of the exported design.
3303
3265
  *
3304
3266
  * @remarks
3305
3267
  * If a user's design contains multiple pages but is exported in a format that doesn't support multiple pages,
3306
- * this URL will point to a ZIP file that contains each page as a separate file.
3307
- *
3308
- * For example:
3309
- *
3310
- * - If a single-page design is exported as a JPG, the URL will point to a JPG file.
3311
- * - If a multi-page design is exported as a JPG, the URL will point to a ZIP file that contains a JPG file for each page.
3312
- * - If a multi-page design is exported as a PDF file, the URL will point to a PDF file.
3313
- *
3314
- * The following file types support multiple pages:
3315
- *
3316
- * - `"GIF"`
3317
- * - `"PDF_STANDARD"`
3318
- * - `"PPTX"`
3319
- * - `"VIDEO"`
3320
- *
3321
- * The following file types do not support multiple pages:
3322
- *
3323
- * - `"JPG"`
3324
- * - `"PNG"`
3325
- * - `"SVG"`
3326
- */
3327
- url: string;
3328
- };
3329
-
3330
- /**
3331
- * @beta
3332
- * The exported file.
3333
- */
3334
- export declare type ExportBlobWithZippedOptionOutput = {
3335
- /**
3336
- * The URL of the exported design.
3337
- *
3338
- * @remarks
3339
- * If a user's design contains multiple pages but is exported in a format that doesn't support multiple pages,
3340
- * by defaultthis URL will point to a ZIP file that contains each page as a separate file.
3268
+ * by default this URL will point to a ZIP file that contains each page as a separate file.
3341
3269
  *
3342
3270
  * If the user has configured the export to not zip the exported files (using the `zipped` property), this URL will point to a single file.
3343
3271
  *
@@ -3369,30 +3297,7 @@ export declare type ExportBlobWithZippedOptionOutput = {
3369
3297
  * @public
3370
3298
  * The result when a user successfully completes an export flow.
3371
3299
  */
3372
- export declare type ExportCompleted = {
3373
- /**
3374
- * The status of the export flow.
3375
- */
3376
- status: "completed";
3377
- /**
3378
- * The title of the design, if set by the user.
3379
- */
3380
- title?: string;
3381
- /**
3382
- * The exported files.
3383
- *
3384
- * @remarks
3385
- * This array only contains one element. This is because, if a multi-page design is exported as multiple files, the files
3386
- * are exported in a ZIP file. In the future, there'll be an option for each file to be a separate element in the array.
3387
- */
3388
- exportBlobs: ExportBlob[];
3389
- };
3390
-
3391
- /**
3392
- * @beta
3393
- * The result when a user successfully completes an export flow.
3394
- */
3395
- export declare type ExportCompletedWithZippedOptionOutput = {
3300
+ declare type ExportCompleted = {
3396
3301
  /**
3397
3302
  * The status of the export flow.
3398
3303
  */
@@ -3407,14 +3312,14 @@ export declare type ExportCompletedWithZippedOptionOutput = {
3407
3312
  * @remarks
3408
3313
  * This array can contain a single link either to a file or a ZIP, or multiple links to individual files.
3409
3314
  */
3410
- exportBlobs: ExportBlobWithZippedOptionOutput[];
3315
+ exportBlobs: ExportBlob[];
3411
3316
  };
3412
3317
 
3413
3318
  /**
3414
3319
  * @public
3415
3320
  * The types of files that Canva supports for exported designs.
3416
3321
  */
3417
- export declare type ExportFileType =
3322
+ declare type ExportFileType =
3418
3323
  | "png"
3419
3324
  | "jpg"
3420
3325
  | "pdf_standard"
@@ -3424,10 +3329,10 @@ export declare type ExportFileType =
3424
3329
  | "svg";
3425
3330
 
3426
3331
  /**
3427
- * @beta
3332
+ * @public
3428
3333
  * Object representation of the supported file types with properties where applicable.
3429
3334
  */
3430
- export declare type ExportFileTypeWithProperties =
3335
+ declare type ExportFileTypeWithProperties =
3431
3336
  | {
3432
3337
  type: "pdf_standard" | "pptx";
3433
3338
  }
@@ -3440,21 +3345,7 @@ export declare type ExportFileTypeWithProperties =
3440
3345
  * @public
3441
3346
  * Options for configuring the export of a design.
3442
3347
  */
3443
- export declare type ExportRequest = {
3444
- /**
3445
- * The types of files the user can export their design as.
3446
- *
3447
- * @remarks
3448
- * You must provide at least one file type.
3449
- */
3450
- acceptedFileTypes: ExportFileType[];
3451
- };
3452
-
3453
- /**
3454
- * @beta
3455
- * Options for configuring the export of a design.
3456
- */
3457
- export declare type ExportRequestWithFileTypeProperties = {
3348
+ declare type ExportRequest = {
3458
3349
  /**
3459
3350
  * The types of files the user can export their design as.
3460
3351
  *
@@ -3468,15 +3359,7 @@ export declare type ExportRequestWithFileTypeProperties = {
3468
3359
  * @public
3469
3360
  * The result of exporting a design.
3470
3361
  */
3471
- export declare type ExportResponse = ExportCompleted | ExportAborted;
3472
-
3473
- /**
3474
- * @beta
3475
- * The result of exporting a design.
3476
- */
3477
- export declare type ExportResponseWithZippedOptionOutput =
3478
- | ExportCompletedWithZippedOptionOutput
3479
- | ExportAborted;
3362
+ declare type ExportResponse = ExportCompleted | ExportAborted;
3480
3363
 
3481
3364
  /**
3482
3365
  * @public
@@ -3485,7 +3368,7 @@ export declare type ExportResponseWithZippedOptionOutput =
3485
3368
  * @remarks
3486
3369
  * This type is only used when the image data is from an external URL.
3487
3370
  */
3488
- export declare type ExternalImageDragConfig = CommonImageDragConfig & {
3371
+ declare type ExternalImageDragConfig = CommonImageDragConfig & {
3489
3372
  /**
3490
3373
  * A function that returns a reference (ref) to an audio asset in Canva's backend.
3491
3374
  */
@@ -3509,7 +3392,7 @@ export declare type ExternalImageDragConfig = CommonImageDragConfig & {
3509
3392
  * @remarks
3510
3393
  * The `color` and `asset` properties are mutually exclusive.
3511
3394
  */
3512
- export declare type Fill = {
3395
+ declare type Fill = {
3513
3396
  /**
3514
3397
  * If `true`, users can replace a fill by dropping an image or video onto it.
3515
3398
  */
@@ -3534,7 +3417,7 @@ export declare type Fill = {
3534
3417
  * @beta
3535
3418
  * Object for interacting with fill content (images/videos).
3536
3419
  */
3537
- export declare type FillContent =
3420
+ declare type FillContent =
3538
3421
  | {
3539
3422
  type: "image";
3540
3423
  /**
@@ -3576,7 +3459,7 @@ export declare type FillContent =
3576
3459
  * @beta
3577
3460
  * Session for reading and updating fill content in a user's design.
3578
3461
  */
3579
- export declare interface FillContentSession {
3462
+ declare interface FillContentSession {
3580
3463
  /**
3581
3464
  * Fill content in the design.
3582
3465
  */
@@ -3595,7 +3478,7 @@ export declare interface FillContentSession {
3595
3478
  * @public
3596
3479
  * A reference to a font that can be used in other parts of the SDK.
3597
3480
  */
3598
- export declare type FontRef = string & {
3481
+ declare type FontRef = string & {
3599
3482
  __fontRef: never;
3600
3483
  };
3601
3484
 
@@ -3603,7 +3486,7 @@ export declare type FontRef = string & {
3603
3486
  * @public
3604
3487
  * Font weights supported in the SDK.
3605
3488
  **/
3606
- export declare type FontWeight =
3489
+ declare type FontWeight =
3607
3490
  | "normal"
3608
3491
  | "thin"
3609
3492
  | "extralight"
@@ -3732,7 +3615,7 @@ export declare const getDesignMetadata: () => Promise<DesignMetadata>;
3732
3615
  export declare const getDesignToken: () => Promise<DesignToken>;
3733
3616
 
3734
3617
  /**
3735
- * @public
3618
+ * @beta
3736
3619
  * An element that's natively supported by the Canva editor, can exist within a group, and has positional properties.
3737
3620
  */
3738
3621
  export declare type GroupContentAtPoint = Exclude<
@@ -3740,11 +3623,20 @@ export declare type GroupContentAtPoint = Exclude<
3740
3623
  GroupElementAtPoint
3741
3624
  >;
3742
3625
 
3626
+ /**
3627
+ * @public
3628
+ * An element that's natively supported by the Canva editor, can exist within a group, and has positional properties.
3629
+ */
3630
+ declare type GroupContentAtPoint_2 = Exclude<
3631
+ ElementAtPoint_2,
3632
+ GroupElementAtPoint
3633
+ >;
3634
+
3743
3635
  /**
3744
3636
  * @public
3745
3637
  * An element that contains two or more elements.
3746
3638
  */
3747
- export declare type GroupElement = {
3639
+ declare type GroupElement = {
3748
3640
  /**
3749
3641
  * The type of element.
3750
3642
  */
@@ -3756,14 +3648,14 @@ export declare type GroupElement = {
3756
3648
  * - Each element within a group must have dimensions and a position.
3757
3649
  * - The dimensions and positions are relative to the dimensions and positions of the group.
3758
3650
  */
3759
- children: GroupContentAtPoint[];
3651
+ children: GroupContentAtPoint_2[];
3760
3652
  };
3761
3653
 
3762
3654
  /**
3763
3655
  * @public
3764
3656
  * An element that contains two or more elements and has positional properties.
3765
3657
  */
3766
- export declare type GroupElementAtPoint = GroupElement &
3658
+ declare type GroupElementAtPoint = GroupElement &
3767
3659
  Point &
3768
3660
  (WidthAndHeight | Width | Height);
3769
3661
 
@@ -3790,13 +3682,13 @@ declare type Height = {
3790
3682
  * @public
3791
3683
  * Image element or content to be added to the design at the end of a drag event.
3792
3684
  */
3793
- export declare type ImageDragConfig = ExternalImageDragConfig;
3685
+ declare type ImageDragConfig = ExternalImageDragConfig;
3794
3686
 
3795
3687
  /**
3796
3688
  * @public
3797
3689
  * Image element or content to be added to the design at the end of a drag event.
3798
3690
  */
3799
- export declare type ImageDragConfigForElement<E extends Element> =
3691
+ declare type ImageDragConfigForElement<E extends Element> =
3800
3692
  E extends HTMLImageElement
3801
3693
  ? Partial<ImageDragConfig> & Pick<ImageDragConfig, "type">
3802
3694
  : ImageDragConfig;
@@ -3805,7 +3697,7 @@ export declare type ImageDragConfigForElement<E extends Element> =
3805
3697
  * @public
3806
3698
  * An element that renders image content.
3807
3699
  */
3808
- export declare type ImageElement = {
3700
+ declare type ImageElement = {
3809
3701
  /**
3810
3702
  * The type of element.
3811
3703
  */
@@ -3844,7 +3736,7 @@ export declare type ImageElement = {
3844
3736
  * @public
3845
3737
  * An element that renders image content and has positional properties.
3846
3738
  */
3847
- export declare type ImageElementAtPoint = ImageElement &
3739
+ declare type ImageElementAtPoint = ImageElement &
3848
3740
  Point &
3849
3741
  (WidthAndHeight | Width | Height);
3850
3742
 
@@ -3852,7 +3744,7 @@ export declare type ImageElementAtPoint = ImageElement &
3852
3744
  * @public
3853
3745
  * An image asset that fills a path's interior.
3854
3746
  */
3855
- export declare type ImageFill = {
3747
+ declare type ImageFill = {
3856
3748
  /**
3857
3749
  * The type of fill.
3858
3750
  */
@@ -3874,12 +3766,12 @@ export declare type ImageFill = {
3874
3766
  * @public
3875
3767
  * A unique identifier that references an image asset in Canva's backend.
3876
3768
  */
3877
- export declare type ImageRef = string & {
3769
+ declare type ImageRef = string & {
3878
3770
  __imageRef: never;
3879
3771
  };
3880
3772
 
3881
3773
  /**
3882
- * @public
3774
+ * @beta
3883
3775
  * @param appElementConfig - Configuration for an AppElementClient
3884
3776
  *
3885
3777
  * @example Initialize app element client
@@ -3924,7 +3816,7 @@ export declare const initAppElement: <A extends AppElementData>(
3924
3816
  * @public
3925
3817
  * Options for formatting inline richtext.
3926
3818
  */
3927
- export declare type InlineFormatting = {
3819
+ declare type InlineFormatting = {
3928
3820
  /**
3929
3821
  * The color of the text as a hex code.
3930
3822
  *
@@ -3970,34 +3862,22 @@ export declare type InlineFormatting = {
3970
3862
  * @public
3971
3863
  * An element that's natively supported by the Canva editor.
3972
3864
  */
3973
- export declare type NativeElement =
3865
+ declare type NativeElement =
3974
3866
  | NativeImageElement
3975
- | NativeVideoElement
3867
+ | NativeVideoElement_2
3976
3868
  | NativeEmbedElement
3977
3869
  | NativeTextElement
3978
3870
  | NativeShapeElement
3979
3871
  | NativeGroupElement;
3980
3872
 
3981
- /**
3982
- * @deprecated
3983
- * @public
3984
- * The types of elements an app can add to a user's design.
3985
- */
3986
- export declare type NativeElementType =
3987
- | "image"
3988
- | "embed"
3989
- | "text"
3990
- | "shape"
3991
- | "video";
3992
-
3993
3873
  /**
3994
3874
  * @deprecated The type has been superseded by `ElementAtPoint`.
3995
3875
  * @public
3996
3876
  * An element that's natively supported by the Canva editor and has positional properties.
3997
3877
  */
3998
- export declare type NativeElementWithBox =
3878
+ declare type NativeElementWithBox =
3999
3879
  | NativeImageElementWithBox
4000
- | NativeVideoElementWithBox
3880
+ | NativeVideoElementWithBox_2
4001
3881
  | NativeEmbedElementWithBox
4002
3882
  | NativeTextElementWithBox
4003
3883
  | NativeShapeElementWithBox
@@ -4008,92 +3888,99 @@ export declare type NativeElementWithBox =
4008
3888
  * @public
4009
3889
  * An element that renders rich media, such as a YouTube video.
4010
3890
  */
4011
- export declare type NativeEmbedElement = EmbedElement;
3891
+ declare type NativeEmbedElement = EmbedElement;
4012
3892
 
4013
3893
  /**
4014
3894
  * @deprecated The type has been superseded by `EmbedElementAtPoint`.
4015
3895
  * @public
4016
3896
  * An element that renders rich media, such as a YouTube video, and has positional properties.
4017
3897
  */
4018
- export declare type NativeEmbedElementWithBox = EmbedElementAtPoint;
3898
+ declare type NativeEmbedElementWithBox = EmbedElementAtPoint;
4019
3899
 
4020
3900
  /**
4021
3901
  * @deprecated The type has been superseded by `GroupElement`.
4022
3902
  * @public
4023
3903
  * An element that contains two or more elements.
4024
3904
  */
4025
- export declare type NativeGroupElement = GroupElement;
3905
+ declare type NativeGroupElement = GroupElement;
4026
3906
 
4027
3907
  /**
4028
3908
  * @deprecated The type has been superseded by `GroupElementAtPoint`.
4029
3909
  * @public
4030
3910
  * An element that contains two or more elements and has positional properties.
4031
3911
  */
4032
- export declare type NativeGroupElementWithBox = GroupElementAtPoint;
3912
+ declare type NativeGroupElementWithBox = GroupElementAtPoint;
4033
3913
 
4034
3914
  /**
4035
3915
  * @deprecated The type has been superseded by `ImageElement`.
4036
3916
  * @public
4037
3917
  * An element that renders image content.
4038
3918
  */
4039
- export declare type NativeImageElement = ImageElement;
3919
+ declare type NativeImageElement = ImageElement;
4040
3920
 
4041
3921
  /**
4042
3922
  * @deprecated The type has been superseded by `ImageElementAtPoint`.
4043
3923
  * @public
4044
3924
  * An element that renders image content and has positional properties.
4045
3925
  */
4046
- export declare type NativeImageElementWithBox = ImageElementAtPoint;
3926
+ declare type NativeImageElementWithBox = ImageElementAtPoint;
4047
3927
 
4048
3928
  /**
4049
3929
  * @deprecated The type has been superseded by `ShapeElement`.
4050
3930
  * @public
4051
3931
  * An element that renders a vector shape.
4052
3932
  */
4053
- export declare type NativeShapeElement = ShapeElement;
3933
+ declare type NativeShapeElement = ShapeElement;
4054
3934
 
4055
3935
  /**
4056
3936
  * @deprecated The type has been superseded by `ShapeElementAtPoint`.
4057
3937
  * @public
4058
3938
  * An element that renders a vector shape and has positional properties.
4059
3939
  */
4060
- export declare type NativeShapeElementWithBox = ShapeElementAtPoint;
4061
-
4062
- /**
4063
- * @deprecated The type has been superseded by `GroupContentAtPoint`.
4064
- * @public
4065
- * An element that's natively supported by the Canva editor, can exist within a group, and has positional properties.
4066
- */
4067
- export declare type NativeSimpleElementWithBox = GroupContentAtPoint;
3940
+ declare type NativeShapeElementWithBox = ShapeElementAtPoint;
4068
3941
 
4069
3942
  /**
4070
3943
  * @deprecated The type has been superseded by `TextElement`.
4071
3944
  * @public
4072
3945
  * An element that renders text content.
4073
3946
  */
4074
- export declare type NativeTextElement = TextElement;
3947
+ declare type NativeTextElement = TextElement;
4075
3948
 
4076
3949
  /**
4077
3950
  * @deprecated The type has been superseded by `TextElementAtPoint`.
4078
3951
  * @public
4079
3952
  * An element that renders text content and has positional properties.
4080
3953
  */
4081
- export declare type NativeTextElementWithBox = TextElementAtPoint;
3954
+ declare type NativeTextElementWithBox = TextElementAtPoint;
4082
3955
 
4083
3956
  /**
4084
3957
  * @deprecated The type has been superseded by `VideoElement`.
4085
- * @public
3958
+ * @beta
4086
3959
  * An element that renders video content.
4087
3960
  */
4088
3961
  export declare type NativeVideoElement = VideoElement;
4089
3962
 
4090
3963
  /**
4091
- * @deprecated The type has been superseded by `VideoElementAtPoint`.
3964
+ * @deprecated The type has been superseded by `VideoElement`.
4092
3965
  * @public
3966
+ * An element that renders video content.
3967
+ */
3968
+ declare type NativeVideoElement_2 = VideoElement_2;
3969
+
3970
+ /**
3971
+ * @deprecated The type has been superseded by `VideoElementAtPoint`.
3972
+ * @beta
4093
3973
  * An element that renders video content and has positional properties.
4094
3974
  */
4095
3975
  export declare type NativeVideoElementWithBox = VideoElementAtPoint;
4096
3976
 
3977
+ /**
3978
+ * @deprecated The type has been superseded by `VideoElementAtPoint`.
3979
+ * @public
3980
+ * An element that renders video content and has positional properties.
3981
+ */
3982
+ declare type NativeVideoElementWithBox_2 = VideoElementAtPoint_2;
3983
+
4097
3984
  /**
4098
3985
  * An object primitive data type that can be used in app element data.
4099
3986
  */
@@ -4127,7 +4014,7 @@ export declare const overlay: DesignOverlay;
4127
4014
  * @public
4128
4015
  * Information about whether or not an overlay can be opened for the specified target.
4129
4016
  */
4130
- export declare type OverlayOpenableEvent<Target extends OverlayTarget> = {
4017
+ declare type OverlayOpenableEvent<Target extends OverlayTarget> = {
4131
4018
  /**
4132
4019
  * Information about whether or not an overlay can be opened or not for a selected image.
4133
4020
  */
@@ -4158,7 +4045,7 @@ export declare type OverlayOpenableEvent<Target extends OverlayTarget> = {
4158
4045
  * @public
4159
4046
  * An entity that an overlay can be opened for.
4160
4047
  */
4161
- export declare type OverlayTarget = "image_selection";
4048
+ declare type OverlayTarget = "image_selection";
4162
4049
 
4163
4050
  /**
4164
4051
  * @public
@@ -4179,13 +4066,13 @@ declare type OverlayUnopenableEvent = {
4179
4066
  * @public
4180
4067
  * The appearance of a page's background.
4181
4068
  */
4182
- export declare type PageBackgroundFill = Pick<Fill, "asset" | "color">;
4069
+ declare type PageBackgroundFill = Pick<Fill, "asset" | "color">;
4183
4070
 
4184
4071
  /**
4185
4072
  * @public
4186
4073
  * Information about a page.
4187
4074
  */
4188
- export declare type PageContext = {
4075
+ declare type PageContext = {
4189
4076
  /**
4190
4077
  * The dimensions of the page, in pixels.
4191
4078
  *
@@ -4199,7 +4086,7 @@ export declare type PageContext = {
4199
4086
  * @public
4200
4087
  * A set of page dimensions, in pixels.
4201
4088
  */
4202
- export declare type PageDimensions = {
4089
+ declare type PageDimensions = {
4203
4090
  /**
4204
4091
  * The width of the page, in pixels.
4205
4092
  */
@@ -4214,7 +4101,7 @@ export declare type PageDimensions = {
4214
4101
  * @public
4215
4102
  * Information about a page.
4216
4103
  */
4217
- export declare type PageMetadata = {
4104
+ declare type PageMetadata = {
4218
4105
  /**
4219
4106
  * The dimensions of the page, in pixels.
4220
4107
  *
@@ -4228,7 +4115,7 @@ export declare type PageMetadata = {
4228
4115
  * @public
4229
4116
  * The outline of a path.
4230
4117
  */
4231
- export declare type PathStroke = {
4118
+ declare type PathStroke = {
4232
4119
  /**
4233
4120
  * The weight (thickness) of the stroke.
4234
4121
  *
@@ -4257,7 +4144,7 @@ export declare type PathStroke = {
4257
4144
  * @public
4258
4145
  * A position, set of dimensions, and rotation.
4259
4146
  */
4260
- export declare type Placement = Point & (WidthAndHeight | Width | Height);
4147
+ declare type Placement = Point & (WidthAndHeight | Width | Height);
4261
4148
 
4262
4149
  /**
4263
4150
  * A position and rotation.
@@ -4300,19 +4187,19 @@ declare type Point = {
4300
4187
  declare type Primitive = undefined | null | number | boolean | string;
4301
4188
 
4302
4189
  /**
4303
- * @beta
4190
+ * @public
4304
4191
  * Exports the user's design as one or more static files.
4305
4192
  * @param request - The request object containing configurations of the design export.
4306
4193
  */
4307
4194
  export declare const requestExport: (
4308
- request: ExportRequestWithFileTypeProperties,
4309
- ) => Promise<ExportResponseWithZippedOptionOutput>;
4195
+ request: ExportRequest,
4196
+ ) => Promise<ExportResponse>;
4310
4197
 
4311
4198
  /**
4312
4199
  * @public
4313
4200
  * Provides methods for interacting with a range of formatted text.
4314
4201
  */
4315
- export declare interface RichtextContentRange extends RichtextRange {
4202
+ declare interface RichtextContentRange extends RichtextRange {
4316
4203
  /**
4317
4204
  * Indicates whether the object containing this richtext range has been deleted.
4318
4205
  */
@@ -4400,7 +4287,7 @@ export declare interface RichtextContentRange extends RichtextRange {
4400
4287
  * );
4401
4288
  * ```
4402
4289
  */
4403
- export declare interface RichtextContentSession {
4290
+ declare interface RichtextContentSession {
4404
4291
  /**
4405
4292
  * Richtext content in the design.
4406
4293
  */
@@ -4443,7 +4330,7 @@ export declare interface RichtextContentSession {
4443
4330
  * @public
4444
4331
  * An element that renders richtext content.
4445
4332
  */
4446
- export declare type RichtextElement = {
4333
+ declare type RichtextElement = {
4447
4334
  /**
4448
4335
  * The type of element.
4449
4336
  */
@@ -4464,13 +4351,13 @@ export declare type RichtextElement = {
4464
4351
  * It will be positioned and sized relative to its parent container.
4465
4352
  * The parent container may be an app element, or the current page.
4466
4353
  */
4467
- export declare type RichtextElementAtPoint = RichtextElement & TextBox;
4354
+ declare type RichtextElementAtPoint = RichtextElement & TextBox;
4468
4355
 
4469
4356
  /**
4470
4357
  * @public
4471
4358
  * Options for formatting richtext.
4472
4359
  */
4473
- export declare type RichtextFormatting = InlineFormatting & {
4360
+ declare type RichtextFormatting = InlineFormatting & {
4474
4361
  /**
4475
4362
  * @public
4476
4363
  * A unique identifier that points to a font asset in Canva's backend.
@@ -4518,7 +4405,7 @@ export declare type RichtextFormatting = InlineFormatting & {
4518
4405
  * @public
4519
4406
  * Provides methods for interacting with a range of formatted text.
4520
4407
  */
4521
- export declare type RichtextRange = {
4408
+ declare type RichtextRange = {
4522
4409
  /**
4523
4410
  * Formats all of the paragraphs that overlap the given bounds.
4524
4411
  *
@@ -4802,7 +4689,7 @@ export declare const selection: DesignSelection;
4802
4689
  * @public
4803
4690
  * Information about the user's selection. To access the selected content, call the `read` method.
4804
4691
  */
4805
- export declare interface SelectionEvent<Scope extends SelectionScope> {
4692
+ declare interface SelectionEvent<Scope extends SelectionScope> {
4806
4693
  /**
4807
4694
  * The type of content that's selected.
4808
4695
  */
@@ -4888,7 +4775,7 @@ export declare interface SelectionEvent<Scope extends SelectionScope> {
4888
4775
  * @public
4889
4776
  * Information about a user's selection.
4890
4777
  */
4891
- export declare interface SelectionEvent<Scope extends SelectionScope> {
4778
+ declare interface SelectionEvent<Scope extends SelectionScope> {
4892
4779
  /**
4893
4780
  * The type of content.
4894
4781
  */
@@ -4910,11 +4797,7 @@ export declare interface SelectionEvent<Scope extends SelectionScope> {
4910
4797
  * @public
4911
4798
  * A type of content that supports selection events.
4912
4799
  */
4913
- export declare type SelectionScope =
4914
- | "plaintext"
4915
- | "image"
4916
- | "video"
4917
- | "richtext";
4800
+ declare type SelectionScope = "plaintext" | "image" | "video" | "richtext";
4918
4801
 
4919
4802
  /**
4920
4803
  * @public
@@ -4923,7 +4806,7 @@ export declare type SelectionScope =
4923
4806
  * @remarks
4924
4807
  * The available properties depend on the type (scope) of content.
4925
4808
  */
4926
- export declare type SelectionValue<Scope extends SelectionScope> = {
4809
+ declare type SelectionValue<Scope extends SelectionScope> = {
4927
4810
  /**
4928
4811
  * A selected range of plaintext.
4929
4812
  */
@@ -5020,7 +4903,7 @@ export declare const setCurrentPageBackground: (
5020
4903
  * @public
5021
4904
  * An element that renders a vector shape.
5022
4905
  */
5023
- export declare type ShapeElement = {
4906
+ declare type ShapeElement = {
5024
4907
  /**
5025
4908
  * The type of element.
5026
4909
  */
@@ -5044,7 +4927,7 @@ export declare type ShapeElement = {
5044
4927
  * @public
5045
4928
  * An element that renders a vector shape and has positional properties.
5046
4929
  */
5047
- export declare type ShapeElementAtPoint = ShapeElement &
4930
+ declare type ShapeElementAtPoint = ShapeElement &
5048
4931
  Point &
5049
4932
  (WidthAndHeight | Width | Height);
5050
4933
 
@@ -5052,7 +4935,7 @@ export declare type ShapeElementAtPoint = ShapeElement &
5052
4935
  * @public
5053
4936
  * A path that defines the structure of a shape element.
5054
4937
  */
5055
- export declare type ShapePath = {
4938
+ declare type ShapePath = {
5056
4939
  /**
5057
4940
  * The shape of the path.
5058
4941
  *
@@ -5084,7 +4967,7 @@ export declare type ShapePath = {
5084
4967
  * @remarks
5085
4968
  * This is similar to the `viewBox` attribute of an `SVGElement`.
5086
4969
  */
5087
- export declare type ShapeViewBox = {
4970
+ declare type ShapeViewBox = {
5088
4971
  /**
5089
4972
  * The distance of the shape from the top edge of the element, in pixels.
5090
4973
  */
@@ -5107,7 +4990,7 @@ export declare type ShapeViewBox = {
5107
4990
  * @public
5108
4991
  * An element that renders a table.
5109
4992
  */
5110
- export declare type TableElement = {
4993
+ declare type TableElement = {
5111
4994
  /**
5112
4995
  * The type of element.
5113
4996
  */
@@ -5130,7 +5013,7 @@ export declare type TableElement = {
5130
5013
  * @public
5131
5014
  * Options for configuring the appearance of text.
5132
5015
  */
5133
- export declare type TextAttributes = {
5016
+ declare type TextAttributes = {
5134
5017
  /**
5135
5018
  * The size of the text.
5136
5019
  *
@@ -5197,7 +5080,7 @@ declare type TextBox = Point & {
5197
5080
  * @public
5198
5081
  * Text element or content to be added to the design at the end of a drag event.
5199
5082
  */
5200
- export declare type TextDragConfig = {
5083
+ declare type TextDragConfig = {
5201
5084
  /**
5202
5085
  * The type of element.
5203
5086
  */
@@ -5237,7 +5120,7 @@ export declare type TextDragConfig = {
5237
5120
  * @public
5238
5121
  * An element that renders text content.
5239
5122
  */
5240
- export declare type TextElement = {
5123
+ declare type TextElement = {
5241
5124
  /**
5242
5125
  * The type of element.
5243
5126
  */
@@ -5255,13 +5138,13 @@ export declare type TextElement = {
5255
5138
  * @public
5256
5139
  * An element that renders text content and has positional properties.
5257
5140
  */
5258
- export declare type TextElementAtPoint = TextElement & TextBox;
5141
+ declare type TextElementAtPoint = TextElement & TextBox;
5259
5142
 
5260
5143
  /**
5261
5144
  * @public
5262
5145
  * A region of richtext.
5263
5146
  */
5264
- export declare type TextRegion = {
5147
+ declare type TextRegion = {
5265
5148
  /**
5266
5149
  * The plaintext content of the region.
5267
5150
  */
@@ -5276,7 +5159,7 @@ export declare type TextRegion = {
5276
5159
  * @public
5277
5160
  * Provides methods for adding drag and drop behavior to an app.
5278
5161
  */
5279
- export declare interface UI {
5162
+ declare interface UI {
5280
5163
  /**
5281
5164
  * @deprecated The method has been superseded by `startDragToPoint`.
5282
5165
  * @public
@@ -5336,7 +5219,7 @@ export declare const ui: UI;
5336
5219
  * @public
5337
5220
  * A data type that can be used in app element data.
5338
5221
  */
5339
- export declare type Value =
5222
+ declare type Value =
5340
5223
  | Primitive
5341
5224
  | ObjectPrimitive
5342
5225
  | Exclude<Value, undefined>[]
@@ -5348,7 +5231,7 @@ export declare type Value =
5348
5231
  * @public
5349
5232
  * Video element or content to be added to the design at the end of a drag event.
5350
5233
  */
5351
- export declare type VideoDragConfig = {
5234
+ declare type VideoDragConfig = {
5352
5235
  /**
5353
5236
  * The type of element.
5354
5237
  */
@@ -5381,17 +5264,32 @@ export declare type VideoDragConfig = {
5381
5264
  * @public
5382
5265
  * Video element or content to be added to the design at the end of a drag event.
5383
5266
  */
5384
- export declare type VideoDragConfigForElement<E extends Element> =
5267
+ declare type VideoDragConfigForElement<E extends Element> =
5385
5268
  E extends HTMLImageElement
5386
5269
  ? Partial<VideoDragConfig> &
5387
5270
  Pick<VideoDragConfig, "type" | "resolveVideoRef">
5388
5271
  : VideoDragConfig;
5389
5272
 
5273
+ /**
5274
+ * @beta
5275
+ * An element that renders video content.
5276
+ */
5277
+ export declare type VideoElement = VideoElement_2 & {
5278
+ /**
5279
+ * Options for configuring the cropping of the video.
5280
+ */
5281
+ imageBox?: VideoImageBox;
5282
+ /**
5283
+ * Options for configuring the start, and end of the video.
5284
+ */
5285
+ trim?: VideoTrim;
5286
+ };
5287
+
5390
5288
  /**
5391
5289
  * @public
5392
5290
  * An element that renders video content.
5393
5291
  */
5394
- export declare type VideoElement = {
5292
+ declare type VideoElement_2 = {
5395
5293
  /**
5396
5294
  * The type of element.
5397
5295
  */
@@ -5409,11 +5307,26 @@ export declare type VideoElement = {
5409
5307
  altText: AltText | undefined;
5410
5308
  };
5411
5309
 
5310
+ /**
5311
+ * @beta
5312
+ * An element that renders video content and has positional properties.
5313
+ */
5314
+ export declare type VideoElementAtPoint = VideoElementAtPoint_2 & {
5315
+ /**
5316
+ * Options for configuring the cropping of the video.
5317
+ */
5318
+ imageBox?: VideoImageBox;
5319
+ /**
5320
+ * Options for configuring the start, and end of the video.
5321
+ */
5322
+ trim?: VideoTrim;
5323
+ };
5324
+
5412
5325
  /**
5413
5326
  * @public
5414
5327
  * An element that renders video content and has positional properties.
5415
5328
  */
5416
- export declare type VideoElementAtPoint = VideoElement &
5329
+ declare type VideoElementAtPoint_2 = VideoElement_2 &
5417
5330
  Point &
5418
5331
  (WidthAndHeight | Width | Height);
5419
5332
 
@@ -5421,7 +5334,7 @@ export declare type VideoElementAtPoint = VideoElement &
5421
5334
  * @public
5422
5335
  * A video asset that fills a path's interior.
5423
5336
  */
5424
- export declare type VideoFill = {
5337
+ declare type VideoFill = {
5425
5338
  /**
5426
5339
  * The type of fill.
5427
5340
  */
@@ -5439,14 +5352,52 @@ export declare type VideoFill = {
5439
5352
  altText?: AltText;
5440
5353
  };
5441
5354
 
5355
+ /**
5356
+ * @beta
5357
+ * Options for configuring the visible portion of a video.
5358
+ */
5359
+ export declare type VideoImageBox = {
5360
+ /**
5361
+ * The distance of the image box from the top edge of the video, in pixels.
5362
+ */
5363
+ top: number;
5364
+ /**
5365
+ * The distance of the image box from the left edge of the video, in pixels.
5366
+ */
5367
+ left: number;
5368
+ /**
5369
+ * The width of the image box, in pixels.
5370
+ */
5371
+ width: number;
5372
+ /**
5373
+ * The height of the image box, in pixels.
5374
+ */
5375
+ height: number;
5376
+ };
5377
+
5442
5378
  /**
5443
5379
  * @public
5444
5380
  * A unique identifier that references a video asset in Canva's backend.
5445
5381
  */
5446
- export declare type VideoRef = string & {
5382
+ declare type VideoRef = string & {
5447
5383
  __videoRef: never;
5448
5384
  };
5449
5385
 
5386
+ /**
5387
+ * @beta
5388
+ * Options for configuring the start and end points for video playback.
5389
+ */
5390
+ export declare type VideoTrim = {
5391
+ /**
5392
+ * The start point of the video, in milliseconds relative to the start of the source video.
5393
+ */
5394
+ startMs: number;
5395
+ /**
5396
+ * The end point of the video, in milliseconds relative to the start of the source video.
5397
+ */
5398
+ endMs: number;
5399
+ };
5400
+
5450
5401
  /**
5451
5402
  * A set of dimensions with an auto-calculated height.
5452
5403
  */
@@ -5491,7 +5442,7 @@ declare type WidthAndHeight = {
5491
5442
  };
5492
5443
 
5493
5444
  /**
5494
- * @beta
5445
+ * @public
5495
5446
  * The behavior of zipping the exported files.
5496
5447
  *
5497
5448
  * @remarks
@@ -5504,6 +5455,6 @@ declare type WidthAndHeight = {
5504
5455
  * - `auto` or `never` (default): Files are never zipped together, regardless of count.
5505
5456
  * - `always`: Files are always zipped into a single file.
5506
5457
  */
5507
- export declare type ZipBehavior = "auto" | "always" | "never";
5458
+ declare type ZipBehavior = "auto" | "always" | "never";
5508
5459
 
5509
5460
  export {};
@@ -9,14 +9,20 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
+ get addElementAtPoint () {
13
+ return addElementAtPoint;
14
+ },
15
+ get addPage () {
16
+ return addPage;
17
+ },
12
18
  get editContent () {
13
19
  return editContent;
14
20
  },
21
+ get initAppElement () {
22
+ return initAppElement;
23
+ },
15
24
  get openDesign () {
16
25
  return openDesign;
17
- },
18
- get requestExport () {
19
- return requestExport;
20
26
  }
21
27
  });
22
28
  const _version = require("./version");
@@ -39,6 +45,7 @@ function editContent(options, callback) {
39
45
  return canva_sdk.design.v2.designInteraction.editContent(options, (session)=>callback(session));
40
46
  }
41
47
  const openDesign = canva_sdk.design.v2.designInteraction.openDesign;
42
- const requestExport = canva_sdk.design.v2.export.requestExport;
48
+ const addElementAtPoint = canva_sdk.design.v2.designInteraction.addElementAtPoint;
49
+ const initAppElement = canva_sdk.design.v2.designInteraction.initAppElement;
50
+ const addPage = canva_sdk.design.v2.designInteraction.addPage;
43
51
  window.__canva__?.sdkRegistration?.registerPackageVersion('design', _version.LATEST_VERSION, 'beta');
44
- 'comment';
@@ -4,7 +4,8 @@ export function editContent(options, callback) {
4
4
  return canva_sdk.design.v2.designInteraction.editContent(options, (session)=>callback(session));
5
5
  }
6
6
  export const openDesign = canva_sdk.design.v2.designInteraction.openDesign;
7
- export const requestExport = canva_sdk.design.v2.export.requestExport;
7
+ export const addElementAtPoint = canva_sdk.design.v2.designInteraction.addElementAtPoint;
8
+ export const initAppElement = canva_sdk.design.v2.designInteraction.initAppElement;
9
+ export const addPage = canva_sdk.design.v2.designInteraction.addPage;
8
10
  export * from './public';
9
11
  window.__canva__?.sdkRegistration?.registerPackageVersion('design', LATEST_VERSION, 'beta');
10
- 'comment';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canva/design",
3
- "version": "2.7.4-beta.2",
3
+ "version": "2.7.5-beta.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",