Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@clerk/clerk-react

Package Overview
Dependencies
Maintainers
4
Versions
2316
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clerk/clerk-react - npm Package Compare versions

Comparing version 1.0.1-staging.3 to 1.1.0

2

dist/clerk-react.cjs.development.js

@@ -69,3 +69,3 @@ 'use strict';

var version = "1.0.1-staging.3";
var version = "1.1.0";

@@ -72,0 +72,0 @@ var FAILED_TO_LOAD_ERROR = "Clerk: Failed to load Clerk";

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,n=require("react"),r=(e=n)&&"object"==typeof e&&"default"in e?e.default:e;function t(){return(t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}function o(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n}function s(e,n){if(null==e)return{};var r,t,o={},s=Object.keys(e);for(t=0;t<s.length;t++)n.indexOf(r=s[t])>=0||(o[r]=e[r]);return o}function i(){return"undefined"!=typeof window}var l=function(){function e(e,n,r){var t=this,o=this;if(void 0===n&&(n={}),this.listeners=[],this.clerkjs=null,this._loaded=!1,this.ssrData=null,this.setClerkJS=function(e){try{return e?(o.clerkjs=e,o.listeners.forEach((function(n){e.addListener(n)})),null!==o.preopenSignIn&&e.openSignIn(o.preopenSignIn),null!==o.preopenSignUp&&e.openSignUp(o.preopenSignUp),o.premountSignInNodes.forEach((function(n,r){e.mountSignIn(r,n)})),o.premountSignUpNodes.forEach((function(n,r){e.mountSignUp(r,n)})),o.premountUserProfileNodes.forEach((function(n,r){e.mountUserProfile(r,n)})),o.premountUserButtonNodes.forEach((function(n,r){e.mountUserButton(r,n)})),o._loaded=!0,Promise.resolve()):Promise.resolve()}catch(e){return Promise.reject(e)}},this.setSession=function(e,n){return t.clerkjs?t.clerkjs.setSession(e,n):Promise.reject()},this.preopenSignIn=null,this.preopenSignUp=null,this.premountSignInNodes=new Map,this.premountSignUpNodes=new Map,this.premountUserProfileNodes=new Map,this.premountUserButtonNodes=new Map,this.openSignIn=function(e){t.clerkjs&&t._loaded?t.clerkjs.openSignIn(e):t.preopenSignIn=e},this.closeSignIn=function(){t.clerkjs&&t._loaded?t.clerkjs.closeSignIn():t.preopenSignIn=null},this.openSignUp=function(e){t.clerkjs&&t._loaded?t.clerkjs.openSignUp(e):t.preopenSignUp=e},this.closeSignUp=function(){t.clerkjs&&t._loaded?t.clerkjs.closeSignUp():t.preopenSignUp=null},this.mountSignIn=function(e,n){t.clerkjs&&t._loaded?t.clerkjs.mountSignIn(e,n):t.premountSignInNodes.set(e,n)},this.unmountSignIn=function(e){t.clerkjs&&t._loaded?t.clerkjs.unmountSignIn(e):t.premountSignInNodes.delete(e)},this.mountSignUp=function(e,n){t.clerkjs&&t._loaded?t.clerkjs.mountSignUp(e,n):t.premountSignUpNodes.set(e,n)},this.unmountSignUp=function(e){t.clerkjs&&t._loaded?t.clerkjs.unmountSignUp(e):t.premountSignUpNodes.delete(e)},this.mountUserProfile=function(e,n){t.clerkjs&&t._loaded?t.clerkjs.mountUserProfile(e,n):t.premountUserProfileNodes.set(e,n)},this.unmountUserProfile=function(e){t.clerkjs&&t._loaded?t.clerkjs.unmountUserProfile(e):t.premountUserProfileNodes.delete(e)},this.mountUserButton=function(e,n){t.clerkjs&&t._loaded?t.clerkjs.mountUserButton(e,n):t.premountUserButtonNodes.set(e,n)},this.unmountUserButton=function(e){t.clerkjs&&t._loaded?t.clerkjs.unmountUserButton(e):t.premountUserButtonNodes.delete(e)},this.addListener=function(e){t.clerkjs?t.clerkjs.addListener(e):t.listeners.push(e)},this.loadFromServer=function(e){if("browser"===t.mode)throw new Error("loadFromServer cannot be called in a browser context.");t.ssrData=JSON.stringify({client:t.client,session:t.session,token:e})},this.frontendApi=e,this.options=n,i()){this.mode="browser";var s=document.querySelector('script[data-clerk="SSR"]');if(s){this.ssrData=s.innerHTML;var l=JSON.parse(this.ssrData);this.ssrClient=l.client,this.ssrSession=l.session}r?(window.Clerk=new r(this.frontendApi),window.Clerk.load(this.options).then((function(){t.setClerkJS(window.Clerk)})).catch((function(e){throw new Error(e)}))):function(e,n){return new Promise((function(r,t){window.Clerk&&r(null),e||t("Clerk: Missing privider");var o=document.createElement("script"),s=function(e){return e||"https://cdn.jsdelivr.net/npm/@clerk/clerk-js@"+parseInt("1.0.1-staging.3".split(".")[0],10)+"/dist/clerk.browser.js"}(n);o.setAttribute("data-clerk-frontend-api",e),o.setAttribute("crossorigin","anonymous"),o.async=!0,document.body||t("Clerk: Missing <body> element."),o.addEventListener("load",(function(){return r(o)})),o.addEventListener("error",(function(){return t("Clerk: Failed to load Clerk")})),o.src=s,document.body.appendChild(o)}))}(this.frontendApi,this.options.scriptUrl).then((function(){return window.Clerk?window.Clerk.load(t.options):null})).then((function(){t.setClerkJS(window.Clerk)})).catch((function(e){throw new Error(e)}))}else this.mode="server"}var n;return(n=[{key:"client",get:function(){return this.clerkjs?this.clerkjs.client:void 0}},{key:"session",get:function(){return this.clerkjs?this.clerkjs.session:void 0}},{key:"user",get:function(){return this.clerkjs?this.clerkjs.user:void 0}},{key:"environment",get:function(){return this.clerkjs?this.clerkjs.environment:void 0}}])&&function(e,n){for(var r=0;r<n.length;r++){var t=n[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}(e.prototype,n),e}(),u="Clerk: You must wrap your application in a <ClerkProvider> component.",c=null,a=r.createContext(void 0);a.displayName="ClerkContext";var d=function(e){function n(n){var r;(r=e.call(this,n)||this).listener=function(e){r.setState({client:e.client,session:e.session,user:e.user})};var t=n.frontendApi,o=n.Clerk,u=s(n,["frontendApi","Clerk"]);if(t)c||(c=new l(t,u,o)),r.clerk=c;else{if(i())throw new Error("Clerk: You must add the frontendApi prop to your <ClerkProvider>");r.clerk=null}return r.state=r.clerk?{client:r.clerk.client,session:r.clerk.session,user:r.clerk.user}:{client:void 0,session:void 0,user:void 0},r}o(n,e);var t=n.prototype;return t.componentDidMount=function(){this.clerk&&this.clerk.addListener(this.listener)},t.defaultInitialUser=function(e){var n=e.sessions.find((function(e){return"active"===e.status}));return n?n.user:null},t.render=function(){var e=this.state.session;return this.clerk?r.createElement(a.Provider,{value:{guaranteedLoaded:!1,guaranteedUser:!1,clerk:this.clerk}},this.clerk instanceof l&&this.clerk.ssrData&&r.createElement("script",{type:"application/json","data-clerk":"SSR",dangerouslySetInnerHTML:{__html:this.clerk.ssrData}}),r.createElement(r.Fragment,{key:e?e.id:"no-usrses"},this.props.children)):r.createElement(r.Fragment,{key:"loading"},this.props.children)},n}(r.PureComponent),p=function(e,o){e.displayName=o=o||e.displayName||e.name||"Component";var s=function(o){var s=n.useContext(a);if(s)return s.clerk&&void 0===s.clerk.session?null:s.guaranteedLoaded?r.createElement(e,Object.assign({},o,{clerk:s.clerk})):s.clerk.client?r.createElement(a.Provider,{value:t({},s,{guaranteedLoaded:!0})},r.createElement(e,Object.assign({},o,{clerk:s.clerk}))):null;if(i())throw new Error(u);return null};return s.displayName="withClerk("+o+")",s},f=function(e,o){e.displayName=o=o||e.displayName||e.name||"Component";var s=function(o){var s=n.useContext(a);if(s)return s.guaranteedUser&&s.clerk.session?r.createElement(e,Object.assign({},o,{user:s.clerk.session.user})):s.clerk.client&&s.clerk.session?r.createElement(a.Provider,{value:t({},s,{guaranteedLoaded:!0,guaranteedUser:!0})},r.createElement(e,Object.assign({},o,{user:s.clerk.session.user}))):null;if(i())throw new Error(u);return null};return s.displayName="withUser("+o+")",s},k=function(e){function n(){var n;return(n=e.apply(this,arguments)||this).portalRef=r.createRef(),n}o(n,e);var t=n.prototype;return t.componentDidMount=function(){this.portalRef.current&&this.props.mount(this.portalRef.current,this.props.props)},t.componentWillUnmount=function(){this.portalRef.current&&this.props.unmount(this.portalRef.current)},t.render=function(){return r.createElement("div",{ref:this.portalRef})},n}(r.PureComponent),h=p((function(e){var n=e.clerk,t=s(e,["clerk"]);return r.createElement(k,{mount:n.mountSignIn,unmount:n.unmountSignIn,props:t})}),"SignIn"),m=p((function(e){var n=e.clerk,t=s(e,["clerk"]);return r.createElement(k,{mount:n.mountSignUp,unmount:n.unmountSignUp,props:t})}),"SignUp"),g=p((function(e){var n=e.clerk,t=s(e,["clerk"]);return r.createElement(k,{mount:n.mountUserProfile,unmount:n.unmountUserProfile,props:t})}),"UserProfile"),v=p((function(e){var n=e.clerk,t=s(e,["clerk"]);return r.createElement(k,{mount:n.mountUserButton,unmount:n.unmountUserButton,props:t})}),"UserButton"),S=f((function(e){return r.createElement(r.Fragment,null,e.children)}),"SignedIn"),w=p((function(e){return null===e.clerk.session?r.createElement(r.Fragment,null,e.children):null}),"SignedOut"),U=p((function(e){return r.createElement(r.Fragment,null,e.children)}),"ClerkLoaded");exports.ClerkContext=a,exports.ClerkLoaded=U,exports.ClerkProvider=d,exports.SignIn=h,exports.SignUp=m,exports.SignedIn=S,exports.SignedOut=w,exports.UserButton=v,exports.UserProfile=g,exports.WithClerk=function(e){var n=e.children;return r.createElement(a.Consumer,null,(function(e){if("function"==typeof n){if(e)return e.clerk&&void 0===e.clerk.session?null:e.guaranteedLoaded?n(e.clerk):e.clerk.client?r.createElement(a.Provider,{value:t({},e,{guaranteedLoaded:!0})},n(e.clerk)):null;throw new Error(u)}throw new Error("Clerk: Child of WithClerk must be a function.")}))},exports.WithUser=function(e){var n=e.children;return r.createElement(a.Consumer,null,(function(e){if("function"==typeof n){if(e)return e.guaranteedUser&&e.clerk.session?n(e.clerk.session.user):e.clerk.client&&e.clerk.session?r.createElement(a.Provider,{value:t({},e,{guaranteedLoaded:!0,guaranteedUser:!0})},n(e.clerk.session.user)):null;throw new Error(u)}throw new Error("Clerk: Child of WithClerk must be a function.")}))},exports.loadSessionFromToken=function(e){if(null===c)throw new Error("Missing Clerk");c.loadFromServer&&c.loadFromServer(e)},exports.useClerk=function(){var e=n.useContext(a);if(e){if(e.guaranteedLoaded)return e.clerk;throw new Error("Clerk: You're calling useClerk() before there's a guarantee the client has been loaded. Call useClerk() from a child of <SignedIn>, <SignedOut>, or <ClerkLoaded>, or use the withClerk() HOC.")}throw new Error(u)},exports.useUser=function(){var e=n.useContext(a);if(e){if(e.guaranteedUser&&e.clerk.session)return e.clerk.session.user;throw new Error("Clerk: You're calling useUser() before there's a guarantee there's an active user. Call useUser() from a child of <SignedIn> or use the withUser() HOC.")}throw new Error(u)},exports.withClerk=p,exports.withUser=f;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,n=require("react"),r=(e=n)&&"object"==typeof e&&"default"in e?e.default:e;function t(){return(t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}).apply(this,arguments)}function o(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n}function s(e,n){if(null==e)return{};var r,t,o={},s=Object.keys(e);for(t=0;t<s.length;t++)n.indexOf(r=s[t])>=0||(o[r]=e[r]);return o}function i(){return"undefined"!=typeof window}var l=function(){function e(e,n,r){var t=this,o=this;if(void 0===n&&(n={}),this.listeners=[],this.clerkjs=null,this._loaded=!1,this.ssrData=null,this.setClerkJS=function(e){try{return e?(o.clerkjs=e,o.listeners.forEach((function(n){e.addListener(n)})),null!==o.preopenSignIn&&e.openSignIn(o.preopenSignIn),null!==o.preopenSignUp&&e.openSignUp(o.preopenSignUp),o.premountSignInNodes.forEach((function(n,r){e.mountSignIn(r,n)})),o.premountSignUpNodes.forEach((function(n,r){e.mountSignUp(r,n)})),o.premountUserProfileNodes.forEach((function(n,r){e.mountUserProfile(r,n)})),o.premountUserButtonNodes.forEach((function(n,r){e.mountUserButton(r,n)})),o._loaded=!0,Promise.resolve()):Promise.resolve()}catch(e){return Promise.reject(e)}},this.setSession=function(e,n){return t.clerkjs?t.clerkjs.setSession(e,n):Promise.reject()},this.preopenSignIn=null,this.preopenSignUp=null,this.premountSignInNodes=new Map,this.premountSignUpNodes=new Map,this.premountUserProfileNodes=new Map,this.premountUserButtonNodes=new Map,this.openSignIn=function(e){t.clerkjs&&t._loaded?t.clerkjs.openSignIn(e):t.preopenSignIn=e},this.closeSignIn=function(){t.clerkjs&&t._loaded?t.clerkjs.closeSignIn():t.preopenSignIn=null},this.openSignUp=function(e){t.clerkjs&&t._loaded?t.clerkjs.openSignUp(e):t.preopenSignUp=e},this.closeSignUp=function(){t.clerkjs&&t._loaded?t.clerkjs.closeSignUp():t.preopenSignUp=null},this.mountSignIn=function(e,n){t.clerkjs&&t._loaded?t.clerkjs.mountSignIn(e,n):t.premountSignInNodes.set(e,n)},this.unmountSignIn=function(e){t.clerkjs&&t._loaded?t.clerkjs.unmountSignIn(e):t.premountSignInNodes.delete(e)},this.mountSignUp=function(e,n){t.clerkjs&&t._loaded?t.clerkjs.mountSignUp(e,n):t.premountSignUpNodes.set(e,n)},this.unmountSignUp=function(e){t.clerkjs&&t._loaded?t.clerkjs.unmountSignUp(e):t.premountSignUpNodes.delete(e)},this.mountUserProfile=function(e,n){t.clerkjs&&t._loaded?t.clerkjs.mountUserProfile(e,n):t.premountUserProfileNodes.set(e,n)},this.unmountUserProfile=function(e){t.clerkjs&&t._loaded?t.clerkjs.unmountUserProfile(e):t.premountUserProfileNodes.delete(e)},this.mountUserButton=function(e,n){t.clerkjs&&t._loaded?t.clerkjs.mountUserButton(e,n):t.premountUserButtonNodes.set(e,n)},this.unmountUserButton=function(e){t.clerkjs&&t._loaded?t.clerkjs.unmountUserButton(e):t.premountUserButtonNodes.delete(e)},this.addListener=function(e){t.clerkjs?t.clerkjs.addListener(e):t.listeners.push(e)},this.loadFromServer=function(e){if("browser"===t.mode)throw new Error("loadFromServer cannot be called in a browser context.");t.ssrData=JSON.stringify({client:t.client,session:t.session,token:e})},this.frontendApi=e,this.options=n,i()){this.mode="browser";var s=document.querySelector('script[data-clerk="SSR"]');if(s){this.ssrData=s.innerHTML;var l=JSON.parse(this.ssrData);this.ssrClient=l.client,this.ssrSession=l.session}r?(window.Clerk=new r(this.frontendApi),window.Clerk.load(this.options).then((function(){t.setClerkJS(window.Clerk)})).catch((function(e){throw new Error(e)}))):function(e,n){return new Promise((function(r,t){window.Clerk&&r(null),e||t("Clerk: Missing privider");var o=document.createElement("script"),s=function(e){return e||"https://cdn.jsdelivr.net/npm/@clerk/clerk-js@"+parseInt("1.1.0".split(".")[0],10)+"/dist/clerk.browser.js"}(n);o.setAttribute("data-clerk-frontend-api",e),o.setAttribute("crossorigin","anonymous"),o.async=!0,document.body||t("Clerk: Missing <body> element."),o.addEventListener("load",(function(){return r(o)})),o.addEventListener("error",(function(){return t("Clerk: Failed to load Clerk")})),o.src=s,document.body.appendChild(o)}))}(this.frontendApi,this.options.scriptUrl).then((function(){return window.Clerk?window.Clerk.load(t.options):null})).then((function(){t.setClerkJS(window.Clerk)})).catch((function(e){throw new Error(e)}))}else this.mode="server"}var n;return(n=[{key:"client",get:function(){return this.clerkjs?this.clerkjs.client:void 0}},{key:"session",get:function(){return this.clerkjs?this.clerkjs.session:void 0}},{key:"user",get:function(){return this.clerkjs?this.clerkjs.user:void 0}},{key:"environment",get:function(){return this.clerkjs?this.clerkjs.environment:void 0}}])&&function(e,n){for(var r=0;r<n.length;r++){var t=n[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}(e.prototype,n),e}(),u="Clerk: You must wrap your application in a <ClerkProvider> component.",c=null,a=r.createContext(void 0);a.displayName="ClerkContext";var d=function(e){function n(n){var r;(r=e.call(this,n)||this).listener=function(e){r.setState({client:e.client,session:e.session,user:e.user})};var t=n.frontendApi,o=n.Clerk,u=s(n,["frontendApi","Clerk"]);if(t)c||(c=new l(t,u,o)),r.clerk=c;else{if(i())throw new Error("Clerk: You must add the frontendApi prop to your <ClerkProvider>");r.clerk=null}return r.state=r.clerk?{client:r.clerk.client,session:r.clerk.session,user:r.clerk.user}:{client:void 0,session:void 0,user:void 0},r}o(n,e);var t=n.prototype;return t.componentDidMount=function(){this.clerk&&this.clerk.addListener(this.listener)},t.defaultInitialUser=function(e){var n=e.sessions.find((function(e){return"active"===e.status}));return n?n.user:null},t.render=function(){var e=this.state.session;return this.clerk?r.createElement(a.Provider,{value:{guaranteedLoaded:!1,guaranteedUser:!1,clerk:this.clerk}},this.clerk instanceof l&&this.clerk.ssrData&&r.createElement("script",{type:"application/json","data-clerk":"SSR",dangerouslySetInnerHTML:{__html:this.clerk.ssrData}}),r.createElement(r.Fragment,{key:e?e.id:"no-usrses"},this.props.children)):r.createElement(r.Fragment,{key:"loading"},this.props.children)},n}(r.PureComponent),p=function(e,o){e.displayName=o=o||e.displayName||e.name||"Component";var s=function(o){var s=n.useContext(a);if(s)return s.clerk&&void 0===s.clerk.session?null:s.guaranteedLoaded?r.createElement(e,Object.assign({},o,{clerk:s.clerk})):s.clerk.client?r.createElement(a.Provider,{value:t({},s,{guaranteedLoaded:!0})},r.createElement(e,Object.assign({},o,{clerk:s.clerk}))):null;if(i())throw new Error(u);return null};return s.displayName="withClerk("+o+")",s},f=function(e,o){e.displayName=o=o||e.displayName||e.name||"Component";var s=function(o){var s=n.useContext(a);if(s)return s.guaranteedUser&&s.clerk.session?r.createElement(e,Object.assign({},o,{user:s.clerk.session.user})):s.clerk.client&&s.clerk.session?r.createElement(a.Provider,{value:t({},s,{guaranteedLoaded:!0,guaranteedUser:!0})},r.createElement(e,Object.assign({},o,{user:s.clerk.session.user}))):null;if(i())throw new Error(u);return null};return s.displayName="withUser("+o+")",s},k=function(e){function n(){var n;return(n=e.apply(this,arguments)||this).portalRef=r.createRef(),n}o(n,e);var t=n.prototype;return t.componentDidMount=function(){this.portalRef.current&&this.props.mount(this.portalRef.current,this.props.props)},t.componentWillUnmount=function(){this.portalRef.current&&this.props.unmount(this.portalRef.current)},t.render=function(){return r.createElement("div",{ref:this.portalRef})},n}(r.PureComponent),h=p((function(e){var n=e.clerk,t=s(e,["clerk"]);return r.createElement(k,{mount:n.mountSignIn,unmount:n.unmountSignIn,props:t})}),"SignIn"),m=p((function(e){var n=e.clerk,t=s(e,["clerk"]);return r.createElement(k,{mount:n.mountSignUp,unmount:n.unmountSignUp,props:t})}),"SignUp"),g=p((function(e){var n=e.clerk,t=s(e,["clerk"]);return r.createElement(k,{mount:n.mountUserProfile,unmount:n.unmountUserProfile,props:t})}),"UserProfile"),v=p((function(e){var n=e.clerk,t=s(e,["clerk"]);return r.createElement(k,{mount:n.mountUserButton,unmount:n.unmountUserButton,props:t})}),"UserButton"),S=f((function(e){return r.createElement(r.Fragment,null,e.children)}),"SignedIn"),w=p((function(e){return null===e.clerk.session?r.createElement(r.Fragment,null,e.children):null}),"SignedOut"),U=p((function(e){return r.createElement(r.Fragment,null,e.children)}),"ClerkLoaded");exports.ClerkContext=a,exports.ClerkLoaded=U,exports.ClerkProvider=d,exports.SignIn=h,exports.SignUp=m,exports.SignedIn=S,exports.SignedOut=w,exports.UserButton=v,exports.UserProfile=g,exports.WithClerk=function(e){var n=e.children;return r.createElement(a.Consumer,null,(function(e){if("function"==typeof n){if(e)return e.clerk&&void 0===e.clerk.session?null:e.guaranteedLoaded?n(e.clerk):e.clerk.client?r.createElement(a.Provider,{value:t({},e,{guaranteedLoaded:!0})},n(e.clerk)):null;throw new Error(u)}throw new Error("Clerk: Child of WithClerk must be a function.")}))},exports.WithUser=function(e){var n=e.children;return r.createElement(a.Consumer,null,(function(e){if("function"==typeof n){if(e)return e.guaranteedUser&&e.clerk.session?n(e.clerk.session.user):e.clerk.client&&e.clerk.session?r.createElement(a.Provider,{value:t({},e,{guaranteedLoaded:!0,guaranteedUser:!0})},n(e.clerk.session.user)):null;throw new Error(u)}throw new Error("Clerk: Child of WithClerk must be a function.")}))},exports.loadSessionFromToken=function(e){if(null===c)throw new Error("Missing Clerk");c.loadFromServer&&c.loadFromServer(e)},exports.useClerk=function(){var e=n.useContext(a);if(e){if(e.guaranteedLoaded)return e.clerk;throw new Error("Clerk: You're calling useClerk() before there's a guarantee the client has been loaded. Call useClerk() from a child of <SignedIn>, <SignedOut>, or <ClerkLoaded>, or use the withClerk() HOC.")}throw new Error(u)},exports.useUser=function(){var e=n.useContext(a);if(e){if(e.guaranteedUser&&e.clerk.session)return e.clerk.session.user;throw new Error("Clerk: You're calling useUser() before there's a guarantee there's an active user. Call useUser() from a child of <SignedIn> or use the withUser() HOC.")}throw new Error(u)},exports.withClerk=p,exports.withUser=f;
//# sourceMappingURL=clerk-react.cjs.production.min.js.map

@@ -62,3 +62,3 @@ import React, { useContext } from 'react';

var version = "1.0.1-staging.3";
var version = "1.1.0";

@@ -65,0 +65,0 @@ var FAILED_TO_LOAD_ERROR = "Clerk: Failed to load Clerk";

{
"name": "@clerk/clerk-react",
"version": "1.0.1-staging.3",
"version": "1.1.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Clerk.dev React library",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc