@canva/design 2.2.1-beta.2 → 2.3.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.
@@ -103,6 +103,7 @@ export declare interface AppElementClient<A extends AppElementData> {
103
103
  * @param placement - The position, dimensions, and rotation of the app element.
104
104
  */
105
105
  addOrUpdateElement(appElementData: A, placement?: Placement): Promise<void>;
106
+
106
107
  /**
107
108
  * A callback that runs when:
108
109
  *
@@ -329,7 +330,7 @@ export declare interface ContentDraft<T> {
329
330
  export declare type ContentType = "richtext";
330
331
 
331
332
  /**
332
- * @beta
333
+ * @public
333
334
  * Options for configuring where content in a design should be queried from.
334
335
  */
335
336
  declare type ContextOptions = {
@@ -357,730 +358,6 @@ export declare type Coordinates = {
357
358
  */
358
359
  export declare const createRichtextRange: () => RichtextRange;
359
360
 
360
- /**
361
- * @beta
362
- * Describes a part of a design.
363
- */
364
- export declare type DesignContext = DesignContextOptions["type"];
365
-
366
- /**
367
- * @beta
368
- * Options for configuring which part of a design to read.
369
- */
370
- declare type DesignContextOptions = {
371
- /**
372
- * The type of context.
373
- */
374
- type: "current_page";
375
- };
376
-
377
- /**
378
- * @beta
379
- * Provides methods for reading and updating the structure and content of a design.
380
- */
381
- export declare namespace DesignEditing {
382
- /**
383
- * @beta
384
- * A snapshot containing a fragment of a design's structure and content.
385
- */
386
- export type DesignDraft<D> = Readonly<D> & {
387
- /**
388
- * Saves any changes made to the draft.
389
- *
390
- * @remarks
391
- * - Any changes to the draft are only reflected in the design after this method is called.
392
- * - Once this method is called, further changes to the draft are not possible.
393
- */
394
- save(): Promise<void>;
395
- };
396
- /**
397
- * @beta
398
- * Options for creating an image fill in the element builder
399
- */
400
- export type ImageFillOpts = Partial<ImageFill> &
401
- Required<Pick<ImageFill, "type" | "imageRef">>;
402
- /**
403
- * @beta
404
- * Options for creating a video fill in the element builder
405
- */
406
- export type VideoFillOpts = Partial<VideoFill> &
407
- Required<Pick<VideoFill, "type" | "videoRef">>;
408
- /**
409
- * @beta
410
- * Options for creating a media fill in the element builder
411
- */
412
- export type MediaFillOpts = ImageFillOpts | VideoFillOpts;
413
- /**
414
- * @beta
415
- * Options for creating a fill in the element builder
416
- */
417
- export type FillOpts =
418
- | {
419
- color: ColorFillOpts;
420
- media?: MediaFillOpts;
421
- }
422
- | {
423
- color?: ColorFillOpts;
424
- media: MediaFillOpts;
425
- };
426
- /**
427
- * @beta
428
- */
429
- export type ColorFillOpts = Exclude<ColorFill, Unsupported>;
430
- /**
431
- * @beta
432
- * Options for creating a stroke in the element builder
433
- */
434
- export type StrokeOpts = Pick<Stroke, "weight"> & {
435
- color: ColorFillOpts;
436
- };
437
- /**
438
- * @beta
439
- * Options for creating a shape path in the element builder
440
- */
441
- export type PathOpts = Pick<Path, "d"> & {
442
- fill?: FillOpts;
443
- stroke?: StrokeOpts;
444
- };
445
- /**
446
- * @beta
447
- * Options for creating a rect element.
448
- */
449
- export type CreateRectElementOpts = Required<
450
- Pick<RectElement, "top" | "left" | "width" | "height">
451
- > & {
452
- fill?: FillOpts;
453
- } & {
454
- stroke?: StrokeOpts;
455
- } & Partial<Omit<RectElement, "fill" | "stroke" | "type">>;
456
- /**
457
- * @beta
458
- * Options for creating a shape element.
459
- */
460
- export type CreateShapeElementOpts = Required<
461
- Pick<ShapeElement, "top" | "left" | "width" | "height" | "viewBox">
462
- > & {
463
- paths: PathOpts[];
464
- } & Partial<Omit<ShapeElement, "type" | "paths">>;
465
- /**
466
- * @beta
467
- * Options for creating an embed element.
468
- */
469
- export type CreateEmbedElementOpts = Required<
470
- Pick<EmbedElement, "top" | "left" | "width" | "height" | "url">
471
- > &
472
- Partial<Omit<EmbedElement, "type">>;
473
- /**
474
- * @beta
475
- * Options for creating a text element.
476
- */
477
- export type CreateTextElementOpts = Required<
478
- Pick<TextElement, "top" | "left" | "width" | "text">
479
- > &
480
- Partial<Omit<TextElement, "type" | "height">>;
481
- /**
482
- * @beta
483
- * Provides methods for creating elements.
484
- *
485
- * @remarks
486
- * These methods don't add the elements to the design. They only return elements that can
487
- * be added to a design, such as with the `insertAfter` method.
488
- */
489
- export interface ElementBuilder {
490
- /**
491
- * Creates a rect element.
492
- * @param opts - Options for creating the rect element.
493
- */
494
- createRectElement(opts: CreateRectElementOpts): RectElement;
495
- /**
496
- * Creates a shape element.
497
- * @param opts - Options for creating the shape element.
498
- */
499
- createShapeElement(opts: CreateShapeElementOpts): ShapeElement;
500
- /**
501
- * Creates an embed element.
502
- * @param opts - Options for creating the embed element.
503
- */
504
- createEmbedElement(opts: CreateEmbedElementOpts): EmbedElement;
505
- /**
506
- * Creates a text element.
507
- * @param opts - Options for creating the text element.
508
- */
509
- createTextElement(opts: CreateTextElementOpts): TextElement;
510
- /**
511
- * Creates a richtext range.
512
- */
513
- createRichtextRange(): RichtextRange;
514
- /**
515
- * Creates a clone of an element.
516
- * @returns a new element with the same properties as the argument.
517
- */
518
- cloneElement(element: RectElement): RectElement;
519
- cloneElement(element: ShapeElement): ShapeElement;
520
- cloneElement(element: EmbedElement): EmbedElement;
521
- cloneElement(element: TextElement): TextElement;
522
- cloneElement(
523
- element: RectElement | ShapeElement | EmbedElement | TextElement,
524
- ): RectElement | ShapeElement | EmbedElement | TextElement;
525
- }
526
- /**
527
- * @beta
528
- * The result of reading part of a design when the context is the current page.
529
- */
530
- export type CurrentPageResult = DesignDraft<{
531
- /**
532
- * The current page of the design.
533
- */
534
- page: FixedPage;
535
- }>;
536
- /**
537
- * @beta
538
- * The result of reading part of a design.
539
- */
540
- export type DesignOpenResult = CurrentPageResult;
541
- /**
542
- * A function called for each item in the list.
543
- *
544
- * @param item - The current item in the list.
545
- * @param index - The index of the current item.
546
- */
547
- export type ForEachCallback<T> = (item: T, index: number) => void;
548
- /**
549
- * A function that determines if an item should be included in the result.
550
- *
551
- * @param item - The item to test.
552
- * @returns `true` if the item should be included, otherwise `false`.
553
- */
554
- export type FilterPredicate<T> = (item: T) => boolean;
555
- /**
556
- * A type predicate function that determines if an item is of a specific type.
557
- *
558
- * @param item - The item to test.
559
- * @returns `true` if the item is of type `C`, otherwise `false`.
560
- */
561
- export type TypeFilterPredicate<T, C extends T> = (item: T) => item is C;
562
- /**
563
- * A list that cannot be changed.
564
- */
565
- export interface ReadableList<T> {
566
- /**
567
- * Gets the number of items in the list.
568
- *
569
- * @returns The number of items.
570
- */
571
- count(): number;
572
- /**
573
- * Converts the list to an array.
574
- *
575
- * @returns An array containing all items. The items are the same as in the list.
576
- */
577
- toArray(): readonly T[];
578
- /**
579
- * Executes a function for each item in the list.
580
- *
581
- * @param callback - The function to run for each item.
582
- */
583
- forEach(callback: ForEachCallback<T>): void;
584
- /**
585
- * Creates a new array with items that match a specific type.
586
- *
587
- * @param filter - A function that checks if an item is of type `C`.
588
- * @returns An array of items that are of type `C`.
589
- */
590
- filter<C extends T>(filter: TypeFilterPredicate<T, C>): readonly C[];
591
- /**
592
- * Creates a new array with items that pass a test.
593
- *
594
- * @param filter - A function that tests each item. Returns `true` to keep the item.
595
- * @returns An array of items that passed the test.
596
- */
597
- filter(filter: FilterPredicate<T>): readonly T[];
598
- }
599
- /**
600
- * @beta
601
- * A list of items that can be changed.
602
- */
603
- export interface MutableList<T> {
604
- /**
605
- * Adds a copy of an item to the list and places it right before another item.
606
- *
607
- * @param ref - The existing item to place the new item before.
608
- * If `ref` is `undefined`, the new item is added at the end of the list.
609
- * If `ref` does not exist in the list, the operation fails.
610
- *
611
- * @param item - The item to add. A copy of this item will be inserted.
612
- *
613
- * @returns
614
- * The added item, or `undefined` if the operation failed.
615
- */
616
- insertBefore(ref: T | undefined, item: T): T | undefined;
617
- /**
618
- * Adds a copy of an item to the list and places it right after another item.
619
- *
620
- * @param ref - The existing item to place the new item after.
621
- * If `ref` is `undefined`, the new item is added at the end of the list.
622
- * If `ref` does not exist in the list, the operation fails.
623
- *
624
- * @param item - The item to add. A copy of this item will be inserted.
625
- *
626
- * @returns
627
- * The added item, or `undefined` if the operation failed.
628
- */
629
- insertAfter(ref: T | undefined, item: T): T | undefined;
630
- /**
631
- * Moves an existing item to a new position right before another item.
632
- *
633
- * @param ref - The existing item to move the item before.
634
- * If `ref` is `undefined`, the item is moved to the end of the list.
635
- * If `ref` does not exist in the list, the operation fails.
636
- *
637
- * @param item - The item to move.
638
- * The operation fails if the item is not already in the list.
639
- */
640
- moveBefore(ref: T | undefined, item: T): void;
641
- /**
642
- * Moves an existing item to a new position right after another item.
643
- *
644
- * @param ref - The existing item to move the item after.
645
- * If `ref` is `undefined`, the item is moved to the end of the list.
646
- * If `ref` does not exist in the list, the operation fails.
647
- *
648
- * @param item - The item to move.
649
- * The operation fails if the item is not already in the list.
650
- */
651
- moveAfter(ref: T | undefined, item: T): void;
652
- /**
653
- * Removes an item from the list.
654
- *
655
- * @param item - The item to remove from the list.
656
- */
657
- delete(item: T): void;
658
- }
659
- /**
660
- * @beta
661
- * A list of items that can be read and updated.
662
- */
663
- export interface List<T> extends ReadableList<T>, MutableList<T> {}
664
- /**
665
- * @beta
666
- * Represents an element that's not supported by the Apps SDK.
667
- */
668
- export interface Unsupported {
669
- /**
670
- * The type of element.
671
- */
672
- readonly type: "unsupported";
673
- }
674
- /**
675
- * @beta
676
- * A single valid character in a hex code.
677
- */
678
- export type Hex = `123456790abcdef`[number];
679
- /**
680
- * @beta
681
- * A six-character hexadecimal color code prefixed with a `#`.
682
- */
683
- export type HexCode = `#${Hex}${Hex}${Hex}${Hex}${Hex}${Hex}`;
684
- /**
685
- * @beta
686
- * A set of dimensions.
687
- */
688
- export interface Dimensions {
689
- /**
690
- * A width, in pixels.
691
- */
692
- readonly width: number;
693
- /**
694
- * A height, in pixels.
695
- */
696
- readonly height: number;
697
- }
698
- /**
699
- * @beta
700
- * An image that fills the interior of a path.
701
- */
702
- export interface ImageFill {
703
- /**
704
- * The type of media.
705
- */
706
- readonly type: "image";
707
- /**
708
- * A unique identifier that points to an image asset in Canva's backend.
709
- */
710
- imageRef: ImageRef;
711
- /**
712
- * If `true`, the image is flipped horizontally.
713
- */
714
- flipX: boolean;
715
- /**
716
- * If `true`, the image is flipped vertically.
717
- */
718
- flipY: boolean;
719
- }
720
- /**
721
- * @beta
722
- * A video that fills the interior of a path.
723
- */
724
- export interface VideoFill {
725
- /**
726
- * The type of media.
727
- */
728
- readonly type: "video";
729
- /**
730
- * A unique identifier that points to a video asset in Canva's backend.
731
- */
732
- videoRef: VideoRef;
733
- /**
734
- * If `true`, the video is flipped horizontally.
735
- */
736
- flipX: boolean;
737
- /**
738
- * If `true`, the video is flipped vertically.
739
- */
740
- flipY: boolean;
741
- }
742
- /**
743
- * @beta
744
- * A media item that fills the interior of a path.
745
- */
746
- export type MediaFill = ImageFill | VideoFill;
747
- /**
748
- * @beta
749
- * A solid color that fills the interior of a path.
750
- */
751
- export interface SolidFill {
752
- /**
753
- * The type of color.
754
- */
755
- readonly type: "solid";
756
- /**
757
- * The color of the fill, as a hex code.
758
- *
759
- * @remarks
760
- * - Must be six characters long.
761
- * - Must start with a `#`.
762
- * - Must use lowercase letters.
763
- */
764
- color: HexCode;
765
- }
766
- /**
767
- * @beta
768
- * A color that fills the interior of a path.
769
- */
770
- export type ColorFill = SolidFill | Unsupported;
771
- /**
772
- * @beta
773
- * Describes how a path is filled with color or media.
774
- *
775
- * @remarks
776
- * If both `media` and `color` are defined, `media` takes precedence.
777
- */
778
- export interface Fill {
779
- /**
780
- * The media fill for the path, if any.
781
- */
782
- media: MediaFill | undefined;
783
- /**
784
- * The color fill for the path, if any.
785
- */
786
- color: ColorFill | undefined;
787
- }
788
- /**
789
- * @beta
790
- * The scale and cropping of a shape.
791
- *
792
- * @remarks
793
- * This is similar to the `viewBox` attribute of an `SVGElement`.
794
- */
795
- export type AlignedBox = {
796
- /**
797
- * The distance of the shape from the top edge of the element, in pixels.
798
- */
799
- readonly top: number;
800
- /**
801
- * The distance of the shape from the left edge of the element, in pixels.
802
- */
803
- readonly left: number;
804
- /**
805
- * The width of the view box, in pixels.
806
- */
807
- readonly width: number;
808
- /**
809
- * The height of the view box, in pixels.
810
- */
811
- readonly height: number;
812
- };
813
- /**
814
- * @beta
815
- * A path that defines the structure of a shape element.
816
- */
817
- export interface Path {
818
- /**
819
- * The shape of the path.
820
- *
821
- * @remarks
822
- * This is similar to the `d` attribute of an SVG's `path` element, with some limitations:
823
- *
824
- * - Must start with an `M` command.
825
- * - Only one `M` command is allowed.
826
- * - `Q` and `T` commands are not permitted.
827
- * - The path must be closed using a `Z` command or matching start and end coordinates.
828
- */
829
- readonly d: string;
830
- /**
831
- * The appearance of the path's interior.
832
- */
833
- readonly fill: Fill;
834
- /**
835
- * The stroke (outline) of the path, if any.
836
- */
837
- readonly stroke: Stroke | undefined;
838
- }
839
- /**
840
- * @beta
841
- * Represents an outline, such as the border of an element.
842
- */
843
- export interface Stroke {
844
- /**
845
- * The weight (thickness) of the stroke.
846
- *
847
- * @remarks
848
- * - Minimum: 0
849
- * - Maximum: 100
850
- */
851
- weight: number;
852
- /**
853
- * The color of the stroke.
854
- */
855
- color: ColorFill;
856
- }
857
- /**
858
- * @beta
859
- * The basic properties of an element.
860
- *
861
- * @remarks
862
- * These properties are shared by all elements in a design.
863
- */
864
- export interface Element extends Dimensions {
865
- /**
866
- * If `true`, the element is locked and cannot be modified.
867
- */
868
- readonly locked: boolean;
869
- /**
870
- * The distance from the top edge of the container, in pixels.
871
- *
872
- * @remarks
873
- * - The pixels are relative to their container.
874
- * - Minimum: -32768
875
- * - Maximum: 32767
876
- */
877
- top: number;
878
- /**
879
- * The distance from the left edge of the container, in pixels.
880
- *
881
- * @remarks
882
- * - The pixels are relative to their container.
883
- * - Minimum: -32768
884
- * - Maximum: 32767
885
- */
886
- left: number;
887
- /**
888
- * A rotation, in degrees.
889
- *
890
- * @remarks
891
- * - Minimum: -180
892
- * - Maximum: 180
893
- */
894
- rotation: number;
895
- /**
896
- * Transparency as a percentage.
897
- *
898
- * @remarks
899
- * - Minimum: 0
900
- * - Maximum: 1
901
- */
902
- transparency: number;
903
- }
904
- /**
905
- * @beta
906
- * Represents a rectangular element.
907
- */
908
- export interface Rect {
909
- /**
910
- * The type of content.
911
- */
912
- readonly type: "rect";
913
- /**
914
- * The appearance of the rectangle's interior.
915
- */
916
- readonly fill: Fill;
917
- /**
918
- * The outline of the rectangle.
919
- */
920
- readonly stroke: Stroke;
921
- }
922
- /**
923
- * @beta
924
- * Represents a vector shape element.
925
- */
926
- export interface Shape {
927
- /**
928
- * The type of content.
929
- */
930
- readonly type: "shape";
931
- /**
932
- * The scale and cropping of the shape.
933
- */
934
- viewBox: AlignedBox;
935
- /**
936
- * The paths that define the structure of the shape.
937
- *
938
- * @remarks
939
- * - Must have between 1 and 30 paths.
940
- * - Total size of all paths must not exceed 2kb.
941
- * - Maximum of 6 unique fill colors across all paths.
942
- */
943
- readonly paths: ReadableList<Path>;
944
- }
945
- /**
946
- * @beta
947
- * Represents group content.
948
- */
949
- export interface Group<C> {
950
- /**
951
- * The type of content.
952
- */
953
- readonly type: "group";
954
- /**
955
- * The elements that exist within the group.
956
- */
957
- readonly contents: ReadableList<C>;
958
- }
959
- /**
960
- * @beta
961
- * Represents rich media content.
962
- */
963
- export interface Embed {
964
- /**
965
- * The type of content.
966
- */
967
- readonly type: "embed";
968
- /**
969
- * The URL of the rich media.
970
- *
971
- * @remarks
972
- * This URL must be supported by the Iframely API.
973
- */
974
- readonly url: string;
975
- }
976
- /**
977
- * @beta
978
- * Represents text content.
979
- */
980
- export interface Text {
981
- /**
982
- * The type of content.
983
- */
984
- readonly type: "text";
985
- /**
986
- * The text content.
987
- */
988
- readonly text: RichtextRange;
989
- }
990
- /**
991
- * @beta
992
- * An element that renders a rectangle.
993
- *
994
- * @remarks
995
- * The rectangle can be filled with image content, video content, or a solid color.
996
- */
997
- export interface RectElement extends Rect, Element {}
998
- /**
999
- * @beta
1000
- * An element that renders a vector shape.
1001
- */
1002
- export interface ShapeElement extends Shape, Element {}
1003
- /**
1004
- * @beta
1005
- * An element that renders a group of other elements.
1006
- */
1007
- export interface GroupElement extends Group<GroupContentElement>, Element {}
1008
- /**
1009
- * @beta
1010
- * An element that embeds rich media, such as a YouTube video.
1011
- */
1012
- export interface EmbedElement extends Embed, Element {}
1013
- /**
1014
- * @beta
1015
- * An element that renders text content.
1016
- */
1017
- export interface TextElement extends Text, Element {}
1018
- /**
1019
- * @beta
1020
- * An element that is not supported by the Apps SDK.
1021
- */
1022
- export interface UnsupportedElement extends Unsupported, Element {}
1023
- /**
1024
- * @beta
1025
- * An element that can exist in a group element.
1026
- */
1027
- export type GroupContentElement =
1028
- | RectElement
1029
- | ShapeElement
1030
- | EmbedElement
1031
- | TextElement
1032
- | UnsupportedElement;
1033
- /**
1034
- * @beta
1035
- * An element that can exist on a fixed page.
1036
- */
1037
- export type FixedElement =
1038
- | RectElement
1039
- | ShapeElement
1040
- | GroupElement
1041
- | EmbedElement
1042
- | TextElement
1043
- | UnsupportedElement;
1044
- /**
1045
- * @beta
1046
- * A page with fixed dimensions.
1047
- */
1048
- export interface FixedPage {
1049
- /**
1050
- * The type of page.
1051
- */
1052
- readonly type: "fixed";
1053
- /**
1054
- * If `true`, the page is locked and cannot be modified.
1055
- */
1056
- readonly locked: boolean;
1057
- /**
1058
- * The dimensions of the page. `dimensions` is undefined for whiteboard pages.
1059
- */
1060
- readonly dimensions: Dimensions | undefined;
1061
- /**
1062
- * The background of the page. `background` is undefined for whiteboard pages.
1063
- */
1064
- readonly background: Fill | undefined;
1065
- /**
1066
- * The elements on the page.
1067
- *
1068
- * @remarks
1069
- * Elements are rendered in the order they appear in the list.
1070
- * Later elements appear on top of earlier ones.
1071
- */
1072
- readonly elements: List<FixedElement>;
1073
- }
1074
- /**
1075
- * @beta
1076
- * A page in a design.
1077
- */
1078
- export type Page = FixedPage | Unsupported;
1079
-
1080
- {
1081
- }
1082
- }
1083
-
1084
361
  /**
1085
362
  * @public
1086
363
  * An element that's natively supported by the Canva editor.
@@ -1095,28 +372,6 @@ export declare type DesignElement =
1095
372
  | RichtextElement
1096
373
  | TableElement;
1097
374
 
1098
- /**
1099
- * @beta
1100
- * A callback for reading and updating part of a design.
1101
- * @param draft - The result of reading part of a design.
1102
- * @param helpers - Helper methods for reading and updating the design.
1103
- */
1104
- export declare type DesignOpenCallback = (
1105
- draft: DesignEditing.DesignOpenResult,
1106
- helpers: {
1107
- /**
1108
- * Provides methods for creating elements.
1109
- */
1110
- elementBuilder: DesignEditing.ElementBuilder;
1111
- },
1112
- ) => Promise<void> | void;
1113
-
1114
- /**
1115
- * @beta
1116
- * Options for configuring which part of a design to read.
1117
- */
1118
- export declare type DesignOpenOptions = DesignContextOptions;
1119
-
1120
375
  /**
1121
376
  * @public
1122
377
  * Provides methods for managing the lifecycle of overlays, such as selected image overlays.
@@ -1204,10 +459,10 @@ export declare type DragStartEvent<E extends Element> = Pick<
1204
459
  };
1205
460
 
1206
461
  /**
1207
- * @beta
462
+ * @public
1208
463
  * Reads and edits content of the specified type from the user's design.
1209
- * @param options - Options for configuring how the design content is read.
1210
- * @param callback - A callback for operating on the queried content.
464
+ * @param options - Options for configuring how a design is read.
465
+ * @param callback - A callback for operating on the read content.
1211
466
  */
1212
467
  export declare const editContent: (
1213
468
  options: EditContentOptions,
@@ -1215,7 +470,7 @@ export declare const editContent: (
1215
470
  ) => Promise<void>;
1216
471
 
1217
472
  /**
1218
- * @beta
473
+ * @public
1219
474
  * A callback for reading and updating the requested design content.
1220
475
  * @param session - The result of reading the content in the design.
1221
476
  */
@@ -1234,7 +489,7 @@ export declare type EditContentCallback = (session: {
1234
489
  }) => Promise<void> | void;
1235
490
 
1236
491
  /**
1237
- * @beta
492
+ * @public
1238
493
  * Options for configuring how the design content is read.
1239
494
  */
1240
495
  export declare type EditContentOptions = {
@@ -1857,23 +1112,6 @@ export declare type NativeVideoElementWithBox = VideoElementAtPoint;
1857
1112
  */
1858
1113
  declare type ObjectPrimitive = Boolean | String;
1859
1114
 
1860
- /**
1861
- * @beta
1862
- * Reads a specified part of the user's design and returns all elements in that part.
1863
- *
1864
- * @param options - Options for configuring how the design is read.
1865
- * @param callback - A callback for operating on the design.
1866
- */
1867
- export declare const openDesign: (
1868
- options: DesignOpenOptions,
1869
- callback: (
1870
- draft: DesignEditing.DesignOpenResult,
1871
- helpers: {
1872
- elementBuilder: DesignEditing.ElementBuilder;
1873
- },
1874
- ) => Promise<void> | void,
1875
- ) => Promise<void>;
1876
-
1877
1115
  /**
1878
1116
  * @public
1879
1117
  * An alias for the DesignOverlay interface, providing access to design overlay related functionality
@@ -2052,7 +1290,7 @@ export declare const requestExport: (
2052
1290
  ) => Promise<ExportResponse>;
2053
1291
 
2054
1292
  /**
2055
- * @beta
1293
+ * @public
2056
1294
  * Provides methods for interacting with a range of formatted text.
2057
1295
  */
2058
1296
  export declare interface RichtextContentRange extends RichtextRange {
@@ -2534,11 +1772,6 @@ export declare type TextDragConfig = {
2534
1772
  * @defaultValue "none"
2535
1773
  */
2536
1774
  decoration?: "none" | "underline";
2537
- /**
2538
- * @beta
2539
- * A unique identifier that points to a font asset in Canva's backend.
2540
- */
2541
- fontRef?: FontRef;
2542
1775
  };
2543
1776
 
2544
1777
  /**