@athenaintel/react 0.9.20 → 0.9.21
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/auth.cjs +2 -0
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.js +2 -0
- package/dist/auth.js.map +1 -1
- package/dist/index.cjs +2 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16582,6 +16582,7 @@ function isTrustedOrigin({
|
|
|
16582
16582
|
}
|
|
16583
16583
|
}
|
|
16584
16584
|
const BRIDGE_TIMEOUT_MS = 2e3;
|
|
16585
|
+
const EMPTY_TRUSTED_ORIGINS = [];
|
|
16585
16586
|
const normalizeOrigin = (value) => {
|
|
16586
16587
|
try {
|
|
16587
16588
|
return new URL(value).origin;
|
|
@@ -16590,17 +16591,13 @@ const normalizeOrigin = (value) => {
|
|
|
16590
16591
|
}
|
|
16591
16592
|
};
|
|
16592
16593
|
function useParentBridge({
|
|
16593
|
-
trustedOrigins =
|
|
16594
|
+
trustedOrigins = EMPTY_TRUSTED_ORIGINS
|
|
16594
16595
|
} = {}) {
|
|
16595
16596
|
const isInIframe = typeof window !== "undefined" && window.parent !== window;
|
|
16596
16597
|
const runtimeTrustedOrigins = useMemo(() => {
|
|
16597
16598
|
const origins = /* @__PURE__ */ new Set();
|
|
16598
16599
|
if (typeof window !== "undefined") {
|
|
16599
16600
|
origins.add(window.location.origin);
|
|
16600
|
-
const referrerOrigin = normalizeOrigin(document.referrer);
|
|
16601
|
-
if (referrerOrigin) {
|
|
16602
|
-
origins.add(referrerOrigin);
|
|
16603
|
-
}
|
|
16604
16601
|
}
|
|
16605
16602
|
for (const trustedOrigin of trustedOrigins) {
|
|
16606
16603
|
const normalizedOrigin = normalizeOrigin(trustedOrigin);
|