@djangocfg/layouts 1.2.56 → 1.2.57

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/layouts",
3
- "version": "1.2.56",
3
+ "version": "1.2.57",
4
4
  "description": "Layout system and components for Unrealon applications",
5
5
  "author": {
6
6
  "name": "DjangoCFG",
@@ -63,9 +63,9 @@
63
63
  "check": "tsc --noEmit"
64
64
  },
65
65
  "peerDependencies": {
66
- "@djangocfg/api": "^1.2.56",
67
- "@djangocfg/og-image": "^1.2.56",
68
- "@djangocfg/ui": "^1.2.56",
66
+ "@djangocfg/api": "^1.2.57",
67
+ "@djangocfg/og-image": "^1.2.57",
68
+ "@djangocfg/ui": "^1.2.57",
69
69
  "@hookform/resolvers": "^5.2.0",
70
70
  "consola": "^3.4.2",
71
71
  "lucide-react": "^0.468.0",
@@ -86,7 +86,7 @@
86
86
  "vidstack": "0.6.15"
87
87
  },
88
88
  "devDependencies": {
89
- "@djangocfg/typescript-config": "^1.2.56",
89
+ "@djangocfg/typescript-config": "^1.2.57",
90
90
  "@types/node": "^24.7.2",
91
91
  "@types/react": "19.2.2",
92
92
  "@types/react-dom": "19.2.1",
@@ -38,6 +38,8 @@ import { determineLayoutMode, getRedirectUrl } from './utils';
38
38
  import { useAuth } from '../../auth';
39
39
  import type { AppLayoutConfig } from './types';
40
40
  import type { ValidationErrorConfig, CORSErrorConfig, NetworkErrorConfig } from '../../validation';
41
+ import type { PageWithConfig } from '../../types/pageConfig';
42
+ import { determinePageConfig } from '../../types/pageConfig';
41
43
 
42
44
  // Dynamic import for AdminLayout to prevent SSR hydration issues
43
45
  const AdminLayout = dynamic(
@@ -48,6 +50,16 @@ const AdminLayout = dynamic(
48
50
  export interface AppLayoutProps {
49
51
  children: ReactNode;
50
52
  config: AppLayoutConfig;
53
+ /**
54
+ * Next.js page component (for reading pageConfig)
55
+ * @example component={Component}
56
+ */
57
+ component?: PageWithConfig;
58
+ /**
59
+ * Next.js page props (for reading dynamic pageConfig from SSR)
60
+ * @example pageProps={pageProps}
61
+ */
62
+ pageProps?: Record<string, any>;
51
63
  /**
52
64
  * Disable layout rendering (Navigation, Sidebar, Footer)
53
65
  * Only providers and SEO remain active
@@ -264,7 +276,7 @@ function LayoutRouter({
264
276
  * </AppLayout>
265
277
  * ```
266
278
  */
267
- export function AppLayout({ children, config, disableLayout = false, forceLayout, fontFamily, showPackageVersions, validation, cors, network }: AppLayoutProps) {
279
+ export function AppLayout({ children, config, component, pageProps, disableLayout = false, forceLayout, fontFamily, showPackageVersions, validation, cors, network }: AppLayoutProps) {
268
280
  const router = useRouter();
269
281
 
270
282
  // Check if ErrorBoundary is enabled (default: true)
@@ -272,18 +284,28 @@ export function AppLayout({ children, config, disableLayout = false, forceLayout
272
284
  const supportEmail = config.errors?.supportEmail;
273
285
  const onError = config.errors?.onError;
274
286
 
287
+ // Determine final pageConfig (merges static + dynamic from SSR)
288
+ const finalPageConfig = component && pageProps
289
+ ? determinePageConfig(
290
+ component,
291
+ pageProps,
292
+ config.app.name,
293
+ config.app.description
294
+ )
295
+ : {
296
+ title: config.app.name,
297
+ description: config.app.description,
298
+ ogImage: {
299
+ title: config.app.name,
300
+ subtitle: config.app.description,
301
+ },
302
+ };
303
+
275
304
  const appContent = (
276
305
  <AppContextProvider config={config} showPackageVersions={showPackageVersions}>
277
306
  {/* SEO Meta Tags */}
278
307
  <Seo
279
- pageConfig={{
280
- title: config.app.name,
281
- description: config.app.description,
282
- ogImage: {
283
- title: config.app.name,
284
- subtitle: config.app.description,
285
- },
286
- }}
308
+ pageConfig={finalPageConfig}
287
309
  icons={config.app.icons}
288
310
  siteUrl={config.app.siteUrl}
289
311
  />
@@ -16,36 +16,36 @@ export interface PackageInfo {
16
16
  /**
17
17
  * Package versions registry
18
18
  * Auto-synced from package.json files
19
- * Last updated: 2025-11-22T08:33:50.453Z
19
+ * Last updated: 2025-11-23T06:13:14.600Z
20
20
  */
21
21
  const PACKAGE_VERSIONS: PackageInfo[] = [
22
22
  {
23
23
  "name": "@djangocfg/ui",
24
- "version": "1.2.56"
24
+ "version": "1.2.57"
25
25
  },
26
26
  {
27
27
  "name": "@djangocfg/api",
28
- "version": "1.2.56"
28
+ "version": "1.2.57"
29
29
  },
30
30
  {
31
31
  "name": "@djangocfg/layouts",
32
- "version": "1.2.56"
32
+ "version": "1.2.57"
33
33
  },
34
34
  {
35
35
  "name": "@djangocfg/markdown",
36
- "version": "1.2.56"
36
+ "version": "1.2.57"
37
37
  },
38
38
  {
39
39
  "name": "@djangocfg/og-image",
40
- "version": "1.2.56"
40
+ "version": "1.2.57"
41
41
  },
42
42
  {
43
43
  "name": "@djangocfg/eslint-config",
44
- "version": "1.2.56"
44
+ "version": "1.2.57"
45
45
  },
46
46
  {
47
47
  "name": "@djangocfg/typescript-config",
48
- "version": "1.2.56"
48
+ "version": "1.2.57"
49
49
  }
50
50
  ];
51
51