@rovela-ai/sdk 0.4.0 → 0.4.2
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/checkout/server/create-checkout-session.d.ts +10 -1
- package/dist/checkout/server/create-checkout-session.d.ts.map +1 -1
- package/dist/checkout/server/create-checkout-session.js +28 -17
- package/dist/checkout/server/create-checkout-session.js.map +1 -1
- package/dist/checkout/server/handle-webhook.js +22 -2
- package/dist/checkout/server/handle-webhook.js.map +1 -1
- package/dist/checkout/server/order-service.d.ts +7 -1
- package/dist/checkout/server/order-service.d.ts.map +1 -1
- package/dist/checkout/server/order-service.js +59 -12
- package/dist/checkout/server/order-service.js.map +1 -1
- package/dist/core/db/queries.d.ts +6 -6
- package/dist/core/db/schema.d.ts +4 -4
- package/package.json +2 -2
- package/dist/admin/api/auth.d.ts +0 -32
- package/dist/admin/api/auth.d.ts.map +0 -1
- package/dist/admin/api/auth.js +0 -37
- package/dist/admin/api/auth.js.map +0 -1
- package/dist/admin/components/AdminSetupForm.d.ts +0 -28
- package/dist/admin/components/AdminSetupForm.d.ts.map +0 -1
- package/dist/admin/components/AdminSetupForm.js +0 -85
- package/dist/admin/components/AdminSetupForm.js.map +0 -1
- package/dist/auth/api/auth.d.ts +0 -9
- package/dist/auth/api/auth.d.ts.map +0 -1
- package/dist/auth/api/auth.js +0 -9
- package/dist/auth/api/auth.js.map +0 -1
- package/dist/auth/server/email-sender.d.ts +0 -64
- package/dist/auth/server/email-sender.d.ts.map +0 -1
- package/dist/auth/server/email-sender.js +0 -106
- package/dist/auth/server/email-sender.js.map +0 -1
- package/dist/products/components/CategoryNav.d.ts +0 -51
- package/dist/products/components/CategoryNav.d.ts.map +0 -1
- package/dist/products/components/CategoryNav.js +0 -110
- package/dist/products/components/CategoryNav.js.map +0 -1
- package/dist/products/components/ProductBreadcrumb.d.ts +0 -52
- package/dist/products/components/ProductBreadcrumb.d.ts.map +0 -1
- package/dist/products/components/ProductBreadcrumb.js +0 -73
- package/dist/products/components/ProductBreadcrumb.js.map +0 -1
- package/dist/products/components/ProductFilters.d.ts +0 -70
- package/dist/products/components/ProductFilters.d.ts.map +0 -1
- package/dist/products/components/ProductFilters.js +0 -125
- package/dist/products/components/ProductFilters.js.map +0 -1
- package/dist/products/hooks/useCategories.d.ts +0 -56
- package/dist/products/hooks/useCategories.d.ts.map +0 -1
- package/dist/products/hooks/useCategories.js +0 -126
- package/dist/products/hooks/useCategories.js.map +0 -1
- package/dist/products/hooks/useProductAttributes.d.ts +0 -59
- package/dist/products/hooks/useProductAttributes.d.ts.map +0 -1
- package/dist/products/hooks/useProductAttributes.js +0 -125
- package/dist/products/hooks/useProductAttributes.js.map +0 -1
- package/dist/theme/ThemeProvider.d.ts +0 -70
- package/dist/theme/ThemeProvider.d.ts.map +0 -1
- package/dist/theme/ThemeProvider.js +0 -75
- package/dist/theme/ThemeProvider.js.map +0 -1
- package/dist/theme/hooks.d.ts +0 -110
- package/dist/theme/hooks.d.ts.map +0 -1
- package/dist/theme/hooks.js +0 -101
- package/dist/theme/hooks.js.map +0 -1
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Props for AdminSetupForm component
|
|
3
|
-
*/
|
|
4
|
-
export interface AdminSetupFormProps {
|
|
5
|
-
/** Pre-filled email from STORE_OWNER_EMAIL */
|
|
6
|
-
defaultEmail?: string;
|
|
7
|
-
/** Callback on successful setup */
|
|
8
|
-
onSuccess?: () => void;
|
|
9
|
-
/** Additional CSS classes */
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Admin setup form for first-time account creation.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```tsx
|
|
17
|
-
* // Basic usage
|
|
18
|
-
* <AdminSetupForm />
|
|
19
|
-
*
|
|
20
|
-
* // With pre-filled email
|
|
21
|
-
* <AdminSetupForm
|
|
22
|
-
* defaultEmail="owner@store.com"
|
|
23
|
-
* onSuccess={() => console.log('Account created!')}
|
|
24
|
-
* />
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export declare function AdminSetupForm({ defaultEmail, onSuccess, className, }: AdminSetupFormProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
//# sourceMappingURL=AdminSetupForm.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AdminSetupForm.d.ts","sourceRoot":"","sources":["../../../src/admin/components/AdminSetupForm.tsx"],"names":[],"mappings":"AAiBA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAMD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,EAC7B,YAAiB,EACjB,SAAS,EACT,SAAc,GACf,EAAE,mBAAmB,2CA8KrB"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
/**
|
|
4
|
-
* @rovela/sdk/admin/components/AdminSetupForm
|
|
5
|
-
*
|
|
6
|
-
* First-time admin account setup form.
|
|
7
|
-
* Used when no admin exists for the store.
|
|
8
|
-
* Styled with Rovela admin theme.
|
|
9
|
-
*/
|
|
10
|
-
import { useState, useCallback } from 'react';
|
|
11
|
-
import { UserPlus } from 'lucide-react';
|
|
12
|
-
// =============================================================================
|
|
13
|
-
// Component
|
|
14
|
-
// =============================================================================
|
|
15
|
-
/**
|
|
16
|
-
* Admin setup form for first-time account creation.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```tsx
|
|
20
|
-
* // Basic usage
|
|
21
|
-
* <AdminSetupForm />
|
|
22
|
-
*
|
|
23
|
-
* // With pre-filled email
|
|
24
|
-
* <AdminSetupForm
|
|
25
|
-
* defaultEmail="owner@store.com"
|
|
26
|
-
* onSuccess={() => console.log('Account created!')}
|
|
27
|
-
* />
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export function AdminSetupForm({ defaultEmail = '', onSuccess, className = '', }) {
|
|
31
|
-
const [email, setEmail] = useState(defaultEmail);
|
|
32
|
-
const [name, setName] = useState('');
|
|
33
|
-
const [password, setPassword] = useState('');
|
|
34
|
-
const [confirmPassword, setConfirmPassword] = useState('');
|
|
35
|
-
const [error, setError] = useState(null);
|
|
36
|
-
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
37
|
-
const handleSubmit = useCallback(async (e) => {
|
|
38
|
-
e.preventDefault();
|
|
39
|
-
setError(null);
|
|
40
|
-
// Validate passwords match
|
|
41
|
-
if (password !== confirmPassword) {
|
|
42
|
-
setError('Passwords do not match');
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
// Validate password length
|
|
46
|
-
if (password.length < 8) {
|
|
47
|
-
setError('Password must be at least 8 characters');
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
// Validate name
|
|
51
|
-
if (name.trim().length < 2) {
|
|
52
|
-
setError('Name must be at least 2 characters');
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
setIsSubmitting(true);
|
|
56
|
-
try {
|
|
57
|
-
const response = await fetch('/api/admin/setup', {
|
|
58
|
-
method: 'POST',
|
|
59
|
-
headers: { 'Content-Type': 'application/json' },
|
|
60
|
-
body: JSON.stringify({
|
|
61
|
-
email: email.trim(),
|
|
62
|
-
password,
|
|
63
|
-
name: name.trim(),
|
|
64
|
-
}),
|
|
65
|
-
});
|
|
66
|
-
const data = await response.json();
|
|
67
|
-
if (!response.ok) {
|
|
68
|
-
setError(data.error || 'Setup failed');
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
// Success - call callback
|
|
72
|
-
onSuccess?.();
|
|
73
|
-
// Reload page to switch to login view
|
|
74
|
-
window.location.reload();
|
|
75
|
-
}
|
|
76
|
-
catch {
|
|
77
|
-
setError('An unexpected error occurred');
|
|
78
|
-
}
|
|
79
|
-
finally {
|
|
80
|
-
setIsSubmitting(false);
|
|
81
|
-
}
|
|
82
|
-
}, [email, name, password, confirmPassword, onSuccess]);
|
|
83
|
-
return (_jsxs("div", { className: `w-full max-w-sm admin-animate-in ${className}`, children: [_jsxs("div", { className: "mb-8 text-center", children: [_jsx("div", { className: "admin-icon-container-sm mx-auto mb-4", children: _jsx(UserPlus, { className: "h-6 w-6 admin-icon-primary" }) }), _jsx("h1", { className: "admin-heading-2", children: "Set Up Admin Account" }), _jsx("p", { className: "mt-2 text-sm admin-text-muted", children: "Create your admin account to manage your store" })] }), _jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [error && (_jsx("div", { className: "admin-alert admin-alert-error", children: _jsx("div", { className: "admin-alert-description", children: error }) })), _jsxs("div", { children: [_jsx("label", { htmlFor: "setup-email", className: "admin-label admin-label-required", children: "Email" }), _jsx("input", { id: "setup-email", type: "email", value: email, onChange: (e) => setEmail(e.target.value), required: true, autoComplete: "email", disabled: isSubmitting, className: "admin-input w-full", placeholder: "admin@example.com" }), defaultEmail && email === defaultEmail && (_jsx("p", { className: "admin-helper-text", children: "Pre-filled with store owner email" }))] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "setup-name", className: "admin-label admin-label-required", children: "Name" }), _jsx("input", { id: "setup-name", type: "text", value: name, onChange: (e) => setName(e.target.value), required: true, autoComplete: "name", disabled: isSubmitting, className: "admin-input w-full", placeholder: "Your name" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "setup-password", className: "admin-label admin-label-required", children: "Password" }), _jsx("input", { id: "setup-password", type: "password", value: password, onChange: (e) => setPassword(e.target.value), required: true, autoComplete: "new-password", disabled: isSubmitting, className: "admin-input w-full", placeholder: "At least 8 characters" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "setup-confirm-password", className: "admin-label admin-label-required", children: "Confirm Password" }), _jsx("input", { id: "setup-confirm-password", type: "password", value: confirmPassword, onChange: (e) => setConfirmPassword(e.target.value), required: true, autoComplete: "new-password", disabled: isSubmitting, className: "admin-input w-full", placeholder: "Confirm your password" })] }), _jsx("button", { type: "submit", disabled: isSubmitting, className: "admin-btn admin-btn-primary w-full", children: isSubmitting ? (_jsxs("span", { className: "flex items-center justify-center gap-2", children: [_jsx("span", { className: "admin-spinner admin-spinner-sm" }), "Creating account..."] })) : ('Create Admin Account') })] })] }));
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=AdminSetupForm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AdminSetupForm.js","sourceRoot":"","sources":["../../../src/admin/components/AdminSetupForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAkBvC,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,YAAY,GAAG,EAAE,EACjB,SAAS,EACT,SAAS,GAAG,EAAE,GACM;IACpB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAA;IAChD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IACpC,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,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAA;IACvD,MA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D,eAAM,SAAS,EAAC,gCAAgC,GAAG,2BAE9C,CACR,CAAC,CAAC,CAAC,CACF,sBAAsB,CACvB,GACM,IACJ,IACH,CACP,CAAA;AACH,CAAC"}
|
package/dist/auth/api/auth.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @rovela/sdk/auth/api/auth
|
|
3
|
-
*
|
|
4
|
-
* Re-export of `createAuthOptions` for consumers wiring `getServerSession()`
|
|
5
|
-
* or `NextAuth(...)` directly. Templates call `NextAuth(createCustomerAuthOptions())`
|
|
6
|
-
* inline at `app/api/auth/[...nextauth]/route.ts`.
|
|
7
|
-
*/
|
|
8
|
-
export { createAuthOptions } from '../config';
|
|
9
|
-
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/auth/api/auth.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/auth/api/auth.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @rovela/sdk/auth/api/auth
|
|
3
|
-
*
|
|
4
|
-
* Re-export of `createAuthOptions` for consumers wiring `getServerSession()`
|
|
5
|
-
* or `NextAuth(...)` directly. Templates call `NextAuth(createCustomerAuthOptions())`
|
|
6
|
-
* inline at `app/api/auth/[...nextauth]/route.ts`.
|
|
7
|
-
*/
|
|
8
|
-
export { createAuthOptions } from '../config';
|
|
9
|
-
//# sourceMappingURL=auth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/auth/api/auth.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @rovela/sdk/auth/server/email-sender
|
|
3
|
-
*
|
|
4
|
-
* Email sending utilities for customer authentication.
|
|
5
|
-
* This file re-exports from the emails module for backward compatibility.
|
|
6
|
-
*
|
|
7
|
-
* NOTE: For new code, prefer importing directly from '@rovela/sdk/emails':
|
|
8
|
-
* ```typescript
|
|
9
|
-
* import { sendVerificationEmail, sendWelcomeEmail } from '@rovela/sdk/emails'
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Send verification email to new customer.
|
|
14
|
-
*
|
|
15
|
-
* @param email - Customer email address
|
|
16
|
-
* @param token - Verification token
|
|
17
|
-
* @param storeName - Name of the store
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```typescript
|
|
21
|
-
* await sendVerificationEmail('customer@example.com', 'abc123token', 'My Store')
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @deprecated Use `sendVerificationEmail` from '@rovela/sdk/emails' for more options
|
|
25
|
-
*/
|
|
26
|
-
export declare function sendVerificationEmail(email: string, token: string, storeName: string): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Send password reset email to customer.
|
|
29
|
-
*
|
|
30
|
-
* @param email - Customer email address
|
|
31
|
-
* @param token - Reset token
|
|
32
|
-
* @param storeName - Name of the store
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```typescript
|
|
36
|
-
* await sendPasswordResetEmail('customer@example.com', 'abc123token', 'My Store')
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @deprecated Use `sendPasswordResetEmail` from '@rovela/sdk/emails' for more options
|
|
40
|
-
*/
|
|
41
|
-
export declare function sendPasswordResetEmail(email: string, token: string, storeName: string): Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
* Send welcome email to new customer after verification.
|
|
44
|
-
*
|
|
45
|
-
* @param email - Customer email address
|
|
46
|
-
* @param name - Customer name
|
|
47
|
-
* @param storeName - Name of the store
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```typescript
|
|
51
|
-
* await sendWelcomeEmail('customer@example.com', 'John', 'My Store')
|
|
52
|
-
* ```
|
|
53
|
-
*
|
|
54
|
-
* @deprecated Use `sendWelcomeEmail` from '@rovela/sdk/emails' for more options
|
|
55
|
-
*/
|
|
56
|
-
export declare function sendWelcomeEmail(email: string, name: string | null | undefined, storeName: string): Promise<void>;
|
|
57
|
-
/**
|
|
58
|
-
* Get the store name from configuration or environment.
|
|
59
|
-
* Falls back to a generic name if not configured.
|
|
60
|
-
*
|
|
61
|
-
* @deprecated Use `getStoreName` from '@rovela/sdk/emails'
|
|
62
|
-
*/
|
|
63
|
-
export declare function getStoreName(): Promise<string>;
|
|
64
|
-
//# sourceMappingURL=email-sender.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"email-sender.d.ts","sourceRoot":"","sources":["../../../src/auth/server/email-sender.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAcH;;;;;;;;;;;;;GAaG;AACH,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAef;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAef;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAYf;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAEpD"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @rovela/sdk/auth/server/email-sender
|
|
3
|
-
*
|
|
4
|
-
* Email sending utilities for customer authentication.
|
|
5
|
-
* This file re-exports from the emails module for backward compatibility.
|
|
6
|
-
*
|
|
7
|
-
* NOTE: For new code, prefer importing directly from '@rovela/sdk/emails':
|
|
8
|
-
* ```typescript
|
|
9
|
-
* import { sendVerificationEmail, sendWelcomeEmail } from '@rovela/sdk/emails'
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
import { sendVerificationEmail as sendVerification, sendPasswordResetEmail as sendPasswordReset, sendWelcomeEmail as sendWelcome, getStoreName as getStoreNameFromEmails, getStoreUrl, } from '../../emails';
|
|
13
|
-
// =============================================================================
|
|
14
|
-
// Re-exported Functions (Backward Compatible API)
|
|
15
|
-
// =============================================================================
|
|
16
|
-
/**
|
|
17
|
-
* Send verification email to new customer.
|
|
18
|
-
*
|
|
19
|
-
* @param email - Customer email address
|
|
20
|
-
* @param token - Verification token
|
|
21
|
-
* @param storeName - Name of the store
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```typescript
|
|
25
|
-
* await sendVerificationEmail('customer@example.com', 'abc123token', 'My Store')
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @deprecated Use `sendVerificationEmail` from '@rovela/sdk/emails' for more options
|
|
29
|
-
*/
|
|
30
|
-
export async function sendVerificationEmail(email, token, storeName) {
|
|
31
|
-
const storeUrl = getStoreUrl();
|
|
32
|
-
const verificationLink = `${storeUrl}/auth/verify-email?token=${token}`;
|
|
33
|
-
const result = await sendVerification({
|
|
34
|
-
to: email,
|
|
35
|
-
customerName: email.split('@')[0], // Fallback to email prefix
|
|
36
|
-
verificationLink,
|
|
37
|
-
expiryTime: '24',
|
|
38
|
-
});
|
|
39
|
-
if (!result.success) {
|
|
40
|
-
console.error('[Auth Email] Failed to send verification email:', result.error);
|
|
41
|
-
throw new Error('Failed to send verification email');
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Send password reset email to customer.
|
|
46
|
-
*
|
|
47
|
-
* @param email - Customer email address
|
|
48
|
-
* @param token - Reset token
|
|
49
|
-
* @param storeName - Name of the store
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* await sendPasswordResetEmail('customer@example.com', 'abc123token', 'My Store')
|
|
54
|
-
* ```
|
|
55
|
-
*
|
|
56
|
-
* @deprecated Use `sendPasswordResetEmail` from '@rovela/sdk/emails' for more options
|
|
57
|
-
*/
|
|
58
|
-
export async function sendPasswordResetEmail(email, token, storeName) {
|
|
59
|
-
const storeUrl = getStoreUrl();
|
|
60
|
-
const resetLink = `${storeUrl}/auth/reset-password?token=${token}`;
|
|
61
|
-
const result = await sendPasswordReset({
|
|
62
|
-
to: email,
|
|
63
|
-
customerName: email.split('@')[0], // Fallback to email prefix
|
|
64
|
-
resetLink,
|
|
65
|
-
expiryTime: '1',
|
|
66
|
-
});
|
|
67
|
-
if (!result.success) {
|
|
68
|
-
console.error('[Auth Email] Failed to send password reset email:', result.error);
|
|
69
|
-
throw new Error('Failed to send password reset email');
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Send welcome email to new customer after verification.
|
|
74
|
-
*
|
|
75
|
-
* @param email - Customer email address
|
|
76
|
-
* @param name - Customer name
|
|
77
|
-
* @param storeName - Name of the store
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* ```typescript
|
|
81
|
-
* await sendWelcomeEmail('customer@example.com', 'John', 'My Store')
|
|
82
|
-
* ```
|
|
83
|
-
*
|
|
84
|
-
* @deprecated Use `sendWelcomeEmail` from '@rovela/sdk/emails' for more options
|
|
85
|
-
*/
|
|
86
|
-
export async function sendWelcomeEmail(email, name, storeName) {
|
|
87
|
-
const customerName = name || 'there';
|
|
88
|
-
const result = await sendWelcome({
|
|
89
|
-
to: email,
|
|
90
|
-
customerName,
|
|
91
|
-
});
|
|
92
|
-
// Welcome email failure is not critical - just log it
|
|
93
|
-
if (!result.success) {
|
|
94
|
-
console.error('[Auth Email] Failed to send welcome email:', result.error);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Get the store name from configuration or environment.
|
|
99
|
-
* Falls back to a generic name if not configured.
|
|
100
|
-
*
|
|
101
|
-
* @deprecated Use `getStoreName` from '@rovela/sdk/emails'
|
|
102
|
-
*/
|
|
103
|
-
export async function getStoreName() {
|
|
104
|
-
return getStoreNameFromEmails();
|
|
105
|
-
}
|
|
106
|
-
//# sourceMappingURL=email-sender.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"email-sender.js","sourceRoot":"","sources":["../../../src/auth/server/email-sender.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,qBAAqB,IAAI,gBAAgB,EACzC,sBAAsB,IAAI,iBAAiB,EAC3C,gBAAgB,IAAI,WAAW,EAC/B,YAAY,IAAI,sBAAsB,EACtC,WAAW,GACZ,MAAM,cAAc,CAAA;AAErB,gFAAgF;AAChF,kDAAkD;AAClD,gFAAgF;AAEhF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,KAAa,EACb,KAAa,EACb,SAAiB;IAEjB,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,gBAAgB,GAAG,GAAG,QAAQ,4BAA4B,KAAK,EAAE,CAAA;IAEvE,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC;QACpC,EAAE,EAAE,KAAK;QACT,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,2BAA2B;QAC9D,gBAAgB;QAChB,UAAU,EAAE,IAAI;KACjB,CAAC,CAAA;IAEF,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,iDAAiD,EAA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 -1,51 +0,0 @@
|
|
|
1
|
-
import type { Category } from '../../core/types';
|
|
2
|
-
import type { CategoryWithChildren } from '../hooks/useCategories';
|
|
3
|
-
export interface CategoryNavProps {
|
|
4
|
-
/** Categories (flat or tree structure) */
|
|
5
|
-
categories: Category[] | CategoryWithChildren[];
|
|
6
|
-
/** Currently active category slug */
|
|
7
|
-
activeSlug?: string | null;
|
|
8
|
-
/** Custom className */
|
|
9
|
-
className?: string;
|
|
10
|
-
/** Navigation style */
|
|
11
|
-
variant?: 'horizontal' | 'vertical' | 'dropdown';
|
|
12
|
-
/** Link href pattern (default: /categories/[slug]) */
|
|
13
|
-
hrefPattern?: string;
|
|
14
|
-
/** Show product count */
|
|
15
|
-
showCount?: boolean;
|
|
16
|
-
/** Product counts by category ID */
|
|
17
|
-
counts?: Record<string, number>;
|
|
18
|
-
/** Show all products link */
|
|
19
|
-
showAllLink?: boolean;
|
|
20
|
-
/** All products link label */
|
|
21
|
-
allLinkLabel?: string;
|
|
22
|
-
/** Collapse nested categories */
|
|
23
|
-
collapsible?: boolean;
|
|
24
|
-
/** Maximum depth to render */
|
|
25
|
-
maxDepth?: number;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* CategoryNav component for displaying category navigation.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```tsx
|
|
32
|
-
* import { CategoryNav, useCategories } from '@rovela/sdk/products'
|
|
33
|
-
*
|
|
34
|
-
* function Sidebar({ activeCategory }) {
|
|
35
|
-
* const { tree, isLoading } = useCategories()
|
|
36
|
-
*
|
|
37
|
-
* if (isLoading) return <div>Loading...</div>
|
|
38
|
-
*
|
|
39
|
-
* return (
|
|
40
|
-
* <CategoryNav
|
|
41
|
-
* categories={tree}
|
|
42
|
-
* activeSlug={activeCategory}
|
|
43
|
-
* variant="vertical"
|
|
44
|
-
* collapsible
|
|
45
|
-
* />
|
|
46
|
-
* )
|
|
47
|
-
* }
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
export declare function CategoryNav({ categories, activeSlug, className, variant, hrefPattern, showCount, counts, showAllLink, allLinkLabel, collapsible, maxDepth, }: CategoryNavProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
-
//# sourceMappingURL=CategoryNav.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryNav.d.ts","sourceRoot":"","sources":["../../../src/products/components/CategoryNav.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAMlE,MAAM,WAAW,gBAAgB;IAC/B,0CAA0C;IAC1C,UAAU,EAAE,QAAQ,EAAE,GAAG,oBAAoB,EAAE,CAAA;IAC/C,qCAAqC;IACrC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uBAAuB;IACvB,OAAO,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,UAAU,CAAA;IAChD,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yBAAyB;IACzB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,6BAA6B;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iCAAiC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAMD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,UAAU,EACV,SAAS,EACT,OAAoB,EACpB,WAAkC,EAClC,SAAiB,EACjB,MAAW,EACX,WAAkB,EAClB,YAA6B,EAC7B,WAAmB,EACnB,QAAY,GACb,EAAE,gBAAgB,2CAmElB"}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
/**
|
|
4
|
-
* @rovela/sdk/products/components/CategoryNav
|
|
5
|
-
*
|
|
6
|
-
* Category navigation component with hierarchical support.
|
|
7
|
-
*/
|
|
8
|
-
import { useState, useCallback } from 'react';
|
|
9
|
-
import Link from 'next/link';
|
|
10
|
-
import { ChevronRight, ChevronDown } from 'lucide-react';
|
|
11
|
-
import { cn } from '../../core/utils';
|
|
12
|
-
// =============================================================================
|
|
13
|
-
// Component
|
|
14
|
-
// =============================================================================
|
|
15
|
-
/**
|
|
16
|
-
* CategoryNav component for displaying category navigation.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```tsx
|
|
20
|
-
* import { CategoryNav, useCategories } from '@rovela/sdk/products'
|
|
21
|
-
*
|
|
22
|
-
* function Sidebar({ activeCategory }) {
|
|
23
|
-
* const { tree, isLoading } = useCategories()
|
|
24
|
-
*
|
|
25
|
-
* if (isLoading) return <div>Loading...</div>
|
|
26
|
-
*
|
|
27
|
-
* return (
|
|
28
|
-
* <CategoryNav
|
|
29
|
-
* categories={tree}
|
|
30
|
-
* activeSlug={activeCategory}
|
|
31
|
-
* variant="vertical"
|
|
32
|
-
* collapsible
|
|
33
|
-
* />
|
|
34
|
-
* )
|
|
35
|
-
* }
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
export function CategoryNav({ categories, activeSlug, className, variant = 'vertical', hrefPattern = '/categories/[slug]', showCount = false, counts = {}, showAllLink = true, allLinkLabel = 'All Products', collapsible = false, maxDepth = 3, }) {
|
|
39
|
-
// Check if categories have children (tree structure)
|
|
40
|
-
const isTree = categories.length > 0 && 'children' in categories[0];
|
|
41
|
-
const baseClasses = {
|
|
42
|
-
horizontal: 'flex flex-wrap gap-2',
|
|
43
|
-
vertical: 'flex flex-col space-y-1',
|
|
44
|
-
dropdown: 'relative',
|
|
45
|
-
};
|
|
46
|
-
if (variant === 'dropdown') {
|
|
47
|
-
return (_jsx(CategoryDropdown, { categories: categories, activeSlug: activeSlug, className: className, hrefPattern: hrefPattern, showCount: showCount, counts: counts, showAllLink: showAllLink, allLinkLabel: allLinkLabel }));
|
|
48
|
-
}
|
|
49
|
-
return (_jsxs("nav", { className: cn(baseClasses[variant], className), "aria-label": "Categories", children: [showAllLink && (_jsx(CategoryLink, { href: "/products", label: allLinkLabel, isActive: !activeSlug, variant: variant })), isTree ? (
|
|
50
|
-
// Render tree structure
|
|
51
|
-
categories.map((category) => (_jsx(CategoryTreeItem, { category: category, activeSlug: activeSlug, hrefPattern: hrefPattern, showCount: showCount, counts: counts, collapsible: collapsible, variant: variant, depth: 0, maxDepth: maxDepth }, category.id)))) : (
|
|
52
|
-
// Render flat structure
|
|
53
|
-
categories.map((category) => (_jsx(CategoryLink, { href: hrefPattern.replace('[slug]', category.slug), label: category.name, isActive: category.slug === activeSlug, count: showCount ? counts[category.id] : undefined, variant: variant }, category.id))))] }));
|
|
54
|
-
}
|
|
55
|
-
function CategoryLink({ href, label, isActive = false, count, variant = 'vertical', className, depth = 0, }) {
|
|
56
|
-
const linkClasses = cn('block transition-colors', variant === 'horizontal'
|
|
57
|
-
? cn('rounded-full px-4 py-2 text-sm', isActive
|
|
58
|
-
? 'bg-primary text-primary-foreground'
|
|
59
|
-
: 'bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground')
|
|
60
|
-
: cn('rounded-md px-3 py-2 text-sm', isActive
|
|
61
|
-
? 'bg-primary/10 font-medium text-primary'
|
|
62
|
-
: 'text-muted-foreground hover:bg-muted hover:text-foreground'), depth > 0 && variant === 'vertical' && `ml-${Math.min(depth * 4, 12)}`, className);
|
|
63
|
-
return (_jsx(Link, { href: href, className: linkClasses, children: _jsxs("span", { className: "flex items-center justify-between", children: [_jsx("span", { children: label }), count !== undefined && (_jsxs("span", { className: "ml-2 text-xs text-muted-foreground", children: ["(", count, ")"] }))] }) }));
|
|
64
|
-
}
|
|
65
|
-
function CategoryTreeItem({ category, activeSlug, hrefPattern, showCount, counts, collapsible, variant, depth, maxDepth, }) {
|
|
66
|
-
const hasChildren = category.children && category.children.length > 0;
|
|
67
|
-
const isActive = category.slug === activeSlug;
|
|
68
|
-
const isActiveParent = hasChildren &&
|
|
69
|
-
category.children.some(child => child.slug === activeSlug ||
|
|
70
|
-
(child.children && child.children.some(gc => gc.slug === activeSlug)));
|
|
71
|
-
const [isExpanded, setIsExpanded] = useState(isActive || isActiveParent);
|
|
72
|
-
const handleToggle = useCallback((e) => {
|
|
73
|
-
if (collapsible && hasChildren) {
|
|
74
|
-
e.preventDefault();
|
|
75
|
-
setIsExpanded(!isExpanded);
|
|
76
|
-
}
|
|
77
|
-
}, [collapsible, hasChildren, isExpanded]);
|
|
78
|
-
// Don't render beyond max depth
|
|
79
|
-
if (depth >= maxDepth)
|
|
80
|
-
return null;
|
|
81
|
-
return (_jsxs("div", { className: variant === 'vertical' ? 'space-y-1' : '', children: [_jsxs("div", { className: "flex items-center", children: [collapsible && hasChildren && variant === 'vertical' && (_jsx("button", { onClick: handleToggle, className: "mr-1 flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted", "aria-label": isExpanded ? 'Collapse' : 'Expand', children: _jsx(ChevronRight, { className: cn('h-4 w-4 transition-transform', isExpanded && 'rotate-90') }) })), _jsx(CategoryLink, { href: hrefPattern.replace('[slug]', category.slug), label: category.name, isActive: isActive, count: showCount ? counts[category.id] : undefined, variant: variant, depth: collapsible ? 0 : depth, className: "flex-1" })] }), hasChildren && (collapsible ? isExpanded : true) && (_jsx("div", { className: cn(variant === 'vertical' && 'ml-4 space-y-1'), children: category.children.map((child) => (_jsx(CategoryTreeItem, { category: child, activeSlug: activeSlug, hrefPattern: hrefPattern, showCount: showCount, counts: counts, collapsible: collapsible, variant: variant, depth: depth + 1, maxDepth: maxDepth }, child.id))) }))] }));
|
|
82
|
-
}
|
|
83
|
-
function CategoryDropdown({ categories, activeSlug, className, hrefPattern, showCount, counts, showAllLink, allLinkLabel, }) {
|
|
84
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
85
|
-
// Find active category name
|
|
86
|
-
const flatCategories = flattenCategories(categories);
|
|
87
|
-
const activeCategory = flatCategories.find((c) => c.slug === activeSlug);
|
|
88
|
-
return (_jsxs("div", { className: cn('relative', className), children: [_jsxs("button", { onClick: () => setIsOpen(!isOpen), className: "flex w-full items-center justify-between rounded-md border border-border bg-background px-4 py-2 text-sm", children: [_jsx("span", { children: activeCategory?.name || allLinkLabel }), _jsx(ChevronDown, { className: cn('h-4 w-4 transition-transform', isOpen && 'rotate-180') })] }), isOpen && (_jsxs(_Fragment, { children: [_jsx("div", { className: "fixed inset-0 z-10", onClick: () => setIsOpen(false) }), _jsxs("div", { className: "absolute z-20 mt-1 w-full rounded-md border border-border bg-background py-1 shadow-lg", children: [showAllLink && (_jsx(Link, { href: "/products", onClick: () => setIsOpen(false), className: cn('block px-4 py-2 text-sm', !activeSlug
|
|
89
|
-
? 'bg-primary/10 text-primary'
|
|
90
|
-
: 'text-foreground hover:bg-muted'), children: allLinkLabel })), flatCategories.map((category) => (_jsx(Link, { href: hrefPattern.replace('[slug]', category.slug), onClick: () => setIsOpen(false), className: cn('block px-4 py-2 text-sm', category.slug === activeSlug
|
|
91
|
-
? 'bg-primary/10 text-primary'
|
|
92
|
-
: 'text-foreground hover:bg-muted'), children: _jsxs("span", { className: "flex items-center justify-between", children: [_jsx("span", { children: category.name }), showCount && counts[category.id] !== undefined && (_jsxs("span", { className: "text-xs text-muted-foreground", children: ["(", counts[category.id], ")"] }))] }) }, category.id)))] })] }))] }));
|
|
93
|
-
}
|
|
94
|
-
// =============================================================================
|
|
95
|
-
// Helpers
|
|
96
|
-
// =============================================================================
|
|
97
|
-
function flattenCategories(categories) {
|
|
98
|
-
const result = [];
|
|
99
|
-
function flatten(items) {
|
|
100
|
-
items.forEach((item) => {
|
|
101
|
-
result.push(item);
|
|
102
|
-
if ('children' in item && Array.isArray(item.children) && item.children.length > 0) {
|
|
103
|
-
flatten(item.children);
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
flatten(categories);
|
|
108
|
-
return result;
|
|
109
|
-
}
|
|
110
|
-
//# sourceMappingURL=CategoryNav.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryNav.js","sourceRoot":"","sources":["../../../src/products/components/CategoryNav.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;AAiCrC,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,UAAU,EACV,UAAU,EACV,SAAS,EACT,OAAO,GAAG,UAAU,EACpB,WAAW,GAAG,oBAAoB,EAClC,SAAS,GAAG,KAAK,EACjB,MAAM,GAAG,EAAE,EACX,WAAW,GAAG,IAAI,EAClB,YAAY,GAAG,cAAc,EAC7B,WAAW,GAAG,KAAK,EACnB,QAAQ,GAAG,CAAC,GACK;IACjB,qDAAqD;IACrD,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,UAAU,IAAI,UAAU,CAAC,CAAC,CAAC,CAAA;IAEnE,MAAM,WAAW,GAAG;QAClB,UAAU,EAAE,sBAAsB;QAClC,QAAQ,EAAE,yBAAyB;QACnC,QAAQ,EAAE,UAAU;K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CAAmC,aACjD,yBAAO,QAAQ,CAAC,IAAI,GAAQ,EAC3B,SAAS,IAAI,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,SAAS,IAAI,CACjD,gBAAM,SAAS,EAAC,+BAA+B,kBAC3C,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,SAChB,CACR,IACI,IAjBF,QAAQ,CAAC,EAAE,CAkBX,CACR,CAAC,IACE,IACL,CACJ,IACG,CACP,CAAA;AACH,CAAC;AAED,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF,SAAS,iBAAiB,CACxB,UAA+C;IAE/C,MAAM,MAAM,GAAe,EAAE,CAAA;IAE7B,SAAS,OAAO,CAAC,KAA0C;QACzD,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACjB,IAAI,UAAU,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACnF,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;YACxB,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,CAAA;IACnB,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { Category, Product } from '../../core/types';
|
|
2
|
-
export interface BreadcrumbItem {
|
|
3
|
-
label: string;
|
|
4
|
-
href?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface ProductBreadcrumbProps {
|
|
7
|
-
/** Category path (from root to current) */
|
|
8
|
-
categories?: Category[];
|
|
9
|
-
/** Current product (optional, for product pages) */
|
|
10
|
-
product?: Product | null;
|
|
11
|
-
/** Custom className */
|
|
12
|
-
className?: string;
|
|
13
|
-
/** Show home link */
|
|
14
|
-
showHome?: boolean;
|
|
15
|
-
/** Home label */
|
|
16
|
-
homeLabel?: string;
|
|
17
|
-
/** Home href */
|
|
18
|
-
homeHref?: string;
|
|
19
|
-
/** Category href pattern */
|
|
20
|
-
categoryHrefPattern?: string;
|
|
21
|
-
/** Custom separator */
|
|
22
|
-
separator?: React.ReactNode;
|
|
23
|
-
/** Custom items (overrides categories/product) */
|
|
24
|
-
items?: BreadcrumbItem[];
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* ProductBreadcrumb component for navigation context.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```tsx
|
|
31
|
-
* import { ProductBreadcrumb, useCategories } from '@rovela/sdk/products'
|
|
32
|
-
*
|
|
33
|
-
* function ProductPage({ product, categorySlug }) {
|
|
34
|
-
* const { getBreadcrumb, getCategoryBySlug } = useCategories()
|
|
35
|
-
* const category = getCategoryBySlug(categorySlug)
|
|
36
|
-
* const categoryPath = category ? getBreadcrumb(category.id) : []
|
|
37
|
-
*
|
|
38
|
-
* return (
|
|
39
|
-
* <div>
|
|
40
|
-
* <ProductBreadcrumb
|
|
41
|
-
* categories={categoryPath}
|
|
42
|
-
* product={product}
|
|
43
|
-
* showHome
|
|
44
|
-
* />
|
|
45
|
-
* {// ... product content}
|
|
46
|
-
* </div>
|
|
47
|
-
* )
|
|
48
|
-
* }
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
export declare function ProductBreadcrumb({ categories, product, className, showHome, homeLabel, homeHref, categoryHrefPattern, separator, items: customItems, }: ProductBreadcrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
-
//# sourceMappingURL=ProductBreadcrumb.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProductBreadcrumb.d.ts","sourceRoot":"","sources":["../../../src/products/components/ProductBreadcrumb.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAMzD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,2CAA2C;IAC3C,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAA;IACvB,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IACxB,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,4BAA4B;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,uBAAuB;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,kDAAkD;IAClD,KAAK,CAAC,EAAE,cAAc,EAAE,CAAA;CACzB;AAMD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,UAAe,EACf,OAAO,EACP,SAAS,EACT,QAAe,EACf,SAAkB,EAClB,QAAc,EACd,mBAA0C,EAC1C,SAAS,EACT,KAAK,EAAE,WAAW,GACnB,EAAE,sBAAsB,2CA4ExB"}
|