@canva/intents 2.0.1-beta.2 → 2.1.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/CHANGELOG.md +15 -0
- package/asset/index.d.ts +1 -1
- package/content/index.d.ts +1440 -1
- package/data/index.d.ts +1229 -1
- package/design/index.d.ts +41 -1
- package/index.d.ts +2821 -1
- package/lib/cjs/sdk/intents/asset/index.js +1 -15
- package/lib/cjs/sdk/intents/content/index.js +4 -2
- package/lib/cjs/sdk/intents/content/{beta.js → public.js} +0 -2
- package/lib/cjs/sdk/intents/fake/create.js +3 -0
- package/lib/cjs/sdk/intents/index.js +4 -2
- package/lib/cjs/sdk/intents/public.js +8 -4
- package/lib/cjs/sdk/intents/version.js +17 -4
- package/lib/esm/sdk/intents/asset/index.js +1 -1
- package/lib/esm/sdk/intents/content/index.js +3 -1
- package/lib/esm/sdk/intents/content/public.js +2 -0
- package/lib/esm/sdk/intents/fake/create.js +3 -0
- package/lib/esm/sdk/intents/index.js +3 -1
- package/lib/esm/sdk/intents/public.js +2 -1
- package/lib/esm/sdk/intents/version.js +3 -1
- package/package.json +22 -22
- package/test/index.d.ts +11 -1
- package/asset/beta.d.ts +0 -1
- package/beta.d.ts +0 -1309
- package/content/beta.d.ts +0 -1410
- package/data/beta.d.ts +0 -1242
- package/design/beta.d.ts +0 -43
- package/lib/cjs/sdk/intents/asset/beta.js +0 -4
- package/lib/cjs/sdk/intents/beta.js +0 -20
- package/lib/cjs/sdk/intents/data/beta.js +0 -20
- package/lib/cjs/sdk/intents/design/beta.js +0 -20
- package/lib/cjs/sdk/intents/test/beta.js +0 -18
- package/lib/esm/sdk/intents/asset/beta.js +0 -1
- package/lib/esm/sdk/intents/beta.js +0 -3
- package/lib/esm/sdk/intents/content/beta.js +0 -4
- package/lib/esm/sdk/intents/data/beta.js +0 -3
- package/lib/esm/sdk/intents/design/beta.js +0 -3
- package/lib/esm/sdk/intents/test/beta.js +0 -1
- package/test/beta.d.ts +0 -11
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
"use strict"
|
|
1
|
+
"use strict"
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
_export_star(require("./beta"), exports);
|
|
6
|
-
function _export_star(from, to) {
|
|
7
|
-
Object.keys(from).forEach(function(k) {
|
|
8
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
9
|
-
Object.defineProperty(to, k, {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function() {
|
|
12
|
-
return from[k];
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
return from;
|
|
18
|
-
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
"use strict"
|
|
1
|
+
"use strict"
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
5
|
+
const _version = require("../version");
|
|
6
|
+
_export_star(require("./public"), exports);
|
|
6
7
|
function _export_star(from, to) {
|
|
7
8
|
Object.keys(from).forEach(function(k) {
|
|
8
9
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
@@ -16,3 +17,4 @@ function _export_star(from, to) {
|
|
|
16
17
|
});
|
|
17
18
|
return from;
|
|
18
19
|
}
|
|
20
|
+
window.__canva__?.sdkRegistration?.registerPackageVersion('intents/content', _version.LATEST_VERSION, 'ga');
|
|
@@ -8,7 +8,5 @@ Object.defineProperty(exports, "prepareContentPublisher", {
|
|
|
8
8
|
return prepareContentPublisher;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _version = require("../version");
|
|
12
11
|
const { canva_sdk } = window;
|
|
13
12
|
const prepareContentPublisher = canva_sdk.intents.v1.content.prepareContentPublisher;
|
|
14
|
-
window.__canva__?.sdkRegistration?.registerPackageVersion('intents/content', _version.LATEST_VERSION, 'beta');
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
"use strict"
|
|
1
|
+
"use strict"
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
5
|
+
const _version = require("./version");
|
|
6
|
+
_export_star(require("./public"), exports);
|
|
6
7
|
function _export_star(from, to) {
|
|
7
8
|
Object.keys(from).forEach(function(k) {
|
|
8
9
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
@@ -16,3 +17,4 @@ function _export_star(from, to) {
|
|
|
16
17
|
});
|
|
17
18
|
return from;
|
|
18
19
|
}
|
|
20
|
+
window.__canva__?.sdkRegistration?.registerPackageVersion('intents', _version.LATEST_VERSION, 'ga');
|
|
@@ -9,15 +9,19 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
get
|
|
12
|
+
get content () {
|
|
13
13
|
return _index;
|
|
14
14
|
},
|
|
15
|
-
get
|
|
15
|
+
get data () {
|
|
16
16
|
return _index1;
|
|
17
|
+
},
|
|
18
|
+
get design () {
|
|
19
|
+
return _index2;
|
|
17
20
|
}
|
|
18
21
|
});
|
|
19
|
-
const _index = _interop_require_wildcard(require("./
|
|
20
|
-
const _index1 = _interop_require_wildcard(require("./
|
|
22
|
+
const _index = _interop_require_wildcard(require("./content/index"));
|
|
23
|
+
const _index1 = _interop_require_wildcard(require("./data/index"));
|
|
24
|
+
const _index2 = _interop_require_wildcard(require("./design/index"));
|
|
21
25
|
function _getRequireWildcardCache(nodeInterop) {
|
|
22
26
|
if (typeof WeakMap !== "function") return null;
|
|
23
27
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -2,10 +2,23 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get LATEST_VERSION () {
|
|
8
13
|
return LATEST_VERSION;
|
|
14
|
+
},
|
|
15
|
+
get LATEST_VERSION_ALPHA () {
|
|
16
|
+
return LATEST_VERSION_ALPHA;
|
|
17
|
+
},
|
|
18
|
+
get LATEST_VERSION_BETA () {
|
|
19
|
+
return LATEST_VERSION_BETA;
|
|
9
20
|
}
|
|
10
21
|
});
|
|
11
|
-
const LATEST_VERSION = '2.0
|
|
22
|
+
const LATEST_VERSION = '2.1.0';
|
|
23
|
+
const LATEST_VERSION_BETA = '2.0.2-beta.3';
|
|
24
|
+
const LATEST_VERSION_ALPHA = 'NONE';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canva/intents",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "The Canva Apps SDK Intents library",
|
|
5
5
|
"author": "Canva Pty Ltd.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md FILE",
|
|
7
7
|
"peerDependencies": {
|
|
8
8
|
"@canva/error": "^2.0.0"
|
|
9
9
|
},
|
|
10
|
-
"main": "./lib/cjs/sdk/intents/
|
|
11
|
-
"module": "./lib/esm/sdk/intents/
|
|
10
|
+
"main": "./lib/cjs/sdk/intents/index.js",
|
|
11
|
+
"module": "./lib/esm/sdk/intents/index.js",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
|
-
"types": "./
|
|
15
|
-
"require": "./lib/cjs/sdk/intents/
|
|
16
|
-
"import": "./lib/esm/sdk/intents/
|
|
14
|
+
"types": "./index.d.ts",
|
|
15
|
+
"require": "./lib/cjs/sdk/intents/index.js",
|
|
16
|
+
"import": "./lib/esm/sdk/intents/index.js"
|
|
17
17
|
},
|
|
18
18
|
"./test": {
|
|
19
|
-
"types": "./test/
|
|
20
|
-
"require": "./lib/cjs/sdk/intents/test/
|
|
21
|
-
"import": "./lib/esm/sdk/intents/test/
|
|
19
|
+
"types": "./test/index.d.ts",
|
|
20
|
+
"require": "./lib/cjs/sdk/intents/test/index.js",
|
|
21
|
+
"import": "./lib/esm/sdk/intents/test/index.js"
|
|
22
22
|
},
|
|
23
23
|
"./data": {
|
|
24
|
-
"types": "./data/
|
|
25
|
-
"require": "./lib/cjs/sdk/intents/data/
|
|
26
|
-
"import": "./lib/esm/sdk/intents/data/
|
|
24
|
+
"types": "./data/index.d.ts",
|
|
25
|
+
"require": "./lib/cjs/sdk/intents/data/index.js",
|
|
26
|
+
"import": "./lib/esm/sdk/intents/data/index.js"
|
|
27
27
|
},
|
|
28
28
|
"./design": {
|
|
29
|
-
"types": "./design/
|
|
30
|
-
"require": "./lib/cjs/sdk/intents/design/
|
|
31
|
-
"import": "./lib/esm/sdk/intents/design/
|
|
29
|
+
"types": "./design/index.d.ts",
|
|
30
|
+
"require": "./lib/cjs/sdk/intents/design/index.js",
|
|
31
|
+
"import": "./lib/esm/sdk/intents/design/index.js"
|
|
32
32
|
},
|
|
33
33
|
"./asset": {
|
|
34
|
-
"types": "./asset/
|
|
35
|
-
"require": "./lib/cjs/sdk/intents/asset/
|
|
36
|
-
"import": "./lib/esm/sdk/intents/asset/
|
|
34
|
+
"types": "./asset/index.d.ts",
|
|
35
|
+
"require": "./lib/cjs/sdk/intents/asset/index.js",
|
|
36
|
+
"import": "./lib/esm/sdk/intents/asset/index.js"
|
|
37
37
|
},
|
|
38
38
|
"./content": {
|
|
39
|
-
"types": "./content/
|
|
40
|
-
"require": "./lib/cjs/sdk/intents/content/
|
|
41
|
-
"import": "./lib/esm/sdk/intents/content/
|
|
39
|
+
"types": "./content/index.d.ts",
|
|
40
|
+
"require": "./lib/cjs/sdk/intents/content/index.js",
|
|
41
|
+
"import": "./lib/esm/sdk/intents/content/index.js"
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
|
-
"typings": "./
|
|
44
|
+
"typings": "./index.d.ts"
|
|
45
45
|
}
|
package/test/index.d.ts
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @public
|
|
3
|
+
* Initializes a test environment for the `@canva/intents` package, enabling unit tests to mock Canva's APIs.
|
|
4
|
+
* @remarks
|
|
5
|
+
* This method should only be called once in a test environment, such as in a Jest setup file.
|
|
6
|
+
* @see
|
|
7
|
+
* https://www.canva.dev/docs/apps/testing/
|
|
8
|
+
*/
|
|
9
|
+
export declare function initTestEnvironment(): void;
|
|
10
|
+
|
|
11
|
+
export { }
|
package/asset/beta.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|