@canva/intents 2.0.2-beta.3 → 2.1.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/CHANGELOG.md +21 -0
- package/README.md +65 -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 +23 -23
- package/test/index.d.ts +11 -1
- package/asset/beta.d.ts +0 -236
- 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 -14
- 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 -4
- 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
package/design/beta.d.ts
DELETED
|
@@ -1,43 +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: (
|
|
40
|
-
implementation: DesignEditorIntent,
|
|
41
|
-
) => void;
|
|
42
|
-
|
|
43
|
-
export {};
|
|
@@ -1,14 +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 { canva_sdk } = window;
|
|
13
|
-
const prepareUrlExpander = canva_sdk.intents.v1.asset.prepareUrlExpander;
|
|
14
|
-
window.__canva__?.sdkRegistration?.registerPackageVersion('intents/asset', _version.LATEST_VERSION, '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');
|
|
@@ -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');
|
|
@@ -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');
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
_export_star(require("./index"), 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,4 +0,0 @@
|
|
|
1
|
-
import { LATEST_VERSION } from '../version';
|
|
2
|
-
const { canva_sdk } = window;
|
|
3
|
-
export const prepareContentPublisher = canva_sdk.intents.v1.content.prepareContentPublisher;
|
|
4
|
-
window.__canva__?.sdkRegistration?.registerPackageVersion('intents/content', LATEST_VERSION, 'beta');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './index';
|
package/test/beta.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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 {};
|