@canva/design 2.7.5-beta.0 → 2.7.5-beta.1
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
|
@@ -861,6 +861,36 @@ declare type Bounds = {
|
|
|
861
861
|
length: number;
|
|
862
862
|
};
|
|
863
863
|
|
|
864
|
+
/**
|
|
865
|
+
* @beta
|
|
866
|
+
* An alias for the BulkCreateLauncher interface, providing access to bulk create related functionality
|
|
867
|
+
*/
|
|
868
|
+
export declare const bulkCreate: BulkCreateLauncher;
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* @beta
|
|
872
|
+
* Provides methods for launching the bulk create panel.
|
|
873
|
+
*/
|
|
874
|
+
export declare type BulkCreateLauncher = {
|
|
875
|
+
/**
|
|
876
|
+
* @beta
|
|
877
|
+
* Launches the design bulk create with the data connector intent.
|
|
878
|
+
* @param opts - Options for configuring the bulk create panel.
|
|
879
|
+
* @throws unsupported_surface code if not invoked by the design editor intent.
|
|
880
|
+
*
|
|
881
|
+
* @example Launch the bulk create panel with the same app
|
|
882
|
+
* ```typescript
|
|
883
|
+
* import { bulkCreate } from "@canva/design";
|
|
884
|
+
* import { features } from "@canva/platform";
|
|
885
|
+
*
|
|
886
|
+
* if (features.isSupported(bulkCreate.launch)) {
|
|
887
|
+
* await bulkCreate.launch({ withDataConnector: 'self' });
|
|
888
|
+
* }
|
|
889
|
+
* ```
|
|
890
|
+
*/
|
|
891
|
+
launch(opts: LaunchBulkCreateOpts): Promise<void>;
|
|
892
|
+
};
|
|
893
|
+
|
|
864
894
|
/**
|
|
865
895
|
* @public
|
|
866
896
|
* An individual cell in a table element.
|
|
@@ -3857,6 +3887,28 @@ declare type InlineFormatting = {
|
|
|
3857
3887
|
link?: string;
|
|
3858
3888
|
};
|
|
3859
3889
|
|
|
3890
|
+
/**
|
|
3891
|
+
* @beta
|
|
3892
|
+
* Options for configuring the bulk create panel.
|
|
3893
|
+
*/
|
|
3894
|
+
export declare type LaunchBulkCreateOpts = {
|
|
3895
|
+
/**
|
|
3896
|
+
* The option to make sure the data connector intent of the current app will be triggered.
|
|
3897
|
+
*/
|
|
3898
|
+
withDataConnector: "self";
|
|
3899
|
+
};
|
|
3900
|
+
|
|
3901
|
+
/**
|
|
3902
|
+
* @beta
|
|
3903
|
+
* Options for configuring the publish menu.
|
|
3904
|
+
*/
|
|
3905
|
+
export declare type LaunchPublishOpts = {
|
|
3906
|
+
/**
|
|
3907
|
+
* The option to make sure the content publisher intent of the current app will be triggered.
|
|
3908
|
+
*/
|
|
3909
|
+
withContentPublisher: "self";
|
|
3910
|
+
};
|
|
3911
|
+
|
|
3860
3912
|
/**
|
|
3861
3913
|
* @deprecated The type has been superseded by `DesignElement`.
|
|
3862
3914
|
* @public
|
|
@@ -4186,6 +4238,36 @@ declare type Point = {
|
|
|
4186
4238
|
*/
|
|
4187
4239
|
declare type Primitive = undefined | null | number | boolean | string;
|
|
4188
4240
|
|
|
4241
|
+
/**
|
|
4242
|
+
* @beta
|
|
4243
|
+
* An alias for the PublishLauncher interface, providing access to design publishing related functionality
|
|
4244
|
+
*/
|
|
4245
|
+
export declare const publish: PublishLauncher;
|
|
4246
|
+
|
|
4247
|
+
/**
|
|
4248
|
+
* @beta
|
|
4249
|
+
* Provides methods for launching the publish menu
|
|
4250
|
+
*/
|
|
4251
|
+
export declare type PublishLauncher = {
|
|
4252
|
+
/**
|
|
4253
|
+
* @beta
|
|
4254
|
+
* Launches the design publish with the content publisher intent.
|
|
4255
|
+
* @param opts - Options for configuring the publish menu.
|
|
4256
|
+
* @throws unsupported_surface code if not invoked by the design editor intent.
|
|
4257
|
+
*
|
|
4258
|
+
* @example Launch the content publisher with the same app
|
|
4259
|
+
* ```typescript
|
|
4260
|
+
* import { publish } from "@canva/design";
|
|
4261
|
+
* import { features } from "@canva/platform";
|
|
4262
|
+
*
|
|
4263
|
+
* if (features.isSupported(publish.launch)) {
|
|
4264
|
+
* await publish.launch({ withContentPublisher: 'self' });
|
|
4265
|
+
* }
|
|
4266
|
+
* ```
|
|
4267
|
+
*/
|
|
4268
|
+
launch(opts: LaunchPublishOpts): Promise<void>;
|
|
4269
|
+
};
|
|
4270
|
+
|
|
4189
4271
|
/**
|
|
4190
4272
|
* @public
|
|
4191
4273
|
* Exports the user's design as one or more static files.
|
|
@@ -15,6 +15,9 @@ _export(exports, {
|
|
|
15
15
|
get addPage () {
|
|
16
16
|
return addPage;
|
|
17
17
|
},
|
|
18
|
+
get bulkCreate () {
|
|
19
|
+
return bulkCreate;
|
|
20
|
+
},
|
|
18
21
|
get editContent () {
|
|
19
22
|
return editContent;
|
|
20
23
|
},
|
|
@@ -23,6 +26,9 @@ _export(exports, {
|
|
|
23
26
|
},
|
|
24
27
|
get openDesign () {
|
|
25
28
|
return openDesign;
|
|
29
|
+
},
|
|
30
|
+
get publish () {
|
|
31
|
+
return publish;
|
|
26
32
|
}
|
|
27
33
|
});
|
|
28
34
|
const _version = require("./version");
|
|
@@ -41,6 +47,8 @@ function _export_star(from, to) {
|
|
|
41
47
|
return from;
|
|
42
48
|
}
|
|
43
49
|
const { canva_sdk } = window;
|
|
50
|
+
const publish = canva_sdk.design.v2.designInteraction.publish;
|
|
51
|
+
const bulkCreate = canva_sdk.design.v2.designInteraction.bulkCreate;
|
|
44
52
|
function editContent(options, callback) {
|
|
45
53
|
return canva_sdk.design.v2.designInteraction.editContent(options, (session)=>callback(session));
|
|
46
54
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { LATEST_VERSION } from './version';
|
|
2
2
|
const { canva_sdk } = window;
|
|
3
|
+
export const publish = canva_sdk.design.v2.designInteraction.publish;
|
|
4
|
+
export const bulkCreate = canva_sdk.design.v2.designInteraction.bulkCreate;
|
|
3
5
|
export function editContent(options, callback) {
|
|
4
6
|
return canva_sdk.design.v2.designInteraction.editContent(options, (session)=>callback(session));
|
|
5
7
|
}
|