@rovela-ai/sdk 0.1.18 → 0.1.20
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/admin/api/auth.js +5 -11
- package/dist/admin/api/auth.js.map +1 -1
- package/dist/admin/api/categories.js +43 -50
- package/dist/admin/api/categories.js.map +1 -1
- package/dist/admin/api/check.js +6 -9
- package/dist/admin/api/check.js.map +1 -1
- package/dist/admin/api/customers.js +17 -21
- package/dist/admin/api/customers.js.map +1 -1
- package/dist/admin/api/index.js +10 -38
- package/dist/admin/api/index.js.map +1 -1
- package/dist/admin/api/orders.js +30 -35
- package/dist/admin/api/orders.js.map +1 -1
- package/dist/admin/api/products.js +56 -66
- package/dist/admin/api/products.js.map +1 -1
- package/dist/admin/api/refund.js +26 -29
- package/dist/admin/api/refund.js.map +1 -1
- package/dist/admin/api/settings.js +17 -21
- package/dist/admin/api/settings.js.map +1 -1
- package/dist/admin/api/setup.js +17 -20
- package/dist/admin/api/setup.js.map +1 -1
- package/dist/admin/api/stats.js +14 -17
- package/dist/admin/api/stats.js.map +1 -1
- package/dist/admin/components/AdminGuard.js +13 -17
- package/dist/admin/components/AdminGuard.js.map +1 -1
- package/dist/admin/components/AdminHeader.js +8 -11
- package/dist/admin/components/AdminHeader.js.map +1 -1
- package/dist/admin/components/AdminLayout.js +5 -8
- package/dist/admin/components/AdminLayout.js.map +1 -1
- package/dist/admin/components/AdminLoginForm.js +11 -14
- package/dist/admin/components/AdminLoginForm.js.map +1 -1
- package/dist/admin/components/AdminNav.d.ts.map +1 -1
- package/dist/admin/components/AdminNav.js +16 -14
- package/dist/admin/components/AdminNav.js.map +1 -1
- package/dist/admin/components/AdminSetupForm.js +11 -14
- package/dist/admin/components/AdminSetupForm.js.map +1 -1
- package/dist/admin/components/CategoryForm.d.ts +30 -0
- package/dist/admin/components/CategoryForm.d.ts.map +1 -0
- package/dist/admin/components/CategoryForm.js +153 -0
- package/dist/admin/components/CategoryForm.js.map +1 -0
- package/dist/admin/components/CategorySelect.d.ts +32 -0
- package/dist/admin/components/CategorySelect.d.ts.map +1 -0
- package/dist/admin/components/CategorySelect.js +148 -0
- package/dist/admin/components/CategorySelect.js.map +1 -0
- package/dist/admin/components/InventoryEditor.js +16 -19
- package/dist/admin/components/InventoryEditor.js.map +1 -1
- package/dist/admin/components/LowStockAlert.js +6 -9
- package/dist/admin/components/LowStockAlert.js.map +1 -1
- package/dist/admin/components/OrderDetails.js +15 -18
- package/dist/admin/components/OrderDetails.js.map +1 -1
- package/dist/admin/components/OrderTable.js +13 -16
- package/dist/admin/components/OrderTable.js.map +1 -1
- package/dist/admin/components/ProductForm.d.ts +2 -2
- package/dist/admin/components/ProductForm.d.ts.map +1 -1
- package/dist/admin/components/ProductForm.js +140 -27
- package/dist/admin/components/ProductForm.js.map +1 -1
- package/dist/admin/components/ProductTable.js +15 -18
- package/dist/admin/components/ProductTable.js.map +1 -1
- package/dist/admin/components/RecentOrders.js +6 -9
- package/dist/admin/components/RecentOrders.js.map +1 -1
- package/dist/admin/components/RefundDialog.js +12 -15
- package/dist/admin/components/RefundDialog.js.map +1 -1
- package/dist/admin/components/SEOPreview.d.ts +32 -0
- package/dist/admin/components/SEOPreview.d.ts.map +1 -0
- package/dist/admin/components/SEOPreview.js +30 -0
- package/dist/admin/components/SEOPreview.js.map +1 -0
- package/dist/admin/components/StatsCards.js +7 -10
- package/dist/admin/components/StatsCards.js.map +1 -1
- package/dist/admin/components/StoreSettings.js +10 -13
- package/dist/admin/components/StoreSettings.js.map +1 -1
- package/dist/admin/components/TagInput.d.ts +29 -0
- package/dist/admin/components/TagInput.d.ts.map +1 -0
- package/dist/admin/components/TagInput.js +73 -0
- package/dist/admin/components/TagInput.js.map +1 -0
- package/dist/admin/components/VariantManager.d.ts +42 -0
- package/dist/admin/components/VariantManager.d.ts.map +1 -0
- package/dist/admin/components/VariantManager.js +175 -0
- package/dist/admin/components/VariantManager.js.map +1 -0
- package/dist/admin/components/index.d.ts +5 -0
- package/dist/admin/components/index.d.ts.map +1 -1
- package/dist/admin/components/index.js +27 -35
- package/dist/admin/components/index.js.map +1 -1
- package/dist/admin/config.js +12 -54
- package/dist/admin/config.js.map +1 -1
- package/dist/admin/hooks/index.d.ts +2 -0
- package/dist/admin/hooks/index.d.ts.map +1 -1
- package/dist/admin/hooks/index.js +5 -11
- package/dist/admin/hooks/index.js.map +1 -1
- package/dist/admin/hooks/useAdminAuth.js +9 -12
- package/dist/admin/hooks/useAdminAuth.js.map +1 -1
- package/dist/admin/hooks/useAdminCategories.d.ts +36 -0
- package/dist/admin/hooks/useAdminCategories.d.ts.map +1 -0
- package/dist/admin/hooks/useAdminCategories.js +217 -0
- package/dist/admin/hooks/useAdminCategories.js.map +1 -0
- package/dist/admin/hooks/useAdminOrders.js +11 -14
- package/dist/admin/hooks/useAdminOrders.js.map +1 -1
- package/dist/admin/hooks/useAdminProducts.js +13 -16
- package/dist/admin/hooks/useAdminProducts.js.map +1 -1
- package/dist/admin/hooks/useAdminStats.js +11 -14
- package/dist/admin/hooks/useAdminStats.js.map +1 -1
- package/dist/admin/index.d.ts +3 -2
- package/dist/admin/index.d.ts.map +1 -1
- package/dist/admin/index.js +17 -66
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/server/admin-service.js +39 -83
- package/dist/admin/server/admin-service.js.map +1 -1
- package/dist/admin/server/index.js +3 -13
- package/dist/admin/server/index.js.map +1 -1
- package/dist/admin/types.js +1 -2
- package/dist/admin/types.js.map +1 -1
- package/dist/auth/api/auth.js +6 -14
- package/dist/auth/api/auth.js.map +1 -1
- package/dist/auth/api/forgot-password.js +8 -11
- package/dist/auth/api/forgot-password.js.map +1 -1
- package/dist/auth/api/index.js +6 -18
- package/dist/auth/api/index.js.map +1 -1
- package/dist/auth/api/register.js +17 -20
- package/dist/auth/api/register.js.map +1 -1
- package/dist/auth/api/resend-verification.js +9 -12
- package/dist/auth/api/resend-verification.js.map +1 -1
- package/dist/auth/api/reset-password.js +18 -22
- package/dist/auth/api/reset-password.js.map +1 -1
- package/dist/auth/api/verify-email.js +14 -18
- package/dist/auth/api/verify-email.js.map +1 -1
- package/dist/auth/components/AuthGuard.js +13 -17
- package/dist/auth/components/AuthGuard.js.map +1 -1
- package/dist/auth/components/ForgotPasswordForm.js +11 -14
- package/dist/auth/components/ForgotPasswordForm.js.map +1 -1
- package/dist/auth/components/ResetPasswordForm.js +18 -21
- package/dist/auth/components/ResetPasswordForm.js.map +1 -1
- package/dist/auth/components/SignInForm.js +13 -16
- package/dist/auth/components/SignInForm.js.map +1 -1
- package/dist/auth/components/SignUpForm.js +15 -18
- package/dist/auth/components/SignUpForm.js.map +1 -1
- package/dist/auth/components/UserMenu.js +13 -16
- package/dist/auth/components/UserMenu.js.map +1 -1
- package/dist/auth/components/VerifyEmailNotice.js +10 -13
- package/dist/auth/components/VerifyEmailNotice.js.map +1 -1
- package/dist/auth/components/index.js +7 -18
- package/dist/auth/components/index.js.map +1 -1
- package/dist/auth/config.js +9 -49
- package/dist/auth/config.js.map +1 -1
- package/dist/auth/hooks/index.js +1 -5
- package/dist/auth/hooks/index.js.map +1 -1
- package/dist/auth/hooks/useAuth.js +14 -17
- package/dist/auth/hooks/useAuth.js.map +1 -1
- package/dist/auth/index.js +15 -37
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/server/customer-service.js +39 -83
- package/dist/auth/server/customer-service.js.map +1 -1
- package/dist/auth/server/email-sender.js +11 -17
- package/dist/auth/server/email-sender.js.map +1 -1
- package/dist/auth/server/index.js +5 -36
- package/dist/auth/server/index.js.map +1 -1
- package/dist/auth/server/password-reset-service.js +30 -70
- package/dist/auth/server/password-reset-service.js.map +1 -1
- package/dist/auth/server/password.js +9 -18
- package/dist/auth/server/password.js.map +1 -1
- package/dist/auth/server/verification-service.js +35 -76
- package/dist/auth/server/verification-service.js.map +1 -1
- package/dist/auth/types.js +1 -2
- package/dist/auth/types.js.map +1 -1
- package/dist/cart/CartProvider.js +13 -17
- package/dist/cart/CartProvider.js.map +1 -1
- package/dist/cart/components/AddToCartButton.js +16 -19
- package/dist/cart/components/AddToCartButton.js.map +1 -1
- package/dist/cart/components/CartDrawer.js +17 -23
- package/dist/cart/components/CartDrawer.js.map +1 -1
- package/dist/cart/components/CartIcon.js +9 -12
- package/dist/cart/components/CartIcon.js.map +1 -1
- package/dist/cart/components/CartItem.js +7 -13
- package/dist/cart/components/CartItem.js.map +1 -1
- package/dist/cart/components/CartSummary.js +12 -15
- package/dist/cart/components/CartSummary.js.map +1 -1
- package/dist/cart/components/QuantitySelector.js +9 -12
- package/dist/cart/components/QuantitySelector.js.map +1 -1
- package/dist/cart/components/index.js +6 -15
- package/dist/cart/components/index.js.map +1 -1
- package/dist/cart/index.js +3 -17
- package/dist/cart/index.js.map +1 -1
- package/dist/cart/store.js +8 -13
- package/dist/cart/store.js.map +1 -1
- package/dist/checkout/api/checkout.js +12 -15
- package/dist/checkout/api/checkout.js.map +1 -1
- package/dist/checkout/api/index.js +2 -7
- package/dist/checkout/api/index.js.map +1 -1
- package/dist/checkout/api/webhook.js +8 -11
- package/dist/checkout/api/webhook.js.map +1 -1
- package/dist/checkout/components/CheckoutButton.js +8 -11
- package/dist/checkout/components/CheckoutButton.js.map +1 -1
- package/dist/checkout/components/CheckoutSuccess.js +11 -14
- package/dist/checkout/components/CheckoutSuccess.js.map +1 -1
- package/dist/checkout/components/OrderSummary.js +8 -11
- package/dist/checkout/components/OrderSummary.js.map +1 -1
- package/dist/checkout/components/ShippingForm.js +14 -17
- package/dist/checkout/components/ShippingForm.js.map +1 -1
- package/dist/checkout/components/index.js +4 -11
- package/dist/checkout/components/index.js.map +1 -1
- package/dist/checkout/hooks/index.js +1 -6
- package/dist/checkout/hooks/index.js.map +1 -1
- package/dist/checkout/hooks/useCheckout.js +10 -19
- package/dist/checkout/hooks/useCheckout.js.map +1 -1
- package/dist/checkout/index.js +7 -28
- package/dist/checkout/index.js.map +1 -1
- package/dist/checkout/server/create-checkout-session.js +11 -16
- package/dist/checkout/server/create-checkout-session.js.map +1 -1
- package/dist/checkout/server/handle-webhook.js +21 -24
- package/dist/checkout/server/handle-webhook.js.map +1 -1
- package/dist/checkout/server/index.js +3 -13
- package/dist/checkout/server/index.js.map +1 -1
- package/dist/checkout/server/order-service.js +11 -16
- package/dist/checkout/server/order-service.js.map +1 -1
- package/dist/checkout/stripe/client.js +13 -29
- package/dist/checkout/stripe/client.js.map +1 -1
- package/dist/checkout/stripe/index.js +1 -15
- package/dist/checkout/stripe/index.js.map +1 -1
- package/dist/checkout/types.js +1 -2
- package/dist/checkout/types.js.map +1 -1
- package/dist/core/StoreSettingsProvider.d.ts +104 -0
- package/dist/core/StoreSettingsProvider.d.ts.map +1 -0
- package/dist/core/StoreSettingsProvider.js +195 -0
- package/dist/core/StoreSettingsProvider.js.map +1 -0
- package/dist/core/api/index.d.ts +7 -0
- package/dist/core/api/index.d.ts.map +1 -0
- package/dist/core/api/index.js +7 -0
- package/dist/core/api/index.js.map +1 -0
- package/dist/core/api/settings.d.ts +42 -0
- package/dist/core/api/settings.d.ts.map +1 -0
- package/dist/core/api/settings.js +74 -0
- package/dist/core/api/settings.js.map +1 -0
- package/dist/core/config.js +12 -57
- package/dist/core/config.js.map +1 -1
- package/dist/core/db/client.js +16 -62
- package/dist/core/db/client.js.map +1 -1
- package/dist/core/db/index.js +14 -93
- package/dist/core/db/index.js.map +1 -1
- package/dist/core/db/queries.d.ts +6 -6
- package/dist/core/db/queries.js +207 -284
- package/dist/core/db/queries.js.map +1 -1
- package/dist/core/db/schema.js +179 -182
- package/dist/core/db/schema.js.map +1 -1
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +14 -42
- package/dist/core/index.js.map +1 -1
- package/dist/core/server/index.js +16 -68
- package/dist/core/server/index.js.map +1 -1
- package/dist/core/types.js +1 -2
- package/dist/core/types.js.map +1 -1
- package/dist/core/utils.js +26 -51
- package/dist/core/utils.js.map +1 -1
- package/dist/emails/config.js +13 -21
- package/dist/emails/config.js.map +1 -1
- package/dist/emails/index.js +10 -72
- package/dist/emails/index.js.map +1 -1
- package/dist/emails/send/auth.js +26 -34
- package/dist/emails/send/auth.js.map +1 -1
- package/dist/emails/send/index.js +2 -21
- package/dist/emails/send/index.js.map +1 -1
- package/dist/emails/send/orders.js +38 -50
- package/dist/emails/send/orders.js.map +1 -1
- package/dist/emails/sender.js +7 -12
- package/dist/emails/sender.js.map +1 -1
- package/dist/emails/templates/base.js +37 -53
- package/dist/emails/templates/base.js.map +1 -1
- package/dist/emails/templates/email-verification.js +12 -16
- package/dist/emails/templates/email-verification.js.map +1 -1
- package/dist/emails/templates/index.js +9 -43
- package/dist/emails/templates/index.js.map +1 -1
- package/dist/emails/templates/order-cancelled.js +18 -22
- package/dist/emails/templates/order-cancelled.js.map +1 -1
- package/dist/emails/templates/order-confirmation.js +30 -34
- package/dist/emails/templates/order-confirmation.js.map +1 -1
- package/dist/emails/templates/order-delivered.js +20 -24
- package/dist/emails/templates/order-delivered.js.map +1 -1
- package/dist/emails/templates/order-shipped.js +19 -23
- package/dist/emails/templates/order-shipped.js.map +1 -1
- package/dist/emails/templates/password-reset.js +12 -16
- package/dist/emails/templates/password-reset.js.map +1 -1
- package/dist/emails/templates/refund-processed.js +17 -21
- package/dist/emails/templates/refund-processed.js.map +1 -1
- package/dist/emails/templates/welcome.js +11 -15
- package/dist/emails/templates/welcome.js.map +1 -1
- package/dist/emails/types.js +1 -2
- package/dist/emails/types.js.map +1 -1
- package/dist/emails/utils.js +9 -20
- package/dist/emails/utils.js.map +1 -1
- package/dist/index.js +24 -176
- package/dist/index.js.map +1 -1
- package/dist/products/api/categories.js +7 -10
- package/dist/products/api/categories.js.map +1 -1
- package/dist/products/api/index.js +3 -9
- package/dist/products/api/index.js.map +1 -1
- package/dist/products/api/product.js +10 -13
- package/dist/products/api/product.js.map +1 -1
- package/dist/products/api/products.js +8 -11
- package/dist/products/api/products.js.map +1 -1
- package/dist/products/components/CategoryNav.js +20 -26
- package/dist/products/components/CategoryNav.js.map +1 -1
- package/dist/products/components/ProductBreadcrumb.js +7 -13
- package/dist/products/components/ProductBreadcrumb.js.map +1 -1
- package/dist/products/components/ProductCard.js +6 -12
- package/dist/products/components/ProductCard.js.map +1 -1
- package/dist/products/components/ProductDetails.js +14 -17
- package/dist/products/components/ProductDetails.js.map +1 -1
- package/dist/products/components/ProductFilters.js +15 -18
- package/dist/products/components/ProductFilters.js.map +1 -1
- package/dist/products/components/ProductGallery.js +17 -23
- package/dist/products/components/ProductGallery.js.map +1 -1
- package/dist/products/components/ProductGrid.js +10 -13
- package/dist/products/components/ProductGrid.js.map +1 -1
- package/dist/products/components/ProductSearch.js +14 -17
- package/dist/products/components/ProductSearch.js.map +1 -1
- package/dist/products/components/ProductSort.js +8 -11
- package/dist/products/components/ProductSort.js.map +1 -1
- package/dist/products/components/VariantSelector.js +16 -19
- package/dist/products/components/VariantSelector.js.map +1 -1
- package/dist/products/components/index.js +10 -23
- package/dist/products/components/index.js.map +1 -1
- package/dist/products/hooks/index.js +4 -11
- package/dist/products/hooks/index.js.map +1 -1
- package/dist/products/hooks/useCategories.js +12 -15
- package/dist/products/hooks/useCategories.js.map +1 -1
- package/dist/products/hooks/useProduct.js +9 -12
- package/dist/products/hooks/useProduct.js.map +1 -1
- package/dist/products/hooks/useProductAttributes.js +10 -13
- package/dist/products/hooks/useProductAttributes.js.map +1 -1
- package/dist/products/hooks/useProducts.js +15 -18
- package/dist/products/hooks/useProducts.js.map +1 -1
- package/dist/products/index.js +6 -23
- package/dist/products/index.js.map +1 -1
- package/dist/theme/ThemeProvider.js +12 -14
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/colors.js +3 -8
- package/dist/theme/colors.js.map +1 -1
- package/dist/theme/defaults.js +27 -30
- package/dist/theme/defaults.js.map +1 -1
- package/dist/theme/fonts.js +12 -18
- package/dist/theme/fonts.js.map +1 -1
- package/dist/theme/generator.js +63 -69
- package/dist/theme/generator.js.map +1 -1
- package/dist/theme/hooks.js +11 -16
- package/dist/theme/hooks.js.map +1 -1
- package/dist/theme/index.js +6 -42
- package/dist/theme/index.js.map +1 -1
- package/package.json +35 -30
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
'use client';
|
|
3
|
-
|
|
4
|
-
exports.AuthGuard = AuthGuard;
|
|
5
|
-
exports.withAuth = withAuth;
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
3
|
/**
|
|
8
4
|
* @rovela/sdk/auth/components/AuthGuard
|
|
9
5
|
*
|
|
10
6
|
* Route protection component for authenticated routes.
|
|
11
7
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
import { useEffect } from 'react';
|
|
9
|
+
import { useAuth } from '../hooks/useAuth';
|
|
14
10
|
/**
|
|
15
11
|
* Guard component that protects routes requiring authentication.
|
|
16
12
|
*
|
|
@@ -37,10 +33,10 @@ const useAuth_1 = require("../hooks/useAuth");
|
|
|
37
33
|
* </AuthGuard>
|
|
38
34
|
* ```
|
|
39
35
|
*/
|
|
40
|
-
function AuthGuard({ children, fallback, redirectTo = '/auth/signin', requireVerified = false, loadingComponent, }) {
|
|
41
|
-
const { isAuthenticated, isLoading, isEmailVerified, customer } =
|
|
36
|
+
export function AuthGuard({ children, fallback, redirectTo = '/auth/signin', requireVerified = false, loadingComponent, }) {
|
|
37
|
+
const { isAuthenticated, isLoading, isEmailVerified, customer } = useAuth();
|
|
42
38
|
// Handle redirect when not authenticated
|
|
43
|
-
|
|
39
|
+
useEffect(() => {
|
|
44
40
|
if (isLoading)
|
|
45
41
|
return;
|
|
46
42
|
// Not authenticated - redirect to signin
|
|
@@ -59,14 +55,14 @@ function AuthGuard({ children, fallback, redirectTo = '/auth/signin', requireVer
|
|
|
59
55
|
// Loading state
|
|
60
56
|
if (isLoading) {
|
|
61
57
|
if (loadingComponent) {
|
|
62
|
-
return (
|
|
58
|
+
return _jsx(_Fragment, { children: loadingComponent });
|
|
63
59
|
}
|
|
64
|
-
return ((
|
|
60
|
+
return (_jsx("div", { className: "flex min-h-[200px] items-center justify-center", children: _jsxs("div", { className: "text-center", children: [_jsx("div", { className: "mx-auto h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" }), _jsx("p", { className: "mt-4 text-sm text-muted-foreground", children: "Loading..." })] }) }));
|
|
65
61
|
}
|
|
66
62
|
// Not authenticated
|
|
67
63
|
if (!isAuthenticated) {
|
|
68
64
|
if (fallback) {
|
|
69
|
-
return (
|
|
65
|
+
return _jsx(_Fragment, { children: fallback });
|
|
70
66
|
}
|
|
71
67
|
// Return null while redirecting
|
|
72
68
|
return null;
|
|
@@ -74,13 +70,13 @@ function AuthGuard({ children, fallback, redirectTo = '/auth/signin', requireVer
|
|
|
74
70
|
// Email verification required but not verified
|
|
75
71
|
if (requireVerified && !isEmailVerified) {
|
|
76
72
|
if (fallback) {
|
|
77
|
-
return (
|
|
73
|
+
return _jsx(_Fragment, { children: fallback });
|
|
78
74
|
}
|
|
79
75
|
// Return null while redirecting
|
|
80
76
|
return null;
|
|
81
77
|
}
|
|
82
78
|
// Authenticated (and verified if required) - render children
|
|
83
|
-
return (
|
|
79
|
+
return _jsx(_Fragment, { children: children });
|
|
84
80
|
}
|
|
85
81
|
/**
|
|
86
82
|
* HOC version of AuthGuard for wrapping page components.
|
|
@@ -101,9 +97,9 @@ function AuthGuard({ children, fallback, redirectTo = '/auth/signin', requireVer
|
|
|
101
97
|
* })
|
|
102
98
|
* ```
|
|
103
99
|
*/
|
|
104
|
-
function withAuth(Component, options = {}) {
|
|
100
|
+
export function withAuth(Component, options = {}) {
|
|
105
101
|
function WrappedComponent(props) {
|
|
106
|
-
return ((
|
|
102
|
+
return (_jsx(AuthGuard, { ...options, children: _jsx(Component, { ...props }) }));
|
|
107
103
|
}
|
|
108
104
|
// Copy display name for debugging
|
|
109
105
|
const displayName = Component.displayName || Component.name || 'Component';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthGuard.js","sourceRoot":"","sources":["../../../src/auth/components/AuthGuard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthGuard.js","sourceRoot":"","sources":["../../../src/auth/components/AuthGuard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAG1C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,SAAS,CAAC,EACxB,QAAQ,EACR,QAAQ,EACR,UAAU,GAAG,cAAc,EAC3B,eAAe,GAAG,KAAK,EACvB,gBAAgB,GACD;IACf,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAA;IAE3E,yCAAyC;IACzC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,SAAS;YAAE,OAAM;QAErB,yCAAyC;QACzC,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,iDAAiD;YACjD,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAA;YACrE,MAAM,WAAW,GAAG,GAAG,UAAU,gBAAgB,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAAA;YAClF,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,WAAW,CAAA;YAClC,OAAM;QACR,CAAC;QAED,+CAA+C;QAC/C,IAAI,eAAe,IAAI,CAAC,eAAe,IAAI,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC3D,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,4BAA4B,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAA;QACzF,CAAC;IACH,CAAC,EAAE,C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AA;IAEzD,OAAO,gBAAgB,CAAA;AACzB,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
'use client';
|
|
3
|
-
|
|
4
|
-
exports.ForgotPasswordForm = ForgotPasswordForm;
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
3
|
/**
|
|
7
4
|
* @rovela/sdk/auth/components/ForgotPasswordForm
|
|
8
5
|
*
|
|
9
6
|
* Forgot password form for requesting password reset.
|
|
10
7
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import { useState, useCallback } from 'react';
|
|
9
|
+
import { useAuth } from '../hooks/useAuth';
|
|
13
10
|
/**
|
|
14
11
|
* Forgot password form for requesting password reset email.
|
|
15
12
|
*
|
|
@@ -22,12 +19,12 @@ const useAuth_1 = require("../hooks/useAuth");
|
|
|
22
19
|
* <ForgotPasswordForm onSuccess={() => console.log('Email sent!')} />
|
|
23
20
|
* ```
|
|
24
21
|
*/
|
|
25
|
-
function ForgotPasswordForm({ onSuccess, signInHref = '/auth/signin', className = '', }) {
|
|
26
|
-
const { requestPasswordReset } =
|
|
27
|
-
const [email, setEmail] =
|
|
28
|
-
const [isLoading, setIsLoading] =
|
|
29
|
-
const [success, setSuccess] =
|
|
30
|
-
const handleSubmit =
|
|
22
|
+
export function ForgotPasswordForm({ onSuccess, signInHref = '/auth/signin', className = '', }) {
|
|
23
|
+
const { requestPasswordReset } = useAuth();
|
|
24
|
+
const [email, setEmail] = useState('');
|
|
25
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
26
|
+
const [success, setSuccess] = useState(false);
|
|
27
|
+
const handleSubmit = useCallback(async (e) => {
|
|
31
28
|
e.preventDefault();
|
|
32
29
|
setIsLoading(true);
|
|
33
30
|
await requestPasswordReset(email);
|
|
@@ -37,8 +34,8 @@ function ForgotPasswordForm({ onSuccess, signInHref = '/auth/signin', className
|
|
|
37
34
|
}, [email, requestPasswordReset, onSuccess]);
|
|
38
35
|
// Show success state
|
|
39
36
|
if (success) {
|
|
40
|
-
return ((
|
|
37
|
+
return (_jsx("div", { className: `w-full max-w-md ${className}`, children: _jsxs("div", { className: "rounded-md bg-green-50 p-6 text-center", children: [_jsx("svg", { className: "mx-auto h-12 w-12 text-green-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }) }), _jsx("h3", { className: "mt-4 text-lg font-medium text-green-800", children: "Check your email" }), _jsx("p", { className: "mt-2 text-sm text-green-600", children: "If an account exists with that email, we've sent you a link to reset your password." }), _jsx("a", { href: signInHref, className: "mt-4 inline-block text-sm font-medium text-green-700 hover:text-green-800", children: "Back to sign in" })] }) }));
|
|
41
38
|
}
|
|
42
|
-
return ((
|
|
39
|
+
return (_jsxs("div", { className: `w-full max-w-md ${className}`, children: [_jsxs("div", { className: "mb-6 text-center", children: [_jsx("h2", { className: "text-xl font-semibold text-foreground", children: "Forgot your password?" }), _jsx("p", { className: "mt-2 text-sm text-muted-foreground", children: "Enter your email address and we'll send you a link to reset your password." })] }), _jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { htmlFor: "forgot-email", className: "block text-sm font-medium text-foreground", children: "Email" }), _jsx("input", { id: "forgot-email", type: "email", value: email, onChange: (e) => setEmail(e.target.value), required: true, autoComplete: "email", className: "mt-1 block w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary", placeholder: "you@example.com" })] }), _jsx("button", { type: "submit", disabled: isLoading, className: "w-full rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", children: isLoading ? 'Sending...' : 'Send reset link' }), _jsxs("p", { className: "text-center text-sm text-muted-foreground", children: ["Remember your password?", ' ', _jsx("a", { href: signInHref, className: "font-medium text-primary hover:text-primary/80", children: "Sign in" })] })] })] }));
|
|
43
40
|
}
|
|
44
41
|
//# sourceMappingURL=ForgotPasswordForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForgotPasswordForm.js","sourceRoot":"","sources":["../../../src/auth/components/ForgotPasswordForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ForgotPasswordForm.js","sourceRoot":"","sources":["../../../src/auth/components/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAG1C;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,SAAS,EACT,UAAU,GAAG,cAAc,EAC3B,SAAS,GAAG,EAAE,GACU;IACxB,MAAM,EAAE,oBAAoB,EAAE,GAAG,OAAO,EAAE,CAAA;IAE1C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IACtC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IACjD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAE7C,MAAM,YAAY,GAAG,WAAW,CAAC,KAAK,EAAE,CAAkB,EAAE,EAAE;QAC5D,CAAC,CAAC,cAAc,EAAE,CAAA;QAClB,YAAY,CAAC,IAAI,CAAC,CAAA;QAElB,MAAM,oBAAoB,CAAC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AO,EACpB,SAAS,EAAC,4LAA4L,EACtM,WAAW,EAAC,iBAAiB,GAC7B,IACE,EAGN,iBACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,SAAS,EACnB,SAAS,EAAC,+NAA+N,YAExO,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,GACtC,EAGT,aAAG,SAAS,EAAC,2CAA2C,wCAC9B,GAAG,EAC3B,YAAG,IAAI,EAAE,UAAU,EAAE,SAAS,EAAC,gDAAgD,wBAE3E,IACF,IACC,IACH,CACP,CAAA;AACH,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
'use client';
|
|
3
|
-
|
|
4
|
-
exports.ResetPasswordForm = ResetPasswordForm;
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
3
|
/**
|
|
7
4
|
* @rovela/sdk/auth/components/ResetPasswordForm
|
|
8
5
|
*
|
|
9
6
|
* Reset password form for setting a new password.
|
|
10
7
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import { useState, useCallback, useEffect } from 'react';
|
|
9
|
+
import { useAuth } from '../hooks/useAuth';
|
|
13
10
|
/**
|
|
14
11
|
* Reset password form for setting a new password with a token.
|
|
15
12
|
*
|
|
@@ -25,17 +22,17 @@ const useAuth_1 = require("../hooks/useAuth");
|
|
|
25
22
|
* />
|
|
26
23
|
* ```
|
|
27
24
|
*/
|
|
28
|
-
function ResetPasswordForm({ token, onSuccess, signInHref = '/auth/signin', className = '', }) {
|
|
29
|
-
const { validateResetToken, resetPassword } =
|
|
30
|
-
const [password, setPassword] =
|
|
31
|
-
const [confirmPassword, setConfirmPassword] =
|
|
32
|
-
const [isLoading, setIsLoading] =
|
|
33
|
-
const [isValidating, setIsValidating] =
|
|
34
|
-
const [error, setError] =
|
|
35
|
-
const [tokenError, setTokenError] =
|
|
36
|
-
const [success, setSuccess] =
|
|
25
|
+
export function ResetPasswordForm({ token, onSuccess, signInHref = '/auth/signin', className = '', }) {
|
|
26
|
+
const { validateResetToken, resetPassword } = useAuth();
|
|
27
|
+
const [password, setPassword] = useState('');
|
|
28
|
+
const [confirmPassword, setConfirmPassword] = useState('');
|
|
29
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
30
|
+
const [isValidating, setIsValidating] = useState(true);
|
|
31
|
+
const [error, setError] = useState(null);
|
|
32
|
+
const [tokenError, setTokenError] = useState(null);
|
|
33
|
+
const [success, setSuccess] = useState(false);
|
|
37
34
|
// Validate token on mount
|
|
38
|
-
|
|
35
|
+
useEffect(() => {
|
|
39
36
|
async function validateToken() {
|
|
40
37
|
const result = await validateResetToken(token);
|
|
41
38
|
setIsValidating(false);
|
|
@@ -45,7 +42,7 @@ function ResetPasswordForm({ token, onSuccess, signInHref = '/auth/signin', clas
|
|
|
45
42
|
}
|
|
46
43
|
validateToken();
|
|
47
44
|
}, [token, validateResetToken]);
|
|
48
|
-
const handleSubmit =
|
|
45
|
+
const handleSubmit = useCallback(async (e) => {
|
|
49
46
|
e.preventDefault();
|
|
50
47
|
setIsLoading(true);
|
|
51
48
|
setError(null);
|
|
@@ -73,16 +70,16 @@ function ResetPasswordForm({ token, onSuccess, signInHref = '/auth/signin', clas
|
|
|
73
70
|
}, [password, confirmPassword, token, resetPassword, onSuccess]);
|
|
74
71
|
// Loading state while validating token
|
|
75
72
|
if (isValidating) {
|
|
76
|
-
return ((
|
|
73
|
+
return (_jsx("div", { className: `w-full max-w-md ${className}`, children: _jsxs("div", { className: "text-center", children: [_jsx("div", { className: "mx-auto h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" }), _jsx("p", { className: "mt-4 text-sm text-muted-foreground", children: "Validating reset link..." })] }) }));
|
|
77
74
|
}
|
|
78
75
|
// Token invalid error state
|
|
79
76
|
if (tokenError) {
|
|
80
|
-
return ((
|
|
77
|
+
return (_jsx("div", { className: `w-full max-w-md ${className}`, children: _jsxs("div", { className: "rounded-md bg-red-50 p-6 text-center", children: [_jsx("svg", { className: "mx-auto h-12 w-12 text-red-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }), _jsx("h3", { className: "mt-4 text-lg font-medium text-red-800", children: "Invalid Reset Link" }), _jsx("p", { className: "mt-2 text-sm text-red-600", children: tokenError }), _jsx("a", { href: "/auth/forgot-password", className: "mt-4 inline-block text-sm font-medium text-red-700 hover:text-red-800", children: "Request a new reset link" })] }) }));
|
|
81
78
|
}
|
|
82
79
|
// Show success state
|
|
83
80
|
if (success) {
|
|
84
|
-
return ((
|
|
81
|
+
return (_jsx("div", { className: `w-full max-w-md ${className}`, children: _jsxs("div", { className: "rounded-md bg-green-50 p-6 text-center", children: [_jsx("svg", { className: "mx-auto h-12 w-12 text-green-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" }) }), _jsx("h3", { className: "mt-4 text-lg font-medium text-green-800", children: "Password Reset Successfully" }), _jsx("p", { className: "mt-2 text-sm text-green-600", children: "Your password has been updated. You can now sign in with your new password." }), _jsx("a", { href: signInHref, className: "mt-4 inline-block rounded-md bg-green-600 px-4 py-2 text-sm font-medium text-white hover:bg-green-700", children: "Sign in" })] }) }));
|
|
85
82
|
}
|
|
86
|
-
return ((
|
|
83
|
+
return (_jsxs("div", { className: `w-full max-w-md ${className}`, children: [_jsxs("div", { className: "mb-6 text-center", children: [_jsx("h2", { className: "text-xl font-semibold text-foreground", children: "Reset your password" }), _jsx("p", { className: "mt-2 text-sm text-muted-foreground", children: "Enter your new password below." })] }), _jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [error && (_jsx("div", { className: "rounded-md bg-red-50 p-4 text-sm text-red-600", children: error })), _jsxs("div", { children: [_jsx("label", { htmlFor: "reset-password", className: "block text-sm font-medium text-foreground", children: "New Password" }), _jsx("input", { id: "reset-password", type: "password", value: password, onChange: (e) => setPassword(e.target.value), required: true, autoComplete: "new-password", minLength: 8, className: "mt-1 block w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary", placeholder: "At least 8 characters" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "reset-confirm-password", className: "block text-sm font-medium text-foreground", children: "Confirm New Password" }), _jsx("input", { id: "reset-confirm-password", type: "password", value: confirmPassword, onChange: (e) => setConfirmPassword(e.target.value), required: true, autoComplete: "new-password", minLength: 8, className: "mt-1 block w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary", placeholder: "Confirm your password" })] }), _jsx("button", { type: "submit", disabled: isLoading, className: "w-full rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", children: isLoading ? 'Resetting...' : 'Reset password' }), _jsx("p", { className: "text-center text-sm text-muted-foreground", children: _jsx("a", { href: signInHref, className: "font-medium text-primary hover:text-primary/80", children: "Back to sign in" }) })] })] }));
|
|
87
84
|
}
|
|
88
85
|
//# sourceMappingURL=ResetPasswordForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetPasswordForm.js","sourceRoot":"","sources":["../../../src/auth/components/ResetPasswordForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResetPasswordForm.js","sourceRoot":"","sources":["../../../src/auth/components/ResetPassw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1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
'use client';
|
|
3
|
-
|
|
4
|
-
exports.SignInForm = SignInForm;
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
3
|
/**
|
|
7
4
|
* @rovela/sdk/auth/components/SignInForm
|
|
8
5
|
*
|
|
9
6
|
* Sign in form component with email/password authentication.
|
|
10
7
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import { useState, useCallback } from 'react';
|
|
9
|
+
import { useAuth } from '../hooks/useAuth';
|
|
13
10
|
/**
|
|
14
11
|
* Sign in form for customer authentication.
|
|
15
12
|
*
|
|
@@ -28,15 +25,15 @@ const useAuth_1 = require("../hooks/useAuth");
|
|
|
28
25
|
* />
|
|
29
26
|
* ```
|
|
30
27
|
*/
|
|
31
|
-
function SignInForm({ redirectTo, onSuccess, showRememberMe = true, signUpHref = '/auth/signup', forgotPasswordHref = '/auth/forgot-password', className = '', }) {
|
|
32
|
-
const { signIn } =
|
|
33
|
-
const [email, setEmail] =
|
|
34
|
-
const [password, setPassword] =
|
|
35
|
-
const [rememberMe, setRememberMe] =
|
|
36
|
-
const [isLoading, setIsLoading] =
|
|
37
|
-
const [error, setError] =
|
|
38
|
-
const [requiresVerification, setRequiresVerification] =
|
|
39
|
-
const handleSubmit =
|
|
28
|
+
export function SignInForm({ redirectTo, onSuccess, showRememberMe = true, signUpHref = '/auth/signup', forgotPasswordHref = '/auth/forgot-password', className = '', }) {
|
|
29
|
+
const { signIn } = useAuth();
|
|
30
|
+
const [email, setEmail] = useState('');
|
|
31
|
+
const [password, setPassword] = useState('');
|
|
32
|
+
const [rememberMe, setRememberMe] = useState(false);
|
|
33
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
34
|
+
const [error, setError] = useState(null);
|
|
35
|
+
const [requiresVerification, setRequiresVerification] = useState(false);
|
|
36
|
+
const handleSubmit = useCallback(async (e) => {
|
|
40
37
|
e.preventDefault();
|
|
41
38
|
setIsLoading(true);
|
|
42
39
|
setError(null);
|
|
@@ -58,6 +55,6 @@ function SignInForm({ redirectTo, onSuccess, showRememberMe = true, signUpHref =
|
|
|
58
55
|
setError(result.error || 'Sign in failed');
|
|
59
56
|
}
|
|
60
57
|
}, [email, password, rememberMe, redirectTo, signIn, onSuccess]);
|
|
61
|
-
return ((
|
|
58
|
+
return (_jsx("div", { className: `w-full max-w-md ${className}`, children: _jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [error && (_jsxs("div", { className: "rounded-md bg-red-50 p-4 text-sm text-red-600", children: [error, requiresVerification && (_jsx("p", { className: "mt-2", children: _jsx("a", { href: `/auth/resend-verification?email=${encodeURIComponent(email)}`, className: "font-medium text-red-700 underline hover:text-red-800", children: "Resend verification email" }) }))] })), _jsxs("div", { children: [_jsx("label", { htmlFor: "signin-email", className: "block text-sm font-medium text-foreground", children: "Email" }), _jsx("input", { id: "signin-email", type: "email", value: email, onChange: (e) => setEmail(e.target.value), required: true, autoComplete: "email", className: "mt-1 block w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary", placeholder: "you@example.com" })] }), _jsxs("div", { children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("label", { htmlFor: "signin-password", className: "block text-sm font-medium text-foreground", children: "Password" }), _jsx("a", { href: forgotPasswordHref, className: "text-sm text-primary hover:text-primary/80", children: "Forgot password?" })] }), _jsx("input", { id: "signin-password", type: "password", value: password, onChange: (e) => setPassword(e.target.value), required: true, autoComplete: "current-password", className: "mt-1 block w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary", placeholder: "Enter your password" })] }), showRememberMe && (_jsxs("div", { className: "flex items-center", children: [_jsx("input", { id: "remember-me", type: "checkbox", checked: rememberMe, onChange: (e) => setRememberMe(e.target.checked), className: "h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary" }), _jsx("label", { htmlFor: "remember-me", className: "ml-2 block text-sm text-muted-foreground", children: "Remember me for 30 days" })] })), _jsx("button", { type: "submit", disabled: isLoading, className: "w-full rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", children: isLoading ? 'Signing in...' : 'Sign in' }), _jsxs("p", { className: "text-center text-sm text-muted-foreground", children: ["Don't have an account?", ' ', _jsx("a", { href: signUpHref, className: "font-medium text-primary hover:text-primary/80", children: "Sign up" })] })] }) }));
|
|
62
59
|
}
|
|
63
60
|
//# sourceMappingURL=SignInForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignInForm.js","sourceRoot":"","sources":["../../../src/auth/components/SignInForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignInForm.js","sourceRoot":"","sources":["../../../src/auth/components/SignInForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAG1C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,UAAU,EACV,SAAS,EACT,cAAc,GAAG,IAAI,EACrB,UAAU,GAAG,cAAc,EAC3B,kBAAkB,GAAG,uBAAuB,EAC5C,SAAS,GAAG,EAAE,GACE;IAChB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAAA;IAE5B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IACtC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAA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,GAC3E,EACF,gBACE,OAAO,EAAC,aAAa,EACrB,SAAS,EAAC,0CAA0C,wCAG9C,IACJ,CACP,EAGD,iBACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,SAAS,EACnB,SAAS,EAAC,+NAA+N,YAExO,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,GACjC,EAGT,aAAG,SAAS,EAAC,2CAA2C,uCAC1B,GAAG,EAC/B,YAAG,IAAI,EAAE,UAAU,EAAE,SAAS,EAAC,gDAAgD,wBAE3E,IACF,IACC,GACH,CACP,CAAA;AACH,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
'use client';
|
|
3
|
-
|
|
4
|
-
exports.SignUpForm = SignUpForm;
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
3
|
/**
|
|
7
4
|
* @rovela/sdk/auth/components/SignUpForm
|
|
8
5
|
*
|
|
9
6
|
* Sign up form component for customer registration.
|
|
10
7
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import { useState, useCallback } from 'react';
|
|
9
|
+
import { useAuth } from '../hooks/useAuth';
|
|
13
10
|
/**
|
|
14
11
|
* Sign up form for customer registration.
|
|
15
12
|
*
|
|
@@ -25,16 +22,16 @@ const useAuth_1 = require("../hooks/useAuth");
|
|
|
25
22
|
* <SignUpForm onSuccess={() => console.log('Account created!')} />
|
|
26
23
|
* ```
|
|
27
24
|
*/
|
|
28
|
-
function SignUpForm({ redirectTo, onSuccess, signInHref = '/auth/signin', className = '', }) {
|
|
29
|
-
const { signUp } =
|
|
30
|
-
const [name, setName] =
|
|
31
|
-
const [email, setEmail] =
|
|
32
|
-
const [password, setPassword] =
|
|
33
|
-
const [confirmPassword, setConfirmPassword] =
|
|
34
|
-
const [isLoading, setIsLoading] =
|
|
35
|
-
const [error, setError] =
|
|
36
|
-
const [success, setSuccess] =
|
|
37
|
-
const handleSubmit =
|
|
25
|
+
export function SignUpForm({ redirectTo, onSuccess, signInHref = '/auth/signin', className = '', }) {
|
|
26
|
+
const { signUp } = useAuth();
|
|
27
|
+
const [name, setName] = useState('');
|
|
28
|
+
const [email, setEmail] = useState('');
|
|
29
|
+
const [password, setPassword] = useState('');
|
|
30
|
+
const [confirmPassword, setConfirmPassword] = useState('');
|
|
31
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
32
|
+
const [error, setError] = useState(null);
|
|
33
|
+
const [success, setSuccess] = useState(false);
|
|
34
|
+
const handleSubmit = useCallback(async (e) => {
|
|
38
35
|
e.preventDefault();
|
|
39
36
|
setIsLoading(true);
|
|
40
37
|
setError(null);
|
|
@@ -72,8 +69,8 @@ function SignUpForm({ redirectTo, onSuccess, signInHref = '/auth/signin', classN
|
|
|
72
69
|
}, [name, email, password, confirmPassword, signUp, onSuccess, redirectTo]);
|
|
73
70
|
// Show success state
|
|
74
71
|
if (success) {
|
|
75
|
-
return ((
|
|
72
|
+
return (_jsx("div", { className: `w-full max-w-md ${className}`, children: _jsxs("div", { className: "rounded-md bg-green-50 p-6 text-center", children: [_jsx("svg", { className: "mx-auto h-12 w-12 text-green-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" }) }), _jsx("h3", { className: "mt-4 text-lg font-medium text-green-800", children: "Account created!" }), _jsx("p", { className: "mt-2 text-sm text-green-600", children: "Please check your email to verify your account before signing in." }), _jsx("a", { href: signInHref, className: "mt-4 inline-block text-sm font-medium text-green-700 hover:text-green-800", children: "Go to sign in" })] }) }));
|
|
76
73
|
}
|
|
77
|
-
return ((
|
|
74
|
+
return (_jsx("div", { className: `w-full max-w-md ${className}`, children: _jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [error && (_jsx("div", { className: "rounded-md bg-red-50 p-4 text-sm text-red-600", children: error })), _jsxs("div", { children: [_jsxs("label", { htmlFor: "signup-name", className: "block text-sm font-medium text-foreground", children: ["Name ", _jsx("span", { className: "text-muted-foreground", children: "(optional)" })] }), _jsx("input", { id: "signup-name", type: "text", value: name, onChange: (e) => setName(e.target.value), autoComplete: "name", className: "mt-1 block w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary", placeholder: "John Doe" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "signup-email", className: "block text-sm font-medium text-foreground", children: "Email" }), _jsx("input", { id: "signup-email", type: "email", value: email, onChange: (e) => setEmail(e.target.value), required: true, autoComplete: "email", className: "mt-1 block w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary", placeholder: "you@example.com" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "signup-password", className: "block text-sm font-medium text-foreground", children: "Password" }), _jsx("input", { id: "signup-password", type: "password", value: password, onChange: (e) => setPassword(e.target.value), required: true, autoComplete: "new-password", minLength: 8, className: "mt-1 block w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary", placeholder: "At least 8 characters" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "signup-confirm-password", className: "block text-sm font-medium text-foreground", children: "Confirm Password" }), _jsx("input", { id: "signup-confirm-password", type: "password", value: confirmPassword, onChange: (e) => setConfirmPassword(e.target.value), required: true, autoComplete: "new-password", minLength: 8, className: "mt-1 block w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary", placeholder: "Confirm your password" })] }), _jsx("button", { type: "submit", disabled: isLoading, className: "w-full rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", children: isLoading ? 'Creating account...' : 'Create account' }), _jsxs("p", { className: "text-center text-sm text-muted-foreground", children: ["Already have an account?", ' ', _jsx("a", { href: signInHref, className: "font-medium text-primary hover:text-primary/80", children: "Sign in" })] })] }) }));
|
|
78
75
|
}
|
|
79
76
|
//# sourceMappingURL=SignUpForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignUpForm.js","sourceRoot":"","sources":["../../../src/auth/components/SignUpForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignUpForm.js","sourceRoot":"","sources":["../../../src/auth/components/SignUpForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAG1C;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,UAAU,EACV,SAAS,EACT,UAAU,GAAG,cAAc,EAC3B,SAAS,GAAG,EAAE,GACE;IAChB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAAA;IAE5B,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IACpC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IACtC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IAC5C,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IAC1D,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IACjD,MAAM,CA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C,yCAC7B,GAAG,EAC5B,YAAG,IAAI,EAAE,UAAU,EAAE,SAAS,EAAC,gDAAgD,wBAE3E,IACF,IACC,GACH,CACP,CAAA;AACH,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
'use client';
|
|
3
|
-
|
|
4
|
-
exports.UserMenu = UserMenu;
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
3
|
/**
|
|
7
4
|
* @rovela/sdk/auth/components/UserMenu
|
|
8
5
|
*
|
|
9
6
|
* User dropdown menu for authenticated customers.
|
|
10
7
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import { useState, useCallback, useRef, useEffect } from 'react';
|
|
9
|
+
import { useAuth } from '../hooks/useAuth';
|
|
13
10
|
/**
|
|
14
11
|
* User menu dropdown for authenticated customers.
|
|
15
12
|
*
|
|
@@ -25,12 +22,12 @@ const useAuth_1 = require("../hooks/useAuth");
|
|
|
25
22
|
* />
|
|
26
23
|
* ```
|
|
27
24
|
*/
|
|
28
|
-
function UserMenu({ accountHref = '/account', ordersHref = '/account/orders', settingsHref = '/account/settings', className = '', }) {
|
|
29
|
-
const { customer, isAuthenticated, isLoading, signOut } =
|
|
30
|
-
const [isOpen, setIsOpen] =
|
|
31
|
-
const menuRef =
|
|
25
|
+
export function UserMenu({ accountHref = '/account', ordersHref = '/account/orders', settingsHref = '/account/settings', className = '', }) {
|
|
26
|
+
const { customer, isAuthenticated, isLoading, signOut } = useAuth();
|
|
27
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
28
|
+
const menuRef = useRef(null);
|
|
32
29
|
// Close menu when clicking outside
|
|
33
|
-
|
|
30
|
+
useEffect(() => {
|
|
34
31
|
function handleClickOutside(event) {
|
|
35
32
|
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
36
33
|
setIsOpen(false);
|
|
@@ -40,7 +37,7 @@ function UserMenu({ accountHref = '/account', ordersHref = '/account/orders', se
|
|
|
40
37
|
return () => document.removeEventListener('mousedown', handleClickOutside);
|
|
41
38
|
}, []);
|
|
42
39
|
// Close menu on Escape key
|
|
43
|
-
|
|
40
|
+
useEffect(() => {
|
|
44
41
|
function handleEscape(event) {
|
|
45
42
|
if (event.key === 'Escape') {
|
|
46
43
|
setIsOpen(false);
|
|
@@ -49,17 +46,17 @@ function UserMenu({ accountHref = '/account', ordersHref = '/account/orders', se
|
|
|
49
46
|
document.addEventListener('keydown', handleEscape);
|
|
50
47
|
return () => document.removeEventListener('keydown', handleEscape);
|
|
51
48
|
}, []);
|
|
52
|
-
const handleSignOut =
|
|
49
|
+
const handleSignOut = useCallback(async () => {
|
|
53
50
|
setIsOpen(false);
|
|
54
51
|
await signOut();
|
|
55
52
|
}, [signOut]);
|
|
56
53
|
// Loading state
|
|
57
54
|
if (isLoading) {
|
|
58
|
-
return ((
|
|
55
|
+
return (_jsx("div", { className: `relative ${className}`, children: _jsx("div", { className: "flex h-8 w-8 animate-pulse items-center justify-center rounded-full bg-muted" }) }));
|
|
59
56
|
}
|
|
60
57
|
// Not authenticated - show sign in link
|
|
61
58
|
if (!isAuthenticated || !customer) {
|
|
62
|
-
return ((
|
|
59
|
+
return (_jsx("div", { className: `relative ${className}`, children: _jsxs("a", { href: "/auth/signin", className: "flex items-center gap-2 text-sm font-medium text-foreground hover:text-primary", children: [_jsx("svg", { className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" }) }), _jsx("span", { children: "Sign in" })] }) }));
|
|
63
60
|
}
|
|
64
61
|
// Get initials for avatar
|
|
65
62
|
const initials = customer.name
|
|
@@ -70,6 +67,6 @@ function UserMenu({ accountHref = '/account', ordersHref = '/account/orders', se
|
|
|
70
67
|
.toUpperCase()
|
|
71
68
|
.slice(0, 2)
|
|
72
69
|
: customer.email[0].toUpperCase();
|
|
73
|
-
return ((
|
|
70
|
+
return (_jsxs("div", { className: `relative ${className}`, ref: menuRef, children: [_jsxs("button", { type: "button", onClick: () => setIsOpen(!isOpen), className: "flex items-center gap-2 rounded-full focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2", "aria-expanded": isOpen, "aria-haspopup": "true", children: [_jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground", children: initials }), _jsx("svg", { className: `h-4 w-4 text-muted-foreground transition-transform ${isOpen ? 'rotate-180' : ''}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) })] }), isOpen && (_jsxs("div", { className: "absolute right-0 z-50 mt-2 w-56 origin-top-right rounded-md border border-border bg-background shadow-lg ring-1 ring-black ring-opacity-5", children: [_jsxs("div", { className: "border-b border-border px-4 py-3", children: [_jsx("p", { className: "text-sm font-medium text-foreground", children: customer.name || 'Customer' }), _jsx("p", { className: "truncate text-xs text-muted-foreground", children: customer.email }), !customer.emailVerified && (_jsx("p", { className: "mt-1 text-xs text-amber-600", children: "Email not verified" }))] }), _jsxs("div", { className: "py-1", children: [_jsxs("a", { href: accountHref, className: "flex items-center gap-2 px-4 py-2 text-sm text-foreground hover:bg-muted", onClick: () => setIsOpen(false), children: [_jsx("svg", { className: "h-4 w-4 text-muted-foreground", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" }) }), "My Account"] }), _jsxs("a", { href: ordersHref, className: "flex items-center gap-2 px-4 py-2 text-sm text-foreground hover:bg-muted", onClick: () => setIsOpen(false), children: [_jsx("svg", { className: "h-4 w-4 text-muted-foreground", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z" }) }), "Orders"] }), _jsxs("a", { href: settingsHref, className: "flex items-center gap-2 px-4 py-2 text-sm text-foreground hover:bg-muted", onClick: () => setIsOpen(false), children: [_jsxs("svg", { className: "h-4 w-4 text-muted-foreground", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: [_jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" }), _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })] }), "Settings"] })] }), _jsx("div", { className: "border-t border-border py-1", children: _jsxs("button", { type: "button", onClick: handleSignOut, className: "flex w-full items-center gap-2 px-4 py-2 text-sm text-foreground hover:bg-muted", children: [_jsx("svg", { className: "h-4 w-4 text-muted-foreground", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" }) }), "Sign out"] }) })] }))] }));
|
|
74
71
|
}
|
|
75
72
|
//# sourceMappingURL=UserMenu.js.map
|