@canva/intents 2.2.1-beta.1 → 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.
- package/CHANGELOG.md +24 -18
- package/asset/index.d.ts +1 -1
- package/content/index.d.ts +1618 -1
- package/data/index.d.ts +1229 -1
- package/design/index.d.ts +41 -1
- package/index.d.ts +2994 -1
- package/lib/cjs/sdk/intents/asset/index.js +1 -15
- package/lib/cjs/sdk/intents/fake/{create_beta.js → create.js} +6 -9
- package/lib/cjs/sdk/intents/index.js +4 -2
- package/lib/cjs/sdk/intents/test/index.js +14 -13
- package/lib/cjs/sdk/intents/version.js +1 -1
- package/lib/esm/sdk/intents/asset/index.js +1 -1
- package/lib/esm/sdk/intents/fake/{create_beta.js → create.js} +4 -7
- package/lib/esm/sdk/intents/index.js +3 -1
- package/lib/esm/sdk/intents/test/index.js +9 -1
- package/lib/esm/sdk/intents/version.js +1 -1
- package/package.json +23 -23
- package/test/index.d.ts +11 -1
- package/asset/beta.d.ts +0 -190
- package/beta.d.ts +0 -2963
- package/content/beta.d.ts +0 -1567
- package/data/beta.d.ts +0 -1229
- package/design/beta.d.ts +0 -41
- package/lib/cjs/sdk/intents/asset/beta.js +0 -13
- package/lib/cjs/sdk/intents/beta.js +0 -20
- package/lib/cjs/sdk/intents/content/beta.js +0 -27
- 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 -19
- package/lib/esm/sdk/intents/asset/beta.js +0 -3
- 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 -9
- package/test/beta.d.ts +0 -11
package/design/beta.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @public
|
|
3
|
-
*
|
|
4
|
-
* Main interface for implementing the DesignEditor intent.
|
|
5
|
-
*
|
|
6
|
-
* Implementing the DesignEditor Intent enables apps to assist users in editing designs,
|
|
7
|
-
* by presenting interactive and creative tooling alongside the Canva design surface.
|
|
8
|
-
*/
|
|
9
|
-
export declare type DesignEditorIntent = {
|
|
10
|
-
/**
|
|
11
|
-
* Renders the UI containing the app’s functionality.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* function render() {
|
|
16
|
-
* // render your UI using your preferred framework
|
|
17
|
-
* }
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
render: () => void;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @public
|
|
25
|
-
*
|
|
26
|
-
* Prepares a {@link DesignEditorIntent|DesignEditor Intent}.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```tsx
|
|
30
|
-
* import { prepareDesignEditor } from '@canva/intents/design';
|
|
31
|
-
*
|
|
32
|
-
* prepareDesignEditor({
|
|
33
|
-
* render: async () => {
|
|
34
|
-
* // TODO: Implement the logic to render your app's UI
|
|
35
|
-
* },
|
|
36
|
-
* });
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
export declare const prepareDesignEditor: (implementation: DesignEditorIntent) => void;
|
|
40
|
-
|
|
41
|
-
export { }
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "prepareUrlExpander", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return prepareUrlExpander;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _version = require("../version");
|
|
12
|
-
const prepareUrlExpander = canva_sdk.intents.v1.asset.prepareUrlExpander;
|
|
13
|
-
window.__canva__?.sdkRegistration?.registerPackageVersion('intents/asset', _version.LATEST_VERSION_BETA, 'beta');
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
const _version = require("./version");
|
|
6
|
-
_export_star(require("./public"), exports);
|
|
7
|
-
function _export_star(from, to) {
|
|
8
|
-
Object.keys(from).forEach(function(k) {
|
|
9
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
10
|
-
Object.defineProperty(to, k, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function() {
|
|
13
|
-
return from[k];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
return from;
|
|
19
|
-
}
|
|
20
|
-
window.__canva__?.sdkRegistration?.registerPackageVersion('intents', _version.LATEST_VERSION_BETA, 'beta');
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "prepareContentPublisher", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return prepareContentPublisher;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _version = require("../version");
|
|
12
|
-
_export_star(require("./public"), exports);
|
|
13
|
-
function _export_star(from, to) {
|
|
14
|
-
Object.keys(from).forEach(function(k) {
|
|
15
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
16
|
-
Object.defineProperty(to, k, {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function() {
|
|
19
|
-
return from[k];
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
return from;
|
|
25
|
-
}
|
|
26
|
-
const prepareContentPublisher = canva_sdk.intents.v1.content.prepareContentPublisher;
|
|
27
|
-
window.__canva__?.sdkRegistration?.registerPackageVersion('intents/content', _version.LATEST_VERSION_BETA, 'beta');
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
const _version = require("../version");
|
|
6
|
-
_export_star(require("./public"), exports);
|
|
7
|
-
function _export_star(from, to) {
|
|
8
|
-
Object.keys(from).forEach(function(k) {
|
|
9
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
10
|
-
Object.defineProperty(to, k, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function() {
|
|
13
|
-
return from[k];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
return from;
|
|
19
|
-
}
|
|
20
|
-
window.__canva__?.sdkRegistration?.registerPackageVersion('intents/data', _version.LATEST_VERSION_BETA, 'beta');
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
const _version = require("../version");
|
|
6
|
-
_export_star(require("./public"), exports);
|
|
7
|
-
function _export_star(from, to) {
|
|
8
|
-
Object.keys(from).forEach(function(k) {
|
|
9
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
10
|
-
Object.defineProperty(to, k, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function() {
|
|
13
|
-
return from[k];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
return from;
|
|
19
|
-
}
|
|
20
|
-
window.__canva__?.sdkRegistration?.registerPackageVersion('intents/design', _version.LATEST_VERSION_BETA, 'beta');
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "initTestEnvironment", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return initTestEnvironment;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _create_beta = require('../fake/create_beta');
|
|
12
|
-
const _canva_sdk = require('../../utils/canva_sdk');
|
|
13
|
-
function initTestEnvironment() {
|
|
14
|
-
(0, _canva_sdk.assertIsTestCanvaSdk)();
|
|
15
|
-
const fakeClients = (0, _create_beta.createBetaFakeIntentsClients)();
|
|
16
|
-
(0, _canva_sdk.injectFakeAPIClients)({
|
|
17
|
-
intents: fakeClients.intents
|
|
18
|
-
});
|
|
19
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { LATEST_VERSION_BETA } from '../version';
|
|
2
|
-
export * from './public';
|
|
3
|
-
export const prepareContentPublisher = canva_sdk.intents.v1.content.prepareContentPublisher;
|
|
4
|
-
window.__canva__?.sdkRegistration?.registerPackageVersion('intents/content', LATEST_VERSION_BETA, 'beta');
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createBetaFakeIntentsClients } from '../fake/create_beta';
|
|
2
|
-
import { assertIsTestCanvaSdk, injectFakeAPIClients } from '../../utils/canva_sdk';
|
|
3
|
-
export function initTestEnvironment() {
|
|
4
|
-
assertIsTestCanvaSdk();
|
|
5
|
-
const fakeClients = createBetaFakeIntentsClients();
|
|
6
|
-
injectFakeAPIClients({
|
|
7
|
-
intents: fakeClients.intents
|
|
8
|
-
});
|
|
9
|
-
}
|
package/test/beta.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @beta
|
|
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 { }
|