@canva/platform 2.1.1-beta.1 → 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.
@@ -475,41 +475,6 @@ export declare interface FeatureSupport {
475
475
  */
476
476
  export declare const getPlatformInfo: () => PlatformInfo;
477
477
 
478
- /**
479
- * @beta
480
- * Provides methods for interacting with notifications.
481
- */
482
- export declare const notification: NotificationClient;
483
-
484
- /**
485
- * @beta
486
- *
487
- * Provides methods for interacting with notifications.
488
- */
489
- export declare interface NotificationClient {
490
- /**
491
- * @beta
492
- *
493
- * A method that shows a toast notification to the user.
494
- *
495
- * @example
496
- * ```tsx
497
- * import { notification } from '@canva/platform';
498
- * import type { ToastRequest } from '@canva/platform';
499
- *
500
- * const showToast = () => {
501
- * const request: ToastRequest = {
502
- * messageText: "Hello world!",
503
- * };
504
- * notification.addToast(request);
505
- * };
506
- *
507
- * <Button onClick={() => showToast()}>Show Toast</Button>
508
- * ```
509
- */
510
- addToast: (request: ToastRequest) => Promise<ToastResponse>;
511
- }
512
-
513
478
  /**
514
479
  * @public
515
480
  * A callback that runs when an app process is about to close.
@@ -681,44 +646,4 @@ export declare const requestOpenExternalUrl: (
681
646
  request: OpenExternalUrlRequest,
682
647
  ) => Promise<OpenExternalUrlResponse>;
683
648
 
684
- /**
685
- * @beta
686
- * The result when a toast notification is successfully added.
687
- */
688
- export declare type ToastCompleted = {
689
- /**
690
- * The status of the request.
691
- */
692
- status: "completed";
693
- };
694
-
695
- /**
696
- * @beta
697
- *
698
- * Options for configuring a toast notification.
699
- */
700
- export declare type ToastRequest = {
701
- /**
702
- * Text to show within the toast notification.
703
- */
704
- messageText: string;
705
- /**
706
- * The duration that the notification will be visible.
707
- *
708
- * If set to `"infinite"`, the notification will be displayed until manually dismissed by the user.
709
- *
710
- * If set to a number, the notification will automatically disappear after that duration (in milliseconds).
711
- *
712
- * @defaultValue 5000
713
- */
714
- timeoutMs?: number | "infinite";
715
- };
716
-
717
- /**
718
- * @beta
719
- *
720
- * The response from adding a toast notification.
721
- */
722
- export declare type ToastResponse = ToastCompleted;
723
-
724
649
  export {};
@@ -2,12 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- Object.defineProperty(exports, "notification", {
6
- enumerable: true,
7
- get: function() {
8
- return notification;
9
- }
10
- });
11
5
  _export_star(require("./public"), exports);
12
6
  function _export_star(from, to) {
13
7
  Object.keys(from).forEach(function(k) {
@@ -23,6 +17,4 @@ function _export_star(from, to) {
23
17
  return from;
24
18
  }
25
19
  var _window___canva___sdkRegistration, _window___canva__;
26
- (_window___canva__ = window.__canva__) === null || _window___canva__ === void 0 ? void 0 : (_window___canva___sdkRegistration = _window___canva__.sdkRegistration) === null || _window___canva___sdkRegistration === void 0 ? void 0 : _window___canva___sdkRegistration.registerPackageVersion('platform', '2.1.1', 'beta');
27
- const { canva_sdk } = window;
28
- const notification = canva_sdk.platform.v2.notification;
20
+ (_window___canva__ = window.__canva__) === null || _window___canva__ === void 0 ? void 0 : (_window___canva___sdkRegistration = _window___canva__.sdkRegistration) === null || _window___canva___sdkRegistration === void 0 ? void 0 : _window___canva___sdkRegistration.registerPackageVersion('platform', '2.1.1', 'ga');
@@ -1,5 +1,3 @@
1
1
  var _window___canva___sdkRegistration, _window___canva__;
2
2
  export * from './public';
3
- (_window___canva__ = window.__canva__) === null || _window___canva__ === void 0 ? void 0 : (_window___canva___sdkRegistration = _window___canva__.sdkRegistration) === null || _window___canva___sdkRegistration === void 0 ? void 0 : _window___canva___sdkRegistration.registerPackageVersion('platform', '2.1.1', 'beta');
4
- const { canva_sdk } = window;
5
- export const notification = canva_sdk.platform.v2.notification;
3
+ (_window___canva__ = window.__canva__) === null || _window___canva__ === void 0 ? void 0 : (_window___canva___sdkRegistration = _window___canva__.sdkRegistration) === null || _window___canva___sdkRegistration === void 0 ? void 0 : _window___canva___sdkRegistration.registerPackageVersion('platform', '2.1.1', 'ga');
package/package.json CHANGED
@@ -1,25 +1,25 @@
1
1
  {
2
2
  "name": "@canva/platform",
3
- "version": "2.1.1-beta.1",
3
+ "version": "2.1.1",
4
4
  "description": "The Canva Apps SDK app platform 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/platform/beta.js",
11
- "module": "./lib/esm/sdk/platform/beta.js",
10
+ "main": "./lib/cjs/sdk/platform/index.js",
11
+ "module": "./lib/esm/sdk/platform/index.js",
12
12
  "exports": {
13
13
  ".": {
14
- "types": "./beta.d.ts",
15
- "require": "./lib/cjs/sdk/platform/beta.js",
16
- "import": "./lib/esm/sdk/platform/beta.js"
14
+ "types": "./index.d.ts",
15
+ "require": "./lib/cjs/sdk/platform/index.js",
16
+ "import": "./lib/esm/sdk/platform/index.js"
17
17
  },
18
18
  "./test": {
19
- "types": "./test/beta.d.ts",
20
- "require": "./lib/cjs/sdk/platform/test/beta.js",
21
- "import": "./lib/esm/sdk/platform/test/beta.js"
19
+ "types": "./test/index.d.ts",
20
+ "require": "./lib/cjs/sdk/platform/test/index.js",
21
+ "import": "./lib/esm/sdk/platform/test/index.js"
22
22
  }
23
23
  },
24
- "typings": "./beta.d.ts"
24
+ "typings": "./index.d.ts"
25
25
  }
@@ -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 * from './index';
File without changes