@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
@@ -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
- _export_star(require("./beta"), exports);
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');
@@ -17,6 +17,9 @@ function createFakeIntentsClients() {
17
17
  },
18
18
  data: {
19
19
  prepareDataConnector: ()=>{}
20
+ },
21
+ content: {
22
+ prepareContentPublisher: ()=>{}
20
23
  }
21
24
  }
22
25
  }
@@ -1,8 +1,9 @@
1
- "use strict";
1
+ "use strict"
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- _export_star(require("./beta"), exports);
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 data () {
12
+ get content () {
13
13
  return _index;
14
14
  },
15
- get design () {
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("./data/index"));
20
- const _index1 = _interop_require_wildcard(require("./design/index"));
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
- Object.defineProperty(exports, "LATEST_VERSION", {
6
- enumerable: true,
7
- get: function() {
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.1';
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 * from './beta';
1
+ export {};
@@ -1 +1,3 @@
1
- export * from './beta';
1
+ import { LATEST_VERSION } from '../version';
2
+ export * from './public';
3
+ window.__canva__?.sdkRegistration?.registerPackageVersion('intents/content', LATEST_VERSION, 'ga');
@@ -0,0 +1,2 @@
1
+ const { canva_sdk } = window;
2
+ export const prepareContentPublisher = canva_sdk.intents.v1.content.prepareContentPublisher;
@@ -7,6 +7,9 @@ export function createFakeIntentsClients() {
7
7
  },
8
8
  data: {
9
9
  prepareDataConnector: ()=>{}
10
+ },
11
+ content: {
12
+ prepareContentPublisher: ()=>{}
10
13
  }
11
14
  }
12
15
  }
@@ -1 +1,3 @@
1
- export * from './beta';
1
+ import { LATEST_VERSION } from './version';
2
+ export * from './public';
3
+ window.__canva__?.sdkRegistration?.registerPackageVersion('intents', LATEST_VERSION, 'ga');
@@ -1,3 +1,4 @@
1
+ import * as content from './content/index';
1
2
  import * as data from './data/index';
2
3
  import * as design from './design/index';
3
- export { design, data };
4
+ export { design, data, content };
@@ -1 +1,3 @@
1
- export const LATEST_VERSION = '2.0.1';
1
+ export const LATEST_VERSION = '2.1.0';
2
+ export const LATEST_VERSION_BETA = '2.0.2-beta.3';
3
+ export const LATEST_VERSION_ALPHA = 'NONE';
package/package.json CHANGED
@@ -1,45 +1,45 @@
1
1
  {
2
2
  "name": "@canva/intents",
3
- "version": "2.0.1-beta.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/beta.js",
11
- "module": "./lib/esm/sdk/intents/beta.js",
10
+ "main": "./lib/cjs/sdk/intents/index.js",
11
+ "module": "./lib/esm/sdk/intents/index.js",
12
12
  "exports": {
13
13
  ".": {
14
- "types": "./beta.d.ts",
15
- "require": "./lib/cjs/sdk/intents/beta.js",
16
- "import": "./lib/esm/sdk/intents/beta.js"
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/beta.d.ts",
20
- "require": "./lib/cjs/sdk/intents/test/beta.js",
21
- "import": "./lib/esm/sdk/intents/test/beta.js"
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/beta.d.ts",
25
- "require": "./lib/cjs/sdk/intents/data/beta.js",
26
- "import": "./lib/esm/sdk/intents/data/beta.js"
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/beta.d.ts",
30
- "require": "./lib/cjs/sdk/intents/design/beta.js",
31
- "import": "./lib/esm/sdk/intents/design/beta.js"
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/beta.d.ts",
35
- "require": "./lib/cjs/sdk/intents/asset/beta.js",
36
- "import": "./lib/esm/sdk/intents/asset/beta.js"
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/beta.d.ts",
40
- "require": "./lib/cjs/sdk/intents/content/beta.js",
41
- "import": "./lib/esm/sdk/intents/content/beta.js"
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": "./beta.d.ts"
44
+ "typings": "./index.d.ts"
45
45
  }
package/test/index.d.ts CHANGED
@@ -1 +1,11 @@
1
- export * from "./beta";
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 {};