@descope-int/react-dynamic-sdk
Advanced tools
Comparing version 1.0.128 to 1.0.129
@@ -1,2 +0,2 @@ | ||
"use strict";var e=require("@descope/react-sdk"),t=require("react");const s=localStorage?.getItem("base.content.url")||"https://static.descope.com/pages",r="descope-wc",n=()=>new Promise((e=>{const t=customElements.define,s=customElements.get;customElements.define=(...n)=>{n[0]===r?(e(n[1]),customElements.define=t,customElements.get=s):t.apply(customElements,n)},customElements.get=(...e)=>e[0]===r?(customElements.get=s,null):s.apply(customElements,e)})),c=n(),o=(()=>{let e="",t=Promise.resolve("");return r=>(r!==e&&(e=r,t=(async e=>{const t=new URL(s);return t.pathname=((...e)=>e.join("/").replace(/\/+/g,"/"))(t.pathname,e,"v2-beta","config.json"),(await fetch(t,{cache:"default"})).ok?"v2":"v1"})(r)),t)})(),u=({projectId:e,sdkVersion:s})=>{const u=t.useRef(""),[m,a]=t.useState({projectId:e,sdkVersion:s||u.current}),i=t.useRef({v1:void 0,v2:void 0});return t.useMemo((()=>{(async()=>{if(!i.current.v1){i.current.v1=await c;const e=`${r}-v1`;customElements.get(e)||customElements.define(e,i.current.v1)}const t=await o(e);if(t&&t!==u.current){if(u.current=t,!i.current[t]){const e=n();await import("https://cdn.jsdelivr.net/npm/@descope/web-component@3.18.3"),i.current[t]=await e;const s=`${r}-v2`;customElements.get(s)||customElements.define(`${r}-v2`,i.current.v2)}if(!customElements.get(r)){class e extends i.current[t]{}customElements.define(r,e)}}a({projectId:e,sdkVersion:u.current})})()}),[e,s]),m},m=t.createContext(void 0);exports.AuthProvider=({projectId:s,sdkVersion:r,...n})=>{const c=u({projectId:s,sdkVersion:r});return t.createElement(m.Provider,{value:c.sdkVersion+c.projectId},t.createElement(e.AuthProvider,{projectId:c.projectId,...n}))},exports.Descope=s=>{const r=t.useContext(m);return t.createElement(e.Descope,{...s,key:r})},Object.keys(e).forEach((function(t){"default"===t||Object.prototype.hasOwnProperty.call(exports,t)||Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})})); | ||
"use strict";var e=require("@descope/react-sdk"),t=require("react");const s=localStorage?.getItem("base.content.url")||"https://static.descope.com/pages",r="descope-wc",n=()=>new Promise((e=>{const t=customElements.define,s=customElements.get;customElements.define=(...n)=>{n[0]===r?(e(n[1]),customElements.define=t,customElements.get=s):t.apply(customElements,n)},customElements.get=(...e)=>e[0]===r?(customElements.get=s,null):s.apply(customElements,e)})),c=n(),o=(()=>{let e="",t=Promise.resolve("");return r=>(r!==e&&(e=r,t=(async e=>{const t=new URL(s);return t.pathname=((...e)=>e.join("/").replace(/\/+/g,"/"))(t.pathname,e,"v2-beta","config.json"),(await fetch(t,{cache:"default"})).ok?"v2":"v1"})(r)),t)})(),u=({projectId:e,sdkVersion:s})=>{const u=t.useRef(""),[m,a]=t.useState({projectId:e,sdkVersion:s||u.current}),i=t.useRef({v1:void 0,v2:void 0});return t.useMemo((()=>{(async()=>{if(!i.current.v1){i.current.v1=await c;const e=`${r}-v1`;customElements.get(e)||customElements.define(e,i.current.v1)}const t=await o(e);if(t&&t!==u.current){if(u.current=t,!i.current[t]){const e=n();await import("https://cdn.jsdelivr.net/npm/@descope/web-component@3.19.1"),i.current[t]=await e;const s=`${r}-v2`;customElements.get(s)||customElements.define(`${r}-v2`,i.current.v2)}if(!customElements.get(r)){class e extends i.current[t]{}customElements.define(r,e)}}a({projectId:e,sdkVersion:u.current})})()}),[e,s]),m},m=t.createContext(void 0);exports.AuthProvider=({projectId:s,sdkVersion:r,...n})=>{const c=u({projectId:s,sdkVersion:r});return t.createElement(m.Provider,{value:c.sdkVersion+c.projectId},t.createElement(e.AuthProvider,{projectId:c.projectId,...n}))},exports.Descope=s=>{const r=t.useContext(m);return t.createElement(e.Descope,{...s,key:r})},Object.keys(e).forEach((function(t){"default"===t||Object.prototype.hasOwnProperty.call(exports,t)||Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})})); | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -5,2 +5,2 @@ export declare const BASE_CONTENT_URL: string; | ||
export declare const WC_NAME = "descope-wc"; | ||
export declare const FLOWS_V2_SDK_URL = "https://cdn.jsdelivr.net/npm/@descope/web-component@3.18.3"; | ||
export declare const FLOWS_V2_SDK_URL = "https://cdn.jsdelivr.net/npm/@descope/web-component@3.19.1"; |
@@ -1,2 +0,2 @@ | ||
import{AuthProvider as e,Descope as t}from"@descope/react-sdk";export*from"@descope/react-sdk";import s,{useRef as n,useState as c,useMemo as o,createContext as r,useContext as m}from"react";const a=localStorage?.getItem("base.content.url")||"https://static.descope.com/pages",d="descope-wc",u=()=>new Promise((e=>{const t=customElements.define,s=customElements.get;customElements.define=(...n)=>{n[0]===d?(e(n[1]),customElements.define=t,customElements.get=s):t.apply(customElements,n)},customElements.get=(...e)=>e[0]===d?(customElements.get=s,null):s.apply(customElements,e)})),i=u(),l=(()=>{let e="",t=Promise.resolve("");return s=>(s!==e&&(e=s,t=(async e=>{const t=new URL(a);return t.pathname=((...e)=>e.join("/").replace(/\/+/g,"/"))(t.pathname,e,"v2-beta","config.json"),(await fetch(t,{cache:"default"})).ok?"v2":"v1"})(s)),t)})(),p=({projectId:e,sdkVersion:t})=>{const s=n(""),[r,m]=c({projectId:e,sdkVersion:t||s.current}),a=n({v1:void 0,v2:void 0});return o((()=>{(async()=>{if(!a.current.v1){a.current.v1=await i;const e=`${d}-v1`;customElements.get(e)||customElements.define(e,a.current.v1)}const t=await l(e);if(t&&t!==s.current){if(s.current=t,!a.current[t]){const e=u();await import("https://cdn.jsdelivr.net/npm/@descope/web-component@3.18.3"),a.current[t]=await e;const s=`${d}-v2`;customElements.get(s)||customElements.define(`${d}-v2`,a.current.v2)}if(!customElements.get(d)){class e extends a.current[t]{}customElements.define(d,e)}}m({projectId:e,sdkVersion:s.current})})()}),[e,t]),r},v=r(void 0),E=({projectId:t,sdkVersion:n,...c})=>{const o=p({projectId:t,sdkVersion:n});return s.createElement(v.Provider,{value:o.sdkVersion+o.projectId},s.createElement(e,{projectId:o.projectId,...c}))},f=e=>{const n=m(v);return s.createElement(t,{...e,key:n})};export{E as AuthProvider,f as Descope}; | ||
import{AuthProvider as e,Descope as t}from"@descope/react-sdk";export*from"@descope/react-sdk";import s,{useRef as n,useState as c,useMemo as o,createContext as r,useContext as m}from"react";const a=localStorage?.getItem("base.content.url")||"https://static.descope.com/pages",d="descope-wc",u=()=>new Promise((e=>{const t=customElements.define,s=customElements.get;customElements.define=(...n)=>{n[0]===d?(e(n[1]),customElements.define=t,customElements.get=s):t.apply(customElements,n)},customElements.get=(...e)=>e[0]===d?(customElements.get=s,null):s.apply(customElements,e)})),i=u(),l=(()=>{let e="",t=Promise.resolve("");return s=>(s!==e&&(e=s,t=(async e=>{const t=new URL(a);return t.pathname=((...e)=>e.join("/").replace(/\/+/g,"/"))(t.pathname,e,"v2-beta","config.json"),(await fetch(t,{cache:"default"})).ok?"v2":"v1"})(s)),t)})(),p=({projectId:e,sdkVersion:t})=>{const s=n(""),[r,m]=c({projectId:e,sdkVersion:t||s.current}),a=n({v1:void 0,v2:void 0});return o((()=>{(async()=>{if(!a.current.v1){a.current.v1=await i;const e=`${d}-v1`;customElements.get(e)||customElements.define(e,a.current.v1)}const t=await l(e);if(t&&t!==s.current){if(s.current=t,!a.current[t]){const e=u();await import("https://cdn.jsdelivr.net/npm/@descope/web-component@3.19.1"),a.current[t]=await e;const s=`${d}-v2`;customElements.get(s)||customElements.define(`${d}-v2`,a.current.v2)}if(!customElements.get(d)){class e extends a.current[t]{}customElements.define(d,e)}}m({projectId:e,sdkVersion:s.current})})()}),[e,t]),r},v=r(void 0),E=({projectId:t,sdkVersion:n,...c})=>{const o=p({projectId:t,sdkVersion:n});return s.createElement(v.Provider,{value:o.sdkVersion+o.projectId},s.createElement(e,{projectId:o.projectId,...c}))},f=e=>{const n=m(v);return s.createElement(t,{...e,key:n})};export{E as AuthProvider,f as Descope}; | ||
//# sourceMappingURL=index.esm.js.map |
{ | ||
"name": "@descope-int/react-dynamic-sdk", | ||
"version": "1.0.128", | ||
"version": "1.0.129", | ||
"description": "Descope Dynamic React SDK", | ||
@@ -5,0 +5,0 @@ "author": "Descope Team <info@descope.com>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package