@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.
Files changed (39) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/asset/index.d.ts +1 -1
  3. package/content/index.d.ts +1440 -1
  4. package/data/index.d.ts +1229 -1
  5. package/design/index.d.ts +41 -1
  6. package/index.d.ts +2821 -1
  7. package/lib/cjs/sdk/intents/asset/index.js +1 -15
  8. package/lib/cjs/sdk/intents/content/index.js +4 -2
  9. package/lib/cjs/sdk/intents/content/{beta.js → public.js} +0 -2
  10. package/lib/cjs/sdk/intents/fake/create.js +3 -0
  11. package/lib/cjs/sdk/intents/index.js +4 -2
  12. package/lib/cjs/sdk/intents/public.js +8 -4
  13. package/lib/cjs/sdk/intents/version.js +17 -4
  14. package/lib/esm/sdk/intents/asset/index.js +1 -1
  15. package/lib/esm/sdk/intents/content/index.js +3 -1
  16. package/lib/esm/sdk/intents/content/public.js +2 -0
  17. package/lib/esm/sdk/intents/fake/create.js +3 -0
  18. package/lib/esm/sdk/intents/index.js +3 -1
  19. package/lib/esm/sdk/intents/public.js +2 -1
  20. package/lib/esm/sdk/intents/version.js +3 -1
  21. package/package.json +22 -22
  22. package/test/index.d.ts +11 -1
  23. package/asset/beta.d.ts +0 -1
  24. package/beta.d.ts +0 -1309
  25. package/content/beta.d.ts +0 -1410
  26. package/data/beta.d.ts +0 -1242
  27. package/design/beta.d.ts +0 -43
  28. package/lib/cjs/sdk/intents/asset/beta.js +0 -4
  29. package/lib/cjs/sdk/intents/beta.js +0 -20
  30. package/lib/cjs/sdk/intents/data/beta.js +0 -20
  31. package/lib/cjs/sdk/intents/design/beta.js +0 -20
  32. package/lib/cjs/sdk/intents/test/beta.js +0 -18
  33. package/lib/esm/sdk/intents/asset/beta.js +0 -1
  34. package/lib/esm/sdk/intents/beta.js +0 -3
  35. package/lib/esm/sdk/intents/content/beta.js +0 -4
  36. package/lib/esm/sdk/intents/data/beta.js +0 -3
  37. package/lib/esm/sdk/intents/design/beta.js +0 -3
  38. package/lib/esm/sdk/intents/test/beta.js +0 -1
  39. 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,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
@@ -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 +0,0 @@
1
- export { };
@@ -1,3 +0,0 @@
1
- import { LATEST_VERSION } from './version';
2
- export * from './public';
3
- window.__canva__?.sdkRegistration?.registerPackageVersion('intents', LATEST_VERSION, 'beta');
@@ -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,3 +0,0 @@
1
- import { LATEST_VERSION } from '../version';
2
- export * from './public';
3
- window.__canva__?.sdkRegistration?.registerPackageVersion('intents/data', LATEST_VERSION, 'beta');
@@ -1,3 +0,0 @@
1
- import { LATEST_VERSION } from '../version';
2
- export * from './public';
3
- window.__canva__?.sdkRegistration?.registerPackageVersion('intents/design', 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 {};