@djangocfg/layouts 1.4.30 → 2.0.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/README.md +277 -18
- package/package.json +15 -24
- package/src/auth/context/AuthContext.tsx +5 -5
- package/src/auth/hooks/useAuthGuard.ts +1 -1
- package/src/auth/hooks/useAutoAuth.ts +8 -7
- package/src/components/ErrorBoundary.tsx +78 -0
- package/src/components/JsonLd.tsx +31 -0
- package/src/components/LucideIcon.tsx +91 -0
- package/src/components/PageProgress.tsx +127 -0
- package/src/components/Suspense.tsx +29 -0
- package/src/{layouts/AppLayout/components → components}/UpdateNotifier/UpdateNotifier.tsx +56 -49
- package/src/components/index.ts +10 -0
- package/src/index.ts +25 -7
- package/src/layouts/AdminLayout/AdminLayout.tsx +46 -0
- package/src/layouts/AdminLayout/index.ts +7 -0
- package/src/layouts/AppLayout/AppLayout.tsx +278 -326
- package/src/layouts/AppLayout/index.ts +2 -39
- package/src/layouts/{AppLayout/layouts/AuthLayout → AuthLayout}/AuthContext.tsx +3 -2
- package/src/layouts/{AppLayout/layouts/AuthLayout → AuthLayout}/AuthHelp.tsx +1 -0
- package/src/layouts/AuthLayout/AuthLayout.tsx +61 -0
- package/src/layouts/{AppLayout/layouts/AuthLayout → AuthLayout}/IdentifierForm.tsx +47 -34
- package/src/layouts/{AppLayout/layouts/AuthLayout → AuthLayout}/OTPForm.tsx +2 -3
- package/src/layouts/AuthLayout/index.ts +24 -0
- package/src/layouts/{AppLayout/layouts/AuthLayout → AuthLayout}/types.ts +1 -0
- package/src/layouts/PrivateLayout/PrivateLayout.tsx +144 -0
- package/src/layouts/PrivateLayout/components/PrivateContent.tsx +32 -0
- package/src/layouts/PrivateLayout/components/PrivateHeader.tsx +57 -0
- package/src/layouts/PrivateLayout/components/PrivateSidebar.tsx +141 -0
- package/src/layouts/PrivateLayout/components/index.ts +8 -0
- package/src/layouts/PrivateLayout/index.ts +7 -0
- package/src/layouts/ProfileLayout/ProfileLayout.tsx +15 -7
- package/src/layouts/PublicLayout/PublicLayout.tsx +121 -0
- package/src/layouts/PublicLayout/components/PublicFooter.tsx +190 -0
- package/src/layouts/PublicLayout/components/PublicMobileDrawer.tsx +117 -0
- package/src/layouts/PublicLayout/components/PublicNavigation.tsx +101 -0
- package/src/layouts/PublicLayout/components/index.ts +8 -0
- package/src/layouts/PublicLayout/index.ts +7 -0
- package/src/layouts/_components/UserMenu.tsx +160 -0
- package/src/layouts/_components/index.ts +7 -0
- package/src/layouts/index.ts +15 -8
- package/src/snippets/Analytics/AnalyticsProvider.tsx +8 -4
- package/src/snippets/Analytics/useAnalytics.ts +11 -21
- package/src/snippets/Chat/ChatWidget.tsx +4 -4
- package/src/snippets/ContactForm/ContactFormProvider.tsx +32 -19
- package/src/snippets/ContactForm/ContactPage.tsx +2 -4
- package/src/snippets/ContactForm/types.ts +3 -2
- package/src/snippets/index.ts +0 -1
- package/src/layouts/AppLayout/README.md +0 -204
- package/src/layouts/AppLayout/SUMMARY.md +0 -240
- package/src/layouts/AppLayout/USAGE.md +0 -312
- package/src/layouts/AppLayout/components/ErrorBoundary.tsx +0 -112
- package/src/layouts/AppLayout/components/PageProgress.tsx +0 -123
- package/src/layouts/AppLayout/components/Seo.tsx +0 -171
- package/src/layouts/AppLayout/components/UserMenu.tsx +0 -385
- package/src/layouts/AppLayout/components/index.ts +0 -11
- package/src/layouts/AppLayout/context/AppContext.tsx +0 -151
- package/src/layouts/AppLayout/context/index.ts +0 -5
- package/src/layouts/AppLayout/hooks/index.ts +0 -8
- package/src/layouts/AppLayout/hooks/useLayoutMode.ts +0 -26
- package/src/layouts/AppLayout/hooks/useNavigation.ts +0 -51
- package/src/layouts/AppLayout/layouts/AdminLayout/AdminLayout.tsx +0 -224
- package/src/layouts/AppLayout/layouts/AdminLayout/README.md +0 -409
- package/src/layouts/AppLayout/layouts/AdminLayout/components/PagePreloader.example.tsx +0 -98
- package/src/layouts/AppLayout/layouts/AdminLayout/components/PagePreloader.tsx +0 -149
- package/src/layouts/AppLayout/layouts/AdminLayout/components/ParentSync.tsx +0 -146
- package/src/layouts/AppLayout/layouts/AdminLayout/components/index.ts +0 -3
- package/src/layouts/AppLayout/layouts/AdminLayout/context/CfgAppContext.tsx +0 -48
- package/src/layouts/AppLayout/layouts/AdminLayout/context/index.ts +0 -2
- package/src/layouts/AppLayout/layouts/AdminLayout/hooks/index.ts +0 -6
- package/src/layouts/AppLayout/layouts/AdminLayout/hooks/useApp.ts +0 -279
- package/src/layouts/AppLayout/layouts/AdminLayout/index.ts +0 -24
- package/src/layouts/AppLayout/layouts/AdminLayout/lottie/energizing.json +0 -1
- package/src/layouts/AppLayout/layouts/AdminLayout/types/index.ts +0 -45
- package/src/layouts/AppLayout/layouts/AuthLayout/AuthLayout.tsx +0 -41
- package/src/layouts/AppLayout/layouts/AuthLayout/index.ts +0 -15
- package/src/layouts/AppLayout/layouts/PrivateLayout/PrivateLayout.tsx +0 -82
- package/src/layouts/AppLayout/layouts/PrivateLayout/components/DashboardContent.tsx +0 -62
- package/src/layouts/AppLayout/layouts/PrivateLayout/components/DashboardHeader.tsx +0 -89
- package/src/layouts/AppLayout/layouts/PrivateLayout/components/DashboardSidebar.tsx +0 -181
- package/src/layouts/AppLayout/layouts/PrivateLayout/components/index.ts +0 -9
- package/src/layouts/AppLayout/layouts/PrivateLayout/index.ts +0 -5
- package/src/layouts/AppLayout/layouts/PublicLayout/PublicLayout.tsx +0 -44
- package/src/layouts/AppLayout/layouts/PublicLayout/components/Footer.tsx +0 -242
- package/src/layouts/AppLayout/layouts/PublicLayout/components/MobileDrawer.tsx +0 -150
- package/src/layouts/AppLayout/layouts/PublicLayout/components/Navigation.tsx +0 -169
- package/src/layouts/AppLayout/layouts/PublicLayout/index.ts +0 -5
- package/src/layouts/AppLayout/layouts/index.ts +0 -7
- package/src/layouts/AppLayout/providers/CoreProviders.tsx +0 -80
- package/src/layouts/AppLayout/providers/index.ts +0 -5
- package/src/layouts/AppLayout/types/config.ts +0 -79
- package/src/layouts/AppLayout/types/index.ts +0 -11
- package/src/layouts/AppLayout/types/layout.ts +0 -54
- package/src/layouts/AppLayout/types/navigation.ts +0 -43
- package/src/layouts/AppLayout/types/page.ts +0 -80
- package/src/layouts/AppLayout/types/routes.ts +0 -43
- package/src/layouts/AppLayout/utils/index.ts +0 -5
- package/src/layouts/AppLayout/utils/routeDetection.ts +0 -31
- package/src/layouts/ErrorLayout/ErrorLayout.tsx +0 -173
- package/src/layouts/ErrorLayout/errorConfig.tsx +0 -152
- package/src/layouts/ErrorLayout/index.ts +0 -8
- package/src/layouts/SimpleLayout/SimpleLayout.tsx +0 -72
- package/src/layouts/SimpleLayout/index.ts +0 -3
- package/src/snippets/VideoPlayer/README.md +0 -238
- package/src/snippets/VideoPlayer/VideoControls.tsx +0 -137
- package/src/snippets/VideoPlayer/VideoPlayer.tsx +0 -248
- package/src/snippets/VideoPlayer/index.ts +0 -8
- package/src/snippets/VideoPlayer/types.ts +0 -61
- package/src/types/index.ts +0 -2
- package/src/types/pageConfig.ts +0 -100
- /package/src/{validation → components/ErrorsTracker}/README.md +0 -0
- /package/src/{validation → components/ErrorsTracker}/components/ErrorButtons.tsx +0 -0
- /package/src/{validation → components/ErrorsTracker}/components/ErrorToast.tsx +0 -0
- /package/src/{validation → components/ErrorsTracker}/hooks.ts +0 -0
- /package/src/{validation → components/ErrorsTracker}/index.ts +0 -0
- /package/src/{validation → components/ErrorsTracker}/providers/ErrorTrackingProvider.tsx +0 -0
- /package/src/{validation → components/ErrorsTracker}/types.ts +0 -0
- /package/src/{validation → components/ErrorsTracker}/utils/curl-generator.ts +0 -0
- /package/src/{validation → components/ErrorsTracker}/utils/formatters.ts +0 -0
- /package/src/{layouts/AppLayout/components → components}/UpdateNotifier/index.ts +0 -0
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* VideoPlayer Types - Professional Vidstack Implementation
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export interface VideoSource {
|
|
6
|
-
/** Video URL - supports YouTube, Vimeo, MP4, HLS, etc. */
|
|
7
|
-
url: string;
|
|
8
|
-
/** Video title */
|
|
9
|
-
title?: string;
|
|
10
|
-
/** Video description */
|
|
11
|
-
description?: string;
|
|
12
|
-
/** Custom poster/thumbnail URL */
|
|
13
|
-
poster?: string;
|
|
14
|
-
/** Video duration in seconds */
|
|
15
|
-
duration?: number;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface VideoPlayerProps {
|
|
19
|
-
/** Video source configuration */
|
|
20
|
-
source: VideoSource;
|
|
21
|
-
/** Aspect ratio (default: 16/9) */
|
|
22
|
-
aspectRatio?: number;
|
|
23
|
-
/** Auto-play video */
|
|
24
|
-
autoplay?: boolean;
|
|
25
|
-
/** Mute video by default */
|
|
26
|
-
muted?: boolean;
|
|
27
|
-
/** Play video inline on mobile */
|
|
28
|
-
playsInline?: boolean;
|
|
29
|
-
/** Show custom controls */
|
|
30
|
-
controls?: boolean;
|
|
31
|
-
/** Custom CSS class */
|
|
32
|
-
className?: string;
|
|
33
|
-
/** Show video info */
|
|
34
|
-
showInfo?: boolean;
|
|
35
|
-
/** Player theme */
|
|
36
|
-
theme?: 'default' | 'minimal' | 'modern';
|
|
37
|
-
/** Event callbacks */
|
|
38
|
-
onPlay?: () => void;
|
|
39
|
-
onPause?: () => void;
|
|
40
|
-
onEnded?: () => void;
|
|
41
|
-
onError?: (error: string) => void;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface VideoPlayerRef {
|
|
45
|
-
/** Play video */
|
|
46
|
-
play: () => void;
|
|
47
|
-
/** Pause video */
|
|
48
|
-
pause: () => void;
|
|
49
|
-
/** Toggle play/pause */
|
|
50
|
-
togglePlay: () => void;
|
|
51
|
-
/** Seek to time */
|
|
52
|
-
seekTo: (time: number) => void;
|
|
53
|
-
/** Set volume (0-1) */
|
|
54
|
-
setVolume: (volume: number) => void;
|
|
55
|
-
/** Toggle mute */
|
|
56
|
-
toggleMute: () => void;
|
|
57
|
-
/** Enter fullscreen */
|
|
58
|
-
enterFullscreen: () => void;
|
|
59
|
-
/** Exit fullscreen */
|
|
60
|
-
exitFullscreen: () => void;
|
|
61
|
-
}
|
package/src/types/index.ts
DELETED
package/src/types/pageConfig.ts
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
// Configuration for the AppBar
|
|
4
|
-
export interface AppBarConfig {
|
|
5
|
-
label?: string;
|
|
6
|
-
showSidebarToggle?: boolean;
|
|
7
|
-
onSidebarToggle?: () => void;
|
|
8
|
-
hideAuthButtons?: boolean;
|
|
9
|
-
hideNavigation?: boolean;
|
|
10
|
-
actions?: ReactNode;
|
|
11
|
-
showPageScrollProgress?: boolean;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// OpenGraph configuration
|
|
15
|
-
export interface OpenGraphConfig {
|
|
16
|
-
title?: string;
|
|
17
|
-
description?: string;
|
|
18
|
-
type?: string;
|
|
19
|
-
images?: Array<{
|
|
20
|
-
url: string;
|
|
21
|
-
width?: number;
|
|
22
|
-
height?: number;
|
|
23
|
-
alt?: string;
|
|
24
|
-
}>;
|
|
25
|
-
siteName?: string;
|
|
26
|
-
locale?: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// Twitter configuration
|
|
30
|
-
export interface TwitterConfig {
|
|
31
|
-
card?: 'summary' | 'summary_large_image' | 'app' | 'player';
|
|
32
|
-
title?: string;
|
|
33
|
-
description?: string;
|
|
34
|
-
images?: string[];
|
|
35
|
-
creator?: string;
|
|
36
|
-
site?: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Configuration for a Page using the App3 layout
|
|
40
|
-
export interface PageConfig {
|
|
41
|
-
projectName?: string;
|
|
42
|
-
title?: string;
|
|
43
|
-
description?: string;
|
|
44
|
-
keywords?: string;
|
|
45
|
-
jsonLd?: Record<string, any>;
|
|
46
|
-
appBar?: AppBarConfig;
|
|
47
|
-
protected?: boolean;
|
|
48
|
-
themeMode?: 'light' | 'dark';
|
|
49
|
-
ogImage?: {
|
|
50
|
-
title?: string;
|
|
51
|
-
subtitle?: string;
|
|
52
|
-
};
|
|
53
|
-
openGraph?: OpenGraphConfig;
|
|
54
|
-
twitter?: TwitterConfig;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// --- Helper Function ---
|
|
58
|
-
/**
|
|
59
|
-
* Determine final page config by merging static and dynamic configs
|
|
60
|
-
*/
|
|
61
|
-
export const determinePageConfig = (
|
|
62
|
-
Component: any,
|
|
63
|
-
pageProps: Record<string, any>,
|
|
64
|
-
defaultTitle?: string,
|
|
65
|
-
defaultDescription?: string,
|
|
66
|
-
): PageConfig => {
|
|
67
|
-
const defaultPageConfig: PageConfig = {
|
|
68
|
-
title: defaultTitle,
|
|
69
|
-
description: defaultDescription,
|
|
70
|
-
protected: false,
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const configFromProps = pageProps.pageConfig as PageConfig | undefined;
|
|
74
|
-
const configFromStatic = Component.pageConfig as PageConfig | undefined;
|
|
75
|
-
|
|
76
|
-
let finalConfig: PageConfig = { ...defaultPageConfig };
|
|
77
|
-
|
|
78
|
-
// Merge static config first
|
|
79
|
-
if (configFromStatic) {
|
|
80
|
-
finalConfig = {
|
|
81
|
-
...finalConfig,
|
|
82
|
-
...configFromStatic,
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// Merge dynamic config from props (overrides static)
|
|
87
|
-
if (configFromProps) {
|
|
88
|
-
finalConfig = {
|
|
89
|
-
...finalConfig,
|
|
90
|
-
...configFromProps,
|
|
91
|
-
appBar: {
|
|
92
|
-
...finalConfig.appBar,
|
|
93
|
-
...configFromProps.appBar,
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
return finalConfig;
|
|
99
|
-
};
|
|
100
|
-
// --- End Helper Function ---
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|