@authsignal/browser 0.1.0 → 0.1.3

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/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./authsignal";
1
+ export { Authsignal } from "./authsignal";
2
2
  export * from "./types";
package/dist/index.js CHANGED
@@ -1,7 +1,3 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
1
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
6
2
  // require the crypto API and do not support built-in fallback to lower quality random number
7
3
  // generators (like Math.random()).
@@ -89,10 +85,10 @@ var getCookie = function (name) {
89
85
  return (decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(name).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null);
90
86
  };
91
87
 
92
- exports.AuthsignalWindowMessage = void 0;
88
+ var AuthsignalWindowMessage;
93
89
  (function (AuthsignalWindowMessage) {
94
90
  AuthsignalWindowMessage["AUTHSIGNAL_CLOSE_POPUP"] = "AUTHSIGNAL_CLOSE_POPUP";
95
- })(exports.AuthsignalWindowMessage || (exports.AuthsignalWindowMessage = {}));
91
+ })(AuthsignalWindowMessage || (AuthsignalWindowMessage = {}));
96
92
 
97
93
  var focusableSelectors = [
98
94
  'a[href]:not([tabindex^="-"])',
@@ -4506,7 +4502,7 @@ var Authsignal = /** @class */ (function () {
4506
4502
  catch (_a) {
4507
4503
  // Ignore if the event data is not valid JSON
4508
4504
  }
4509
- if ((data === null || data === void 0 ? void 0 : data.event) === exports.AuthsignalWindowMessage.AUTHSIGNAL_CLOSE_POPUP) {
4505
+ if ((data === null || data === void 0 ? void 0 : data.event) === AuthsignalWindowMessage.AUTHSIGNAL_CLOSE_POPUP) {
4510
4506
  _this._token = data.token;
4511
4507
  Popup_1.close();
4512
4508
  }
@@ -4521,4 +4517,4 @@ var Authsignal = /** @class */ (function () {
4521
4517
  return Authsignal;
4522
4518
  }());
4523
4519
 
4524
- exports.Authsignal = Authsignal;
4520
+ export { Authsignal, AuthsignalWindowMessage };
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@authsignal/browser",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
+ "type": "module",
4
5
  "main": "dist/index.js",
5
- "module": "dist/index.mjs",
6
+ "module": "dist/index.js",
6
7
  "types": "dist/index.d.ts",
7
8
  "keywords": [
8
9
  "authsignal",
@@ -48,8 +49,7 @@
48
49
  ],
49
50
  "exports": {
50
51
  ".": {
51
- "require": "./dist/index.js",
52
- "import": "./dist/index.mjs",
52
+ "import": "./dist/index.js",
53
53
  "types": "./dist/index.d.ts"
54
54
  }
55
55
  }