@canva/design 1.9.0 → 1.10.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/index.d.ts +25 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -30,6 +30,23 @@ export declare function addPage(opts?: {
|
|
|
30
30
|
title?: string;
|
|
31
31
|
}): Promise<void>;
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* @public
|
|
35
|
+
* Describes any alt-text that will be added for a11y.
|
|
36
|
+
*/
|
|
37
|
+
export declare type AltText = {
|
|
38
|
+
/**
|
|
39
|
+
* The text that will appear as alt-text.
|
|
40
|
+
*/
|
|
41
|
+
text: string;
|
|
42
|
+
/**
|
|
43
|
+
* An optional property that will determine whether text is shown in just the editor or both editor and view mode.
|
|
44
|
+
* If set to true, alt-text will only be rendered inside the editor.
|
|
45
|
+
* If set to false or omitted, alt-text will be rendered in both the editor and in view only mode.
|
|
46
|
+
*/
|
|
47
|
+
decorative: boolean | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
33
50
|
/**
|
|
34
51
|
* @public
|
|
35
52
|
* A callback that runs when an app element's data is created or updated,
|
|
@@ -765,6 +782,10 @@ export declare type NativeImageElement = {
|
|
|
765
782
|
* The type of element.
|
|
766
783
|
*/
|
|
767
784
|
type: "IMAGE";
|
|
785
|
+
/**
|
|
786
|
+
* An optional object to describe alt-text that may be applied to an image.
|
|
787
|
+
*/
|
|
788
|
+
altText?: AltText;
|
|
768
789
|
} & (
|
|
769
790
|
| {
|
|
770
791
|
/**
|
|
@@ -944,6 +965,10 @@ export declare type NativeVideoElement = {
|
|
|
944
965
|
* A unique identifier that references a video asset in Canva's backend.
|
|
945
966
|
*/
|
|
946
967
|
ref: VideoRef;
|
|
968
|
+
/**
|
|
969
|
+
* An optional object to describe alt-text that may be applied to a video.
|
|
970
|
+
*/
|
|
971
|
+
altText?: AltText;
|
|
947
972
|
};
|
|
948
973
|
|
|
949
974
|
/**
|