@proveanything/smartlinks-auth-ui 0.1.24 → 0.1.27
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/components/AuthContainer.d.ts.map +1 -1
- package/dist/components/ClaimUI.d.ts.map +1 -1
- package/dist/context/AuthContext.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.css.map +1 -1
- package/dist/index.esm.js +15 -13
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +15 -13
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -70,9 +70,10 @@ const AuthContainer = ({ children, theme = 'light', className = '', config, mini
|
|
|
70
70
|
const logoUrl = config?.branding?.logoUrl === undefined
|
|
71
71
|
? 'https://smartlinks.app/smartlinks/landscape-medium.png' // Default Smartlinks logo
|
|
72
72
|
: config?.branding?.logoUrl || null; // Custom or explicitly hidden
|
|
73
|
+
const inheritHostStyles = config?.branding?.inheritHostStyles ? 'auth-inherit-host' : '';
|
|
73
74
|
const containerClass = minimal
|
|
74
|
-
? `auth-minimal auth-theme-${theme} ${className}`
|
|
75
|
-
: `auth-container auth-theme-${theme} ${className}`;
|
|
75
|
+
? `auth-minimal auth-theme-${theme} ${inheritHostStyles} ${className}`
|
|
76
|
+
: `auth-container auth-theme-${theme} ${inheritHostStyles} ${className}`;
|
|
76
77
|
const cardClass = minimal ? 'auth-minimal-card' : 'auth-card';
|
|
77
78
|
return (jsxRuntime.jsx("div", { className: containerClass, children: jsxRuntime.jsxs("div", { className: cardClass, style: !minimal && config?.branding?.buttonStyle === 'square' ? { borderRadius: '4px' } : undefined, children: [(logoUrl || title || subtitle) && (jsxRuntime.jsxs("div", { className: "auth-header", children: [logoUrl && (jsxRuntime.jsx("div", { className: "auth-logo", children: jsxRuntime.jsx("img", { src: logoUrl, alt: "Logo", style: { maxWidth: '200px', height: 'auto', objectFit: 'contain' } }) })), title && jsxRuntime.jsx("h1", { className: "auth-title", children: title }), subtitle && jsxRuntime.jsx("p", { className: "auth-subtitle", children: subtitle })] })), jsxRuntime.jsx("div", { className: "auth-content", children: children }), (config?.branding?.termsUrl || config?.branding?.privacyUrl) && (jsxRuntime.jsxs("div", { className: "auth-footer", children: [config.branding.termsUrl && jsxRuntime.jsx("a", { href: config.branding.termsUrl, target: "_blank", rel: "noopener noreferrer", children: "Terms" }), config.branding.termsUrl && config.branding.privacyUrl && jsxRuntime.jsx("span", { children: "\u2022" }), config.branding.privacyUrl && jsxRuntime.jsx("a", { href: config.branding.privacyUrl, target: "_blank", rel: "noopener noreferrer", children: "Privacy" })] }))] }) }));
|
|
78
79
|
};
|
|
@@ -11501,10 +11502,13 @@ collectionId, enableContactSync, enableInteractionTracking, interactionAppId, in
|
|
|
11501
11502
|
if (storedContactId) {
|
|
11502
11503
|
setContactId(storedContactId);
|
|
11503
11504
|
}
|
|
11505
|
+
// Set loading to false IMMEDIATELY after optimistic restore
|
|
11506
|
+
// Don't wait for background verification
|
|
11507
|
+
setIsLoading(false);
|
|
11504
11508
|
console.log('[AuthContext] Session restored optimistically (pending verification)');
|
|
11505
11509
|
notifyAuthStateChange('SESSION_RESTORED_OFFLINE', storedUser, storedToken.token, storedAccountData || null, null, false, null, storedContactId);
|
|
11506
11510
|
}
|
|
11507
|
-
// BACKGROUND: Verify token
|
|
11511
|
+
// BACKGROUND: Verify token (non-blocking)
|
|
11508
11512
|
try {
|
|
11509
11513
|
console.log('[AuthContext] Verifying stored token in background...');
|
|
11510
11514
|
await smartlinks__namespace.auth.verifyToken(storedToken.token);
|
|
@@ -13094,16 +13098,14 @@ const AccountManagement = ({ apiEndpoint, clientId, onError, className = '', cus
|
|
|
13094
13098
|
}, className: "auth-button button-secondary", children: "Cancel" })] })] }))] }))] }));
|
|
13095
13099
|
};
|
|
13096
13100
|
|
|
13097
|
-
const SmartlinksClaimUI = (
|
|
13098
|
-
//
|
|
13099
|
-
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
proofId,
|
|
13106
|
-
});
|
|
13101
|
+
const SmartlinksClaimUI = (props) => {
|
|
13102
|
+
// Destructure AFTER logging raw props to debug proxyMode issue
|
|
13103
|
+
const { apiEndpoint, clientId, clientName, collectionId, productId, proofId, onClaimSuccess, onClaimError, additionalFields = [], theme = 'light', className = '', minimal = false, proxyMode = false, customization = {}, } = props;
|
|
13104
|
+
// Debug logging for proxyMode - log RAW props first
|
|
13105
|
+
console.log('[SmartlinksClaimUI] 🔍 RAW props received:', props);
|
|
13106
|
+
console.log('[SmartlinksClaimUI] 🔍 props.proxyMode value:', props.proxyMode);
|
|
13107
|
+
console.log('[SmartlinksClaimUI] 🔍 typeof props.proxyMode:', typeof props.proxyMode);
|
|
13108
|
+
console.log('[SmartlinksClaimUI] 🎯 Destructured proxyMode:', proxyMode);
|
|
13107
13109
|
const auth = useAuth();
|
|
13108
13110
|
const [claimStep, setClaimStep] = React.useState(auth.isAuthenticated ? 'questions' : 'auth');
|
|
13109
13111
|
const [claimData, setClaimData] = React.useState({});
|