@djangocfg/layouts 2.1.103 → 2.1.105
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/package.json +33 -37
- package/src/components/RedirectPage/RedirectPage.tsx +2 -2
- package/src/components/core/ClientOnly.tsx +1 -1
- package/src/components/errors/ErrorLayout.tsx +1 -1
- package/src/components/errors/ErrorsTracker/components/ErrorButtons.tsx +1 -1
- package/src/components/index.ts +2 -0
- package/src/index.ts +2 -0
- package/src/layouts/AuthLayout/components/AuthHelp.tsx +1 -1
- package/src/layouts/AuthLayout/components/AuthSuccess.tsx +1 -1
- package/src/layouts/AuthLayout/components/IdentifierForm.tsx +1 -1
- package/src/layouts/AuthLayout/components/OTPForm.tsx +1 -1
- package/src/layouts/AuthLayout/components/TwoFactorForm.tsx +1 -1
- package/src/layouts/AuthLayout/components/TwoFactorSetup.tsx +1 -1
- package/src/layouts/AuthLayout/components/oauth/OAuthCallback.tsx +1 -1
- package/src/layouts/AuthLayout/components/oauth/OAuthProviders.tsx +1 -1
- package/src/layouts/PrivateLayout/PrivateLayout.tsx +3 -2
- package/src/layouts/PrivateLayout/components/PrivateHeader.tsx +2 -2
- package/src/layouts/ProfileLayout/ProfileLayout.tsx +1 -1
- package/src/layouts/ProfileLayout/__tests__/TwoFactorSection.test.tsx +1 -1
- package/src/layouts/ProfileLayout/components/AvatarSection.tsx +1 -1
- package/src/layouts/ProfileLayout/components/DeleteAccountSection.tsx +1 -1
- package/src/layouts/ProfileLayout/components/ProfileForm.tsx +1 -1
- package/src/layouts/ProfileLayout/components/TwoFactorSection.tsx +1 -1
- package/src/layouts/PublicLayout/components/PublicFooter/PublicFooter.tsx +1 -1
- package/src/layouts/PublicLayout/components/PublicMobileDrawer.tsx +1 -1
- package/src/layouts/PublicLayout/components/PublicNavigation.tsx +2 -2
- package/src/layouts/_components/UserMenu.tsx +1 -1
- package/src/layouts/index.ts +2 -0
- package/src/pages/index.ts +2 -0
- package/src/pages/legal/LegalPage.tsx +1 -1
- package/src/snippets/AuthDialog/AuthDialog.tsx +3 -2
- package/src/snippets/McpChat/components/AIChatWidget.tsx +1 -1
- package/src/snippets/McpChat/components/AskAIButton.tsx +1 -1
- package/src/snippets/McpChat/components/ChatMessages.tsx +1 -1
- package/src/snippets/McpChat/components/ChatPanel.tsx +1 -1
- package/src/snippets/McpChat/components/ChatSidebar.tsx +1 -1
- package/src/snippets/McpChat/components/ChatWidget.tsx +1 -1
- package/src/snippets/McpChat/components/MessageBubble.tsx +1 -1
- package/src/snippets/McpChat/components/MessageInput.tsx +1 -1
- package/src/snippets/McpChat/context/AIChatContext.tsx +1 -1
- package/src/snippets/McpChat/context/ChatContext.tsx +1 -1
- package/src/snippets/McpChat/hooks/useChatLayout.ts +1 -1
- package/src/snippets/PWAInstall/components/A2HSHint.tsx +0 -1
- package/src/snippets/PWAInstall/components/DesktopGuide.tsx +1 -1
- package/src/snippets/PWAInstall/components/IOSGuide.tsx +1 -1
- package/src/snippets/PWAInstall/components/IOSGuideDrawer.tsx +1 -1
- package/src/snippets/PWAInstall/components/IOSGuideModal.tsx +1 -1
- package/src/snippets/PWAInstall/hooks/useInstallPrompt.ts +2 -2
- package/src/snippets/PushNotifications/components/PushPrompt.tsx +1 -1
- package/src/snippets/index.ts +1 -0
- package/dist/AIChatWidget-LUPM7S2O.mjs +0 -1644
- package/dist/AIChatWidget-LUPM7S2O.mjs.map +0 -1
- package/dist/AIChatWidget-O23TJJ7C.mjs +0 -3
- package/dist/AIChatWidget-O23TJJ7C.mjs.map +0 -1
- package/dist/chunk-53YKWR6F.mjs +0 -6
- package/dist/chunk-53YKWR6F.mjs.map +0 -1
- package/dist/chunk-EI7TDN2G.mjs +0 -1652
- package/dist/chunk-EI7TDN2G.mjs.map +0 -1
- package/dist/components.cjs +0 -925
- package/dist/components.cjs.map +0 -1
- package/dist/components.d.mts +0 -583
- package/dist/components.d.ts +0 -583
- package/dist/components.mjs +0 -879
- package/dist/components.mjs.map +0 -1
- package/dist/index.cjs +0 -7573
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.mts +0 -2376
- package/dist/index.d.ts +0 -2376
- package/dist/index.mjs +0 -5673
- package/dist/index.mjs.map +0 -1
- package/dist/layouts.cjs +0 -6530
- package/dist/layouts.cjs.map +0 -1
- package/dist/layouts.d.mts +0 -748
- package/dist/layouts.d.ts +0 -748
- package/dist/layouts.mjs +0 -4741
- package/dist/layouts.mjs.map +0 -1
- package/dist/pages.cjs +0 -178
- package/dist/pages.cjs.map +0 -1
- package/dist/pages.d.mts +0 -57
- package/dist/pages.d.ts +0 -57
- package/dist/pages.mjs +0 -168
- package/dist/pages.mjs.map +0 -1
- package/dist/snippets.cjs +0 -3793
- package/dist/snippets.cjs.map +0 -1
- package/dist/snippets.d.mts +0 -1192
- package/dist/snippets.d.ts +0 -1192
- package/dist/snippets.mjs +0 -3738
- package/dist/snippets.mjs.map +0 -1
- package/dist/utils.cjs +0 -34
- package/dist/utils.cjs.map +0 -1
- package/dist/utils.d.mts +0 -40
- package/dist/utils.d.ts +0 -40
- package/dist/utils.mjs +0 -25
- package/dist/utils.mjs.map +0 -1
package/dist/components.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/core/ClientOnly.tsx","../src/components/core/JsonLd.tsx","../src/components/core/LucideIcon.tsx","../src/components/core/Suspense.tsx","../src/components/errors/ErrorBoundary.tsx","../src/components/errors/errorConfig.ts","../src/components/errors/ErrorLayout.tsx","../src/components/RedirectPage/RedirectPage.tsx","../src/components/errors/ErrorsTracker/utils/formatters.ts","../src/components/errors/ErrorsTracker/utils/curl-generator.ts","../src/components/errors/ErrorsTracker/components/ErrorButtons.tsx","../src/components/errors/ErrorsTracker/components/ErrorToast.tsx","../src/components/errors/ErrorsTracker/types.ts","../src/components/errors/ErrorsTracker/providers/ErrorTrackingProvider.tsx"],"names":["jsx","Preloader","useState","useEffect","LucideIcons","cn","defaultFallback","jsxs","ReactSuspense","Component","Fragment","Button","useAuth","useCfgRouter","consola","useCopy","Copy","Terminal","createContext","useCallback","toast","useContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,IAAM,eAAA,mBACJA,cAAA;AAAA,EAACC,oBAAA;AAAA,EAAA;AAAA,IACC,OAAA,EAAQ,YAAA;AAAA,IACR,IAAA,EAAK,YAAA;AAAA,IACL,IAAA,EAAK,IAAA;AAAA,IACL,QAAA,EAAU,IAAA;AAAA,IACV,eAAA,EAAiB;AAAA;AACnB,CAAA;AAWK,SAAS,UAAA,CAAW;AAAA,EACzB,QAAA;AAAA,EACA,QAAA,GAAW;AACb,CAAA,EAAoB;AAClB,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAIC,eAAS,KAAK,CAAA;AAE5C,EAAAC,eAAA,CAAU,MAAM;AACd,IAAA,UAAA,CAAW,IAAI,CAAA;AAAA,EACjB,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,6DAAU,QAAA,EAAA,QAAA,EAAS,CAAA;AAAA,EACrB;AAEA,EAAA,6DAAU,QAAA,EAAS,CAAA;AACrB;AAfgB,MAAA,CAAA,UAAA,EAAA,YAAA,CAAA;ACrCT,SAAS,MAAA,CAAO,EAAE,IAAA,EAAK,EAAgB;AAC5C,EAAA,uBACEH,cAAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,qBAAA;AAAA,MACL,uBAAA,EAAyB;AAAA,QACvB,MAAA,EAAQ,IAAA,CAAK,SAAA,CAAU,IAAA,EAAM,MAAM,CAAC;AAAA;AACtC;AAAA,GACF;AAEJ;AATgB,MAAA,CAAA,MAAA,EAAA,QAAA,CAAA;AC4BhB,SAAS,aAAA,CACP,IAAA,EACA,QAAA,GAAuCI,sBAAA,CAAA,cAAA,EACvB;AAChB,EAAA,IAAI,CAAC,IAAA,EAAM;AACT,IAAA,OAAO,QAAA;AAA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AAEA,EAAA,OAAO,OAAA;AACT;AARgB,MAAA,CAAA,SAAA,EAAA,WAAA,CAAA","file":"components.cjs","sourcesContent":["/**\n * ClientOnly Component\n *\n * Renders children only on the client side to prevent SSR hydration mismatch.\n * Shows a fallback (loading state) during SSR and initial client mount.\n *\n * @example\n * ```tsx\n * import { ClientOnly } from '@djangocfg/layouts/components';\n *\n * // With default loading fallback\n * <ClientOnly>\n * <ComponentThatUsesClientOnlyAPIs />\n * </ClientOnly>\n *\n * // With custom fallback\n * <ClientOnly fallback={<MyCustomLoader />}>\n * <ComponentThatUsesClientOnlyAPIs />\n * </ClientOnly>\n * ```\n */\n\n'use client';\n\nimport { ReactNode, useEffect, useState } from 'react';\n\nimport { Preloader } from '@djangocfg/ui-nextjs/components';\n\nexport interface ClientOnlyProps {\n children: ReactNode;\n /**\n * Fallback to show during SSR and initial mount\n * @default Preloader with \"Loading...\" text\n */\n fallback?: ReactNode;\n}\n\n/**\n * Default fallback - fullscreen preloader\n */\nconst defaultFallback = (\n <Preloader\n variant=\"fullscreen\"\n text=\"Loading...\"\n size=\"lg\"\n backdrop={true}\n backdropOpacity={80}\n />\n);\n\n/**\n * ClientOnly - Prevents SSR hydration mismatch\n *\n * Use this to wrap components that:\n * - Access browser-only APIs (window, localStorage, etc.)\n * - Have different initial state on server vs client\n * - Use authentication state that differs between SSR and CSR\n */\nexport function ClientOnly({\n children,\n fallback = defaultFallback,\n}: ClientOnlyProps) {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) {\n return <>{fallback}</>;\n }\n\n return <>{children}</>;\n}\n","import React from 'react';\n\ninterface JsonLdProps {\n data: Record<string, any> | Record<string, any>[];\n}\n\n/**\n * JsonLd Component\n * \n * Renders JSON-LD structured data for SEO.\n * Use this for schema.org markup (Organization, WebSite, FAQPage, etc.)\n * \n * @example\n * ```tsx\n * <JsonLd data={{\n * \"@context\": \"https://schema.org\",\n * \"@type\": \"Organization\",\n * \"name\": \"My Company\"\n * }} />\n * ```\n */\nexport function JsonLd({ data }: JsonLdProps) {\n return (\n <script\n type=\"application/ld+json\"\n dangerouslySetInnerHTML={{\n __html: JSON.stringify(data, null, 0),\n }}\n />\n );\n}\n","/**\n * LucideIcon Component\n *\n * Smart component for rendering Lucide icons\n * Supports both string names and icon components\n *\n * Usage:\n * ```tsx\n * // By name (string)\n * <LucideIcon icon=\"CloudLightning\" className=\"w-4 h-4\" />\n *\n * // By component\n * import { CloudLightning } from 'lucide-react';\n * <LucideIcon icon={CloudLightning} className=\"w-4 h-4\" />\n * ```\n */\n\n'use client';\n\nimport * as LucideIcons from 'lucide-react';\nimport React from 'react';\n\nimport { cn } from '@djangocfg/ui-core/lib';\n\nimport type { LucideIcon as LucideIconType } from 'lucide-react';\nexport interface LucideIconProps extends Omit<React.SVGProps<SVGSVGElement>, 'children'> {\n /**\n * Icon name (string) or icon component (LucideIcon)\n * If string, will be resolved from lucide-react\n * If component, will be used directly\n */\n icon?: LucideIconType | string;\n /**\n * Fallback icon if name not found\n * @default CloudLightning\n */\n fallback?: LucideIconType;\n /**\n * Additional CSS classes\n */\n className?: string;\n}\n\n/**\n * Get Lucide icon by name or return the icon component\n * @param icon - Icon name (string) or LucideIcon component\n * @param fallback - Fallback icon if name not found (default: CloudLightning)\n * @returns LucideIcon component\n */\nfunction getLucideIcon(\n icon: LucideIconType | string | undefined,\n fallback: LucideIconType = LucideIcons.CloudLightning\n): LucideIconType {\n if (!icon) {\n return fallback;\n }\n\n if (typeof icon === 'string') {\n const IconComponent = LucideIcons[icon as keyof typeof LucideIcons] as LucideIconType | undefined;\n return IconComponent || fallback;\n }\n\n return icon;\n}\n\n/**\n * LucideIcon Component\n *\n * Renders a Lucide icon either by name (string) or by component reference.\n * Automatically resolves icon names from lucide-react package.\n *\n * Usage:\n * ```tsx\n * // By name (string)\n * <LucideIcon icon=\"CloudLightning\" className=\"w-4 h-4\" />\n *\n * // By component\n * import { CloudLightning } from 'lucide-react';\n * <LucideIcon icon={CloudLightning} className=\"w-4 h-4\" />\n * ```\n */\nexport function LucideIcon({\n icon,\n fallback = LucideIcons.CloudLightning,\n className,\n ...props\n}: LucideIconProps) {\n const IconComponent = getLucideIcon(icon, fallback);\n\n return <IconComponent className={cn(className)} {...props} />;\n}\n\n","/**\n * Suspense Wrapper Component\n * \n * Reusable Suspense component with consistent loading fallback\n * Used for wrapping layouts that may use useSearchParams or other async hooks\n */\n\n'use client';\n\nimport { ReactNode, Suspense as ReactSuspense } from 'react';\n\ninterface SuspenseProps {\n children: ReactNode;\n fallback?: ReactNode;\n}\n\nconst defaultFallback = (\n <div className=\"flex items-center justify-center min-h-screen\">\n <div className=\"text-center\">\n <div className=\"inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]\" />\n <p className=\"mt-4 text-sm text-muted-foreground\">Loading...</p>\n </div>\n </div>\n);\n\nexport function Suspense({ children, fallback = defaultFallback }: SuspenseProps) {\n return <ReactSuspense fallback={fallback}>{children}</ReactSuspense>;\n}\n\n","/**\n * Simple ErrorBoundary Component\n * \n * Catches React errors and displays a fallback UI\n */\n\n'use client';\n\nimport React, { Component, ErrorInfo, ReactNode } from 'react';\n\ninterface ErrorBoundaryProps {\n children: ReactNode;\n supportEmail?: string;\n onError?: (error: Error, errorInfo: ErrorInfo) => void;\n}\n\ninterface ErrorBoundaryState {\n hasError: boolean;\n error: Error | null;\n}\n\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error: Error): ErrorBoundaryState {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n // Call custom error handler if provided\n if (this.props.onError) {\n this.props.onError(error, errorInfo);\n }\n \n // Log to console in development\n if (process.env.NODE_ENV === 'development') {\n console.error('ErrorBoundary caught an error:', error, errorInfo);\n }\n }\n\n render() {\n if (this.state.hasError) {\n return (\n <div className=\"flex min-h-screen items-center justify-center bg-background p-4\">\n <div className=\"max-w-md w-full space-y-4 text-center\">\n <h1 className=\"text-2xl font-bold text-foreground\">Something went wrong</h1>\n <p className=\"text-muted-foreground\">\n We're sorry, but something unexpected happened. Please try refreshing the page.\n </p>\n {this.props.supportEmail && (\n <p className=\"text-sm text-muted-foreground\">\n If the problem persists, please contact{' '}\n <a\n href={`mailto:${this.props.supportEmail}`}\n className=\"text-primary hover:underline\"\n >\n {this.props.supportEmail}\n </a>\n </p>\n )}\n <button\n onClick={() => window.location.reload()}\n className=\"px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90\"\n >\n Refresh Page\n </button>\n </div>\n </div>\n );\n }\n\n return this.props.children;\n }\n}\n\n","/**\n * Universal Error Configuration\n *\n * Provides standard error content for common HTTP status codes\n * Use this to maintain consistency across error pages\n *\n * NOTE: Only returns primitives (title, description) - NO React components\n * This ensures safe serialization during prerendering\n */\n\nexport interface ErrorContent {\n title: string;\n description: string;\n}\n\n/**\n * Get standardized error content based on status code\n *\n * @param statusCode - HTTP status code or custom error type\n * @returns Error content configuration (title and description only)\n *\n * @example\n * ```tsx\n * const { title, description } = getErrorContent(404);\n * <ErrorLayout title={title} description={description} code={404} />\n * ```\n */\nexport function getErrorContent(statusCode?: number | string): ErrorContent {\n const code = typeof statusCode === 'string' ? parseInt(statusCode, 10) : statusCode;\n\n switch (code) {\n // 400 Bad Request\n case 400:\n return {\n title: 'Bad Request',\n description: 'The request could not be understood. Please check your input and try again.',\n };\n\n // 401 Unauthorized\n case 401:\n return {\n title: 'Authentication Required',\n description: 'You need to sign in to access this page.',\n };\n\n // 403 Forbidden\n case 403:\n return {\n title: 'Access Denied',\n description: \"You don't have permission to access this resource.\",\n };\n\n // 404 Not Found\n case 404:\n return {\n title: 'Page Not Found',\n description: \"The page you're looking for doesn't exist or has been moved.\",\n };\n\n // 408 Request Timeout\n case 408:\n return {\n title: 'Request Timeout',\n description: 'The request took too long to process. Please try again.',\n };\n\n // 500 Internal Server Error\n case 500:\n return {\n title: 'Server Error',\n description: \"Something went wrong on our end. We're working to fix it.\",\n };\n\n // 502 Bad Gateway\n case 502:\n return {\n title: 'Bad Gateway',\n description: 'The server received an invalid response. Please try again later.',\n };\n\n // 503 Service Unavailable\n case 503:\n return {\n title: 'Service Unavailable',\n description: 'The service is temporarily unavailable. Please try again later.',\n };\n\n // 504 Gateway Timeout\n case 504:\n return {\n title: 'Gateway Timeout',\n description: 'The server took too long to respond. Please try again.',\n };\n\n // Default / Unknown Error\n default:\n return {\n title: 'Something Went Wrong',\n description: 'An unexpected error occurred. Please try again or contact support.',\n };\n }\n}\n\n/**\n * Common error codes as constants\n */\nexport const ERROR_CODES = {\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n TIMEOUT: 408,\n SERVER_ERROR: 500,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n} as const;\n\n","/**\n * ErrorLayout - Universal Error Display\n *\n * Minimalist error page with customizable content\n * Works with Next.js error pages (404.tsx, 500.tsx, error.tsx)\n *\n * Usage:\n * ```tsx\n * // app/not-found.tsx\n * import { ErrorLayout } from '@djangocfg/layouts/components';\n *\n * export default function NotFound() {\n * return <ErrorLayout code={404} supportEmail={settings.contact.email} />;\n * }\n * ```\n */\n\n'use client';\n\nimport React from 'react';\n\nimport { Button } from '@djangocfg/ui-nextjs/components';\n\nimport { getErrorContent } from './errorConfig';\n\nexport interface ErrorLayoutProps {\n /** Error code (e.g., \"404\", \"500\", \"403\") - if provided, auto-configures title/description/icon */\n code?: string | number;\n /** Error title (auto-generated from code if not provided) */\n title?: string;\n /** Error description (auto-generated from code if not provided) */\n description?: string;\n /** Custom action buttons */\n actions?: React.ReactNode;\n /** Show default actions (back, home) */\n showDefaultActions?: boolean;\n /** Custom illustration/icon (auto-generated from code if not provided) */\n illustration?: React.ReactNode;\n /** Support email for contact link */\n supportEmail?: string;\n}\n\n// Local function to select the icon based on the code. \n// This is safe as it's defined and used inside a Client Component.\nfunction getErrorIcon(code?: string | number): React.ReactNode {\n const c = code ? String(code) : '';\n \n // NOTE: You can replace these SVG paths with imported Lucid Icons \n // (e.g., <AlertTriangle />) if you prefer.\n switch (c) {\n case '404':\n return (\n <svg\n className=\"w-32 h-32 mx-auto text-foreground/80\"\n viewBox=\"0 0 32 32\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n {/* Cloud with 404 Icon */}\n <g>\n <path fillRule=\"evenodd\" d=\"M19.889 21.734v-.947l-.631.947z\" />\n <path d=\"M15.484 19.636h1.032a.017.017 0 0 1 .017.017v3.1a.016.016 0 0 1-.016.016h-1.034a.016.016 0 0 1-.016-.016v-3.1a.017.017 0 0 1 .017-.017z\" />\n <g fillRule=\"evenodd\">\n <path d=\"M12.402 21.734v-.947l-.631.947z\" />\n <path d=\"M16 1.5A14.5 14.5 0 1 0 30.5 16 14.507 14.507 0 0 0 16 1.5zm-2.324 21.234H13.4v.532a.5.5 0 0 1-1 0v-.532h-1.563a.5.5 0 0 1-.416-.778l2.067-3.1a.5.5 0 0 1 .914.28v2.6h.274a.5.5 0 0 1 0 1zm-2.137-9.9A4.14 4.14 0 0 1 15.545 9.8a.5.5 0 0 1 0 1 3.138 3.138 0 0 0-3.04 2.3.5.5 0 0 1-.966-.259zm5.994 9.911a1.017 1.017 0 0 1-1.017 1.016h-1.032a1.017 1.017 0 0 1-1.017-1.016v-3.1a1.017 1.017 0 0 1 1.017-1.016h1.032a1.017 1.017 0 0 1 1.017 1.016zm3.63-.016h-.274v.532a.5.5 0 0 1-1 0v-.532h-1.565a.5.5 0 0 1-.416-.778l2.067-3.1a.5.5 0 0 1 .914.28v2.6h.274a.5.5 0 0 1 0 1zm1.036-1.52a.5.5 0 1 1-.4-.917 3.263 3.263 0 0 0-1.337-6.266.5.5 0 0 1-.5-.5 4.6 4.6 0 0 0-9.2 0 4.45 4.45 0 0 0 .153 1.161.5.5 0 0 1-.411.625 2.633 2.633 0 0 0-.364 5.148.5.5 0 0 1-.278.961 3.63 3.63 0 0 1-.024-6.984 5.467 5.467 0 0 1-.076-.911 5.6 5.6 0 0 1 11.182-.474 4.258 4.258 0 0 1 1.256 8.162z\" />\n </g>\n </g>\n </svg>\n );\n case '500':\n return (\n <svg\n className=\"w-32 h-32 mx-auto text-foreground/80\"\n viewBox=\"0 0 512 512\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n {/* Server Error Icon - Circle with Exclamation */}\n <g>\n <path d=\"M256 118c-76.1 0-138 61.88-138 138s61.9 138.05 138 138.05 138-61.93 138-138S332.1 118 256 118zm0 237.93a30.12 30.12 0 1 1 30.11-30.12A30.15 30.15 0 0 1 256 355.88zm30.11-80.31a8.48 8.48 0 0 1-8.47 8.48h-43.28a8.48 8.48 0 0 1-8.47-8.48v-111a8.47 8.47 0 0 1 8.47-8.47h43.28a8.47 8.47 0 0 1 8.47 8.47z\" />\n <path d=\"M256 312.6a13.17 13.17 0 1 0 13.16 13.16A13.17 13.17 0 0 0 256 312.6zM242.84 173.07h26.32v94.02h-26.32z\" />\n <path d=\"M256 0C114.62 0 0 114.62 0 256s114.62 256 256 256 256-114.62 256-256S397.38 0 256 0zm109.57 365.6A155 155 0 1 1 411 256a153.91 153.91 0 0 1-45.43 109.6z\" />\n </g>\n </svg>\n );\n case '403':\n return (\n <svg\n className=\"w-32 h-32 mx-auto text-foreground/80\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n {/* Forbidden Icon - Circle with X */}\n <path d=\"M12 1a11 11 0 1 0 11 11A11.013 11.013 0 0 0 12 1zm4.242 13.829a1 1 0 1 1-1.414 1.414L12 13.414l-2.828 2.829a1 1 0 0 1-1.414-1.414L10.586 12 7.758 9.171a1 1 0 1 1 1.414-1.414L12 10.586l2.828-2.829a1 1 0 1 1 1.414 1.414L13.414 12z\" />\n </svg>\n );\n default:\n return null;\n }\n}\n\n/**\n * ErrorLayout Component\n */\nexport function ErrorLayout({\n code,\n title,\n description,\n actions,\n showDefaultActions = true,\n illustration,\n supportEmail = 'support@example.com',\n}: ErrorLayoutProps) {\n \n // Get content (Title/Description) from config. Note: Illustration check removed.\n // The function getErrorContent MUST NOT return React components/functions.\n const autoContent = code && (!title || !description)\n ? getErrorContent(code)\n : null;\n\n // Fallback to auto-generated values\n const finalTitle = title || autoContent?.title || 'Error';\n const finalDescription = description || autoContent?.description;\n \n // ILLUSTRATION FIX: Use passed prop OR compute the icon locally using getErrorIcon.\n const finalIllustration = illustration ?? getErrorIcon(code);\n\n\n const handleGoBack = () => {\n if (document.referrer && document.referrer !== window.location.href) {\n window.location.href = document.referrer;\n } else if (window.history.length > 1) {\n window.history.back();\n } else {\n window.location.href = '/';\n }\n };\n\n const handleGoHome = () => {\n window.location.href = '/';\n };\n\n return (\n <div className=\"min-h-screen flex items-center justify-center px-4 bg-background\">\n <div className=\"max-w-2xl w-full text-center space-y-8\">\n {/* Illustration */}\n {finalIllustration && (\n <div className=\"flex justify-center py-8\">\n {finalIllustration}\n </div>\n )}\n\n {/* Error Content */}\n <div className=\"space-y-4\">\n <h2 className=\"text-4xl font-bold text-foreground\">\n {finalTitle}\n </h2>\n\n {finalDescription && (\n <p className=\"text-lg text-muted-foreground max-w-md mx-auto\">\n {finalDescription}\n </p>\n )}\n </div>\n\n {/* Actions */}\n <div className=\"flex flex-col sm:flex-row items-center justify-center gap-4 pt-4\">\n {/* Custom actions */}\n {actions}\n\n {/* Default actions */}\n {showDefaultActions && !actions && (\n <>\n <Button\n variant=\"outline\"\n size=\"lg\"\n onClick={handleGoBack}\n style={{ minWidth: '140px', padding: '12px 32px' }}\n >\n Go Back\n </Button>\n <Button\n variant=\"default\"\n size=\"lg\"\n onClick={handleGoHome}\n style={{ minWidth: '140px', padding: '12px 32px' }}\n >\n Go Home\n </Button>\n </>\n )}\n </div>\n\n {/* Additional Info */}\n <div className=\"pt-8 text-sm text-muted-foreground\">\n <p>\n Need help? Contact{' '}\n <a\n href={`mailto:${supportEmail}`}\n className=\"text-primary hover:underline\"\n >\n support\n </a>\n </p>\n </div>\n </div>\n </div>\n );\n}\n\n","'use client';\n\nimport { useEffect } from 'react';\n\nimport { useAuth } from '@djangocfg/api/auth';\nimport { Preloader } from '@djangocfg/ui-nextjs/components';\nimport { useCfgRouter } from '@djangocfg/ui-nextjs/hooks';\n\nexport interface RedirectPageProps {\n /**\n * Path to redirect to when user is authenticated\n * @default '/private'\n */\n authenticatedPath?: string;\n /**\n * Path to redirect to when user is not authenticated\n * @default '/auth'\n */\n unauthenticatedPath?: string;\n /**\n * Custom loading text\n * @default 'Loading...'\n */\n loadingText?: string;\n}\n\n/**\n * RedirectPage - Root page component that handles authentication redirect\n *\n * Redirects authenticated users to authenticatedPath, otherwise to unauthenticatedPath\n *\n * Usage:\n * ```tsx\n * // app/page.tsx\n * import { RedirectPage } from '@djangocfg/layouts/components';\n *\n * export default function Page() {\n * return (\n * <RedirectPage\n * authenticatedPath=\"/private\"\n * unauthenticatedPath=\"/auth\"\n * />\n * );\n * }\n * ```\n */\nexport function RedirectPage({\n authenticatedPath = '/private',\n unauthenticatedPath = '/auth',\n loadingText = 'Loading...',\n}: RedirectPageProps) {\n const { isAuthenticated } = useAuth();\n const router = useCfgRouter();\n\n useEffect(() => {\n if (!isAuthenticated) {\n router.hardPush(unauthenticatedPath);\n } else {\n router.hardPush(authenticatedPath);\n }\n }, [isAuthenticated, router, authenticatedPath, unauthenticatedPath]);\n\n return (\n <Preloader\n variant=\"fullscreen\"\n text={loadingText}\n size=\"lg\"\n />\n );\n}\n\n","/**\n * Error Formatters\n *\n * Format different error types for display and copying\n */\n\nimport type { ZodError } from 'zod';\nimport type { ValidationErrorDetail, CORSErrorDetail, NetworkErrorDetail, CentrifugoErrorDetail } from '../types';\n\n/**\n * Format Zod error issues for display\n */\nexport function formatZodIssues(error: ZodError, maxIssues: number = 3): string {\n const issues = error.issues.slice(0, maxIssues);\n const formatted = issues.map((issue) => {\n const path = issue.path.join('.') || 'root';\n return `${path}: ${issue.message}`;\n });\n\n if (error.issues.length > maxIssues) {\n formatted.push(`... and ${error.issues.length - maxIssues} more`);\n }\n\n return formatted.join(', ');\n}\n\n/**\n * Format validation error for clipboard\n */\nexport function formatValidationErrorForClipboard(detail: ValidationErrorDetail): string {\n const errorData = {\n type: 'validation',\n timestamp: detail.timestamp.toISOString(),\n operation: detail.operation,\n endpoint: {\n method: detail.method,\n path: detail.path,\n },\n validation_errors: detail.error.issues.map((issue) => ({\n path: issue.path.join('.') || 'root',\n message: issue.message,\n code: issue.code,\n ...(('expected' in issue) && { expected: issue.expected }),\n ...(('received' in issue) && { received: issue.received }),\n ...(('minimum' in issue) && { minimum: issue.minimum }),\n ...(('maximum' in issue) && { maximum: issue.maximum }),\n })),\n response: detail.response,\n total_errors: detail.error.issues.length,\n };\n\n return JSON.stringify(errorData, null, 2);\n}\n\n/**\n * Format CORS error for clipboard\n */\nexport function formatCORSErrorForClipboard(detail: CORSErrorDetail): string {\n const errorData = {\n type: 'cors',\n timestamp: detail.timestamp.toISOString(),\n url: detail.url,\n method: detail.method,\n error: detail.error,\n };\n\n return JSON.stringify(errorData, null, 2);\n}\n\n/**\n * Format network error for clipboard\n */\nexport function formatNetworkErrorForClipboard(detail: NetworkErrorDetail): string {\n const errorData = {\n type: 'network',\n timestamp: detail.timestamp.toISOString(),\n url: detail.url,\n method: detail.method,\n error: detail.error,\n ...(detail.statusCode && { statusCode: detail.statusCode }),\n };\n\n return JSON.stringify(errorData, null, 2);\n}\n\n/**\n * Format centrifugo error for clipboard\n */\nexport function formatCentrifugoErrorForClipboard(detail: CentrifugoErrorDetail): string {\n const errorData = {\n type: 'centrifugo',\n timestamp: detail.timestamp.toISOString(),\n method: detail.method,\n error: detail.error,\n ...(detail.code !== undefined && { code: detail.code }),\n ...(detail.data && { data: detail.data }),\n };\n\n return JSON.stringify(errorData, null, 2);\n}\n\n/**\n * Extract domain from URL\n */\nexport function extractDomain(url: string): string {\n try {\n const urlObj = new URL(url);\n return urlObj.origin;\n } catch {\n return url;\n }\n}\n\n/**\n * Format error title based on type\n */\nexport function formatErrorTitle(detail: ValidationErrorDetail | CORSErrorDetail | NetworkErrorDetail | CentrifugoErrorDetail): string {\n switch (detail.type) {\n case 'validation':\n return `❌ Validation Error in ${detail.operation}`;\n case 'cors':\n return '🚫 CORS Error';\n case 'network':\n return detail.statusCode\n ? `⚠️ Network Error (${detail.statusCode})`\n : '⚠️ Network Error';\n case 'centrifugo':\n return detail.code !== undefined\n ? `🔌 Centrifugo Error (${detail.code})`\n : '🔌 Centrifugo Error';\n default:\n return '❌ Error';\n }\n}\n","\"use client\"\n\n/**\n * cURL Generator\n *\n * Generates cURL commands from API request details with authentication token\n */\n\nimport consola from 'consola';\n\nexport interface CurlOptions {\n method: string;\n path: string;\n token?: string;\n body?: any;\n headers?: Record<string, string>;\n baseUrl?: string;\n queryParams?: Record<string, string>;\n}\n\n/**\n * Get authentication token from localStorage\n */\nexport function getAuthToken(): string | null {\n if (typeof window === 'undefined') return null;\n\n try {\n // Priority order: access_token > token > auth_token\n const token = localStorage.getItem('access_token') ||\n localStorage.getItem('token') ||\n localStorage.getItem('auth_token');\n\n return token;\n } catch (error) {\n consola.error('Failed to get auth token:', error);\n return null;\n }\n}\n\n/**\n * Format headers for cURL command\n */\nfunction formatHeaders(headers: Record<string, string>): string[] {\n return Object.entries(headers).map(\n ([key, value]) => `-H '${key}: ${value}'`\n );\n}\n\n/**\n * Escape single quotes in string for shell\n */\nfunction escapeShell(str: string): string {\n return str.replace(/'/g, \"'\\\\''\");\n}\n\n/**\n * Generate cURL command from request details\n */\nexport function generateCurl(options: CurlOptions): string {\n const {\n method,\n path,\n token = getAuthToken() || undefined, // Auto-fetch if not provided\n body,\n headers = {},\n baseUrl = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000',\n } = options;\n\n const curlParts: string[] = ['curl'];\n\n // Build URL\n const url = `${baseUrl}${path}`;\n curlParts.push(`'${url}'`);\n\n // Add method if not GET\n if (method.toUpperCase() !== 'GET') {\n curlParts.push(`-X ${method.toUpperCase()}`);\n }\n\n // Default headers\n const allHeaders: Record<string, string> = {\n 'Accept': '*/*',\n 'Content-Type': 'application/json',\n ...headers,\n };\n\n // Add Authorization header if token exists\n if (token) {\n allHeaders['Authorization'] = `Bearer ${token}`;\n }\n\n // Add all headers\n const headerStrings = formatHeaders(allHeaders);\n curlParts.push(...headerStrings);\n\n // Add body for non-GET requests\n if (body && method.toUpperCase() !== 'GET') {\n const bodyJson = typeof body === 'string'\n ? body\n : JSON.stringify(body, null, 2);\n curlParts.push(`-d '${escapeShell(bodyJson)}'`);\n }\n\n // Join with line continuation\n return curlParts.join(' \\\\\\n ');\n}\n\n/**\n * Generate cURL from validation error details\n * Auto-fetches token from localStorage\n */\nexport function generateCurlFromError(detail: {\n method: string;\n path: string;\n response?: any;\n}): string {\n return generateCurl({\n method: detail.method,\n path: detail.path,\n // token is auto-fetched in generateCurl\n });\n}\n","/**\n * ErrorButtons - Universal copy buttons for all error types\n *\n * Provides copy functionality for validation, CORS, and network errors\n */\n\n'use client';\n\nimport { Copy, Terminal } from 'lucide-react';\nimport React from 'react';\n\nimport { Button } from '@djangocfg/ui-nextjs';\nimport { useCopy } from '@djangocfg/ui-core/hooks';\n\nimport { generateCurlFromError } from '../utils/curl-generator';\nimport {\n formatCentrifugoErrorForClipboard,\n formatCORSErrorForClipboard,\n formatNetworkErrorForClipboard,\n formatValidationErrorForClipboard\n} from '../utils/formatters';\n\nimport type { ValidationErrorDetail, CORSErrorDetail, NetworkErrorDetail, CentrifugoErrorDetail } from '../types';\nexport interface ErrorButtonsProps {\n detail: ValidationErrorDetail | CORSErrorDetail | NetworkErrorDetail | CentrifugoErrorDetail;\n}\n\n/**\n * Format error for clipboard based on type\n */\nfunction formatErrorForClipboard(detail: ValidationErrorDetail | CORSErrorDetail | NetworkErrorDetail | CentrifugoErrorDetail): string {\n switch (detail.type) {\n case 'validation':\n return formatValidationErrorForClipboard(detail);\n case 'cors':\n return formatCORSErrorForClipboard(detail);\n case 'network':\n return formatNetworkErrorForClipboard(detail);\n case 'centrifugo':\n return formatCentrifugoErrorForClipboard(detail);\n default:\n return JSON.stringify(detail, null, 2);\n }\n}\n\n/**\n * Check if error supports cURL generation\n */\nfunction supportsCurl(detail: ValidationErrorDetail | CORSErrorDetail | NetworkErrorDetail | CentrifugoErrorDetail): boolean {\n return detail.type === 'validation';\n}\n\n/**\n * Universal error buttons\n */\nexport function ErrorButtons({ detail }: ErrorButtonsProps) {\n const { copyToClipboard } = useCopy();\n\n const handleCopyError = async (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n const formattedError = formatErrorForClipboard(detail);\n await copyToClipboard(formattedError, '✅ Error details copied');\n };\n\n const handleCopyCurl = async (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (detail.type === 'validation') {\n const curl = generateCurlFromError({\n method: detail.method,\n path: detail.path,\n response: detail.response,\n });\n await copyToClipboard(curl, '✅ cURL command copied');\n }\n };\n\n return (\n <div className=\"flex gap-2 mt-2\">\n <Button\n size=\"sm\"\n variant=\"secondary\"\n onClick={handleCopyError}\n className=\"h-8 text-xs bg-background hover:bg-background/80 text-foreground border border-border gap-1.5\"\n >\n <Copy className=\"h-3.5 w-3.5\" />\n Copy Error\n </Button>\n\n {supportsCurl(detail) && (\n <Button\n size=\"sm\"\n variant=\"secondary\"\n onClick={handleCopyCurl}\n className=\"h-8 text-xs bg-background hover:bg-background/80 text-foreground border border-border gap-1.5\"\n >\n <Terminal className=\"h-3.5 w-3.5\" />\n Copy cURL\n </Button>\n )}\n </div>\n );\n}\n","/**\n * ErrorToast - Universal toast for all error types\n *\n * Formats validation, CORS, and network errors with appropriate styling\n */\n\n'use client';\n\nimport React from 'react';\n\nimport { extractDomain, formatErrorTitle, formatZodIssues } from '../utils/formatters';\nimport { ErrorButtons } from './ErrorButtons';\n\nimport type {\n ValidationErrorDetail,\n CORSErrorDetail,\n NetworkErrorDetail,\n CentrifugoErrorDetail,\n ValidationErrorConfig,\n CORSErrorConfig,\n NetworkErrorConfig,\n CentrifugoErrorConfig,\n} from '../types';\n/**\n * Build validation error description\n */\nfunction buildValidationDescription(\n detail: ValidationErrorDetail,\n config: Required<ValidationErrorConfig>\n): React.ReactNode {\n const descriptionParts: string[] = [];\n\n // Add HTTP method and path\n if (config.showPath) {\n descriptionParts.push(`${detail.method} ${detail.path}`);\n }\n\n // Add error count\n if (config.showErrorCount) {\n const count = detail.error.issues.length;\n const plural = count === 1 ? 'error' : 'errors';\n descriptionParts.push(`${count} ${plural}`);\n }\n\n // Add formatted error messages\n const issuesText = formatZodIssues(detail.error, config.maxIssuesInToast);\n\n return (\n <div className=\"flex flex-col gap-2 text-sm\">\n {descriptionParts.length > 0 && (\n <div className=\"font-mono text-xs opacity-90\">\n {descriptionParts.join(' • ')}\n </div>\n )}\n <div className=\"opacity-90\">{issuesText}</div>\n <ErrorButtons detail={detail} />\n </div>\n );\n}\n\n/**\n * Build CORS error description\n */\nfunction buildCORSDescription(\n detail: CORSErrorDetail,\n config: Required<CORSErrorConfig>\n): React.ReactNode {\n const domain = extractDomain(detail.url);\n const parts: string[] = [];\n\n // Add method and URL info\n if (config.showMethod && config.showUrl) {\n parts.push(`${detail.method} ${detail.url}`);\n } else if (config.showUrl) {\n parts.push(detail.url);\n } else if (config.showMethod) {\n parts.push(`${detail.method} request blocked`);\n }\n\n return (\n <div className=\"flex flex-col gap-2 text-sm\">\n {parts.length > 0 && (\n <div className=\"font-mono text-xs opacity-90\">\n {parts.join(' • ')}\n </div>\n )}\n\n <div className=\"flex flex-col gap-2\">\n <div className=\"font-medium\">Request blocked by CORS policy</div>\n <div className=\"text-xs opacity-75\">\n Check CORS configuration on {domain}\n </div>\n </div>\n\n <ErrorButtons detail={detail} />\n </div>\n );\n}\n\n/**\n * Build network error description\n */\nfunction buildNetworkDescription(\n detail: NetworkErrorDetail,\n config: Required<NetworkErrorConfig>\n): React.ReactNode {\n const parts: string[] = [];\n\n // Add method and URL info\n if (config.showMethod && config.showUrl) {\n parts.push(`${detail.method} ${detail.url}`);\n } else if (config.showUrl) {\n parts.push(detail.url);\n } else if (config.showMethod) {\n parts.push(`${detail.method} request failed`);\n }\n\n // Add status code\n if (config.showStatusCode && detail.statusCode) {\n parts.push(`Status: ${detail.statusCode}`);\n }\n\n return (\n <div className=\"flex flex-col gap-2 text-sm\">\n {parts.length > 0 && (\n <div className=\"font-mono text-xs opacity-90\">\n {parts.join(' • ')}\n </div>\n )}\n\n <div className=\"opacity-90\">{detail.error}</div>\n\n <ErrorButtons detail={detail} />\n </div>\n );\n}\n\n/**\n * Build centrifugo error description\n */\nfunction buildCentrifugoDescription(\n detail: CentrifugoErrorDetail,\n config: Required<CentrifugoErrorConfig>\n): React.ReactNode {\n const parts: string[] = [];\n\n // Add method info\n if (config.showMethod) {\n parts.push(`RPC: ${detail.method}`);\n }\n\n // Add error code\n if (config.showCode && detail.code !== undefined) {\n parts.push(`Code: ${detail.code}`);\n }\n\n return (\n <div className=\"flex flex-col gap-2 text-sm\">\n {parts.length > 0 && (\n <div className=\"font-mono text-xs opacity-90\">\n {parts.join(' • ')}\n </div>\n )}\n\n <div className=\"opacity-90\">{detail.error}</div>\n\n <ErrorButtons detail={detail} />\n </div>\n );\n}\n\n/**\n * Create toast options for any error type\n */\nexport function createErrorToast(\n detail: ValidationErrorDetail | CORSErrorDetail | NetworkErrorDetail | CentrifugoErrorDetail,\n config: Required<ValidationErrorConfig | CORSErrorConfig | NetworkErrorConfig | CentrifugoErrorConfig>\n) {\n let description: React.ReactNode;\n\n // Build description based on error type\n if (detail.type === 'validation') {\n description = buildValidationDescription(detail, config as Required<ValidationErrorConfig>);\n } else if (detail.type === 'cors') {\n description = buildCORSDescription(detail, config as Required<CORSErrorConfig>);\n } else if (detail.type === 'centrifugo') {\n description = buildCentrifugoDescription(detail, config as Required<CentrifugoErrorConfig>);\n } else {\n description = buildNetworkDescription(detail, config as Required<NetworkErrorConfig>);\n }\n\n return {\n title: formatErrorTitle(detail),\n description,\n variant: 'destructive' as const,\n duration: config.duration,\n };\n}\n","/**\n * Error Tracking Types\n *\n * Common types for all error tracking functionality\n */\n\nimport type { ZodError } from 'zod';\n\n/**\n * Base error detail from CustomEvent\n */\nexport interface BaseErrorDetail {\n /** Timestamp of the error */\n timestamp: Date;\n}\n\n/**\n * Validation error detail (from zod-validation-error event)\n */\nexport interface ValidationErrorDetail extends BaseErrorDetail {\n type: 'validation';\n /** Operation/function name that failed validation */\n operation: string;\n /** API endpoint path */\n path: string;\n /** HTTP method */\n method: string;\n /** Zod validation error */\n error: ZodError;\n /** Raw response data that failed validation */\n response: any;\n}\n\n/**\n * CORS error detail (from cors-error event)\n */\nexport interface CORSErrorDetail extends BaseErrorDetail {\n type: 'cors';\n /** API endpoint that was blocked */\n url: string;\n /** HTTP method */\n method: string;\n /** Error message */\n error: string;\n}\n\n/**\n * Network error detail (from network-error event)\n */\nexport interface NetworkErrorDetail extends BaseErrorDetail {\n type: 'network';\n /** API endpoint that failed */\n url: string;\n /** HTTP method */\n method: string;\n /** Error message */\n error: string;\n /** Status code if available */\n statusCode?: number;\n}\n\n/**\n * Centrifugo error detail (from centrifugo-error event)\n */\nexport interface CentrifugoErrorDetail extends BaseErrorDetail {\n type: 'centrifugo';\n /** RPC method that failed */\n method: string;\n /** Error message */\n error: string;\n /** Error code from Centrifugo */\n code?: number;\n /** Additional data sent with the request */\n data?: any;\n}\n\n/**\n * Union type of all error details\n */\nexport type ErrorDetail = ValidationErrorDetail | CORSErrorDetail | NetworkErrorDetail | CentrifugoErrorDetail;\n\n/**\n * Stored error with unique ID\n */\nexport type StoredError<T extends ErrorDetail = ErrorDetail> = T & {\n /** Unique identifier for this error instance */\n id: string;\n};\n\n/**\n * Configuration for specific error type\n */\nexport interface ErrorTypeConfig {\n /**\n * Enable tracking for this error type\n * @default true\n */\n enabled?: boolean;\n\n /**\n * Show toast notifications\n * @default true\n */\n showToast?: boolean;\n\n /**\n * Maximum number of errors to keep in history\n * @default 50\n */\n maxErrors?: number;\n\n /**\n * Toast duration in milliseconds (0 = no auto-dismiss)\n * @default 8000 for validation, 0 for cors/network\n */\n duration?: number;\n}\n\n/**\n * Validation error specific config\n */\nexport interface ValidationErrorConfig extends ErrorTypeConfig {\n /**\n * Show operation name in toast\n * @default true\n */\n showOperation?: boolean;\n\n /**\n * Show endpoint path in toast\n * @default true\n */\n showPath?: boolean;\n\n /**\n * Show error count in toast\n * @default true\n */\n showErrorCount?: boolean;\n\n /**\n * Maximum number of issues to show in toast\n * @default 3\n */\n maxIssuesInToast?: number;\n}\n\n/**\n * CORS error specific config\n */\nexport interface CORSErrorConfig extends ErrorTypeConfig {\n /**\n * Show full URL in toast\n * @default true\n */\n showUrl?: boolean;\n\n /**\n * Show HTTP method in toast\n * @default true\n */\n showMethod?: boolean;\n}\n\n/**\n * Network error specific config\n */\nexport interface NetworkErrorConfig extends ErrorTypeConfig {\n /**\n * Show full URL in toast\n * @default true\n */\n showUrl?: boolean;\n\n /**\n * Show HTTP method in toast\n * @default true\n */\n showMethod?: boolean;\n\n /**\n * Show status code in toast\n * @default true\n */\n showStatusCode?: boolean;\n}\n\n/**\n * Centrifugo error specific config\n */\nexport interface CentrifugoErrorConfig extends ErrorTypeConfig {\n /**\n * Show RPC method in toast\n * @default true\n */\n showMethod?: boolean;\n\n /**\n * Show error code in toast\n * @default true\n */\n showCode?: boolean;\n}\n\n/**\n * Complete error tracking configuration\n */\nexport interface ErrorTrackingConfig {\n /**\n * Validation error tracking configuration\n */\n validation?: ValidationErrorConfig;\n\n /**\n * CORS error tracking configuration\n */\n cors?: CORSErrorConfig;\n\n /**\n * Network error tracking configuration\n */\n network?: NetworkErrorConfig;\n\n /**\n * Centrifugo error tracking configuration\n */\n centrifugo?: CentrifugoErrorConfig;\n\n /**\n * Custom error handler (called before toast for all errors)\n * Return false to prevent default toast notification\n */\n onError?: (error: ErrorDetail) => boolean | void;\n}\n\n/**\n * Error tracking context value\n */\nexport interface ErrorTrackingContextValue {\n /** All errors */\n errors: StoredError[];\n\n /** Validation errors only */\n validationErrors: StoredError<ValidationErrorDetail>[];\n\n /** CORS errors only */\n corsErrors: StoredError<CORSErrorDetail>[];\n\n /** Network errors only */\n networkErrors: StoredError<NetworkErrorDetail>[];\n\n /** Centrifugo errors only */\n centrifugoErrors: StoredError<CentrifugoErrorDetail>[];\n\n /** Clear all errors */\n clearErrors: () => void;\n\n /** Clear errors by type */\n clearErrorsByType: (type: 'validation' | 'cors' | 'network' | 'centrifugo') => void;\n\n /** Clear specific error by ID */\n clearError: (id: string) => void;\n\n /** Get error count */\n errorCount: number;\n\n /** Get latest error */\n latestError: StoredError | null;\n\n /** Configuration */\n config: {\n validation: Required<ValidationErrorConfig>;\n cors: Required<CORSErrorConfig>;\n network: Required<NetworkErrorConfig>;\n centrifugo: Required<CentrifugoErrorConfig>;\n };\n}\n\n/**\n * Event names for error tracking\n */\nexport const ERROR_EVENTS = {\n VALIDATION: 'zod-validation-error',\n CORS: 'cors-error',\n NETWORK: 'network-error',\n /** Unified Centrifugo event - filter by detail.type === 'error' */\n CENTRIFUGO: 'centrifugo',\n} as const;\n\n/**\n * Default configurations\n */\nexport const DEFAULT_ERROR_CONFIG: Required<ErrorTypeConfig> = {\n enabled: true,\n showToast: true,\n maxErrors: 50,\n duration: 8000,\n};\n\nexport const DEFAULT_VALIDATION_CONFIG: Required<ValidationErrorConfig> = {\n ...DEFAULT_ERROR_CONFIG,\n showOperation: true,\n showPath: true,\n showErrorCount: true,\n maxIssuesInToast: 3,\n};\n\nexport const DEFAULT_CORS_CONFIG: Required<CORSErrorConfig> = {\n ...DEFAULT_ERROR_CONFIG,\n duration: 0, // Don't auto-dismiss CORS errors\n showUrl: true,\n showMethod: true,\n};\n\nexport const DEFAULT_NETWORK_CONFIG: Required<NetworkErrorConfig> = {\n ...DEFAULT_ERROR_CONFIG,\n duration: 0, // Don't auto-dismiss network errors\n showUrl: true,\n showMethod: true,\n showStatusCode: true,\n};\n\nexport const DEFAULT_CENTRIFUGO_CONFIG: Required<CentrifugoErrorConfig> = {\n ...DEFAULT_ERROR_CONFIG,\n duration: 0, // Don't auto-dismiss centrifugo errors\n showMethod: true,\n showCode: true,\n};\n","/**\n * ErrorTrackingProvider - Universal error tracking\n *\n * Single provider that tracks all error types:\n * - Validation errors (Zod)\n * - CORS errors\n * - Network errors\n *\n * @example\n * ```tsx\n * // Default - all enabled\n * <ErrorTrackingProvider>\n * <App />\n * </ErrorTrackingProvider>\n *\n * // Custom configuration\n * <ErrorTrackingProvider\n * validation={{ showToast: true, maxErrors: 100 }}\n * cors={{ enabled: true }}\n * network={{ enabled: false }}\n * >\n * <App />\n * </ErrorTrackingProvider>\n * ```\n */\n\n'use client';\n\nimport React, {\n createContext, ReactNode, useCallback, useContext, useEffect, useState\n} from 'react';\n\nimport { toast } from '@djangocfg/ui-core/hooks';\n\nimport { createErrorToast } from '../components/ErrorToast';\nimport {\n DEFAULT_CENTRIFUGO_CONFIG,\n DEFAULT_CORS_CONFIG,\n DEFAULT_NETWORK_CONFIG,\n DEFAULT_VALIDATION_CONFIG,\n ERROR_EVENTS\n} from '../types';\n\nimport type {\n ErrorDetail,\n StoredError,\n ErrorTrackingConfig,\n ValidationErrorConfig,\n CORSErrorConfig,\n NetworkErrorConfig,\n CentrifugoErrorConfig,\n ValidationErrorDetail,\n CORSErrorDetail,\n NetworkErrorDetail,\n CentrifugoErrorDetail,\n ErrorTrackingContextValue,\n} from '../types';\nconst ErrorTrackingContext = createContext<ErrorTrackingContextValue | undefined>(undefined);\n\n/**\n * Generate unique ID for error\n */\nlet errorIdCounter = 0;\nfunction generateErrorId(type: string): string {\n return `${type}-error-${Date.now()}-${++errorIdCounter}`;\n}\n\nexport interface ErrorTrackingProviderProps {\n children: ReactNode;\n validation?: Partial<ValidationErrorConfig>;\n cors?: Partial<CORSErrorConfig>;\n network?: Partial<NetworkErrorConfig>;\n centrifugo?: Partial<CentrifugoErrorConfig>;\n onError?: (error: ErrorDetail) => boolean | void;\n}\n\n/**\n * Universal Error Tracking Provider\n *\n * Tracks all error types with a single provider\n */\nexport function ErrorTrackingProvider({\n children,\n validation: userValidationConfig,\n cors: userCorsConfig,\n network: userNetworkConfig,\n centrifugo: userCentrifugoConfig,\n onError,\n}: ErrorTrackingProviderProps) {\n const [errors, setErrors] = useState<StoredError[]>([]);\n\n // Merge user configs with defaults\n const validationConfig: Required<ValidationErrorConfig> = {\n ...DEFAULT_VALIDATION_CONFIG,\n ...userValidationConfig,\n };\n\n const corsConfig: Required<CORSErrorConfig> = {\n ...DEFAULT_CORS_CONFIG,\n ...userCorsConfig,\n };\n\n const networkConfig: Required<NetworkErrorConfig> = {\n ...DEFAULT_NETWORK_CONFIG,\n ...userNetworkConfig,\n };\n\n const centrifugoConfig: Required<CentrifugoErrorConfig> = {\n ...DEFAULT_CENTRIFUGO_CONFIG,\n ...userCentrifugoConfig,\n };\n\n /**\n * Clear all errors\n */\n const clearErrors = useCallback(() => {\n setErrors([]);\n }, []);\n\n /**\n * Clear errors by type\n */\n const clearErrorsByType = useCallback((type: 'validation' | 'cors' | 'network') => {\n setErrors((prev) => prev.filter((error) => error.type !== type));\n }, []);\n\n /**\n * Clear specific error\n */\n const clearError = useCallback((id: string) => {\n setErrors((prev) => prev.filter((error) => error.id !== id));\n }, []);\n\n /**\n * Handle any error event\n */\n const handleError = useCallback(\n (detail: ErrorDetail, config: Required<ValidationErrorConfig | CORSErrorConfig | NetworkErrorConfig | CentrifugoErrorConfig>) => {\n // Create stored error with ID\n const storedError: StoredError = {\n ...detail,\n id: generateErrorId(detail.type),\n };\n\n // Add to errors array (limited by maxErrors)\n setErrors((prev) => {\n const updated = [storedError, ...prev];\n return updated.slice(0, config.maxErrors);\n });\n\n // Call custom error handler\n const shouldShowToast = onError?.(detail) !== false;\n\n // Show toast notification using Sonner\n if (config.showToast && shouldShowToast) {\n const toastOptions = createErrorToast(detail, config);\n toast.error(toastOptions.title, {\n description: toastOptions.description,\n duration: toastOptions.duration,\n });\n }\n },\n [onError]\n );\n\n /**\n * Setup event listeners\n */\n useEffect(() => {\n // Only run in browser\n if (typeof window === 'undefined') return;\n\n const handlers: Array<{ event: string; handler: (e: Event) => void }> = [];\n\n // Validation errors\n if (validationConfig.enabled) {\n const handler = (event: Event) => {\n if (!(event instanceof CustomEvent)) return;\n const detail: ValidationErrorDetail = {\n ...event.detail,\n type: 'validation' as const,\n };\n handleError(detail, validationConfig);\n };\n window.addEventListener(ERROR_EVENTS.VALIDATION, handler);\n handlers.push({ event: ERROR_EVENTS.VALIDATION, handler });\n }\n\n // CORS errors\n if (corsConfig.enabled) {\n const handler = (event: Event) => {\n if (!(event instanceof CustomEvent)) return;\n const detail: CORSErrorDetail = {\n ...event.detail,\n type: 'cors' as const,\n };\n handleError(detail, corsConfig);\n };\n window.addEventListener(ERROR_EVENTS.CORS, handler);\n handlers.push({ event: ERROR_EVENTS.CORS, handler });\n }\n\n // Network errors\n if (networkConfig.enabled) {\n const handler = (event: Event) => {\n if (!(event instanceof CustomEvent)) return;\n const detail: NetworkErrorDetail = {\n ...event.detail,\n type: 'network' as const,\n };\n handleError(detail, networkConfig);\n };\n window.addEventListener(ERROR_EVENTS.NETWORK, handler);\n handlers.push({ event: ERROR_EVENTS.NETWORK, handler });\n }\n\n // Centrifugo errors (unified event with type discriminator)\n if (centrifugoConfig.enabled) {\n const handler = (event: Event) => {\n if (!(event instanceof CustomEvent)) return;\n // Filter: only handle 'error' type from unified centrifugo event\n if (event.detail?.type !== 'error') return;\n const detail: CentrifugoErrorDetail = {\n type: 'centrifugo' as const,\n method: event.detail.data?.method || 'unknown',\n error: event.detail.data?.error || 'Unknown error',\n code: event.detail.data?.code,\n data: event.detail.data?.data,\n timestamp: event.detail.timestamp || new Date(),\n };\n handleError(detail, centrifugoConfig);\n };\n window.addEventListener(ERROR_EVENTS.CENTRIFUGO, handler);\n handlers.push({ event: ERROR_EVENTS.CENTRIFUGO, handler });\n }\n\n // Cleanup\n return () => {\n handlers.forEach(({ event, handler }) => {\n window.removeEventListener(event, handler);\n });\n };\n }, [handleError, validationConfig, corsConfig, networkConfig, centrifugoConfig]);\n\n // Filter errors by type\n const validationErrors = errors.filter((e) => e.type === 'validation') as StoredError<ValidationErrorDetail>[];\n const corsErrors = errors.filter((e) => e.type === 'cors') as StoredError<CORSErrorDetail>[];\n const networkErrors = errors.filter((e) => e.type === 'network') as StoredError<NetworkErrorDetail>[];\n const centrifugoErrors = errors.filter((e) => e.type === 'centrifugo') as StoredError<CentrifugoErrorDetail>[];\n\n const value: ErrorTrackingContextValue = {\n errors,\n validationErrors,\n corsErrors,\n networkErrors,\n centrifugoErrors,\n clearErrors,\n clearErrorsByType,\n clearError,\n errorCount: errors.length,\n latestError: errors[0] || null,\n config: {\n validation: validationConfig,\n cors: corsConfig,\n network: networkConfig,\n centrifugo: centrifugoConfig,\n },\n };\n\n return (\n <ErrorTrackingContext.Provider value={value}>\n {children}\n </ErrorTrackingContext.Provider>\n );\n}\n\n/**\n * useErrors Hook\n *\n * Access errors from any component\n *\n * @example\n * ```tsx\n * function ErrorPanel() {\n * const { errors, validationErrors, clearErrors } = useErrors();\n *\n * return (\n * <div>\n * <h3>Errors ({errors.length})</h3>\n * <h4>Validation: {validationErrors.length}</h4>\n * <button onClick={clearErrors}>Clear All</button>\n * </div>\n * );\n * }\n * ```\n */\nexport function useErrors(): ErrorTrackingContextValue {\n const context = useContext(ErrorTrackingContext);\n\n if (context === undefined) {\n throw new Error('useErrors must be used within ErrorTrackingProvider');\n }\n\n return context;\n}\n"]}
|